const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DialogDocTabs-ExyRNCmU.js","./DialogDocTabs-BN_-WcSx.css","./DialogMultiSection-R8CQrWj3.js","./PrintOutlined-B9HvI__H.js","./DialogTabsForReports-BTc98GHA.js","./SectionPersonalData-BFn2gtxv.js","./SearchPersons-C1hfxGSb.js","./SectionReports-CR4VT6wR.js","./SectionReports-cxDy8ZCl.css","./SectionDocumentsChose-CWNMUy0u.js","./SectionPersonalData-CPTy6LAm.css","./SectionReportsAndDocuments-DT2N3iGP.js","./SectionNFA-CDYNIhL_.js","./DialogNFA-9n-PsP-P.js","./SectionDepartament-BhgnBP91.js","./DialogDepartments-D20amGm6.js","./SalaryComponent-Dn6QrfyR.js","./MonthYearPicker-CnPllbI6.js","./Amounts-D9Fd5gdh.js","./DialogDoc-BCKCegu0.js","./LocalParams-Dz-ktk1o.js","./Leaves-BvV0zspE.js","./SectionStaff-CMk3nPA_.js","./DialogOficialStructure-CvZZAODg.js","./UsersAudit-CBH-hEaW.js","./TransactionClasses-h_LhgLhw.css","./SectionTimeTable-C6g_ZqO6.js","./SectionAccounting-GLoEIzCT.js","./SectionClsBook-CkvUzlq-.js","./DialogClsBook-Bom3EoDl.js","./SectionPayTypes-BO5EvqNM.js","./SectionPayTypes-Bgd7RAa9.css","./SectionWorkTime-B9Vc40Xf.js","./SectionWorkTime-fihW0zdn.css","./SignUpUMI-oXBpHd2G.js","./Alert-Bz9RX1jF.js","./SignIn-BbTs8zBq.js","./SignUp-C1Cc_mR9.js","./RestorePassword-CHcueK5R.js"])))=>i.map(i=>d[i]);
var __defProp = Object.defineProperty;
var __typeError = (msg) => {
  throw TypeError(msg);
};
var __defNormalProp = (obj2, key, value) => key in obj2 ? __defProp(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __publicField = (obj2, key, value) => __defNormalProp(obj2, typeof key !== "symbol" ? key + "" : key, value);
var __accessCheck = (obj2, member, msg) => member.has(obj2) || __typeError("Cannot " + msg);
var __privateGet = (obj2, member, getter) => (__accessCheck(obj2, member, "read from private field"), getter ? getter.call(obj2) : member.get(obj2));
var __privateAdd = (obj2, member, value) => member.has(obj2) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj2) : member.set(obj2, value);
var __privateSet = (obj2, member, value, setter) => (__accessCheck(obj2, member, "write to private field"), setter ? setter.call(obj2, value) : member.set(obj2, value), value);
var __privateMethod = (obj2, member, method) => (__accessCheck(obj2, member, "access private method"), method);
var _a;
function _mergeNamespaces(n, m2) {
  for (var i = 0; i < m2.length; i++) {
    const e2 = m2[i];
    if (typeof e2 !== "string" && !Array.isArray(e2)) {
      for (const k2 in e2) {
        if (k2 !== "default" && !(k2 in n)) {
          const d2 = Object.getOwnPropertyDescriptor(e2, k2);
          if (d2) {
            Object.defineProperty(n, k2, d2.get ? d2 : {
              enumerable: true,
              get: () => e2[k2]
            });
          }
        }
      }
    }
  }
  return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
}
(function polyfill() {
  const relList = document.createElement("link").relList;
  if (relList && relList.supports && relList.supports("modulepreload")) {
    return;
  }
  for (const link of document.querySelectorAll('link[rel="modulepreload"]')) {
    processPreload(link);
  }
  new MutationObserver((mutations) => {
    for (const mutation of mutations) {
      if (mutation.type !== "childList") {
        continue;
      }
      for (const node2 of mutation.addedNodes) {
        if (node2.tagName === "LINK" && node2.rel === "modulepreload")
          processPreload(node2);
      }
    }
  }).observe(document, { childList: true, subtree: true });
  function getFetchOpts(link) {
    const fetchOpts = {};
    if (link.integrity) fetchOpts.integrity = link.integrity;
    if (link.referrerPolicy) fetchOpts.referrerPolicy = link.referrerPolicy;
    if (link.crossOrigin === "use-credentials")
      fetchOpts.credentials = "include";
    else if (link.crossOrigin === "anonymous") fetchOpts.credentials = "omit";
    else fetchOpts.credentials = "same-origin";
    return fetchOpts;
  }
  function processPreload(link) {
    if (link.ep)
      return;
    link.ep = true;
    const fetchOpts = getFetchOpts(link);
    fetch(link.href, fetchOpts);
  }
})();
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
function getDefaultExportFromCjs(x) {
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
}
function getAugmentedNamespace(n) {
  if (Object.prototype.hasOwnProperty.call(n, "__esModule")) return n;
  var f2 = n.default;
  if (typeof f2 == "function") {
    var a2 = function a3() {
      if (this instanceof a3) {
        return Reflect.construct(f2, arguments, this.constructor);
      }
      return f2.apply(this, arguments);
    };
    a2.prototype = f2.prototype;
  } else a2 = {};
  Object.defineProperty(a2, "__esModule", { value: true });
  Object.keys(n).forEach(function(k2) {
    var d2 = Object.getOwnPropertyDescriptor(n, k2);
    Object.defineProperty(a2, k2, d2.get ? d2 : {
      enumerable: true,
      get: function() {
        return n[k2];
      }
    });
  });
  return a2;
}
var jsxRuntime = { exports: {} };
var reactJsxRuntime_production_min = {};
var react = { exports: {} };
var react_production_min = {};
/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredReact_production_min;
function requireReact_production_min() {
  if (hasRequiredReact_production_min) return react_production_min;
  hasRequiredReact_production_min = 1;
  var l = Symbol.for("react.element"), n = Symbol.for("react.portal"), p2 = Symbol.for("react.fragment"), q2 = Symbol.for("react.strict_mode"), r2 = Symbol.for("react.profiler"), t = Symbol.for("react.provider"), u2 = Symbol.for("react.context"), v2 = Symbol.for("react.forward_ref"), w = Symbol.for("react.suspense"), x = Symbol.for("react.memo"), y2 = Symbol.for("react.lazy"), z2 = Symbol.iterator;
  function A2(a2) {
    if (null === a2 || "object" !== typeof a2) return null;
    a2 = z2 && a2[z2] || a2["@@iterator"];
    return "function" === typeof a2 ? a2 : null;
  }
  var B3 = { isMounted: function() {
    return false;
  }, enqueueForceUpdate: function() {
  }, enqueueReplaceState: function() {
  }, enqueueSetState: function() {
  } }, C2 = Object.assign, D2 = {};
  function E2(a2, b2, e2) {
    this.props = a2;
    this.context = b2;
    this.refs = D2;
    this.updater = e2 || B3;
  }
  E2.prototype.isReactComponent = {};
  E2.prototype.setState = function(a2, b2) {
    if ("object" !== typeof a2 && "function" !== typeof a2 && null != a2) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
    this.updater.enqueueSetState(this, a2, b2, "setState");
  };
  E2.prototype.forceUpdate = function(a2) {
    this.updater.enqueueForceUpdate(this, a2, "forceUpdate");
  };
  function F2() {
  }
  F2.prototype = E2.prototype;
  function G(a2, b2, e2) {
    this.props = a2;
    this.context = b2;
    this.refs = D2;
    this.updater = e2 || B3;
  }
  var H4 = G.prototype = new F2();
  H4.constructor = G;
  C2(H4, E2.prototype);
  H4.isPureReactComponent = true;
  var I2 = Array.isArray, J = Object.prototype.hasOwnProperty, K = { current: null }, L2 = { key: true, ref: true, __self: true, __source: true };
  function M2(a2, b2, e2) {
    var d2, c = {}, k2 = null, h2 = null;
    if (null != b2) for (d2 in void 0 !== b2.ref && (h2 = b2.ref), void 0 !== b2.key && (k2 = "" + b2.key), b2) J.call(b2, d2) && !L2.hasOwnProperty(d2) && (c[d2] = b2[d2]);
    var g2 = arguments.length - 2;
    if (1 === g2) c.children = e2;
    else if (1 < g2) {
      for (var f2 = Array(g2), m2 = 0; m2 < g2; m2++) f2[m2] = arguments[m2 + 2];
      c.children = f2;
    }
    if (a2 && a2.defaultProps) for (d2 in g2 = a2.defaultProps, g2) void 0 === c[d2] && (c[d2] = g2[d2]);
    return { $$typeof: l, type: a2, key: k2, ref: h2, props: c, _owner: K.current };
  }
  function N2(a2, b2) {
    return { $$typeof: l, type: a2.type, key: b2, ref: a2.ref, props: a2.props, _owner: a2._owner };
  }
  function O2(a2) {
    return "object" === typeof a2 && null !== a2 && a2.$$typeof === l;
  }
  function escape2(a2) {
    var b2 = { "=": "=0", ":": "=2" };
    return "$" + a2.replace(/[=:]/g, function(a3) {
      return b2[a3];
    });
  }
  var P2 = /\/+/g;
  function Q2(a2, b2) {
    return "object" === typeof a2 && null !== a2 && null != a2.key ? escape2("" + a2.key) : b2.toString(36);
  }
  function R2(a2, b2, e2, d2, c) {
    var k2 = typeof a2;
    if ("undefined" === k2 || "boolean" === k2) a2 = null;
    var h2 = false;
    if (null === a2) h2 = true;
    else switch (k2) {
      case "string":
      case "number":
        h2 = true;
        break;
      case "object":
        switch (a2.$$typeof) {
          case l:
          case n:
            h2 = true;
        }
    }
    if (h2) return h2 = a2, c = c(h2), a2 = "" === d2 ? "." + Q2(h2, 0) : d2, I2(c) ? (e2 = "", null != a2 && (e2 = a2.replace(P2, "$&/") + "/"), R2(c, b2, e2, "", function(a3) {
      return a3;
    })) : null != c && (O2(c) && (c = N2(c, e2 + (!c.key || h2 && h2.key === c.key ? "" : ("" + c.key).replace(P2, "$&/") + "/") + a2)), b2.push(c)), 1;
    h2 = 0;
    d2 = "" === d2 ? "." : d2 + ":";
    if (I2(a2)) for (var g2 = 0; g2 < a2.length; g2++) {
      k2 = a2[g2];
      var f2 = d2 + Q2(k2, g2);
      h2 += R2(k2, b2, e2, f2, c);
    }
    else if (f2 = A2(a2), "function" === typeof f2) for (a2 = f2.call(a2), g2 = 0; !(k2 = a2.next()).done; ) k2 = k2.value, f2 = d2 + Q2(k2, g2++), h2 += R2(k2, b2, e2, f2, c);
    else if ("object" === k2) throw b2 = String(a2), Error("Objects are not valid as a React child (found: " + ("[object Object]" === b2 ? "object with keys {" + Object.keys(a2).join(", ") + "}" : b2) + "). If you meant to render a collection of children, use an array instead.");
    return h2;
  }
  function S2(a2, b2, e2) {
    if (null == a2) return a2;
    var d2 = [], c = 0;
    R2(a2, d2, "", "", function(a3) {
      return b2.call(e2, a3, c++);
    });
    return d2;
  }
  function T2(a2) {
    if (-1 === a2._status) {
      var b2 = a2._result;
      b2 = b2();
      b2.then(function(b3) {
        if (0 === a2._status || -1 === a2._status) a2._status = 1, a2._result = b3;
      }, function(b3) {
        if (0 === a2._status || -1 === a2._status) a2._status = 2, a2._result = b3;
      });
      -1 === a2._status && (a2._status = 0, a2._result = b2);
    }
    if (1 === a2._status) return a2._result.default;
    throw a2._result;
  }
  var U2 = { current: null }, V2 = { transition: null }, W = { ReactCurrentDispatcher: U2, ReactCurrentBatchConfig: V2, ReactCurrentOwner: K };
  function X() {
    throw Error("act(...) is not supported in production builds of React.");
  }
  react_production_min.Children = { map: S2, forEach: function(a2, b2, e2) {
    S2(a2, function() {
      b2.apply(this, arguments);
    }, e2);
  }, count: function(a2) {
    var b2 = 0;
    S2(a2, function() {
      b2++;
    });
    return b2;
  }, toArray: function(a2) {
    return S2(a2, function(a3) {
      return a3;
    }) || [];
  }, only: function(a2) {
    if (!O2(a2)) throw Error("React.Children.only expected to receive a single React element child.");
    return a2;
  } };
  react_production_min.Component = E2;
  react_production_min.Fragment = p2;
  react_production_min.Profiler = r2;
  react_production_min.PureComponent = G;
  react_production_min.StrictMode = q2;
  react_production_min.Suspense = w;
  react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = W;
  react_production_min.act = X;
  react_production_min.cloneElement = function(a2, b2, e2) {
    if (null === a2 || void 0 === a2) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + a2 + ".");
    var d2 = C2({}, a2.props), c = a2.key, k2 = a2.ref, h2 = a2._owner;
    if (null != b2) {
      void 0 !== b2.ref && (k2 = b2.ref, h2 = K.current);
      void 0 !== b2.key && (c = "" + b2.key);
      if (a2.type && a2.type.defaultProps) var g2 = a2.type.defaultProps;
      for (f2 in b2) J.call(b2, f2) && !L2.hasOwnProperty(f2) && (d2[f2] = void 0 === b2[f2] && void 0 !== g2 ? g2[f2] : b2[f2]);
    }
    var f2 = arguments.length - 2;
    if (1 === f2) d2.children = e2;
    else if (1 < f2) {
      g2 = Array(f2);
      for (var m2 = 0; m2 < f2; m2++) g2[m2] = arguments[m2 + 2];
      d2.children = g2;
    }
    return { $$typeof: l, type: a2.type, key: c, ref: k2, props: d2, _owner: h2 };
  };
  react_production_min.createContext = function(a2) {
    a2 = { $$typeof: u2, _currentValue: a2, _currentValue2: a2, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null };
    a2.Provider = { $$typeof: t, _context: a2 };
    return a2.Consumer = a2;
  };
  react_production_min.createElement = M2;
  react_production_min.createFactory = function(a2) {
    var b2 = M2.bind(null, a2);
    b2.type = a2;
    return b2;
  };
  react_production_min.createRef = function() {
    return { current: null };
  };
  react_production_min.forwardRef = function(a2) {
    return { $$typeof: v2, render: a2 };
  };
  react_production_min.isValidElement = O2;
  react_production_min.lazy = function(a2) {
    return { $$typeof: y2, _payload: { _status: -1, _result: a2 }, _init: T2 };
  };
  react_production_min.memo = function(a2, b2) {
    return { $$typeof: x, type: a2, compare: void 0 === b2 ? null : b2 };
  };
  react_production_min.startTransition = function(a2) {
    var b2 = V2.transition;
    V2.transition = {};
    try {
      a2();
    } finally {
      V2.transition = b2;
    }
  };
  react_production_min.unstable_act = X;
  react_production_min.useCallback = function(a2, b2) {
    return U2.current.useCallback(a2, b2);
  };
  react_production_min.useContext = function(a2) {
    return U2.current.useContext(a2);
  };
  react_production_min.useDebugValue = function() {
  };
  react_production_min.useDeferredValue = function(a2) {
    return U2.current.useDeferredValue(a2);
  };
  react_production_min.useEffect = function(a2, b2) {
    return U2.current.useEffect(a2, b2);
  };
  react_production_min.useId = function() {
    return U2.current.useId();
  };
  react_production_min.useImperativeHandle = function(a2, b2, e2) {
    return U2.current.useImperativeHandle(a2, b2, e2);
  };
  react_production_min.useInsertionEffect = function(a2, b2) {
    return U2.current.useInsertionEffect(a2, b2);
  };
  react_production_min.useLayoutEffect = function(a2, b2) {
    return U2.current.useLayoutEffect(a2, b2);
  };
  react_production_min.useMemo = function(a2, b2) {
    return U2.current.useMemo(a2, b2);
  };
  react_production_min.useReducer = function(a2, b2, e2) {
    return U2.current.useReducer(a2, b2, e2);
  };
  react_production_min.useRef = function(a2) {
    return U2.current.useRef(a2);
  };
  react_production_min.useState = function(a2) {
    return U2.current.useState(a2);
  };
  react_production_min.useSyncExternalStore = function(a2, b2, e2) {
    return U2.current.useSyncExternalStore(a2, b2, e2);
  };
  react_production_min.useTransition = function() {
    return U2.current.useTransition();
  };
  react_production_min.version = "18.3.1";
  return react_production_min;
}
var hasRequiredReact;
function requireReact() {
  if (hasRequiredReact) return react.exports;
  hasRequiredReact = 1;
  {
    react.exports = requireReact_production_min();
  }
  return react.exports;
}
/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredReactJsxRuntime_production_min;
function requireReactJsxRuntime_production_min() {
  if (hasRequiredReactJsxRuntime_production_min) return reactJsxRuntime_production_min;
  hasRequiredReactJsxRuntime_production_min = 1;
  var f2 = requireReact(), k2 = Symbol.for("react.element"), l = Symbol.for("react.fragment"), m2 = Object.prototype.hasOwnProperty, n = f2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p2 = { key: true, ref: true, __self: true, __source: true };
  function q2(c, a2, g2) {
    var b2, d2 = {}, e2 = null, h2 = null;
    void 0 !== g2 && (e2 = "" + g2);
    void 0 !== a2.key && (e2 = "" + a2.key);
    void 0 !== a2.ref && (h2 = a2.ref);
    for (b2 in a2) m2.call(a2, b2) && !p2.hasOwnProperty(b2) && (d2[b2] = a2[b2]);
    if (c && c.defaultProps) for (b2 in a2 = c.defaultProps, a2) void 0 === d2[b2] && (d2[b2] = a2[b2]);
    return { $$typeof: k2, type: c, key: e2, ref: h2, props: d2, _owner: n.current };
  }
  reactJsxRuntime_production_min.Fragment = l;
  reactJsxRuntime_production_min.jsx = q2;
  reactJsxRuntime_production_min.jsxs = q2;
  return reactJsxRuntime_production_min;
}
var hasRequiredJsxRuntime;
function requireJsxRuntime() {
  if (hasRequiredJsxRuntime) return jsxRuntime.exports;
  hasRequiredJsxRuntime = 1;
  {
    jsxRuntime.exports = requireReactJsxRuntime_production_min();
  }
  return jsxRuntime.exports;
}
var jsxRuntimeExports = requireJsxRuntime();
var reactExports = requireReact();
const React = /* @__PURE__ */ getDefaultExportFromCjs(reactExports);
const React$1 = /* @__PURE__ */ _mergeNamespaces({
  __proto__: null,
  default: React
}, [reactExports]);
var client = {};
var reactDom = { exports: {} };
var reactDom_production_min = {};
var scheduler = { exports: {} };
var scheduler_production_min = {};
/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredScheduler_production_min;
function requireScheduler_production_min() {
  if (hasRequiredScheduler_production_min) return scheduler_production_min;
  hasRequiredScheduler_production_min = 1;
  (function(exports2) {
    function f2(a2, b2) {
      var c = a2.length;
      a2.push(b2);
      a: for (; 0 < c; ) {
        var d2 = c - 1 >>> 1, e2 = a2[d2];
        if (0 < g2(e2, b2)) a2[d2] = b2, a2[c] = e2, c = d2;
        else break a;
      }
    }
    function h2(a2) {
      return 0 === a2.length ? null : a2[0];
    }
    function k2(a2) {
      if (0 === a2.length) return null;
      var b2 = a2[0], c = a2.pop();
      if (c !== b2) {
        a2[0] = c;
        a: for (var d2 = 0, e2 = a2.length, w = e2 >>> 1; d2 < w; ) {
          var m2 = 2 * (d2 + 1) - 1, C2 = a2[m2], n = m2 + 1, x = a2[n];
          if (0 > g2(C2, c)) n < e2 && 0 > g2(x, C2) ? (a2[d2] = x, a2[n] = c, d2 = n) : (a2[d2] = C2, a2[m2] = c, d2 = m2);
          else if (n < e2 && 0 > g2(x, c)) a2[d2] = x, a2[n] = c, d2 = n;
          else break a;
        }
      }
      return b2;
    }
    function g2(a2, b2) {
      var c = a2.sortIndex - b2.sortIndex;
      return 0 !== c ? c : a2.id - b2.id;
    }
    if ("object" === typeof performance && "function" === typeof performance.now) {
      var l = performance;
      exports2.unstable_now = function() {
        return l.now();
      };
    } else {
      var p2 = Date, q2 = p2.now();
      exports2.unstable_now = function() {
        return p2.now() - q2;
      };
    }
    var r2 = [], t = [], u2 = 1, v2 = null, y2 = 3, z2 = false, A2 = false, B3 = false, D2 = "function" === typeof setTimeout ? setTimeout : null, E2 = "function" === typeof clearTimeout ? clearTimeout : null, F2 = "undefined" !== typeof setImmediate ? setImmediate : null;
    "undefined" !== typeof navigator && void 0 !== navigator.scheduling && void 0 !== navigator.scheduling.isInputPending && navigator.scheduling.isInputPending.bind(navigator.scheduling);
    function G(a2) {
      for (var b2 = h2(t); null !== b2; ) {
        if (null === b2.callback) k2(t);
        else if (b2.startTime <= a2) k2(t), b2.sortIndex = b2.expirationTime, f2(r2, b2);
        else break;
        b2 = h2(t);
      }
    }
    function H4(a2) {
      B3 = false;
      G(a2);
      if (!A2) if (null !== h2(r2)) A2 = true, I2(J);
      else {
        var b2 = h2(t);
        null !== b2 && K(H4, b2.startTime - a2);
      }
    }
    function J(a2, b2) {
      A2 = false;
      B3 && (B3 = false, E2(L2), L2 = -1);
      z2 = true;
      var c = y2;
      try {
        G(b2);
        for (v2 = h2(r2); null !== v2 && (!(v2.expirationTime > b2) || a2 && !M2()); ) {
          var d2 = v2.callback;
          if ("function" === typeof d2) {
            v2.callback = null;
            y2 = v2.priorityLevel;
            var e2 = d2(v2.expirationTime <= b2);
            b2 = exports2.unstable_now();
            "function" === typeof e2 ? v2.callback = e2 : v2 === h2(r2) && k2(r2);
            G(b2);
          } else k2(r2);
          v2 = h2(r2);
        }
        if (null !== v2) var w = true;
        else {
          var m2 = h2(t);
          null !== m2 && K(H4, m2.startTime - b2);
          w = false;
        }
        return w;
      } finally {
        v2 = null, y2 = c, z2 = false;
      }
    }
    var N2 = false, O2 = null, L2 = -1, P2 = 5, Q2 = -1;
    function M2() {
      return exports2.unstable_now() - Q2 < P2 ? false : true;
    }
    function R2() {
      if (null !== O2) {
        var a2 = exports2.unstable_now();
        Q2 = a2;
        var b2 = true;
        try {
          b2 = O2(true, a2);
        } finally {
          b2 ? S2() : (N2 = false, O2 = null);
        }
      } else N2 = false;
    }
    var S2;
    if ("function" === typeof F2) S2 = function() {
      F2(R2);
    };
    else if ("undefined" !== typeof MessageChannel) {
      var T2 = new MessageChannel(), U2 = T2.port2;
      T2.port1.onmessage = R2;
      S2 = function() {
        U2.postMessage(null);
      };
    } else S2 = function() {
      D2(R2, 0);
    };
    function I2(a2) {
      O2 = a2;
      N2 || (N2 = true, S2());
    }
    function K(a2, b2) {
      L2 = D2(function() {
        a2(exports2.unstable_now());
      }, b2);
    }
    exports2.unstable_IdlePriority = 5;
    exports2.unstable_ImmediatePriority = 1;
    exports2.unstable_LowPriority = 4;
    exports2.unstable_NormalPriority = 3;
    exports2.unstable_Profiling = null;
    exports2.unstable_UserBlockingPriority = 2;
    exports2.unstable_cancelCallback = function(a2) {
      a2.callback = null;
    };
    exports2.unstable_continueExecution = function() {
      A2 || z2 || (A2 = true, I2(J));
    };
    exports2.unstable_forceFrameRate = function(a2) {
      0 > a2 || 125 < a2 ? console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported") : P2 = 0 < a2 ? Math.floor(1e3 / a2) : 5;
    };
    exports2.unstable_getCurrentPriorityLevel = function() {
      return y2;
    };
    exports2.unstable_getFirstCallbackNode = function() {
      return h2(r2);
    };
    exports2.unstable_next = function(a2) {
      switch (y2) {
        case 1:
        case 2:
        case 3:
          var b2 = 3;
          break;
        default:
          b2 = y2;
      }
      var c = y2;
      y2 = b2;
      try {
        return a2();
      } finally {
        y2 = c;
      }
    };
    exports2.unstable_pauseExecution = function() {
    };
    exports2.unstable_requestPaint = function() {
    };
    exports2.unstable_runWithPriority = function(a2, b2) {
      switch (a2) {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
          break;
        default:
          a2 = 3;
      }
      var c = y2;
      y2 = a2;
      try {
        return b2();
      } finally {
        y2 = c;
      }
    };
    exports2.unstable_scheduleCallback = function(a2, b2, c) {
      var d2 = exports2.unstable_now();
      "object" === typeof c && null !== c ? (c = c.delay, c = "number" === typeof c && 0 < c ? d2 + c : d2) : c = d2;
      switch (a2) {
        case 1:
          var e2 = -1;
          break;
        case 2:
          e2 = 250;
          break;
        case 5:
          e2 = 1073741823;
          break;
        case 4:
          e2 = 1e4;
          break;
        default:
          e2 = 5e3;
      }
      e2 = c + e2;
      a2 = { id: u2++, callback: b2, priorityLevel: a2, startTime: c, expirationTime: e2, sortIndex: -1 };
      c > d2 ? (a2.sortIndex = c, f2(t, a2), null === h2(r2) && a2 === h2(t) && (B3 ? (E2(L2), L2 = -1) : B3 = true, K(H4, c - d2))) : (a2.sortIndex = e2, f2(r2, a2), A2 || z2 || (A2 = true, I2(J)));
      return a2;
    };
    exports2.unstable_shouldYield = M2;
    exports2.unstable_wrapCallback = function(a2) {
      var b2 = y2;
      return function() {
        var c = y2;
        y2 = b2;
        try {
          return a2.apply(this, arguments);
        } finally {
          y2 = c;
        }
      };
    };
  })(scheduler_production_min);
  return scheduler_production_min;
}
var hasRequiredScheduler;
function requireScheduler() {
  if (hasRequiredScheduler) return scheduler.exports;
  hasRequiredScheduler = 1;
  {
    scheduler.exports = requireScheduler_production_min();
  }
  return scheduler.exports;
}
/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredReactDom_production_min;
function requireReactDom_production_min() {
  if (hasRequiredReactDom_production_min) return reactDom_production_min;
  hasRequiredReactDom_production_min = 1;
  var aa = requireReact(), ca = requireScheduler();
  function p2(a2) {
    for (var b2 = "https://reactjs.org/docs/error-decoder.html?invariant=" + a2, c = 1; c < arguments.length; c++) b2 += "&args[]=" + encodeURIComponent(arguments[c]);
    return "Minified React error #" + a2 + "; visit " + b2 + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings.";
  }
  var da = /* @__PURE__ */ new Set(), ea = {};
  function fa(a2, b2) {
    ha(a2, b2);
    ha(a2 + "Capture", b2);
  }
  function ha(a2, b2) {
    ea[a2] = b2;
    for (a2 = 0; a2 < b2.length; a2++) da.add(b2[a2]);
  }
  var ia = !("undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement), ja = Object.prototype.hasOwnProperty, ka = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/, la = {}, ma = {};
  function oa(a2) {
    if (ja.call(ma, a2)) return true;
    if (ja.call(la, a2)) return false;
    if (ka.test(a2)) return ma[a2] = true;
    la[a2] = true;
    return false;
  }
  function pa(a2, b2, c, d2) {
    if (null !== c && 0 === c.type) return false;
    switch (typeof b2) {
      case "function":
      case "symbol":
        return true;
      case "boolean":
        if (d2) return false;
        if (null !== c) return !c.acceptsBooleans;
        a2 = a2.toLowerCase().slice(0, 5);
        return "data-" !== a2 && "aria-" !== a2;
      default:
        return false;
    }
  }
  function qa(a2, b2, c, d2) {
    if (null === b2 || "undefined" === typeof b2 || pa(a2, b2, c, d2)) return true;
    if (d2) return false;
    if (null !== c) switch (c.type) {
      case 3:
        return !b2;
      case 4:
        return false === b2;
      case 5:
        return isNaN(b2);
      case 6:
        return isNaN(b2) || 1 > b2;
    }
    return false;
  }
  function v2(a2, b2, c, d2, e2, f2, g2) {
    this.acceptsBooleans = 2 === b2 || 3 === b2 || 4 === b2;
    this.attributeName = d2;
    this.attributeNamespace = e2;
    this.mustUseProperty = c;
    this.propertyName = a2;
    this.type = b2;
    this.sanitizeURL = f2;
    this.removeEmptyString = g2;
  }
  var z2 = {};
  "children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a2) {
    z2[a2] = new v2(a2, 0, false, a2, null, false, false);
  });
  [["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(a2) {
    var b2 = a2[0];
    z2[b2] = new v2(b2, 1, false, a2[1], null, false, false);
  });
  ["contentEditable", "draggable", "spellCheck", "value"].forEach(function(a2) {
    z2[a2] = new v2(a2, 2, false, a2.toLowerCase(), null, false, false);
  });
  ["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(a2) {
    z2[a2] = new v2(a2, 2, false, a2, null, false, false);
  });
  "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a2) {
    z2[a2] = new v2(a2, 3, false, a2.toLowerCase(), null, false, false);
  });
  ["checked", "multiple", "muted", "selected"].forEach(function(a2) {
    z2[a2] = new v2(a2, 3, true, a2, null, false, false);
  });
  ["capture", "download"].forEach(function(a2) {
    z2[a2] = new v2(a2, 4, false, a2, null, false, false);
  });
  ["cols", "rows", "size", "span"].forEach(function(a2) {
    z2[a2] = new v2(a2, 6, false, a2, null, false, false);
  });
  ["rowSpan", "start"].forEach(function(a2) {
    z2[a2] = new v2(a2, 5, false, a2.toLowerCase(), null, false, false);
  });
  var ra = /[\-:]([a-z])/g;
  function sa(a2) {
    return a2[1].toUpperCase();
  }
  "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a2) {
    var b2 = a2.replace(
      ra,
      sa
    );
    z2[b2] = new v2(b2, 1, false, a2, null, false, false);
  });
  "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a2) {
    var b2 = a2.replace(ra, sa);
    z2[b2] = new v2(b2, 1, false, a2, "http://www.w3.org/1999/xlink", false, false);
  });
  ["xml:base", "xml:lang", "xml:space"].forEach(function(a2) {
    var b2 = a2.replace(ra, sa);
    z2[b2] = new v2(b2, 1, false, a2, "http://www.w3.org/XML/1998/namespace", false, false);
  });
  ["tabIndex", "crossOrigin"].forEach(function(a2) {
    z2[a2] = new v2(a2, 1, false, a2.toLowerCase(), null, false, false);
  });
  z2.xlinkHref = new v2("xlinkHref", 1, false, "xlink:href", "http://www.w3.org/1999/xlink", true, false);
  ["src", "href", "action", "formAction"].forEach(function(a2) {
    z2[a2] = new v2(a2, 1, false, a2.toLowerCase(), null, true, true);
  });
  function ta(a2, b2, c, d2) {
    var e2 = z2.hasOwnProperty(b2) ? z2[b2] : null;
    if (null !== e2 ? 0 !== e2.type : d2 || !(2 < b2.length) || "o" !== b2[0] && "O" !== b2[0] || "n" !== b2[1] && "N" !== b2[1]) qa(b2, c, e2, d2) && (c = null), d2 || null === e2 ? oa(b2) && (null === c ? a2.removeAttribute(b2) : a2.setAttribute(b2, "" + c)) : e2.mustUseProperty ? a2[e2.propertyName] = null === c ? 3 === e2.type ? false : "" : c : (b2 = e2.attributeName, d2 = e2.attributeNamespace, null === c ? a2.removeAttribute(b2) : (e2 = e2.type, c = 3 === e2 || 4 === e2 && true === c ? "" : "" + c, d2 ? a2.setAttributeNS(d2, b2, c) : a2.setAttribute(b2, c)));
  }
  var ua = aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, va = Symbol.for("react.element"), wa = Symbol.for("react.portal"), ya = Symbol.for("react.fragment"), za = Symbol.for("react.strict_mode"), Aa = Symbol.for("react.profiler"), Ba = Symbol.for("react.provider"), Ca = Symbol.for("react.context"), Da = Symbol.for("react.forward_ref"), Ea = Symbol.for("react.suspense"), Fa = Symbol.for("react.suspense_list"), Ga = Symbol.for("react.memo"), Ha = Symbol.for("react.lazy");
  var Ia = Symbol.for("react.offscreen");
  var Ja = Symbol.iterator;
  function Ka(a2) {
    if (null === a2 || "object" !== typeof a2) return null;
    a2 = Ja && a2[Ja] || a2["@@iterator"];
    return "function" === typeof a2 ? a2 : null;
  }
  var A2 = Object.assign, La;
  function Ma(a2) {
    if (void 0 === La) try {
      throw Error();
    } catch (c) {
      var b2 = c.stack.trim().match(/\n( *(at )?)/);
      La = b2 && b2[1] || "";
    }
    return "\n" + La + a2;
  }
  var Na = false;
  function Oa(a2, b2) {
    if (!a2 || Na) return "";
    Na = true;
    var c = Error.prepareStackTrace;
    Error.prepareStackTrace = void 0;
    try {
      if (b2) if (b2 = function() {
        throw Error();
      }, Object.defineProperty(b2.prototype, "props", { set: function() {
        throw Error();
      } }), "object" === typeof Reflect && Reflect.construct) {
        try {
          Reflect.construct(b2, []);
        } catch (l) {
          var d2 = l;
        }
        Reflect.construct(a2, [], b2);
      } else {
        try {
          b2.call();
        } catch (l) {
          d2 = l;
        }
        a2.call(b2.prototype);
      }
      else {
        try {
          throw Error();
        } catch (l) {
          d2 = l;
        }
        a2();
      }
    } catch (l) {
      if (l && d2 && "string" === typeof l.stack) {
        for (var e2 = l.stack.split("\n"), f2 = d2.stack.split("\n"), g2 = e2.length - 1, h2 = f2.length - 1; 1 <= g2 && 0 <= h2 && e2[g2] !== f2[h2]; ) h2--;
        for (; 1 <= g2 && 0 <= h2; g2--, h2--) if (e2[g2] !== f2[h2]) {
          if (1 !== g2 || 1 !== h2) {
            do
              if (g2--, h2--, 0 > h2 || e2[g2] !== f2[h2]) {
                var k2 = "\n" + e2[g2].replace(" at new ", " at ");
                a2.displayName && k2.includes("<anonymous>") && (k2 = k2.replace("<anonymous>", a2.displayName));
                return k2;
              }
            while (1 <= g2 && 0 <= h2);
          }
          break;
        }
      }
    } finally {
      Na = false, Error.prepareStackTrace = c;
    }
    return (a2 = a2 ? a2.displayName || a2.name : "") ? Ma(a2) : "";
  }
  function Pa(a2) {
    switch (a2.tag) {
      case 5:
        return Ma(a2.type);
      case 16:
        return Ma("Lazy");
      case 13:
        return Ma("Suspense");
      case 19:
        return Ma("SuspenseList");
      case 0:
      case 2:
      case 15:
        return a2 = Oa(a2.type, false), a2;
      case 11:
        return a2 = Oa(a2.type.render, false), a2;
      case 1:
        return a2 = Oa(a2.type, true), a2;
      default:
        return "";
    }
  }
  function Qa(a2) {
    if (null == a2) return null;
    if ("function" === typeof a2) return a2.displayName || a2.name || null;
    if ("string" === typeof a2) return a2;
    switch (a2) {
      case ya:
        return "Fragment";
      case wa:
        return "Portal";
      case Aa:
        return "Profiler";
      case za:
        return "StrictMode";
      case Ea:
        return "Suspense";
      case Fa:
        return "SuspenseList";
    }
    if ("object" === typeof a2) switch (a2.$$typeof) {
      case Ca:
        return (a2.displayName || "Context") + ".Consumer";
      case Ba:
        return (a2._context.displayName || "Context") + ".Provider";
      case Da:
        var b2 = a2.render;
        a2 = a2.displayName;
        a2 || (a2 = b2.displayName || b2.name || "", a2 = "" !== a2 ? "ForwardRef(" + a2 + ")" : "ForwardRef");
        return a2;
      case Ga:
        return b2 = a2.displayName || null, null !== b2 ? b2 : Qa(a2.type) || "Memo";
      case Ha:
        b2 = a2._payload;
        a2 = a2._init;
        try {
          return Qa(a2(b2));
        } catch (c) {
        }
    }
    return null;
  }
  function Ra(a2) {
    var b2 = a2.type;
    switch (a2.tag) {
      case 24:
        return "Cache";
      case 9:
        return (b2.displayName || "Context") + ".Consumer";
      case 10:
        return (b2._context.displayName || "Context") + ".Provider";
      case 18:
        return "DehydratedFragment";
      case 11:
        return a2 = b2.render, a2 = a2.displayName || a2.name || "", b2.displayName || ("" !== a2 ? "ForwardRef(" + a2 + ")" : "ForwardRef");
      case 7:
        return "Fragment";
      case 5:
        return b2;
      case 4:
        return "Portal";
      case 3:
        return "Root";
      case 6:
        return "Text";
      case 16:
        return Qa(b2);
      case 8:
        return b2 === za ? "StrictMode" : "Mode";
      case 22:
        return "Offscreen";
      case 12:
        return "Profiler";
      case 21:
        return "Scope";
      case 13:
        return "Suspense";
      case 19:
        return "SuspenseList";
      case 25:
        return "TracingMarker";
      case 1:
      case 0:
      case 17:
      case 2:
      case 14:
      case 15:
        if ("function" === typeof b2) return b2.displayName || b2.name || null;
        if ("string" === typeof b2) return b2;
    }
    return null;
  }
  function Sa(a2) {
    switch (typeof a2) {
      case "boolean":
      case "number":
      case "string":
      case "undefined":
        return a2;
      case "object":
        return a2;
      default:
        return "";
    }
  }
  function Ta(a2) {
    var b2 = a2.type;
    return (a2 = a2.nodeName) && "input" === a2.toLowerCase() && ("checkbox" === b2 || "radio" === b2);
  }
  function Ua(a2) {
    var b2 = Ta(a2) ? "checked" : "value", c = Object.getOwnPropertyDescriptor(a2.constructor.prototype, b2), d2 = "" + a2[b2];
    if (!a2.hasOwnProperty(b2) && "undefined" !== typeof c && "function" === typeof c.get && "function" === typeof c.set) {
      var e2 = c.get, f2 = c.set;
      Object.defineProperty(a2, b2, { configurable: true, get: function() {
        return e2.call(this);
      }, set: function(a3) {
        d2 = "" + a3;
        f2.call(this, a3);
      } });
      Object.defineProperty(a2, b2, { enumerable: c.enumerable });
      return { getValue: function() {
        return d2;
      }, setValue: function(a3) {
        d2 = "" + a3;
      }, stopTracking: function() {
        a2._valueTracker = null;
        delete a2[b2];
      } };
    }
  }
  function Va(a2) {
    a2._valueTracker || (a2._valueTracker = Ua(a2));
  }
  function Wa(a2) {
    if (!a2) return false;
    var b2 = a2._valueTracker;
    if (!b2) return true;
    var c = b2.getValue();
    var d2 = "";
    a2 && (d2 = Ta(a2) ? a2.checked ? "true" : "false" : a2.value);
    a2 = d2;
    return a2 !== c ? (b2.setValue(a2), true) : false;
  }
  function Xa(a2) {
    a2 = a2 || ("undefined" !== typeof document ? document : void 0);
    if ("undefined" === typeof a2) return null;
    try {
      return a2.activeElement || a2.body;
    } catch (b2) {
      return a2.body;
    }
  }
  function Ya(a2, b2) {
    var c = b2.checked;
    return A2({}, b2, { defaultChecked: void 0, defaultValue: void 0, value: void 0, checked: null != c ? c : a2._wrapperState.initialChecked });
  }
  function Za(a2, b2) {
    var c = null == b2.defaultValue ? "" : b2.defaultValue, d2 = null != b2.checked ? b2.checked : b2.defaultChecked;
    c = Sa(null != b2.value ? b2.value : c);
    a2._wrapperState = { initialChecked: d2, initialValue: c, controlled: "checkbox" === b2.type || "radio" === b2.type ? null != b2.checked : null != b2.value };
  }
  function ab(a2, b2) {
    b2 = b2.checked;
    null != b2 && ta(a2, "checked", b2, false);
  }
  function bb(a2, b2) {
    ab(a2, b2);
    var c = Sa(b2.value), d2 = b2.type;
    if (null != c) if ("number" === d2) {
      if (0 === c && "" === a2.value || a2.value != c) a2.value = "" + c;
    } else a2.value !== "" + c && (a2.value = "" + c);
    else if ("submit" === d2 || "reset" === d2) {
      a2.removeAttribute("value");
      return;
    }
    b2.hasOwnProperty("value") ? cb(a2, b2.type, c) : b2.hasOwnProperty("defaultValue") && cb(a2, b2.type, Sa(b2.defaultValue));
    null == b2.checked && null != b2.defaultChecked && (a2.defaultChecked = !!b2.defaultChecked);
  }
  function db(a2, b2, c) {
    if (b2.hasOwnProperty("value") || b2.hasOwnProperty("defaultValue")) {
      var d2 = b2.type;
      if (!("submit" !== d2 && "reset" !== d2 || void 0 !== b2.value && null !== b2.value)) return;
      b2 = "" + a2._wrapperState.initialValue;
      c || b2 === a2.value || (a2.value = b2);
      a2.defaultValue = b2;
    }
    c = a2.name;
    "" !== c && (a2.name = "");
    a2.defaultChecked = !!a2._wrapperState.initialChecked;
    "" !== c && (a2.name = c);
  }
  function cb(a2, b2, c) {
    if ("number" !== b2 || Xa(a2.ownerDocument) !== a2) null == c ? a2.defaultValue = "" + a2._wrapperState.initialValue : a2.defaultValue !== "" + c && (a2.defaultValue = "" + c);
  }
  var eb = Array.isArray;
  function fb(a2, b2, c, d2) {
    a2 = a2.options;
    if (b2) {
      b2 = {};
      for (var e2 = 0; e2 < c.length; e2++) b2["$" + c[e2]] = true;
      for (c = 0; c < a2.length; c++) e2 = b2.hasOwnProperty("$" + a2[c].value), a2[c].selected !== e2 && (a2[c].selected = e2), e2 && d2 && (a2[c].defaultSelected = true);
    } else {
      c = "" + Sa(c);
      b2 = null;
      for (e2 = 0; e2 < a2.length; e2++) {
        if (a2[e2].value === c) {
          a2[e2].selected = true;
          d2 && (a2[e2].defaultSelected = true);
          return;
        }
        null !== b2 || a2[e2].disabled || (b2 = a2[e2]);
      }
      null !== b2 && (b2.selected = true);
    }
  }
  function gb(a2, b2) {
    if (null != b2.dangerouslySetInnerHTML) throw Error(p2(91));
    return A2({}, b2, { value: void 0, defaultValue: void 0, children: "" + a2._wrapperState.initialValue });
  }
  function hb(a2, b2) {
    var c = b2.value;
    if (null == c) {
      c = b2.children;
      b2 = b2.defaultValue;
      if (null != c) {
        if (null != b2) throw Error(p2(92));
        if (eb(c)) {
          if (1 < c.length) throw Error(p2(93));
          c = c[0];
        }
        b2 = c;
      }
      null == b2 && (b2 = "");
      c = b2;
    }
    a2._wrapperState = { initialValue: Sa(c) };
  }
  function ib(a2, b2) {
    var c = Sa(b2.value), d2 = Sa(b2.defaultValue);
    null != c && (c = "" + c, c !== a2.value && (a2.value = c), null == b2.defaultValue && a2.defaultValue !== c && (a2.defaultValue = c));
    null != d2 && (a2.defaultValue = "" + d2);
  }
  function jb(a2) {
    var b2 = a2.textContent;
    b2 === a2._wrapperState.initialValue && "" !== b2 && null !== b2 && (a2.value = b2);
  }
  function kb(a2) {
    switch (a2) {
      case "svg":
        return "http://www.w3.org/2000/svg";
      case "math":
        return "http://www.w3.org/1998/Math/MathML";
      default:
        return "http://www.w3.org/1999/xhtml";
    }
  }
  function lb(a2, b2) {
    return null == a2 || "http://www.w3.org/1999/xhtml" === a2 ? kb(b2) : "http://www.w3.org/2000/svg" === a2 && "foreignObject" === b2 ? "http://www.w3.org/1999/xhtml" : a2;
  }
  var mb, nb = function(a2) {
    return "undefined" !== typeof MSApp && MSApp.execUnsafeLocalFunction ? function(b2, c, d2, e2) {
      MSApp.execUnsafeLocalFunction(function() {
        return a2(b2, c, d2, e2);
      });
    } : a2;
  }(function(a2, b2) {
    if ("http://www.w3.org/2000/svg" !== a2.namespaceURI || "innerHTML" in a2) a2.innerHTML = b2;
    else {
      mb = mb || document.createElement("div");
      mb.innerHTML = "<svg>" + b2.valueOf().toString() + "</svg>";
      for (b2 = mb.firstChild; a2.firstChild; ) a2.removeChild(a2.firstChild);
      for (; b2.firstChild; ) a2.appendChild(b2.firstChild);
    }
  });
  function ob(a2, b2) {
    if (b2) {
      var c = a2.firstChild;
      if (c && c === a2.lastChild && 3 === c.nodeType) {
        c.nodeValue = b2;
        return;
      }
    }
    a2.textContent = b2;
  }
  var pb = {
    animationIterationCount: true,
    aspectRatio: true,
    borderImageOutset: true,
    borderImageSlice: true,
    borderImageWidth: true,
    boxFlex: true,
    boxFlexGroup: true,
    boxOrdinalGroup: true,
    columnCount: true,
    columns: true,
    flex: true,
    flexGrow: true,
    flexPositive: true,
    flexShrink: true,
    flexNegative: true,
    flexOrder: true,
    gridArea: true,
    gridRow: true,
    gridRowEnd: true,
    gridRowSpan: true,
    gridRowStart: true,
    gridColumn: true,
    gridColumnEnd: true,
    gridColumnSpan: true,
    gridColumnStart: true,
    fontWeight: true,
    lineClamp: true,
    lineHeight: true,
    opacity: true,
    order: true,
    orphans: true,
    tabSize: true,
    widows: true,
    zIndex: true,
    zoom: true,
    fillOpacity: true,
    floodOpacity: true,
    stopOpacity: true,
    strokeDasharray: true,
    strokeDashoffset: true,
    strokeMiterlimit: true,
    strokeOpacity: true,
    strokeWidth: true
  }, qb = ["Webkit", "ms", "Moz", "O"];
  Object.keys(pb).forEach(function(a2) {
    qb.forEach(function(b2) {
      b2 = b2 + a2.charAt(0).toUpperCase() + a2.substring(1);
      pb[b2] = pb[a2];
    });
  });
  function rb(a2, b2, c) {
    return null == b2 || "boolean" === typeof b2 || "" === b2 ? "" : c || "number" !== typeof b2 || 0 === b2 || pb.hasOwnProperty(a2) && pb[a2] ? ("" + b2).trim() : b2 + "px";
  }
  function sb(a2, b2) {
    a2 = a2.style;
    for (var c in b2) if (b2.hasOwnProperty(c)) {
      var d2 = 0 === c.indexOf("--"), e2 = rb(c, b2[c], d2);
      "float" === c && (c = "cssFloat");
      d2 ? a2.setProperty(c, e2) : a2[c] = e2;
    }
  }
  var tb = A2({ menuitem: true }, { area: true, base: true, br: true, col: true, embed: true, hr: true, img: true, input: true, keygen: true, link: true, meta: true, param: true, source: true, track: true, wbr: true });
  function ub(a2, b2) {
    if (b2) {
      if (tb[a2] && (null != b2.children || null != b2.dangerouslySetInnerHTML)) throw Error(p2(137, a2));
      if (null != b2.dangerouslySetInnerHTML) {
        if (null != b2.children) throw Error(p2(60));
        if ("object" !== typeof b2.dangerouslySetInnerHTML || !("__html" in b2.dangerouslySetInnerHTML)) throw Error(p2(61));
      }
      if (null != b2.style && "object" !== typeof b2.style) throw Error(p2(62));
    }
  }
  function vb(a2, b2) {
    if (-1 === a2.indexOf("-")) return "string" === typeof b2.is;
    switch (a2) {
      case "annotation-xml":
      case "color-profile":
      case "font-face":
      case "font-face-src":
      case "font-face-uri":
      case "font-face-format":
      case "font-face-name":
      case "missing-glyph":
        return false;
      default:
        return true;
    }
  }
  var wb = null;
  function xb(a2) {
    a2 = a2.target || a2.srcElement || window;
    a2.correspondingUseElement && (a2 = a2.correspondingUseElement);
    return 3 === a2.nodeType ? a2.parentNode : a2;
  }
  var yb = null, zb = null, Ab = null;
  function Bb(a2) {
    if (a2 = Cb(a2)) {
      if ("function" !== typeof yb) throw Error(p2(280));
      var b2 = a2.stateNode;
      b2 && (b2 = Db(b2), yb(a2.stateNode, a2.type, b2));
    }
  }
  function Eb(a2) {
    zb ? Ab ? Ab.push(a2) : Ab = [a2] : zb = a2;
  }
  function Fb() {
    if (zb) {
      var a2 = zb, b2 = Ab;
      Ab = zb = null;
      Bb(a2);
      if (b2) for (a2 = 0; a2 < b2.length; a2++) Bb(b2[a2]);
    }
  }
  function Gb(a2, b2) {
    return a2(b2);
  }
  function Hb() {
  }
  var Ib = false;
  function Jb(a2, b2, c) {
    if (Ib) return a2(b2, c);
    Ib = true;
    try {
      return Gb(a2, b2, c);
    } finally {
      if (Ib = false, null !== zb || null !== Ab) Hb(), Fb();
    }
  }
  function Kb(a2, b2) {
    var c = a2.stateNode;
    if (null === c) return null;
    var d2 = Db(c);
    if (null === d2) return null;
    c = d2[b2];
    a: switch (b2) {
      case "onClick":
      case "onClickCapture":
      case "onDoubleClick":
      case "onDoubleClickCapture":
      case "onMouseDown":
      case "onMouseDownCapture":
      case "onMouseMove":
      case "onMouseMoveCapture":
      case "onMouseUp":
      case "onMouseUpCapture":
      case "onMouseEnter":
        (d2 = !d2.disabled) || (a2 = a2.type, d2 = !("button" === a2 || "input" === a2 || "select" === a2 || "textarea" === a2));
        a2 = !d2;
        break a;
      default:
        a2 = false;
    }
    if (a2) return null;
    if (c && "function" !== typeof c) throw Error(p2(231, b2, typeof c));
    return c;
  }
  var Lb = false;
  if (ia) try {
    var Mb = {};
    Object.defineProperty(Mb, "passive", { get: function() {
      Lb = true;
    } });
    window.addEventListener("test", Mb, Mb);
    window.removeEventListener("test", Mb, Mb);
  } catch (a2) {
    Lb = false;
  }
  function Nb(a2, b2, c, d2, e2, f2, g2, h2, k2) {
    var l = Array.prototype.slice.call(arguments, 3);
    try {
      b2.apply(c, l);
    } catch (m2) {
      this.onError(m2);
    }
  }
  var Ob = false, Pb = null, Qb = false, Rb = null, Sb = { onError: function(a2) {
    Ob = true;
    Pb = a2;
  } };
  function Tb(a2, b2, c, d2, e2, f2, g2, h2, k2) {
    Ob = false;
    Pb = null;
    Nb.apply(Sb, arguments);
  }
  function Ub(a2, b2, c, d2, e2, f2, g2, h2, k2) {
    Tb.apply(this, arguments);
    if (Ob) {
      if (Ob) {
        var l = Pb;
        Ob = false;
        Pb = null;
      } else throw Error(p2(198));
      Qb || (Qb = true, Rb = l);
    }
  }
  function Vb(a2) {
    var b2 = a2, c = a2;
    if (a2.alternate) for (; b2.return; ) b2 = b2.return;
    else {
      a2 = b2;
      do
        b2 = a2, 0 !== (b2.flags & 4098) && (c = b2.return), a2 = b2.return;
      while (a2);
    }
    return 3 === b2.tag ? c : null;
  }
  function Wb(a2) {
    if (13 === a2.tag) {
      var b2 = a2.memoizedState;
      null === b2 && (a2 = a2.alternate, null !== a2 && (b2 = a2.memoizedState));
      if (null !== b2) return b2.dehydrated;
    }
    return null;
  }
  function Xb(a2) {
    if (Vb(a2) !== a2) throw Error(p2(188));
  }
  function Yb(a2) {
    var b2 = a2.alternate;
    if (!b2) {
      b2 = Vb(a2);
      if (null === b2) throw Error(p2(188));
      return b2 !== a2 ? null : a2;
    }
    for (var c = a2, d2 = b2; ; ) {
      var e2 = c.return;
      if (null === e2) break;
      var f2 = e2.alternate;
      if (null === f2) {
        d2 = e2.return;
        if (null !== d2) {
          c = d2;
          continue;
        }
        break;
      }
      if (e2.child === f2.child) {
        for (f2 = e2.child; f2; ) {
          if (f2 === c) return Xb(e2), a2;
          if (f2 === d2) return Xb(e2), b2;
          f2 = f2.sibling;
        }
        throw Error(p2(188));
      }
      if (c.return !== d2.return) c = e2, d2 = f2;
      else {
        for (var g2 = false, h2 = e2.child; h2; ) {
          if (h2 === c) {
            g2 = true;
            c = e2;
            d2 = f2;
            break;
          }
          if (h2 === d2) {
            g2 = true;
            d2 = e2;
            c = f2;
            break;
          }
          h2 = h2.sibling;
        }
        if (!g2) {
          for (h2 = f2.child; h2; ) {
            if (h2 === c) {
              g2 = true;
              c = f2;
              d2 = e2;
              break;
            }
            if (h2 === d2) {
              g2 = true;
              d2 = f2;
              c = e2;
              break;
            }
            h2 = h2.sibling;
          }
          if (!g2) throw Error(p2(189));
        }
      }
      if (c.alternate !== d2) throw Error(p2(190));
    }
    if (3 !== c.tag) throw Error(p2(188));
    return c.stateNode.current === c ? a2 : b2;
  }
  function Zb(a2) {
    a2 = Yb(a2);
    return null !== a2 ? $b(a2) : null;
  }
  function $b(a2) {
    if (5 === a2.tag || 6 === a2.tag) return a2;
    for (a2 = a2.child; null !== a2; ) {
      var b2 = $b(a2);
      if (null !== b2) return b2;
      a2 = a2.sibling;
    }
    return null;
  }
  var ac = ca.unstable_scheduleCallback, bc = ca.unstable_cancelCallback, cc = ca.unstable_shouldYield, dc = ca.unstable_requestPaint, B3 = ca.unstable_now, ec = ca.unstable_getCurrentPriorityLevel, fc = ca.unstable_ImmediatePriority, gc = ca.unstable_UserBlockingPriority, hc = ca.unstable_NormalPriority, ic = ca.unstable_LowPriority, jc = ca.unstable_IdlePriority, kc = null, lc = null;
  function mc(a2) {
    if (lc && "function" === typeof lc.onCommitFiberRoot) try {
      lc.onCommitFiberRoot(kc, a2, void 0, 128 === (a2.current.flags & 128));
    } catch (b2) {
    }
  }
  var oc = Math.clz32 ? Math.clz32 : nc, pc = Math.log, qc = Math.LN2;
  function nc(a2) {
    a2 >>>= 0;
    return 0 === a2 ? 32 : 31 - (pc(a2) / qc | 0) | 0;
  }
  var rc = 64, sc = 4194304;
  function tc(a2) {
    switch (a2 & -a2) {
      case 1:
        return 1;
      case 2:
        return 2;
      case 4:
        return 4;
      case 8:
        return 8;
      case 16:
        return 16;
      case 32:
        return 32;
      case 64:
      case 128:
      case 256:
      case 512:
      case 1024:
      case 2048:
      case 4096:
      case 8192:
      case 16384:
      case 32768:
      case 65536:
      case 131072:
      case 262144:
      case 524288:
      case 1048576:
      case 2097152:
        return a2 & 4194240;
      case 4194304:
      case 8388608:
      case 16777216:
      case 33554432:
      case 67108864:
        return a2 & 130023424;
      case 134217728:
        return 134217728;
      case 268435456:
        return 268435456;
      case 536870912:
        return 536870912;
      case 1073741824:
        return 1073741824;
      default:
        return a2;
    }
  }
  function uc(a2, b2) {
    var c = a2.pendingLanes;
    if (0 === c) return 0;
    var d2 = 0, e2 = a2.suspendedLanes, f2 = a2.pingedLanes, g2 = c & 268435455;
    if (0 !== g2) {
      var h2 = g2 & ~e2;
      0 !== h2 ? d2 = tc(h2) : (f2 &= g2, 0 !== f2 && (d2 = tc(f2)));
    } else g2 = c & ~e2, 0 !== g2 ? d2 = tc(g2) : 0 !== f2 && (d2 = tc(f2));
    if (0 === d2) return 0;
    if (0 !== b2 && b2 !== d2 && 0 === (b2 & e2) && (e2 = d2 & -d2, f2 = b2 & -b2, e2 >= f2 || 16 === e2 && 0 !== (f2 & 4194240))) return b2;
    0 !== (d2 & 4) && (d2 |= c & 16);
    b2 = a2.entangledLanes;
    if (0 !== b2) for (a2 = a2.entanglements, b2 &= d2; 0 < b2; ) c = 31 - oc(b2), e2 = 1 << c, d2 |= a2[c], b2 &= ~e2;
    return d2;
  }
  function vc(a2, b2) {
    switch (a2) {
      case 1:
      case 2:
      case 4:
        return b2 + 250;
      case 8:
      case 16:
      case 32:
      case 64:
      case 128:
      case 256:
      case 512:
      case 1024:
      case 2048:
      case 4096:
      case 8192:
      case 16384:
      case 32768:
      case 65536:
      case 131072:
      case 262144:
      case 524288:
      case 1048576:
      case 2097152:
        return b2 + 5e3;
      case 4194304:
      case 8388608:
      case 16777216:
      case 33554432:
      case 67108864:
        return -1;
      case 134217728:
      case 268435456:
      case 536870912:
      case 1073741824:
        return -1;
      default:
        return -1;
    }
  }
  function wc(a2, b2) {
    for (var c = a2.suspendedLanes, d2 = a2.pingedLanes, e2 = a2.expirationTimes, f2 = a2.pendingLanes; 0 < f2; ) {
      var g2 = 31 - oc(f2), h2 = 1 << g2, k2 = e2[g2];
      if (-1 === k2) {
        if (0 === (h2 & c) || 0 !== (h2 & d2)) e2[g2] = vc(h2, b2);
      } else k2 <= b2 && (a2.expiredLanes |= h2);
      f2 &= ~h2;
    }
  }
  function xc(a2) {
    a2 = a2.pendingLanes & -1073741825;
    return 0 !== a2 ? a2 : a2 & 1073741824 ? 1073741824 : 0;
  }
  function yc() {
    var a2 = rc;
    rc <<= 1;
    0 === (rc & 4194240) && (rc = 64);
    return a2;
  }
  function zc(a2) {
    for (var b2 = [], c = 0; 31 > c; c++) b2.push(a2);
    return b2;
  }
  function Ac(a2, b2, c) {
    a2.pendingLanes |= b2;
    536870912 !== b2 && (a2.suspendedLanes = 0, a2.pingedLanes = 0);
    a2 = a2.eventTimes;
    b2 = 31 - oc(b2);
    a2[b2] = c;
  }
  function Bc(a2, b2) {
    var c = a2.pendingLanes & ~b2;
    a2.pendingLanes = b2;
    a2.suspendedLanes = 0;
    a2.pingedLanes = 0;
    a2.expiredLanes &= b2;
    a2.mutableReadLanes &= b2;
    a2.entangledLanes &= b2;
    b2 = a2.entanglements;
    var d2 = a2.eventTimes;
    for (a2 = a2.expirationTimes; 0 < c; ) {
      var e2 = 31 - oc(c), f2 = 1 << e2;
      b2[e2] = 0;
      d2[e2] = -1;
      a2[e2] = -1;
      c &= ~f2;
    }
  }
  function Cc(a2, b2) {
    var c = a2.entangledLanes |= b2;
    for (a2 = a2.entanglements; c; ) {
      var d2 = 31 - oc(c), e2 = 1 << d2;
      e2 & b2 | a2[d2] & b2 && (a2[d2] |= b2);
      c &= ~e2;
    }
  }
  var C2 = 0;
  function Dc(a2) {
    a2 &= -a2;
    return 1 < a2 ? 4 < a2 ? 0 !== (a2 & 268435455) ? 16 : 536870912 : 4 : 1;
  }
  var Ec, Fc, Gc, Hc, Ic, Jc = false, Kc = [], Lc = null, Mc = null, Nc = null, Oc = /* @__PURE__ */ new Map(), Pc = /* @__PURE__ */ new Map(), Qc = [], Rc = "mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");
  function Sc(a2, b2) {
    switch (a2) {
      case "focusin":
      case "focusout":
        Lc = null;
        break;
      case "dragenter":
      case "dragleave":
        Mc = null;
        break;
      case "mouseover":
      case "mouseout":
        Nc = null;
        break;
      case "pointerover":
      case "pointerout":
        Oc.delete(b2.pointerId);
        break;
      case "gotpointercapture":
      case "lostpointercapture":
        Pc.delete(b2.pointerId);
    }
  }
  function Tc(a2, b2, c, d2, e2, f2) {
    if (null === a2 || a2.nativeEvent !== f2) return a2 = { blockedOn: b2, domEventName: c, eventSystemFlags: d2, nativeEvent: f2, targetContainers: [e2] }, null !== b2 && (b2 = Cb(b2), null !== b2 && Fc(b2)), a2;
    a2.eventSystemFlags |= d2;
    b2 = a2.targetContainers;
    null !== e2 && -1 === b2.indexOf(e2) && b2.push(e2);
    return a2;
  }
  function Uc(a2, b2, c, d2, e2) {
    switch (b2) {
      case "focusin":
        return Lc = Tc(Lc, a2, b2, c, d2, e2), true;
      case "dragenter":
        return Mc = Tc(Mc, a2, b2, c, d2, e2), true;
      case "mouseover":
        return Nc = Tc(Nc, a2, b2, c, d2, e2), true;
      case "pointerover":
        var f2 = e2.pointerId;
        Oc.set(f2, Tc(Oc.get(f2) || null, a2, b2, c, d2, e2));
        return true;
      case "gotpointercapture":
        return f2 = e2.pointerId, Pc.set(f2, Tc(Pc.get(f2) || null, a2, b2, c, d2, e2)), true;
    }
    return false;
  }
  function Vc(a2) {
    var b2 = Wc(a2.target);
    if (null !== b2) {
      var c = Vb(b2);
      if (null !== c) {
        if (b2 = c.tag, 13 === b2) {
          if (b2 = Wb(c), null !== b2) {
            a2.blockedOn = b2;
            Ic(a2.priority, function() {
              Gc(c);
            });
            return;
          }
        } else if (3 === b2 && c.stateNode.current.memoizedState.isDehydrated) {
          a2.blockedOn = 3 === c.tag ? c.stateNode.containerInfo : null;
          return;
        }
      }
    }
    a2.blockedOn = null;
  }
  function Xc(a2) {
    if (null !== a2.blockedOn) return false;
    for (var b2 = a2.targetContainers; 0 < b2.length; ) {
      var c = Yc(a2.domEventName, a2.eventSystemFlags, b2[0], a2.nativeEvent);
      if (null === c) {
        c = a2.nativeEvent;
        var d2 = new c.constructor(c.type, c);
        wb = d2;
        c.target.dispatchEvent(d2);
        wb = null;
      } else return b2 = Cb(c), null !== b2 && Fc(b2), a2.blockedOn = c, false;
      b2.shift();
    }
    return true;
  }
  function Zc(a2, b2, c) {
    Xc(a2) && c.delete(b2);
  }
  function $c() {
    Jc = false;
    null !== Lc && Xc(Lc) && (Lc = null);
    null !== Mc && Xc(Mc) && (Mc = null);
    null !== Nc && Xc(Nc) && (Nc = null);
    Oc.forEach(Zc);
    Pc.forEach(Zc);
  }
  function ad(a2, b2) {
    a2.blockedOn === b2 && (a2.blockedOn = null, Jc || (Jc = true, ca.unstable_scheduleCallback(ca.unstable_NormalPriority, $c)));
  }
  function bd(a2) {
    function b2(b3) {
      return ad(b3, a2);
    }
    if (0 < Kc.length) {
      ad(Kc[0], a2);
      for (var c = 1; c < Kc.length; c++) {
        var d2 = Kc[c];
        d2.blockedOn === a2 && (d2.blockedOn = null);
      }
    }
    null !== Lc && ad(Lc, a2);
    null !== Mc && ad(Mc, a2);
    null !== Nc && ad(Nc, a2);
    Oc.forEach(b2);
    Pc.forEach(b2);
    for (c = 0; c < Qc.length; c++) d2 = Qc[c], d2.blockedOn === a2 && (d2.blockedOn = null);
    for (; 0 < Qc.length && (c = Qc[0], null === c.blockedOn); ) Vc(c), null === c.blockedOn && Qc.shift();
  }
  var cd = ua.ReactCurrentBatchConfig, dd = true;
  function ed(a2, b2, c, d2) {
    var e2 = C2, f2 = cd.transition;
    cd.transition = null;
    try {
      C2 = 1, fd(a2, b2, c, d2);
    } finally {
      C2 = e2, cd.transition = f2;
    }
  }
  function gd(a2, b2, c, d2) {
    var e2 = C2, f2 = cd.transition;
    cd.transition = null;
    try {
      C2 = 4, fd(a2, b2, c, d2);
    } finally {
      C2 = e2, cd.transition = f2;
    }
  }
  function fd(a2, b2, c, d2) {
    if (dd) {
      var e2 = Yc(a2, b2, c, d2);
      if (null === e2) hd(a2, b2, d2, id, c), Sc(a2, d2);
      else if (Uc(e2, a2, b2, c, d2)) d2.stopPropagation();
      else if (Sc(a2, d2), b2 & 4 && -1 < Rc.indexOf(a2)) {
        for (; null !== e2; ) {
          var f2 = Cb(e2);
          null !== f2 && Ec(f2);
          f2 = Yc(a2, b2, c, d2);
          null === f2 && hd(a2, b2, d2, id, c);
          if (f2 === e2) break;
          e2 = f2;
        }
        null !== e2 && d2.stopPropagation();
      } else hd(a2, b2, d2, null, c);
    }
  }
  var id = null;
  function Yc(a2, b2, c, d2) {
    id = null;
    a2 = xb(d2);
    a2 = Wc(a2);
    if (null !== a2) if (b2 = Vb(a2), null === b2) a2 = null;
    else if (c = b2.tag, 13 === c) {
      a2 = Wb(b2);
      if (null !== a2) return a2;
      a2 = null;
    } else if (3 === c) {
      if (b2.stateNode.current.memoizedState.isDehydrated) return 3 === b2.tag ? b2.stateNode.containerInfo : null;
      a2 = null;
    } else b2 !== a2 && (a2 = null);
    id = a2;
    return null;
  }
  function jd(a2) {
    switch (a2) {
      case "cancel":
      case "click":
      case "close":
      case "contextmenu":
      case "copy":
      case "cut":
      case "auxclick":
      case "dblclick":
      case "dragend":
      case "dragstart":
      case "drop":
      case "focusin":
      case "focusout":
      case "input":
      case "invalid":
      case "keydown":
      case "keypress":
      case "keyup":
      case "mousedown":
      case "mouseup":
      case "paste":
      case "pause":
      case "play":
      case "pointercancel":
      case "pointerdown":
      case "pointerup":
      case "ratechange":
      case "reset":
      case "resize":
      case "seeked":
      case "submit":
      case "touchcancel":
      case "touchend":
      case "touchstart":
      case "volumechange":
      case "change":
      case "selectionchange":
      case "textInput":
      case "compositionstart":
      case "compositionend":
      case "compositionupdate":
      case "beforeblur":
      case "afterblur":
      case "beforeinput":
      case "blur":
      case "fullscreenchange":
      case "focus":
      case "hashchange":
      case "popstate":
      case "select":
      case "selectstart":
        return 1;
      case "drag":
      case "dragenter":
      case "dragexit":
      case "dragleave":
      case "dragover":
      case "mousemove":
      case "mouseout":
      case "mouseover":
      case "pointermove":
      case "pointerout":
      case "pointerover":
      case "scroll":
      case "toggle":
      case "touchmove":
      case "wheel":
      case "mouseenter":
      case "mouseleave":
      case "pointerenter":
      case "pointerleave":
        return 4;
      case "message":
        switch (ec()) {
          case fc:
            return 1;
          case gc:
            return 4;
          case hc:
          case ic:
            return 16;
          case jc:
            return 536870912;
          default:
            return 16;
        }
      default:
        return 16;
    }
  }
  var kd = null, ld = null, md = null;
  function nd() {
    if (md) return md;
    var a2, b2 = ld, c = b2.length, d2, e2 = "value" in kd ? kd.value : kd.textContent, f2 = e2.length;
    for (a2 = 0; a2 < c && b2[a2] === e2[a2]; a2++) ;
    var g2 = c - a2;
    for (d2 = 1; d2 <= g2 && b2[c - d2] === e2[f2 - d2]; d2++) ;
    return md = e2.slice(a2, 1 < d2 ? 1 - d2 : void 0);
  }
  function od(a2) {
    var b2 = a2.keyCode;
    "charCode" in a2 ? (a2 = a2.charCode, 0 === a2 && 13 === b2 && (a2 = 13)) : a2 = b2;
    10 === a2 && (a2 = 13);
    return 32 <= a2 || 13 === a2 ? a2 : 0;
  }
  function pd() {
    return true;
  }
  function qd() {
    return false;
  }
  function rd(a2) {
    function b2(b3, d2, e2, f2, g2) {
      this._reactName = b3;
      this._targetInst = e2;
      this.type = d2;
      this.nativeEvent = f2;
      this.target = g2;
      this.currentTarget = null;
      for (var c in a2) a2.hasOwnProperty(c) && (b3 = a2[c], this[c] = b3 ? b3(f2) : f2[c]);
      this.isDefaultPrevented = (null != f2.defaultPrevented ? f2.defaultPrevented : false === f2.returnValue) ? pd : qd;
      this.isPropagationStopped = qd;
      return this;
    }
    A2(b2.prototype, { preventDefault: function() {
      this.defaultPrevented = true;
      var a3 = this.nativeEvent;
      a3 && (a3.preventDefault ? a3.preventDefault() : "unknown" !== typeof a3.returnValue && (a3.returnValue = false), this.isDefaultPrevented = pd);
    }, stopPropagation: function() {
      var a3 = this.nativeEvent;
      a3 && (a3.stopPropagation ? a3.stopPropagation() : "unknown" !== typeof a3.cancelBubble && (a3.cancelBubble = true), this.isPropagationStopped = pd);
    }, persist: function() {
    }, isPersistent: pd });
    return b2;
  }
  var sd = { eventPhase: 0, bubbles: 0, cancelable: 0, timeStamp: function(a2) {
    return a2.timeStamp || Date.now();
  }, defaultPrevented: 0, isTrusted: 0 }, td = rd(sd), ud = A2({}, sd, { view: 0, detail: 0 }), vd = rd(ud), wd, xd, yd, Ad = A2({}, ud, { screenX: 0, screenY: 0, clientX: 0, clientY: 0, pageX: 0, pageY: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, getModifierState: zd, button: 0, buttons: 0, relatedTarget: function(a2) {
    return void 0 === a2.relatedTarget ? a2.fromElement === a2.srcElement ? a2.toElement : a2.fromElement : a2.relatedTarget;
  }, movementX: function(a2) {
    if ("movementX" in a2) return a2.movementX;
    a2 !== yd && (yd && "mousemove" === a2.type ? (wd = a2.screenX - yd.screenX, xd = a2.screenY - yd.screenY) : xd = wd = 0, yd = a2);
    return wd;
  }, movementY: function(a2) {
    return "movementY" in a2 ? a2.movementY : xd;
  } }), Bd = rd(Ad), Cd = A2({}, Ad, { dataTransfer: 0 }), Dd = rd(Cd), Ed = A2({}, ud, { relatedTarget: 0 }), Fd = rd(Ed), Gd = A2({}, sd, { animationName: 0, elapsedTime: 0, pseudoElement: 0 }), Hd = rd(Gd), Id = A2({}, sd, { clipboardData: function(a2) {
    return "clipboardData" in a2 ? a2.clipboardData : window.clipboardData;
  } }), Jd = rd(Id), Kd = A2({}, sd, { data: 0 }), Ld = rd(Kd), Md = {
    Esc: "Escape",
    Spacebar: " ",
    Left: "ArrowLeft",
    Up: "ArrowUp",
    Right: "ArrowRight",
    Down: "ArrowDown",
    Del: "Delete",
    Win: "OS",
    Menu: "ContextMenu",
    Apps: "ContextMenu",
    Scroll: "ScrollLock",
    MozPrintableKey: "Unidentified"
  }, Nd = {
    8: "Backspace",
    9: "Tab",
    12: "Clear",
    13: "Enter",
    16: "Shift",
    17: "Control",
    18: "Alt",
    19: "Pause",
    20: "CapsLock",
    27: "Escape",
    32: " ",
    33: "PageUp",
    34: "PageDown",
    35: "End",
    36: "Home",
    37: "ArrowLeft",
    38: "ArrowUp",
    39: "ArrowRight",
    40: "ArrowDown",
    45: "Insert",
    46: "Delete",
    112: "F1",
    113: "F2",
    114: "F3",
    115: "F4",
    116: "F5",
    117: "F6",
    118: "F7",
    119: "F8",
    120: "F9",
    121: "F10",
    122: "F11",
    123: "F12",
    144: "NumLock",
    145: "ScrollLock",
    224: "Meta"
  }, Od = { Alt: "altKey", Control: "ctrlKey", Meta: "metaKey", Shift: "shiftKey" };
  function Pd(a2) {
    var b2 = this.nativeEvent;
    return b2.getModifierState ? b2.getModifierState(a2) : (a2 = Od[a2]) ? !!b2[a2] : false;
  }
  function zd() {
    return Pd;
  }
  var Qd = A2({}, ud, { key: function(a2) {
    if (a2.key) {
      var b2 = Md[a2.key] || a2.key;
      if ("Unidentified" !== b2) return b2;
    }
    return "keypress" === a2.type ? (a2 = od(a2), 13 === a2 ? "Enter" : String.fromCharCode(a2)) : "keydown" === a2.type || "keyup" === a2.type ? Nd[a2.keyCode] || "Unidentified" : "";
  }, code: 0, location: 0, ctrlKey: 0, shiftKey: 0, altKey: 0, metaKey: 0, repeat: 0, locale: 0, getModifierState: zd, charCode: function(a2) {
    return "keypress" === a2.type ? od(a2) : 0;
  }, keyCode: function(a2) {
    return "keydown" === a2.type || "keyup" === a2.type ? a2.keyCode : 0;
  }, which: function(a2) {
    return "keypress" === a2.type ? od(a2) : "keydown" === a2.type || "keyup" === a2.type ? a2.keyCode : 0;
  } }), Rd = rd(Qd), Sd = A2({}, Ad, { pointerId: 0, width: 0, height: 0, pressure: 0, tangentialPressure: 0, tiltX: 0, tiltY: 0, twist: 0, pointerType: 0, isPrimary: 0 }), Td = rd(Sd), Ud = A2({}, ud, { touches: 0, targetTouches: 0, changedTouches: 0, altKey: 0, metaKey: 0, ctrlKey: 0, shiftKey: 0, getModifierState: zd }), Vd = rd(Ud), Wd = A2({}, sd, { propertyName: 0, elapsedTime: 0, pseudoElement: 0 }), Xd = rd(Wd), Yd = A2({}, Ad, {
    deltaX: function(a2) {
      return "deltaX" in a2 ? a2.deltaX : "wheelDeltaX" in a2 ? -a2.wheelDeltaX : 0;
    },
    deltaY: function(a2) {
      return "deltaY" in a2 ? a2.deltaY : "wheelDeltaY" in a2 ? -a2.wheelDeltaY : "wheelDelta" in a2 ? -a2.wheelDelta : 0;
    },
    deltaZ: 0,
    deltaMode: 0
  }), Zd = rd(Yd), $d = [9, 13, 27, 32], ae = ia && "CompositionEvent" in window, be = null;
  ia && "documentMode" in document && (be = document.documentMode);
  var ce = ia && "TextEvent" in window && !be, de = ia && (!ae || be && 8 < be && 11 >= be), ee = String.fromCharCode(32), fe = false;
  function ge(a2, b2) {
    switch (a2) {
      case "keyup":
        return -1 !== $d.indexOf(b2.keyCode);
      case "keydown":
        return 229 !== b2.keyCode;
      case "keypress":
      case "mousedown":
      case "focusout":
        return true;
      default:
        return false;
    }
  }
  function he(a2) {
    a2 = a2.detail;
    return "object" === typeof a2 && "data" in a2 ? a2.data : null;
  }
  var ie = false;
  function je(a2, b2) {
    switch (a2) {
      case "compositionend":
        return he(b2);
      case "keypress":
        if (32 !== b2.which) return null;
        fe = true;
        return ee;
      case "textInput":
        return a2 = b2.data, a2 === ee && fe ? null : a2;
      default:
        return null;
    }
  }
  function ke(a2, b2) {
    if (ie) return "compositionend" === a2 || !ae && ge(a2, b2) ? (a2 = nd(), md = ld = kd = null, ie = false, a2) : null;
    switch (a2) {
      case "paste":
        return null;
      case "keypress":
        if (!(b2.ctrlKey || b2.altKey || b2.metaKey) || b2.ctrlKey && b2.altKey) {
          if (b2.char && 1 < b2.char.length) return b2.char;
          if (b2.which) return String.fromCharCode(b2.which);
        }
        return null;
      case "compositionend":
        return de && "ko" !== b2.locale ? null : b2.data;
      default:
        return null;
    }
  }
  var le = { color: true, date: true, datetime: true, "datetime-local": true, email: true, month: true, number: true, password: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true };
  function me(a2) {
    var b2 = a2 && a2.nodeName && a2.nodeName.toLowerCase();
    return "input" === b2 ? !!le[a2.type] : "textarea" === b2 ? true : false;
  }
  function ne(a2, b2, c, d2) {
    Eb(d2);
    b2 = oe(b2, "onChange");
    0 < b2.length && (c = new td("onChange", "change", null, c, d2), a2.push({ event: c, listeners: b2 }));
  }
  var pe = null, qe = null;
  function re(a2) {
    se(a2, 0);
  }
  function te(a2) {
    var b2 = ue(a2);
    if (Wa(b2)) return a2;
  }
  function ve(a2, b2) {
    if ("change" === a2) return b2;
  }
  var we = false;
  if (ia) {
    var xe;
    if (ia) {
      var ye = "oninput" in document;
      if (!ye) {
        var ze = document.createElement("div");
        ze.setAttribute("oninput", "return;");
        ye = "function" === typeof ze.oninput;
      }
      xe = ye;
    } else xe = false;
    we = xe && (!document.documentMode || 9 < document.documentMode);
  }
  function Ae() {
    pe && (pe.detachEvent("onpropertychange", Be), qe = pe = null);
  }
  function Be(a2) {
    if ("value" === a2.propertyName && te(qe)) {
      var b2 = [];
      ne(b2, qe, a2, xb(a2));
      Jb(re, b2);
    }
  }
  function Ce(a2, b2, c) {
    "focusin" === a2 ? (Ae(), pe = b2, qe = c, pe.attachEvent("onpropertychange", Be)) : "focusout" === a2 && Ae();
  }
  function De(a2) {
    if ("selectionchange" === a2 || "keyup" === a2 || "keydown" === a2) return te(qe);
  }
  function Ee(a2, b2) {
    if ("click" === a2) return te(b2);
  }
  function Fe(a2, b2) {
    if ("input" === a2 || "change" === a2) return te(b2);
  }
  function Ge(a2, b2) {
    return a2 === b2 && (0 !== a2 || 1 / a2 === 1 / b2) || a2 !== a2 && b2 !== b2;
  }
  var He = "function" === typeof Object.is ? Object.is : Ge;
  function Ie(a2, b2) {
    if (He(a2, b2)) return true;
    if ("object" !== typeof a2 || null === a2 || "object" !== typeof b2 || null === b2) return false;
    var c = Object.keys(a2), d2 = Object.keys(b2);
    if (c.length !== d2.length) return false;
    for (d2 = 0; d2 < c.length; d2++) {
      var e2 = c[d2];
      if (!ja.call(b2, e2) || !He(a2[e2], b2[e2])) return false;
    }
    return true;
  }
  function Je(a2) {
    for (; a2 && a2.firstChild; ) a2 = a2.firstChild;
    return a2;
  }
  function Ke(a2, b2) {
    var c = Je(a2);
    a2 = 0;
    for (var d2; c; ) {
      if (3 === c.nodeType) {
        d2 = a2 + c.textContent.length;
        if (a2 <= b2 && d2 >= b2) return { node: c, offset: b2 - a2 };
        a2 = d2;
      }
      a: {
        for (; c; ) {
          if (c.nextSibling) {
            c = c.nextSibling;
            break a;
          }
          c = c.parentNode;
        }
        c = void 0;
      }
      c = Je(c);
    }
  }
  function Le(a2, b2) {
    return a2 && b2 ? a2 === b2 ? true : a2 && 3 === a2.nodeType ? false : b2 && 3 === b2.nodeType ? Le(a2, b2.parentNode) : "contains" in a2 ? a2.contains(b2) : a2.compareDocumentPosition ? !!(a2.compareDocumentPosition(b2) & 16) : false : false;
  }
  function Me() {
    for (var a2 = window, b2 = Xa(); b2 instanceof a2.HTMLIFrameElement; ) {
      try {
        var c = "string" === typeof b2.contentWindow.location.href;
      } catch (d2) {
        c = false;
      }
      if (c) a2 = b2.contentWindow;
      else break;
      b2 = Xa(a2.document);
    }
    return b2;
  }
  function Ne(a2) {
    var b2 = a2 && a2.nodeName && a2.nodeName.toLowerCase();
    return b2 && ("input" === b2 && ("text" === a2.type || "search" === a2.type || "tel" === a2.type || "url" === a2.type || "password" === a2.type) || "textarea" === b2 || "true" === a2.contentEditable);
  }
  function Oe(a2) {
    var b2 = Me(), c = a2.focusedElem, d2 = a2.selectionRange;
    if (b2 !== c && c && c.ownerDocument && Le(c.ownerDocument.documentElement, c)) {
      if (null !== d2 && Ne(c)) {
        if (b2 = d2.start, a2 = d2.end, void 0 === a2 && (a2 = b2), "selectionStart" in c) c.selectionStart = b2, c.selectionEnd = Math.min(a2, c.value.length);
        else if (a2 = (b2 = c.ownerDocument || document) && b2.defaultView || window, a2.getSelection) {
          a2 = a2.getSelection();
          var e2 = c.textContent.length, f2 = Math.min(d2.start, e2);
          d2 = void 0 === d2.end ? f2 : Math.min(d2.end, e2);
          !a2.extend && f2 > d2 && (e2 = d2, d2 = f2, f2 = e2);
          e2 = Ke(c, f2);
          var g2 = Ke(
            c,
            d2
          );
          e2 && g2 && (1 !== a2.rangeCount || a2.anchorNode !== e2.node || a2.anchorOffset !== e2.offset || a2.focusNode !== g2.node || a2.focusOffset !== g2.offset) && (b2 = b2.createRange(), b2.setStart(e2.node, e2.offset), a2.removeAllRanges(), f2 > d2 ? (a2.addRange(b2), a2.extend(g2.node, g2.offset)) : (b2.setEnd(g2.node, g2.offset), a2.addRange(b2)));
        }
      }
      b2 = [];
      for (a2 = c; a2 = a2.parentNode; ) 1 === a2.nodeType && b2.push({ element: a2, left: a2.scrollLeft, top: a2.scrollTop });
      "function" === typeof c.focus && c.focus();
      for (c = 0; c < b2.length; c++) a2 = b2[c], a2.element.scrollLeft = a2.left, a2.element.scrollTop = a2.top;
    }
  }
  var Pe = ia && "documentMode" in document && 11 >= document.documentMode, Qe = null, Re = null, Se = null, Te = false;
  function Ue(a2, b2, c) {
    var d2 = c.window === c ? c.document : 9 === c.nodeType ? c : c.ownerDocument;
    Te || null == Qe || Qe !== Xa(d2) || (d2 = Qe, "selectionStart" in d2 && Ne(d2) ? d2 = { start: d2.selectionStart, end: d2.selectionEnd } : (d2 = (d2.ownerDocument && d2.ownerDocument.defaultView || window).getSelection(), d2 = { anchorNode: d2.anchorNode, anchorOffset: d2.anchorOffset, focusNode: d2.focusNode, focusOffset: d2.focusOffset }), Se && Ie(Se, d2) || (Se = d2, d2 = oe(Re, "onSelect"), 0 < d2.length && (b2 = new td("onSelect", "select", null, b2, c), a2.push({ event: b2, listeners: d2 }), b2.target = Qe)));
  }
  function Ve(a2, b2) {
    var c = {};
    c[a2.toLowerCase()] = b2.toLowerCase();
    c["Webkit" + a2] = "webkit" + b2;
    c["Moz" + a2] = "moz" + b2;
    return c;
  }
  var We = { animationend: Ve("Animation", "AnimationEnd"), animationiteration: Ve("Animation", "AnimationIteration"), animationstart: Ve("Animation", "AnimationStart"), transitionend: Ve("Transition", "TransitionEnd") }, Xe = {}, Ye = {};
  ia && (Ye = document.createElement("div").style, "AnimationEvent" in window || (delete We.animationend.animation, delete We.animationiteration.animation, delete We.animationstart.animation), "TransitionEvent" in window || delete We.transitionend.transition);
  function Ze(a2) {
    if (Xe[a2]) return Xe[a2];
    if (!We[a2]) return a2;
    var b2 = We[a2], c;
    for (c in b2) if (b2.hasOwnProperty(c) && c in Ye) return Xe[a2] = b2[c];
    return a2;
  }
  var $e = Ze("animationend"), af = Ze("animationiteration"), bf = Ze("animationstart"), cf = Ze("transitionend"), df = /* @__PURE__ */ new Map(), ef = "abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
  function ff(a2, b2) {
    df.set(a2, b2);
    fa(b2, [a2]);
  }
  for (var gf = 0; gf < ef.length; gf++) {
    var hf = ef[gf], jf = hf.toLowerCase(), kf = hf[0].toUpperCase() + hf.slice(1);
    ff(jf, "on" + kf);
  }
  ff($e, "onAnimationEnd");
  ff(af, "onAnimationIteration");
  ff(bf, "onAnimationStart");
  ff("dblclick", "onDoubleClick");
  ff("focusin", "onFocus");
  ff("focusout", "onBlur");
  ff(cf, "onTransitionEnd");
  ha("onMouseEnter", ["mouseout", "mouseover"]);
  ha("onMouseLeave", ["mouseout", "mouseover"]);
  ha("onPointerEnter", ["pointerout", "pointerover"]);
  ha("onPointerLeave", ["pointerout", "pointerover"]);
  fa("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" "));
  fa("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));
  fa("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
  fa("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" "));
  fa("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" "));
  fa("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
  var lf = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), mf = new Set("cancel close invalid load scroll toggle".split(" ").concat(lf));
  function nf(a2, b2, c) {
    var d2 = a2.type || "unknown-event";
    a2.currentTarget = c;
    Ub(d2, b2, void 0, a2);
    a2.currentTarget = null;
  }
  function se(a2, b2) {
    b2 = 0 !== (b2 & 4);
    for (var c = 0; c < a2.length; c++) {
      var d2 = a2[c], e2 = d2.event;
      d2 = d2.listeners;
      a: {
        var f2 = void 0;
        if (b2) for (var g2 = d2.length - 1; 0 <= g2; g2--) {
          var h2 = d2[g2], k2 = h2.instance, l = h2.currentTarget;
          h2 = h2.listener;
          if (k2 !== f2 && e2.isPropagationStopped()) break a;
          nf(e2, h2, l);
          f2 = k2;
        }
        else for (g2 = 0; g2 < d2.length; g2++) {
          h2 = d2[g2];
          k2 = h2.instance;
          l = h2.currentTarget;
          h2 = h2.listener;
          if (k2 !== f2 && e2.isPropagationStopped()) break a;
          nf(e2, h2, l);
          f2 = k2;
        }
      }
    }
    if (Qb) throw a2 = Rb, Qb = false, Rb = null, a2;
  }
  function D2(a2, b2) {
    var c = b2[of];
    void 0 === c && (c = b2[of] = /* @__PURE__ */ new Set());
    var d2 = a2 + "__bubble";
    c.has(d2) || (pf(b2, a2, 2, false), c.add(d2));
  }
  function qf(a2, b2, c) {
    var d2 = 0;
    b2 && (d2 |= 4);
    pf(c, a2, d2, b2);
  }
  var rf = "_reactListening" + Math.random().toString(36).slice(2);
  function sf(a2) {
    if (!a2[rf]) {
      a2[rf] = true;
      da.forEach(function(b3) {
        "selectionchange" !== b3 && (mf.has(b3) || qf(b3, false, a2), qf(b3, true, a2));
      });
      var b2 = 9 === a2.nodeType ? a2 : a2.ownerDocument;
      null === b2 || b2[rf] || (b2[rf] = true, qf("selectionchange", false, b2));
    }
  }
  function pf(a2, b2, c, d2) {
    switch (jd(b2)) {
      case 1:
        var e2 = ed;
        break;
      case 4:
        e2 = gd;
        break;
      default:
        e2 = fd;
    }
    c = e2.bind(null, b2, c, a2);
    e2 = void 0;
    !Lb || "touchstart" !== b2 && "touchmove" !== b2 && "wheel" !== b2 || (e2 = true);
    d2 ? void 0 !== e2 ? a2.addEventListener(b2, c, { capture: true, passive: e2 }) : a2.addEventListener(b2, c, true) : void 0 !== e2 ? a2.addEventListener(b2, c, { passive: e2 }) : a2.addEventListener(b2, c, false);
  }
  function hd(a2, b2, c, d2, e2) {
    var f2 = d2;
    if (0 === (b2 & 1) && 0 === (b2 & 2) && null !== d2) a: for (; ; ) {
      if (null === d2) return;
      var g2 = d2.tag;
      if (3 === g2 || 4 === g2) {
        var h2 = d2.stateNode.containerInfo;
        if (h2 === e2 || 8 === h2.nodeType && h2.parentNode === e2) break;
        if (4 === g2) for (g2 = d2.return; null !== g2; ) {
          var k2 = g2.tag;
          if (3 === k2 || 4 === k2) {
            if (k2 = g2.stateNode.containerInfo, k2 === e2 || 8 === k2.nodeType && k2.parentNode === e2) return;
          }
          g2 = g2.return;
        }
        for (; null !== h2; ) {
          g2 = Wc(h2);
          if (null === g2) return;
          k2 = g2.tag;
          if (5 === k2 || 6 === k2) {
            d2 = f2 = g2;
            continue a;
          }
          h2 = h2.parentNode;
        }
      }
      d2 = d2.return;
    }
    Jb(function() {
      var d3 = f2, e3 = xb(c), g3 = [];
      a: {
        var h3 = df.get(a2);
        if (void 0 !== h3) {
          var k3 = td, n = a2;
          switch (a2) {
            case "keypress":
              if (0 === od(c)) break a;
            case "keydown":
            case "keyup":
              k3 = Rd;
              break;
            case "focusin":
              n = "focus";
              k3 = Fd;
              break;
            case "focusout":
              n = "blur";
              k3 = Fd;
              break;
            case "beforeblur":
            case "afterblur":
              k3 = Fd;
              break;
            case "click":
              if (2 === c.button) break a;
            case "auxclick":
            case "dblclick":
            case "mousedown":
            case "mousemove":
            case "mouseup":
            case "mouseout":
            case "mouseover":
            case "contextmenu":
              k3 = Bd;
              break;
            case "drag":
            case "dragend":
            case "dragenter":
            case "dragexit":
            case "dragleave":
            case "dragover":
            case "dragstart":
            case "drop":
              k3 = Dd;
              break;
            case "touchcancel":
            case "touchend":
            case "touchmove":
            case "touchstart":
              k3 = Vd;
              break;
            case $e:
            case af:
            case bf:
              k3 = Hd;
              break;
            case cf:
              k3 = Xd;
              break;
            case "scroll":
              k3 = vd;
              break;
            case "wheel":
              k3 = Zd;
              break;
            case "copy":
            case "cut":
            case "paste":
              k3 = Jd;
              break;
            case "gotpointercapture":
            case "lostpointercapture":
            case "pointercancel":
            case "pointerdown":
            case "pointermove":
            case "pointerout":
            case "pointerover":
            case "pointerup":
              k3 = Td;
          }
          var t = 0 !== (b2 & 4), J = !t && "scroll" === a2, x = t ? null !== h3 ? h3 + "Capture" : null : h3;
          t = [];
          for (var w = d3, u2; null !== w; ) {
            u2 = w;
            var F2 = u2.stateNode;
            5 === u2.tag && null !== F2 && (u2 = F2, null !== x && (F2 = Kb(w, x), null != F2 && t.push(tf(w, F2, u2))));
            if (J) break;
            w = w.return;
          }
          0 < t.length && (h3 = new k3(h3, n, null, c, e3), g3.push({ event: h3, listeners: t }));
        }
      }
      if (0 === (b2 & 7)) {
        a: {
          h3 = "mouseover" === a2 || "pointerover" === a2;
          k3 = "mouseout" === a2 || "pointerout" === a2;
          if (h3 && c !== wb && (n = c.relatedTarget || c.fromElement) && (Wc(n) || n[uf])) break a;
          if (k3 || h3) {
            h3 = e3.window === e3 ? e3 : (h3 = e3.ownerDocument) ? h3.defaultView || h3.parentWindow : window;
            if (k3) {
              if (n = c.relatedTarget || c.toElement, k3 = d3, n = n ? Wc(n) : null, null !== n && (J = Vb(n), n !== J || 5 !== n.tag && 6 !== n.tag)) n = null;
            } else k3 = null, n = d3;
            if (k3 !== n) {
              t = Bd;
              F2 = "onMouseLeave";
              x = "onMouseEnter";
              w = "mouse";
              if ("pointerout" === a2 || "pointerover" === a2) t = Td, F2 = "onPointerLeave", x = "onPointerEnter", w = "pointer";
              J = null == k3 ? h3 : ue(k3);
              u2 = null == n ? h3 : ue(n);
              h3 = new t(F2, w + "leave", k3, c, e3);
              h3.target = J;
              h3.relatedTarget = u2;
              F2 = null;
              Wc(e3) === d3 && (t = new t(x, w + "enter", n, c, e3), t.target = u2, t.relatedTarget = J, F2 = t);
              J = F2;
              if (k3 && n) b: {
                t = k3;
                x = n;
                w = 0;
                for (u2 = t; u2; u2 = vf(u2)) w++;
                u2 = 0;
                for (F2 = x; F2; F2 = vf(F2)) u2++;
                for (; 0 < w - u2; ) t = vf(t), w--;
                for (; 0 < u2 - w; ) x = vf(x), u2--;
                for (; w--; ) {
                  if (t === x || null !== x && t === x.alternate) break b;
                  t = vf(t);
                  x = vf(x);
                }
                t = null;
              }
              else t = null;
              null !== k3 && wf(g3, h3, k3, t, false);
              null !== n && null !== J && wf(g3, J, n, t, true);
            }
          }
        }
        a: {
          h3 = d3 ? ue(d3) : window;
          k3 = h3.nodeName && h3.nodeName.toLowerCase();
          if ("select" === k3 || "input" === k3 && "file" === h3.type) var na = ve;
          else if (me(h3)) if (we) na = Fe;
          else {
            na = De;
            var xa = Ce;
          }
          else (k3 = h3.nodeName) && "input" === k3.toLowerCase() && ("checkbox" === h3.type || "radio" === h3.type) && (na = Ee);
          if (na && (na = na(a2, d3))) {
            ne(g3, na, c, e3);
            break a;
          }
          xa && xa(a2, h3, d3);
          "focusout" === a2 && (xa = h3._wrapperState) && xa.controlled && "number" === h3.type && cb(h3, "number", h3.value);
        }
        xa = d3 ? ue(d3) : window;
        switch (a2) {
          case "focusin":
            if (me(xa) || "true" === xa.contentEditable) Qe = xa, Re = d3, Se = null;
            break;
          case "focusout":
            Se = Re = Qe = null;
            break;
          case "mousedown":
            Te = true;
            break;
          case "contextmenu":
          case "mouseup":
          case "dragend":
            Te = false;
            Ue(g3, c, e3);
            break;
          case "selectionchange":
            if (Pe) break;
          case "keydown":
          case "keyup":
            Ue(g3, c, e3);
        }
        var $a;
        if (ae) b: {
          switch (a2) {
            case "compositionstart":
              var ba = "onCompositionStart";
              break b;
            case "compositionend":
              ba = "onCompositionEnd";
              break b;
            case "compositionupdate":
              ba = "onCompositionUpdate";
              break b;
          }
          ba = void 0;
        }
        else ie ? ge(a2, c) && (ba = "onCompositionEnd") : "keydown" === a2 && 229 === c.keyCode && (ba = "onCompositionStart");
        ba && (de && "ko" !== c.locale && (ie || "onCompositionStart" !== ba ? "onCompositionEnd" === ba && ie && ($a = nd()) : (kd = e3, ld = "value" in kd ? kd.value : kd.textContent, ie = true)), xa = oe(d3, ba), 0 < xa.length && (ba = new Ld(ba, a2, null, c, e3), g3.push({ event: ba, listeners: xa }), $a ? ba.data = $a : ($a = he(c), null !== $a && (ba.data = $a))));
        if ($a = ce ? je(a2, c) : ke(a2, c)) d3 = oe(d3, "onBeforeInput"), 0 < d3.length && (e3 = new Ld("onBeforeInput", "beforeinput", null, c, e3), g3.push({ event: e3, listeners: d3 }), e3.data = $a);
      }
      se(g3, b2);
    });
  }
  function tf(a2, b2, c) {
    return { instance: a2, listener: b2, currentTarget: c };
  }
  function oe(a2, b2) {
    for (var c = b2 + "Capture", d2 = []; null !== a2; ) {
      var e2 = a2, f2 = e2.stateNode;
      5 === e2.tag && null !== f2 && (e2 = f2, f2 = Kb(a2, c), null != f2 && d2.unshift(tf(a2, f2, e2)), f2 = Kb(a2, b2), null != f2 && d2.push(tf(a2, f2, e2)));
      a2 = a2.return;
    }
    return d2;
  }
  function vf(a2) {
    if (null === a2) return null;
    do
      a2 = a2.return;
    while (a2 && 5 !== a2.tag);
    return a2 ? a2 : null;
  }
  function wf(a2, b2, c, d2, e2) {
    for (var f2 = b2._reactName, g2 = []; null !== c && c !== d2; ) {
      var h2 = c, k2 = h2.alternate, l = h2.stateNode;
      if (null !== k2 && k2 === d2) break;
      5 === h2.tag && null !== l && (h2 = l, e2 ? (k2 = Kb(c, f2), null != k2 && g2.unshift(tf(c, k2, h2))) : e2 || (k2 = Kb(c, f2), null != k2 && g2.push(tf(c, k2, h2))));
      c = c.return;
    }
    0 !== g2.length && a2.push({ event: b2, listeners: g2 });
  }
  var xf = /\r\n?/g, yf = /\u0000|\uFFFD/g;
  function zf(a2) {
    return ("string" === typeof a2 ? a2 : "" + a2).replace(xf, "\n").replace(yf, "");
  }
  function Af(a2, b2, c) {
    b2 = zf(b2);
    if (zf(a2) !== b2 && c) throw Error(p2(425));
  }
  function Bf() {
  }
  var Cf = null, Df = null;
  function Ef(a2, b2) {
    return "textarea" === a2 || "noscript" === a2 || "string" === typeof b2.children || "number" === typeof b2.children || "object" === typeof b2.dangerouslySetInnerHTML && null !== b2.dangerouslySetInnerHTML && null != b2.dangerouslySetInnerHTML.__html;
  }
  var Ff = "function" === typeof setTimeout ? setTimeout : void 0, Gf = "function" === typeof clearTimeout ? clearTimeout : void 0, Hf = "function" === typeof Promise ? Promise : void 0, Jf = "function" === typeof queueMicrotask ? queueMicrotask : "undefined" !== typeof Hf ? function(a2) {
    return Hf.resolve(null).then(a2).catch(If);
  } : Ff;
  function If(a2) {
    setTimeout(function() {
      throw a2;
    });
  }
  function Kf(a2, b2) {
    var c = b2, d2 = 0;
    do {
      var e2 = c.nextSibling;
      a2.removeChild(c);
      if (e2 && 8 === e2.nodeType) if (c = e2.data, "/$" === c) {
        if (0 === d2) {
          a2.removeChild(e2);
          bd(b2);
          return;
        }
        d2--;
      } else "$" !== c && "$?" !== c && "$!" !== c || d2++;
      c = e2;
    } while (c);
    bd(b2);
  }
  function Lf(a2) {
    for (; null != a2; a2 = a2.nextSibling) {
      var b2 = a2.nodeType;
      if (1 === b2 || 3 === b2) break;
      if (8 === b2) {
        b2 = a2.data;
        if ("$" === b2 || "$!" === b2 || "$?" === b2) break;
        if ("/$" === b2) return null;
      }
    }
    return a2;
  }
  function Mf(a2) {
    a2 = a2.previousSibling;
    for (var b2 = 0; a2; ) {
      if (8 === a2.nodeType) {
        var c = a2.data;
        if ("$" === c || "$!" === c || "$?" === c) {
          if (0 === b2) return a2;
          b2--;
        } else "/$" === c && b2++;
      }
      a2 = a2.previousSibling;
    }
    return null;
  }
  var Nf = Math.random().toString(36).slice(2), Of = "__reactFiber$" + Nf, Pf = "__reactProps$" + Nf, uf = "__reactContainer$" + Nf, of = "__reactEvents$" + Nf, Qf = "__reactListeners$" + Nf, Rf = "__reactHandles$" + Nf;
  function Wc(a2) {
    var b2 = a2[Of];
    if (b2) return b2;
    for (var c = a2.parentNode; c; ) {
      if (b2 = c[uf] || c[Of]) {
        c = b2.alternate;
        if (null !== b2.child || null !== c && null !== c.child) for (a2 = Mf(a2); null !== a2; ) {
          if (c = a2[Of]) return c;
          a2 = Mf(a2);
        }
        return b2;
      }
      a2 = c;
      c = a2.parentNode;
    }
    return null;
  }
  function Cb(a2) {
    a2 = a2[Of] || a2[uf];
    return !a2 || 5 !== a2.tag && 6 !== a2.tag && 13 !== a2.tag && 3 !== a2.tag ? null : a2;
  }
  function ue(a2) {
    if (5 === a2.tag || 6 === a2.tag) return a2.stateNode;
    throw Error(p2(33));
  }
  function Db(a2) {
    return a2[Pf] || null;
  }
  var Sf = [], Tf = -1;
  function Uf(a2) {
    return { current: a2 };
  }
  function E2(a2) {
    0 > Tf || (a2.current = Sf[Tf], Sf[Tf] = null, Tf--);
  }
  function G(a2, b2) {
    Tf++;
    Sf[Tf] = a2.current;
    a2.current = b2;
  }
  var Vf = {}, H4 = Uf(Vf), Wf = Uf(false), Xf = Vf;
  function Yf(a2, b2) {
    var c = a2.type.contextTypes;
    if (!c) return Vf;
    var d2 = a2.stateNode;
    if (d2 && d2.__reactInternalMemoizedUnmaskedChildContext === b2) return d2.__reactInternalMemoizedMaskedChildContext;
    var e2 = {}, f2;
    for (f2 in c) e2[f2] = b2[f2];
    d2 && (a2 = a2.stateNode, a2.__reactInternalMemoizedUnmaskedChildContext = b2, a2.__reactInternalMemoizedMaskedChildContext = e2);
    return e2;
  }
  function Zf(a2) {
    a2 = a2.childContextTypes;
    return null !== a2 && void 0 !== a2;
  }
  function $f() {
    E2(Wf);
    E2(H4);
  }
  function ag(a2, b2, c) {
    if (H4.current !== Vf) throw Error(p2(168));
    G(H4, b2);
    G(Wf, c);
  }
  function bg(a2, b2, c) {
    var d2 = a2.stateNode;
    b2 = b2.childContextTypes;
    if ("function" !== typeof d2.getChildContext) return c;
    d2 = d2.getChildContext();
    for (var e2 in d2) if (!(e2 in b2)) throw Error(p2(108, Ra(a2) || "Unknown", e2));
    return A2({}, c, d2);
  }
  function cg(a2) {
    a2 = (a2 = a2.stateNode) && a2.__reactInternalMemoizedMergedChildContext || Vf;
    Xf = H4.current;
    G(H4, a2);
    G(Wf, Wf.current);
    return true;
  }
  function dg(a2, b2, c) {
    var d2 = a2.stateNode;
    if (!d2) throw Error(p2(169));
    c ? (a2 = bg(a2, b2, Xf), d2.__reactInternalMemoizedMergedChildContext = a2, E2(Wf), E2(H4), G(H4, a2)) : E2(Wf);
    G(Wf, c);
  }
  var eg = null, fg = false, gg = false;
  function hg(a2) {
    null === eg ? eg = [a2] : eg.push(a2);
  }
  function ig(a2) {
    fg = true;
    hg(a2);
  }
  function jg() {
    if (!gg && null !== eg) {
      gg = true;
      var a2 = 0, b2 = C2;
      try {
        var c = eg;
        for (C2 = 1; a2 < c.length; a2++) {
          var d2 = c[a2];
          do
            d2 = d2(true);
          while (null !== d2);
        }
        eg = null;
        fg = false;
      } catch (e2) {
        throw null !== eg && (eg = eg.slice(a2 + 1)), ac(fc, jg), e2;
      } finally {
        C2 = b2, gg = false;
      }
    }
    return null;
  }
  var kg = [], lg = 0, mg = null, ng = 0, og = [], pg = 0, qg = null, rg = 1, sg = "";
  function tg(a2, b2) {
    kg[lg++] = ng;
    kg[lg++] = mg;
    mg = a2;
    ng = b2;
  }
  function ug(a2, b2, c) {
    og[pg++] = rg;
    og[pg++] = sg;
    og[pg++] = qg;
    qg = a2;
    var d2 = rg;
    a2 = sg;
    var e2 = 32 - oc(d2) - 1;
    d2 &= ~(1 << e2);
    c += 1;
    var f2 = 32 - oc(b2) + e2;
    if (30 < f2) {
      var g2 = e2 - e2 % 5;
      f2 = (d2 & (1 << g2) - 1).toString(32);
      d2 >>= g2;
      e2 -= g2;
      rg = 1 << 32 - oc(b2) + e2 | c << e2 | d2;
      sg = f2 + a2;
    } else rg = 1 << f2 | c << e2 | d2, sg = a2;
  }
  function vg(a2) {
    null !== a2.return && (tg(a2, 1), ug(a2, 1, 0));
  }
  function wg(a2) {
    for (; a2 === mg; ) mg = kg[--lg], kg[lg] = null, ng = kg[--lg], kg[lg] = null;
    for (; a2 === qg; ) qg = og[--pg], og[pg] = null, sg = og[--pg], og[pg] = null, rg = og[--pg], og[pg] = null;
  }
  var xg = null, yg = null, I2 = false, zg = null;
  function Ag(a2, b2) {
    var c = Bg(5, null, null, 0);
    c.elementType = "DELETED";
    c.stateNode = b2;
    c.return = a2;
    b2 = a2.deletions;
    null === b2 ? (a2.deletions = [c], a2.flags |= 16) : b2.push(c);
  }
  function Cg(a2, b2) {
    switch (a2.tag) {
      case 5:
        var c = a2.type;
        b2 = 1 !== b2.nodeType || c.toLowerCase() !== b2.nodeName.toLowerCase() ? null : b2;
        return null !== b2 ? (a2.stateNode = b2, xg = a2, yg = Lf(b2.firstChild), true) : false;
      case 6:
        return b2 = "" === a2.pendingProps || 3 !== b2.nodeType ? null : b2, null !== b2 ? (a2.stateNode = b2, xg = a2, yg = null, true) : false;
      case 13:
        return b2 = 8 !== b2.nodeType ? null : b2, null !== b2 ? (c = null !== qg ? { id: rg, overflow: sg } : null, a2.memoizedState = { dehydrated: b2, treeContext: c, retryLane: 1073741824 }, c = Bg(18, null, null, 0), c.stateNode = b2, c.return = a2, a2.child = c, xg = a2, yg = null, true) : false;
      default:
        return false;
    }
  }
  function Dg(a2) {
    return 0 !== (a2.mode & 1) && 0 === (a2.flags & 128);
  }
  function Eg(a2) {
    if (I2) {
      var b2 = yg;
      if (b2) {
        var c = b2;
        if (!Cg(a2, b2)) {
          if (Dg(a2)) throw Error(p2(418));
          b2 = Lf(c.nextSibling);
          var d2 = xg;
          b2 && Cg(a2, b2) ? Ag(d2, c) : (a2.flags = a2.flags & -4097 | 2, I2 = false, xg = a2);
        }
      } else {
        if (Dg(a2)) throw Error(p2(418));
        a2.flags = a2.flags & -4097 | 2;
        I2 = false;
        xg = a2;
      }
    }
  }
  function Fg(a2) {
    for (a2 = a2.return; null !== a2 && 5 !== a2.tag && 3 !== a2.tag && 13 !== a2.tag; ) a2 = a2.return;
    xg = a2;
  }
  function Gg(a2) {
    if (a2 !== xg) return false;
    if (!I2) return Fg(a2), I2 = true, false;
    var b2;
    (b2 = 3 !== a2.tag) && !(b2 = 5 !== a2.tag) && (b2 = a2.type, b2 = "head" !== b2 && "body" !== b2 && !Ef(a2.type, a2.memoizedProps));
    if (b2 && (b2 = yg)) {
      if (Dg(a2)) throw Hg(), Error(p2(418));
      for (; b2; ) Ag(a2, b2), b2 = Lf(b2.nextSibling);
    }
    Fg(a2);
    if (13 === a2.tag) {
      a2 = a2.memoizedState;
      a2 = null !== a2 ? a2.dehydrated : null;
      if (!a2) throw Error(p2(317));
      a: {
        a2 = a2.nextSibling;
        for (b2 = 0; a2; ) {
          if (8 === a2.nodeType) {
            var c = a2.data;
            if ("/$" === c) {
              if (0 === b2) {
                yg = Lf(a2.nextSibling);
                break a;
              }
              b2--;
            } else "$" !== c && "$!" !== c && "$?" !== c || b2++;
          }
          a2 = a2.nextSibling;
        }
        yg = null;
      }
    } else yg = xg ? Lf(a2.stateNode.nextSibling) : null;
    return true;
  }
  function Hg() {
    for (var a2 = yg; a2; ) a2 = Lf(a2.nextSibling);
  }
  function Ig() {
    yg = xg = null;
    I2 = false;
  }
  function Jg(a2) {
    null === zg ? zg = [a2] : zg.push(a2);
  }
  var Kg = ua.ReactCurrentBatchConfig;
  function Lg(a2, b2, c) {
    a2 = c.ref;
    if (null !== a2 && "function" !== typeof a2 && "object" !== typeof a2) {
      if (c._owner) {
        c = c._owner;
        if (c) {
          if (1 !== c.tag) throw Error(p2(309));
          var d2 = c.stateNode;
        }
        if (!d2) throw Error(p2(147, a2));
        var e2 = d2, f2 = "" + a2;
        if (null !== b2 && null !== b2.ref && "function" === typeof b2.ref && b2.ref._stringRef === f2) return b2.ref;
        b2 = function(a3) {
          var b3 = e2.refs;
          null === a3 ? delete b3[f2] : b3[f2] = a3;
        };
        b2._stringRef = f2;
        return b2;
      }
      if ("string" !== typeof a2) throw Error(p2(284));
      if (!c._owner) throw Error(p2(290, a2));
    }
    return a2;
  }
  function Mg(a2, b2) {
    a2 = Object.prototype.toString.call(b2);
    throw Error(p2(31, "[object Object]" === a2 ? "object with keys {" + Object.keys(b2).join(", ") + "}" : a2));
  }
  function Ng(a2) {
    var b2 = a2._init;
    return b2(a2._payload);
  }
  function Og(a2) {
    function b2(b3, c2) {
      if (a2) {
        var d3 = b3.deletions;
        null === d3 ? (b3.deletions = [c2], b3.flags |= 16) : d3.push(c2);
      }
    }
    function c(c2, d3) {
      if (!a2) return null;
      for (; null !== d3; ) b2(c2, d3), d3 = d3.sibling;
      return null;
    }
    function d2(a3, b3) {
      for (a3 = /* @__PURE__ */ new Map(); null !== b3; ) null !== b3.key ? a3.set(b3.key, b3) : a3.set(b3.index, b3), b3 = b3.sibling;
      return a3;
    }
    function e2(a3, b3) {
      a3 = Pg(a3, b3);
      a3.index = 0;
      a3.sibling = null;
      return a3;
    }
    function f2(b3, c2, d3) {
      b3.index = d3;
      if (!a2) return b3.flags |= 1048576, c2;
      d3 = b3.alternate;
      if (null !== d3) return d3 = d3.index, d3 < c2 ? (b3.flags |= 2, c2) : d3;
      b3.flags |= 2;
      return c2;
    }
    function g2(b3) {
      a2 && null === b3.alternate && (b3.flags |= 2);
      return b3;
    }
    function h2(a3, b3, c2, d3) {
      if (null === b3 || 6 !== b3.tag) return b3 = Qg(c2, a3.mode, d3), b3.return = a3, b3;
      b3 = e2(b3, c2);
      b3.return = a3;
      return b3;
    }
    function k2(a3, b3, c2, d3) {
      var f3 = c2.type;
      if (f3 === ya) return m2(a3, b3, c2.props.children, d3, c2.key);
      if (null !== b3 && (b3.elementType === f3 || "object" === typeof f3 && null !== f3 && f3.$$typeof === Ha && Ng(f3) === b3.type)) return d3 = e2(b3, c2.props), d3.ref = Lg(a3, b3, c2), d3.return = a3, d3;
      d3 = Rg(c2.type, c2.key, c2.props, null, a3.mode, d3);
      d3.ref = Lg(a3, b3, c2);
      d3.return = a3;
      return d3;
    }
    function l(a3, b3, c2, d3) {
      if (null === b3 || 4 !== b3.tag || b3.stateNode.containerInfo !== c2.containerInfo || b3.stateNode.implementation !== c2.implementation) return b3 = Sg(c2, a3.mode, d3), b3.return = a3, b3;
      b3 = e2(b3, c2.children || []);
      b3.return = a3;
      return b3;
    }
    function m2(a3, b3, c2, d3, f3) {
      if (null === b3 || 7 !== b3.tag) return b3 = Tg(c2, a3.mode, d3, f3), b3.return = a3, b3;
      b3 = e2(b3, c2);
      b3.return = a3;
      return b3;
    }
    function q2(a3, b3, c2) {
      if ("string" === typeof b3 && "" !== b3 || "number" === typeof b3) return b3 = Qg("" + b3, a3.mode, c2), b3.return = a3, b3;
      if ("object" === typeof b3 && null !== b3) {
        switch (b3.$$typeof) {
          case va:
            return c2 = Rg(b3.type, b3.key, b3.props, null, a3.mode, c2), c2.ref = Lg(a3, null, b3), c2.return = a3, c2;
          case wa:
            return b3 = Sg(b3, a3.mode, c2), b3.return = a3, b3;
          case Ha:
            var d3 = b3._init;
            return q2(a3, d3(b3._payload), c2);
        }
        if (eb(b3) || Ka(b3)) return b3 = Tg(b3, a3.mode, c2, null), b3.return = a3, b3;
        Mg(a3, b3);
      }
      return null;
    }
    function r2(a3, b3, c2, d3) {
      var e3 = null !== b3 ? b3.key : null;
      if ("string" === typeof c2 && "" !== c2 || "number" === typeof c2) return null !== e3 ? null : h2(a3, b3, "" + c2, d3);
      if ("object" === typeof c2 && null !== c2) {
        switch (c2.$$typeof) {
          case va:
            return c2.key === e3 ? k2(a3, b3, c2, d3) : null;
          case wa:
            return c2.key === e3 ? l(a3, b3, c2, d3) : null;
          case Ha:
            return e3 = c2._init, r2(
              a3,
              b3,
              e3(c2._payload),
              d3
            );
        }
        if (eb(c2) || Ka(c2)) return null !== e3 ? null : m2(a3, b3, c2, d3, null);
        Mg(a3, c2);
      }
      return null;
    }
    function y2(a3, b3, c2, d3, e3) {
      if ("string" === typeof d3 && "" !== d3 || "number" === typeof d3) return a3 = a3.get(c2) || null, h2(b3, a3, "" + d3, e3);
      if ("object" === typeof d3 && null !== d3) {
        switch (d3.$$typeof) {
          case va:
            return a3 = a3.get(null === d3.key ? c2 : d3.key) || null, k2(b3, a3, d3, e3);
          case wa:
            return a3 = a3.get(null === d3.key ? c2 : d3.key) || null, l(b3, a3, d3, e3);
          case Ha:
            var f3 = d3._init;
            return y2(a3, b3, c2, f3(d3._payload), e3);
        }
        if (eb(d3) || Ka(d3)) return a3 = a3.get(c2) || null, m2(b3, a3, d3, e3, null);
        Mg(b3, d3);
      }
      return null;
    }
    function n(e3, g3, h3, k3) {
      for (var l2 = null, m3 = null, u2 = g3, w = g3 = 0, x = null; null !== u2 && w < h3.length; w++) {
        u2.index > w ? (x = u2, u2 = null) : x = u2.sibling;
        var n2 = r2(e3, u2, h3[w], k3);
        if (null === n2) {
          null === u2 && (u2 = x);
          break;
        }
        a2 && u2 && null === n2.alternate && b2(e3, u2);
        g3 = f2(n2, g3, w);
        null === m3 ? l2 = n2 : m3.sibling = n2;
        m3 = n2;
        u2 = x;
      }
      if (w === h3.length) return c(e3, u2), I2 && tg(e3, w), l2;
      if (null === u2) {
        for (; w < h3.length; w++) u2 = q2(e3, h3[w], k3), null !== u2 && (g3 = f2(u2, g3, w), null === m3 ? l2 = u2 : m3.sibling = u2, m3 = u2);
        I2 && tg(e3, w);
        return l2;
      }
      for (u2 = d2(e3, u2); w < h3.length; w++) x = y2(u2, e3, w, h3[w], k3), null !== x && (a2 && null !== x.alternate && u2.delete(null === x.key ? w : x.key), g3 = f2(x, g3, w), null === m3 ? l2 = x : m3.sibling = x, m3 = x);
      a2 && u2.forEach(function(a3) {
        return b2(e3, a3);
      });
      I2 && tg(e3, w);
      return l2;
    }
    function t(e3, g3, h3, k3) {
      var l2 = Ka(h3);
      if ("function" !== typeof l2) throw Error(p2(150));
      h3 = l2.call(h3);
      if (null == h3) throw Error(p2(151));
      for (var u2 = l2 = null, m3 = g3, w = g3 = 0, x = null, n2 = h3.next(); null !== m3 && !n2.done; w++, n2 = h3.next()) {
        m3.index > w ? (x = m3, m3 = null) : x = m3.sibling;
        var t2 = r2(e3, m3, n2.value, k3);
        if (null === t2) {
          null === m3 && (m3 = x);
          break;
        }
        a2 && m3 && null === t2.alternate && b2(e3, m3);
        g3 = f2(t2, g3, w);
        null === u2 ? l2 = t2 : u2.sibling = t2;
        u2 = t2;
        m3 = x;
      }
      if (n2.done) return c(
        e3,
        m3
      ), I2 && tg(e3, w), l2;
      if (null === m3) {
        for (; !n2.done; w++, n2 = h3.next()) n2 = q2(e3, n2.value, k3), null !== n2 && (g3 = f2(n2, g3, w), null === u2 ? l2 = n2 : u2.sibling = n2, u2 = n2);
        I2 && tg(e3, w);
        return l2;
      }
      for (m3 = d2(e3, m3); !n2.done; w++, n2 = h3.next()) n2 = y2(m3, e3, w, n2.value, k3), null !== n2 && (a2 && null !== n2.alternate && m3.delete(null === n2.key ? w : n2.key), g3 = f2(n2, g3, w), null === u2 ? l2 = n2 : u2.sibling = n2, u2 = n2);
      a2 && m3.forEach(function(a3) {
        return b2(e3, a3);
      });
      I2 && tg(e3, w);
      return l2;
    }
    function J(a3, d3, f3, h3) {
      "object" === typeof f3 && null !== f3 && f3.type === ya && null === f3.key && (f3 = f3.props.children);
      if ("object" === typeof f3 && null !== f3) {
        switch (f3.$$typeof) {
          case va:
            a: {
              for (var k3 = f3.key, l2 = d3; null !== l2; ) {
                if (l2.key === k3) {
                  k3 = f3.type;
                  if (k3 === ya) {
                    if (7 === l2.tag) {
                      c(a3, l2.sibling);
                      d3 = e2(l2, f3.props.children);
                      d3.return = a3;
                      a3 = d3;
                      break a;
                    }
                  } else if (l2.elementType === k3 || "object" === typeof k3 && null !== k3 && k3.$$typeof === Ha && Ng(k3) === l2.type) {
                    c(a3, l2.sibling);
                    d3 = e2(l2, f3.props);
                    d3.ref = Lg(a3, l2, f3);
                    d3.return = a3;
                    a3 = d3;
                    break a;
                  }
                  c(a3, l2);
                  break;
                } else b2(a3, l2);
                l2 = l2.sibling;
              }
              f3.type === ya ? (d3 = Tg(f3.props.children, a3.mode, h3, f3.key), d3.return = a3, a3 = d3) : (h3 = Rg(f3.type, f3.key, f3.props, null, a3.mode, h3), h3.ref = Lg(a3, d3, f3), h3.return = a3, a3 = h3);
            }
            return g2(a3);
          case wa:
            a: {
              for (l2 = f3.key; null !== d3; ) {
                if (d3.key === l2) if (4 === d3.tag && d3.stateNode.containerInfo === f3.containerInfo && d3.stateNode.implementation === f3.implementation) {
                  c(a3, d3.sibling);
                  d3 = e2(d3, f3.children || []);
                  d3.return = a3;
                  a3 = d3;
                  break a;
                } else {
                  c(a3, d3);
                  break;
                }
                else b2(a3, d3);
                d3 = d3.sibling;
              }
              d3 = Sg(f3, a3.mode, h3);
              d3.return = a3;
              a3 = d3;
            }
            return g2(a3);
          case Ha:
            return l2 = f3._init, J(a3, d3, l2(f3._payload), h3);
        }
        if (eb(f3)) return n(a3, d3, f3, h3);
        if (Ka(f3)) return t(a3, d3, f3, h3);
        Mg(a3, f3);
      }
      return "string" === typeof f3 && "" !== f3 || "number" === typeof f3 ? (f3 = "" + f3, null !== d3 && 6 === d3.tag ? (c(a3, d3.sibling), d3 = e2(d3, f3), d3.return = a3, a3 = d3) : (c(a3, d3), d3 = Qg(f3, a3.mode, h3), d3.return = a3, a3 = d3), g2(a3)) : c(a3, d3);
    }
    return J;
  }
  var Ug = Og(true), Vg = Og(false), Wg = Uf(null), Xg = null, Yg = null, Zg = null;
  function $g() {
    Zg = Yg = Xg = null;
  }
  function ah(a2) {
    var b2 = Wg.current;
    E2(Wg);
    a2._currentValue = b2;
  }
  function bh(a2, b2, c) {
    for (; null !== a2; ) {
      var d2 = a2.alternate;
      (a2.childLanes & b2) !== b2 ? (a2.childLanes |= b2, null !== d2 && (d2.childLanes |= b2)) : null !== d2 && (d2.childLanes & b2) !== b2 && (d2.childLanes |= b2);
      if (a2 === c) break;
      a2 = a2.return;
    }
  }
  function ch(a2, b2) {
    Xg = a2;
    Zg = Yg = null;
    a2 = a2.dependencies;
    null !== a2 && null !== a2.firstContext && (0 !== (a2.lanes & b2) && (dh = true), a2.firstContext = null);
  }
  function eh(a2) {
    var b2 = a2._currentValue;
    if (Zg !== a2) if (a2 = { context: a2, memoizedValue: b2, next: null }, null === Yg) {
      if (null === Xg) throw Error(p2(308));
      Yg = a2;
      Xg.dependencies = { lanes: 0, firstContext: a2 };
    } else Yg = Yg.next = a2;
    return b2;
  }
  var fh = null;
  function gh(a2) {
    null === fh ? fh = [a2] : fh.push(a2);
  }
  function hh(a2, b2, c, d2) {
    var e2 = b2.interleaved;
    null === e2 ? (c.next = c, gh(b2)) : (c.next = e2.next, e2.next = c);
    b2.interleaved = c;
    return ih(a2, d2);
  }
  function ih(a2, b2) {
    a2.lanes |= b2;
    var c = a2.alternate;
    null !== c && (c.lanes |= b2);
    c = a2;
    for (a2 = a2.return; null !== a2; ) a2.childLanes |= b2, c = a2.alternate, null !== c && (c.childLanes |= b2), c = a2, a2 = a2.return;
    return 3 === c.tag ? c.stateNode : null;
  }
  var jh = false;
  function kh(a2) {
    a2.updateQueue = { baseState: a2.memoizedState, firstBaseUpdate: null, lastBaseUpdate: null, shared: { pending: null, interleaved: null, lanes: 0 }, effects: null };
  }
  function lh(a2, b2) {
    a2 = a2.updateQueue;
    b2.updateQueue === a2 && (b2.updateQueue = { baseState: a2.baseState, firstBaseUpdate: a2.firstBaseUpdate, lastBaseUpdate: a2.lastBaseUpdate, shared: a2.shared, effects: a2.effects });
  }
  function mh(a2, b2) {
    return { eventTime: a2, lane: b2, tag: 0, payload: null, callback: null, next: null };
  }
  function nh(a2, b2, c) {
    var d2 = a2.updateQueue;
    if (null === d2) return null;
    d2 = d2.shared;
    if (0 !== (K & 2)) {
      var e2 = d2.pending;
      null === e2 ? b2.next = b2 : (b2.next = e2.next, e2.next = b2);
      d2.pending = b2;
      return ih(a2, c);
    }
    e2 = d2.interleaved;
    null === e2 ? (b2.next = b2, gh(d2)) : (b2.next = e2.next, e2.next = b2);
    d2.interleaved = b2;
    return ih(a2, c);
  }
  function oh(a2, b2, c) {
    b2 = b2.updateQueue;
    if (null !== b2 && (b2 = b2.shared, 0 !== (c & 4194240))) {
      var d2 = b2.lanes;
      d2 &= a2.pendingLanes;
      c |= d2;
      b2.lanes = c;
      Cc(a2, c);
    }
  }
  function ph(a2, b2) {
    var c = a2.updateQueue, d2 = a2.alternate;
    if (null !== d2 && (d2 = d2.updateQueue, c === d2)) {
      var e2 = null, f2 = null;
      c = c.firstBaseUpdate;
      if (null !== c) {
        do {
          var g2 = { eventTime: c.eventTime, lane: c.lane, tag: c.tag, payload: c.payload, callback: c.callback, next: null };
          null === f2 ? e2 = f2 = g2 : f2 = f2.next = g2;
          c = c.next;
        } while (null !== c);
        null === f2 ? e2 = f2 = b2 : f2 = f2.next = b2;
      } else e2 = f2 = b2;
      c = { baseState: d2.baseState, firstBaseUpdate: e2, lastBaseUpdate: f2, shared: d2.shared, effects: d2.effects };
      a2.updateQueue = c;
      return;
    }
    a2 = c.lastBaseUpdate;
    null === a2 ? c.firstBaseUpdate = b2 : a2.next = b2;
    c.lastBaseUpdate = b2;
  }
  function qh(a2, b2, c, d2) {
    var e2 = a2.updateQueue;
    jh = false;
    var f2 = e2.firstBaseUpdate, g2 = e2.lastBaseUpdate, h2 = e2.shared.pending;
    if (null !== h2) {
      e2.shared.pending = null;
      var k2 = h2, l = k2.next;
      k2.next = null;
      null === g2 ? f2 = l : g2.next = l;
      g2 = k2;
      var m2 = a2.alternate;
      null !== m2 && (m2 = m2.updateQueue, h2 = m2.lastBaseUpdate, h2 !== g2 && (null === h2 ? m2.firstBaseUpdate = l : h2.next = l, m2.lastBaseUpdate = k2));
    }
    if (null !== f2) {
      var q2 = e2.baseState;
      g2 = 0;
      m2 = l = k2 = null;
      h2 = f2;
      do {
        var r2 = h2.lane, y2 = h2.eventTime;
        if ((d2 & r2) === r2) {
          null !== m2 && (m2 = m2.next = {
            eventTime: y2,
            lane: 0,
            tag: h2.tag,
            payload: h2.payload,
            callback: h2.callback,
            next: null
          });
          a: {
            var n = a2, t = h2;
            r2 = b2;
            y2 = c;
            switch (t.tag) {
              case 1:
                n = t.payload;
                if ("function" === typeof n) {
                  q2 = n.call(y2, q2, r2);
                  break a;
                }
                q2 = n;
                break a;
              case 3:
                n.flags = n.flags & -65537 | 128;
              case 0:
                n = t.payload;
                r2 = "function" === typeof n ? n.call(y2, q2, r2) : n;
                if (null === r2 || void 0 === r2) break a;
                q2 = A2({}, q2, r2);
                break a;
              case 2:
                jh = true;
            }
          }
          null !== h2.callback && 0 !== h2.lane && (a2.flags |= 64, r2 = e2.effects, null === r2 ? e2.effects = [h2] : r2.push(h2));
        } else y2 = { eventTime: y2, lane: r2, tag: h2.tag, payload: h2.payload, callback: h2.callback, next: null }, null === m2 ? (l = m2 = y2, k2 = q2) : m2 = m2.next = y2, g2 |= r2;
        h2 = h2.next;
        if (null === h2) if (h2 = e2.shared.pending, null === h2) break;
        else r2 = h2, h2 = r2.next, r2.next = null, e2.lastBaseUpdate = r2, e2.shared.pending = null;
      } while (1);
      null === m2 && (k2 = q2);
      e2.baseState = k2;
      e2.firstBaseUpdate = l;
      e2.lastBaseUpdate = m2;
      b2 = e2.shared.interleaved;
      if (null !== b2) {
        e2 = b2;
        do
          g2 |= e2.lane, e2 = e2.next;
        while (e2 !== b2);
      } else null === f2 && (e2.shared.lanes = 0);
      rh |= g2;
      a2.lanes = g2;
      a2.memoizedState = q2;
    }
  }
  function sh(a2, b2, c) {
    a2 = b2.effects;
    b2.effects = null;
    if (null !== a2) for (b2 = 0; b2 < a2.length; b2++) {
      var d2 = a2[b2], e2 = d2.callback;
      if (null !== e2) {
        d2.callback = null;
        d2 = c;
        if ("function" !== typeof e2) throw Error(p2(191, e2));
        e2.call(d2);
      }
    }
  }
  var th = {}, uh = Uf(th), vh = Uf(th), wh = Uf(th);
  function xh(a2) {
    if (a2 === th) throw Error(p2(174));
    return a2;
  }
  function yh(a2, b2) {
    G(wh, b2);
    G(vh, a2);
    G(uh, th);
    a2 = b2.nodeType;
    switch (a2) {
      case 9:
      case 11:
        b2 = (b2 = b2.documentElement) ? b2.namespaceURI : lb(null, "");
        break;
      default:
        a2 = 8 === a2 ? b2.parentNode : b2, b2 = a2.namespaceURI || null, a2 = a2.tagName, b2 = lb(b2, a2);
    }
    E2(uh);
    G(uh, b2);
  }
  function zh() {
    E2(uh);
    E2(vh);
    E2(wh);
  }
  function Ah(a2) {
    xh(wh.current);
    var b2 = xh(uh.current);
    var c = lb(b2, a2.type);
    b2 !== c && (G(vh, a2), G(uh, c));
  }
  function Bh(a2) {
    vh.current === a2 && (E2(uh), E2(vh));
  }
  var L2 = Uf(0);
  function Ch(a2) {
    for (var b2 = a2; null !== b2; ) {
      if (13 === b2.tag) {
        var c = b2.memoizedState;
        if (null !== c && (c = c.dehydrated, null === c || "$?" === c.data || "$!" === c.data)) return b2;
      } else if (19 === b2.tag && void 0 !== b2.memoizedProps.revealOrder) {
        if (0 !== (b2.flags & 128)) return b2;
      } else if (null !== b2.child) {
        b2.child.return = b2;
        b2 = b2.child;
        continue;
      }
      if (b2 === a2) break;
      for (; null === b2.sibling; ) {
        if (null === b2.return || b2.return === a2) return null;
        b2 = b2.return;
      }
      b2.sibling.return = b2.return;
      b2 = b2.sibling;
    }
    return null;
  }
  var Dh = [];
  function Eh() {
    for (var a2 = 0; a2 < Dh.length; a2++) Dh[a2]._workInProgressVersionPrimary = null;
    Dh.length = 0;
  }
  var Fh = ua.ReactCurrentDispatcher, Gh = ua.ReactCurrentBatchConfig, Hh = 0, M2 = null, N2 = null, O2 = null, Ih = false, Jh = false, Kh = 0, Lh = 0;
  function P2() {
    throw Error(p2(321));
  }
  function Mh(a2, b2) {
    if (null === b2) return false;
    for (var c = 0; c < b2.length && c < a2.length; c++) if (!He(a2[c], b2[c])) return false;
    return true;
  }
  function Nh(a2, b2, c, d2, e2, f2) {
    Hh = f2;
    M2 = b2;
    b2.memoizedState = null;
    b2.updateQueue = null;
    b2.lanes = 0;
    Fh.current = null === a2 || null === a2.memoizedState ? Oh : Ph;
    a2 = c(d2, e2);
    if (Jh) {
      f2 = 0;
      do {
        Jh = false;
        Kh = 0;
        if (25 <= f2) throw Error(p2(301));
        f2 += 1;
        O2 = N2 = null;
        b2.updateQueue = null;
        Fh.current = Qh;
        a2 = c(d2, e2);
      } while (Jh);
    }
    Fh.current = Rh;
    b2 = null !== N2 && null !== N2.next;
    Hh = 0;
    O2 = N2 = M2 = null;
    Ih = false;
    if (b2) throw Error(p2(300));
    return a2;
  }
  function Sh() {
    var a2 = 0 !== Kh;
    Kh = 0;
    return a2;
  }
  function Th() {
    var a2 = { memoizedState: null, baseState: null, baseQueue: null, queue: null, next: null };
    null === O2 ? M2.memoizedState = O2 = a2 : O2 = O2.next = a2;
    return O2;
  }
  function Uh() {
    if (null === N2) {
      var a2 = M2.alternate;
      a2 = null !== a2 ? a2.memoizedState : null;
    } else a2 = N2.next;
    var b2 = null === O2 ? M2.memoizedState : O2.next;
    if (null !== b2) O2 = b2, N2 = a2;
    else {
      if (null === a2) throw Error(p2(310));
      N2 = a2;
      a2 = { memoizedState: N2.memoizedState, baseState: N2.baseState, baseQueue: N2.baseQueue, queue: N2.queue, next: null };
      null === O2 ? M2.memoizedState = O2 = a2 : O2 = O2.next = a2;
    }
    return O2;
  }
  function Vh(a2, b2) {
    return "function" === typeof b2 ? b2(a2) : b2;
  }
  function Wh(a2) {
    var b2 = Uh(), c = b2.queue;
    if (null === c) throw Error(p2(311));
    c.lastRenderedReducer = a2;
    var d2 = N2, e2 = d2.baseQueue, f2 = c.pending;
    if (null !== f2) {
      if (null !== e2) {
        var g2 = e2.next;
        e2.next = f2.next;
        f2.next = g2;
      }
      d2.baseQueue = e2 = f2;
      c.pending = null;
    }
    if (null !== e2) {
      f2 = e2.next;
      d2 = d2.baseState;
      var h2 = g2 = null, k2 = null, l = f2;
      do {
        var m2 = l.lane;
        if ((Hh & m2) === m2) null !== k2 && (k2 = k2.next = { lane: 0, action: l.action, hasEagerState: l.hasEagerState, eagerState: l.eagerState, next: null }), d2 = l.hasEagerState ? l.eagerState : a2(d2, l.action);
        else {
          var q2 = {
            lane: m2,
            action: l.action,
            hasEagerState: l.hasEagerState,
            eagerState: l.eagerState,
            next: null
          };
          null === k2 ? (h2 = k2 = q2, g2 = d2) : k2 = k2.next = q2;
          M2.lanes |= m2;
          rh |= m2;
        }
        l = l.next;
      } while (null !== l && l !== f2);
      null === k2 ? g2 = d2 : k2.next = h2;
      He(d2, b2.memoizedState) || (dh = true);
      b2.memoizedState = d2;
      b2.baseState = g2;
      b2.baseQueue = k2;
      c.lastRenderedState = d2;
    }
    a2 = c.interleaved;
    if (null !== a2) {
      e2 = a2;
      do
        f2 = e2.lane, M2.lanes |= f2, rh |= f2, e2 = e2.next;
      while (e2 !== a2);
    } else null === e2 && (c.lanes = 0);
    return [b2.memoizedState, c.dispatch];
  }
  function Xh(a2) {
    var b2 = Uh(), c = b2.queue;
    if (null === c) throw Error(p2(311));
    c.lastRenderedReducer = a2;
    var d2 = c.dispatch, e2 = c.pending, f2 = b2.memoizedState;
    if (null !== e2) {
      c.pending = null;
      var g2 = e2 = e2.next;
      do
        f2 = a2(f2, g2.action), g2 = g2.next;
      while (g2 !== e2);
      He(f2, b2.memoizedState) || (dh = true);
      b2.memoizedState = f2;
      null === b2.baseQueue && (b2.baseState = f2);
      c.lastRenderedState = f2;
    }
    return [f2, d2];
  }
  function Yh() {
  }
  function Zh(a2, b2) {
    var c = M2, d2 = Uh(), e2 = b2(), f2 = !He(d2.memoizedState, e2);
    f2 && (d2.memoizedState = e2, dh = true);
    d2 = d2.queue;
    $h(ai.bind(null, c, d2, a2), [a2]);
    if (d2.getSnapshot !== b2 || f2 || null !== O2 && O2.memoizedState.tag & 1) {
      c.flags |= 2048;
      bi(9, ci.bind(null, c, d2, e2, b2), void 0, null);
      if (null === Q2) throw Error(p2(349));
      0 !== (Hh & 30) || di(c, b2, e2);
    }
    return e2;
  }
  function di(a2, b2, c) {
    a2.flags |= 16384;
    a2 = { getSnapshot: b2, value: c };
    b2 = M2.updateQueue;
    null === b2 ? (b2 = { lastEffect: null, stores: null }, M2.updateQueue = b2, b2.stores = [a2]) : (c = b2.stores, null === c ? b2.stores = [a2] : c.push(a2));
  }
  function ci(a2, b2, c, d2) {
    b2.value = c;
    b2.getSnapshot = d2;
    ei(b2) && fi(a2);
  }
  function ai(a2, b2, c) {
    return c(function() {
      ei(b2) && fi(a2);
    });
  }
  function ei(a2) {
    var b2 = a2.getSnapshot;
    a2 = a2.value;
    try {
      var c = b2();
      return !He(a2, c);
    } catch (d2) {
      return true;
    }
  }
  function fi(a2) {
    var b2 = ih(a2, 1);
    null !== b2 && gi(b2, a2, 1, -1);
  }
  function hi(a2) {
    var b2 = Th();
    "function" === typeof a2 && (a2 = a2());
    b2.memoizedState = b2.baseState = a2;
    a2 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: Vh, lastRenderedState: a2 };
    b2.queue = a2;
    a2 = a2.dispatch = ii.bind(null, M2, a2);
    return [b2.memoizedState, a2];
  }
  function bi(a2, b2, c, d2) {
    a2 = { tag: a2, create: b2, destroy: c, deps: d2, next: null };
    b2 = M2.updateQueue;
    null === b2 ? (b2 = { lastEffect: null, stores: null }, M2.updateQueue = b2, b2.lastEffect = a2.next = a2) : (c = b2.lastEffect, null === c ? b2.lastEffect = a2.next = a2 : (d2 = c.next, c.next = a2, a2.next = d2, b2.lastEffect = a2));
    return a2;
  }
  function ji() {
    return Uh().memoizedState;
  }
  function ki(a2, b2, c, d2) {
    var e2 = Th();
    M2.flags |= a2;
    e2.memoizedState = bi(1 | b2, c, void 0, void 0 === d2 ? null : d2);
  }
  function li(a2, b2, c, d2) {
    var e2 = Uh();
    d2 = void 0 === d2 ? null : d2;
    var f2 = void 0;
    if (null !== N2) {
      var g2 = N2.memoizedState;
      f2 = g2.destroy;
      if (null !== d2 && Mh(d2, g2.deps)) {
        e2.memoizedState = bi(b2, c, f2, d2);
        return;
      }
    }
    M2.flags |= a2;
    e2.memoizedState = bi(1 | b2, c, f2, d2);
  }
  function mi(a2, b2) {
    return ki(8390656, 8, a2, b2);
  }
  function $h(a2, b2) {
    return li(2048, 8, a2, b2);
  }
  function ni(a2, b2) {
    return li(4, 2, a2, b2);
  }
  function oi(a2, b2) {
    return li(4, 4, a2, b2);
  }
  function pi(a2, b2) {
    if ("function" === typeof b2) return a2 = a2(), b2(a2), function() {
      b2(null);
    };
    if (null !== b2 && void 0 !== b2) return a2 = a2(), b2.current = a2, function() {
      b2.current = null;
    };
  }
  function qi(a2, b2, c) {
    c = null !== c && void 0 !== c ? c.concat([a2]) : null;
    return li(4, 4, pi.bind(null, b2, a2), c);
  }
  function ri() {
  }
  function si(a2, b2) {
    var c = Uh();
    b2 = void 0 === b2 ? null : b2;
    var d2 = c.memoizedState;
    if (null !== d2 && null !== b2 && Mh(b2, d2[1])) return d2[0];
    c.memoizedState = [a2, b2];
    return a2;
  }
  function ti(a2, b2) {
    var c = Uh();
    b2 = void 0 === b2 ? null : b2;
    var d2 = c.memoizedState;
    if (null !== d2 && null !== b2 && Mh(b2, d2[1])) return d2[0];
    a2 = a2();
    c.memoizedState = [a2, b2];
    return a2;
  }
  function ui(a2, b2, c) {
    if (0 === (Hh & 21)) return a2.baseState && (a2.baseState = false, dh = true), a2.memoizedState = c;
    He(c, b2) || (c = yc(), M2.lanes |= c, rh |= c, a2.baseState = true);
    return b2;
  }
  function vi(a2, b2) {
    var c = C2;
    C2 = 0 !== c && 4 > c ? c : 4;
    a2(true);
    var d2 = Gh.transition;
    Gh.transition = {};
    try {
      a2(false), b2();
    } finally {
      C2 = c, Gh.transition = d2;
    }
  }
  function wi() {
    return Uh().memoizedState;
  }
  function xi(a2, b2, c) {
    var d2 = yi(a2);
    c = { lane: d2, action: c, hasEagerState: false, eagerState: null, next: null };
    if (zi(a2)) Ai(b2, c);
    else if (c = hh(a2, b2, c, d2), null !== c) {
      var e2 = R2();
      gi(c, a2, d2, e2);
      Bi(c, b2, d2);
    }
  }
  function ii(a2, b2, c) {
    var d2 = yi(a2), e2 = { lane: d2, action: c, hasEagerState: false, eagerState: null, next: null };
    if (zi(a2)) Ai(b2, e2);
    else {
      var f2 = a2.alternate;
      if (0 === a2.lanes && (null === f2 || 0 === f2.lanes) && (f2 = b2.lastRenderedReducer, null !== f2)) try {
        var g2 = b2.lastRenderedState, h2 = f2(g2, c);
        e2.hasEagerState = true;
        e2.eagerState = h2;
        if (He(h2, g2)) {
          var k2 = b2.interleaved;
          null === k2 ? (e2.next = e2, gh(b2)) : (e2.next = k2.next, k2.next = e2);
          b2.interleaved = e2;
          return;
        }
      } catch (l) {
      } finally {
      }
      c = hh(a2, b2, e2, d2);
      null !== c && (e2 = R2(), gi(c, a2, d2, e2), Bi(c, b2, d2));
    }
  }
  function zi(a2) {
    var b2 = a2.alternate;
    return a2 === M2 || null !== b2 && b2 === M2;
  }
  function Ai(a2, b2) {
    Jh = Ih = true;
    var c = a2.pending;
    null === c ? b2.next = b2 : (b2.next = c.next, c.next = b2);
    a2.pending = b2;
  }
  function Bi(a2, b2, c) {
    if (0 !== (c & 4194240)) {
      var d2 = b2.lanes;
      d2 &= a2.pendingLanes;
      c |= d2;
      b2.lanes = c;
      Cc(a2, c);
    }
  }
  var Rh = { readContext: eh, useCallback: P2, useContext: P2, useEffect: P2, useImperativeHandle: P2, useInsertionEffect: P2, useLayoutEffect: P2, useMemo: P2, useReducer: P2, useRef: P2, useState: P2, useDebugValue: P2, useDeferredValue: P2, useTransition: P2, useMutableSource: P2, useSyncExternalStore: P2, useId: P2, unstable_isNewReconciler: false }, Oh = { readContext: eh, useCallback: function(a2, b2) {
    Th().memoizedState = [a2, void 0 === b2 ? null : b2];
    return a2;
  }, useContext: eh, useEffect: mi, useImperativeHandle: function(a2, b2, c) {
    c = null !== c && void 0 !== c ? c.concat([a2]) : null;
    return ki(
      4194308,
      4,
      pi.bind(null, b2, a2),
      c
    );
  }, useLayoutEffect: function(a2, b2) {
    return ki(4194308, 4, a2, b2);
  }, useInsertionEffect: function(a2, b2) {
    return ki(4, 2, a2, b2);
  }, useMemo: function(a2, b2) {
    var c = Th();
    b2 = void 0 === b2 ? null : b2;
    a2 = a2();
    c.memoizedState = [a2, b2];
    return a2;
  }, useReducer: function(a2, b2, c) {
    var d2 = Th();
    b2 = void 0 !== c ? c(b2) : b2;
    d2.memoizedState = d2.baseState = b2;
    a2 = { pending: null, interleaved: null, lanes: 0, dispatch: null, lastRenderedReducer: a2, lastRenderedState: b2 };
    d2.queue = a2;
    a2 = a2.dispatch = xi.bind(null, M2, a2);
    return [d2.memoizedState, a2];
  }, useRef: function(a2) {
    var b2 = Th();
    a2 = { current: a2 };
    return b2.memoizedState = a2;
  }, useState: hi, useDebugValue: ri, useDeferredValue: function(a2) {
    return Th().memoizedState = a2;
  }, useTransition: function() {
    var a2 = hi(false), b2 = a2[0];
    a2 = vi.bind(null, a2[1]);
    Th().memoizedState = a2;
    return [b2, a2];
  }, useMutableSource: function() {
  }, useSyncExternalStore: function(a2, b2, c) {
    var d2 = M2, e2 = Th();
    if (I2) {
      if (void 0 === c) throw Error(p2(407));
      c = c();
    } else {
      c = b2();
      if (null === Q2) throw Error(p2(349));
      0 !== (Hh & 30) || di(d2, b2, c);
    }
    e2.memoizedState = c;
    var f2 = { value: c, getSnapshot: b2 };
    e2.queue = f2;
    mi(ai.bind(
      null,
      d2,
      f2,
      a2
    ), [a2]);
    d2.flags |= 2048;
    bi(9, ci.bind(null, d2, f2, c, b2), void 0, null);
    return c;
  }, useId: function() {
    var a2 = Th(), b2 = Q2.identifierPrefix;
    if (I2) {
      var c = sg;
      var d2 = rg;
      c = (d2 & ~(1 << 32 - oc(d2) - 1)).toString(32) + c;
      b2 = ":" + b2 + "R" + c;
      c = Kh++;
      0 < c && (b2 += "H" + c.toString(32));
      b2 += ":";
    } else c = Lh++, b2 = ":" + b2 + "r" + c.toString(32) + ":";
    return a2.memoizedState = b2;
  }, unstable_isNewReconciler: false }, Ph = {
    readContext: eh,
    useCallback: si,
    useContext: eh,
    useEffect: $h,
    useImperativeHandle: qi,
    useInsertionEffect: ni,
    useLayoutEffect: oi,
    useMemo: ti,
    useReducer: Wh,
    useRef: ji,
    useState: function() {
      return Wh(Vh);
    },
    useDebugValue: ri,
    useDeferredValue: function(a2) {
      var b2 = Uh();
      return ui(b2, N2.memoizedState, a2);
    },
    useTransition: function() {
      var a2 = Wh(Vh)[0], b2 = Uh().memoizedState;
      return [a2, b2];
    },
    useMutableSource: Yh,
    useSyncExternalStore: Zh,
    useId: wi,
    unstable_isNewReconciler: false
  }, Qh = { readContext: eh, useCallback: si, useContext: eh, useEffect: $h, useImperativeHandle: qi, useInsertionEffect: ni, useLayoutEffect: oi, useMemo: ti, useReducer: Xh, useRef: ji, useState: function() {
    return Xh(Vh);
  }, useDebugValue: ri, useDeferredValue: function(a2) {
    var b2 = Uh();
    return null === N2 ? b2.memoizedState = a2 : ui(b2, N2.memoizedState, a2);
  }, useTransition: function() {
    var a2 = Xh(Vh)[0], b2 = Uh().memoizedState;
    return [a2, b2];
  }, useMutableSource: Yh, useSyncExternalStore: Zh, useId: wi, unstable_isNewReconciler: false };
  function Ci(a2, b2) {
    if (a2 && a2.defaultProps) {
      b2 = A2({}, b2);
      a2 = a2.defaultProps;
      for (var c in a2) void 0 === b2[c] && (b2[c] = a2[c]);
      return b2;
    }
    return b2;
  }
  function Di(a2, b2, c, d2) {
    b2 = a2.memoizedState;
    c = c(d2, b2);
    c = null === c || void 0 === c ? b2 : A2({}, b2, c);
    a2.memoizedState = c;
    0 === a2.lanes && (a2.updateQueue.baseState = c);
  }
  var Ei = { isMounted: function(a2) {
    return (a2 = a2._reactInternals) ? Vb(a2) === a2 : false;
  }, enqueueSetState: function(a2, b2, c) {
    a2 = a2._reactInternals;
    var d2 = R2(), e2 = yi(a2), f2 = mh(d2, e2);
    f2.payload = b2;
    void 0 !== c && null !== c && (f2.callback = c);
    b2 = nh(a2, f2, e2);
    null !== b2 && (gi(b2, a2, e2, d2), oh(b2, a2, e2));
  }, enqueueReplaceState: function(a2, b2, c) {
    a2 = a2._reactInternals;
    var d2 = R2(), e2 = yi(a2), f2 = mh(d2, e2);
    f2.tag = 1;
    f2.payload = b2;
    void 0 !== c && null !== c && (f2.callback = c);
    b2 = nh(a2, f2, e2);
    null !== b2 && (gi(b2, a2, e2, d2), oh(b2, a2, e2));
  }, enqueueForceUpdate: function(a2, b2) {
    a2 = a2._reactInternals;
    var c = R2(), d2 = yi(a2), e2 = mh(c, d2);
    e2.tag = 2;
    void 0 !== b2 && null !== b2 && (e2.callback = b2);
    b2 = nh(a2, e2, d2);
    null !== b2 && (gi(b2, a2, d2, c), oh(b2, a2, d2));
  } };
  function Fi(a2, b2, c, d2, e2, f2, g2) {
    a2 = a2.stateNode;
    return "function" === typeof a2.shouldComponentUpdate ? a2.shouldComponentUpdate(d2, f2, g2) : b2.prototype && b2.prototype.isPureReactComponent ? !Ie(c, d2) || !Ie(e2, f2) : true;
  }
  function Gi(a2, b2, c) {
    var d2 = false, e2 = Vf;
    var f2 = b2.contextType;
    "object" === typeof f2 && null !== f2 ? f2 = eh(f2) : (e2 = Zf(b2) ? Xf : H4.current, d2 = b2.contextTypes, f2 = (d2 = null !== d2 && void 0 !== d2) ? Yf(a2, e2) : Vf);
    b2 = new b2(c, f2);
    a2.memoizedState = null !== b2.state && void 0 !== b2.state ? b2.state : null;
    b2.updater = Ei;
    a2.stateNode = b2;
    b2._reactInternals = a2;
    d2 && (a2 = a2.stateNode, a2.__reactInternalMemoizedUnmaskedChildContext = e2, a2.__reactInternalMemoizedMaskedChildContext = f2);
    return b2;
  }
  function Hi(a2, b2, c, d2) {
    a2 = b2.state;
    "function" === typeof b2.componentWillReceiveProps && b2.componentWillReceiveProps(c, d2);
    "function" === typeof b2.UNSAFE_componentWillReceiveProps && b2.UNSAFE_componentWillReceiveProps(c, d2);
    b2.state !== a2 && Ei.enqueueReplaceState(b2, b2.state, null);
  }
  function Ii(a2, b2, c, d2) {
    var e2 = a2.stateNode;
    e2.props = c;
    e2.state = a2.memoizedState;
    e2.refs = {};
    kh(a2);
    var f2 = b2.contextType;
    "object" === typeof f2 && null !== f2 ? e2.context = eh(f2) : (f2 = Zf(b2) ? Xf : H4.current, e2.context = Yf(a2, f2));
    e2.state = a2.memoizedState;
    f2 = b2.getDerivedStateFromProps;
    "function" === typeof f2 && (Di(a2, b2, f2, c), e2.state = a2.memoizedState);
    "function" === typeof b2.getDerivedStateFromProps || "function" === typeof e2.getSnapshotBeforeUpdate || "function" !== typeof e2.UNSAFE_componentWillMount && "function" !== typeof e2.componentWillMount || (b2 = e2.state, "function" === typeof e2.componentWillMount && e2.componentWillMount(), "function" === typeof e2.UNSAFE_componentWillMount && e2.UNSAFE_componentWillMount(), b2 !== e2.state && Ei.enqueueReplaceState(e2, e2.state, null), qh(a2, c, e2, d2), e2.state = a2.memoizedState);
    "function" === typeof e2.componentDidMount && (a2.flags |= 4194308);
  }
  function Ji(a2, b2) {
    try {
      var c = "", d2 = b2;
      do
        c += Pa(d2), d2 = d2.return;
      while (d2);
      var e2 = c;
    } catch (f2) {
      e2 = "\nError generating stack: " + f2.message + "\n" + f2.stack;
    }
    return { value: a2, source: b2, stack: e2, digest: null };
  }
  function Ki(a2, b2, c) {
    return { value: a2, source: null, stack: null != c ? c : null, digest: null != b2 ? b2 : null };
  }
  function Li(a2, b2) {
    try {
      console.error(b2.value);
    } catch (c) {
      setTimeout(function() {
        throw c;
      });
    }
  }
  var Mi = "function" === typeof WeakMap ? WeakMap : Map;
  function Ni(a2, b2, c) {
    c = mh(-1, c);
    c.tag = 3;
    c.payload = { element: null };
    var d2 = b2.value;
    c.callback = function() {
      Oi || (Oi = true, Pi = d2);
      Li(a2, b2);
    };
    return c;
  }
  function Qi(a2, b2, c) {
    c = mh(-1, c);
    c.tag = 3;
    var d2 = a2.type.getDerivedStateFromError;
    if ("function" === typeof d2) {
      var e2 = b2.value;
      c.payload = function() {
        return d2(e2);
      };
      c.callback = function() {
        Li(a2, b2);
      };
    }
    var f2 = a2.stateNode;
    null !== f2 && "function" === typeof f2.componentDidCatch && (c.callback = function() {
      Li(a2, b2);
      "function" !== typeof d2 && (null === Ri ? Ri = /* @__PURE__ */ new Set([this]) : Ri.add(this));
      var c2 = b2.stack;
      this.componentDidCatch(b2.value, { componentStack: null !== c2 ? c2 : "" });
    });
    return c;
  }
  function Si(a2, b2, c) {
    var d2 = a2.pingCache;
    if (null === d2) {
      d2 = a2.pingCache = new Mi();
      var e2 = /* @__PURE__ */ new Set();
      d2.set(b2, e2);
    } else e2 = d2.get(b2), void 0 === e2 && (e2 = /* @__PURE__ */ new Set(), d2.set(b2, e2));
    e2.has(c) || (e2.add(c), a2 = Ti.bind(null, a2, b2, c), b2.then(a2, a2));
  }
  function Ui(a2) {
    do {
      var b2;
      if (b2 = 13 === a2.tag) b2 = a2.memoizedState, b2 = null !== b2 ? null !== b2.dehydrated ? true : false : true;
      if (b2) return a2;
      a2 = a2.return;
    } while (null !== a2);
    return null;
  }
  function Vi(a2, b2, c, d2, e2) {
    if (0 === (a2.mode & 1)) return a2 === b2 ? a2.flags |= 65536 : (a2.flags |= 128, c.flags |= 131072, c.flags &= -52805, 1 === c.tag && (null === c.alternate ? c.tag = 17 : (b2 = mh(-1, 1), b2.tag = 2, nh(c, b2, 1))), c.lanes |= 1), a2;
    a2.flags |= 65536;
    a2.lanes = e2;
    return a2;
  }
  var Wi = ua.ReactCurrentOwner, dh = false;
  function Xi(a2, b2, c, d2) {
    b2.child = null === a2 ? Vg(b2, null, c, d2) : Ug(b2, a2.child, c, d2);
  }
  function Yi(a2, b2, c, d2, e2) {
    c = c.render;
    var f2 = b2.ref;
    ch(b2, e2);
    d2 = Nh(a2, b2, c, d2, f2, e2);
    c = Sh();
    if (null !== a2 && !dh) return b2.updateQueue = a2.updateQueue, b2.flags &= -2053, a2.lanes &= ~e2, Zi(a2, b2, e2);
    I2 && c && vg(b2);
    b2.flags |= 1;
    Xi(a2, b2, d2, e2);
    return b2.child;
  }
  function $i(a2, b2, c, d2, e2) {
    if (null === a2) {
      var f2 = c.type;
      if ("function" === typeof f2 && !aj(f2) && void 0 === f2.defaultProps && null === c.compare && void 0 === c.defaultProps) return b2.tag = 15, b2.type = f2, bj(a2, b2, f2, d2, e2);
      a2 = Rg(c.type, null, d2, b2, b2.mode, e2);
      a2.ref = b2.ref;
      a2.return = b2;
      return b2.child = a2;
    }
    f2 = a2.child;
    if (0 === (a2.lanes & e2)) {
      var g2 = f2.memoizedProps;
      c = c.compare;
      c = null !== c ? c : Ie;
      if (c(g2, d2) && a2.ref === b2.ref) return Zi(a2, b2, e2);
    }
    b2.flags |= 1;
    a2 = Pg(f2, d2);
    a2.ref = b2.ref;
    a2.return = b2;
    return b2.child = a2;
  }
  function bj(a2, b2, c, d2, e2) {
    if (null !== a2) {
      var f2 = a2.memoizedProps;
      if (Ie(f2, d2) && a2.ref === b2.ref) if (dh = false, b2.pendingProps = d2 = f2, 0 !== (a2.lanes & e2)) 0 !== (a2.flags & 131072) && (dh = true);
      else return b2.lanes = a2.lanes, Zi(a2, b2, e2);
    }
    return cj(a2, b2, c, d2, e2);
  }
  function dj(a2, b2, c) {
    var d2 = b2.pendingProps, e2 = d2.children, f2 = null !== a2 ? a2.memoizedState : null;
    if ("hidden" === d2.mode) if (0 === (b2.mode & 1)) b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null }, G(ej, fj), fj |= c;
    else {
      if (0 === (c & 1073741824)) return a2 = null !== f2 ? f2.baseLanes | c : c, b2.lanes = b2.childLanes = 1073741824, b2.memoizedState = { baseLanes: a2, cachePool: null, transitions: null }, b2.updateQueue = null, G(ej, fj), fj |= a2, null;
      b2.memoizedState = { baseLanes: 0, cachePool: null, transitions: null };
      d2 = null !== f2 ? f2.baseLanes : c;
      G(ej, fj);
      fj |= d2;
    }
    else null !== f2 ? (d2 = f2.baseLanes | c, b2.memoizedState = null) : d2 = c, G(ej, fj), fj |= d2;
    Xi(a2, b2, e2, c);
    return b2.child;
  }
  function gj(a2, b2) {
    var c = b2.ref;
    if (null === a2 && null !== c || null !== a2 && a2.ref !== c) b2.flags |= 512, b2.flags |= 2097152;
  }
  function cj(a2, b2, c, d2, e2) {
    var f2 = Zf(c) ? Xf : H4.current;
    f2 = Yf(b2, f2);
    ch(b2, e2);
    c = Nh(a2, b2, c, d2, f2, e2);
    d2 = Sh();
    if (null !== a2 && !dh) return b2.updateQueue = a2.updateQueue, b2.flags &= -2053, a2.lanes &= ~e2, Zi(a2, b2, e2);
    I2 && d2 && vg(b2);
    b2.flags |= 1;
    Xi(a2, b2, c, e2);
    return b2.child;
  }
  function hj(a2, b2, c, d2, e2) {
    if (Zf(c)) {
      var f2 = true;
      cg(b2);
    } else f2 = false;
    ch(b2, e2);
    if (null === b2.stateNode) ij(a2, b2), Gi(b2, c, d2), Ii(b2, c, d2, e2), d2 = true;
    else if (null === a2) {
      var g2 = b2.stateNode, h2 = b2.memoizedProps;
      g2.props = h2;
      var k2 = g2.context, l = c.contextType;
      "object" === typeof l && null !== l ? l = eh(l) : (l = Zf(c) ? Xf : H4.current, l = Yf(b2, l));
      var m2 = c.getDerivedStateFromProps, q2 = "function" === typeof m2 || "function" === typeof g2.getSnapshotBeforeUpdate;
      q2 || "function" !== typeof g2.UNSAFE_componentWillReceiveProps && "function" !== typeof g2.componentWillReceiveProps || (h2 !== d2 || k2 !== l) && Hi(b2, g2, d2, l);
      jh = false;
      var r2 = b2.memoizedState;
      g2.state = r2;
      qh(b2, d2, g2, e2);
      k2 = b2.memoizedState;
      h2 !== d2 || r2 !== k2 || Wf.current || jh ? ("function" === typeof m2 && (Di(b2, c, m2, d2), k2 = b2.memoizedState), (h2 = jh || Fi(b2, c, h2, d2, r2, k2, l)) ? (q2 || "function" !== typeof g2.UNSAFE_componentWillMount && "function" !== typeof g2.componentWillMount || ("function" === typeof g2.componentWillMount && g2.componentWillMount(), "function" === typeof g2.UNSAFE_componentWillMount && g2.UNSAFE_componentWillMount()), "function" === typeof g2.componentDidMount && (b2.flags |= 4194308)) : ("function" === typeof g2.componentDidMount && (b2.flags |= 4194308), b2.memoizedProps = d2, b2.memoizedState = k2), g2.props = d2, g2.state = k2, g2.context = l, d2 = h2) : ("function" === typeof g2.componentDidMount && (b2.flags |= 4194308), d2 = false);
    } else {
      g2 = b2.stateNode;
      lh(a2, b2);
      h2 = b2.memoizedProps;
      l = b2.type === b2.elementType ? h2 : Ci(b2.type, h2);
      g2.props = l;
      q2 = b2.pendingProps;
      r2 = g2.context;
      k2 = c.contextType;
      "object" === typeof k2 && null !== k2 ? k2 = eh(k2) : (k2 = Zf(c) ? Xf : H4.current, k2 = Yf(b2, k2));
      var y2 = c.getDerivedStateFromProps;
      (m2 = "function" === typeof y2 || "function" === typeof g2.getSnapshotBeforeUpdate) || "function" !== typeof g2.UNSAFE_componentWillReceiveProps && "function" !== typeof g2.componentWillReceiveProps || (h2 !== q2 || r2 !== k2) && Hi(b2, g2, d2, k2);
      jh = false;
      r2 = b2.memoizedState;
      g2.state = r2;
      qh(b2, d2, g2, e2);
      var n = b2.memoizedState;
      h2 !== q2 || r2 !== n || Wf.current || jh ? ("function" === typeof y2 && (Di(b2, c, y2, d2), n = b2.memoizedState), (l = jh || Fi(b2, c, l, d2, r2, n, k2) || false) ? (m2 || "function" !== typeof g2.UNSAFE_componentWillUpdate && "function" !== typeof g2.componentWillUpdate || ("function" === typeof g2.componentWillUpdate && g2.componentWillUpdate(d2, n, k2), "function" === typeof g2.UNSAFE_componentWillUpdate && g2.UNSAFE_componentWillUpdate(d2, n, k2)), "function" === typeof g2.componentDidUpdate && (b2.flags |= 4), "function" === typeof g2.getSnapshotBeforeUpdate && (b2.flags |= 1024)) : ("function" !== typeof g2.componentDidUpdate || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 1024), b2.memoizedProps = d2, b2.memoizedState = n), g2.props = d2, g2.state = n, g2.context = k2, d2 = l) : ("function" !== typeof g2.componentDidUpdate || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 4), "function" !== typeof g2.getSnapshotBeforeUpdate || h2 === a2.memoizedProps && r2 === a2.memoizedState || (b2.flags |= 1024), d2 = false);
    }
    return jj(a2, b2, c, d2, f2, e2);
  }
  function jj(a2, b2, c, d2, e2, f2) {
    gj(a2, b2);
    var g2 = 0 !== (b2.flags & 128);
    if (!d2 && !g2) return e2 && dg(b2, c, false), Zi(a2, b2, f2);
    d2 = b2.stateNode;
    Wi.current = b2;
    var h2 = g2 && "function" !== typeof c.getDerivedStateFromError ? null : d2.render();
    b2.flags |= 1;
    null !== a2 && g2 ? (b2.child = Ug(b2, a2.child, null, f2), b2.child = Ug(b2, null, h2, f2)) : Xi(a2, b2, h2, f2);
    b2.memoizedState = d2.state;
    e2 && dg(b2, c, true);
    return b2.child;
  }
  function kj(a2) {
    var b2 = a2.stateNode;
    b2.pendingContext ? ag(a2, b2.pendingContext, b2.pendingContext !== b2.context) : b2.context && ag(a2, b2.context, false);
    yh(a2, b2.containerInfo);
  }
  function lj(a2, b2, c, d2, e2) {
    Ig();
    Jg(e2);
    b2.flags |= 256;
    Xi(a2, b2, c, d2);
    return b2.child;
  }
  var mj = { dehydrated: null, treeContext: null, retryLane: 0 };
  function nj(a2) {
    return { baseLanes: a2, cachePool: null, transitions: null };
  }
  function oj(a2, b2, c) {
    var d2 = b2.pendingProps, e2 = L2.current, f2 = false, g2 = 0 !== (b2.flags & 128), h2;
    (h2 = g2) || (h2 = null !== a2 && null === a2.memoizedState ? false : 0 !== (e2 & 2));
    if (h2) f2 = true, b2.flags &= -129;
    else if (null === a2 || null !== a2.memoizedState) e2 |= 1;
    G(L2, e2 & 1);
    if (null === a2) {
      Eg(b2);
      a2 = b2.memoizedState;
      if (null !== a2 && (a2 = a2.dehydrated, null !== a2)) return 0 === (b2.mode & 1) ? b2.lanes = 1 : "$!" === a2.data ? b2.lanes = 8 : b2.lanes = 1073741824, null;
      g2 = d2.children;
      a2 = d2.fallback;
      return f2 ? (d2 = b2.mode, f2 = b2.child, g2 = { mode: "hidden", children: g2 }, 0 === (d2 & 1) && null !== f2 ? (f2.childLanes = 0, f2.pendingProps = g2) : f2 = pj(g2, d2, 0, null), a2 = Tg(a2, d2, c, null), f2.return = b2, a2.return = b2, f2.sibling = a2, b2.child = f2, b2.child.memoizedState = nj(c), b2.memoizedState = mj, a2) : qj(b2, g2);
    }
    e2 = a2.memoizedState;
    if (null !== e2 && (h2 = e2.dehydrated, null !== h2)) return rj(a2, b2, g2, d2, h2, e2, c);
    if (f2) {
      f2 = d2.fallback;
      g2 = b2.mode;
      e2 = a2.child;
      h2 = e2.sibling;
      var k2 = { mode: "hidden", children: d2.children };
      0 === (g2 & 1) && b2.child !== e2 ? (d2 = b2.child, d2.childLanes = 0, d2.pendingProps = k2, b2.deletions = null) : (d2 = Pg(e2, k2), d2.subtreeFlags = e2.subtreeFlags & 14680064);
      null !== h2 ? f2 = Pg(h2, f2) : (f2 = Tg(f2, g2, c, null), f2.flags |= 2);
      f2.return = b2;
      d2.return = b2;
      d2.sibling = f2;
      b2.child = d2;
      d2 = f2;
      f2 = b2.child;
      g2 = a2.child.memoizedState;
      g2 = null === g2 ? nj(c) : { baseLanes: g2.baseLanes | c, cachePool: null, transitions: g2.transitions };
      f2.memoizedState = g2;
      f2.childLanes = a2.childLanes & ~c;
      b2.memoizedState = mj;
      return d2;
    }
    f2 = a2.child;
    a2 = f2.sibling;
    d2 = Pg(f2, { mode: "visible", children: d2.children });
    0 === (b2.mode & 1) && (d2.lanes = c);
    d2.return = b2;
    d2.sibling = null;
    null !== a2 && (c = b2.deletions, null === c ? (b2.deletions = [a2], b2.flags |= 16) : c.push(a2));
    b2.child = d2;
    b2.memoizedState = null;
    return d2;
  }
  function qj(a2, b2) {
    b2 = pj({ mode: "visible", children: b2 }, a2.mode, 0, null);
    b2.return = a2;
    return a2.child = b2;
  }
  function sj(a2, b2, c, d2) {
    null !== d2 && Jg(d2);
    Ug(b2, a2.child, null, c);
    a2 = qj(b2, b2.pendingProps.children);
    a2.flags |= 2;
    b2.memoizedState = null;
    return a2;
  }
  function rj(a2, b2, c, d2, e2, f2, g2) {
    if (c) {
      if (b2.flags & 256) return b2.flags &= -257, d2 = Ki(Error(p2(422))), sj(a2, b2, g2, d2);
      if (null !== b2.memoizedState) return b2.child = a2.child, b2.flags |= 128, null;
      f2 = d2.fallback;
      e2 = b2.mode;
      d2 = pj({ mode: "visible", children: d2.children }, e2, 0, null);
      f2 = Tg(f2, e2, g2, null);
      f2.flags |= 2;
      d2.return = b2;
      f2.return = b2;
      d2.sibling = f2;
      b2.child = d2;
      0 !== (b2.mode & 1) && Ug(b2, a2.child, null, g2);
      b2.child.memoizedState = nj(g2);
      b2.memoizedState = mj;
      return f2;
    }
    if (0 === (b2.mode & 1)) return sj(a2, b2, g2, null);
    if ("$!" === e2.data) {
      d2 = e2.nextSibling && e2.nextSibling.dataset;
      if (d2) var h2 = d2.dgst;
      d2 = h2;
      f2 = Error(p2(419));
      d2 = Ki(f2, d2, void 0);
      return sj(a2, b2, g2, d2);
    }
    h2 = 0 !== (g2 & a2.childLanes);
    if (dh || h2) {
      d2 = Q2;
      if (null !== d2) {
        switch (g2 & -g2) {
          case 4:
            e2 = 2;
            break;
          case 16:
            e2 = 8;
            break;
          case 64:
          case 128:
          case 256:
          case 512:
          case 1024:
          case 2048:
          case 4096:
          case 8192:
          case 16384:
          case 32768:
          case 65536:
          case 131072:
          case 262144:
          case 524288:
          case 1048576:
          case 2097152:
          case 4194304:
          case 8388608:
          case 16777216:
          case 33554432:
          case 67108864:
            e2 = 32;
            break;
          case 536870912:
            e2 = 268435456;
            break;
          default:
            e2 = 0;
        }
        e2 = 0 !== (e2 & (d2.suspendedLanes | g2)) ? 0 : e2;
        0 !== e2 && e2 !== f2.retryLane && (f2.retryLane = e2, ih(a2, e2), gi(d2, a2, e2, -1));
      }
      tj();
      d2 = Ki(Error(p2(421)));
      return sj(a2, b2, g2, d2);
    }
    if ("$?" === e2.data) return b2.flags |= 128, b2.child = a2.child, b2 = uj.bind(null, a2), e2._reactRetry = b2, null;
    a2 = f2.treeContext;
    yg = Lf(e2.nextSibling);
    xg = b2;
    I2 = true;
    zg = null;
    null !== a2 && (og[pg++] = rg, og[pg++] = sg, og[pg++] = qg, rg = a2.id, sg = a2.overflow, qg = b2);
    b2 = qj(b2, d2.children);
    b2.flags |= 4096;
    return b2;
  }
  function vj(a2, b2, c) {
    a2.lanes |= b2;
    var d2 = a2.alternate;
    null !== d2 && (d2.lanes |= b2);
    bh(a2.return, b2, c);
  }
  function wj(a2, b2, c, d2, e2) {
    var f2 = a2.memoizedState;
    null === f2 ? a2.memoizedState = { isBackwards: b2, rendering: null, renderingStartTime: 0, last: d2, tail: c, tailMode: e2 } : (f2.isBackwards = b2, f2.rendering = null, f2.renderingStartTime = 0, f2.last = d2, f2.tail = c, f2.tailMode = e2);
  }
  function xj(a2, b2, c) {
    var d2 = b2.pendingProps, e2 = d2.revealOrder, f2 = d2.tail;
    Xi(a2, b2, d2.children, c);
    d2 = L2.current;
    if (0 !== (d2 & 2)) d2 = d2 & 1 | 2, b2.flags |= 128;
    else {
      if (null !== a2 && 0 !== (a2.flags & 128)) a: for (a2 = b2.child; null !== a2; ) {
        if (13 === a2.tag) null !== a2.memoizedState && vj(a2, c, b2);
        else if (19 === a2.tag) vj(a2, c, b2);
        else if (null !== a2.child) {
          a2.child.return = a2;
          a2 = a2.child;
          continue;
        }
        if (a2 === b2) break a;
        for (; null === a2.sibling; ) {
          if (null === a2.return || a2.return === b2) break a;
          a2 = a2.return;
        }
        a2.sibling.return = a2.return;
        a2 = a2.sibling;
      }
      d2 &= 1;
    }
    G(L2, d2);
    if (0 === (b2.mode & 1)) b2.memoizedState = null;
    else switch (e2) {
      case "forwards":
        c = b2.child;
        for (e2 = null; null !== c; ) a2 = c.alternate, null !== a2 && null === Ch(a2) && (e2 = c), c = c.sibling;
        c = e2;
        null === c ? (e2 = b2.child, b2.child = null) : (e2 = c.sibling, c.sibling = null);
        wj(b2, false, e2, c, f2);
        break;
      case "backwards":
        c = null;
        e2 = b2.child;
        for (b2.child = null; null !== e2; ) {
          a2 = e2.alternate;
          if (null !== a2 && null === Ch(a2)) {
            b2.child = e2;
            break;
          }
          a2 = e2.sibling;
          e2.sibling = c;
          c = e2;
          e2 = a2;
        }
        wj(b2, true, c, null, f2);
        break;
      case "together":
        wj(b2, false, null, null, void 0);
        break;
      default:
        b2.memoizedState = null;
    }
    return b2.child;
  }
  function ij(a2, b2) {
    0 === (b2.mode & 1) && null !== a2 && (a2.alternate = null, b2.alternate = null, b2.flags |= 2);
  }
  function Zi(a2, b2, c) {
    null !== a2 && (b2.dependencies = a2.dependencies);
    rh |= b2.lanes;
    if (0 === (c & b2.childLanes)) return null;
    if (null !== a2 && b2.child !== a2.child) throw Error(p2(153));
    if (null !== b2.child) {
      a2 = b2.child;
      c = Pg(a2, a2.pendingProps);
      b2.child = c;
      for (c.return = b2; null !== a2.sibling; ) a2 = a2.sibling, c = c.sibling = Pg(a2, a2.pendingProps), c.return = b2;
      c.sibling = null;
    }
    return b2.child;
  }
  function yj(a2, b2, c) {
    switch (b2.tag) {
      case 3:
        kj(b2);
        Ig();
        break;
      case 5:
        Ah(b2);
        break;
      case 1:
        Zf(b2.type) && cg(b2);
        break;
      case 4:
        yh(b2, b2.stateNode.containerInfo);
        break;
      case 10:
        var d2 = b2.type._context, e2 = b2.memoizedProps.value;
        G(Wg, d2._currentValue);
        d2._currentValue = e2;
        break;
      case 13:
        d2 = b2.memoizedState;
        if (null !== d2) {
          if (null !== d2.dehydrated) return G(L2, L2.current & 1), b2.flags |= 128, null;
          if (0 !== (c & b2.child.childLanes)) return oj(a2, b2, c);
          G(L2, L2.current & 1);
          a2 = Zi(a2, b2, c);
          return null !== a2 ? a2.sibling : null;
        }
        G(L2, L2.current & 1);
        break;
      case 19:
        d2 = 0 !== (c & b2.childLanes);
        if (0 !== (a2.flags & 128)) {
          if (d2) return xj(a2, b2, c);
          b2.flags |= 128;
        }
        e2 = b2.memoizedState;
        null !== e2 && (e2.rendering = null, e2.tail = null, e2.lastEffect = null);
        G(L2, L2.current);
        if (d2) break;
        else return null;
      case 22:
      case 23:
        return b2.lanes = 0, dj(a2, b2, c);
    }
    return Zi(a2, b2, c);
  }
  var zj, Aj, Bj, Cj;
  zj = function(a2, b2) {
    for (var c = b2.child; null !== c; ) {
      if (5 === c.tag || 6 === c.tag) a2.appendChild(c.stateNode);
      else if (4 !== c.tag && null !== c.child) {
        c.child.return = c;
        c = c.child;
        continue;
      }
      if (c === b2) break;
      for (; null === c.sibling; ) {
        if (null === c.return || c.return === b2) return;
        c = c.return;
      }
      c.sibling.return = c.return;
      c = c.sibling;
    }
  };
  Aj = function() {
  };
  Bj = function(a2, b2, c, d2) {
    var e2 = a2.memoizedProps;
    if (e2 !== d2) {
      a2 = b2.stateNode;
      xh(uh.current);
      var f2 = null;
      switch (c) {
        case "input":
          e2 = Ya(a2, e2);
          d2 = Ya(a2, d2);
          f2 = [];
          break;
        case "select":
          e2 = A2({}, e2, { value: void 0 });
          d2 = A2({}, d2, { value: void 0 });
          f2 = [];
          break;
        case "textarea":
          e2 = gb(a2, e2);
          d2 = gb(a2, d2);
          f2 = [];
          break;
        default:
          "function" !== typeof e2.onClick && "function" === typeof d2.onClick && (a2.onclick = Bf);
      }
      ub(c, d2);
      var g2;
      c = null;
      for (l in e2) if (!d2.hasOwnProperty(l) && e2.hasOwnProperty(l) && null != e2[l]) if ("style" === l) {
        var h2 = e2[l];
        for (g2 in h2) h2.hasOwnProperty(g2) && (c || (c = {}), c[g2] = "");
      } else "dangerouslySetInnerHTML" !== l && "children" !== l && "suppressContentEditableWarning" !== l && "suppressHydrationWarning" !== l && "autoFocus" !== l && (ea.hasOwnProperty(l) ? f2 || (f2 = []) : (f2 = f2 || []).push(l, null));
      for (l in d2) {
        var k2 = d2[l];
        h2 = null != e2 ? e2[l] : void 0;
        if (d2.hasOwnProperty(l) && k2 !== h2 && (null != k2 || null != h2)) if ("style" === l) if (h2) {
          for (g2 in h2) !h2.hasOwnProperty(g2) || k2 && k2.hasOwnProperty(g2) || (c || (c = {}), c[g2] = "");
          for (g2 in k2) k2.hasOwnProperty(g2) && h2[g2] !== k2[g2] && (c || (c = {}), c[g2] = k2[g2]);
        } else c || (f2 || (f2 = []), f2.push(
          l,
          c
        )), c = k2;
        else "dangerouslySetInnerHTML" === l ? (k2 = k2 ? k2.__html : void 0, h2 = h2 ? h2.__html : void 0, null != k2 && h2 !== k2 && (f2 = f2 || []).push(l, k2)) : "children" === l ? "string" !== typeof k2 && "number" !== typeof k2 || (f2 = f2 || []).push(l, "" + k2) : "suppressContentEditableWarning" !== l && "suppressHydrationWarning" !== l && (ea.hasOwnProperty(l) ? (null != k2 && "onScroll" === l && D2("scroll", a2), f2 || h2 === k2 || (f2 = [])) : (f2 = f2 || []).push(l, k2));
      }
      c && (f2 = f2 || []).push("style", c);
      var l = f2;
      if (b2.updateQueue = l) b2.flags |= 4;
    }
  };
  Cj = function(a2, b2, c, d2) {
    c !== d2 && (b2.flags |= 4);
  };
  function Dj(a2, b2) {
    if (!I2) switch (a2.tailMode) {
      case "hidden":
        b2 = a2.tail;
        for (var c = null; null !== b2; ) null !== b2.alternate && (c = b2), b2 = b2.sibling;
        null === c ? a2.tail = null : c.sibling = null;
        break;
      case "collapsed":
        c = a2.tail;
        for (var d2 = null; null !== c; ) null !== c.alternate && (d2 = c), c = c.sibling;
        null === d2 ? b2 || null === a2.tail ? a2.tail = null : a2.tail.sibling = null : d2.sibling = null;
    }
  }
  function S2(a2) {
    var b2 = null !== a2.alternate && a2.alternate.child === a2.child, c = 0, d2 = 0;
    if (b2) for (var e2 = a2.child; null !== e2; ) c |= e2.lanes | e2.childLanes, d2 |= e2.subtreeFlags & 14680064, d2 |= e2.flags & 14680064, e2.return = a2, e2 = e2.sibling;
    else for (e2 = a2.child; null !== e2; ) c |= e2.lanes | e2.childLanes, d2 |= e2.subtreeFlags, d2 |= e2.flags, e2.return = a2, e2 = e2.sibling;
    a2.subtreeFlags |= d2;
    a2.childLanes = c;
    return b2;
  }
  function Ej(a2, b2, c) {
    var d2 = b2.pendingProps;
    wg(b2);
    switch (b2.tag) {
      case 2:
      case 16:
      case 15:
      case 0:
      case 11:
      case 7:
      case 8:
      case 12:
      case 9:
      case 14:
        return S2(b2), null;
      case 1:
        return Zf(b2.type) && $f(), S2(b2), null;
      case 3:
        d2 = b2.stateNode;
        zh();
        E2(Wf);
        E2(H4);
        Eh();
        d2.pendingContext && (d2.context = d2.pendingContext, d2.pendingContext = null);
        if (null === a2 || null === a2.child) Gg(b2) ? b2.flags |= 4 : null === a2 || a2.memoizedState.isDehydrated && 0 === (b2.flags & 256) || (b2.flags |= 1024, null !== zg && (Fj(zg), zg = null));
        Aj(a2, b2);
        S2(b2);
        return null;
      case 5:
        Bh(b2);
        var e2 = xh(wh.current);
        c = b2.type;
        if (null !== a2 && null != b2.stateNode) Bj(a2, b2, c, d2, e2), a2.ref !== b2.ref && (b2.flags |= 512, b2.flags |= 2097152);
        else {
          if (!d2) {
            if (null === b2.stateNode) throw Error(p2(166));
            S2(b2);
            return null;
          }
          a2 = xh(uh.current);
          if (Gg(b2)) {
            d2 = b2.stateNode;
            c = b2.type;
            var f2 = b2.memoizedProps;
            d2[Of] = b2;
            d2[Pf] = f2;
            a2 = 0 !== (b2.mode & 1);
            switch (c) {
              case "dialog":
                D2("cancel", d2);
                D2("close", d2);
                break;
              case "iframe":
              case "object":
              case "embed":
                D2("load", d2);
                break;
              case "video":
              case "audio":
                for (e2 = 0; e2 < lf.length; e2++) D2(lf[e2], d2);
                break;
              case "source":
                D2("error", d2);
                break;
              case "img":
              case "image":
              case "link":
                D2(
                  "error",
                  d2
                );
                D2("load", d2);
                break;
              case "details":
                D2("toggle", d2);
                break;
              case "input":
                Za(d2, f2);
                D2("invalid", d2);
                break;
              case "select":
                d2._wrapperState = { wasMultiple: !!f2.multiple };
                D2("invalid", d2);
                break;
              case "textarea":
                hb(d2, f2), D2("invalid", d2);
            }
            ub(c, f2);
            e2 = null;
            for (var g2 in f2) if (f2.hasOwnProperty(g2)) {
              var h2 = f2[g2];
              "children" === g2 ? "string" === typeof h2 ? d2.textContent !== h2 && (true !== f2.suppressHydrationWarning && Af(d2.textContent, h2, a2), e2 = ["children", h2]) : "number" === typeof h2 && d2.textContent !== "" + h2 && (true !== f2.suppressHydrationWarning && Af(
                d2.textContent,
                h2,
                a2
              ), e2 = ["children", "" + h2]) : ea.hasOwnProperty(g2) && null != h2 && "onScroll" === g2 && D2("scroll", d2);
            }
            switch (c) {
              case "input":
                Va(d2);
                db(d2, f2, true);
                break;
              case "textarea":
                Va(d2);
                jb(d2);
                break;
              case "select":
              case "option":
                break;
              default:
                "function" === typeof f2.onClick && (d2.onclick = Bf);
            }
            d2 = e2;
            b2.updateQueue = d2;
            null !== d2 && (b2.flags |= 4);
          } else {
            g2 = 9 === e2.nodeType ? e2 : e2.ownerDocument;
            "http://www.w3.org/1999/xhtml" === a2 && (a2 = kb(c));
            "http://www.w3.org/1999/xhtml" === a2 ? "script" === c ? (a2 = g2.createElement("div"), a2.innerHTML = "<script><\/script>", a2 = a2.removeChild(a2.firstChild)) : "string" === typeof d2.is ? a2 = g2.createElement(c, { is: d2.is }) : (a2 = g2.createElement(c), "select" === c && (g2 = a2, d2.multiple ? g2.multiple = true : d2.size && (g2.size = d2.size))) : a2 = g2.createElementNS(a2, c);
            a2[Of] = b2;
            a2[Pf] = d2;
            zj(a2, b2, false, false);
            b2.stateNode = a2;
            a: {
              g2 = vb(c, d2);
              switch (c) {
                case "dialog":
                  D2("cancel", a2);
                  D2("close", a2);
                  e2 = d2;
                  break;
                case "iframe":
                case "object":
                case "embed":
                  D2("load", a2);
                  e2 = d2;
                  break;
                case "video":
                case "audio":
                  for (e2 = 0; e2 < lf.length; e2++) D2(lf[e2], a2);
                  e2 = d2;
                  break;
                case "source":
                  D2("error", a2);
                  e2 = d2;
                  break;
                case "img":
                case "image":
                case "link":
                  D2(
                    "error",
                    a2
                  );
                  D2("load", a2);
                  e2 = d2;
                  break;
                case "details":
                  D2("toggle", a2);
                  e2 = d2;
                  break;
                case "input":
                  Za(a2, d2);
                  e2 = Ya(a2, d2);
                  D2("invalid", a2);
                  break;
                case "option":
                  e2 = d2;
                  break;
                case "select":
                  a2._wrapperState = { wasMultiple: !!d2.multiple };
                  e2 = A2({}, d2, { value: void 0 });
                  D2("invalid", a2);
                  break;
                case "textarea":
                  hb(a2, d2);
                  e2 = gb(a2, d2);
                  D2("invalid", a2);
                  break;
                default:
                  e2 = d2;
              }
              ub(c, e2);
              h2 = e2;
              for (f2 in h2) if (h2.hasOwnProperty(f2)) {
                var k2 = h2[f2];
                "style" === f2 ? sb(a2, k2) : "dangerouslySetInnerHTML" === f2 ? (k2 = k2 ? k2.__html : void 0, null != k2 && nb(a2, k2)) : "children" === f2 ? "string" === typeof k2 ? ("textarea" !== c || "" !== k2) && ob(a2, k2) : "number" === typeof k2 && ob(a2, "" + k2) : "suppressContentEditableWarning" !== f2 && "suppressHydrationWarning" !== f2 && "autoFocus" !== f2 && (ea.hasOwnProperty(f2) ? null != k2 && "onScroll" === f2 && D2("scroll", a2) : null != k2 && ta(a2, f2, k2, g2));
              }
              switch (c) {
                case "input":
                  Va(a2);
                  db(a2, d2, false);
                  break;
                case "textarea":
                  Va(a2);
                  jb(a2);
                  break;
                case "option":
                  null != d2.value && a2.setAttribute("value", "" + Sa(d2.value));
                  break;
                case "select":
                  a2.multiple = !!d2.multiple;
                  f2 = d2.value;
                  null != f2 ? fb(a2, !!d2.multiple, f2, false) : null != d2.defaultValue && fb(
                    a2,
                    !!d2.multiple,
                    d2.defaultValue,
                    true
                  );
                  break;
                default:
                  "function" === typeof e2.onClick && (a2.onclick = Bf);
              }
              switch (c) {
                case "button":
                case "input":
                case "select":
                case "textarea":
                  d2 = !!d2.autoFocus;
                  break a;
                case "img":
                  d2 = true;
                  break a;
                default:
                  d2 = false;
              }
            }
            d2 && (b2.flags |= 4);
          }
          null !== b2.ref && (b2.flags |= 512, b2.flags |= 2097152);
        }
        S2(b2);
        return null;
      case 6:
        if (a2 && null != b2.stateNode) Cj(a2, b2, a2.memoizedProps, d2);
        else {
          if ("string" !== typeof d2 && null === b2.stateNode) throw Error(p2(166));
          c = xh(wh.current);
          xh(uh.current);
          if (Gg(b2)) {
            d2 = b2.stateNode;
            c = b2.memoizedProps;
            d2[Of] = b2;
            if (f2 = d2.nodeValue !== c) {
              if (a2 = xg, null !== a2) switch (a2.tag) {
                case 3:
                  Af(d2.nodeValue, c, 0 !== (a2.mode & 1));
                  break;
                case 5:
                  true !== a2.memoizedProps.suppressHydrationWarning && Af(d2.nodeValue, c, 0 !== (a2.mode & 1));
              }
            }
            f2 && (b2.flags |= 4);
          } else d2 = (9 === c.nodeType ? c : c.ownerDocument).createTextNode(d2), d2[Of] = b2, b2.stateNode = d2;
        }
        S2(b2);
        return null;
      case 13:
        E2(L2);
        d2 = b2.memoizedState;
        if (null === a2 || null !== a2.memoizedState && null !== a2.memoizedState.dehydrated) {
          if (I2 && null !== yg && 0 !== (b2.mode & 1) && 0 === (b2.flags & 128)) Hg(), Ig(), b2.flags |= 98560, f2 = false;
          else if (f2 = Gg(b2), null !== d2 && null !== d2.dehydrated) {
            if (null === a2) {
              if (!f2) throw Error(p2(318));
              f2 = b2.memoizedState;
              f2 = null !== f2 ? f2.dehydrated : null;
              if (!f2) throw Error(p2(317));
              f2[Of] = b2;
            } else Ig(), 0 === (b2.flags & 128) && (b2.memoizedState = null), b2.flags |= 4;
            S2(b2);
            f2 = false;
          } else null !== zg && (Fj(zg), zg = null), f2 = true;
          if (!f2) return b2.flags & 65536 ? b2 : null;
        }
        if (0 !== (b2.flags & 128)) return b2.lanes = c, b2;
        d2 = null !== d2;
        d2 !== (null !== a2 && null !== a2.memoizedState) && d2 && (b2.child.flags |= 8192, 0 !== (b2.mode & 1) && (null === a2 || 0 !== (L2.current & 1) ? 0 === T2 && (T2 = 3) : tj()));
        null !== b2.updateQueue && (b2.flags |= 4);
        S2(b2);
        return null;
      case 4:
        return zh(), Aj(a2, b2), null === a2 && sf(b2.stateNode.containerInfo), S2(b2), null;
      case 10:
        return ah(b2.type._context), S2(b2), null;
      case 17:
        return Zf(b2.type) && $f(), S2(b2), null;
      case 19:
        E2(L2);
        f2 = b2.memoizedState;
        if (null === f2) return S2(b2), null;
        d2 = 0 !== (b2.flags & 128);
        g2 = f2.rendering;
        if (null === g2) if (d2) Dj(f2, false);
        else {
          if (0 !== T2 || null !== a2 && 0 !== (a2.flags & 128)) for (a2 = b2.child; null !== a2; ) {
            g2 = Ch(a2);
            if (null !== g2) {
              b2.flags |= 128;
              Dj(f2, false);
              d2 = g2.updateQueue;
              null !== d2 && (b2.updateQueue = d2, b2.flags |= 4);
              b2.subtreeFlags = 0;
              d2 = c;
              for (c = b2.child; null !== c; ) f2 = c, a2 = d2, f2.flags &= 14680066, g2 = f2.alternate, null === g2 ? (f2.childLanes = 0, f2.lanes = a2, f2.child = null, f2.subtreeFlags = 0, f2.memoizedProps = null, f2.memoizedState = null, f2.updateQueue = null, f2.dependencies = null, f2.stateNode = null) : (f2.childLanes = g2.childLanes, f2.lanes = g2.lanes, f2.child = g2.child, f2.subtreeFlags = 0, f2.deletions = null, f2.memoizedProps = g2.memoizedProps, f2.memoizedState = g2.memoizedState, f2.updateQueue = g2.updateQueue, f2.type = g2.type, a2 = g2.dependencies, f2.dependencies = null === a2 ? null : { lanes: a2.lanes, firstContext: a2.firstContext }), c = c.sibling;
              G(L2, L2.current & 1 | 2);
              return b2.child;
            }
            a2 = a2.sibling;
          }
          null !== f2.tail && B3() > Gj && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304);
        }
        else {
          if (!d2) if (a2 = Ch(g2), null !== a2) {
            if (b2.flags |= 128, d2 = true, c = a2.updateQueue, null !== c && (b2.updateQueue = c, b2.flags |= 4), Dj(f2, true), null === f2.tail && "hidden" === f2.tailMode && !g2.alternate && !I2) return S2(b2), null;
          } else 2 * B3() - f2.renderingStartTime > Gj && 1073741824 !== c && (b2.flags |= 128, d2 = true, Dj(f2, false), b2.lanes = 4194304);
          f2.isBackwards ? (g2.sibling = b2.child, b2.child = g2) : (c = f2.last, null !== c ? c.sibling = g2 : b2.child = g2, f2.last = g2);
        }
        if (null !== f2.tail) return b2 = f2.tail, f2.rendering = b2, f2.tail = b2.sibling, f2.renderingStartTime = B3(), b2.sibling = null, c = L2.current, G(L2, d2 ? c & 1 | 2 : c & 1), b2;
        S2(b2);
        return null;
      case 22:
      case 23:
        return Hj(), d2 = null !== b2.memoizedState, null !== a2 && null !== a2.memoizedState !== d2 && (b2.flags |= 8192), d2 && 0 !== (b2.mode & 1) ? 0 !== (fj & 1073741824) && (S2(b2), b2.subtreeFlags & 6 && (b2.flags |= 8192)) : S2(b2), null;
      case 24:
        return null;
      case 25:
        return null;
    }
    throw Error(p2(156, b2.tag));
  }
  function Ij(a2, b2) {
    wg(b2);
    switch (b2.tag) {
      case 1:
        return Zf(b2.type) && $f(), a2 = b2.flags, a2 & 65536 ? (b2.flags = a2 & -65537 | 128, b2) : null;
      case 3:
        return zh(), E2(Wf), E2(H4), Eh(), a2 = b2.flags, 0 !== (a2 & 65536) && 0 === (a2 & 128) ? (b2.flags = a2 & -65537 | 128, b2) : null;
      case 5:
        return Bh(b2), null;
      case 13:
        E2(L2);
        a2 = b2.memoizedState;
        if (null !== a2 && null !== a2.dehydrated) {
          if (null === b2.alternate) throw Error(p2(340));
          Ig();
        }
        a2 = b2.flags;
        return a2 & 65536 ? (b2.flags = a2 & -65537 | 128, b2) : null;
      case 19:
        return E2(L2), null;
      case 4:
        return zh(), null;
      case 10:
        return ah(b2.type._context), null;
      case 22:
      case 23:
        return Hj(), null;
      case 24:
        return null;
      default:
        return null;
    }
  }
  var Jj = false, U2 = false, Kj = "function" === typeof WeakSet ? WeakSet : Set, V2 = null;
  function Lj(a2, b2) {
    var c = a2.ref;
    if (null !== c) if ("function" === typeof c) try {
      c(null);
    } catch (d2) {
      W(a2, b2, d2);
    }
    else c.current = null;
  }
  function Mj(a2, b2, c) {
    try {
      c();
    } catch (d2) {
      W(a2, b2, d2);
    }
  }
  var Nj = false;
  function Oj(a2, b2) {
    Cf = dd;
    a2 = Me();
    if (Ne(a2)) {
      if ("selectionStart" in a2) var c = { start: a2.selectionStart, end: a2.selectionEnd };
      else a: {
        c = (c = a2.ownerDocument) && c.defaultView || window;
        var d2 = c.getSelection && c.getSelection();
        if (d2 && 0 !== d2.rangeCount) {
          c = d2.anchorNode;
          var e2 = d2.anchorOffset, f2 = d2.focusNode;
          d2 = d2.focusOffset;
          try {
            c.nodeType, f2.nodeType;
          } catch (F2) {
            c = null;
            break a;
          }
          var g2 = 0, h2 = -1, k2 = -1, l = 0, m2 = 0, q2 = a2, r2 = null;
          b: for (; ; ) {
            for (var y2; ; ) {
              q2 !== c || 0 !== e2 && 3 !== q2.nodeType || (h2 = g2 + e2);
              q2 !== f2 || 0 !== d2 && 3 !== q2.nodeType || (k2 = g2 + d2);
              3 === q2.nodeType && (g2 += q2.nodeValue.length);
              if (null === (y2 = q2.firstChild)) break;
              r2 = q2;
              q2 = y2;
            }
            for (; ; ) {
              if (q2 === a2) break b;
              r2 === c && ++l === e2 && (h2 = g2);
              r2 === f2 && ++m2 === d2 && (k2 = g2);
              if (null !== (y2 = q2.nextSibling)) break;
              q2 = r2;
              r2 = q2.parentNode;
            }
            q2 = y2;
          }
          c = -1 === h2 || -1 === k2 ? null : { start: h2, end: k2 };
        } else c = null;
      }
      c = c || { start: 0, end: 0 };
    } else c = null;
    Df = { focusedElem: a2, selectionRange: c };
    dd = false;
    for (V2 = b2; null !== V2; ) if (b2 = V2, a2 = b2.child, 0 !== (b2.subtreeFlags & 1028) && null !== a2) a2.return = b2, V2 = a2;
    else for (; null !== V2; ) {
      b2 = V2;
      try {
        var n = b2.alternate;
        if (0 !== (b2.flags & 1024)) switch (b2.tag) {
          case 0:
          case 11:
          case 15:
            break;
          case 1:
            if (null !== n) {
              var t = n.memoizedProps, J = n.memoizedState, x = b2.stateNode, w = x.getSnapshotBeforeUpdate(b2.elementType === b2.type ? t : Ci(b2.type, t), J);
              x.__reactInternalSnapshotBeforeUpdate = w;
            }
            break;
          case 3:
            var u2 = b2.stateNode.containerInfo;
            1 === u2.nodeType ? u2.textContent = "" : 9 === u2.nodeType && u2.documentElement && u2.removeChild(u2.documentElement);
            break;
          case 5:
          case 6:
          case 4:
          case 17:
            break;
          default:
            throw Error(p2(163));
        }
      } catch (F2) {
        W(b2, b2.return, F2);
      }
      a2 = b2.sibling;
      if (null !== a2) {
        a2.return = b2.return;
        V2 = a2;
        break;
      }
      V2 = b2.return;
    }
    n = Nj;
    Nj = false;
    return n;
  }
  function Pj(a2, b2, c) {
    var d2 = b2.updateQueue;
    d2 = null !== d2 ? d2.lastEffect : null;
    if (null !== d2) {
      var e2 = d2 = d2.next;
      do {
        if ((e2.tag & a2) === a2) {
          var f2 = e2.destroy;
          e2.destroy = void 0;
          void 0 !== f2 && Mj(b2, c, f2);
        }
        e2 = e2.next;
      } while (e2 !== d2);
    }
  }
  function Qj(a2, b2) {
    b2 = b2.updateQueue;
    b2 = null !== b2 ? b2.lastEffect : null;
    if (null !== b2) {
      var c = b2 = b2.next;
      do {
        if ((c.tag & a2) === a2) {
          var d2 = c.create;
          c.destroy = d2();
        }
        c = c.next;
      } while (c !== b2);
    }
  }
  function Rj(a2) {
    var b2 = a2.ref;
    if (null !== b2) {
      var c = a2.stateNode;
      switch (a2.tag) {
        case 5:
          a2 = c;
          break;
        default:
          a2 = c;
      }
      "function" === typeof b2 ? b2(a2) : b2.current = a2;
    }
  }
  function Sj(a2) {
    var b2 = a2.alternate;
    null !== b2 && (a2.alternate = null, Sj(b2));
    a2.child = null;
    a2.deletions = null;
    a2.sibling = null;
    5 === a2.tag && (b2 = a2.stateNode, null !== b2 && (delete b2[Of], delete b2[Pf], delete b2[of], delete b2[Qf], delete b2[Rf]));
    a2.stateNode = null;
    a2.return = null;
    a2.dependencies = null;
    a2.memoizedProps = null;
    a2.memoizedState = null;
    a2.pendingProps = null;
    a2.stateNode = null;
    a2.updateQueue = null;
  }
  function Tj(a2) {
    return 5 === a2.tag || 3 === a2.tag || 4 === a2.tag;
  }
  function Uj(a2) {
    a: for (; ; ) {
      for (; null === a2.sibling; ) {
        if (null === a2.return || Tj(a2.return)) return null;
        a2 = a2.return;
      }
      a2.sibling.return = a2.return;
      for (a2 = a2.sibling; 5 !== a2.tag && 6 !== a2.tag && 18 !== a2.tag; ) {
        if (a2.flags & 2) continue a;
        if (null === a2.child || 4 === a2.tag) continue a;
        else a2.child.return = a2, a2 = a2.child;
      }
      if (!(a2.flags & 2)) return a2.stateNode;
    }
  }
  function Vj(a2, b2, c) {
    var d2 = a2.tag;
    if (5 === d2 || 6 === d2) a2 = a2.stateNode, b2 ? 8 === c.nodeType ? c.parentNode.insertBefore(a2, b2) : c.insertBefore(a2, b2) : (8 === c.nodeType ? (b2 = c.parentNode, b2.insertBefore(a2, c)) : (b2 = c, b2.appendChild(a2)), c = c._reactRootContainer, null !== c && void 0 !== c || null !== b2.onclick || (b2.onclick = Bf));
    else if (4 !== d2 && (a2 = a2.child, null !== a2)) for (Vj(a2, b2, c), a2 = a2.sibling; null !== a2; ) Vj(a2, b2, c), a2 = a2.sibling;
  }
  function Wj(a2, b2, c) {
    var d2 = a2.tag;
    if (5 === d2 || 6 === d2) a2 = a2.stateNode, b2 ? c.insertBefore(a2, b2) : c.appendChild(a2);
    else if (4 !== d2 && (a2 = a2.child, null !== a2)) for (Wj(a2, b2, c), a2 = a2.sibling; null !== a2; ) Wj(a2, b2, c), a2 = a2.sibling;
  }
  var X = null, Xj = false;
  function Yj(a2, b2, c) {
    for (c = c.child; null !== c; ) Zj(a2, b2, c), c = c.sibling;
  }
  function Zj(a2, b2, c) {
    if (lc && "function" === typeof lc.onCommitFiberUnmount) try {
      lc.onCommitFiberUnmount(kc, c);
    } catch (h2) {
    }
    switch (c.tag) {
      case 5:
        U2 || Lj(c, b2);
      case 6:
        var d2 = X, e2 = Xj;
        X = null;
        Yj(a2, b2, c);
        X = d2;
        Xj = e2;
        null !== X && (Xj ? (a2 = X, c = c.stateNode, 8 === a2.nodeType ? a2.parentNode.removeChild(c) : a2.removeChild(c)) : X.removeChild(c.stateNode));
        break;
      case 18:
        null !== X && (Xj ? (a2 = X, c = c.stateNode, 8 === a2.nodeType ? Kf(a2.parentNode, c) : 1 === a2.nodeType && Kf(a2, c), bd(a2)) : Kf(X, c.stateNode));
        break;
      case 4:
        d2 = X;
        e2 = Xj;
        X = c.stateNode.containerInfo;
        Xj = true;
        Yj(a2, b2, c);
        X = d2;
        Xj = e2;
        break;
      case 0:
      case 11:
      case 14:
      case 15:
        if (!U2 && (d2 = c.updateQueue, null !== d2 && (d2 = d2.lastEffect, null !== d2))) {
          e2 = d2 = d2.next;
          do {
            var f2 = e2, g2 = f2.destroy;
            f2 = f2.tag;
            void 0 !== g2 && (0 !== (f2 & 2) ? Mj(c, b2, g2) : 0 !== (f2 & 4) && Mj(c, b2, g2));
            e2 = e2.next;
          } while (e2 !== d2);
        }
        Yj(a2, b2, c);
        break;
      case 1:
        if (!U2 && (Lj(c, b2), d2 = c.stateNode, "function" === typeof d2.componentWillUnmount)) try {
          d2.props = c.memoizedProps, d2.state = c.memoizedState, d2.componentWillUnmount();
        } catch (h2) {
          W(c, b2, h2);
        }
        Yj(a2, b2, c);
        break;
      case 21:
        Yj(a2, b2, c);
        break;
      case 22:
        c.mode & 1 ? (U2 = (d2 = U2) || null !== c.memoizedState, Yj(a2, b2, c), U2 = d2) : Yj(a2, b2, c);
        break;
      default:
        Yj(a2, b2, c);
    }
  }
  function ak(a2) {
    var b2 = a2.updateQueue;
    if (null !== b2) {
      a2.updateQueue = null;
      var c = a2.stateNode;
      null === c && (c = a2.stateNode = new Kj());
      b2.forEach(function(b3) {
        var d2 = bk.bind(null, a2, b3);
        c.has(b3) || (c.add(b3), b3.then(d2, d2));
      });
    }
  }
  function ck(a2, b2) {
    var c = b2.deletions;
    if (null !== c) for (var d2 = 0; d2 < c.length; d2++) {
      var e2 = c[d2];
      try {
        var f2 = a2, g2 = b2, h2 = g2;
        a: for (; null !== h2; ) {
          switch (h2.tag) {
            case 5:
              X = h2.stateNode;
              Xj = false;
              break a;
            case 3:
              X = h2.stateNode.containerInfo;
              Xj = true;
              break a;
            case 4:
              X = h2.stateNode.containerInfo;
              Xj = true;
              break a;
          }
          h2 = h2.return;
        }
        if (null === X) throw Error(p2(160));
        Zj(f2, g2, e2);
        X = null;
        Xj = false;
        var k2 = e2.alternate;
        null !== k2 && (k2.return = null);
        e2.return = null;
      } catch (l) {
        W(e2, b2, l);
      }
    }
    if (b2.subtreeFlags & 12854) for (b2 = b2.child; null !== b2; ) dk(b2, a2), b2 = b2.sibling;
  }
  function dk(a2, b2) {
    var c = a2.alternate, d2 = a2.flags;
    switch (a2.tag) {
      case 0:
      case 11:
      case 14:
      case 15:
        ck(b2, a2);
        ek(a2);
        if (d2 & 4) {
          try {
            Pj(3, a2, a2.return), Qj(3, a2);
          } catch (t) {
            W(a2, a2.return, t);
          }
          try {
            Pj(5, a2, a2.return);
          } catch (t) {
            W(a2, a2.return, t);
          }
        }
        break;
      case 1:
        ck(b2, a2);
        ek(a2);
        d2 & 512 && null !== c && Lj(c, c.return);
        break;
      case 5:
        ck(b2, a2);
        ek(a2);
        d2 & 512 && null !== c && Lj(c, c.return);
        if (a2.flags & 32) {
          var e2 = a2.stateNode;
          try {
            ob(e2, "");
          } catch (t) {
            W(a2, a2.return, t);
          }
        }
        if (d2 & 4 && (e2 = a2.stateNode, null != e2)) {
          var f2 = a2.memoizedProps, g2 = null !== c ? c.memoizedProps : f2, h2 = a2.type, k2 = a2.updateQueue;
          a2.updateQueue = null;
          if (null !== k2) try {
            "input" === h2 && "radio" === f2.type && null != f2.name && ab(e2, f2);
            vb(h2, g2);
            var l = vb(h2, f2);
            for (g2 = 0; g2 < k2.length; g2 += 2) {
              var m2 = k2[g2], q2 = k2[g2 + 1];
              "style" === m2 ? sb(e2, q2) : "dangerouslySetInnerHTML" === m2 ? nb(e2, q2) : "children" === m2 ? ob(e2, q2) : ta(e2, m2, q2, l);
            }
            switch (h2) {
              case "input":
                bb(e2, f2);
                break;
              case "textarea":
                ib(e2, f2);
                break;
              case "select":
                var r2 = e2._wrapperState.wasMultiple;
                e2._wrapperState.wasMultiple = !!f2.multiple;
                var y2 = f2.value;
                null != y2 ? fb(e2, !!f2.multiple, y2, false) : r2 !== !!f2.multiple && (null != f2.defaultValue ? fb(
                  e2,
                  !!f2.multiple,
                  f2.defaultValue,
                  true
                ) : fb(e2, !!f2.multiple, f2.multiple ? [] : "", false));
            }
            e2[Pf] = f2;
          } catch (t) {
            W(a2, a2.return, t);
          }
        }
        break;
      case 6:
        ck(b2, a2);
        ek(a2);
        if (d2 & 4) {
          if (null === a2.stateNode) throw Error(p2(162));
          e2 = a2.stateNode;
          f2 = a2.memoizedProps;
          try {
            e2.nodeValue = f2;
          } catch (t) {
            W(a2, a2.return, t);
          }
        }
        break;
      case 3:
        ck(b2, a2);
        ek(a2);
        if (d2 & 4 && null !== c && c.memoizedState.isDehydrated) try {
          bd(b2.containerInfo);
        } catch (t) {
          W(a2, a2.return, t);
        }
        break;
      case 4:
        ck(b2, a2);
        ek(a2);
        break;
      case 13:
        ck(b2, a2);
        ek(a2);
        e2 = a2.child;
        e2.flags & 8192 && (f2 = null !== e2.memoizedState, e2.stateNode.isHidden = f2, !f2 || null !== e2.alternate && null !== e2.alternate.memoizedState || (fk = B3()));
        d2 & 4 && ak(a2);
        break;
      case 22:
        m2 = null !== c && null !== c.memoizedState;
        a2.mode & 1 ? (U2 = (l = U2) || m2, ck(b2, a2), U2 = l) : ck(b2, a2);
        ek(a2);
        if (d2 & 8192) {
          l = null !== a2.memoizedState;
          if ((a2.stateNode.isHidden = l) && !m2 && 0 !== (a2.mode & 1)) for (V2 = a2, m2 = a2.child; null !== m2; ) {
            for (q2 = V2 = m2; null !== V2; ) {
              r2 = V2;
              y2 = r2.child;
              switch (r2.tag) {
                case 0:
                case 11:
                case 14:
                case 15:
                  Pj(4, r2, r2.return);
                  break;
                case 1:
                  Lj(r2, r2.return);
                  var n = r2.stateNode;
                  if ("function" === typeof n.componentWillUnmount) {
                    d2 = r2;
                    c = r2.return;
                    try {
                      b2 = d2, n.props = b2.memoizedProps, n.state = b2.memoizedState, n.componentWillUnmount();
                    } catch (t) {
                      W(d2, c, t);
                    }
                  }
                  break;
                case 5:
                  Lj(r2, r2.return);
                  break;
                case 22:
                  if (null !== r2.memoizedState) {
                    gk(q2);
                    continue;
                  }
              }
              null !== y2 ? (y2.return = r2, V2 = y2) : gk(q2);
            }
            m2 = m2.sibling;
          }
          a: for (m2 = null, q2 = a2; ; ) {
            if (5 === q2.tag) {
              if (null === m2) {
                m2 = q2;
                try {
                  e2 = q2.stateNode, l ? (f2 = e2.style, "function" === typeof f2.setProperty ? f2.setProperty("display", "none", "important") : f2.display = "none") : (h2 = q2.stateNode, k2 = q2.memoizedProps.style, g2 = void 0 !== k2 && null !== k2 && k2.hasOwnProperty("display") ? k2.display : null, h2.style.display = rb("display", g2));
                } catch (t) {
                  W(a2, a2.return, t);
                }
              }
            } else if (6 === q2.tag) {
              if (null === m2) try {
                q2.stateNode.nodeValue = l ? "" : q2.memoizedProps;
              } catch (t) {
                W(a2, a2.return, t);
              }
            } else if ((22 !== q2.tag && 23 !== q2.tag || null === q2.memoizedState || q2 === a2) && null !== q2.child) {
              q2.child.return = q2;
              q2 = q2.child;
              continue;
            }
            if (q2 === a2) break a;
            for (; null === q2.sibling; ) {
              if (null === q2.return || q2.return === a2) break a;
              m2 === q2 && (m2 = null);
              q2 = q2.return;
            }
            m2 === q2 && (m2 = null);
            q2.sibling.return = q2.return;
            q2 = q2.sibling;
          }
        }
        break;
      case 19:
        ck(b2, a2);
        ek(a2);
        d2 & 4 && ak(a2);
        break;
      case 21:
        break;
      default:
        ck(
          b2,
          a2
        ), ek(a2);
    }
  }
  function ek(a2) {
    var b2 = a2.flags;
    if (b2 & 2) {
      try {
        a: {
          for (var c = a2.return; null !== c; ) {
            if (Tj(c)) {
              var d2 = c;
              break a;
            }
            c = c.return;
          }
          throw Error(p2(160));
        }
        switch (d2.tag) {
          case 5:
            var e2 = d2.stateNode;
            d2.flags & 32 && (ob(e2, ""), d2.flags &= -33);
            var f2 = Uj(a2);
            Wj(a2, f2, e2);
            break;
          case 3:
          case 4:
            var g2 = d2.stateNode.containerInfo, h2 = Uj(a2);
            Vj(a2, h2, g2);
            break;
          default:
            throw Error(p2(161));
        }
      } catch (k2) {
        W(a2, a2.return, k2);
      }
      a2.flags &= -3;
    }
    b2 & 4096 && (a2.flags &= -4097);
  }
  function hk(a2, b2, c) {
    V2 = a2;
    ik(a2);
  }
  function ik(a2, b2, c) {
    for (var d2 = 0 !== (a2.mode & 1); null !== V2; ) {
      var e2 = V2, f2 = e2.child;
      if (22 === e2.tag && d2) {
        var g2 = null !== e2.memoizedState || Jj;
        if (!g2) {
          var h2 = e2.alternate, k2 = null !== h2 && null !== h2.memoizedState || U2;
          h2 = Jj;
          var l = U2;
          Jj = g2;
          if ((U2 = k2) && !l) for (V2 = e2; null !== V2; ) g2 = V2, k2 = g2.child, 22 === g2.tag && null !== g2.memoizedState ? jk(e2) : null !== k2 ? (k2.return = g2, V2 = k2) : jk(e2);
          for (; null !== f2; ) V2 = f2, ik(f2), f2 = f2.sibling;
          V2 = e2;
          Jj = h2;
          U2 = l;
        }
        kk(a2);
      } else 0 !== (e2.subtreeFlags & 8772) && null !== f2 ? (f2.return = e2, V2 = f2) : kk(a2);
    }
  }
  function kk(a2) {
    for (; null !== V2; ) {
      var b2 = V2;
      if (0 !== (b2.flags & 8772)) {
        var c = b2.alternate;
        try {
          if (0 !== (b2.flags & 8772)) switch (b2.tag) {
            case 0:
            case 11:
            case 15:
              U2 || Qj(5, b2);
              break;
            case 1:
              var d2 = b2.stateNode;
              if (b2.flags & 4 && !U2) if (null === c) d2.componentDidMount();
              else {
                var e2 = b2.elementType === b2.type ? c.memoizedProps : Ci(b2.type, c.memoizedProps);
                d2.componentDidUpdate(e2, c.memoizedState, d2.__reactInternalSnapshotBeforeUpdate);
              }
              var f2 = b2.updateQueue;
              null !== f2 && sh(b2, f2, d2);
              break;
            case 3:
              var g2 = b2.updateQueue;
              if (null !== g2) {
                c = null;
                if (null !== b2.child) switch (b2.child.tag) {
                  case 5:
                    c = b2.child.stateNode;
                    break;
                  case 1:
                    c = b2.child.stateNode;
                }
                sh(b2, g2, c);
              }
              break;
            case 5:
              var h2 = b2.stateNode;
              if (null === c && b2.flags & 4) {
                c = h2;
                var k2 = b2.memoizedProps;
                switch (b2.type) {
                  case "button":
                  case "input":
                  case "select":
                  case "textarea":
                    k2.autoFocus && c.focus();
                    break;
                  case "img":
                    k2.src && (c.src = k2.src);
                }
              }
              break;
            case 6:
              break;
            case 4:
              break;
            case 12:
              break;
            case 13:
              if (null === b2.memoizedState) {
                var l = b2.alternate;
                if (null !== l) {
                  var m2 = l.memoizedState;
                  if (null !== m2) {
                    var q2 = m2.dehydrated;
                    null !== q2 && bd(q2);
                  }
                }
              }
              break;
            case 19:
            case 17:
            case 21:
            case 22:
            case 23:
            case 25:
              break;
            default:
              throw Error(p2(163));
          }
          U2 || b2.flags & 512 && Rj(b2);
        } catch (r2) {
          W(b2, b2.return, r2);
        }
      }
      if (b2 === a2) {
        V2 = null;
        break;
      }
      c = b2.sibling;
      if (null !== c) {
        c.return = b2.return;
        V2 = c;
        break;
      }
      V2 = b2.return;
    }
  }
  function gk(a2) {
    for (; null !== V2; ) {
      var b2 = V2;
      if (b2 === a2) {
        V2 = null;
        break;
      }
      var c = b2.sibling;
      if (null !== c) {
        c.return = b2.return;
        V2 = c;
        break;
      }
      V2 = b2.return;
    }
  }
  function jk(a2) {
    for (; null !== V2; ) {
      var b2 = V2;
      try {
        switch (b2.tag) {
          case 0:
          case 11:
          case 15:
            var c = b2.return;
            try {
              Qj(4, b2);
            } catch (k2) {
              W(b2, c, k2);
            }
            break;
          case 1:
            var d2 = b2.stateNode;
            if ("function" === typeof d2.componentDidMount) {
              var e2 = b2.return;
              try {
                d2.componentDidMount();
              } catch (k2) {
                W(b2, e2, k2);
              }
            }
            var f2 = b2.return;
            try {
              Rj(b2);
            } catch (k2) {
              W(b2, f2, k2);
            }
            break;
          case 5:
            var g2 = b2.return;
            try {
              Rj(b2);
            } catch (k2) {
              W(b2, g2, k2);
            }
        }
      } catch (k2) {
        W(b2, b2.return, k2);
      }
      if (b2 === a2) {
        V2 = null;
        break;
      }
      var h2 = b2.sibling;
      if (null !== h2) {
        h2.return = b2.return;
        V2 = h2;
        break;
      }
      V2 = b2.return;
    }
  }
  var lk = Math.ceil, mk = ua.ReactCurrentDispatcher, nk = ua.ReactCurrentOwner, ok = ua.ReactCurrentBatchConfig, K = 0, Q2 = null, Y = null, Z2 = 0, fj = 0, ej = Uf(0), T2 = 0, pk = null, rh = 0, qk = 0, rk = 0, sk = null, tk = null, fk = 0, Gj = Infinity, uk = null, Oi = false, Pi = null, Ri = null, vk = false, wk = null, xk = 0, yk = 0, zk = null, Ak = -1, Bk = 0;
  function R2() {
    return 0 !== (K & 6) ? B3() : -1 !== Ak ? Ak : Ak = B3();
  }
  function yi(a2) {
    if (0 === (a2.mode & 1)) return 1;
    if (0 !== (K & 2) && 0 !== Z2) return Z2 & -Z2;
    if (null !== Kg.transition) return 0 === Bk && (Bk = yc()), Bk;
    a2 = C2;
    if (0 !== a2) return a2;
    a2 = window.event;
    a2 = void 0 === a2 ? 16 : jd(a2.type);
    return a2;
  }
  function gi(a2, b2, c, d2) {
    if (50 < yk) throw yk = 0, zk = null, Error(p2(185));
    Ac(a2, c, d2);
    if (0 === (K & 2) || a2 !== Q2) a2 === Q2 && (0 === (K & 2) && (qk |= c), 4 === T2 && Ck(a2, Z2)), Dk(a2, d2), 1 === c && 0 === K && 0 === (b2.mode & 1) && (Gj = B3() + 500, fg && jg());
  }
  function Dk(a2, b2) {
    var c = a2.callbackNode;
    wc(a2, b2);
    var d2 = uc(a2, a2 === Q2 ? Z2 : 0);
    if (0 === d2) null !== c && bc(c), a2.callbackNode = null, a2.callbackPriority = 0;
    else if (b2 = d2 & -d2, a2.callbackPriority !== b2) {
      null != c && bc(c);
      if (1 === b2) 0 === a2.tag ? ig(Ek.bind(null, a2)) : hg(Ek.bind(null, a2)), Jf(function() {
        0 === (K & 6) && jg();
      }), c = null;
      else {
        switch (Dc(d2)) {
          case 1:
            c = fc;
            break;
          case 4:
            c = gc;
            break;
          case 16:
            c = hc;
            break;
          case 536870912:
            c = jc;
            break;
          default:
            c = hc;
        }
        c = Fk(c, Gk.bind(null, a2));
      }
      a2.callbackPriority = b2;
      a2.callbackNode = c;
    }
  }
  function Gk(a2, b2) {
    Ak = -1;
    Bk = 0;
    if (0 !== (K & 6)) throw Error(p2(327));
    var c = a2.callbackNode;
    if (Hk() && a2.callbackNode !== c) return null;
    var d2 = uc(a2, a2 === Q2 ? Z2 : 0);
    if (0 === d2) return null;
    if (0 !== (d2 & 30) || 0 !== (d2 & a2.expiredLanes) || b2) b2 = Ik(a2, d2);
    else {
      b2 = d2;
      var e2 = K;
      K |= 2;
      var f2 = Jk();
      if (Q2 !== a2 || Z2 !== b2) uk = null, Gj = B3() + 500, Kk(a2, b2);
      do
        try {
          Lk();
          break;
        } catch (h2) {
          Mk(a2, h2);
        }
      while (1);
      $g();
      mk.current = f2;
      K = e2;
      null !== Y ? b2 = 0 : (Q2 = null, Z2 = 0, b2 = T2);
    }
    if (0 !== b2) {
      2 === b2 && (e2 = xc(a2), 0 !== e2 && (d2 = e2, b2 = Nk(a2, e2)));
      if (1 === b2) throw c = pk, Kk(a2, 0), Ck(a2, d2), Dk(a2, B3()), c;
      if (6 === b2) Ck(a2, d2);
      else {
        e2 = a2.current.alternate;
        if (0 === (d2 & 30) && !Ok(e2) && (b2 = Ik(a2, d2), 2 === b2 && (f2 = xc(a2), 0 !== f2 && (d2 = f2, b2 = Nk(a2, f2))), 1 === b2)) throw c = pk, Kk(a2, 0), Ck(a2, d2), Dk(a2, B3()), c;
        a2.finishedWork = e2;
        a2.finishedLanes = d2;
        switch (b2) {
          case 0:
          case 1:
            throw Error(p2(345));
          case 2:
            Pk(a2, tk, uk);
            break;
          case 3:
            Ck(a2, d2);
            if ((d2 & 130023424) === d2 && (b2 = fk + 500 - B3(), 10 < b2)) {
              if (0 !== uc(a2, 0)) break;
              e2 = a2.suspendedLanes;
              if ((e2 & d2) !== d2) {
                R2();
                a2.pingedLanes |= a2.suspendedLanes & e2;
                break;
              }
              a2.timeoutHandle = Ff(Pk.bind(null, a2, tk, uk), b2);
              break;
            }
            Pk(a2, tk, uk);
            break;
          case 4:
            Ck(a2, d2);
            if ((d2 & 4194240) === d2) break;
            b2 = a2.eventTimes;
            for (e2 = -1; 0 < d2; ) {
              var g2 = 31 - oc(d2);
              f2 = 1 << g2;
              g2 = b2[g2];
              g2 > e2 && (e2 = g2);
              d2 &= ~f2;
            }
            d2 = e2;
            d2 = B3() - d2;
            d2 = (120 > d2 ? 120 : 480 > d2 ? 480 : 1080 > d2 ? 1080 : 1920 > d2 ? 1920 : 3e3 > d2 ? 3e3 : 4320 > d2 ? 4320 : 1960 * lk(d2 / 1960)) - d2;
            if (10 < d2) {
              a2.timeoutHandle = Ff(Pk.bind(null, a2, tk, uk), d2);
              break;
            }
            Pk(a2, tk, uk);
            break;
          case 5:
            Pk(a2, tk, uk);
            break;
          default:
            throw Error(p2(329));
        }
      }
    }
    Dk(a2, B3());
    return a2.callbackNode === c ? Gk.bind(null, a2) : null;
  }
  function Nk(a2, b2) {
    var c = sk;
    a2.current.memoizedState.isDehydrated && (Kk(a2, b2).flags |= 256);
    a2 = Ik(a2, b2);
    2 !== a2 && (b2 = tk, tk = c, null !== b2 && Fj(b2));
    return a2;
  }
  function Fj(a2) {
    null === tk ? tk = a2 : tk.push.apply(tk, a2);
  }
  function Ok(a2) {
    for (var b2 = a2; ; ) {
      if (b2.flags & 16384) {
        var c = b2.updateQueue;
        if (null !== c && (c = c.stores, null !== c)) for (var d2 = 0; d2 < c.length; d2++) {
          var e2 = c[d2], f2 = e2.getSnapshot;
          e2 = e2.value;
          try {
            if (!He(f2(), e2)) return false;
          } catch (g2) {
            return false;
          }
        }
      }
      c = b2.child;
      if (b2.subtreeFlags & 16384 && null !== c) c.return = b2, b2 = c;
      else {
        if (b2 === a2) break;
        for (; null === b2.sibling; ) {
          if (null === b2.return || b2.return === a2) return true;
          b2 = b2.return;
        }
        b2.sibling.return = b2.return;
        b2 = b2.sibling;
      }
    }
    return true;
  }
  function Ck(a2, b2) {
    b2 &= ~rk;
    b2 &= ~qk;
    a2.suspendedLanes |= b2;
    a2.pingedLanes &= ~b2;
    for (a2 = a2.expirationTimes; 0 < b2; ) {
      var c = 31 - oc(b2), d2 = 1 << c;
      a2[c] = -1;
      b2 &= ~d2;
    }
  }
  function Ek(a2) {
    if (0 !== (K & 6)) throw Error(p2(327));
    Hk();
    var b2 = uc(a2, 0);
    if (0 === (b2 & 1)) return Dk(a2, B3()), null;
    var c = Ik(a2, b2);
    if (0 !== a2.tag && 2 === c) {
      var d2 = xc(a2);
      0 !== d2 && (b2 = d2, c = Nk(a2, d2));
    }
    if (1 === c) throw c = pk, Kk(a2, 0), Ck(a2, b2), Dk(a2, B3()), c;
    if (6 === c) throw Error(p2(345));
    a2.finishedWork = a2.current.alternate;
    a2.finishedLanes = b2;
    Pk(a2, tk, uk);
    Dk(a2, B3());
    return null;
  }
  function Qk(a2, b2) {
    var c = K;
    K |= 1;
    try {
      return a2(b2);
    } finally {
      K = c, 0 === K && (Gj = B3() + 500, fg && jg());
    }
  }
  function Rk(a2) {
    null !== wk && 0 === wk.tag && 0 === (K & 6) && Hk();
    var b2 = K;
    K |= 1;
    var c = ok.transition, d2 = C2;
    try {
      if (ok.transition = null, C2 = 1, a2) return a2();
    } finally {
      C2 = d2, ok.transition = c, K = b2, 0 === (K & 6) && jg();
    }
  }
  function Hj() {
    fj = ej.current;
    E2(ej);
  }
  function Kk(a2, b2) {
    a2.finishedWork = null;
    a2.finishedLanes = 0;
    var c = a2.timeoutHandle;
    -1 !== c && (a2.timeoutHandle = -1, Gf(c));
    if (null !== Y) for (c = Y.return; null !== c; ) {
      var d2 = c;
      wg(d2);
      switch (d2.tag) {
        case 1:
          d2 = d2.type.childContextTypes;
          null !== d2 && void 0 !== d2 && $f();
          break;
        case 3:
          zh();
          E2(Wf);
          E2(H4);
          Eh();
          break;
        case 5:
          Bh(d2);
          break;
        case 4:
          zh();
          break;
        case 13:
          E2(L2);
          break;
        case 19:
          E2(L2);
          break;
        case 10:
          ah(d2.type._context);
          break;
        case 22:
        case 23:
          Hj();
      }
      c = c.return;
    }
    Q2 = a2;
    Y = a2 = Pg(a2.current, null);
    Z2 = fj = b2;
    T2 = 0;
    pk = null;
    rk = qk = rh = 0;
    tk = sk = null;
    if (null !== fh) {
      for (b2 = 0; b2 < fh.length; b2++) if (c = fh[b2], d2 = c.interleaved, null !== d2) {
        c.interleaved = null;
        var e2 = d2.next, f2 = c.pending;
        if (null !== f2) {
          var g2 = f2.next;
          f2.next = e2;
          d2.next = g2;
        }
        c.pending = d2;
      }
      fh = null;
    }
    return a2;
  }
  function Mk(a2, b2) {
    do {
      var c = Y;
      try {
        $g();
        Fh.current = Rh;
        if (Ih) {
          for (var d2 = M2.memoizedState; null !== d2; ) {
            var e2 = d2.queue;
            null !== e2 && (e2.pending = null);
            d2 = d2.next;
          }
          Ih = false;
        }
        Hh = 0;
        O2 = N2 = M2 = null;
        Jh = false;
        Kh = 0;
        nk.current = null;
        if (null === c || null === c.return) {
          T2 = 1;
          pk = b2;
          Y = null;
          break;
        }
        a: {
          var f2 = a2, g2 = c.return, h2 = c, k2 = b2;
          b2 = Z2;
          h2.flags |= 32768;
          if (null !== k2 && "object" === typeof k2 && "function" === typeof k2.then) {
            var l = k2, m2 = h2, q2 = m2.tag;
            if (0 === (m2.mode & 1) && (0 === q2 || 11 === q2 || 15 === q2)) {
              var r2 = m2.alternate;
              r2 ? (m2.updateQueue = r2.updateQueue, m2.memoizedState = r2.memoizedState, m2.lanes = r2.lanes) : (m2.updateQueue = null, m2.memoizedState = null);
            }
            var y2 = Ui(g2);
            if (null !== y2) {
              y2.flags &= -257;
              Vi(y2, g2, h2, f2, b2);
              y2.mode & 1 && Si(f2, l, b2);
              b2 = y2;
              k2 = l;
              var n = b2.updateQueue;
              if (null === n) {
                var t = /* @__PURE__ */ new Set();
                t.add(k2);
                b2.updateQueue = t;
              } else n.add(k2);
              break a;
            } else {
              if (0 === (b2 & 1)) {
                Si(f2, l, b2);
                tj();
                break a;
              }
              k2 = Error(p2(426));
            }
          } else if (I2 && h2.mode & 1) {
            var J = Ui(g2);
            if (null !== J) {
              0 === (J.flags & 65536) && (J.flags |= 256);
              Vi(J, g2, h2, f2, b2);
              Jg(Ji(k2, h2));
              break a;
            }
          }
          f2 = k2 = Ji(k2, h2);
          4 !== T2 && (T2 = 2);
          null === sk ? sk = [f2] : sk.push(f2);
          f2 = g2;
          do {
            switch (f2.tag) {
              case 3:
                f2.flags |= 65536;
                b2 &= -b2;
                f2.lanes |= b2;
                var x = Ni(f2, k2, b2);
                ph(f2, x);
                break a;
              case 1:
                h2 = k2;
                var w = f2.type, u2 = f2.stateNode;
                if (0 === (f2.flags & 128) && ("function" === typeof w.getDerivedStateFromError || null !== u2 && "function" === typeof u2.componentDidCatch && (null === Ri || !Ri.has(u2)))) {
                  f2.flags |= 65536;
                  b2 &= -b2;
                  f2.lanes |= b2;
                  var F2 = Qi(f2, h2, b2);
                  ph(f2, F2);
                  break a;
                }
            }
            f2 = f2.return;
          } while (null !== f2);
        }
        Sk(c);
      } catch (na) {
        b2 = na;
        Y === c && null !== c && (Y = c = c.return);
        continue;
      }
      break;
    } while (1);
  }
  function Jk() {
    var a2 = mk.current;
    mk.current = Rh;
    return null === a2 ? Rh : a2;
  }
  function tj() {
    if (0 === T2 || 3 === T2 || 2 === T2) T2 = 4;
    null === Q2 || 0 === (rh & 268435455) && 0 === (qk & 268435455) || Ck(Q2, Z2);
  }
  function Ik(a2, b2) {
    var c = K;
    K |= 2;
    var d2 = Jk();
    if (Q2 !== a2 || Z2 !== b2) uk = null, Kk(a2, b2);
    do
      try {
        Tk();
        break;
      } catch (e2) {
        Mk(a2, e2);
      }
    while (1);
    $g();
    K = c;
    mk.current = d2;
    if (null !== Y) throw Error(p2(261));
    Q2 = null;
    Z2 = 0;
    return T2;
  }
  function Tk() {
    for (; null !== Y; ) Uk(Y);
  }
  function Lk() {
    for (; null !== Y && !cc(); ) Uk(Y);
  }
  function Uk(a2) {
    var b2 = Vk(a2.alternate, a2, fj);
    a2.memoizedProps = a2.pendingProps;
    null === b2 ? Sk(a2) : Y = b2;
    nk.current = null;
  }
  function Sk(a2) {
    var b2 = a2;
    do {
      var c = b2.alternate;
      a2 = b2.return;
      if (0 === (b2.flags & 32768)) {
        if (c = Ej(c, b2, fj), null !== c) {
          Y = c;
          return;
        }
      } else {
        c = Ij(c, b2);
        if (null !== c) {
          c.flags &= 32767;
          Y = c;
          return;
        }
        if (null !== a2) a2.flags |= 32768, a2.subtreeFlags = 0, a2.deletions = null;
        else {
          T2 = 6;
          Y = null;
          return;
        }
      }
      b2 = b2.sibling;
      if (null !== b2) {
        Y = b2;
        return;
      }
      Y = b2 = a2;
    } while (null !== b2);
    0 === T2 && (T2 = 5);
  }
  function Pk(a2, b2, c) {
    var d2 = C2, e2 = ok.transition;
    try {
      ok.transition = null, C2 = 1, Wk(a2, b2, c, d2);
    } finally {
      ok.transition = e2, C2 = d2;
    }
    return null;
  }
  function Wk(a2, b2, c, d2) {
    do
      Hk();
    while (null !== wk);
    if (0 !== (K & 6)) throw Error(p2(327));
    c = a2.finishedWork;
    var e2 = a2.finishedLanes;
    if (null === c) return null;
    a2.finishedWork = null;
    a2.finishedLanes = 0;
    if (c === a2.current) throw Error(p2(177));
    a2.callbackNode = null;
    a2.callbackPriority = 0;
    var f2 = c.lanes | c.childLanes;
    Bc(a2, f2);
    a2 === Q2 && (Y = Q2 = null, Z2 = 0);
    0 === (c.subtreeFlags & 2064) && 0 === (c.flags & 2064) || vk || (vk = true, Fk(hc, function() {
      Hk();
      return null;
    }));
    f2 = 0 !== (c.flags & 15990);
    if (0 !== (c.subtreeFlags & 15990) || f2) {
      f2 = ok.transition;
      ok.transition = null;
      var g2 = C2;
      C2 = 1;
      var h2 = K;
      K |= 4;
      nk.current = null;
      Oj(a2, c);
      dk(c, a2);
      Oe(Df);
      dd = !!Cf;
      Df = Cf = null;
      a2.current = c;
      hk(c);
      dc();
      K = h2;
      C2 = g2;
      ok.transition = f2;
    } else a2.current = c;
    vk && (vk = false, wk = a2, xk = e2);
    f2 = a2.pendingLanes;
    0 === f2 && (Ri = null);
    mc(c.stateNode);
    Dk(a2, B3());
    if (null !== b2) for (d2 = a2.onRecoverableError, c = 0; c < b2.length; c++) e2 = b2[c], d2(e2.value, { componentStack: e2.stack, digest: e2.digest });
    if (Oi) throw Oi = false, a2 = Pi, Pi = null, a2;
    0 !== (xk & 1) && 0 !== a2.tag && Hk();
    f2 = a2.pendingLanes;
    0 !== (f2 & 1) ? a2 === zk ? yk++ : (yk = 0, zk = a2) : yk = 0;
    jg();
    return null;
  }
  function Hk() {
    if (null !== wk) {
      var a2 = Dc(xk), b2 = ok.transition, c = C2;
      try {
        ok.transition = null;
        C2 = 16 > a2 ? 16 : a2;
        if (null === wk) var d2 = false;
        else {
          a2 = wk;
          wk = null;
          xk = 0;
          if (0 !== (K & 6)) throw Error(p2(331));
          var e2 = K;
          K |= 4;
          for (V2 = a2.current; null !== V2; ) {
            var f2 = V2, g2 = f2.child;
            if (0 !== (V2.flags & 16)) {
              var h2 = f2.deletions;
              if (null !== h2) {
                for (var k2 = 0; k2 < h2.length; k2++) {
                  var l = h2[k2];
                  for (V2 = l; null !== V2; ) {
                    var m2 = V2;
                    switch (m2.tag) {
                      case 0:
                      case 11:
                      case 15:
                        Pj(8, m2, f2);
                    }
                    var q2 = m2.child;
                    if (null !== q2) q2.return = m2, V2 = q2;
                    else for (; null !== V2; ) {
                      m2 = V2;
                      var r2 = m2.sibling, y2 = m2.return;
                      Sj(m2);
                      if (m2 === l) {
                        V2 = null;
                        break;
                      }
                      if (null !== r2) {
                        r2.return = y2;
                        V2 = r2;
                        break;
                      }
                      V2 = y2;
                    }
                  }
                }
                var n = f2.alternate;
                if (null !== n) {
                  var t = n.child;
                  if (null !== t) {
                    n.child = null;
                    do {
                      var J = t.sibling;
                      t.sibling = null;
                      t = J;
                    } while (null !== t);
                  }
                }
                V2 = f2;
              }
            }
            if (0 !== (f2.subtreeFlags & 2064) && null !== g2) g2.return = f2, V2 = g2;
            else b: for (; null !== V2; ) {
              f2 = V2;
              if (0 !== (f2.flags & 2048)) switch (f2.tag) {
                case 0:
                case 11:
                case 15:
                  Pj(9, f2, f2.return);
              }
              var x = f2.sibling;
              if (null !== x) {
                x.return = f2.return;
                V2 = x;
                break b;
              }
              V2 = f2.return;
            }
          }
          var w = a2.current;
          for (V2 = w; null !== V2; ) {
            g2 = V2;
            var u2 = g2.child;
            if (0 !== (g2.subtreeFlags & 2064) && null !== u2) u2.return = g2, V2 = u2;
            else b: for (g2 = w; null !== V2; ) {
              h2 = V2;
              if (0 !== (h2.flags & 2048)) try {
                switch (h2.tag) {
                  case 0:
                  case 11:
                  case 15:
                    Qj(9, h2);
                }
              } catch (na) {
                W(h2, h2.return, na);
              }
              if (h2 === g2) {
                V2 = null;
                break b;
              }
              var F2 = h2.sibling;
              if (null !== F2) {
                F2.return = h2.return;
                V2 = F2;
                break b;
              }
              V2 = h2.return;
            }
          }
          K = e2;
          jg();
          if (lc && "function" === typeof lc.onPostCommitFiberRoot) try {
            lc.onPostCommitFiberRoot(kc, a2);
          } catch (na) {
          }
          d2 = true;
        }
        return d2;
      } finally {
        C2 = c, ok.transition = b2;
      }
    }
    return false;
  }
  function Xk(a2, b2, c) {
    b2 = Ji(c, b2);
    b2 = Ni(a2, b2, 1);
    a2 = nh(a2, b2, 1);
    b2 = R2();
    null !== a2 && (Ac(a2, 1, b2), Dk(a2, b2));
  }
  function W(a2, b2, c) {
    if (3 === a2.tag) Xk(a2, a2, c);
    else for (; null !== b2; ) {
      if (3 === b2.tag) {
        Xk(b2, a2, c);
        break;
      } else if (1 === b2.tag) {
        var d2 = b2.stateNode;
        if ("function" === typeof b2.type.getDerivedStateFromError || "function" === typeof d2.componentDidCatch && (null === Ri || !Ri.has(d2))) {
          a2 = Ji(c, a2);
          a2 = Qi(b2, a2, 1);
          b2 = nh(b2, a2, 1);
          a2 = R2();
          null !== b2 && (Ac(b2, 1, a2), Dk(b2, a2));
          break;
        }
      }
      b2 = b2.return;
    }
  }
  function Ti(a2, b2, c) {
    var d2 = a2.pingCache;
    null !== d2 && d2.delete(b2);
    b2 = R2();
    a2.pingedLanes |= a2.suspendedLanes & c;
    Q2 === a2 && (Z2 & c) === c && (4 === T2 || 3 === T2 && (Z2 & 130023424) === Z2 && 500 > B3() - fk ? Kk(a2, 0) : rk |= c);
    Dk(a2, b2);
  }
  function Yk(a2, b2) {
    0 === b2 && (0 === (a2.mode & 1) ? b2 = 1 : (b2 = sc, sc <<= 1, 0 === (sc & 130023424) && (sc = 4194304)));
    var c = R2();
    a2 = ih(a2, b2);
    null !== a2 && (Ac(a2, b2, c), Dk(a2, c));
  }
  function uj(a2) {
    var b2 = a2.memoizedState, c = 0;
    null !== b2 && (c = b2.retryLane);
    Yk(a2, c);
  }
  function bk(a2, b2) {
    var c = 0;
    switch (a2.tag) {
      case 13:
        var d2 = a2.stateNode;
        var e2 = a2.memoizedState;
        null !== e2 && (c = e2.retryLane);
        break;
      case 19:
        d2 = a2.stateNode;
        break;
      default:
        throw Error(p2(314));
    }
    null !== d2 && d2.delete(b2);
    Yk(a2, c);
  }
  var Vk;
  Vk = function(a2, b2, c) {
    if (null !== a2) if (a2.memoizedProps !== b2.pendingProps || Wf.current) dh = true;
    else {
      if (0 === (a2.lanes & c) && 0 === (b2.flags & 128)) return dh = false, yj(a2, b2, c);
      dh = 0 !== (a2.flags & 131072) ? true : false;
    }
    else dh = false, I2 && 0 !== (b2.flags & 1048576) && ug(b2, ng, b2.index);
    b2.lanes = 0;
    switch (b2.tag) {
      case 2:
        var d2 = b2.type;
        ij(a2, b2);
        a2 = b2.pendingProps;
        var e2 = Yf(b2, H4.current);
        ch(b2, c);
        e2 = Nh(null, b2, d2, a2, e2, c);
        var f2 = Sh();
        b2.flags |= 1;
        "object" === typeof e2 && null !== e2 && "function" === typeof e2.render && void 0 === e2.$$typeof ? (b2.tag = 1, b2.memoizedState = null, b2.updateQueue = null, Zf(d2) ? (f2 = true, cg(b2)) : f2 = false, b2.memoizedState = null !== e2.state && void 0 !== e2.state ? e2.state : null, kh(b2), e2.updater = Ei, b2.stateNode = e2, e2._reactInternals = b2, Ii(b2, d2, a2, c), b2 = jj(null, b2, d2, true, f2, c)) : (b2.tag = 0, I2 && f2 && vg(b2), Xi(null, b2, e2, c), b2 = b2.child);
        return b2;
      case 16:
        d2 = b2.elementType;
        a: {
          ij(a2, b2);
          a2 = b2.pendingProps;
          e2 = d2._init;
          d2 = e2(d2._payload);
          b2.type = d2;
          e2 = b2.tag = Zk(d2);
          a2 = Ci(d2, a2);
          switch (e2) {
            case 0:
              b2 = cj(null, b2, d2, a2, c);
              break a;
            case 1:
              b2 = hj(null, b2, d2, a2, c);
              break a;
            case 11:
              b2 = Yi(null, b2, d2, a2, c);
              break a;
            case 14:
              b2 = $i(null, b2, d2, Ci(d2.type, a2), c);
              break a;
          }
          throw Error(p2(
            306,
            d2,
            ""
          ));
        }
        return b2;
      case 0:
        return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), cj(a2, b2, d2, e2, c);
      case 1:
        return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), hj(a2, b2, d2, e2, c);
      case 3:
        a: {
          kj(b2);
          if (null === a2) throw Error(p2(387));
          d2 = b2.pendingProps;
          f2 = b2.memoizedState;
          e2 = f2.element;
          lh(a2, b2);
          qh(b2, d2, null, c);
          var g2 = b2.memoizedState;
          d2 = g2.element;
          if (f2.isDehydrated) if (f2 = { element: d2, isDehydrated: false, cache: g2.cache, pendingSuspenseBoundaries: g2.pendingSuspenseBoundaries, transitions: g2.transitions }, b2.updateQueue.baseState = f2, b2.memoizedState = f2, b2.flags & 256) {
            e2 = Ji(Error(p2(423)), b2);
            b2 = lj(a2, b2, d2, c, e2);
            break a;
          } else if (d2 !== e2) {
            e2 = Ji(Error(p2(424)), b2);
            b2 = lj(a2, b2, d2, c, e2);
            break a;
          } else for (yg = Lf(b2.stateNode.containerInfo.firstChild), xg = b2, I2 = true, zg = null, c = Vg(b2, null, d2, c), b2.child = c; c; ) c.flags = c.flags & -3 | 4096, c = c.sibling;
          else {
            Ig();
            if (d2 === e2) {
              b2 = Zi(a2, b2, c);
              break a;
            }
            Xi(a2, b2, d2, c);
          }
          b2 = b2.child;
        }
        return b2;
      case 5:
        return Ah(b2), null === a2 && Eg(b2), d2 = b2.type, e2 = b2.pendingProps, f2 = null !== a2 ? a2.memoizedProps : null, g2 = e2.children, Ef(d2, e2) ? g2 = null : null !== f2 && Ef(d2, f2) && (b2.flags |= 32), gj(a2, b2), Xi(a2, b2, g2, c), b2.child;
      case 6:
        return null === a2 && Eg(b2), null;
      case 13:
        return oj(a2, b2, c);
      case 4:
        return yh(b2, b2.stateNode.containerInfo), d2 = b2.pendingProps, null === a2 ? b2.child = Ug(b2, null, d2, c) : Xi(a2, b2, d2, c), b2.child;
      case 11:
        return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), Yi(a2, b2, d2, e2, c);
      case 7:
        return Xi(a2, b2, b2.pendingProps, c), b2.child;
      case 8:
        return Xi(a2, b2, b2.pendingProps.children, c), b2.child;
      case 12:
        return Xi(a2, b2, b2.pendingProps.children, c), b2.child;
      case 10:
        a: {
          d2 = b2.type._context;
          e2 = b2.pendingProps;
          f2 = b2.memoizedProps;
          g2 = e2.value;
          G(Wg, d2._currentValue);
          d2._currentValue = g2;
          if (null !== f2) if (He(f2.value, g2)) {
            if (f2.children === e2.children && !Wf.current) {
              b2 = Zi(a2, b2, c);
              break a;
            }
          } else for (f2 = b2.child, null !== f2 && (f2.return = b2); null !== f2; ) {
            var h2 = f2.dependencies;
            if (null !== h2) {
              g2 = f2.child;
              for (var k2 = h2.firstContext; null !== k2; ) {
                if (k2.context === d2) {
                  if (1 === f2.tag) {
                    k2 = mh(-1, c & -c);
                    k2.tag = 2;
                    var l = f2.updateQueue;
                    if (null !== l) {
                      l = l.shared;
                      var m2 = l.pending;
                      null === m2 ? k2.next = k2 : (k2.next = m2.next, m2.next = k2);
                      l.pending = k2;
                    }
                  }
                  f2.lanes |= c;
                  k2 = f2.alternate;
                  null !== k2 && (k2.lanes |= c);
                  bh(
                    f2.return,
                    c,
                    b2
                  );
                  h2.lanes |= c;
                  break;
                }
                k2 = k2.next;
              }
            } else if (10 === f2.tag) g2 = f2.type === b2.type ? null : f2.child;
            else if (18 === f2.tag) {
              g2 = f2.return;
              if (null === g2) throw Error(p2(341));
              g2.lanes |= c;
              h2 = g2.alternate;
              null !== h2 && (h2.lanes |= c);
              bh(g2, c, b2);
              g2 = f2.sibling;
            } else g2 = f2.child;
            if (null !== g2) g2.return = f2;
            else for (g2 = f2; null !== g2; ) {
              if (g2 === b2) {
                g2 = null;
                break;
              }
              f2 = g2.sibling;
              if (null !== f2) {
                f2.return = g2.return;
                g2 = f2;
                break;
              }
              g2 = g2.return;
            }
            f2 = g2;
          }
          Xi(a2, b2, e2.children, c);
          b2 = b2.child;
        }
        return b2;
      case 9:
        return e2 = b2.type, d2 = b2.pendingProps.children, ch(b2, c), e2 = eh(e2), d2 = d2(e2), b2.flags |= 1, Xi(a2, b2, d2, c), b2.child;
      case 14:
        return d2 = b2.type, e2 = Ci(d2, b2.pendingProps), e2 = Ci(d2.type, e2), $i(a2, b2, d2, e2, c);
      case 15:
        return bj(a2, b2, b2.type, b2.pendingProps, c);
      case 17:
        return d2 = b2.type, e2 = b2.pendingProps, e2 = b2.elementType === d2 ? e2 : Ci(d2, e2), ij(a2, b2), b2.tag = 1, Zf(d2) ? (a2 = true, cg(b2)) : a2 = false, ch(b2, c), Gi(b2, d2, e2), Ii(b2, d2, e2, c), jj(null, b2, d2, true, a2, c);
      case 19:
        return xj(a2, b2, c);
      case 22:
        return dj(a2, b2, c);
    }
    throw Error(p2(156, b2.tag));
  };
  function Fk(a2, b2) {
    return ac(a2, b2);
  }
  function $k(a2, b2, c, d2) {
    this.tag = a2;
    this.key = c;
    this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null;
    this.index = 0;
    this.ref = null;
    this.pendingProps = b2;
    this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null;
    this.mode = d2;
    this.subtreeFlags = this.flags = 0;
    this.deletions = null;
    this.childLanes = this.lanes = 0;
    this.alternate = null;
  }
  function Bg(a2, b2, c, d2) {
    return new $k(a2, b2, c, d2);
  }
  function aj(a2) {
    a2 = a2.prototype;
    return !(!a2 || !a2.isReactComponent);
  }
  function Zk(a2) {
    if ("function" === typeof a2) return aj(a2) ? 1 : 0;
    if (void 0 !== a2 && null !== a2) {
      a2 = a2.$$typeof;
      if (a2 === Da) return 11;
      if (a2 === Ga) return 14;
    }
    return 2;
  }
  function Pg(a2, b2) {
    var c = a2.alternate;
    null === c ? (c = Bg(a2.tag, b2, a2.key, a2.mode), c.elementType = a2.elementType, c.type = a2.type, c.stateNode = a2.stateNode, c.alternate = a2, a2.alternate = c) : (c.pendingProps = b2, c.type = a2.type, c.flags = 0, c.subtreeFlags = 0, c.deletions = null);
    c.flags = a2.flags & 14680064;
    c.childLanes = a2.childLanes;
    c.lanes = a2.lanes;
    c.child = a2.child;
    c.memoizedProps = a2.memoizedProps;
    c.memoizedState = a2.memoizedState;
    c.updateQueue = a2.updateQueue;
    b2 = a2.dependencies;
    c.dependencies = null === b2 ? null : { lanes: b2.lanes, firstContext: b2.firstContext };
    c.sibling = a2.sibling;
    c.index = a2.index;
    c.ref = a2.ref;
    return c;
  }
  function Rg(a2, b2, c, d2, e2, f2) {
    var g2 = 2;
    d2 = a2;
    if ("function" === typeof a2) aj(a2) && (g2 = 1);
    else if ("string" === typeof a2) g2 = 5;
    else a: switch (a2) {
      case ya:
        return Tg(c.children, e2, f2, b2);
      case za:
        g2 = 8;
        e2 |= 8;
        break;
      case Aa:
        return a2 = Bg(12, c, b2, e2 | 2), a2.elementType = Aa, a2.lanes = f2, a2;
      case Ea:
        return a2 = Bg(13, c, b2, e2), a2.elementType = Ea, a2.lanes = f2, a2;
      case Fa:
        return a2 = Bg(19, c, b2, e2), a2.elementType = Fa, a2.lanes = f2, a2;
      case Ia:
        return pj(c, e2, f2, b2);
      default:
        if ("object" === typeof a2 && null !== a2) switch (a2.$$typeof) {
          case Ba:
            g2 = 10;
            break a;
          case Ca:
            g2 = 9;
            break a;
          case Da:
            g2 = 11;
            break a;
          case Ga:
            g2 = 14;
            break a;
          case Ha:
            g2 = 16;
            d2 = null;
            break a;
        }
        throw Error(p2(130, null == a2 ? a2 : typeof a2, ""));
    }
    b2 = Bg(g2, c, b2, e2);
    b2.elementType = a2;
    b2.type = d2;
    b2.lanes = f2;
    return b2;
  }
  function Tg(a2, b2, c, d2) {
    a2 = Bg(7, a2, d2, b2);
    a2.lanes = c;
    return a2;
  }
  function pj(a2, b2, c, d2) {
    a2 = Bg(22, a2, d2, b2);
    a2.elementType = Ia;
    a2.lanes = c;
    a2.stateNode = { isHidden: false };
    return a2;
  }
  function Qg(a2, b2, c) {
    a2 = Bg(6, a2, null, b2);
    a2.lanes = c;
    return a2;
  }
  function Sg(a2, b2, c) {
    b2 = Bg(4, null !== a2.children ? a2.children : [], a2.key, b2);
    b2.lanes = c;
    b2.stateNode = { containerInfo: a2.containerInfo, pendingChildren: null, implementation: a2.implementation };
    return b2;
  }
  function al(a2, b2, c, d2, e2) {
    this.tag = b2;
    this.containerInfo = a2;
    this.finishedWork = this.pingCache = this.current = this.pendingChildren = null;
    this.timeoutHandle = -1;
    this.callbackNode = this.pendingContext = this.context = null;
    this.callbackPriority = 0;
    this.eventTimes = zc(0);
    this.expirationTimes = zc(-1);
    this.entangledLanes = this.finishedLanes = this.mutableReadLanes = this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes = 0;
    this.entanglements = zc(0);
    this.identifierPrefix = d2;
    this.onRecoverableError = e2;
    this.mutableSourceEagerHydrationData = null;
  }
  function bl(a2, b2, c, d2, e2, f2, g2, h2, k2) {
    a2 = new al(a2, b2, c, h2, k2);
    1 === b2 ? (b2 = 1, true === f2 && (b2 |= 8)) : b2 = 0;
    f2 = Bg(3, null, null, b2);
    a2.current = f2;
    f2.stateNode = a2;
    f2.memoizedState = { element: d2, isDehydrated: c, cache: null, transitions: null, pendingSuspenseBoundaries: null };
    kh(f2);
    return a2;
  }
  function cl(a2, b2, c) {
    var d2 = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
    return { $$typeof: wa, key: null == d2 ? null : "" + d2, children: a2, containerInfo: b2, implementation: c };
  }
  function dl(a2) {
    if (!a2) return Vf;
    a2 = a2._reactInternals;
    a: {
      if (Vb(a2) !== a2 || 1 !== a2.tag) throw Error(p2(170));
      var b2 = a2;
      do {
        switch (b2.tag) {
          case 3:
            b2 = b2.stateNode.context;
            break a;
          case 1:
            if (Zf(b2.type)) {
              b2 = b2.stateNode.__reactInternalMemoizedMergedChildContext;
              break a;
            }
        }
        b2 = b2.return;
      } while (null !== b2);
      throw Error(p2(171));
    }
    if (1 === a2.tag) {
      var c = a2.type;
      if (Zf(c)) return bg(a2, c, b2);
    }
    return b2;
  }
  function el(a2, b2, c, d2, e2, f2, g2, h2, k2) {
    a2 = bl(c, d2, true, a2, e2, f2, g2, h2, k2);
    a2.context = dl(null);
    c = a2.current;
    d2 = R2();
    e2 = yi(c);
    f2 = mh(d2, e2);
    f2.callback = void 0 !== b2 && null !== b2 ? b2 : null;
    nh(c, f2, e2);
    a2.current.lanes = e2;
    Ac(a2, e2, d2);
    Dk(a2, d2);
    return a2;
  }
  function fl(a2, b2, c, d2) {
    var e2 = b2.current, f2 = R2(), g2 = yi(e2);
    c = dl(c);
    null === b2.context ? b2.context = c : b2.pendingContext = c;
    b2 = mh(f2, g2);
    b2.payload = { element: a2 };
    d2 = void 0 === d2 ? null : d2;
    null !== d2 && (b2.callback = d2);
    a2 = nh(e2, b2, g2);
    null !== a2 && (gi(a2, e2, g2, f2), oh(a2, e2, g2));
    return g2;
  }
  function gl(a2) {
    a2 = a2.current;
    if (!a2.child) return null;
    switch (a2.child.tag) {
      case 5:
        return a2.child.stateNode;
      default:
        return a2.child.stateNode;
    }
  }
  function hl(a2, b2) {
    a2 = a2.memoizedState;
    if (null !== a2 && null !== a2.dehydrated) {
      var c = a2.retryLane;
      a2.retryLane = 0 !== c && c < b2 ? c : b2;
    }
  }
  function il(a2, b2) {
    hl(a2, b2);
    (a2 = a2.alternate) && hl(a2, b2);
  }
  function jl() {
    return null;
  }
  var kl = "function" === typeof reportError ? reportError : function(a2) {
    console.error(a2);
  };
  function ll(a2) {
    this._internalRoot = a2;
  }
  ml.prototype.render = ll.prototype.render = function(a2) {
    var b2 = this._internalRoot;
    if (null === b2) throw Error(p2(409));
    fl(a2, b2, null, null);
  };
  ml.prototype.unmount = ll.prototype.unmount = function() {
    var a2 = this._internalRoot;
    if (null !== a2) {
      this._internalRoot = null;
      var b2 = a2.containerInfo;
      Rk(function() {
        fl(null, a2, null, null);
      });
      b2[uf] = null;
    }
  };
  function ml(a2) {
    this._internalRoot = a2;
  }
  ml.prototype.unstable_scheduleHydration = function(a2) {
    if (a2) {
      var b2 = Hc();
      a2 = { blockedOn: null, target: a2, priority: b2 };
      for (var c = 0; c < Qc.length && 0 !== b2 && b2 < Qc[c].priority; c++) ;
      Qc.splice(c, 0, a2);
      0 === c && Vc(a2);
    }
  };
  function nl(a2) {
    return !(!a2 || 1 !== a2.nodeType && 9 !== a2.nodeType && 11 !== a2.nodeType);
  }
  function ol(a2) {
    return !(!a2 || 1 !== a2.nodeType && 9 !== a2.nodeType && 11 !== a2.nodeType && (8 !== a2.nodeType || " react-mount-point-unstable " !== a2.nodeValue));
  }
  function pl() {
  }
  function ql(a2, b2, c, d2, e2) {
    if (e2) {
      if ("function" === typeof d2) {
        var f2 = d2;
        d2 = function() {
          var a3 = gl(g2);
          f2.call(a3);
        };
      }
      var g2 = el(b2, d2, a2, 0, null, false, false, "", pl);
      a2._reactRootContainer = g2;
      a2[uf] = g2.current;
      sf(8 === a2.nodeType ? a2.parentNode : a2);
      Rk();
      return g2;
    }
    for (; e2 = a2.lastChild; ) a2.removeChild(e2);
    if ("function" === typeof d2) {
      var h2 = d2;
      d2 = function() {
        var a3 = gl(k2);
        h2.call(a3);
      };
    }
    var k2 = bl(a2, 0, false, null, null, false, false, "", pl);
    a2._reactRootContainer = k2;
    a2[uf] = k2.current;
    sf(8 === a2.nodeType ? a2.parentNode : a2);
    Rk(function() {
      fl(b2, k2, c, d2);
    });
    return k2;
  }
  function rl(a2, b2, c, d2, e2) {
    var f2 = c._reactRootContainer;
    if (f2) {
      var g2 = f2;
      if ("function" === typeof e2) {
        var h2 = e2;
        e2 = function() {
          var a3 = gl(g2);
          h2.call(a3);
        };
      }
      fl(b2, g2, a2, e2);
    } else g2 = ql(c, b2, a2, e2, d2);
    return gl(g2);
  }
  Ec = function(a2) {
    switch (a2.tag) {
      case 3:
        var b2 = a2.stateNode;
        if (b2.current.memoizedState.isDehydrated) {
          var c = tc(b2.pendingLanes);
          0 !== c && (Cc(b2, c | 1), Dk(b2, B3()), 0 === (K & 6) && (Gj = B3() + 500, jg()));
        }
        break;
      case 13:
        Rk(function() {
          var b3 = ih(a2, 1);
          if (null !== b3) {
            var c2 = R2();
            gi(b3, a2, 1, c2);
          }
        }), il(a2, 1);
    }
  };
  Fc = function(a2) {
    if (13 === a2.tag) {
      var b2 = ih(a2, 134217728);
      if (null !== b2) {
        var c = R2();
        gi(b2, a2, 134217728, c);
      }
      il(a2, 134217728);
    }
  };
  Gc = function(a2) {
    if (13 === a2.tag) {
      var b2 = yi(a2), c = ih(a2, b2);
      if (null !== c) {
        var d2 = R2();
        gi(c, a2, b2, d2);
      }
      il(a2, b2);
    }
  };
  Hc = function() {
    return C2;
  };
  Ic = function(a2, b2) {
    var c = C2;
    try {
      return C2 = a2, b2();
    } finally {
      C2 = c;
    }
  };
  yb = function(a2, b2, c) {
    switch (b2) {
      case "input":
        bb(a2, c);
        b2 = c.name;
        if ("radio" === c.type && null != b2) {
          for (c = a2; c.parentNode; ) c = c.parentNode;
          c = c.querySelectorAll("input[name=" + JSON.stringify("" + b2) + '][type="radio"]');
          for (b2 = 0; b2 < c.length; b2++) {
            var d2 = c[b2];
            if (d2 !== a2 && d2.form === a2.form) {
              var e2 = Db(d2);
              if (!e2) throw Error(p2(90));
              Wa(d2);
              bb(d2, e2);
            }
          }
        }
        break;
      case "textarea":
        ib(a2, c);
        break;
      case "select":
        b2 = c.value, null != b2 && fb(a2, !!c.multiple, b2, false);
    }
  };
  Gb = Qk;
  Hb = Rk;
  var sl = { usingClientEntryPoint: false, Events: [Cb, ue, Db, Eb, Fb, Qk] }, tl = { findFiberByHostInstance: Wc, bundleType: 0, version: "18.3.1", rendererPackageName: "react-dom" };
  var ul = { bundleType: tl.bundleType, version: tl.version, rendererPackageName: tl.rendererPackageName, rendererConfig: tl.rendererConfig, overrideHookState: null, overrideHookStateDeletePath: null, overrideHookStateRenamePath: null, overrideProps: null, overridePropsDeletePath: null, overridePropsRenamePath: null, setErrorHandler: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: ua.ReactCurrentDispatcher, findHostInstanceByFiber: function(a2) {
    a2 = Zb(a2);
    return null === a2 ? null : a2.stateNode;
  }, findFiberByHostInstance: tl.findFiberByHostInstance || jl, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, reconcilerVersion: "18.3.1-next-f1338f8080-20240426" };
  if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
    var vl = __REACT_DEVTOOLS_GLOBAL_HOOK__;
    if (!vl.isDisabled && vl.supportsFiber) try {
      kc = vl.inject(ul), lc = vl;
    } catch (a2) {
    }
  }
  reactDom_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = sl;
  reactDom_production_min.createPortal = function(a2, b2) {
    var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;
    if (!nl(b2)) throw Error(p2(200));
    return cl(a2, b2, null, c);
  };
  reactDom_production_min.createRoot = function(a2, b2) {
    if (!nl(a2)) throw Error(p2(299));
    var c = false, d2 = "", e2 = kl;
    null !== b2 && void 0 !== b2 && (true === b2.unstable_strictMode && (c = true), void 0 !== b2.identifierPrefix && (d2 = b2.identifierPrefix), void 0 !== b2.onRecoverableError && (e2 = b2.onRecoverableError));
    b2 = bl(a2, 1, false, null, null, c, false, d2, e2);
    a2[uf] = b2.current;
    sf(8 === a2.nodeType ? a2.parentNode : a2);
    return new ll(b2);
  };
  reactDom_production_min.findDOMNode = function(a2) {
    if (null == a2) return null;
    if (1 === a2.nodeType) return a2;
    var b2 = a2._reactInternals;
    if (void 0 === b2) {
      if ("function" === typeof a2.render) throw Error(p2(188));
      a2 = Object.keys(a2).join(",");
      throw Error(p2(268, a2));
    }
    a2 = Zb(b2);
    a2 = null === a2 ? null : a2.stateNode;
    return a2;
  };
  reactDom_production_min.flushSync = function(a2) {
    return Rk(a2);
  };
  reactDom_production_min.hydrate = function(a2, b2, c) {
    if (!ol(b2)) throw Error(p2(200));
    return rl(null, a2, b2, true, c);
  };
  reactDom_production_min.hydrateRoot = function(a2, b2, c) {
    if (!nl(a2)) throw Error(p2(405));
    var d2 = null != c && c.hydratedSources || null, e2 = false, f2 = "", g2 = kl;
    null !== c && void 0 !== c && (true === c.unstable_strictMode && (e2 = true), void 0 !== c.identifierPrefix && (f2 = c.identifierPrefix), void 0 !== c.onRecoverableError && (g2 = c.onRecoverableError));
    b2 = el(b2, null, a2, 1, null != c ? c : null, e2, false, f2, g2);
    a2[uf] = b2.current;
    sf(a2);
    if (d2) for (a2 = 0; a2 < d2.length; a2++) c = d2[a2], e2 = c._getVersion, e2 = e2(c._source), null == b2.mutableSourceEagerHydrationData ? b2.mutableSourceEagerHydrationData = [c, e2] : b2.mutableSourceEagerHydrationData.push(
      c,
      e2
    );
    return new ml(b2);
  };
  reactDom_production_min.render = function(a2, b2, c) {
    if (!ol(b2)) throw Error(p2(200));
    return rl(null, a2, b2, false, c);
  };
  reactDom_production_min.unmountComponentAtNode = function(a2) {
    if (!ol(a2)) throw Error(p2(40));
    return a2._reactRootContainer ? (Rk(function() {
      rl(null, null, a2, false, function() {
        a2._reactRootContainer = null;
        a2[uf] = null;
      });
    }), true) : false;
  };
  reactDom_production_min.unstable_batchedUpdates = Qk;
  reactDom_production_min.unstable_renderSubtreeIntoContainer = function(a2, b2, c, d2) {
    if (!ol(c)) throw Error(p2(200));
    if (null == a2 || void 0 === a2._reactInternals) throw Error(p2(38));
    return rl(a2, b2, c, false, d2);
  };
  reactDom_production_min.version = "18.3.1-next-f1338f8080-20240426";
  return reactDom_production_min;
}
var hasRequiredReactDom;
function requireReactDom() {
  if (hasRequiredReactDom) return reactDom.exports;
  hasRequiredReactDom = 1;
  function checkDCE() {
    if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
      return;
    }
    try {
      __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
    } catch (err) {
      console.error(err);
    }
  }
  {
    checkDCE();
    reactDom.exports = requireReactDom_production_min();
  }
  return reactDom.exports;
}
var hasRequiredClient;
function requireClient() {
  if (hasRequiredClient) return client;
  hasRequiredClient = 1;
  var m2 = requireReactDom();
  {
    client.createRoot = m2.createRoot;
    client.hydrateRoot = m2.hydrateRoot;
  }
  return client;
}
var clientExports = requireClient();
const scriptRel = "modulepreload";
const assetsURL = function(dep, importerUrl) {
  return new URL(dep, importerUrl).href;
};
const seen = {};
const __vitePreload = function preload(baseModule, deps, importerUrl) {
  let promise = Promise.resolve();
  if (deps && deps.length > 0) {
    let allSettled2 = function(promises) {
      return Promise.all(
        promises.map(
          (p2) => Promise.resolve(p2).then(
            (value) => ({ status: "fulfilled", value }),
            (reason) => ({ status: "rejected", reason })
          )
        )
      );
    };
    const links = document.getElementsByTagName("link");
    const cspNonceMeta = document.querySelector(
      "meta[property=csp-nonce]"
    );
    const cspNonce = (cspNonceMeta == null ? void 0 : cspNonceMeta.nonce) || (cspNonceMeta == null ? void 0 : cspNonceMeta.getAttribute("nonce"));
    promise = allSettled2(
      deps.map((dep) => {
        dep = assetsURL(dep, importerUrl);
        if (dep in seen) return;
        seen[dep] = true;
        const isCss = dep.endsWith(".css");
        const cssSelector = isCss ? '[rel="stylesheet"]' : "";
        const isBaseRelative = !!importerUrl;
        if (isBaseRelative) {
          for (let i = links.length - 1; i >= 0; i--) {
            const link2 = links[i];
            if (link2.href === dep && (!isCss || link2.rel === "stylesheet")) {
              return;
            }
          }
        } else if (document.querySelector(`link[href="${dep}"]${cssSelector}`)) {
          return;
        }
        const link = document.createElement("link");
        link.rel = isCss ? "stylesheet" : scriptRel;
        if (!isCss) {
          link.as = "script";
        }
        link.crossOrigin = "";
        link.href = dep;
        if (cspNonce) {
          link.setAttribute("nonce", cspNonce);
        }
        document.head.appendChild(link);
        if (isCss) {
          return new Promise((res, rej) => {
            link.addEventListener("load", res);
            link.addEventListener(
              "error",
              () => rej(new Error(`Unable to preload CSS for ${dep}`))
            );
          });
        }
      })
    );
  }
  function handlePreloadError(err) {
    const e2 = new Event("vite:preloadError", {
      cancelable: true
    });
    e2.payload = err;
    window.dispatchEvent(e2);
    if (!e2.defaultPrevented) {
      throw err;
    }
  }
  return promise.then((res) => {
    for (const item of res || []) {
      if (item.status !== "rejected") continue;
      handlePreloadError(item.reason);
    }
    return baseModule().catch(handlePreloadError);
  });
};
var reactDomExports = requireReactDom();
const ReactDOM = /* @__PURE__ */ getDefaultExportFromCjs(reactDomExports);
/**
 * @remix-run/router v1.23.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */
function _extends$4() {
  _extends$4 = Object.assign ? Object.assign.bind() : function(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends$4.apply(this, arguments);
}
var Action;
(function(Action2) {
  Action2["Pop"] = "POP";
  Action2["Push"] = "PUSH";
  Action2["Replace"] = "REPLACE";
})(Action || (Action = {}));
const PopStateEventType = "popstate";
function createBrowserHistory(options) {
  if (options === void 0) {
    options = {};
  }
  function createBrowserLocation(window2, globalHistory) {
    let {
      pathname,
      search,
      hash: hash2
    } = window2.location;
    return createLocation(
      "",
      {
        pathname,
        search,
        hash: hash2
      },
      // state defaults to `null` because `window.history.state` does
      globalHistory.state && globalHistory.state.usr || null,
      globalHistory.state && globalHistory.state.key || "default"
    );
  }
  function createBrowserHref(window2, to) {
    return typeof to === "string" ? to : createPath(to);
  }
  return getUrlBasedHistory(createBrowserLocation, createBrowserHref, null, options);
}
function createHashHistory(options) {
  if (options === void 0) {
    options = {};
  }
  function createHashLocation(window2, globalHistory) {
    let {
      pathname = "/",
      search = "",
      hash: hash2 = ""
    } = parsePath(window2.location.hash.substr(1));
    if (!pathname.startsWith("/") && !pathname.startsWith(".")) {
      pathname = "/" + pathname;
    }
    return createLocation(
      "",
      {
        pathname,
        search,
        hash: hash2
      },
      // state defaults to `null` because `window.history.state` does
      globalHistory.state && globalHistory.state.usr || null,
      globalHistory.state && globalHistory.state.key || "default"
    );
  }
  function createHashHref(window2, to) {
    let base = window2.document.querySelector("base");
    let href = "";
    if (base && base.getAttribute("href")) {
      let url = window2.location.href;
      let hashIndex = url.indexOf("#");
      href = hashIndex === -1 ? url : url.slice(0, hashIndex);
    }
    return href + "#" + (typeof to === "string" ? to : createPath(to));
  }
  function validateHashLocation(location2, to) {
    warning(location2.pathname.charAt(0) === "/", "relative pathnames are not supported in hash history.push(" + JSON.stringify(to) + ")");
  }
  return getUrlBasedHistory(createHashLocation, createHashHref, validateHashLocation, options);
}
function invariant(value, message) {
  if (value === false || value === null || typeof value === "undefined") {
    throw new Error(message);
  }
}
function warning(cond, message) {
  if (!cond) {
    if (typeof console !== "undefined") console.warn(message);
    try {
      throw new Error(message);
    } catch (e2) {
    }
  }
}
function createKey() {
  return Math.random().toString(36).substr(2, 8);
}
function getHistoryState(location2, index2) {
  return {
    usr: location2.state,
    key: location2.key,
    idx: index2
  };
}
function createLocation(current, to, state, key) {
  if (state === void 0) {
    state = null;
  }
  let location2 = _extends$4({
    pathname: typeof current === "string" ? current : current.pathname,
    search: "",
    hash: ""
  }, typeof to === "string" ? parsePath(to) : to, {
    state,
    // TODO: This could be cleaned up.  push/replace should probably just take
    // full Locations now and avoid the need to run through this flow at all
    // But that's a pretty big refactor to the current test suite so going to
    // keep as is for the time being and just let any incoming keys take precedence
    key: to && to.key || key || createKey()
  });
  return location2;
}
function createPath(_ref) {
  let {
    pathname = "/",
    search = "",
    hash: hash2 = ""
  } = _ref;
  if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
  if (hash2 && hash2 !== "#") pathname += hash2.charAt(0) === "#" ? hash2 : "#" + hash2;
  return pathname;
}
function parsePath(path) {
  let parsedPath = {};
  if (path) {
    let hashIndex = path.indexOf("#");
    if (hashIndex >= 0) {
      parsedPath.hash = path.substr(hashIndex);
      path = path.substr(0, hashIndex);
    }
    let searchIndex = path.indexOf("?");
    if (searchIndex >= 0) {
      parsedPath.search = path.substr(searchIndex);
      path = path.substr(0, searchIndex);
    }
    if (path) {
      parsedPath.pathname = path;
    }
  }
  return parsedPath;
}
function getUrlBasedHistory(getLocation, createHref, validateLocation, options) {
  if (options === void 0) {
    options = {};
  }
  let {
    window: window2 = document.defaultView,
    v5Compat = false
  } = options;
  let globalHistory = window2.history;
  let action = Action.Pop;
  let listener = null;
  let index2 = getIndex();
  if (index2 == null) {
    index2 = 0;
    globalHistory.replaceState(_extends$4({}, globalHistory.state, {
      idx: index2
    }), "");
  }
  function getIndex() {
    let state = globalHistory.state || {
      idx: null
    };
    return state.idx;
  }
  function handlePop() {
    action = Action.Pop;
    let nextIndex = getIndex();
    let delta = nextIndex == null ? null : nextIndex - index2;
    index2 = nextIndex;
    if (listener) {
      listener({
        action,
        location: history.location,
        delta
      });
    }
  }
  function push(to, state) {
    action = Action.Push;
    let location2 = createLocation(history.location, to, state);
    if (validateLocation) validateLocation(location2, to);
    index2 = getIndex() + 1;
    let historyState = getHistoryState(location2, index2);
    let url = history.createHref(location2);
    try {
      globalHistory.pushState(historyState, "", url);
    } catch (error) {
      if (error instanceof DOMException && error.name === "DataCloneError") {
        throw error;
      }
      window2.location.assign(url);
    }
    if (v5Compat && listener) {
      listener({
        action,
        location: history.location,
        delta: 1
      });
    }
  }
  function replace2(to, state) {
    action = Action.Replace;
    let location2 = createLocation(history.location, to, state);
    if (validateLocation) validateLocation(location2, to);
    index2 = getIndex();
    let historyState = getHistoryState(location2, index2);
    let url = history.createHref(location2);
    globalHistory.replaceState(historyState, "", url);
    if (v5Compat && listener) {
      listener({
        action,
        location: history.location,
        delta: 0
      });
    }
  }
  function createURL(to) {
    let base = window2.location.origin !== "null" ? window2.location.origin : window2.location.href;
    let href = typeof to === "string" ? to : createPath(to);
    href = href.replace(/ $/, "%20");
    invariant(base, "No window.location.(origin|href) available to create URL for href: " + href);
    return new URL(href, base);
  }
  let history = {
    get action() {
      return action;
    },
    get location() {
      return getLocation(window2, globalHistory);
    },
    listen(fn2) {
      if (listener) {
        throw new Error("A history only accepts one active listener");
      }
      window2.addEventListener(PopStateEventType, handlePop);
      listener = fn2;
      return () => {
        window2.removeEventListener(PopStateEventType, handlePop);
        listener = null;
      };
    },
    createHref(to) {
      return createHref(window2, to);
    },
    createURL,
    encodeLocation(to) {
      let url = createURL(to);
      return {
        pathname: url.pathname,
        search: url.search,
        hash: url.hash
      };
    },
    push,
    replace: replace2,
    go(n) {
      return globalHistory.go(n);
    }
  };
  return history;
}
var ResultType;
(function(ResultType2) {
  ResultType2["data"] = "data";
  ResultType2["deferred"] = "deferred";
  ResultType2["redirect"] = "redirect";
  ResultType2["error"] = "error";
})(ResultType || (ResultType = {}));
function matchRoutes(routes, locationArg, basename) {
  if (basename === void 0) {
    basename = "/";
  }
  return matchRoutesImpl(routes, locationArg, basename);
}
function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
  let location2 = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
  let pathname = stripBasename(location2.pathname || "/", basename);
  if (pathname == null) {
    return null;
  }
  let branches = flattenRoutes(routes);
  rankRouteBranches(branches);
  let matches = null;
  for (let i = 0; matches == null && i < branches.length; ++i) {
    let decoded = decodePath(pathname);
    matches = matchRouteBranch(branches[i], decoded);
  }
  return matches;
}
function flattenRoutes(routes, branches, parentsMeta, parentPath) {
  if (branches === void 0) {
    branches = [];
  }
  if (parentsMeta === void 0) {
    parentsMeta = [];
  }
  if (parentPath === void 0) {
    parentPath = "";
  }
  let flattenRoute = (route, index2, relativePath) => {
    let meta = {
      relativePath: relativePath === void 0 ? route.path || "" : relativePath,
      caseSensitive: route.caseSensitive === true,
      childrenIndex: index2,
      route
    };
    if (meta.relativePath.startsWith("/")) {
      invariant(meta.relativePath.startsWith(parentPath), 'Absolute route path "' + meta.relativePath + '" nested under path ' + ('"' + parentPath + '" is not valid. An absolute child route path ') + "must start with the combined path of all its parent routes.");
      meta.relativePath = meta.relativePath.slice(parentPath.length);
    }
    let path = joinPaths([parentPath, meta.relativePath]);
    let routesMeta = parentsMeta.concat(meta);
    if (route.children && route.children.length > 0) {
      invariant(
        // Our types know better, but runtime JS may not!
        // @ts-expect-error
        route.index !== true,
        "Index routes must not have child routes. Please remove " + ('all child routes from route path "' + path + '".')
      );
      flattenRoutes(route.children, branches, routesMeta, path);
    }
    if (route.path == null && !route.index) {
      return;
    }
    branches.push({
      path,
      score: computeScore(path, route.index),
      routesMeta
    });
  };
  routes.forEach((route, index2) => {
    var _route$path;
    if (route.path === "" || !((_route$path = route.path) != null && _route$path.includes("?"))) {
      flattenRoute(route, index2);
    } else {
      for (let exploded of explodeOptionalSegments(route.path)) {
        flattenRoute(route, index2, exploded);
      }
    }
  });
  return branches;
}
function explodeOptionalSegments(path) {
  let segments = path.split("/");
  if (segments.length === 0) return [];
  let [first, ...rest] = segments;
  let isOptional = first.endsWith("?");
  let required = first.replace(/\?$/, "");
  if (rest.length === 0) {
    return isOptional ? [required, ""] : [required];
  }
  let restExploded = explodeOptionalSegments(rest.join("/"));
  let result = [];
  result.push(...restExploded.map((subpath) => subpath === "" ? required : [required, subpath].join("/")));
  if (isOptional) {
    result.push(...restExploded);
  }
  return result.map((exploded) => path.startsWith("/") && exploded === "" ? "/" : exploded);
}
function rankRouteBranches(branches) {
  branches.sort((a2, b2) => a2.score !== b2.score ? b2.score - a2.score : compareIndexes(a2.routesMeta.map((meta) => meta.childrenIndex), b2.routesMeta.map((meta) => meta.childrenIndex)));
}
const paramRe = /^:[\w-]+$/;
const dynamicSegmentValue = 3;
const indexRouteValue = 2;
const emptySegmentValue = 1;
const staticSegmentValue = 10;
const splatPenalty = -2;
const isSplat = (s) => s === "*";
function computeScore(path, index2) {
  let segments = path.split("/");
  let initialScore = segments.length;
  if (segments.some(isSplat)) {
    initialScore += splatPenalty;
  }
  if (index2) {
    initialScore += indexRouteValue;
  }
  return segments.filter((s) => !isSplat(s)).reduce((score, segment) => score + (paramRe.test(segment) ? dynamicSegmentValue : segment === "" ? emptySegmentValue : staticSegmentValue), initialScore);
}
function compareIndexes(a2, b2) {
  let siblings = a2.length === b2.length && a2.slice(0, -1).every((n, i) => n === b2[i]);
  return siblings ? (
    // If two routes are siblings, we should try to match the earlier sibling
    // first. This allows people to have fine-grained control over the matching
    // behavior by simply putting routes with identical paths in the order they
    // want them tried.
    a2[a2.length - 1] - b2[b2.length - 1]
  ) : (
    // Otherwise, it doesn't really make sense to rank non-siblings by index,
    // so they sort equally.
    0
  );
}
function matchRouteBranch(branch, pathname, allowPartial) {
  let {
    routesMeta
  } = branch;
  let matchedParams = {};
  let matchedPathname = "/";
  let matches = [];
  for (let i = 0; i < routesMeta.length; ++i) {
    let meta = routesMeta[i];
    let end2 = i === routesMeta.length - 1;
    let remainingPathname = matchedPathname === "/" ? pathname : pathname.slice(matchedPathname.length) || "/";
    let match2 = matchPath({
      path: meta.relativePath,
      caseSensitive: meta.caseSensitive,
      end: end2
    }, remainingPathname);
    let route = meta.route;
    if (!match2) {
      return null;
    }
    Object.assign(matchedParams, match2.params);
    matches.push({
      // TODO: Can this as be avoided?
      params: matchedParams,
      pathname: joinPaths([matchedPathname, match2.pathname]),
      pathnameBase: normalizePathname(joinPaths([matchedPathname, match2.pathnameBase])),
      route
    });
    if (match2.pathnameBase !== "/") {
      matchedPathname = joinPaths([matchedPathname, match2.pathnameBase]);
    }
  }
  return matches;
}
function matchPath(pattern, pathname) {
  if (typeof pattern === "string") {
    pattern = {
      path: pattern,
      caseSensitive: false,
      end: true
    };
  }
  let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
  let match2 = pathname.match(matcher);
  if (!match2) return null;
  let matchedPathname = match2[0];
  let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
  let captureGroups = match2.slice(1);
  let params2 = compiledParams.reduce((memo2, _ref, index2) => {
    let {
      paramName,
      isOptional
    } = _ref;
    if (paramName === "*") {
      let splatValue = captureGroups[index2] || "";
      pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
    }
    const value = captureGroups[index2];
    if (isOptional && !value) {
      memo2[paramName] = void 0;
    } else {
      memo2[paramName] = (value || "").replace(/%2F/g, "/");
    }
    return memo2;
  }, {});
  return {
    params: params2,
    pathname: matchedPathname,
    pathnameBase,
    pattern
  };
}
function compilePath(path, caseSensitive, end2) {
  if (caseSensitive === void 0) {
    caseSensitive = false;
  }
  if (end2 === void 0) {
    end2 = true;
  }
  warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), 'Route path "' + path + '" will be treated as if it were ' + ('"' + path.replace(/\*$/, "/*") + '" because the `*` character must ') + "always follow a `/` in the pattern. To get rid of this warning, " + ('please change the route path to "' + path.replace(/\*$/, "/*") + '".'));
  let params2 = [];
  let regexpSource = "^" + path.replace(/\/*\*?$/, "").replace(/^\/*/, "/").replace(/[\\.*+^${}|()[\]]/g, "\\$&").replace(/\/:([\w-]+)(\?)?/g, (_2, paramName, isOptional) => {
    params2.push({
      paramName,
      isOptional: isOptional != null
    });
    return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
  });
  if (path.endsWith("*")) {
    params2.push({
      paramName: "*"
    });
    regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
  } else if (end2) {
    regexpSource += "\\/*$";
  } else if (path !== "" && path !== "/") {
    regexpSource += "(?:(?=\\/|$))";
  } else ;
  let matcher = new RegExp(regexpSource, caseSensitive ? void 0 : "i");
  return [matcher, params2];
}
function decodePath(value) {
  try {
    return value.split("/").map((v2) => decodeURIComponent(v2).replace(/\//g, "%2F")).join("/");
  } catch (error) {
    warning(false, 'The URL path "' + value + '" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent ' + ("encoding (" + error + ")."));
    return value;
  }
}
function stripBasename(pathname, basename) {
  if (basename === "/") return pathname;
  if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
    return null;
  }
  let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
  let nextChar = pathname.charAt(startIndex);
  if (nextChar && nextChar !== "/") {
    return null;
  }
  return pathname.slice(startIndex) || "/";
}
function resolvePath(to, fromPathname) {
  if (fromPathname === void 0) {
    fromPathname = "/";
  }
  let {
    pathname: toPathname,
    search = "",
    hash: hash2 = ""
  } = typeof to === "string" ? parsePath(to) : to;
  let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
  return {
    pathname,
    search: normalizeSearch(search),
    hash: normalizeHash(hash2)
  };
}
function resolvePathname(relativePath, fromPathname) {
  let segments = fromPathname.replace(/\/+$/, "").split("/");
  let relativeSegments = relativePath.split("/");
  relativeSegments.forEach((segment) => {
    if (segment === "..") {
      if (segments.length > 1) segments.pop();
    } else if (segment !== ".") {
      segments.push(segment);
    }
  });
  return segments.length > 1 ? segments.join("/") : "/";
}
function getInvalidPathError(char2, field, dest, path) {
  return "Cannot include a '" + char2 + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "].  Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + 'a string in <Link to="..."> and the router will parse it for you.';
}
function getPathContributingMatches(matches) {
  return matches.filter((match2, index2) => index2 === 0 || match2.route.path && match2.route.path.length > 0);
}
function getResolveToMatches(matches, v7_relativeSplatPath) {
  let pathMatches = getPathContributingMatches(matches);
  if (v7_relativeSplatPath) {
    return pathMatches.map((match2, idx) => idx === pathMatches.length - 1 ? match2.pathname : match2.pathnameBase);
  }
  return pathMatches.map((match2) => match2.pathnameBase);
}
function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
  if (isPathRelative === void 0) {
    isPathRelative = false;
  }
  let to;
  if (typeof toArg === "string") {
    to = parsePath(toArg);
  } else {
    to = _extends$4({}, toArg);
    invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
    invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
    invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
  }
  let isEmptyPath = toArg === "" || to.pathname === "";
  let toPathname = isEmptyPath ? "/" : to.pathname;
  let from2;
  if (toPathname == null) {
    from2 = locationPathname;
  } else {
    let routePathnameIndex = routePathnames.length - 1;
    if (!isPathRelative && toPathname.startsWith("..")) {
      let toSegments = toPathname.split("/");
      while (toSegments[0] === "..") {
        toSegments.shift();
        routePathnameIndex -= 1;
      }
      to.pathname = toSegments.join("/");
    }
    from2 = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
  }
  let path = resolvePath(to, from2);
  let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
  let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
  if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
    path.pathname += "/";
  }
  return path;
}
const joinPaths = (paths) => paths.join("/").replace(/\/\/+/g, "/");
const normalizePathname = (pathname) => pathname.replace(/\/+$/, "").replace(/^\/*/, "/");
const normalizeSearch = (search) => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
const normalizeHash = (hash2) => !hash2 || hash2 === "#" ? "" : hash2.startsWith("#") ? hash2 : "#" + hash2;
function isRouteErrorResponse(error) {
  return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
}
const validMutationMethodsArr = ["post", "put", "patch", "delete"];
new Set(validMutationMethodsArr);
const validRequestMethodsArr = ["get", ...validMutationMethodsArr];
new Set(validRequestMethodsArr);
/**
 * React Router v6.30.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */
function _extends$3() {
  _extends$3 = Object.assign ? Object.assign.bind() : function(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends$3.apply(this, arguments);
}
const DataRouterContext = /* @__PURE__ */ reactExports.createContext(null);
const DataRouterStateContext = /* @__PURE__ */ reactExports.createContext(null);
const NavigationContext = /* @__PURE__ */ reactExports.createContext(null);
const LocationContext = /* @__PURE__ */ reactExports.createContext(null);
const RouteContext = /* @__PURE__ */ reactExports.createContext({
  outlet: null,
  matches: [],
  isDataRoute: false
});
const RouteErrorContext = /* @__PURE__ */ reactExports.createContext(null);
function useHref(to, _temp) {
  let {
    relative
  } = _temp === void 0 ? {} : _temp;
  !useInRouterContext() ? invariant(false) : void 0;
  let {
    basename,
    navigator: navigator2
  } = reactExports.useContext(NavigationContext);
  let {
    hash: hash2,
    pathname,
    search
  } = useResolvedPath(to, {
    relative
  });
  let joinedPathname = pathname;
  if (basename !== "/") {
    joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
  }
  return navigator2.createHref({
    pathname: joinedPathname,
    search,
    hash: hash2
  });
}
function useInRouterContext() {
  return reactExports.useContext(LocationContext) != null;
}
function useLocation() {
  !useInRouterContext() ? invariant(false) : void 0;
  return reactExports.useContext(LocationContext).location;
}
function useIsomorphicLayoutEffect$1(cb) {
  let isStatic = reactExports.useContext(NavigationContext).static;
  if (!isStatic) {
    reactExports.useLayoutEffect(cb);
  }
}
function useNavigate() {
  let {
    isDataRoute
  } = reactExports.useContext(RouteContext);
  return isDataRoute ? useNavigateStable() : useNavigateUnstable();
}
function useNavigateUnstable() {
  !useInRouterContext() ? invariant(false) : void 0;
  let dataRouterContext = reactExports.useContext(DataRouterContext);
  let {
    basename,
    future,
    navigator: navigator2
  } = reactExports.useContext(NavigationContext);
  let {
    matches
  } = reactExports.useContext(RouteContext);
  let {
    pathname: locationPathname
  } = useLocation();
  let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
  let activeRef = reactExports.useRef(false);
  useIsomorphicLayoutEffect$1(() => {
    activeRef.current = true;
  });
  let navigate = reactExports.useCallback(function(to, options) {
    if (options === void 0) {
      options = {};
    }
    if (!activeRef.current) return;
    if (typeof to === "number") {
      navigator2.go(to);
      return;
    }
    let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
    if (dataRouterContext == null && basename !== "/") {
      path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
    }
    (!!options.replace ? navigator2.replace : navigator2.push)(path, options.state, options);
  }, [basename, navigator2, routePathnamesJson, locationPathname, dataRouterContext]);
  return navigate;
}
function useResolvedPath(to, _temp2) {
  let {
    relative
  } = _temp2 === void 0 ? {} : _temp2;
  let {
    future
  } = reactExports.useContext(NavigationContext);
  let {
    matches
  } = reactExports.useContext(RouteContext);
  let {
    pathname: locationPathname
  } = useLocation();
  let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
  return reactExports.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
}
function useRoutes(routes, locationArg) {
  return useRoutesImpl(routes, locationArg);
}
function useRoutesImpl(routes, locationArg, dataRouterState, future) {
  !useInRouterContext() ? invariant(false) : void 0;
  let {
    navigator: navigator2,
    static: isStatic
  } = reactExports.useContext(NavigationContext);
  let {
    matches: parentMatches
  } = reactExports.useContext(RouteContext);
  let routeMatch = parentMatches[parentMatches.length - 1];
  let parentParams = routeMatch ? routeMatch.params : {};
  routeMatch ? routeMatch.pathname : "/";
  let parentPathnameBase = routeMatch ? routeMatch.pathnameBase : "/";
  routeMatch && routeMatch.route;
  let locationFromContext = useLocation();
  let location2;
  if (locationArg) {
    var _parsedLocationArg$pa;
    let parsedLocationArg = typeof locationArg === "string" ? parsePath(locationArg) : locationArg;
    !(parentPathnameBase === "/" || ((_parsedLocationArg$pa = parsedLocationArg.pathname) == null ? void 0 : _parsedLocationArg$pa.startsWith(parentPathnameBase))) ? invariant(false) : void 0;
    location2 = parsedLocationArg;
  } else {
    location2 = locationFromContext;
  }
  let pathname = location2.pathname || "/";
  let remainingPathname = pathname;
  if (parentPathnameBase !== "/") {
    let parentSegments = parentPathnameBase.replace(/^\//, "").split("/");
    let segments = pathname.replace(/^\//, "").split("/");
    remainingPathname = "/" + segments.slice(parentSegments.length).join("/");
  }
  let matches = matchRoutes(routes, {
    pathname: remainingPathname
  });
  let renderedMatches = _renderMatches(matches && matches.map((match2) => Object.assign({}, match2, {
    params: Object.assign({}, parentParams, match2.params),
    pathname: joinPaths([
      parentPathnameBase,
      // Re-encode pathnames that were decoded inside matchRoutes
      navigator2.encodeLocation ? navigator2.encodeLocation(match2.pathname).pathname : match2.pathname
    ]),
    pathnameBase: match2.pathnameBase === "/" ? parentPathnameBase : joinPaths([
      parentPathnameBase,
      // Re-encode pathnames that were decoded inside matchRoutes
      navigator2.encodeLocation ? navigator2.encodeLocation(match2.pathnameBase).pathname : match2.pathnameBase
    ])
  })), parentMatches, dataRouterState, future);
  if (locationArg && renderedMatches) {
    return /* @__PURE__ */ reactExports.createElement(LocationContext.Provider, {
      value: {
        location: _extends$3({
          pathname: "/",
          search: "",
          hash: "",
          state: null,
          key: "default"
        }, location2),
        navigationType: Action.Pop
      }
    }, renderedMatches);
  }
  return renderedMatches;
}
function DefaultErrorComponent() {
  let error = useRouteError();
  let message = isRouteErrorResponse(error) ? error.status + " " + error.statusText : error instanceof Error ? error.message : JSON.stringify(error);
  let stack = error instanceof Error ? error.stack : null;
  let lightgrey = "rgba(200,200,200, 0.5)";
  let preStyles = {
    padding: "0.5rem",
    backgroundColor: lightgrey
  };
  let devInfo = null;
  return /* @__PURE__ */ reactExports.createElement(reactExports.Fragment, null, /* @__PURE__ */ reactExports.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ reactExports.createElement("h3", {
    style: {
      fontStyle: "italic"
    }
  }, message), stack ? /* @__PURE__ */ reactExports.createElement("pre", {
    style: preStyles
  }, stack) : null, devInfo);
}
const defaultErrorElement = /* @__PURE__ */ reactExports.createElement(DefaultErrorComponent, null);
class RenderErrorBoundary extends reactExports.Component {
  constructor(props) {
    super(props);
    this.state = {
      location: props.location,
      revalidation: props.revalidation,
      error: props.error
    };
  }
  static getDerivedStateFromError(error) {
    return {
      error
    };
  }
  static getDerivedStateFromProps(props, state) {
    if (state.location !== props.location || state.revalidation !== "idle" && props.revalidation === "idle") {
      return {
        error: props.error,
        location: props.location,
        revalidation: props.revalidation
      };
    }
    return {
      error: props.error !== void 0 ? props.error : state.error,
      location: state.location,
      revalidation: props.revalidation || state.revalidation
    };
  }
  componentDidCatch(error, errorInfo) {
    console.error("React Router caught the following error during render", error, errorInfo);
  }
  render() {
    return this.state.error !== void 0 ? /* @__PURE__ */ reactExports.createElement(RouteContext.Provider, {
      value: this.props.routeContext
    }, /* @__PURE__ */ reactExports.createElement(RouteErrorContext.Provider, {
      value: this.state.error,
      children: this.props.component
    })) : this.props.children;
  }
}
function RenderedRoute(_ref) {
  let {
    routeContext,
    match: match2,
    children
  } = _ref;
  let dataRouterContext = reactExports.useContext(DataRouterContext);
  if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match2.route.errorElement || match2.route.ErrorBoundary)) {
    dataRouterContext.staticContext._deepestRenderedBoundaryId = match2.route.id;
  }
  return /* @__PURE__ */ reactExports.createElement(RouteContext.Provider, {
    value: routeContext
  }, children);
}
function _renderMatches(matches, parentMatches, dataRouterState, future) {
  var _dataRouterState;
  if (parentMatches === void 0) {
    parentMatches = [];
  }
  if (dataRouterState === void 0) {
    dataRouterState = null;
  }
  if (future === void 0) {
    future = null;
  }
  if (matches == null) {
    var _future;
    if (!dataRouterState) {
      return null;
    }
    if (dataRouterState.errors) {
      matches = dataRouterState.matches;
    } else if ((_future = future) != null && _future.v7_partialHydration && parentMatches.length === 0 && !dataRouterState.initialized && dataRouterState.matches.length > 0) {
      matches = dataRouterState.matches;
    } else {
      return null;
    }
  }
  let renderedMatches = matches;
  let errors = (_dataRouterState = dataRouterState) == null ? void 0 : _dataRouterState.errors;
  if (errors != null) {
    let errorIndex = renderedMatches.findIndex((m2) => m2.route.id && (errors == null ? void 0 : errors[m2.route.id]) !== void 0);
    !(errorIndex >= 0) ? invariant(false) : void 0;
    renderedMatches = renderedMatches.slice(0, Math.min(renderedMatches.length, errorIndex + 1));
  }
  let renderFallback = false;
  let fallbackIndex = -1;
  if (dataRouterState && future && future.v7_partialHydration) {
    for (let i = 0; i < renderedMatches.length; i++) {
      let match2 = renderedMatches[i];
      if (match2.route.HydrateFallback || match2.route.hydrateFallbackElement) {
        fallbackIndex = i;
      }
      if (match2.route.id) {
        let {
          loaderData,
          errors: errors2
        } = dataRouterState;
        let needsToRunLoader = match2.route.loader && loaderData[match2.route.id] === void 0 && (!errors2 || errors2[match2.route.id] === void 0);
        if (match2.route.lazy || needsToRunLoader) {
          renderFallback = true;
          if (fallbackIndex >= 0) {
            renderedMatches = renderedMatches.slice(0, fallbackIndex + 1);
          } else {
            renderedMatches = [renderedMatches[0]];
          }
          break;
        }
      }
    }
  }
  return renderedMatches.reduceRight((outlet, match2, index2) => {
    let error;
    let shouldRenderHydrateFallback = false;
    let errorElement = null;
    let hydrateFallbackElement = null;
    if (dataRouterState) {
      error = errors && match2.route.id ? errors[match2.route.id] : void 0;
      errorElement = match2.route.errorElement || defaultErrorElement;
      if (renderFallback) {
        if (fallbackIndex < 0 && index2 === 0) {
          warningOnce("route-fallback");
          shouldRenderHydrateFallback = true;
          hydrateFallbackElement = null;
        } else if (fallbackIndex === index2) {
          shouldRenderHydrateFallback = true;
          hydrateFallbackElement = match2.route.hydrateFallbackElement || null;
        }
      }
    }
    let matches2 = parentMatches.concat(renderedMatches.slice(0, index2 + 1));
    let getChildren2 = () => {
      let children;
      if (error) {
        children = errorElement;
      } else if (shouldRenderHydrateFallback) {
        children = hydrateFallbackElement;
      } else if (match2.route.Component) {
        children = /* @__PURE__ */ reactExports.createElement(match2.route.Component, null);
      } else if (match2.route.element) {
        children = match2.route.element;
      } else {
        children = outlet;
      }
      return /* @__PURE__ */ reactExports.createElement(RenderedRoute, {
        match: match2,
        routeContext: {
          outlet,
          matches: matches2,
          isDataRoute: dataRouterState != null
        },
        children
      });
    };
    return dataRouterState && (match2.route.ErrorBoundary || match2.route.errorElement || index2 === 0) ? /* @__PURE__ */ reactExports.createElement(RenderErrorBoundary, {
      location: dataRouterState.location,
      revalidation: dataRouterState.revalidation,
      component: errorElement,
      error,
      children: getChildren2(),
      routeContext: {
        outlet: null,
        matches: matches2,
        isDataRoute: true
      }
    }) : getChildren2();
  }, null);
}
var DataRouterHook$1 = /* @__PURE__ */ function(DataRouterHook2) {
  DataRouterHook2["UseBlocker"] = "useBlocker";
  DataRouterHook2["UseRevalidator"] = "useRevalidator";
  DataRouterHook2["UseNavigateStable"] = "useNavigate";
  return DataRouterHook2;
}(DataRouterHook$1 || {});
var DataRouterStateHook$1 = /* @__PURE__ */ function(DataRouterStateHook2) {
  DataRouterStateHook2["UseBlocker"] = "useBlocker";
  DataRouterStateHook2["UseLoaderData"] = "useLoaderData";
  DataRouterStateHook2["UseActionData"] = "useActionData";
  DataRouterStateHook2["UseRouteError"] = "useRouteError";
  DataRouterStateHook2["UseNavigation"] = "useNavigation";
  DataRouterStateHook2["UseRouteLoaderData"] = "useRouteLoaderData";
  DataRouterStateHook2["UseMatches"] = "useMatches";
  DataRouterStateHook2["UseRevalidator"] = "useRevalidator";
  DataRouterStateHook2["UseNavigateStable"] = "useNavigate";
  DataRouterStateHook2["UseRouteId"] = "useRouteId";
  return DataRouterStateHook2;
}(DataRouterStateHook$1 || {});
function useDataRouterContext(hookName) {
  let ctx = reactExports.useContext(DataRouterContext);
  !ctx ? invariant(false) : void 0;
  return ctx;
}
function useDataRouterState(hookName) {
  let state = reactExports.useContext(DataRouterStateContext);
  !state ? invariant(false) : void 0;
  return state;
}
function useRouteContext(hookName) {
  let route = reactExports.useContext(RouteContext);
  !route ? invariant(false) : void 0;
  return route;
}
function useCurrentRouteId(hookName) {
  let route = useRouteContext();
  let thisRoute = route.matches[route.matches.length - 1];
  !thisRoute.route.id ? invariant(false) : void 0;
  return thisRoute.route.id;
}
function useRouteError() {
  var _state$errors;
  let error = reactExports.useContext(RouteErrorContext);
  let state = useDataRouterState();
  let routeId = useCurrentRouteId();
  if (error !== void 0) {
    return error;
  }
  return (_state$errors = state.errors) == null ? void 0 : _state$errors[routeId];
}
function useNavigateStable() {
  let {
    router
  } = useDataRouterContext(DataRouterHook$1.UseNavigateStable);
  let id = useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable);
  let activeRef = reactExports.useRef(false);
  useIsomorphicLayoutEffect$1(() => {
    activeRef.current = true;
  });
  let navigate = reactExports.useCallback(function(to, options) {
    if (options === void 0) {
      options = {};
    }
    if (!activeRef.current) return;
    if (typeof to === "number") {
      router.navigate(to);
    } else {
      router.navigate(to, _extends$3({
        fromRouteId: id
      }, options));
    }
  }, [router, id]);
  return navigate;
}
const alreadyWarned$1 = {};
function warningOnce(key, cond, message) {
  if (!alreadyWarned$1[key]) {
    alreadyWarned$1[key] = true;
  }
}
function logV6DeprecationWarnings(renderFuture, routerFuture) {
  if ((renderFuture == null ? void 0 : renderFuture.v7_startTransition) === void 0) ;
  if ((renderFuture == null ? void 0 : renderFuture.v7_relativeSplatPath) === void 0 && true) ;
}
function Route(_props) {
  invariant(false);
}
function Router(_ref5) {
  let {
    basename: basenameProp = "/",
    children = null,
    location: locationProp,
    navigationType = Action.Pop,
    navigator: navigator2,
    static: staticProp = false,
    future
  } = _ref5;
  !!useInRouterContext() ? invariant(false) : void 0;
  let basename = basenameProp.replace(/^\/*/, "/");
  let navigationContext = reactExports.useMemo(() => ({
    basename,
    navigator: navigator2,
    static: staticProp,
    future: _extends$3({
      v7_relativeSplatPath: false
    }, future)
  }), [basename, future, navigator2, staticProp]);
  if (typeof locationProp === "string") {
    locationProp = parsePath(locationProp);
  }
  let {
    pathname = "/",
    search = "",
    hash: hash2 = "",
    state = null,
    key = "default"
  } = locationProp;
  let locationContext = reactExports.useMemo(() => {
    let trailingPathname = stripBasename(pathname, basename);
    if (trailingPathname == null) {
      return null;
    }
    return {
      location: {
        pathname: trailingPathname,
        search,
        hash: hash2,
        state,
        key
      },
      navigationType
    };
  }, [basename, pathname, search, hash2, state, key, navigationType]);
  if (locationContext == null) {
    return null;
  }
  return /* @__PURE__ */ reactExports.createElement(NavigationContext.Provider, {
    value: navigationContext
  }, /* @__PURE__ */ reactExports.createElement(LocationContext.Provider, {
    children,
    value: locationContext
  }));
}
function Routes(_ref6) {
  let {
    children,
    location: location2
  } = _ref6;
  return useRoutes(createRoutesFromChildren(children), location2);
}
new Promise(() => {
});
function createRoutesFromChildren(children, parentPath) {
  if (parentPath === void 0) {
    parentPath = [];
  }
  let routes = [];
  reactExports.Children.forEach(children, (element, index2) => {
    if (!/* @__PURE__ */ reactExports.isValidElement(element)) {
      return;
    }
    let treePath = [...parentPath, index2];
    if (element.type === reactExports.Fragment) {
      routes.push.apply(routes, createRoutesFromChildren(element.props.children, treePath));
      return;
    }
    !(element.type === Route) ? invariant(false) : void 0;
    !(!element.props.index || !element.props.children) ? invariant(false) : void 0;
    let route = {
      id: element.props.id || treePath.join("-"),
      caseSensitive: element.props.caseSensitive,
      element: element.props.element,
      Component: element.props.Component,
      index: element.props.index,
      path: element.props.path,
      loader: element.props.loader,
      action: element.props.action,
      errorElement: element.props.errorElement,
      ErrorBoundary: element.props.ErrorBoundary,
      hasErrorBoundary: element.props.ErrorBoundary != null || element.props.errorElement != null,
      shouldRevalidate: element.props.shouldRevalidate,
      handle: element.props.handle,
      lazy: element.props.lazy
    };
    if (element.props.children) {
      route.children = createRoutesFromChildren(element.props.children, treePath);
    }
    routes.push(route);
  });
  return routes;
}
/**
 * React Router DOM v6.30.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */
function _extends$2() {
  _extends$2 = Object.assign ? Object.assign.bind() : function(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  return _extends$2.apply(this, arguments);
}
function _objectWithoutPropertiesLoose$1(source, excluded) {
  if (source == null) return {};
  var target = {};
  var sourceKeys = Object.keys(source);
  var key, i;
  for (i = 0; i < sourceKeys.length; i++) {
    key = sourceKeys[i];
    if (excluded.indexOf(key) >= 0) continue;
    target[key] = source[key];
  }
  return target;
}
function isModifiedEvent(event) {
  return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
function shouldProcessLinkClick(event, target) {
  return event.button === 0 && // Ignore everything but left clicks
  (!target || target === "_self") && // Let browser handle "target=_blank" etc.
  !isModifiedEvent(event);
}
const _excluded$1R = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"];
const REACT_ROUTER_VERSION = "6";
try {
  window.__reactRouterVersion = REACT_ROUTER_VERSION;
} catch (e2) {
}
const START_TRANSITION = "startTransition";
const startTransitionImpl = React$1[START_TRANSITION];
function BrowserRouter(_ref4) {
  let {
    basename,
    children,
    future,
    window: window2
  } = _ref4;
  let historyRef = reactExports.useRef();
  if (historyRef.current == null) {
    historyRef.current = createBrowserHistory({
      window: window2,
      v5Compat: true
    });
  }
  let history = historyRef.current;
  let [state, setStateImpl] = reactExports.useState({
    action: history.action,
    location: history.location
  });
  let {
    v7_startTransition
  } = future || {};
  let setState = reactExports.useCallback((newState) => {
    v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);
  }, [setStateImpl, v7_startTransition]);
  reactExports.useLayoutEffect(() => history.listen(setState), [history, setState]);
  reactExports.useEffect(() => logV6DeprecationWarnings(future), [future]);
  return /* @__PURE__ */ reactExports.createElement(Router, {
    basename,
    children,
    location: state.location,
    navigationType: state.action,
    navigator: history,
    future
  });
}
function HashRouter(_ref5) {
  let {
    basename,
    children,
    future,
    window: window2
  } = _ref5;
  let historyRef = reactExports.useRef();
  if (historyRef.current == null) {
    historyRef.current = createHashHistory({
      window: window2,
      v5Compat: true
    });
  }
  let history = historyRef.current;
  let [state, setStateImpl] = reactExports.useState({
    action: history.action,
    location: history.location
  });
  let {
    v7_startTransition
  } = future || {};
  let setState = reactExports.useCallback((newState) => {
    v7_startTransition && startTransitionImpl ? startTransitionImpl(() => setStateImpl(newState)) : setStateImpl(newState);
  }, [setStateImpl, v7_startTransition]);
  reactExports.useLayoutEffect(() => history.listen(setState), [history, setState]);
  reactExports.useEffect(() => logV6DeprecationWarnings(future), [future]);
  return /* @__PURE__ */ reactExports.createElement(Router, {
    basename,
    children,
    location: state.location,
    navigationType: state.action,
    navigator: history,
    future
  });
}
const isBrowser$1 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
const Link$2 = /* @__PURE__ */ reactExports.forwardRef(function LinkWithRef(_ref7, ref2) {
  let {
    onClick: onClick2,
    relative,
    reloadDocument,
    replace: replace2,
    state,
    target,
    to,
    preventScrollReset,
    viewTransition
  } = _ref7, rest = _objectWithoutPropertiesLoose$1(_ref7, _excluded$1R);
  let {
    basename
  } = reactExports.useContext(NavigationContext);
  let absoluteHref;
  let isExternal = false;
  if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
    absoluteHref = to;
    if (isBrowser$1) {
      try {
        let currentUrl = new URL(window.location.href);
        let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
        let path = stripBasename(targetUrl.pathname, basename);
        if (targetUrl.origin === currentUrl.origin && path != null) {
          to = path + targetUrl.search + targetUrl.hash;
        } else {
          isExternal = true;
        }
      } catch (e2) {
      }
    }
  }
  let href = useHref(to, {
    relative
  });
  let internalOnClick = useLinkClickHandler(to, {
    replace: replace2,
    state,
    target,
    preventScrollReset,
    relative,
    viewTransition
  });
  function handleClick(event) {
    if (onClick2) onClick2(event);
    if (!event.defaultPrevented) {
      internalOnClick(event);
    }
  }
  return (
    // eslint-disable-next-line jsx-a11y/anchor-has-content
    /* @__PURE__ */ reactExports.createElement("a", _extends$2({}, rest, {
      href: absoluteHref || href,
      onClick: isExternal || reloadDocument ? onClick2 : handleClick,
      ref: ref2,
      target
    }))
  );
});
var DataRouterHook;
(function(DataRouterHook2) {
  DataRouterHook2["UseScrollRestoration"] = "useScrollRestoration";
  DataRouterHook2["UseSubmit"] = "useSubmit";
  DataRouterHook2["UseSubmitFetcher"] = "useSubmitFetcher";
  DataRouterHook2["UseFetcher"] = "useFetcher";
  DataRouterHook2["useViewTransitionState"] = "useViewTransitionState";
})(DataRouterHook || (DataRouterHook = {}));
var DataRouterStateHook;
(function(DataRouterStateHook2) {
  DataRouterStateHook2["UseFetcher"] = "useFetcher";
  DataRouterStateHook2["UseFetchers"] = "useFetchers";
  DataRouterStateHook2["UseScrollRestoration"] = "useScrollRestoration";
})(DataRouterStateHook || (DataRouterStateHook = {}));
function useLinkClickHandler(to, _temp) {
  let {
    target,
    replace: replaceProp,
    state,
    preventScrollReset,
    relative,
    viewTransition
  } = _temp === void 0 ? {} : _temp;
  let navigate = useNavigate();
  let location2 = useLocation();
  let path = useResolvedPath(to, {
    relative
  });
  return reactExports.useCallback((event) => {
    if (shouldProcessLinkClick(event, target)) {
      event.preventDefault();
      let replace2 = replaceProp !== void 0 ? replaceProp : createPath(location2) === createPath(path);
      navigate(to, {
        replace: replace2,
        state,
        preventScrollReset,
        relative,
        viewTransition
      });
    }
  }, [location2, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);
}
function formatMuiErrorMessage$1(code) {
  let url = "https://mui.com/production-error/?code=" + code;
  for (let i = 1; i < arguments.length; i += 1) {
    url += "&args[]=" + encodeURIComponent(arguments[i]);
  }
  return "Minified MUI error #" + code + "; visit " + url + " for the full message.";
}
const formatMuiErrorMessage = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: formatMuiErrorMessage$1
}, Symbol.toStringTag, { value: "Module" }));
const THEME_ID = "$$material";
function _extends$1() {
  return _extends$1 = Object.assign ? Object.assign.bind() : function(n) {
    for (var e2 = 1; e2 < arguments.length; e2++) {
      var t = arguments[e2];
      for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
    }
    return n;
  }, _extends$1.apply(null, arguments);
}
function _objectWithoutPropertiesLoose(r2, e2) {
  if (null == r2) return {};
  var t = {};
  for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
    if (-1 !== e2.indexOf(n)) continue;
    t[n] = r2[n];
  }
  return t;
}
function sheetForTag(tag) {
  if (tag.sheet) {
    return tag.sheet;
  }
  for (var i = 0; i < document.styleSheets.length; i++) {
    if (document.styleSheets[i].ownerNode === tag) {
      return document.styleSheets[i];
    }
  }
  return void 0;
}
function createStyleElement(options) {
  var tag = document.createElement("style");
  tag.setAttribute("data-emotion", options.key);
  if (options.nonce !== void 0) {
    tag.setAttribute("nonce", options.nonce);
  }
  tag.appendChild(document.createTextNode(""));
  tag.setAttribute("data-s", "");
  return tag;
}
var StyleSheet = /* @__PURE__ */ function() {
  function StyleSheet2(options) {
    var _this = this;
    this._insertTag = function(tag) {
      var before;
      if (_this.tags.length === 0) {
        if (_this.insertionPoint) {
          before = _this.insertionPoint.nextSibling;
        } else if (_this.prepend) {
          before = _this.container.firstChild;
        } else {
          before = _this.before;
        }
      } else {
        before = _this.tags[_this.tags.length - 1].nextSibling;
      }
      _this.container.insertBefore(tag, before);
      _this.tags.push(tag);
    };
    this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
    this.tags = [];
    this.ctr = 0;
    this.nonce = options.nonce;
    this.key = options.key;
    this.container = options.container;
    this.prepend = options.prepend;
    this.insertionPoint = options.insertionPoint;
    this.before = null;
  }
  var _proto = StyleSheet2.prototype;
  _proto.hydrate = function hydrate(nodes) {
    nodes.forEach(this._insertTag);
  };
  _proto.insert = function insert(rule) {
    if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
      this._insertTag(createStyleElement(this));
    }
    var tag = this.tags[this.tags.length - 1];
    if (this.isSpeedy) {
      var sheet = sheetForTag(tag);
      try {
        sheet.insertRule(rule, sheet.cssRules.length);
      } catch (e2) {
      }
    } else {
      tag.appendChild(document.createTextNode(rule));
    }
    this.ctr++;
  };
  _proto.flush = function flush() {
    this.tags.forEach(function(tag) {
      var _tag$parentNode;
      return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
    });
    this.tags = [];
    this.ctr = 0;
  };
  return StyleSheet2;
}();
var MS = "-ms-";
var MOZ = "-moz-";
var WEBKIT = "-webkit-";
var COMMENT = "comm";
var RULESET = "rule";
var DECLARATION = "decl";
var IMPORT = "@import";
var KEYFRAMES = "@keyframes";
var LAYER = "@layer";
var abs$1 = Math.abs;
var from = String.fromCharCode;
var assign = Object.assign;
function hash$2(value, length2) {
  return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
}
function trim$1(value) {
  return value.trim();
}
function match$3(value, pattern) {
  return (value = pattern.exec(value)) ? value[0] : value;
}
function replace(value, pattern, replacement) {
  return value.replace(pattern, replacement);
}
function indexof(value, search) {
  return value.indexOf(search);
}
function charat(value, index2) {
  return value.charCodeAt(index2) | 0;
}
function substr(value, begin, end2) {
  return value.slice(begin, end2);
}
function strlen(value) {
  return value.length;
}
function sizeof(value) {
  return value.length;
}
function append(value, array) {
  return array.push(value), value;
}
function combine(array, callback) {
  return array.map(callback).join("");
}
var line = 1;
var column = 1;
var length = 0;
var position$1 = 0;
var character = 0;
var characters = "";
function node(value, root, parent, type2, props, children, length2) {
  return { value, root, parent, type: type2, props, children, line, column, length: length2, return: "" };
}
function copy(root, props) {
  return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
}
function char() {
  return character;
}
function prev() {
  character = position$1 > 0 ? charat(characters, --position$1) : 0;
  if (column--, character === 10)
    column = 1, line--;
  return character;
}
function next() {
  character = position$1 < length ? charat(characters, position$1++) : 0;
  if (column++, character === 10)
    column = 1, line++;
  return character;
}
function peek() {
  return charat(characters, position$1);
}
function caret() {
  return position$1;
}
function slice(begin, end2) {
  return substr(characters, begin, end2);
}
function token(type2) {
  switch (type2) {
    // \0 \t \n \r \s whitespace token
    case 0:
    case 9:
    case 10:
    case 13:
    case 32:
      return 5;
    // ! + , / > @ ~ isolate token
    case 33:
    case 43:
    case 44:
    case 47:
    case 62:
    case 64:
    case 126:
    // ; { } breakpoint token
    case 59:
    case 123:
    case 125:
      return 4;
    // : accompanied token
    case 58:
      return 3;
    // " ' ( [ opening delimit token
    case 34:
    case 39:
    case 40:
    case 91:
      return 2;
    // ) ] closing delimit token
    case 41:
    case 93:
      return 1;
  }
  return 0;
}
function alloc(value) {
  return line = column = 1, length = strlen(characters = value), position$1 = 0, [];
}
function dealloc(value) {
  return characters = "", value;
}
function delimit(type2) {
  return trim$1(slice(position$1 - 1, delimiter(type2 === 91 ? type2 + 2 : type2 === 40 ? type2 + 1 : type2)));
}
function whitespace(type2) {
  while (character = peek())
    if (character < 33)
      next();
    else
      break;
  return token(type2) > 2 || token(character) > 3 ? "" : " ";
}
function escaping(index2, count) {
  while (--count && next())
    if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
      break;
  return slice(index2, caret() + (count < 6 && peek() == 32 && next() == 32));
}
function delimiter(type2) {
  while (next())
    switch (character) {
      // ] ) " '
      case type2:
        return position$1;
      // " '
      case 34:
      case 39:
        if (type2 !== 34 && type2 !== 39)
          delimiter(character);
        break;
      // (
      case 40:
        if (type2 === 41)
          delimiter(type2);
        break;
      // \
      case 92:
        next();
        break;
    }
  return position$1;
}
function commenter(type2, index2) {
  while (next())
    if (type2 + character === 47 + 10)
      break;
    else if (type2 + character === 42 + 42 && peek() === 47)
      break;
  return "/*" + slice(index2, position$1 - 1) + "*" + from(type2 === 47 ? type2 : next());
}
function identifier(index2) {
  while (!token(peek()))
    next();
  return slice(index2, position$1);
}
function compile(value) {
  return dealloc(parse$5("", null, null, null, [""], value = alloc(value), 0, [0], value));
}
function parse$5(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
  var index2 = 0;
  var offset2 = 0;
  var length2 = pseudo;
  var atrule = 0;
  var property = 0;
  var previous = 0;
  var variable = 1;
  var scanning = 1;
  var ampersand = 1;
  var character2 = 0;
  var type2 = "";
  var props = rules;
  var children = rulesets;
  var reference2 = rule;
  var characters2 = type2;
  while (scanning)
    switch (previous = character2, character2 = next()) {
      // (
      case 40:
        if (previous != 108 && charat(characters2, length2 - 1) == 58) {
          if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
            ampersand = -1;
          break;
        }
      // " ' [
      case 34:
      case 39:
      case 91:
        characters2 += delimit(character2);
        break;
      // \t \n \r \s
      case 9:
      case 10:
      case 13:
      case 32:
        characters2 += whitespace(previous);
        break;
      // \
      case 92:
        characters2 += escaping(caret() - 1, 7);
        continue;
      // /
      case 47:
        switch (peek()) {
          case 42:
          case 47:
            append(comment(commenter(next(), caret()), root, parent), declarations);
            break;
          default:
            characters2 += "/";
        }
        break;
      // {
      case 123 * variable:
        points[index2++] = strlen(characters2) * ampersand;
      // } ; \0
      case 125 * variable:
      case 59:
      case 0:
        switch (character2) {
          // \0 }
          case 0:
          case 125:
            scanning = 0;
          // ;
          case 59 + offset2:
            if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
            if (property > 0 && strlen(characters2) - length2)
              append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
            break;
          // @ ;
          case 59:
            characters2 += ";";
          // { rule/at-rule
          default:
            append(reference2 = ruleset(characters2, root, parent, index2, offset2, rules, points, type2, props = [], children = [], length2), rulesets);
            if (character2 === 123)
              if (offset2 === 0)
                parse$5(characters2, root, reference2, reference2, props, rulesets, length2, points, children);
              else
                switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
                  // d l m s
                  case 100:
                  case 108:
                  case 109:
                  case 115:
                    parse$5(value, reference2, reference2, rule && append(ruleset(value, reference2, reference2, 0, 0, rules, points, type2, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
                    break;
                  default:
                    parse$5(characters2, reference2, reference2, reference2, [""], children, 0, points, children);
                }
        }
        index2 = offset2 = property = 0, variable = ampersand = 1, type2 = characters2 = "", length2 = pseudo;
        break;
      // :
      case 58:
        length2 = 1 + strlen(characters2), property = previous;
      default:
        if (variable < 1) {
          if (character2 == 123)
            --variable;
          else if (character2 == 125 && variable++ == 0 && prev() == 125)
            continue;
        }
        switch (characters2 += from(character2), character2 * variable) {
          // &
          case 38:
            ampersand = offset2 > 0 ? 1 : (characters2 += "\f", -1);
            break;
          // ,
          case 44:
            points[index2++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
            break;
          // @
          case 64:
            if (peek() === 45)
              characters2 += delimit(next());
            atrule = peek(), offset2 = length2 = strlen(type2 = characters2 += identifier(caret())), character2++;
            break;
          // -
          case 45:
            if (previous === 45 && strlen(characters2) == 2)
              variable = 0;
        }
    }
  return rulesets;
}
function ruleset(value, root, parent, index2, offset2, rules, points, type2, props, children, length2) {
  var post = offset2 - 1;
  var rule = offset2 === 0 ? rules : [""];
  var size = sizeof(rule);
  for (var i = 0, j = 0, k2 = 0; i < index2; ++i)
    for (var x = 0, y2 = substr(value, post + 1, post = abs$1(j = points[i])), z2 = value; x < size; ++x)
      if (z2 = trim$1(j > 0 ? rule[x] + " " + y2 : replace(y2, /&\f/g, rule[x])))
        props[k2++] = z2;
  return node(value, root, parent, offset2 === 0 ? RULESET : type2, props, children, length2);
}
function comment(value, root, parent) {
  return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
}
function declaration(value, root, parent, length2) {
  return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
}
function serialize(children, callback) {
  var output = "";
  var length2 = sizeof(children);
  for (var i = 0; i < length2; i++)
    output += callback(children[i], i, children, callback) || "";
  return output;
}
function stringify(element, index2, children, callback) {
  switch (element.type) {
    case LAYER:
      if (element.children.length) break;
    case IMPORT:
    case DECLARATION:
      return element.return = element.return || element.value;
    case COMMENT:
      return "";
    case KEYFRAMES:
      return element.return = element.value + "{" + serialize(element.children, callback) + "}";
    case RULESET:
      element.value = element.props.join(",");
  }
  return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
}
function middleware(collection) {
  var length2 = sizeof(collection);
  return function(element, index2, children, callback) {
    var output = "";
    for (var i = 0; i < length2; i++)
      output += collection[i](element, index2, children, callback) || "";
    return output;
  };
}
function rulesheet(callback) {
  return function(element) {
    if (!element.root) {
      if (element = element.return)
        callback(element);
    }
  };
}
function memoize$1(fn2) {
  var cache2 = /* @__PURE__ */ Object.create(null);
  return function(arg) {
    if (cache2[arg] === void 0) cache2[arg] = fn2(arg);
    return cache2[arg];
  };
}
var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index2) {
  var previous = 0;
  var character2 = 0;
  while (true) {
    previous = character2;
    character2 = peek();
    if (previous === 38 && character2 === 12) {
      points[index2] = 1;
    }
    if (token(character2)) {
      break;
    }
    next();
  }
  return slice(begin, position$1);
};
var toRules = function toRules2(parsed, points) {
  var index2 = -1;
  var character2 = 44;
  do {
    switch (token(character2)) {
      case 0:
        if (character2 === 38 && peek() === 12) {
          points[index2] = 1;
        }
        parsed[index2] += identifierWithPointTracking(position$1 - 1, points, index2);
        break;
      case 2:
        parsed[index2] += delimit(character2);
        break;
      case 4:
        if (character2 === 44) {
          parsed[++index2] = peek() === 58 ? "&\f" : "";
          points[index2] = parsed[index2].length;
          break;
        }
      // fallthrough
      default:
        parsed[index2] += from(character2);
    }
  } while (character2 = next());
  return parsed;
};
var getRules = function getRules2(value, points) {
  return dealloc(toRules(alloc(value), points));
};
var fixedElements = /* @__PURE__ */ new WeakMap();
var compat = function compat2(element) {
  if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
  // negative .length indicates that this rule has been already prefixed
  element.length < 1) {
    return;
  }
  var value = element.value;
  var parent = element.parent;
  var isImplicitRule = element.column === parent.column && element.line === parent.line;
  while (parent.type !== "rule") {
    parent = parent.parent;
    if (!parent) return;
  }
  if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
    return;
  }
  if (isImplicitRule) {
    return;
  }
  fixedElements.set(element, true);
  var points = [];
  var rules = getRules(value, points);
  var parentRules = parent.props;
  for (var i = 0, k2 = 0; i < rules.length; i++) {
    for (var j = 0; j < parentRules.length; j++, k2++) {
      element.props[k2] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
    }
  }
};
var removeLabel = function removeLabel2(element) {
  if (element.type === "decl") {
    var value = element.value;
    if (
      // charcode for l
      value.charCodeAt(0) === 108 && // charcode for b
      value.charCodeAt(2) === 98
    ) {
      element["return"] = "";
      element.value = "";
    }
  }
};
function prefix(value, length2) {
  switch (hash$2(value, length2)) {
    // color-adjust
    case 5103:
      return WEBKIT + "print-" + value + value;
    // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
    case 5737:
    case 4201:
    case 3177:
    case 3433:
    case 1641:
    case 4457:
    case 2921:
    // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
    case 5572:
    case 6356:
    case 5844:
    case 3191:
    case 6645:
    case 3005:
    // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
    case 6391:
    case 5879:
    case 5623:
    case 6135:
    case 4599:
    case 4855:
    // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
    case 4215:
    case 6389:
    case 5109:
    case 5365:
    case 5621:
    case 3829:
      return WEBKIT + value + value;
    // appearance, user-select, transform, hyphens, text-size-adjust
    case 5349:
    case 4246:
    case 4810:
    case 6968:
    case 2756:
      return WEBKIT + value + MOZ + value + MS + value + value;
    // flex, flex-direction
    case 6828:
    case 4268:
      return WEBKIT + value + MS + value + value;
    // order
    case 6165:
      return WEBKIT + value + MS + "flex-" + value + value;
    // align-items
    case 5187:
      return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
    // align-self
    case 5443:
      return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
    // align-content
    case 4675:
      return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
    // flex-shrink
    case 5548:
      return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
    // flex-basis
    case 5292:
      return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
    // flex-grow
    case 6060:
      return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
    // transition
    case 4554:
      return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
    // cursor
    case 6187:
      return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
    // background, background-image
    case 5495:
    case 3959:
      return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
    // justify-content
    case 4968:
      return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
    // (margin|padding)-inline-(start|end)
    case 4095:
    case 3583:
    case 4068:
    case 2532:
      return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
    // (min|max)?(width|height|inline-size|block-size)
    case 8116:
    case 7059:
    case 5753:
    case 5535:
    case 5445:
    case 5701:
    case 4933:
    case 4677:
    case 5533:
    case 5789:
    case 5021:
    case 4765:
      if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
        // (m)ax-content, (m)in-content
        case 109:
          if (charat(value, length2 + 4) !== 45) break;
        // (f)ill-available, (f)it-content
        case 102:
          return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
        // (s)tretch
        case 115:
          return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
      }
      break;
    // position: sticky
    case 4949:
      if (charat(value, length2 + 1) !== 115) break;
    // display: (flex|inline-flex)
    case 6444:
      switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
        // stic(k)y
        case 107:
          return replace(value, ":", ":" + WEBKIT) + value;
        // (inline-)?fl(e)x
        case 101:
          return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
      }
      break;
    // writing-mode
    case 5936:
      switch (charat(value, length2 + 11)) {
        // vertical-l(r)
        case 114:
          return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
        // vertical-r(l)
        case 108:
          return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
        // horizontal(-)tb
        case 45:
          return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
      }
      return WEBKIT + value + MS + value + value;
  }
  return value;
}
var prefixer = function prefixer2(element, index2, children, callback) {
  if (element.length > -1) {
    if (!element["return"]) switch (element.type) {
      case DECLARATION:
        element["return"] = prefix(element.value, element.length);
        break;
      case KEYFRAMES:
        return serialize([copy(element, {
          value: replace(element.value, "@", "@" + WEBKIT)
        })], callback);
      case RULESET:
        if (element.length) return combine(element.props, function(value) {
          switch (match$3(value, /(::plac\w+|:read-\w+)/)) {
            // :read-(only|write)
            case ":read-only":
            case ":read-write":
              return serialize([copy(element, {
                props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
              })], callback);
            // :placeholder
            case "::placeholder":
              return serialize([copy(element, {
                props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
              }), copy(element, {
                props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
              }), copy(element, {
                props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
              })], callback);
          }
          return "";
        });
    }
  }
};
var defaultStylisPlugins = [prefixer];
var createCache = function createCache2(options) {
  var key = options.key;
  if (key === "css") {
    var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
    Array.prototype.forEach.call(ssrStyles, function(node2) {
      var dataEmotionAttribute = node2.getAttribute("data-emotion");
      if (dataEmotionAttribute.indexOf(" ") === -1) {
        return;
      }
      document.head.appendChild(node2);
      node2.setAttribute("data-s", "");
    });
  }
  var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
  var inserted = {};
  var container;
  var nodesToHydrate = [];
  {
    container = options.container || document.head;
    Array.prototype.forEach.call(
      // this means we will ignore elements which don't have a space in them which
      // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
      document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
      function(node2) {
        var attrib = node2.getAttribute("data-emotion").split(" ");
        for (var i = 1; i < attrib.length; i++) {
          inserted[attrib[i]] = true;
        }
        nodesToHydrate.push(node2);
      }
    );
  }
  var _insert;
  var omnipresentPlugins = [compat, removeLabel];
  {
    var currentSheet;
    var finalizingPlugins = [stringify, rulesheet(function(rule) {
      currentSheet.insert(rule);
    })];
    var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
    var stylis = function stylis2(styles2) {
      return serialize(compile(styles2), serializer);
    };
    _insert = function insert(selector, serialized, sheet, shouldCache) {
      currentSheet = sheet;
      stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
      if (shouldCache) {
        cache2.inserted[serialized.name] = true;
      }
    };
  }
  var cache2 = {
    key,
    sheet: new StyleSheet({
      key,
      container,
      nonce: options.nonce,
      speedy: options.speedy,
      prepend: options.prepend,
      insertionPoint: options.insertionPoint
    }),
    nonce: options.nonce,
    inserted,
    registered: {},
    insert: _insert
  };
  cache2.sheet.hydrate(nodesToHydrate);
  return cache2;
};
var reactIs$1 = { exports: {} };
var reactIs_production_min = {};
/** @license React v16.13.1
 * react-is.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredReactIs_production_min;
function requireReactIs_production_min() {
  if (hasRequiredReactIs_production_min) return reactIs_production_min;
  hasRequiredReactIs_production_min = 1;
  var b2 = "function" === typeof Symbol && Symbol.for, c = b2 ? Symbol.for("react.element") : 60103, d2 = b2 ? Symbol.for("react.portal") : 60106, e2 = b2 ? Symbol.for("react.fragment") : 60107, f2 = b2 ? Symbol.for("react.strict_mode") : 60108, g2 = b2 ? Symbol.for("react.profiler") : 60114, h2 = b2 ? Symbol.for("react.provider") : 60109, k2 = b2 ? Symbol.for("react.context") : 60110, l = b2 ? Symbol.for("react.async_mode") : 60111, m2 = b2 ? Symbol.for("react.concurrent_mode") : 60111, n = b2 ? Symbol.for("react.forward_ref") : 60112, p2 = b2 ? Symbol.for("react.suspense") : 60113, q2 = b2 ? Symbol.for("react.suspense_list") : 60120, r2 = b2 ? Symbol.for("react.memo") : 60115, t = b2 ? Symbol.for("react.lazy") : 60116, v2 = b2 ? Symbol.for("react.block") : 60121, w = b2 ? Symbol.for("react.fundamental") : 60117, x = b2 ? Symbol.for("react.responder") : 60118, y2 = b2 ? Symbol.for("react.scope") : 60119;
  function z2(a2) {
    if ("object" === typeof a2 && null !== a2) {
      var u2 = a2.$$typeof;
      switch (u2) {
        case c:
          switch (a2 = a2.type, a2) {
            case l:
            case m2:
            case e2:
            case g2:
            case f2:
            case p2:
              return a2;
            default:
              switch (a2 = a2 && a2.$$typeof, a2) {
                case k2:
                case n:
                case t:
                case r2:
                case h2:
                  return a2;
                default:
                  return u2;
              }
          }
        case d2:
          return u2;
      }
    }
  }
  function A2(a2) {
    return z2(a2) === m2;
  }
  reactIs_production_min.AsyncMode = l;
  reactIs_production_min.ConcurrentMode = m2;
  reactIs_production_min.ContextConsumer = k2;
  reactIs_production_min.ContextProvider = h2;
  reactIs_production_min.Element = c;
  reactIs_production_min.ForwardRef = n;
  reactIs_production_min.Fragment = e2;
  reactIs_production_min.Lazy = t;
  reactIs_production_min.Memo = r2;
  reactIs_production_min.Portal = d2;
  reactIs_production_min.Profiler = g2;
  reactIs_production_min.StrictMode = f2;
  reactIs_production_min.Suspense = p2;
  reactIs_production_min.isAsyncMode = function(a2) {
    return A2(a2) || z2(a2) === l;
  };
  reactIs_production_min.isConcurrentMode = A2;
  reactIs_production_min.isContextConsumer = function(a2) {
    return z2(a2) === k2;
  };
  reactIs_production_min.isContextProvider = function(a2) {
    return z2(a2) === h2;
  };
  reactIs_production_min.isElement = function(a2) {
    return "object" === typeof a2 && null !== a2 && a2.$$typeof === c;
  };
  reactIs_production_min.isForwardRef = function(a2) {
    return z2(a2) === n;
  };
  reactIs_production_min.isFragment = function(a2) {
    return z2(a2) === e2;
  };
  reactIs_production_min.isLazy = function(a2) {
    return z2(a2) === t;
  };
  reactIs_production_min.isMemo = function(a2) {
    return z2(a2) === r2;
  };
  reactIs_production_min.isPortal = function(a2) {
    return z2(a2) === d2;
  };
  reactIs_production_min.isProfiler = function(a2) {
    return z2(a2) === g2;
  };
  reactIs_production_min.isStrictMode = function(a2) {
    return z2(a2) === f2;
  };
  reactIs_production_min.isSuspense = function(a2) {
    return z2(a2) === p2;
  };
  reactIs_production_min.isValidElementType = function(a2) {
    return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m2 || a2 === g2 || a2 === f2 || a2 === p2 || a2 === q2 || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t || a2.$$typeof === r2 || a2.$$typeof === h2 || a2.$$typeof === k2 || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y2 || a2.$$typeof === v2);
  };
  reactIs_production_min.typeOf = z2;
  return reactIs_production_min;
}
var hasRequiredReactIs$1;
function requireReactIs$1() {
  if (hasRequiredReactIs$1) return reactIs$1.exports;
  hasRequiredReactIs$1 = 1;
  {
    reactIs$1.exports = requireReactIs_production_min();
  }
  return reactIs$1.exports;
}
var hoistNonReactStatics_cjs;
var hasRequiredHoistNonReactStatics_cjs;
function requireHoistNonReactStatics_cjs() {
  if (hasRequiredHoistNonReactStatics_cjs) return hoistNonReactStatics_cjs;
  hasRequiredHoistNonReactStatics_cjs = 1;
  var reactIs2 = requireReactIs$1();
  var REACT_STATICS = {
    childContextTypes: true,
    contextType: true,
    contextTypes: true,
    defaultProps: true,
    displayName: true,
    getDefaultProps: true,
    getDerivedStateFromError: true,
    getDerivedStateFromProps: true,
    mixins: true,
    propTypes: true,
    type: true
  };
  var KNOWN_STATICS = {
    name: true,
    length: true,
    prototype: true,
    caller: true,
    callee: true,
    arguments: true,
    arity: true
  };
  var FORWARD_REF_STATICS = {
    "$$typeof": true,
    render: true,
    defaultProps: true,
    displayName: true,
    propTypes: true
  };
  var MEMO_STATICS = {
    "$$typeof": true,
    compare: true,
    defaultProps: true,
    displayName: true,
    propTypes: true,
    type: true
  };
  var TYPE_STATICS = {};
  TYPE_STATICS[reactIs2.ForwardRef] = FORWARD_REF_STATICS;
  TYPE_STATICS[reactIs2.Memo] = MEMO_STATICS;
  function getStatics(component) {
    if (reactIs2.isMemo(component)) {
      return MEMO_STATICS;
    }
    return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
  }
  var defineProperty = Object.defineProperty;
  var getOwnPropertyNames = Object.getOwnPropertyNames;
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  var getPrototypeOf2 = Object.getPrototypeOf;
  var objectPrototype = Object.prototype;
  function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
    if (typeof sourceComponent !== "string") {
      if (objectPrototype) {
        var inheritedComponent = getPrototypeOf2(sourceComponent);
        if (inheritedComponent && inheritedComponent !== objectPrototype) {
          hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
        }
      }
      var keys = getOwnPropertyNames(sourceComponent);
      if (getOwnPropertySymbols) {
        keys = keys.concat(getOwnPropertySymbols(sourceComponent));
      }
      var targetStatics = getStatics(targetComponent);
      var sourceStatics = getStatics(sourceComponent);
      for (var i = 0; i < keys.length; ++i) {
        var key = keys[i];
        if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
          var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
          try {
            defineProperty(targetComponent, key, descriptor);
          } catch (e2) {
          }
        }
      }
    }
    return targetComponent;
  }
  hoistNonReactStatics_cjs = hoistNonReactStatics;
  return hoistNonReactStatics_cjs;
}
requireHoistNonReactStatics_cjs();
var isBrowser = true;
function getRegisteredStyles(registered, registeredStyles, classNames) {
  var rawClassName = "";
  classNames.split(" ").forEach(function(className) {
    if (registered[className] !== void 0) {
      registeredStyles.push(registered[className] + ";");
    } else if (className) {
      rawClassName += className + " ";
    }
  });
  return rawClassName;
}
var registerStyles = function registerStyles2(cache2, serialized, isStringTag2) {
  var className = cache2.key + "-" + serialized.name;
  if (
    // we only need to add the styles to the registered cache if the
    // class name could be used further down
    // the tree but if it's a string tag, we know it won't
    // so we don't have to add it to registered cache.
    // this improves memory usage since we can avoid storing the whole style string
    (isStringTag2 === false || // we need to always store it if we're in compat mode and
    // in node since emotion-server relies on whether a style is in
    // the registered cache to know whether a style is global or not
    // also, note that this check will be dead code eliminated in the browser
    isBrowser === false) && cache2.registered[className] === void 0
  ) {
    cache2.registered[className] = serialized.styles;
  }
};
var insertStyles = function insertStyles2(cache2, serialized, isStringTag2) {
  registerStyles(cache2, serialized, isStringTag2);
  var className = cache2.key + "-" + serialized.name;
  if (cache2.inserted[serialized.name] === void 0) {
    var current = serialized;
    do {
      cache2.insert(serialized === current ? "." + className : "", current, cache2.sheet, true);
      current = current.next;
    } while (current !== void 0);
  }
};
function murmur2(str) {
  var h2 = 0;
  var k2, i = 0, len = str.length;
  for (; len >= 4; ++i, len -= 4) {
    k2 = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
    k2 = /* Math.imul(k, m): */
    (k2 & 65535) * 1540483477 + ((k2 >>> 16) * 59797 << 16);
    k2 ^= /* k >>> r: */
    k2 >>> 24;
    h2 = /* Math.imul(k, m): */
    (k2 & 65535) * 1540483477 + ((k2 >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
    (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
  }
  switch (len) {
    case 3:
      h2 ^= (str.charCodeAt(i + 2) & 255) << 16;
    case 2:
      h2 ^= (str.charCodeAt(i + 1) & 255) << 8;
    case 1:
      h2 ^= str.charCodeAt(i) & 255;
      h2 = /* Math.imul(h, m): */
      (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
  }
  h2 ^= h2 >>> 13;
  h2 = /* Math.imul(h, m): */
  (h2 & 65535) * 1540483477 + ((h2 >>> 16) * 59797 << 16);
  return ((h2 ^ h2 >>> 15) >>> 0).toString(36);
}
var unitlessKeys = {
  animationIterationCount: 1,
  aspectRatio: 1,
  borderImageOutset: 1,
  borderImageSlice: 1,
  borderImageWidth: 1,
  boxFlex: 1,
  boxFlexGroup: 1,
  boxOrdinalGroup: 1,
  columnCount: 1,
  columns: 1,
  flex: 1,
  flexGrow: 1,
  flexPositive: 1,
  flexShrink: 1,
  flexNegative: 1,
  flexOrder: 1,
  gridRow: 1,
  gridRowEnd: 1,
  gridRowSpan: 1,
  gridRowStart: 1,
  gridColumn: 1,
  gridColumnEnd: 1,
  gridColumnSpan: 1,
  gridColumnStart: 1,
  msGridRow: 1,
  msGridRowSpan: 1,
  msGridColumn: 1,
  msGridColumnSpan: 1,
  fontWeight: 1,
  lineHeight: 1,
  opacity: 1,
  order: 1,
  orphans: 1,
  scale: 1,
  tabSize: 1,
  widows: 1,
  zIndex: 1,
  zoom: 1,
  WebkitLineClamp: 1,
  // SVG-related properties
  fillOpacity: 1,
  floodOpacity: 1,
  stopOpacity: 1,
  strokeDasharray: 1,
  strokeDashoffset: 1,
  strokeMiterlimit: 1,
  strokeOpacity: 1,
  strokeWidth: 1
};
var hyphenateRegex = /[A-Z]|^ms/g;
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
var isCustomProperty = function isCustomProperty2(property) {
  return property.charCodeAt(1) === 45;
};
var isProcessableValue = function isProcessableValue2(value) {
  return value != null && typeof value !== "boolean";
};
var processStyleName = /* @__PURE__ */ memoize$1(function(styleName) {
  return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
});
var processStyleValue = function processStyleValue2(key, value) {
  switch (key) {
    case "animation":
    case "animationName": {
      if (typeof value === "string") {
        return value.replace(animationRegex, function(match2, p1, p2) {
          cursor = {
            name: p1,
            styles: p2,
            next: cursor
          };
          return p1;
        });
      }
    }
  }
  if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) {
    return value + "px";
  }
  return value;
};
function handleInterpolation(mergedProps, registered, interpolation) {
  if (interpolation == null) {
    return "";
  }
  var componentSelector = interpolation;
  if (componentSelector.__emotion_styles !== void 0) {
    return componentSelector;
  }
  switch (typeof interpolation) {
    case "boolean": {
      return "";
    }
    case "object": {
      var keyframes2 = interpolation;
      if (keyframes2.anim === 1) {
        cursor = {
          name: keyframes2.name,
          styles: keyframes2.styles,
          next: cursor
        };
        return keyframes2.name;
      }
      var serializedStyles = interpolation;
      if (serializedStyles.styles !== void 0) {
        var next2 = serializedStyles.next;
        if (next2 !== void 0) {
          while (next2 !== void 0) {
            cursor = {
              name: next2.name,
              styles: next2.styles,
              next: cursor
            };
            next2 = next2.next;
          }
        }
        var styles2 = serializedStyles.styles + ";";
        return styles2;
      }
      return createStringFromObject(mergedProps, registered, interpolation);
    }
    case "function": {
      if (mergedProps !== void 0) {
        var previousCursor = cursor;
        var result = interpolation(mergedProps);
        cursor = previousCursor;
        return handleInterpolation(mergedProps, registered, result);
      }
      break;
    }
  }
  var asString2 = interpolation;
  if (registered == null) {
    return asString2;
  }
  var cached = registered[asString2];
  return cached !== void 0 ? cached : asString2;
}
function createStringFromObject(mergedProps, registered, obj2) {
  var string = "";
  if (Array.isArray(obj2)) {
    for (var i = 0; i < obj2.length; i++) {
      string += handleInterpolation(mergedProps, registered, obj2[i]) + ";";
    }
  } else {
    for (var key in obj2) {
      var value = obj2[key];
      if (typeof value !== "object") {
        var asString2 = value;
        if (registered != null && registered[asString2] !== void 0) {
          string += key + "{" + registered[asString2] + "}";
        } else if (isProcessableValue(asString2)) {
          string += processStyleName(key) + ":" + processStyleValue(key, asString2) + ";";
        }
      } else {
        if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
          for (var _i = 0; _i < value.length; _i++) {
            if (isProcessableValue(value[_i])) {
              string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
            }
          }
        } else {
          var interpolated = handleInterpolation(mergedProps, registered, value);
          switch (key) {
            case "animation":
            case "animationName": {
              string += processStyleName(key) + ":" + interpolated + ";";
              break;
            }
            default: {
              string += key + "{" + interpolated + "}";
            }
          }
        }
      }
    }
  }
  return string;
}
var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
var cursor;
function serializeStyles(args, registered, mergedProps) {
  if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
    return args[0];
  }
  var stringMode = true;
  var styles2 = "";
  cursor = void 0;
  var strings = args[0];
  if (strings == null || strings.raw === void 0) {
    stringMode = false;
    styles2 += handleInterpolation(mergedProps, registered, strings);
  } else {
    var asTemplateStringsArr = strings;
    styles2 += asTemplateStringsArr[0];
  }
  for (var i = 1; i < args.length; i++) {
    styles2 += handleInterpolation(mergedProps, registered, args[i]);
    if (stringMode) {
      var templateStringsArr = strings;
      styles2 += templateStringsArr[i];
    }
  }
  labelPattern.lastIndex = 0;
  var identifierName = "";
  var match2;
  while ((match2 = labelPattern.exec(styles2)) !== null) {
    identifierName += "-" + match2[1];
  }
  var name = murmur2(styles2) + identifierName;
  return {
    name,
    styles: styles2,
    next: cursor
  };
}
var syncFallback = function syncFallback2(create) {
  return create();
};
var useInsertionEffect = React$1["useInsertionEffect"] ? React$1["useInsertionEffect"] : false;
var useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;
var useInsertionEffectWithLayoutFallback = useInsertionEffect || reactExports.useLayoutEffect;
var EmotionCacheContext = /* @__PURE__ */ reactExports.createContext(
  // we're doing this to avoid preconstruct's dead code elimination in this one case
  // because this module is primarily intended for the browser and node
  // but it's also required in react native and similar environments sometimes
  // and we could have a special build just for that
  // but this is much easier and the native packages
  // might use a different theme context in the future anyway
  typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({
    key: "css"
  }) : null
);
var CacheProvider = EmotionCacheContext.Provider;
var withEmotionCache = function withEmotionCache2(func) {
  return /* @__PURE__ */ reactExports.forwardRef(function(props, ref2) {
    var cache2 = reactExports.useContext(EmotionCacheContext);
    return func(props, cache2, ref2);
  });
};
var ThemeContext$1 = /* @__PURE__ */ reactExports.createContext({});
var hasOwn = {}.hasOwnProperty;
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
var createEmotionProps = function createEmotionProps2(type2, props) {
  var newProps = {};
  for (var _key in props) {
    if (hasOwn.call(props, _key)) {
      newProps[_key] = props[_key];
    }
  }
  newProps[typePropName] = type2;
  return newProps;
};
var Insertion$1 = function Insertion(_ref) {
  var cache2 = _ref.cache, serialized = _ref.serialized, isStringTag2 = _ref.isStringTag;
  registerStyles(cache2, serialized, isStringTag2);
  useInsertionEffectAlwaysWithSyncFallback(function() {
    return insertStyles(cache2, serialized, isStringTag2);
  });
  return null;
};
var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache2, ref2) {
  var cssProp = props.css;
  if (typeof cssProp === "string" && cache2.registered[cssProp] !== void 0) {
    cssProp = cache2.registered[cssProp];
  }
  var WrappedComponent = props[typePropName];
  var registeredStyles = [cssProp];
  var className = "";
  if (typeof props.className === "string") {
    className = getRegisteredStyles(cache2.registered, registeredStyles, props.className);
  } else if (props.className != null) {
    className = props.className + " ";
  }
  var serialized = serializeStyles(registeredStyles, void 0, reactExports.useContext(ThemeContext$1));
  className += cache2.key + "-" + serialized.name;
  var newProps = {};
  for (var _key2 in props) {
    if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && true) {
      newProps[_key2] = props[_key2];
    }
  }
  newProps.className = className;
  if (ref2) {
    newProps.ref = ref2;
  }
  return /* @__PURE__ */ reactExports.createElement(reactExports.Fragment, null, /* @__PURE__ */ reactExports.createElement(Insertion$1, {
    cache: cache2,
    serialized,
    isStringTag: typeof WrappedComponent === "string"
  }), /* @__PURE__ */ reactExports.createElement(WrappedComponent, newProps));
});
var Emotion$1 = Emotion;
var jsx = function jsx2(type2, props) {
  var args = arguments;
  if (props == null || !hasOwn.call(props, "css")) {
    return reactExports.createElement.apply(void 0, args);
  }
  var argsLength = args.length;
  var createElementArgArray = new Array(argsLength);
  createElementArgArray[0] = Emotion$1;
  createElementArgArray[1] = createEmotionProps(type2, props);
  for (var i = 2; i < argsLength; i++) {
    createElementArgArray[i] = args[i];
  }
  return reactExports.createElement.apply(null, createElementArgArray);
};
(function(_jsx) {
  var JSX;
  /* @__PURE__ */ (function(_JSX) {
  })(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
})(jsx || (jsx = {}));
var Global = /* @__PURE__ */ withEmotionCache(function(props, cache2) {
  var styles2 = props.styles;
  var serialized = serializeStyles([styles2], void 0, reactExports.useContext(ThemeContext$1));
  var sheetRef = reactExports.useRef();
  useInsertionEffectWithLayoutFallback(function() {
    var key = cache2.key + "-global";
    var sheet = new cache2.sheet.constructor({
      key,
      nonce: cache2.sheet.nonce,
      container: cache2.sheet.container,
      speedy: cache2.sheet.isSpeedy
    });
    var rehydrating = false;
    var node2 = document.querySelector('style[data-emotion="' + key + " " + serialized.name + '"]');
    if (cache2.sheet.tags.length) {
      sheet.before = cache2.sheet.tags[0];
    }
    if (node2 !== null) {
      rehydrating = true;
      node2.setAttribute("data-emotion", key);
      sheet.hydrate([node2]);
    }
    sheetRef.current = [sheet, rehydrating];
    return function() {
      sheet.flush();
    };
  }, [cache2]);
  useInsertionEffectWithLayoutFallback(function() {
    var sheetRefCurrent = sheetRef.current;
    var sheet = sheetRefCurrent[0], rehydrating = sheetRefCurrent[1];
    if (rehydrating) {
      sheetRefCurrent[1] = false;
      return;
    }
    if (serialized.next !== void 0) {
      insertStyles(cache2, serialized.next, true);
    }
    if (sheet.tags.length) {
      var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;
      sheet.before = element;
      sheet.flush();
    }
    cache2.insert("", serialized, sheet, false);
  }, [cache2, serialized.name]);
  return null;
});
function css() {
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }
  return serializeStyles(args);
}
function keyframes() {
  var insertable = css.apply(void 0, arguments);
  var name = "animation-" + insertable.name;
  return {
    name,
    styles: "@keyframes " + name + "{" + insertable.styles + "}",
    anim: 1,
    toString: function toString3() {
      return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
    }
  };
}
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
var isPropValid = /* @__PURE__ */ memoize$1(
  function(prop) {
    return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
  }
  /* Z+1 */
);
var testOmitPropsOnStringTag = isPropValid;
var testOmitPropsOnComponent = function testOmitPropsOnComponent2(key) {
  return key !== "theme";
};
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp2(tag) {
  return typeof tag === "string" && // 96 is one less than the char code
  // for "a" so this is checking that
  // it's a lowercase character
  tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
};
var composeShouldForwardProps = function composeShouldForwardProps2(tag, options, isReal) {
  var shouldForwardProp2;
  if (options) {
    var optionsShouldForwardProp = options.shouldForwardProp;
    shouldForwardProp2 = tag.__emotion_forwardProp && optionsShouldForwardProp ? function(propName) {
      return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
    } : optionsShouldForwardProp;
  }
  if (typeof shouldForwardProp2 !== "function" && isReal) {
    shouldForwardProp2 = tag.__emotion_forwardProp;
  }
  return shouldForwardProp2;
};
var Insertion2 = function Insertion3(_ref) {
  var cache2 = _ref.cache, serialized = _ref.serialized, isStringTag2 = _ref.isStringTag;
  registerStyles(cache2, serialized, isStringTag2);
  useInsertionEffectAlwaysWithSyncFallback(function() {
    return insertStyles(cache2, serialized, isStringTag2);
  });
  return null;
};
var createStyled$3 = function createStyled(tag, options) {
  var isReal = tag.__emotion_real === tag;
  var baseTag = isReal && tag.__emotion_base || tag;
  var identifierName;
  var targetClassName;
  if (options !== void 0) {
    identifierName = options.label;
    targetClassName = options.target;
  }
  var shouldForwardProp2 = composeShouldForwardProps(tag, options, isReal);
  var defaultShouldForwardProp = shouldForwardProp2 || getDefaultShouldForwardProp(baseTag);
  var shouldUseAs = !defaultShouldForwardProp("as");
  return function() {
    var args = arguments;
    var styles2 = isReal && tag.__emotion_styles !== void 0 ? tag.__emotion_styles.slice(0) : [];
    if (identifierName !== void 0) {
      styles2.push("label:" + identifierName + ";");
    }
    if (args[0] == null || args[0].raw === void 0) {
      styles2.push.apply(styles2, args);
    } else {
      var templateStringsArr = args[0];
      styles2.push(templateStringsArr[0]);
      var len = args.length;
      var i = 1;
      for (; i < len; i++) {
        styles2.push(args[i], templateStringsArr[i]);
      }
    }
    var Styled = withEmotionCache(function(props, cache2, ref2) {
      var FinalTag = shouldUseAs && props.as || baseTag;
      var className = "";
      var classInterpolations = [];
      var mergedProps = props;
      if (props.theme == null) {
        mergedProps = {};
        for (var key in props) {
          mergedProps[key] = props[key];
        }
        mergedProps.theme = reactExports.useContext(ThemeContext$1);
      }
      if (typeof props.className === "string") {
        className = getRegisteredStyles(cache2.registered, classInterpolations, props.className);
      } else if (props.className != null) {
        className = props.className + " ";
      }
      var serialized = serializeStyles(styles2.concat(classInterpolations), cache2.registered, mergedProps);
      className += cache2.key + "-" + serialized.name;
      if (targetClassName !== void 0) {
        className += " " + targetClassName;
      }
      var finalShouldForwardProp = shouldUseAs && shouldForwardProp2 === void 0 ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
      var newProps = {};
      for (var _key in props) {
        if (shouldUseAs && _key === "as") continue;
        if (finalShouldForwardProp(_key)) {
          newProps[_key] = props[_key];
        }
      }
      newProps.className = className;
      if (ref2) {
        newProps.ref = ref2;
      }
      return /* @__PURE__ */ reactExports.createElement(reactExports.Fragment, null, /* @__PURE__ */ reactExports.createElement(Insertion2, {
        cache: cache2,
        serialized,
        isStringTag: typeof FinalTag === "string"
      }), /* @__PURE__ */ reactExports.createElement(FinalTag, newProps));
    });
    Styled.displayName = identifierName !== void 0 ? identifierName : "Styled(" + (typeof baseTag === "string" ? baseTag : baseTag.displayName || baseTag.name || "Component") + ")";
    Styled.defaultProps = tag.defaultProps;
    Styled.__emotion_real = Styled;
    Styled.__emotion_base = baseTag;
    Styled.__emotion_styles = styles2;
    Styled.__emotion_forwardProp = shouldForwardProp2;
    Object.defineProperty(Styled, "toString", {
      value: function value() {
        return "." + targetClassName;
      }
    });
    Styled.withComponent = function(nextTag, nextOptions) {
      var newStyled2 = createStyled(nextTag, _extends$1({}, options, nextOptions, {
        shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
      }));
      return newStyled2.apply(void 0, styles2);
    };
    return Styled;
  };
};
var tags = [
  "a",
  "abbr",
  "address",
  "area",
  "article",
  "aside",
  "audio",
  "b",
  "base",
  "bdi",
  "bdo",
  "big",
  "blockquote",
  "body",
  "br",
  "button",
  "canvas",
  "caption",
  "cite",
  "code",
  "col",
  "colgroup",
  "data",
  "datalist",
  "dd",
  "del",
  "details",
  "dfn",
  "dialog",
  "div",
  "dl",
  "dt",
  "em",
  "embed",
  "fieldset",
  "figcaption",
  "figure",
  "footer",
  "form",
  "h1",
  "h2",
  "h3",
  "h4",
  "h5",
  "h6",
  "head",
  "header",
  "hgroup",
  "hr",
  "html",
  "i",
  "iframe",
  "img",
  "input",
  "ins",
  "kbd",
  "keygen",
  "label",
  "legend",
  "li",
  "link",
  "main",
  "map",
  "mark",
  "marquee",
  "menu",
  "menuitem",
  "meta",
  "meter",
  "nav",
  "noscript",
  "object",
  "ol",
  "optgroup",
  "option",
  "output",
  "p",
  "param",
  "picture",
  "pre",
  "progress",
  "q",
  "rp",
  "rt",
  "ruby",
  "s",
  "samp",
  "script",
  "section",
  "select",
  "small",
  "source",
  "span",
  "strong",
  "style",
  "sub",
  "summary",
  "sup",
  "table",
  "tbody",
  "td",
  "textarea",
  "tfoot",
  "th",
  "thead",
  "time",
  "title",
  "tr",
  "track",
  "u",
  "ul",
  "var",
  "video",
  "wbr",
  // SVG
  "circle",
  "clipPath",
  "defs",
  "ellipse",
  "foreignObject",
  "g",
  "image",
  "line",
  "linearGradient",
  "mask",
  "path",
  "pattern",
  "polygon",
  "polyline",
  "radialGradient",
  "rect",
  "stop",
  "svg",
  "text",
  "tspan"
];
var newStyled = createStyled$3.bind(null);
tags.forEach(function(tagName) {
  newStyled[tagName] = newStyled(tagName);
});
var propTypes = { exports: {} };
var ReactPropTypesSecret_1;
var hasRequiredReactPropTypesSecret;
function requireReactPropTypesSecret() {
  if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
  hasRequiredReactPropTypesSecret = 1;
  var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
  ReactPropTypesSecret_1 = ReactPropTypesSecret;
  return ReactPropTypesSecret_1;
}
var factoryWithThrowingShims;
var hasRequiredFactoryWithThrowingShims;
function requireFactoryWithThrowingShims() {
  if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
  hasRequiredFactoryWithThrowingShims = 1;
  var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
  function emptyFunction() {
  }
  function emptyFunctionWithReset() {
  }
  emptyFunctionWithReset.resetWarningCache = emptyFunction;
  factoryWithThrowingShims = function() {
    function shim(props, propName, componentName, location2, propFullName, secret) {
      if (secret === ReactPropTypesSecret) {
        return;
      }
      var err = new Error(
        "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
      );
      err.name = "Invariant Violation";
      throw err;
    }
    shim.isRequired = shim;
    function getShim() {
      return shim;
    }
    var ReactPropTypes = {
      array: shim,
      bigint: shim,
      bool: shim,
      func: shim,
      number: shim,
      object: shim,
      string: shim,
      symbol: shim,
      any: shim,
      arrayOf: getShim,
      element: shim,
      elementType: shim,
      instanceOf: getShim,
      node: shim,
      objectOf: getShim,
      oneOf: getShim,
      oneOfType: getShim,
      shape: getShim,
      exact: getShim,
      checkPropTypes: emptyFunctionWithReset,
      resetWarningCache: emptyFunction
    };
    ReactPropTypes.PropTypes = ReactPropTypes;
    return ReactPropTypes;
  };
  return factoryWithThrowingShims;
}
var hasRequiredPropTypes;
function requirePropTypes() {
  if (hasRequiredPropTypes) return propTypes.exports;
  hasRequiredPropTypes = 1;
  {
    propTypes.exports = /* @__PURE__ */ requireFactoryWithThrowingShims()();
  }
  return propTypes.exports;
}
var propTypesExports = /* @__PURE__ */ requirePropTypes();
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
let cache;
if (typeof document === "object") {
  cache = createCache({
    key: "css",
    prepend: true
  });
}
function StyledEngineProvider(props) {
  const {
    injectFirst,
    children
  } = props;
  return injectFirst && cache ? /* @__PURE__ */ jsxRuntimeExports.jsx(CacheProvider, {
    value: cache,
    children
  }) : children;
}
function isEmpty$3(obj2) {
  return obj2 === void 0 || obj2 === null || Object.keys(obj2).length === 0;
}
function GlobalStyles$2(props) {
  const {
    styles: styles2,
    defaultTheme: defaultTheme2 = {}
  } = props;
  const globalStyles = typeof styles2 === "function" ? (themeInput) => styles2(isEmpty$3(themeInput) ? defaultTheme2 : themeInput) : styles2;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Global, {
    styles: globalStyles
  });
}
function styled$2(tag, options) {
  const stylesFactory = newStyled(tag, options);
  return stylesFactory;
}
const internal_processStyles = (tag, processor) => {
  if (Array.isArray(tag.__emotion_styles)) {
    tag.__emotion_styles = processor(tag.__emotion_styles);
  }
};
const styledEngine = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  GlobalStyles: GlobalStyles$2,
  StyledEngineProvider,
  ThemeContext: ThemeContext$1,
  css,
  default: styled$2,
  internal_processStyles,
  keyframes
}, Symbol.toStringTag, { value: "Module" }));
function isPlainObject$1(item) {
  if (typeof item !== "object" || item === null) {
    return false;
  }
  const prototype2 = Object.getPrototypeOf(item);
  return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);
}
function deepClone(source) {
  if (/* @__PURE__ */ reactExports.isValidElement(source) || !isPlainObject$1(source)) {
    return source;
  }
  const output = {};
  Object.keys(source).forEach((key) => {
    output[key] = deepClone(source[key]);
  });
  return output;
}
function deepmerge$1(target, source, options = {
  clone: true
}) {
  const output = options.clone ? _extends$1({}, target) : target;
  if (isPlainObject$1(target) && isPlainObject$1(source)) {
    Object.keys(source).forEach((key) => {
      if (/* @__PURE__ */ reactExports.isValidElement(source[key])) {
        output[key] = source[key];
      } else if (isPlainObject$1(source[key]) && // Avoid prototype pollution
      Object.prototype.hasOwnProperty.call(target, key) && isPlainObject$1(target[key])) {
        output[key] = deepmerge$1(target[key], source[key], options);
      } else if (options.clone) {
        output[key] = isPlainObject$1(source[key]) ? deepClone(source[key]) : source[key];
      } else {
        output[key] = source[key];
      }
    });
  }
  return output;
}
const deepmerge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: deepmerge$1,
  isPlainObject: isPlainObject$1
}, Symbol.toStringTag, { value: "Module" }));
const _excluded$1Q = ["values", "unit", "step"];
const sortBreakpointsValues = (values2) => {
  const breakpointsAsArray = Object.keys(values2).map((key) => ({
    key,
    val: values2[key]
  })) || [];
  breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);
  return breakpointsAsArray.reduce((acc, obj2) => {
    return _extends$1({}, acc, {
      [obj2.key]: obj2.val
    });
  }, {});
};
function createBreakpoints(breakpoints) {
  const {
    // The breakpoint **start** at this value.
    // For instance with the first breakpoint xs: [xs, sm).
    values: values2 = {
      xs: 0,
      // phone
      sm: 600,
      // tablet
      md: 900,
      // small laptop
      lg: 1200,
      // desktop
      xl: 1536
      // large screen
    },
    unit = "px",
    step = 5
  } = breakpoints, other = _objectWithoutPropertiesLoose(breakpoints, _excluded$1Q);
  const sortedValues = sortBreakpointsValues(values2);
  const keys = Object.keys(sortedValues);
  function up(key) {
    const value = typeof values2[key] === "number" ? values2[key] : key;
    return `@media (min-width:${value}${unit})`;
  }
  function down(key) {
    const value = typeof values2[key] === "number" ? values2[key] : key;
    return `@media (max-width:${value - step / 100}${unit})`;
  }
  function between(start2, end2) {
    const endIndex = keys.indexOf(end2);
    return `@media (min-width:${typeof values2[start2] === "number" ? values2[start2] : start2}${unit}) and (max-width:${(endIndex !== -1 && typeof values2[keys[endIndex]] === "number" ? values2[keys[endIndex]] : end2) - step / 100}${unit})`;
  }
  function only(key) {
    if (keys.indexOf(key) + 1 < keys.length) {
      return between(key, keys[keys.indexOf(key) + 1]);
    }
    return up(key);
  }
  function not(key) {
    const keyIndex = keys.indexOf(key);
    if (keyIndex === 0) {
      return up(keys[1]);
    }
    if (keyIndex === keys.length - 1) {
      return down(keys[keyIndex]);
    }
    return between(key, keys[keys.indexOf(key) + 1]).replace("@media", "@media not all and");
  }
  return _extends$1({
    keys,
    values: sortedValues,
    up,
    down,
    between,
    only,
    not,
    unit
  }, other);
}
const shape = {
  borderRadius: 4
};
function merge$1(acc, item) {
  if (!item) {
    return acc;
  }
  return deepmerge$1(acc, item, {
    clone: false
    // No need to clone deep, it's way faster.
  });
}
const values$1 = {
  xs: 0,
  // phone
  sm: 600,
  // tablet
  md: 900,
  // small laptop
  lg: 1200,
  // desktop
  xl: 1536
  // large screen
};
const defaultBreakpoints = {
  // Sorted ASC by size. That's important.
  // It can't be configured as it's used statically for propTypes.
  keys: ["xs", "sm", "md", "lg", "xl"],
  up: (key) => `@media (min-width:${values$1[key]}px)`
};
function handleBreakpoints(props, propValue, styleFromPropValue) {
  const theme = props.theme || {};
  if (Array.isArray(propValue)) {
    const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
    return propValue.reduce((acc, item, index2) => {
      acc[themeBreakpoints.up(themeBreakpoints.keys[index2])] = styleFromPropValue(propValue[index2]);
      return acc;
    }, {});
  }
  if (typeof propValue === "object") {
    const themeBreakpoints = theme.breakpoints || defaultBreakpoints;
    return Object.keys(propValue).reduce((acc, breakpoint) => {
      if (Object.keys(themeBreakpoints.values || values$1).indexOf(breakpoint) !== -1) {
        const mediaKey = themeBreakpoints.up(breakpoint);
        acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);
      } else {
        const cssKey = breakpoint;
        acc[cssKey] = propValue[cssKey];
      }
      return acc;
    }, {});
  }
  const output = styleFromPropValue(propValue);
  return output;
}
function createEmptyBreakpointObject(breakpointsInput = {}) {
  var _breakpointsInput$key;
  const breakpointsInOrder = (_breakpointsInput$key = breakpointsInput.keys) == null ? void 0 : _breakpointsInput$key.reduce((acc, key) => {
    const breakpointStyleKey = breakpointsInput.up(key);
    acc[breakpointStyleKey] = {};
    return acc;
  }, {});
  return breakpointsInOrder || {};
}
function removeUnusedBreakpoints(breakpointKeys, style2) {
  return breakpointKeys.reduce((acc, key) => {
    const breakpointOutput = acc[key];
    const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;
    if (isBreakpointUnused) {
      delete acc[key];
    }
    return acc;
  }, style2);
}
function mergeBreakpointsInOrder(breakpointsInput, ...styles2) {
  const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);
  const mergedOutput = [emptyBreakpoints, ...styles2].reduce((prev2, next2) => deepmerge$1(prev2, next2), {});
  return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);
}
function computeBreakpointsBase(breakpointValues, themeBreakpoints) {
  if (typeof breakpointValues !== "object") {
    return {};
  }
  const base = {};
  const breakpointsKeys = Object.keys(themeBreakpoints);
  if (Array.isArray(breakpointValues)) {
    breakpointsKeys.forEach((breakpoint, i) => {
      if (i < breakpointValues.length) {
        base[breakpoint] = true;
      }
    });
  } else {
    breakpointsKeys.forEach((breakpoint) => {
      if (breakpointValues[breakpoint] != null) {
        base[breakpoint] = true;
      }
    });
  }
  return base;
}
function resolveBreakpointValues({
  values: breakpointValues,
  breakpoints: themeBreakpoints,
  base: customBase
}) {
  const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);
  const keys = Object.keys(base);
  if (keys.length === 0) {
    return breakpointValues;
  }
  let previous;
  return keys.reduce((acc, breakpoint, i) => {
    if (Array.isArray(breakpointValues)) {
      acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];
      previous = i;
    } else if (typeof breakpointValues === "object") {
      acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];
      previous = breakpoint;
    } else {
      acc[breakpoint] = breakpointValues;
    }
    return acc;
  }, {});
}
function capitalize$2(string) {
  if (typeof string !== "string") {
    throw new Error(formatMuiErrorMessage$1(7));
  }
  return string.charAt(0).toUpperCase() + string.slice(1);
}
const capitalize$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: capitalize$2
}, Symbol.toStringTag, { value: "Module" }));
function getPath$1(obj2, path, checkVars = true) {
  if (!path || typeof path !== "string") {
    return null;
  }
  if (obj2 && obj2.vars && checkVars) {
    const val = `vars.${path}`.split(".").reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj2);
    if (val != null) {
      return val;
    }
  }
  return path.split(".").reduce((acc, item) => {
    if (acc && acc[item] != null) {
      return acc[item];
    }
    return null;
  }, obj2);
}
function getStyleValue$1(themeMapping, transform2, propValueFinal, userValue = propValueFinal) {
  let value;
  if (typeof themeMapping === "function") {
    value = themeMapping(propValueFinal);
  } else if (Array.isArray(themeMapping)) {
    value = themeMapping[propValueFinal] || userValue;
  } else {
    value = getPath$1(themeMapping, propValueFinal) || userValue;
  }
  if (transform2) {
    value = transform2(value, userValue, themeMapping);
  }
  return value;
}
function style$3(options) {
  const {
    prop,
    cssProperty = options.prop,
    themeKey,
    transform: transform2
  } = options;
  const fn2 = (props) => {
    if (props[prop] == null) {
      return null;
    }
    const propValue = props[prop];
    const theme = props.theme;
    const themeMapping = getPath$1(theme, themeKey) || {};
    const styleFromPropValue = (propValueFinal) => {
      let value = getStyleValue$1(themeMapping, transform2, propValueFinal);
      if (propValueFinal === value && typeof propValueFinal === "string") {
        value = getStyleValue$1(themeMapping, transform2, `${prop}${propValueFinal === "default" ? "" : capitalize$2(propValueFinal)}`, propValueFinal);
      }
      if (cssProperty === false) {
        return value;
      }
      return {
        [cssProperty]: value
      };
    };
    return handleBreakpoints(props, propValue, styleFromPropValue);
  };
  fn2.propTypes = {};
  fn2.filterProps = [prop];
  return fn2;
}
function memoize(fn2) {
  const cache2 = {};
  return (arg) => {
    if (cache2[arg] === void 0) {
      cache2[arg] = fn2(arg);
    }
    return cache2[arg];
  };
}
const properties = {
  m: "margin",
  p: "padding"
};
const directions = {
  t: "Top",
  r: "Right",
  b: "Bottom",
  l: "Left",
  x: ["Left", "Right"],
  y: ["Top", "Bottom"]
};
const aliases = {
  marginX: "mx",
  marginY: "my",
  paddingX: "px",
  paddingY: "py"
};
const getCssProperties = memoize((prop) => {
  if (prop.length > 2) {
    if (aliases[prop]) {
      prop = aliases[prop];
    } else {
      return [prop];
    }
  }
  const [a2, b2] = prop.split("");
  const property = properties[a2];
  const direction2 = directions[b2] || "";
  return Array.isArray(direction2) ? direction2.map((dir) => property + dir) : [property + direction2];
});
const marginKeys = ["m", "mt", "mr", "mb", "ml", "mx", "my", "margin", "marginTop", "marginRight", "marginBottom", "marginLeft", "marginX", "marginY", "marginInline", "marginInlineStart", "marginInlineEnd", "marginBlock", "marginBlockStart", "marginBlockEnd"];
const paddingKeys = ["p", "pt", "pr", "pb", "pl", "px", "py", "padding", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft", "paddingX", "paddingY", "paddingInline", "paddingInlineStart", "paddingInlineEnd", "paddingBlock", "paddingBlockStart", "paddingBlockEnd"];
[...marginKeys, ...paddingKeys];
function createUnaryUnit(theme, themeKey, defaultValue, propName) {
  var _getPath;
  const themeSpacing = (_getPath = getPath$1(theme, themeKey, false)) != null ? _getPath : defaultValue;
  if (typeof themeSpacing === "number") {
    return (abs2) => {
      if (typeof abs2 === "string") {
        return abs2;
      }
      return themeSpacing * abs2;
    };
  }
  if (Array.isArray(themeSpacing)) {
    return (abs2) => {
      if (typeof abs2 === "string") {
        return abs2;
      }
      return themeSpacing[abs2];
    };
  }
  if (typeof themeSpacing === "function") {
    return themeSpacing;
  }
  return () => void 0;
}
function createUnarySpacing(theme) {
  return createUnaryUnit(theme, "spacing", 8);
}
function getValue(transformer, propValue) {
  if (typeof propValue === "string" || propValue == null) {
    return propValue;
  }
  const abs2 = Math.abs(propValue);
  const transformed = transformer(abs2);
  if (propValue >= 0) {
    return transformed;
  }
  if (typeof transformed === "number") {
    return -transformed;
  }
  return `-${transformed}`;
}
function getStyleFromPropValue(cssProperties, transformer) {
  return (propValue) => cssProperties.reduce((acc, cssProperty) => {
    acc[cssProperty] = getValue(transformer, propValue);
    return acc;
  }, {});
}
function resolveCssProperty(props, keys, prop, transformer) {
  if (keys.indexOf(prop) === -1) {
    return null;
  }
  const cssProperties = getCssProperties(prop);
  const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);
  const propValue = props[prop];
  return handleBreakpoints(props, propValue, styleFromPropValue);
}
function style$2(props, keys) {
  const transformer = createUnarySpacing(props.theme);
  return Object.keys(props).map((prop) => resolveCssProperty(props, keys, prop, transformer)).reduce(merge$1, {});
}
function margin(props) {
  return style$2(props, marginKeys);
}
margin.propTypes = {};
margin.filterProps = marginKeys;
function padding(props) {
  return style$2(props, paddingKeys);
}
padding.propTypes = {};
padding.filterProps = paddingKeys;
function createSpacing(spacingInput = 8) {
  if (spacingInput.mui) {
    return spacingInput;
  }
  const transform2 = createUnarySpacing({
    spacing: spacingInput
  });
  const spacing = (...argsInput) => {
    const args = argsInput.length === 0 ? [1] : argsInput;
    return args.map((argument) => {
      const output = transform2(argument);
      return typeof output === "number" ? `${output}px` : output;
    }).join(" ");
  };
  spacing.mui = true;
  return spacing;
}
function compose(...styles2) {
  const handlers = styles2.reduce((acc, style2) => {
    style2.filterProps.forEach((prop) => {
      acc[prop] = style2;
    });
    return acc;
  }, {});
  const fn2 = (props) => {
    return Object.keys(props).reduce((acc, prop) => {
      if (handlers[prop]) {
        return merge$1(acc, handlers[prop](props));
      }
      return acc;
    }, {});
  };
  fn2.propTypes = {};
  fn2.filterProps = styles2.reduce((acc, style2) => acc.concat(style2.filterProps), []);
  return fn2;
}
function borderTransform(value) {
  if (typeof value !== "number") {
    return value;
  }
  return `${value}px solid`;
}
function createBorderStyle(prop, transform2) {
  return style$3({
    prop,
    themeKey: "borders",
    transform: transform2
  });
}
const border = createBorderStyle("border", borderTransform);
const borderTop = createBorderStyle("borderTop", borderTransform);
const borderRight = createBorderStyle("borderRight", borderTransform);
const borderBottom = createBorderStyle("borderBottom", borderTransform);
const borderLeft = createBorderStyle("borderLeft", borderTransform);
const borderColor = createBorderStyle("borderColor");
const borderTopColor$1 = createBorderStyle("borderTopColor");
const borderRightColor$1 = createBorderStyle("borderRightColor");
const borderBottomColor$1 = createBorderStyle("borderBottomColor");
const borderLeftColor$1 = createBorderStyle("borderLeftColor");
const outline = createBorderStyle("outline", borderTransform);
const outlineColor = createBorderStyle("outlineColor");
const borderRadius = (props) => {
  if (props.borderRadius !== void 0 && props.borderRadius !== null) {
    const transformer = createUnaryUnit(props.theme, "shape.borderRadius", 4);
    const styleFromPropValue = (propValue) => ({
      borderRadius: getValue(transformer, propValue)
    });
    return handleBreakpoints(props, props.borderRadius, styleFromPropValue);
  }
  return null;
};
borderRadius.propTypes = {};
borderRadius.filterProps = ["borderRadius"];
compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor$1, borderRightColor$1, borderBottomColor$1, borderLeftColor$1, borderRadius, outline, outlineColor);
const gap = (props) => {
  if (props.gap !== void 0 && props.gap !== null) {
    const transformer = createUnaryUnit(props.theme, "spacing", 8);
    const styleFromPropValue = (propValue) => ({
      gap: getValue(transformer, propValue)
    });
    return handleBreakpoints(props, props.gap, styleFromPropValue);
  }
  return null;
};
gap.propTypes = {};
gap.filterProps = ["gap"];
const columnGap = (props) => {
  if (props.columnGap !== void 0 && props.columnGap !== null) {
    const transformer = createUnaryUnit(props.theme, "spacing", 8);
    const styleFromPropValue = (propValue) => ({
      columnGap: getValue(transformer, propValue)
    });
    return handleBreakpoints(props, props.columnGap, styleFromPropValue);
  }
  return null;
};
columnGap.propTypes = {};
columnGap.filterProps = ["columnGap"];
const rowGap = (props) => {
  if (props.rowGap !== void 0 && props.rowGap !== null) {
    const transformer = createUnaryUnit(props.theme, "spacing", 8);
    const styleFromPropValue = (propValue) => ({
      rowGap: getValue(transformer, propValue)
    });
    return handleBreakpoints(props, props.rowGap, styleFromPropValue);
  }
  return null;
};
rowGap.propTypes = {};
rowGap.filterProps = ["rowGap"];
const gridColumn = style$3({
  prop: "gridColumn"
});
const gridRow = style$3({
  prop: "gridRow"
});
const gridAutoFlow = style$3({
  prop: "gridAutoFlow"
});
const gridAutoColumns = style$3({
  prop: "gridAutoColumns"
});
const gridAutoRows = style$3({
  prop: "gridAutoRows"
});
const gridTemplateColumns = style$3({
  prop: "gridTemplateColumns"
});
const gridTemplateRows = style$3({
  prop: "gridTemplateRows"
});
const gridTemplateAreas = style$3({
  prop: "gridTemplateAreas"
});
const gridArea = style$3({
  prop: "gridArea"
});
compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);
function paletteTransform(value, userValue) {
  if (userValue === "grey") {
    return userValue;
  }
  return value;
}
const color$2 = style$3({
  prop: "color",
  themeKey: "palette",
  transform: paletteTransform
});
const bgcolor = style$3({
  prop: "bgcolor",
  cssProperty: "backgroundColor",
  themeKey: "palette",
  transform: paletteTransform
});
const backgroundColor$1 = style$3({
  prop: "backgroundColor",
  themeKey: "palette",
  transform: paletteTransform
});
compose(color$2, bgcolor, backgroundColor$1);
function sizingTransform(value) {
  return value <= 1 && value !== 0 ? `${value * 100}%` : value;
}
const width = style$3({
  prop: "width",
  transform: sizingTransform
});
const maxWidth = (props) => {
  if (props.maxWidth !== void 0 && props.maxWidth !== null) {
    const styleFromPropValue = (propValue) => {
      var _props$theme, _props$theme2;
      const breakpoint = ((_props$theme = props.theme) == null || (_props$theme = _props$theme.breakpoints) == null || (_props$theme = _props$theme.values) == null ? void 0 : _props$theme[propValue]) || values$1[propValue];
      if (!breakpoint) {
        return {
          maxWidth: sizingTransform(propValue)
        };
      }
      if (((_props$theme2 = props.theme) == null || (_props$theme2 = _props$theme2.breakpoints) == null ? void 0 : _props$theme2.unit) !== "px") {
        return {
          maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`
        };
      }
      return {
        maxWidth: breakpoint
      };
    };
    return handleBreakpoints(props, props.maxWidth, styleFromPropValue);
  }
  return null;
};
maxWidth.filterProps = ["maxWidth"];
const minWidth = style$3({
  prop: "minWidth",
  transform: sizingTransform
});
const height = style$3({
  prop: "height",
  transform: sizingTransform
});
const maxHeight = style$3({
  prop: "maxHeight",
  transform: sizingTransform
});
const minHeight = style$3({
  prop: "minHeight",
  transform: sizingTransform
});
style$3({
  prop: "size",
  cssProperty: "width",
  transform: sizingTransform
});
style$3({
  prop: "size",
  cssProperty: "height",
  transform: sizingTransform
});
const boxSizing = style$3({
  prop: "boxSizing"
});
compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);
const defaultSxConfig = {
  // borders
  border: {
    themeKey: "borders",
    transform: borderTransform
  },
  borderTop: {
    themeKey: "borders",
    transform: borderTransform
  },
  borderRight: {
    themeKey: "borders",
    transform: borderTransform
  },
  borderBottom: {
    themeKey: "borders",
    transform: borderTransform
  },
  borderLeft: {
    themeKey: "borders",
    transform: borderTransform
  },
  borderColor: {
    themeKey: "palette"
  },
  borderTopColor: {
    themeKey: "palette"
  },
  borderRightColor: {
    themeKey: "palette"
  },
  borderBottomColor: {
    themeKey: "palette"
  },
  borderLeftColor: {
    themeKey: "palette"
  },
  outline: {
    themeKey: "borders",
    transform: borderTransform
  },
  outlineColor: {
    themeKey: "palette"
  },
  borderRadius: {
    themeKey: "shape.borderRadius",
    style: borderRadius
  },
  // palette
  color: {
    themeKey: "palette",
    transform: paletteTransform
  },
  bgcolor: {
    themeKey: "palette",
    cssProperty: "backgroundColor",
    transform: paletteTransform
  },
  backgroundColor: {
    themeKey: "palette",
    transform: paletteTransform
  },
  // spacing
  p: {
    style: padding
  },
  pt: {
    style: padding
  },
  pr: {
    style: padding
  },
  pb: {
    style: padding
  },
  pl: {
    style: padding
  },
  px: {
    style: padding
  },
  py: {
    style: padding
  },
  padding: {
    style: padding
  },
  paddingTop: {
    style: padding
  },
  paddingRight: {
    style: padding
  },
  paddingBottom: {
    style: padding
  },
  paddingLeft: {
    style: padding
  },
  paddingX: {
    style: padding
  },
  paddingY: {
    style: padding
  },
  paddingInline: {
    style: padding
  },
  paddingInlineStart: {
    style: padding
  },
  paddingInlineEnd: {
    style: padding
  },
  paddingBlock: {
    style: padding
  },
  paddingBlockStart: {
    style: padding
  },
  paddingBlockEnd: {
    style: padding
  },
  m: {
    style: margin
  },
  mt: {
    style: margin
  },
  mr: {
    style: margin
  },
  mb: {
    style: margin
  },
  ml: {
    style: margin
  },
  mx: {
    style: margin
  },
  my: {
    style: margin
  },
  margin: {
    style: margin
  },
  marginTop: {
    style: margin
  },
  marginRight: {
    style: margin
  },
  marginBottom: {
    style: margin
  },
  marginLeft: {
    style: margin
  },
  marginX: {
    style: margin
  },
  marginY: {
    style: margin
  },
  marginInline: {
    style: margin
  },
  marginInlineStart: {
    style: margin
  },
  marginInlineEnd: {
    style: margin
  },
  marginBlock: {
    style: margin
  },
  marginBlockStart: {
    style: margin
  },
  marginBlockEnd: {
    style: margin
  },
  // display
  displayPrint: {
    cssProperty: false,
    transform: (value) => ({
      "@media print": {
        display: value
      }
    })
  },
  display: {},
  overflow: {},
  textOverflow: {},
  visibility: {},
  whiteSpace: {},
  // flexbox
  flexBasis: {},
  flexDirection: {},
  flexWrap: {},
  justifyContent: {},
  alignItems: {},
  alignContent: {},
  order: {},
  flex: {},
  flexGrow: {},
  flexShrink: {},
  alignSelf: {},
  justifyItems: {},
  justifySelf: {},
  // grid
  gap: {
    style: gap
  },
  rowGap: {
    style: rowGap
  },
  columnGap: {
    style: columnGap
  },
  gridColumn: {},
  gridRow: {},
  gridAutoFlow: {},
  gridAutoColumns: {},
  gridAutoRows: {},
  gridTemplateColumns: {},
  gridTemplateRows: {},
  gridTemplateAreas: {},
  gridArea: {},
  // positions
  position: {},
  zIndex: {
    themeKey: "zIndex"
  },
  top: {},
  right: {},
  bottom: {},
  left: {},
  // shadows
  boxShadow: {
    themeKey: "shadows"
  },
  // sizing
  width: {
    transform: sizingTransform
  },
  maxWidth: {
    style: maxWidth
  },
  minWidth: {
    transform: sizingTransform
  },
  height: {
    transform: sizingTransform
  },
  maxHeight: {
    transform: sizingTransform
  },
  minHeight: {
    transform: sizingTransform
  },
  boxSizing: {},
  // typography
  fontFamily: {
    themeKey: "typography"
  },
  fontSize: {
    themeKey: "typography"
  },
  fontStyle: {
    themeKey: "typography"
  },
  fontWeight: {
    themeKey: "typography"
  },
  letterSpacing: {},
  textTransform: {},
  lineHeight: {},
  textAlign: {},
  typography: {
    cssProperty: false,
    themeKey: "typography"
  }
};
function objectsHaveSameKeys(...objects) {
  const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);
  const union = new Set(allKeys);
  return objects.every((object) => union.size === Object.keys(object).length);
}
function callIfFn(maybeFn, arg) {
  return typeof maybeFn === "function" ? maybeFn(arg) : maybeFn;
}
function unstable_createStyleFunctionSx() {
  function getThemeValue(prop, val, theme, config2) {
    const props = {
      [prop]: val,
      theme
    };
    const options = config2[prop];
    if (!options) {
      return {
        [prop]: val
      };
    }
    const {
      cssProperty = prop,
      themeKey,
      transform: transform2,
      style: style2
    } = options;
    if (val == null) {
      return null;
    }
    if (themeKey === "typography" && val === "inherit") {
      return {
        [prop]: val
      };
    }
    const themeMapping = getPath$1(theme, themeKey) || {};
    if (style2) {
      return style2(props);
    }
    const styleFromPropValue = (propValueFinal) => {
      let value = getStyleValue$1(themeMapping, transform2, propValueFinal);
      if (propValueFinal === value && typeof propValueFinal === "string") {
        value = getStyleValue$1(themeMapping, transform2, `${prop}${propValueFinal === "default" ? "" : capitalize$2(propValueFinal)}`, propValueFinal);
      }
      if (cssProperty === false) {
        return value;
      }
      return {
        [cssProperty]: value
      };
    };
    return handleBreakpoints(props, val, styleFromPropValue);
  }
  function styleFunctionSx2(props) {
    var _theme$unstable_sxCon;
    const {
      sx,
      theme = {}
    } = props || {};
    if (!sx) {
      return null;
    }
    const config2 = (_theme$unstable_sxCon = theme.unstable_sxConfig) != null ? _theme$unstable_sxCon : defaultSxConfig;
    function traverse(sxInput) {
      let sxObject = sxInput;
      if (typeof sxInput === "function") {
        sxObject = sxInput(theme);
      } else if (typeof sxInput !== "object") {
        return sxInput;
      }
      if (!sxObject) {
        return null;
      }
      const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);
      const breakpointsKeys = Object.keys(emptyBreakpoints);
      let css2 = emptyBreakpoints;
      Object.keys(sxObject).forEach((styleKey) => {
        const value = callIfFn(sxObject[styleKey], theme);
        if (value !== null && value !== void 0) {
          if (typeof value === "object") {
            if (config2[styleKey]) {
              css2 = merge$1(css2, getThemeValue(styleKey, value, theme, config2));
            } else {
              const breakpointsValues = handleBreakpoints({
                theme
              }, value, (x) => ({
                [styleKey]: x
              }));
              if (objectsHaveSameKeys(breakpointsValues, value)) {
                css2[styleKey] = styleFunctionSx2({
                  sx: value,
                  theme
                });
              } else {
                css2 = merge$1(css2, breakpointsValues);
              }
            }
          } else {
            css2 = merge$1(css2, getThemeValue(styleKey, value, theme, config2));
          }
        }
      });
      return removeUnusedBreakpoints(breakpointsKeys, css2);
    }
    return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);
  }
  return styleFunctionSx2;
}
const styleFunctionSx$1 = unstable_createStyleFunctionSx();
styleFunctionSx$1.filterProps = ["sx"];
function applyStyles$2(key, styles2) {
  const theme = this;
  if (theme.vars && typeof theme.getColorSchemeSelector === "function") {
    const selector = theme.getColorSchemeSelector(key).replace(/(\[[^\]]+\])/, "*:where($1)");
    return {
      [selector]: styles2
    };
  }
  if (theme.palette.mode === key) {
    return styles2;
  }
  return {};
}
const _excluded$1P = ["breakpoints", "palette", "spacing", "shape"];
function createTheme$2(options = {}, ...args) {
  const {
    breakpoints: breakpointsInput = {},
    palette: paletteInput = {},
    spacing: spacingInput,
    shape: shapeInput = {}
  } = options, other = _objectWithoutPropertiesLoose(options, _excluded$1P);
  const breakpoints = createBreakpoints(breakpointsInput);
  const spacing = createSpacing(spacingInput);
  let muiTheme = deepmerge$1({
    breakpoints,
    direction: "ltr",
    components: {},
    // Inject component definitions.
    palette: _extends$1({
      mode: "light"
    }, paletteInput),
    spacing,
    shape: _extends$1({}, shape, shapeInput)
  }, other);
  muiTheme.applyStyles = applyStyles$2;
  muiTheme = args.reduce((acc, argument) => deepmerge$1(acc, argument), muiTheme);
  muiTheme.unstable_sxConfig = _extends$1({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
  muiTheme.unstable_sx = function sx(props) {
    return styleFunctionSx$1({
      sx: props,
      theme: this
    });
  };
  return muiTheme;
}
const createTheme$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: createTheme$2,
  private_createBreakpoints: createBreakpoints,
  unstable_applyStyles: applyStyles$2
}, Symbol.toStringTag, { value: "Module" }));
function isObjectEmpty$1(obj2) {
  return Object.keys(obj2).length === 0;
}
function useTheme$4(defaultTheme2 = null) {
  const contextTheme = reactExports.useContext(ThemeContext$1);
  return !contextTheme || isObjectEmpty$1(contextTheme) ? defaultTheme2 : contextTheme;
}
const systemDefaultTheme$1 = createTheme$2();
function useTheme$3(defaultTheme2 = systemDefaultTheme$1) {
  return useTheme$4(defaultTheme2);
}
function GlobalStyles$1({
  styles: styles2,
  themeId,
  defaultTheme: defaultTheme2 = {}
}) {
  const upperTheme = useTheme$3(defaultTheme2);
  const globalStyles = typeof styles2 === "function" ? styles2(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles2;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles$2, {
    styles: globalStyles
  });
}
const _excluded$1O = ["sx"];
const splitProps = (props) => {
  var _props$theme$unstable, _props$theme;
  const result = {
    systemProps: {},
    otherProps: {}
  };
  const config2 = (_props$theme$unstable = props == null || (_props$theme = props.theme) == null ? void 0 : _props$theme.unstable_sxConfig) != null ? _props$theme$unstable : defaultSxConfig;
  Object.keys(props).forEach((prop) => {
    if (config2[prop]) {
      result.systemProps[prop] = props[prop];
    } else {
      result.otherProps[prop] = props[prop];
    }
  });
  return result;
};
function extendSxProp(props) {
  const {
    sx: inSx
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1O);
  const {
    systemProps,
    otherProps
  } = splitProps(other);
  let finalSx;
  if (Array.isArray(inSx)) {
    finalSx = [systemProps, ...inSx];
  } else if (typeof inSx === "function") {
    finalSx = (...args) => {
      const result = inSx(...args);
      if (!isPlainObject$1(result)) {
        return systemProps;
      }
      return _extends$1({}, systemProps, result);
    };
  } else {
    finalSx = _extends$1({}, systemProps, inSx);
  }
  return _extends$1({}, otherProps, {
    sx: finalSx
  });
}
const styleFunctionSx = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: styleFunctionSx$1,
  extendSxProp,
  unstable_createStyleFunctionSx,
  unstable_defaultSxConfig: defaultSxConfig
}, Symbol.toStringTag, { value: "Module" }));
const defaultGenerator = (componentName) => componentName;
const createClassNameGenerator = () => {
  let generate = defaultGenerator;
  return {
    configure(generator) {
      generate = generator;
    },
    generate(componentName) {
      return generate(componentName);
    },
    reset() {
      generate = defaultGenerator;
    }
  };
};
const ClassNameGenerator = createClassNameGenerator();
function r$2(e2) {
  var t, f2, n = "";
  if ("string" == typeof e2 || "number" == typeof e2) n += e2;
  else if ("object" == typeof e2) if (Array.isArray(e2)) {
    var o = e2.length;
    for (t = 0; t < o; t++) e2[t] && (f2 = r$2(e2[t])) && (n && (n += " "), n += f2);
  } else for (f2 in e2) e2[f2] && (n && (n += " "), n += f2);
  return n;
}
function clsx$3() {
  for (var e2, t, f2 = 0, n = "", o = arguments.length; f2 < o; f2++) (e2 = arguments[f2]) && (t = r$2(e2)) && (n && (n += " "), n += t);
  return n;
}
const _excluded$1N = ["className", "component"];
function createBox(options = {}) {
  const {
    themeId,
    defaultTheme: defaultTheme2,
    defaultClassName = "MuiBox-root",
    generateClassName
  } = options;
  const BoxRoot = styled$2("div", {
    shouldForwardProp: (prop) => prop !== "theme" && prop !== "sx" && prop !== "as"
  })(styleFunctionSx$1);
  const Box2 = /* @__PURE__ */ reactExports.forwardRef(function Box3(inProps, ref2) {
    const theme = useTheme$3(defaultTheme2);
    const _extendSxProp = extendSxProp(inProps), {
      className,
      component = "div"
    } = _extendSxProp, other = _objectWithoutPropertiesLoose(_extendSxProp, _excluded$1N);
    return /* @__PURE__ */ jsxRuntimeExports.jsx(BoxRoot, _extends$1({
      as: component,
      ref: ref2,
      className: clsx$3(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),
      theme: themeId ? theme[themeId] || theme : theme
    }, other));
  });
  return Box2;
}
const globalStateClasses = {
  active: "active",
  checked: "checked",
  completed: "completed",
  disabled: "disabled",
  error: "error",
  expanded: "expanded",
  focused: "focused",
  focusVisible: "focusVisible",
  open: "open",
  readOnly: "readOnly",
  required: "required",
  selected: "selected"
};
function generateUtilityClass(componentName, slot, globalStatePrefix = "Mui") {
  const globalStateClass = globalStateClasses[slot];
  return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;
}
function generateUtilityClasses(componentName, slots, globalStatePrefix = "Mui") {
  const result = {};
  slots.forEach((slot) => {
    result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);
  });
  return result;
}
const boxClasses$1 = generateUtilityClasses("MuiBox", ["root"]);
const Box$2 = createBox({
  defaultClassName: boxClasses$1.root,
  generateClassName: ClassNameGenerator.generate
});
var reactIs = { exports: {} };
var reactIs_production = {};
/**
 * @license React
 * react-is.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
var hasRequiredReactIs_production;
function requireReactIs_production() {
  if (hasRequiredReactIs_production) return reactIs_production;
  hasRequiredReactIs_production = 1;
  var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
  var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference");
  function typeOf(object) {
    if ("object" === typeof object && null !== object) {
      var $$typeof = object.$$typeof;
      switch ($$typeof) {
        case REACT_ELEMENT_TYPE:
          switch (object = object.type, object) {
            case REACT_FRAGMENT_TYPE:
            case REACT_PROFILER_TYPE:
            case REACT_STRICT_MODE_TYPE:
            case REACT_SUSPENSE_TYPE:
            case REACT_SUSPENSE_LIST_TYPE:
            case REACT_VIEW_TRANSITION_TYPE:
              return object;
            default:
              switch (object = object && object.$$typeof, object) {
                case REACT_CONTEXT_TYPE:
                case REACT_FORWARD_REF_TYPE:
                case REACT_LAZY_TYPE:
                case REACT_MEMO_TYPE:
                  return object;
                case REACT_CONSUMER_TYPE:
                  return object;
                default:
                  return $$typeof;
              }
          }
        case REACT_PORTAL_TYPE:
          return $$typeof;
      }
    }
  }
  reactIs_production.ContextConsumer = REACT_CONSUMER_TYPE;
  reactIs_production.ContextProvider = REACT_CONTEXT_TYPE;
  reactIs_production.Element = REACT_ELEMENT_TYPE;
  reactIs_production.ForwardRef = REACT_FORWARD_REF_TYPE;
  reactIs_production.Fragment = REACT_FRAGMENT_TYPE;
  reactIs_production.Lazy = REACT_LAZY_TYPE;
  reactIs_production.Memo = REACT_MEMO_TYPE;
  reactIs_production.Portal = REACT_PORTAL_TYPE;
  reactIs_production.Profiler = REACT_PROFILER_TYPE;
  reactIs_production.StrictMode = REACT_STRICT_MODE_TYPE;
  reactIs_production.Suspense = REACT_SUSPENSE_TYPE;
  reactIs_production.SuspenseList = REACT_SUSPENSE_LIST_TYPE;
  reactIs_production.isContextConsumer = function(object) {
    return typeOf(object) === REACT_CONSUMER_TYPE;
  };
  reactIs_production.isContextProvider = function(object) {
    return typeOf(object) === REACT_CONTEXT_TYPE;
  };
  reactIs_production.isElement = function(object) {
    return "object" === typeof object && null !== object && object.$$typeof === REACT_ELEMENT_TYPE;
  };
  reactIs_production.isForwardRef = function(object) {
    return typeOf(object) === REACT_FORWARD_REF_TYPE;
  };
  reactIs_production.isFragment = function(object) {
    return typeOf(object) === REACT_FRAGMENT_TYPE;
  };
  reactIs_production.isLazy = function(object) {
    return typeOf(object) === REACT_LAZY_TYPE;
  };
  reactIs_production.isMemo = function(object) {
    return typeOf(object) === REACT_MEMO_TYPE;
  };
  reactIs_production.isPortal = function(object) {
    return typeOf(object) === REACT_PORTAL_TYPE;
  };
  reactIs_production.isProfiler = function(object) {
    return typeOf(object) === REACT_PROFILER_TYPE;
  };
  reactIs_production.isStrictMode = function(object) {
    return typeOf(object) === REACT_STRICT_MODE_TYPE;
  };
  reactIs_production.isSuspense = function(object) {
    return typeOf(object) === REACT_SUSPENSE_TYPE;
  };
  reactIs_production.isSuspenseList = function(object) {
    return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
  };
  reactIs_production.isValidElementType = function(type2) {
    return "string" === typeof type2 || "function" === typeof type2 || type2 === REACT_FRAGMENT_TYPE || type2 === REACT_PROFILER_TYPE || type2 === REACT_STRICT_MODE_TYPE || type2 === REACT_SUSPENSE_TYPE || type2 === REACT_SUSPENSE_LIST_TYPE || "object" === typeof type2 && null !== type2 && (type2.$$typeof === REACT_LAZY_TYPE || type2.$$typeof === REACT_MEMO_TYPE || type2.$$typeof === REACT_CONTEXT_TYPE || type2.$$typeof === REACT_CONSUMER_TYPE || type2.$$typeof === REACT_FORWARD_REF_TYPE || type2.$$typeof === REACT_CLIENT_REFERENCE || void 0 !== type2.getModuleId) ? true : false;
  };
  reactIs_production.typeOf = typeOf;
  return reactIs_production;
}
var hasRequiredReactIs;
function requireReactIs() {
  if (hasRequiredReactIs) return reactIs.exports;
  hasRequiredReactIs = 1;
  {
    reactIs.exports = /* @__PURE__ */ requireReactIs_production();
  }
  return reactIs.exports;
}
var reactIsExports = /* @__PURE__ */ requireReactIs();
const fnNameMatchRegex = /^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;
function getFunctionName(fn2) {
  const match2 = `${fn2}`.match(fnNameMatchRegex);
  const name = match2 && match2[1];
  return name || "";
}
function getFunctionComponentName(Component, fallback = "") {
  return Component.displayName || Component.name || getFunctionName(Component) || fallback;
}
function getWrappedName(outerType, innerType, wrapperName) {
  const functionName = getFunctionComponentName(innerType);
  return outerType.displayName || (functionName !== "" ? `${wrapperName}(${functionName})` : wrapperName);
}
function getDisplayName$1(Component) {
  if (Component == null) {
    return void 0;
  }
  if (typeof Component === "string") {
    return Component;
  }
  if (typeof Component === "function") {
    return getFunctionComponentName(Component, "Component");
  }
  if (typeof Component === "object") {
    switch (Component.$$typeof) {
      case reactIsExports.ForwardRef:
        return getWrappedName(Component, Component.render, "ForwardRef");
      case reactIsExports.Memo:
        return getWrappedName(Component, Component.type, "memo");
      default:
        return void 0;
    }
  }
  return void 0;
}
const getDisplayName = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: getDisplayName$1,
  getFunctionName
}, Symbol.toStringTag, { value: "Module" }));
const _excluded$1M = ["ownerState"], _excluded2$a = ["variants"], _excluded3$4 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
function isEmpty$2(obj2) {
  return Object.keys(obj2).length === 0;
}
function isStringTag(tag) {
  return typeof tag === "string" && // 96 is one less than the char code
  // for "a" so this is checking that
  // it's a lowercase character
  tag.charCodeAt(0) > 96;
}
function shouldForwardProp(prop) {
  return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as";
}
const systemDefaultTheme = createTheme$2();
const lowercaseFirstLetter = (string) => {
  if (!string) {
    return string;
  }
  return string.charAt(0).toLowerCase() + string.slice(1);
};
function resolveTheme({
  defaultTheme: defaultTheme2,
  theme,
  themeId
}) {
  return isEmpty$2(theme) ? defaultTheme2 : theme[themeId] || theme;
}
function defaultOverridesResolver(slot) {
  if (!slot) {
    return null;
  }
  return (props, styles2) => styles2[slot];
}
function processStyleArg(callableStyle, _ref) {
  let {
    ownerState
  } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded$1M);
  const resolvedStylesArg = typeof callableStyle === "function" ? callableStyle(_extends$1({
    ownerState
  }, props)) : callableStyle;
  if (Array.isArray(resolvedStylesArg)) {
    return resolvedStylesArg.flatMap((resolvedStyle) => processStyleArg(resolvedStyle, _extends$1({
      ownerState
    }, props)));
  }
  if (!!resolvedStylesArg && typeof resolvedStylesArg === "object" && Array.isArray(resolvedStylesArg.variants)) {
    const {
      variants = []
    } = resolvedStylesArg, otherStyles = _objectWithoutPropertiesLoose(resolvedStylesArg, _excluded2$a);
    let result = otherStyles;
    variants.forEach((variant2) => {
      let isMatch = true;
      if (typeof variant2.props === "function") {
        isMatch = variant2.props(_extends$1({
          ownerState
        }, props, ownerState));
      } else {
        Object.keys(variant2.props).forEach((key) => {
          if ((ownerState == null ? void 0 : ownerState[key]) !== variant2.props[key] && props[key] !== variant2.props[key]) {
            isMatch = false;
          }
        });
      }
      if (isMatch) {
        if (!Array.isArray(result)) {
          result = [result];
        }
        result.push(typeof variant2.style === "function" ? variant2.style(_extends$1({
          ownerState
        }, props, ownerState)) : variant2.style);
      }
    });
    return result;
  }
  return resolvedStylesArg;
}
function createStyled$2(input = {}) {
  const {
    themeId,
    defaultTheme: defaultTheme2 = systemDefaultTheme,
    rootShouldForwardProp: rootShouldForwardProp2 = shouldForwardProp,
    slotShouldForwardProp: slotShouldForwardProp2 = shouldForwardProp
  } = input;
  const systemSx = (props) => {
    return styleFunctionSx$1(_extends$1({}, props, {
      theme: resolveTheme(_extends$1({}, props, {
        defaultTheme: defaultTheme2,
        themeId
      }))
    }));
  };
  systemSx.__mui_systemSx = true;
  return (tag, inputOptions = {}) => {
    internal_processStyles(tag, (styles2) => styles2.filter((style2) => !(style2 != null && style2.__mui_systemSx)));
    const {
      name: componentName,
      slot: componentSlot,
      skipVariantsResolver: inputSkipVariantsResolver,
      skipSx: inputSkipSx,
      // TODO v6: remove `lowercaseFirstLetter()` in the next major release
      // For more details: https://github.com/mui/material-ui/pull/37908
      overridesResolver: overridesResolver2 = defaultOverridesResolver(lowercaseFirstLetter(componentSlot))
    } = inputOptions, options = _objectWithoutPropertiesLoose(inputOptions, _excluded3$4);
    const skipVariantsResolver = inputSkipVariantsResolver !== void 0 ? inputSkipVariantsResolver : (
      // TODO v6: remove `Root` in the next major release
      // For more details: https://github.com/mui/material-ui/pull/37908
      componentSlot && componentSlot !== "Root" && componentSlot !== "root" || false
    );
    const skipSx = inputSkipSx || false;
    let label;
    let shouldForwardPropOption = shouldForwardProp;
    if (componentSlot === "Root" || componentSlot === "root") {
      shouldForwardPropOption = rootShouldForwardProp2;
    } else if (componentSlot) {
      shouldForwardPropOption = slotShouldForwardProp2;
    } else if (isStringTag(tag)) {
      shouldForwardPropOption = void 0;
    }
    const defaultStyledResolver = styled$2(tag, _extends$1({
      shouldForwardProp: shouldForwardPropOption,
      label
    }, options));
    const transformStyleArg = (stylesArg) => {
      if (typeof stylesArg === "function" && stylesArg.__emotion_real !== stylesArg || isPlainObject$1(stylesArg)) {
        return (props) => processStyleArg(stylesArg, _extends$1({}, props, {
          theme: resolveTheme({
            theme: props.theme,
            defaultTheme: defaultTheme2,
            themeId
          })
        }));
      }
      return stylesArg;
    };
    const muiStyledResolver = (styleArg2, ...expressions) => {
      let transformedStyleArg = transformStyleArg(styleArg2);
      const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];
      if (componentName && overridesResolver2) {
        expressionsWithDefaultTheme.push((props) => {
          const theme = resolveTheme(_extends$1({}, props, {
            defaultTheme: defaultTheme2,
            themeId
          }));
          if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {
            return null;
          }
          const styleOverrides = theme.components[componentName].styleOverrides;
          const resolvedStyleOverrides = {};
          Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
            resolvedStyleOverrides[slotKey] = processStyleArg(slotStyle, _extends$1({}, props, {
              theme
            }));
          });
          return overridesResolver2(props, resolvedStyleOverrides);
        });
      }
      if (componentName && !skipVariantsResolver) {
        expressionsWithDefaultTheme.push((props) => {
          var _theme$components;
          const theme = resolveTheme(_extends$1({}, props, {
            defaultTheme: defaultTheme2,
            themeId
          }));
          const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;
          return processStyleArg({
            variants: themeVariants
          }, _extends$1({}, props, {
            theme
          }));
        });
      }
      if (!skipSx) {
        expressionsWithDefaultTheme.push(systemSx);
      }
      const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
      if (Array.isArray(styleArg2) && numOfCustomFnsApplied > 0) {
        const placeholders = new Array(numOfCustomFnsApplied).fill("");
        transformedStyleArg = [...styleArg2, ...placeholders];
        transformedStyleArg.raw = [...styleArg2.raw, ...placeholders];
      }
      const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
      if (tag.muiName) {
        Component.muiName = tag.muiName;
      }
      return Component;
    };
    if (defaultStyledResolver.withConfig) {
      muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
    }
    return muiStyledResolver;
  };
}
const styled$1 = createStyled$2();
function resolveProps(defaultProps2, props) {
  const output = _extends$1({}, props);
  Object.keys(defaultProps2).forEach((propName) => {
    if (propName.toString().match(/^(components|slots)$/)) {
      output[propName] = _extends$1({}, defaultProps2[propName], output[propName]);
    } else if (propName.toString().match(/^(componentsProps|slotProps)$/)) {
      const defaultSlotProps = defaultProps2[propName] || {};
      const slotProps = props[propName];
      output[propName] = {};
      if (!slotProps || !Object.keys(slotProps)) {
        output[propName] = defaultSlotProps;
      } else if (!defaultSlotProps || !Object.keys(defaultSlotProps)) {
        output[propName] = slotProps;
      } else {
        output[propName] = _extends$1({}, slotProps);
        Object.keys(defaultSlotProps).forEach((slotPropName) => {
          output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);
        });
      }
    } else if (output[propName] === void 0) {
      output[propName] = defaultProps2[propName];
    }
  });
  return output;
}
function getThemeProps$1(params2) {
  const {
    theme,
    name,
    props
  } = params2;
  if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {
    return props;
  }
  return resolveProps(theme.components[name].defaultProps, props);
}
function useThemeProps$1({
  props,
  name,
  defaultTheme: defaultTheme2,
  themeId
}) {
  let theme = useTheme$3(defaultTheme2);
  if (themeId) {
    theme = theme[themeId] || theme;
  }
  const mergedProps = getThemeProps$1({
    theme,
    name,
    props
  });
  return mergedProps;
}
const useEnhancedEffect = typeof window !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
  const [match2, setMatch] = reactExports.useState(() => {
    if (noSsr && matchMedia) {
      return matchMedia(query).matches;
    }
    if (ssrMatchMedia) {
      return ssrMatchMedia(query).matches;
    }
    return defaultMatches;
  });
  useEnhancedEffect(() => {
    let active = true;
    if (!matchMedia) {
      return void 0;
    }
    const queryList = matchMedia(query);
    const updateMatch = () => {
      if (active) {
        setMatch(queryList.matches);
      }
    };
    updateMatch();
    queryList.addListener(updateMatch);
    return () => {
      active = false;
      queryList.removeListener(updateMatch);
    };
  }, [query, matchMedia]);
  return match2;
}
const maybeReactUseSyncExternalStore = reactExports.useSyncExternalStore;
function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
  const getDefaultSnapshot = reactExports.useCallback(() => defaultMatches, [defaultMatches]);
  const getServerSnapshot = reactExports.useMemo(() => {
    if (noSsr && matchMedia) {
      return () => matchMedia(query).matches;
    }
    if (ssrMatchMedia !== null) {
      const {
        matches
      } = ssrMatchMedia(query);
      return () => matches;
    }
    return getDefaultSnapshot;
  }, [getDefaultSnapshot, query, ssrMatchMedia, noSsr, matchMedia]);
  const [getSnapshot, subscribe] = reactExports.useMemo(() => {
    if (matchMedia === null) {
      return [getDefaultSnapshot, () => () => {
      }];
    }
    const mediaQueryList = matchMedia(query);
    return [() => mediaQueryList.matches, (notify) => {
      mediaQueryList.addListener(notify);
      return () => {
        mediaQueryList.removeListener(notify);
      };
    }];
  }, [getDefaultSnapshot, matchMedia, query]);
  const match2 = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
  return match2;
}
function useMediaQuery(queryInput, options = {}) {
  const theme = useTheme$4();
  const supportMatchMedia = typeof window !== "undefined" && typeof window.matchMedia !== "undefined";
  const {
    defaultMatches = false,
    matchMedia = supportMatchMedia ? window.matchMedia : null,
    ssrMatchMedia = null,
    noSsr = false
  } = getThemeProps$1({
    name: "MuiUseMediaQuery",
    props: options,
    theme
  });
  let query = queryInput;
  query = query.replace(/^@media( ?)/m, "");
  const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== void 0 ? useMediaQueryNew : useMediaQueryOld;
  const match2 = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
  return match2;
}
function clamp$1(val, min2 = Number.MIN_SAFE_INTEGER, max2 = Number.MAX_SAFE_INTEGER) {
  return Math.max(min2, Math.min(val, max2));
}
const clamp = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: clamp$1
}, Symbol.toStringTag, { value: "Module" }));
function clampWrapper(value, min2 = 0, max2 = 1) {
  return clamp$1(value, min2, max2);
}
function hexToRgb(color2) {
  color2 = color2.slice(1);
  const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g");
  let colors = color2.match(re);
  if (colors && colors[0].length === 1) {
    colors = colors.map((n) => n + n);
  }
  return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => {
    return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3;
  }).join(", ")})` : "";
}
function decomposeColor(color2) {
  if (color2.type) {
    return color2;
  }
  if (color2.charAt(0) === "#") {
    return decomposeColor(hexToRgb(color2));
  }
  const marker = color2.indexOf("(");
  const type2 = color2.substring(0, marker);
  if (["rgb", "rgba", "hsl", "hsla", "color"].indexOf(type2) === -1) {
    throw new Error(formatMuiErrorMessage$1(9, color2));
  }
  let values2 = color2.substring(marker + 1, color2.length - 1);
  let colorSpace;
  if (type2 === "color") {
    values2 = values2.split(" ");
    colorSpace = values2.shift();
    if (values2.length === 4 && values2[3].charAt(0) === "/") {
      values2[3] = values2[3].slice(1);
    }
    if (["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].indexOf(colorSpace) === -1) {
      throw new Error(formatMuiErrorMessage$1(10, colorSpace));
    }
  } else {
    values2 = values2.split(",");
  }
  values2 = values2.map((value) => parseFloat(value));
  return {
    type: type2,
    values: values2,
    colorSpace
  };
}
function recomposeColor(color2) {
  const {
    type: type2,
    colorSpace
  } = color2;
  let {
    values: values2
  } = color2;
  if (type2.indexOf("rgb") !== -1) {
    values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n);
  } else if (type2.indexOf("hsl") !== -1) {
    values2[1] = `${values2[1]}%`;
    values2[2] = `${values2[2]}%`;
  }
  if (type2.indexOf("color") !== -1) {
    values2 = `${colorSpace} ${values2.join(" ")}`;
  } else {
    values2 = `${values2.join(", ")}`;
  }
  return `${type2}(${values2})`;
}
function alpha(color2, value) {
  color2 = decomposeColor(color2);
  value = clampWrapper(value);
  if (color2.type === "rgb" || color2.type === "hsl") {
    color2.type += "a";
  }
  if (color2.type === "color") {
    color2.values[3] = `/${value}`;
  } else {
    color2.values[3] = value;
  }
  return recomposeColor(color2);
}
function createChainedFunction(...funcs) {
  return funcs.reduce((acc, func) => {
    if (func == null) {
      return acc;
    }
    return function chainedFunction(...args) {
      acc.apply(this, args);
      func.apply(this, args);
    };
  }, () => {
  });
}
function debounce$2(func, wait = 166) {
  let timeout;
  function debounced(...args) {
    const later = () => {
      func.apply(this, args);
    };
    clearTimeout(timeout);
    timeout = setTimeout(later, wait);
  }
  debounced.clear = () => {
    clearTimeout(timeout);
  };
  return debounced;
}
function deprecatedPropType(validator2, reason) {
  {
    return () => null;
  }
}
function isMuiElement(element, muiNames) {
  var _muiName, _element$type;
  return /* @__PURE__ */ reactExports.isValidElement(element) && muiNames.indexOf(
    // For server components `muiName` is avaialble in element.type._payload.value.muiName
    // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
    // eslint-disable-next-line no-underscore-dangle
    (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName
  ) !== -1;
}
function ownerDocument(node2) {
  return node2 && node2.ownerDocument || document;
}
function ownerWindow(node2) {
  const doc = ownerDocument(node2);
  return doc.defaultView || window;
}
function requirePropFactory(componentNameInError, Component) {
  {
    return () => null;
  }
}
function setRef(ref2, value) {
  if (typeof ref2 === "function") {
    ref2(value);
  } else if (ref2) {
    ref2.current = value;
  }
}
let globalId = 0;
function useGlobalId(idOverride) {
  const [defaultId, setDefaultId] = reactExports.useState(idOverride);
  const id = idOverride || defaultId;
  reactExports.useEffect(() => {
    if (defaultId == null) {
      globalId += 1;
      setDefaultId(`mui-${globalId}`);
    }
  }, [defaultId]);
  return id;
}
const maybeReactUseId = React$1["useId".toString()];
function useId$1(idOverride) {
  if (maybeReactUseId !== void 0) {
    const reactId = maybeReactUseId();
    return idOverride != null ? idOverride : reactId;
  }
  return useGlobalId(idOverride);
}
function unsupportedProp(props, propName, componentName, location2, propFullName) {
  {
    return null;
  }
}
function useControlled({
  controlled,
  default: defaultProp,
  name,
  state = "value"
}) {
  const {
    current: isControlled
  } = reactExports.useRef(controlled !== void 0);
  const [valueState, setValue] = reactExports.useState(defaultProp);
  const value = isControlled ? controlled : valueState;
  const setValueIfUncontrolled = reactExports.useCallback((newValue) => {
    if (!isControlled) {
      setValue(newValue);
    }
  }, []);
  return [value, setValueIfUncontrolled];
}
function useEventCallback(fn2) {
  const ref2 = reactExports.useRef(fn2);
  useEnhancedEffect(() => {
    ref2.current = fn2;
  });
  return reactExports.useRef((...args) => (
    // @ts-expect-error hide `this`
    (0, ref2.current)(...args)
  )).current;
}
function useForkRef(...refs) {
  return reactExports.useMemo(() => {
    if (refs.every((ref2) => ref2 == null)) {
      return null;
    }
    return (instance) => {
      refs.forEach((ref2) => {
        setRef(ref2, instance);
      });
    };
  }, refs);
}
const UNINITIALIZED = {};
function useLazyRef(init, initArg) {
  const ref2 = reactExports.useRef(UNINITIALIZED);
  if (ref2.current === UNINITIALIZED) {
    ref2.current = init(initArg);
  }
  return ref2;
}
const EMPTY = [];
function useOnMount(fn2) {
  reactExports.useEffect(fn2, EMPTY);
}
class Timeout {
  constructor() {
    this.currentId = null;
    this.clear = () => {
      if (this.currentId !== null) {
        clearTimeout(this.currentId);
        this.currentId = null;
      }
    };
    this.disposeEffect = () => {
      return this.clear;
    };
  }
  static create() {
    return new Timeout();
  }
  /**
   * Executes `fn` after `delay`, clearing any previously scheduled call.
   */
  start(delay, fn2) {
    this.clear();
    this.currentId = setTimeout(() => {
      this.currentId = null;
      fn2();
    }, delay);
  }
}
function useTimeout() {
  const timeout = useLazyRef(Timeout.create).current;
  useOnMount(timeout.disposeEffect);
  return timeout;
}
let hadKeyboardEvent = true;
let hadFocusVisibleRecently = false;
const hadFocusVisibleRecentlyTimeout = new Timeout();
const inputTypesWhitelist = {
  text: true,
  search: true,
  url: true,
  tel: true,
  email: true,
  password: true,
  number: true,
  date: true,
  month: true,
  week: true,
  time: true,
  datetime: true,
  "datetime-local": true
};
function focusTriggersKeyboardModality(node2) {
  const {
    type: type2,
    tagName
  } = node2;
  if (tagName === "INPUT" && inputTypesWhitelist[type2] && !node2.readOnly) {
    return true;
  }
  if (tagName === "TEXTAREA" && !node2.readOnly) {
    return true;
  }
  if (node2.isContentEditable) {
    return true;
  }
  return false;
}
function handleKeyDown(event) {
  if (event.metaKey || event.altKey || event.ctrlKey) {
    return;
  }
  hadKeyboardEvent = true;
}
function handlePointerDown() {
  hadKeyboardEvent = false;
}
function handleVisibilityChange() {
  if (this.visibilityState === "hidden") {
    if (hadFocusVisibleRecently) {
      hadKeyboardEvent = true;
    }
  }
}
function prepare(doc) {
  doc.addEventListener("keydown", handleKeyDown, true);
  doc.addEventListener("mousedown", handlePointerDown, true);
  doc.addEventListener("pointerdown", handlePointerDown, true);
  doc.addEventListener("touchstart", handlePointerDown, true);
  doc.addEventListener("visibilitychange", handleVisibilityChange, true);
}
function isFocusVisible(event) {
  const {
    target
  } = event;
  try {
    return target.matches(":focus-visible");
  } catch (error) {
  }
  return hadKeyboardEvent || focusTriggersKeyboardModality(target);
}
function useIsFocusVisible() {
  const ref2 = reactExports.useCallback((node2) => {
    if (node2 != null) {
      prepare(node2.ownerDocument);
    }
  }, []);
  const isFocusVisibleRef = reactExports.useRef(false);
  function handleBlurVisible() {
    if (isFocusVisibleRef.current) {
      hadFocusVisibleRecently = true;
      hadFocusVisibleRecentlyTimeout.start(100, () => {
        hadFocusVisibleRecently = false;
      });
      isFocusVisibleRef.current = false;
      return true;
    }
    return false;
  }
  function handleFocusVisible(event) {
    if (isFocusVisible(event)) {
      isFocusVisibleRef.current = true;
      return true;
    }
    return false;
  }
  return {
    isFocusVisibleRef,
    onFocus: handleFocusVisible,
    onBlur: handleBlurVisible,
    ref: ref2
  };
}
function getScrollbarSize(doc) {
  const documentWidth = doc.documentElement.clientWidth;
  return Math.abs(window.innerWidth - documentWidth);
}
let cachedType;
function detectScrollType() {
  if (cachedType) {
    return cachedType;
  }
  const dummy = document.createElement("div");
  const container = document.createElement("div");
  container.style.width = "10px";
  container.style.height = "1px";
  dummy.appendChild(container);
  dummy.dir = "rtl";
  dummy.style.fontSize = "14px";
  dummy.style.width = "4px";
  dummy.style.height = "1px";
  dummy.style.position = "absolute";
  dummy.style.top = "-1000px";
  dummy.style.overflow = "scroll";
  document.body.appendChild(dummy);
  cachedType = "reverse";
  if (dummy.scrollLeft > 0) {
    cachedType = "default";
  } else {
    dummy.scrollLeft = 1;
    if (dummy.scrollLeft === 0) {
      cachedType = "negative";
    }
  }
  document.body.removeChild(dummy);
  return cachedType;
}
function getNormalizedScrollLeft(element, direction2) {
  const scrollLeft = element.scrollLeft;
  if (direction2 !== "rtl") {
    return scrollLeft;
  }
  const type2 = detectScrollType();
  switch (type2) {
    case "negative":
      return element.scrollWidth - element.clientWidth + scrollLeft;
    case "reverse":
      return element.scrollWidth - element.clientWidth - scrollLeft;
    default:
      return scrollLeft;
  }
}
const usePreviousProps = (value) => {
  const ref2 = reactExports.useRef({});
  reactExports.useEffect(() => {
    ref2.current = value;
  });
  return ref2.current;
};
function composeClasses(slots, getUtilityClass, classes = void 0) {
  const output = {};
  Object.keys(slots).forEach(
    // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
    // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
    (slot) => {
      output[slot] = slots[slot].reduce((acc, key) => {
        if (key) {
          const utilityClass = getUtilityClass(key);
          if (utilityClass !== "") {
            acc.push(utilityClass);
          }
          if (classes && classes[key]) {
            acc.push(classes[key]);
          }
        }
        return acc;
      }, []).join(" ");
    }
  );
  return output;
}
function isHostComponent(element) {
  return typeof element === "string";
}
function appendOwnerState(elementType, otherProps, ownerState) {
  if (elementType === void 0 || isHostComponent(elementType)) {
    return otherProps;
  }
  return _extends$1({}, otherProps, {
    ownerState: _extends$1({}, otherProps.ownerState, ownerState)
  });
}
function extractEventHandlers(object, excludeKeys = []) {
  if (object === void 0) {
    return {};
  }
  const result = {};
  Object.keys(object).filter((prop) => prop.match(/^on[A-Z]/) && typeof object[prop] === "function" && !excludeKeys.includes(prop)).forEach((prop) => {
    result[prop] = object[prop];
  });
  return result;
}
function omitEventHandlers(object) {
  if (object === void 0) {
    return {};
  }
  const result = {};
  Object.keys(object).filter((prop) => !(prop.match(/^on[A-Z]/) && typeof object[prop] === "function")).forEach((prop) => {
    result[prop] = object[prop];
  });
  return result;
}
function mergeSlotProps(parameters) {
  const {
    getSlotProps,
    additionalProps,
    externalSlotProps,
    externalForwardedProps,
    className
  } = parameters;
  if (!getSlotProps) {
    const joinedClasses2 = clsx$3(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
    const mergedStyle2 = _extends$1({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
    const props2 = _extends$1({}, additionalProps, externalForwardedProps, externalSlotProps);
    if (joinedClasses2.length > 0) {
      props2.className = joinedClasses2;
    }
    if (Object.keys(mergedStyle2).length > 0) {
      props2.style = mergedStyle2;
    }
    return {
      props: props2,
      internalRef: void 0
    };
  }
  const eventHandlers = extractEventHandlers(_extends$1({}, externalForwardedProps, externalSlotProps));
  const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);
  const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);
  const internalSlotProps = getSlotProps(eventHandlers);
  const joinedClasses = clsx$3(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);
  const mergedStyle = _extends$1({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);
  const props = _extends$1({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);
  if (joinedClasses.length > 0) {
    props.className = joinedClasses;
  }
  if (Object.keys(mergedStyle).length > 0) {
    props.style = mergedStyle;
  }
  return {
    props,
    internalRef: internalSlotProps.ref
  };
}
function resolveComponentProps(componentProps, ownerState, slotState) {
  if (typeof componentProps === "function") {
    return componentProps(ownerState, slotState);
  }
  return componentProps;
}
const _excluded$1L = ["elementType", "externalSlotProps", "ownerState", "skipResolvingSlotProps"];
function useSlotProps(parameters) {
  var _parameters$additiona;
  const {
    elementType,
    externalSlotProps,
    ownerState,
    skipResolvingSlotProps = false
  } = parameters, rest = _objectWithoutPropertiesLoose(parameters, _excluded$1L);
  const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);
  const {
    props: mergedProps,
    internalRef
  } = mergeSlotProps(_extends$1({}, rest, {
    externalSlotProps: resolvedComponentsProps
  }));
  const ref2 = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);
  const props = appendOwnerState(elementType, _extends$1({}, mergedProps, {
    ref: ref2
  }), ownerState);
  return props;
}
function getReactElementRef(element) {
  if (parseInt(reactExports.version, 10) >= 19) {
    var _element$props;
    return (element == null || (_element$props = element.props) == null ? void 0 : _element$props.ref) || null;
  }
  return (element == null ? void 0 : element.ref) || null;
}
const ThemeContext = /* @__PURE__ */ reactExports.createContext(null);
function useTheme$2() {
  const theme = reactExports.useContext(ThemeContext);
  return theme;
}
const hasSymbol = typeof Symbol === "function" && Symbol.for;
const nested = hasSymbol ? Symbol.for("mui.nested") : "__THEME_NESTED__";
function mergeOuterLocalTheme(outerTheme, localTheme) {
  if (typeof localTheme === "function") {
    const mergedTheme = localTheme(outerTheme);
    return mergedTheme;
  }
  return _extends$1({}, outerTheme, localTheme);
}
function ThemeProvider$3(props) {
  const {
    children,
    theme: localTheme
  } = props;
  const outerTheme = useTheme$2();
  const theme = reactExports.useMemo(() => {
    const output = outerTheme === null ? localTheme : mergeOuterLocalTheme(outerTheme, localTheme);
    if (output != null) {
      output[nested] = outerTheme !== null;
    }
    return output;
  }, [localTheme, outerTheme]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeContext.Provider, {
    value: theme,
    children
  });
}
const _excluded$1K = ["value"];
const RtlContext = /* @__PURE__ */ reactExports.createContext();
function RtlProvider(_ref) {
  let {
    value
  } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded$1K);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(RtlContext.Provider, _extends$1({
    value: value != null ? value : true
  }, props));
}
const useRtl = () => {
  const value = reactExports.useContext(RtlContext);
  return value != null ? value : false;
};
const PropsContext = /* @__PURE__ */ reactExports.createContext(void 0);
function DefaultPropsProvider({
  value,
  children
}) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PropsContext.Provider, {
    value,
    children
  });
}
function getThemeProps(params2) {
  const {
    theme,
    name,
    props
  } = params2;
  if (!theme || !theme.components || !theme.components[name]) {
    return props;
  }
  const config2 = theme.components[name];
  if (config2.defaultProps) {
    return resolveProps(config2.defaultProps, props);
  }
  if (!config2.styleOverrides && !config2.variants) {
    return resolveProps(config2, props);
  }
  return props;
}
function useDefaultProps$1({
  props,
  name
}) {
  const ctx = reactExports.useContext(PropsContext);
  return getThemeProps({
    props,
    name,
    theme: {
      components: ctx
    }
  });
}
const EMPTY_THEME = {};
function useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {
  return reactExports.useMemo(() => {
    const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;
    if (typeof localTheme === "function") {
      const mergedTheme = localTheme(resolvedTheme);
      const result = themeId ? _extends$1({}, upperTheme, {
        [themeId]: mergedTheme
      }) : mergedTheme;
      if (isPrivate) {
        return () => result;
      }
      return result;
    }
    return themeId ? _extends$1({}, upperTheme, {
      [themeId]: localTheme
    }) : _extends$1({}, upperTheme, localTheme);
  }, [themeId, upperTheme, localTheme, isPrivate]);
}
function ThemeProvider$2(props) {
  const {
    children,
    theme: localTheme,
    themeId
  } = props;
  const upperTheme = useTheme$4(EMPTY_THEME);
  const upperPrivateTheme = useTheme$2() || EMPTY_THEME;
  const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);
  const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);
  const rtlValue = engineTheme.direction === "rtl";
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider$3, {
    theme: privateTheme,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeContext$1.Provider, {
      value: engineTheme,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(RtlProvider, {
        value: rtlValue,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(DefaultPropsProvider, {
          value: engineTheme == null ? void 0 : engineTheme.components,
          children
        })
      })
    })
  });
}
const _excluded$1J = ["className", "component", "disableGutters", "fixed", "maxWidth", "classes"];
const defaultTheme$4 = createTheme$2();
const defaultCreateStyledComponent$2 = styled$1("div", {
  name: "MuiContainer",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[`maxWidth${capitalize$2(String(ownerState.maxWidth))}`], ownerState.fixed && styles2.fixed, ownerState.disableGutters && styles2.disableGutters];
  }
});
const useThemePropsDefault$2 = (inProps) => useThemeProps$1({
  props: inProps,
  name: "MuiContainer",
  defaultTheme: defaultTheme$4
});
const useUtilityClasses$1o = (ownerState, componentName) => {
  const getContainerUtilityClass = (slot) => {
    return generateUtilityClass(componentName, slot);
  };
  const {
    classes,
    fixed,
    disableGutters,
    maxWidth: maxWidth2
  } = ownerState;
  const slots = {
    root: ["root", maxWidth2 && `maxWidth${capitalize$2(String(maxWidth2))}`, fixed && "fixed", disableGutters && "disableGutters"]
  };
  return composeClasses(slots, getContainerUtilityClass, classes);
};
function createContainer$1(options = {}) {
  const {
    // This will allow adding custom styled fn (for example for custom sx style function)
    createStyledComponent = defaultCreateStyledComponent$2,
    useThemeProps: useThemeProps2 = useThemePropsDefault$2,
    componentName = "MuiContainer"
  } = options;
  const ContainerRoot = createStyledComponent(({
    theme,
    ownerState
  }) => _extends$1({
    width: "100%",
    marginLeft: "auto",
    boxSizing: "border-box",
    marginRight: "auto",
    display: "block"
  }, !ownerState.disableGutters && {
    paddingLeft: theme.spacing(2),
    paddingRight: theme.spacing(2),
    // @ts-ignore module augmentation fails if custom breakpoints are used
    [theme.breakpoints.up("sm")]: {
      paddingLeft: theme.spacing(3),
      paddingRight: theme.spacing(3)
    }
  }), ({
    theme,
    ownerState
  }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {
    const breakpoint = breakpointValueKey;
    const value = theme.breakpoints.values[breakpoint];
    if (value !== 0) {
      acc[theme.breakpoints.up(breakpoint)] = {
        maxWidth: `${value}${theme.breakpoints.unit}`
      };
    }
    return acc;
  }, {}), ({
    theme,
    ownerState
  }) => _extends$1({}, ownerState.maxWidth === "xs" && {
    // @ts-ignore module augmentation fails if custom breakpoints are used
    [theme.breakpoints.up("xs")]: {
      // @ts-ignore module augmentation fails if custom breakpoints are used
      maxWidth: Math.max(theme.breakpoints.values.xs, 444)
    }
  }, ownerState.maxWidth && // @ts-ignore module augmentation fails if custom breakpoints are used
  ownerState.maxWidth !== "xs" && {
    // @ts-ignore module augmentation fails if custom breakpoints are used
    [theme.breakpoints.up(ownerState.maxWidth)]: {
      // @ts-ignore module augmentation fails if custom breakpoints are used
      maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`
    }
  }));
  const Container2 = /* @__PURE__ */ reactExports.forwardRef(function Container22(inProps, ref2) {
    const props = useThemeProps2(inProps);
    const {
      className,
      component = "div",
      disableGutters = false,
      fixed = false,
      maxWidth: maxWidth2 = "lg"
    } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1J);
    const ownerState = _extends$1({}, props, {
      component,
      disableGutters,
      fixed,
      maxWidth: maxWidth2
    });
    const classes = useUtilityClasses$1o(ownerState, componentName);
    return (
      // @ts-ignore theme is injected by the styled util
      /* @__PURE__ */ jsxRuntimeExports.jsx(ContainerRoot, _extends$1({
        as: component,
        ownerState,
        className: clsx$3(classes.root, className),
        ref: ref2
      }, other))
    );
  });
  return Container2;
}
const filterBreakpointKeys = (breakpointsKeys, responsiveKeys) => breakpointsKeys.filter((key) => responsiveKeys.includes(key));
const traverseBreakpoints = (breakpoints, responsive, iterator2) => {
  const smallestBreakpoint = breakpoints.keys[0];
  if (Array.isArray(responsive)) {
    responsive.forEach((breakpointValue, index2) => {
      iterator2((responsiveStyles, style2) => {
        if (index2 <= breakpoints.keys.length - 1) {
          if (index2 === 0) {
            Object.assign(responsiveStyles, style2);
          } else {
            responsiveStyles[breakpoints.up(breakpoints.keys[index2])] = style2;
          }
        }
      }, breakpointValue);
    });
  } else if (responsive && typeof responsive === "object") {
    const keys = Object.keys(responsive).length > breakpoints.keys.length ? breakpoints.keys : filterBreakpointKeys(breakpoints.keys, Object.keys(responsive));
    keys.forEach((key) => {
      if (breakpoints.keys.indexOf(key) !== -1) {
        const breakpointValue = responsive[key];
        if (breakpointValue !== void 0) {
          iterator2((responsiveStyles, style2) => {
            if (smallestBreakpoint === key) {
              Object.assign(responsiveStyles, style2);
            } else {
              responsiveStyles[breakpoints.up(key)] = style2;
            }
          }, breakpointValue);
        }
      }
    });
  } else if (typeof responsive === "number" || typeof responsive === "string") {
    iterator2((responsiveStyles, style2) => {
      Object.assign(responsiveStyles, style2);
    }, responsive);
  }
};
function appendLevel(level) {
  if (!level) {
    return "";
  }
  return `Level${level}`;
}
function isNestedContainer(ownerState) {
  return ownerState.unstable_level > 0 && ownerState.container;
}
function createGetSelfSpacing(ownerState) {
  return function getSelfSpacing(axis) {
    return `var(--Grid-${axis}Spacing${appendLevel(ownerState.unstable_level)})`;
  };
}
function createGetParentSpacing(ownerState) {
  return function getParentSpacing(axis) {
    if (ownerState.unstable_level === 0) {
      return `var(--Grid-${axis}Spacing)`;
    }
    return `var(--Grid-${axis}Spacing${appendLevel(ownerState.unstable_level - 1)})`;
  };
}
function getParentColumns(ownerState) {
  if (ownerState.unstable_level === 0) {
    return `var(--Grid-columns)`;
  }
  return `var(--Grid-columns${appendLevel(ownerState.unstable_level - 1)})`;
}
const generateGridSizeStyles = ({
  theme,
  ownerState
}) => {
  const getSelfSpacing = createGetSelfSpacing(ownerState);
  const styles2 = {};
  traverseBreakpoints(theme.breakpoints, ownerState.gridSize, (appendStyle, value) => {
    let style2 = {};
    if (value === true) {
      style2 = {
        flexBasis: 0,
        flexGrow: 1,
        maxWidth: "100%"
      };
    }
    if (value === "auto") {
      style2 = {
        flexBasis: "auto",
        flexGrow: 0,
        flexShrink: 0,
        maxWidth: "none",
        width: "auto"
      };
    }
    if (typeof value === "number") {
      style2 = {
        flexGrow: 0,
        flexBasis: "auto",
        width: `calc(100% * ${value} / ${getParentColumns(ownerState)}${isNestedContainer(ownerState) ? ` + ${getSelfSpacing("column")}` : ""})`
      };
    }
    appendStyle(styles2, style2);
  });
  return styles2;
};
const generateGridOffsetStyles = ({
  theme,
  ownerState
}) => {
  const styles2 = {};
  traverseBreakpoints(theme.breakpoints, ownerState.gridOffset, (appendStyle, value) => {
    let style2 = {};
    if (value === "auto") {
      style2 = {
        marginLeft: "auto"
      };
    }
    if (typeof value === "number") {
      style2 = {
        marginLeft: value === 0 ? "0px" : `calc(100% * ${value} / ${getParentColumns(ownerState)})`
      };
    }
    appendStyle(styles2, style2);
  });
  return styles2;
};
const generateGridColumnsStyles = ({
  theme,
  ownerState
}) => {
  if (!ownerState.container) {
    return {};
  }
  const styles2 = isNestedContainer(ownerState) ? {
    [`--Grid-columns${appendLevel(ownerState.unstable_level)}`]: getParentColumns(ownerState)
  } : {
    "--Grid-columns": 12
  };
  traverseBreakpoints(theme.breakpoints, ownerState.columns, (appendStyle, value) => {
    appendStyle(styles2, {
      [`--Grid-columns${appendLevel(ownerState.unstable_level)}`]: value
    });
  });
  return styles2;
};
const generateGridRowSpacingStyles = ({
  theme,
  ownerState
}) => {
  if (!ownerState.container) {
    return {};
  }
  const getParentSpacing = createGetParentSpacing(ownerState);
  const styles2 = isNestedContainer(ownerState) ? {
    // Set the default spacing as its parent spacing.
    // It will be overridden if spacing props are provided
    [`--Grid-rowSpacing${appendLevel(ownerState.unstable_level)}`]: getParentSpacing("row")
  } : {};
  traverseBreakpoints(theme.breakpoints, ownerState.rowSpacing, (appendStyle, value) => {
    var _theme$spacing;
    appendStyle(styles2, {
      [`--Grid-rowSpacing${appendLevel(ownerState.unstable_level)}`]: typeof value === "string" ? value : (_theme$spacing = theme.spacing) == null ? void 0 : _theme$spacing.call(theme, value)
    });
  });
  return styles2;
};
const generateGridColumnSpacingStyles = ({
  theme,
  ownerState
}) => {
  if (!ownerState.container) {
    return {};
  }
  const getParentSpacing = createGetParentSpacing(ownerState);
  const styles2 = isNestedContainer(ownerState) ? {
    // Set the default spacing as its parent spacing.
    // It will be overridden if spacing props are provided
    [`--Grid-columnSpacing${appendLevel(ownerState.unstable_level)}`]: getParentSpacing("column")
  } : {};
  traverseBreakpoints(theme.breakpoints, ownerState.columnSpacing, (appendStyle, value) => {
    var _theme$spacing2;
    appendStyle(styles2, {
      [`--Grid-columnSpacing${appendLevel(ownerState.unstable_level)}`]: typeof value === "string" ? value : (_theme$spacing2 = theme.spacing) == null ? void 0 : _theme$spacing2.call(theme, value)
    });
  });
  return styles2;
};
const generateGridDirectionStyles = ({
  theme,
  ownerState
}) => {
  if (!ownerState.container) {
    return {};
  }
  const styles2 = {};
  traverseBreakpoints(theme.breakpoints, ownerState.direction, (appendStyle, value) => {
    appendStyle(styles2, {
      flexDirection: value
    });
  });
  return styles2;
};
const generateGridStyles = ({
  ownerState
}) => {
  const getSelfSpacing = createGetSelfSpacing(ownerState);
  const getParentSpacing = createGetParentSpacing(ownerState);
  return _extends$1({
    minWidth: 0,
    boxSizing: "border-box"
  }, ownerState.container && _extends$1({
    display: "flex",
    flexWrap: "wrap"
  }, ownerState.wrap && ownerState.wrap !== "wrap" && {
    flexWrap: ownerState.wrap
  }, {
    margin: `calc(${getSelfSpacing("row")} / -2) calc(${getSelfSpacing("column")} / -2)`
  }, ownerState.disableEqualOverflow && {
    margin: `calc(${getSelfSpacing("row")} * -1) 0px 0px calc(${getSelfSpacing("column")} * -1)`
  }), (!ownerState.container || isNestedContainer(ownerState)) && _extends$1({
    padding: `calc(${getParentSpacing("row")} / 2) calc(${getParentSpacing("column")} / 2)`
  }, (ownerState.disableEqualOverflow || ownerState.parentDisableEqualOverflow) && {
    padding: `${getParentSpacing("row")} 0px 0px ${getParentSpacing("column")}`
  }));
};
const generateSizeClassNames = (gridSize) => {
  const classNames = [];
  Object.entries(gridSize).forEach(([key, value]) => {
    if (value !== false && value !== void 0) {
      classNames.push(`grid-${key}-${String(value)}`);
    }
  });
  return classNames;
};
const generateSpacingClassNames = (spacing, smallestBreakpoint = "xs") => {
  function isValidSpacing(val) {
    if (val === void 0) {
      return false;
    }
    return typeof val === "string" && !Number.isNaN(Number(val)) || typeof val === "number" && val > 0;
  }
  if (isValidSpacing(spacing)) {
    return [`spacing-${smallestBreakpoint}-${String(spacing)}`];
  }
  if (typeof spacing === "object" && !Array.isArray(spacing)) {
    const classNames = [];
    Object.entries(spacing).forEach(([key, value]) => {
      if (isValidSpacing(value)) {
        classNames.push(`spacing-${key}-${String(value)}`);
      }
    });
    return classNames;
  }
  return [];
};
const generateDirectionClasses = (direction2) => {
  if (direction2 === void 0) {
    return [];
  }
  if (typeof direction2 === "object") {
    return Object.entries(direction2).map(([key, value]) => `direction-${key}-${value}`);
  }
  return [`direction-xs-${String(direction2)}`];
};
const _excluded$1I = ["className", "children", "columns", "container", "component", "direction", "wrap", "spacing", "rowSpacing", "columnSpacing", "disableEqualOverflow", "unstable_level"];
const defaultTheme$3 = createTheme$2();
const defaultCreateStyledComponent$1 = styled$1("div", {
  name: "MuiGrid",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
});
function useThemePropsDefault$1(props) {
  return useThemeProps$1({
    props,
    name: "MuiGrid",
    defaultTheme: defaultTheme$3
  });
}
function createGrid$1(options = {}) {
  const {
    // This will allow adding custom styled fn (for example for custom sx style function)
    createStyledComponent = defaultCreateStyledComponent$1,
    useThemeProps: useThemeProps2 = useThemePropsDefault$1,
    componentName = "MuiGrid"
  } = options;
  const GridOverflowContext = /* @__PURE__ */ reactExports.createContext(void 0);
  const useUtilityClasses2 = (ownerState, theme) => {
    const {
      container,
      direction: direction2,
      spacing,
      wrap: wrap2,
      gridSize
    } = ownerState;
    const slots = {
      root: ["root", container && "container", wrap2 !== "wrap" && `wrap-xs-${String(wrap2)}`, ...generateDirectionClasses(direction2), ...generateSizeClassNames(gridSize), ...container ? generateSpacingClassNames(spacing, theme.breakpoints.keys[0]) : []]
    };
    return composeClasses(slots, (slot) => generateUtilityClass(componentName, slot), {});
  };
  const GridRoot2 = createStyledComponent(generateGridColumnsStyles, generateGridColumnSpacingStyles, generateGridRowSpacingStyles, generateGridSizeStyles, generateGridDirectionStyles, generateGridStyles, generateGridOffsetStyles);
  const Grid3 = /* @__PURE__ */ reactExports.forwardRef(function Grid23(inProps, ref2) {
    var _inProps$columns, _inProps$spacing, _ref, _inProps$rowSpacing, _ref2, _inProps$columnSpacin, _ref3, _disableEqualOverflow;
    const theme = useTheme$3();
    const themeProps = useThemeProps2(inProps);
    const props = extendSxProp(themeProps);
    const overflow2 = reactExports.useContext(GridOverflowContext);
    const {
      className,
      children,
      columns: columnsProp = 12,
      container = false,
      component = "div",
      direction: direction2 = "row",
      wrap: wrap2 = "wrap",
      spacing: spacingProp = 0,
      rowSpacing: rowSpacingProp = spacingProp,
      columnSpacing: columnSpacingProp = spacingProp,
      disableEqualOverflow: themeDisableEqualOverflow,
      unstable_level: level = 0
    } = props, rest = _objectWithoutPropertiesLoose(props, _excluded$1I);
    let disableEqualOverflow = themeDisableEqualOverflow;
    if (level && themeDisableEqualOverflow !== void 0) {
      disableEqualOverflow = inProps.disableEqualOverflow;
    }
    const gridSize = {};
    const gridOffset = {};
    const other = {};
    Object.entries(rest).forEach(([key, val]) => {
      if (theme.breakpoints.values[key] !== void 0) {
        gridSize[key] = val;
      } else if (theme.breakpoints.values[key.replace("Offset", "")] !== void 0) {
        gridOffset[key.replace("Offset", "")] = val;
      } else {
        other[key] = val;
      }
    });
    const columns = (_inProps$columns = inProps.columns) != null ? _inProps$columns : level ? void 0 : columnsProp;
    const spacing = (_inProps$spacing = inProps.spacing) != null ? _inProps$spacing : level ? void 0 : spacingProp;
    const rowSpacing = (_ref = (_inProps$rowSpacing = inProps.rowSpacing) != null ? _inProps$rowSpacing : inProps.spacing) != null ? _ref : level ? void 0 : rowSpacingProp;
    const columnSpacing = (_ref2 = (_inProps$columnSpacin = inProps.columnSpacing) != null ? _inProps$columnSpacin : inProps.spacing) != null ? _ref2 : level ? void 0 : columnSpacingProp;
    const ownerState = _extends$1({}, props, {
      level,
      columns,
      container,
      direction: direction2,
      wrap: wrap2,
      spacing,
      rowSpacing,
      columnSpacing,
      gridSize,
      gridOffset,
      disableEqualOverflow: (_ref3 = (_disableEqualOverflow = disableEqualOverflow) != null ? _disableEqualOverflow : overflow2) != null ? _ref3 : false,
      // use context value if exists.
      parentDisableEqualOverflow: overflow2
      // for nested grid
    });
    const classes = useUtilityClasses2(ownerState, theme);
    let result = /* @__PURE__ */ jsxRuntimeExports.jsx(GridRoot2, _extends$1({
      ref: ref2,
      as: component,
      ownerState,
      className: clsx$3(classes.root, className)
    }, other, {
      children: reactExports.Children.map(children, (child) => {
        if (/* @__PURE__ */ reactExports.isValidElement(child) && isMuiElement(child, ["Grid"])) {
          var _unstable_level, _child$props;
          return /* @__PURE__ */ reactExports.cloneElement(child, {
            unstable_level: (_unstable_level = (_child$props = child.props) == null ? void 0 : _child$props.unstable_level) != null ? _unstable_level : level + 1
          });
        }
        return child;
      })
    }));
    if (disableEqualOverflow !== void 0 && disableEqualOverflow !== (overflow2 != null ? overflow2 : false)) {
      result = /* @__PURE__ */ jsxRuntimeExports.jsx(GridOverflowContext.Provider, {
        value: disableEqualOverflow,
        children: result
      });
    }
    return result;
  });
  Grid3.muiName = "Grid";
  return Grid3;
}
const _excluded$1H = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"];
const defaultTheme$2 = createTheme$2();
const defaultCreateStyledComponent = styled$1("div", {
  name: "MuiStack",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
});
function useThemePropsDefault(props) {
  return useThemeProps$1({
    props,
    name: "MuiStack",
    defaultTheme: defaultTheme$2
  });
}
function joinChildren(children, separator) {
  const childrenArray = reactExports.Children.toArray(children).filter(Boolean);
  return childrenArray.reduce((output, child, index2) => {
    output.push(child);
    if (index2 < childrenArray.length - 1) {
      output.push(/* @__PURE__ */ reactExports.cloneElement(separator, {
        key: `separator-${index2}`
      }));
    }
    return output;
  }, []);
}
const getSideFromDirection = (direction2) => {
  return {
    row: "Left",
    "row-reverse": "Right",
    column: "Top",
    "column-reverse": "Bottom"
  }[direction2];
};
const style$1 = ({
  ownerState,
  theme
}) => {
  let styles2 = _extends$1({
    display: "flex",
    flexDirection: "column"
  }, handleBreakpoints({
    theme
  }, resolveBreakpointValues({
    values: ownerState.direction,
    breakpoints: theme.breakpoints.values
  }), (propValue) => ({
    flexDirection: propValue
  })));
  if (ownerState.spacing) {
    const transformer = createUnarySpacing(theme);
    const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
      if (typeof ownerState.spacing === "object" && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === "object" && ownerState.direction[breakpoint] != null) {
        acc[breakpoint] = true;
      }
      return acc;
    }, {});
    const directionValues = resolveBreakpointValues({
      values: ownerState.direction,
      base
    });
    const spacingValues = resolveBreakpointValues({
      values: ownerState.spacing,
      base
    });
    if (typeof directionValues === "object") {
      Object.keys(directionValues).forEach((breakpoint, index2, breakpoints) => {
        const directionValue = directionValues[breakpoint];
        if (!directionValue) {
          const previousDirectionValue = index2 > 0 ? directionValues[breakpoints[index2 - 1]] : "column";
          directionValues[breakpoint] = previousDirectionValue;
        }
      });
    }
    const styleFromPropValue = (propValue, breakpoint) => {
      if (ownerState.useFlexGap) {
        return {
          gap: getValue(transformer, propValue)
        };
      }
      return {
        // The useFlexGap={false} implement relies on each child to give up control of the margin.
        // We need to reset the margin to avoid double spacing.
        "& > :not(style):not(style)": {
          margin: 0
        },
        "& > :not(style) ~ :not(style)": {
          [`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: getValue(transformer, propValue)
        }
      };
    };
    styles2 = deepmerge$1(styles2, handleBreakpoints({
      theme
    }, spacingValues, styleFromPropValue));
  }
  styles2 = mergeBreakpointsInOrder(theme.breakpoints, styles2);
  return styles2;
};
function createStack(options = {}) {
  const {
    // This will allow adding custom styled fn (for example for custom sx style function)
    createStyledComponent = defaultCreateStyledComponent,
    useThemeProps: useThemeProps2 = useThemePropsDefault,
    componentName = "MuiStack"
  } = options;
  const useUtilityClasses2 = () => {
    const slots = {
      root: ["root"]
    };
    return composeClasses(slots, (slot) => generateUtilityClass(componentName, slot), {});
  };
  const StackRoot = createStyledComponent(style$1);
  const Stack2 = /* @__PURE__ */ reactExports.forwardRef(function Grid3(inProps, ref2) {
    const themeProps = useThemeProps2(inProps);
    const props = extendSxProp(themeProps);
    const {
      component = "div",
      direction: direction2 = "column",
      spacing = 0,
      divider,
      children,
      className,
      useFlexGap = false
    } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1H);
    const ownerState = {
      direction: direction2,
      spacing,
      useFlexGap
    };
    const classes = useUtilityClasses2();
    return /* @__PURE__ */ jsxRuntimeExports.jsx(StackRoot, _extends$1({
      as: component,
      ownerState,
      ref: ref2,
      className: clsx$3(classes.root, className)
    }, other, {
      children: divider ? joinChildren(children, divider) : children
    }));
  });
  return Stack2;
}
function createMixins(breakpoints, mixins) {
  return _extends$1({
    toolbar: {
      minHeight: 56,
      [breakpoints.up("xs")]: {
        "@media (orientation: landscape)": {
          minHeight: 48
        }
      },
      [breakpoints.up("sm")]: {
        minHeight: 64
      }
    }
  }, mixins);
}
var colorManipulator = {};
var interopRequireDefault = { exports: {} };
var hasRequiredInteropRequireDefault;
function requireInteropRequireDefault() {
  if (hasRequiredInteropRequireDefault) return interopRequireDefault.exports;
  hasRequiredInteropRequireDefault = 1;
  (function(module2) {
    function _interopRequireDefault(e2) {
      return e2 && e2.__esModule ? e2 : {
        "default": e2
      };
    }
    module2.exports = _interopRequireDefault, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
  })(interopRequireDefault);
  return interopRequireDefault.exports;
}
const require$$1$1 = /* @__PURE__ */ getAugmentedNamespace(formatMuiErrorMessage);
const require$$2 = /* @__PURE__ */ getAugmentedNamespace(clamp);
var hasRequiredColorManipulator;
function requireColorManipulator() {
  if (hasRequiredColorManipulator) return colorManipulator;
  hasRequiredColorManipulator = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(colorManipulator, "__esModule", {
    value: true
  });
  colorManipulator.alpha = alpha2;
  colorManipulator.blend = blend;
  colorManipulator.colorChannel = void 0;
  colorManipulator.darken = darken2;
  colorManipulator.decomposeColor = decomposeColor2;
  colorManipulator.emphasize = emphasize;
  colorManipulator.getContrastRatio = getContrastRatio;
  colorManipulator.getLuminance = getLuminance;
  colorManipulator.hexToRgb = hexToRgb2;
  colorManipulator.hslToRgb = hslToRgb;
  colorManipulator.lighten = lighten2;
  colorManipulator.private_safeAlpha = private_safeAlpha;
  colorManipulator.private_safeColorChannel = void 0;
  colorManipulator.private_safeDarken = private_safeDarken;
  colorManipulator.private_safeEmphasize = private_safeEmphasize;
  colorManipulator.private_safeLighten = private_safeLighten;
  colorManipulator.recomposeColor = recomposeColor2;
  colorManipulator.rgbToHex = rgbToHex;
  var _formatMuiErrorMessage2 = _interopRequireDefault(require$$1$1);
  var _clamp = _interopRequireDefault(require$$2);
  function clampWrapper2(value, min2 = 0, max2 = 1) {
    return (0, _clamp.default)(value, min2, max2);
  }
  function hexToRgb2(color2) {
    color2 = color2.slice(1);
    const re = new RegExp(`.{1,${color2.length >= 6 ? 2 : 1}}`, "g");
    let colors = color2.match(re);
    if (colors && colors[0].length === 1) {
      colors = colors.map((n) => n + n);
    }
    return colors ? `rgb${colors.length === 4 ? "a" : ""}(${colors.map((n, index2) => {
      return index2 < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1e3) / 1e3;
    }).join(", ")})` : "";
  }
  function intToHex(int) {
    const hex = int.toString(16);
    return hex.length === 1 ? `0${hex}` : hex;
  }
  function decomposeColor2(color2) {
    if (color2.type) {
      return color2;
    }
    if (color2.charAt(0) === "#") {
      return decomposeColor2(hexToRgb2(color2));
    }
    const marker = color2.indexOf("(");
    const type2 = color2.substring(0, marker);
    if (["rgb", "rgba", "hsl", "hsla", "color"].indexOf(type2) === -1) {
      throw new Error((0, _formatMuiErrorMessage2.default)(9, color2));
    }
    let values2 = color2.substring(marker + 1, color2.length - 1);
    let colorSpace;
    if (type2 === "color") {
      values2 = values2.split(" ");
      colorSpace = values2.shift();
      if (values2.length === 4 && values2[3].charAt(0) === "/") {
        values2[3] = values2[3].slice(1);
      }
      if (["srgb", "display-p3", "a98-rgb", "prophoto-rgb", "rec-2020"].indexOf(colorSpace) === -1) {
        throw new Error((0, _formatMuiErrorMessage2.default)(10, colorSpace));
      }
    } else {
      values2 = values2.split(",");
    }
    values2 = values2.map((value) => parseFloat(value));
    return {
      type: type2,
      values: values2,
      colorSpace
    };
  }
  const colorChannel = (color2) => {
    const decomposedColor = decomposeColor2(color2);
    return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.indexOf("hsl") !== -1 && idx !== 0 ? `${val}%` : val).join(" ");
  };
  colorManipulator.colorChannel = colorChannel;
  const private_safeColorChannel = (color2, warning2) => {
    try {
      return colorChannel(color2);
    } catch (error) {
      return color2;
    }
  };
  colorManipulator.private_safeColorChannel = private_safeColorChannel;
  function recomposeColor2(color2) {
    const {
      type: type2,
      colorSpace
    } = color2;
    let {
      values: values2
    } = color2;
    if (type2.indexOf("rgb") !== -1) {
      values2 = values2.map((n, i) => i < 3 ? parseInt(n, 10) : n);
    } else if (type2.indexOf("hsl") !== -1) {
      values2[1] = `${values2[1]}%`;
      values2[2] = `${values2[2]}%`;
    }
    if (type2.indexOf("color") !== -1) {
      values2 = `${colorSpace} ${values2.join(" ")}`;
    } else {
      values2 = `${values2.join(", ")}`;
    }
    return `${type2}(${values2})`;
  }
  function rgbToHex(color2) {
    if (color2.indexOf("#") === 0) {
      return color2;
    }
    const {
      values: values2
    } = decomposeColor2(color2);
    return `#${values2.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join("")}`;
  }
  function hslToRgb(color2) {
    color2 = decomposeColor2(color2);
    const {
      values: values2
    } = color2;
    const h2 = values2[0];
    const s = values2[1] / 100;
    const l = values2[2] / 100;
    const a2 = s * Math.min(l, 1 - l);
    const f2 = (n, k2 = (n + h2 / 30) % 12) => l - a2 * Math.max(Math.min(k2 - 3, 9 - k2, 1), -1);
    let type2 = "rgb";
    const rgb2 = [Math.round(f2(0) * 255), Math.round(f2(8) * 255), Math.round(f2(4) * 255)];
    if (color2.type === "hsla") {
      type2 += "a";
      rgb2.push(values2[3]);
    }
    return recomposeColor2({
      type: type2,
      values: rgb2
    });
  }
  function getLuminance(color2) {
    color2 = decomposeColor2(color2);
    let rgb2 = color2.type === "hsl" || color2.type === "hsla" ? decomposeColor2(hslToRgb(color2)).values : color2.values;
    rgb2 = rgb2.map((val) => {
      if (color2.type !== "color") {
        val /= 255;
      }
      return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;
    });
    return Number((0.2126 * rgb2[0] + 0.7152 * rgb2[1] + 0.0722 * rgb2[2]).toFixed(3));
  }
  function getContrastRatio(foreground, background) {
    const lumA = getLuminance(foreground);
    const lumB = getLuminance(background);
    return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);
  }
  function alpha2(color2, value) {
    color2 = decomposeColor2(color2);
    value = clampWrapper2(value);
    if (color2.type === "rgb" || color2.type === "hsl") {
      color2.type += "a";
    }
    if (color2.type === "color") {
      color2.values[3] = `/${value}`;
    } else {
      color2.values[3] = value;
    }
    return recomposeColor2(color2);
  }
  function private_safeAlpha(color2, value, warning2) {
    try {
      return alpha2(color2, value);
    } catch (error) {
      return color2;
    }
  }
  function darken2(color2, coefficient) {
    color2 = decomposeColor2(color2);
    coefficient = clampWrapper2(coefficient);
    if (color2.type.indexOf("hsl") !== -1) {
      color2.values[2] *= 1 - coefficient;
    } else if (color2.type.indexOf("rgb") !== -1 || color2.type.indexOf("color") !== -1) {
      for (let i = 0; i < 3; i += 1) {
        color2.values[i] *= 1 - coefficient;
      }
    }
    return recomposeColor2(color2);
  }
  function private_safeDarken(color2, coefficient, warning2) {
    try {
      return darken2(color2, coefficient);
    } catch (error) {
      return color2;
    }
  }
  function lighten2(color2, coefficient) {
    color2 = decomposeColor2(color2);
    coefficient = clampWrapper2(coefficient);
    if (color2.type.indexOf("hsl") !== -1) {
      color2.values[2] += (100 - color2.values[2]) * coefficient;
    } else if (color2.type.indexOf("rgb") !== -1) {
      for (let i = 0; i < 3; i += 1) {
        color2.values[i] += (255 - color2.values[i]) * coefficient;
      }
    } else if (color2.type.indexOf("color") !== -1) {
      for (let i = 0; i < 3; i += 1) {
        color2.values[i] += (1 - color2.values[i]) * coefficient;
      }
    }
    return recomposeColor2(color2);
  }
  function private_safeLighten(color2, coefficient, warning2) {
    try {
      return lighten2(color2, coefficient);
    } catch (error) {
      return color2;
    }
  }
  function emphasize(color2, coefficient = 0.15) {
    return getLuminance(color2) > 0.5 ? darken2(color2, coefficient) : lighten2(color2, coefficient);
  }
  function private_safeEmphasize(color2, coefficient, warning2) {
    try {
      return emphasize(color2, coefficient);
    } catch (error) {
      return color2;
    }
  }
  function blend(background, overlay, opacity2, gamma = 1) {
    const blendChannel = (b2, o) => Math.round((b2 ** (1 / gamma) * (1 - opacity2) + o ** (1 / gamma) * opacity2) ** gamma);
    const backgroundColor2 = decomposeColor2(background);
    const overlayColor = decomposeColor2(overlay);
    const rgb2 = [blendChannel(backgroundColor2.values[0], overlayColor.values[0]), blendChannel(backgroundColor2.values[1], overlayColor.values[1]), blendChannel(backgroundColor2.values[2], overlayColor.values[2])];
    return recomposeColor2({
      type: "rgb",
      values: rgb2
    });
  }
  return colorManipulator;
}
var colorManipulatorExports = /* @__PURE__ */ requireColorManipulator();
const common = {
  black: "#000",
  white: "#fff"
};
const grey = {
  50: "#fafafa",
  100: "#f5f5f5",
  200: "#eeeeee",
  300: "#e0e0e0",
  400: "#bdbdbd",
  500: "#9e9e9e",
  600: "#757575",
  700: "#616161",
  800: "#424242",
  900: "#212121",
  A100: "#f5f5f5",
  A200: "#eeeeee",
  A400: "#bdbdbd",
  A700: "#616161"
};
const purple = {
  50: "#f3e5f5",
  200: "#ce93d8",
  300: "#ba68c8",
  400: "#ab47bc",
  500: "#9c27b0",
  700: "#7b1fa2"
};
const red = {
  300: "#e57373",
  400: "#ef5350",
  500: "#f44336",
  700: "#d32f2f",
  800: "#c62828"
};
const orange = {
  300: "#ffb74d",
  400: "#ffa726",
  500: "#ff9800",
  700: "#f57c00",
  900: "#e65100"
};
const blue = {
  50: "#e3f2fd",
  200: "#90caf9",
  400: "#42a5f5",
  700: "#1976d2",
  800: "#1565c0"
};
const lightBlue = {
  300: "#4fc3f7",
  400: "#29b6f6",
  500: "#03a9f4",
  700: "#0288d1",
  900: "#01579b"
};
const green = {
  300: "#81c784",
  400: "#66bb6a",
  500: "#4caf50",
  700: "#388e3c",
  800: "#2e7d32",
  900: "#1b5e20"
};
const _excluded$1G = ["mode", "contrastThreshold", "tonalOffset"];
const light$1 = {
  // The colors used to style the text.
  text: {
    // The most important text.
    primary: "rgba(0, 0, 0, 0.87)",
    // Secondary text.
    secondary: "rgba(0, 0, 0, 0.6)",
    // Disabled text have even lower visual prominence.
    disabled: "rgba(0, 0, 0, 0.38)"
  },
  // The color used to divide different elements.
  divider: "rgba(0, 0, 0, 0.12)",
  // The background colors used to style the surfaces.
  // Consistency between these values is important.
  background: {
    paper: common.white,
    default: common.white
  },
  // The colors used to style the action elements.
  action: {
    // The color of an active action like an icon button.
    active: "rgba(0, 0, 0, 0.54)",
    // The color of an hovered action.
    hover: "rgba(0, 0, 0, 0.04)",
    hoverOpacity: 0.04,
    // The color of a selected action.
    selected: "rgba(0, 0, 0, 0.08)",
    selectedOpacity: 0.08,
    // The color of a disabled action.
    disabled: "rgba(0, 0, 0, 0.26)",
    // The background color of a disabled action.
    disabledBackground: "rgba(0, 0, 0, 0.12)",
    disabledOpacity: 0.38,
    focus: "rgba(0, 0, 0, 0.12)",
    focusOpacity: 0.12,
    activatedOpacity: 0.12
  }
};
const dark = {
  text: {
    primary: common.white,
    secondary: "rgba(255, 255, 255, 0.7)",
    disabled: "rgba(255, 255, 255, 0.5)",
    icon: "rgba(255, 255, 255, 0.5)"
  },
  divider: "rgba(255, 255, 255, 0.12)",
  background: {
    paper: "#121212",
    default: "#121212"
  },
  action: {
    active: common.white,
    hover: "rgba(255, 255, 255, 0.08)",
    hoverOpacity: 0.08,
    selected: "rgba(255, 255, 255, 0.16)",
    selectedOpacity: 0.16,
    disabled: "rgba(255, 255, 255, 0.3)",
    disabledBackground: "rgba(255, 255, 255, 0.12)",
    disabledOpacity: 0.38,
    focus: "rgba(255, 255, 255, 0.12)",
    focusOpacity: 0.12,
    activatedOpacity: 0.24
  }
};
function addLightOrDark(intent, direction2, shade, tonalOffset) {
  const tonalOffsetLight = tonalOffset.light || tonalOffset;
  const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;
  if (!intent[direction2]) {
    if (intent.hasOwnProperty(shade)) {
      intent[direction2] = intent[shade];
    } else if (direction2 === "light") {
      intent.light = colorManipulatorExports.lighten(intent.main, tonalOffsetLight);
    } else if (direction2 === "dark") {
      intent.dark = colorManipulatorExports.darken(intent.main, tonalOffsetDark);
    }
  }
}
function getDefaultPrimary(mode = "light") {
  if (mode === "dark") {
    return {
      main: blue[200],
      light: blue[50],
      dark: blue[400]
    };
  }
  return {
    main: blue[700],
    light: blue[400],
    dark: blue[800]
  };
}
function getDefaultSecondary(mode = "light") {
  if (mode === "dark") {
    return {
      main: purple[200],
      light: purple[50],
      dark: purple[400]
    };
  }
  return {
    main: purple[500],
    light: purple[300],
    dark: purple[700]
  };
}
function getDefaultError(mode = "light") {
  if (mode === "dark") {
    return {
      main: red[500],
      light: red[300],
      dark: red[700]
    };
  }
  return {
    main: red[700],
    light: red[400],
    dark: red[800]
  };
}
function getDefaultInfo(mode = "light") {
  if (mode === "dark") {
    return {
      main: lightBlue[400],
      light: lightBlue[300],
      dark: lightBlue[700]
    };
  }
  return {
    main: lightBlue[700],
    light: lightBlue[500],
    dark: lightBlue[900]
  };
}
function getDefaultSuccess(mode = "light") {
  if (mode === "dark") {
    return {
      main: green[400],
      light: green[300],
      dark: green[700]
    };
  }
  return {
    main: green[800],
    light: green[500],
    dark: green[900]
  };
}
function getDefaultWarning(mode = "light") {
  if (mode === "dark") {
    return {
      main: orange[400],
      light: orange[300],
      dark: orange[700]
    };
  }
  return {
    main: "#ed6c02",
    // closest to orange[800] that pass 3:1.
    light: orange[500],
    dark: orange[900]
  };
}
function createPalette(palette) {
  const {
    mode = "light",
    contrastThreshold = 3,
    tonalOffset = 0.2
  } = palette, other = _objectWithoutPropertiesLoose(palette, _excluded$1G);
  const primary = palette.primary || getDefaultPrimary(mode);
  const secondary = palette.secondary || getDefaultSecondary(mode);
  const error = palette.error || getDefaultError(mode);
  const info = palette.info || getDefaultInfo(mode);
  const success = palette.success || getDefaultSuccess(mode);
  const warning2 = palette.warning || getDefaultWarning(mode);
  function getContrastText(background) {
    const contrastText = colorManipulatorExports.getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light$1.text.primary;
    return contrastText;
  }
  const augmentColor = ({
    color: color2,
    name,
    mainShade = 500,
    lightShade = 300,
    darkShade = 700
  }) => {
    color2 = _extends$1({}, color2);
    if (!color2.main && color2[mainShade]) {
      color2.main = color2[mainShade];
    }
    if (!color2.hasOwnProperty("main")) {
      throw new Error(formatMuiErrorMessage$1(11, name ? ` (${name})` : "", mainShade));
    }
    if (typeof color2.main !== "string") {
      throw new Error(formatMuiErrorMessage$1(12, name ? ` (${name})` : "", JSON.stringify(color2.main)));
    }
    addLightOrDark(color2, "light", lightShade, tonalOffset);
    addLightOrDark(color2, "dark", darkShade, tonalOffset);
    if (!color2.contrastText) {
      color2.contrastText = getContrastText(color2.main);
    }
    return color2;
  };
  const modes = {
    dark,
    light: light$1
  };
  const paletteOutput = deepmerge$1(_extends$1({
    // A collection of common colors.
    common: _extends$1({}, common),
    // prevent mutable object.
    // The palette mode, can be light or dark.
    mode,
    // The colors used to represent primary interface elements for a user.
    primary: augmentColor({
      color: primary,
      name: "primary"
    }),
    // The colors used to represent secondary interface elements for a user.
    secondary: augmentColor({
      color: secondary,
      name: "secondary",
      mainShade: "A400",
      lightShade: "A200",
      darkShade: "A700"
    }),
    // The colors used to represent interface elements that the user should be made aware of.
    error: augmentColor({
      color: error,
      name: "error"
    }),
    // The colors used to represent potentially dangerous actions or important messages.
    warning: augmentColor({
      color: warning2,
      name: "warning"
    }),
    // The colors used to present information to the user that is neutral and not necessarily important.
    info: augmentColor({
      color: info,
      name: "info"
    }),
    // The colors used to indicate the successful completion of an action that user triggered.
    success: augmentColor({
      color: success,
      name: "success"
    }),
    // The grey colors.
    grey,
    // Used by `getContrastText()` to maximize the contrast between
    // the background and the text.
    contrastThreshold,
    // Takes a background color and returns the text color that maximizes the contrast.
    getContrastText,
    // Generate a rich color object.
    augmentColor,
    // Used by the functions below to shift a color's luminance by approximately
    // two indexes within its tonal palette.
    // E.g., shift from Red 500 to Red 300 or Red 700.
    tonalOffset
  }, modes[mode]), other);
  return paletteOutput;
}
const _excluded$1F = ["fontFamily", "fontSize", "fontWeightLight", "fontWeightRegular", "fontWeightMedium", "fontWeightBold", "htmlFontSize", "allVariants", "pxToRem"];
function round$3(value) {
  return Math.round(value * 1e5) / 1e5;
}
const caseAllCaps = {
  textTransform: "uppercase"
};
const defaultFontFamily = '"Roboto", "Helvetica", "Arial", sans-serif';
function createTypography(palette, typography) {
  const _ref = typeof typography === "function" ? typography(palette) : typography, {
    fontFamily: fontFamily2 = defaultFontFamily,
    // The default font size of the Material Specification.
    fontSize: fontSize2 = 14,
    // px
    fontWeightLight = 300,
    fontWeightRegular = 400,
    fontWeightMedium = 500,
    fontWeightBold = 700,
    // Tell MUI what's the font-size on the html element.
    // 16px is the default font-size used by browsers.
    htmlFontSize = 16,
    // Apply the CSS properties to all the variants.
    allVariants,
    pxToRem: pxToRem2
  } = _ref, other = _objectWithoutPropertiesLoose(_ref, _excluded$1F);
  const coef = fontSize2 / 14;
  const pxToRem = pxToRem2 || ((size) => `${size / htmlFontSize * coef}rem`);
  const buildVariant = (fontWeight2, size, lineHeight2, letterSpacing2, casing) => _extends$1({
    fontFamily: fontFamily2,
    fontWeight: fontWeight2,
    fontSize: pxToRem(size),
    // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/
    lineHeight: lineHeight2
  }, fontFamily2 === defaultFontFamily ? {
    letterSpacing: `${round$3(letterSpacing2 / size)}em`
  } : {}, casing, allVariants);
  const variants = {
    h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),
    h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),
    h3: buildVariant(fontWeightRegular, 48, 1.167, 0),
    h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),
    h5: buildVariant(fontWeightRegular, 24, 1.334, 0),
    h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),
    subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),
    subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),
    body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),
    body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),
    button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
    caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
    overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),
    // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.
    inherit: {
      fontFamily: "inherit",
      fontWeight: "inherit",
      fontSize: "inherit",
      lineHeight: "inherit",
      letterSpacing: "inherit"
    }
  };
  return deepmerge$1(_extends$1({
    htmlFontSize,
    pxToRem,
    fontFamily: fontFamily2,
    fontSize: fontSize2,
    fontWeightLight,
    fontWeightRegular,
    fontWeightMedium,
    fontWeightBold
  }, variants), other, {
    clone: false
    // No need to clone deep
  });
}
const shadowKeyUmbraOpacity = 0.2;
const shadowKeyPenumbraOpacity = 0.14;
const shadowAmbientShadowOpacity = 0.12;
function createShadow(...px) {
  return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(",");
}
const shadows = ["none", createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];
const _excluded$1E = ["duration", "easing", "delay"];
const easing = {
  // This is the most common easing curve.
  easeInOut: "cubic-bezier(0.4, 0, 0.2, 1)",
  // Objects enter the screen at full velocity from off-screen and
  // slowly decelerate to a resting point.
  easeOut: "cubic-bezier(0.0, 0, 0.2, 1)",
  // Objects leave the screen at full velocity. They do not decelerate when off-screen.
  easeIn: "cubic-bezier(0.4, 0, 1, 1)",
  // The sharp curve is used by objects that may return to the screen at any time.
  sharp: "cubic-bezier(0.4, 0, 0.6, 1)"
};
const duration$1 = {
  shortest: 150,
  shorter: 200,
  short: 250,
  // most basic recommended timing
  standard: 300,
  // this is to be used in complex animations
  complex: 375,
  // recommended when something is entering screen
  enteringScreen: 225,
  // recommended when something is leaving screen
  leavingScreen: 195
};
function formatMs(milliseconds) {
  return `${Math.round(milliseconds)}ms`;
}
function getAutoHeightDuration(height2) {
  if (!height2) {
    return 0;
  }
  const constant = height2 / 36;
  return Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10);
}
function createTransitions(inputTransitions) {
  const mergedEasing = _extends$1({}, easing, inputTransitions.easing);
  const mergedDuration = _extends$1({}, duration$1, inputTransitions.duration);
  const create = (props = ["all"], options = {}) => {
    const {
      duration: durationOption = mergedDuration.standard,
      easing: easingOption = mergedEasing.easeInOut,
      delay = 0
    } = options;
    _objectWithoutPropertiesLoose(options, _excluded$1E);
    return (Array.isArray(props) ? props : [props]).map((animatedProp) => `${animatedProp} ${typeof durationOption === "string" ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === "string" ? delay : formatMs(delay)}`).join(",");
  };
  return _extends$1({
    getAutoHeightDuration,
    create
  }, inputTransitions, {
    easing: mergedEasing,
    duration: mergedDuration
  });
}
const zIndex$1 = {
  mobileStepper: 1e3,
  fab: 1050,
  speedDial: 1050,
  appBar: 1100,
  drawer: 1200,
  modal: 1300,
  snackbar: 1400,
  tooltip: 1500
};
const _excluded$1D = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
function createTheme(options = {}, ...args) {
  const {
    mixins: mixinsInput = {},
    palette: paletteInput = {},
    transitions: transitionsInput = {},
    typography: typographyInput = {}
  } = options, other = _objectWithoutPropertiesLoose(options, _excluded$1D);
  if (options.vars && // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
  // `generateCssVars` is the closest identifier for checking that the `options` is a result of `extendTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
  options.generateCssVars === void 0) {
    throw new Error(formatMuiErrorMessage$1(18));
  }
  const palette = createPalette(paletteInput);
  const systemTheme = createTheme$2(options);
  let muiTheme = deepmerge$1(systemTheme, {
    mixins: createMixins(systemTheme.breakpoints, mixinsInput),
    palette,
    // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.
    shadows: shadows.slice(),
    typography: createTypography(palette, typographyInput),
    transitions: createTransitions(transitionsInput),
    zIndex: _extends$1({}, zIndex$1)
  });
  muiTheme = deepmerge$1(muiTheme, other);
  muiTheme = args.reduce((acc, argument) => deepmerge$1(acc, argument), muiTheme);
  muiTheme.unstable_sxConfig = _extends$1({}, defaultSxConfig, other == null ? void 0 : other.unstable_sxConfig);
  muiTheme.unstable_sx = function sx(props) {
    return styleFunctionSx$1({
      sx: props,
      theme: this
    });
  };
  return muiTheme;
}
const defaultTheme$1 = createTheme();
function useTheme$1() {
  const theme = useTheme$3(defaultTheme$1);
  return theme[THEME_ID] || theme;
}
function useThemeProps({
  props,
  name
}) {
  return useThemeProps$1({
    props,
    name,
    defaultTheme: defaultTheme$1,
    themeId: THEME_ID
  });
}
var createStyled$1 = {};
var _extends = { exports: {} };
var hasRequired_extends;
function require_extends() {
  if (hasRequired_extends) return _extends.exports;
  hasRequired_extends = 1;
  (function(module2) {
    function _extends2() {
      return module2.exports = _extends2 = Object.assign ? Object.assign.bind() : function(n) {
        for (var e2 = 1; e2 < arguments.length; e2++) {
          var t = arguments[e2];
          for (var r2 in t) ({}).hasOwnProperty.call(t, r2) && (n[r2] = t[r2]);
        }
        return n;
      }, module2.exports.__esModule = true, module2.exports["default"] = module2.exports, _extends2.apply(null, arguments);
    }
    module2.exports = _extends2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
  })(_extends);
  return _extends.exports;
}
var objectWithoutPropertiesLoose = { exports: {} };
var hasRequiredObjectWithoutPropertiesLoose;
function requireObjectWithoutPropertiesLoose() {
  if (hasRequiredObjectWithoutPropertiesLoose) return objectWithoutPropertiesLoose.exports;
  hasRequiredObjectWithoutPropertiesLoose = 1;
  (function(module2) {
    function _objectWithoutPropertiesLoose2(r2, e2) {
      if (null == r2) return {};
      var t = {};
      for (var n in r2) if ({}.hasOwnProperty.call(r2, n)) {
        if (-1 !== e2.indexOf(n)) continue;
        t[n] = r2[n];
      }
      return t;
    }
    module2.exports = _objectWithoutPropertiesLoose2, module2.exports.__esModule = true, module2.exports["default"] = module2.exports;
  })(objectWithoutPropertiesLoose);
  return objectWithoutPropertiesLoose.exports;
}
const require$$1 = /* @__PURE__ */ getAugmentedNamespace(styledEngine);
const require$$4 = /* @__PURE__ */ getAugmentedNamespace(deepmerge);
const require$$5 = /* @__PURE__ */ getAugmentedNamespace(capitalize$1);
const require$$6 = /* @__PURE__ */ getAugmentedNamespace(getDisplayName);
const require$$7 = /* @__PURE__ */ getAugmentedNamespace(createTheme$1);
const require$$8 = /* @__PURE__ */ getAugmentedNamespace(styleFunctionSx);
var hasRequiredCreateStyled;
function requireCreateStyled() {
  if (hasRequiredCreateStyled) return createStyled$1;
  hasRequiredCreateStyled = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(createStyled$1, "__esModule", {
    value: true
  });
  createStyled$1.default = createStyled3;
  createStyled$1.shouldForwardProp = shouldForwardProp2;
  createStyled$1.systemDefaultTheme = void 0;
  var _extends2 = _interopRequireDefault(require_extends());
  var _objectWithoutPropertiesLoose2 = _interopRequireDefault(requireObjectWithoutPropertiesLoose());
  var _styledEngine = _interopRequireWildcard(require$$1);
  var _deepmerge = require$$4;
  _interopRequireDefault(require$$5);
  _interopRequireDefault(require$$6);
  var _createTheme = _interopRequireDefault(require$$7);
  var _styleFunctionSx = _interopRequireDefault(require$$8);
  const _excluded5 = ["ownerState"], _excluded22 = ["variants"], _excluded32 = ["name", "slot", "skipVariantsResolver", "skipSx", "overridesResolver"];
  function _getRequireWildcardCache(e2) {
    if ("function" != typeof WeakMap) return null;
    var r2 = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
    return (_getRequireWildcardCache = function(e22) {
      return e22 ? t : r2;
    })(e2);
  }
  function _interopRequireWildcard(e2, r2) {
    if (e2 && e2.__esModule) return e2;
    if (null === e2 || "object" != typeof e2 && "function" != typeof e2) return { default: e2 };
    var t = _getRequireWildcardCache(r2);
    if (t && t.has(e2)) return t.get(e2);
    var n = { __proto__: null }, a2 = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for (var u2 in e2) if ("default" !== u2 && Object.prototype.hasOwnProperty.call(e2, u2)) {
      var i = a2 ? Object.getOwnPropertyDescriptor(e2, u2) : null;
      i && (i.get || i.set) ? Object.defineProperty(n, u2, i) : n[u2] = e2[u2];
    }
    return n.default = e2, t && t.set(e2, n), n;
  }
  function isEmpty2(obj2) {
    return Object.keys(obj2).length === 0;
  }
  function isStringTag2(tag) {
    return typeof tag === "string" && // 96 is one less than the char code
    // for "a" so this is checking that
    // it's a lowercase character
    tag.charCodeAt(0) > 96;
  }
  function shouldForwardProp2(prop) {
    return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as";
  }
  const systemDefaultTheme2 = createStyled$1.systemDefaultTheme = (0, _createTheme.default)();
  const lowercaseFirstLetter2 = (string) => {
    if (!string) {
      return string;
    }
    return string.charAt(0).toLowerCase() + string.slice(1);
  };
  function resolveTheme2({
    defaultTheme: defaultTheme2,
    theme,
    themeId
  }) {
    return isEmpty2(theme) ? defaultTheme2 : theme[themeId] || theme;
  }
  function defaultOverridesResolver2(slot) {
    if (!slot) {
      return null;
    }
    return (props, styles2) => styles2[slot];
  }
  function processStyleArg2(callableStyle, _ref) {
    let {
      ownerState
    } = _ref, props = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded5);
    const resolvedStylesArg = typeof callableStyle === "function" ? callableStyle((0, _extends2.default)({
      ownerState
    }, props)) : callableStyle;
    if (Array.isArray(resolvedStylesArg)) {
      return resolvedStylesArg.flatMap((resolvedStyle) => processStyleArg2(resolvedStyle, (0, _extends2.default)({
        ownerState
      }, props)));
    }
    if (!!resolvedStylesArg && typeof resolvedStylesArg === "object" && Array.isArray(resolvedStylesArg.variants)) {
      const {
        variants = []
      } = resolvedStylesArg, otherStyles = (0, _objectWithoutPropertiesLoose2.default)(resolvedStylesArg, _excluded22);
      let result = otherStyles;
      variants.forEach((variant2) => {
        let isMatch = true;
        if (typeof variant2.props === "function") {
          isMatch = variant2.props((0, _extends2.default)({
            ownerState
          }, props, ownerState));
        } else {
          Object.keys(variant2.props).forEach((key) => {
            if ((ownerState == null ? void 0 : ownerState[key]) !== variant2.props[key] && props[key] !== variant2.props[key]) {
              isMatch = false;
            }
          });
        }
        if (isMatch) {
          if (!Array.isArray(result)) {
            result = [result];
          }
          result.push(typeof variant2.style === "function" ? variant2.style((0, _extends2.default)({
            ownerState
          }, props, ownerState)) : variant2.style);
        }
      });
      return result;
    }
    return resolvedStylesArg;
  }
  function createStyled3(input = {}) {
    const {
      themeId,
      defaultTheme: defaultTheme2 = systemDefaultTheme2,
      rootShouldForwardProp: rootShouldForwardProp2 = shouldForwardProp2,
      slotShouldForwardProp: slotShouldForwardProp2 = shouldForwardProp2
    } = input;
    const systemSx = (props) => {
      return (0, _styleFunctionSx.default)((0, _extends2.default)({}, props, {
        theme: resolveTheme2((0, _extends2.default)({}, props, {
          defaultTheme: defaultTheme2,
          themeId
        }))
      }));
    };
    systemSx.__mui_systemSx = true;
    return (tag, inputOptions = {}) => {
      (0, _styledEngine.internal_processStyles)(tag, (styles2) => styles2.filter((style2) => !(style2 != null && style2.__mui_systemSx)));
      const {
        name: componentName,
        slot: componentSlot,
        skipVariantsResolver: inputSkipVariantsResolver,
        skipSx: inputSkipSx,
        // TODO v6: remove `lowercaseFirstLetter()` in the next major release
        // For more details: https://github.com/mui/material-ui/pull/37908
        overridesResolver: overridesResolver2 = defaultOverridesResolver2(lowercaseFirstLetter2(componentSlot))
      } = inputOptions, options = (0, _objectWithoutPropertiesLoose2.default)(inputOptions, _excluded32);
      const skipVariantsResolver = inputSkipVariantsResolver !== void 0 ? inputSkipVariantsResolver : (
        // TODO v6: remove `Root` in the next major release
        // For more details: https://github.com/mui/material-ui/pull/37908
        componentSlot && componentSlot !== "Root" && componentSlot !== "root" || false
      );
      const skipSx = inputSkipSx || false;
      let label;
      let shouldForwardPropOption = shouldForwardProp2;
      if (componentSlot === "Root" || componentSlot === "root") {
        shouldForwardPropOption = rootShouldForwardProp2;
      } else if (componentSlot) {
        shouldForwardPropOption = slotShouldForwardProp2;
      } else if (isStringTag2(tag)) {
        shouldForwardPropOption = void 0;
      }
      const defaultStyledResolver = (0, _styledEngine.default)(tag, (0, _extends2.default)({
        shouldForwardProp: shouldForwardPropOption,
        label
      }, options));
      const transformStyleArg = (stylesArg) => {
        if (typeof stylesArg === "function" && stylesArg.__emotion_real !== stylesArg || (0, _deepmerge.isPlainObject)(stylesArg)) {
          return (props) => processStyleArg2(stylesArg, (0, _extends2.default)({}, props, {
            theme: resolveTheme2({
              theme: props.theme,
              defaultTheme: defaultTheme2,
              themeId
            })
          }));
        }
        return stylesArg;
      };
      const muiStyledResolver = (styleArg2, ...expressions) => {
        let transformedStyleArg = transformStyleArg(styleArg2);
        const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];
        if (componentName && overridesResolver2) {
          expressionsWithDefaultTheme.push((props) => {
            const theme = resolveTheme2((0, _extends2.default)({}, props, {
              defaultTheme: defaultTheme2,
              themeId
            }));
            if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {
              return null;
            }
            const styleOverrides = theme.components[componentName].styleOverrides;
            const resolvedStyleOverrides = {};
            Object.entries(styleOverrides).forEach(([slotKey, slotStyle]) => {
              resolvedStyleOverrides[slotKey] = processStyleArg2(slotStyle, (0, _extends2.default)({}, props, {
                theme
              }));
            });
            return overridesResolver2(props, resolvedStyleOverrides);
          });
        }
        if (componentName && !skipVariantsResolver) {
          expressionsWithDefaultTheme.push((props) => {
            var _theme$components;
            const theme = resolveTheme2((0, _extends2.default)({}, props, {
              defaultTheme: defaultTheme2,
              themeId
            }));
            const themeVariants = theme == null || (_theme$components = theme.components) == null || (_theme$components = _theme$components[componentName]) == null ? void 0 : _theme$components.variants;
            return processStyleArg2({
              variants: themeVariants
            }, (0, _extends2.default)({}, props, {
              theme
            }));
          });
        }
        if (!skipSx) {
          expressionsWithDefaultTheme.push(systemSx);
        }
        const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;
        if (Array.isArray(styleArg2) && numOfCustomFnsApplied > 0) {
          const placeholders = new Array(numOfCustomFnsApplied).fill("");
          transformedStyleArg = [...styleArg2, ...placeholders];
          transformedStyleArg.raw = [...styleArg2.raw, ...placeholders];
        }
        const Component = defaultStyledResolver(transformedStyleArg, ...expressionsWithDefaultTheme);
        if (tag.muiName) {
          Component.muiName = tag.muiName;
        }
        return Component;
      };
      if (defaultStyledResolver.withConfig) {
        muiStyledResolver.withConfig = defaultStyledResolver.withConfig;
      }
      return muiStyledResolver;
    };
  }
  return createStyled$1;
}
var createStyledExports = /* @__PURE__ */ requireCreateStyled();
const createStyled2 = /* @__PURE__ */ getDefaultExportFromCjs(createStyledExports);
function slotShouldForwardProp(prop) {
  return prop !== "ownerState" && prop !== "theme" && prop !== "sx" && prop !== "as";
}
const rootShouldForwardProp = (prop) => slotShouldForwardProp(prop) && prop !== "classes";
const styled = createStyled2({
  themeId: THEME_ID,
  defaultTheme: defaultTheme$1,
  rootShouldForwardProp
});
const _excluded$1C = ["theme"];
function ThemeProvider$1(_ref) {
  let {
    theme: themeInput
  } = _ref, props = _objectWithoutPropertiesLoose(_ref, _excluded$1C);
  const scopedTheme = themeInput[THEME_ID];
  let finalTheme = scopedTheme || themeInput;
  if (typeof themeInput !== "function") {
    if (scopedTheme && !scopedTheme.vars) {
      finalTheme = _extends$1({}, scopedTheme, {
        vars: null
      });
    } else if (themeInput && !themeInput.vars) {
      finalTheme = _extends$1({}, themeInput, {
        vars: null
      });
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider$2, _extends$1({}, props, {
    themeId: scopedTheme ? THEME_ID : void 0,
    theme: finalTheme
  }));
}
const getOverlayAlpha = (elevation) => {
  let alphaValue;
  if (elevation < 1) {
    alphaValue = 5.11916 * elevation ** 2;
  } else {
    alphaValue = 4.5 * Math.log(elevation + 1) + 2;
  }
  return (alphaValue / 100).toFixed(2);
};
const __vite_import_meta_env__$2 = {};
const isSelfAtom = (atom2, a2) => atom2.unstable_is ? atom2.unstable_is(a2) : a2 === atom2;
const hasInitialValue = (atom2) => "init" in atom2;
const isActuallyWritableAtom = (atom2) => !!atom2.write;
const isAtomStateInitialized = (atomState) => "v" in atomState || "e" in atomState;
const returnAtomValue = (atomState) => {
  if ("e" in atomState) {
    throw atomState.e;
  }
  if ((__vite_import_meta_env__$2 ? "production" : void 0) !== "production" && !("v" in atomState)) {
    throw new Error("[Bug] atom state is not initialized");
  }
  return atomState.v;
};
const promiseStateMap = /* @__PURE__ */ new WeakMap();
const isPendingPromise = (value) => {
  var _a2;
  return isPromiseLike$1(value) && !!((_a2 = promiseStateMap.get(value)) == null ? void 0 : _a2[0]);
};
const abortPromise = (promise) => {
  const promiseState = promiseStateMap.get(promise);
  if (promiseState == null ? void 0 : promiseState[0]) {
    promiseState[0] = false;
    promiseState[1].forEach((fn2) => fn2());
  }
};
const registerAbortHandler = (promise, abortHandler) => {
  let promiseState = promiseStateMap.get(promise);
  if (!promiseState) {
    promiseState = [true, /* @__PURE__ */ new Set()];
    promiseStateMap.set(promise, promiseState);
    const settle2 = () => {
      promiseState[0] = false;
    };
    promise.then(settle2, settle2);
  }
  promiseState[1].add(abortHandler);
};
const isPromiseLike$1 = (p2) => typeof (p2 == null ? void 0 : p2.then) === "function";
const addPendingPromiseToDependency = (atom2, promise, dependencyAtomState) => {
  if (!dependencyAtomState.p.has(atom2)) {
    dependencyAtomState.p.add(atom2);
    promise.then(
      () => {
        dependencyAtomState.p.delete(atom2);
      },
      () => {
        dependencyAtomState.p.delete(atom2);
      }
    );
  }
};
const setAtomStateValueOrPromise = (atom2, valueOrPromise, ensureAtomState) => {
  const atomState = ensureAtomState(atom2);
  const hasPrevValue = "v" in atomState;
  const prevValue = atomState.v;
  if (isPromiseLike$1(valueOrPromise)) {
    for (const a2 of atomState.d.keys()) {
      addPendingPromiseToDependency(atom2, valueOrPromise, ensureAtomState(a2));
    }
  }
  atomState.v = valueOrPromise;
  delete atomState.e;
  if (!hasPrevValue || !Object.is(prevValue, atomState.v)) {
    ++atomState.n;
    if (isPromiseLike$1(prevValue)) {
      abortPromise(prevValue);
    }
  }
};
const getMountedOrPendingDependents = (atom2, atomState, mountedMap) => {
  var _a2;
  const dependents = /* @__PURE__ */ new Set();
  for (const a2 of ((_a2 = mountedMap.get(atom2)) == null ? void 0 : _a2.t) || []) {
    if (mountedMap.has(a2)) {
      dependents.add(a2);
    }
  }
  for (const atomWithPendingPromise of atomState.p) {
    dependents.add(atomWithPendingPromise);
  }
  return dependents;
};
const createStoreHook = () => {
  const callbacks = /* @__PURE__ */ new Set();
  const notify = () => {
    callbacks.forEach((fn2) => fn2());
  };
  notify.add = (fn2) => {
    callbacks.add(fn2);
    return () => {
      callbacks.delete(fn2);
    };
  };
  return notify;
};
const createStoreHookForAtoms = () => {
  const all3 = {};
  const callbacks = /* @__PURE__ */ new WeakMap();
  const notify = (atom2) => {
    var _a2, _b;
    (_a2 = callbacks.get(all3)) == null ? void 0 : _a2.forEach((fn2) => fn2(atom2));
    (_b = callbacks.get(atom2)) == null ? void 0 : _b.forEach((fn2) => fn2());
  };
  notify.add = (atom2, fn2) => {
    const key = atom2 || all3;
    const fns2 = (callbacks.has(key) ? callbacks : callbacks.set(key, /* @__PURE__ */ new Set())).get(key);
    fns2.add(fn2);
    return () => {
      fns2 == null ? void 0 : fns2.delete(fn2);
      if (!fns2.size) {
        callbacks.delete(key);
      }
    };
  };
  return notify;
};
const initializeStoreHooks = (storeHooks) => {
  storeHooks.c || (storeHooks.c = createStoreHookForAtoms());
  storeHooks.m || (storeHooks.m = createStoreHookForAtoms());
  storeHooks.u || (storeHooks.u = createStoreHookForAtoms());
  storeHooks.f || (storeHooks.f = createStoreHook());
  return storeHooks;
};
const BUILDING_BLOCKS = Symbol();
const buildStore = (atomStateMap = /* @__PURE__ */ new WeakMap(), mountedMap = /* @__PURE__ */ new WeakMap(), invalidatedAtoms = /* @__PURE__ */ new WeakMap(), changedAtoms = /* @__PURE__ */ new Set(), mountCallbacks = /* @__PURE__ */ new Set(), unmountCallbacks = /* @__PURE__ */ new Set(), storeHooks = {}, atomRead = (atom2, ...params2) => atom2.read(...params2), atomWrite = (atom2, ...params2) => atom2.write(...params2), atomOnInit = (atom2, store) => {
  var _a2;
  return (_a2 = atom2.unstable_onInit) == null ? void 0 : _a2.call(atom2, store);
}, atomOnMount = (atom2, setAtom) => {
  var _a2;
  return (_a2 = atom2.onMount) == null ? void 0 : _a2.call(atom2, setAtom);
}, ...buildingBlockFunctions) => {
  const ensureAtomState = buildingBlockFunctions[0] || ((atom2) => {
    if ((__vite_import_meta_env__$2 ? "production" : void 0) !== "production" && !atom2) {
      throw new Error("Atom is undefined or null");
    }
    let atomState = atomStateMap.get(atom2);
    if (!atomState) {
      atomState = { d: /* @__PURE__ */ new Map(), p: /* @__PURE__ */ new Set(), n: 0 };
      atomStateMap.set(atom2, atomState);
      atomOnInit == null ? void 0 : atomOnInit(atom2, store);
    }
    return atomState;
  });
  const flushCallbacks = buildingBlockFunctions[1] || (() => {
    const errors = [];
    const call = (fn2) => {
      try {
        fn2();
      } catch (e2) {
        errors.push(e2);
      }
    };
    do {
      if (storeHooks.f) {
        call(storeHooks.f);
      }
      const callbacks = /* @__PURE__ */ new Set();
      const add = callbacks.add.bind(callbacks);
      changedAtoms.forEach((atom2) => {
        var _a2;
        return (_a2 = mountedMap.get(atom2)) == null ? void 0 : _a2.l.forEach(add);
      });
      changedAtoms.clear();
      unmountCallbacks.forEach(add);
      unmountCallbacks.clear();
      mountCallbacks.forEach(add);
      mountCallbacks.clear();
      callbacks.forEach(call);
      if (changedAtoms.size) {
        recomputeInvalidatedAtoms();
      }
    } while (changedAtoms.size || unmountCallbacks.size || mountCallbacks.size);
    if (errors.length) {
      throw new AggregateError(errors);
    }
  });
  const recomputeInvalidatedAtoms = buildingBlockFunctions[2] || (() => {
    const topSortedReversed = [];
    const visiting = /* @__PURE__ */ new WeakSet();
    const visited = /* @__PURE__ */ new WeakSet();
    const stack = Array.from(changedAtoms);
    while (stack.length) {
      const a2 = stack[stack.length - 1];
      const aState = ensureAtomState(a2);
      if (visited.has(a2)) {
        stack.pop();
        continue;
      }
      if (visiting.has(a2)) {
        if (invalidatedAtoms.get(a2) === aState.n) {
          topSortedReversed.push([a2, aState]);
        } else if ((__vite_import_meta_env__$2 ? "production" : void 0) !== "production" && invalidatedAtoms.has(a2)) {
          throw new Error("[Bug] invalidated atom exists");
        }
        visited.add(a2);
        stack.pop();
        continue;
      }
      visiting.add(a2);
      for (const d2 of getMountedOrPendingDependents(a2, aState, mountedMap)) {
        if (!visiting.has(d2)) {
          stack.push(d2);
        }
      }
    }
    for (let i = topSortedReversed.length - 1; i >= 0; --i) {
      const [a2, aState] = topSortedReversed[i];
      let hasChangedDeps = false;
      for (const dep of aState.d.keys()) {
        if (dep !== a2 && changedAtoms.has(dep)) {
          hasChangedDeps = true;
          break;
        }
      }
      if (hasChangedDeps) {
        readAtomState(a2);
        mountDependencies(a2);
      }
      invalidatedAtoms.delete(a2);
    }
  });
  const readAtomState = buildingBlockFunctions[3] || ((atom2) => {
    var _a2;
    const atomState = ensureAtomState(atom2);
    if (isAtomStateInitialized(atomState)) {
      if (mountedMap.has(atom2) && invalidatedAtoms.get(atom2) !== atomState.n) {
        return atomState;
      }
      if (Array.from(atomState.d).every(
        ([a2, n]) => (
          // Recursively, read the atom state of the dependency, and
          // check if the atom epoch number is unchanged
          readAtomState(a2).n === n
        )
      )) {
        return atomState;
      }
    }
    atomState.d.clear();
    let isSync = true;
    const mountDependenciesIfAsync = () => {
      if (mountedMap.has(atom2)) {
        mountDependencies(atom2);
        recomputeInvalidatedAtoms();
        flushCallbacks();
      }
    };
    const getter = (a2) => {
      var _a22;
      if (isSelfAtom(atom2, a2)) {
        const aState2 = ensureAtomState(a2);
        if (!isAtomStateInitialized(aState2)) {
          if (hasInitialValue(a2)) {
            setAtomStateValueOrPromise(a2, a2.init, ensureAtomState);
          } else {
            throw new Error("no atom init");
          }
        }
        return returnAtomValue(aState2);
      }
      const aState = readAtomState(a2);
      try {
        return returnAtomValue(aState);
      } finally {
        atomState.d.set(a2, aState.n);
        if (isPendingPromise(atomState.v)) {
          addPendingPromiseToDependency(atom2, atomState.v, aState);
        }
        (_a22 = mountedMap.get(a2)) == null ? void 0 : _a22.t.add(atom2);
        if (!isSync) {
          mountDependenciesIfAsync();
        }
      }
    };
    let controller;
    let setSelf;
    const options = {
      get signal() {
        if (!controller) {
          controller = new AbortController();
        }
        return controller.signal;
      },
      get setSelf() {
        if ((__vite_import_meta_env__$2 ? "production" : void 0) !== "production" && !isActuallyWritableAtom(atom2)) {
          console.warn("setSelf function cannot be used with read-only atom");
        }
        if (!setSelf && isActuallyWritableAtom(atom2)) {
          setSelf = (...args) => {
            if ((__vite_import_meta_env__$2 ? "production" : void 0) !== "production" && isSync) {
              console.warn("setSelf function cannot be called in sync");
            }
            if (!isSync) {
              try {
                return writeAtomState(atom2, ...args);
              } finally {
                recomputeInvalidatedAtoms();
                flushCallbacks();
              }
            }
          };
        }
        return setSelf;
      }
    };
    const prevEpochNumber = atomState.n;
    try {
      const valueOrPromise = atomRead(atom2, getter, options);
      setAtomStateValueOrPromise(atom2, valueOrPromise, ensureAtomState);
      if (isPromiseLike$1(valueOrPromise)) {
        registerAbortHandler(valueOrPromise, () => controller == null ? void 0 : controller.abort());
        valueOrPromise.then(
          mountDependenciesIfAsync,
          mountDependenciesIfAsync
        );
      }
      return atomState;
    } catch (error) {
      delete atomState.v;
      atomState.e = error;
      ++atomState.n;
      return atomState;
    } finally {
      isSync = false;
      if (prevEpochNumber !== atomState.n && invalidatedAtoms.get(atom2) === prevEpochNumber) {
        invalidatedAtoms.set(atom2, atomState.n);
        changedAtoms.add(atom2);
        (_a2 = storeHooks.c) == null ? void 0 : _a2.call(storeHooks, atom2);
      }
    }
  });
  const invalidateDependents = buildingBlockFunctions[4] || ((atom2) => {
    const stack = [atom2];
    while (stack.length) {
      const a2 = stack.pop();
      const aState = ensureAtomState(a2);
      for (const d2 of getMountedOrPendingDependents(a2, aState, mountedMap)) {
        const dState = ensureAtomState(d2);
        invalidatedAtoms.set(d2, dState.n);
        stack.push(d2);
      }
    }
  });
  const writeAtomState = buildingBlockFunctions[5] || ((atom2, ...args) => {
    let isSync = true;
    const getter = (a2) => returnAtomValue(readAtomState(a2));
    const setter = (a2, ...args2) => {
      var _a2;
      const aState = ensureAtomState(a2);
      try {
        if (isSelfAtom(atom2, a2)) {
          if (!hasInitialValue(a2)) {
            throw new Error("atom not writable");
          }
          const prevEpochNumber = aState.n;
          const v2 = args2[0];
          setAtomStateValueOrPromise(a2, v2, ensureAtomState);
          mountDependencies(a2);
          if (prevEpochNumber !== aState.n) {
            changedAtoms.add(a2);
            (_a2 = storeHooks.c) == null ? void 0 : _a2.call(storeHooks, a2);
            invalidateDependents(a2);
          }
          return void 0;
        } else {
          return writeAtomState(a2, ...args2);
        }
      } finally {
        if (!isSync) {
          recomputeInvalidatedAtoms();
          flushCallbacks();
        }
      }
    };
    try {
      return atomWrite(atom2, getter, setter, ...args);
    } finally {
      isSync = false;
    }
  });
  const mountDependencies = buildingBlockFunctions[6] || ((atom2) => {
    var _a2;
    const atomState = ensureAtomState(atom2);
    const mounted = mountedMap.get(atom2);
    if (mounted && !isPendingPromise(atomState.v)) {
      for (const [a2, n] of atomState.d) {
        if (!mounted.d.has(a2)) {
          const aState = ensureAtomState(a2);
          const aMounted = mountAtom(a2);
          aMounted.t.add(atom2);
          mounted.d.add(a2);
          if (n !== aState.n) {
            changedAtoms.add(a2);
            (_a2 = storeHooks.c) == null ? void 0 : _a2.call(storeHooks, a2);
            invalidateDependents(a2);
          }
        }
      }
      for (const a2 of mounted.d || []) {
        if (!atomState.d.has(a2)) {
          mounted.d.delete(a2);
          const aMounted = unmountAtom(a2);
          aMounted == null ? void 0 : aMounted.t.delete(atom2);
        }
      }
    }
  });
  const mountAtom = buildingBlockFunctions[7] || ((atom2) => {
    var _a2;
    const atomState = ensureAtomState(atom2);
    let mounted = mountedMap.get(atom2);
    if (!mounted) {
      readAtomState(atom2);
      for (const a2 of atomState.d.keys()) {
        const aMounted = mountAtom(a2);
        aMounted.t.add(atom2);
      }
      mounted = {
        l: /* @__PURE__ */ new Set(),
        d: new Set(atomState.d.keys()),
        t: /* @__PURE__ */ new Set()
      };
      mountedMap.set(atom2, mounted);
      (_a2 = storeHooks.m) == null ? void 0 : _a2.call(storeHooks, atom2);
      if (isActuallyWritableAtom(atom2)) {
        const processOnMount = () => {
          let isSync = true;
          const setAtom = (...args) => {
            try {
              return writeAtomState(atom2, ...args);
            } finally {
              if (!isSync) {
                recomputeInvalidatedAtoms();
                flushCallbacks();
              }
            }
          };
          try {
            const onUnmount = atomOnMount(atom2, setAtom);
            if (onUnmount) {
              mounted.u = () => {
                isSync = true;
                try {
                  onUnmount();
                } finally {
                  isSync = false;
                }
              };
            }
          } finally {
            isSync = false;
          }
        };
        mountCallbacks.add(processOnMount);
      }
    }
    return mounted;
  });
  const unmountAtom = buildingBlockFunctions[8] || ((atom2) => {
    var _a2;
    const atomState = ensureAtomState(atom2);
    let mounted = mountedMap.get(atom2);
    if (mounted && !mounted.l.size && !Array.from(mounted.t).some((a2) => {
      var _a22;
      return (_a22 = mountedMap.get(a2)) == null ? void 0 : _a22.d.has(atom2);
    })) {
      if (mounted.u) {
        unmountCallbacks.add(mounted.u);
      }
      mounted = void 0;
      mountedMap.delete(atom2);
      (_a2 = storeHooks.u) == null ? void 0 : _a2.call(storeHooks, atom2);
      for (const a2 of atomState.d.keys()) {
        const aMounted = unmountAtom(a2);
        aMounted == null ? void 0 : aMounted.t.delete(atom2);
      }
      return void 0;
    }
    return mounted;
  });
  const buildingBlocks = [
    // store state
    atomStateMap,
    mountedMap,
    invalidatedAtoms,
    changedAtoms,
    mountCallbacks,
    unmountCallbacks,
    storeHooks,
    // atom interceptors
    atomRead,
    atomWrite,
    atomOnInit,
    atomOnMount,
    // building-block functions
    ensureAtomState,
    flushCallbacks,
    recomputeInvalidatedAtoms,
    readAtomState,
    invalidateDependents,
    writeAtomState,
    mountDependencies,
    mountAtom,
    unmountAtom
  ];
  const store = {
    get: (atom2) => returnAtomValue(readAtomState(atom2)),
    set: (atom2, ...args) => {
      try {
        return writeAtomState(atom2, ...args);
      } finally {
        recomputeInvalidatedAtoms();
        flushCallbacks();
      }
    },
    sub: (atom2, listener) => {
      const mounted = mountAtom(atom2);
      const listeners = mounted.l;
      listeners.add(listener);
      flushCallbacks();
      return () => {
        listeners.delete(listener);
        unmountAtom(atom2);
        flushCallbacks();
      };
    }
  };
  Object.defineProperty(store, BUILDING_BLOCKS, { value: buildingBlocks });
  return store;
};
const INTERNAL_buildStoreRev1 = buildStore;
const INTERNAL_initializeStoreHooks = initializeStoreHooks;
const INTERNAL_registerAbortHandler = registerAbortHandler;
const __vite_import_meta_env__$1 = {};
let keyCount = 0;
function atom(read2, write2) {
  const key = `atom${++keyCount}`;
  const config2 = {
    toString() {
      return (__vite_import_meta_env__$1 ? "production" : void 0) !== "production" && this.debugLabel ? key + ":" + this.debugLabel : key;
    }
  };
  if (typeof read2 === "function") {
    config2.read = read2;
  } else {
    config2.init = read2;
    config2.read = defaultRead;
    config2.write = defaultWrite;
  }
  if (write2) {
    config2.write = write2;
  }
  return config2;
}
function defaultRead(get2) {
  return get2(this);
}
function defaultWrite(get2, set2, arg) {
  return set2(
    this,
    typeof arg === "function" ? arg(get2(this)) : arg
  );
}
const createDevStoreRev4 = () => {
  let inRestoreAtom = 0;
  const storeHooks = INTERNAL_initializeStoreHooks({});
  const atomStateMap = /* @__PURE__ */ new WeakMap();
  const mountedAtoms = /* @__PURE__ */ new WeakMap();
  const store = INTERNAL_buildStoreRev1(
    atomStateMap,
    mountedAtoms,
    void 0,
    void 0,
    void 0,
    void 0,
    storeHooks,
    void 0,
    (atom2, get2, set2, ...args) => {
      if (inRestoreAtom) {
        return set2(atom2, ...args);
      }
      return atom2.write(get2, set2, ...args);
    }
  );
  const debugMountedAtoms = /* @__PURE__ */ new Set();
  storeHooks.m.add(void 0, (atom2) => {
    debugMountedAtoms.add(atom2);
    const atomState = atomStateMap.get(atom2);
    atomState.m = mountedAtoms.get(atom2);
  });
  storeHooks.u.add(void 0, (atom2) => {
    debugMountedAtoms.delete(atom2);
    const atomState = atomStateMap.get(atom2);
    delete atomState.m;
  });
  const devStore = {
    // store dev methods (these are tentative and subject to change without notice)
    dev4_get_internal_weak_map: () => {
      console.log("Deprecated: Use devstore from the devtools library");
      return atomStateMap;
    },
    dev4_get_mounted_atoms: () => debugMountedAtoms,
    dev4_restore_atoms: (values2) => {
      const restoreAtom = {
        read: () => null,
        write: (_get, set2) => {
          ++inRestoreAtom;
          try {
            for (const [atom2, value] of values2) {
              if ("init" in atom2) {
                set2(atom2, value);
              }
            }
          } finally {
            --inRestoreAtom;
          }
        }
      };
      store.set(restoreAtom);
    }
  };
  return Object.assign(store, devStore);
};
function createStore() {
  if ((__vite_import_meta_env__$1 ? "production" : void 0) !== "production") {
    return createDevStoreRev4();
  }
  return INTERNAL_buildStoreRev1();
}
let defaultStore;
function getDefaultStore() {
  if (!defaultStore) {
    defaultStore = createStore();
    if ((__vite_import_meta_env__$1 ? "production" : void 0) !== "production") {
      globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);
      if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {
        console.warn(
          "Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"
        );
      }
    }
  }
  return defaultStore;
}
const __vite_import_meta_env__ = {};
const StoreContext = reactExports.createContext(
  void 0
);
function useStore(options) {
  const store = reactExports.useContext(StoreContext);
  return store || getDefaultStore();
}
function Provider({
  children,
  store
}) {
  const storeRef = reactExports.useRef(void 0);
  if (!store && !storeRef.current) {
    storeRef.current = createStore();
  }
  return reactExports.createElement(
    StoreContext.Provider,
    {
      value: store || storeRef.current
    },
    children
  );
}
const isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === "function";
const attachPromiseStatus = (promise) => {
  if (!promise.status) {
    promise.status = "pending";
    promise.then(
      (v2) => {
        promise.status = "fulfilled";
        promise.value = v2;
      },
      (e2) => {
        promise.status = "rejected";
        promise.reason = e2;
      }
    );
  }
};
const use = React.use || // A shim for older React versions
((promise) => {
  if (promise.status === "pending") {
    throw promise;
  } else if (promise.status === "fulfilled") {
    return promise.value;
  } else if (promise.status === "rejected") {
    throw promise.reason;
  } else {
    attachPromiseStatus(promise);
    throw promise;
  }
});
const continuablePromiseMap = /* @__PURE__ */ new WeakMap();
const createContinuablePromise = (promise, getValue2) => {
  let continuablePromise = continuablePromiseMap.get(promise);
  if (!continuablePromise) {
    continuablePromise = new Promise((resolve, reject) => {
      let curr = promise;
      const onFulfilled = (me) => (v2) => {
        if (curr === me) {
          resolve(v2);
        }
      };
      const onRejected = (me) => (e2) => {
        if (curr === me) {
          reject(e2);
        }
      };
      const onAbort = () => {
        try {
          const nextValue = getValue2();
          if (isPromiseLike(nextValue)) {
            continuablePromiseMap.set(nextValue, continuablePromise);
            curr = nextValue;
            nextValue.then(onFulfilled(nextValue), onRejected(nextValue));
            INTERNAL_registerAbortHandler(nextValue, onAbort);
          } else {
            resolve(nextValue);
          }
        } catch (e2) {
          reject(e2);
        }
      };
      promise.then(onFulfilled(promise), onRejected(promise));
      INTERNAL_registerAbortHandler(promise, onAbort);
    });
    continuablePromiseMap.set(promise, continuablePromise);
  }
  return continuablePromise;
};
function useAtomValue(atom2, options) {
  const { delay, unstable_promiseStatus: promiseStatus = !React.use } = {};
  const store = useStore();
  const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = reactExports.useReducer(
    (prev2) => {
      const nextValue = store.get(atom2);
      if (Object.is(prev2[0], nextValue) && prev2[1] === store && prev2[2] === atom2) {
        return prev2;
      }
      return [nextValue, store, atom2];
    },
    void 0,
    () => [store.get(atom2), store, atom2]
  );
  let value = valueFromReducer;
  if (storeFromReducer !== store || atomFromReducer !== atom2) {
    rerender();
    value = store.get(atom2);
  }
  reactExports.useEffect(() => {
    const unsub = store.sub(atom2, () => {
      if (promiseStatus) {
        try {
          const value2 = store.get(atom2);
          if (isPromiseLike(value2)) {
            attachPromiseStatus(
              createContinuablePromise(value2, () => store.get(atom2))
            );
          }
        } catch (e2) {
        }
      }
      if (typeof delay === "number") {
        setTimeout(rerender, delay);
        return;
      }
      rerender();
    });
    rerender();
    return unsub;
  }, [store, atom2, delay, promiseStatus]);
  reactExports.useDebugValue(value);
  if (isPromiseLike(value)) {
    const promise = createContinuablePromise(value, () => store.get(atom2));
    if (promiseStatus) {
      attachPromiseStatus(promise);
    }
    return use(promise);
  }
  return value;
}
function useSetAtom(atom2, options) {
  const store = useStore();
  const setAtom = reactExports.useCallback(
    (...args) => {
      if ((__vite_import_meta_env__ ? "production" : void 0) !== "production" && !("write" in atom2)) {
        throw new Error("not writable atom");
      }
      return store.set(atom2, ...args);
    },
    [store, atom2]
  );
  return setAtom;
}
function useAtom(atom2, options) {
  return [
    useAtomValue(atom2),
    // We do wrong type assertion here, which results in throwing an error.
    useSetAtom(atom2)
  ];
}
var ViewClass = /* @__PURE__ */ ((ViewClass2) => {
  ViewClass2["HTMLView"] = "{55D200F8-A5EE-4BB8-B9AD-762B6FB815D1}";
  ViewClass2["DocSite"] = "{03338F11-FC1E-11D4-A605-0000E8D9CBDB}";
  ViewClass2["DocBook"] = "{48C155C0-1336-11D6-9CF2-DB1D5BC3046D}";
  ViewClass2["DocReps"] = "{A358FF4E-4CE5-4CDF-B32D-38CC28448C61}";
  ViewClass2["RepSite"] = "{B357E5B2-137F-4253-BBEF-E5CFD697E362}";
  ViewClass2["StgBook"] = "{E39CC90D-5F17-4FDF-883E-E75DEA69BE60}";
  ViewClass2["OrgBook"] = "{2AC0E428-23CD-49F6-AF96-3DB9D6B7AD0A}";
  ViewClass2["MultiTab"] = "{353FD9D7-651E-4840-9319-A8578806C496}";
  ViewClass2["TableRep"] = "{295EA015-4573-4AD9-922A-A14CE0FD9C78}";
  ViewClass2["BookObj"] = "{7C0F4F9E-42BF-409A-A8DB-C92A9AA93C1B}";
  ViewClass2["ParamDlg"] = "{D8402CE6-6582-4F0D-A82D-C2D9CA73F79E}";
  ViewClass2["Address"] = "{AE5A67E0-EBEB-11D5-900D-000021E6A31F}";
  ViewClass2["TreeView"] = "{5D1A1010-A394-43EC-A84B-AB401C1C2640}";
  ViewClass2["RepTabs"] = "{18CCCA1A-CD3D-41B3-8C20-9F80AA3ED8CE}";
  ViewClass2["CellObj"] = "{408E20A3-4BE3-4DCD-98BD-2613A8968783}";
  ViewClass2["Preview"] = "{E8377696-9AE6-4A44-932B-FF229BDACFC6}";
  ViewClass2["Account"] = "{A958A9C0-92D0-11D4-91A4-000021670179}";
  ViewClass2["Persons"] = "{D9958041-524D-11D4-91A4-000021670179}";
  ViewClass2["Salary"] = "{2700EC50-32E1-11D4-A4A3-0000E8D9CBDB}";
  ViewClass2["Staff"] = "{8A973980-247F-11D4-B977-9F6E89353703}";
  ViewClass2["Transact"] = "{ECEA4BF8-D2F2-4642-BB8F-FED0351B2339}";
  ViewClass2["Excells"] = "{9096D2C6-8BD0-40E0-964C-7000D309474B}";
  ViewClass2["WorkTimes"] = "{D500DB82-9585-487D-98DB-11B77EB51D42}";
  ViewClass2["Calendar"] = "{B52AB815-36CC-4921-A1C0-6C3649D9D0E9}";
  ViewClass2["DepTree"] = "{1C947E18-2CFA-4394-9BCF-F393EBE3CE98}";
  ViewClass2["Amounts"] = "{7313DD64-4C2A-4499-BB41-31E1E594AA52}";
  ViewClass2["Leaves"] = "{EC0477CD-4CB3-40A0-9771-A444F94E0984}";
  ViewClass2["Ranges"] = "{DE3EDCEB-F7A0-4B02-92B6-03A070B7BEA8}";
  ViewClass2["PayTypes"] = "{B9D28843-34BE-11D4-B977-C74803C52043}";
  ViewClass2["Tariff"] = "{B71DDB5C-0391-4EF0-8E90-44D37CF7EE54}";
  ViewClass2["WModes"] = "{B6F6D3C0-6159-11D4-91A4-000021670179}";
  ViewClass2["PersonAddr"] = "{C83806B3-80D6-4983-A53D-1FA792B60130}";
  ViewClass2["Grades"] = "{C3A20435-640D-4653-A821-C6C6E76A1B63}";
  ViewClass2["CalcRange"] = "{3748C5C5-C0E9-4D45-8E05-17A046FD5C56}";
  ViewClass2["Children"] = "{8790A231-377B-4927-B744-9443F386989C}";
  ViewClass2["LongTime"] = "{C525B0F8-232B-4136-A5F2-AB22C77F55F0}";
  ViewClass2["ChildSel"] = "{D828B658-CBC4-46E4-A512-1E27F7C9BCBA}";
  ViewClass2["TimeCfg"] = "{231F49EB-85F0-4226-9AC6-E3BD853CD7DA}";
  ViewClass2["SelApp"] = "{7D4264B1-7DA7-4009-A7BF-830D17590A4F}";
  ViewClass2["JobHist"] = "{D370E2F6-166E-4519-8A55-7A582F73F533}";
  ViewClass2["WorkRanges"] = "{2A10A1C9-DAA5-42ED-A452-AB062FA33064}";
  ViewClass2["PersonSearch"] = "{64DE7386-1BAC-416A-9B93-2C94368F179C}";
  ViewClass2["CreateObject"] = "{5F859354-243D-449C-A4BC-B89EA9A5D1B2}";
  ViewClass2["BaseSum"] = "{90C47D6E-A8F0-4AE4-8EAB-BE17E434855E}";
  ViewClass2["ObjLinksDlg"] = "{AC4B1ADC-D6F2-4F1A-B385-CA7A22D6FC9C}";
  ViewClass2["SalaryRanges"] = "{579A7731-6949-4A22-B09A-E3C601717ECB}";
  ViewClass2["TimeTable"] = "{59E41F61-ABF6-11D4-A558-0000E8D9CBDB}";
  ViewClass2["MonthRange"] = "{5FEE058E-8083-453F-B31E-FB8DD7ED5174}";
  ViewClass2["DateRange"] = "{3D16C8B0-9C78-474C-9D3D-10112A3F96A6}";
  ViewClass2["DocObjEdit"] = "{C5E1165E-9829-4789-BD08-18E875D33FB3}";
  ViewClass2["UserReps"] = "{A94BF9FA-2115-4803-B33F-FE36D1525AE4}";
  ViewClass2["PersonBook"] = "{7FAC2B20-109D-4406-A757-61674277B71F}";
  ViewClass2["Chart"] = "{476E908B-D276-488D-82CD-E5C80D676CCF}";
  ViewClass2["Cubes"] = "{19C8F31A-7D2C-4804-B5BE-75A242B670D3}";
  ViewClass2["DataUpdates"] = "{2CF2C8EE-2890-4AF1-A9B0-34E1521818B4}";
  ViewClass2["CallCenter"] = "{9378D70A-605A-4CE6-A86D-BA4E0268373D}";
  ViewClass2["PhoneBook"] = "{37FC90E4-43AE-4C9B-808C-20F9DCB69EDE}";
  ViewClass2["EMailBook"] = "{800FDE74-F636-4757-8F18-818105047B54}";
  ViewClass2["SelectLinks"] = "{3BDD2452-3860-4997-ACC7-495FB1BFC7FD}";
  ViewClass2["FastRep"] = "{D0DFAB41-C45B-4934-B924-12A9BFC41171}";
  ViewClass2["NotePad"] = "{4A1F9326-CA89-4D8C-AD64-FC80C3741027}";
  ViewClass2["WareBook"] = "{03A94B88-CBC2-40C8-86BB-BA0184EF57E0}";
  ViewClass2["Xromium"] = "{35222CB2-9DD5-4D9D-80AF-DF93604432C9}";
  ViewClass2["HTMLEdit"] = "{AC183F1C-2254-4B7C-AEBE-250EF345B74D}";
  ViewClass2["PayTypeSet"] = "{2C80242F-2190-4DFC-BCB4-675065E27379}";
  ViewClass2["Designer"] = "{2B55A78C-85D0-4525-A190-1CA16FD86E78}";
  ViewClass2["Forms"] = "{C0CED968-8834-405D-8801-A3838BF536F3}";
  ViewClass2["Remains"] = "{378B8494-F562-43EF-BBA5-06D5FE0E2A71}";
  ViewClass2["LazyStat"] = "{D22DFDA0-DB27-4FB4-865F-B478DB85F2A4}";
  ViewClass2["PDFView"] = "{A5CDFCEB-A95A-4ABC-839E-77D1D1F5CD86}";
  ViewClass2["LazyAddress"] = "{D9DE8B26-C68B-4318-96EA-FD75497A5C91}";
  ViewClass2["Departs"] = "{C79B4449-B9CE-41C2-A28F-FB40EBA7E9DA}";
  ViewClass2["Audit"] = "{B467C12A-3650-4161-AE58-CC54161596CA}";
  ViewClass2["RegEdit"] = "{BF011912-27D9-11D4-A493-0000E8D9CBDB}";
  ViewClass2["DBView"] = "{A759DBA0-9FA2-11D5-B97A-C2A4095B2C3B}";
  ViewClass2["AccCors"] = "{010C6A4E-4954-4380-9E9F-40712B45D0DE}";
  ViewClass2["ClsBook"] = "{37912C20-59B2-415F-8F59-DE7F85AABB00}";
  ViewClass2["Support"] = "{8638FB9A-52C0-46C4-8F49-5BD30C27C575}";
  ViewClass2["Recycle"] = "{4124FBDE-F767-406B-B976-E703E0DE410C}";
  ViewClass2["DocObjs"] = "{B6F6A5FB-DF1C-4A11-8262-8DC05C20A166}";
  ViewClass2["WPAdmin"] = "{D8C2A6A0-8FA8-11D4-A4C6-008048DEC2B9}";
  ViewClass2["Params"] = "{003ADE80-8149-4CA2-B028-35ADF600D183}";
  ViewClass2["DocMan"] = "{28310E52-82FA-11D4-A51F-0000E8D9CBDB}";
  ViewClass2["RepMan"] = "{DD36FCC6-7F05-4792-84CE-D53738D35A9B}";
  ViewClass2["Analytics"] = "{90BC38C5-FED4-4100-BB3C-66B518FB7AA6}";
  ViewClass2["ABLEdit"] = "{8841C134-FBAA-4C91-A960-C04247AB5F5F}";
  ViewClass2["LinkCfgDlg"] = "{F86045F1-F4E6-49F7-B199-DAB7EF3B6880}";
  ViewClass2["UserRepCfg"] = "{E8C5E63F-6DCB-4EAA-AB27-F6DAE42CF338}";
  ViewClass2["GroupObj"] = "{9C9E79F7-A955-4330-B615-66497724D424}";
  ViewClass2["Absences"] = "{14D42154-88F2-45F0-A8FF-DC191EEEC659}";
  ViewClass2["BookMan"] = "{36C892D3-1F05-4516-917A-56770D35871A}";
  ViewClass2["Merging"] = "{CABC4B10-23A7-412C-A588-9F640422558E}";
  ViewClass2["Updates"] = "{BDA4ADC2-C4DB-4496-BEA6-6803BB79B709}";
  ViewClass2["Skinner"] = "{4E039850-ED97-44F8-B461-6EE5F026C8F5}";
  ViewClass2["ABLText"] = "{B0EC7D97-D997-4FBA-A80C-4689C487F977}";
  return ViewClass2;
})(ViewClass || {});
var ObjType = /* @__PURE__ */ ((ObjType2) => {
  ObjType2[ObjType2["Department"] = 2790] = "Department";
  ObjType2[ObjType2["RendLeave"] = 2640] = "RendLeave";
  ObjType2[ObjType2["HourTime"] = 2644] = "HourTime";
  ObjType2[ObjType2["RendMode"] = 2646] = "RendMode";
  ObjType2[ObjType2["Document"] = 2200] = "Document";
  ObjType2[ObjType2["RendValue"] = 2586] = "RendValue";
  ObjType2[ObjType2["OrgTypeCls"] = 2773] = "OrgTypeCls";
  ObjType2[ObjType2["Organization"] = 2310] = "Organization";
  ObjType2[ObjType2["Bank"] = 2330] = "Bank";
  ObjType2[ObjType2["BankAccount"] = 2320] = "BankAccount";
  ObjType2[ObjType2["ChildOrg"] = 2778] = "ChildOrg";
  ObjType2[ObjType2["WorkMode"] = 2004] = "WorkMode";
  ObjType2[ObjType2["Person"] = 2040] = "Person";
  ObjType2[ObjType2["PayType"] = 2380] = "PayType";
  ObjType2[ObjType2["Rendering"] = 2010] = "Rendering";
  ObjType2[ObjType2["BasicAmounts"] = 2611] = "BasicAmounts";
  ObjType2[ObjType2["Appointment"] = 2710] = "Appointment";
  ObjType2[ObjType2["RendHistory"] = 2035] = "RendHistory";
  ObjType2[ObjType2["HourType"] = 2721] = "HourType";
  ObjType2[ObjType2["OpenDirDialog"] = 2797] = "OpenDirDialog";
  ObjType2[ObjType2["TimeTable"] = 24043] = "TimeTable";
  ObjType2[ObjType2["DocCfgType"] = 2788] = "DocCfgType";
  ObjType2[ObjType2["DocField"] = 2370] = "DocField";
  ObjType2[ObjType2["DocColumn"] = 2521] = "DocColumn";
  ObjType2[ObjType2["DocForm"] = 2807] = "DocForm";
  ObjType2[ObjType2["DocButton"] = 2808] = "DocButton";
  ObjType2[ObjType2["Program"] = 2001] = "Program";
  ObjType2[ObjType2["Grade"] = 2776] = "Grade";
  ObjType2[ObjType2["BaseValue"] = 2782] = "BaseValue";
  ObjType2[ObjType2["ParamSet"] = 2789] = "ParamSet";
  ObjType2[ObjType2["ProjectSection"] = 24045] = "ProjectSection";
  ObjType2[ObjType2["DocStatus"] = 24051] = "DocStatus";
  ObjType2[ObjType2["DocSection"] = 24052] = "DocSection";
  ObjType2[ObjType2["ABLClass"] = 2063] = "ABLClass";
  ObjType2[ObjType2["WorkPlace"] = 24047] = "WorkPlace";
  ObjType2[ObjType2["Module"] = 1390] = "Module";
  ObjType2[ObjType2["Section"] = 1391] = "Section";
  ObjType2[ObjType2["ProjectModule"] = 24053] = "ProjectModule";
  ObjType2[ObjType2["PrjUpdater"] = 2071] = "PrjUpdater";
  ObjType2[ObjType2["RendBase"] = 2780] = "RendBase";
  ObjType2[ObjType2["PhoneNumber"] = 2742] = "PhoneNumber";
  ObjType2[ObjType2["EMailAddress"] = 2744] = "EMailAddress";
  ObjType2[ObjType2["CallInfo"] = 2745] = "CallInfo";
  ObjType2[ObjType2["HandBook"] = 2210] = "HandBook";
  ObjType2[ObjType2["BaseStgResource"] = 11e3] = "BaseStgResource";
  ObjType2[ObjType2["Absence"] = 2720] = "Absence";
  ObjType2[ObjType2["UserAccount"] = 2420] = "UserAccount";
  ObjType2[ObjType2["DataMemo"] = 2221] = "DataMemo";
  ObjType2[ObjType2["Picture"] = 2101] = "Picture";
  ObjType2[ObjType2["Sequence"] = 2935] = "Sequence";
  ObjType2[ObjType2["DayHourCfgCode"] = 2722] = "DayHourCfgCode";
  return ObjType2;
})(ObjType || {});
const obj = {
  Street: 5e3,
  City: 5001,
  Country: 5005,
  Region: 5006,
  District: 5007,
  Community: 5010,
  PlanStruct: 5009,
  Settlement: 5014
};
var KLADRLevel = ((KLADRLevel2) => {
  KLADRLevel2[KLADRLevel2["Country"] = obj.Country] = "Country";
  KLADRLevel2[KLADRLevel2["Region"] = obj.Region] = "Region";
  KLADRLevel2[KLADRLevel2["District"] = obj.District] = "District";
  KLADRLevel2[KLADRLevel2["City"] = obj.City] = "City";
  KLADRLevel2[KLADRLevel2["Village"] = obj.Community] = "Village";
  KLADRLevel2[KLADRLevel2["Street"] = obj.Street] = "Street";
  KLADRLevel2[KLADRLevel2["PreviousLevel"] = -1] = "PreviousLevel";
  KLADRLevel2[KLADRLevel2["House"] = 1] = "House";
  KLADRLevel2[KLADRLevel2["PlanStruct"] = obj.PlanStruct] = "PlanStruct";
  KLADRLevel2[KLADRLevel2["Settlement"] = obj.Settlement] = "Settlement";
  return KLADRLevel2;
})(KLADRLevel || {});
var DocColumnOption = /* @__PURE__ */ ((DocColumnOption2) => {
  DocColumnOption2[DocColumnOption2["Markable"] = 1] = "Markable";
  DocColumnOption2[DocColumnOption2["Sortable"] = 2] = "Sortable";
  DocColumnOption2[DocColumnOption2["ReadOnly"] = 4] = "ReadOnly";
  DocColumnOption2[DocColumnOption2["NotEditing"] = 8] = "NotEditing";
  DocColumnOption2[DocColumnOption2["VerticalText"] = 16] = "VerticalText";
  DocColumnOption2[DocColumnOption2["ShortObjName"] = 32] = "ShortObjName";
  DocColumnOption2[DocColumnOption2["Fixed"] = 64] = "Fixed";
  DocColumnOption2[DocColumnOption2["RedNegative"] = 128] = "RedNegative";
  DocColumnOption2[DocColumnOption2["HiddenInGrid"] = 256] = "HiddenInGrid";
  DocColumnOption2[DocColumnOption2["HiddenInInsp"] = 512] = "HiddenInInsp";
  DocColumnOption2[DocColumnOption2["Filterable"] = 1024] = "Filterable";
  DocColumnOption2[DocColumnOption2["Reference"] = 2048] = "Reference";
  DocColumnOption2[DocColumnOption2["InParams"] = 4096] = "InParams";
  DocColumnOption2[DocColumnOption2["CanGroup"] = 8192] = "CanGroup";
  DocColumnOption2[DocColumnOption2["Invisible"] = 16384] = "Invisible";
  DocColumnOption2[DocColumnOption2["Hidden"] = 32768] = "Hidden";
  return DocColumnOption2;
})(DocColumnOption || {});
var DocFieldType = /* @__PURE__ */ ((DocFieldType2) => {
  DocFieldType2[DocFieldType2["UnitMoney"] = 0] = "UnitMoney";
  DocFieldType2[DocFieldType2["String"] = 1] = "String";
  DocFieldType2[DocFieldType2["Integer"] = 2] = "Integer";
  DocFieldType2[DocFieldType2["Float"] = 3] = "Float";
  DocFieldType2[DocFieldType2["Boolean"] = 4] = "Boolean";
  DocFieldType2[DocFieldType2["HandBook"] = 5] = "HandBook";
  DocFieldType2[DocFieldType2["IntDate"] = 6] = "IntDate";
  DocFieldType2[DocFieldType2["PickList"] = 7] = "PickList";
  DocFieldType2[DocFieldType2["MultiList"] = 8] = "MultiList";
  DocFieldType2[DocFieldType2["Note"] = 9] = "Note";
  DocFieldType2[DocFieldType2["RefString"] = 10] = "RefString";
  DocFieldType2[DocFieldType2["UnitQuantity"] = 11] = "UnitQuantity";
  DocFieldType2[DocFieldType2["RefGUID"] = 12] = "RefGUID";
  DocFieldType2[DocFieldType2["DateTime"] = 13] = "DateTime";
  DocFieldType2[DocFieldType2["Picture"] = 14] = "Picture";
  return DocFieldType2;
})(DocFieldType || {});
var NormMode = /* @__PURE__ */ ((NormMode2) => {
  NormMode2[NormMode2["Days"] = 1] = "Days";
  NormMode2[NormMode2["Hours"] = 2] = "Hours";
  NormMode2[NormMode2["Units"] = 4] = "Units";
  NormMode2[NormMode2["MappedDays"] = 8] = "MappedDays";
  return NormMode2;
})(NormMode || {});
var PayTypeOption = /* @__PURE__ */ ((PayTypeOption2) => {
  PayTypeOption2[PayTypeOption2["AutoRecalc"] = 1] = "AutoRecalc";
  PayTypeOption2[PayTypeOption2["Nonwritable"] = 2] = "Nonwritable";
  PayTypeOption2[PayTypeOption2["EndOfBranch"] = 4] = "EndOfBranch";
  PayTypeOption2[PayTypeOption2["Transaction"] = 8] = "Transaction";
  PayTypeOption2[PayTypeOption2["Constant"] = 16] = "Constant";
  PayTypeOption2[PayTypeOption2["Unused"] = 32] = "Unused";
  PayTypeOption2[PayTypeOption2["Calculated"] = 64] = "Calculated";
  PayTypeOption2[PayTypeOption2["UserProcessing"] = 128] = "UserProcessing";
  return PayTypeOption2;
})(PayTypeOption || {});
const defaultConfig = {
  smeta: {
    openHelpContextInNewTab: true,
    signOptions: {
      signButtons: {
        signCryptoButton: true,
        lkButton: true,
        helpKristaButton: true
      },
      headerSettings: {
        image: false,
        imageWidth: "",
        title: "Web-Смета (Версия без конфиг файла)"
      }
    },
    pluginLinks: {
      chrome: {
        store: "https://chromewebstore.google.com/detail/%D0%BA%D1%80%D0%B8%D0%BF%D1%82%D0%BE-%D0%BF%D0%BB%D0%B0%D0%B3%D0%B8%D0%BD-%D0%B0%D1%81-%D1%81%D0%BC%D0%B5%D1%82%D0%B0/lbabfglcibjnhihfgjkdefgjmlmieeal?hl=ru",
        local: "http://stimate.krista.ru/webkcrypt/chrome/webkcrypt.crx"
      },
      firefox: {
        local: "http://stimate.krista.ru/webkcrypt/mozilla/webkcrypt.xpi"
      },
      workspace: {
        windows: "http://stimate.krista.ru/webkcrypt/WebKCryptSetup.exe",
        linux: "http://stimate.krista.ru/webkcrypt/setup-webkcrypt.tar.xz"
      },
      howToLink: ""
    },
    stimateVersion: "81.01.01.48/hotfix4"
  },
  lk: {
    checkNotifyme: false,
    baseCaptcha: "0",
    basePassRecovery: "0",
    baseUmi: "0",
    baseLinkText: "Забыли пароль? Пройдите повторную регистрацию",
    hideEsiaButton: "0",
    showMobileQR: "1",
    doEsia: {
      auth: "http://localhost:1317/esia",
      logout: "http://localhost:1317/esia?what=esia_logout",
      org: "http://localhost:1317/esia?what=esia_org"
    },
    url: {
      captcha: "http://localhost:1317/web~captcha",
      signIn: "http://localhost:1317/web~account?single=1",
      signUP: "http://localhost:1317/web~registration/create",
      org: "http://localhost:1317/web~registration/values?type=inn",
      fio: "http://localhost:1317/web~registration/values?type=snils",
      changePassword: "http://localhost:1317/web~ChangePasswordLK",
      restorePassword: "http://localhost:1317/web~RestorePasswordLK"
    }
  }
};
var AddBoxOutlined = {};
var createSvgIcon$1 = {};
function useDefaultProps(params2) {
  return useDefaultProps$1(params2);
}
function getSvgIconUtilityClass(slot) {
  return generateUtilityClass("MuiSvgIcon", slot);
}
generateUtilityClasses("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
const _excluded$1B = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"];
const useUtilityClasses$1n = (ownerState) => {
  const {
    color: color2,
    fontSize: fontSize2,
    classes
  } = ownerState;
  const slots = {
    root: ["root", color2 !== "inherit" && `color${capitalize$2(color2)}`, `fontSize${capitalize$2(fontSize2)}`]
  };
  return composeClasses(slots, getSvgIconUtilityClass, classes);
};
const SvgIconRoot = styled("svg", {
  name: "MuiSvgIcon",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.color !== "inherit" && styles2[`color${capitalize$2(ownerState.color)}`], styles2[`fontSize${capitalize$2(ownerState.fontSize)}`]];
  }
})(({
  theme,
  ownerState
}) => {
  var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _palette$ownerState$c, _palette, _palette2, _palette3;
  return {
    userSelect: "none",
    width: "1em",
    height: "1em",
    display: "inline-block",
    // the <svg> will define the property that has `currentColor`
    // for example heroicons uses fill="none" and stroke="currentColor"
    fill: ownerState.hasSvgAsChild ? void 0 : "currentColor",
    flexShrink: 0,
    transition: (_theme$transitions = theme.transitions) == null || (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, "fill", {
      duration: (_theme$transitions2 = theme.transitions) == null || (_theme$transitions2 = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2.shorter
    }),
    fontSize: {
      inherit: "inherit",
      small: ((_theme$typography = theme.typography) == null || (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || "1.25rem",
      medium: ((_theme$typography2 = theme.typography) == null || (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || "1.5rem",
      large: ((_theme$typography3 = theme.typography) == null || (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || "2.1875rem"
    }[ownerState.fontSize],
    // TODO v5 deprecate, v6 remove for sx
    color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null || (_palette = _palette[ownerState.color]) == null ? void 0 : _palette.main) != null ? _palette$ownerState$c : {
      action: (_palette2 = (theme.vars || theme).palette) == null || (_palette2 = _palette2.action) == null ? void 0 : _palette2.active,
      disabled: (_palette3 = (theme.vars || theme).palette) == null || (_palette3 = _palette3.action) == null ? void 0 : _palette3.disabled,
      inherit: void 0
    }[ownerState.color]
  };
});
const SvgIcon = /* @__PURE__ */ reactExports.forwardRef(function SvgIcon2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiSvgIcon"
  });
  const {
    children,
    className,
    color: color2 = "inherit",
    component = "svg",
    fontSize: fontSize2 = "medium",
    htmlColor,
    inheritViewBox = false,
    titleAccess,
    viewBox = "0 0 24 24"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1B);
  const hasSvgAsChild = /* @__PURE__ */ reactExports.isValidElement(children) && children.type === "svg";
  const ownerState = _extends$1({}, props, {
    color: color2,
    component,
    fontSize: fontSize2,
    instanceFontSize: inProps.fontSize,
    inheritViewBox,
    viewBox,
    hasSvgAsChild
  });
  const more = {};
  if (!inheritViewBox) {
    more.viewBox = viewBox;
  }
  const classes = useUtilityClasses$1n(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(SvgIconRoot, _extends$1({
    as: component,
    className: clsx$3(classes.root, className),
    focusable: "false",
    color: htmlColor,
    "aria-hidden": titleAccess ? void 0 : true,
    role: titleAccess ? "img" : void 0,
    ref: ref2
  }, more, other, hasSvgAsChild && children.props, {
    ownerState,
    children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /* @__PURE__ */ jsxRuntimeExports.jsx("title", {
      children: titleAccess
    }) : null]
  }));
});
SvgIcon.muiName = "SvgIcon";
function createSvgIcon(path, displayName) {
  function Component(props, ref2) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(SvgIcon, _extends$1({
      "data-testid": `${displayName}Icon`,
      ref: ref2
    }, props, {
      children: path
    }));
  }
  Component.muiName = SvgIcon.muiName;
  return /* @__PURE__ */ reactExports.memo(/* @__PURE__ */ reactExports.forwardRef(Component));
}
const unstable_ClassNameGenerator = {
  configure: (generator) => {
    ClassNameGenerator.configure(generator);
  }
};
const utils$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  capitalize: capitalize$2,
  createChainedFunction,
  createSvgIcon,
  debounce: debounce$2,
  deprecatedPropType,
  isMuiElement,
  ownerDocument,
  ownerWindow,
  requirePropFactory,
  setRef,
  unstable_ClassNameGenerator,
  unstable_useEnhancedEffect: useEnhancedEffect,
  unstable_useId: useId$1,
  unsupportedProp,
  useControlled,
  useEventCallback,
  useForkRef,
  useIsFocusVisible
}, Symbol.toStringTag, { value: "Module" }));
const require$$0$2 = /* @__PURE__ */ getAugmentedNamespace(utils$3);
var hasRequiredCreateSvgIcon;
function requireCreateSvgIcon() {
  if (hasRequiredCreateSvgIcon) return createSvgIcon$1;
  hasRequiredCreateSvgIcon = 1;
  (function(exports2) {
    "use client";
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    Object.defineProperty(exports2, "default", {
      enumerable: true,
      get: function() {
        return _utils.createSvgIcon;
      }
    });
    var _utils = require$$0$2;
  })(createSvgIcon$1);
  return createSvgIcon$1;
}
var hasRequiredAddBoxOutlined;
function requireAddBoxOutlined() {
  if (hasRequiredAddBoxOutlined) return AddBoxOutlined;
  hasRequiredAddBoxOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(AddBoxOutlined, "__esModule", {
    value: true
  });
  AddBoxOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  AddBoxOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zm-8-2h2v-4h4v-2h-4V7h-2v4H7v2h4z"
  }), "AddBoxOutlined");
  return AddBoxOutlined;
}
var AddBoxOutlinedExports = /* @__PURE__ */ requireAddBoxOutlined();
const AddBoxOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(AddBoxOutlinedExports);
var AddToPhotosOutlined = {};
var hasRequiredAddToPhotosOutlined;
function requireAddToPhotosOutlined() {
  if (hasRequiredAddToPhotosOutlined) return AddToPhotosOutlined;
  hasRequiredAddToPhotosOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(AddToPhotosOutlined, "__esModule", {
    value: true
  });
  AddToPhotosOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  AddToPhotosOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M4 6H2v14c0 1.1.9 2 2 2h14v-2H4zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m0 14H8V4h12zm-7-1h2v-4h4V9h-4V5h-2v4H9v2h4z"
  }), "AddToPhotosOutlined");
  return AddToPhotosOutlined;
}
var AddToPhotosOutlinedExports = /* @__PURE__ */ requireAddToPhotosOutlined();
const AddToPhotosOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(AddToPhotosOutlinedExports);
var ContentCopy = {};
var hasRequiredContentCopy;
function requireContentCopy() {
  if (hasRequiredContentCopy) return ContentCopy;
  hasRequiredContentCopy = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ContentCopy, "__esModule", {
    value: true
  });
  ContentCopy.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ContentCopy.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"
  }), "ContentCopy");
  return ContentCopy;
}
var ContentCopyExports = /* @__PURE__ */ requireContentCopy();
const ContentCopyIcon = /* @__PURE__ */ getDefaultExportFromCjs(ContentCopyExports);
var ContentCut = {};
var hasRequiredContentCut;
function requireContentCut() {
  if (hasRequiredContentCut) return ContentCut;
  hasRequiredContentCut = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ContentCut, "__esModule", {
    value: true
  });
  ContentCut.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ContentCut.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2m6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5M19 3l-6 6 2 2 7-7V3z"
  }), "ContentCut");
  return ContentCut;
}
var ContentCutExports = /* @__PURE__ */ requireContentCut();
const ContentCutIcon = /* @__PURE__ */ getDefaultExportFromCjs(ContentCutExports);
var ContentPaste = {};
var hasRequiredContentPaste;
function requireContentPaste() {
  if (hasRequiredContentPaste) return ContentPaste;
  hasRequiredContentPaste = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ContentPaste, "__esModule", {
    value: true
  });
  ContentPaste.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ContentPaste.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1m7 18H5V4h2v3h10V4h2z"
  }), "ContentPaste");
  return ContentPaste;
}
var ContentPasteExports = /* @__PURE__ */ requireContentPaste();
const ContentPasteIcon = /* @__PURE__ */ getDefaultExportFromCjs(ContentPasteExports);
var Delete = {};
var hasRequiredDelete;
function requireDelete() {
  if (hasRequiredDelete) return Delete;
  hasRequiredDelete = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Delete, "__esModule", {
    value: true
  });
  Delete.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Delete.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6zM19 4h-3.5l-1-1h-5l-1 1H5v2h14z"
  }), "Delete");
  return Delete;
}
var DeleteExports = /* @__PURE__ */ requireDelete();
const DeleteIcon = /* @__PURE__ */ getDefaultExportFromCjs(DeleteExports);
var PostAdd = {};
var hasRequiredPostAdd;
function requirePostAdd() {
  if (hasRequiredPostAdd) return PostAdd;
  hasRequiredPostAdd = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(PostAdd, "__esModule", {
    value: true
  });
  PostAdd.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  PostAdd.default = (0, _createSvgIcon.default)([/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M17 19.22H5V7h7V5H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-7h-2z"
  }, "0"), /* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 2h-2v3h-3c.01.01 0 2 0 2h3v2.99c.01.01 2 0 2 0V7h3V5h-3zM7 9h8v2H7zm0 3v2h8v-2h-3zm0 3h8v2H7z"
  }, "1")], "PostAdd");
  return PostAdd;
}
var PostAddExports = /* @__PURE__ */ requirePostAdd();
const PostAddIcon = /* @__PURE__ */ getDefaultExportFromCjs(PostAddExports);
var Sort = {};
var hasRequiredSort;
function requireSort() {
  if (hasRequiredSort) return Sort;
  hasRequiredSort = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Sort, "__esModule", {
    value: true
  });
  Sort.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Sort.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M3 18h6v-2H3zM3 6v2h18V6zm0 7h12v-2H3z"
  }), "Sort");
  return Sort;
}
var SortExports = /* @__PURE__ */ requireSort();
const SortIcon = /* @__PURE__ */ getDefaultExportFromCjs(SortExports);
function _setPrototypeOf(t, e2) {
  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t2, e3) {
    return t2.__proto__ = e3, t2;
  }, _setPrototypeOf(t, e2);
}
function _inheritsLoose(t, o) {
  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
}
function hasClass(element, className) {
  if (element.classList) return !!className && element.classList.contains(className);
  return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
}
function addClass(element, className) {
  if (element.classList) element.classList.add(className);
  else if (!hasClass(element, className)) if (typeof element.className === "string") element.className = element.className + " " + className;
  else element.setAttribute("class", (element.className && element.className.baseVal || "") + " " + className);
}
function replaceClassName(origClass, classToRemove) {
  return origClass.replace(new RegExp("(^|\\s)" + classToRemove + "(?:\\s|$)", "g"), "$1").replace(/\s+/g, " ").replace(/^\s*|\s*$/g, "");
}
function removeClass$1(element, className) {
  if (element.classList) {
    element.classList.remove(className);
  } else if (typeof element.className === "string") {
    element.className = replaceClassName(element.className, className);
  } else {
    element.setAttribute("class", replaceClassName(element.className && element.className.baseVal || "", className));
  }
}
const config = {
  disabled: false
};
const TransitionGroupContext = React.createContext(null);
var forceReflow = function forceReflow2(node2) {
  return node2.scrollTop;
};
var UNMOUNTED = "unmounted";
var EXITED = "exited";
var ENTERING = "entering";
var ENTERED = "entered";
var EXITING = "exiting";
var Transition$4 = /* @__PURE__ */ function(_React$Component) {
  _inheritsLoose(Transition25, _React$Component);
  function Transition25(props, context) {
    var _this;
    _this = _React$Component.call(this, props, context) || this;
    var parentGroup = context;
    var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;
    var initialStatus;
    _this.appearStatus = null;
    if (props.in) {
      if (appear) {
        initialStatus = EXITED;
        _this.appearStatus = ENTERING;
      } else {
        initialStatus = ENTERED;
      }
    } else {
      if (props.unmountOnExit || props.mountOnEnter) {
        initialStatus = UNMOUNTED;
      } else {
        initialStatus = EXITED;
      }
    }
    _this.state = {
      status: initialStatus
    };
    _this.nextCallback = null;
    return _this;
  }
  Transition25.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {
    var nextIn = _ref.in;
    if (nextIn && prevState.status === UNMOUNTED) {
      return {
        status: EXITED
      };
    }
    return null;
  };
  var _proto = Transition25.prototype;
  _proto.componentDidMount = function componentDidMount() {
    this.updateStatus(true, this.appearStatus);
  };
  _proto.componentDidUpdate = function componentDidUpdate(prevProps) {
    var nextStatus = null;
    if (prevProps !== this.props) {
      var status = this.state.status;
      if (this.props.in) {
        if (status !== ENTERING && status !== ENTERED) {
          nextStatus = ENTERING;
        }
      } else {
        if (status === ENTERING || status === ENTERED) {
          nextStatus = EXITING;
        }
      }
    }
    this.updateStatus(false, nextStatus);
  };
  _proto.componentWillUnmount = function componentWillUnmount() {
    this.cancelNextCallback();
  };
  _proto.getTimeouts = function getTimeouts() {
    var timeout2 = this.props.timeout;
    var exit, enter, appear;
    exit = enter = appear = timeout2;
    if (timeout2 != null && typeof timeout2 !== "number") {
      exit = timeout2.exit;
      enter = timeout2.enter;
      appear = timeout2.appear !== void 0 ? timeout2.appear : enter;
    }
    return {
      exit,
      enter,
      appear
    };
  };
  _proto.updateStatus = function updateStatus(mounting, nextStatus) {
    if (mounting === void 0) {
      mounting = false;
    }
    if (nextStatus !== null) {
      this.cancelNextCallback();
      if (nextStatus === ENTERING) {
        if (this.props.unmountOnExit || this.props.mountOnEnter) {
          var node2 = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
          if (node2) forceReflow(node2);
        }
        this.performEnter(mounting);
      } else {
        this.performExit();
      }
    } else if (this.props.unmountOnExit && this.state.status === EXITED) {
      this.setState({
        status: UNMOUNTED
      });
    }
  };
  _proto.performEnter = function performEnter(mounting) {
    var _this2 = this;
    var enter = this.props.enter;
    var appearing = this.context ? this.context.isMounting : mounting;
    var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing], maybeNode = _ref2[0], maybeAppearing = _ref2[1];
    var timeouts = this.getTimeouts();
    var enterTimeout = appearing ? timeouts.appear : timeouts.enter;
    if (!mounting && !enter || config.disabled) {
      this.safeSetState({
        status: ENTERED
      }, function() {
        _this2.props.onEntered(maybeNode);
      });
      return;
    }
    this.props.onEnter(maybeNode, maybeAppearing);
    this.safeSetState({
      status: ENTERING
    }, function() {
      _this2.props.onEntering(maybeNode, maybeAppearing);
      _this2.onTransitionEnd(enterTimeout, function() {
        _this2.safeSetState({
          status: ENTERED
        }, function() {
          _this2.props.onEntered(maybeNode, maybeAppearing);
        });
      });
    });
  };
  _proto.performExit = function performExit() {
    var _this3 = this;
    var exit = this.props.exit;
    var timeouts = this.getTimeouts();
    var maybeNode = this.props.nodeRef ? void 0 : ReactDOM.findDOMNode(this);
    if (!exit || config.disabled) {
      this.safeSetState({
        status: EXITED
      }, function() {
        _this3.props.onExited(maybeNode);
      });
      return;
    }
    this.props.onExit(maybeNode);
    this.safeSetState({
      status: EXITING
    }, function() {
      _this3.props.onExiting(maybeNode);
      _this3.onTransitionEnd(timeouts.exit, function() {
        _this3.safeSetState({
          status: EXITED
        }, function() {
          _this3.props.onExited(maybeNode);
        });
      });
    });
  };
  _proto.cancelNextCallback = function cancelNextCallback() {
    if (this.nextCallback !== null) {
      this.nextCallback.cancel();
      this.nextCallback = null;
    }
  };
  _proto.safeSetState = function safeSetState(nextState, callback) {
    callback = this.setNextCallback(callback);
    this.setState(nextState, callback);
  };
  _proto.setNextCallback = function setNextCallback(callback) {
    var _this4 = this;
    var active = true;
    this.nextCallback = function(event) {
      if (active) {
        active = false;
        _this4.nextCallback = null;
        callback(event);
      }
    };
    this.nextCallback.cancel = function() {
      active = false;
    };
    return this.nextCallback;
  };
  _proto.onTransitionEnd = function onTransitionEnd(timeout2, handler) {
    this.setNextCallback(handler);
    var node2 = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);
    var doesNotHaveTimeoutOrListener = timeout2 == null && !this.props.addEndListener;
    if (!node2 || doesNotHaveTimeoutOrListener) {
      setTimeout(this.nextCallback, 0);
      return;
    }
    if (this.props.addEndListener) {
      var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node2, this.nextCallback], maybeNode = _ref3[0], maybeNextCallback = _ref3[1];
      this.props.addEndListener(maybeNode, maybeNextCallback);
    }
    if (timeout2 != null) {
      setTimeout(this.nextCallback, timeout2);
    }
  };
  _proto.render = function render() {
    var status = this.state.status;
    if (status === UNMOUNTED) {
      return null;
    }
    var _this$props = this.props, children = _this$props.children;
    _this$props.in;
    _this$props.mountOnEnter;
    _this$props.unmountOnExit;
    _this$props.appear;
    _this$props.enter;
    _this$props.exit;
    _this$props.timeout;
    _this$props.addEndListener;
    _this$props.onEnter;
    _this$props.onEntering;
    _this$props.onEntered;
    _this$props.onExit;
    _this$props.onExiting;
    _this$props.onExited;
    _this$props.nodeRef;
    var childProps = _objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
    return (
      // allows for nested Transitions
      /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, {
        value: null
      }, typeof children === "function" ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))
    );
  };
  return Transition25;
}(React.Component);
Transition$4.contextType = TransitionGroupContext;
Transition$4.propTypes = {};
function noop$3() {
}
Transition$4.defaultProps = {
  in: false,
  mountOnEnter: false,
  unmountOnExit: false,
  appear: false,
  enter: true,
  exit: true,
  onEnter: noop$3,
  onEntering: noop$3,
  onEntered: noop$3,
  onExit: noop$3,
  onExiting: noop$3,
  onExited: noop$3
};
Transition$4.UNMOUNTED = UNMOUNTED;
Transition$4.EXITED = EXITED;
Transition$4.ENTERING = ENTERING;
Transition$4.ENTERED = ENTERED;
Transition$4.EXITING = EXITING;
var _addClass = function addClass$1(node2, classes) {
  return node2 && classes && classes.split(" ").forEach(function(c) {
    return addClass(node2, c);
  });
};
var removeClass = function removeClass2(node2, classes) {
  return node2 && classes && classes.split(" ").forEach(function(c) {
    return removeClass$1(node2, c);
  });
};
var CSSTransition = /* @__PURE__ */ function(_React$Component) {
  _inheritsLoose(CSSTransition2, _React$Component);
  function CSSTransition2() {
    var _this;
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
    _this.appliedClasses = {
      appear: {},
      enter: {},
      exit: {}
    };
    _this.onEnter = function(maybeNode, maybeAppearing) {
      var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing), node2 = _this$resolveArgument[0], appearing = _this$resolveArgument[1];
      _this.removeClasses(node2, "exit");
      _this.addClass(node2, appearing ? "appear" : "enter", "base");
      if (_this.props.onEnter) {
        _this.props.onEnter(maybeNode, maybeAppearing);
      }
    };
    _this.onEntering = function(maybeNode, maybeAppearing) {
      var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing), node2 = _this$resolveArgument2[0], appearing = _this$resolveArgument2[1];
      var type2 = appearing ? "appear" : "enter";
      _this.addClass(node2, type2, "active");
      if (_this.props.onEntering) {
        _this.props.onEntering(maybeNode, maybeAppearing);
      }
    };
    _this.onEntered = function(maybeNode, maybeAppearing) {
      var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing), node2 = _this$resolveArgument3[0], appearing = _this$resolveArgument3[1];
      var type2 = appearing ? "appear" : "enter";
      _this.removeClasses(node2, type2);
      _this.addClass(node2, type2, "done");
      if (_this.props.onEntered) {
        _this.props.onEntered(maybeNode, maybeAppearing);
      }
    };
    _this.onExit = function(maybeNode) {
      var _this$resolveArgument4 = _this.resolveArguments(maybeNode), node2 = _this$resolveArgument4[0];
      _this.removeClasses(node2, "appear");
      _this.removeClasses(node2, "enter");
      _this.addClass(node2, "exit", "base");
      if (_this.props.onExit) {
        _this.props.onExit(maybeNode);
      }
    };
    _this.onExiting = function(maybeNode) {
      var _this$resolveArgument5 = _this.resolveArguments(maybeNode), node2 = _this$resolveArgument5[0];
      _this.addClass(node2, "exit", "active");
      if (_this.props.onExiting) {
        _this.props.onExiting(maybeNode);
      }
    };
    _this.onExited = function(maybeNode) {
      var _this$resolveArgument6 = _this.resolveArguments(maybeNode), node2 = _this$resolveArgument6[0];
      _this.removeClasses(node2, "exit");
      _this.addClass(node2, "exit", "done");
      if (_this.props.onExited) {
        _this.props.onExited(maybeNode);
      }
    };
    _this.resolveArguments = function(maybeNode, maybeAppearing) {
      return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] : [maybeNode, maybeAppearing];
    };
    _this.getClassNames = function(type2) {
      var classNames = _this.props.classNames;
      var isStringClassNames = typeof classNames === "string";
      var prefix2 = isStringClassNames && classNames ? classNames + "-" : "";
      var baseClassName = isStringClassNames ? "" + prefix2 + type2 : classNames[type2];
      var activeClassName = isStringClassNames ? baseClassName + "-active" : classNames[type2 + "Active"];
      var doneClassName = isStringClassNames ? baseClassName + "-done" : classNames[type2 + "Done"];
      return {
        baseClassName,
        activeClassName,
        doneClassName
      };
    };
    return _this;
  }
  var _proto = CSSTransition2.prototype;
  _proto.addClass = function addClass2(node2, type2, phase) {
    var className = this.getClassNames(type2)[phase + "ClassName"];
    var _this$getClassNames = this.getClassNames("enter"), doneClassName = _this$getClassNames.doneClassName;
    if (type2 === "appear" && phase === "done" && doneClassName) {
      className += " " + doneClassName;
    }
    if (phase === "active") {
      if (node2) forceReflow(node2);
    }
    if (className) {
      this.appliedClasses[type2][phase] = className;
      _addClass(node2, className);
    }
  };
  _proto.removeClasses = function removeClasses(node2, type2) {
    var _this$appliedClasses$ = this.appliedClasses[type2], baseClassName = _this$appliedClasses$.base, activeClassName = _this$appliedClasses$.active, doneClassName = _this$appliedClasses$.done;
    this.appliedClasses[type2] = {};
    if (baseClassName) {
      removeClass(node2, baseClassName);
    }
    if (activeClassName) {
      removeClass(node2, activeClassName);
    }
    if (doneClassName) {
      removeClass(node2, doneClassName);
    }
  };
  _proto.render = function render() {
    var _this$props = this.props;
    _this$props.classNames;
    var props = _objectWithoutPropertiesLoose(_this$props, ["classNames"]);
    return /* @__PURE__ */ React.createElement(Transition$4, _extends$1({}, props, {
      onEnter: this.onEnter,
      onEntered: this.onEntered,
      onEntering: this.onEntering,
      onExit: this.onExit,
      onExiting: this.onExiting,
      onExited: this.onExited
    }));
  };
  return CSSTransition2;
}(React.Component);
CSSTransition.defaultProps = {
  classNames: ""
};
CSSTransition.propTypes = {};
function _assertThisInitialized(e2) {
  if (void 0 === e2) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  return e2;
}
function getChildMapping(children, mapFn) {
  var mapper = function mapper2(child) {
    return mapFn && reactExports.isValidElement(child) ? mapFn(child) : child;
  };
  var result = /* @__PURE__ */ Object.create(null);
  if (children) reactExports.Children.map(children, function(c) {
    return c;
  }).forEach(function(child) {
    result[child.key] = mapper(child);
  });
  return result;
}
function mergeChildMappings(prev2, next2) {
  prev2 = prev2 || {};
  next2 = next2 || {};
  function getValueForKey(key) {
    return key in next2 ? next2[key] : prev2[key];
  }
  var nextKeysPending = /* @__PURE__ */ Object.create(null);
  var pendingKeys = [];
  for (var prevKey in prev2) {
    if (prevKey in next2) {
      if (pendingKeys.length) {
        nextKeysPending[prevKey] = pendingKeys;
        pendingKeys = [];
      }
    } else {
      pendingKeys.push(prevKey);
    }
  }
  var i;
  var childMapping = {};
  for (var nextKey in next2) {
    if (nextKeysPending[nextKey]) {
      for (i = 0; i < nextKeysPending[nextKey].length; i++) {
        var pendingNextKey = nextKeysPending[nextKey][i];
        childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);
      }
    }
    childMapping[nextKey] = getValueForKey(nextKey);
  }
  for (i = 0; i < pendingKeys.length; i++) {
    childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);
  }
  return childMapping;
}
function getProp(child, prop, props) {
  return props[prop] != null ? props[prop] : child.props[prop];
}
function getInitialChildMapping(props, onExited) {
  return getChildMapping(props.children, function(child) {
    return reactExports.cloneElement(child, {
      onExited: onExited.bind(null, child),
      in: true,
      appear: getProp(child, "appear", props),
      enter: getProp(child, "enter", props),
      exit: getProp(child, "exit", props)
    });
  });
}
function getNextChildMapping(nextProps, prevChildMapping, onExited) {
  var nextChildMapping = getChildMapping(nextProps.children);
  var children = mergeChildMappings(prevChildMapping, nextChildMapping);
  Object.keys(children).forEach(function(key) {
    var child = children[key];
    if (!reactExports.isValidElement(child)) return;
    var hasPrev = key in prevChildMapping;
    var hasNext = key in nextChildMapping;
    var prevChild = prevChildMapping[key];
    var isLeaving = reactExports.isValidElement(prevChild) && !prevChild.props.in;
    if (hasNext && (!hasPrev || isLeaving)) {
      children[key] = reactExports.cloneElement(child, {
        onExited: onExited.bind(null, child),
        in: true,
        exit: getProp(child, "exit", nextProps),
        enter: getProp(child, "enter", nextProps)
      });
    } else if (!hasNext && hasPrev && !isLeaving) {
      children[key] = reactExports.cloneElement(child, {
        in: false
      });
    } else if (hasNext && hasPrev && reactExports.isValidElement(prevChild)) {
      children[key] = reactExports.cloneElement(child, {
        onExited: onExited.bind(null, child),
        in: prevChild.props.in,
        exit: getProp(child, "exit", nextProps),
        enter: getProp(child, "enter", nextProps)
      });
    }
  });
  return children;
}
var values = Object.values || function(obj2) {
  return Object.keys(obj2).map(function(k2) {
    return obj2[k2];
  });
};
var defaultProps$e = {
  component: "div",
  childFactory: function childFactory(child) {
    return child;
  }
};
var TransitionGroup = /* @__PURE__ */ function(_React$Component) {
  _inheritsLoose(TransitionGroup2, _React$Component);
  function TransitionGroup2(props, context) {
    var _this;
    _this = _React$Component.call(this, props, context) || this;
    var handleExited = _this.handleExited.bind(_assertThisInitialized(_this));
    _this.state = {
      contextValue: {
        isMounting: true
      },
      handleExited,
      firstRender: true
    };
    return _this;
  }
  var _proto = TransitionGroup2.prototype;
  _proto.componentDidMount = function componentDidMount() {
    this.mounted = true;
    this.setState({
      contextValue: {
        isMounting: false
      }
    });
  };
  _proto.componentWillUnmount = function componentWillUnmount() {
    this.mounted = false;
  };
  TransitionGroup2.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {
    var prevChildMapping = _ref.children, handleExited = _ref.handleExited, firstRender = _ref.firstRender;
    return {
      children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),
      firstRender: false
    };
  };
  _proto.handleExited = function handleExited(child, node2) {
    var currentChildMapping = getChildMapping(this.props.children);
    if (child.key in currentChildMapping) return;
    if (child.props.onExited) {
      child.props.onExited(node2);
    }
    if (this.mounted) {
      this.setState(function(state) {
        var children = _extends$1({}, state.children);
        delete children[child.key];
        return {
          children
        };
      });
    }
  };
  _proto.render = function render() {
    var _this$props = this.props, Component = _this$props.component, childFactory2 = _this$props.childFactory, props = _objectWithoutPropertiesLoose(_this$props, ["component", "childFactory"]);
    var contextValue = this.state.contextValue;
    var children = values(this.state.children).map(childFactory2);
    delete props.appear;
    delete props.enter;
    delete props.exit;
    if (Component === null) {
      return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, {
        value: contextValue
      }, children);
    }
    return /* @__PURE__ */ React.createElement(TransitionGroupContext.Provider, {
      value: contextValue
    }, /* @__PURE__ */ React.createElement(Component, props, children));
  };
  return TransitionGroup2;
}(React.Component);
TransitionGroup.propTypes = {};
TransitionGroup.defaultProps = defaultProps$e;
const reflow = (node2) => node2.scrollTop;
function getTransitionProps(props, options) {
  var _style$transitionDura, _style$transitionTimi;
  const {
    timeout,
    easing: easing2,
    style: style2 = {}
  } = props;
  return {
    duration: (_style$transitionDura = style2.transitionDuration) != null ? _style$transitionDura : typeof timeout === "number" ? timeout : timeout[options.mode] || 0,
    easing: (_style$transitionTimi = style2.transitionTimingFunction) != null ? _style$transitionTimi : typeof easing2 === "object" ? easing2[options.mode] : easing2,
    delay: style2.transitionDelay
  };
}
function getCollapseUtilityClass(slot) {
  return generateUtilityClass("MuiCollapse", slot);
}
generateUtilityClasses("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
const _excluded$1A = ["addEndListener", "children", "className", "collapsedSize", "component", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "orientation", "style", "timeout", "TransitionComponent"];
const useUtilityClasses$1m = (ownerState) => {
  const {
    orientation,
    classes
  } = ownerState;
  const slots = {
    root: ["root", `${orientation}`],
    entered: ["entered"],
    hidden: ["hidden"],
    wrapper: ["wrapper", `${orientation}`],
    wrapperInner: ["wrapperInner", `${orientation}`]
  };
  return composeClasses(slots, getCollapseUtilityClass, classes);
};
const CollapseRoot = styled("div", {
  name: "MuiCollapse",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.orientation], ownerState.state === "entered" && styles2.entered, ownerState.state === "exited" && !ownerState.in && ownerState.collapsedSize === "0px" && styles2.hidden];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  height: 0,
  overflow: "hidden",
  transition: theme.transitions.create("height")
}, ownerState.orientation === "horizontal" && {
  height: "auto",
  width: 0,
  transition: theme.transitions.create("width")
}, ownerState.state === "entered" && _extends$1({
  height: "auto",
  overflow: "visible"
}, ownerState.orientation === "horizontal" && {
  width: "auto"
}), ownerState.state === "exited" && !ownerState.in && ownerState.collapsedSize === "0px" && {
  visibility: "hidden"
}));
const CollapseWrapper = styled("div", {
  name: "MuiCollapse",
  slot: "Wrapper",
  overridesResolver: (props, styles2) => styles2.wrapper
})(({
  ownerState
}) => _extends$1({
  // Hack to get children with a negative margin to not falsify the height computation.
  display: "flex",
  width: "100%"
}, ownerState.orientation === "horizontal" && {
  width: "auto",
  height: "100%"
}));
const CollapseWrapperInner = styled("div", {
  name: "MuiCollapse",
  slot: "WrapperInner",
  overridesResolver: (props, styles2) => styles2.wrapperInner
})(({
  ownerState
}) => _extends$1({
  width: "100%"
}, ownerState.orientation === "horizontal" && {
  width: "auto",
  height: "100%"
}));
const Collapse = /* @__PURE__ */ reactExports.forwardRef(function Collapse2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCollapse"
  });
  const {
    addEndListener,
    children,
    className,
    collapsedSize: collapsedSizeProp = "0px",
    component,
    easing: easing2,
    in: inProp,
    onEnter,
    onEntered,
    onEntering,
    onExit,
    onExited,
    onExiting,
    orientation = "vertical",
    style: style2,
    timeout = duration$1.standard,
    // eslint-disable-next-line react/prop-types
    TransitionComponent = Transition$4
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1A);
  const ownerState = _extends$1({}, props, {
    orientation,
    collapsedSize: collapsedSizeProp
  });
  const classes = useUtilityClasses$1m(ownerState);
  const theme = useTheme$1();
  const timer2 = useTimeout();
  const wrapperRef = reactExports.useRef(null);
  const autoTransitionDuration = reactExports.useRef();
  const collapsedSize = typeof collapsedSizeProp === "number" ? `${collapsedSizeProp}px` : collapsedSizeProp;
  const isHorizontal = orientation === "horizontal";
  const size = isHorizontal ? "width" : "height";
  const nodeRef = reactExports.useRef(null);
  const handleRef = useForkRef(ref2, nodeRef);
  const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
    if (callback) {
      const node2 = nodeRef.current;
      if (maybeIsAppearing === void 0) {
        callback(node2);
      } else {
        callback(node2, maybeIsAppearing);
      }
    }
  };
  const getWrapperSize = () => wrapperRef.current ? wrapperRef.current[isHorizontal ? "clientWidth" : "clientHeight"] : 0;
  const handleEnter = normalizedTransitionCallback((node2, isAppearing) => {
    if (wrapperRef.current && isHorizontal) {
      wrapperRef.current.style.position = "absolute";
    }
    node2.style[size] = collapsedSize;
    if (onEnter) {
      onEnter(node2, isAppearing);
    }
  });
  const handleEntering = normalizedTransitionCallback((node2, isAppearing) => {
    const wrapperSize = getWrapperSize();
    if (wrapperRef.current && isHorizontal) {
      wrapperRef.current.style.position = "";
    }
    const {
      duration: transitionDuration,
      easing: transitionTimingFunction
    } = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "enter"
    });
    if (timeout === "auto") {
      const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);
      node2.style.transitionDuration = `${duration2}ms`;
      autoTransitionDuration.current = duration2;
    } else {
      node2.style.transitionDuration = typeof transitionDuration === "string" ? transitionDuration : `${transitionDuration}ms`;
    }
    node2.style[size] = `${wrapperSize}px`;
    node2.style.transitionTimingFunction = transitionTimingFunction;
    if (onEntering) {
      onEntering(node2, isAppearing);
    }
  });
  const handleEntered = normalizedTransitionCallback((node2, isAppearing) => {
    node2.style[size] = "auto";
    if (onEntered) {
      onEntered(node2, isAppearing);
    }
  });
  const handleExit = normalizedTransitionCallback((node2) => {
    node2.style[size] = `${getWrapperSize()}px`;
    if (onExit) {
      onExit(node2);
    }
  });
  const handleExited = normalizedTransitionCallback(onExited);
  const handleExiting = normalizedTransitionCallback((node2) => {
    const wrapperSize = getWrapperSize();
    const {
      duration: transitionDuration,
      easing: transitionTimingFunction
    } = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "exit"
    });
    if (timeout === "auto") {
      const duration2 = theme.transitions.getAutoHeightDuration(wrapperSize);
      node2.style.transitionDuration = `${duration2}ms`;
      autoTransitionDuration.current = duration2;
    } else {
      node2.style.transitionDuration = typeof transitionDuration === "string" ? transitionDuration : `${transitionDuration}ms`;
    }
    node2.style[size] = collapsedSize;
    node2.style.transitionTimingFunction = transitionTimingFunction;
    if (onExiting) {
      onExiting(node2);
    }
  });
  const handleAddEndListener = (next2) => {
    if (timeout === "auto") {
      timer2.start(autoTransitionDuration.current || 0, next2);
    }
    if (addEndListener) {
      addEndListener(nodeRef.current, next2);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
    in: inProp,
    onEnter: handleEnter,
    onEntered: handleEntered,
    onEntering: handleEntering,
    onExit: handleExit,
    onExited: handleExited,
    onExiting: handleExiting,
    addEndListener: handleAddEndListener,
    nodeRef,
    timeout: timeout === "auto" ? null : timeout
  }, other, {
    children: (state, childProps) => /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseRoot, _extends$1({
      as: component,
      className: clsx$3(classes.root, className, {
        "entered": classes.entered,
        "exited": !inProp && collapsedSize === "0px" && classes.hidden
      }[state]),
      style: _extends$1({
        [isHorizontal ? "minWidth" : "minHeight"]: collapsedSize
      }, style2),
      ref: handleRef
    }, childProps, {
      // `ownerState` is set after `childProps` to override any existing `ownerState` property in `childProps`
      // that might have been forwarded from the Transition component.
      ownerState: _extends$1({}, ownerState, {
        state
      }),
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseWrapper, {
        ownerState: _extends$1({}, ownerState, {
          state
        }),
        className: classes.wrapper,
        ref: wrapperRef,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollapseWrapperInner, {
          ownerState: _extends$1({}, ownerState, {
            state
          }),
          className: classes.wrapperInner,
          children
        })
      })
    }))
  }));
});
Collapse.muiSupportAuto = true;
function getPaperUtilityClass(slot) {
  return generateUtilityClass("MuiPaper", slot);
}
generateUtilityClasses("MuiPaper", ["root", "rounded", "outlined", "elevation", "elevation0", "elevation1", "elevation2", "elevation3", "elevation4", "elevation5", "elevation6", "elevation7", "elevation8", "elevation9", "elevation10", "elevation11", "elevation12", "elevation13", "elevation14", "elevation15", "elevation16", "elevation17", "elevation18", "elevation19", "elevation20", "elevation21", "elevation22", "elevation23", "elevation24"]);
const _excluded$1z = ["className", "component", "elevation", "square", "variant"];
const useUtilityClasses$1l = (ownerState) => {
  const {
    square,
    elevation,
    variant: variant2,
    classes
  } = ownerState;
  const slots = {
    root: ["root", variant2, !square && "rounded", variant2 === "elevation" && `elevation${elevation}`]
  };
  return composeClasses(slots, getPaperUtilityClass, classes);
};
const PaperRoot = styled("div", {
  name: "MuiPaper",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.variant], !ownerState.square && styles2.rounded, ownerState.variant === "elevation" && styles2[`elevation${ownerState.elevation}`]];
  }
})(({
  theme,
  ownerState
}) => {
  var _theme$vars$overlays;
  return _extends$1({
    backgroundColor: (theme.vars || theme).palette.background.paper,
    color: (theme.vars || theme).palette.text.primary,
    transition: theme.transitions.create("box-shadow")
  }, !ownerState.square && {
    borderRadius: theme.shape.borderRadius
  }, ownerState.variant === "outlined" && {
    border: `1px solid ${(theme.vars || theme).palette.divider}`
  }, ownerState.variant === "elevation" && _extends$1({
    boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
  }, !theme.vars && theme.palette.mode === "dark" && {
    backgroundImage: `linear-gradient(${colorManipulatorExports.alpha("#fff", getOverlayAlpha(ownerState.elevation))}, ${colorManipulatorExports.alpha("#fff", getOverlayAlpha(ownerState.elevation))})`
  }, theme.vars && {
    backgroundImage: (_theme$vars$overlays = theme.vars.overlays) == null ? void 0 : _theme$vars$overlays[ownerState.elevation]
  }));
});
const Paper = /* @__PURE__ */ reactExports.forwardRef(function Paper2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiPaper"
  });
  const {
    className,
    component = "div",
    elevation = 1,
    square = false,
    variant: variant2 = "elevation"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1z);
  const ownerState = _extends$1({}, props, {
    component,
    elevation,
    square,
    variant: variant2
  });
  const classes = useUtilityClasses$1l(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PaperRoot, _extends$1({
    as: component,
    ownerState,
    className: clsx$3(classes.root, className),
    ref: ref2
  }, other));
});
const AccordionContext = /* @__PURE__ */ reactExports.createContext({});
const _excluded$1y = ["className", "elementType", "ownerState", "externalForwardedProps", "getSlotOwnerState", "internalForwardedProps"], _excluded2$9 = ["component", "slots", "slotProps"], _excluded3$3 = ["component"];
function useSlot(name, parameters) {
  const {
    className,
    elementType: initialElementType,
    ownerState,
    externalForwardedProps,
    getSlotOwnerState,
    internalForwardedProps
  } = parameters, useSlotPropsParams = _objectWithoutPropertiesLoose(parameters, _excluded$1y);
  const {
    component: rootComponent,
    slots = {
      [name]: void 0
    },
    slotProps = {
      [name]: void 0
    }
  } = externalForwardedProps, other = _objectWithoutPropertiesLoose(externalForwardedProps, _excluded2$9);
  const elementType = slots[name] || initialElementType;
  const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);
  const _mergeSlotProps = mergeSlotProps(_extends$1({
    className
  }, useSlotPropsParams, {
    externalForwardedProps: name === "root" ? other : void 0,
    externalSlotProps: resolvedComponentsProps
  })), {
    props: {
      component: slotComponent
    },
    internalRef
  } = _mergeSlotProps, mergedProps = _objectWithoutPropertiesLoose(_mergeSlotProps.props, _excluded3$3);
  const ref2 = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, parameters.ref);
  const slotOwnerState = getSlotOwnerState ? getSlotOwnerState(mergedProps) : {};
  const finalOwnerState = _extends$1({}, ownerState, slotOwnerState);
  const LeafComponent = name === "root" ? slotComponent || rootComponent : slotComponent;
  const props = appendOwnerState(elementType, _extends$1({}, name === "root" && !rootComponent && !slots[name] && internalForwardedProps, name !== "root" && !slots[name] && internalForwardedProps, mergedProps, LeafComponent && {
    as: LeafComponent
  }, {
    ref: ref2
  }), finalOwnerState);
  Object.keys(slotOwnerState).forEach((propName) => {
    delete props[propName];
  });
  return [elementType, props];
}
function getAccordionUtilityClass(slot) {
  return generateUtilityClass("MuiAccordion", slot);
}
const accordionClasses = generateUtilityClasses("MuiAccordion", ["root", "rounded", "expanded", "disabled", "gutters", "region"]);
const _excluded$1x = ["children", "className", "defaultExpanded", "disabled", "disableGutters", "expanded", "onChange", "square", "slots", "slotProps", "TransitionComponent", "TransitionProps"];
const useUtilityClasses$1k = (ownerState) => {
  const {
    classes,
    square,
    expanded,
    disabled,
    disableGutters
  } = ownerState;
  const slots = {
    root: ["root", !square && "rounded", expanded && "expanded", disabled && "disabled", !disableGutters && "gutters"],
    region: ["region"]
  };
  return composeClasses(slots, getAccordionUtilityClass, classes);
};
const AccordionRoot = styled(Paper, {
  name: "MuiAccordion",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [{
      [`& .${accordionClasses.region}`]: styles2.region
    }, styles2.root, !ownerState.square && styles2.rounded, !ownerState.disableGutters && styles2.gutters];
  }
})(({
  theme
}) => {
  const transition = {
    duration: theme.transitions.duration.shortest
  };
  return {
    position: "relative",
    transition: theme.transitions.create(["margin"], transition),
    overflowAnchor: "none",
    // Keep the same scrolling position
    "&::before": {
      position: "absolute",
      left: 0,
      top: -1,
      right: 0,
      height: 1,
      content: '""',
      opacity: 1,
      backgroundColor: (theme.vars || theme).palette.divider,
      transition: theme.transitions.create(["opacity", "background-color"], transition)
    },
    "&:first-of-type": {
      "&::before": {
        display: "none"
      }
    },
    [`&.${accordionClasses.expanded}`]: {
      "&::before": {
        opacity: 0
      },
      "&:first-of-type": {
        marginTop: 0
      },
      "&:last-of-type": {
        marginBottom: 0
      },
      "& + &": {
        "&::before": {
          display: "none"
        }
      }
    },
    [`&.${accordionClasses.disabled}`]: {
      backgroundColor: (theme.vars || theme).palette.action.disabledBackground
    }
  };
}, ({
  theme
}) => ({
  variants: [{
    props: (props) => !props.square,
    style: {
      borderRadius: 0,
      "&:first-of-type": {
        borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
        borderTopRightRadius: (theme.vars || theme).shape.borderRadius
      },
      "&:last-of-type": {
        borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,
        borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,
        // Fix a rendering issue on Edge
        "@supports (-ms-ime-align: auto)": {
          borderBottomLeftRadius: 0,
          borderBottomRightRadius: 0
        }
      }
    }
  }, {
    props: (props) => !props.disableGutters,
    style: {
      [`&.${accordionClasses.expanded}`]: {
        margin: "16px 0"
      }
    }
  }]
}));
const Accordion$1 = /* @__PURE__ */ reactExports.forwardRef(function Accordion2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiAccordion"
  });
  const {
    children: childrenProp,
    className,
    defaultExpanded = false,
    disabled = false,
    disableGutters = false,
    expanded: expandedProp,
    onChange,
    square = false,
    slots = {},
    slotProps = {},
    TransitionComponent: TransitionComponentProp,
    TransitionProps: TransitionPropsProp
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1x);
  const [expanded, setExpandedState] = useControlled({
    controlled: expandedProp,
    default: defaultExpanded,
    name: "Accordion",
    state: "expanded"
  });
  const handleChange = reactExports.useCallback((event) => {
    setExpandedState(!expanded);
    if (onChange) {
      onChange(event, !expanded);
    }
  }, [expanded, onChange, setExpandedState]);
  const [summary, ...children] = reactExports.Children.toArray(childrenProp);
  const contextValue = reactExports.useMemo(() => ({
    expanded,
    disabled,
    disableGutters,
    toggle: handleChange
  }), [expanded, disabled, disableGutters, handleChange]);
  const ownerState = _extends$1({}, props, {
    square,
    disabled,
    disableGutters,
    expanded
  });
  const classes = useUtilityClasses$1k(ownerState);
  const backwardCompatibleSlots = _extends$1({
    transition: TransitionComponentProp
  }, slots);
  const backwardCompatibleSlotProps = _extends$1({
    transition: TransitionPropsProp
  }, slotProps);
  const [TransitionSlot, transitionProps] = useSlot("transition", {
    elementType: Collapse,
    externalForwardedProps: {
      slots: backwardCompatibleSlots,
      slotProps: backwardCompatibleSlotProps
    },
    ownerState
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ref: ref2,
    ownerState,
    square
  }, other, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionContext.Provider, {
      value: contextValue,
      children: summary
    }), /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionSlot, _extends$1({
      in: expanded,
      timeout: "auto"
    }, transitionProps, {
      children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
        "aria-labelledby": summary.props.id,
        id: summary.props["aria-controls"],
        role: "region",
        className: classes.region,
        children
      })
    }))]
  }));
});
function getAccordionDetailsUtilityClass(slot) {
  return generateUtilityClass("MuiAccordionDetails", slot);
}
generateUtilityClasses("MuiAccordionDetails", ["root"]);
const _excluded$1w = ["className"];
const useUtilityClasses$1j = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getAccordionDetailsUtilityClass, classes);
};
const AccordionDetailsRoot = styled("div", {
  name: "MuiAccordionDetails",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})(({
  theme
}) => ({
  padding: theme.spacing(1, 2, 2)
}));
const AccordionDetails$1 = /* @__PURE__ */ reactExports.forwardRef(function AccordionDetails2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiAccordionDetails"
  });
  const {
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1w);
  const ownerState = props;
  const classes = useUtilityClasses$1j(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionDetailsRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ref: ref2,
    ownerState
  }, other));
});
function Ripple(props) {
  const {
    className,
    classes,
    pulsate = false,
    rippleX,
    rippleY,
    rippleSize,
    in: inProp,
    onExited,
    timeout
  } = props;
  const [leaving, setLeaving] = reactExports.useState(false);
  const rippleClassName = clsx$3(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);
  const rippleStyles = {
    width: rippleSize,
    height: rippleSize,
    top: -(rippleSize / 2) + rippleY,
    left: -(rippleSize / 2) + rippleX
  };
  const childClassName = clsx$3(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);
  if (!inProp && !leaving) {
    setLeaving(true);
  }
  reactExports.useEffect(() => {
    if (!inProp && onExited != null) {
      const timeoutId = setTimeout(onExited, timeout);
      return () => {
        clearTimeout(timeoutId);
      };
    }
    return void 0;
  }, [onExited, inProp, timeout]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
    className: rippleClassName,
    style: rippleStyles,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
      className: childClassName
    })
  });
}
const touchRippleClasses = generateUtilityClasses("MuiTouchRipple", ["root", "ripple", "rippleVisible", "ripplePulsate", "child", "childLeaving", "childPulsate"]);
const _excluded$1v = ["center", "classes", "className"];
let _$3 = (t) => t, _t$2, _t2$2, _t3$2, _t4$2;
const DURATION = 550;
const DELAY_RIPPLE = 80;
const enterKeyframe = keyframes(_t$2 || (_t$2 = _$3`
  0% {
    transform: scale(0);
    opacity: 0.1;
  }

  100% {
    transform: scale(1);
    opacity: 0.3;
  }
`));
const exitKeyframe = keyframes(_t2$2 || (_t2$2 = _$3`
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
`));
const pulsateKeyframe = keyframes(_t3$2 || (_t3$2 = _$3`
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.92);
  }

  100% {
    transform: scale(1);
  }
`));
const TouchRippleRoot = styled("span", {
  name: "MuiTouchRipple",
  slot: "Root"
})({
  overflow: "hidden",
  pointerEvents: "none",
  position: "absolute",
  zIndex: 0,
  top: 0,
  right: 0,
  bottom: 0,
  left: 0,
  borderRadius: "inherit"
});
const TouchRippleRipple = styled(Ripple, {
  name: "MuiTouchRipple",
  slot: "Ripple"
})(_t4$2 || (_t4$2 = _$3`
  opacity: 0;
  position: absolute;

  &.${0} {
    opacity: 0.3;
    transform: scale(1);
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  &.${0} {
    animation-duration: ${0}ms;
  }

  & .${0} {
    opacity: 1;
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: currentColor;
  }

  & .${0} {
    opacity: 0;
    animation-name: ${0};
    animation-duration: ${0}ms;
    animation-timing-function: ${0};
  }

  & .${0} {
    position: absolute;
    /* @noflip */
    left: 0px;
    top: 0;
    animation-name: ${0};
    animation-duration: 2500ms;
    animation-timing-function: ${0};
    animation-iteration-count: infinite;
    animation-delay: 200ms;
  }
`), touchRippleClasses.rippleVisible, enterKeyframe, DURATION, ({
  theme
}) => theme.transitions.easing.easeInOut, touchRippleClasses.ripplePulsate, ({
  theme
}) => theme.transitions.duration.shorter, touchRippleClasses.child, touchRippleClasses.childLeaving, exitKeyframe, DURATION, ({
  theme
}) => theme.transitions.easing.easeInOut, touchRippleClasses.childPulsate, pulsateKeyframe, ({
  theme
}) => theme.transitions.easing.easeInOut);
const TouchRipple = /* @__PURE__ */ reactExports.forwardRef(function TouchRipple2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiTouchRipple"
  });
  const {
    center: centerProp = false,
    classes = {},
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1v);
  const [ripples, setRipples] = reactExports.useState([]);
  const nextKey = reactExports.useRef(0);
  const rippleCallback = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (rippleCallback.current) {
      rippleCallback.current();
      rippleCallback.current = null;
    }
  }, [ripples]);
  const ignoringMouseDown = reactExports.useRef(false);
  const startTimer = useTimeout();
  const startTimerCommit = reactExports.useRef(null);
  const container = reactExports.useRef(null);
  const startCommit = reactExports.useCallback((params2) => {
    const {
      pulsate: pulsate2,
      rippleX,
      rippleY,
      rippleSize,
      cb
    } = params2;
    setRipples((oldRipples) => [...oldRipples, /* @__PURE__ */ jsxRuntimeExports.jsx(TouchRippleRipple, {
      classes: {
        ripple: clsx$3(classes.ripple, touchRippleClasses.ripple),
        rippleVisible: clsx$3(classes.rippleVisible, touchRippleClasses.rippleVisible),
        ripplePulsate: clsx$3(classes.ripplePulsate, touchRippleClasses.ripplePulsate),
        child: clsx$3(classes.child, touchRippleClasses.child),
        childLeaving: clsx$3(classes.childLeaving, touchRippleClasses.childLeaving),
        childPulsate: clsx$3(classes.childPulsate, touchRippleClasses.childPulsate)
      },
      timeout: DURATION,
      pulsate: pulsate2,
      rippleX,
      rippleY,
      rippleSize
    }, nextKey.current)]);
    nextKey.current += 1;
    rippleCallback.current = cb;
  }, [classes]);
  const start2 = reactExports.useCallback((event = {}, options = {}, cb = () => {
  }) => {
    const {
      pulsate: pulsate2 = false,
      center = centerProp || options.pulsate,
      fakeElement = false
      // For test purposes
    } = options;
    if ((event == null ? void 0 : event.type) === "mousedown" && ignoringMouseDown.current) {
      ignoringMouseDown.current = false;
      return;
    }
    if ((event == null ? void 0 : event.type) === "touchstart") {
      ignoringMouseDown.current = true;
    }
    const element = fakeElement ? null : container.current;
    const rect = element ? element.getBoundingClientRect() : {
      width: 0,
      height: 0,
      left: 0,
      top: 0
    };
    let rippleX;
    let rippleY;
    let rippleSize;
    if (center || event === void 0 || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {
      rippleX = Math.round(rect.width / 2);
      rippleY = Math.round(rect.height / 2);
    } else {
      const {
        clientX,
        clientY
      } = event.touches && event.touches.length > 0 ? event.touches[0] : event;
      rippleX = Math.round(clientX - rect.left);
      rippleY = Math.round(clientY - rect.top);
    }
    if (center) {
      rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);
      if (rippleSize % 2 === 0) {
        rippleSize += 1;
      }
    } else {
      const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;
      const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;
      rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);
    }
    if (event != null && event.touches) {
      if (startTimerCommit.current === null) {
        startTimerCommit.current = () => {
          startCommit({
            pulsate: pulsate2,
            rippleX,
            rippleY,
            rippleSize,
            cb
          });
        };
        startTimer.start(DELAY_RIPPLE, () => {
          if (startTimerCommit.current) {
            startTimerCommit.current();
            startTimerCommit.current = null;
          }
        });
      }
    } else {
      startCommit({
        pulsate: pulsate2,
        rippleX,
        rippleY,
        rippleSize,
        cb
      });
    }
  }, [centerProp, startCommit, startTimer]);
  const pulsate = reactExports.useCallback(() => {
    start2({}, {
      pulsate: true
    });
  }, [start2]);
  const stop = reactExports.useCallback((event, cb) => {
    startTimer.clear();
    if ((event == null ? void 0 : event.type) === "touchend" && startTimerCommit.current) {
      startTimerCommit.current();
      startTimerCommit.current = null;
      startTimer.start(0, () => {
        stop(event, cb);
      });
      return;
    }
    startTimerCommit.current = null;
    setRipples((oldRipples) => {
      if (oldRipples.length > 0) {
        return oldRipples.slice(1);
      }
      return oldRipples;
    });
    rippleCallback.current = cb;
  }, [startTimer]);
  reactExports.useImperativeHandle(ref2, () => ({
    pulsate,
    start: start2,
    stop
  }), [pulsate, start2, stop]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TouchRippleRoot, _extends$1({
    className: clsx$3(touchRippleClasses.root, classes.root, className),
    ref: container
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionGroup, {
      component: null,
      exit: true,
      children: ripples
    })
  }));
});
function getButtonBaseUtilityClass(slot) {
  return generateUtilityClass("MuiButtonBase", slot);
}
const buttonBaseClasses = generateUtilityClasses("MuiButtonBase", ["root", "disabled", "focusVisible"]);
const _excluded$1u = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"];
const useUtilityClasses$1i = (ownerState) => {
  const {
    disabled,
    focusVisible,
    focusVisibleClassName,
    classes
  } = ownerState;
  const slots = {
    root: ["root", disabled && "disabled", focusVisible && "focusVisible"]
  };
  const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);
  if (focusVisible && focusVisibleClassName) {
    composedClasses.root += ` ${focusVisibleClassName}`;
  }
  return composedClasses;
};
const ButtonBaseRoot = styled("button", {
  name: "MuiButtonBase",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  display: "inline-flex",
  alignItems: "center",
  justifyContent: "center",
  position: "relative",
  boxSizing: "border-box",
  WebkitTapHighlightColor: "transparent",
  backgroundColor: "transparent",
  // Reset default value
  // We disable the focus ring for mouse, touch and keyboard users.
  outline: 0,
  border: 0,
  margin: 0,
  // Remove the margin in Safari
  borderRadius: 0,
  padding: 0,
  // Remove the padding in Firefox
  cursor: "pointer",
  userSelect: "none",
  verticalAlign: "middle",
  MozAppearance: "none",
  // Reset
  WebkitAppearance: "none",
  // Reset
  textDecoration: "none",
  // So we take precedent over the style of a native <a /> element.
  color: "inherit",
  "&::-moz-focus-inner": {
    borderStyle: "none"
    // Remove Firefox dotted outline.
  },
  [`&.${buttonBaseClasses.disabled}`]: {
    pointerEvents: "none",
    // Disable link interactions
    cursor: "default"
  },
  "@media print": {
    colorAdjust: "exact"
  }
});
const ButtonBase = /* @__PURE__ */ reactExports.forwardRef(function ButtonBase2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiButtonBase"
  });
  const {
    action,
    centerRipple = false,
    children,
    className,
    component = "button",
    disabled = false,
    disableRipple = false,
    disableTouchRipple = false,
    focusRipple = false,
    LinkComponent = "a",
    onBlur,
    onClick: onClick2,
    onContextMenu,
    onDragLeave,
    onFocus,
    onFocusVisible,
    onKeyDown,
    onKeyUp,
    onMouseDown: onMouseDown2,
    onMouseLeave: onMouseLeave2,
    onMouseUp: onMouseUp2,
    onTouchEnd,
    onTouchMove,
    onTouchStart,
    tabIndex = 0,
    TouchRippleProps,
    touchRippleRef,
    type: type2
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1u);
  const buttonRef = reactExports.useRef(null);
  const rippleRef = reactExports.useRef(null);
  const handleRippleRef = useForkRef(rippleRef, touchRippleRef);
  const {
    isFocusVisibleRef,
    onFocus: handleFocusVisible,
    onBlur: handleBlurVisible,
    ref: focusVisibleRef
  } = useIsFocusVisible();
  const [focusVisible, setFocusVisible] = reactExports.useState(false);
  if (disabled && focusVisible) {
    setFocusVisible(false);
  }
  reactExports.useImperativeHandle(action, () => ({
    focusVisible: () => {
      setFocusVisible(true);
      buttonRef.current.focus();
    }
  }), []);
  const [mountedState, setMountedState] = reactExports.useState(false);
  reactExports.useEffect(() => {
    setMountedState(true);
  }, []);
  const enableTouchRipple = mountedState && !disableRipple && !disabled;
  reactExports.useEffect(() => {
    if (focusVisible && focusRipple && !disableRipple && mountedState) {
      rippleRef.current.pulsate();
    }
  }, [disableRipple, focusRipple, focusVisible, mountedState]);
  function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
    return useEventCallback((event) => {
      if (eventCallback) {
        eventCallback(event);
      }
      const ignore = skipRippleAction;
      if (!ignore && rippleRef.current) {
        rippleRef.current[rippleAction](event);
      }
      return true;
    });
  }
  const handleMouseDown = useRippleHandler("start", onMouseDown2);
  const handleContextMenu = useRippleHandler("stop", onContextMenu);
  const handleDragLeave = useRippleHandler("stop", onDragLeave);
  const handleMouseUp = useRippleHandler("stop", onMouseUp2);
  const handleMouseLeave = useRippleHandler("stop", (event) => {
    if (focusVisible) {
      event.preventDefault();
    }
    if (onMouseLeave2) {
      onMouseLeave2(event);
    }
  });
  const handleTouchStart = useRippleHandler("start", onTouchStart);
  const handleTouchEnd = useRippleHandler("stop", onTouchEnd);
  const handleTouchMove = useRippleHandler("stop", onTouchMove);
  const handleBlur = useRippleHandler("stop", (event) => {
    handleBlurVisible(event);
    if (isFocusVisibleRef.current === false) {
      setFocusVisible(false);
    }
    if (onBlur) {
      onBlur(event);
    }
  }, false);
  const handleFocus = useEventCallback((event) => {
    if (!buttonRef.current) {
      buttonRef.current = event.currentTarget;
    }
    handleFocusVisible(event);
    if (isFocusVisibleRef.current === true) {
      setFocusVisible(true);
      if (onFocusVisible) {
        onFocusVisible(event);
      }
    }
    if (onFocus) {
      onFocus(event);
    }
  });
  const isNonNativeButton = () => {
    const button = buttonRef.current;
    return component && component !== "button" && !(button.tagName === "A" && button.href);
  };
  const keydownRef = reactExports.useRef(false);
  const handleKeyDown2 = useEventCallback((event) => {
    if (focusRipple && !keydownRef.current && focusVisible && rippleRef.current && event.key === " ") {
      keydownRef.current = true;
      rippleRef.current.stop(event, () => {
        rippleRef.current.start(event);
      });
    }
    if (event.target === event.currentTarget && isNonNativeButton() && event.key === " ") {
      event.preventDefault();
    }
    if (onKeyDown) {
      onKeyDown(event);
    }
    if (event.target === event.currentTarget && isNonNativeButton() && event.key === "Enter" && !disabled) {
      event.preventDefault();
      if (onClick2) {
        onClick2(event);
      }
    }
  });
  const handleKeyUp = useEventCallback((event) => {
    if (focusRipple && event.key === " " && rippleRef.current && focusVisible && !event.defaultPrevented) {
      keydownRef.current = false;
      rippleRef.current.stop(event, () => {
        rippleRef.current.pulsate(event);
      });
    }
    if (onKeyUp) {
      onKeyUp(event);
    }
    if (onClick2 && event.target === event.currentTarget && isNonNativeButton() && event.key === " " && !event.defaultPrevented) {
      onClick2(event);
    }
  });
  let ComponentProp = component;
  if (ComponentProp === "button" && (other.href || other.to)) {
    ComponentProp = LinkComponent;
  }
  const buttonProps = {};
  if (ComponentProp === "button") {
    buttonProps.type = type2 === void 0 ? "button" : type2;
    buttonProps.disabled = disabled;
  } else {
    if (!other.href && !other.to) {
      buttonProps.role = "button";
    }
    if (disabled) {
      buttonProps["aria-disabled"] = disabled;
    }
  }
  const handleRef = useForkRef(ref2, focusVisibleRef, buttonRef);
  const ownerState = _extends$1({}, props, {
    centerRipple,
    component,
    disabled,
    disableRipple,
    disableTouchRipple,
    focusRipple,
    tabIndex,
    focusVisible
  });
  const classes = useUtilityClasses$1i(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonBaseRoot, _extends$1({
    as: ComponentProp,
    className: clsx$3(classes.root, className),
    ownerState,
    onBlur: handleBlur,
    onClick: onClick2,
    onContextMenu: handleContextMenu,
    onFocus: handleFocus,
    onKeyDown: handleKeyDown2,
    onKeyUp: handleKeyUp,
    onMouseDown: handleMouseDown,
    onMouseLeave: handleMouseLeave,
    onMouseUp: handleMouseUp,
    onDragLeave: handleDragLeave,
    onTouchEnd: handleTouchEnd,
    onTouchMove: handleTouchMove,
    onTouchStart: handleTouchStart,
    ref: handleRef,
    tabIndex: disabled ? -1 : tabIndex,
    type: type2
  }, buttonProps, other, {
    children: [children, enableTouchRipple ? (
      /* TouchRipple is only needed client-side, x2 boost on the server. */
      /* @__PURE__ */ jsxRuntimeExports.jsx(TouchRipple, _extends$1({
        ref: handleRippleRef,
        center: centerRipple
      }, TouchRippleProps))
    ) : null]
  }));
});
function getAccordionSummaryUtilityClass(slot) {
  return generateUtilityClass("MuiAccordionSummary", slot);
}
const accordionSummaryClasses = generateUtilityClasses("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disabled", "gutters", "contentGutters", "content", "expandIconWrapper"]);
const _excluded$1t = ["children", "className", "expandIcon", "focusVisibleClassName", "onClick"];
const useUtilityClasses$1h = (ownerState) => {
  const {
    classes,
    expanded,
    disabled,
    disableGutters
  } = ownerState;
  const slots = {
    root: ["root", expanded && "expanded", disabled && "disabled", !disableGutters && "gutters"],
    focusVisible: ["focusVisible"],
    content: ["content", expanded && "expanded", !disableGutters && "contentGutters"],
    expandIconWrapper: ["expandIconWrapper", expanded && "expanded"]
  };
  return composeClasses(slots, getAccordionSummaryUtilityClass, classes);
};
const AccordionSummaryRoot = styled(ButtonBase, {
  name: "MuiAccordionSummary",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})(({
  theme
}) => {
  const transition = {
    duration: theme.transitions.duration.shortest
  };
  return {
    display: "flex",
    minHeight: 48,
    padding: theme.spacing(0, 2),
    transition: theme.transitions.create(["min-height", "background-color"], transition),
    [`&.${accordionSummaryClasses.focusVisible}`]: {
      backgroundColor: (theme.vars || theme).palette.action.focus
    },
    [`&.${accordionSummaryClasses.disabled}`]: {
      opacity: (theme.vars || theme).palette.action.disabledOpacity
    },
    [`&:hover:not(.${accordionSummaryClasses.disabled})`]: {
      cursor: "pointer"
    },
    variants: [{
      props: (props) => !props.disableGutters,
      style: {
        [`&.${accordionSummaryClasses.expanded}`]: {
          minHeight: 64
        }
      }
    }]
  };
});
const AccordionSummaryContent = styled("div", {
  name: "MuiAccordionSummary",
  slot: "Content",
  overridesResolver: (props, styles2) => styles2.content
})(({
  theme
}) => ({
  display: "flex",
  flexGrow: 1,
  margin: "12px 0",
  variants: [{
    props: (props) => !props.disableGutters,
    style: {
      transition: theme.transitions.create(["margin"], {
        duration: theme.transitions.duration.shortest
      }),
      [`&.${accordionSummaryClasses.expanded}`]: {
        margin: "20px 0"
      }
    }
  }]
}));
const AccordionSummaryExpandIconWrapper = styled("div", {
  name: "MuiAccordionSummary",
  slot: "ExpandIconWrapper",
  overridesResolver: (props, styles2) => styles2.expandIconWrapper
})(({
  theme
}) => ({
  display: "flex",
  color: (theme.vars || theme).palette.action.active,
  transform: "rotate(0deg)",
  transition: theme.transitions.create("transform", {
    duration: theme.transitions.duration.shortest
  }),
  [`&.${accordionSummaryClasses.expanded}`]: {
    transform: "rotate(180deg)"
  }
}));
const AccordionSummary$1 = /* @__PURE__ */ reactExports.forwardRef(function AccordionSummary2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiAccordionSummary"
  });
  const {
    children,
    className,
    expandIcon: expandIcon2,
    focusVisibleClassName,
    onClick: onClick2
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1t);
  const {
    disabled = false,
    disableGutters,
    expanded,
    toggle
  } = reactExports.useContext(AccordionContext);
  const handleChange = (event) => {
    if (toggle) {
      toggle(event);
    }
    if (onClick2) {
      onClick2(event);
    }
  };
  const ownerState = _extends$1({}, props, {
    expanded,
    disabled,
    disableGutters
  });
  const classes = useUtilityClasses$1h(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionSummaryRoot, _extends$1({
    focusRipple: false,
    disableRipple: true,
    disabled,
    component: "div",
    "aria-expanded": expanded,
    className: clsx$3(classes.root, className),
    focusVisibleClassName: clsx$3(classes.focusVisible, focusVisibleClassName),
    onClick: handleChange,
    ref: ref2,
    ownerState
  }, other, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummaryContent, {
      className: classes.content,
      ownerState,
      children
    }), expandIcon2 && /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummaryExpandIconWrapper, {
      className: classes.expandIconWrapper,
      ownerState,
      children: expandIcon2
    })]
  }));
});
function getAlertUtilityClass(slot) {
  return generateUtilityClass("MuiAlert", slot);
}
const alertClasses = generateUtilityClasses("MuiAlert", ["root", "action", "icon", "message", "filled", "colorSuccess", "colorInfo", "colorWarning", "colorError", "filledSuccess", "filledInfo", "filledWarning", "filledError", "outlined", "outlinedSuccess", "outlinedInfo", "outlinedWarning", "outlinedError", "standard", "standardSuccess", "standardInfo", "standardWarning", "standardError"]);
function getIconButtonUtilityClass(slot) {
  return generateUtilityClass("MuiIconButton", slot);
}
const iconButtonClasses = generateUtilityClasses("MuiIconButton", ["root", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorError", "colorInfo", "colorSuccess", "colorWarning", "edgeStart", "edgeEnd", "sizeSmall", "sizeMedium", "sizeLarge"]);
const _excluded$1s = ["edge", "children", "className", "color", "disabled", "disableFocusRipple", "size"];
const useUtilityClasses$1g = (ownerState) => {
  const {
    classes,
    disabled,
    color: color2,
    edge,
    size
  } = ownerState;
  const slots = {
    root: ["root", disabled && "disabled", color2 !== "default" && `color${capitalize$2(color2)}`, edge && `edge${capitalize$2(edge)}`, `size${capitalize$2(size)}`]
  };
  return composeClasses(slots, getIconButtonUtilityClass, classes);
};
const IconButtonRoot = styled(ButtonBase, {
  name: "MuiIconButton",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.color !== "default" && styles2[`color${capitalize$2(ownerState.color)}`], ownerState.edge && styles2[`edge${capitalize$2(ownerState.edge)}`], styles2[`size${capitalize$2(ownerState.size)}`]];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  textAlign: "center",
  flex: "0 0 auto",
  fontSize: theme.typography.pxToRem(24),
  padding: 8,
  borderRadius: "50%",
  overflow: "visible",
  // Explicitly set the default value to solve a bug on IE11.
  color: (theme.vars || theme).palette.action.active,
  transition: theme.transitions.create("background-color", {
    duration: theme.transitions.duration.shortest
  })
}, !ownerState.disableRipple && {
  "&:hover": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  }
}, ownerState.edge === "start" && {
  marginLeft: ownerState.size === "small" ? -3 : -12
}, ownerState.edge === "end" && {
  marginRight: ownerState.size === "small" ? -3 : -12
}), ({
  theme,
  ownerState
}) => {
  var _palette;
  const palette = (_palette = (theme.vars || theme).palette) == null ? void 0 : _palette[ownerState.color];
  return _extends$1({}, ownerState.color === "inherit" && {
    color: "inherit"
  }, ownerState.color !== "inherit" && ownerState.color !== "default" && _extends$1({
    color: palette == null ? void 0 : palette.main
  }, !ownerState.disableRipple && {
    "&:hover": _extends$1({}, palette && {
      backgroundColor: theme.vars ? `rgba(${palette.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(palette.main, theme.palette.action.hoverOpacity)
    }, {
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    })
  }), ownerState.size === "small" && {
    padding: 5,
    fontSize: theme.typography.pxToRem(18)
  }, ownerState.size === "large" && {
    padding: 12,
    fontSize: theme.typography.pxToRem(28)
  }, {
    [`&.${iconButtonClasses.disabled}`]: {
      backgroundColor: "transparent",
      color: (theme.vars || theme).palette.action.disabled
    }
  });
});
const IconButton = /* @__PURE__ */ reactExports.forwardRef(function IconButton2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiIconButton"
  });
  const {
    edge = false,
    children,
    className,
    color: color2 = "default",
    disabled = false,
    disableFocusRipple = false,
    size = "medium"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1s);
  const ownerState = _extends$1({}, props, {
    edge,
    color: color2,
    disabled,
    disableFocusRipple,
    size
  });
  const classes = useUtilityClasses$1g(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(IconButtonRoot, _extends$1({
    className: clsx$3(classes.root, className),
    centerRipple: true,
    focusRipple: !disableFocusRipple,
    disabled,
    ref: ref2
  }, other, {
    ownerState,
    children
  }));
});
const SuccessOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
}), "SuccessOutlined");
const ReportProblemOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"
}), "ReportProblemOutlined");
const ErrorOutlineIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
}), "ErrorOutline");
const InfoOutlinedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"
}), "InfoOutlined");
const ClearIcon$2 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}), "Close");
const _excluded$1r = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "slotProps", "slots", "variant"];
const useUtilityClasses$1f = (ownerState) => {
  const {
    variant: variant2,
    color: color2,
    severity,
    classes
  } = ownerState;
  const slots = {
    root: ["root", `color${capitalize$2(color2 || severity)}`, `${variant2}${capitalize$2(color2 || severity)}`, `${variant2}`],
    icon: ["icon"],
    message: ["message"],
    action: ["action"]
  };
  return composeClasses(slots, getAlertUtilityClass, classes);
};
const AlertRoot = styled(Paper, {
  name: "MuiAlert",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.variant], styles2[`${ownerState.variant}${capitalize$2(ownerState.color || ownerState.severity)}`]];
  }
})(({
  theme
}) => {
  const getColor = theme.palette.mode === "light" ? colorManipulatorExports.darken : colorManipulatorExports.lighten;
  const getBackgroundColor = theme.palette.mode === "light" ? colorManipulatorExports.lighten : colorManipulatorExports.darken;
  return _extends$1({}, theme.typography.body2, {
    backgroundColor: "transparent",
    display: "flex",
    padding: "6px 16px",
    variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color2]) => ({
      props: {
        colorSeverity: color2,
        variant: "standard"
      },
      style: {
        color: theme.vars ? theme.vars.palette.Alert[`${color2}Color`] : getColor(theme.palette[color2].light, 0.6),
        backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color2}StandardBg`] : getBackgroundColor(theme.palette[color2].light, 0.9),
        [`& .${alertClasses.icon}`]: theme.vars ? {
          color: theme.vars.palette.Alert[`${color2}IconColor`]
        } : {
          color: theme.palette[color2].main
        }
      }
    })), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color2]) => ({
      props: {
        colorSeverity: color2,
        variant: "outlined"
      },
      style: {
        color: theme.vars ? theme.vars.palette.Alert[`${color2}Color`] : getColor(theme.palette[color2].light, 0.6),
        border: `1px solid ${(theme.vars || theme).palette[color2].light}`,
        [`& .${alertClasses.icon}`]: theme.vars ? {
          color: theme.vars.palette.Alert[`${color2}IconColor`]
        } : {
          color: theme.palette[color2].main
        }
      }
    })), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.dark).map(([color2]) => ({
      props: {
        colorSeverity: color2,
        variant: "filled"
      },
      style: _extends$1({
        fontWeight: theme.typography.fontWeightMedium
      }, theme.vars ? {
        color: theme.vars.palette.Alert[`${color2}FilledColor`],
        backgroundColor: theme.vars.palette.Alert[`${color2}FilledBg`]
      } : {
        backgroundColor: theme.palette.mode === "dark" ? theme.palette[color2].dark : theme.palette[color2].main,
        color: theme.palette.getContrastText(theme.palette[color2].main)
      })
    }))]
  });
});
const AlertIcon = styled("div", {
  name: "MuiAlert",
  slot: "Icon",
  overridesResolver: (props, styles2) => styles2.icon
})({
  marginRight: 12,
  padding: "7px 0",
  display: "flex",
  fontSize: 22,
  opacity: 0.9
});
const AlertMessage = styled("div", {
  name: "MuiAlert",
  slot: "Message",
  overridesResolver: (props, styles2) => styles2.message
})({
  padding: "8px 0",
  minWidth: 0,
  overflow: "auto"
});
const AlertAction = styled("div", {
  name: "MuiAlert",
  slot: "Action",
  overridesResolver: (props, styles2) => styles2.action
})({
  display: "flex",
  alignItems: "flex-start",
  padding: "4px 0 0 16px",
  marginLeft: "auto",
  marginRight: -8
});
const defaultIconMapping = {
  success: /* @__PURE__ */ jsxRuntimeExports.jsx(SuccessOutlinedIcon, {
    fontSize: "inherit"
  }),
  warning: /* @__PURE__ */ jsxRuntimeExports.jsx(ReportProblemOutlinedIcon, {
    fontSize: "inherit"
  }),
  error: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorOutlineIcon, {
    fontSize: "inherit"
  }),
  info: /* @__PURE__ */ jsxRuntimeExports.jsx(InfoOutlinedIcon, {
    fontSize: "inherit"
  })
};
const Alert = /* @__PURE__ */ reactExports.forwardRef(function Alert2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiAlert"
  });
  const {
    action,
    children,
    className,
    closeText = "Close",
    color: color2,
    components = {},
    componentsProps = {},
    icon,
    iconMapping = defaultIconMapping,
    onClose,
    role = "alert",
    severity = "success",
    slotProps = {},
    slots = {},
    variant: variant2 = "standard"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1r);
  const ownerState = _extends$1({}, props, {
    color: color2,
    severity,
    variant: variant2,
    colorSeverity: color2 || severity
  });
  const classes = useUtilityClasses$1f(ownerState);
  const externalForwardedProps = {
    slots: _extends$1({
      closeButton: components.CloseButton,
      closeIcon: components.CloseIcon
    }, slots),
    slotProps: _extends$1({}, componentsProps, slotProps)
  };
  const [CloseButtonSlot, closeButtonProps] = useSlot("closeButton", {
    elementType: IconButton,
    externalForwardedProps,
    ownerState
  });
  const [CloseIconSlot, closeIconProps] = useSlot("closeIcon", {
    elementType: ClearIcon$2,
    externalForwardedProps,
    ownerState
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertRoot, _extends$1({
    role,
    elevation: 0,
    ownerState,
    className: clsx$3(classes.root, className),
    ref: ref2
  }, other, {
    children: [icon !== false ? /* @__PURE__ */ jsxRuntimeExports.jsx(AlertIcon, {
      ownerState,
      className: classes.icon,
      children: icon || iconMapping[severity] || defaultIconMapping[severity]
    }) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(AlertMessage, {
      ownerState,
      className: classes.message,
      children
    }), action != null ? /* @__PURE__ */ jsxRuntimeExports.jsx(AlertAction, {
      ownerState,
      className: classes.action,
      children: action
    }) : null, action == null && onClose ? /* @__PURE__ */ jsxRuntimeExports.jsx(AlertAction, {
      ownerState,
      className: classes.action,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseButtonSlot, _extends$1({
        size: "small",
        "aria-label": closeText,
        title: closeText,
        color: "inherit",
        onClick: onClose
      }, closeButtonProps, {
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIconSlot, _extends$1({
          fontSize: "small"
        }, closeIconProps))
      }))
    }) : null]
  }));
});
function getTypographyUtilityClass(slot) {
  return generateUtilityClass("MuiTypography", slot);
}
generateUtilityClasses("MuiTypography", ["root", "h1", "h2", "h3", "h4", "h5", "h6", "subtitle1", "subtitle2", "body1", "body2", "inherit", "button", "caption", "overline", "alignLeft", "alignRight", "alignCenter", "alignJustify", "noWrap", "gutterBottom", "paragraph"]);
const _excluded$1q = ["align", "className", "component", "gutterBottom", "noWrap", "paragraph", "variant", "variantMapping"];
const useUtilityClasses$1e = (ownerState) => {
  const {
    align,
    gutterBottom,
    noWrap,
    paragraph,
    variant: variant2,
    classes
  } = ownerState;
  const slots = {
    root: ["root", variant2, ownerState.align !== "inherit" && `align${capitalize$2(align)}`, gutterBottom && "gutterBottom", noWrap && "noWrap", paragraph && "paragraph"]
  };
  return composeClasses(slots, getTypographyUtilityClass, classes);
};
const TypographyRoot = styled("span", {
  name: "MuiTypography",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.variant && styles2[ownerState.variant], ownerState.align !== "inherit" && styles2[`align${capitalize$2(ownerState.align)}`], ownerState.noWrap && styles2.noWrap, ownerState.gutterBottom && styles2.gutterBottom, ownerState.paragraph && styles2.paragraph];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  margin: 0
}, ownerState.variant === "inherit" && {
  // Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.
  font: "inherit"
}, ownerState.variant !== "inherit" && theme.typography[ownerState.variant], ownerState.align !== "inherit" && {
  textAlign: ownerState.align
}, ownerState.noWrap && {
  overflow: "hidden",
  textOverflow: "ellipsis",
  whiteSpace: "nowrap"
}, ownerState.gutterBottom && {
  marginBottom: "0.35em"
}, ownerState.paragraph && {
  marginBottom: 16
}));
const defaultVariantMapping = {
  h1: "h1",
  h2: "h2",
  h3: "h3",
  h4: "h4",
  h5: "h5",
  h6: "h6",
  subtitle1: "h6",
  subtitle2: "h6",
  body1: "p",
  body2: "p",
  inherit: "p"
};
const colorTransformations$1 = {
  primary: "primary.main",
  textPrimary: "text.primary",
  secondary: "secondary.main",
  textSecondary: "text.secondary",
  error: "error.main"
};
const transformDeprecatedColors$1 = (color2) => {
  return colorTransformations$1[color2] || color2;
};
const Typography = /* @__PURE__ */ reactExports.forwardRef(function Typography2(inProps, ref2) {
  const themeProps = useDefaultProps({
    props: inProps,
    name: "MuiTypography"
  });
  const color2 = transformDeprecatedColors$1(themeProps.color);
  const props = extendSxProp(_extends$1({}, themeProps, {
    color: color2
  }));
  const {
    align = "inherit",
    className,
    component,
    gutterBottom = false,
    noWrap = false,
    paragraph = false,
    variant: variant2 = "body1",
    variantMapping = defaultVariantMapping
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1q);
  const ownerState = _extends$1({}, props, {
    align,
    color: color2,
    className,
    component,
    gutterBottom,
    noWrap,
    paragraph,
    variant: variant2,
    variantMapping
  });
  const Component = component || (paragraph ? "p" : variantMapping[variant2] || defaultVariantMapping[variant2]) || "span";
  const classes = useUtilityClasses$1e(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TypographyRoot, _extends$1({
    as: Component,
    ref: ref2,
    ownerState,
    className: clsx$3(classes.root, className)
  }, other));
});
function getAlertTitleUtilityClass(slot) {
  return generateUtilityClass("MuiAlertTitle", slot);
}
generateUtilityClasses("MuiAlertTitle", ["root"]);
const _excluded$1p = ["className"];
const useUtilityClasses$1d = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getAlertTitleUtilityClass, classes);
};
const AlertTitleRoot = styled(Typography, {
  name: "MuiAlertTitle",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})(({
  theme
}) => {
  return {
    fontWeight: theme.typography.fontWeightMedium,
    marginTop: -2
  };
});
const AlertTitle = /* @__PURE__ */ reactExports.forwardRef(function AlertTitle2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiAlertTitle"
  });
  const {
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1p);
  const ownerState = props;
  const classes = useUtilityClasses$1d(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(AlertTitleRoot, _extends$1({
    gutterBottom: true,
    component: "div",
    ownerState,
    ref: ref2,
    className: clsx$3(classes.root, className)
  }, other));
});
function getAppBarUtilityClass(slot) {
  return generateUtilityClass("MuiAppBar", slot);
}
generateUtilityClasses("MuiAppBar", ["root", "positionFixed", "positionAbsolute", "positionSticky", "positionStatic", "positionRelative", "colorDefault", "colorPrimary", "colorSecondary", "colorInherit", "colorTransparent", "colorError", "colorInfo", "colorSuccess", "colorWarning"]);
const _excluded$1o = ["className", "color", "enableColorOnDark", "position"];
const useUtilityClasses$1c = (ownerState) => {
  const {
    color: color2,
    position: position2,
    classes
  } = ownerState;
  const slots = {
    root: ["root", `color${capitalize$2(color2)}`, `position${capitalize$2(position2)}`]
  };
  return composeClasses(slots, getAppBarUtilityClass, classes);
};
const joinVars = (var1, var2) => var1 ? `${var1 == null ? void 0 : var1.replace(")", "")}, ${var2})` : var2;
const AppBarRoot = styled(Paper, {
  name: "MuiAppBar",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[`position${capitalize$2(ownerState.position)}`], styles2[`color${capitalize$2(ownerState.color)}`]];
  }
})(({
  theme,
  ownerState
}) => {
  const backgroundColorDefault = theme.palette.mode === "light" ? theme.palette.grey[100] : theme.palette.grey[900];
  return _extends$1({
    display: "flex",
    flexDirection: "column",
    width: "100%",
    boxSizing: "border-box",
    // Prevent padding issue with the Modal and fixed positioned AppBar.
    flexShrink: 0
  }, ownerState.position === "fixed" && {
    position: "fixed",
    zIndex: (theme.vars || theme).zIndex.appBar,
    top: 0,
    left: "auto",
    right: 0,
    "@media print": {
      // Prevent the app bar to be visible on each printed page.
      position: "absolute"
    }
  }, ownerState.position === "absolute" && {
    position: "absolute",
    zIndex: (theme.vars || theme).zIndex.appBar,
    top: 0,
    left: "auto",
    right: 0
  }, ownerState.position === "sticky" && {
    // ⚠️ sticky is not supported by IE11.
    position: "sticky",
    zIndex: (theme.vars || theme).zIndex.appBar,
    top: 0,
    left: "auto",
    right: 0
  }, ownerState.position === "static" && {
    position: "static"
  }, ownerState.position === "relative" && {
    position: "relative"
  }, !theme.vars && _extends$1({}, ownerState.color === "default" && {
    backgroundColor: backgroundColorDefault,
    color: theme.palette.getContrastText(backgroundColorDefault)
  }, ownerState.color && ownerState.color !== "default" && ownerState.color !== "inherit" && ownerState.color !== "transparent" && {
    backgroundColor: theme.palette[ownerState.color].main,
    color: theme.palette[ownerState.color].contrastText
  }, ownerState.color === "inherit" && {
    color: "inherit"
  }, theme.palette.mode === "dark" && !ownerState.enableColorOnDark && {
    backgroundColor: null,
    color: null
  }, ownerState.color === "transparent" && _extends$1({
    backgroundColor: "transparent",
    color: "inherit"
  }, theme.palette.mode === "dark" && {
    backgroundImage: "none"
  })), theme.vars && _extends$1({}, ownerState.color === "default" && {
    "--AppBar-background": ownerState.enableColorOnDark ? theme.vars.palette.AppBar.defaultBg : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette.AppBar.defaultBg),
    "--AppBar-color": ownerState.enableColorOnDark ? theme.vars.palette.text.primary : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette.text.primary)
  }, ownerState.color && !ownerState.color.match(/^(default|inherit|transparent)$/) && {
    "--AppBar-background": ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].main : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette[ownerState.color].main),
    "--AppBar-color": ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].contrastText : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette[ownerState.color].contrastText)
  }, !["inherit", "transparent"].includes(ownerState.color) && {
    backgroundColor: "var(--AppBar-background)"
  }, {
    color: ownerState.color === "inherit" ? "inherit" : "var(--AppBar-color)"
  }, ownerState.color === "transparent" && {
    backgroundImage: "none",
    backgroundColor: "transparent",
    color: "inherit"
  }));
});
const AppBar = /* @__PURE__ */ reactExports.forwardRef(function AppBar2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiAppBar"
  });
  const {
    className,
    color: color2 = "primary",
    enableColorOnDark = false,
    position: position2 = "fixed"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1o);
  const ownerState = _extends$1({}, props, {
    color: color2,
    position: position2,
    enableColorOnDark
  });
  const classes = useUtilityClasses$1c(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(AppBarRoot, _extends$1({
    square: true,
    component: "header",
    ownerState,
    elevation: 4,
    className: clsx$3(classes.root, className, position2 === "fixed" && "mui-fixed"),
    ref: ref2
  }, other));
});
function stripDiacritics(string) {
  return typeof string.normalize !== "undefined" ? string.normalize("NFD").replace(/[\u0300-\u036f]/g, "") : string;
}
function createFilterOptions(config2 = {}) {
  const {
    ignoreAccents = true,
    ignoreCase = true,
    limit,
    matchFrom = "any",
    stringify: stringify2,
    trim: trim2 = false
  } = config2;
  return (options, {
    inputValue,
    getOptionLabel
  }) => {
    let input = trim2 ? inputValue.trim() : inputValue;
    if (ignoreCase) {
      input = input.toLowerCase();
    }
    if (ignoreAccents) {
      input = stripDiacritics(input);
    }
    const filteredOptions = !input ? options : options.filter((option) => {
      let candidate = (stringify2 || getOptionLabel)(option);
      if (ignoreCase) {
        candidate = candidate.toLowerCase();
      }
      if (ignoreAccents) {
        candidate = stripDiacritics(candidate);
      }
      return matchFrom === "start" ? candidate.indexOf(input) === 0 : candidate.indexOf(input) > -1;
    });
    return typeof limit === "number" ? filteredOptions.slice(0, limit) : filteredOptions;
  };
}
function findIndex(array, comp) {
  for (let i = 0; i < array.length; i += 1) {
    if (comp(array[i])) {
      return i;
    }
  }
  return -1;
}
const defaultFilterOptions = createFilterOptions();
const pageSize = 5;
const defaultIsActiveElementInListbox = (listboxRef) => {
  var _listboxRef$current$p;
  return listboxRef.current !== null && ((_listboxRef$current$p = listboxRef.current.parentElement) == null ? void 0 : _listboxRef$current$p.contains(document.activeElement));
};
const MULTIPLE_DEFAULT_VALUE = [];
function useAutocomplete(props) {
  const {
    // eslint-disable-next-line @typescript-eslint/naming-convention
    unstable_isActiveElementInListbox = defaultIsActiveElementInListbox,
    // eslint-disable-next-line @typescript-eslint/naming-convention
    unstable_classNamePrefix = "Mui",
    autoComplete = false,
    autoHighlight = false,
    autoSelect = false,
    blurOnSelect = false,
    clearOnBlur = !props.freeSolo,
    clearOnEscape = false,
    componentName = "useAutocomplete",
    defaultValue = props.multiple ? MULTIPLE_DEFAULT_VALUE : null,
    disableClearable = false,
    disableCloseOnSelect = false,
    disabled: disabledProp,
    disabledItemsFocusable = false,
    disableListWrap = false,
    filterOptions = defaultFilterOptions,
    filterSelectedOptions = false,
    freeSolo = false,
    getOptionDisabled,
    getOptionKey,
    getOptionLabel: getOptionLabelProp = (option) => {
      var _option$label;
      return (_option$label = option.label) != null ? _option$label : option;
    },
    groupBy,
    handleHomeEndKeys = !props.freeSolo,
    id: idProp,
    includeInputInList = false,
    inputValue: inputValueProp,
    isOptionEqualToValue = (option, value2) => option === value2,
    multiple = false,
    onChange,
    onClose,
    onHighlightChange,
    onInputChange,
    onOpen,
    open: openProp,
    openOnFocus = false,
    options,
    readOnly = false,
    selectOnFocus = !props.freeSolo,
    value: valueProp
  } = props;
  const id = useId$1(idProp);
  let getOptionLabel = getOptionLabelProp;
  getOptionLabel = (option) => {
    const optionLabel = getOptionLabelProp(option);
    if (typeof optionLabel !== "string") {
      return String(optionLabel);
    }
    return optionLabel;
  };
  const ignoreFocus = reactExports.useRef(false);
  const firstFocus = reactExports.useRef(true);
  const inputRef = reactExports.useRef(null);
  const listboxRef = reactExports.useRef(null);
  const [anchorEl, setAnchorEl] = reactExports.useState(null);
  const [focusedTag, setFocusedTag] = reactExports.useState(-1);
  const defaultHighlighted = autoHighlight ? 0 : -1;
  const highlightedIndexRef = reactExports.useRef(defaultHighlighted);
  const [value, setValueState] = useControlled({
    controlled: valueProp,
    default: defaultValue,
    name: componentName
  });
  const [inputValue, setInputValueState] = useControlled({
    controlled: inputValueProp,
    default: "",
    name: componentName,
    state: "inputValue"
  });
  const [focused, setFocused] = reactExports.useState(false);
  const resetInputValue = reactExports.useCallback((event, newValue) => {
    const isOptionSelected = multiple ? value.length < newValue.length : newValue !== null;
    if (!isOptionSelected && !clearOnBlur) {
      return;
    }
    let newInputValue;
    if (multiple) {
      newInputValue = "";
    } else if (newValue == null) {
      newInputValue = "";
    } else {
      const optionLabel = getOptionLabel(newValue);
      newInputValue = typeof optionLabel === "string" ? optionLabel : "";
    }
    if (inputValue === newInputValue) {
      return;
    }
    setInputValueState(newInputValue);
    if (onInputChange) {
      onInputChange(event, newInputValue, "reset");
    }
  }, [getOptionLabel, inputValue, multiple, onInputChange, setInputValueState, clearOnBlur, value]);
  const [open, setOpenState] = useControlled({
    controlled: openProp,
    default: false,
    name: componentName,
    state: "open"
  });
  const [inputPristine, setInputPristine] = reactExports.useState(true);
  const inputValueIsSelectedValue = !multiple && value != null && inputValue === getOptionLabel(value);
  const popupOpen = open && !readOnly;
  const filteredOptions = popupOpen ? filterOptions(
    options.filter((option) => {
      if (filterSelectedOptions && (multiple ? value : [value]).some((value2) => value2 !== null && isOptionEqualToValue(option, value2))) {
        return false;
      }
      return true;
    }),
    // we use the empty string to manipulate `filterOptions` to not filter any options
    // i.e. the filter predicate always returns true
    {
      inputValue: inputValueIsSelectedValue && inputPristine ? "" : inputValue,
      getOptionLabel
    }
  ) : [];
  const previousProps = usePreviousProps({
    filteredOptions,
    value,
    inputValue
  });
  reactExports.useEffect(() => {
    const valueChange = value !== previousProps.value;
    if (focused && !valueChange) {
      return;
    }
    if (freeSolo && !valueChange) {
      return;
    }
    resetInputValue(null, value);
  }, [value, resetInputValue, focused, previousProps.value, freeSolo]);
  const listboxAvailable = open && filteredOptions.length > 0 && !readOnly;
  const focusTag = useEventCallback((tagToFocus) => {
    if (tagToFocus === -1) {
      inputRef.current.focus();
    } else {
      anchorEl.querySelector(`[data-tag-index="${tagToFocus}"]`).focus();
    }
  });
  reactExports.useEffect(() => {
    if (multiple && focusedTag > value.length - 1) {
      setFocusedTag(-1);
      focusTag(-1);
    }
  }, [value, multiple, focusedTag, focusTag]);
  function validOptionIndex(index2, direction2) {
    if (!listboxRef.current || index2 < 0 || index2 >= filteredOptions.length) {
      return -1;
    }
    let nextFocus = index2;
    while (true) {
      const option = listboxRef.current.querySelector(`[data-option-index="${nextFocus}"]`);
      const nextFocusDisabled = disabledItemsFocusable ? false : !option || option.disabled || option.getAttribute("aria-disabled") === "true";
      if (option && option.hasAttribute("tabindex") && !nextFocusDisabled) {
        return nextFocus;
      }
      if (direction2 === "next") {
        nextFocus = (nextFocus + 1) % filteredOptions.length;
      } else {
        nextFocus = (nextFocus - 1 + filteredOptions.length) % filteredOptions.length;
      }
      if (nextFocus === index2) {
        return -1;
      }
    }
  }
  const setHighlightedIndex = useEventCallback(({
    event,
    index: index2,
    reason = "auto"
  }) => {
    highlightedIndexRef.current = index2;
    if (index2 === -1) {
      inputRef.current.removeAttribute("aria-activedescendant");
    } else {
      inputRef.current.setAttribute("aria-activedescendant", `${id}-option-${index2}`);
    }
    if (onHighlightChange) {
      onHighlightChange(event, index2 === -1 ? null : filteredOptions[index2], reason);
    }
    if (!listboxRef.current) {
      return;
    }
    const prev2 = listboxRef.current.querySelector(`[role="option"].${unstable_classNamePrefix}-focused`);
    if (prev2) {
      prev2.classList.remove(`${unstable_classNamePrefix}-focused`);
      prev2.classList.remove(`${unstable_classNamePrefix}-focusVisible`);
    }
    let listboxNode = listboxRef.current;
    if (listboxRef.current.getAttribute("role") !== "listbox") {
      listboxNode = listboxRef.current.parentElement.querySelector('[role="listbox"]');
    }
    if (!listboxNode) {
      return;
    }
    if (index2 === -1) {
      listboxNode.scrollTop = 0;
      return;
    }
    const option = listboxRef.current.querySelector(`[data-option-index="${index2}"]`);
    if (!option) {
      return;
    }
    option.classList.add(`${unstable_classNamePrefix}-focused`);
    if (reason === "keyboard") {
      option.classList.add(`${unstable_classNamePrefix}-focusVisible`);
    }
    if (listboxNode.scrollHeight > listboxNode.clientHeight && reason !== "mouse" && reason !== "touch") {
      const element = option;
      const scrollBottom = listboxNode.clientHeight + listboxNode.scrollTop;
      const elementBottom = element.offsetTop + element.offsetHeight;
      if (elementBottom > scrollBottom) {
        listboxNode.scrollTop = elementBottom - listboxNode.clientHeight;
      } else if (element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0) < listboxNode.scrollTop) {
        listboxNode.scrollTop = element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0);
      }
    }
  });
  const changeHighlightedIndex = useEventCallback(({
    event,
    diff,
    direction: direction2 = "next",
    reason = "auto"
  }) => {
    if (!popupOpen) {
      return;
    }
    const getNextIndex = () => {
      const maxIndex = filteredOptions.length - 1;
      if (diff === "reset") {
        return defaultHighlighted;
      }
      if (diff === "start") {
        return 0;
      }
      if (diff === "end") {
        return maxIndex;
      }
      const newIndex = highlightedIndexRef.current + diff;
      if (newIndex < 0) {
        if (newIndex === -1 && includeInputInList) {
          return -1;
        }
        if (disableListWrap && highlightedIndexRef.current !== -1 || Math.abs(diff) > 1) {
          return 0;
        }
        return maxIndex;
      }
      if (newIndex > maxIndex) {
        if (newIndex === maxIndex + 1 && includeInputInList) {
          return -1;
        }
        if (disableListWrap || Math.abs(diff) > 1) {
          return maxIndex;
        }
        return 0;
      }
      return newIndex;
    };
    const nextIndex = validOptionIndex(getNextIndex(), direction2);
    setHighlightedIndex({
      index: nextIndex,
      reason,
      event
    });
    if (autoComplete && diff !== "reset") {
      if (nextIndex === -1) {
        inputRef.current.value = inputValue;
      } else {
        const option = getOptionLabel(filteredOptions[nextIndex]);
        inputRef.current.value = option;
        const index2 = option.toLowerCase().indexOf(inputValue.toLowerCase());
        if (index2 === 0 && inputValue.length > 0) {
          inputRef.current.setSelectionRange(inputValue.length, option.length);
        }
      }
    }
  });
  const getPreviousHighlightedOptionIndex = () => {
    const isSameValue = (value1, value2) => {
      const label1 = value1 ? getOptionLabel(value1) : "";
      const label2 = value2 ? getOptionLabel(value2) : "";
      return label1 === label2;
    };
    if (highlightedIndexRef.current !== -1 && previousProps.filteredOptions && previousProps.filteredOptions.length !== filteredOptions.length && previousProps.inputValue === inputValue && (multiple ? value.length === previousProps.value.length && previousProps.value.every((val, i) => getOptionLabel(value[i]) === getOptionLabel(val)) : isSameValue(previousProps.value, value))) {
      const previousHighlightedOption = previousProps.filteredOptions[highlightedIndexRef.current];
      if (previousHighlightedOption) {
        return findIndex(filteredOptions, (option) => {
          return getOptionLabel(option) === getOptionLabel(previousHighlightedOption);
        });
      }
    }
    return -1;
  };
  const syncHighlightedIndex = reactExports.useCallback(() => {
    if (!popupOpen) {
      return;
    }
    const previousHighlightedOptionIndex = getPreviousHighlightedOptionIndex();
    if (previousHighlightedOptionIndex !== -1) {
      highlightedIndexRef.current = previousHighlightedOptionIndex;
      return;
    }
    const valueItem = multiple ? value[0] : value;
    if (filteredOptions.length === 0 || valueItem == null) {
      changeHighlightedIndex({
        diff: "reset"
      });
      return;
    }
    if (!listboxRef.current) {
      return;
    }
    if (valueItem != null) {
      const currentOption = filteredOptions[highlightedIndexRef.current];
      if (multiple && currentOption && findIndex(value, (val) => isOptionEqualToValue(currentOption, val)) !== -1) {
        return;
      }
      const itemIndex = findIndex(filteredOptions, (optionItem) => isOptionEqualToValue(optionItem, valueItem));
      if (itemIndex === -1) {
        changeHighlightedIndex({
          diff: "reset"
        });
      } else {
        setHighlightedIndex({
          index: itemIndex
        });
      }
      return;
    }
    if (highlightedIndexRef.current >= filteredOptions.length - 1) {
      setHighlightedIndex({
        index: filteredOptions.length - 1
      });
      return;
    }
    setHighlightedIndex({
      index: highlightedIndexRef.current
    });
  }, [
    // Only sync the highlighted index when the option switch between empty and not
    filteredOptions.length,
    // Don't sync the highlighted index with the value when multiple
    // eslint-disable-next-line react-hooks/exhaustive-deps
    multiple ? false : value,
    filterSelectedOptions,
    changeHighlightedIndex,
    setHighlightedIndex,
    popupOpen,
    inputValue,
    multiple
  ]);
  const handleListboxRef = useEventCallback((node2) => {
    setRef(listboxRef, node2);
    if (!node2) {
      return;
    }
    syncHighlightedIndex();
  });
  reactExports.useEffect(() => {
    syncHighlightedIndex();
  }, [syncHighlightedIndex]);
  const handleOpen = (event) => {
    if (open) {
      return;
    }
    setOpenState(true);
    setInputPristine(true);
    if (onOpen) {
      onOpen(event);
    }
  };
  const handleClose = (event, reason) => {
    if (!open) {
      return;
    }
    setOpenState(false);
    if (onClose) {
      onClose(event, reason);
    }
  };
  const handleValue = (event, newValue, reason, details) => {
    if (multiple) {
      if (value.length === newValue.length && value.every((val, i) => val === newValue[i])) {
        return;
      }
    } else if (value === newValue) {
      return;
    }
    if (onChange) {
      onChange(event, newValue, reason, details);
    }
    setValueState(newValue);
  };
  const isTouch = reactExports.useRef(false);
  const selectNewValue = (event, option, reasonProp = "selectOption", origin2 = "options") => {
    let reason = reasonProp;
    let newValue = option;
    if (multiple) {
      newValue = Array.isArray(value) ? value.slice() : [];
      const itemIndex = findIndex(newValue, (valueItem) => isOptionEqualToValue(option, valueItem));
      if (itemIndex === -1) {
        newValue.push(option);
      } else if (origin2 !== "freeSolo") {
        newValue.splice(itemIndex, 1);
        reason = "removeOption";
      }
    }
    resetInputValue(event, newValue);
    handleValue(event, newValue, reason, {
      option
    });
    if (!disableCloseOnSelect && (!event || !event.ctrlKey && !event.metaKey)) {
      handleClose(event, reason);
    }
    if (blurOnSelect === true || blurOnSelect === "touch" && isTouch.current || blurOnSelect === "mouse" && !isTouch.current) {
      inputRef.current.blur();
    }
  };
  function validTagIndex(index2, direction2) {
    if (index2 === -1) {
      return -1;
    }
    let nextFocus = index2;
    while (true) {
      if (direction2 === "next" && nextFocus === value.length || direction2 === "previous" && nextFocus === -1) {
        return -1;
      }
      const option = anchorEl.querySelector(`[data-tag-index="${nextFocus}"]`);
      if (!option || !option.hasAttribute("tabindex") || option.disabled || option.getAttribute("aria-disabled") === "true") {
        nextFocus += direction2 === "next" ? 1 : -1;
      } else {
        return nextFocus;
      }
    }
  }
  const handleFocusTag = (event, direction2) => {
    if (!multiple) {
      return;
    }
    if (inputValue === "") {
      handleClose(event, "toggleInput");
    }
    let nextTag = focusedTag;
    if (focusedTag === -1) {
      if (inputValue === "" && direction2 === "previous") {
        nextTag = value.length - 1;
      }
    } else {
      nextTag += direction2 === "next" ? 1 : -1;
      if (nextTag < 0) {
        nextTag = 0;
      }
      if (nextTag === value.length) {
        nextTag = -1;
      }
    }
    nextTag = validTagIndex(nextTag, direction2);
    setFocusedTag(nextTag);
    focusTag(nextTag);
  };
  const handleClear = (event) => {
    ignoreFocus.current = true;
    setInputValueState("");
    if (onInputChange) {
      onInputChange(event, "", "clear");
    }
    handleValue(event, multiple ? [] : null, "clear");
  };
  const handleKeyDown2 = (other) => (event) => {
    if (other.onKeyDown) {
      other.onKeyDown(event);
    }
    if (event.defaultMuiPrevented) {
      return;
    }
    if (focusedTag !== -1 && ["ArrowLeft", "ArrowRight"].indexOf(event.key) === -1) {
      setFocusedTag(-1);
      focusTag(-1);
    }
    if (event.which !== 229) {
      switch (event.key) {
        case "Home":
          if (popupOpen && handleHomeEndKeys) {
            event.preventDefault();
            changeHighlightedIndex({
              diff: "start",
              direction: "next",
              reason: "keyboard",
              event
            });
          }
          break;
        case "End":
          if (popupOpen && handleHomeEndKeys) {
            event.preventDefault();
            changeHighlightedIndex({
              diff: "end",
              direction: "previous",
              reason: "keyboard",
              event
            });
          }
          break;
        case "PageUp":
          event.preventDefault();
          changeHighlightedIndex({
            diff: -5,
            direction: "previous",
            reason: "keyboard",
            event
          });
          handleOpen(event);
          break;
        case "PageDown":
          event.preventDefault();
          changeHighlightedIndex({
            diff: pageSize,
            direction: "next",
            reason: "keyboard",
            event
          });
          handleOpen(event);
          break;
        case "ArrowDown":
          event.preventDefault();
          changeHighlightedIndex({
            diff: 1,
            direction: "next",
            reason: "keyboard",
            event
          });
          handleOpen(event);
          break;
        case "ArrowUp":
          event.preventDefault();
          changeHighlightedIndex({
            diff: -1,
            direction: "previous",
            reason: "keyboard",
            event
          });
          handleOpen(event);
          break;
        case "ArrowLeft":
          handleFocusTag(event, "previous");
          break;
        case "ArrowRight":
          handleFocusTag(event, "next");
          break;
        case "Enter":
          if (highlightedIndexRef.current !== -1 && popupOpen) {
            const option = filteredOptions[highlightedIndexRef.current];
            const disabled = getOptionDisabled ? getOptionDisabled(option) : false;
            event.preventDefault();
            if (disabled) {
              return;
            }
            selectNewValue(event, option, "selectOption");
            if (autoComplete) {
              inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);
            }
          } else if (freeSolo && inputValue !== "" && inputValueIsSelectedValue === false) {
            if (multiple) {
              event.preventDefault();
            }
            selectNewValue(event, inputValue, "createOption", "freeSolo");
          }
          break;
        case "Escape":
          if (popupOpen) {
            event.preventDefault();
            event.stopPropagation();
            handleClose(event, "escape");
          } else if (clearOnEscape && (inputValue !== "" || multiple && value.length > 0)) {
            event.preventDefault();
            event.stopPropagation();
            handleClear(event);
          }
          break;
        case "Backspace":
          if (multiple && !readOnly && inputValue === "" && value.length > 0) {
            const index2 = focusedTag === -1 ? value.length - 1 : focusedTag;
            const newValue = value.slice();
            newValue.splice(index2, 1);
            handleValue(event, newValue, "removeOption", {
              option: value[index2]
            });
          }
          break;
        case "Delete":
          if (multiple && !readOnly && inputValue === "" && value.length > 0 && focusedTag !== -1) {
            const index2 = focusedTag;
            const newValue = value.slice();
            newValue.splice(index2, 1);
            handleValue(event, newValue, "removeOption", {
              option: value[index2]
            });
          }
          break;
      }
    }
  };
  const handleFocus = (event) => {
    setFocused(true);
    if (openOnFocus && !ignoreFocus.current) {
      handleOpen(event);
    }
  };
  const handleBlur = (event) => {
    if (unstable_isActiveElementInListbox(listboxRef)) {
      inputRef.current.focus();
      return;
    }
    setFocused(false);
    firstFocus.current = true;
    ignoreFocus.current = false;
    if (autoSelect && highlightedIndexRef.current !== -1 && popupOpen) {
      selectNewValue(event, filteredOptions[highlightedIndexRef.current], "blur");
    } else if (autoSelect && freeSolo && inputValue !== "") {
      selectNewValue(event, inputValue, "blur", "freeSolo");
    } else if (clearOnBlur) {
      resetInputValue(event, value);
    }
    handleClose(event, "blur");
  };
  const handleInputChange = (event) => {
    const newValue = event.target.value;
    if (inputValue !== newValue) {
      setInputValueState(newValue);
      setInputPristine(false);
      if (onInputChange) {
        onInputChange(event, newValue, "input");
      }
    }
    if (newValue === "") {
      if (!disableClearable && !multiple) {
        handleValue(event, null, "clear");
      }
    } else {
      handleOpen(event);
    }
  };
  const handleOptionMouseMove = (event) => {
    const index2 = Number(event.currentTarget.getAttribute("data-option-index"));
    if (highlightedIndexRef.current !== index2) {
      setHighlightedIndex({
        event,
        index: index2,
        reason: "mouse"
      });
    }
  };
  const handleOptionTouchStart = (event) => {
    setHighlightedIndex({
      event,
      index: Number(event.currentTarget.getAttribute("data-option-index")),
      reason: "touch"
    });
    isTouch.current = true;
  };
  const handleOptionClick = (event) => {
    const index2 = Number(event.currentTarget.getAttribute("data-option-index"));
    selectNewValue(event, filteredOptions[index2], "selectOption");
    isTouch.current = false;
  };
  const handleTagDelete = (index2) => (event) => {
    const newValue = value.slice();
    newValue.splice(index2, 1);
    handleValue(event, newValue, "removeOption", {
      option: value[index2]
    });
  };
  const handlePopupIndicator = (event) => {
    if (open) {
      handleClose(event, "toggleInput");
    } else {
      handleOpen(event);
    }
  };
  const handleMouseDown = (event) => {
    if (!event.currentTarget.contains(event.target)) {
      return;
    }
    if (event.target.getAttribute("id") !== id) {
      event.preventDefault();
    }
  };
  const handleClick = (event) => {
    if (!event.currentTarget.contains(event.target)) {
      return;
    }
    inputRef.current.focus();
    if (selectOnFocus && firstFocus.current && inputRef.current.selectionEnd - inputRef.current.selectionStart === 0) {
      inputRef.current.select();
    }
    firstFocus.current = false;
  };
  const handleInputMouseDown = (event) => {
    if (!disabledProp && (inputValue === "" || !open)) {
      handlePopupIndicator(event);
    }
  };
  let dirty = freeSolo && inputValue.length > 0;
  dirty = dirty || (multiple ? value.length > 0 : value !== null);
  let groupedOptions = filteredOptions;
  if (groupBy) {
    groupedOptions = filteredOptions.reduce((acc, option, index2) => {
      const group = groupBy(option);
      if (acc.length > 0 && acc[acc.length - 1].group === group) {
        acc[acc.length - 1].options.push(option);
      } else {
        acc.push({
          key: index2,
          index: index2,
          group,
          options: [option]
        });
      }
      return acc;
    }, []);
  }
  if (disabledProp && focused) {
    handleBlur();
  }
  return {
    getRootProps: (other = {}) => _extends$1({
      "aria-owns": listboxAvailable ? `${id}-listbox` : null
    }, other, {
      onKeyDown: handleKeyDown2(other),
      onMouseDown: handleMouseDown,
      onClick: handleClick
    }),
    getInputLabelProps: () => ({
      id: `${id}-label`,
      htmlFor: id
    }),
    getInputProps: () => ({
      id,
      value: inputValue,
      onBlur: handleBlur,
      onFocus: handleFocus,
      onChange: handleInputChange,
      onMouseDown: handleInputMouseDown,
      // if open then this is handled imperatively so don't let react override
      // only have an opinion about this when closed
      "aria-activedescendant": popupOpen ? "" : null,
      "aria-autocomplete": autoComplete ? "both" : "list",
      "aria-controls": listboxAvailable ? `${id}-listbox` : void 0,
      "aria-expanded": listboxAvailable,
      // Disable browser's suggestion that might overlap with the popup.
      // Handle autocomplete but not autofill.
      autoComplete: "off",
      ref: inputRef,
      autoCapitalize: "none",
      spellCheck: "false",
      role: "combobox",
      disabled: disabledProp
    }),
    getClearProps: () => ({
      tabIndex: -1,
      type: "button",
      onClick: handleClear
    }),
    getPopupIndicatorProps: () => ({
      tabIndex: -1,
      type: "button",
      onClick: handlePopupIndicator
    }),
    getTagProps: ({
      index: index2
    }) => _extends$1({
      key: index2,
      "data-tag-index": index2,
      tabIndex: -1
    }, !readOnly && {
      onDelete: handleTagDelete(index2)
    }),
    getListboxProps: () => ({
      role: "listbox",
      id: `${id}-listbox`,
      "aria-labelledby": `${id}-label`,
      ref: handleListboxRef,
      onMouseDown: (event) => {
        event.preventDefault();
      }
    }),
    getOptionProps: ({
      index: index2,
      option
    }) => {
      var _getOptionKey;
      const selected = (multiple ? value : [value]).some((value2) => value2 != null && isOptionEqualToValue(option, value2));
      const disabled = getOptionDisabled ? getOptionDisabled(option) : false;
      return {
        key: (_getOptionKey = getOptionKey == null ? void 0 : getOptionKey(option)) != null ? _getOptionKey : getOptionLabel(option),
        tabIndex: -1,
        role: "option",
        id: `${id}-option-${index2}`,
        onMouseMove: handleOptionMouseMove,
        onClick: handleOptionClick,
        onTouchStart: handleOptionTouchStart,
        "data-option-index": index2,
        "aria-disabled": disabled,
        "aria-selected": selected
      };
    },
    id,
    inputValue,
    value,
    dirty,
    expanded: popupOpen && anchorEl,
    popupOpen,
    focused: focused || focusedTag !== -1,
    anchorEl,
    setAnchorEl,
    focusedTag,
    groupedOptions
  };
}
var useThemeWithoutDefault = {};
var hasRequiredUseThemeWithoutDefault;
function requireUseThemeWithoutDefault() {
  if (hasRequiredUseThemeWithoutDefault) return useThemeWithoutDefault;
  hasRequiredUseThemeWithoutDefault = 1;
  Object.defineProperty(useThemeWithoutDefault, "__esModule", {
    value: true
  });
  useThemeWithoutDefault.default = void 0;
  var React2 = _interopRequireWildcard(requireReact());
  var _styledEngine = require$$1;
  function _getRequireWildcardCache(e2) {
    if ("function" != typeof WeakMap) return null;
    var r2 = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap();
    return (_getRequireWildcardCache = function(e3) {
      return e3 ? t : r2;
    })(e2);
  }
  function _interopRequireWildcard(e2, r2) {
    if (e2 && e2.__esModule) return e2;
    if (null === e2 || "object" != typeof e2 && "function" != typeof e2) return { default: e2 };
    var t = _getRequireWildcardCache(r2);
    if (t && t.has(e2)) return t.get(e2);
    var n = { __proto__: null }, a2 = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for (var u2 in e2) if ("default" !== u2 && Object.prototype.hasOwnProperty.call(e2, u2)) {
      var i = a2 ? Object.getOwnPropertyDescriptor(e2, u2) : null;
      i && (i.get || i.set) ? Object.defineProperty(n, u2, i) : n[u2] = e2[u2];
    }
    return n.default = e2, t && t.set(e2, n), n;
  }
  function isObjectEmpty2(obj2) {
    return Object.keys(obj2).length === 0;
  }
  function useTheme2(defaultTheme2 = null) {
    const contextTheme = React2.useContext(_styledEngine.ThemeContext);
    return !contextTheme || isObjectEmpty2(contextTheme) ? defaultTheme2 : contextTheme;
  }
  useThemeWithoutDefault.default = useTheme2;
  return useThemeWithoutDefault;
}
var useThemeWithoutDefaultExports = /* @__PURE__ */ requireUseThemeWithoutDefault();
const useTheme = /* @__PURE__ */ getDefaultExportFromCjs(useThemeWithoutDefaultExports);
var top = "top";
var bottom = "bottom";
var right = "right";
var left = "left";
var auto = "auto";
var basePlacements = [top, bottom, right, left];
var start = "start";
var end = "end";
var clippingParents = "clippingParents";
var viewport = "viewport";
var popper = "popper";
var reference = "reference";
var variationPlacements = /* @__PURE__ */ basePlacements.reduce(function(acc, placement) {
  return acc.concat([placement + "-" + start, placement + "-" + end]);
}, []);
var placements = /* @__PURE__ */ [].concat(basePlacements, [auto]).reduce(function(acc, placement) {
  return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
}, []);
var beforeRead = "beforeRead";
var read = "read";
var afterRead = "afterRead";
var beforeMain = "beforeMain";
var main$1 = "main";
var afterMain = "afterMain";
var beforeWrite = "beforeWrite";
var write = "write";
var afterWrite = "afterWrite";
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main$1, afterMain, beforeWrite, write, afterWrite];
function getNodeName(element) {
  return element ? (element.nodeName || "").toLowerCase() : null;
}
function getWindow(node2) {
  if (node2 == null) {
    return window;
  }
  if (node2.toString() !== "[object Window]") {
    var ownerDocument2 = node2.ownerDocument;
    return ownerDocument2 ? ownerDocument2.defaultView || window : window;
  }
  return node2;
}
function isElement(node2) {
  var OwnElement = getWindow(node2).Element;
  return node2 instanceof OwnElement || node2 instanceof Element;
}
function isHTMLElement$2(node2) {
  var OwnElement = getWindow(node2).HTMLElement;
  return node2 instanceof OwnElement || node2 instanceof HTMLElement;
}
function isShadowRoot(node2) {
  if (typeof ShadowRoot === "undefined") {
    return false;
  }
  var OwnElement = getWindow(node2).ShadowRoot;
  return node2 instanceof OwnElement || node2 instanceof ShadowRoot;
}
function applyStyles(_ref) {
  var state = _ref.state;
  Object.keys(state.elements).forEach(function(name) {
    var style2 = state.styles[name] || {};
    var attributes = state.attributes[name] || {};
    var element = state.elements[name];
    if (!isHTMLElement$2(element) || !getNodeName(element)) {
      return;
    }
    Object.assign(element.style, style2);
    Object.keys(attributes).forEach(function(name2) {
      var value = attributes[name2];
      if (value === false) {
        element.removeAttribute(name2);
      } else {
        element.setAttribute(name2, value === true ? "" : value);
      }
    });
  });
}
function effect$2(_ref2) {
  var state = _ref2.state;
  var initialStyles = {
    popper: {
      position: state.options.strategy,
      left: "0",
      top: "0",
      margin: "0"
    },
    arrow: {
      position: "absolute"
    },
    reference: {}
  };
  Object.assign(state.elements.popper.style, initialStyles.popper);
  state.styles = initialStyles;
  if (state.elements.arrow) {
    Object.assign(state.elements.arrow.style, initialStyles.arrow);
  }
  return function() {
    Object.keys(state.elements).forEach(function(name) {
      var element = state.elements[name];
      var attributes = state.attributes[name] || {};
      var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]);
      var style2 = styleProperties.reduce(function(style3, property) {
        style3[property] = "";
        return style3;
      }, {});
      if (!isHTMLElement$2(element) || !getNodeName(element)) {
        return;
      }
      Object.assign(element.style, style2);
      Object.keys(attributes).forEach(function(attribute) {
        element.removeAttribute(attribute);
      });
    });
  };
}
const applyStyles$1 = {
  name: "applyStyles",
  enabled: true,
  phase: "write",
  fn: applyStyles,
  effect: effect$2,
  requires: ["computeStyles"]
};
function getBasePlacement(placement) {
  return placement.split("-")[0];
}
var max$2 = Math.max;
var min$1 = Math.min;
var round$2 = Math.round;
function getUAString() {
  var uaData = navigator.userAgentData;
  if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
    return uaData.brands.map(function(item) {
      return item.brand + "/" + item.version;
    }).join(" ");
  }
  return navigator.userAgent;
}
function isLayoutViewport() {
  return !/^((?!chrome|android).)*safari/i.test(getUAString());
}
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
  if (includeScale === void 0) {
    includeScale = false;
  }
  if (isFixedStrategy === void 0) {
    isFixedStrategy = false;
  }
  var clientRect = element.getBoundingClientRect();
  var scaleX = 1;
  var scaleY = 1;
  if (includeScale && isHTMLElement$2(element)) {
    scaleX = element.offsetWidth > 0 ? round$2(clientRect.width) / element.offsetWidth || 1 : 1;
    scaleY = element.offsetHeight > 0 ? round$2(clientRect.height) / element.offsetHeight || 1 : 1;
  }
  var _ref = isElement(element) ? getWindow(element) : window, visualViewport = _ref.visualViewport;
  var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
  var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
  var y2 = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
  var width2 = clientRect.width / scaleX;
  var height2 = clientRect.height / scaleY;
  return {
    width: width2,
    height: height2,
    top: y2,
    right: x + width2,
    bottom: y2 + height2,
    left: x,
    x,
    y: y2
  };
}
function getLayoutRect(element) {
  var clientRect = getBoundingClientRect(element);
  var width2 = element.offsetWidth;
  var height2 = element.offsetHeight;
  if (Math.abs(clientRect.width - width2) <= 1) {
    width2 = clientRect.width;
  }
  if (Math.abs(clientRect.height - height2) <= 1) {
    height2 = clientRect.height;
  }
  return {
    x: element.offsetLeft,
    y: element.offsetTop,
    width: width2,
    height: height2
  };
}
function contains$1(parent, child) {
  var rootNode = child.getRootNode && child.getRootNode();
  if (parent.contains(child)) {
    return true;
  } else if (rootNode && isShadowRoot(rootNode)) {
    var next2 = child;
    do {
      if (next2 && parent.isSameNode(next2)) {
        return true;
      }
      next2 = next2.parentNode || next2.host;
    } while (next2);
  }
  return false;
}
function getComputedStyle$1(element) {
  return getWindow(element).getComputedStyle(element);
}
function isTableElement(element) {
  return ["table", "td", "th"].indexOf(getNodeName(element)) >= 0;
}
function getDocumentElement(element) {
  return ((isElement(element) ? element.ownerDocument : (
    // $FlowFixMe[prop-missing]
    element.document
  )) || window.document).documentElement;
}
function getParentNode(element) {
  if (getNodeName(element) === "html") {
    return element;
  }
  return (
    // this is a quicker (but less type safe) way to save quite some bytes from the bundle
    // $FlowFixMe[incompatible-return]
    // $FlowFixMe[prop-missing]
    element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
    element.parentNode || // DOM Element detected
    (isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
    // $FlowFixMe[incompatible-call]: HTMLElement is a Node
    getDocumentElement(element)
  );
}
function getTrueOffsetParent(element) {
  if (!isHTMLElement$2(element) || // https://github.com/popperjs/popper-core/issues/837
  getComputedStyle$1(element).position === "fixed") {
    return null;
  }
  return element.offsetParent;
}
function getContainingBlock(element) {
  var isFirefox = /firefox/i.test(getUAString());
  var isIE2 = /Trident/i.test(getUAString());
  if (isIE2 && isHTMLElement$2(element)) {
    var elementCss = getComputedStyle$1(element);
    if (elementCss.position === "fixed") {
      return null;
    }
  }
  var currentNode = getParentNode(element);
  if (isShadowRoot(currentNode)) {
    currentNode = currentNode.host;
  }
  while (isHTMLElement$2(currentNode) && ["html", "body"].indexOf(getNodeName(currentNode)) < 0) {
    var css2 = getComputedStyle$1(currentNode);
    if (css2.transform !== "none" || css2.perspective !== "none" || css2.contain === "paint" || ["transform", "perspective"].indexOf(css2.willChange) !== -1 || isFirefox && css2.willChange === "filter" || isFirefox && css2.filter && css2.filter !== "none") {
      return currentNode;
    } else {
      currentNode = currentNode.parentNode;
    }
  }
  return null;
}
function getOffsetParent(element) {
  var window2 = getWindow(element);
  var offsetParent = getTrueOffsetParent(element);
  while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
    offsetParent = getTrueOffsetParent(offsetParent);
  }
  if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static")) {
    return window2;
  }
  return offsetParent || getContainingBlock(element) || window2;
}
function getMainAxisFromPlacement(placement) {
  return ["top", "bottom"].indexOf(placement) >= 0 ? "x" : "y";
}
function within(min2, value, max2) {
  return max$2(min2, min$1(value, max2));
}
function withinMaxClamp(min2, value, max2) {
  var v2 = within(min2, value, max2);
  return v2 > max2 ? max2 : v2;
}
function getFreshSideObject() {
  return {
    top: 0,
    right: 0,
    bottom: 0,
    left: 0
  };
}
function mergePaddingObject(paddingObject) {
  return Object.assign({}, getFreshSideObject(), paddingObject);
}
function expandToHashMap(value, keys) {
  return keys.reduce(function(hashMap, key) {
    hashMap[key] = value;
    return hashMap;
  }, {});
}
var toPaddingObject = function toPaddingObject2(padding2, state) {
  padding2 = typeof padding2 === "function" ? padding2(Object.assign({}, state.rects, {
    placement: state.placement
  })) : padding2;
  return mergePaddingObject(typeof padding2 !== "number" ? padding2 : expandToHashMap(padding2, basePlacements));
};
function arrow(_ref) {
  var _state$modifiersData$;
  var state = _ref.state, name = _ref.name, options = _ref.options;
  var arrowElement = state.elements.arrow;
  var popperOffsets2 = state.modifiersData.popperOffsets;
  var basePlacement = getBasePlacement(state.placement);
  var axis = getMainAxisFromPlacement(basePlacement);
  var isVertical = [left, right].indexOf(basePlacement) >= 0;
  var len = isVertical ? "height" : "width";
  if (!arrowElement || !popperOffsets2) {
    return;
  }
  var paddingObject = toPaddingObject(options.padding, state);
  var arrowRect = getLayoutRect(arrowElement);
  var minProp = axis === "y" ? top : left;
  var maxProp = axis === "y" ? bottom : right;
  var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets2[axis] - state.rects.popper[len];
  var startDiff = popperOffsets2[axis] - state.rects.reference[axis];
  var arrowOffsetParent = getOffsetParent(arrowElement);
  var clientSize = arrowOffsetParent ? axis === "y" ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
  var centerToReference = endDiff / 2 - startDiff / 2;
  var min2 = paddingObject[minProp];
  var max2 = clientSize - arrowRect[len] - paddingObject[maxProp];
  var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
  var offset2 = within(min2, center, max2);
  var axisProp = axis;
  state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset2, _state$modifiersData$.centerOffset = offset2 - center, _state$modifiersData$);
}
function effect$1(_ref2) {
  var state = _ref2.state, options = _ref2.options;
  var _options$element = options.element, arrowElement = _options$element === void 0 ? "[data-popper-arrow]" : _options$element;
  if (arrowElement == null) {
    return;
  }
  if (typeof arrowElement === "string") {
    arrowElement = state.elements.popper.querySelector(arrowElement);
    if (!arrowElement) {
      return;
    }
  }
  if (!contains$1(state.elements.popper, arrowElement)) {
    return;
  }
  state.elements.arrow = arrowElement;
}
const arrow$1 = {
  name: "arrow",
  enabled: true,
  phase: "main",
  fn: arrow,
  effect: effect$1,
  requires: ["popperOffsets"],
  requiresIfExists: ["preventOverflow"]
};
function getVariation(placement) {
  return placement.split("-")[1];
}
var unsetSides = {
  top: "auto",
  right: "auto",
  bottom: "auto",
  left: "auto"
};
function roundOffsetsByDPR(_ref, win) {
  var x = _ref.x, y2 = _ref.y;
  var dpr = win.devicePixelRatio || 1;
  return {
    x: round$2(x * dpr) / dpr || 0,
    y: round$2(y2 * dpr) / dpr || 0
  };
}
function mapToStyles(_ref2) {
  var _Object$assign2;
  var popper2 = _ref2.popper, popperRect = _ref2.popperRect, placement = _ref2.placement, variation = _ref2.variation, offsets = _ref2.offsets, position2 = _ref2.position, gpuAcceleration = _ref2.gpuAcceleration, adaptive = _ref2.adaptive, roundOffsets = _ref2.roundOffsets, isFixed = _ref2.isFixed;
  var _offsets$x = offsets.x, x = _offsets$x === void 0 ? 0 : _offsets$x, _offsets$y = offsets.y, y2 = _offsets$y === void 0 ? 0 : _offsets$y;
  var _ref3 = typeof roundOffsets === "function" ? roundOffsets({
    x,
    y: y2
  }) : {
    x,
    y: y2
  };
  x = _ref3.x;
  y2 = _ref3.y;
  var hasX = offsets.hasOwnProperty("x");
  var hasY = offsets.hasOwnProperty("y");
  var sideX = left;
  var sideY = top;
  var win = window;
  if (adaptive) {
    var offsetParent = getOffsetParent(popper2);
    var heightProp = "clientHeight";
    var widthProp = "clientWidth";
    if (offsetParent === getWindow(popper2)) {
      offsetParent = getDocumentElement(popper2);
      if (getComputedStyle$1(offsetParent).position !== "static" && position2 === "absolute") {
        heightProp = "scrollHeight";
        widthProp = "scrollWidth";
      }
    }
    offsetParent = offsetParent;
    if (placement === top || (placement === left || placement === right) && variation === end) {
      sideY = bottom;
      var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : (
        // $FlowFixMe[prop-missing]
        offsetParent[heightProp]
      );
      y2 -= offsetY - popperRect.height;
      y2 *= gpuAcceleration ? 1 : -1;
    }
    if (placement === left || (placement === top || placement === bottom) && variation === end) {
      sideX = right;
      var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : (
        // $FlowFixMe[prop-missing]
        offsetParent[widthProp]
      );
      x -= offsetX - popperRect.width;
      x *= gpuAcceleration ? 1 : -1;
    }
  }
  var commonStyles = Object.assign({
    position: position2
  }, adaptive && unsetSides);
  var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
    x,
    y: y2
  }, getWindow(popper2)) : {
    x,
    y: y2
  };
  x = _ref4.x;
  y2 = _ref4.y;
  if (gpuAcceleration) {
    var _Object$assign;
    return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? "0" : "", _Object$assign[sideX] = hasX ? "0" : "", _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y2 + "px)" : "translate3d(" + x + "px, " + y2 + "px, 0)", _Object$assign));
  }
  return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y2 + "px" : "", _Object$assign2[sideX] = hasX ? x + "px" : "", _Object$assign2.transform = "", _Object$assign2));
}
function computeStyles(_ref5) {
  var state = _ref5.state, options = _ref5.options;
  var _options$gpuAccelerat = options.gpuAcceleration, gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat, _options$adaptive = options.adaptive, adaptive = _options$adaptive === void 0 ? true : _options$adaptive, _options$roundOffsets = options.roundOffsets, roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
  var commonStyles = {
    placement: getBasePlacement(state.placement),
    variation: getVariation(state.placement),
    popper: state.elements.popper,
    popperRect: state.rects.popper,
    gpuAcceleration,
    isFixed: state.options.strategy === "fixed"
  };
  if (state.modifiersData.popperOffsets != null) {
    state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
      offsets: state.modifiersData.popperOffsets,
      position: state.options.strategy,
      adaptive,
      roundOffsets
    })));
  }
  if (state.modifiersData.arrow != null) {
    state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
      offsets: state.modifiersData.arrow,
      position: "absolute",
      adaptive: false,
      roundOffsets
    })));
  }
  state.attributes.popper = Object.assign({}, state.attributes.popper, {
    "data-popper-placement": state.placement
  });
}
const computeStyles$1 = {
  name: "computeStyles",
  enabled: true,
  phase: "beforeWrite",
  fn: computeStyles,
  data: {}
};
var passive = {
  passive: true
};
function effect(_ref) {
  var state = _ref.state, instance = _ref.instance, options = _ref.options;
  var _options$scroll = options.scroll, scroll = _options$scroll === void 0 ? true : _options$scroll, _options$resize = options.resize, resize2 = _options$resize === void 0 ? true : _options$resize;
  var window2 = getWindow(state.elements.popper);
  var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
  if (scroll) {
    scrollParents.forEach(function(scrollParent) {
      scrollParent.addEventListener("scroll", instance.update, passive);
    });
  }
  if (resize2) {
    window2.addEventListener("resize", instance.update, passive);
  }
  return function() {
    if (scroll) {
      scrollParents.forEach(function(scrollParent) {
        scrollParent.removeEventListener("scroll", instance.update, passive);
      });
    }
    if (resize2) {
      window2.removeEventListener("resize", instance.update, passive);
    }
  };
}
const eventListeners = {
  name: "eventListeners",
  enabled: true,
  phase: "write",
  fn: function fn() {
  },
  effect,
  data: {}
};
var hash$1 = {
  left: "right",
  right: "left",
  bottom: "top",
  top: "bottom"
};
function getOppositePlacement(placement) {
  return placement.replace(/left|right|bottom|top/g, function(matched) {
    return hash$1[matched];
  });
}
var hash = {
  start: "end",
  end: "start"
};
function getOppositeVariationPlacement(placement) {
  return placement.replace(/start|end/g, function(matched) {
    return hash[matched];
  });
}
function getWindowScroll(node2) {
  var win = getWindow(node2);
  var scrollLeft = win.pageXOffset;
  var scrollTop = win.pageYOffset;
  return {
    scrollLeft,
    scrollTop
  };
}
function getWindowScrollBarX(element) {
  return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
}
function getViewportRect(element, strategy) {
  var win = getWindow(element);
  var html2 = getDocumentElement(element);
  var visualViewport = win.visualViewport;
  var width2 = html2.clientWidth;
  var height2 = html2.clientHeight;
  var x = 0;
  var y2 = 0;
  if (visualViewport) {
    width2 = visualViewport.width;
    height2 = visualViewport.height;
    var layoutViewport = isLayoutViewport();
    if (layoutViewport || !layoutViewport && strategy === "fixed") {
      x = visualViewport.offsetLeft;
      y2 = visualViewport.offsetTop;
    }
  }
  return {
    width: width2,
    height: height2,
    x: x + getWindowScrollBarX(element),
    y: y2
  };
}
function getDocumentRect(element) {
  var _element$ownerDocumen;
  var html2 = getDocumentElement(element);
  var winScroll = getWindowScroll(element);
  var body2 = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
  var width2 = max$2(html2.scrollWidth, html2.clientWidth, body2 ? body2.scrollWidth : 0, body2 ? body2.clientWidth : 0);
  var height2 = max$2(html2.scrollHeight, html2.clientHeight, body2 ? body2.scrollHeight : 0, body2 ? body2.clientHeight : 0);
  var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
  var y2 = -winScroll.scrollTop;
  if (getComputedStyle$1(body2 || html2).direction === "rtl") {
    x += max$2(html2.clientWidth, body2 ? body2.clientWidth : 0) - width2;
  }
  return {
    width: width2,
    height: height2,
    x,
    y: y2
  };
}
function isScrollParent(element) {
  var _getComputedStyle = getComputedStyle$1(element), overflow2 = _getComputedStyle.overflow, overflowX = _getComputedStyle.overflowX, overflowY = _getComputedStyle.overflowY;
  return /auto|scroll|overlay|hidden/.test(overflow2 + overflowY + overflowX);
}
function getScrollParent(node2) {
  if (["html", "body", "#document"].indexOf(getNodeName(node2)) >= 0) {
    return node2.ownerDocument.body;
  }
  if (isHTMLElement$2(node2) && isScrollParent(node2)) {
    return node2;
  }
  return getScrollParent(getParentNode(node2));
}
function listScrollParents(element, list) {
  var _element$ownerDocumen;
  if (list === void 0) {
    list = [];
  }
  var scrollParent = getScrollParent(element);
  var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
  var win = getWindow(scrollParent);
  var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
  var updatedList = list.concat(target);
  return isBody ? updatedList : (
    // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
    updatedList.concat(listScrollParents(getParentNode(target)))
  );
}
function rectToClientRect(rect) {
  return Object.assign({}, rect, {
    left: rect.x,
    top: rect.y,
    right: rect.x + rect.width,
    bottom: rect.y + rect.height
  });
}
function getInnerBoundingClientRect(element, strategy) {
  var rect = getBoundingClientRect(element, false, strategy === "fixed");
  rect.top = rect.top + element.clientTop;
  rect.left = rect.left + element.clientLeft;
  rect.bottom = rect.top + element.clientHeight;
  rect.right = rect.left + element.clientWidth;
  rect.width = element.clientWidth;
  rect.height = element.clientHeight;
  rect.x = rect.left;
  rect.y = rect.top;
  return rect;
}
function getClientRectFromMixedType(element, clippingParent, strategy) {
  return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
}
function getClippingParents(element) {
  var clippingParents2 = listScrollParents(getParentNode(element));
  var canEscapeClipping = ["absolute", "fixed"].indexOf(getComputedStyle$1(element).position) >= 0;
  var clipperElement = canEscapeClipping && isHTMLElement$2(element) ? getOffsetParent(element) : element;
  if (!isElement(clipperElement)) {
    return [];
  }
  return clippingParents2.filter(function(clippingParent) {
    return isElement(clippingParent) && contains$1(clippingParent, clipperElement) && getNodeName(clippingParent) !== "body";
  });
}
function getClippingRect(element, boundary, rootBoundary, strategy) {
  var mainClippingParents = boundary === "clippingParents" ? getClippingParents(element) : [].concat(boundary);
  var clippingParents2 = [].concat(mainClippingParents, [rootBoundary]);
  var firstClippingParent = clippingParents2[0];
  var clippingRect = clippingParents2.reduce(function(accRect, clippingParent) {
    var rect = getClientRectFromMixedType(element, clippingParent, strategy);
    accRect.top = max$2(rect.top, accRect.top);
    accRect.right = min$1(rect.right, accRect.right);
    accRect.bottom = min$1(rect.bottom, accRect.bottom);
    accRect.left = max$2(rect.left, accRect.left);
    return accRect;
  }, getClientRectFromMixedType(element, firstClippingParent, strategy));
  clippingRect.width = clippingRect.right - clippingRect.left;
  clippingRect.height = clippingRect.bottom - clippingRect.top;
  clippingRect.x = clippingRect.left;
  clippingRect.y = clippingRect.top;
  return clippingRect;
}
function computeOffsets(_ref) {
  var reference2 = _ref.reference, element = _ref.element, placement = _ref.placement;
  var basePlacement = placement ? getBasePlacement(placement) : null;
  var variation = placement ? getVariation(placement) : null;
  var commonX = reference2.x + reference2.width / 2 - element.width / 2;
  var commonY = reference2.y + reference2.height / 2 - element.height / 2;
  var offsets;
  switch (basePlacement) {
    case top:
      offsets = {
        x: commonX,
        y: reference2.y - element.height
      };
      break;
    case bottom:
      offsets = {
        x: commonX,
        y: reference2.y + reference2.height
      };
      break;
    case right:
      offsets = {
        x: reference2.x + reference2.width,
        y: commonY
      };
      break;
    case left:
      offsets = {
        x: reference2.x - element.width,
        y: commonY
      };
      break;
    default:
      offsets = {
        x: reference2.x,
        y: reference2.y
      };
  }
  var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
  if (mainAxis != null) {
    var len = mainAxis === "y" ? "height" : "width";
    switch (variation) {
      case start:
        offsets[mainAxis] = offsets[mainAxis] - (reference2[len] / 2 - element[len] / 2);
        break;
      case end:
        offsets[mainAxis] = offsets[mainAxis] + (reference2[len] / 2 - element[len] / 2);
        break;
    }
  }
  return offsets;
}
function detectOverflow(state, options) {
  if (options === void 0) {
    options = {};
  }
  var _options = options, _options$placement = _options.placement, placement = _options$placement === void 0 ? state.placement : _options$placement, _options$strategy = _options.strategy, strategy = _options$strategy === void 0 ? state.strategy : _options$strategy, _options$boundary = _options.boundary, boundary = _options$boundary === void 0 ? clippingParents : _options$boundary, _options$rootBoundary = _options.rootBoundary, rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary, _options$elementConte = _options.elementContext, elementContext = _options$elementConte === void 0 ? popper : _options$elementConte, _options$altBoundary = _options.altBoundary, altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary, _options$padding = _options.padding, padding2 = _options$padding === void 0 ? 0 : _options$padding;
  var paddingObject = mergePaddingObject(typeof padding2 !== "number" ? padding2 : expandToHashMap(padding2, basePlacements));
  var altContext = elementContext === popper ? reference : popper;
  var popperRect = state.rects.popper;
  var element = state.elements[altBoundary ? altContext : elementContext];
  var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
  var referenceClientRect = getBoundingClientRect(state.elements.reference);
  var popperOffsets2 = computeOffsets({
    reference: referenceClientRect,
    element: popperRect,
    placement
  });
  var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets2));
  var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect;
  var overflowOffsets = {
    top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
    bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
    left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
    right: elementClientRect.right - clippingClientRect.right + paddingObject.right
  };
  var offsetData = state.modifiersData.offset;
  if (elementContext === popper && offsetData) {
    var offset2 = offsetData[placement];
    Object.keys(overflowOffsets).forEach(function(key) {
      var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
      var axis = [top, bottom].indexOf(key) >= 0 ? "y" : "x";
      overflowOffsets[key] += offset2[axis] * multiply;
    });
  }
  return overflowOffsets;
}
function computeAutoPlacement(state, options) {
  if (options === void 0) {
    options = {};
  }
  var _options = options, placement = _options.placement, boundary = _options.boundary, rootBoundary = _options.rootBoundary, padding2 = _options.padding, flipVariations = _options.flipVariations, _options$allowedAutoP = _options.allowedAutoPlacements, allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
  var variation = getVariation(placement);
  var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function(placement2) {
    return getVariation(placement2) === variation;
  }) : basePlacements;
  var allowedPlacements = placements$1.filter(function(placement2) {
    return allowedAutoPlacements.indexOf(placement2) >= 0;
  });
  if (allowedPlacements.length === 0) {
    allowedPlacements = placements$1;
  }
  var overflows = allowedPlacements.reduce(function(acc, placement2) {
    acc[placement2] = detectOverflow(state, {
      placement: placement2,
      boundary,
      rootBoundary,
      padding: padding2
    })[getBasePlacement(placement2)];
    return acc;
  }, {});
  return Object.keys(overflows).sort(function(a2, b2) {
    return overflows[a2] - overflows[b2];
  });
}
function getExpandedFallbackPlacements(placement) {
  if (getBasePlacement(placement) === auto) {
    return [];
  }
  var oppositePlacement = getOppositePlacement(placement);
  return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
}
function flip(_ref) {
  var state = _ref.state, options = _ref.options, name = _ref.name;
  if (state.modifiersData[name]._skip) {
    return;
  }
  var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis, specifiedFallbackPlacements = options.fallbackPlacements, padding2 = options.padding, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, _options$flipVariatio = options.flipVariations, flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio, allowedAutoPlacements = options.allowedAutoPlacements;
  var preferredPlacement = state.options.placement;
  var basePlacement = getBasePlacement(preferredPlacement);
  var isBasePlacement = basePlacement === preferredPlacement;
  var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
  var placements2 = [preferredPlacement].concat(fallbackPlacements).reduce(function(acc, placement2) {
    return acc.concat(getBasePlacement(placement2) === auto ? computeAutoPlacement(state, {
      placement: placement2,
      boundary,
      rootBoundary,
      padding: padding2,
      flipVariations,
      allowedAutoPlacements
    }) : placement2);
  }, []);
  var referenceRect = state.rects.reference;
  var popperRect = state.rects.popper;
  var checksMap = /* @__PURE__ */ new Map();
  var makeFallbackChecks = true;
  var firstFittingPlacement = placements2[0];
  for (var i = 0; i < placements2.length; i++) {
    var placement = placements2[i];
    var _basePlacement = getBasePlacement(placement);
    var isStartVariation = getVariation(placement) === start;
    var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
    var len = isVertical ? "width" : "height";
    var overflow2 = detectOverflow(state, {
      placement,
      boundary,
      rootBoundary,
      altBoundary,
      padding: padding2
    });
    var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
    if (referenceRect[len] > popperRect[len]) {
      mainVariationSide = getOppositePlacement(mainVariationSide);
    }
    var altVariationSide = getOppositePlacement(mainVariationSide);
    var checks = [];
    if (checkMainAxis) {
      checks.push(overflow2[_basePlacement] <= 0);
    }
    if (checkAltAxis) {
      checks.push(overflow2[mainVariationSide] <= 0, overflow2[altVariationSide] <= 0);
    }
    if (checks.every(function(check) {
      return check;
    })) {
      firstFittingPlacement = placement;
      makeFallbackChecks = false;
      break;
    }
    checksMap.set(placement, checks);
  }
  if (makeFallbackChecks) {
    var numberOfChecks = flipVariations ? 3 : 1;
    var _loop = function _loop2(_i2) {
      var fittingPlacement = placements2.find(function(placement2) {
        var checks2 = checksMap.get(placement2);
        if (checks2) {
          return checks2.slice(0, _i2).every(function(check) {
            return check;
          });
        }
      });
      if (fittingPlacement) {
        firstFittingPlacement = fittingPlacement;
        return "break";
      }
    };
    for (var _i = numberOfChecks; _i > 0; _i--) {
      var _ret = _loop(_i);
      if (_ret === "break") break;
    }
  }
  if (state.placement !== firstFittingPlacement) {
    state.modifiersData[name]._skip = true;
    state.placement = firstFittingPlacement;
    state.reset = true;
  }
}
const flip$1 = {
  name: "flip",
  enabled: true,
  phase: "main",
  fn: flip,
  requiresIfExists: ["offset"],
  data: {
    _skip: false
  }
};
function getSideOffsets(overflow2, rect, preventedOffsets) {
  if (preventedOffsets === void 0) {
    preventedOffsets = {
      x: 0,
      y: 0
    };
  }
  return {
    top: overflow2.top - rect.height - preventedOffsets.y,
    right: overflow2.right - rect.width + preventedOffsets.x,
    bottom: overflow2.bottom - rect.height + preventedOffsets.y,
    left: overflow2.left - rect.width - preventedOffsets.x
  };
}
function isAnySideFullyClipped(overflow2) {
  return [top, right, bottom, left].some(function(side) {
    return overflow2[side] >= 0;
  });
}
function hide(_ref) {
  var state = _ref.state, name = _ref.name;
  var referenceRect = state.rects.reference;
  var popperRect = state.rects.popper;
  var preventedOffsets = state.modifiersData.preventOverflow;
  var referenceOverflow = detectOverflow(state, {
    elementContext: "reference"
  });
  var popperAltOverflow = detectOverflow(state, {
    altBoundary: true
  });
  var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
  var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
  var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
  var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
  state.modifiersData[name] = {
    referenceClippingOffsets,
    popperEscapeOffsets,
    isReferenceHidden,
    hasPopperEscaped
  };
  state.attributes.popper = Object.assign({}, state.attributes.popper, {
    "data-popper-reference-hidden": isReferenceHidden,
    "data-popper-escaped": hasPopperEscaped
  });
}
const hide$1 = {
  name: "hide",
  enabled: true,
  phase: "main",
  requiresIfExists: ["preventOverflow"],
  fn: hide
};
function distanceAndSkiddingToXY(placement, rects, offset2) {
  var basePlacement = getBasePlacement(placement);
  var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
  var _ref = typeof offset2 === "function" ? offset2(Object.assign({}, rects, {
    placement
  })) : offset2, skidding = _ref[0], distance2 = _ref[1];
  skidding = skidding || 0;
  distance2 = (distance2 || 0) * invertDistance;
  return [left, right].indexOf(basePlacement) >= 0 ? {
    x: distance2,
    y: skidding
  } : {
    x: skidding,
    y: distance2
  };
}
function offset(_ref2) {
  var state = _ref2.state, options = _ref2.options, name = _ref2.name;
  var _options$offset = options.offset, offset2 = _options$offset === void 0 ? [0, 0] : _options$offset;
  var data = placements.reduce(function(acc, placement) {
    acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset2);
    return acc;
  }, {});
  var _data$state$placement = data[state.placement], x = _data$state$placement.x, y2 = _data$state$placement.y;
  if (state.modifiersData.popperOffsets != null) {
    state.modifiersData.popperOffsets.x += x;
    state.modifiersData.popperOffsets.y += y2;
  }
  state.modifiersData[name] = data;
}
const offset$1 = {
  name: "offset",
  enabled: true,
  phase: "main",
  requires: ["popperOffsets"],
  fn: offset
};
function popperOffsets(_ref) {
  var state = _ref.state, name = _ref.name;
  state.modifiersData[name] = computeOffsets({
    reference: state.rects.reference,
    element: state.rects.popper,
    placement: state.placement
  });
}
const popperOffsets$1 = {
  name: "popperOffsets",
  enabled: true,
  phase: "read",
  fn: popperOffsets,
  data: {}
};
function getAltAxis(axis) {
  return axis === "x" ? "y" : "x";
}
function preventOverflow(_ref) {
  var state = _ref.state, options = _ref.options, name = _ref.name;
  var _options$mainAxis = options.mainAxis, checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis, _options$altAxis = options.altAxis, checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis, boundary = options.boundary, rootBoundary = options.rootBoundary, altBoundary = options.altBoundary, padding2 = options.padding, _options$tether = options.tether, tether = _options$tether === void 0 ? true : _options$tether, _options$tetherOffset = options.tetherOffset, tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
  var overflow2 = detectOverflow(state, {
    boundary,
    rootBoundary,
    padding: padding2,
    altBoundary
  });
  var basePlacement = getBasePlacement(state.placement);
  var variation = getVariation(state.placement);
  var isBasePlacement = !variation;
  var mainAxis = getMainAxisFromPlacement(basePlacement);
  var altAxis = getAltAxis(mainAxis);
  var popperOffsets2 = state.modifiersData.popperOffsets;
  var referenceRect = state.rects.reference;
  var popperRect = state.rects.popper;
  var tetherOffsetValue = typeof tetherOffset === "function" ? tetherOffset(Object.assign({}, state.rects, {
    placement: state.placement
  })) : tetherOffset;
  var normalizedTetherOffsetValue = typeof tetherOffsetValue === "number" ? {
    mainAxis: tetherOffsetValue,
    altAxis: tetherOffsetValue
  } : Object.assign({
    mainAxis: 0,
    altAxis: 0
  }, tetherOffsetValue);
  var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
  var data = {
    x: 0,
    y: 0
  };
  if (!popperOffsets2) {
    return;
  }
  if (checkMainAxis) {
    var _offsetModifierState$;
    var mainSide = mainAxis === "y" ? top : left;
    var altSide = mainAxis === "y" ? bottom : right;
    var len = mainAxis === "y" ? "height" : "width";
    var offset2 = popperOffsets2[mainAxis];
    var min2 = offset2 + overflow2[mainSide];
    var max2 = offset2 - overflow2[altSide];
    var additive = tether ? -popperRect[len] / 2 : 0;
    var minLen = variation === start ? referenceRect[len] : popperRect[len];
    var maxLen = variation === start ? -popperRect[len] : -referenceRect[len];
    var arrowElement = state.elements.arrow;
    var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
      width: 0,
      height: 0
    };
    var arrowPaddingObject = state.modifiersData["arrow#persistent"] ? state.modifiersData["arrow#persistent"].padding : getFreshSideObject();
    var arrowPaddingMin = arrowPaddingObject[mainSide];
    var arrowPaddingMax = arrowPaddingObject[altSide];
    var arrowLen = within(0, referenceRect[len], arrowRect[len]);
    var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
    var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
    var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
    var clientOffset = arrowOffsetParent ? mainAxis === "y" ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
    var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
    var tetherMin = offset2 + minOffset - offsetModifierValue - clientOffset;
    var tetherMax = offset2 + maxOffset - offsetModifierValue;
    var preventedOffset = within(tether ? min$1(min2, tetherMin) : min2, offset2, tether ? max$2(max2, tetherMax) : max2);
    popperOffsets2[mainAxis] = preventedOffset;
    data[mainAxis] = preventedOffset - offset2;
  }
  if (checkAltAxis) {
    var _offsetModifierState$2;
    var _mainSide = mainAxis === "x" ? top : left;
    var _altSide = mainAxis === "x" ? bottom : right;
    var _offset = popperOffsets2[altAxis];
    var _len = altAxis === "y" ? "height" : "width";
    var _min = _offset + overflow2[_mainSide];
    var _max = _offset - overflow2[_altSide];
    var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
    var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
    var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
    var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
    var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
    popperOffsets2[altAxis] = _preventedOffset;
    data[altAxis] = _preventedOffset - _offset;
  }
  state.modifiersData[name] = data;
}
const preventOverflow$1 = {
  name: "preventOverflow",
  enabled: true,
  phase: "main",
  fn: preventOverflow,
  requiresIfExists: ["offset"]
};
function getHTMLElementScroll(element) {
  return {
    scrollLeft: element.scrollLeft,
    scrollTop: element.scrollTop
  };
}
function getNodeScroll(node2) {
  if (node2 === getWindow(node2) || !isHTMLElement$2(node2)) {
    return getWindowScroll(node2);
  } else {
    return getHTMLElementScroll(node2);
  }
}
function isElementScaled(element) {
  var rect = element.getBoundingClientRect();
  var scaleX = round$2(rect.width) / element.offsetWidth || 1;
  var scaleY = round$2(rect.height) / element.offsetHeight || 1;
  return scaleX !== 1 || scaleY !== 1;
}
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
  if (isFixed === void 0) {
    isFixed = false;
  }
  var isOffsetParentAnElement = isHTMLElement$2(offsetParent);
  var offsetParentIsScaled = isHTMLElement$2(offsetParent) && isElementScaled(offsetParent);
  var documentElement = getDocumentElement(offsetParent);
  var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
  var scroll = {
    scrollLeft: 0,
    scrollTop: 0
  };
  var offsets = {
    x: 0,
    y: 0
  };
  if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
    if (getNodeName(offsetParent) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
    isScrollParent(documentElement)) {
      scroll = getNodeScroll(offsetParent);
    }
    if (isHTMLElement$2(offsetParent)) {
      offsets = getBoundingClientRect(offsetParent, true);
      offsets.x += offsetParent.clientLeft;
      offsets.y += offsetParent.clientTop;
    } else if (documentElement) {
      offsets.x = getWindowScrollBarX(documentElement);
    }
  }
  return {
    x: rect.left + scroll.scrollLeft - offsets.x,
    y: rect.top + scroll.scrollTop - offsets.y,
    width: rect.width,
    height: rect.height
  };
}
function order(modifiers) {
  var map = /* @__PURE__ */ new Map();
  var visited = /* @__PURE__ */ new Set();
  var result = [];
  modifiers.forEach(function(modifier) {
    map.set(modifier.name, modifier);
  });
  function sort(modifier) {
    visited.add(modifier.name);
    var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
    requires.forEach(function(dep) {
      if (!visited.has(dep)) {
        var depModifier = map.get(dep);
        if (depModifier) {
          sort(depModifier);
        }
      }
    });
    result.push(modifier);
  }
  modifiers.forEach(function(modifier) {
    if (!visited.has(modifier.name)) {
      sort(modifier);
    }
  });
  return result;
}
function orderModifiers(modifiers) {
  var orderedModifiers = order(modifiers);
  return modifierPhases.reduce(function(acc, phase) {
    return acc.concat(orderedModifiers.filter(function(modifier) {
      return modifier.phase === phase;
    }));
  }, []);
}
function debounce$1(fn2) {
  var pending;
  return function() {
    if (!pending) {
      pending = new Promise(function(resolve) {
        Promise.resolve().then(function() {
          pending = void 0;
          resolve(fn2());
        });
      });
    }
    return pending;
  };
}
function mergeByName(modifiers) {
  var merged = modifiers.reduce(function(merged2, current) {
    var existing = merged2[current.name];
    merged2[current.name] = existing ? Object.assign({}, existing, current, {
      options: Object.assign({}, existing.options, current.options),
      data: Object.assign({}, existing.data, current.data)
    }) : current;
    return merged2;
  }, {});
  return Object.keys(merged).map(function(key) {
    return merged[key];
  });
}
var DEFAULT_OPTIONS = {
  placement: "bottom",
  modifiers: [],
  strategy: "absolute"
};
function areValidElements() {
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
    args[_key] = arguments[_key];
  }
  return !args.some(function(element) {
    return !(element && typeof element.getBoundingClientRect === "function");
  });
}
function popperGenerator(generatorOptions) {
  if (generatorOptions === void 0) {
    generatorOptions = {};
  }
  var _generatorOptions = generatorOptions, _generatorOptions$def = _generatorOptions.defaultModifiers, defaultModifiers2 = _generatorOptions$def === void 0 ? [] : _generatorOptions$def, _generatorOptions$def2 = _generatorOptions.defaultOptions, defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
  return function createPopper2(reference2, popper2, options) {
    if (options === void 0) {
      options = defaultOptions;
    }
    var state = {
      placement: "bottom",
      orderedModifiers: [],
      options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
      modifiersData: {},
      elements: {
        reference: reference2,
        popper: popper2
      },
      attributes: {},
      styles: {}
    };
    var effectCleanupFns = [];
    var isDestroyed = false;
    var instance = {
      state,
      setOptions: function setOptions(setOptionsAction) {
        var options2 = typeof setOptionsAction === "function" ? setOptionsAction(state.options) : setOptionsAction;
        cleanupModifierEffects();
        state.options = Object.assign({}, defaultOptions, state.options, options2);
        state.scrollParents = {
          reference: isElement(reference2) ? listScrollParents(reference2) : reference2.contextElement ? listScrollParents(reference2.contextElement) : [],
          popper: listScrollParents(popper2)
        };
        var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers2, state.options.modifiers)));
        state.orderedModifiers = orderedModifiers.filter(function(m2) {
          return m2.enabled;
        });
        runModifierEffects();
        return instance.update();
      },
      // Sync update – it will always be executed, even if not necessary. This
      // is useful for low frequency updates where sync behavior simplifies the
      // logic.
      // For high frequency updates (e.g. `resize` and `scroll` events), always
      // prefer the async Popper#update method
      forceUpdate: function forceUpdate() {
        if (isDestroyed) {
          return;
        }
        var _state$elements = state.elements, reference3 = _state$elements.reference, popper3 = _state$elements.popper;
        if (!areValidElements(reference3, popper3)) {
          return;
        }
        state.rects = {
          reference: getCompositeRect(reference3, getOffsetParent(popper3), state.options.strategy === "fixed"),
          popper: getLayoutRect(popper3)
        };
        state.reset = false;
        state.placement = state.options.placement;
        state.orderedModifiers.forEach(function(modifier) {
          return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
        });
        for (var index2 = 0; index2 < state.orderedModifiers.length; index2++) {
          if (state.reset === true) {
            state.reset = false;
            index2 = -1;
            continue;
          }
          var _state$orderedModifie = state.orderedModifiers[index2], fn2 = _state$orderedModifie.fn, _state$orderedModifie2 = _state$orderedModifie.options, _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2, name = _state$orderedModifie.name;
          if (typeof fn2 === "function") {
            state = fn2({
              state,
              options: _options,
              name,
              instance
            }) || state;
          }
        }
      },
      // Async and optimistically optimized update – it will not be executed if
      // not necessary (debounced to run at most once-per-tick)
      update: debounce$1(function() {
        return new Promise(function(resolve) {
          instance.forceUpdate();
          resolve(state);
        });
      }),
      destroy: function destroy() {
        cleanupModifierEffects();
        isDestroyed = true;
      }
    };
    if (!areValidElements(reference2, popper2)) {
      return instance;
    }
    instance.setOptions(options).then(function(state2) {
      if (!isDestroyed && options.onFirstUpdate) {
        options.onFirstUpdate(state2);
      }
    });
    function runModifierEffects() {
      state.orderedModifiers.forEach(function(_ref) {
        var name = _ref.name, _ref$options = _ref.options, options2 = _ref$options === void 0 ? {} : _ref$options, effect2 = _ref.effect;
        if (typeof effect2 === "function") {
          var cleanupFn = effect2({
            state,
            name,
            instance,
            options: options2
          });
          var noopFn = function noopFn2() {
          };
          effectCleanupFns.push(cleanupFn || noopFn);
        }
      });
    }
    function cleanupModifierEffects() {
      effectCleanupFns.forEach(function(fn2) {
        return fn2();
      });
      effectCleanupFns = [];
    }
    return instance;
  };
}
var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
var createPopper = /* @__PURE__ */ popperGenerator({
  defaultModifiers
});
function getContainer$1(container) {
  return typeof container === "function" ? container() : container;
}
const Portal = /* @__PURE__ */ reactExports.forwardRef(function Portal2(props, forwardedRef) {
  const {
    children,
    container,
    disablePortal = false
  } = props;
  const [mountNode, setMountNode] = reactExports.useState(null);
  const handleRef = useForkRef(/* @__PURE__ */ reactExports.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
  useEnhancedEffect(() => {
    if (!disablePortal) {
      setMountNode(getContainer$1(container) || document.body);
    }
  }, [container, disablePortal]);
  useEnhancedEffect(() => {
    if (mountNode && !disablePortal) {
      setRef(forwardedRef, mountNode);
      return () => {
        setRef(forwardedRef, null);
      };
    }
    return void 0;
  }, [forwardedRef, mountNode, disablePortal]);
  if (disablePortal) {
    if (/* @__PURE__ */ reactExports.isValidElement(children)) {
      const newProps = {
        ref: handleRef
      };
      return /* @__PURE__ */ reactExports.cloneElement(children, newProps);
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Fragment, {
      children
    });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Fragment, {
    children: mountNode ? /* @__PURE__ */ reactDomExports.createPortal(children, mountNode) : mountNode
  });
});
function getPopperUtilityClass(slot) {
  return generateUtilityClass("MuiPopper", slot);
}
generateUtilityClasses("MuiPopper", ["root"]);
const _excluded$1n = ["anchorEl", "children", "direction", "disablePortal", "modifiers", "open", "placement", "popperOptions", "popperRef", "slotProps", "slots", "TransitionProps", "ownerState"], _excluded2$8 = ["anchorEl", "children", "container", "direction", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "style", "transition", "slotProps", "slots"];
function flipPlacement(placement, direction2) {
  if (direction2 === "ltr") {
    return placement;
  }
  switch (placement) {
    case "bottom-end":
      return "bottom-start";
    case "bottom-start":
      return "bottom-end";
    case "top-end":
      return "top-start";
    case "top-start":
      return "top-end";
    default:
      return placement;
  }
}
function resolveAnchorEl$1(anchorEl) {
  return typeof anchorEl === "function" ? anchorEl() : anchorEl;
}
function isHTMLElement$1(element) {
  return element.nodeType !== void 0;
}
const useUtilityClasses$1b = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getPopperUtilityClass, classes);
};
const defaultPopperOptions = {};
const PopperTooltip = /* @__PURE__ */ reactExports.forwardRef(function PopperTooltip2(props, forwardedRef) {
  var _slots$root;
  const {
    anchorEl,
    children,
    direction: direction2,
    disablePortal,
    modifiers,
    open,
    placement: initialPlacement,
    popperOptions,
    popperRef: popperRefProp,
    slotProps = {},
    slots = {},
    TransitionProps
    // @ts-ignore internal logic
    // prevent from spreading to DOM, it can come from the parent component e.g. Select.
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1n);
  const tooltipRef = reactExports.useRef(null);
  const ownRef = useForkRef(tooltipRef, forwardedRef);
  const popperRef = reactExports.useRef(null);
  const handlePopperRef = useForkRef(popperRef, popperRefProp);
  const handlePopperRefRef = reactExports.useRef(handlePopperRef);
  useEnhancedEffect(() => {
    handlePopperRefRef.current = handlePopperRef;
  }, [handlePopperRef]);
  reactExports.useImperativeHandle(popperRefProp, () => popperRef.current, []);
  const rtlPlacement = flipPlacement(initialPlacement, direction2);
  const [placement, setPlacement] = reactExports.useState(rtlPlacement);
  const [resolvedAnchorElement, setResolvedAnchorElement] = reactExports.useState(resolveAnchorEl$1(anchorEl));
  reactExports.useEffect(() => {
    if (popperRef.current) {
      popperRef.current.forceUpdate();
    }
  });
  reactExports.useEffect(() => {
    if (anchorEl) {
      setResolvedAnchorElement(resolveAnchorEl$1(anchorEl));
    }
  }, [anchorEl]);
  useEnhancedEffect(() => {
    if (!resolvedAnchorElement || !open) {
      return void 0;
    }
    const handlePopperUpdate = (data) => {
      setPlacement(data.placement);
    };
    let popperModifiers = [{
      name: "preventOverflow",
      options: {
        altBoundary: disablePortal
      }
    }, {
      name: "flip",
      options: {
        altBoundary: disablePortal
      }
    }, {
      name: "onUpdate",
      enabled: true,
      phase: "afterWrite",
      fn: ({
        state
      }) => {
        handlePopperUpdate(state);
      }
    }];
    if (modifiers != null) {
      popperModifiers = popperModifiers.concat(modifiers);
    }
    if (popperOptions && popperOptions.modifiers != null) {
      popperModifiers = popperModifiers.concat(popperOptions.modifiers);
    }
    const popper2 = createPopper(resolvedAnchorElement, tooltipRef.current, _extends$1({
      placement: rtlPlacement
    }, popperOptions, {
      modifiers: popperModifiers
    }));
    handlePopperRefRef.current(popper2);
    return () => {
      popper2.destroy();
      handlePopperRefRef.current(null);
    };
  }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);
  const childProps = {
    placement
  };
  if (TransitionProps !== null) {
    childProps.TransitionProps = TransitionProps;
  }
  const classes = useUtilityClasses$1b(props);
  const Root = (_slots$root = slots.root) != null ? _slots$root : "div";
  const rootProps = useSlotProps({
    elementType: Root,
    externalSlotProps: slotProps.root,
    externalForwardedProps: other,
    additionalProps: {
      role: "tooltip",
      ref: ownRef
    },
    ownerState: props,
    className: classes.root
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Root, _extends$1({}, rootProps, {
    children: typeof children === "function" ? children(childProps) : children
  }));
});
const Popper$1 = /* @__PURE__ */ reactExports.forwardRef(function Popper2(props, forwardedRef) {
  const {
    anchorEl,
    children,
    container: containerProp,
    direction: direction2 = "ltr",
    disablePortal = false,
    keepMounted = false,
    modifiers,
    open,
    placement = "bottom",
    popperOptions = defaultPopperOptions,
    popperRef,
    style: style2,
    transition = false,
    slotProps = {},
    slots = {}
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded2$8);
  const [exited, setExited] = reactExports.useState(true);
  const handleEnter = () => {
    setExited(false);
  };
  const handleExited = () => {
    setExited(true);
  };
  if (!keepMounted && !open && (!transition || exited)) {
    return null;
  }
  let container;
  if (containerProp) {
    container = containerProp;
  } else if (anchorEl) {
    const resolvedAnchorEl = resolveAnchorEl$1(anchorEl);
    container = resolvedAnchorEl && isHTMLElement$1(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body;
  }
  const display2 = !open && keepMounted && (!transition || exited) ? "none" : void 0;
  const transitionProps = transition ? {
    in: open,
    onEnter: handleEnter,
    onExited: handleExited
  } : void 0;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, {
    disablePortal,
    container,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(PopperTooltip, _extends$1({
      anchorEl,
      direction: direction2,
      disablePortal,
      modifiers,
      ref: forwardedRef,
      open: transition ? !exited : open,
      placement,
      popperOptions,
      popperRef,
      slotProps,
      slots
    }, other, {
      style: _extends$1({
        // Prevents scroll issue, waiting for Popper.js to add this style once initiated.
        position: "fixed",
        // Fix Popper.js display issue
        top: 0,
        left: 0,
        display: display2
      }, style2),
      TransitionProps: transitionProps,
      children
    }))
  });
});
const _excluded$1m = ["anchorEl", "component", "components", "componentsProps", "container", "disablePortal", "keepMounted", "modifiers", "open", "placement", "popperOptions", "popperRef", "transition", "slots", "slotProps"];
const PopperRoot = styled(Popper$1, {
  name: "MuiPopper",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({});
const Popper = /* @__PURE__ */ reactExports.forwardRef(function Popper22(inProps, ref2) {
  var _slots$root;
  const theme = useTheme();
  const props = useDefaultProps({
    props: inProps,
    name: "MuiPopper"
  });
  const {
    anchorEl,
    component,
    components,
    componentsProps,
    container,
    disablePortal,
    keepMounted,
    modifiers,
    open,
    placement,
    popperOptions,
    popperRef,
    transition,
    slots,
    slotProps
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1m);
  const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;
  const otherProps = _extends$1({
    anchorEl,
    container,
    disablePortal,
    keepMounted,
    modifiers,
    open,
    placement,
    popperOptions,
    popperRef,
    transition
  }, other);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PopperRoot, _extends$1({
    as: component,
    direction: theme == null ? void 0 : theme.direction,
    slots: {
      root: RootComponent
    },
    slotProps: slotProps != null ? slotProps : componentsProps
  }, otherProps, {
    ref: ref2
  }));
});
function getListSubheaderUtilityClass(slot) {
  return generateUtilityClass("MuiListSubheader", slot);
}
generateUtilityClasses("MuiListSubheader", ["root", "colorPrimary", "colorInherit", "gutters", "inset", "sticky"]);
const _excluded$1l = ["className", "color", "component", "disableGutters", "disableSticky", "inset"];
const useUtilityClasses$1a = (ownerState) => {
  const {
    classes,
    color: color2,
    disableGutters,
    inset,
    disableSticky
  } = ownerState;
  const slots = {
    root: ["root", color2 !== "default" && `color${capitalize$2(color2)}`, !disableGutters && "gutters", inset && "inset", !disableSticky && "sticky"]
  };
  return composeClasses(slots, getListSubheaderUtilityClass, classes);
};
const ListSubheaderRoot = styled("li", {
  name: "MuiListSubheader",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.color !== "default" && styles2[`color${capitalize$2(ownerState.color)}`], !ownerState.disableGutters && styles2.gutters, ownerState.inset && styles2.inset, !ownerState.disableSticky && styles2.sticky];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  boxSizing: "border-box",
  lineHeight: "48px",
  listStyle: "none",
  color: (theme.vars || theme).palette.text.secondary,
  fontFamily: theme.typography.fontFamily,
  fontWeight: theme.typography.fontWeightMedium,
  fontSize: theme.typography.pxToRem(14)
}, ownerState.color === "primary" && {
  color: (theme.vars || theme).palette.primary.main
}, ownerState.color === "inherit" && {
  color: "inherit"
}, !ownerState.disableGutters && {
  paddingLeft: 16,
  paddingRight: 16
}, ownerState.inset && {
  paddingLeft: 72
}, !ownerState.disableSticky && {
  position: "sticky",
  top: 0,
  zIndex: 1,
  backgroundColor: (theme.vars || theme).palette.background.paper
}));
const ListSubheader = /* @__PURE__ */ reactExports.forwardRef(function ListSubheader2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiListSubheader"
  });
  const {
    className,
    color: color2 = "default",
    component = "li",
    disableGutters = false,
    disableSticky = false,
    inset = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1l);
  const ownerState = _extends$1({}, props, {
    color: color2,
    component,
    disableGutters,
    disableSticky,
    inset
  });
  const classes = useUtilityClasses$1a(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListSubheaderRoot, _extends$1({
    as: component,
    className: clsx$3(classes.root, className),
    ref: ref2,
    ownerState
  }, other));
});
ListSubheader.muiSkipListHighlight = true;
const CancelIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"
}), "Cancel");
function getChipUtilityClass(slot) {
  return generateUtilityClass("MuiChip", slot);
}
const chipClasses = generateUtilityClasses("MuiChip", ["root", "sizeSmall", "sizeMedium", "colorError", "colorInfo", "colorPrimary", "colorSecondary", "colorSuccess", "colorWarning", "disabled", "clickable", "clickableColorPrimary", "clickableColorSecondary", "deletable", "deletableColorPrimary", "deletableColorSecondary", "outlined", "filled", "outlinedPrimary", "outlinedSecondary", "filledPrimary", "filledSecondary", "avatar", "avatarSmall", "avatarMedium", "avatarColorPrimary", "avatarColorSecondary", "icon", "iconSmall", "iconMedium", "iconColorPrimary", "iconColorSecondary", "label", "labelSmall", "labelMedium", "deleteIcon", "deleteIconSmall", "deleteIconMedium", "deleteIconColorPrimary", "deleteIconColorSecondary", "deleteIconOutlinedColorPrimary", "deleteIconOutlinedColorSecondary", "deleteIconFilledColorPrimary", "deleteIconFilledColorSecondary", "focusVisible"]);
const _excluded$1k = ["avatar", "className", "clickable", "color", "component", "deleteIcon", "disabled", "icon", "label", "onClick", "onDelete", "onKeyDown", "onKeyUp", "size", "variant", "tabIndex", "skipFocusWhenDisabled"];
const useUtilityClasses$19 = (ownerState) => {
  const {
    classes,
    disabled,
    size,
    color: color2,
    iconColor,
    onDelete,
    clickable,
    variant: variant2
  } = ownerState;
  const slots = {
    root: ["root", variant2, disabled && "disabled", `size${capitalize$2(size)}`, `color${capitalize$2(color2)}`, clickable && "clickable", clickable && `clickableColor${capitalize$2(color2)}`, onDelete && "deletable", onDelete && `deletableColor${capitalize$2(color2)}`, `${variant2}${capitalize$2(color2)}`],
    label: ["label", `label${capitalize$2(size)}`],
    avatar: ["avatar", `avatar${capitalize$2(size)}`, `avatarColor${capitalize$2(color2)}`],
    icon: ["icon", `icon${capitalize$2(size)}`, `iconColor${capitalize$2(iconColor)}`],
    deleteIcon: ["deleteIcon", `deleteIcon${capitalize$2(size)}`, `deleteIconColor${capitalize$2(color2)}`, `deleteIcon${capitalize$2(variant2)}Color${capitalize$2(color2)}`]
  };
  return composeClasses(slots, getChipUtilityClass, classes);
};
const ChipRoot = styled("div", {
  name: "MuiChip",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    const {
      color: color2,
      iconColor,
      clickable,
      onDelete,
      size,
      variant: variant2
    } = ownerState;
    return [{
      [`& .${chipClasses.avatar}`]: styles2.avatar
    }, {
      [`& .${chipClasses.avatar}`]: styles2[`avatar${capitalize$2(size)}`]
    }, {
      [`& .${chipClasses.avatar}`]: styles2[`avatarColor${capitalize$2(color2)}`]
    }, {
      [`& .${chipClasses.icon}`]: styles2.icon
    }, {
      [`& .${chipClasses.icon}`]: styles2[`icon${capitalize$2(size)}`]
    }, {
      [`& .${chipClasses.icon}`]: styles2[`iconColor${capitalize$2(iconColor)}`]
    }, {
      [`& .${chipClasses.deleteIcon}`]: styles2.deleteIcon
    }, {
      [`& .${chipClasses.deleteIcon}`]: styles2[`deleteIcon${capitalize$2(size)}`]
    }, {
      [`& .${chipClasses.deleteIcon}`]: styles2[`deleteIconColor${capitalize$2(color2)}`]
    }, {
      [`& .${chipClasses.deleteIcon}`]: styles2[`deleteIcon${capitalize$2(variant2)}Color${capitalize$2(color2)}`]
    }, styles2.root, styles2[`size${capitalize$2(size)}`], styles2[`color${capitalize$2(color2)}`], clickable && styles2.clickable, clickable && color2 !== "default" && styles2[`clickableColor${capitalize$2(color2)})`], onDelete && styles2.deletable, onDelete && color2 !== "default" && styles2[`deletableColor${capitalize$2(color2)}`], styles2[variant2], styles2[`${variant2}${capitalize$2(color2)}`]];
  }
})(({
  theme,
  ownerState
}) => {
  const textColor = theme.palette.mode === "light" ? theme.palette.grey[700] : theme.palette.grey[300];
  return _extends$1({
    maxWidth: "100%",
    fontFamily: theme.typography.fontFamily,
    fontSize: theme.typography.pxToRem(13),
    display: "inline-flex",
    alignItems: "center",
    justifyContent: "center",
    height: 32,
    color: (theme.vars || theme).palette.text.primary,
    backgroundColor: (theme.vars || theme).palette.action.selected,
    borderRadius: 32 / 2,
    whiteSpace: "nowrap",
    transition: theme.transitions.create(["background-color", "box-shadow"]),
    // reset cursor explicitly in case ButtonBase is used
    cursor: "unset",
    // We disable the focus ring for mouse, touch and keyboard users.
    outline: 0,
    textDecoration: "none",
    border: 0,
    // Remove `button` border
    padding: 0,
    // Remove `button` padding
    verticalAlign: "middle",
    boxSizing: "border-box",
    [`&.${chipClasses.disabled}`]: {
      opacity: (theme.vars || theme).palette.action.disabledOpacity,
      pointerEvents: "none"
    },
    [`& .${chipClasses.avatar}`]: {
      marginLeft: 5,
      marginRight: -6,
      width: 24,
      height: 24,
      color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,
      fontSize: theme.typography.pxToRem(12)
    },
    [`& .${chipClasses.avatarColorPrimary}`]: {
      color: (theme.vars || theme).palette.primary.contrastText,
      backgroundColor: (theme.vars || theme).palette.primary.dark
    },
    [`& .${chipClasses.avatarColorSecondary}`]: {
      color: (theme.vars || theme).palette.secondary.contrastText,
      backgroundColor: (theme.vars || theme).palette.secondary.dark
    },
    [`& .${chipClasses.avatarSmall}`]: {
      marginLeft: 4,
      marginRight: -4,
      width: 18,
      height: 18,
      fontSize: theme.typography.pxToRem(10)
    },
    [`& .${chipClasses.icon}`]: _extends$1({
      marginLeft: 5,
      marginRight: -6
    }, ownerState.size === "small" && {
      fontSize: 18,
      marginLeft: 4,
      marginRight: -4
    }, ownerState.iconColor === ownerState.color && _extends$1({
      color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor
    }, ownerState.color !== "default" && {
      color: "inherit"
    })),
    [`& .${chipClasses.deleteIcon}`]: _extends$1({
      WebkitTapHighlightColor: "transparent",
      color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : colorManipulatorExports.alpha(theme.palette.text.primary, 0.26),
      fontSize: 22,
      cursor: "pointer",
      margin: "0 5px 0 -6px",
      "&:hover": {
        color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.4)` : colorManipulatorExports.alpha(theme.palette.text.primary, 0.4)
      }
    }, ownerState.size === "small" && {
      fontSize: 16,
      marginRight: 4,
      marginLeft: -4
    }, ownerState.color !== "default" && {
      color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].contrastTextChannel} / 0.7)` : colorManipulatorExports.alpha(theme.palette[ownerState.color].contrastText, 0.7),
      "&:hover, &:active": {
        color: (theme.vars || theme).palette[ownerState.color].contrastText
      }
    })
  }, ownerState.size === "small" && {
    height: 24
  }, ownerState.color !== "default" && {
    backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
    color: (theme.vars || theme).palette[ownerState.color].contrastText
  }, ownerState.onDelete && {
    [`&.${chipClasses.focusVisible}`]: {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
    }
  }, ownerState.onDelete && ownerState.color !== "default" && {
    [`&.${chipClasses.focusVisible}`]: {
      backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
    }
  });
}, ({
  theme,
  ownerState
}) => _extends$1({}, ownerState.clickable && {
  userSelect: "none",
  WebkitTapHighlightColor: "transparent",
  cursor: "pointer",
  "&:hover": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : colorManipulatorExports.alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
  },
  [`&.${chipClasses.focusVisible}`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
  },
  "&:active": {
    boxShadow: (theme.vars || theme).shadows[1]
  }
}, ownerState.clickable && ownerState.color !== "default" && {
  [`&:hover, &.${chipClasses.focusVisible}`]: {
    backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
  }
}), ({
  theme,
  ownerState
}) => _extends$1({}, ownerState.variant === "outlined" && {
  backgroundColor: "transparent",
  border: theme.vars ? `1px solid ${theme.vars.palette.Chip.defaultBorder}` : `1px solid ${theme.palette.mode === "light" ? theme.palette.grey[400] : theme.palette.grey[700]}`,
  [`&.${chipClasses.clickable}:hover`]: {
    backgroundColor: (theme.vars || theme).palette.action.hover
  },
  [`&.${chipClasses.focusVisible}`]: {
    backgroundColor: (theme.vars || theme).palette.action.focus
  },
  [`& .${chipClasses.avatar}`]: {
    marginLeft: 4
  },
  [`& .${chipClasses.avatarSmall}`]: {
    marginLeft: 2
  },
  [`& .${chipClasses.icon}`]: {
    marginLeft: 4
  },
  [`& .${chipClasses.iconSmall}`]: {
    marginLeft: 2
  },
  [`& .${chipClasses.deleteIcon}`]: {
    marginRight: 5
  },
  [`& .${chipClasses.deleteIconSmall}`]: {
    marginRight: 3
  }
}, ownerState.variant === "outlined" && ownerState.color !== "default" && {
  color: (theme.vars || theme).palette[ownerState.color].main,
  border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, 0.7)}`,
  [`&.${chipClasses.clickable}:hover`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity)
  },
  [`&.${chipClasses.focusVisible}`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.focusOpacity})` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
  },
  [`& .${chipClasses.deleteIcon}`]: {
    color: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.7)` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, 0.7),
    "&:hover, &:active": {
      color: (theme.vars || theme).palette[ownerState.color].main
    }
  }
}));
const ChipLabel = styled("span", {
  name: "MuiChip",
  slot: "Label",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    const {
      size
    } = ownerState;
    return [styles2.label, styles2[`label${capitalize$2(size)}`]];
  }
})(({
  ownerState
}) => _extends$1({
  overflow: "hidden",
  textOverflow: "ellipsis",
  paddingLeft: 12,
  paddingRight: 12,
  whiteSpace: "nowrap"
}, ownerState.variant === "outlined" && {
  paddingLeft: 11,
  paddingRight: 11
}, ownerState.size === "small" && {
  paddingLeft: 8,
  paddingRight: 8
}, ownerState.size === "small" && ownerState.variant === "outlined" && {
  paddingLeft: 7,
  paddingRight: 7
}));
function isDeleteKeyboardEvent(keyboardEvent) {
  return keyboardEvent.key === "Backspace" || keyboardEvent.key === "Delete";
}
const Chip = /* @__PURE__ */ reactExports.forwardRef(function Chip2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiChip"
  });
  const {
    avatar: avatarProp,
    className,
    clickable: clickableProp,
    color: color2 = "default",
    component: ComponentProp,
    deleteIcon: deleteIconProp,
    disabled = false,
    icon: iconProp,
    label,
    onClick: onClick2,
    onDelete,
    onKeyDown,
    onKeyUp,
    size = "medium",
    variant: variant2 = "filled",
    tabIndex,
    skipFocusWhenDisabled = false
    // TODO v6: Rename to `focusableWhenDisabled`.
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1k);
  const chipRef = reactExports.useRef(null);
  const handleRef = useForkRef(chipRef, ref2);
  const handleDeleteIconClick = (event) => {
    event.stopPropagation();
    if (onDelete) {
      onDelete(event);
    }
  };
  const handleKeyDown2 = (event) => {
    if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {
      event.preventDefault();
    }
    if (onKeyDown) {
      onKeyDown(event);
    }
  };
  const handleKeyUp = (event) => {
    if (event.currentTarget === event.target) {
      if (onDelete && isDeleteKeyboardEvent(event)) {
        onDelete(event);
      } else if (event.key === "Escape" && chipRef.current) {
        chipRef.current.blur();
      }
    }
    if (onKeyUp) {
      onKeyUp(event);
    }
  };
  const clickable = clickableProp !== false && onClick2 ? true : clickableProp;
  const component = clickable || onDelete ? ButtonBase : ComponentProp || "div";
  const ownerState = _extends$1({}, props, {
    component,
    disabled,
    size,
    color: color2,
    iconColor: /* @__PURE__ */ reactExports.isValidElement(iconProp) ? iconProp.props.color || color2 : color2,
    onDelete: !!onDelete,
    clickable,
    variant: variant2
  });
  const classes = useUtilityClasses$19(ownerState);
  const moreProps = component === ButtonBase ? _extends$1({
    component: ComponentProp || "div",
    focusVisibleClassName: classes.focusVisible
  }, onDelete && {
    disableRipple: true
  }) : {};
  let deleteIcon = null;
  if (onDelete) {
    deleteIcon = deleteIconProp && /* @__PURE__ */ reactExports.isValidElement(deleteIconProp) ? /* @__PURE__ */ reactExports.cloneElement(deleteIconProp, {
      className: clsx$3(deleteIconProp.props.className, classes.deleteIcon),
      onClick: handleDeleteIconClick
    }) : /* @__PURE__ */ jsxRuntimeExports.jsx(CancelIcon$1, {
      className: clsx$3(classes.deleteIcon),
      onClick: handleDeleteIconClick
    });
  }
  let avatar = null;
  if (avatarProp && /* @__PURE__ */ reactExports.isValidElement(avatarProp)) {
    avatar = /* @__PURE__ */ reactExports.cloneElement(avatarProp, {
      className: clsx$3(classes.avatar, avatarProp.props.className)
    });
  }
  let icon = null;
  if (iconProp && /* @__PURE__ */ reactExports.isValidElement(iconProp)) {
    icon = /* @__PURE__ */ reactExports.cloneElement(iconProp, {
      className: clsx$3(classes.icon, iconProp.props.className)
    });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ChipRoot, _extends$1({
    as: component,
    className: clsx$3(classes.root, className),
    disabled: clickable && disabled ? true : void 0,
    onClick: onClick2,
    onKeyDown: handleKeyDown2,
    onKeyUp: handleKeyUp,
    ref: handleRef,
    tabIndex: skipFocusWhenDisabled && disabled ? -1 : tabIndex,
    ownerState
  }, moreProps, other, {
    children: [avatar || icon, /* @__PURE__ */ jsxRuntimeExports.jsx(ChipLabel, {
      className: clsx$3(classes.label),
      ownerState,
      children: label
    }), deleteIcon]
  }));
});
const _excluded$1j = ["onChange", "maxRows", "minRows", "style", "value"];
function getStyleValue(value) {
  return parseInt(value, 10) || 0;
}
const styles$b = {
  shadow: {
    // Visibility needed to hide the extra text area on iPads
    visibility: "hidden",
    // Remove from the content flow
    position: "absolute",
    // Ignore the scrollbar width
    overflow: "hidden",
    height: 0,
    top: 0,
    left: 0,
    // Create a new layer, increase the isolation of the computed values
    transform: "translateZ(0)"
  }
};
function isObjectEmpty(object) {
  for (const _2 in object) {
    return false;
  }
  return true;
}
function isEmpty$1(obj2) {
  return isObjectEmpty(obj2) || obj2.outerHeightStyle === 0 && !obj2.overflowing;
}
const TextareaAutosize$1 = /* @__PURE__ */ reactExports.forwardRef(function TextareaAutosize2(props, forwardedRef) {
  const {
    onChange,
    maxRows,
    minRows = 1,
    style: style2,
    value
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1j);
  const {
    current: isControlled
  } = reactExports.useRef(value != null);
  const textareaRef = reactExports.useRef(null);
  const handleRef = useForkRef(forwardedRef, textareaRef);
  const heightRef = reactExports.useRef(null);
  const hiddenTextareaRef = reactExports.useRef(null);
  const calculateTextareaStyles = reactExports.useCallback(() => {
    const textarea = textareaRef.current;
    const hiddenTextarea2 = hiddenTextareaRef.current;
    if (!textarea || !hiddenTextarea2) {
      return void 0;
    }
    const containerWindow = ownerWindow(textarea);
    const computedStyle = containerWindow.getComputedStyle(textarea);
    if (computedStyle.width === "0px") {
      return {
        outerHeightStyle: 0,
        overflowing: false
      };
    }
    hiddenTextarea2.style.width = computedStyle.width;
    hiddenTextarea2.value = textarea.value || props.placeholder || "x";
    if (hiddenTextarea2.value.slice(-1) === "\n") {
      hiddenTextarea2.value += " ";
    }
    const boxSizing2 = computedStyle.boxSizing;
    const padding2 = getStyleValue(computedStyle.paddingBottom) + getStyleValue(computedStyle.paddingTop);
    const border2 = getStyleValue(computedStyle.borderBottomWidth) + getStyleValue(computedStyle.borderTopWidth);
    const innerHeight = hiddenTextarea2.scrollHeight;
    hiddenTextarea2.value = "x";
    const singleRowHeight = hiddenTextarea2.scrollHeight;
    let outerHeight = innerHeight;
    if (minRows) {
      outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);
    }
    if (maxRows) {
      outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);
    }
    outerHeight = Math.max(outerHeight, singleRowHeight);
    const outerHeightStyle = outerHeight + (boxSizing2 === "border-box" ? padding2 + border2 : 0);
    const overflowing = Math.abs(outerHeight - innerHeight) <= 1;
    return {
      outerHeightStyle,
      overflowing
    };
  }, [maxRows, minRows, props.placeholder]);
  const didHeightChange = useEventCallback(() => {
    const textarea = textareaRef.current;
    const textareaStyles = calculateTextareaStyles();
    if (!textarea || !textareaStyles || isEmpty$1(textareaStyles)) {
      return false;
    }
    const outerHeightStyle = textareaStyles.outerHeightStyle;
    return heightRef.current != null && heightRef.current !== outerHeightStyle;
  });
  const syncHeight = reactExports.useCallback(() => {
    const textarea = textareaRef.current;
    const textareaStyles = calculateTextareaStyles();
    if (!textarea || !textareaStyles || isEmpty$1(textareaStyles)) {
      return;
    }
    const outerHeightStyle = textareaStyles.outerHeightStyle;
    if (heightRef.current !== outerHeightStyle) {
      heightRef.current = outerHeightStyle;
      textarea.style.height = `${outerHeightStyle}px`;
    }
    textarea.style.overflow = textareaStyles.overflowing ? "hidden" : "";
  }, [calculateTextareaStyles]);
  const frameRef = reactExports.useRef(-1);
  useEnhancedEffect(() => {
    const debouncedHandleResize = debounce$2(syncHeight);
    const textarea = textareaRef == null ? void 0 : textareaRef.current;
    if (!textarea) {
      return void 0;
    }
    const containerWindow = ownerWindow(textarea);
    containerWindow.addEventListener("resize", debouncedHandleResize);
    let resizeObserver;
    if (typeof ResizeObserver !== "undefined") {
      resizeObserver = new ResizeObserver(() => {
        if (didHeightChange()) {
          resizeObserver.unobserve(textarea);
          cancelAnimationFrame(frameRef.current);
          syncHeight();
          frameRef.current = requestAnimationFrame(() => {
            resizeObserver.observe(textarea);
          });
        }
      });
      resizeObserver.observe(textarea);
    }
    return () => {
      debouncedHandleResize.clear();
      cancelAnimationFrame(frameRef.current);
      containerWindow.removeEventListener("resize", debouncedHandleResize);
      if (resizeObserver) {
        resizeObserver.disconnect();
      }
    };
  }, [calculateTextareaStyles, syncHeight, didHeightChange]);
  useEnhancedEffect(() => {
    syncHeight();
  });
  const handleChange = (event) => {
    if (!isControlled) {
      syncHeight();
    }
    if (onChange) {
      onChange(event);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx("textarea", _extends$1({
      value,
      onChange: handleChange,
      ref: handleRef,
      rows: minRows,
      style: style2
    }, other)), /* @__PURE__ */ jsxRuntimeExports.jsx("textarea", {
      "aria-hidden": true,
      className: props.className,
      readOnly: true,
      ref: hiddenTextareaRef,
      tabIndex: -1,
      style: _extends$1({}, styles$b.shadow, style2, {
        paddingTop: 0,
        paddingBottom: 0
      })
    })]
  });
});
function formControlState({
  props,
  states,
  muiFormControl
}) {
  return states.reduce((acc, state) => {
    acc[state] = props[state];
    if (muiFormControl) {
      if (typeof props[state] === "undefined") {
        acc[state] = muiFormControl[state];
      }
    }
    return acc;
  }, {});
}
const FormControlContext = /* @__PURE__ */ reactExports.createContext(void 0);
function useFormControl() {
  return reactExports.useContext(FormControlContext);
}
function GlobalStyles(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles$1, _extends$1({}, props, {
    defaultTheme: defaultTheme$1,
    themeId: THEME_ID
  }));
}
function hasValue(value) {
  return value != null && !(Array.isArray(value) && value.length === 0);
}
function isFilled(obj2, SSR = false) {
  return obj2 && (hasValue(obj2.value) && obj2.value !== "" || SSR && hasValue(obj2.defaultValue) && obj2.defaultValue !== "");
}
function isAdornedStart(obj2) {
  return obj2.startAdornment;
}
function getInputBaseUtilityClass(slot) {
  return generateUtilityClass("MuiInputBase", slot);
}
const inputBaseClasses = generateUtilityClasses("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]);
const _excluded$1i = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"];
const rootOverridesResolver = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.root, ownerState.formControl && styles2.formControl, ownerState.startAdornment && styles2.adornedStart, ownerState.endAdornment && styles2.adornedEnd, ownerState.error && styles2.error, ownerState.size === "small" && styles2.sizeSmall, ownerState.multiline && styles2.multiline, ownerState.color && styles2[`color${capitalize$2(ownerState.color)}`], ownerState.fullWidth && styles2.fullWidth, ownerState.hiddenLabel && styles2.hiddenLabel];
};
const inputOverridesResolver = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.input, ownerState.size === "small" && styles2.inputSizeSmall, ownerState.multiline && styles2.inputMultiline, ownerState.type === "search" && styles2.inputTypeSearch, ownerState.startAdornment && styles2.inputAdornedStart, ownerState.endAdornment && styles2.inputAdornedEnd, ownerState.hiddenLabel && styles2.inputHiddenLabel];
};
const useUtilityClasses$18 = (ownerState) => {
  const {
    classes,
    color: color2,
    disabled,
    error,
    endAdornment,
    focused,
    formControl,
    fullWidth,
    hiddenLabel,
    multiline,
    readOnly,
    size,
    startAdornment,
    type: type2
  } = ownerState;
  const slots = {
    root: ["root", `color${capitalize$2(color2)}`, disabled && "disabled", error && "error", fullWidth && "fullWidth", focused && "focused", formControl && "formControl", size && size !== "medium" && `size${capitalize$2(size)}`, multiline && "multiline", startAdornment && "adornedStart", endAdornment && "adornedEnd", hiddenLabel && "hiddenLabel", readOnly && "readOnly"],
    input: ["input", disabled && "disabled", type2 === "search" && "inputTypeSearch", multiline && "inputMultiline", size === "small" && "inputSizeSmall", hiddenLabel && "inputHiddenLabel", startAdornment && "inputAdornedStart", endAdornment && "inputAdornedEnd", readOnly && "readOnly"]
  };
  return composeClasses(slots, getInputBaseUtilityClass, classes);
};
const InputBaseRoot = styled("div", {
  name: "MuiInputBase",
  slot: "Root",
  overridesResolver: rootOverridesResolver
})(({
  theme,
  ownerState
}) => _extends$1({}, theme.typography.body1, {
  color: (theme.vars || theme).palette.text.primary,
  lineHeight: "1.4375em",
  // 23px
  boxSizing: "border-box",
  // Prevent padding issue with fullWidth.
  position: "relative",
  cursor: "text",
  display: "inline-flex",
  alignItems: "center",
  [`&.${inputBaseClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.disabled,
    cursor: "default"
  }
}, ownerState.multiline && _extends$1({
  padding: "4px 0 5px"
}, ownerState.size === "small" && {
  paddingTop: 1
}), ownerState.fullWidth && {
  width: "100%"
}));
const InputBaseComponent = styled("input", {
  name: "MuiInputBase",
  slot: "Input",
  overridesResolver: inputOverridesResolver
})(({
  theme,
  ownerState
}) => {
  const light2 = theme.palette.mode === "light";
  const placeholder = _extends$1({
    color: "currentColor"
  }, theme.vars ? {
    opacity: theme.vars.opacity.inputPlaceholder
  } : {
    opacity: light2 ? 0.42 : 0.5
  }, {
    transition: theme.transitions.create("opacity", {
      duration: theme.transitions.duration.shorter
    })
  });
  const placeholderHidden = {
    opacity: "0 !important"
  };
  const placeholderVisible = theme.vars ? {
    opacity: theme.vars.opacity.inputPlaceholder
  } : {
    opacity: light2 ? 0.42 : 0.5
  };
  return _extends$1({
    font: "inherit",
    letterSpacing: "inherit",
    color: "currentColor",
    padding: "4px 0 5px",
    border: 0,
    boxSizing: "content-box",
    background: "none",
    height: "1.4375em",
    // Reset 23pxthe native input line-height
    margin: 0,
    // Reset for Safari
    WebkitTapHighlightColor: "transparent",
    display: "block",
    // Make the flex item shrink with Firefox
    minWidth: 0,
    width: "100%",
    // Fix IE11 width issue
    animationName: "mui-auto-fill-cancel",
    animationDuration: "10ms",
    "&::-webkit-input-placeholder": placeholder,
    "&::-moz-placeholder": placeholder,
    // Firefox 19+
    "&:-ms-input-placeholder": placeholder,
    // IE11
    "&::-ms-input-placeholder": placeholder,
    // Edge
    "&:focus": {
      outline: 0
    },
    // Reset Firefox invalid required input style
    "&:invalid": {
      boxShadow: "none"
    },
    "&::-webkit-search-decoration": {
      // Remove the padding when type=search.
      WebkitAppearance: "none"
    },
    // Show and hide the placeholder logic
    [`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {
      "&::-webkit-input-placeholder": placeholderHidden,
      "&::-moz-placeholder": placeholderHidden,
      // Firefox 19+
      "&:-ms-input-placeholder": placeholderHidden,
      // IE11
      "&::-ms-input-placeholder": placeholderHidden,
      // Edge
      "&:focus::-webkit-input-placeholder": placeholderVisible,
      "&:focus::-moz-placeholder": placeholderVisible,
      // Firefox 19+
      "&:focus:-ms-input-placeholder": placeholderVisible,
      // IE11
      "&:focus::-ms-input-placeholder": placeholderVisible
      // Edge
    },
    [`&.${inputBaseClasses.disabled}`]: {
      opacity: 1,
      // Reset iOS opacity
      WebkitTextFillColor: (theme.vars || theme).palette.text.disabled
      // Fix opacity Safari bug
    },
    "&:-webkit-autofill": {
      animationDuration: "5000s",
      animationName: "mui-auto-fill"
    }
  }, ownerState.size === "small" && {
    paddingTop: 1
  }, ownerState.multiline && {
    height: "auto",
    resize: "none",
    padding: 0,
    paddingTop: 0
  }, ownerState.type === "search" && {
    // Improve type search style.
    MozAppearance: "textfield"
  });
});
const inputGlobalStyles = /* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles, {
  styles: {
    "@keyframes mui-auto-fill": {
      from: {
        display: "block"
      }
    },
    "@keyframes mui-auto-fill-cancel": {
      from: {
        display: "block"
      }
    }
  }
});
const InputBase = /* @__PURE__ */ reactExports.forwardRef(function InputBase2(inProps, ref2) {
  var _slotProps$input;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiInputBase"
  });
  const {
    "aria-describedby": ariaDescribedby,
    autoComplete,
    autoFocus,
    className,
    components = {},
    componentsProps = {},
    defaultValue,
    disabled,
    disableInjectingGlobalStyles,
    endAdornment,
    fullWidth = false,
    id,
    inputComponent = "input",
    inputProps: inputPropsProp = {},
    inputRef: inputRefProp,
    maxRows,
    minRows,
    multiline = false,
    name,
    onBlur,
    onChange,
    onClick: onClick2,
    onFocus,
    onKeyDown,
    onKeyUp,
    placeholder,
    readOnly,
    renderSuffix,
    rows,
    slotProps = {},
    slots = {},
    startAdornment,
    type: type2 = "text",
    value: valueProp
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1i);
  const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;
  const {
    current: isControlled
  } = reactExports.useRef(value != null);
  const inputRef = reactExports.useRef();
  const handleInputRefWarning = reactExports.useCallback((instance) => {
  }, []);
  const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);
  const [focused, setFocused] = reactExports.useState(false);
  const muiFormControl = useFormControl();
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
  });
  fcs.focused = muiFormControl ? muiFormControl.focused : focused;
  reactExports.useEffect(() => {
    if (!muiFormControl && disabled && focused) {
      setFocused(false);
      if (onBlur) {
        onBlur();
      }
    }
  }, [muiFormControl, disabled, focused, onBlur]);
  const onFilled = muiFormControl && muiFormControl.onFilled;
  const onEmpty = muiFormControl && muiFormControl.onEmpty;
  const checkDirty = reactExports.useCallback((obj2) => {
    if (isFilled(obj2)) {
      if (onFilled) {
        onFilled();
      }
    } else if (onEmpty) {
      onEmpty();
    }
  }, [onFilled, onEmpty]);
  useEnhancedEffect(() => {
    if (isControlled) {
      checkDirty({
        value
      });
    }
  }, [value, checkDirty, isControlled]);
  const handleFocus = (event) => {
    if (fcs.disabled) {
      event.stopPropagation();
      return;
    }
    if (onFocus) {
      onFocus(event);
    }
    if (inputPropsProp.onFocus) {
      inputPropsProp.onFocus(event);
    }
    if (muiFormControl && muiFormControl.onFocus) {
      muiFormControl.onFocus(event);
    } else {
      setFocused(true);
    }
  };
  const handleBlur = (event) => {
    if (onBlur) {
      onBlur(event);
    }
    if (inputPropsProp.onBlur) {
      inputPropsProp.onBlur(event);
    }
    if (muiFormControl && muiFormControl.onBlur) {
      muiFormControl.onBlur(event);
    } else {
      setFocused(false);
    }
  };
  const handleChange = (event, ...args) => {
    if (!isControlled) {
      const element = event.target || inputRef.current;
      if (element == null) {
        throw new Error(formatMuiErrorMessage$1(1));
      }
      checkDirty({
        value: element.value
      });
    }
    if (inputPropsProp.onChange) {
      inputPropsProp.onChange(event, ...args);
    }
    if (onChange) {
      onChange(event, ...args);
    }
  };
  reactExports.useEffect(() => {
    checkDirty(inputRef.current);
  }, []);
  const handleClick = (event) => {
    if (inputRef.current && event.currentTarget === event.target) {
      inputRef.current.focus();
    }
    if (onClick2) {
      onClick2(event);
    }
  };
  let InputComponent = inputComponent;
  let inputProps = inputPropsProp;
  if (multiline && InputComponent === "input") {
    if (rows) {
      inputProps = _extends$1({
        type: void 0,
        minRows: rows,
        maxRows: rows
      }, inputProps);
    } else {
      inputProps = _extends$1({
        type: void 0,
        maxRows,
        minRows
      }, inputProps);
    }
    InputComponent = TextareaAutosize$1;
  }
  const handleAutoFill = (event) => {
    checkDirty(event.animationName === "mui-auto-fill-cancel" ? inputRef.current : {
      value: "x"
    });
  };
  reactExports.useEffect(() => {
    if (muiFormControl) {
      muiFormControl.setAdornedStart(Boolean(startAdornment));
    }
  }, [muiFormControl, startAdornment]);
  const ownerState = _extends$1({}, props, {
    color: fcs.color || "primary",
    disabled: fcs.disabled,
    endAdornment,
    error: fcs.error,
    focused: fcs.focused,
    formControl: muiFormControl,
    fullWidth,
    hiddenLabel: fcs.hiddenLabel,
    multiline,
    size: fcs.size,
    startAdornment,
    type: type2
  });
  const classes = useUtilityClasses$18(ownerState);
  const Root = slots.root || components.Root || InputBaseRoot;
  const rootProps = slotProps.root || componentsProps.root || {};
  const Input3 = slots.input || components.Input || InputBaseComponent;
  inputProps = _extends$1({}, inputProps, (_slotProps$input = slotProps.input) != null ? _slotProps$input : componentsProps.input);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [!disableInjectingGlobalStyles && inputGlobalStyles, /* @__PURE__ */ jsxRuntimeExports.jsxs(Root, _extends$1({}, rootProps, !isHostComponent(Root) && {
      ownerState: _extends$1({}, ownerState, rootProps.ownerState)
    }, {
      ref: ref2,
      onClick: handleClick
    }, other, {
      className: clsx$3(classes.root, rootProps.className, className, readOnly && "MuiInputBase-readOnly"),
      children: [startAdornment, /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlContext.Provider, {
        value: null,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input3, _extends$1({
          ownerState,
          "aria-invalid": fcs.error,
          "aria-describedby": ariaDescribedby,
          autoComplete,
          autoFocus,
          defaultValue,
          disabled: fcs.disabled,
          id,
          onAnimationStart: handleAutoFill,
          name,
          placeholder,
          readOnly,
          required: fcs.required,
          rows,
          value,
          onKeyDown,
          onKeyUp,
          type: type2
        }, inputProps, !isHostComponent(Input3) && {
          as: InputComponent,
          ownerState: _extends$1({}, ownerState, inputProps.ownerState)
        }, {
          ref: handleInputRef,
          className: clsx$3(classes.input, inputProps.className, readOnly && "MuiInputBase-readOnly"),
          onBlur: handleBlur,
          onChange: handleChange,
          onFocus: handleFocus
        }))
      }), endAdornment, renderSuffix ? renderSuffix(_extends$1({}, fcs, {
        startAdornment
      })) : null]
    }))]
  });
});
function getInputUtilityClass(slot) {
  return generateUtilityClass("MuiInput", slot);
}
const inputClasses = _extends$1({}, inputBaseClasses, generateUtilityClasses("MuiInput", ["root", "underline", "input"]));
function getOutlinedInputUtilityClass(slot) {
  return generateUtilityClass("MuiOutlinedInput", slot);
}
const outlinedInputClasses = _extends$1({}, inputBaseClasses, generateUtilityClasses("MuiOutlinedInput", ["root", "notchedOutline", "input"]));
function getFilledInputUtilityClass(slot) {
  return generateUtilityClass("MuiFilledInput", slot);
}
const filledInputClasses = _extends$1({}, inputBaseClasses, generateUtilityClasses("MuiFilledInput", ["root", "underline", "input"]));
const ArrowDropDownIcon$2 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M7 10l5 5 5-5z"
}), "ArrowDropDown");
function getAutocompleteUtilityClass(slot) {
  return generateUtilityClass("MuiAutocomplete", slot);
}
const autocompleteClasses = generateUtilityClasses("MuiAutocomplete", ["root", "expanded", "fullWidth", "focused", "focusVisible", "tag", "tagSizeSmall", "tagSizeMedium", "hasPopupIcon", "hasClearIcon", "inputRoot", "input", "inputFocused", "endAdornment", "clearIndicator", "popupIndicator", "popupIndicatorOpen", "popper", "popperDisablePortal", "paper", "listbox", "loading", "noOptions", "option", "groupLabel", "groupUl"]);
var _ClearIcon, _ArrowDropDownIcon;
const _excluded$1h = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionKey", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"], _excluded2$7 = ["ref"], _excluded3$2 = ["key"], _excluded4 = ["key"];
const useUtilityClasses$17 = (ownerState) => {
  const {
    classes,
    disablePortal,
    expanded,
    focused,
    fullWidth,
    hasClearIcon,
    hasPopupIcon,
    inputFocused,
    popupOpen,
    size
  } = ownerState;
  const slots = {
    root: ["root", expanded && "expanded", focused && "focused", fullWidth && "fullWidth", hasClearIcon && "hasClearIcon", hasPopupIcon && "hasPopupIcon"],
    inputRoot: ["inputRoot"],
    input: ["input", inputFocused && "inputFocused"],
    tag: ["tag", `tagSize${capitalize$2(size)}`],
    endAdornment: ["endAdornment"],
    clearIndicator: ["clearIndicator"],
    popupIndicator: ["popupIndicator", popupOpen && "popupIndicatorOpen"],
    popper: ["popper", disablePortal && "popperDisablePortal"],
    paper: ["paper"],
    listbox: ["listbox"],
    loading: ["loading"],
    noOptions: ["noOptions"],
    option: ["option"],
    groupLabel: ["groupLabel"],
    groupUl: ["groupUl"]
  };
  return composeClasses(slots, getAutocompleteUtilityClass, classes);
};
const AutocompleteRoot = styled("div", {
  name: "MuiAutocomplete",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    const {
      fullWidth,
      hasClearIcon,
      hasPopupIcon,
      inputFocused,
      size
    } = ownerState;
    return [{
      [`& .${autocompleteClasses.tag}`]: styles2.tag
    }, {
      [`& .${autocompleteClasses.tag}`]: styles2[`tagSize${capitalize$2(size)}`]
    }, {
      [`& .${autocompleteClasses.inputRoot}`]: styles2.inputRoot
    }, {
      [`& .${autocompleteClasses.input}`]: styles2.input
    }, {
      [`& .${autocompleteClasses.input}`]: inputFocused && styles2.inputFocused
    }, styles2.root, fullWidth && styles2.fullWidth, hasPopupIcon && styles2.hasPopupIcon, hasClearIcon && styles2.hasClearIcon];
  }
})({
  [`&.${autocompleteClasses.focused} .${autocompleteClasses.clearIndicator}`]: {
    visibility: "visible"
  },
  /* Avoid double tap issue on iOS */
  "@media (pointer: fine)": {
    [`&:hover .${autocompleteClasses.clearIndicator}`]: {
      visibility: "visible"
    }
  },
  [`& .${autocompleteClasses.tag}`]: {
    margin: 3,
    maxWidth: "calc(100% - 6px)"
  },
  [`& .${autocompleteClasses.inputRoot}`]: {
    [`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
      paddingRight: 26 + 4
    },
    [`.${autocompleteClasses.hasPopupIcon}.${autocompleteClasses.hasClearIcon}&`]: {
      paddingRight: 52 + 4
    },
    [`& .${autocompleteClasses.input}`]: {
      width: 0,
      minWidth: 30
    }
  },
  [`& .${inputClasses.root}`]: {
    paddingBottom: 1,
    "& .MuiInput-input": {
      padding: "4px 4px 4px 0px"
    }
  },
  [`& .${inputClasses.root}.${inputBaseClasses.sizeSmall}`]: {
    [`& .${inputClasses.input}`]: {
      padding: "2px 4px 3px 0"
    }
  },
  [`& .${outlinedInputClasses.root}`]: {
    padding: 9,
    [`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
      paddingRight: 26 + 4 + 9
    },
    [`.${autocompleteClasses.hasPopupIcon}.${autocompleteClasses.hasClearIcon}&`]: {
      paddingRight: 52 + 4 + 9
    },
    [`& .${autocompleteClasses.input}`]: {
      padding: "7.5px 4px 7.5px 5px"
    },
    [`& .${autocompleteClasses.endAdornment}`]: {
      right: 9
    }
  },
  [`& .${outlinedInputClasses.root}.${inputBaseClasses.sizeSmall}`]: {
    // Don't specify paddingRight, as it overrides the default value set when there is only
    // one of the popup or clear icon as the specificity is equal so the latter one wins
    paddingTop: 6,
    paddingBottom: 6,
    paddingLeft: 6,
    [`& .${autocompleteClasses.input}`]: {
      padding: "2.5px 4px 2.5px 8px"
    }
  },
  [`& .${filledInputClasses.root}`]: {
    paddingTop: 19,
    paddingLeft: 8,
    [`.${autocompleteClasses.hasPopupIcon}&, .${autocompleteClasses.hasClearIcon}&`]: {
      paddingRight: 26 + 4 + 9
    },
    [`.${autocompleteClasses.hasPopupIcon}.${autocompleteClasses.hasClearIcon}&`]: {
      paddingRight: 52 + 4 + 9
    },
    [`& .${filledInputClasses.input}`]: {
      padding: "7px 4px"
    },
    [`& .${autocompleteClasses.endAdornment}`]: {
      right: 9
    }
  },
  [`& .${filledInputClasses.root}.${inputBaseClasses.sizeSmall}`]: {
    paddingBottom: 1,
    [`& .${filledInputClasses.input}`]: {
      padding: "2.5px 4px"
    }
  },
  [`& .${inputBaseClasses.hiddenLabel}`]: {
    paddingTop: 8
  },
  [`& .${filledInputClasses.root}.${inputBaseClasses.hiddenLabel}`]: {
    paddingTop: 0,
    paddingBottom: 0,
    [`& .${autocompleteClasses.input}`]: {
      paddingTop: 16,
      paddingBottom: 17
    }
  },
  [`& .${filledInputClasses.root}.${inputBaseClasses.hiddenLabel}.${inputBaseClasses.sizeSmall}`]: {
    [`& .${autocompleteClasses.input}`]: {
      paddingTop: 8,
      paddingBottom: 9
    }
  },
  [`& .${autocompleteClasses.input}`]: {
    flexGrow: 1,
    textOverflow: "ellipsis",
    opacity: 0
  },
  variants: [{
    props: {
      fullWidth: true
    },
    style: {
      width: "100%"
    }
  }, {
    props: {
      size: "small"
    },
    style: {
      [`& .${autocompleteClasses.tag}`]: {
        margin: 2,
        maxWidth: "calc(100% - 4px)"
      }
    }
  }, {
    props: {
      inputFocused: true
    },
    style: {
      [`& .${autocompleteClasses.input}`]: {
        opacity: 1
      }
    }
  }, {
    props: {
      multiple: true
    },
    style: {
      [`& .${autocompleteClasses.inputRoot}`]: {
        flexWrap: "wrap"
      }
    }
  }]
});
const AutocompleteEndAdornment = styled("div", {
  name: "MuiAutocomplete",
  slot: "EndAdornment",
  overridesResolver: (props, styles2) => styles2.endAdornment
})({
  // We use a position absolute to support wrapping tags.
  position: "absolute",
  right: 0,
  top: "50%",
  transform: "translate(0, -50%)"
});
const AutocompleteClearIndicator = styled(IconButton, {
  name: "MuiAutocomplete",
  slot: "ClearIndicator",
  overridesResolver: (props, styles2) => styles2.clearIndicator
})({
  marginRight: -2,
  padding: 4,
  visibility: "hidden"
});
const AutocompletePopupIndicator = styled(IconButton, {
  name: "MuiAutocomplete",
  slot: "PopupIndicator",
  overridesResolver: ({
    ownerState
  }, styles2) => _extends$1({}, styles2.popupIndicator, ownerState.popupOpen && styles2.popupIndicatorOpen)
})({
  padding: 2,
  marginRight: -2,
  variants: [{
    props: {
      popupOpen: true
    },
    style: {
      transform: "rotate(180deg)"
    }
  }]
});
const AutocompletePopper = styled(Popper, {
  name: "MuiAutocomplete",
  slot: "Popper",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [{
      [`& .${autocompleteClasses.option}`]: styles2.option
    }, styles2.popper, ownerState.disablePortal && styles2.popperDisablePortal];
  }
})(({
  theme
}) => ({
  zIndex: (theme.vars || theme).zIndex.modal,
  variants: [{
    props: {
      disablePortal: true
    },
    style: {
      position: "absolute"
    }
  }]
}));
const AutocompletePaper = styled(Paper, {
  name: "MuiAutocomplete",
  slot: "Paper",
  overridesResolver: (props, styles2) => styles2.paper
})(({
  theme
}) => _extends$1({}, theme.typography.body1, {
  overflow: "auto"
}));
const AutocompleteLoading = styled("div", {
  name: "MuiAutocomplete",
  slot: "Loading",
  overridesResolver: (props, styles2) => styles2.loading
})(({
  theme
}) => ({
  color: (theme.vars || theme).palette.text.secondary,
  padding: "14px 16px"
}));
const AutocompleteNoOptions = styled("div", {
  name: "MuiAutocomplete",
  slot: "NoOptions",
  overridesResolver: (props, styles2) => styles2.noOptions
})(({
  theme
}) => ({
  color: (theme.vars || theme).palette.text.secondary,
  padding: "14px 16px"
}));
const AutocompleteListbox = styled("div", {
  name: "MuiAutocomplete",
  slot: "Listbox",
  overridesResolver: (props, styles2) => styles2.listbox
})(({
  theme
}) => ({
  listStyle: "none",
  margin: 0,
  padding: "8px 0",
  maxHeight: "40vh",
  overflow: "auto",
  position: "relative",
  [`& .${autocompleteClasses.option}`]: {
    minHeight: 48,
    display: "flex",
    overflow: "hidden",
    justifyContent: "flex-start",
    alignItems: "center",
    cursor: "pointer",
    paddingTop: 6,
    boxSizing: "border-box",
    outline: "0",
    WebkitTapHighlightColor: "transparent",
    paddingBottom: 6,
    paddingLeft: 16,
    paddingRight: 16,
    [theme.breakpoints.up("sm")]: {
      minHeight: "auto"
    },
    [`&.${autocompleteClasses.focused}`]: {
      backgroundColor: (theme.vars || theme).palette.action.hover,
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    },
    '&[aria-disabled="true"]': {
      opacity: (theme.vars || theme).palette.action.disabledOpacity,
      pointerEvents: "none"
    },
    [`&.${autocompleteClasses.focusVisible}`]: {
      backgroundColor: (theme.vars || theme).palette.action.focus
    },
    '&[aria-selected="true"]': {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
      [`&.${autocompleteClasses.focused}`]: {
        backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
        // Reset on touch devices, it doesn't add specificity
        "@media (hover: none)": {
          backgroundColor: (theme.vars || theme).palette.action.selected
        }
      },
      [`&.${autocompleteClasses.focusVisible}`]: {
        backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
      }
    }
  }
}));
const AutocompleteGroupLabel = styled(ListSubheader, {
  name: "MuiAutocomplete",
  slot: "GroupLabel",
  overridesResolver: (props, styles2) => styles2.groupLabel
})(({
  theme
}) => ({
  backgroundColor: (theme.vars || theme).palette.background.paper,
  top: -8
}));
const AutocompleteGroupUl = styled("ul", {
  name: "MuiAutocomplete",
  slot: "GroupUl",
  overridesResolver: (props, styles2) => styles2.groupUl
})({
  padding: 0,
  [`& .${autocompleteClasses.option}`]: {
    paddingLeft: 24
  }
});
const Autocomplete = /* @__PURE__ */ reactExports.forwardRef(function Autocomplete2(inProps, ref2) {
  var _slotProps$clearIndic, _slotProps$paper, _slotProps$popper, _slotProps$popupIndic;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiAutocomplete"
  });
  const {
    autoComplete = false,
    autoHighlight = false,
    autoSelect = false,
    blurOnSelect = false,
    ChipProps,
    className,
    clearIcon = _ClearIcon || (_ClearIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(ClearIcon$2, {
      fontSize: "small"
    })),
    clearOnBlur = !props.freeSolo,
    clearOnEscape = false,
    clearText = "Clear",
    closeText = "Close",
    componentsProps = {},
    defaultValue = props.multiple ? [] : null,
    disableClearable = false,
    disableCloseOnSelect = false,
    disabled = false,
    disabledItemsFocusable = false,
    disableListWrap = false,
    disablePortal = false,
    filterSelectedOptions = false,
    forcePopupIcon = "auto",
    freeSolo = false,
    fullWidth = false,
    getLimitTagsText = (more) => `+${more}`,
    getOptionLabel: getOptionLabelProp,
    groupBy,
    handleHomeEndKeys = !props.freeSolo,
    includeInputInList = false,
    limitTags = -1,
    ListboxComponent = "ul",
    ListboxProps,
    loading = false,
    loadingText = "Loading…",
    multiple = false,
    noOptionsText = "No options",
    openOnFocus = false,
    openText = "Open",
    PaperComponent: PaperComponent2 = Paper,
    PopperComponent = Popper,
    popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDropDownIcon$2, {})),
    readOnly = false,
    renderGroup: renderGroupProp,
    renderInput,
    renderOption: renderOptionProp,
    renderTags,
    selectOnFocus = !props.freeSolo,
    size = "medium",
    slotProps = {}
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1h);
  const {
    getRootProps,
    getInputProps,
    getInputLabelProps,
    getPopupIndicatorProps,
    getClearProps,
    getTagProps,
    getListboxProps,
    getOptionProps,
    value,
    dirty,
    expanded,
    id,
    popupOpen,
    focused,
    focusedTag,
    anchorEl,
    setAnchorEl,
    inputValue,
    groupedOptions
  } = useAutocomplete(_extends$1({}, props, {
    componentName: "Autocomplete"
  }));
  const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
  const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
  const {
    onMouseDown: handleInputMouseDown
  } = getInputProps();
  const {
    ref: externalListboxRef
  } = ListboxProps != null ? ListboxProps : {};
  const _getListboxProps = getListboxProps(), {
    ref: listboxRef
  } = _getListboxProps, otherListboxProps = _objectWithoutPropertiesLoose(_getListboxProps, _excluded2$7);
  const combinedListboxRef = useForkRef(listboxRef, externalListboxRef);
  const defaultGetOptionLabel = (option) => {
    var _option$label;
    return (_option$label = option.label) != null ? _option$label : option;
  };
  const getOptionLabel = getOptionLabelProp || defaultGetOptionLabel;
  const ownerState = _extends$1({}, props, {
    disablePortal,
    expanded,
    focused,
    fullWidth,
    getOptionLabel,
    hasClearIcon,
    hasPopupIcon,
    inputFocused: focusedTag === -1,
    popupOpen,
    size
  });
  const classes = useUtilityClasses$17(ownerState);
  let startAdornment;
  if (multiple && value.length > 0) {
    const getCustomizedTagProps = (params2) => _extends$1({
      className: classes.tag,
      disabled
    }, getTagProps(params2));
    if (renderTags) {
      startAdornment = renderTags(value, getCustomizedTagProps, ownerState);
    } else {
      startAdornment = value.map((option, index2) => {
        const _getCustomizedTagProp = getCustomizedTagProps({
          index: index2
        }), {
          key
        } = _getCustomizedTagProp, customTagProps = _objectWithoutPropertiesLoose(_getCustomizedTagProp, _excluded3$2);
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Chip, _extends$1({
          label: getOptionLabel(option),
          size
        }, customTagProps, ChipProps), key);
      });
    }
  }
  if (limitTags > -1 && Array.isArray(startAdornment)) {
    const more = startAdornment.length - limitTags;
    if (!focused && more > 0) {
      startAdornment = startAdornment.splice(0, limitTags);
      startAdornment.push(/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
        className: classes.tag,
        children: getLimitTagsText(more)
      }, startAdornment.length));
    }
  }
  const defaultRenderGroup = (params2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("li", {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(AutocompleteGroupLabel, {
      className: classes.groupLabel,
      ownerState,
      component: "div",
      children: params2.group
    }), /* @__PURE__ */ jsxRuntimeExports.jsx(AutocompleteGroupUl, {
      className: classes.groupUl,
      ownerState,
      children: params2.children
    })]
  }, params2.key);
  const renderGroup = renderGroupProp || defaultRenderGroup;
  const defaultRenderOption = (props2, option) => {
    const {
      key
    } = props2, otherProps = _objectWithoutPropertiesLoose(props2, _excluded4);
    return /* @__PURE__ */ jsxRuntimeExports.jsx("li", _extends$1({}, otherProps, {
      children: getOptionLabel(option)
    }), key);
  };
  const renderOption = renderOptionProp || defaultRenderOption;
  const renderListOption = (option, index2) => {
    const optionProps = getOptionProps({
      option,
      index: index2
    });
    return renderOption(_extends$1({}, optionProps, {
      className: classes.option
    }), option, {
      selected: optionProps["aria-selected"],
      index: index2,
      inputValue
    }, ownerState);
  };
  const clearIndicatorSlotProps = (_slotProps$clearIndic = slotProps.clearIndicator) != null ? _slotProps$clearIndic : componentsProps.clearIndicator;
  const paperSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : componentsProps.paper;
  const popperSlotProps = (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper;
  const popupIndicatorSlotProps = (_slotProps$popupIndic = slotProps.popupIndicator) != null ? _slotProps$popupIndic : componentsProps.popupIndicator;
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(AutocompleteRoot, _extends$1({
      ref: ref2,
      className: clsx$3(classes.root, className),
      ownerState
    }, getRootProps(other), {
      children: renderInput({
        id,
        disabled,
        fullWidth: true,
        size: size === "small" ? "small" : void 0,
        InputLabelProps: getInputLabelProps(),
        InputProps: _extends$1({
          ref: setAnchorEl,
          className: classes.inputRoot,
          startAdornment,
          onClick: (event) => {
            if (event.target === event.currentTarget) {
              handleInputMouseDown(event);
            }
          }
        }, (hasClearIcon || hasPopupIcon) && {
          endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsxs(AutocompleteEndAdornment, {
            className: classes.endAdornment,
            ownerState,
            children: [hasClearIcon ? /* @__PURE__ */ jsxRuntimeExports.jsx(AutocompleteClearIndicator, _extends$1({}, getClearProps(), {
              "aria-label": clearText,
              title: clearText,
              ownerState
            }, clearIndicatorSlotProps, {
              className: clsx$3(classes.clearIndicator, clearIndicatorSlotProps == null ? void 0 : clearIndicatorSlotProps.className),
              children: clearIcon
            })) : null, hasPopupIcon ? /* @__PURE__ */ jsxRuntimeExports.jsx(AutocompletePopupIndicator, _extends$1({}, getPopupIndicatorProps(), {
              disabled,
              "aria-label": popupOpen ? closeText : openText,
              title: popupOpen ? closeText : openText,
              ownerState
            }, popupIndicatorSlotProps, {
              className: clsx$3(classes.popupIndicator, popupIndicatorSlotProps == null ? void 0 : popupIndicatorSlotProps.className),
              children: popupIcon
            })) : null]
          })
        }),
        inputProps: _extends$1({
          className: classes.input,
          disabled,
          readOnly
        }, getInputProps())
      })
    })), anchorEl ? /* @__PURE__ */ jsxRuntimeExports.jsx(AutocompletePopper, _extends$1({
      as: PopperComponent,
      disablePortal,
      style: {
        width: anchorEl ? anchorEl.clientWidth : null
      },
      ownerState,
      role: "presentation",
      anchorEl,
      open: popupOpen
    }, popperSlotProps, {
      className: clsx$3(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(AutocompletePaper, _extends$1({
        ownerState,
        as: PaperComponent2
      }, paperSlotProps, {
        className: clsx$3(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
        children: [loading && groupedOptions.length === 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(AutocompleteLoading, {
          className: classes.loading,
          ownerState,
          children: loadingText
        }) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(AutocompleteNoOptions, {
          className: classes.noOptions,
          ownerState,
          role: "presentation",
          onMouseDown: (event) => {
            event.preventDefault();
          },
          children: noOptionsText
        }) : null, groupedOptions.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(AutocompleteListbox, _extends$1({
          as: ListboxComponent,
          className: classes.listbox,
          ownerState
        }, otherListboxProps, ListboxProps, {
          ref: combinedListboxRef,
          children: groupedOptions.map((option, index2) => {
            if (groupBy) {
              return renderGroup({
                key: option.key,
                group: option.group,
                children: option.options.map((option2, index22) => renderListOption(option2, option.index + index22))
              });
            }
            return renderListOption(option, index2);
          })
        })) : null]
      }))
    })) : null]
  });
});
const _excluded$1g = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
const styles$a = {
  entering: {
    opacity: 1
  },
  entered: {
    opacity: 1
  }
};
const Fade = /* @__PURE__ */ reactExports.forwardRef(function Fade2(props, ref2) {
  const theme = useTheme$1();
  const defaultTimeout = {
    enter: theme.transitions.duration.enteringScreen,
    exit: theme.transitions.duration.leavingScreen
  };
  const {
    addEndListener,
    appear = true,
    children,
    easing: easing2,
    in: inProp,
    onEnter,
    onEntered,
    onEntering,
    onExit,
    onExited,
    onExiting,
    style: style2,
    timeout = defaultTimeout,
    // eslint-disable-next-line react/prop-types
    TransitionComponent = Transition$4
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1g);
  const nodeRef = reactExports.useRef(null);
  const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref2);
  const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
    if (callback) {
      const node2 = nodeRef.current;
      if (maybeIsAppearing === void 0) {
        callback(node2);
      } else {
        callback(node2, maybeIsAppearing);
      }
    }
  };
  const handleEntering = normalizedTransitionCallback(onEntering);
  const handleEnter = normalizedTransitionCallback((node2, isAppearing) => {
    reflow(node2);
    const transitionProps = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "enter"
    });
    node2.style.webkitTransition = theme.transitions.create("opacity", transitionProps);
    node2.style.transition = theme.transitions.create("opacity", transitionProps);
    if (onEnter) {
      onEnter(node2, isAppearing);
    }
  });
  const handleEntered = normalizedTransitionCallback(onEntered);
  const handleExiting = normalizedTransitionCallback(onExiting);
  const handleExit = normalizedTransitionCallback((node2) => {
    const transitionProps = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "exit"
    });
    node2.style.webkitTransition = theme.transitions.create("opacity", transitionProps);
    node2.style.transition = theme.transitions.create("opacity", transitionProps);
    if (onExit) {
      onExit(node2);
    }
  });
  const handleExited = normalizedTransitionCallback(onExited);
  const handleAddEndListener = (next2) => {
    if (addEndListener) {
      addEndListener(nodeRef.current, next2);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
    appear,
    in: inProp,
    nodeRef,
    onEnter: handleEnter,
    onEntered: handleEntered,
    onEntering: handleEntering,
    onExit: handleExit,
    onExited: handleExited,
    onExiting: handleExiting,
    addEndListener: handleAddEndListener,
    timeout
  }, other, {
    children: (state, childProps) => {
      return /* @__PURE__ */ reactExports.cloneElement(children, _extends$1({
        style: _extends$1({
          opacity: 0,
          visibility: state === "exited" && !inProp ? "hidden" : void 0
        }, styles$a[state], style2, children.props.style),
        ref: handleRef
      }, childProps));
    }
  }));
});
function getBackdropUtilityClass(slot) {
  return generateUtilityClass("MuiBackdrop", slot);
}
generateUtilityClasses("MuiBackdrop", ["root", "invisible"]);
const _excluded$1f = ["children", "className", "component", "components", "componentsProps", "invisible", "open", "slotProps", "slots", "TransitionComponent", "transitionDuration"];
const useUtilityClasses$16 = (ownerState) => {
  const {
    classes,
    invisible
  } = ownerState;
  const slots = {
    root: ["root", invisible && "invisible"]
  };
  return composeClasses(slots, getBackdropUtilityClass, classes);
};
const BackdropRoot = styled("div", {
  name: "MuiBackdrop",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.invisible && styles2.invisible];
  }
})(({
  ownerState
}) => _extends$1({
  position: "fixed",
  display: "flex",
  alignItems: "center",
  justifyContent: "center",
  right: 0,
  bottom: 0,
  top: 0,
  left: 0,
  backgroundColor: "rgba(0, 0, 0, 0.5)",
  WebkitTapHighlightColor: "transparent"
}, ownerState.invisible && {
  backgroundColor: "transparent"
}));
const Backdrop = /* @__PURE__ */ reactExports.forwardRef(function Backdrop2(inProps, ref2) {
  var _slotProps$root, _ref, _slots$root;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiBackdrop"
  });
  const {
    children,
    className,
    component = "div",
    components = {},
    componentsProps = {},
    invisible = false,
    open,
    slotProps = {},
    slots = {},
    TransitionComponent = Fade,
    transitionDuration
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1f);
  const ownerState = _extends$1({}, props, {
    component,
    invisible
  });
  const classes = useUtilityClasses$16(ownerState);
  const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
    in: open,
    timeout: transitionDuration
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(BackdropRoot, _extends$1({
      "aria-hidden": true
    }, rootSlotProps, {
      as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,
      className: clsx$3(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),
      ownerState: _extends$1({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),
      classes,
      ref: ref2,
      children
    }))
  }));
});
function useBadge(parameters) {
  const {
    badgeContent: badgeContentProp,
    invisible: invisibleProp = false,
    max: maxProp = 99,
    showZero = false
  } = parameters;
  const prevProps = usePreviousProps({
    badgeContent: badgeContentProp,
    max: maxProp
  });
  let invisible = invisibleProp;
  if (invisibleProp === false && badgeContentProp === 0 && !showZero) {
    invisible = true;
  }
  const {
    badgeContent,
    max: max2 = maxProp
  } = invisible ? prevProps : parameters;
  const displayValue = badgeContent && Number(badgeContent) > max2 ? `${max2}+` : badgeContent;
  return {
    badgeContent,
    invisible,
    max: max2,
    displayValue
  };
}
function getBadgeUtilityClass(slot) {
  return generateUtilityClass("MuiBadge", slot);
}
const badgeClasses = generateUtilityClasses("MuiBadge", [
  "root",
  "badge",
  "dot",
  "standard",
  "anchorOriginTopRight",
  "anchorOriginBottomRight",
  "anchorOriginTopLeft",
  "anchorOriginBottomLeft",
  "invisible",
  "colorError",
  "colorInfo",
  "colorPrimary",
  "colorSecondary",
  "colorSuccess",
  "colorWarning",
  "overlapRectangular",
  "overlapCircular",
  // TODO: v6 remove the overlap value from these class keys
  "anchorOriginTopLeftCircular",
  "anchorOriginTopLeftRectangular",
  "anchorOriginTopRightCircular",
  "anchorOriginTopRightRectangular",
  "anchorOriginBottomLeftCircular",
  "anchorOriginBottomLeftRectangular",
  "anchorOriginBottomRightCircular",
  "anchorOriginBottomRightRectangular"
]);
const _excluded$1e = ["anchorOrigin", "className", "classes", "component", "components", "componentsProps", "children", "overlap", "color", "invisible", "max", "badgeContent", "slots", "slotProps", "showZero", "variant"];
const RADIUS_STANDARD = 10;
const RADIUS_DOT = 4;
const useUtilityClasses$15 = (ownerState) => {
  const {
    color: color2,
    anchorOrigin,
    invisible,
    overlap,
    variant: variant2,
    classes = {}
  } = ownerState;
  const slots = {
    root: ["root"],
    badge: ["badge", variant2, invisible && "invisible", `anchorOrigin${capitalize$2(anchorOrigin.vertical)}${capitalize$2(anchorOrigin.horizontal)}`, `anchorOrigin${capitalize$2(anchorOrigin.vertical)}${capitalize$2(anchorOrigin.horizontal)}${capitalize$2(overlap)}`, `overlap${capitalize$2(overlap)}`, color2 !== "default" && `color${capitalize$2(color2)}`]
  };
  return composeClasses(slots, getBadgeUtilityClass, classes);
};
const BadgeRoot = styled("span", {
  name: "MuiBadge",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  position: "relative",
  display: "inline-flex",
  // For correct alignment with the text.
  verticalAlign: "middle",
  flexShrink: 0
});
const BadgeBadge = styled("span", {
  name: "MuiBadge",
  slot: "Badge",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.badge, styles2[ownerState.variant], styles2[`anchorOrigin${capitalize$2(ownerState.anchorOrigin.vertical)}${capitalize$2(ownerState.anchorOrigin.horizontal)}${capitalize$2(ownerState.overlap)}`], ownerState.color !== "default" && styles2[`color${capitalize$2(ownerState.color)}`], ownerState.invisible && styles2.invisible];
  }
})(({
  theme
}) => {
  var _theme$vars;
  return {
    display: "flex",
    flexDirection: "row",
    flexWrap: "wrap",
    justifyContent: "center",
    alignContent: "center",
    alignItems: "center",
    position: "absolute",
    boxSizing: "border-box",
    fontFamily: theme.typography.fontFamily,
    fontWeight: theme.typography.fontWeightMedium,
    fontSize: theme.typography.pxToRem(12),
    minWidth: RADIUS_STANDARD * 2,
    lineHeight: 1,
    padding: "0 6px",
    height: RADIUS_STANDARD * 2,
    borderRadius: RADIUS_STANDARD,
    zIndex: 1,
    // Render the badge on top of potential ripples.
    transition: theme.transitions.create("transform", {
      easing: theme.transitions.easing.easeInOut,
      duration: theme.transitions.duration.enteringScreen
    }),
    variants: [...Object.keys(((_theme$vars = theme.vars) != null ? _theme$vars : theme).palette).filter((key) => {
      var _theme$vars2, _theme$vars3;
      return ((_theme$vars2 = theme.vars) != null ? _theme$vars2 : theme).palette[key].main && ((_theme$vars3 = theme.vars) != null ? _theme$vars3 : theme).palette[key].contrastText;
    }).map((color2) => ({
      props: {
        color: color2
      },
      style: {
        backgroundColor: (theme.vars || theme).palette[color2].main,
        color: (theme.vars || theme).palette[color2].contrastText
      }
    })), {
      props: {
        variant: "dot"
      },
      style: {
        borderRadius: RADIUS_DOT,
        height: RADIUS_DOT * 2,
        minWidth: RADIUS_DOT * 2,
        padding: 0
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "top" && ownerState.anchorOrigin.horizontal === "right" && ownerState.overlap === "rectangular",
      style: {
        top: 0,
        right: 0,
        transform: "scale(1) translate(50%, -50%)",
        transformOrigin: "100% 0%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(50%, -50%)"
        }
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "bottom" && ownerState.anchorOrigin.horizontal === "right" && ownerState.overlap === "rectangular",
      style: {
        bottom: 0,
        right: 0,
        transform: "scale(1) translate(50%, 50%)",
        transformOrigin: "100% 100%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(50%, 50%)"
        }
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "top" && ownerState.anchorOrigin.horizontal === "left" && ownerState.overlap === "rectangular",
      style: {
        top: 0,
        left: 0,
        transform: "scale(1) translate(-50%, -50%)",
        transformOrigin: "0% 0%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(-50%, -50%)"
        }
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "bottom" && ownerState.anchorOrigin.horizontal === "left" && ownerState.overlap === "rectangular",
      style: {
        bottom: 0,
        left: 0,
        transform: "scale(1) translate(-50%, 50%)",
        transformOrigin: "0% 100%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(-50%, 50%)"
        }
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "top" && ownerState.anchorOrigin.horizontal === "right" && ownerState.overlap === "circular",
      style: {
        top: "14%",
        right: "14%",
        transform: "scale(1) translate(50%, -50%)",
        transformOrigin: "100% 0%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(50%, -50%)"
        }
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "bottom" && ownerState.anchorOrigin.horizontal === "right" && ownerState.overlap === "circular",
      style: {
        bottom: "14%",
        right: "14%",
        transform: "scale(1) translate(50%, 50%)",
        transformOrigin: "100% 100%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(50%, 50%)"
        }
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "top" && ownerState.anchorOrigin.horizontal === "left" && ownerState.overlap === "circular",
      style: {
        top: "14%",
        left: "14%",
        transform: "scale(1) translate(-50%, -50%)",
        transformOrigin: "0% 0%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(-50%, -50%)"
        }
      }
    }, {
      props: ({
        ownerState
      }) => ownerState.anchorOrigin.vertical === "bottom" && ownerState.anchorOrigin.horizontal === "left" && ownerState.overlap === "circular",
      style: {
        bottom: "14%",
        left: "14%",
        transform: "scale(1) translate(-50%, 50%)",
        transformOrigin: "0% 100%",
        [`&.${badgeClasses.invisible}`]: {
          transform: "scale(0) translate(-50%, 50%)"
        }
      }
    }, {
      props: {
        invisible: true
      },
      style: {
        transition: theme.transitions.create("transform", {
          easing: theme.transitions.easing.easeInOut,
          duration: theme.transitions.duration.leavingScreen
        })
      }
    }]
  };
});
const Badge = /* @__PURE__ */ reactExports.forwardRef(function Badge2(inProps, ref2) {
  var _ref, _slots$root, _ref2, _slots$badge, _slotProps$root, _slotProps$badge;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiBadge"
  });
  const {
    anchorOrigin: anchorOriginProp = {
      vertical: "top",
      horizontal: "right"
    },
    className,
    component,
    components = {},
    componentsProps = {},
    children,
    overlap: overlapProp = "rectangular",
    color: colorProp = "default",
    invisible: invisibleProp = false,
    max: maxProp = 99,
    badgeContent: badgeContentProp,
    slots,
    slotProps,
    showZero = false,
    variant: variantProp = "standard"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1e);
  const {
    badgeContent,
    invisible: invisibleFromHook,
    max: max2,
    displayValue: displayValueFromHook
  } = useBadge({
    max: maxProp,
    invisible: invisibleProp,
    badgeContent: badgeContentProp,
    showZero
  });
  const prevProps = usePreviousProps({
    anchorOrigin: anchorOriginProp,
    color: colorProp,
    overlap: overlapProp,
    variant: variantProp,
    badgeContent: badgeContentProp
  });
  const invisible = invisibleFromHook || badgeContent == null && variantProp !== "dot";
  const {
    color: color2 = colorProp,
    overlap = overlapProp,
    anchorOrigin = anchorOriginProp,
    variant: variant2 = variantProp
  } = invisible ? prevProps : props;
  const displayValue = variant2 !== "dot" ? displayValueFromHook : void 0;
  const ownerState = _extends$1({}, props, {
    badgeContent,
    invisible,
    max: max2,
    displayValue,
    showZero,
    anchorOrigin,
    color: color2,
    overlap,
    variant: variant2
  });
  const classes = useUtilityClasses$15(ownerState);
  const RootSlot = (_ref = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref : BadgeRoot;
  const BadgeSlot = (_ref2 = (_slots$badge = slots == null ? void 0 : slots.badge) != null ? _slots$badge : components.Badge) != null ? _ref2 : BadgeBadge;
  const rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;
  const badgeSlotProps = (_slotProps$badge = slotProps == null ? void 0 : slotProps.badge) != null ? _slotProps$badge : componentsProps.badge;
  const rootProps = useSlotProps({
    elementType: RootSlot,
    externalSlotProps: rootSlotProps,
    externalForwardedProps: other,
    additionalProps: {
      ref: ref2,
      as: component
    },
    ownerState,
    className: clsx$3(rootSlotProps == null ? void 0 : rootSlotProps.className, classes.root, className)
  });
  const badgeProps = useSlotProps({
    elementType: BadgeSlot,
    externalSlotProps: badgeSlotProps,
    ownerState,
    className: clsx$3(classes.badge, badgeSlotProps == null ? void 0 : badgeSlotProps.className)
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, _extends$1({}, rootProps, {
    children: [children, /* @__PURE__ */ jsxRuntimeExports.jsx(BadgeSlot, _extends$1({}, badgeProps, {
      children: displayValue
    }))]
  }));
});
const boxClasses = generateUtilityClasses("MuiBox", ["root"]);
const defaultTheme = createTheme();
const Box$1 = createBox({
  themeId: THEME_ID,
  defaultTheme,
  defaultClassName: boxClasses.root,
  generateClassName: ClassNameGenerator.generate
});
const MoreHorizIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
}), "MoreHoriz");
const _excluded$1d = ["slots", "slotProps"];
const BreadcrumbCollapsedButton = styled(ButtonBase)(({
  theme
}) => _extends$1({
  display: "flex",
  marginLeft: `calc(${theme.spacing(1)} * 0.5)`,
  marginRight: `calc(${theme.spacing(1)} * 0.5)`
}, theme.palette.mode === "light" ? {
  backgroundColor: theme.palette.grey[100],
  color: theme.palette.grey[700]
} : {
  backgroundColor: theme.palette.grey[700],
  color: theme.palette.grey[100]
}, {
  borderRadius: 2,
  "&:hover, &:focus": _extends$1({}, theme.palette.mode === "light" ? {
    backgroundColor: theme.palette.grey[200]
  } : {
    backgroundColor: theme.palette.grey[600]
  }),
  "&:active": _extends$1({
    boxShadow: theme.shadows[0]
  }, theme.palette.mode === "light" ? {
    backgroundColor: colorManipulatorExports.emphasize(theme.palette.grey[200], 0.12)
  } : {
    backgroundColor: colorManipulatorExports.emphasize(theme.palette.grey[600], 0.12)
  })
}));
const BreadcrumbCollapsedIcon = styled(MoreHorizIcon$1)({
  width: 24,
  height: 16
});
function BreadcrumbCollapsed(props) {
  const {
    slots = {},
    slotProps = {}
  } = props, otherProps = _objectWithoutPropertiesLoose(props, _excluded$1d);
  const ownerState = props;
  return /* @__PURE__ */ jsxRuntimeExports.jsx("li", {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(BreadcrumbCollapsedButton, _extends$1({
      focusRipple: true
    }, otherProps, {
      ownerState,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(BreadcrumbCollapsedIcon, _extends$1({
        as: slots.CollapsedIcon,
        ownerState
      }, slotProps.collapsedIcon))
    }))
  });
}
function getBreadcrumbsUtilityClass(slot) {
  return generateUtilityClass("MuiBreadcrumbs", slot);
}
const breadcrumbsClasses = generateUtilityClasses("MuiBreadcrumbs", ["root", "ol", "li", "separator"]);
const _excluded$1c = ["children", "className", "component", "slots", "slotProps", "expandText", "itemsAfterCollapse", "itemsBeforeCollapse", "maxItems", "separator"];
const useUtilityClasses$14 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    li: ["li"],
    ol: ["ol"],
    separator: ["separator"]
  };
  return composeClasses(slots, getBreadcrumbsUtilityClass, classes);
};
const BreadcrumbsRoot = styled(Typography, {
  name: "MuiBreadcrumbs",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    return [{
      [`& .${breadcrumbsClasses.li}`]: styles2.li
    }, styles2.root];
  }
})({});
const BreadcrumbsOl = styled("ol", {
  name: "MuiBreadcrumbs",
  slot: "Ol",
  overridesResolver: (props, styles2) => styles2.ol
})({
  display: "flex",
  flexWrap: "wrap",
  alignItems: "center",
  padding: 0,
  margin: 0,
  listStyle: "none"
});
const BreadcrumbsSeparator = styled("li", {
  name: "MuiBreadcrumbs",
  slot: "Separator",
  overridesResolver: (props, styles2) => styles2.separator
})({
  display: "flex",
  userSelect: "none",
  marginLeft: 8,
  marginRight: 8
});
function insertSeparators(items, className, separator, ownerState) {
  return items.reduce((acc, current, index2) => {
    if (index2 < items.length - 1) {
      acc = acc.concat(current, /* @__PURE__ */ jsxRuntimeExports.jsx(BreadcrumbsSeparator, {
        "aria-hidden": true,
        className,
        ownerState,
        children: separator
      }, `separator-${index2}`));
    } else {
      acc.push(current);
    }
    return acc;
  }, []);
}
const Breadcrumbs = /* @__PURE__ */ reactExports.forwardRef(function Breadcrumbs2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiBreadcrumbs"
  });
  const {
    children,
    className,
    component = "nav",
    slots = {},
    slotProps = {},
    expandText = "Show path",
    itemsAfterCollapse = 1,
    itemsBeforeCollapse = 1,
    maxItems = 8,
    separator = "/"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1c);
  const [expanded, setExpanded] = reactExports.useState(false);
  const ownerState = _extends$1({}, props, {
    component,
    expanded,
    expandText,
    itemsAfterCollapse,
    itemsBeforeCollapse,
    maxItems,
    separator
  });
  const classes = useUtilityClasses$14(ownerState);
  const collapsedIconSlotProps = useSlotProps({
    elementType: slots.CollapsedIcon,
    externalSlotProps: slotProps.collapsedIcon,
    ownerState
  });
  const listRef = reactExports.useRef(null);
  const renderItemsBeforeAndAfter = (allItems2) => {
    const handleClickExpand = () => {
      setExpanded(true);
      const focusable = listRef.current.querySelector("a[href],button,[tabindex]");
      if (focusable) {
        focusable.focus();
      }
    };
    if (itemsBeforeCollapse + itemsAfterCollapse >= allItems2.length) {
      return allItems2;
    }
    return [...allItems2.slice(0, itemsBeforeCollapse), /* @__PURE__ */ jsxRuntimeExports.jsx(BreadcrumbCollapsed, {
      "aria-label": expandText,
      slots: {
        CollapsedIcon: slots.CollapsedIcon
      },
      slotProps: {
        collapsedIcon: collapsedIconSlotProps
      },
      onClick: handleClickExpand
    }, "ellipsis"), ...allItems2.slice(allItems2.length - itemsAfterCollapse, allItems2.length)];
  };
  const allItems = reactExports.Children.toArray(children).filter((child) => {
    return /* @__PURE__ */ reactExports.isValidElement(child);
  }).map((child, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", {
    className: classes.li,
    children: child
  }, `child-${index2}`));
  return /* @__PURE__ */ jsxRuntimeExports.jsx(BreadcrumbsRoot, _extends$1({
    ref: ref2,
    component,
    color: "text.secondary",
    className: clsx$3(classes.root, className),
    ownerState
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(BreadcrumbsOl, {
      className: classes.ol,
      ref: listRef,
      ownerState,
      children: insertSeparators(expanded || maxItems && allItems.length <= maxItems ? allItems : renderItemsBeforeAndAfter(allItems), classes.separator, separator, ownerState)
    })
  }));
});
function getButtonUtilityClass(slot) {
  return generateUtilityClass("MuiButton", slot);
}
const buttonClasses = generateUtilityClasses("MuiButton", ["root", "text", "textInherit", "textPrimary", "textSecondary", "textSuccess", "textError", "textInfo", "textWarning", "outlined", "outlinedInherit", "outlinedPrimary", "outlinedSecondary", "outlinedSuccess", "outlinedError", "outlinedInfo", "outlinedWarning", "contained", "containedInherit", "containedPrimary", "containedSecondary", "containedSuccess", "containedError", "containedInfo", "containedWarning", "disableElevation", "focusVisible", "disabled", "colorInherit", "colorPrimary", "colorSecondary", "colorSuccess", "colorError", "colorInfo", "colorWarning", "textSizeSmall", "textSizeMedium", "textSizeLarge", "outlinedSizeSmall", "outlinedSizeMedium", "outlinedSizeLarge", "containedSizeSmall", "containedSizeMedium", "containedSizeLarge", "sizeMedium", "sizeSmall", "sizeLarge", "fullWidth", "startIcon", "endIcon", "icon", "iconSizeSmall", "iconSizeMedium", "iconSizeLarge"]);
const ButtonGroupContext = /* @__PURE__ */ reactExports.createContext({});
const ButtonGroupButtonContext = /* @__PURE__ */ reactExports.createContext(void 0);
const _excluded$1b = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"];
const useUtilityClasses$13 = (ownerState) => {
  const {
    color: color2,
    disableElevation,
    fullWidth,
    size,
    variant: variant2,
    classes
  } = ownerState;
  const slots = {
    root: ["root", variant2, `${variant2}${capitalize$2(color2)}`, `size${capitalize$2(size)}`, `${variant2}Size${capitalize$2(size)}`, `color${capitalize$2(color2)}`, disableElevation && "disableElevation", fullWidth && "fullWidth"],
    label: ["label"],
    startIcon: ["icon", "startIcon", `iconSize${capitalize$2(size)}`],
    endIcon: ["icon", "endIcon", `iconSize${capitalize$2(size)}`]
  };
  const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const commonIconStyles = (ownerState) => _extends$1({}, ownerState.size === "small" && {
  "& > *:nth-of-type(1)": {
    fontSize: 18
  }
}, ownerState.size === "medium" && {
  "& > *:nth-of-type(1)": {
    fontSize: 20
  }
}, ownerState.size === "large" && {
  "& > *:nth-of-type(1)": {
    fontSize: 22
  }
});
const ButtonRoot = styled(ButtonBase, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiButton",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.variant], styles2[`${ownerState.variant}${capitalize$2(ownerState.color)}`], styles2[`size${capitalize$2(ownerState.size)}`], styles2[`${ownerState.variant}Size${capitalize$2(ownerState.size)}`], ownerState.color === "inherit" && styles2.colorInherit, ownerState.disableElevation && styles2.disableElevation, ownerState.fullWidth && styles2.fullWidth];
  }
})(({
  theme,
  ownerState
}) => {
  var _theme$palette$getCon, _theme$palette;
  const inheritContainedBackgroundColor = theme.palette.mode === "light" ? theme.palette.grey[300] : theme.palette.grey[800];
  const inheritContainedHoverBackgroundColor = theme.palette.mode === "light" ? theme.palette.grey.A100 : theme.palette.grey[700];
  return _extends$1({}, theme.typography.button, {
    minWidth: 64,
    padding: "6px 16px",
    borderRadius: (theme.vars || theme).shape.borderRadius,
    transition: theme.transitions.create(["background-color", "box-shadow", "border-color", "color"], {
      duration: theme.transitions.duration.short
    }),
    "&:hover": _extends$1({
      textDecoration: "none",
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    }, ownerState.variant === "text" && ownerState.color !== "inherit" && {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    }, ownerState.variant === "outlined" && ownerState.color !== "inherit" && {
      border: `1px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    }, ownerState.variant === "contained" && {
      backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,
      boxShadow: (theme.vars || theme).shadows[4],
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        boxShadow: (theme.vars || theme).shadows[2],
        backgroundColor: (theme.vars || theme).palette.grey[300]
      }
    }, ownerState.variant === "contained" && ownerState.color !== "inherit" && {
      backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: (theme.vars || theme).palette[ownerState.color].main
      }
    }),
    "&:active": _extends$1({}, ownerState.variant === "contained" && {
      boxShadow: (theme.vars || theme).shadows[8]
    }),
    [`&.${buttonClasses.focusVisible}`]: _extends$1({}, ownerState.variant === "contained" && {
      boxShadow: (theme.vars || theme).shadows[6]
    }),
    [`&.${buttonClasses.disabled}`]: _extends$1({
      color: (theme.vars || theme).palette.action.disabled
    }, ownerState.variant === "outlined" && {
      border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
    }, ownerState.variant === "contained" && {
      color: (theme.vars || theme).palette.action.disabled,
      boxShadow: (theme.vars || theme).shadows[0],
      backgroundColor: (theme.vars || theme).palette.action.disabledBackground
    })
  }, ownerState.variant === "text" && {
    padding: "6px 8px"
  }, ownerState.variant === "text" && ownerState.color !== "inherit" && {
    color: (theme.vars || theme).palette[ownerState.color].main
  }, ownerState.variant === "outlined" && {
    padding: "5px 15px",
    border: "1px solid currentColor"
  }, ownerState.variant === "outlined" && ownerState.color !== "inherit" && {
    color: (theme.vars || theme).palette[ownerState.color].main,
    border: theme.vars ? `1px solid rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : `1px solid ${colorManipulatorExports.alpha(theme.palette[ownerState.color].main, 0.5)}`
  }, ownerState.variant === "contained" && {
    color: theme.vars ? (
      // this is safe because grey does not change between default light/dark mode
      theme.vars.palette.text.primary
    ) : (_theme$palette$getCon = (_theme$palette = theme.palette).getContrastText) == null ? void 0 : _theme$palette$getCon.call(_theme$palette, theme.palette.grey[300]),
    backgroundColor: theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,
    boxShadow: (theme.vars || theme).shadows[2]
  }, ownerState.variant === "contained" && ownerState.color !== "inherit" && {
    color: (theme.vars || theme).palette[ownerState.color].contrastText,
    backgroundColor: (theme.vars || theme).palette[ownerState.color].main
  }, ownerState.color === "inherit" && {
    color: "inherit",
    borderColor: "currentColor"
  }, ownerState.size === "small" && ownerState.variant === "text" && {
    padding: "4px 5px",
    fontSize: theme.typography.pxToRem(13)
  }, ownerState.size === "large" && ownerState.variant === "text" && {
    padding: "8px 11px",
    fontSize: theme.typography.pxToRem(15)
  }, ownerState.size === "small" && ownerState.variant === "outlined" && {
    padding: "3px 9px",
    fontSize: theme.typography.pxToRem(13)
  }, ownerState.size === "large" && ownerState.variant === "outlined" && {
    padding: "7px 21px",
    fontSize: theme.typography.pxToRem(15)
  }, ownerState.size === "small" && ownerState.variant === "contained" && {
    padding: "4px 10px",
    fontSize: theme.typography.pxToRem(13)
  }, ownerState.size === "large" && ownerState.variant === "contained" && {
    padding: "8px 22px",
    fontSize: theme.typography.pxToRem(15)
  }, ownerState.fullWidth && {
    width: "100%"
  });
}, ({
  ownerState
}) => ownerState.disableElevation && {
  boxShadow: "none",
  "&:hover": {
    boxShadow: "none"
  },
  [`&.${buttonClasses.focusVisible}`]: {
    boxShadow: "none"
  },
  "&:active": {
    boxShadow: "none"
  },
  [`&.${buttonClasses.disabled}`]: {
    boxShadow: "none"
  }
});
const ButtonStartIcon = styled("span", {
  name: "MuiButton",
  slot: "StartIcon",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.startIcon, styles2[`iconSize${capitalize$2(ownerState.size)}`]];
  }
})(({
  ownerState
}) => _extends$1({
  display: "inherit",
  marginRight: 8,
  marginLeft: -4
}, ownerState.size === "small" && {
  marginLeft: -2
}, commonIconStyles(ownerState)));
const ButtonEndIcon = styled("span", {
  name: "MuiButton",
  slot: "EndIcon",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.endIcon, styles2[`iconSize${capitalize$2(ownerState.size)}`]];
  }
})(({
  ownerState
}) => _extends$1({
  display: "inherit",
  marginRight: -4,
  marginLeft: 8
}, ownerState.size === "small" && {
  marginRight: -2
}, commonIconStyles(ownerState)));
const Button$2 = /* @__PURE__ */ reactExports.forwardRef(function Button2(inProps, ref2) {
  const contextProps = reactExports.useContext(ButtonGroupContext);
  const buttonGroupButtonContextPositionClassName = reactExports.useContext(ButtonGroupButtonContext);
  const resolvedProps = resolveProps(contextProps, inProps);
  const props = useDefaultProps({
    props: resolvedProps,
    name: "MuiButton"
  });
  const {
    children,
    color: color2 = "primary",
    component = "button",
    className,
    disabled = false,
    disableElevation = false,
    disableFocusRipple = false,
    endIcon: endIconProp,
    focusVisibleClassName,
    fullWidth = false,
    size = "medium",
    startIcon: startIconProp,
    type: type2,
    variant: variant2 = "text"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1b);
  const ownerState = _extends$1({}, props, {
    color: color2,
    component,
    disabled,
    disableElevation,
    disableFocusRipple,
    fullWidth,
    size,
    type: type2,
    variant: variant2
  });
  const classes = useUtilityClasses$13(ownerState);
  const startIcon = startIconProp && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonStartIcon, {
    className: classes.startIcon,
    ownerState,
    children: startIconProp
  });
  const endIcon = endIconProp && /* @__PURE__ */ jsxRuntimeExports.jsx(ButtonEndIcon, {
    className: classes.endIcon,
    ownerState,
    children: endIconProp
  });
  const positionClassName = buttonGroupButtonContextPositionClassName || "";
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ButtonRoot, _extends$1({
    ownerState,
    className: clsx$3(contextProps.className, classes.root, className, positionClassName),
    component,
    disabled,
    focusRipple: !disableFocusRipple,
    focusVisibleClassName: clsx$3(classes.focusVisible, focusVisibleClassName),
    ref: ref2,
    type: type2
  }, other, {
    classes,
    children: [startIcon, children, endIcon]
  }));
});
function getCardUtilityClass(slot) {
  return generateUtilityClass("MuiCard", slot);
}
generateUtilityClasses("MuiCard", ["root"]);
const _excluded$1a = ["className", "raised"];
const useUtilityClasses$12 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getCardUtilityClass, classes);
};
const CardRoot = styled(Paper, {
  name: "MuiCard",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})(() => {
  return {
    overflow: "hidden"
  };
});
const Card = /* @__PURE__ */ reactExports.forwardRef(function Card2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCard"
  });
  const {
    className,
    raised = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1a);
  const ownerState = _extends$1({}, props, {
    raised
  });
  const classes = useUtilityClasses$12(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CardRoot, _extends$1({
    className: clsx$3(classes.root, className),
    elevation: raised ? 8 : void 0,
    ref: ref2,
    ownerState
  }, other));
});
function getCardActionAreaUtilityClass(slot) {
  return generateUtilityClass("MuiCardActionArea", slot);
}
const cardActionAreaClasses = generateUtilityClasses("MuiCardActionArea", ["root", "focusVisible", "focusHighlight"]);
const _excluded$19 = ["children", "className", "focusVisibleClassName"];
const useUtilityClasses$11 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    focusHighlight: ["focusHighlight"]
  };
  return composeClasses(slots, getCardActionAreaUtilityClass, classes);
};
const CardActionAreaRoot = styled(ButtonBase, {
  name: "MuiCardActionArea",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})(({
  theme
}) => ({
  display: "block",
  textAlign: "inherit",
  borderRadius: "inherit",
  // for Safari to work https://github.com/mui/material-ui/issues/36285.
  width: "100%",
  [`&:hover .${cardActionAreaClasses.focusHighlight}`]: {
    opacity: (theme.vars || theme).palette.action.hoverOpacity,
    "@media (hover: none)": {
      opacity: 0
    }
  },
  [`&.${cardActionAreaClasses.focusVisible} .${cardActionAreaClasses.focusHighlight}`]: {
    opacity: (theme.vars || theme).palette.action.focusOpacity
  }
}));
const CardActionAreaFocusHighlight = styled("span", {
  name: "MuiCardActionArea",
  slot: "FocusHighlight",
  overridesResolver: (props, styles2) => styles2.focusHighlight
})(({
  theme
}) => ({
  overflow: "hidden",
  pointerEvents: "none",
  position: "absolute",
  top: 0,
  right: 0,
  bottom: 0,
  left: 0,
  borderRadius: "inherit",
  opacity: 0,
  backgroundColor: "currentcolor",
  transition: theme.transitions.create("opacity", {
    duration: theme.transitions.duration.short
  })
}));
const CardActionArea = /* @__PURE__ */ reactExports.forwardRef(function CardActionArea2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCardActionArea"
  });
  const {
    children,
    className,
    focusVisibleClassName
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$19);
  const ownerState = props;
  const classes = useUtilityClasses$11(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(CardActionAreaRoot, _extends$1({
    className: clsx$3(classes.root, className),
    focusVisibleClassName: clsx$3(focusVisibleClassName, classes.focusVisible),
    ref: ref2,
    ownerState
  }, other, {
    children: [children, /* @__PURE__ */ jsxRuntimeExports.jsx(CardActionAreaFocusHighlight, {
      className: classes.focusHighlight,
      ownerState
    })]
  }));
});
function getCardContentUtilityClass(slot) {
  return generateUtilityClass("MuiCardContent", slot);
}
generateUtilityClasses("MuiCardContent", ["root"]);
const _excluded$18 = ["className", "component"];
const useUtilityClasses$10 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getCardContentUtilityClass, classes);
};
const CardContentRoot = styled("div", {
  name: "MuiCardContent",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})(() => {
  return {
    padding: 16,
    "&:last-child": {
      paddingBottom: 24
    }
  };
});
const CardContent = /* @__PURE__ */ reactExports.forwardRef(function CardContent2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCardContent"
  });
  const {
    className,
    component = "div"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$18);
  const ownerState = _extends$1({}, props, {
    component
  });
  const classes = useUtilityClasses$10(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CardContentRoot, _extends$1({
    as: component,
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other));
});
function getCardMediaUtilityClass(slot) {
  return generateUtilityClass("MuiCardMedia", slot);
}
generateUtilityClasses("MuiCardMedia", ["root", "media", "img"]);
const _excluded$17 = ["children", "className", "component", "image", "src", "style"];
const useUtilityClasses$$ = (ownerState) => {
  const {
    classes,
    isMediaComponent,
    isImageComponent
  } = ownerState;
  const slots = {
    root: ["root", isMediaComponent && "media", isImageComponent && "img"]
  };
  return composeClasses(slots, getCardMediaUtilityClass, classes);
};
const CardMediaRoot = styled("div", {
  name: "MuiCardMedia",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    const {
      isMediaComponent,
      isImageComponent
    } = ownerState;
    return [styles2.root, isMediaComponent && styles2.media, isImageComponent && styles2.img];
  }
})(({
  ownerState
}) => _extends$1({
  display: "block",
  backgroundSize: "cover",
  backgroundRepeat: "no-repeat",
  backgroundPosition: "center"
}, ownerState.isMediaComponent && {
  width: "100%"
}, ownerState.isImageComponent && {
  // ⚠️ object-fit is not supported by IE11.
  objectFit: "cover"
}));
const MEDIA_COMPONENTS = ["video", "audio", "picture", "iframe", "img"];
const IMAGE_COMPONENTS = ["picture", "img"];
const CardMedia = /* @__PURE__ */ reactExports.forwardRef(function CardMedia2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCardMedia"
  });
  const {
    children,
    className,
    component = "div",
    image: image2,
    src,
    style: style2
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$17);
  const isMediaComponent = MEDIA_COMPONENTS.indexOf(component) !== -1;
  const composedStyle = !isMediaComponent && image2 ? _extends$1({
    backgroundImage: `url("${image2}")`
  }, style2) : style2;
  const ownerState = _extends$1({}, props, {
    component,
    isMediaComponent,
    isImageComponent: IMAGE_COMPONENTS.indexOf(component) !== -1
  });
  const classes = useUtilityClasses$$(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CardMediaRoot, _extends$1({
    className: clsx$3(classes.root, className),
    as: component,
    role: !isMediaComponent && image2 ? "img" : void 0,
    ref: ref2,
    style: composedStyle,
    ownerState,
    src: isMediaComponent ? image2 || src : void 0
  }, other, {
    children
  }));
});
function getSwitchBaseUtilityClass(slot) {
  return generateUtilityClass("PrivateSwitchBase", slot);
}
generateUtilityClasses("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
const _excluded$16 = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"];
const useUtilityClasses$_ = (ownerState) => {
  const {
    classes,
    checked,
    disabled,
    edge
  } = ownerState;
  const slots = {
    root: ["root", checked && "checked", disabled && "disabled", edge && `edge${capitalize$2(edge)}`],
    input: ["input"]
  };
  return composeClasses(slots, getSwitchBaseUtilityClass, classes);
};
const SwitchBaseRoot = styled(ButtonBase)(({
  ownerState
}) => _extends$1({
  padding: 9,
  borderRadius: "50%"
}, ownerState.edge === "start" && {
  marginLeft: ownerState.size === "small" ? -3 : -12
}, ownerState.edge === "end" && {
  marginRight: ownerState.size === "small" ? -3 : -12
}));
const SwitchBaseInput = styled("input", {
  shouldForwardProp: rootShouldForwardProp
})({
  cursor: "inherit",
  position: "absolute",
  opacity: 0,
  width: "100%",
  height: "100%",
  top: 0,
  left: 0,
  margin: 0,
  padding: 0,
  zIndex: 1
});
const SwitchBase = /* @__PURE__ */ reactExports.forwardRef(function SwitchBase2(props, ref2) {
  const {
    autoFocus,
    checked: checkedProp,
    checkedIcon,
    className,
    defaultChecked,
    disabled: disabledProp,
    disableFocusRipple = false,
    edge = false,
    icon,
    id,
    inputProps,
    inputRef,
    name,
    onBlur,
    onChange,
    onFocus,
    readOnly,
    required = false,
    tabIndex,
    type: type2,
    value
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$16);
  const [checked, setCheckedState] = useControlled({
    controlled: checkedProp,
    default: Boolean(defaultChecked),
    name: "SwitchBase",
    state: "checked"
  });
  const muiFormControl = useFormControl();
  const handleFocus = (event) => {
    if (onFocus) {
      onFocus(event);
    }
    if (muiFormControl && muiFormControl.onFocus) {
      muiFormControl.onFocus(event);
    }
  };
  const handleBlur = (event) => {
    if (onBlur) {
      onBlur(event);
    }
    if (muiFormControl && muiFormControl.onBlur) {
      muiFormControl.onBlur(event);
    }
  };
  const handleInputChange = (event) => {
    if (event.nativeEvent.defaultPrevented) {
      return;
    }
    const newChecked = event.target.checked;
    setCheckedState(newChecked);
    if (onChange) {
      onChange(event, newChecked);
    }
  };
  let disabled = disabledProp;
  if (muiFormControl) {
    if (typeof disabled === "undefined") {
      disabled = muiFormControl.disabled;
    }
  }
  const hasLabelFor = type2 === "checkbox" || type2 === "radio";
  const ownerState = _extends$1({}, props, {
    checked,
    disabled,
    disableFocusRipple,
    edge
  });
  const classes = useUtilityClasses$_(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(SwitchBaseRoot, _extends$1({
    component: "span",
    className: clsx$3(classes.root, className),
    centerRipple: true,
    focusRipple: !disableFocusRipple,
    disabled,
    tabIndex: null,
    role: void 0,
    onFocus: handleFocus,
    onBlur: handleBlur,
    ownerState,
    ref: ref2
  }, other, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SwitchBaseInput, _extends$1({
      autoFocus,
      checked: checkedProp,
      defaultChecked,
      className: classes.input,
      disabled,
      id: hasLabelFor ? id : void 0,
      name,
      onChange: handleInputChange,
      readOnly,
      ref: inputRef,
      required,
      ownerState,
      tabIndex,
      type: type2
    }, type2 === "checkbox" && value === void 0 ? {} : {
      value
    }, inputProps)), checked ? checkedIcon : icon]
  }));
});
const CheckBoxOutlineBlankIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
}), "CheckBoxOutlineBlank");
const CheckBoxIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
}), "CheckBox");
const IndeterminateCheckBoxIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
}), "IndeterminateCheckBox");
function getCheckboxUtilityClass(slot) {
  return generateUtilityClass("MuiCheckbox", slot);
}
const checkboxClasses = generateUtilityClasses("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]);
const _excluded$15 = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"];
const useUtilityClasses$Z = (ownerState) => {
  const {
    classes,
    indeterminate,
    color: color2,
    size
  } = ownerState;
  const slots = {
    root: ["root", indeterminate && "indeterminate", `color${capitalize$2(color2)}`, `size${capitalize$2(size)}`]
  };
  const composedClasses = composeClasses(slots, getCheckboxUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const CheckboxRoot = styled(SwitchBase, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiCheckbox",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.indeterminate && styles2.indeterminate, styles2[`size${capitalize$2(ownerState.size)}`], ownerState.color !== "default" && styles2[`color${capitalize$2(ownerState.color)}`]];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  color: (theme.vars || theme).palette.text.secondary
}, !ownerState.disableRipple && {
  "&:hover": {
    backgroundColor: theme.vars ? `rgba(${ownerState.color === "default" ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(ownerState.color === "default" ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  }
}, ownerState.color !== "default" && {
  [`&.${checkboxClasses.checked}, &.${checkboxClasses.indeterminate}`]: {
    color: (theme.vars || theme).palette[ownerState.color].main
  },
  [`&.${checkboxClasses.disabled}`]: {
    color: (theme.vars || theme).palette.action.disabled
  }
}));
const defaultCheckedIcon$1 = /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxIcon$1, {});
const defaultIcon$1 = /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxOutlineBlankIcon$1, {});
const defaultIndeterminateIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(IndeterminateCheckBoxIcon, {});
const Checkbox = /* @__PURE__ */ reactExports.forwardRef(function Checkbox2(inProps, ref2) {
  var _icon$props$fontSize, _indeterminateIcon$pr;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCheckbox"
  });
  const {
    checkedIcon = defaultCheckedIcon$1,
    color: color2 = "primary",
    icon: iconProp = defaultIcon$1,
    indeterminate = false,
    indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,
    inputProps,
    size = "medium",
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$15);
  const icon = indeterminate ? indeterminateIconProp : iconProp;
  const indeterminateIcon = indeterminate ? indeterminateIconProp : checkedIcon;
  const ownerState = _extends$1({}, props, {
    color: color2,
    indeterminate,
    size
  });
  const classes = useUtilityClasses$Z(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CheckboxRoot, _extends$1({
    type: "checkbox",
    inputProps: _extends$1({
      "data-indeterminate": indeterminate
    }, inputProps),
    icon: /* @__PURE__ */ reactExports.cloneElement(icon, {
      fontSize: (_icon$props$fontSize = icon.props.fontSize) != null ? _icon$props$fontSize : size
    }),
    checkedIcon: /* @__PURE__ */ reactExports.cloneElement(indeterminateIcon, {
      fontSize: (_indeterminateIcon$pr = indeterminateIcon.props.fontSize) != null ? _indeterminateIcon$pr : size
    }),
    ownerState,
    ref: ref2,
    className: clsx$3(classes.root, className)
  }, other, {
    classes
  }));
});
function getCircularProgressUtilityClass(slot) {
  return generateUtilityClass("MuiCircularProgress", slot);
}
generateUtilityClasses("MuiCircularProgress", ["root", "determinate", "indeterminate", "colorPrimary", "colorSecondary", "svg", "circle", "circleDeterminate", "circleIndeterminate", "circleDisableShrink"]);
const _excluded$14 = ["className", "color", "disableShrink", "size", "style", "thickness", "value", "variant"];
let _$2 = (t) => t, _t$1, _t2$1, _t3$1, _t4$1;
const SIZE = 44;
const circularRotateKeyframe = keyframes(_t$1 || (_t$1 = _$2`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`));
const circularDashKeyframe = keyframes(_t2$1 || (_t2$1 = _$2`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`));
const useUtilityClasses$Y = (ownerState) => {
  const {
    classes,
    variant: variant2,
    color: color2,
    disableShrink
  } = ownerState;
  const slots = {
    root: ["root", variant2, `color${capitalize$2(color2)}`],
    svg: ["svg"],
    circle: ["circle", `circle${capitalize$2(variant2)}`, disableShrink && "circleDisableShrink"]
  };
  return composeClasses(slots, getCircularProgressUtilityClass, classes);
};
const CircularProgressRoot = styled("span", {
  name: "MuiCircularProgress",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.variant], styles2[`color${capitalize$2(ownerState.color)}`]];
  }
})(({
  ownerState,
  theme
}) => _extends$1({
  display: "inline-block"
}, ownerState.variant === "determinate" && {
  transition: theme.transitions.create("transform")
}, ownerState.color !== "inherit" && {
  color: (theme.vars || theme).palette[ownerState.color].main
}), ({
  ownerState
}) => ownerState.variant === "indeterminate" && css(_t3$1 || (_t3$1 = _$2`
      animation: ${0} 1.4s linear infinite;
    `), circularRotateKeyframe));
const CircularProgressSVG = styled("svg", {
  name: "MuiCircularProgress",
  slot: "Svg",
  overridesResolver: (props, styles2) => styles2.svg
})({
  display: "block"
  // Keeps the progress centered
});
const CircularProgressCircle = styled("circle", {
  name: "MuiCircularProgress",
  slot: "Circle",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.circle, styles2[`circle${capitalize$2(ownerState.variant)}`], ownerState.disableShrink && styles2.circleDisableShrink];
  }
})(({
  ownerState,
  theme
}) => _extends$1({
  stroke: "currentColor"
}, ownerState.variant === "determinate" && {
  transition: theme.transitions.create("stroke-dashoffset")
}, ownerState.variant === "indeterminate" && {
  // Some default value that looks fine waiting for the animation to kicks in.
  strokeDasharray: "80px, 200px",
  strokeDashoffset: 0
  // Add the unit to fix a Edge 16 and below bug.
}), ({
  ownerState
}) => ownerState.variant === "indeterminate" && !ownerState.disableShrink && css(_t4$1 || (_t4$1 = _$2`
      animation: ${0} 1.4s ease-in-out infinite;
    `), circularDashKeyframe));
const CircularProgress = /* @__PURE__ */ reactExports.forwardRef(function CircularProgress2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCircularProgress"
  });
  const {
    className,
    color: color2 = "primary",
    disableShrink = false,
    size = 40,
    style: style2,
    thickness = 3.6,
    value = 0,
    variant: variant2 = "indeterminate"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$14);
  const ownerState = _extends$1({}, props, {
    color: color2,
    disableShrink,
    size,
    thickness,
    value,
    variant: variant2
  });
  const classes = useUtilityClasses$Y(ownerState);
  const circleStyle = {};
  const rootStyle = {};
  const rootProps = {};
  if (variant2 === "determinate") {
    const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);
    circleStyle.strokeDasharray = circumference.toFixed(3);
    rootProps["aria-valuenow"] = Math.round(value);
    circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;
    rootStyle.transform = "rotate(-90deg)";
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressRoot, _extends$1({
    className: clsx$3(classes.root, className),
    style: _extends$1({
      width: size,
      height: size
    }, rootStyle, style2),
    ownerState,
    ref: ref2,
    role: "progressbar"
  }, rootProps, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressSVG, {
      className: classes.svg,
      ownerState,
      viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgressCircle, {
        className: classes.circle,
        style: circleStyle,
        ownerState,
        cx: SIZE,
        cy: SIZE,
        r: (SIZE - thickness) / 2,
        fill: "none",
        strokeWidth: thickness
      })
    })
  }));
});
function mapEventPropToEvent(eventProp) {
  return eventProp.substring(2).toLowerCase();
}
function clickedRootScrollbar(event, doc) {
  return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;
}
function ClickAwayListener(props) {
  const {
    children,
    disableReactTree = false,
    mouseEvent = "onClick",
    onClickAway,
    touchEvent = "onTouchEnd"
  } = props;
  const movedRef = reactExports.useRef(false);
  const nodeRef = reactExports.useRef(null);
  const activatedRef = reactExports.useRef(false);
  const syntheticEventRef = reactExports.useRef(false);
  reactExports.useEffect(() => {
    setTimeout(() => {
      activatedRef.current = true;
    }, 0);
    return () => {
      activatedRef.current = false;
    };
  }, []);
  const handleRef = useForkRef(getReactElementRef(children), nodeRef);
  const handleClickAway = useEventCallback((event) => {
    const insideReactTree = syntheticEventRef.current;
    syntheticEventRef.current = false;
    const doc = ownerDocument(nodeRef.current);
    if (!activatedRef.current || !nodeRef.current || "clientX" in event && clickedRootScrollbar(event, doc)) {
      return;
    }
    if (movedRef.current) {
      movedRef.current = false;
      return;
    }
    let insideDOM;
    if (event.composedPath) {
      insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;
    } else {
      insideDOM = !doc.documentElement.contains(
        // @ts-expect-error returns `false` as intended when not dispatched from a Node
        event.target
      ) || nodeRef.current.contains(
        // @ts-expect-error returns `false` as intended when not dispatched from a Node
        event.target
      );
    }
    if (!insideDOM && (disableReactTree || !insideReactTree)) {
      onClickAway(event);
    }
  });
  const createHandleSynthetic = (handlerName) => (event) => {
    syntheticEventRef.current = true;
    const childrenPropsHandler = children.props[handlerName];
    if (childrenPropsHandler) {
      childrenPropsHandler(event);
    }
  };
  const childrenProps = {
    ref: handleRef
  };
  if (touchEvent !== false) {
    childrenProps[touchEvent] = createHandleSynthetic(touchEvent);
  }
  reactExports.useEffect(() => {
    if (touchEvent !== false) {
      const mappedTouchEvent = mapEventPropToEvent(touchEvent);
      const doc = ownerDocument(nodeRef.current);
      const handleTouchMove = () => {
        movedRef.current = true;
      };
      doc.addEventListener(mappedTouchEvent, handleClickAway);
      doc.addEventListener("touchmove", handleTouchMove);
      return () => {
        doc.removeEventListener(mappedTouchEvent, handleClickAway);
        doc.removeEventListener("touchmove", handleTouchMove);
      };
    }
    return void 0;
  }, [handleClickAway, touchEvent]);
  if (mouseEvent !== false) {
    childrenProps[mouseEvent] = createHandleSynthetic(mouseEvent);
  }
  reactExports.useEffect(() => {
    if (mouseEvent !== false) {
      const mappedMouseEvent = mapEventPropToEvent(mouseEvent);
      const doc = ownerDocument(nodeRef.current);
      doc.addEventListener(mappedMouseEvent, handleClickAway);
      return () => {
        doc.removeEventListener(mappedMouseEvent, handleClickAway);
      };
    }
    return void 0;
  }, [handleClickAway, mouseEvent]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Fragment, {
    children: /* @__PURE__ */ reactExports.cloneElement(children, childrenProps)
  });
}
const Container = createContainer$1({
  createStyledComponent: styled("div", {
    name: "MuiContainer",
    slot: "Root",
    overridesResolver: (props, styles2) => {
      const {
        ownerState
      } = props;
      return [styles2.root, styles2[`maxWidth${capitalize$2(String(ownerState.maxWidth))}`], ownerState.fixed && styles2.fixed, ownerState.disableGutters && styles2.disableGutters];
    }
  }),
  useThemeProps: (inProps) => useDefaultProps({
    props: inProps,
    name: "MuiContainer"
  })
});
const html = (theme, enableColorScheme) => _extends$1({
  WebkitFontSmoothing: "antialiased",
  // Antialiasing.
  MozOsxFontSmoothing: "grayscale",
  // Antialiasing.
  // Change from `box-sizing: content-box` so that `width`
  // is not affected by `padding` or `border`.
  boxSizing: "border-box",
  // Fix font resize problem in iOS
  WebkitTextSizeAdjust: "100%"
}, enableColorScheme && !theme.vars && {
  colorScheme: theme.palette.mode
});
const body = (theme) => _extends$1({
  color: (theme.vars || theme).palette.text.primary
}, theme.typography.body1, {
  backgroundColor: (theme.vars || theme).palette.background.default,
  "@media print": {
    // Save printer ink.
    backgroundColor: (theme.vars || theme).palette.common.white
  }
});
const styles$9 = (theme, enableColorScheme = false) => {
  var _theme$components;
  const colorSchemeStyles = {};
  if (enableColorScheme && theme.colorSchemes) {
    Object.entries(theme.colorSchemes).forEach(([key, scheme]) => {
      var _scheme$palette;
      colorSchemeStyles[theme.getColorSchemeSelector(key).replace(/\s*&/, "")] = {
        colorScheme: (_scheme$palette = scheme.palette) == null ? void 0 : _scheme$palette.mode
      };
    });
  }
  let defaultStyles = _extends$1({
    html: html(theme, enableColorScheme),
    "*, *::before, *::after": {
      boxSizing: "inherit"
    },
    "strong, b": {
      fontWeight: theme.typography.fontWeightBold
    },
    body: _extends$1({
      margin: 0
    }, body(theme), {
      // Add support for document.body.requestFullScreen().
      // Other elements, if background transparent, are not supported.
      "&::backdrop": {
        backgroundColor: (theme.vars || theme).palette.background.default
      }
    })
  }, colorSchemeStyles);
  const themeOverrides = (_theme$components = theme.components) == null || (_theme$components = _theme$components.MuiCssBaseline) == null ? void 0 : _theme$components.styleOverrides;
  if (themeOverrides) {
    defaultStyles = [defaultStyles, themeOverrides];
  }
  return defaultStyles;
};
function CssBaseline(inProps) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiCssBaseline"
  });
  const {
    children,
    enableColorScheme = false
  } = props;
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(GlobalStyles, {
      styles: (theme) => styles$9(theme, enableColorScheme)
    }), children]
  });
}
function isOverflowing(container) {
  const doc = ownerDocument(container);
  if (doc.body === container) {
    return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;
  }
  return container.scrollHeight > container.clientHeight;
}
function ariaHidden(element, show) {
  if (show) {
    element.setAttribute("aria-hidden", "true");
  } else {
    element.removeAttribute("aria-hidden");
  }
}
function getPaddingRight(element) {
  return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;
}
function isAriaHiddenForbiddenOnElement(element) {
  const forbiddenTagNames = ["TEMPLATE", "SCRIPT", "STYLE", "LINK", "MAP", "META", "NOSCRIPT", "PICTURE", "COL", "COLGROUP", "PARAM", "SLOT", "SOURCE", "TRACK"];
  const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;
  const isInputHidden = element.tagName === "INPUT" && element.getAttribute("type") === "hidden";
  return isForbiddenTagName || isInputHidden;
}
function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {
  const blacklist = [mountElement, currentElement, ...elementsToExclude];
  [].forEach.call(container.children, (element) => {
    const isNotExcludedElement = blacklist.indexOf(element) === -1;
    const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);
    if (isNotExcludedElement && isNotForbiddenElement) {
      ariaHidden(element, show);
    }
  });
}
function findIndexOf(items, callback) {
  let idx = -1;
  items.some((item, index2) => {
    if (callback(item)) {
      idx = index2;
      return true;
    }
    return false;
  });
  return idx;
}
function handleContainer(containerInfo, props) {
  const restoreStyle = [];
  const container = containerInfo.container;
  if (!props.disableScrollLock) {
    if (isOverflowing(container)) {
      const scrollbarSize = getScrollbarSize(ownerDocument(container));
      restoreStyle.push({
        value: container.style.paddingRight,
        property: "padding-right",
        el: container
      });
      container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;
      const fixedElements2 = ownerDocument(container).querySelectorAll(".mui-fixed");
      [].forEach.call(fixedElements2, (element) => {
        restoreStyle.push({
          value: element.style.paddingRight,
          property: "padding-right",
          el: element
        });
        element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;
      });
    }
    let scrollContainer;
    if (container.parentNode instanceof DocumentFragment) {
      scrollContainer = ownerDocument(container).body;
    } else {
      const parent = container.parentElement;
      const containerWindow = ownerWindow(container);
      scrollContainer = (parent == null ? void 0 : parent.nodeName) === "HTML" && containerWindow.getComputedStyle(parent).overflowY === "scroll" ? parent : container;
    }
    restoreStyle.push({
      value: scrollContainer.style.overflow,
      property: "overflow",
      el: scrollContainer
    }, {
      value: scrollContainer.style.overflowX,
      property: "overflow-x",
      el: scrollContainer
    }, {
      value: scrollContainer.style.overflowY,
      property: "overflow-y",
      el: scrollContainer
    });
    scrollContainer.style.overflow = "hidden";
  }
  const restore = () => {
    restoreStyle.forEach(({
      value,
      el,
      property
    }) => {
      if (value) {
        el.style.setProperty(property, value);
      } else {
        el.style.removeProperty(property);
      }
    });
  };
  return restore;
}
function getHiddenSiblings(container) {
  const hiddenSiblings = [];
  [].forEach.call(container.children, (element) => {
    if (element.getAttribute("aria-hidden") === "true") {
      hiddenSiblings.push(element);
    }
  });
  return hiddenSiblings;
}
class ModalManager {
  constructor() {
    this.containers = void 0;
    this.modals = void 0;
    this.modals = [];
    this.containers = [];
  }
  add(modal, container) {
    let modalIndex = this.modals.indexOf(modal);
    if (modalIndex !== -1) {
      return modalIndex;
    }
    modalIndex = this.modals.length;
    this.modals.push(modal);
    if (modal.modalRef) {
      ariaHidden(modal.modalRef, false);
    }
    const hiddenSiblings = getHiddenSiblings(container);
    ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);
    const containerIndex = findIndexOf(this.containers, (item) => item.container === container);
    if (containerIndex !== -1) {
      this.containers[containerIndex].modals.push(modal);
      return modalIndex;
    }
    this.containers.push({
      modals: [modal],
      container,
      restore: null,
      hiddenSiblings
    });
    return modalIndex;
  }
  mount(modal, props) {
    const containerIndex = findIndexOf(this.containers, (item) => item.modals.indexOf(modal) !== -1);
    const containerInfo = this.containers[containerIndex];
    if (!containerInfo.restore) {
      containerInfo.restore = handleContainer(containerInfo, props);
    }
  }
  remove(modal, ariaHiddenState = true) {
    const modalIndex = this.modals.indexOf(modal);
    if (modalIndex === -1) {
      return modalIndex;
    }
    const containerIndex = findIndexOf(this.containers, (item) => item.modals.indexOf(modal) !== -1);
    const containerInfo = this.containers[containerIndex];
    containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);
    this.modals.splice(modalIndex, 1);
    if (containerInfo.modals.length === 0) {
      if (containerInfo.restore) {
        containerInfo.restore();
      }
      if (modal.modalRef) {
        ariaHidden(modal.modalRef, ariaHiddenState);
      }
      ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);
      this.containers.splice(containerIndex, 1);
    } else {
      const nextTop = containerInfo.modals[containerInfo.modals.length - 1];
      if (nextTop.modalRef) {
        ariaHidden(nextTop.modalRef, false);
      }
    }
    return modalIndex;
  }
  isTopModal(modal) {
    return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;
  }
}
const candidatesSelector = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'].join(",");
function getTabIndex(node2) {
  const tabindexAttr = parseInt(node2.getAttribute("tabindex") || "", 10);
  if (!Number.isNaN(tabindexAttr)) {
    return tabindexAttr;
  }
  if (node2.contentEditable === "true" || (node2.nodeName === "AUDIO" || node2.nodeName === "VIDEO" || node2.nodeName === "DETAILS") && node2.getAttribute("tabindex") === null) {
    return 0;
  }
  return node2.tabIndex;
}
function isNonTabbableRadio(node2) {
  if (node2.tagName !== "INPUT" || node2.type !== "radio") {
    return false;
  }
  if (!node2.name) {
    return false;
  }
  const getRadio = (selector) => node2.ownerDocument.querySelector(`input[type="radio"]${selector}`);
  let roving = getRadio(`[name="${node2.name}"]:checked`);
  if (!roving) {
    roving = getRadio(`[name="${node2.name}"]`);
  }
  return roving !== node2;
}
function isNodeMatchingSelectorFocusable(node2) {
  if (node2.disabled || node2.tagName === "INPUT" && node2.type === "hidden" || isNonTabbableRadio(node2)) {
    return false;
  }
  return true;
}
function defaultGetTabbable(root) {
  const regularTabNodes = [];
  const orderedTabNodes = [];
  Array.from(root.querySelectorAll(candidatesSelector)).forEach((node2, i) => {
    const nodeTabIndex = getTabIndex(node2);
    if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node2)) {
      return;
    }
    if (nodeTabIndex === 0) {
      regularTabNodes.push(node2);
    } else {
      orderedTabNodes.push({
        documentOrder: i,
        tabIndex: nodeTabIndex,
        node: node2
      });
    }
  });
  return orderedTabNodes.sort((a2, b2) => a2.tabIndex === b2.tabIndex ? a2.documentOrder - b2.documentOrder : a2.tabIndex - b2.tabIndex).map((a2) => a2.node).concat(regularTabNodes);
}
function defaultIsEnabled() {
  return true;
}
function FocusTrap(props) {
  const {
    children,
    disableAutoFocus = false,
    disableEnforceFocus = false,
    disableRestoreFocus = false,
    getTabbable = defaultGetTabbable,
    isEnabled = defaultIsEnabled,
    open
  } = props;
  const ignoreNextEnforceFocus = reactExports.useRef(false);
  const sentinelStart = reactExports.useRef(null);
  const sentinelEnd = reactExports.useRef(null);
  const nodeToRestore = reactExports.useRef(null);
  const reactFocusEventTarget = reactExports.useRef(null);
  const activated = reactExports.useRef(false);
  const rootRef = reactExports.useRef(null);
  const handleRef = useForkRef(getReactElementRef(children), rootRef);
  const lastKeydown = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (!open || !rootRef.current) {
      return;
    }
    activated.current = !disableAutoFocus;
  }, [disableAutoFocus, open]);
  reactExports.useEffect(() => {
    if (!open || !rootRef.current) {
      return;
    }
    const doc = ownerDocument(rootRef.current);
    if (!rootRef.current.contains(doc.activeElement)) {
      if (!rootRef.current.hasAttribute("tabIndex")) {
        rootRef.current.setAttribute("tabIndex", "-1");
      }
      if (activated.current) {
        rootRef.current.focus();
      }
    }
    return () => {
      if (!disableRestoreFocus) {
        if (nodeToRestore.current && nodeToRestore.current.focus) {
          ignoreNextEnforceFocus.current = true;
          nodeToRestore.current.focus();
        }
        nodeToRestore.current = null;
      }
    };
  }, [open]);
  reactExports.useEffect(() => {
    if (!open || !rootRef.current) {
      return;
    }
    const doc = ownerDocument(rootRef.current);
    const loopFocus = (nativeEvent) => {
      lastKeydown.current = nativeEvent;
      if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== "Tab") {
        return;
      }
      if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {
        ignoreNextEnforceFocus.current = true;
        if (sentinelEnd.current) {
          sentinelEnd.current.focus();
        }
      }
    };
    const contain = () => {
      const rootElement = rootRef.current;
      if (rootElement === null) {
        return;
      }
      if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {
        ignoreNextEnforceFocus.current = false;
        return;
      }
      if (rootElement.contains(doc.activeElement)) {
        return;
      }
      if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {
        return;
      }
      if (doc.activeElement !== reactFocusEventTarget.current) {
        reactFocusEventTarget.current = null;
      } else if (reactFocusEventTarget.current !== null) {
        return;
      }
      if (!activated.current) {
        return;
      }
      let tabbable = [];
      if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {
        tabbable = getTabbable(rootRef.current);
      }
      if (tabbable.length > 0) {
        var _lastKeydown$current, _lastKeydown$current2;
        const isShiftTab = Boolean(((_lastKeydown$current = lastKeydown.current) == null ? void 0 : _lastKeydown$current.shiftKey) && ((_lastKeydown$current2 = lastKeydown.current) == null ? void 0 : _lastKeydown$current2.key) === "Tab");
        const focusNext = tabbable[0];
        const focusPrevious = tabbable[tabbable.length - 1];
        if (typeof focusNext !== "string" && typeof focusPrevious !== "string") {
          if (isShiftTab) {
            focusPrevious.focus();
          } else {
            focusNext.focus();
          }
        }
      } else {
        rootElement.focus();
      }
    };
    doc.addEventListener("focusin", contain);
    doc.addEventListener("keydown", loopFocus, true);
    const interval = setInterval(() => {
      if (doc.activeElement && doc.activeElement.tagName === "BODY") {
        contain();
      }
    }, 50);
    return () => {
      clearInterval(interval);
      doc.removeEventListener("focusin", contain);
      doc.removeEventListener("keydown", loopFocus, true);
    };
  }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);
  const onFocus = (event) => {
    if (nodeToRestore.current === null) {
      nodeToRestore.current = event.relatedTarget;
    }
    activated.current = true;
    reactFocusEventTarget.current = event.target;
    const childrenPropsHandler = children.props.onFocus;
    if (childrenPropsHandler) {
      childrenPropsHandler(event);
    }
  };
  const handleFocusSentinel = (event) => {
    if (nodeToRestore.current === null) {
      nodeToRestore.current = event.relatedTarget;
    }
    activated.current = true;
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx("div", {
      tabIndex: open ? 0 : -1,
      onFocus: handleFocusSentinel,
      ref: sentinelStart,
      "data-testid": "sentinelStart"
    }), /* @__PURE__ */ reactExports.cloneElement(children, {
      ref: handleRef,
      onFocus
    }), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
      tabIndex: open ? 0 : -1,
      onFocus: handleFocusSentinel,
      ref: sentinelEnd,
      "data-testid": "sentinelEnd"
    })]
  });
}
function getContainer(container) {
  return typeof container === "function" ? container() : container;
}
function getHasTransition(children) {
  return children ? children.props.hasOwnProperty("in") : false;
}
const defaultManager = new ModalManager();
function useModal(parameters) {
  const {
    container,
    disableEscapeKeyDown = false,
    disableScrollLock = false,
    // @ts-ignore internal logic - Base UI supports the manager as a prop too
    manager = defaultManager,
    closeAfterTransition = false,
    onTransitionEnter,
    onTransitionExited,
    children,
    onClose,
    open,
    rootRef
  } = parameters;
  const modal = reactExports.useRef({});
  const mountNodeRef = reactExports.useRef(null);
  const modalRef = reactExports.useRef(null);
  const handleRef = useForkRef(modalRef, rootRef);
  const [exited, setExited] = reactExports.useState(!open);
  const hasTransition = getHasTransition(children);
  let ariaHiddenProp = true;
  if (parameters["aria-hidden"] === "false" || parameters["aria-hidden"] === false) {
    ariaHiddenProp = false;
  }
  const getDoc = () => ownerDocument(mountNodeRef.current);
  const getModal = () => {
    modal.current.modalRef = modalRef.current;
    modal.current.mount = mountNodeRef.current;
    return modal.current;
  };
  const handleMounted = () => {
    manager.mount(getModal(), {
      disableScrollLock
    });
    if (modalRef.current) {
      modalRef.current.scrollTop = 0;
    }
  };
  const handleOpen = useEventCallback(() => {
    const resolvedContainer = getContainer(container) || getDoc().body;
    manager.add(getModal(), resolvedContainer);
    if (modalRef.current) {
      handleMounted();
    }
  });
  const isTopModal = reactExports.useCallback(() => manager.isTopModal(getModal()), [manager]);
  const handlePortalRef = useEventCallback((node2) => {
    mountNodeRef.current = node2;
    if (!node2) {
      return;
    }
    if (open && isTopModal()) {
      handleMounted();
    } else if (modalRef.current) {
      ariaHidden(modalRef.current, ariaHiddenProp);
    }
  });
  const handleClose = reactExports.useCallback(() => {
    manager.remove(getModal(), ariaHiddenProp);
  }, [ariaHiddenProp, manager]);
  reactExports.useEffect(() => {
    return () => {
      handleClose();
    };
  }, [handleClose]);
  reactExports.useEffect(() => {
    if (open) {
      handleOpen();
    } else if (!hasTransition || !closeAfterTransition) {
      handleClose();
    }
  }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);
  const createHandleKeyDown = (otherHandlers) => (event) => {
    var _otherHandlers$onKeyD;
    (_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null || _otherHandlers$onKeyD.call(otherHandlers, event);
    if (event.key !== "Escape" || event.which === 229 || // Wait until IME is settled.
    !isTopModal()) {
      return;
    }
    if (!disableEscapeKeyDown) {
      event.stopPropagation();
      if (onClose) {
        onClose(event, "escapeKeyDown");
      }
    }
  };
  const createHandleBackdropClick = (otherHandlers) => (event) => {
    var _otherHandlers$onClic;
    (_otherHandlers$onClic = otherHandlers.onClick) == null || _otherHandlers$onClic.call(otherHandlers, event);
    if (event.target !== event.currentTarget) {
      return;
    }
    if (onClose) {
      onClose(event, "backdropClick");
    }
  };
  const getRootProps = (otherHandlers = {}) => {
    const propsEventHandlers = extractEventHandlers(parameters);
    delete propsEventHandlers.onTransitionEnter;
    delete propsEventHandlers.onTransitionExited;
    const externalEventHandlers = _extends$1({}, propsEventHandlers, otherHandlers);
    return _extends$1({
      role: "presentation"
    }, externalEventHandlers, {
      onKeyDown: createHandleKeyDown(externalEventHandlers),
      ref: handleRef
    });
  };
  const getBackdropProps = (otherHandlers = {}) => {
    const externalEventHandlers = otherHandlers;
    return _extends$1({
      "aria-hidden": true
    }, externalEventHandlers, {
      onClick: createHandleBackdropClick(externalEventHandlers),
      open
    });
  };
  const getTransitionProps2 = () => {
    const handleEnter = () => {
      setExited(false);
      if (onTransitionEnter) {
        onTransitionEnter();
      }
    };
    const handleExited = () => {
      setExited(true);
      if (onTransitionExited) {
        onTransitionExited();
      }
      if (closeAfterTransition) {
        handleClose();
      }
    };
    return {
      onEnter: createChainedFunction(handleEnter, children == null ? void 0 : children.props.onEnter),
      onExited: createChainedFunction(handleExited, children == null ? void 0 : children.props.onExited)
    };
  };
  return {
    getRootProps,
    getBackdropProps,
    getTransitionProps: getTransitionProps2,
    rootRef: handleRef,
    portalRef: handlePortalRef,
    isTopModal,
    exited,
    hasTransition
  };
}
function getModalUtilityClass(slot) {
  return generateUtilityClass("MuiModal", slot);
}
generateUtilityClasses("MuiModal", ["root", "hidden", "backdrop"]);
const _excluded$13 = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"];
const useUtilityClasses$X = (ownerState) => {
  const {
    open,
    exited,
    classes
  } = ownerState;
  const slots = {
    root: ["root", !open && exited && "hidden"],
    backdrop: ["backdrop"]
  };
  return composeClasses(slots, getModalUtilityClass, classes);
};
const ModalRoot = styled("div", {
  name: "MuiModal",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, !ownerState.open && ownerState.exited && styles2.hidden];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  position: "fixed",
  zIndex: (theme.vars || theme).zIndex.modal,
  right: 0,
  bottom: 0,
  top: 0,
  left: 0
}, !ownerState.open && ownerState.exited && {
  visibility: "hidden"
}));
const ModalBackdrop = styled(Backdrop, {
  name: "MuiModal",
  slot: "Backdrop",
  overridesResolver: (props, styles2) => {
    return styles2.backdrop;
  }
})({
  zIndex: -1
});
const Modal = /* @__PURE__ */ reactExports.forwardRef(function Modal2(inProps, ref2) {
  var _ref, _slots$root, _ref2, _slots$backdrop, _slotProps$root, _slotProps$backdrop;
  const props = useDefaultProps({
    name: "MuiModal",
    props: inProps
  });
  const {
    BackdropComponent = ModalBackdrop,
    BackdropProps,
    className,
    closeAfterTransition = false,
    children,
    container,
    component,
    components = {},
    componentsProps = {},
    disableAutoFocus = false,
    disableEnforceFocus = false,
    disableEscapeKeyDown = false,
    disablePortal = false,
    disableRestoreFocus = false,
    disableScrollLock = false,
    hideBackdrop = false,
    keepMounted = false,
    onBackdropClick,
    open,
    slotProps,
    slots
    // eslint-disable-next-line react/prop-types
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$13);
  const propsWithDefaults = _extends$1({}, props, {
    closeAfterTransition,
    disableAutoFocus,
    disableEnforceFocus,
    disableEscapeKeyDown,
    disablePortal,
    disableRestoreFocus,
    disableScrollLock,
    hideBackdrop,
    keepMounted
  });
  const {
    getRootProps,
    getBackdropProps,
    getTransitionProps: getTransitionProps2,
    portalRef,
    isTopModal,
    exited,
    hasTransition
  } = useModal(_extends$1({}, propsWithDefaults, {
    rootRef: ref2
  }));
  const ownerState = _extends$1({}, propsWithDefaults, {
    exited
  });
  const classes = useUtilityClasses$X(ownerState);
  const childProps = {};
  if (children.props.tabIndex === void 0) {
    childProps.tabIndex = "-1";
  }
  if (hasTransition) {
    const {
      onEnter,
      onExited
    } = getTransitionProps2();
    childProps.onEnter = onEnter;
    childProps.onExited = onExited;
  }
  const RootSlot = (_ref = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components.Root) != null ? _ref : ModalRoot;
  const BackdropSlot = (_ref2 = (_slots$backdrop = slots == null ? void 0 : slots.backdrop) != null ? _slots$backdrop : components.Backdrop) != null ? _ref2 : BackdropComponent;
  const rootSlotProps = (_slotProps$root = slotProps == null ? void 0 : slotProps.root) != null ? _slotProps$root : componentsProps.root;
  const backdropSlotProps = (_slotProps$backdrop = slotProps == null ? void 0 : slotProps.backdrop) != null ? _slotProps$backdrop : componentsProps.backdrop;
  const rootProps = useSlotProps({
    elementType: RootSlot,
    externalSlotProps: rootSlotProps,
    externalForwardedProps: other,
    getSlotProps: getRootProps,
    additionalProps: {
      ref: ref2,
      as: component
    },
    ownerState,
    className: clsx$3(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))
  });
  const backdropProps = useSlotProps({
    elementType: BackdropSlot,
    externalSlotProps: backdropSlotProps,
    additionalProps: BackdropProps,
    getSlotProps: (otherHandlers) => {
      return getBackdropProps(_extends$1({}, otherHandlers, {
        onClick: (e2) => {
          if (onBackdropClick) {
            onBackdropClick(e2);
          }
          if (otherHandlers != null && otherHandlers.onClick) {
            otherHandlers.onClick(e2);
          }
        }
      }));
    },
    className: clsx$3(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop),
    ownerState
  });
  if (!keepMounted && !open && (!hasTransition || exited)) {
    return null;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Portal, {
    ref: portalRef,
    container,
    disablePortal,
    children: /* @__PURE__ */ jsxRuntimeExports.jsxs(RootSlot, _extends$1({}, rootProps, {
      children: [!hideBackdrop && BackdropComponent ? /* @__PURE__ */ jsxRuntimeExports.jsx(BackdropSlot, _extends$1({}, backdropProps)) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(FocusTrap, {
        disableEnforceFocus,
        disableAutoFocus,
        disableRestoreFocus,
        isEnabled: isTopModal,
        open,
        children: /* @__PURE__ */ reactExports.cloneElement(children, childProps)
      })]
    }))
  });
});
function getDialogUtilityClass(slot) {
  return generateUtilityClass("MuiDialog", slot);
}
const dialogClasses = generateUtilityClasses("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]);
const DialogContext = /* @__PURE__ */ reactExports.createContext({});
const _excluded$12 = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"];
const DialogBackdrop = styled(Backdrop, {
  name: "MuiDialog",
  slot: "Backdrop",
  overrides: (props, styles2) => styles2.backdrop
})({
  // Improve scrollable dialog support.
  zIndex: -1
});
const useUtilityClasses$W = (ownerState) => {
  const {
    classes,
    scroll,
    maxWidth: maxWidth2,
    fullWidth,
    fullScreen
  } = ownerState;
  const slots = {
    root: ["root"],
    container: ["container", `scroll${capitalize$2(scroll)}`],
    paper: ["paper", `paperScroll${capitalize$2(scroll)}`, `paperWidth${capitalize$2(String(maxWidth2))}`, fullWidth && "paperFullWidth", fullScreen && "paperFullScreen"]
  };
  return composeClasses(slots, getDialogUtilityClass, classes);
};
const DialogRoot = styled(Modal, {
  name: "MuiDialog",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  "@media print": {
    // Use !important to override the Modal inline-style.
    position: "absolute !important"
  }
});
const DialogContainer$1 = styled("div", {
  name: "MuiDialog",
  slot: "Container",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.container, styles2[`scroll${capitalize$2(ownerState.scroll)}`]];
  }
})(({
  ownerState
}) => _extends$1({
  height: "100%",
  "@media print": {
    height: "auto"
  },
  // We disable the focus ring for mouse, touch and keyboard users.
  outline: 0
}, ownerState.scroll === "paper" && {
  display: "flex",
  justifyContent: "center",
  alignItems: "center"
}, ownerState.scroll === "body" && {
  overflowY: "auto",
  overflowX: "hidden",
  textAlign: "center",
  "&::after": {
    content: '""',
    display: "inline-block",
    verticalAlign: "middle",
    height: "100%",
    width: "0"
  }
}));
const DialogPaper = styled(Paper, {
  name: "MuiDialog",
  slot: "Paper",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.paper, styles2[`scrollPaper${capitalize$2(ownerState.scroll)}`], styles2[`paperWidth${capitalize$2(String(ownerState.maxWidth))}`], ownerState.fullWidth && styles2.paperFullWidth, ownerState.fullScreen && styles2.paperFullScreen];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  margin: 32,
  position: "relative",
  overflowY: "auto",
  // Fix IE11 issue, to remove at some point.
  "@media print": {
    overflowY: "visible",
    boxShadow: "none"
  }
}, ownerState.scroll === "paper" && {
  display: "flex",
  flexDirection: "column",
  maxHeight: "calc(100% - 64px)"
}, ownerState.scroll === "body" && {
  display: "inline-block",
  verticalAlign: "middle",
  textAlign: "left"
  // 'initial' doesn't work on IE11
}, !ownerState.maxWidth && {
  maxWidth: "calc(100% - 64px)"
}, ownerState.maxWidth === "xs" && {
  maxWidth: theme.breakpoints.unit === "px" ? Math.max(theme.breakpoints.values.xs, 444) : `max(${theme.breakpoints.values.xs}${theme.breakpoints.unit}, 444px)`,
  [`&.${dialogClasses.paperScrollBody}`]: {
    [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2)]: {
      maxWidth: "calc(100% - 64px)"
    }
  }
}, ownerState.maxWidth && ownerState.maxWidth !== "xs" && {
  maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`,
  [`&.${dialogClasses.paperScrollBody}`]: {
    [theme.breakpoints.down(theme.breakpoints.values[ownerState.maxWidth] + 32 * 2)]: {
      maxWidth: "calc(100% - 64px)"
    }
  }
}, ownerState.fullWidth && {
  width: "calc(100% - 64px)"
}, ownerState.fullScreen && {
  margin: 0,
  width: "100%",
  maxWidth: "100%",
  height: "100%",
  maxHeight: "none",
  borderRadius: 0,
  [`&.${dialogClasses.paperScrollBody}`]: {
    margin: 0,
    maxWidth: "100%"
  }
}));
const Dialog = /* @__PURE__ */ reactExports.forwardRef(function Dialog2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiDialog"
  });
  const theme = useTheme$1();
  const defaultTransitionDuration = {
    enter: theme.transitions.duration.enteringScreen,
    exit: theme.transitions.duration.leavingScreen
  };
  const {
    "aria-describedby": ariaDescribedby,
    "aria-labelledby": ariaLabelledbyProp,
    BackdropComponent,
    BackdropProps,
    children,
    className,
    disableEscapeKeyDown = false,
    fullScreen = false,
    fullWidth = false,
    maxWidth: maxWidth2 = "sm",
    onBackdropClick,
    onClick: onClick2,
    onClose,
    open,
    PaperComponent: PaperComponent2 = Paper,
    PaperProps = {},
    scroll = "paper",
    TransitionComponent = Fade,
    transitionDuration = defaultTransitionDuration,
    TransitionProps
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$12);
  const ownerState = _extends$1({}, props, {
    disableEscapeKeyDown,
    fullScreen,
    fullWidth,
    maxWidth: maxWidth2,
    scroll
  });
  const classes = useUtilityClasses$W(ownerState);
  const backdropClick = reactExports.useRef();
  const handleMouseDown = (event) => {
    backdropClick.current = event.target === event.currentTarget;
  };
  const handleBackdropClick = (event) => {
    if (onClick2) {
      onClick2(event);
    }
    if (!backdropClick.current) {
      return;
    }
    backdropClick.current = null;
    if (onBackdropClick) {
      onBackdropClick(event);
    }
    if (onClose) {
      onClose(event, "backdropClick");
    }
  };
  const ariaLabelledby = useId$1(ariaLabelledbyProp);
  const dialogContextValue = reactExports.useMemo(() => {
    return {
      titleId: ariaLabelledby
    };
  }, [ariaLabelledby]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DialogRoot, _extends$1({
    className: clsx$3(classes.root, className),
    closeAfterTransition: true,
    components: {
      Backdrop: DialogBackdrop
    },
    componentsProps: {
      backdrop: _extends$1({
        transitionDuration,
        as: BackdropComponent
      }, BackdropProps)
    },
    disableEscapeKeyDown,
    onClose,
    open,
    ref: ref2,
    onClick: handleBackdropClick,
    ownerState
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
      appear: true,
      in: open,
      timeout: transitionDuration,
      role: "presentation"
    }, TransitionProps, {
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContainer$1, {
        className: clsx$3(classes.container),
        onMouseDown: handleMouseDown,
        ownerState,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogPaper, _extends$1({
          as: PaperComponent2,
          elevation: 24,
          role: "dialog",
          "aria-describedby": ariaDescribedby,
          "aria-labelledby": ariaLabelledby
        }, PaperProps, {
          className: clsx$3(classes.paper, PaperProps.className),
          ownerState,
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContext.Provider, {
            value: dialogContextValue,
            children
          })
        }))
      })
    }))
  }));
});
function getDialogActionsUtilityClass(slot) {
  return generateUtilityClass("MuiDialogActions", slot);
}
generateUtilityClasses("MuiDialogActions", ["root", "spacing"]);
const _excluded$11 = ["className", "disableSpacing"];
const useUtilityClasses$V = (ownerState) => {
  const {
    classes,
    disableSpacing
  } = ownerState;
  const slots = {
    root: ["root", !disableSpacing && "spacing"]
  };
  return composeClasses(slots, getDialogActionsUtilityClass, classes);
};
const DialogActionsRoot = styled("div", {
  name: "MuiDialogActions",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, !ownerState.disableSpacing && styles2.spacing];
  }
})(({
  ownerState
}) => _extends$1({
  display: "flex",
  alignItems: "center",
  padding: 8,
  justifyContent: "flex-end",
  flex: "0 0 auto"
}, !ownerState.disableSpacing && {
  "& > :not(style) ~ :not(style)": {
    marginLeft: 8
  }
}));
const DialogActions = /* @__PURE__ */ reactExports.forwardRef(function DialogActions2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiDialogActions"
  });
  const {
    className,
    disableSpacing = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$11);
  const ownerState = _extends$1({}, props, {
    disableSpacing
  });
  const classes = useUtilityClasses$V(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DialogActionsRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other));
});
function getDialogContentUtilityClass(slot) {
  return generateUtilityClass("MuiDialogContent", slot);
}
generateUtilityClasses("MuiDialogContent", ["root", "dividers"]);
function getDialogTitleUtilityClass(slot) {
  return generateUtilityClass("MuiDialogTitle", slot);
}
const dialogTitleClasses = generateUtilityClasses("MuiDialogTitle", ["root"]);
const _excluded$10 = ["className", "dividers"];
const useUtilityClasses$U = (ownerState) => {
  const {
    classes,
    dividers
  } = ownerState;
  const slots = {
    root: ["root", dividers && "dividers"]
  };
  return composeClasses(slots, getDialogContentUtilityClass, classes);
};
const DialogContentRoot = styled("div", {
  name: "MuiDialogContent",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.dividers && styles2.dividers];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  flex: "1 1 auto",
  // Add iOS momentum scrolling for iOS < 13.0
  WebkitOverflowScrolling: "touch",
  overflowY: "auto",
  padding: "20px 24px"
}, ownerState.dividers ? {
  padding: "16px 24px",
  borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
  borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
} : {
  [`.${dialogTitleClasses.root} + &`]: {
    paddingTop: 0
  }
}));
const DialogContent = /* @__PURE__ */ reactExports.forwardRef(function DialogContent2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiDialogContent"
  });
  const {
    className,
    dividers = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$10);
  const ownerState = _extends$1({}, props, {
    dividers
  });
  const classes = useUtilityClasses$U(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContentRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other));
});
function getDialogContentTextUtilityClass(slot) {
  return generateUtilityClass("MuiDialogContentText", slot);
}
generateUtilityClasses("MuiDialogContentText", ["root"]);
const _excluded$$ = ["children", "className"];
const useUtilityClasses$T = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  const composedClasses = composeClasses(slots, getDialogContentTextUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const DialogContentTextRoot = styled(Typography, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiDialogContentText",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({});
const DialogContentText = /* @__PURE__ */ reactExports.forwardRef(function DialogContentText2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiDialogContentText"
  });
  const {
    className
  } = props, ownerState = _objectWithoutPropertiesLoose(props, _excluded$$);
  const classes = useUtilityClasses$T(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContentTextRoot, _extends$1({
    component: "p",
    variant: "body1",
    color: "text.secondary",
    ref: ref2,
    ownerState,
    className: clsx$3(classes.root, className)
  }, props, {
    classes
  }));
});
const _excluded$_ = ["className", "id"];
const useUtilityClasses$S = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getDialogTitleUtilityClass, classes);
};
const DialogTitleRoot = styled(Typography, {
  name: "MuiDialogTitle",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  padding: "16px 24px",
  flex: "0 0 auto"
});
const DialogTitle = /* @__PURE__ */ reactExports.forwardRef(function DialogTitle2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiDialogTitle"
  });
  const {
    className,
    id: idProp
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$_);
  const ownerState = props;
  const classes = useUtilityClasses$S(ownerState);
  const {
    titleId = idProp
  } = reactExports.useContext(DialogContext);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitleRoot, _extends$1({
    component: "h2",
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2,
    variant: "h6",
    id: idProp != null ? idProp : titleId
  }, other));
});
function getDividerUtilityClass(slot) {
  return generateUtilityClass("MuiDivider", slot);
}
const dividerClasses = generateUtilityClasses("MuiDivider", ["root", "absolute", "fullWidth", "inset", "middle", "flexItem", "light", "vertical", "withChildren", "withChildrenVertical", "textAlignRight", "textAlignLeft", "wrapper", "wrapperVertical"]);
const _excluded$Z = ["absolute", "children", "className", "component", "flexItem", "light", "orientation", "role", "textAlign", "variant"];
const useUtilityClasses$R = (ownerState) => {
  const {
    absolute,
    children,
    classes,
    flexItem,
    light: light2,
    orientation,
    textAlign: textAlign2,
    variant: variant2
  } = ownerState;
  const slots = {
    root: ["root", absolute && "absolute", variant2, light2 && "light", orientation === "vertical" && "vertical", flexItem && "flexItem", children && "withChildren", children && orientation === "vertical" && "withChildrenVertical", textAlign2 === "right" && orientation !== "vertical" && "textAlignRight", textAlign2 === "left" && orientation !== "vertical" && "textAlignLeft"],
    wrapper: ["wrapper", orientation === "vertical" && "wrapperVertical"]
  };
  return composeClasses(slots, getDividerUtilityClass, classes);
};
const DividerRoot = styled("div", {
  name: "MuiDivider",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.absolute && styles2.absolute, styles2[ownerState.variant], ownerState.light && styles2.light, ownerState.orientation === "vertical" && styles2.vertical, ownerState.flexItem && styles2.flexItem, ownerState.children && styles2.withChildren, ownerState.children && ownerState.orientation === "vertical" && styles2.withChildrenVertical, ownerState.textAlign === "right" && ownerState.orientation !== "vertical" && styles2.textAlignRight, ownerState.textAlign === "left" && ownerState.orientation !== "vertical" && styles2.textAlignLeft];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  margin: 0,
  // Reset browser default style.
  flexShrink: 0,
  borderWidth: 0,
  borderStyle: "solid",
  borderColor: (theme.vars || theme).palette.divider,
  borderBottomWidth: "thin"
}, ownerState.absolute && {
  position: "absolute",
  bottom: 0,
  left: 0,
  width: "100%"
}, ownerState.light && {
  borderColor: theme.vars ? `rgba(${theme.vars.palette.dividerChannel} / 0.08)` : colorManipulatorExports.alpha(theme.palette.divider, 0.08)
}, ownerState.variant === "inset" && {
  marginLeft: 72
}, ownerState.variant === "middle" && ownerState.orientation === "horizontal" && {
  marginLeft: theme.spacing(2),
  marginRight: theme.spacing(2)
}, ownerState.variant === "middle" && ownerState.orientation === "vertical" && {
  marginTop: theme.spacing(1),
  marginBottom: theme.spacing(1)
}, ownerState.orientation === "vertical" && {
  height: "100%",
  borderBottomWidth: 0,
  borderRightWidth: "thin"
}, ownerState.flexItem && {
  alignSelf: "stretch",
  height: "auto"
}), ({
  ownerState
}) => _extends$1({}, ownerState.children && {
  display: "flex",
  whiteSpace: "nowrap",
  textAlign: "center",
  border: 0,
  borderTopStyle: "solid",
  borderLeftStyle: "solid",
  "&::before, &::after": {
    content: '""',
    alignSelf: "center"
  }
}), ({
  theme,
  ownerState
}) => _extends$1({}, ownerState.children && ownerState.orientation !== "vertical" && {
  "&::before, &::after": {
    width: "100%",
    borderTop: `thin solid ${(theme.vars || theme).palette.divider}`,
    borderTopStyle: "inherit"
  }
}), ({
  theme,
  ownerState
}) => _extends$1({}, ownerState.children && ownerState.orientation === "vertical" && {
  flexDirection: "column",
  "&::before, &::after": {
    height: "100%",
    borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`,
    borderLeftStyle: "inherit"
  }
}), ({
  ownerState
}) => _extends$1({}, ownerState.textAlign === "right" && ownerState.orientation !== "vertical" && {
  "&::before": {
    width: "90%"
  },
  "&::after": {
    width: "10%"
  }
}, ownerState.textAlign === "left" && ownerState.orientation !== "vertical" && {
  "&::before": {
    width: "10%"
  },
  "&::after": {
    width: "90%"
  }
}));
const DividerWrapper = styled("span", {
  name: "MuiDivider",
  slot: "Wrapper",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.wrapper, ownerState.orientation === "vertical" && styles2.wrapperVertical];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  display: "inline-block",
  paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,
  paddingRight: `calc(${theme.spacing(1)} * 1.2)`
}, ownerState.orientation === "vertical" && {
  paddingTop: `calc(${theme.spacing(1)} * 1.2)`,
  paddingBottom: `calc(${theme.spacing(1)} * 1.2)`
}));
const Divider = /* @__PURE__ */ reactExports.forwardRef(function Divider2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiDivider"
  });
  const {
    absolute = false,
    children,
    className,
    component = children ? "div" : "hr",
    flexItem = false,
    light: light2 = false,
    orientation = "horizontal",
    role = component !== "hr" ? "separator" : void 0,
    textAlign: textAlign2 = "center",
    variant: variant2 = "fullWidth"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$Z);
  const ownerState = _extends$1({}, props, {
    absolute,
    component,
    flexItem,
    light: light2,
    orientation,
    role,
    textAlign: textAlign2,
    variant: variant2
  });
  const classes = useUtilityClasses$R(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(DividerRoot, _extends$1({
    as: component,
    className: clsx$3(classes.root, className),
    role,
    ref: ref2,
    ownerState
  }, other, {
    children: children ? /* @__PURE__ */ jsxRuntimeExports.jsx(DividerWrapper, {
      className: classes.wrapper,
      ownerState,
      children
    }) : null
  }));
});
Divider.muiSkipListHighlight = true;
const _excluded$Y = ["addEndListener", "appear", "children", "container", "direction", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
function getTranslateValue(direction2, node2, resolvedContainer) {
  const rect = node2.getBoundingClientRect();
  const containerRect = resolvedContainer && resolvedContainer.getBoundingClientRect();
  const containerWindow = ownerWindow(node2);
  let transform2;
  if (node2.fakeTransform) {
    transform2 = node2.fakeTransform;
  } else {
    const computedStyle = containerWindow.getComputedStyle(node2);
    transform2 = computedStyle.getPropertyValue("-webkit-transform") || computedStyle.getPropertyValue("transform");
  }
  let offsetX = 0;
  let offsetY = 0;
  if (transform2 && transform2 !== "none" && typeof transform2 === "string") {
    const transformValues = transform2.split("(")[1].split(")")[0].split(",");
    offsetX = parseInt(transformValues[4], 10);
    offsetY = parseInt(transformValues[5], 10);
  }
  if (direction2 === "left") {
    if (containerRect) {
      return `translateX(${containerRect.right + offsetX - rect.left}px)`;
    }
    return `translateX(${containerWindow.innerWidth + offsetX - rect.left}px)`;
  }
  if (direction2 === "right") {
    if (containerRect) {
      return `translateX(-${rect.right - containerRect.left - offsetX}px)`;
    }
    return `translateX(-${rect.left + rect.width - offsetX}px)`;
  }
  if (direction2 === "up") {
    if (containerRect) {
      return `translateY(${containerRect.bottom + offsetY - rect.top}px)`;
    }
    return `translateY(${containerWindow.innerHeight + offsetY - rect.top}px)`;
  }
  if (containerRect) {
    return `translateY(-${rect.top - containerRect.top + rect.height - offsetY}px)`;
  }
  return `translateY(-${rect.top + rect.height - offsetY}px)`;
}
function resolveContainer(containerPropProp) {
  return typeof containerPropProp === "function" ? containerPropProp() : containerPropProp;
}
function setTranslateValue(direction2, node2, containerProp) {
  const resolvedContainer = resolveContainer(containerProp);
  const transform2 = getTranslateValue(direction2, node2, resolvedContainer);
  if (transform2) {
    node2.style.webkitTransform = transform2;
    node2.style.transform = transform2;
  }
}
const Slide = /* @__PURE__ */ reactExports.forwardRef(function Slide2(props, ref2) {
  const theme = useTheme$1();
  const defaultEasing = {
    enter: theme.transitions.easing.easeOut,
    exit: theme.transitions.easing.sharp
  };
  const defaultTimeout = {
    enter: theme.transitions.duration.enteringScreen,
    exit: theme.transitions.duration.leavingScreen
  };
  const {
    addEndListener,
    appear = true,
    children,
    container: containerProp,
    direction: direction2 = "down",
    easing: easingProp = defaultEasing,
    in: inProp,
    onEnter,
    onEntered,
    onEntering,
    onExit,
    onExited,
    onExiting,
    style: style2,
    timeout = defaultTimeout,
    // eslint-disable-next-line react/prop-types
    TransitionComponent = Transition$4
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$Y);
  const childrenRef = reactExports.useRef(null);
  const handleRef = useForkRef(getReactElementRef(children), childrenRef, ref2);
  const normalizedTransitionCallback = (callback) => (isAppearing) => {
    if (callback) {
      if (isAppearing === void 0) {
        callback(childrenRef.current);
      } else {
        callback(childrenRef.current, isAppearing);
      }
    }
  };
  const handleEnter = normalizedTransitionCallback((node2, isAppearing) => {
    setTranslateValue(direction2, node2, containerProp);
    reflow(node2);
    if (onEnter) {
      onEnter(node2, isAppearing);
    }
  });
  const handleEntering = normalizedTransitionCallback((node2, isAppearing) => {
    const transitionProps = getTransitionProps({
      timeout,
      style: style2,
      easing: easingProp
    }, {
      mode: "enter"
    });
    node2.style.webkitTransition = theme.transitions.create("-webkit-transform", _extends$1({}, transitionProps));
    node2.style.transition = theme.transitions.create("transform", _extends$1({}, transitionProps));
    node2.style.webkitTransform = "none";
    node2.style.transform = "none";
    if (onEntering) {
      onEntering(node2, isAppearing);
    }
  });
  const handleEntered = normalizedTransitionCallback(onEntered);
  const handleExiting = normalizedTransitionCallback(onExiting);
  const handleExit = normalizedTransitionCallback((node2) => {
    const transitionProps = getTransitionProps({
      timeout,
      style: style2,
      easing: easingProp
    }, {
      mode: "exit"
    });
    node2.style.webkitTransition = theme.transitions.create("-webkit-transform", transitionProps);
    node2.style.transition = theme.transitions.create("transform", transitionProps);
    setTranslateValue(direction2, node2, containerProp);
    if (onExit) {
      onExit(node2);
    }
  });
  const handleExited = normalizedTransitionCallback((node2) => {
    node2.style.webkitTransition = "";
    node2.style.transition = "";
    if (onExited) {
      onExited(node2);
    }
  });
  const handleAddEndListener = (next2) => {
    if (addEndListener) {
      addEndListener(childrenRef.current, next2);
    }
  };
  const updatePosition = reactExports.useCallback(() => {
    if (childrenRef.current) {
      setTranslateValue(direction2, childrenRef.current, containerProp);
    }
  }, [direction2, containerProp]);
  reactExports.useEffect(() => {
    if (inProp || direction2 === "down" || direction2 === "right") {
      return void 0;
    }
    const handleResize = debounce$2(() => {
      if (childrenRef.current) {
        setTranslateValue(direction2, childrenRef.current, containerProp);
      }
    });
    const containerWindow = ownerWindow(childrenRef.current);
    containerWindow.addEventListener("resize", handleResize);
    return () => {
      handleResize.clear();
      containerWindow.removeEventListener("resize", handleResize);
    };
  }, [direction2, inProp, containerProp]);
  reactExports.useEffect(() => {
    if (!inProp) {
      updatePosition();
    }
  }, [inProp, updatePosition]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
    nodeRef: childrenRef,
    onEnter: handleEnter,
    onEntered: handleEntered,
    onEntering: handleEntering,
    onExit: handleExit,
    onExited: handleExited,
    onExiting: handleExiting,
    addEndListener: handleAddEndListener,
    appear,
    in: inProp,
    timeout
  }, other, {
    children: (state, childProps) => {
      return /* @__PURE__ */ reactExports.cloneElement(children, _extends$1({
        ref: handleRef,
        style: _extends$1({
          visibility: state === "exited" && !inProp ? "hidden" : void 0
        }, style2, children.props.style)
      }, childProps));
    }
  }));
});
const _excluded$X = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"];
const useUtilityClasses$Q = (ownerState) => {
  const {
    classes,
    disableUnderline
  } = ownerState;
  const slots = {
    root: ["root", !disableUnderline && "underline"],
    input: ["input"]
  };
  const composedClasses = composeClasses(slots, getFilledInputUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const FilledInputRoot = styled(InputBaseRoot, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiFilledInput",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [...rootOverridesResolver(props, styles2), !ownerState.disableUnderline && styles2.underline];
  }
})(({
  theme,
  ownerState
}) => {
  var _palette;
  const light2 = theme.palette.mode === "light";
  const bottomLineColor = light2 ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)";
  const backgroundColor2 = light2 ? "rgba(0, 0, 0, 0.06)" : "rgba(255, 255, 255, 0.09)";
  const hoverBackground = light2 ? "rgba(0, 0, 0, 0.09)" : "rgba(255, 255, 255, 0.13)";
  const disabledBackground = light2 ? "rgba(0, 0, 0, 0.12)" : "rgba(255, 255, 255, 0.12)";
  return _extends$1({
    position: "relative",
    backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor2,
    borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
    borderTopRightRadius: (theme.vars || theme).shape.borderRadius,
    transition: theme.transitions.create("background-color", {
      duration: theme.transitions.duration.shorter,
      easing: theme.transitions.easing.easeOut
    }),
    "&:hover": {
      backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor2
      }
    },
    [`&.${filledInputClasses.focused}`]: {
      backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor2
    },
    [`&.${filledInputClasses.disabled}`]: {
      backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
    }
  }, !ownerState.disableUnderline && {
    "&::after": {
      borderBottom: `2px solid ${(_palette = (theme.vars || theme).palette[ownerState.color || "primary"]) == null ? void 0 : _palette.main}`,
      left: 0,
      bottom: 0,
      // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
      content: '""',
      position: "absolute",
      right: 0,
      transform: "scaleX(0)",
      transition: theme.transitions.create("transform", {
        duration: theme.transitions.duration.shorter,
        easing: theme.transitions.easing.easeOut
      }),
      pointerEvents: "none"
      // Transparent to the hover style.
    },
    [`&.${filledInputClasses.focused}:after`]: {
      // translateX(0) is a workaround for Safari transform scale bug
      // See https://github.com/mui/material-ui/issues/31766
      transform: "scaleX(1) translateX(0)"
    },
    [`&.${filledInputClasses.error}`]: {
      "&::before, &::after": {
        borderBottomColor: (theme.vars || theme).palette.error.main
      }
    },
    "&::before": {
      borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
      left: 0,
      bottom: 0,
      // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
      content: '"\\00a0"',
      position: "absolute",
      right: 0,
      transition: theme.transitions.create("border-bottom-color", {
        duration: theme.transitions.duration.shorter
      }),
      pointerEvents: "none"
      // Transparent to the hover style.
    },
    [`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]: {
      borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
    },
    [`&.${filledInputClasses.disabled}:before`]: {
      borderBottomStyle: "dotted"
    }
  }, ownerState.startAdornment && {
    paddingLeft: 12
  }, ownerState.endAdornment && {
    paddingRight: 12
  }, ownerState.multiline && _extends$1({
    padding: "25px 12px 8px"
  }, ownerState.size === "small" && {
    paddingTop: 21,
    paddingBottom: 4
  }, ownerState.hiddenLabel && {
    paddingTop: 16,
    paddingBottom: 17
  }, ownerState.hiddenLabel && ownerState.size === "small" && {
    paddingTop: 8,
    paddingBottom: 9
  }));
});
const FilledInputInput = styled(InputBaseComponent, {
  name: "MuiFilledInput",
  slot: "Input",
  overridesResolver: inputOverridesResolver
})(({
  theme,
  ownerState
}) => _extends$1({
  paddingTop: 25,
  paddingRight: 12,
  paddingBottom: 8,
  paddingLeft: 12
}, !theme.vars && {
  "&:-webkit-autofill": {
    WebkitBoxShadow: theme.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
    WebkitTextFillColor: theme.palette.mode === "light" ? null : "#fff",
    caretColor: theme.palette.mode === "light" ? null : "#fff",
    borderTopLeftRadius: "inherit",
    borderTopRightRadius: "inherit"
  }
}, theme.vars && {
  "&:-webkit-autofill": {
    borderTopLeftRadius: "inherit",
    borderTopRightRadius: "inherit"
  },
  [theme.getColorSchemeSelector("dark")]: {
    "&:-webkit-autofill": {
      WebkitBoxShadow: "0 0 0 100px #266798 inset",
      WebkitTextFillColor: "#fff",
      caretColor: "#fff"
    }
  }
}, ownerState.size === "small" && {
  paddingTop: 21,
  paddingBottom: 4
}, ownerState.hiddenLabel && {
  paddingTop: 16,
  paddingBottom: 17
}, ownerState.startAdornment && {
  paddingLeft: 0
}, ownerState.endAdornment && {
  paddingRight: 0
}, ownerState.hiddenLabel && ownerState.size === "small" && {
  paddingTop: 8,
  paddingBottom: 9
}, ownerState.multiline && {
  paddingTop: 0,
  paddingBottom: 0,
  paddingLeft: 0,
  paddingRight: 0
}));
const FilledInput = /* @__PURE__ */ reactExports.forwardRef(function FilledInput2(inProps, ref2) {
  var _ref, _slots$root, _ref2, _slots$input;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiFilledInput"
  });
  const {
    components = {},
    componentsProps: componentsPropsProp,
    fullWidth = false,
    // declare here to prevent spreading to DOM
    inputComponent = "input",
    multiline = false,
    slotProps,
    slots = {},
    type: type2 = "text"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$X);
  const ownerState = _extends$1({}, props, {
    fullWidth,
    inputComponent,
    multiline,
    type: type2
  });
  const classes = useUtilityClasses$Q(props);
  const filledInputComponentsProps = {
    root: {
      ownerState
    },
    input: {
      ownerState
    }
  };
  const componentsProps = (slotProps != null ? slotProps : componentsPropsProp) ? deepmerge$1(filledInputComponentsProps, slotProps != null ? slotProps : componentsPropsProp) : filledInputComponentsProps;
  const RootSlot = (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : FilledInputRoot;
  const InputSlot = (_ref2 = (_slots$input = slots.input) != null ? _slots$input : components.Input) != null ? _ref2 : FilledInputInput;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(InputBase, _extends$1({
    slots: {
      root: RootSlot,
      input: InputSlot
    },
    componentsProps,
    fullWidth,
    inputComponent,
    multiline,
    ref: ref2,
    type: type2
  }, other, {
    classes
  }));
});
FilledInput.muiName = "Input";
function getFormControlUtilityClasses(slot) {
  return generateUtilityClass("MuiFormControl", slot);
}
generateUtilityClasses("MuiFormControl", ["root", "marginNone", "marginNormal", "marginDense", "fullWidth", "disabled"]);
const _excluded$W = ["children", "className", "color", "component", "disabled", "error", "focused", "fullWidth", "hiddenLabel", "margin", "required", "size", "variant"];
const useUtilityClasses$P = (ownerState) => {
  const {
    classes,
    margin: margin2,
    fullWidth
  } = ownerState;
  const slots = {
    root: ["root", margin2 !== "none" && `margin${capitalize$2(margin2)}`, fullWidth && "fullWidth"]
  };
  return composeClasses(slots, getFormControlUtilityClasses, classes);
};
const FormControlRoot = styled("div", {
  name: "MuiFormControl",
  slot: "Root",
  overridesResolver: ({
    ownerState
  }, styles2) => {
    return _extends$1({}, styles2.root, styles2[`margin${capitalize$2(ownerState.margin)}`], ownerState.fullWidth && styles2.fullWidth);
  }
})(({
  ownerState
}) => _extends$1({
  display: "inline-flex",
  flexDirection: "column",
  position: "relative",
  // Reset fieldset default style.
  minWidth: 0,
  padding: 0,
  margin: 0,
  border: 0,
  verticalAlign: "top"
}, ownerState.margin === "normal" && {
  marginTop: 16,
  marginBottom: 8
}, ownerState.margin === "dense" && {
  marginTop: 8,
  marginBottom: 4
}, ownerState.fullWidth && {
  width: "100%"
}));
const FormControl = /* @__PURE__ */ reactExports.forwardRef(function FormControl2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiFormControl"
  });
  const {
    children,
    className,
    color: color2 = "primary",
    component = "div",
    disabled = false,
    error = false,
    focused: visuallyFocused,
    fullWidth = false,
    hiddenLabel = false,
    margin: margin2 = "none",
    required = false,
    size = "medium",
    variant: variant2 = "outlined"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$W);
  const ownerState = _extends$1({}, props, {
    color: color2,
    component,
    disabled,
    error,
    fullWidth,
    hiddenLabel,
    margin: margin2,
    required,
    size,
    variant: variant2
  });
  const classes = useUtilityClasses$P(ownerState);
  const [adornedStart, setAdornedStart] = reactExports.useState(() => {
    let initialAdornedStart = false;
    if (children) {
      reactExports.Children.forEach(children, (child) => {
        if (!isMuiElement(child, ["Input", "Select"])) {
          return;
        }
        const input = isMuiElement(child, ["Select"]) ? child.props.input : child;
        if (input && isAdornedStart(input.props)) {
          initialAdornedStart = true;
        }
      });
    }
    return initialAdornedStart;
  });
  const [filled, setFilled] = reactExports.useState(() => {
    let initialFilled = false;
    if (children) {
      reactExports.Children.forEach(children, (child) => {
        if (!isMuiElement(child, ["Input", "Select"])) {
          return;
        }
        if (isFilled(child.props, true) || isFilled(child.props.inputProps, true)) {
          initialFilled = true;
        }
      });
    }
    return initialFilled;
  });
  const [focusedState, setFocused] = reactExports.useState(false);
  if (disabled && focusedState) {
    setFocused(false);
  }
  const focused = visuallyFocused !== void 0 && !disabled ? visuallyFocused : focusedState;
  let registerEffect;
  const childContext = reactExports.useMemo(() => {
    return {
      adornedStart,
      setAdornedStart,
      color: color2,
      disabled,
      error,
      filled,
      focused,
      fullWidth,
      hiddenLabel,
      size,
      onBlur: () => {
        setFocused(false);
      },
      onEmpty: () => {
        setFilled(false);
      },
      onFilled: () => {
        setFilled(true);
      },
      onFocus: () => {
        setFocused(true);
      },
      registerEffect,
      required,
      variant: variant2
    };
  }, [adornedStart, color2, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant2]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlContext.Provider, {
    value: childContext,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlRoot, _extends$1({
      as: component,
      ownerState,
      className: clsx$3(classes.root, className),
      ref: ref2
    }, other, {
      children
    }))
  });
});
const Stack = createStack({
  createStyledComponent: styled("div", {
    name: "MuiStack",
    slot: "Root",
    overridesResolver: (props, styles2) => styles2.root
  }),
  useThemeProps: (inProps) => useDefaultProps({
    props: inProps,
    name: "MuiStack"
  })
});
function getFormControlLabelUtilityClasses(slot) {
  return generateUtilityClass("MuiFormControlLabel", slot);
}
const formControlLabelClasses = generateUtilityClasses("MuiFormControlLabel", ["root", "labelPlacementStart", "labelPlacementTop", "labelPlacementBottom", "disabled", "label", "error", "required", "asterisk"]);
const _excluded$V = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"];
const useUtilityClasses$O = (ownerState) => {
  const {
    classes,
    disabled,
    labelPlacement,
    error,
    required
  } = ownerState;
  const slots = {
    root: ["root", disabled && "disabled", `labelPlacement${capitalize$2(labelPlacement)}`, error && "error", required && "required"],
    label: ["label", disabled && "disabled"],
    asterisk: ["asterisk", error && "error"]
  };
  return composeClasses(slots, getFormControlLabelUtilityClasses, classes);
};
const FormControlLabelRoot = styled("label", {
  name: "MuiFormControlLabel",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [{
      [`& .${formControlLabelClasses.label}`]: styles2.label
    }, styles2.root, styles2[`labelPlacement${capitalize$2(ownerState.labelPlacement)}`]];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  display: "inline-flex",
  alignItems: "center",
  cursor: "pointer",
  // For correct alignment with the text.
  verticalAlign: "middle",
  WebkitTapHighlightColor: "transparent",
  marginLeft: -11,
  marginRight: 16,
  // used for row presentation of radio/checkbox
  [`&.${formControlLabelClasses.disabled}`]: {
    cursor: "default"
  }
}, ownerState.labelPlacement === "start" && {
  flexDirection: "row-reverse",
  marginLeft: 16,
  // used for row presentation of radio/checkbox
  marginRight: -11
}, ownerState.labelPlacement === "top" && {
  flexDirection: "column-reverse",
  marginLeft: 16
}, ownerState.labelPlacement === "bottom" && {
  flexDirection: "column",
  marginLeft: 16
}, {
  [`& .${formControlLabelClasses.label}`]: {
    [`&.${formControlLabelClasses.disabled}`]: {
      color: (theme.vars || theme).palette.text.disabled
    }
  }
}));
const AsteriskComponent$1 = styled("span", {
  name: "MuiFormControlLabel",
  slot: "Asterisk",
  overridesResolver: (props, styles2) => styles2.asterisk
})(({
  theme
}) => ({
  [`&.${formControlLabelClasses.error}`]: {
    color: (theme.vars || theme).palette.error.main
  }
}));
const FormControlLabel = /* @__PURE__ */ reactExports.forwardRef(function FormControlLabel2(inProps, ref2) {
  var _ref, _slotProps$typography;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiFormControlLabel"
  });
  const {
    className,
    componentsProps = {},
    control,
    disabled: disabledProp,
    disableTypography,
    label: labelProp,
    labelPlacement = "end",
    required: requiredProp,
    slotProps = {}
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$V);
  const muiFormControl = useFormControl();
  const disabled = (_ref = disabledProp != null ? disabledProp : control.props.disabled) != null ? _ref : muiFormControl == null ? void 0 : muiFormControl.disabled;
  const required = requiredProp != null ? requiredProp : control.props.required;
  const controlProps = {
    disabled,
    required
  };
  ["checked", "name", "onChange", "value", "inputRef"].forEach((key) => {
    if (typeof control.props[key] === "undefined" && typeof props[key] !== "undefined") {
      controlProps[key] = props[key];
    }
  });
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["error"]
  });
  const ownerState = _extends$1({}, props, {
    disabled,
    labelPlacement,
    required,
    error: fcs.error
  });
  const classes = useUtilityClasses$O(ownerState);
  const typographySlotProps = (_slotProps$typography = slotProps.typography) != null ? _slotProps$typography : componentsProps.typography;
  let label = labelProp;
  if (label != null && label.type !== Typography && !disableTypography) {
    label = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, _extends$1({
      component: "span"
    }, typographySlotProps, {
      className: clsx$3(classes.label, typographySlotProps == null ? void 0 : typographySlotProps.className),
      children: label
    }));
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControlLabelRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other, {
    children: [/* @__PURE__ */ reactExports.cloneElement(control, controlProps), required ? /* @__PURE__ */ jsxRuntimeExports.jsxs(Stack, {
      display: "block",
      children: [label, /* @__PURE__ */ jsxRuntimeExports.jsxs(AsteriskComponent$1, {
        ownerState,
        "aria-hidden": true,
        className: classes.asterisk,
        children: [" ", "*"]
      })]
    }) : label]
  }));
});
function getFormGroupUtilityClass(slot) {
  return generateUtilityClass("MuiFormGroup", slot);
}
generateUtilityClasses("MuiFormGroup", ["root", "row", "error"]);
const _excluded$U = ["className", "row"];
const useUtilityClasses$N = (ownerState) => {
  const {
    classes,
    row,
    error
  } = ownerState;
  const slots = {
    root: ["root", row && "row", error && "error"]
  };
  return composeClasses(slots, getFormGroupUtilityClass, classes);
};
const FormGroupRoot = styled("div", {
  name: "MuiFormGroup",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.row && styles2.row];
  }
})(({
  ownerState
}) => _extends$1({
  display: "flex",
  flexDirection: "column",
  flexWrap: "wrap"
}, ownerState.row && {
  flexDirection: "row"
}));
const FormGroup = /* @__PURE__ */ reactExports.forwardRef(function FormGroup2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiFormGroup"
  });
  const {
    className,
    row = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$U);
  const muiFormControl = useFormControl();
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["error"]
  });
  const ownerState = _extends$1({}, props, {
    row,
    error: fcs.error
  });
  const classes = useUtilityClasses$N(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormGroupRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other));
});
function getFormHelperTextUtilityClasses(slot) {
  return generateUtilityClass("MuiFormHelperText", slot);
}
const formHelperTextClasses = generateUtilityClasses("MuiFormHelperText", ["root", "error", "disabled", "sizeSmall", "sizeMedium", "contained", "focused", "filled", "required"]);
var _span$3;
const _excluded$T = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"];
const useUtilityClasses$M = (ownerState) => {
  const {
    classes,
    contained,
    size,
    disabled,
    error,
    filled,
    focused,
    required
  } = ownerState;
  const slots = {
    root: ["root", disabled && "disabled", error && "error", size && `size${capitalize$2(size)}`, contained && "contained", focused && "focused", filled && "filled", required && "required"]
  };
  return composeClasses(slots, getFormHelperTextUtilityClasses, classes);
};
const FormHelperTextRoot = styled("p", {
  name: "MuiFormHelperText",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.size && styles2[`size${capitalize$2(ownerState.size)}`], ownerState.contained && styles2.contained, ownerState.filled && styles2.filled];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  color: (theme.vars || theme).palette.text.secondary
}, theme.typography.caption, {
  textAlign: "left",
  marginTop: 3,
  marginRight: 0,
  marginBottom: 0,
  marginLeft: 0,
  [`&.${formHelperTextClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.disabled
  },
  [`&.${formHelperTextClasses.error}`]: {
    color: (theme.vars || theme).palette.error.main
  }
}, ownerState.size === "small" && {
  marginTop: 4
}, ownerState.contained && {
  marginLeft: 14,
  marginRight: 14
}));
const FormHelperText = /* @__PURE__ */ reactExports.forwardRef(function FormHelperText2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiFormHelperText"
  });
  const {
    children,
    className,
    component = "p"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$T);
  const muiFormControl = useFormControl();
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["variant", "size", "disabled", "error", "filled", "focused", "required"]
  });
  const ownerState = _extends$1({}, props, {
    component,
    contained: fcs.variant === "filled" || fcs.variant === "outlined",
    variant: fcs.variant,
    size: fcs.size,
    disabled: fcs.disabled,
    error: fcs.error,
    filled: fcs.filled,
    focused: fcs.focused,
    required: fcs.required
  });
  const classes = useUtilityClasses$M(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormHelperTextRoot, _extends$1({
    as: component,
    ownerState,
    className: clsx$3(classes.root, className),
    ref: ref2
  }, other, {
    children: children === " " ? (
      // notranslate needed while Google Translate will not fix zero-width space issue
      _span$3 || (_span$3 = /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
        className: "notranslate",
        children: "​"
      }))
    ) : children
  }));
});
function getFormLabelUtilityClasses(slot) {
  return generateUtilityClass("MuiFormLabel", slot);
}
const formLabelClasses = generateUtilityClasses("MuiFormLabel", ["root", "colorSecondary", "focused", "disabled", "error", "filled", "required", "asterisk"]);
const _excluded$S = ["children", "className", "color", "component", "disabled", "error", "filled", "focused", "required"];
const useUtilityClasses$L = (ownerState) => {
  const {
    classes,
    color: color2,
    focused,
    disabled,
    error,
    filled,
    required
  } = ownerState;
  const slots = {
    root: ["root", `color${capitalize$2(color2)}`, disabled && "disabled", error && "error", filled && "filled", focused && "focused", required && "required"],
    asterisk: ["asterisk", error && "error"]
  };
  return composeClasses(slots, getFormLabelUtilityClasses, classes);
};
const FormLabelRoot = styled("label", {
  name: "MuiFormLabel",
  slot: "Root",
  overridesResolver: ({
    ownerState
  }, styles2) => {
    return _extends$1({}, styles2.root, ownerState.color === "secondary" && styles2.colorSecondary, ownerState.filled && styles2.filled);
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  color: (theme.vars || theme).palette.text.secondary
}, theme.typography.body1, {
  lineHeight: "1.4375em",
  padding: 0,
  position: "relative",
  [`&.${formLabelClasses.focused}`]: {
    color: (theme.vars || theme).palette[ownerState.color].main
  },
  [`&.${formLabelClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.disabled
  },
  [`&.${formLabelClasses.error}`]: {
    color: (theme.vars || theme).palette.error.main
  }
}));
const AsteriskComponent = styled("span", {
  name: "MuiFormLabel",
  slot: "Asterisk",
  overridesResolver: (props, styles2) => styles2.asterisk
})(({
  theme
}) => ({
  [`&.${formLabelClasses.error}`]: {
    color: (theme.vars || theme).palette.error.main
  }
}));
const FormLabel = /* @__PURE__ */ reactExports.forwardRef(function FormLabel2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiFormLabel"
  });
  const {
    children,
    className,
    component = "label"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$S);
  const muiFormControl = useFormControl();
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["color", "required", "focused", "disabled", "error", "filled"]
  });
  const ownerState = _extends$1({}, props, {
    color: fcs.color || "primary",
    component,
    disabled: fcs.disabled,
    error: fcs.error,
    filled: fcs.filled,
    focused: fcs.focused,
    required: fcs.required
  });
  const classes = useUtilityClasses$L(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(FormLabelRoot, _extends$1({
    as: component,
    ownerState,
    className: clsx$3(classes.root, className),
    ref: ref2
  }, other, {
    children: [children, fcs.required && /* @__PURE__ */ jsxRuntimeExports.jsxs(AsteriskComponent, {
      ownerState,
      "aria-hidden": true,
      className: classes.asterisk,
      children: [" ", "*"]
    })]
  }));
});
const GridContext = /* @__PURE__ */ reactExports.createContext();
function getGridUtilityClass(slot) {
  return generateUtilityClass("MuiGrid", slot);
}
const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
const DIRECTIONS = ["column-reverse", "column", "row-reverse", "row"];
const WRAPS = ["nowrap", "wrap-reverse", "wrap"];
const GRID_SIZES = ["auto", true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
const gridClasses = generateUtilityClasses("MuiGrid", [
  "root",
  "container",
  "item",
  "zeroMinWidth",
  // spacings
  ...SPACINGS.map((spacing) => `spacing-xs-${spacing}`),
  // direction values
  ...DIRECTIONS.map((direction2) => `direction-xs-${direction2}`),
  // wrap values
  ...WRAPS.map((wrap2) => `wrap-xs-${wrap2}`),
  // grid sizes for all breakpoints
  ...GRID_SIZES.map((size) => `grid-xs-${size}`),
  ...GRID_SIZES.map((size) => `grid-sm-${size}`),
  ...GRID_SIZES.map((size) => `grid-md-${size}`),
  ...GRID_SIZES.map((size) => `grid-lg-${size}`),
  ...GRID_SIZES.map((size) => `grid-xl-${size}`)
]);
const _excluded$R = ["className", "columns", "columnSpacing", "component", "container", "direction", "item", "rowSpacing", "spacing", "wrap", "zeroMinWidth"];
function getOffset(val) {
  const parse2 = parseFloat(val);
  return `${parse2}${String(val).replace(String(parse2), "") || "px"}`;
}
function generateGrid({
  theme,
  ownerState
}) {
  let size;
  return theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {
    let styles2 = {};
    if (ownerState[breakpoint]) {
      size = ownerState[breakpoint];
    }
    if (!size) {
      return globalStyles;
    }
    if (size === true) {
      styles2 = {
        flexBasis: 0,
        flexGrow: 1,
        maxWidth: "100%"
      };
    } else if (size === "auto") {
      styles2 = {
        flexBasis: "auto",
        flexGrow: 0,
        flexShrink: 0,
        maxWidth: "none",
        width: "auto"
      };
    } else {
      const columnsBreakpointValues = resolveBreakpointValues({
        values: ownerState.columns,
        breakpoints: theme.breakpoints.values
      });
      const columnValue = typeof columnsBreakpointValues === "object" ? columnsBreakpointValues[breakpoint] : columnsBreakpointValues;
      if (columnValue === void 0 || columnValue === null) {
        return globalStyles;
      }
      const width2 = `${Math.round(size / columnValue * 1e8) / 1e6}%`;
      let more = {};
      if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {
        const themeSpacing = theme.spacing(ownerState.columnSpacing);
        if (themeSpacing !== "0px") {
          const fullWidth = `calc(${width2} + ${getOffset(themeSpacing)})`;
          more = {
            flexBasis: fullWidth,
            maxWidth: fullWidth
          };
        }
      }
      styles2 = _extends$1({
        flexBasis: width2,
        flexGrow: 0,
        maxWidth: width2
      }, more);
    }
    if (theme.breakpoints.values[breakpoint] === 0) {
      Object.assign(globalStyles, styles2);
    } else {
      globalStyles[theme.breakpoints.up(breakpoint)] = styles2;
    }
    return globalStyles;
  }, {});
}
function generateDirection({
  theme,
  ownerState
}) {
  const directionValues = resolveBreakpointValues({
    values: ownerState.direction,
    breakpoints: theme.breakpoints.values
  });
  return handleBreakpoints({
    theme
  }, directionValues, (propValue) => {
    const output = {
      flexDirection: propValue
    };
    if (propValue.indexOf("column") === 0) {
      output[`& > .${gridClasses.item}`] = {
        maxWidth: "none"
      };
    }
    return output;
  });
}
function extractZeroValueBreakpointKeys({
  breakpoints,
  values: values2
}) {
  let nonZeroKey = "";
  Object.keys(values2).forEach((key) => {
    if (nonZeroKey !== "") {
      return;
    }
    if (values2[key] !== 0) {
      nonZeroKey = key;
    }
  });
  const sortedBreakpointKeysByValue = Object.keys(breakpoints).sort((a2, b2) => {
    return breakpoints[a2] - breakpoints[b2];
  });
  return sortedBreakpointKeysByValue.slice(0, sortedBreakpointKeysByValue.indexOf(nonZeroKey));
}
function generateRowGap({
  theme,
  ownerState
}) {
  const {
    container,
    rowSpacing
  } = ownerState;
  let styles2 = {};
  if (container && rowSpacing !== 0) {
    const rowSpacingValues = resolveBreakpointValues({
      values: rowSpacing,
      breakpoints: theme.breakpoints.values
    });
    let zeroValueBreakpointKeys;
    if (typeof rowSpacingValues === "object") {
      zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
        breakpoints: theme.breakpoints.values,
        values: rowSpacingValues
      });
    }
    styles2 = handleBreakpoints({
      theme
    }, rowSpacingValues, (propValue, breakpoint) => {
      var _zeroValueBreakpointK;
      const themeSpacing = theme.spacing(propValue);
      if (themeSpacing !== "0px") {
        return {
          marginTop: `-${getOffset(themeSpacing)}`,
          [`& > .${gridClasses.item}`]: {
            paddingTop: getOffset(themeSpacing)
          }
        };
      }
      if ((_zeroValueBreakpointK = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK.includes(breakpoint)) {
        return {};
      }
      return {
        marginTop: 0,
        [`& > .${gridClasses.item}`]: {
          paddingTop: 0
        }
      };
    });
  }
  return styles2;
}
function generateColumnGap({
  theme,
  ownerState
}) {
  const {
    container,
    columnSpacing
  } = ownerState;
  let styles2 = {};
  if (container && columnSpacing !== 0) {
    const columnSpacingValues = resolveBreakpointValues({
      values: columnSpacing,
      breakpoints: theme.breakpoints.values
    });
    let zeroValueBreakpointKeys;
    if (typeof columnSpacingValues === "object") {
      zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
        breakpoints: theme.breakpoints.values,
        values: columnSpacingValues
      });
    }
    styles2 = handleBreakpoints({
      theme
    }, columnSpacingValues, (propValue, breakpoint) => {
      var _zeroValueBreakpointK2;
      const themeSpacing = theme.spacing(propValue);
      if (themeSpacing !== "0px") {
        return {
          width: `calc(100% + ${getOffset(themeSpacing)})`,
          marginLeft: `-${getOffset(themeSpacing)}`,
          [`& > .${gridClasses.item}`]: {
            paddingLeft: getOffset(themeSpacing)
          }
        };
      }
      if ((_zeroValueBreakpointK2 = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK2.includes(breakpoint)) {
        return {};
      }
      return {
        width: "100%",
        marginLeft: 0,
        [`& > .${gridClasses.item}`]: {
          paddingLeft: 0
        }
      };
    });
  }
  return styles2;
}
function resolveSpacingStyles(spacing, breakpoints, styles2 = {}) {
  if (!spacing || spacing <= 0) {
    return [];
  }
  if (typeof spacing === "string" && !Number.isNaN(Number(spacing)) || typeof spacing === "number") {
    return [styles2[`spacing-xs-${String(spacing)}`]];
  }
  const spacingStyles = [];
  breakpoints.forEach((breakpoint) => {
    const value = spacing[breakpoint];
    if (Number(value) > 0) {
      spacingStyles.push(styles2[`spacing-${breakpoint}-${String(value)}`]);
    }
  });
  return spacingStyles;
}
const GridRoot = styled("div", {
  name: "MuiGrid",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    const {
      container,
      direction: direction2,
      item,
      spacing,
      wrap: wrap2,
      zeroMinWidth,
      breakpoints
    } = ownerState;
    let spacingStyles = [];
    if (container) {
      spacingStyles = resolveSpacingStyles(spacing, breakpoints, styles2);
    }
    const breakpointsStyles = [];
    breakpoints.forEach((breakpoint) => {
      const value = ownerState[breakpoint];
      if (value) {
        breakpointsStyles.push(styles2[`grid-${breakpoint}-${String(value)}`]);
      }
    });
    return [styles2.root, container && styles2.container, item && styles2.item, zeroMinWidth && styles2.zeroMinWidth, ...spacingStyles, direction2 !== "row" && styles2[`direction-xs-${String(direction2)}`], wrap2 !== "wrap" && styles2[`wrap-xs-${String(wrap2)}`], ...breakpointsStyles];
  }
})(({
  ownerState
}) => _extends$1({
  boxSizing: "border-box"
}, ownerState.container && {
  display: "flex",
  flexWrap: "wrap",
  width: "100%"
}, ownerState.item && {
  margin: 0
  // For instance, it's useful when used with a `figure` element.
}, ownerState.zeroMinWidth && {
  minWidth: 0
}, ownerState.wrap !== "wrap" && {
  flexWrap: ownerState.wrap
}), generateDirection, generateRowGap, generateColumnGap, generateGrid);
function resolveSpacingClasses(spacing, breakpoints) {
  if (!spacing || spacing <= 0) {
    return [];
  }
  if (typeof spacing === "string" && !Number.isNaN(Number(spacing)) || typeof spacing === "number") {
    return [`spacing-xs-${String(spacing)}`];
  }
  const classes = [];
  breakpoints.forEach((breakpoint) => {
    const value = spacing[breakpoint];
    if (Number(value) > 0) {
      const className = `spacing-${breakpoint}-${String(value)}`;
      classes.push(className);
    }
  });
  return classes;
}
const useUtilityClasses$K = (ownerState) => {
  const {
    classes,
    container,
    direction: direction2,
    item,
    spacing,
    wrap: wrap2,
    zeroMinWidth,
    breakpoints
  } = ownerState;
  let spacingClasses = [];
  if (container) {
    spacingClasses = resolveSpacingClasses(spacing, breakpoints);
  }
  const breakpointsClasses = [];
  breakpoints.forEach((breakpoint) => {
    const value = ownerState[breakpoint];
    if (value) {
      breakpointsClasses.push(`grid-${breakpoint}-${String(value)}`);
    }
  });
  const slots = {
    root: ["root", container && "container", item && "item", zeroMinWidth && "zeroMinWidth", ...spacingClasses, direction2 !== "row" && `direction-xs-${String(direction2)}`, wrap2 !== "wrap" && `wrap-xs-${String(wrap2)}`, ...breakpointsClasses]
  };
  return composeClasses(slots, getGridUtilityClass, classes);
};
const Grid$1 = /* @__PURE__ */ reactExports.forwardRef(function Grid2(inProps, ref2) {
  const themeProps = useDefaultProps({
    props: inProps,
    name: "MuiGrid"
  });
  const {
    breakpoints
  } = useTheme$1();
  const props = extendSxProp(themeProps);
  const {
    className,
    columns: columnsProp,
    columnSpacing: columnSpacingProp,
    component = "div",
    container = false,
    direction: direction2 = "row",
    item = false,
    rowSpacing: rowSpacingProp,
    spacing = 0,
    wrap: wrap2 = "wrap",
    zeroMinWidth = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$R);
  const rowSpacing = rowSpacingProp || spacing;
  const columnSpacing = columnSpacingProp || spacing;
  const columnsContext = reactExports.useContext(GridContext);
  const columns = container ? columnsProp || 12 : columnsContext;
  const breakpointsValues = {};
  const otherFiltered = _extends$1({}, other);
  breakpoints.keys.forEach((breakpoint) => {
    if (other[breakpoint] != null) {
      breakpointsValues[breakpoint] = other[breakpoint];
      delete otherFiltered[breakpoint];
    }
  });
  const ownerState = _extends$1({}, props, {
    columns,
    container,
    direction: direction2,
    item,
    rowSpacing,
    columnSpacing,
    wrap: wrap2,
    zeroMinWidth,
    spacing
  }, breakpointsValues, {
    breakpoints: breakpoints.keys
  });
  const classes = useUtilityClasses$K(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(GridContext.Provider, {
    value: columns,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(GridRoot, _extends$1({
      ownerState,
      className: clsx$3(classes.root, className),
      as: component,
      ref: ref2
    }, otherFiltered))
  });
});
const Grid22 = createGrid$1({
  createStyledComponent: styled("div", {
    name: "MuiGrid2",
    slot: "Root",
    overridesResolver: (props, styles2) => styles2.root
  }),
  componentName: "MuiGrid2",
  useThemeProps: (inProps) => useDefaultProps({
    props: inProps,
    name: "MuiGrid2"
  })
});
const _excluded$Q = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
function getScale(value) {
  return `scale(${value}, ${value ** 2})`;
}
const styles$8 = {
  entering: {
    opacity: 1,
    transform: getScale(1)
  },
  entered: {
    opacity: 1,
    transform: "none"
  }
};
const isWebKit154 = typeof navigator !== "undefined" && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\/)15(.|_)4/i.test(navigator.userAgent);
const Grow = /* @__PURE__ */ reactExports.forwardRef(function Grow2(props, ref2) {
  const {
    addEndListener,
    appear = true,
    children,
    easing: easing2,
    in: inProp,
    onEnter,
    onEntered,
    onEntering,
    onExit,
    onExited,
    onExiting,
    style: style2,
    timeout = "auto",
    // eslint-disable-next-line react/prop-types
    TransitionComponent = Transition$4
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$Q);
  const timer2 = useTimeout();
  const autoTimeout = reactExports.useRef();
  const theme = useTheme$1();
  const nodeRef = reactExports.useRef(null);
  const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref2);
  const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
    if (callback) {
      const node2 = nodeRef.current;
      if (maybeIsAppearing === void 0) {
        callback(node2);
      } else {
        callback(node2, maybeIsAppearing);
      }
    }
  };
  const handleEntering = normalizedTransitionCallback(onEntering);
  const handleEnter = normalizedTransitionCallback((node2, isAppearing) => {
    reflow(node2);
    const {
      duration: transitionDuration,
      delay,
      easing: transitionTimingFunction
    } = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "enter"
    });
    let duration2;
    if (timeout === "auto") {
      duration2 = theme.transitions.getAutoHeightDuration(node2.clientHeight);
      autoTimeout.current = duration2;
    } else {
      duration2 = transitionDuration;
    }
    node2.style.transition = [theme.transitions.create("opacity", {
      duration: duration2,
      delay
    }), theme.transitions.create("transform", {
      duration: isWebKit154 ? duration2 : duration2 * 0.666,
      delay,
      easing: transitionTimingFunction
    })].join(",");
    if (onEnter) {
      onEnter(node2, isAppearing);
    }
  });
  const handleEntered = normalizedTransitionCallback(onEntered);
  const handleExiting = normalizedTransitionCallback(onExiting);
  const handleExit = normalizedTransitionCallback((node2) => {
    const {
      duration: transitionDuration,
      delay,
      easing: transitionTimingFunction
    } = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "exit"
    });
    let duration2;
    if (timeout === "auto") {
      duration2 = theme.transitions.getAutoHeightDuration(node2.clientHeight);
      autoTimeout.current = duration2;
    } else {
      duration2 = transitionDuration;
    }
    node2.style.transition = [theme.transitions.create("opacity", {
      duration: duration2,
      delay
    }), theme.transitions.create("transform", {
      duration: isWebKit154 ? duration2 : duration2 * 0.666,
      delay: isWebKit154 ? delay : delay || duration2 * 0.333,
      easing: transitionTimingFunction
    })].join(",");
    node2.style.opacity = 0;
    node2.style.transform = getScale(0.75);
    if (onExit) {
      onExit(node2);
    }
  });
  const handleExited = normalizedTransitionCallback(onExited);
  const handleAddEndListener = (next2) => {
    if (timeout === "auto") {
      timer2.start(autoTimeout.current || 0, next2);
    }
    if (addEndListener) {
      addEndListener(nodeRef.current, next2);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
    appear,
    in: inProp,
    nodeRef,
    onEnter: handleEnter,
    onEntered: handleEntered,
    onEntering: handleEntering,
    onExit: handleExit,
    onExited: handleExited,
    onExiting: handleExiting,
    addEndListener: handleAddEndListener,
    timeout: timeout === "auto" ? null : timeout
  }, other, {
    children: (state, childProps) => {
      return /* @__PURE__ */ reactExports.cloneElement(children, _extends$1({
        style: _extends$1({
          opacity: 0,
          transform: getScale(0.75),
          visibility: state === "exited" && !inProp ? "hidden" : void 0
        }, styles$8[state], style2, children.props.style),
        ref: handleRef
      }, childProps));
    }
  }));
});
Grow.muiSupportAuto = true;
const _excluded$P = ["disableUnderline", "components", "componentsProps", "fullWidth", "inputComponent", "multiline", "slotProps", "slots", "type"];
const useUtilityClasses$J = (ownerState) => {
  const {
    classes,
    disableUnderline
  } = ownerState;
  const slots = {
    root: ["root", !disableUnderline && "underline"],
    input: ["input"]
  };
  const composedClasses = composeClasses(slots, getInputUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const InputRoot = styled(InputBaseRoot, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiInput",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [...rootOverridesResolver(props, styles2), !ownerState.disableUnderline && styles2.underline];
  }
})(({
  theme,
  ownerState
}) => {
  const light2 = theme.palette.mode === "light";
  let bottomLineColor = light2 ? "rgba(0, 0, 0, 0.42)" : "rgba(255, 255, 255, 0.7)";
  if (theme.vars) {
    bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;
  }
  return _extends$1({
    position: "relative"
  }, ownerState.formControl && {
    "label + &": {
      marginTop: 16
    }
  }, !ownerState.disableUnderline && {
    "&::after": {
      borderBottom: `2px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
      left: 0,
      bottom: 0,
      // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
      content: '""',
      position: "absolute",
      right: 0,
      transform: "scaleX(0)",
      transition: theme.transitions.create("transform", {
        duration: theme.transitions.duration.shorter,
        easing: theme.transitions.easing.easeOut
      }),
      pointerEvents: "none"
      // Transparent to the hover style.
    },
    [`&.${inputClasses.focused}:after`]: {
      // translateX(0) is a workaround for Safari transform scale bug
      // See https://github.com/mui/material-ui/issues/31766
      transform: "scaleX(1) translateX(0)"
    },
    [`&.${inputClasses.error}`]: {
      "&::before, &::after": {
        borderBottomColor: (theme.vars || theme).palette.error.main
      }
    },
    "&::before": {
      borderBottom: `1px solid ${bottomLineColor}`,
      left: 0,
      bottom: 0,
      // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
      content: '"\\00a0"',
      position: "absolute",
      right: 0,
      transition: theme.transitions.create("border-bottom-color", {
        duration: theme.transitions.duration.shorter
      }),
      pointerEvents: "none"
      // Transparent to the hover style.
    },
    [`&:hover:not(.${inputClasses.disabled}, .${inputClasses.error}):before`]: {
      borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        borderBottom: `1px solid ${bottomLineColor}`
      }
    },
    [`&.${inputClasses.disabled}:before`]: {
      borderBottomStyle: "dotted"
    }
  });
});
const InputInput = styled(InputBaseComponent, {
  name: "MuiInput",
  slot: "Input",
  overridesResolver: inputOverridesResolver
})({});
const Input$2 = /* @__PURE__ */ reactExports.forwardRef(function Input2(inProps, ref2) {
  var _ref, _slots$root, _ref2, _slots$input;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiInput"
  });
  const {
    disableUnderline,
    components = {},
    componentsProps: componentsPropsProp,
    fullWidth = false,
    inputComponent = "input",
    multiline = false,
    slotProps,
    slots = {},
    type: type2 = "text"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$P);
  const classes = useUtilityClasses$J(props);
  const ownerState = {
    disableUnderline
  };
  const inputComponentsProps = {
    root: {
      ownerState
    }
  };
  const componentsProps = (slotProps != null ? slotProps : componentsPropsProp) ? deepmerge$1(slotProps != null ? slotProps : componentsPropsProp, inputComponentsProps) : inputComponentsProps;
  const RootSlot = (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : InputRoot;
  const InputSlot = (_ref2 = (_slots$input = slots.input) != null ? _slots$input : components.Input) != null ? _ref2 : InputInput;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(InputBase, _extends$1({
    slots: {
      root: RootSlot,
      input: InputSlot
    },
    slotProps: componentsProps,
    fullWidth,
    inputComponent,
    multiline,
    ref: ref2,
    type: type2
  }, other, {
    classes
  }));
});
Input$2.muiName = "Input";
function getInputAdornmentUtilityClass(slot) {
  return generateUtilityClass("MuiInputAdornment", slot);
}
const inputAdornmentClasses = generateUtilityClasses("MuiInputAdornment", ["root", "filled", "standard", "outlined", "positionStart", "positionEnd", "disablePointerEvents", "hiddenLabel", "sizeSmall"]);
var _span$2;
const _excluded$O = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"];
const overridesResolver$5 = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.root, styles2[`position${capitalize$2(ownerState.position)}`], ownerState.disablePointerEvents === true && styles2.disablePointerEvents, styles2[ownerState.variant]];
};
const useUtilityClasses$I = (ownerState) => {
  const {
    classes,
    disablePointerEvents,
    hiddenLabel,
    position: position2,
    size,
    variant: variant2
  } = ownerState;
  const slots = {
    root: ["root", disablePointerEvents && "disablePointerEvents", position2 && `position${capitalize$2(position2)}`, variant2, hiddenLabel && "hiddenLabel", size && `size${capitalize$2(size)}`]
  };
  return composeClasses(slots, getInputAdornmentUtilityClass, classes);
};
const InputAdornmentRoot = styled("div", {
  name: "MuiInputAdornment",
  slot: "Root",
  overridesResolver: overridesResolver$5
})(({
  theme,
  ownerState
}) => _extends$1({
  display: "flex",
  height: "0.01em",
  // Fix IE11 flexbox alignment. To remove at some point.
  maxHeight: "2em",
  alignItems: "center",
  whiteSpace: "nowrap",
  color: (theme.vars || theme).palette.action.active
}, ownerState.variant === "filled" && {
  // Styles applied to the root element if `variant="filled"`.
  [`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]: {
    marginTop: 16
  }
}, ownerState.position === "start" && {
  // Styles applied to the root element if `position="start"`.
  marginRight: 8
}, ownerState.position === "end" && {
  // Styles applied to the root element if `position="end"`.
  marginLeft: 8
}, ownerState.disablePointerEvents === true && {
  // Styles applied to the root element if `disablePointerEvents={true}`.
  pointerEvents: "none"
}));
const InputAdornment = /* @__PURE__ */ reactExports.forwardRef(function InputAdornment2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiInputAdornment"
  });
  const {
    children,
    className,
    component = "div",
    disablePointerEvents = false,
    disableTypography = false,
    position: position2,
    variant: variantProp
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$O);
  const muiFormControl = useFormControl() || {};
  let variant2 = variantProp;
  if (variantProp && muiFormControl.variant) ;
  if (muiFormControl && !variant2) {
    variant2 = muiFormControl.variant;
  }
  const ownerState = _extends$1({}, props, {
    hiddenLabel: muiFormControl.hiddenLabel,
    size: muiFormControl.size,
    disablePointerEvents,
    position: position2,
    variant: variant2
  });
  const classes = useUtilityClasses$I(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlContext.Provider, {
    value: null,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornmentRoot, _extends$1({
      as: component,
      ownerState,
      className: clsx$3(classes.root, className),
      ref: ref2
    }, other, {
      children: typeof children === "string" && !disableTypography ? /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, {
        color: "text.secondary",
        children
      }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
        children: [position2 === "start" ? (
          /* notranslate needed while Google Translate will not fix zero-width space issue */
          _span$2 || (_span$2 = /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
            className: "notranslate",
            children: "​"
          }))
        ) : null, children]
      })
    }))
  });
});
function getInputLabelUtilityClasses(slot) {
  return generateUtilityClass("MuiInputLabel", slot);
}
const inputLabelClasses = generateUtilityClasses("MuiInputLabel", ["root", "focused", "disabled", "error", "required", "asterisk", "formControl", "sizeSmall", "shrink", "animated", "standard", "filled", "outlined"]);
const _excluded$N = ["disableAnimation", "margin", "shrink", "variant", "className"];
const useUtilityClasses$H = (ownerState) => {
  const {
    classes,
    formControl,
    size,
    shrink,
    disableAnimation,
    variant: variant2,
    required
  } = ownerState;
  const slots = {
    root: ["root", formControl && "formControl", !disableAnimation && "animated", shrink && "shrink", size && size !== "normal" && `size${capitalize$2(size)}`, variant2],
    asterisk: [required && "asterisk"]
  };
  const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
  return _extends$1({}, classes, composedClasses);
};
const InputLabelRoot = styled(FormLabel, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiInputLabel",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [{
      [`& .${formLabelClasses.asterisk}`]: styles2.asterisk
    }, styles2.root, ownerState.formControl && styles2.formControl, ownerState.size === "small" && styles2.sizeSmall, ownerState.shrink && styles2.shrink, !ownerState.disableAnimation && styles2.animated, ownerState.focused && styles2.focused, styles2[ownerState.variant]];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  display: "block",
  transformOrigin: "top left",
  whiteSpace: "nowrap",
  overflow: "hidden",
  textOverflow: "ellipsis",
  maxWidth: "100%"
}, ownerState.formControl && {
  position: "absolute",
  left: 0,
  top: 0,
  // slight alteration to spec spacing to match visual spec result
  transform: "translate(0, 20px) scale(1)"
}, ownerState.size === "small" && {
  // Compensation for the `Input.inputSizeSmall` style.
  transform: "translate(0, 17px) scale(1)"
}, ownerState.shrink && {
  transform: "translate(0, -1.5px) scale(0.75)",
  transformOrigin: "top left",
  maxWidth: "133%"
}, !ownerState.disableAnimation && {
  transition: theme.transitions.create(["color", "transform", "max-width"], {
    duration: theme.transitions.duration.shorter,
    easing: theme.transitions.easing.easeOut
  })
}, ownerState.variant === "filled" && _extends$1({
  // Chrome's autofill feature gives the input field a yellow background.
  // Since the input field is behind the label in the HTML tree,
  // the input field is drawn last and hides the label with an opaque background color.
  // zIndex: 1 will raise the label above opaque background-colors of input.
  zIndex: 1,
  pointerEvents: "none",
  transform: "translate(12px, 16px) scale(1)",
  maxWidth: "calc(100% - 24px)"
}, ownerState.size === "small" && {
  transform: "translate(12px, 13px) scale(1)"
}, ownerState.shrink && _extends$1({
  userSelect: "none",
  pointerEvents: "auto",
  transform: "translate(12px, 7px) scale(0.75)",
  maxWidth: "calc(133% - 24px)"
}, ownerState.size === "small" && {
  transform: "translate(12px, 4px) scale(0.75)"
})), ownerState.variant === "outlined" && _extends$1({
  // see comment above on filled.zIndex
  zIndex: 1,
  pointerEvents: "none",
  transform: "translate(14px, 16px) scale(1)",
  maxWidth: "calc(100% - 24px)"
}, ownerState.size === "small" && {
  transform: "translate(14px, 9px) scale(1)"
}, ownerState.shrink && {
  userSelect: "none",
  pointerEvents: "auto",
  // Theoretically, we should have (8+5)*2/0.75 = 34px
  // but it feels a better when it bleeds a bit on the left, so 32px.
  maxWidth: "calc(133% - 32px)",
  transform: "translate(14px, -9px) scale(0.75)"
})));
const InputLabel$1 = /* @__PURE__ */ reactExports.forwardRef(function InputLabel2(inProps, ref2) {
  const props = useDefaultProps({
    name: "MuiInputLabel",
    props: inProps
  });
  const {
    disableAnimation = false,
    shrink: shrinkProp,
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$N);
  const muiFormControl = useFormControl();
  let shrink = shrinkProp;
  if (typeof shrink === "undefined" && muiFormControl) {
    shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;
  }
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["size", "variant", "required", "focused"]
  });
  const ownerState = _extends$1({}, props, {
    disableAnimation,
    formControl: muiFormControl,
    shrink,
    size: fcs.size,
    variant: fcs.variant,
    required: fcs.required,
    focused: fcs.focused
  });
  const classes = useUtilityClasses$H(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabelRoot, _extends$1({
    "data-shrink": shrink,
    ownerState,
    ref: ref2,
    className: clsx$3(classes.root, className)
  }, other, {
    classes
  }));
});
function getLinearProgressUtilityClass(slot) {
  return generateUtilityClass("MuiLinearProgress", slot);
}
generateUtilityClasses("MuiLinearProgress", ["root", "colorPrimary", "colorSecondary", "determinate", "indeterminate", "buffer", "query", "dashed", "dashedColorPrimary", "dashedColorSecondary", "bar", "barColorPrimary", "barColorSecondary", "bar1Indeterminate", "bar1Determinate", "bar1Buffer", "bar2Indeterminate", "bar2Buffer"]);
const _excluded$M = ["className", "color", "value", "valueBuffer", "variant"];
let _$1 = (t) => t, _t, _t2, _t3, _t4, _t5, _t6;
const TRANSITION_DURATION = 4;
const indeterminate1Keyframe = keyframes(_t || (_t = _$1`
  0% {
    left: -35%;
    right: 100%;
  }

  60% {
    left: 100%;
    right: -90%;
  }

  100% {
    left: 100%;
    right: -90%;
  }
`));
const indeterminate2Keyframe = keyframes(_t2 || (_t2 = _$1`
  0% {
    left: -200%;
    right: 100%;
  }

  60% {
    left: 107%;
    right: -8%;
  }

  100% {
    left: 107%;
    right: -8%;
  }
`));
const bufferKeyframe = keyframes(_t3 || (_t3 = _$1`
  0% {
    opacity: 1;
    background-position: 0 -23px;
  }

  60% {
    opacity: 0;
    background-position: 0 -23px;
  }

  100% {
    opacity: 1;
    background-position: -200px -23px;
  }
`));
const useUtilityClasses$G = (ownerState) => {
  const {
    classes,
    variant: variant2,
    color: color2
  } = ownerState;
  const slots = {
    root: ["root", `color${capitalize$2(color2)}`, variant2],
    dashed: ["dashed", `dashedColor${capitalize$2(color2)}`],
    bar1: ["bar", `barColor${capitalize$2(color2)}`, (variant2 === "indeterminate" || variant2 === "query") && "bar1Indeterminate", variant2 === "determinate" && "bar1Determinate", variant2 === "buffer" && "bar1Buffer"],
    bar2: ["bar", variant2 !== "buffer" && `barColor${capitalize$2(color2)}`, variant2 === "buffer" && `color${capitalize$2(color2)}`, (variant2 === "indeterminate" || variant2 === "query") && "bar2Indeterminate", variant2 === "buffer" && "bar2Buffer"]
  };
  return composeClasses(slots, getLinearProgressUtilityClass, classes);
};
const getColorShade = (theme, color2) => {
  if (color2 === "inherit") {
    return "currentColor";
  }
  if (theme.vars) {
    return theme.vars.palette.LinearProgress[`${color2}Bg`];
  }
  return theme.palette.mode === "light" ? colorManipulatorExports.lighten(theme.palette[color2].main, 0.62) : colorManipulatorExports.darken(theme.palette[color2].main, 0.5);
};
const LinearProgressRoot = styled("span", {
  name: "MuiLinearProgress",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[`color${capitalize$2(ownerState.color)}`], styles2[ownerState.variant]];
  }
})(({
  ownerState,
  theme
}) => _extends$1({
  position: "relative",
  overflow: "hidden",
  display: "block",
  height: 4,
  zIndex: 0,
  // Fix Safari's bug during composition of different paint.
  "@media print": {
    colorAdjust: "exact"
  },
  backgroundColor: getColorShade(theme, ownerState.color)
}, ownerState.color === "inherit" && ownerState.variant !== "buffer" && {
  backgroundColor: "none",
  "&::before": {
    content: '""',
    position: "absolute",
    left: 0,
    top: 0,
    right: 0,
    bottom: 0,
    backgroundColor: "currentColor",
    opacity: 0.3
  }
}, ownerState.variant === "buffer" && {
  backgroundColor: "transparent"
}, ownerState.variant === "query" && {
  transform: "rotate(180deg)"
}));
const LinearProgressDashed = styled("span", {
  name: "MuiLinearProgress",
  slot: "Dashed",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.dashed, styles2[`dashedColor${capitalize$2(ownerState.color)}`]];
  }
})(({
  ownerState,
  theme
}) => {
  const backgroundColor2 = getColorShade(theme, ownerState.color);
  return _extends$1({
    position: "absolute",
    marginTop: 0,
    height: "100%",
    width: "100%"
  }, ownerState.color === "inherit" && {
    opacity: 0.3
  }, {
    backgroundImage: `radial-gradient(${backgroundColor2} 0%, ${backgroundColor2} 16%, transparent 42%)`,
    backgroundSize: "10px 10px",
    backgroundPosition: "0 -23px"
  });
}, css(_t4 || (_t4 = _$1`
    animation: ${0} 3s infinite linear;
  `), bufferKeyframe));
const LinearProgressBar1 = styled("span", {
  name: "MuiLinearProgress",
  slot: "Bar1",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.bar, styles2[`barColor${capitalize$2(ownerState.color)}`], (ownerState.variant === "indeterminate" || ownerState.variant === "query") && styles2.bar1Indeterminate, ownerState.variant === "determinate" && styles2.bar1Determinate, ownerState.variant === "buffer" && styles2.bar1Buffer];
  }
})(({
  ownerState,
  theme
}) => _extends$1({
  width: "100%",
  position: "absolute",
  left: 0,
  bottom: 0,
  top: 0,
  transition: "transform 0.2s linear",
  transformOrigin: "left",
  backgroundColor: ownerState.color === "inherit" ? "currentColor" : (theme.vars || theme).palette[ownerState.color].main
}, ownerState.variant === "determinate" && {
  transition: `transform .${TRANSITION_DURATION}s linear`
}, ownerState.variant === "buffer" && {
  zIndex: 1,
  transition: `transform .${TRANSITION_DURATION}s linear`
}), ({
  ownerState
}) => (ownerState.variant === "indeterminate" || ownerState.variant === "query") && css(_t5 || (_t5 = _$1`
      width: auto;
      animation: ${0} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
    `), indeterminate1Keyframe));
const LinearProgressBar2 = styled("span", {
  name: "MuiLinearProgress",
  slot: "Bar2",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.bar, styles2[`barColor${capitalize$2(ownerState.color)}`], (ownerState.variant === "indeterminate" || ownerState.variant === "query") && styles2.bar2Indeterminate, ownerState.variant === "buffer" && styles2.bar2Buffer];
  }
})(({
  ownerState,
  theme
}) => _extends$1({
  width: "100%",
  position: "absolute",
  left: 0,
  bottom: 0,
  top: 0,
  transition: "transform 0.2s linear",
  transformOrigin: "left"
}, ownerState.variant !== "buffer" && {
  backgroundColor: ownerState.color === "inherit" ? "currentColor" : (theme.vars || theme).palette[ownerState.color].main
}, ownerState.color === "inherit" && {
  opacity: 0.3
}, ownerState.variant === "buffer" && {
  backgroundColor: getColorShade(theme, ownerState.color),
  transition: `transform .${TRANSITION_DURATION}s linear`
}), ({
  ownerState
}) => (ownerState.variant === "indeterminate" || ownerState.variant === "query") && css(_t6 || (_t6 = _$1`
      width: auto;
      animation: ${0} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;
    `), indeterminate2Keyframe));
const LinearProgress = /* @__PURE__ */ reactExports.forwardRef(function LinearProgress2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiLinearProgress"
  });
  const {
    className,
    color: color2 = "primary",
    value,
    valueBuffer,
    variant: variant2 = "indeterminate"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$M);
  const ownerState = _extends$1({}, props, {
    color: color2,
    variant: variant2
  });
  const classes = useUtilityClasses$G(ownerState);
  const isRtl = useRtl();
  const rootProps = {};
  const inlineStyles = {
    bar1: {},
    bar2: {}
  };
  if (variant2 === "determinate" || variant2 === "buffer") {
    if (value !== void 0) {
      rootProps["aria-valuenow"] = Math.round(value);
      rootProps["aria-valuemin"] = 0;
      rootProps["aria-valuemax"] = 100;
      let transform2 = value - 100;
      if (isRtl) {
        transform2 = -transform2;
      }
      inlineStyles.bar1.transform = `translateX(${transform2}%)`;
    }
  }
  if (variant2 === "buffer") {
    if (valueBuffer !== void 0) {
      let transform2 = (valueBuffer || 0) - 100;
      if (isRtl) {
        transform2 = -transform2;
      }
      inlineStyles.bar2.transform = `translateX(${transform2}%)`;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(LinearProgressRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    role: "progressbar"
  }, rootProps, {
    ref: ref2
  }, other, {
    children: [variant2 === "buffer" ? /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressDashed, {
      className: classes.dashed,
      ownerState
    }) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressBar1, {
      className: classes.bar1,
      ownerState,
      style: inlineStyles.bar1
    }), variant2 === "determinate" ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgressBar2, {
      className: classes.bar2,
      ownerState,
      style: inlineStyles.bar2
    })]
  }));
});
function getLinkUtilityClass(slot) {
  return generateUtilityClass("MuiLink", slot);
}
const linkClasses = generateUtilityClasses("MuiLink", ["root", "underlineNone", "underlineHover", "underlineAlways", "button", "focusVisible"]);
const colorTransformations = {
  primary: "primary.main",
  textPrimary: "text.primary",
  secondary: "secondary.main",
  textSecondary: "text.secondary",
  error: "error.main"
};
const transformDeprecatedColors = (color2) => {
  return colorTransformations[color2] || color2;
};
const getTextDecoration$1 = ({
  theme,
  ownerState
}) => {
  const transformedColor = transformDeprecatedColors(ownerState.color);
  const color2 = getPath$1(theme, `palette.${transformedColor}`, false) || ownerState.color;
  const channelColor = getPath$1(theme, `palette.${transformedColor}Channel`);
  if ("vars" in theme && channelColor) {
    return `rgba(${channelColor} / 0.4)`;
  }
  return colorManipulatorExports.alpha(color2, 0.4);
};
const _excluded$L = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant", "sx"];
const useUtilityClasses$F = (ownerState) => {
  const {
    classes,
    component,
    focusVisible,
    underline
  } = ownerState;
  const slots = {
    root: ["root", `underline${capitalize$2(underline)}`, component === "button" && "button", focusVisible && "focusVisible"]
  };
  return composeClasses(slots, getLinkUtilityClass, classes);
};
const LinkRoot = styled(Typography, {
  name: "MuiLink",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[`underline${capitalize$2(ownerState.underline)}`], ownerState.component === "button" && styles2.button];
  }
})(({
  theme,
  ownerState
}) => {
  return _extends$1({}, ownerState.underline === "none" && {
    textDecoration: "none"
  }, ownerState.underline === "hover" && {
    textDecoration: "none",
    "&:hover": {
      textDecoration: "underline"
    }
  }, ownerState.underline === "always" && _extends$1({
    textDecoration: "underline"
  }, ownerState.color !== "inherit" && {
    textDecorationColor: getTextDecoration$1({
      theme,
      ownerState
    })
  }, {
    "&:hover": {
      textDecorationColor: "inherit"
    }
  }), ownerState.component === "button" && {
    position: "relative",
    WebkitTapHighlightColor: "transparent",
    backgroundColor: "transparent",
    // Reset default value
    // We disable the focus ring for mouse, touch and keyboard users.
    outline: 0,
    border: 0,
    margin: 0,
    // Remove the margin in Safari
    borderRadius: 0,
    padding: 0,
    // Remove the padding in Firefox
    cursor: "pointer",
    userSelect: "none",
    verticalAlign: "middle",
    MozAppearance: "none",
    // Reset
    WebkitAppearance: "none",
    // Reset
    "&::-moz-focus-inner": {
      borderStyle: "none"
      // Remove Firefox dotted outline.
    },
    [`&.${linkClasses.focusVisible}`]: {
      outline: "auto"
    }
  });
});
const Link$1 = /* @__PURE__ */ reactExports.forwardRef(function Link2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiLink"
  });
  const {
    className,
    color: color2 = "primary",
    component = "a",
    onBlur,
    onFocus,
    TypographyClasses,
    underline = "always",
    variant: variant2 = "inherit",
    sx
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$L);
  const {
    isFocusVisibleRef,
    onBlur: handleBlurVisible,
    onFocus: handleFocusVisible,
    ref: focusVisibleRef
  } = useIsFocusVisible();
  const [focusVisible, setFocusVisible] = reactExports.useState(false);
  const handlerRef = useForkRef(ref2, focusVisibleRef);
  const handleBlur = (event) => {
    handleBlurVisible(event);
    if (isFocusVisibleRef.current === false) {
      setFocusVisible(false);
    }
    if (onBlur) {
      onBlur(event);
    }
  };
  const handleFocus = (event) => {
    handleFocusVisible(event);
    if (isFocusVisibleRef.current === true) {
      setFocusVisible(true);
    }
    if (onFocus) {
      onFocus(event);
    }
  };
  const ownerState = _extends$1({}, props, {
    color: color2,
    component,
    focusVisible,
    underline,
    variant: variant2
  });
  const classes = useUtilityClasses$F(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(LinkRoot, _extends$1({
    color: color2,
    className: clsx$3(classes.root, className),
    classes: TypographyClasses,
    component,
    onBlur: handleBlur,
    onFocus: handleFocus,
    ref: handlerRef,
    ownerState,
    variant: variant2,
    sx: [...!Object.keys(colorTransformations).includes(color2) ? [{
      color: color2
    }] : [], ...Array.isArray(sx) ? sx : [sx]]
  }, other));
});
const ListContext = /* @__PURE__ */ reactExports.createContext({});
function getListUtilityClass(slot) {
  return generateUtilityClass("MuiList", slot);
}
generateUtilityClasses("MuiList", ["root", "padding", "dense", "subheader"]);
const _excluded$K = ["children", "className", "component", "dense", "disablePadding", "subheader"];
const useUtilityClasses$E = (ownerState) => {
  const {
    classes,
    disablePadding,
    dense,
    subheader
  } = ownerState;
  const slots = {
    root: ["root", !disablePadding && "padding", dense && "dense", subheader && "subheader"]
  };
  return composeClasses(slots, getListUtilityClass, classes);
};
const ListRoot = styled("ul", {
  name: "MuiList",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, !ownerState.disablePadding && styles2.padding, ownerState.dense && styles2.dense, ownerState.subheader && styles2.subheader];
  }
})(({
  ownerState
}) => _extends$1({
  listStyle: "none",
  margin: 0,
  padding: 0,
  position: "relative"
}, !ownerState.disablePadding && {
  paddingTop: 8,
  paddingBottom: 8
}, ownerState.subheader && {
  paddingTop: 0
}));
const List = /* @__PURE__ */ reactExports.forwardRef(function List2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiList"
  });
  const {
    children,
    className,
    component = "ul",
    dense = false,
    disablePadding = false,
    subheader
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$K);
  const context = reactExports.useMemo(() => ({
    dense
  }), [dense]);
  const ownerState = _extends$1({}, props, {
    component,
    dense,
    disablePadding
  });
  const classes = useUtilityClasses$E(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListContext.Provider, {
    value: context,
    children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ListRoot, _extends$1({
      as: component,
      className: clsx$3(classes.root, className),
      ref: ref2,
      ownerState
    }, other, {
      children: [subheader, children]
    }))
  });
});
function getListItemUtilityClass(slot) {
  return generateUtilityClass("MuiListItem", slot);
}
const listItemClasses = generateUtilityClasses("MuiListItem", ["root", "container", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "padding", "button", "secondaryAction", "selected"]);
function getListItemButtonUtilityClass(slot) {
  return generateUtilityClass("MuiListItemButton", slot);
}
const listItemButtonClasses = generateUtilityClasses("MuiListItemButton", ["root", "focusVisible", "dense", "alignItemsFlexStart", "disabled", "divider", "gutters", "selected"]);
const _excluded$J = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"];
const overridesResolver$4 = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.root, ownerState.dense && styles2.dense, ownerState.alignItems === "flex-start" && styles2.alignItemsFlexStart, ownerState.divider && styles2.divider, !ownerState.disableGutters && styles2.gutters];
};
const useUtilityClasses$D = (ownerState) => {
  const {
    alignItems,
    classes,
    dense,
    disabled,
    disableGutters,
    divider,
    selected
  } = ownerState;
  const slots = {
    root: ["root", dense && "dense", !disableGutters && "gutters", divider && "divider", disabled && "disabled", alignItems === "flex-start" && "alignItemsFlexStart", selected && "selected"]
  };
  const composedClasses = composeClasses(slots, getListItemButtonUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const ListItemButtonRoot = styled(ButtonBase, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiListItemButton",
  slot: "Root",
  overridesResolver: overridesResolver$4
})(({
  theme,
  ownerState
}) => _extends$1({
  display: "flex",
  flexGrow: 1,
  justifyContent: "flex-start",
  alignItems: "center",
  position: "relative",
  textDecoration: "none",
  minWidth: 0,
  boxSizing: "border-box",
  textAlign: "left",
  paddingTop: 8,
  paddingBottom: 8,
  transition: theme.transitions.create("background-color", {
    duration: theme.transitions.duration.shortest
  }),
  "&:hover": {
    textDecoration: "none",
    backgroundColor: (theme.vars || theme).palette.action.hover,
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  },
  [`&.${listItemButtonClasses.selected}`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
    [`&.${listItemButtonClasses.focusVisible}`]: {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
    }
  },
  [`&.${listItemButtonClasses.selected}:hover`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
    }
  },
  [`&.${listItemButtonClasses.focusVisible}`]: {
    backgroundColor: (theme.vars || theme).palette.action.focus
  },
  [`&.${listItemButtonClasses.disabled}`]: {
    opacity: (theme.vars || theme).palette.action.disabledOpacity
  }
}, ownerState.divider && {
  borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
  backgroundClip: "padding-box"
}, ownerState.alignItems === "flex-start" && {
  alignItems: "flex-start"
}, !ownerState.disableGutters && {
  paddingLeft: 16,
  paddingRight: 16
}, ownerState.dense && {
  paddingTop: 4,
  paddingBottom: 4
}));
const ListItemButton = /* @__PURE__ */ reactExports.forwardRef(function ListItemButton2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiListItemButton"
  });
  const {
    alignItems = "center",
    autoFocus = false,
    component = "div",
    children,
    dense = false,
    disableGutters = false,
    divider = false,
    focusVisibleClassName,
    selected = false,
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$J);
  const context = reactExports.useContext(ListContext);
  const childContext = reactExports.useMemo(() => ({
    dense: dense || context.dense || false,
    alignItems,
    disableGutters
  }), [alignItems, context.dense, dense, disableGutters]);
  const listItemRef = reactExports.useRef(null);
  useEnhancedEffect(() => {
    if (autoFocus) {
      if (listItemRef.current) {
        listItemRef.current.focus();
      }
    }
  }, [autoFocus]);
  const ownerState = _extends$1({}, props, {
    alignItems,
    dense: childContext.dense,
    disableGutters,
    divider,
    selected
  });
  const classes = useUtilityClasses$D(ownerState);
  const handleRef = useForkRef(listItemRef, ref2);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListContext.Provider, {
    value: childContext,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemButtonRoot, _extends$1({
      ref: handleRef,
      href: other.href || other.to,
      component: (other.href || other.to) && component === "div" ? "button" : component,
      focusVisibleClassName: clsx$3(classes.focusVisible, focusVisibleClassName),
      ownerState,
      className: clsx$3(classes.root, className)
    }, other, {
      classes,
      children
    }))
  });
});
function getListItemSecondaryActionClassesUtilityClass(slot) {
  return generateUtilityClass("MuiListItemSecondaryAction", slot);
}
generateUtilityClasses("MuiListItemSecondaryAction", ["root", "disableGutters"]);
const _excluded$I = ["className"];
const useUtilityClasses$C = (ownerState) => {
  const {
    disableGutters,
    classes
  } = ownerState;
  const slots = {
    root: ["root", disableGutters && "disableGutters"]
  };
  return composeClasses(slots, getListItemSecondaryActionClassesUtilityClass, classes);
};
const ListItemSecondaryActionRoot = styled("div", {
  name: "MuiListItemSecondaryAction",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.disableGutters && styles2.disableGutters];
  }
})(({
  ownerState
}) => _extends$1({
  position: "absolute",
  right: 16,
  top: "50%",
  transform: "translateY(-50%)"
}, ownerState.disableGutters && {
  right: 0
}));
const ListItemSecondaryAction = /* @__PURE__ */ reactExports.forwardRef(function ListItemSecondaryAction2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiListItemSecondaryAction"
  });
  const {
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$I);
  const context = reactExports.useContext(ListContext);
  const ownerState = _extends$1({}, props, {
    disableGutters: context.disableGutters
  });
  const classes = useUtilityClasses$C(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemSecondaryActionRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other));
});
ListItemSecondaryAction.muiName = "ListItemSecondaryAction";
const _excluded$H = ["className"], _excluded2$6 = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"];
const overridesResolver$3 = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.root, ownerState.dense && styles2.dense, ownerState.alignItems === "flex-start" && styles2.alignItemsFlexStart, ownerState.divider && styles2.divider, !ownerState.disableGutters && styles2.gutters, !ownerState.disablePadding && styles2.padding, ownerState.button && styles2.button, ownerState.hasSecondaryAction && styles2.secondaryAction];
};
const useUtilityClasses$B = (ownerState) => {
  const {
    alignItems,
    button,
    classes,
    dense,
    disabled,
    disableGutters,
    disablePadding,
    divider,
    hasSecondaryAction,
    selected
  } = ownerState;
  const slots = {
    root: ["root", dense && "dense", !disableGutters && "gutters", !disablePadding && "padding", divider && "divider", disabled && "disabled", button && "button", alignItems === "flex-start" && "alignItemsFlexStart", hasSecondaryAction && "secondaryAction", selected && "selected"],
    container: ["container"]
  };
  return composeClasses(slots, getListItemUtilityClass, classes);
};
const ListItemRoot = styled("div", {
  name: "MuiListItem",
  slot: "Root",
  overridesResolver: overridesResolver$3
})(({
  theme,
  ownerState
}) => _extends$1({
  display: "flex",
  justifyContent: "flex-start",
  alignItems: "center",
  position: "relative",
  textDecoration: "none",
  width: "100%",
  boxSizing: "border-box",
  textAlign: "left"
}, !ownerState.disablePadding && _extends$1({
  paddingTop: 8,
  paddingBottom: 8
}, ownerState.dense && {
  paddingTop: 4,
  paddingBottom: 4
}, !ownerState.disableGutters && {
  paddingLeft: 16,
  paddingRight: 16
}, !!ownerState.secondaryAction && {
  // Add some space to avoid collision as `ListItemSecondaryAction`
  // is absolutely positioned.
  paddingRight: 48
}), !!ownerState.secondaryAction && {
  [`& > .${listItemButtonClasses.root}`]: {
    paddingRight: 48
  }
}, {
  [`&.${listItemClasses.focusVisible}`]: {
    backgroundColor: (theme.vars || theme).palette.action.focus
  },
  [`&.${listItemClasses.selected}`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
    [`&.${listItemClasses.focusVisible}`]: {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
    }
  },
  [`&.${listItemClasses.disabled}`]: {
    opacity: (theme.vars || theme).palette.action.disabledOpacity
  }
}, ownerState.alignItems === "flex-start" && {
  alignItems: "flex-start"
}, ownerState.divider && {
  borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
  backgroundClip: "padding-box"
}, ownerState.button && {
  transition: theme.transitions.create("background-color", {
    duration: theme.transitions.duration.shortest
  }),
  "&:hover": {
    textDecoration: "none",
    backgroundColor: (theme.vars || theme).palette.action.hover,
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  },
  [`&.${listItemClasses.selected}:hover`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
    }
  }
}, ownerState.hasSecondaryAction && {
  // Add some space to avoid collision as `ListItemSecondaryAction`
  // is absolutely positioned.
  paddingRight: 48
}));
const ListItemContainer = styled("li", {
  name: "MuiListItem",
  slot: "Container",
  overridesResolver: (props, styles2) => styles2.container
})({
  position: "relative"
});
const ListItem$1 = /* @__PURE__ */ reactExports.forwardRef(function ListItem2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiListItem"
  });
  const {
    alignItems = "center",
    autoFocus = false,
    button = false,
    children: childrenProp,
    className,
    component: componentProp,
    components = {},
    componentsProps = {},
    ContainerComponent = "li",
    ContainerProps: {
      className: ContainerClassName
    } = {},
    dense = false,
    disabled = false,
    disableGutters = false,
    disablePadding = false,
    divider = false,
    focusVisibleClassName,
    secondaryAction,
    selected = false,
    slotProps = {},
    slots = {}
  } = props, ContainerProps = _objectWithoutPropertiesLoose(props.ContainerProps, _excluded$H), other = _objectWithoutPropertiesLoose(props, _excluded2$6);
  const context = reactExports.useContext(ListContext);
  const childContext = reactExports.useMemo(() => ({
    dense: dense || context.dense || false,
    alignItems,
    disableGutters
  }), [alignItems, context.dense, dense, disableGutters]);
  const listItemRef = reactExports.useRef(null);
  useEnhancedEffect(() => {
    if (autoFocus) {
      if (listItemRef.current) {
        listItemRef.current.focus();
      }
    }
  }, [autoFocus]);
  const children = reactExports.Children.toArray(childrenProp);
  const hasSecondaryAction = children.length && isMuiElement(children[children.length - 1], ["ListItemSecondaryAction"]);
  const ownerState = _extends$1({}, props, {
    alignItems,
    autoFocus,
    button,
    dense: childContext.dense,
    disabled,
    disableGutters,
    disablePadding,
    divider,
    hasSecondaryAction,
    selected
  });
  const classes = useUtilityClasses$B(ownerState);
  const handleRef = useForkRef(listItemRef, ref2);
  const Root = slots.root || components.Root || ListItemRoot;
  const rootProps = slotProps.root || componentsProps.root || {};
  const componentProps = _extends$1({
    className: clsx$3(classes.root, rootProps.className, className),
    disabled
  }, other);
  let Component = componentProp || "li";
  if (button) {
    componentProps.component = componentProp || "div";
    componentProps.focusVisibleClassName = clsx$3(listItemClasses.focusVisible, focusVisibleClassName);
    Component = ButtonBase;
  }
  if (hasSecondaryAction) {
    Component = !componentProps.component && !componentProp ? "div" : Component;
    if (ContainerComponent === "li") {
      if (Component === "li") {
        Component = "div";
      } else if (componentProps.component === "li") {
        componentProps.component = "div";
      }
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(ListContext.Provider, {
      value: childContext,
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemContainer, _extends$1({
        as: ContainerComponent,
        className: clsx$3(classes.container, ContainerClassName),
        ref: handleRef,
        ownerState
      }, ContainerProps, {
        children: [/* @__PURE__ */ jsxRuntimeExports.jsx(Root, _extends$1({}, rootProps, !isHostComponent(Root) && {
          as: Component,
          ownerState: _extends$1({}, ownerState, rootProps.ownerState)
        }, componentProps, {
          children
        })), children.pop()]
      }))
    });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListContext.Provider, {
    value: childContext,
    children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Root, _extends$1({}, rootProps, {
      as: Component,
      ref: handleRef
    }, !isHostComponent(Root) && {
      ownerState: _extends$1({}, ownerState, rootProps.ownerState)
    }, componentProps, {
      children: [children, secondaryAction && /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemSecondaryAction, {
        children: secondaryAction
      })]
    }))
  });
});
function getListItemAvatarUtilityClass(slot) {
  return generateUtilityClass("MuiListItemAvatar", slot);
}
generateUtilityClasses("MuiListItemAvatar", ["root", "alignItemsFlexStart"]);
const _excluded$G = ["className"];
const useUtilityClasses$A = (ownerState) => {
  const {
    alignItems,
    classes
  } = ownerState;
  const slots = {
    root: ["root", alignItems === "flex-start" && "alignItemsFlexStart"]
  };
  return composeClasses(slots, getListItemAvatarUtilityClass, classes);
};
const ListItemAvatarRoot = styled("div", {
  name: "MuiListItemAvatar",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.alignItems === "flex-start" && styles2.alignItemsFlexStart];
  }
})(({
  ownerState
}) => _extends$1({
  minWidth: 56,
  flexShrink: 0
}, ownerState.alignItems === "flex-start" && {
  marginTop: 8
}));
const ListItemAvatar = /* @__PURE__ */ reactExports.forwardRef(function ListItemAvatar2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiListItemAvatar"
  });
  const {
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$G);
  const context = reactExports.useContext(ListContext);
  const ownerState = _extends$1({}, props, {
    alignItems: context.alignItems
  });
  const classes = useUtilityClasses$A(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemAvatarRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other));
});
function getListItemIconUtilityClass(slot) {
  return generateUtilityClass("MuiListItemIcon", slot);
}
const listItemIconClasses = generateUtilityClasses("MuiListItemIcon", ["root", "alignItemsFlexStart"]);
const _excluded$F = ["className"];
const useUtilityClasses$z = (ownerState) => {
  const {
    alignItems,
    classes
  } = ownerState;
  const slots = {
    root: ["root", alignItems === "flex-start" && "alignItemsFlexStart"]
  };
  return composeClasses(slots, getListItemIconUtilityClass, classes);
};
const ListItemIconRoot = styled("div", {
  name: "MuiListItemIcon",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.alignItems === "flex-start" && styles2.alignItemsFlexStart];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  minWidth: 56,
  color: (theme.vars || theme).palette.action.active,
  flexShrink: 0,
  display: "inline-flex"
}, ownerState.alignItems === "flex-start" && {
  marginTop: 8
}));
const ListItemIcon = /* @__PURE__ */ reactExports.forwardRef(function ListItemIcon2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiListItemIcon"
  });
  const {
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$F);
  const context = reactExports.useContext(ListContext);
  const ownerState = _extends$1({}, props, {
    alignItems: context.alignItems
  });
  const classes = useUtilityClasses$z(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIconRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other));
});
function getListItemTextUtilityClass(slot) {
  return generateUtilityClass("MuiListItemText", slot);
}
const listItemTextClasses = generateUtilityClasses("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
const _excluded$E = ["children", "className", "disableTypography", "inset", "primary", "primaryTypographyProps", "secondary", "secondaryTypographyProps"];
const useUtilityClasses$y = (ownerState) => {
  const {
    classes,
    inset,
    primary,
    secondary,
    dense
  } = ownerState;
  const slots = {
    root: ["root", inset && "inset", dense && "dense", primary && secondary && "multiline"],
    primary: ["primary"],
    secondary: ["secondary"]
  };
  return composeClasses(slots, getListItemTextUtilityClass, classes);
};
const ListItemTextRoot = styled("div", {
  name: "MuiListItemText",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [{
      [`& .${listItemTextClasses.primary}`]: styles2.primary
    }, {
      [`& .${listItemTextClasses.secondary}`]: styles2.secondary
    }, styles2.root, ownerState.inset && styles2.inset, ownerState.primary && ownerState.secondary && styles2.multiline, ownerState.dense && styles2.dense];
  }
})(({
  ownerState
}) => _extends$1({
  flex: "1 1 auto",
  minWidth: 0,
  marginTop: 4,
  marginBottom: 4
}, ownerState.primary && ownerState.secondary && {
  marginTop: 6,
  marginBottom: 6
}, ownerState.inset && {
  paddingLeft: 56
}));
const ListItemText$1 = /* @__PURE__ */ reactExports.forwardRef(function ListItemText2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiListItemText"
  });
  const {
    children,
    className,
    disableTypography = false,
    inset = false,
    primary: primaryProp,
    primaryTypographyProps,
    secondary: secondaryProp,
    secondaryTypographyProps
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$E);
  const {
    dense
  } = reactExports.useContext(ListContext);
  let primary = primaryProp != null ? primaryProp : children;
  let secondary = secondaryProp;
  const ownerState = _extends$1({}, props, {
    disableTypography,
    inset,
    primary: !!primary,
    secondary: !!secondary,
    dense
  });
  const classes = useUtilityClasses$y(ownerState);
  if (primary != null && primary.type !== Typography && !disableTypography) {
    primary = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, _extends$1({
      variant: dense ? "body2" : "body1",
      className: classes.primary,
      component: primaryTypographyProps != null && primaryTypographyProps.variant ? void 0 : "span",
      display: "block"
    }, primaryTypographyProps, {
      children: primary
    }));
  }
  if (secondary != null && secondary.type !== Typography && !disableTypography) {
    secondary = /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, _extends$1({
      variant: "body2",
      className: classes.secondary,
      color: "text.secondary",
      display: "block"
    }, secondaryTypographyProps, {
      children: secondary
    }));
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemTextRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other, {
    children: [primary, secondary]
  }));
});
const _excluded$D = ["actions", "autoFocus", "autoFocusItem", "children", "className", "disabledItemsFocusable", "disableListWrap", "onKeyDown", "variant"];
function nextItem$1(list, item, disableListWrap) {
  if (list === item) {
    return list.firstChild;
  }
  if (item && item.nextElementSibling) {
    return item.nextElementSibling;
  }
  return disableListWrap ? null : list.firstChild;
}
function previousItem$1(list, item, disableListWrap) {
  if (list === item) {
    return disableListWrap ? list.firstChild : list.lastChild;
  }
  if (item && item.previousElementSibling) {
    return item.previousElementSibling;
  }
  return disableListWrap ? null : list.lastChild;
}
function textCriteriaMatches(nextFocus, textCriteria) {
  if (textCriteria === void 0) {
    return true;
  }
  let text = nextFocus.innerText;
  if (text === void 0) {
    text = nextFocus.textContent;
  }
  text = text.trim().toLowerCase();
  if (text.length === 0) {
    return false;
  }
  if (textCriteria.repeating) {
    return text[0] === textCriteria.keys[0];
  }
  return text.indexOf(textCriteria.keys.join("")) === 0;
}
function moveFocus$1(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {
  let wrappedOnce = false;
  let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);
  while (nextFocus) {
    if (nextFocus === list.firstChild) {
      if (wrappedOnce) {
        return false;
      }
      wrappedOnce = true;
    }
    const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute("aria-disabled") === "true";
    if (!nextFocus.hasAttribute("tabindex") || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {
      nextFocus = traversalFunction(list, nextFocus, disableListWrap);
    } else {
      nextFocus.focus();
      return true;
    }
  }
  return false;
}
const MenuList = /* @__PURE__ */ reactExports.forwardRef(function MenuList2(props, ref2) {
  const {
    // private
    // eslint-disable-next-line react/prop-types
    actions,
    autoFocus = false,
    autoFocusItem = false,
    children,
    className,
    disabledItemsFocusable = false,
    disableListWrap = false,
    onKeyDown,
    variant: variant2 = "selectedMenu"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$D);
  const listRef = reactExports.useRef(null);
  const textCriteriaRef = reactExports.useRef({
    keys: [],
    repeating: true,
    previousKeyMatched: true,
    lastTime: null
  });
  useEnhancedEffect(() => {
    if (autoFocus) {
      listRef.current.focus();
    }
  }, [autoFocus]);
  reactExports.useImperativeHandle(actions, () => ({
    adjustStyleForScrollbar: (containerElement, {
      direction: direction2
    }) => {
      const noExplicitWidth = !listRef.current.style.width;
      if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {
        const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;
        listRef.current.style[direction2 === "rtl" ? "paddingLeft" : "paddingRight"] = scrollbarSize;
        listRef.current.style.width = `calc(100% + ${scrollbarSize})`;
      }
      return listRef.current;
    }
  }), []);
  const handleKeyDown2 = (event) => {
    const list = listRef.current;
    const key = event.key;
    const currentFocus = ownerDocument(list).activeElement;
    if (key === "ArrowDown") {
      event.preventDefault();
      moveFocus$1(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem$1);
    } else if (key === "ArrowUp") {
      event.preventDefault();
      moveFocus$1(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem$1);
    } else if (key === "Home") {
      event.preventDefault();
      moveFocus$1(list, null, disableListWrap, disabledItemsFocusable, nextItem$1);
    } else if (key === "End") {
      event.preventDefault();
      moveFocus$1(list, null, disableListWrap, disabledItemsFocusable, previousItem$1);
    } else if (key.length === 1) {
      const criteria = textCriteriaRef.current;
      const lowerKey = key.toLowerCase();
      const currTime = performance.now();
      if (criteria.keys.length > 0) {
        if (currTime - criteria.lastTime > 500) {
          criteria.keys = [];
          criteria.repeating = true;
          criteria.previousKeyMatched = true;
        } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {
          criteria.repeating = false;
        }
      }
      criteria.lastTime = currTime;
      criteria.keys.push(lowerKey);
      const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);
      if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus$1(list, currentFocus, false, disabledItemsFocusable, nextItem$1, criteria))) {
        event.preventDefault();
      } else {
        criteria.previousKeyMatched = false;
      }
    }
    if (onKeyDown) {
      onKeyDown(event);
    }
  };
  const handleRef = useForkRef(listRef, ref2);
  let activeItemIndex = -1;
  reactExports.Children.forEach(children, (child, index2) => {
    if (!/* @__PURE__ */ reactExports.isValidElement(child)) {
      if (activeItemIndex === index2) {
        activeItemIndex += 1;
        if (activeItemIndex >= children.length) {
          activeItemIndex = -1;
        }
      }
      return;
    }
    if (!child.props.disabled) {
      if (variant2 === "selectedMenu" && child.props.selected) {
        activeItemIndex = index2;
      } else if (activeItemIndex === -1) {
        activeItemIndex = index2;
      }
    }
    if (activeItemIndex === index2 && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {
      activeItemIndex += 1;
      if (activeItemIndex >= children.length) {
        activeItemIndex = -1;
      }
    }
  });
  const items = reactExports.Children.map(children, (child, index2) => {
    if (index2 === activeItemIndex) {
      const newChildProps = {};
      if (autoFocusItem) {
        newChildProps.autoFocus = true;
      }
      if (child.props.tabIndex === void 0 && variant2 === "selectedMenu") {
        newChildProps.tabIndex = 0;
      }
      return /* @__PURE__ */ reactExports.cloneElement(child, newChildProps);
    }
    return child;
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(List, _extends$1({
    role: "menu",
    ref: handleRef,
    className,
    onKeyDown: handleKeyDown2,
    tabIndex: autoFocus ? 0 : -1
  }, other, {
    children: items
  }));
});
function getPopoverUtilityClass(slot) {
  return generateUtilityClass("MuiPopover", slot);
}
generateUtilityClasses("MuiPopover", ["root", "paper"]);
const _excluded$C = ["onEntering"], _excluded2$5 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"], _excluded3$1 = ["slotProps"];
function getOffsetTop(rect, vertical) {
  let offset2 = 0;
  if (typeof vertical === "number") {
    offset2 = vertical;
  } else if (vertical === "center") {
    offset2 = rect.height / 2;
  } else if (vertical === "bottom") {
    offset2 = rect.height;
  }
  return offset2;
}
function getOffsetLeft(rect, horizontal) {
  let offset2 = 0;
  if (typeof horizontal === "number") {
    offset2 = horizontal;
  } else if (horizontal === "center") {
    offset2 = rect.width / 2;
  } else if (horizontal === "right") {
    offset2 = rect.width;
  }
  return offset2;
}
function getTransformOriginValue(transformOrigin2) {
  return [transformOrigin2.horizontal, transformOrigin2.vertical].map((n) => typeof n === "number" ? `${n}px` : n).join(" ");
}
function resolveAnchorEl(anchorEl) {
  return typeof anchorEl === "function" ? anchorEl() : anchorEl;
}
const useUtilityClasses$x = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    paper: ["paper"]
  };
  return composeClasses(slots, getPopoverUtilityClass, classes);
};
const PopoverRoot = styled(Modal, {
  name: "MuiPopover",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({});
const PopoverPaper = styled(Paper, {
  name: "MuiPopover",
  slot: "Paper",
  overridesResolver: (props, styles2) => styles2.paper
})({
  position: "absolute",
  overflowY: "auto",
  overflowX: "hidden",
  // So we see the popover when it's empty.
  // It's most likely on issue on userland.
  minWidth: 16,
  minHeight: 16,
  maxWidth: "calc(100% - 32px)",
  maxHeight: "calc(100% - 32px)",
  // We disable the focus ring for mouse, touch and keyboard users.
  outline: 0
});
const Popover = /* @__PURE__ */ reactExports.forwardRef(function Popover2(inProps, ref2) {
  var _slotProps$paper, _slots$root, _slots$paper;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiPopover"
  });
  const {
    action,
    anchorEl,
    anchorOrigin = {
      vertical: "top",
      horizontal: "left"
    },
    anchorPosition,
    anchorReference = "anchorEl",
    children,
    className,
    container: containerProp,
    elevation = 8,
    marginThreshold = 16,
    open,
    PaperProps: PaperPropsProp = {},
    slots,
    slotProps,
    transformOrigin: transformOrigin2 = {
      vertical: "top",
      horizontal: "left"
    },
    TransitionComponent = Grow,
    transitionDuration: transitionDurationProp = "auto",
    TransitionProps: {
      onEntering
    } = {},
    disableScrollLock = false
  } = props, TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded$C), other = _objectWithoutPropertiesLoose(props, _excluded2$5);
  const externalPaperSlotProps = (_slotProps$paper = slotProps == null ? void 0 : slotProps.paper) != null ? _slotProps$paper : PaperPropsProp;
  const paperRef = reactExports.useRef();
  const handlePaperRef = useForkRef(paperRef, externalPaperSlotProps.ref);
  const ownerState = _extends$1({}, props, {
    anchorOrigin,
    anchorReference,
    elevation,
    marginThreshold,
    externalPaperSlotProps,
    transformOrigin: transformOrigin2,
    TransitionComponent,
    transitionDuration: transitionDurationProp,
    TransitionProps
  });
  const classes = useUtilityClasses$x(ownerState);
  const getAnchorOffset = reactExports.useCallback(() => {
    if (anchorReference === "anchorPosition") {
      return anchorPosition;
    }
    const resolvedAnchorEl = resolveAnchorEl(anchorEl);
    const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;
    const anchorRect = anchorElement.getBoundingClientRect();
    return {
      top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),
      left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)
    };
  }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);
  const getTransformOrigin = reactExports.useCallback((elemRect) => {
    return {
      vertical: getOffsetTop(elemRect, transformOrigin2.vertical),
      horizontal: getOffsetLeft(elemRect, transformOrigin2.horizontal)
    };
  }, [transformOrigin2.horizontal, transformOrigin2.vertical]);
  const getPositioningStyle = reactExports.useCallback((element) => {
    const elemRect = {
      width: element.offsetWidth,
      height: element.offsetHeight
    };
    const elemTransformOrigin = getTransformOrigin(elemRect);
    if (anchorReference === "none") {
      return {
        top: null,
        left: null,
        transformOrigin: getTransformOriginValue(elemTransformOrigin)
      };
    }
    const anchorOffset = getAnchorOffset();
    let top2 = anchorOffset.top - elemTransformOrigin.vertical;
    let left2 = anchorOffset.left - elemTransformOrigin.horizontal;
    const bottom2 = top2 + elemRect.height;
    const right2 = left2 + elemRect.width;
    const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));
    const heightThreshold = containerWindow.innerHeight - marginThreshold;
    const widthThreshold = containerWindow.innerWidth - marginThreshold;
    if (marginThreshold !== null && top2 < marginThreshold) {
      const diff = top2 - marginThreshold;
      top2 -= diff;
      elemTransformOrigin.vertical += diff;
    } else if (marginThreshold !== null && bottom2 > heightThreshold) {
      const diff = bottom2 - heightThreshold;
      top2 -= diff;
      elemTransformOrigin.vertical += diff;
    }
    if (marginThreshold !== null && left2 < marginThreshold) {
      const diff = left2 - marginThreshold;
      left2 -= diff;
      elemTransformOrigin.horizontal += diff;
    } else if (right2 > widthThreshold) {
      const diff = right2 - widthThreshold;
      left2 -= diff;
      elemTransformOrigin.horizontal += diff;
    }
    return {
      top: `${Math.round(top2)}px`,
      left: `${Math.round(left2)}px`,
      transformOrigin: getTransformOriginValue(elemTransformOrigin)
    };
  }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);
  const [isPositioned, setIsPositioned] = reactExports.useState(open);
  const setPositioningStyles = reactExports.useCallback(() => {
    const element = paperRef.current;
    if (!element) {
      return;
    }
    const positioning = getPositioningStyle(element);
    if (positioning.top !== null) {
      element.style.top = positioning.top;
    }
    if (positioning.left !== null) {
      element.style.left = positioning.left;
    }
    element.style.transformOrigin = positioning.transformOrigin;
    setIsPositioned(true);
  }, [getPositioningStyle]);
  reactExports.useEffect(() => {
    if (disableScrollLock) {
      window.addEventListener("scroll", setPositioningStyles);
    }
    return () => window.removeEventListener("scroll", setPositioningStyles);
  }, [anchorEl, disableScrollLock, setPositioningStyles]);
  const handleEntering = (element, isAppearing) => {
    if (onEntering) {
      onEntering(element, isAppearing);
    }
    setPositioningStyles();
  };
  const handleExited = () => {
    setIsPositioned(false);
  };
  reactExports.useEffect(() => {
    if (open) {
      setPositioningStyles();
    }
  });
  reactExports.useImperativeHandle(action, () => open ? {
    updatePosition: () => {
      setPositioningStyles();
    }
  } : null, [open, setPositioningStyles]);
  reactExports.useEffect(() => {
    if (!open) {
      return void 0;
    }
    const handleResize = debounce$2(() => {
      setPositioningStyles();
    });
    const containerWindow = ownerWindow(anchorEl);
    containerWindow.addEventListener("resize", handleResize);
    return () => {
      handleResize.clear();
      containerWindow.removeEventListener("resize", handleResize);
    };
  }, [anchorEl, open, setPositioningStyles]);
  let transitionDuration = transitionDurationProp;
  if (transitionDurationProp === "auto" && !TransitionComponent.muiSupportAuto) {
    transitionDuration = void 0;
  }
  const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : void 0);
  const RootSlot = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : PopoverRoot;
  const PaperSlot = (_slots$paper = slots == null ? void 0 : slots.paper) != null ? _slots$paper : PopoverPaper;
  const paperProps = useSlotProps({
    elementType: PaperSlot,
    externalSlotProps: _extends$1({}, externalPaperSlotProps, {
      style: isPositioned ? externalPaperSlotProps.style : _extends$1({}, externalPaperSlotProps.style, {
        opacity: 0
      })
    }),
    additionalProps: {
      elevation,
      ref: handlePaperRef
    },
    ownerState,
    className: clsx$3(classes.paper, externalPaperSlotProps == null ? void 0 : externalPaperSlotProps.className)
  });
  const _useSlotProps = useSlotProps({
    elementType: RootSlot,
    externalSlotProps: (slotProps == null ? void 0 : slotProps.root) || {},
    externalForwardedProps: other,
    additionalProps: {
      ref: ref2,
      slotProps: {
        backdrop: {
          invisible: true
        }
      },
      container,
      open
    },
    ownerState,
    className: clsx$3(classes.root, className)
  }), {
    slotProps: rootSlotPropsProp
  } = _useSlotProps, rootProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded3$1);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(RootSlot, _extends$1({}, rootProps, !isHostComponent(RootSlot) && {
    slotProps: rootSlotPropsProp,
    disableScrollLock
  }, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
      appear: true,
      in: open,
      onEntering: handleEntering,
      onExited: handleExited,
      timeout: transitionDuration
    }, TransitionProps, {
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(PaperSlot, _extends$1({}, paperProps, {
        children
      }))
    }))
  }));
});
function getMenuUtilityClass(slot) {
  return generateUtilityClass("MuiMenu", slot);
}
generateUtilityClasses("MuiMenu", ["root", "paper", "list"]);
const _excluded$B = ["onEntering"], _excluded2$4 = ["autoFocus", "children", "className", "disableAutoFocusItem", "MenuListProps", "onClose", "open", "PaperProps", "PopoverClasses", "transitionDuration", "TransitionProps", "variant", "slots", "slotProps"];
const RTL_ORIGIN = {
  vertical: "top",
  horizontal: "right"
};
const LTR_ORIGIN = {
  vertical: "top",
  horizontal: "left"
};
const useUtilityClasses$w = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    paper: ["paper"],
    list: ["list"]
  };
  return composeClasses(slots, getMenuUtilityClass, classes);
};
const MenuRoot = styled(Popover, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiMenu",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({});
const MenuPaper = styled(PopoverPaper, {
  name: "MuiMenu",
  slot: "Paper",
  overridesResolver: (props, styles2) => styles2.paper
})({
  // specZ: The maximum height of a simple menu should be one or more rows less than the view
  // height. This ensures a tappable area outside of the simple menu with which to dismiss
  // the menu.
  maxHeight: "calc(100% - 96px)",
  // Add iOS momentum scrolling for iOS < 13.0
  WebkitOverflowScrolling: "touch"
});
const MenuMenuList = styled(MenuList, {
  name: "MuiMenu",
  slot: "List",
  overridesResolver: (props, styles2) => styles2.list
})({
  // We disable the focus ring for mouse, touch and keyboard users.
  outline: 0
});
const Menu = /* @__PURE__ */ reactExports.forwardRef(function Menu2(inProps, ref2) {
  var _slots$paper, _slotProps$paper;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiMenu"
  });
  const {
    autoFocus = true,
    children,
    className,
    disableAutoFocusItem = false,
    MenuListProps = {},
    onClose,
    open,
    PaperProps = {},
    PopoverClasses,
    transitionDuration = "auto",
    TransitionProps: {
      onEntering
    } = {},
    variant: variant2 = "selectedMenu",
    slots = {},
    slotProps = {}
  } = props, TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded$B), other = _objectWithoutPropertiesLoose(props, _excluded2$4);
  const isRtl = useRtl();
  const ownerState = _extends$1({}, props, {
    autoFocus,
    disableAutoFocusItem,
    MenuListProps,
    onEntering,
    PaperProps,
    transitionDuration,
    TransitionProps,
    variant: variant2
  });
  const classes = useUtilityClasses$w(ownerState);
  const autoFocusItem = autoFocus && !disableAutoFocusItem && open;
  const menuListActionsRef = reactExports.useRef(null);
  const handleEntering = (element, isAppearing) => {
    if (menuListActionsRef.current) {
      menuListActionsRef.current.adjustStyleForScrollbar(element, {
        direction: isRtl ? "rtl" : "ltr"
      });
    }
    if (onEntering) {
      onEntering(element, isAppearing);
    }
  };
  const handleListKeyDown = (event) => {
    if (event.key === "Tab") {
      event.preventDefault();
      if (onClose) {
        onClose(event, "tabKeyDown");
      }
    }
  };
  let activeItemIndex = -1;
  reactExports.Children.map(children, (child, index2) => {
    if (!/* @__PURE__ */ reactExports.isValidElement(child)) {
      return;
    }
    if (!child.props.disabled) {
      if (variant2 === "selectedMenu" && child.props.selected) {
        activeItemIndex = index2;
      } else if (activeItemIndex === -1) {
        activeItemIndex = index2;
      }
    }
  });
  const PaperSlot = (_slots$paper = slots.paper) != null ? _slots$paper : MenuPaper;
  const paperExternalSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : PaperProps;
  const rootSlotProps = useSlotProps({
    elementType: slots.root,
    externalSlotProps: slotProps.root,
    ownerState,
    className: [classes.root, className]
  });
  const paperSlotProps = useSlotProps({
    elementType: PaperSlot,
    externalSlotProps: paperExternalSlotProps,
    ownerState,
    className: classes.paper
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MenuRoot, _extends$1({
    onClose,
    anchorOrigin: {
      vertical: "bottom",
      horizontal: isRtl ? "right" : "left"
    },
    transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,
    slots: {
      paper: PaperSlot,
      root: slots.root
    },
    slotProps: {
      root: rootSlotProps,
      paper: paperSlotProps
    },
    open,
    ref: ref2,
    transitionDuration,
    TransitionProps: _extends$1({
      onEntering: handleEntering
    }, TransitionProps),
    ownerState
  }, other, {
    classes: PopoverClasses,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(MenuMenuList, _extends$1({
      onKeyDown: handleListKeyDown,
      actions: menuListActionsRef,
      autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),
      autoFocusItem,
      variant: variant2
    }, MenuListProps, {
      className: clsx$3(classes.list, MenuListProps.className),
      children
    }))
  }));
});
function getMenuItemUtilityClass(slot) {
  return generateUtilityClass("MuiMenuItem", slot);
}
const menuItemClasses = generateUtilityClasses("MuiMenuItem", ["root", "focusVisible", "dense", "disabled", "divider", "gutters", "selected"]);
const _excluded$A = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"];
const overridesResolver$2 = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.root, ownerState.dense && styles2.dense, ownerState.divider && styles2.divider, !ownerState.disableGutters && styles2.gutters];
};
const useUtilityClasses$v = (ownerState) => {
  const {
    disabled,
    dense,
    divider,
    disableGutters,
    selected,
    classes
  } = ownerState;
  const slots = {
    root: ["root", dense && "dense", disabled && "disabled", !disableGutters && "gutters", divider && "divider", selected && "selected"]
  };
  const composedClasses = composeClasses(slots, getMenuItemUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const MenuItemRoot = styled(ButtonBase, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiMenuItem",
  slot: "Root",
  overridesResolver: overridesResolver$2
})(({
  theme,
  ownerState
}) => _extends$1({}, theme.typography.body1, {
  display: "flex",
  justifyContent: "flex-start",
  alignItems: "center",
  position: "relative",
  textDecoration: "none",
  minHeight: 48,
  paddingTop: 6,
  paddingBottom: 6,
  boxSizing: "border-box",
  whiteSpace: "nowrap"
}, !ownerState.disableGutters && {
  paddingLeft: 16,
  paddingRight: 16
}, ownerState.divider && {
  borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
  backgroundClip: "padding-box"
}, {
  "&:hover": {
    textDecoration: "none",
    backgroundColor: (theme.vars || theme).palette.action.hover,
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  },
  [`&.${menuItemClasses.selected}`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),
    [`&.${menuItemClasses.focusVisible}`]: {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
    }
  },
  [`&.${menuItemClasses.selected}:hover`]: {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : colorManipulatorExports.alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
    }
  },
  [`&.${menuItemClasses.focusVisible}`]: {
    backgroundColor: (theme.vars || theme).palette.action.focus
  },
  [`&.${menuItemClasses.disabled}`]: {
    opacity: (theme.vars || theme).palette.action.disabledOpacity
  },
  [`& + .${dividerClasses.root}`]: {
    marginTop: theme.spacing(1),
    marginBottom: theme.spacing(1)
  },
  [`& + .${dividerClasses.inset}`]: {
    marginLeft: 52
  },
  [`& .${listItemTextClasses.root}`]: {
    marginTop: 0,
    marginBottom: 0
  },
  [`& .${listItemTextClasses.inset}`]: {
    paddingLeft: 36
  },
  [`& .${listItemIconClasses.root}`]: {
    minWidth: 36
  }
}, !ownerState.dense && {
  [theme.breakpoints.up("sm")]: {
    minHeight: "auto"
  }
}, ownerState.dense && _extends$1({
  minHeight: 32,
  // https://m2.material.io/components/menus#specs > Dense
  paddingTop: 4,
  paddingBottom: 4
}, theme.typography.body2, {
  [`& .${listItemIconClasses.root} svg`]: {
    fontSize: "1.25rem"
  }
})));
const MenuItem = /* @__PURE__ */ reactExports.forwardRef(function MenuItem2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiMenuItem"
  });
  const {
    autoFocus = false,
    component = "li",
    dense = false,
    divider = false,
    disableGutters = false,
    focusVisibleClassName,
    role = "menuitem",
    tabIndex: tabIndexProp,
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$A);
  const context = reactExports.useContext(ListContext);
  const childContext = reactExports.useMemo(() => ({
    dense: dense || context.dense || false,
    disableGutters
  }), [context.dense, dense, disableGutters]);
  const menuItemRef = reactExports.useRef(null);
  useEnhancedEffect(() => {
    if (autoFocus) {
      if (menuItemRef.current) {
        menuItemRef.current.focus();
      }
    }
  }, [autoFocus]);
  const ownerState = _extends$1({}, props, {
    dense: childContext.dense,
    divider,
    disableGutters
  });
  const classes = useUtilityClasses$v(props);
  const handleRef = useForkRef(menuItemRef, ref2);
  let tabIndex;
  if (!props.disabled) {
    tabIndex = tabIndexProp !== void 0 ? tabIndexProp : -1;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ListContext.Provider, {
    value: childContext,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItemRoot, _extends$1({
      ref: handleRef,
      role,
      tabIndex,
      component,
      focusVisibleClassName: clsx$3(classes.focusVisible, focusVisibleClassName),
      className: clsx$3(classes.root, className)
    }, other, {
      ownerState,
      classes
    }))
  });
});
function getNativeSelectUtilityClasses(slot) {
  return generateUtilityClass("MuiNativeSelect", slot);
}
const nativeSelectClasses = generateUtilityClasses("MuiNativeSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
const _excluded$z = ["className", "disabled", "error", "IconComponent", "inputRef", "variant"];
const useUtilityClasses$u = (ownerState) => {
  const {
    classes,
    variant: variant2,
    disabled,
    multiple,
    open,
    error
  } = ownerState;
  const slots = {
    select: ["select", variant2, disabled && "disabled", multiple && "multiple", error && "error"],
    icon: ["icon", `icon${capitalize$2(variant2)}`, open && "iconOpen", disabled && "disabled"]
  };
  return composeClasses(slots, getNativeSelectUtilityClasses, classes);
};
const nativeSelectSelectStyles = ({
  ownerState,
  theme
}) => _extends$1({
  MozAppearance: "none",
  // Reset
  WebkitAppearance: "none",
  // Reset
  // When interacting quickly, the text can end up selected.
  // Native select can't be selected either.
  userSelect: "none",
  borderRadius: 0,
  // Reset
  cursor: "pointer",
  "&:focus": _extends$1({}, theme.vars ? {
    backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.05)`
  } : {
    backgroundColor: theme.palette.mode === "light" ? "rgba(0, 0, 0, 0.05)" : "rgba(255, 255, 255, 0.05)"
  }, {
    borderRadius: 0
    // Reset Chrome style
  }),
  // Remove IE11 arrow
  "&::-ms-expand": {
    display: "none"
  },
  [`&.${nativeSelectClasses.disabled}`]: {
    cursor: "default"
  },
  "&[multiple]": {
    height: "auto"
  },
  "&:not([multiple]) option, &:not([multiple]) optgroup": {
    backgroundColor: (theme.vars || theme).palette.background.paper
  },
  // Bump specificity to allow extending custom inputs
  "&&&": {
    paddingRight: 24,
    minWidth: 16
    // So it doesn't collapse.
  }
}, ownerState.variant === "filled" && {
  "&&&": {
    paddingRight: 32
  }
}, ownerState.variant === "outlined" && {
  borderRadius: (theme.vars || theme).shape.borderRadius,
  "&:focus": {
    borderRadius: (theme.vars || theme).shape.borderRadius
    // Reset the reset for Chrome style
  },
  "&&&": {
    paddingRight: 32
  }
});
const NativeSelectSelect = styled("select", {
  name: "MuiNativeSelect",
  slot: "Select",
  shouldForwardProp: rootShouldForwardProp,
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.select, styles2[ownerState.variant], ownerState.error && styles2.error, {
      [`&.${nativeSelectClasses.multiple}`]: styles2.multiple
    }];
  }
})(nativeSelectSelectStyles);
const nativeSelectIconStyles = ({
  ownerState,
  theme
}) => _extends$1({
  // We use a position absolute over a flexbox in order to forward the pointer events
  // to the input and to support wrapping tags..
  position: "absolute",
  right: 0,
  top: "calc(50% - .5em)",
  // Center vertically, height is 1em
  pointerEvents: "none",
  // Don't block pointer events on the select under the icon.
  color: (theme.vars || theme).palette.action.active,
  [`&.${nativeSelectClasses.disabled}`]: {
    color: (theme.vars || theme).palette.action.disabled
  }
}, ownerState.open && {
  transform: "rotate(180deg)"
}, ownerState.variant === "filled" && {
  right: 7
}, ownerState.variant === "outlined" && {
  right: 7
});
const NativeSelectIcon = styled("svg", {
  name: "MuiNativeSelect",
  slot: "Icon",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.icon, ownerState.variant && styles2[`icon${capitalize$2(ownerState.variant)}`], ownerState.open && styles2.iconOpen];
  }
})(nativeSelectIconStyles);
const NativeSelectInput = /* @__PURE__ */ reactExports.forwardRef(function NativeSelectInput2(props, ref2) {
  const {
    className,
    disabled,
    error,
    IconComponent,
    inputRef,
    variant: variant2 = "standard"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$z);
  const ownerState = _extends$1({}, props, {
    disabled,
    variant: variant2,
    error
  });
  const classes = useUtilityClasses$u(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(NativeSelectSelect, _extends$1({
      ownerState,
      className: clsx$3(classes.select, className),
      disabled,
      ref: inputRef || ref2
    }, other)), props.multiple ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(NativeSelectIcon, {
      as: IconComponent,
      ownerState,
      className: classes.icon
    })]
  });
});
var _span$1;
const _excluded$y = ["children", "classes", "className", "label", "notched"];
const NotchedOutlineRoot$1 = styled("fieldset", {
  shouldForwardProp: rootShouldForwardProp
})({
  textAlign: "left",
  position: "absolute",
  bottom: 0,
  right: 0,
  top: -5,
  left: 0,
  margin: 0,
  padding: "0 8px",
  pointerEvents: "none",
  borderRadius: "inherit",
  borderStyle: "solid",
  borderWidth: 1,
  overflow: "hidden",
  minWidth: "0%"
});
const NotchedOutlineLegend = styled("legend", {
  shouldForwardProp: rootShouldForwardProp
})(({
  ownerState,
  theme
}) => _extends$1({
  float: "unset",
  // Fix conflict with bootstrap
  width: "auto",
  // Fix conflict with bootstrap
  overflow: "hidden"
}, !ownerState.withLabel && {
  padding: 0,
  lineHeight: "11px",
  // sync with `height` in `legend` styles
  transition: theme.transitions.create("width", {
    duration: 150,
    easing: theme.transitions.easing.easeOut
  })
}, ownerState.withLabel && _extends$1({
  display: "block",
  // Fix conflict with normalize.css and sanitize.css
  padding: 0,
  height: 11,
  // sync with `lineHeight` in `legend` styles
  fontSize: "0.75em",
  visibility: "hidden",
  maxWidth: 0.01,
  transition: theme.transitions.create("max-width", {
    duration: 50,
    easing: theme.transitions.easing.easeOut
  }),
  whiteSpace: "nowrap",
  "& > span": {
    paddingLeft: 5,
    paddingRight: 5,
    display: "inline-block",
    opacity: 0,
    visibility: "visible"
  }
}, ownerState.notched && {
  maxWidth: "100%",
  transition: theme.transitions.create("max-width", {
    duration: 100,
    easing: theme.transitions.easing.easeOut,
    delay: 50
  })
})));
function NotchedOutline(props) {
  const {
    className,
    label,
    notched
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$y);
  const withLabel = label != null && label !== "";
  const ownerState = _extends$1({}, props, {
    notched,
    withLabel
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(NotchedOutlineRoot$1, _extends$1({
    "aria-hidden": true,
    className,
    ownerState
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(NotchedOutlineLegend, {
      ownerState,
      children: withLabel ? /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
        children: label
      }) : (
        // notranslate needed while Google Translate will not fix zero-width space issue
        _span$1 || (_span$1 = /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
          className: "notranslate",
          children: "​"
        }))
      )
    })
  }));
}
const _excluded$x = ["components", "fullWidth", "inputComponent", "label", "multiline", "notched", "slots", "type"];
const useUtilityClasses$t = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    notchedOutline: ["notchedOutline"],
    input: ["input"]
  };
  const composedClasses = composeClasses(slots, getOutlinedInputUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const OutlinedInputRoot = styled(InputBaseRoot, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiOutlinedInput",
  slot: "Root",
  overridesResolver: rootOverridesResolver
})(({
  theme,
  ownerState
}) => {
  const borderColor2 = theme.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
  return _extends$1({
    position: "relative",
    borderRadius: (theme.vars || theme).shape.borderRadius,
    [`&:hover .${outlinedInputClasses.notchedOutline}`]: {
      borderColor: (theme.vars || theme).palette.text.primary
    },
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      [`&:hover .${outlinedInputClasses.notchedOutline}`]: {
        borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor2
      }
    },
    [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {
      borderColor: (theme.vars || theme).palette[ownerState.color].main,
      borderWidth: 2
    },
    [`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {
      borderColor: (theme.vars || theme).palette.error.main
    },
    [`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]: {
      borderColor: (theme.vars || theme).palette.action.disabled
    }
  }, ownerState.startAdornment && {
    paddingLeft: 14
  }, ownerState.endAdornment && {
    paddingRight: 14
  }, ownerState.multiline && _extends$1({
    padding: "16.5px 14px"
  }, ownerState.size === "small" && {
    padding: "8.5px 14px"
  }));
});
const NotchedOutlineRoot = styled(NotchedOutline, {
  name: "MuiOutlinedInput",
  slot: "NotchedOutline",
  overridesResolver: (props, styles2) => styles2.notchedOutline
})(({
  theme
}) => {
  const borderColor2 = theme.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)";
  return {
    borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor2
  };
});
const OutlinedInputInput = styled(InputBaseComponent, {
  name: "MuiOutlinedInput",
  slot: "Input",
  overridesResolver: inputOverridesResolver
})(({
  theme,
  ownerState
}) => _extends$1({
  padding: "16.5px 14px"
}, !theme.vars && {
  "&:-webkit-autofill": {
    WebkitBoxShadow: theme.palette.mode === "light" ? null : "0 0 0 100px #266798 inset",
    WebkitTextFillColor: theme.palette.mode === "light" ? null : "#fff",
    caretColor: theme.palette.mode === "light" ? null : "#fff",
    borderRadius: "inherit"
  }
}, theme.vars && {
  "&:-webkit-autofill": {
    borderRadius: "inherit"
  },
  [theme.getColorSchemeSelector("dark")]: {
    "&:-webkit-autofill": {
      WebkitBoxShadow: "0 0 0 100px #266798 inset",
      WebkitTextFillColor: "#fff",
      caretColor: "#fff"
    }
  }
}, ownerState.size === "small" && {
  padding: "8.5px 14px"
}, ownerState.multiline && {
  padding: 0
}, ownerState.startAdornment && {
  paddingLeft: 0
}, ownerState.endAdornment && {
  paddingRight: 0
}));
const OutlinedInput = /* @__PURE__ */ reactExports.forwardRef(function OutlinedInput2(inProps, ref2) {
  var _ref, _slots$root, _ref2, _slots$input, _React$Fragment;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiOutlinedInput"
  });
  const {
    components = {},
    fullWidth = false,
    inputComponent = "input",
    label,
    multiline = false,
    notched,
    slots = {},
    type: type2 = "text"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$x);
  const classes = useUtilityClasses$t(props);
  const muiFormControl = useFormControl();
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["color", "disabled", "error", "focused", "hiddenLabel", "size", "required"]
  });
  const ownerState = _extends$1({}, props, {
    color: fcs.color || "primary",
    disabled: fcs.disabled,
    error: fcs.error,
    focused: fcs.focused,
    formControl: muiFormControl,
    fullWidth,
    hiddenLabel: fcs.hiddenLabel,
    multiline,
    size: fcs.size,
    type: type2
  });
  const RootSlot = (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : OutlinedInputRoot;
  const InputSlot = (_ref2 = (_slots$input = slots.input) != null ? _slots$input : components.Input) != null ? _ref2 : OutlinedInputInput;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(InputBase, _extends$1({
    slots: {
      root: RootSlot,
      input: InputSlot
    },
    renderSuffix: (state) => /* @__PURE__ */ jsxRuntimeExports.jsx(NotchedOutlineRoot, {
      ownerState,
      className: classes.notchedOutline,
      label: label != null && label !== "" && fcs.required ? _React$Fragment || (_React$Fragment = /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
        children: [label, " ", "*"]
      })) : label,
      notched: typeof notched !== "undefined" ? notched : Boolean(state.startAdornment || state.filled || state.focused)
    }),
    fullWidth,
    inputComponent,
    multiline,
    ref: ref2,
    type: type2
  }, other, {
    classes: _extends$1({}, classes, {
      notchedOutline: null
    })
  }));
});
OutlinedInput.muiName = "Input";
function getPaginationUtilityClass(slot) {
  return generateUtilityClass("MuiPagination", slot);
}
generateUtilityClasses("MuiPagination", ["root", "ul", "outlined", "text"]);
const _excluded$w = ["boundaryCount", "componentName", "count", "defaultPage", "disabled", "hideNextButton", "hidePrevButton", "onChange", "page", "showFirstButton", "showLastButton", "siblingCount"];
function usePagination(props = {}) {
  const {
    boundaryCount = 1,
    componentName = "usePagination",
    count = 1,
    defaultPage = 1,
    disabled = false,
    hideNextButton = false,
    hidePrevButton = false,
    onChange: handleChange,
    page: pageProp,
    showFirstButton = false,
    showLastButton = false,
    siblingCount = 1
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$w);
  const [page, setPageState] = useControlled({
    controlled: pageProp,
    default: defaultPage,
    name: componentName,
    state: "page"
  });
  const handleClick = (event, value) => {
    if (!pageProp) {
      setPageState(value);
    }
    if (handleChange) {
      handleChange(event, value);
    }
  };
  const range2 = (start2, end2) => {
    const length2 = end2 - start2 + 1;
    return Array.from({
      length: length2
    }, (_2, i) => start2 + i);
  };
  const startPages = range2(1, Math.min(boundaryCount, count));
  const endPages = range2(Math.max(count - boundaryCount + 1, boundaryCount + 1), count);
  const siblingsStart = Math.max(
    Math.min(
      // Natural start
      page - siblingCount,
      // Lower boundary when page is high
      count - boundaryCount - siblingCount * 2 - 1
    ),
    // Greater than startPages
    boundaryCount + 2
  );
  const siblingsEnd = Math.min(
    Math.max(
      // Natural end
      page + siblingCount,
      // Upper boundary when page is low
      boundaryCount + siblingCount * 2 + 2
    ),
    // Less than endPages
    endPages.length > 0 ? endPages[0] - 2 : count - 1
  );
  const itemList = [
    ...showFirstButton ? ["first"] : [],
    ...hidePrevButton ? [] : ["previous"],
    ...startPages,
    // Start ellipsis
    // eslint-disable-next-line no-nested-ternary
    ...siblingsStart > boundaryCount + 2 ? ["start-ellipsis"] : boundaryCount + 1 < count - boundaryCount ? [boundaryCount + 1] : [],
    // Sibling pages
    ...range2(siblingsStart, siblingsEnd),
    // End ellipsis
    // eslint-disable-next-line no-nested-ternary
    ...siblingsEnd < count - boundaryCount - 1 ? ["end-ellipsis"] : count - boundaryCount > boundaryCount ? [count - boundaryCount] : [],
    ...endPages,
    ...hideNextButton ? [] : ["next"],
    ...showLastButton ? ["last"] : []
  ];
  const buttonPage = (type2) => {
    switch (type2) {
      case "first":
        return 1;
      case "previous":
        return page - 1;
      case "next":
        return page + 1;
      case "last":
        return count;
      default:
        return null;
    }
  };
  const items = itemList.map((item) => {
    return typeof item === "number" ? {
      onClick: (event) => {
        handleClick(event, item);
      },
      type: "page",
      page: item,
      selected: item === page,
      disabled,
      "aria-current": item === page ? "true" : void 0
    } : {
      onClick: (event) => {
        handleClick(event, buttonPage(item));
      },
      type: item,
      page: buttonPage(item),
      selected: false,
      disabled: disabled || item.indexOf("ellipsis") === -1 && (item === "next" || item === "last" ? page >= count : page <= 1)
    };
  });
  return _extends$1({
    items
  }, other);
}
function getPaginationItemUtilityClass(slot) {
  return generateUtilityClass("MuiPaginationItem", slot);
}
const paginationItemClasses = generateUtilityClasses("MuiPaginationItem", ["root", "page", "sizeSmall", "sizeLarge", "text", "textPrimary", "textSecondary", "outlined", "outlinedPrimary", "outlinedSecondary", "rounded", "ellipsis", "firstLast", "previousNext", "focusVisible", "disabled", "selected", "icon", "colorPrimary", "colorSecondary"]);
const FirstPageIconDefault = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"
}), "FirstPage");
const LastPageIconDefault = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"
}), "LastPage");
const NavigateBeforeIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"
}), "NavigateBefore");
const NavigateNextIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
}), "NavigateNext");
const _excluded$v = ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "slots", "type", "variant"];
const overridesResolver$1 = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.root, styles2[ownerState.variant], styles2[`size${capitalize$2(ownerState.size)}`], ownerState.variant === "text" && styles2[`text${capitalize$2(ownerState.color)}`], ownerState.variant === "outlined" && styles2[`outlined${capitalize$2(ownerState.color)}`], ownerState.shape === "rounded" && styles2.rounded, ownerState.type === "page" && styles2.page, (ownerState.type === "start-ellipsis" || ownerState.type === "end-ellipsis") && styles2.ellipsis, (ownerState.type === "previous" || ownerState.type === "next") && styles2.previousNext, (ownerState.type === "first" || ownerState.type === "last") && styles2.firstLast];
};
const useUtilityClasses$s = (ownerState) => {
  const {
    classes,
    color: color2,
    disabled,
    selected,
    size,
    shape: shape2,
    type: type2,
    variant: variant2
  } = ownerState;
  const slots = {
    root: ["root", `size${capitalize$2(size)}`, variant2, shape2, color2 !== "standard" && `color${capitalize$2(color2)}`, color2 !== "standard" && `${variant2}${capitalize$2(color2)}`, disabled && "disabled", selected && "selected", {
      page: "page",
      first: "firstLast",
      last: "firstLast",
      "start-ellipsis": "ellipsis",
      "end-ellipsis": "ellipsis",
      previous: "previousNext",
      next: "previousNext"
    }[type2]],
    icon: ["icon"]
  };
  return composeClasses(slots, getPaginationItemUtilityClass, classes);
};
const PaginationItemEllipsis = styled("div", {
  name: "MuiPaginationItem",
  slot: "Root",
  overridesResolver: overridesResolver$1
})(({
  theme,
  ownerState
}) => _extends$1({}, theme.typography.body2, {
  borderRadius: 32 / 2,
  textAlign: "center",
  boxSizing: "border-box",
  minWidth: 32,
  padding: "0 6px",
  margin: "0 3px",
  color: (theme.vars || theme).palette.text.primary,
  height: "auto",
  [`&.${paginationItemClasses.disabled}`]: {
    opacity: (theme.vars || theme).palette.action.disabledOpacity
  }
}, ownerState.size === "small" && {
  minWidth: 26,
  borderRadius: 26 / 2,
  margin: "0 1px",
  padding: "0 4px"
}, ownerState.size === "large" && {
  minWidth: 40,
  borderRadius: 40 / 2,
  padding: "0 10px",
  fontSize: theme.typography.pxToRem(15)
}));
const PaginationItemPage = styled(ButtonBase, {
  name: "MuiPaginationItem",
  slot: "Root",
  overridesResolver: overridesResolver$1
})(({
  theme,
  ownerState
}) => _extends$1({}, theme.typography.body2, {
  borderRadius: 32 / 2,
  textAlign: "center",
  boxSizing: "border-box",
  minWidth: 32,
  height: 32,
  padding: "0 6px",
  margin: "0 3px",
  color: (theme.vars || theme).palette.text.primary,
  [`&.${paginationItemClasses.focusVisible}`]: {
    backgroundColor: (theme.vars || theme).palette.action.focus
  },
  [`&.${paginationItemClasses.disabled}`]: {
    opacity: (theme.vars || theme).palette.action.disabledOpacity
  },
  transition: theme.transitions.create(["color", "background-color"], {
    duration: theme.transitions.duration.short
  }),
  "&:hover": {
    backgroundColor: (theme.vars || theme).palette.action.hover,
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  },
  [`&.${paginationItemClasses.selected}`]: {
    backgroundColor: (theme.vars || theme).palette.action.selected,
    "&:hover": {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : colorManipulatorExports.alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: (theme.vars || theme).palette.action.selected
      }
    },
    [`&.${paginationItemClasses.focusVisible}`]: {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
    },
    [`&.${paginationItemClasses.disabled}`]: {
      opacity: 1,
      color: (theme.vars || theme).palette.action.disabled,
      backgroundColor: (theme.vars || theme).palette.action.selected
    }
  }
}, ownerState.size === "small" && {
  minWidth: 26,
  height: 26,
  borderRadius: 26 / 2,
  margin: "0 1px",
  padding: "0 4px"
}, ownerState.size === "large" && {
  minWidth: 40,
  height: 40,
  borderRadius: 40 / 2,
  padding: "0 10px",
  fontSize: theme.typography.pxToRem(15)
}, ownerState.shape === "rounded" && {
  borderRadius: (theme.vars || theme).shape.borderRadius
}), ({
  theme,
  ownerState
}) => _extends$1({}, ownerState.variant === "text" && {
  [`&.${paginationItemClasses.selected}`]: _extends$1({}, ownerState.color !== "standard" && {
    color: (theme.vars || theme).palette[ownerState.color].contrastText,
    backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
    "&:hover": {
      backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: (theme.vars || theme).palette[ownerState.color].main
      }
    },
    [`&.${paginationItemClasses.focusVisible}`]: {
      backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
    }
  }, {
    [`&.${paginationItemClasses.disabled}`]: {
      color: (theme.vars || theme).palette.action.disabled
    }
  })
}, ownerState.variant === "outlined" && {
  border: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === "light" ? "rgba(0, 0, 0, 0.23)" : "rgba(255, 255, 255, 0.23)"}`,
  [`&.${paginationItemClasses.selected}`]: _extends$1({}, ownerState.color !== "standard" && {
    color: (theme.vars || theme).palette[ownerState.color].main,
    border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, 0.5)}`,
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.activatedOpacity})` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity),
    "&:hover": {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / calc(${theme.vars.palette.action.activatedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity),
      // Reset on touch devices, it doesn't add specificity
      "@media (hover: none)": {
        backgroundColor: "transparent"
      }
    },
    [`&.${paginationItemClasses.focusVisible}`]: {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / calc(${theme.vars.palette.action.activatedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : colorManipulatorExports.alpha(theme.palette[ownerState.color].main, theme.palette.action.activatedOpacity + theme.palette.action.focusOpacity)
    }
  }, {
    [`&.${paginationItemClasses.disabled}`]: {
      borderColor: (theme.vars || theme).palette.action.disabledBackground,
      color: (theme.vars || theme).palette.action.disabled
    }
  })
}));
const PaginationItemPageIcon = styled("div", {
  name: "MuiPaginationItem",
  slot: "Icon",
  overridesResolver: (props, styles2) => styles2.icon
})(({
  theme,
  ownerState
}) => _extends$1({
  fontSize: theme.typography.pxToRem(20),
  margin: "0 -8px"
}, ownerState.size === "small" && {
  fontSize: theme.typography.pxToRem(18)
}, ownerState.size === "large" && {
  fontSize: theme.typography.pxToRem(22)
}));
const PaginationItem = /* @__PURE__ */ reactExports.forwardRef(function PaginationItem2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiPaginationItem"
  });
  const {
    className,
    color: color2 = "standard",
    component,
    components = {},
    disabled = false,
    page,
    selected = false,
    shape: shape2 = "circular",
    size = "medium",
    slots = {},
    type: type2 = "page",
    variant: variant2 = "text"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$v);
  const ownerState = _extends$1({}, props, {
    color: color2,
    disabled,
    selected,
    shape: shape2,
    size,
    type: type2,
    variant: variant2
  });
  const isRtl = useRtl();
  const classes = useUtilityClasses$s(ownerState);
  const normalizedIcons = isRtl ? {
    previous: slots.next || components.next || NavigateNextIcon$1,
    next: slots.previous || components.previous || NavigateBeforeIcon,
    last: slots.first || components.first || FirstPageIconDefault,
    first: slots.last || components.last || LastPageIconDefault
  } : {
    previous: slots.previous || components.previous || NavigateBeforeIcon,
    next: slots.next || components.next || NavigateNextIcon$1,
    first: slots.first || components.first || FirstPageIconDefault,
    last: slots.last || components.last || LastPageIconDefault
  };
  const Icon = normalizedIcons[type2];
  return type2 === "start-ellipsis" || type2 === "end-ellipsis" ? /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationItemEllipsis, {
    ref: ref2,
    ownerState,
    className: clsx$3(classes.root, className),
    children: "…"
  }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(PaginationItemPage, _extends$1({
    ref: ref2,
    ownerState,
    component,
    disabled,
    className: clsx$3(classes.root, className)
  }, other, {
    children: [type2 === "page" && page, Icon ? /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationItemPageIcon, {
      as: Icon,
      ownerState,
      className: classes.icon
    }) : null]
  }));
});
const _excluded$u = ["boundaryCount", "className", "color", "count", "defaultPage", "disabled", "getItemAriaLabel", "hideNextButton", "hidePrevButton", "onChange", "page", "renderItem", "shape", "showFirstButton", "showLastButton", "siblingCount", "size", "variant"];
const useUtilityClasses$r = (ownerState) => {
  const {
    classes,
    variant: variant2
  } = ownerState;
  const slots = {
    root: ["root", variant2],
    ul: ["ul"]
  };
  return composeClasses(slots, getPaginationUtilityClass, classes);
};
const PaginationRoot = styled("nav", {
  name: "MuiPagination",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.variant]];
  }
})({});
const PaginationUl = styled("ul", {
  name: "MuiPagination",
  slot: "Ul",
  overridesResolver: (props, styles2) => styles2.ul
})({
  display: "flex",
  flexWrap: "wrap",
  alignItems: "center",
  padding: 0,
  margin: 0,
  listStyle: "none"
});
function defaultGetAriaLabel(type2, page, selected) {
  if (type2 === "page") {
    return `${selected ? "" : "Go to "}page ${page}`;
  }
  return `Go to ${type2} page`;
}
const Pagination = /* @__PURE__ */ reactExports.forwardRef(function Pagination2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiPagination"
  });
  const {
    boundaryCount = 1,
    className,
    color: color2 = "standard",
    count = 1,
    defaultPage = 1,
    disabled = false,
    getItemAriaLabel = defaultGetAriaLabel,
    hideNextButton = false,
    hidePrevButton = false,
    renderItem = (item) => /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationItem, _extends$1({}, item)),
    shape: shape2 = "circular",
    showFirstButton = false,
    showLastButton = false,
    siblingCount = 1,
    size = "medium",
    variant: variant2 = "text"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$u);
  const {
    items
  } = usePagination(_extends$1({}, props, {
    componentName: "Pagination"
  }));
  const ownerState = _extends$1({}, props, {
    boundaryCount,
    color: color2,
    count,
    defaultPage,
    disabled,
    getItemAriaLabel,
    hideNextButton,
    hidePrevButton,
    renderItem,
    shape: shape2,
    showFirstButton,
    showLastButton,
    siblingCount,
    size,
    variant: variant2
  });
  const classes = useUtilityClasses$r(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationRoot, _extends$1({
    "aria-label": "pagination navigation",
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationUl, {
      className: classes.ul,
      ownerState,
      children: items.map((item, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx("li", {
        children: renderItem(_extends$1({}, item, {
          color: color2,
          "aria-label": getItemAriaLabel(item.type, item.page, item.selected),
          shape: shape2,
          size,
          variant: variant2
        }))
      }, index2))
    })
  }));
});
const RadioButtonUncheckedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
}), "RadioButtonUnchecked");
const RadioButtonCheckedIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M8.465 8.465C9.37 7.56 10.62 7 12 7C14.76 7 17 9.24 17 12C17 13.38 16.44 14.63 15.535 15.535C14.63 16.44 13.38 17 12 17C9.24 17 7 14.76 7 12C7 10.62 7.56 9.37 8.465 8.465Z"
}), "RadioButtonChecked");
const RadioButtonIconRoot = styled("span", {
  shouldForwardProp: rootShouldForwardProp
})({
  position: "relative",
  display: "flex"
});
const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon)({
  // Scale applied to prevent dot misalignment in Safari
  transform: "scale(1)"
});
const RadioButtonIconDot = styled(RadioButtonCheckedIcon)(({
  theme,
  ownerState
}) => _extends$1({
  left: 0,
  position: "absolute",
  transform: "scale(0)",
  transition: theme.transitions.create("transform", {
    easing: theme.transitions.easing.easeIn,
    duration: theme.transitions.duration.shortest
  })
}, ownerState.checked && {
  transform: "scale(1)",
  transition: theme.transitions.create("transform", {
    easing: theme.transitions.easing.easeOut,
    duration: theme.transitions.duration.shortest
  })
}));
function RadioButtonIcon(props) {
  const {
    checked = false,
    classes = {},
    fontSize: fontSize2
  } = props;
  const ownerState = _extends$1({}, props, {
    checked
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioButtonIconRoot, {
    className: classes.root,
    ownerState,
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(RadioButtonIconBackground, {
      fontSize: fontSize2,
      className: classes.background,
      ownerState
    }), /* @__PURE__ */ jsxRuntimeExports.jsx(RadioButtonIconDot, {
      fontSize: fontSize2,
      className: classes.dot,
      ownerState
    })]
  });
}
const RadioGroupContext = /* @__PURE__ */ reactExports.createContext(void 0);
function useRadioGroup() {
  return reactExports.useContext(RadioGroupContext);
}
function getRadioUtilityClass(slot) {
  return generateUtilityClass("MuiRadio", slot);
}
const radioClasses = generateUtilityClasses("MuiRadio", ["root", "checked", "disabled", "colorPrimary", "colorSecondary", "sizeSmall"]);
const _excluded$t = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"];
const useUtilityClasses$q = (ownerState) => {
  const {
    classes,
    color: color2,
    size
  } = ownerState;
  const slots = {
    root: ["root", `color${capitalize$2(color2)}`, size !== "medium" && `size${capitalize$2(size)}`]
  };
  return _extends$1({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
};
const RadioRoot = styled(SwitchBase, {
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) || prop === "classes",
  name: "MuiRadio",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.size !== "medium" && styles2[`size${capitalize$2(ownerState.size)}`], styles2[`color${capitalize$2(ownerState.color)}`]];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  color: (theme.vars || theme).palette.text.secondary
}, !ownerState.disableRipple && {
  "&:hover": {
    backgroundColor: theme.vars ? `rgba(${ownerState.color === "default" ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(ownerState.color === "default" ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  }
}, ownerState.color !== "default" && {
  [`&.${radioClasses.checked}`]: {
    color: (theme.vars || theme).palette[ownerState.color].main
  }
}, {
  [`&.${radioClasses.disabled}`]: {
    color: (theme.vars || theme).palette.action.disabled
  }
}));
function areEqualValues$1(a2, b2) {
  if (typeof b2 === "object" && b2 !== null) {
    return a2 === b2;
  }
  return String(a2) === String(b2);
}
const defaultCheckedIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(RadioButtonIcon, {
  checked: true
});
const defaultIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(RadioButtonIcon, {});
const Radio = /* @__PURE__ */ reactExports.forwardRef(function Radio2(inProps, ref2) {
  var _defaultIcon$props$fo, _defaultCheckedIcon$p;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiRadio"
  });
  const {
    checked: checkedProp,
    checkedIcon = defaultCheckedIcon,
    color: color2 = "primary",
    icon = defaultIcon,
    name: nameProp,
    onChange: onChangeProp,
    size = "medium",
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$t);
  const ownerState = _extends$1({}, props, {
    color: color2,
    size
  });
  const classes = useUtilityClasses$q(ownerState);
  const radioGroup = useRadioGroup();
  let checked = checkedProp;
  const onChange = createChainedFunction(onChangeProp, radioGroup && radioGroup.onChange);
  let name = nameProp;
  if (radioGroup) {
    if (typeof checked === "undefined") {
      checked = areEqualValues$1(radioGroup.value, props.value);
    }
    if (typeof name === "undefined") {
      name = radioGroup.name;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioRoot, _extends$1({
    type: "radio",
    icon: /* @__PURE__ */ reactExports.cloneElement(icon, {
      fontSize: (_defaultIcon$props$fo = defaultIcon.props.fontSize) != null ? _defaultIcon$props$fo : size
    }),
    checkedIcon: /* @__PURE__ */ reactExports.cloneElement(checkedIcon, {
      fontSize: (_defaultCheckedIcon$p = defaultCheckedIcon.props.fontSize) != null ? _defaultCheckedIcon$p : size
    }),
    ownerState,
    classes,
    name,
    checked,
    onChange,
    ref: ref2,
    className: clsx$3(classes.root, className)
  }, other));
});
function getRadioGroupUtilityClass(slot) {
  return generateUtilityClass("MuiRadioGroup", slot);
}
generateUtilityClasses("MuiRadioGroup", ["root", "row", "error"]);
const _excluded$s = ["actions", "children", "className", "defaultValue", "name", "onChange", "value"];
const useUtilityClasses$p = (props) => {
  const {
    classes,
    row,
    error
  } = props;
  const slots = {
    root: ["root", row && "row", error && "error"]
  };
  return composeClasses(slots, getRadioGroupUtilityClass, classes);
};
const RadioGroup = /* @__PURE__ */ reactExports.forwardRef(function RadioGroup2(props, ref2) {
  const {
    // private
    // eslint-disable-next-line react/prop-types
    actions,
    children,
    className,
    defaultValue,
    name: nameProp,
    onChange,
    value: valueProp
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$s);
  const rootRef = reactExports.useRef(null);
  const classes = useUtilityClasses$p(props);
  const [value, setValueState] = useControlled({
    controlled: valueProp,
    default: defaultValue,
    name: "RadioGroup"
  });
  reactExports.useImperativeHandle(actions, () => ({
    focus: () => {
      let input = rootRef.current.querySelector("input:not(:disabled):checked");
      if (!input) {
        input = rootRef.current.querySelector("input:not(:disabled)");
      }
      if (input) {
        input.focus();
      }
    }
  }), []);
  const handleRef = useForkRef(ref2, rootRef);
  const name = useId$1(nameProp);
  const contextValue = reactExports.useMemo(() => ({
    name,
    onChange(event) {
      setValueState(event.target.value);
      if (onChange) {
        onChange(event, event.target.value);
      }
    },
    value
  }), [name, onChange, setValueState, value]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(RadioGroupContext.Provider, {
    value: contextValue,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormGroup, _extends$1({
      role: "radiogroup",
      ref: handleRef,
      className: clsx$3(classes.root, className)
    }, other, {
      children
    }))
  });
});
function getSelectUtilityClasses(slot) {
  return generateUtilityClass("MuiSelect", slot);
}
const selectClasses = generateUtilityClasses("MuiSelect", ["root", "select", "multiple", "filled", "outlined", "standard", "disabled", "focused", "icon", "iconOpen", "iconFilled", "iconOutlined", "iconStandard", "nativeInput", "error"]);
var _span;
const _excluded$r = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "error", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
const SelectSelect = styled("div", {
  name: "MuiSelect",
  slot: "Select",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [
      // Win specificity over the input base
      {
        [`&.${selectClasses.select}`]: styles2.select
      },
      {
        [`&.${selectClasses.select}`]: styles2[ownerState.variant]
      },
      {
        [`&.${selectClasses.error}`]: styles2.error
      },
      {
        [`&.${selectClasses.multiple}`]: styles2.multiple
      }
    ];
  }
})(nativeSelectSelectStyles, {
  // Win specificity over the input base
  [`&.${selectClasses.select}`]: {
    height: "auto",
    // Resets for multiple select with chips
    minHeight: "1.4375em",
    // Required for select\text-field height consistency
    textOverflow: "ellipsis",
    whiteSpace: "nowrap",
    overflow: "hidden"
  }
});
const SelectIcon = styled("svg", {
  name: "MuiSelect",
  slot: "Icon",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.icon, ownerState.variant && styles2[`icon${capitalize$2(ownerState.variant)}`], ownerState.open && styles2.iconOpen];
  }
})(nativeSelectIconStyles);
const SelectNativeInput = styled("input", {
  shouldForwardProp: (prop) => slotShouldForwardProp(prop) && prop !== "classes",
  name: "MuiSelect",
  slot: "NativeInput",
  overridesResolver: (props, styles2) => styles2.nativeInput
})({
  bottom: 0,
  left: 0,
  position: "absolute",
  opacity: 0,
  pointerEvents: "none",
  width: "100%",
  boxSizing: "border-box"
});
function areEqualValues(a2, b2) {
  if (typeof b2 === "object" && b2 !== null) {
    return a2 === b2;
  }
  return String(a2) === String(b2);
}
function isEmpty(display2) {
  return display2 == null || typeof display2 === "string" && !display2.trim();
}
const useUtilityClasses$o = (ownerState) => {
  const {
    classes,
    variant: variant2,
    disabled,
    multiple,
    open,
    error
  } = ownerState;
  const slots = {
    select: ["select", variant2, disabled && "disabled", multiple && "multiple", error && "error"],
    icon: ["icon", `icon${capitalize$2(variant2)}`, open && "iconOpen", disabled && "disabled"],
    nativeInput: ["nativeInput"]
  };
  return composeClasses(slots, getSelectUtilityClasses, classes);
};
const SelectInput = /* @__PURE__ */ reactExports.forwardRef(function SelectInput2(props, ref2) {
  var _MenuProps$slotProps;
  const {
    "aria-describedby": ariaDescribedby,
    "aria-label": ariaLabel,
    autoFocus,
    autoWidth,
    children,
    className,
    defaultOpen,
    defaultValue,
    disabled,
    displayEmpty,
    error = false,
    IconComponent,
    inputRef: inputRefProp,
    labelId,
    MenuProps = {},
    multiple,
    name,
    onBlur,
    onChange,
    onClose,
    onFocus,
    onOpen,
    open: openProp,
    readOnly,
    renderValue,
    SelectDisplayProps = {},
    tabIndex: tabIndexProp,
    value: valueProp,
    variant: variant2 = "standard"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$r);
  const [value, setValueState] = useControlled({
    controlled: valueProp,
    default: defaultValue,
    name: "Select"
  });
  const [openState, setOpenState] = useControlled({
    controlled: openProp,
    default: defaultOpen,
    name: "Select"
  });
  const inputRef = reactExports.useRef(null);
  const displayRef = reactExports.useRef(null);
  const [displayNode, setDisplayNode] = reactExports.useState(null);
  const {
    current: isOpenControlled
  } = reactExports.useRef(openProp != null);
  const [menuMinWidthState, setMenuMinWidthState] = reactExports.useState();
  const handleRef = useForkRef(ref2, inputRefProp);
  const handleDisplayRef = reactExports.useCallback((node2) => {
    displayRef.current = node2;
    if (node2) {
      setDisplayNode(node2);
    }
  }, []);
  const anchorElement = displayNode == null ? void 0 : displayNode.parentNode;
  reactExports.useImperativeHandle(handleRef, () => ({
    focus: () => {
      displayRef.current.focus();
    },
    node: inputRef.current,
    value
  }), [value]);
  reactExports.useEffect(() => {
    if (defaultOpen && openState && displayNode && !isOpenControlled) {
      setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
      displayRef.current.focus();
    }
  }, [displayNode, autoWidth]);
  reactExports.useEffect(() => {
    if (autoFocus) {
      displayRef.current.focus();
    }
  }, [autoFocus]);
  reactExports.useEffect(() => {
    if (!labelId) {
      return void 0;
    }
    const label = ownerDocument(displayRef.current).getElementById(labelId);
    if (label) {
      const handler = () => {
        if (getSelection().isCollapsed) {
          displayRef.current.focus();
        }
      };
      label.addEventListener("click", handler);
      return () => {
        label.removeEventListener("click", handler);
      };
    }
    return void 0;
  }, [labelId]);
  const update = (open2, event) => {
    if (open2) {
      if (onOpen) {
        onOpen(event);
      }
    } else if (onClose) {
      onClose(event);
    }
    if (!isOpenControlled) {
      setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
      setOpenState(open2);
    }
  };
  const handleMouseDown = (event) => {
    if (event.button !== 0) {
      return;
    }
    event.preventDefault();
    displayRef.current.focus();
    update(true, event);
  };
  const handleClose = (event) => {
    update(false, event);
  };
  const childrenArray = reactExports.Children.toArray(children);
  const handleChange = (event) => {
    const child = childrenArray.find((childItem) => childItem.props.value === event.target.value);
    if (child === void 0) {
      return;
    }
    setValueState(child.props.value);
    if (onChange) {
      onChange(event, child);
    }
  };
  const handleItemClick = (child) => (event) => {
    let newValue;
    if (!event.currentTarget.hasAttribute("tabindex")) {
      return;
    }
    if (multiple) {
      newValue = Array.isArray(value) ? value.slice() : [];
      const itemIndex = value.indexOf(child.props.value);
      if (itemIndex === -1) {
        newValue.push(child.props.value);
      } else {
        newValue.splice(itemIndex, 1);
      }
    } else {
      newValue = child.props.value;
    }
    if (child.props.onClick) {
      child.props.onClick(event);
    }
    if (value !== newValue) {
      setValueState(newValue);
      if (onChange) {
        const nativeEvent = event.nativeEvent || event;
        const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
        Object.defineProperty(clonedEvent, "target", {
          writable: true,
          value: {
            value: newValue,
            name
          }
        });
        onChange(clonedEvent, child);
      }
    }
    if (!multiple) {
      update(false, event);
    }
  };
  const handleKeyDown2 = (event) => {
    if (!readOnly) {
      const validKeys = [
        " ",
        "ArrowUp",
        "ArrowDown",
        // The native select doesn't respond to enter on macOS, but it's recommended by
        // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/
        "Enter"
      ];
      if (validKeys.indexOf(event.key) !== -1) {
        event.preventDefault();
        update(true, event);
      }
    }
  };
  const open = displayNode !== null && openState;
  const handleBlur = (event) => {
    if (!open && onBlur) {
      Object.defineProperty(event, "target", {
        writable: true,
        value: {
          value,
          name
        }
      });
      onBlur(event);
    }
  };
  delete other["aria-invalid"];
  let display2;
  let displaySingle;
  const displayMultiple = [];
  let computeDisplay = false;
  if (isFilled({
    value
  }) || displayEmpty) {
    if (renderValue) {
      display2 = renderValue(value);
    } else {
      computeDisplay = true;
    }
  }
  const items = childrenArray.map((child) => {
    if (!/* @__PURE__ */ reactExports.isValidElement(child)) {
      return null;
    }
    let selected;
    if (multiple) {
      if (!Array.isArray(value)) {
        throw new Error(formatMuiErrorMessage$1(2));
      }
      selected = value.some((v2) => areEqualValues(v2, child.props.value));
      if (selected && computeDisplay) {
        displayMultiple.push(child.props.children);
      }
    } else {
      selected = areEqualValues(value, child.props.value);
      if (selected && computeDisplay) {
        displaySingle = child.props.children;
      }
    }
    return /* @__PURE__ */ reactExports.cloneElement(child, {
      "aria-selected": selected ? "true" : "false",
      onClick: handleItemClick(child),
      onKeyUp: (event) => {
        if (event.key === " ") {
          event.preventDefault();
        }
        if (child.props.onKeyUp) {
          child.props.onKeyUp(event);
        }
      },
      role: "option",
      selected,
      value: void 0,
      // The value is most likely not a valid HTML attribute.
      "data-value": child.props.value
      // Instead, we provide it as a data attribute.
    });
  });
  if (computeDisplay) {
    if (multiple) {
      if (displayMultiple.length === 0) {
        display2 = null;
      } else {
        display2 = displayMultiple.reduce((output, child, index2) => {
          output.push(child);
          if (index2 < displayMultiple.length - 1) {
            output.push(", ");
          }
          return output;
        }, []);
      }
    } else {
      display2 = displaySingle;
    }
  }
  let menuMinWidth = menuMinWidthState;
  if (!autoWidth && isOpenControlled && displayNode) {
    menuMinWidth = anchorElement.clientWidth;
  }
  let tabIndex;
  if (typeof tabIndexProp !== "undefined") {
    tabIndex = tabIndexProp;
  } else {
    tabIndex = disabled ? null : 0;
  }
  const buttonId = SelectDisplayProps.id || (name ? `mui-component-select-${name}` : void 0);
  const ownerState = _extends$1({}, props, {
    variant: variant2,
    value,
    open,
    error
  });
  const classes = useUtilityClasses$o(ownerState);
  const paperProps = _extends$1({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
  const listboxId = useId$1();
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SelectSelect, _extends$1({
      ref: handleDisplayRef,
      tabIndex,
      role: "combobox",
      "aria-controls": listboxId,
      "aria-disabled": disabled ? "true" : void 0,
      "aria-expanded": open ? "true" : "false",
      "aria-haspopup": "listbox",
      "aria-label": ariaLabel,
      "aria-labelledby": [labelId, buttonId].filter(Boolean).join(" ") || void 0,
      "aria-describedby": ariaDescribedby,
      onKeyDown: handleKeyDown2,
      onMouseDown: disabled || readOnly ? null : handleMouseDown,
      onBlur: handleBlur,
      onFocus
    }, SelectDisplayProps, {
      ownerState,
      className: clsx$3(SelectDisplayProps.className, classes.select, className),
      id: buttonId,
      children: isEmpty(display2) ? (
        // notranslate needed while Google Translate will not fix zero-width space issue
        _span || (_span = /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
          className: "notranslate",
          children: "​"
        }))
      ) : display2
    })), /* @__PURE__ */ jsxRuntimeExports.jsx(SelectNativeInput, _extends$1({
      "aria-invalid": error,
      value: Array.isArray(value) ? value.join(",") : value,
      name,
      ref: inputRef,
      "aria-hidden": true,
      onChange: handleChange,
      tabIndex: -1,
      disabled,
      className: classes.nativeInput,
      autoFocus,
      ownerState
    }, other)), /* @__PURE__ */ jsxRuntimeExports.jsx(SelectIcon, {
      as: IconComponent,
      className: classes.icon,
      ownerState
    }), /* @__PURE__ */ jsxRuntimeExports.jsx(Menu, _extends$1({
      id: `menu-${name || ""}`,
      anchorEl: anchorElement,
      open,
      onClose: handleClose,
      anchorOrigin: {
        vertical: "bottom",
        horizontal: "center"
      },
      transformOrigin: {
        vertical: "top",
        horizontal: "center"
      }
    }, MenuProps, {
      MenuListProps: _extends$1({
        "aria-labelledby": labelId,
        role: "listbox",
        "aria-multiselectable": multiple ? "true" : void 0,
        disableListWrap: true,
        id: listboxId
      }, MenuProps.MenuListProps),
      slotProps: _extends$1({}, MenuProps.slotProps, {
        paper: _extends$1({}, paperProps, {
          style: _extends$1({
            minWidth: menuMinWidth
          }, paperProps != null ? paperProps.style : null)
        })
      }),
      children: items
    }))]
  });
});
const _excluded$q = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"], _excluded2$3 = ["root"];
const useUtilityClasses$n = (ownerState) => {
  const {
    classes
  } = ownerState;
  return classes;
};
const styledRootConfig = {
  name: "MuiSelect",
  overridesResolver: (props, styles2) => styles2.root,
  shouldForwardProp: (prop) => rootShouldForwardProp(prop) && prop !== "variant",
  slot: "Root"
};
const StyledInput = styled(Input$2, styledRootConfig)("");
const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)("");
const StyledFilledInput = styled(FilledInput, styledRootConfig)("");
const Select = /* @__PURE__ */ reactExports.forwardRef(function Select2(inProps, ref2) {
  const props = useDefaultProps({
    name: "MuiSelect",
    props: inProps
  });
  const {
    autoWidth = false,
    children,
    classes: classesProp = {},
    className,
    defaultOpen = false,
    displayEmpty = false,
    IconComponent = ArrowDropDownIcon$2,
    id,
    input,
    inputProps,
    label,
    labelId,
    MenuProps,
    multiple = false,
    native = false,
    onClose,
    onOpen,
    open,
    renderValue,
    SelectDisplayProps,
    variant: variantProp = "outlined"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$q);
  const inputComponent = native ? NativeSelectInput : SelectInput;
  const muiFormControl = useFormControl();
  const fcs = formControlState({
    props,
    muiFormControl,
    states: ["variant", "error"]
  });
  const variant2 = fcs.variant || variantProp;
  const ownerState = _extends$1({}, props, {
    variant: variant2,
    classes: classesProp
  });
  const classes = useUtilityClasses$n(ownerState);
  const restOfClasses = _objectWithoutPropertiesLoose(classes, _excluded2$3);
  const InputComponent = input || {
    standard: /* @__PURE__ */ jsxRuntimeExports.jsx(StyledInput, {
      ownerState
    }),
    outlined: /* @__PURE__ */ jsxRuntimeExports.jsx(StyledOutlinedInput, {
      label,
      ownerState
    }),
    filled: /* @__PURE__ */ jsxRuntimeExports.jsx(StyledFilledInput, {
      ownerState
    })
  }[variant2];
  const inputComponentRef = useForkRef(ref2, getReactElementRef(InputComponent));
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Fragment, {
    children: /* @__PURE__ */ reactExports.cloneElement(InputComponent, _extends$1({
      // Most of the logic is implemented in `SelectInput`.
      // The `Select` component is a simple API wrapper to expose something better to play with.
      inputComponent,
      inputProps: _extends$1({
        children,
        error: fcs.error,
        IconComponent,
        variant: variant2,
        type: void 0,
        // We render a select. We can ignore the type provided by the `Input`.
        multiple
      }, native ? {
        id
      } : {
        autoWidth,
        defaultOpen,
        displayEmpty,
        labelId,
        MenuProps,
        onClose,
        onOpen,
        open,
        renderValue,
        SelectDisplayProps: _extends$1({
          id
        }, SelectDisplayProps)
      }, inputProps, {
        classes: inputProps ? deepmerge$1(restOfClasses, inputProps.classes) : restOfClasses
      }, input ? input.props.inputProps : {})
    }, (multiple && native || displayEmpty) && variant2 === "outlined" ? {
      notched: true
    } : {}, {
      ref: inputComponentRef,
      className: clsx$3(InputComponent.props.className, className, classes.root)
    }, !input && {
      variant: variant2
    }, other))
  });
});
Select.muiName = "Select";
const _excluded$p = ["addEndListener", "appear", "children", "easing", "in", "onEnter", "onEntered", "onEntering", "onExit", "onExited", "onExiting", "style", "timeout", "TransitionComponent"];
const styles$7 = {
  entering: {
    transform: "none"
  },
  entered: {
    transform: "none"
  }
};
const Zoom = /* @__PURE__ */ reactExports.forwardRef(function Zoom2(props, ref2) {
  const theme = useTheme$1();
  const defaultTimeout = {
    enter: theme.transitions.duration.enteringScreen,
    exit: theme.transitions.duration.leavingScreen
  };
  const {
    addEndListener,
    appear = true,
    children,
    easing: easing2,
    in: inProp,
    onEnter,
    onEntered,
    onEntering,
    onExit,
    onExited,
    onExiting,
    style: style2,
    timeout = defaultTimeout,
    // eslint-disable-next-line react/prop-types
    TransitionComponent = Transition$4
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$p);
  const nodeRef = reactExports.useRef(null);
  const handleRef = useForkRef(nodeRef, getReactElementRef(children), ref2);
  const normalizedTransitionCallback = (callback) => (maybeIsAppearing) => {
    if (callback) {
      const node2 = nodeRef.current;
      if (maybeIsAppearing === void 0) {
        callback(node2);
      } else {
        callback(node2, maybeIsAppearing);
      }
    }
  };
  const handleEntering = normalizedTransitionCallback(onEntering);
  const handleEnter = normalizedTransitionCallback((node2, isAppearing) => {
    reflow(node2);
    const transitionProps = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "enter"
    });
    node2.style.webkitTransition = theme.transitions.create("transform", transitionProps);
    node2.style.transition = theme.transitions.create("transform", transitionProps);
    if (onEnter) {
      onEnter(node2, isAppearing);
    }
  });
  const handleEntered = normalizedTransitionCallback(onEntered);
  const handleExiting = normalizedTransitionCallback(onExiting);
  const handleExit = normalizedTransitionCallback((node2) => {
    const transitionProps = getTransitionProps({
      style: style2,
      timeout,
      easing: easing2
    }, {
      mode: "exit"
    });
    node2.style.webkitTransition = theme.transitions.create("transform", transitionProps);
    node2.style.transition = theme.transitions.create("transform", transitionProps);
    if (onExit) {
      onExit(node2);
    }
  });
  const handleExited = normalizedTransitionCallback(onExited);
  const handleAddEndListener = (next2) => {
    if (addEndListener) {
      addEndListener(nodeRef.current, next2);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
    appear,
    in: inProp,
    nodeRef,
    onEnter: handleEnter,
    onEntered: handleEntered,
    onEntering: handleEntering,
    onExit: handleExit,
    onExited: handleExited,
    onExiting: handleExiting,
    addEndListener: handleAddEndListener,
    timeout
  }, other, {
    children: (state, childProps) => {
      return /* @__PURE__ */ reactExports.cloneElement(children, _extends$1({
        style: _extends$1({
          transform: "scale(0)",
          visibility: state === "exited" && !inProp ? "hidden" : void 0
        }, styles$7[state], style2, children.props.style),
        ref: handleRef
      }, childProps));
    }
  }));
});
function getTooltipUtilityClass(slot) {
  return generateUtilityClass("MuiTooltip", slot);
}
const tooltipClasses = generateUtilityClasses("MuiTooltip", ["popper", "popperInteractive", "popperArrow", "popperClose", "tooltip", "tooltipArrow", "touch", "tooltipPlacementLeft", "tooltipPlacementRight", "tooltipPlacementTop", "tooltipPlacementBottom", "arrow"]);
const _excluded$o = ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"];
function round$1(value) {
  return Math.round(value * 1e5) / 1e5;
}
const useUtilityClasses$m = (ownerState) => {
  const {
    classes,
    disableInteractive,
    arrow: arrow2,
    touch,
    placement
  } = ownerState;
  const slots = {
    popper: ["popper", !disableInteractive && "popperInteractive", arrow2 && "popperArrow"],
    tooltip: ["tooltip", arrow2 && "tooltipArrow", touch && "touch", `tooltipPlacement${capitalize$2(placement.split("-")[0])}`],
    arrow: ["arrow"]
  };
  return composeClasses(slots, getTooltipUtilityClass, classes);
};
const TooltipPopper = styled(Popper, {
  name: "MuiTooltip",
  slot: "Popper",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.popper, !ownerState.disableInteractive && styles2.popperInteractive, ownerState.arrow && styles2.popperArrow, !ownerState.open && styles2.popperClose];
  }
})(({
  theme,
  ownerState,
  open
}) => _extends$1({
  zIndex: (theme.vars || theme).zIndex.tooltip,
  pointerEvents: "none"
}, !ownerState.disableInteractive && {
  pointerEvents: "auto"
}, !open && {
  pointerEvents: "none"
}, ownerState.arrow && {
  [`&[data-popper-placement*="bottom"] .${tooltipClasses.arrow}`]: {
    top: 0,
    marginTop: "-0.71em",
    "&::before": {
      transformOrigin: "0 100%"
    }
  },
  [`&[data-popper-placement*="top"] .${tooltipClasses.arrow}`]: {
    bottom: 0,
    marginBottom: "-0.71em",
    "&::before": {
      transformOrigin: "100% 0"
    }
  },
  [`&[data-popper-placement*="right"] .${tooltipClasses.arrow}`]: _extends$1({}, !ownerState.isRtl ? {
    left: 0,
    marginLeft: "-0.71em"
  } : {
    right: 0,
    marginRight: "-0.71em"
  }, {
    height: "1em",
    width: "0.71em",
    "&::before": {
      transformOrigin: "100% 100%"
    }
  }),
  [`&[data-popper-placement*="left"] .${tooltipClasses.arrow}`]: _extends$1({}, !ownerState.isRtl ? {
    right: 0,
    marginRight: "-0.71em"
  } : {
    left: 0,
    marginLeft: "-0.71em"
  }, {
    height: "1em",
    width: "0.71em",
    "&::before": {
      transformOrigin: "0 0"
    }
  })
}));
const TooltipTooltip = styled("div", {
  name: "MuiTooltip",
  slot: "Tooltip",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.tooltip, ownerState.touch && styles2.touch, ownerState.arrow && styles2.tooltipArrow, styles2[`tooltipPlacement${capitalize$2(ownerState.placement.split("-")[0])}`]];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : colorManipulatorExports.alpha(theme.palette.grey[700], 0.92),
  borderRadius: (theme.vars || theme).shape.borderRadius,
  color: (theme.vars || theme).palette.common.white,
  fontFamily: theme.typography.fontFamily,
  padding: "4px 8px",
  fontSize: theme.typography.pxToRem(11),
  maxWidth: 300,
  margin: 2,
  wordWrap: "break-word",
  fontWeight: theme.typography.fontWeightMedium
}, ownerState.arrow && {
  position: "relative",
  margin: 0
}, ownerState.touch && {
  padding: "8px 16px",
  fontSize: theme.typography.pxToRem(14),
  lineHeight: `${round$1(16 / 14)}em`,
  fontWeight: theme.typography.fontWeightRegular
}, {
  [`.${tooltipClasses.popper}[data-popper-placement*="left"] &`]: _extends$1({
    transformOrigin: "right center"
  }, !ownerState.isRtl ? _extends$1({
    marginRight: "14px"
  }, ownerState.touch && {
    marginRight: "24px"
  }) : _extends$1({
    marginLeft: "14px"
  }, ownerState.touch && {
    marginLeft: "24px"
  })),
  [`.${tooltipClasses.popper}[data-popper-placement*="right"] &`]: _extends$1({
    transformOrigin: "left center"
  }, !ownerState.isRtl ? _extends$1({
    marginLeft: "14px"
  }, ownerState.touch && {
    marginLeft: "24px"
  }) : _extends$1({
    marginRight: "14px"
  }, ownerState.touch && {
    marginRight: "24px"
  })),
  [`.${tooltipClasses.popper}[data-popper-placement*="top"] &`]: _extends$1({
    transformOrigin: "center bottom",
    marginBottom: "14px"
  }, ownerState.touch && {
    marginBottom: "24px"
  }),
  [`.${tooltipClasses.popper}[data-popper-placement*="bottom"] &`]: _extends$1({
    transformOrigin: "center top",
    marginTop: "14px"
  }, ownerState.touch && {
    marginTop: "24px"
  })
}));
const TooltipArrow = styled("span", {
  name: "MuiTooltip",
  slot: "Arrow",
  overridesResolver: (props, styles2) => styles2.arrow
})(({
  theme
}) => ({
  overflow: "hidden",
  position: "absolute",
  width: "1em",
  height: "0.71em",
  boxSizing: "border-box",
  color: theme.vars ? theme.vars.palette.Tooltip.bg : colorManipulatorExports.alpha(theme.palette.grey[700], 0.9),
  "&::before": {
    content: '""',
    margin: "auto",
    display: "block",
    width: "100%",
    height: "100%",
    backgroundColor: "currentColor",
    transform: "rotate(45deg)"
  }
}));
let hystersisOpen = false;
const hystersisTimer = new Timeout();
let cursorPosition = {
  x: 0,
  y: 0
};
function composeEventHandler(handler, eventHandler) {
  return (event, ...params2) => {
    if (eventHandler) {
      eventHandler(event, ...params2);
    }
    handler(event, ...params2);
  };
}
const Tooltip = /* @__PURE__ */ reactExports.forwardRef(function Tooltip2(inProps, ref2) {
  var _ref, _slots$popper, _ref2, _ref3, _slots$transition, _ref4, _slots$tooltip, _ref5, _slots$arrow, _slotProps$popper, _ref6, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref7, _slotProps$tooltip2, _slotProps$arrow, _ref8, _slotProps$arrow2;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiTooltip"
  });
  const {
    arrow: arrow2 = false,
    children: childrenProp,
    components = {},
    componentsProps = {},
    describeChild = false,
    disableFocusListener = false,
    disableHoverListener = false,
    disableInteractive: disableInteractiveProp = false,
    disableTouchListener = false,
    enterDelay = 100,
    enterNextDelay = 0,
    enterTouchDelay = 700,
    followCursor = false,
    id: idProp,
    leaveDelay = 0,
    leaveTouchDelay = 1500,
    onClose,
    onOpen,
    open: openProp,
    placement = "bottom",
    PopperComponent: PopperComponentProp,
    PopperProps = {},
    slotProps = {},
    slots = {},
    title,
    TransitionComponent: TransitionComponentProp = Grow,
    TransitionProps
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$o);
  const children = /* @__PURE__ */ reactExports.isValidElement(childrenProp) ? childrenProp : /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
    children: childrenProp
  });
  const theme = useTheme$1();
  const isRtl = useRtl();
  const [childNode, setChildNode] = reactExports.useState();
  const [arrowRef, setArrowRef] = reactExports.useState(null);
  const ignoreNonTouchEvents = reactExports.useRef(false);
  const disableInteractive = disableInteractiveProp || followCursor;
  const closeTimer = useTimeout();
  const enterTimer = useTimeout();
  const leaveTimer = useTimeout();
  const touchTimer = useTimeout();
  const [openState, setOpenState] = useControlled({
    controlled: openProp,
    default: false,
    name: "Tooltip",
    state: "open"
  });
  let open = openState;
  const id = useId$1(idProp);
  const prevUserSelect = reactExports.useRef();
  const stopTouchInteraction = useEventCallback(() => {
    if (prevUserSelect.current !== void 0) {
      document.body.style.WebkitUserSelect = prevUserSelect.current;
      prevUserSelect.current = void 0;
    }
    touchTimer.clear();
  });
  reactExports.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);
  const handleOpen = (event) => {
    hystersisTimer.clear();
    hystersisOpen = true;
    setOpenState(true);
    if (onOpen && !open) {
      onOpen(event);
    }
  };
  const handleClose = useEventCallback(
    /**
     * @param {React.SyntheticEvent | Event} event
     */
    (event) => {
      hystersisTimer.start(800 + leaveDelay, () => {
        hystersisOpen = false;
      });
      setOpenState(false);
      if (onClose && open) {
        onClose(event);
      }
      closeTimer.start(theme.transitions.duration.shortest, () => {
        ignoreNonTouchEvents.current = false;
      });
    }
  );
  const handleMouseOver = (event) => {
    if (ignoreNonTouchEvents.current && event.type !== "touchstart") {
      return;
    }
    if (childNode) {
      childNode.removeAttribute("title");
    }
    enterTimer.clear();
    leaveTimer.clear();
    if (enterDelay || hystersisOpen && enterNextDelay) {
      enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {
        handleOpen(event);
      });
    } else {
      handleOpen(event);
    }
  };
  const handleMouseLeave = (event) => {
    enterTimer.clear();
    leaveTimer.start(leaveDelay, () => {
      handleClose(event);
    });
  };
  const {
    isFocusVisibleRef,
    onBlur: handleBlurVisible,
    onFocus: handleFocusVisible,
    ref: focusVisibleRef
  } = useIsFocusVisible();
  const [, setChildIsFocusVisible] = reactExports.useState(false);
  const handleBlur = (event) => {
    handleBlurVisible(event);
    if (isFocusVisibleRef.current === false) {
      setChildIsFocusVisible(false);
      handleMouseLeave(event);
    }
  };
  const handleFocus = (event) => {
    if (!childNode) {
      setChildNode(event.currentTarget);
    }
    handleFocusVisible(event);
    if (isFocusVisibleRef.current === true) {
      setChildIsFocusVisible(true);
      handleMouseOver(event);
    }
  };
  const detectTouchStart = (event) => {
    ignoreNonTouchEvents.current = true;
    const childrenProps2 = children.props;
    if (childrenProps2.onTouchStart) {
      childrenProps2.onTouchStart(event);
    }
  };
  const handleTouchStart = (event) => {
    detectTouchStart(event);
    leaveTimer.clear();
    closeTimer.clear();
    stopTouchInteraction();
    prevUserSelect.current = document.body.style.WebkitUserSelect;
    document.body.style.WebkitUserSelect = "none";
    touchTimer.start(enterTouchDelay, () => {
      document.body.style.WebkitUserSelect = prevUserSelect.current;
      handleMouseOver(event);
    });
  };
  const handleTouchEnd = (event) => {
    if (children.props.onTouchEnd) {
      children.props.onTouchEnd(event);
    }
    stopTouchInteraction();
    leaveTimer.start(leaveTouchDelay, () => {
      handleClose(event);
    });
  };
  reactExports.useEffect(() => {
    if (!open) {
      return void 0;
    }
    function handleKeyDown2(nativeEvent) {
      if (nativeEvent.key === "Escape" || nativeEvent.key === "Esc") {
        handleClose(nativeEvent);
      }
    }
    document.addEventListener("keydown", handleKeyDown2);
    return () => {
      document.removeEventListener("keydown", handleKeyDown2);
    };
  }, [handleClose, open]);
  const handleRef = useForkRef(getReactElementRef(children), focusVisibleRef, setChildNode, ref2);
  if (!title && title !== 0) {
    open = false;
  }
  const popperRef = reactExports.useRef();
  const handleMouseMove = (event) => {
    const childrenProps2 = children.props;
    if (childrenProps2.onMouseMove) {
      childrenProps2.onMouseMove(event);
    }
    cursorPosition = {
      x: event.clientX,
      y: event.clientY
    };
    if (popperRef.current) {
      popperRef.current.update();
    }
  };
  const nameOrDescProps = {};
  const titleIsString = typeof title === "string";
  if (describeChild) {
    nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;
    nameOrDescProps["aria-describedby"] = open ? id : null;
  } else {
    nameOrDescProps["aria-label"] = titleIsString ? title : null;
    nameOrDescProps["aria-labelledby"] = open && !titleIsString ? id : null;
  }
  const childrenProps = _extends$1({}, nameOrDescProps, other, children.props, {
    className: clsx$3(other.className, children.props.className),
    onTouchStart: detectTouchStart,
    ref: handleRef
  }, followCursor ? {
    onMouseMove: handleMouseMove
  } : {});
  const interactiveWrapperListeners = {};
  if (!disableTouchListener) {
    childrenProps.onTouchStart = handleTouchStart;
    childrenProps.onTouchEnd = handleTouchEnd;
  }
  if (!disableHoverListener) {
    childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);
    childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);
    if (!disableInteractive) {
      interactiveWrapperListeners.onMouseOver = handleMouseOver;
      interactiveWrapperListeners.onMouseLeave = handleMouseLeave;
    }
  }
  if (!disableFocusListener) {
    childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);
    childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);
    if (!disableInteractive) {
      interactiveWrapperListeners.onFocus = handleFocus;
      interactiveWrapperListeners.onBlur = handleBlur;
    }
  }
  const popperOptions = reactExports.useMemo(() => {
    var _PopperProps$popperOp;
    let tooltipModifiers = [{
      name: "arrow",
      enabled: Boolean(arrowRef),
      options: {
        element: arrowRef,
        padding: 4
      }
    }];
    if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {
      tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);
    }
    return _extends$1({}, PopperProps.popperOptions, {
      modifiers: tooltipModifiers
    });
  }, [arrowRef, PopperProps]);
  const ownerState = _extends$1({}, props, {
    isRtl,
    arrow: arrow2,
    disableInteractive,
    placement,
    PopperComponentProp,
    touch: ignoreNonTouchEvents.current
  });
  const classes = useUtilityClasses$m(ownerState);
  const PopperComponent = (_ref = (_slots$popper = slots.popper) != null ? _slots$popper : components.Popper) != null ? _ref : TooltipPopper;
  const TransitionComponent = (_ref2 = (_ref3 = (_slots$transition = slots.transition) != null ? _slots$transition : components.Transition) != null ? _ref3 : TransitionComponentProp) != null ? _ref2 : Grow;
  const TooltipComponent = (_ref4 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref4 : TooltipTooltip;
  const ArrowComponent = (_ref5 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref5 : TooltipArrow;
  const popperProps = appendOwnerState(PopperComponent, _extends$1({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {
    className: clsx$3(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref6 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref6.className)
  }), ownerState);
  const transitionProps = appendOwnerState(TransitionComponent, _extends$1({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);
  const tooltipProps = appendOwnerState(TooltipComponent, _extends$1({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {
    className: clsx$3(classes.tooltip, (_ref7 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref7.className)
  }), ownerState);
  const tooltipArrowProps = appendOwnerState(ArrowComponent, _extends$1({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {
    className: clsx$3(classes.arrow, (_ref8 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref8.className)
  }), ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
    children: [/* @__PURE__ */ reactExports.cloneElement(children, childrenProps), /* @__PURE__ */ jsxRuntimeExports.jsx(PopperComponent, _extends$1({
      as: PopperComponentProp != null ? PopperComponentProp : Popper,
      placement,
      anchorEl: followCursor ? {
        getBoundingClientRect: () => ({
          top: cursorPosition.y,
          left: cursorPosition.x,
          right: cursorPosition.x,
          bottom: cursorPosition.y,
          width: 0,
          height: 0
        })
      } : childNode,
      popperRef,
      open: childNode ? open : false,
      id,
      transition: true
    }, interactiveWrapperListeners, popperProps, {
      popperOptions,
      children: ({
        TransitionProps: TransitionPropsInner
      }) => /* @__PURE__ */ jsxRuntimeExports.jsx(TransitionComponent, _extends$1({
        timeout: theme.transitions.duration.shorter
      }, TransitionPropsInner, transitionProps, {
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(TooltipComponent, _extends$1({}, tooltipProps, {
          children: [title, arrow2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowComponent, _extends$1({}, tooltipArrowProps, {
            ref: setArrowRef
          })) : null]
        }))
      }))
    }))]
  });
});
const StepperContext = /* @__PURE__ */ reactExports.createContext({});
const StepContext = /* @__PURE__ */ reactExports.createContext({});
function getStepUtilityClass(slot) {
  return generateUtilityClass("MuiStep", slot);
}
generateUtilityClasses("MuiStep", ["root", "horizontal", "vertical", "alternativeLabel", "completed"]);
const _excluded$n = ["active", "children", "className", "component", "completed", "disabled", "expanded", "index", "last"];
const useUtilityClasses$l = (ownerState) => {
  const {
    classes,
    orientation,
    alternativeLabel,
    completed
  } = ownerState;
  const slots = {
    root: ["root", orientation, alternativeLabel && "alternativeLabel", completed && "completed"]
  };
  return composeClasses(slots, getStepUtilityClass, classes);
};
const StepRoot = styled("div", {
  name: "MuiStep",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.orientation], ownerState.alternativeLabel && styles2.alternativeLabel, ownerState.completed && styles2.completed];
  }
})(({
  ownerState
}) => _extends$1({}, ownerState.orientation === "horizontal" && {
  paddingLeft: 8,
  paddingRight: 8
}, ownerState.alternativeLabel && {
  flex: 1,
  position: "relative"
}));
const Step = /* @__PURE__ */ reactExports.forwardRef(function Step2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiStep"
  });
  const {
    active: activeProp,
    children,
    className,
    component = "div",
    completed: completedProp,
    disabled: disabledProp,
    expanded = false,
    index: index2,
    last
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$n);
  const {
    activeStep,
    connector,
    alternativeLabel,
    orientation,
    nonLinear
  } = reactExports.useContext(StepperContext);
  let [active = false, completed = false, disabled = false] = [activeProp, completedProp, disabledProp];
  if (activeStep === index2) {
    active = activeProp !== void 0 ? activeProp : true;
  } else if (!nonLinear && activeStep > index2) {
    completed = completedProp !== void 0 ? completedProp : true;
  } else if (!nonLinear && activeStep < index2) {
    disabled = disabledProp !== void 0 ? disabledProp : true;
  }
  const contextValue = reactExports.useMemo(() => ({
    index: index2,
    last,
    expanded,
    icon: index2 + 1,
    active,
    completed,
    disabled
  }), [index2, last, expanded, active, completed, disabled]);
  const ownerState = _extends$1({}, props, {
    active,
    orientation,
    alternativeLabel,
    completed,
    disabled,
    expanded,
    component
  });
  const classes = useUtilityClasses$l(ownerState);
  const newChildren = /* @__PURE__ */ jsxRuntimeExports.jsxs(StepRoot, _extends$1({
    as: component,
    className: clsx$3(classes.root, className),
    ref: ref2,
    ownerState
  }, other, {
    children: [connector && alternativeLabel && index2 !== 0 ? connector : null, children]
  }));
  return /* @__PURE__ */ jsxRuntimeExports.jsx(StepContext.Provider, {
    value: contextValue,
    children: connector && !alternativeLabel && index2 !== 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
      children: [connector, newChildren]
    }) : newChildren
  });
});
const CheckCircle = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-2 17l-5-5 1.4-1.4 3.6 3.6 7.6-7.6L19 8l-9 9z"
}), "CheckCircle");
const Warning = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
}), "Warning");
function getStepIconUtilityClass(slot) {
  return generateUtilityClass("MuiStepIcon", slot);
}
const stepIconClasses = generateUtilityClasses("MuiStepIcon", ["root", "active", "completed", "error", "text"]);
var _circle;
const _excluded$m = ["active", "className", "completed", "error", "icon"];
const useUtilityClasses$k = (ownerState) => {
  const {
    classes,
    active,
    completed,
    error
  } = ownerState;
  const slots = {
    root: ["root", active && "active", completed && "completed", error && "error"],
    text: ["text"]
  };
  return composeClasses(slots, getStepIconUtilityClass, classes);
};
const StepIconRoot = styled(SvgIcon, {
  name: "MuiStepIcon",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})(({
  theme
}) => ({
  display: "block",
  transition: theme.transitions.create("color", {
    duration: theme.transitions.duration.shortest
  }),
  color: (theme.vars || theme).palette.text.disabled,
  [`&.${stepIconClasses.completed}`]: {
    color: (theme.vars || theme).palette.primary.main
  },
  [`&.${stepIconClasses.active}`]: {
    color: (theme.vars || theme).palette.primary.main
  },
  [`&.${stepIconClasses.error}`]: {
    color: (theme.vars || theme).palette.error.main
  }
}));
const StepIconText = styled("text", {
  name: "MuiStepIcon",
  slot: "Text",
  overridesResolver: (props, styles2) => styles2.text
})(({
  theme
}) => ({
  fill: (theme.vars || theme).palette.primary.contrastText,
  fontSize: theme.typography.caption.fontSize,
  fontFamily: theme.typography.fontFamily
}));
const StepIcon = /* @__PURE__ */ reactExports.forwardRef(function StepIcon2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiStepIcon"
  });
  const {
    active = false,
    className: classNameProp,
    completed = false,
    error = false,
    icon
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$m);
  const ownerState = _extends$1({}, props, {
    active,
    completed,
    error
  });
  const classes = useUtilityClasses$k(ownerState);
  if (typeof icon === "number" || typeof icon === "string") {
    const className = clsx$3(classNameProp, classes.root);
    if (error) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(StepIconRoot, _extends$1({
        as: Warning,
        className,
        ref: ref2,
        ownerState
      }, other));
    }
    if (completed) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(StepIconRoot, _extends$1({
        as: CheckCircle,
        className,
        ref: ref2,
        ownerState
      }, other));
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(StepIconRoot, _extends$1({
      className,
      ref: ref2,
      ownerState
    }, other, {
      children: [_circle || (_circle = /* @__PURE__ */ jsxRuntimeExports.jsx("circle", {
        cx: "12",
        cy: "12",
        r: "12"
      })), /* @__PURE__ */ jsxRuntimeExports.jsx(StepIconText, {
        className: classes.text,
        x: "12",
        y: "12",
        textAnchor: "middle",
        dominantBaseline: "central",
        ownerState,
        children: icon
      })]
    }));
  }
  return icon;
});
function getStepLabelUtilityClass(slot) {
  return generateUtilityClass("MuiStepLabel", slot);
}
const stepLabelClasses = generateUtilityClasses("MuiStepLabel", ["root", "horizontal", "vertical", "label", "active", "completed", "error", "disabled", "iconContainer", "alternativeLabel", "labelContainer"]);
const _excluded$l = ["children", "className", "componentsProps", "error", "icon", "optional", "slotProps", "StepIconComponent", "StepIconProps"];
const useUtilityClasses$j = (ownerState) => {
  const {
    classes,
    orientation,
    active,
    completed,
    error,
    disabled,
    alternativeLabel
  } = ownerState;
  const slots = {
    root: ["root", orientation, error && "error", disabled && "disabled", alternativeLabel && "alternativeLabel"],
    label: ["label", active && "active", completed && "completed", error && "error", disabled && "disabled", alternativeLabel && "alternativeLabel"],
    iconContainer: ["iconContainer", active && "active", completed && "completed", error && "error", disabled && "disabled", alternativeLabel && "alternativeLabel"],
    labelContainer: ["labelContainer", alternativeLabel && "alternativeLabel"]
  };
  return composeClasses(slots, getStepLabelUtilityClass, classes);
};
const StepLabelRoot = styled("span", {
  name: "MuiStepLabel",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.orientation]];
  }
})(({
  ownerState
}) => _extends$1({
  display: "flex",
  alignItems: "center",
  [`&.${stepLabelClasses.alternativeLabel}`]: {
    flexDirection: "column"
  },
  [`&.${stepLabelClasses.disabled}`]: {
    cursor: "default"
  }
}, ownerState.orientation === "vertical" && {
  textAlign: "left",
  padding: "8px 0"
}));
const StepLabelLabel = styled("span", {
  name: "MuiStepLabel",
  slot: "Label",
  overridesResolver: (props, styles2) => styles2.label
})(({
  theme
}) => _extends$1({}, theme.typography.body2, {
  display: "block",
  transition: theme.transitions.create("color", {
    duration: theme.transitions.duration.shortest
  }),
  [`&.${stepLabelClasses.active}`]: {
    color: (theme.vars || theme).palette.text.primary,
    fontWeight: 500
  },
  [`&.${stepLabelClasses.completed}`]: {
    color: (theme.vars || theme).palette.text.primary,
    fontWeight: 500
  },
  [`&.${stepLabelClasses.alternativeLabel}`]: {
    marginTop: 16
  },
  [`&.${stepLabelClasses.error}`]: {
    color: (theme.vars || theme).palette.error.main
  }
}));
const StepLabelIconContainer = styled("span", {
  name: "MuiStepLabel",
  slot: "IconContainer",
  overridesResolver: (props, styles2) => styles2.iconContainer
})(() => ({
  flexShrink: 0,
  // Fix IE11 issue
  display: "flex",
  paddingRight: 8,
  [`&.${stepLabelClasses.alternativeLabel}`]: {
    paddingRight: 0
  }
}));
const StepLabelLabelContainer = styled("span", {
  name: "MuiStepLabel",
  slot: "LabelContainer",
  overridesResolver: (props, styles2) => styles2.labelContainer
})(({
  theme
}) => ({
  width: "100%",
  color: (theme.vars || theme).palette.text.secondary,
  [`&.${stepLabelClasses.alternativeLabel}`]: {
    textAlign: "center"
  }
}));
const StepLabel = /* @__PURE__ */ reactExports.forwardRef(function StepLabel2(inProps, ref2) {
  var _slotProps$label;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiStepLabel"
  });
  const {
    children,
    className,
    componentsProps = {},
    error = false,
    icon: iconProp,
    optional,
    slotProps = {},
    StepIconComponent: StepIconComponentProp,
    StepIconProps
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$l);
  const {
    alternativeLabel,
    orientation
  } = reactExports.useContext(StepperContext);
  const {
    active,
    disabled,
    completed,
    icon: iconContext
  } = reactExports.useContext(StepContext);
  const icon = iconProp || iconContext;
  let StepIconComponent = StepIconComponentProp;
  if (icon && !StepIconComponent) {
    StepIconComponent = StepIcon;
  }
  const ownerState = _extends$1({}, props, {
    active,
    alternativeLabel,
    completed,
    disabled,
    error,
    orientation
  });
  const classes = useUtilityClasses$j(ownerState);
  const labelSlotProps = (_slotProps$label = slotProps.label) != null ? _slotProps$label : componentsProps.label;
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(StepLabelRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ref: ref2,
    ownerState
  }, other, {
    children: [icon || StepIconComponent ? /* @__PURE__ */ jsxRuntimeExports.jsx(StepLabelIconContainer, {
      className: classes.iconContainer,
      ownerState,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(StepIconComponent, _extends$1({
        completed,
        active,
        error,
        icon
      }, StepIconProps))
    }) : null, /* @__PURE__ */ jsxRuntimeExports.jsxs(StepLabelLabelContainer, {
      className: classes.labelContainer,
      ownerState,
      children: [children ? /* @__PURE__ */ jsxRuntimeExports.jsx(StepLabelLabel, _extends$1({
        ownerState
      }, labelSlotProps, {
        className: clsx$3(classes.label, labelSlotProps == null ? void 0 : labelSlotProps.className),
        children
      })) : null, optional]
    })]
  }));
});
StepLabel.muiName = "StepLabel";
function getStepConnectorUtilityClass(slot) {
  return generateUtilityClass("MuiStepConnector", slot);
}
generateUtilityClasses("MuiStepConnector", ["root", "horizontal", "vertical", "alternativeLabel", "active", "completed", "disabled", "line", "lineHorizontal", "lineVertical"]);
const _excluded$k = ["className"];
const useUtilityClasses$i = (ownerState) => {
  const {
    classes,
    orientation,
    alternativeLabel,
    active,
    completed,
    disabled
  } = ownerState;
  const slots = {
    root: ["root", orientation, alternativeLabel && "alternativeLabel", active && "active", completed && "completed", disabled && "disabled"],
    line: ["line", `line${capitalize$2(orientation)}`]
  };
  return composeClasses(slots, getStepConnectorUtilityClass, classes);
};
const StepConnectorRoot = styled("div", {
  name: "MuiStepConnector",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.orientation], ownerState.alternativeLabel && styles2.alternativeLabel, ownerState.completed && styles2.completed];
  }
})(({
  ownerState
}) => _extends$1({
  flex: "1 1 auto"
}, ownerState.orientation === "vertical" && {
  marginLeft: 12
  // half icon
}, ownerState.alternativeLabel && {
  position: "absolute",
  top: 8 + 4,
  left: "calc(-50% + 20px)",
  right: "calc(50% + 20px)"
}));
const StepConnectorLine = styled("span", {
  name: "MuiStepConnector",
  slot: "Line",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.line, styles2[`line${capitalize$2(ownerState.orientation)}`]];
  }
})(({
  ownerState,
  theme
}) => {
  const borderColor2 = theme.palette.mode === "light" ? theme.palette.grey[400] : theme.palette.grey[600];
  return _extends$1({
    display: "block",
    borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor2
  }, ownerState.orientation === "horizontal" && {
    borderTopStyle: "solid",
    borderTopWidth: 1
  }, ownerState.orientation === "vertical" && {
    borderLeftStyle: "solid",
    borderLeftWidth: 1,
    minHeight: 24
  });
});
const StepConnector = /* @__PURE__ */ reactExports.forwardRef(function StepConnector2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiStepConnector"
  });
  const {
    className
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$k);
  const {
    alternativeLabel,
    orientation = "horizontal"
  } = reactExports.useContext(StepperContext);
  const {
    active,
    disabled,
    completed
  } = reactExports.useContext(StepContext);
  const ownerState = _extends$1({}, props, {
    alternativeLabel,
    orientation,
    active,
    completed,
    disabled
  });
  const classes = useUtilityClasses$i(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(StepConnectorRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ref: ref2,
    ownerState
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(StepConnectorLine, {
      className: classes.line,
      ownerState
    })
  }));
});
function getStepperUtilityClass(slot) {
  return generateUtilityClass("MuiStepper", slot);
}
generateUtilityClasses("MuiStepper", ["root", "horizontal", "vertical", "nonLinear", "alternativeLabel"]);
const _excluded$j = ["activeStep", "alternativeLabel", "children", "className", "component", "connector", "nonLinear", "orientation"];
const useUtilityClasses$h = (ownerState) => {
  const {
    orientation,
    nonLinear,
    alternativeLabel,
    classes
  } = ownerState;
  const slots = {
    root: ["root", orientation, nonLinear && "nonLinear", alternativeLabel && "alternativeLabel"]
  };
  return composeClasses(slots, getStepperUtilityClass, classes);
};
const StepperRoot = styled("div", {
  name: "MuiStepper",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, styles2[ownerState.orientation], ownerState.alternativeLabel && styles2.alternativeLabel, ownerState.nonLinear && styles2.nonLinear];
  }
})(({
  ownerState
}) => _extends$1({
  display: "flex"
}, ownerState.orientation === "horizontal" && {
  flexDirection: "row",
  alignItems: "center"
}, ownerState.orientation === "vertical" && {
  flexDirection: "column"
}, ownerState.alternativeLabel && {
  alignItems: "flex-start"
}));
const defaultConnector = /* @__PURE__ */ jsxRuntimeExports.jsx(StepConnector, {});
const Stepper = /* @__PURE__ */ reactExports.forwardRef(function Stepper2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiStepper"
  });
  const {
    activeStep = 0,
    alternativeLabel = false,
    children,
    className,
    component = "div",
    connector = defaultConnector,
    nonLinear = false,
    orientation = "horizontal"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$j);
  const ownerState = _extends$1({}, props, {
    nonLinear,
    alternativeLabel,
    orientation,
    component
  });
  const classes = useUtilityClasses$h(ownerState);
  const childrenArray = reactExports.Children.toArray(children).filter(Boolean);
  const steps = childrenArray.map((step, index2) => {
    return /* @__PURE__ */ reactExports.cloneElement(step, _extends$1({
      index: index2,
      last: index2 + 1 === childrenArray.length
    }, step.props));
  });
  const contextValue = reactExports.useMemo(() => ({
    activeStep,
    alternativeLabel,
    connector,
    nonLinear,
    orientation
  }), [activeStep, alternativeLabel, connector, nonLinear, orientation]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(StepperContext.Provider, {
    value: contextValue,
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(StepperRoot, _extends$1({
      as: component,
      ownerState,
      className: clsx$3(classes.root, className),
      ref: ref2
    }, other, {
      children: steps
    }))
  });
});
function getSwitchUtilityClass(slot) {
  return generateUtilityClass("MuiSwitch", slot);
}
const switchClasses = generateUtilityClasses("MuiSwitch", ["root", "edgeStart", "edgeEnd", "switchBase", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium", "checked", "disabled", "input", "thumb", "track"]);
const _excluded$i = ["className", "color", "edge", "size", "sx"];
const useUtilityClasses$g = (ownerState) => {
  const {
    classes,
    edge,
    size,
    color: color2,
    checked,
    disabled
  } = ownerState;
  const slots = {
    root: ["root", edge && `edge${capitalize$2(edge)}`, `size${capitalize$2(size)}`],
    switchBase: ["switchBase", `color${capitalize$2(color2)}`, checked && "checked", disabled && "disabled"],
    thumb: ["thumb"],
    track: ["track"],
    input: ["input"]
  };
  const composedClasses = composeClasses(slots, getSwitchUtilityClass, classes);
  return _extends$1({}, classes, composedClasses);
};
const SwitchRoot = styled("span", {
  name: "MuiSwitch",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.edge && styles2[`edge${capitalize$2(ownerState.edge)}`], styles2[`size${capitalize$2(ownerState.size)}`]];
  }
})({
  display: "inline-flex",
  width: 34 + 12 * 2,
  height: 14 + 12 * 2,
  overflow: "hidden",
  padding: 12,
  boxSizing: "border-box",
  position: "relative",
  flexShrink: 0,
  zIndex: 0,
  // Reset the stacking context.
  verticalAlign: "middle",
  // For correct alignment with the text.
  "@media print": {
    colorAdjust: "exact"
  },
  variants: [{
    props: {
      edge: "start"
    },
    style: {
      marginLeft: -8
    }
  }, {
    props: {
      edge: "end"
    },
    style: {
      marginRight: -8
    }
  }, {
    props: {
      size: "small"
    },
    style: {
      width: 40,
      height: 24,
      padding: 7,
      [`& .${switchClasses.thumb}`]: {
        width: 16,
        height: 16
      },
      [`& .${switchClasses.switchBase}`]: {
        padding: 4,
        [`&.${switchClasses.checked}`]: {
          transform: "translateX(16px)"
        }
      }
    }
  }]
});
const SwitchSwitchBase = styled(SwitchBase, {
  name: "MuiSwitch",
  slot: "SwitchBase",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.switchBase, {
      [`& .${switchClasses.input}`]: styles2.input
    }, ownerState.color !== "default" && styles2[`color${capitalize$2(ownerState.color)}`]];
  }
})(({
  theme
}) => ({
  position: "absolute",
  top: 0,
  left: 0,
  zIndex: 1,
  // Render above the focus ripple.
  color: theme.vars ? theme.vars.palette.Switch.defaultColor : `${theme.palette.mode === "light" ? theme.palette.common.white : theme.palette.grey[300]}`,
  transition: theme.transitions.create(["left", "transform"], {
    duration: theme.transitions.duration.shortest
  }),
  [`&.${switchClasses.checked}`]: {
    transform: "translateX(20px)"
  },
  [`&.${switchClasses.disabled}`]: {
    color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : `${theme.palette.mode === "light" ? theme.palette.grey[100] : theme.palette.grey[600]}`
  },
  [`&.${switchClasses.checked} + .${switchClasses.track}`]: {
    opacity: 0.5
  },
  [`&.${switchClasses.disabled} + .${switchClasses.track}`]: {
    opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : `${theme.palette.mode === "light" ? 0.12 : 0.2}`
  },
  [`& .${switchClasses.input}`]: {
    left: "-100%",
    width: "300%"
  }
}), ({
  theme
}) => ({
  "&:hover": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
    // Reset on touch devices, it doesn't add specificity
    "@media (hover: none)": {
      backgroundColor: "transparent"
    }
  },
  variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color2]) => ({
    props: {
      color: color2
    },
    style: {
      [`&.${switchClasses.checked}`]: {
        color: (theme.vars || theme).palette[color2].main,
        "&:hover": {
          backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color2].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : colorManipulatorExports.alpha(theme.palette[color2].main, theme.palette.action.hoverOpacity),
          "@media (hover: none)": {
            backgroundColor: "transparent"
          }
        },
        [`&.${switchClasses.disabled}`]: {
          color: theme.vars ? theme.vars.palette.Switch[`${color2}DisabledColor`] : `${theme.palette.mode === "light" ? colorManipulatorExports.lighten(theme.palette[color2].main, 0.62) : colorManipulatorExports.darken(theme.palette[color2].main, 0.55)}`
        }
      },
      [`&.${switchClasses.checked} + .${switchClasses.track}`]: {
        backgroundColor: (theme.vars || theme).palette[color2].main
      }
    }
  }))]
}));
const SwitchTrack = styled("span", {
  name: "MuiSwitch",
  slot: "Track",
  overridesResolver: (props, styles2) => styles2.track
})(({
  theme
}) => ({
  height: "100%",
  width: "100%",
  borderRadius: 14 / 2,
  zIndex: -1,
  transition: theme.transitions.create(["opacity", "background-color"], {
    duration: theme.transitions.duration.shortest
  }),
  backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : `${theme.palette.mode === "light" ? theme.palette.common.black : theme.palette.common.white}`,
  opacity: theme.vars ? theme.vars.opacity.switchTrack : `${theme.palette.mode === "light" ? 0.38 : 0.3}`
}));
const SwitchThumb = styled("span", {
  name: "MuiSwitch",
  slot: "Thumb",
  overridesResolver: (props, styles2) => styles2.thumb
})(({
  theme
}) => ({
  boxShadow: (theme.vars || theme).shadows[1],
  backgroundColor: "currentColor",
  width: 20,
  height: 20,
  borderRadius: "50%"
}));
const Switch = /* @__PURE__ */ reactExports.forwardRef(function Switch2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiSwitch"
  });
  const {
    className,
    color: color2 = "primary",
    edge = false,
    size = "medium",
    sx
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$i);
  const ownerState = _extends$1({}, props, {
    color: color2,
    edge,
    size
  });
  const classes = useUtilityClasses$g(ownerState);
  const icon = /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchThumb, {
    className: classes.thumb,
    ownerState
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(SwitchRoot, {
    className: clsx$3(classes.root, className),
    sx,
    ownerState,
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(SwitchSwitchBase, _extends$1({
      type: "checkbox",
      icon,
      checkedIcon: icon,
      ref: ref2,
      ownerState
    }, other, {
      classes: _extends$1({}, classes, {
        root: classes.switchBase
      })
    })), /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchTrack, {
      className: classes.track,
      ownerState
    })]
  });
});
function getTabUtilityClass(slot) {
  return generateUtilityClass("MuiTab", slot);
}
const tabClasses = generateUtilityClasses("MuiTab", ["root", "labelIcon", "textColorInherit", "textColorPrimary", "textColorSecondary", "selected", "disabled", "fullWidth", "wrapped", "iconWrapper"]);
const _excluded$h = ["className", "disabled", "disableFocusRipple", "fullWidth", "icon", "iconPosition", "indicator", "label", "onChange", "onClick", "onFocus", "selected", "selectionFollowsFocus", "textColor", "value", "wrapped"];
const useUtilityClasses$f = (ownerState) => {
  const {
    classes,
    textColor,
    fullWidth,
    wrapped,
    icon,
    label,
    selected,
    disabled
  } = ownerState;
  const slots = {
    root: ["root", icon && label && "labelIcon", `textColor${capitalize$2(textColor)}`, fullWidth && "fullWidth", wrapped && "wrapped", selected && "selected", disabled && "disabled"],
    iconWrapper: ["iconWrapper"]
  };
  return composeClasses(slots, getTabUtilityClass, classes);
};
const TabRoot = styled(ButtonBase, {
  name: "MuiTab",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.label && ownerState.icon && styles2.labelIcon, styles2[`textColor${capitalize$2(ownerState.textColor)}`], ownerState.fullWidth && styles2.fullWidth, ownerState.wrapped && styles2.wrapped, {
      [`& .${tabClasses.iconWrapper}`]: styles2.iconWrapper
    }];
  }
})(({
  theme,
  ownerState
}) => _extends$1({}, theme.typography.button, {
  maxWidth: 360,
  minWidth: 90,
  position: "relative",
  minHeight: 48,
  flexShrink: 0,
  padding: "12px 16px",
  overflow: "hidden",
  whiteSpace: "normal",
  textAlign: "center"
}, ownerState.label && {
  flexDirection: ownerState.iconPosition === "top" || ownerState.iconPosition === "bottom" ? "column" : "row"
}, {
  lineHeight: 1.25
}, ownerState.icon && ownerState.label && {
  minHeight: 72,
  paddingTop: 9,
  paddingBottom: 9,
  [`& > .${tabClasses.iconWrapper}`]: _extends$1({}, ownerState.iconPosition === "top" && {
    marginBottom: 6
  }, ownerState.iconPosition === "bottom" && {
    marginTop: 6
  }, ownerState.iconPosition === "start" && {
    marginRight: theme.spacing(1)
  }, ownerState.iconPosition === "end" && {
    marginLeft: theme.spacing(1)
  })
}, ownerState.textColor === "inherit" && {
  color: "inherit",
  opacity: 0.6,
  // same opacity as theme.palette.text.secondary
  [`&.${tabClasses.selected}`]: {
    opacity: 1
  },
  [`&.${tabClasses.disabled}`]: {
    opacity: (theme.vars || theme).palette.action.disabledOpacity
  }
}, ownerState.textColor === "primary" && {
  color: (theme.vars || theme).palette.text.secondary,
  [`&.${tabClasses.selected}`]: {
    color: (theme.vars || theme).palette.primary.main
  },
  [`&.${tabClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.disabled
  }
}, ownerState.textColor === "secondary" && {
  color: (theme.vars || theme).palette.text.secondary,
  [`&.${tabClasses.selected}`]: {
    color: (theme.vars || theme).palette.secondary.main
  },
  [`&.${tabClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.disabled
  }
}, ownerState.fullWidth && {
  flexShrink: 1,
  flexGrow: 1,
  flexBasis: 0,
  maxWidth: "none"
}, ownerState.wrapped && {
  fontSize: theme.typography.pxToRem(12)
}));
const Tab = /* @__PURE__ */ reactExports.forwardRef(function Tab2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiTab"
  });
  const {
    className,
    disabled = false,
    disableFocusRipple = false,
    // eslint-disable-next-line react/prop-types
    fullWidth,
    icon: iconProp,
    iconPosition = "top",
    // eslint-disable-next-line react/prop-types
    indicator,
    label,
    onChange,
    onClick: onClick2,
    onFocus,
    // eslint-disable-next-line react/prop-types
    selected,
    // eslint-disable-next-line react/prop-types
    selectionFollowsFocus,
    // eslint-disable-next-line react/prop-types
    textColor = "inherit",
    value,
    wrapped = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$h);
  const ownerState = _extends$1({}, props, {
    disabled,
    disableFocusRipple,
    selected,
    icon: !!iconProp,
    iconPosition,
    label: !!label,
    fullWidth,
    textColor,
    wrapped
  });
  const classes = useUtilityClasses$f(ownerState);
  const icon = iconProp && label && /* @__PURE__ */ reactExports.isValidElement(iconProp) ? /* @__PURE__ */ reactExports.cloneElement(iconProp, {
    className: clsx$3(classes.iconWrapper, iconProp.props.className)
  }) : iconProp;
  const handleClick = (event) => {
    if (!selected && onChange) {
      onChange(event, value);
    }
    if (onClick2) {
      onClick2(event);
    }
  };
  const handleFocus = (event) => {
    if (selectionFollowsFocus && !selected && onChange) {
      onChange(event, value);
    }
    if (onFocus) {
      onFocus(event);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(TabRoot, _extends$1({
    focusRipple: !disableFocusRipple,
    className: clsx$3(classes.root, className),
    ref: ref2,
    role: "tab",
    "aria-selected": selected,
    disabled,
    onClick: handleClick,
    onFocus: handleFocus,
    ownerState,
    tabIndex: selected ? 0 : -1
  }, other, {
    children: [iconPosition === "top" || iconPosition === "start" ? /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
      children: [icon, label]
    }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
      children: [label, icon]
    }), indicator]
  }));
});
function getToolbarUtilityClass(slot) {
  return generateUtilityClass("MuiToolbar", slot);
}
generateUtilityClasses("MuiToolbar", ["root", "gutters", "regular", "dense"]);
const _excluded$g = ["className", "component", "disableGutters", "variant"];
const useUtilityClasses$e = (ownerState) => {
  const {
    classes,
    disableGutters,
    variant: variant2
  } = ownerState;
  const slots = {
    root: ["root", !disableGutters && "gutters", variant2]
  };
  return composeClasses(slots, getToolbarUtilityClass, classes);
};
const ToolbarRoot = styled("div", {
  name: "MuiToolbar",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, !ownerState.disableGutters && styles2.gutters, styles2[ownerState.variant]];
  }
})(({
  theme,
  ownerState
}) => _extends$1({
  position: "relative",
  display: "flex",
  alignItems: "center"
}, !ownerState.disableGutters && {
  paddingLeft: theme.spacing(2),
  paddingRight: theme.spacing(2),
  [theme.breakpoints.up("sm")]: {
    paddingLeft: theme.spacing(3),
    paddingRight: theme.spacing(3)
  }
}, ownerState.variant === "dense" && {
  minHeight: 48
}), ({
  theme,
  ownerState
}) => ownerState.variant === "regular" && theme.mixins.toolbar);
const Toolbar = /* @__PURE__ */ reactExports.forwardRef(function Toolbar2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiToolbar"
  });
  const {
    className,
    component = "div",
    disableGutters = false,
    variant: variant2 = "regular"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$g);
  const ownerState = _extends$1({}, props, {
    component,
    disableGutters,
    variant: variant2
  });
  const classes = useUtilityClasses$e(ownerState);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ToolbarRoot, _extends$1({
    as: component,
    className: clsx$3(classes.root, className),
    ref: ref2,
    ownerState
  }, other));
});
const KeyboardArrowLeft$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M15.41 16.09l-4.58-4.59 4.58-4.59L14 5.5l-6 6 6 6z"
}), "KeyboardArrowLeft");
const KeyboardArrowRight$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"
}), "KeyboardArrowRight");
function easeInOutSin(time2) {
  return (1 + Math.sin(Math.PI * time2 - Math.PI / 2)) / 2;
}
function animate$1(property, element, to, options = {}, cb = () => {
}) {
  const {
    ease = easeInOutSin,
    duration: duration2 = 300
    // standard
  } = options;
  let start2 = null;
  const from2 = element[property];
  let cancelled = false;
  const cancel = () => {
    cancelled = true;
  };
  const step = (timestamp) => {
    if (cancelled) {
      cb(new Error("Animation cancelled"));
      return;
    }
    if (start2 === null) {
      start2 = timestamp;
    }
    const time2 = Math.min(1, (timestamp - start2) / duration2);
    element[property] = ease(time2) * (to - from2) + from2;
    if (time2 >= 1) {
      requestAnimationFrame(() => {
        cb(null);
      });
      return;
    }
    requestAnimationFrame(step);
  };
  if (from2 === to) {
    cb(new Error("Element already at target position"));
    return cancel;
  }
  requestAnimationFrame(step);
  return cancel;
}
const _excluded$f = ["onChange"];
const styles$6 = {
  width: 99,
  height: 99,
  position: "absolute",
  top: -9999,
  overflow: "scroll"
};
function ScrollbarSize(props) {
  const {
    onChange
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$f);
  const scrollbarHeight = reactExports.useRef();
  const nodeRef = reactExports.useRef(null);
  const setMeasurements = () => {
    scrollbarHeight.current = nodeRef.current.offsetHeight - nodeRef.current.clientHeight;
  };
  useEnhancedEffect(() => {
    const handleResize = debounce$2(() => {
      const prevHeight = scrollbarHeight.current;
      setMeasurements();
      if (prevHeight !== scrollbarHeight.current) {
        onChange(scrollbarHeight.current);
      }
    });
    const containerWindow = ownerWindow(nodeRef.current);
    containerWindow.addEventListener("resize", handleResize);
    return () => {
      handleResize.clear();
      containerWindow.removeEventListener("resize", handleResize);
    };
  }, [onChange]);
  reactExports.useEffect(() => {
    setMeasurements();
    onChange(scrollbarHeight.current);
  }, [onChange]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", _extends$1({
    style: styles$6
  }, other, {
    ref: nodeRef
  }));
}
function getTabScrollButtonUtilityClass(slot) {
  return generateUtilityClass("MuiTabScrollButton", slot);
}
const tabScrollButtonClasses = generateUtilityClasses("MuiTabScrollButton", ["root", "vertical", "horizontal", "disabled"]);
const _excluded$e = ["className", "slots", "slotProps", "direction", "orientation", "disabled"];
const useUtilityClasses$d = (ownerState) => {
  const {
    classes,
    orientation,
    disabled
  } = ownerState;
  const slots = {
    root: ["root", orientation, disabled && "disabled"]
  };
  return composeClasses(slots, getTabScrollButtonUtilityClass, classes);
};
const TabScrollButtonRoot = styled(ButtonBase, {
  name: "MuiTabScrollButton",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.root, ownerState.orientation && styles2[ownerState.orientation]];
  }
})(({
  ownerState
}) => _extends$1({
  width: 40,
  flexShrink: 0,
  opacity: 0.8,
  [`&.${tabScrollButtonClasses.disabled}`]: {
    opacity: 0
  }
}, ownerState.orientation === "vertical" && {
  width: "100%",
  height: 40,
  "& svg": {
    transform: `rotate(${ownerState.isRtl ? -90 : 90}deg)`
  }
}));
const TabScrollButton = /* @__PURE__ */ reactExports.forwardRef(function TabScrollButton2(inProps, ref2) {
  var _slots$StartScrollBut, _slots$EndScrollButto;
  const props = useDefaultProps({
    props: inProps,
    name: "MuiTabScrollButton"
  });
  const {
    className,
    slots = {},
    slotProps = {},
    direction: direction2
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$e);
  const isRtl = useRtl();
  const ownerState = _extends$1({
    isRtl
  }, props);
  const classes = useUtilityClasses$d(ownerState);
  const StartButtonIcon = (_slots$StartScrollBut = slots.StartScrollButtonIcon) != null ? _slots$StartScrollBut : KeyboardArrowLeft$1;
  const EndButtonIcon = (_slots$EndScrollButto = slots.EndScrollButtonIcon) != null ? _slots$EndScrollButto : KeyboardArrowRight$1;
  const startButtonIconProps = useSlotProps({
    elementType: StartButtonIcon,
    externalSlotProps: slotProps.startScrollButtonIcon,
    additionalProps: {
      fontSize: "small"
    },
    ownerState
  });
  const endButtonIconProps = useSlotProps({
    elementType: EndButtonIcon,
    externalSlotProps: slotProps.endScrollButtonIcon,
    additionalProps: {
      fontSize: "small"
    },
    ownerState
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(TabScrollButtonRoot, _extends$1({
    component: "div",
    className: clsx$3(classes.root, className),
    ref: ref2,
    role: null,
    ownerState,
    tabIndex: null
  }, other, {
    children: direction2 === "left" ? /* @__PURE__ */ jsxRuntimeExports.jsx(StartButtonIcon, _extends$1({}, startButtonIconProps)) : /* @__PURE__ */ jsxRuntimeExports.jsx(EndButtonIcon, _extends$1({}, endButtonIconProps))
  }));
});
function getTabsUtilityClass(slot) {
  return generateUtilityClass("MuiTabs", slot);
}
const tabsClasses = generateUtilityClasses("MuiTabs", ["root", "vertical", "flexContainer", "flexContainerVertical", "centered", "scroller", "fixed", "scrollableX", "scrollableY", "hideScrollbar", "scrollButtons", "scrollButtonsHideMobile", "indicator"]);
const _excluded$d = ["aria-label", "aria-labelledby", "action", "centered", "children", "className", "component", "allowScrollButtonsMobile", "indicatorColor", "onChange", "orientation", "ScrollButtonComponent", "scrollButtons", "selectionFollowsFocus", "slots", "slotProps", "TabIndicatorProps", "TabScrollButtonProps", "textColor", "value", "variant", "visibleScrollbar"];
const nextItem = (list, item) => {
  if (list === item) {
    return list.firstChild;
  }
  if (item && item.nextElementSibling) {
    return item.nextElementSibling;
  }
  return list.firstChild;
};
const previousItem = (list, item) => {
  if (list === item) {
    return list.lastChild;
  }
  if (item && item.previousElementSibling) {
    return item.previousElementSibling;
  }
  return list.lastChild;
};
const moveFocus = (list, currentFocus, traversalFunction) => {
  let wrappedOnce = false;
  let nextFocus = traversalFunction(list, currentFocus);
  while (nextFocus) {
    if (nextFocus === list.firstChild) {
      if (wrappedOnce) {
        return;
      }
      wrappedOnce = true;
    }
    const nextFocusDisabled = nextFocus.disabled || nextFocus.getAttribute("aria-disabled") === "true";
    if (!nextFocus.hasAttribute("tabindex") || nextFocusDisabled) {
      nextFocus = traversalFunction(list, nextFocus);
    } else {
      nextFocus.focus();
      return;
    }
  }
};
const useUtilityClasses$c = (ownerState) => {
  const {
    vertical,
    fixed,
    hideScrollbar,
    scrollableX,
    scrollableY,
    centered,
    scrollButtonsHideMobile,
    classes
  } = ownerState;
  const slots = {
    root: ["root", vertical && "vertical"],
    scroller: ["scroller", fixed && "fixed", hideScrollbar && "hideScrollbar", scrollableX && "scrollableX", scrollableY && "scrollableY"],
    flexContainer: ["flexContainer", vertical && "flexContainerVertical", centered && "centered"],
    indicator: ["indicator"],
    scrollButtons: ["scrollButtons", scrollButtonsHideMobile && "scrollButtonsHideMobile"],
    scrollableX: [scrollableX && "scrollableX"],
    hideScrollbar: [hideScrollbar && "hideScrollbar"]
  };
  return composeClasses(slots, getTabsUtilityClass, classes);
};
const TabsRoot = styled("div", {
  name: "MuiTabs",
  slot: "Root",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [{
      [`& .${tabsClasses.scrollButtons}`]: styles2.scrollButtons
    }, {
      [`& .${tabsClasses.scrollButtons}`]: ownerState.scrollButtonsHideMobile && styles2.scrollButtonsHideMobile
    }, styles2.root, ownerState.vertical && styles2.vertical];
  }
})(({
  ownerState,
  theme
}) => _extends$1({
  overflow: "hidden",
  minHeight: 48,
  // Add iOS momentum scrolling for iOS < 13.0
  WebkitOverflowScrolling: "touch",
  display: "flex"
}, ownerState.vertical && {
  flexDirection: "column"
}, ownerState.scrollButtonsHideMobile && {
  [`& .${tabsClasses.scrollButtons}`]: {
    [theme.breakpoints.down("sm")]: {
      display: "none"
    }
  }
}));
const TabsScroller = styled("div", {
  name: "MuiTabs",
  slot: "Scroller",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.scroller, ownerState.fixed && styles2.fixed, ownerState.hideScrollbar && styles2.hideScrollbar, ownerState.scrollableX && styles2.scrollableX, ownerState.scrollableY && styles2.scrollableY];
  }
})(({
  ownerState
}) => _extends$1({
  position: "relative",
  display: "inline-block",
  flex: "1 1 auto",
  whiteSpace: "nowrap"
}, ownerState.fixed && {
  overflowX: "hidden",
  width: "100%"
}, ownerState.hideScrollbar && {
  // Hide dimensionless scrollbar on macOS
  scrollbarWidth: "none",
  // Firefox
  "&::-webkit-scrollbar": {
    display: "none"
    // Safari + Chrome
  }
}, ownerState.scrollableX && {
  overflowX: "auto",
  overflowY: "hidden"
}, ownerState.scrollableY && {
  overflowY: "auto",
  overflowX: "hidden"
}));
const FlexContainer = styled("div", {
  name: "MuiTabs",
  slot: "FlexContainer",
  overridesResolver: (props, styles2) => {
    const {
      ownerState
    } = props;
    return [styles2.flexContainer, ownerState.vertical && styles2.flexContainerVertical, ownerState.centered && styles2.centered];
  }
})(({
  ownerState
}) => _extends$1({
  display: "flex"
}, ownerState.vertical && {
  flexDirection: "column"
}, ownerState.centered && {
  justifyContent: "center"
}));
const TabsIndicator = styled("span", {
  name: "MuiTabs",
  slot: "Indicator",
  overridesResolver: (props, styles2) => styles2.indicator
})(({
  ownerState,
  theme
}) => _extends$1({
  position: "absolute",
  height: 2,
  bottom: 0,
  width: "100%",
  transition: theme.transitions.create()
}, ownerState.indicatorColor === "primary" && {
  backgroundColor: (theme.vars || theme).palette.primary.main
}, ownerState.indicatorColor === "secondary" && {
  backgroundColor: (theme.vars || theme).palette.secondary.main
}, ownerState.vertical && {
  height: "100%",
  width: 2,
  right: 0
}));
const TabsScrollbarSize = styled(ScrollbarSize)({
  overflowX: "auto",
  overflowY: "hidden",
  // Hide dimensionless scrollbar on macOS
  scrollbarWidth: "none",
  // Firefox
  "&::-webkit-scrollbar": {
    display: "none"
    // Safari + Chrome
  }
});
const defaultIndicatorStyle = {};
const Tabs$1 = /* @__PURE__ */ reactExports.forwardRef(function Tabs2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiTabs"
  });
  const theme = useTheme$1();
  const isRtl = useRtl();
  const {
    "aria-label": ariaLabel,
    "aria-labelledby": ariaLabelledBy,
    action,
    centered = false,
    children: childrenProp,
    className,
    component = "div",
    allowScrollButtonsMobile = false,
    indicatorColor = "primary",
    onChange,
    orientation = "horizontal",
    ScrollButtonComponent = TabScrollButton,
    scrollButtons = "auto",
    selectionFollowsFocus,
    slots = {},
    slotProps = {},
    TabIndicatorProps = {},
    TabScrollButtonProps = {},
    textColor = "primary",
    value,
    variant: variant2 = "standard",
    visibleScrollbar = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$d);
  const scrollable = variant2 === "scrollable";
  const vertical = orientation === "vertical";
  const scrollStart = vertical ? "scrollTop" : "scrollLeft";
  const start2 = vertical ? "top" : "left";
  const end2 = vertical ? "bottom" : "right";
  const clientSize = vertical ? "clientHeight" : "clientWidth";
  const size = vertical ? "height" : "width";
  const ownerState = _extends$1({}, props, {
    component,
    allowScrollButtonsMobile,
    indicatorColor,
    orientation,
    vertical,
    scrollButtons,
    textColor,
    variant: variant2,
    visibleScrollbar,
    fixed: !scrollable,
    hideScrollbar: scrollable && !visibleScrollbar,
    scrollableX: scrollable && !vertical,
    scrollableY: scrollable && vertical,
    centered: centered && !scrollable,
    scrollButtonsHideMobile: !allowScrollButtonsMobile
  });
  const classes = useUtilityClasses$c(ownerState);
  const startScrollButtonIconProps = useSlotProps({
    elementType: slots.StartScrollButtonIcon,
    externalSlotProps: slotProps.startScrollButtonIcon,
    ownerState
  });
  const endScrollButtonIconProps = useSlotProps({
    elementType: slots.EndScrollButtonIcon,
    externalSlotProps: slotProps.endScrollButtonIcon,
    ownerState
  });
  const [mounted, setMounted] = reactExports.useState(false);
  const [indicatorStyle, setIndicatorStyle] = reactExports.useState(defaultIndicatorStyle);
  const [displayStartScroll, setDisplayStartScroll] = reactExports.useState(false);
  const [displayEndScroll, setDisplayEndScroll] = reactExports.useState(false);
  const [updateScrollObserver, setUpdateScrollObserver] = reactExports.useState(false);
  const [scrollerStyle, setScrollerStyle] = reactExports.useState({
    overflow: "hidden",
    scrollbarWidth: 0
  });
  const valueToIndex = /* @__PURE__ */ new Map();
  const tabsRef = reactExports.useRef(null);
  const tabListRef = reactExports.useRef(null);
  const getTabsMeta = () => {
    const tabsNode = tabsRef.current;
    let tabsMeta;
    if (tabsNode) {
      const rect = tabsNode.getBoundingClientRect();
      tabsMeta = {
        clientWidth: tabsNode.clientWidth,
        scrollLeft: tabsNode.scrollLeft,
        scrollTop: tabsNode.scrollTop,
        scrollLeftNormalized: getNormalizedScrollLeft(tabsNode, isRtl ? "rtl" : "ltr"),
        scrollWidth: tabsNode.scrollWidth,
        top: rect.top,
        bottom: rect.bottom,
        left: rect.left,
        right: rect.right
      };
    }
    let tabMeta;
    if (tabsNode && value !== false) {
      const children2 = tabListRef.current.children;
      if (children2.length > 0) {
        const tab = children2[valueToIndex.get(value)];
        tabMeta = tab ? tab.getBoundingClientRect() : null;
      }
    }
    return {
      tabsMeta,
      tabMeta
    };
  };
  const updateIndicatorState = useEventCallback(() => {
    const {
      tabsMeta,
      tabMeta
    } = getTabsMeta();
    let startValue = 0;
    let startIndicator;
    if (vertical) {
      startIndicator = "top";
      if (tabMeta && tabsMeta) {
        startValue = tabMeta.top - tabsMeta.top + tabsMeta.scrollTop;
      }
    } else {
      startIndicator = isRtl ? "right" : "left";
      if (tabMeta && tabsMeta) {
        const correction = isRtl ? tabsMeta.scrollLeftNormalized + tabsMeta.clientWidth - tabsMeta.scrollWidth : tabsMeta.scrollLeft;
        startValue = (isRtl ? -1 : 1) * (tabMeta[startIndicator] - tabsMeta[startIndicator] + correction);
      }
    }
    const newIndicatorStyle = {
      [startIndicator]: startValue,
      // May be wrong until the font is loaded.
      [size]: tabMeta ? tabMeta[size] : 0
    };
    if (isNaN(indicatorStyle[startIndicator]) || isNaN(indicatorStyle[size])) {
      setIndicatorStyle(newIndicatorStyle);
    } else {
      const dStart = Math.abs(indicatorStyle[startIndicator] - newIndicatorStyle[startIndicator]);
      const dSize = Math.abs(indicatorStyle[size] - newIndicatorStyle[size]);
      if (dStart >= 1 || dSize >= 1) {
        setIndicatorStyle(newIndicatorStyle);
      }
    }
  });
  const scroll = (scrollValue, {
    animation = true
  } = {}) => {
    if (animation) {
      animate$1(scrollStart, tabsRef.current, scrollValue, {
        duration: theme.transitions.duration.standard
      });
    } else {
      tabsRef.current[scrollStart] = scrollValue;
    }
  };
  const moveTabsScroll = (delta) => {
    let scrollValue = tabsRef.current[scrollStart];
    if (vertical) {
      scrollValue += delta;
    } else {
      scrollValue += delta * (isRtl ? -1 : 1);
      scrollValue *= isRtl && detectScrollType() === "reverse" ? -1 : 1;
    }
    scroll(scrollValue);
  };
  const getScrollSize = () => {
    const containerSize = tabsRef.current[clientSize];
    let totalSize = 0;
    const children2 = Array.from(tabListRef.current.children);
    for (let i = 0; i < children2.length; i += 1) {
      const tab = children2[i];
      if (totalSize + tab[clientSize] > containerSize) {
        if (i === 0) {
          totalSize = containerSize;
        }
        break;
      }
      totalSize += tab[clientSize];
    }
    return totalSize;
  };
  const handleStartScrollClick = () => {
    moveTabsScroll(-1 * getScrollSize());
  };
  const handleEndScrollClick = () => {
    moveTabsScroll(getScrollSize());
  };
  const handleScrollbarSizeChange = reactExports.useCallback((scrollbarWidth) => {
    setScrollerStyle({
      overflow: null,
      scrollbarWidth
    });
  }, []);
  const getConditionalElements = () => {
    const conditionalElements2 = {};
    conditionalElements2.scrollbarSizeListener = scrollable ? /* @__PURE__ */ jsxRuntimeExports.jsx(TabsScrollbarSize, {
      onChange: handleScrollbarSizeChange,
      className: clsx$3(classes.scrollableX, classes.hideScrollbar)
    }) : null;
    const scrollButtonsActive = displayStartScroll || displayEndScroll;
    const showScrollButtons = scrollable && (scrollButtons === "auto" && scrollButtonsActive || scrollButtons === true);
    conditionalElements2.scrollButtonStart = showScrollButtons ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollButtonComponent, _extends$1({
      slots: {
        StartScrollButtonIcon: slots.StartScrollButtonIcon
      },
      slotProps: {
        startScrollButtonIcon: startScrollButtonIconProps
      },
      orientation,
      direction: isRtl ? "right" : "left",
      onClick: handleStartScrollClick,
      disabled: !displayStartScroll
    }, TabScrollButtonProps, {
      className: clsx$3(classes.scrollButtons, TabScrollButtonProps.className)
    })) : null;
    conditionalElements2.scrollButtonEnd = showScrollButtons ? /* @__PURE__ */ jsxRuntimeExports.jsx(ScrollButtonComponent, _extends$1({
      slots: {
        EndScrollButtonIcon: slots.EndScrollButtonIcon
      },
      slotProps: {
        endScrollButtonIcon: endScrollButtonIconProps
      },
      orientation,
      direction: isRtl ? "left" : "right",
      onClick: handleEndScrollClick,
      disabled: !displayEndScroll
    }, TabScrollButtonProps, {
      className: clsx$3(classes.scrollButtons, TabScrollButtonProps.className)
    })) : null;
    return conditionalElements2;
  };
  const scrollSelectedIntoView = useEventCallback((animation) => {
    const {
      tabsMeta,
      tabMeta
    } = getTabsMeta();
    if (!tabMeta || !tabsMeta) {
      return;
    }
    if (tabMeta[start2] < tabsMeta[start2]) {
      const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[start2] - tabsMeta[start2]);
      scroll(nextScrollStart, {
        animation
      });
    } else if (tabMeta[end2] > tabsMeta[end2]) {
      const nextScrollStart = tabsMeta[scrollStart] + (tabMeta[end2] - tabsMeta[end2]);
      scroll(nextScrollStart, {
        animation
      });
    }
  });
  const updateScrollButtonState = useEventCallback(() => {
    if (scrollable && scrollButtons !== false) {
      setUpdateScrollObserver(!updateScrollObserver);
    }
  });
  reactExports.useEffect(() => {
    const handleResize = debounce$2(() => {
      if (tabsRef.current) {
        updateIndicatorState();
      }
    });
    let resizeObserver;
    const handleMutation = (records) => {
      records.forEach((record) => {
        record.removedNodes.forEach((item) => {
          var _resizeObserver;
          (_resizeObserver = resizeObserver) == null || _resizeObserver.unobserve(item);
        });
        record.addedNodes.forEach((item) => {
          var _resizeObserver2;
          (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.observe(item);
        });
      });
      handleResize();
      updateScrollButtonState();
    };
    const win = ownerWindow(tabsRef.current);
    win.addEventListener("resize", handleResize);
    let mutationObserver;
    if (typeof ResizeObserver !== "undefined") {
      resizeObserver = new ResizeObserver(handleResize);
      Array.from(tabListRef.current.children).forEach((child) => {
        resizeObserver.observe(child);
      });
    }
    if (typeof MutationObserver !== "undefined") {
      mutationObserver = new MutationObserver(handleMutation);
      mutationObserver.observe(tabListRef.current, {
        childList: true
      });
    }
    return () => {
      var _mutationObserver, _resizeObserver3;
      handleResize.clear();
      win.removeEventListener("resize", handleResize);
      (_mutationObserver = mutationObserver) == null || _mutationObserver.disconnect();
      (_resizeObserver3 = resizeObserver) == null || _resizeObserver3.disconnect();
    };
  }, [updateIndicatorState, updateScrollButtonState]);
  reactExports.useEffect(() => {
    const tabListChildren = Array.from(tabListRef.current.children);
    const length2 = tabListChildren.length;
    if (typeof IntersectionObserver !== "undefined" && length2 > 0 && scrollable && scrollButtons !== false) {
      const firstTab = tabListChildren[0];
      const lastTab = tabListChildren[length2 - 1];
      const observerOptions = {
        root: tabsRef.current,
        threshold: 0.99
      };
      const handleScrollButtonStart = (entries) => {
        setDisplayStartScroll(!entries[0].isIntersecting);
      };
      const firstObserver = new IntersectionObserver(handleScrollButtonStart, observerOptions);
      firstObserver.observe(firstTab);
      const handleScrollButtonEnd = (entries) => {
        setDisplayEndScroll(!entries[0].isIntersecting);
      };
      const lastObserver = new IntersectionObserver(handleScrollButtonEnd, observerOptions);
      lastObserver.observe(lastTab);
      return () => {
        firstObserver.disconnect();
        lastObserver.disconnect();
      };
    }
    return void 0;
  }, [scrollable, scrollButtons, updateScrollObserver, childrenProp == null ? void 0 : childrenProp.length]);
  reactExports.useEffect(() => {
    setMounted(true);
  }, []);
  reactExports.useEffect(() => {
    updateIndicatorState();
  });
  reactExports.useEffect(() => {
    scrollSelectedIntoView(defaultIndicatorStyle !== indicatorStyle);
  }, [scrollSelectedIntoView, indicatorStyle]);
  reactExports.useImperativeHandle(action, () => ({
    updateIndicator: updateIndicatorState,
    updateScrollButtons: updateScrollButtonState
  }), [updateIndicatorState, updateScrollButtonState]);
  const indicator = /* @__PURE__ */ jsxRuntimeExports.jsx(TabsIndicator, _extends$1({}, TabIndicatorProps, {
    className: clsx$3(classes.indicator, TabIndicatorProps.className),
    ownerState,
    style: _extends$1({}, indicatorStyle, TabIndicatorProps.style)
  }));
  let childIndex = 0;
  const children = reactExports.Children.map(childrenProp, (child) => {
    if (!/* @__PURE__ */ reactExports.isValidElement(child)) {
      return null;
    }
    const childValue = child.props.value === void 0 ? childIndex : child.props.value;
    valueToIndex.set(childValue, childIndex);
    const selected = childValue === value;
    childIndex += 1;
    return /* @__PURE__ */ reactExports.cloneElement(child, _extends$1({
      fullWidth: variant2 === "fullWidth",
      indicator: selected && !mounted && indicator,
      selected,
      selectionFollowsFocus,
      onChange,
      textColor,
      value: childValue
    }, childIndex === 1 && value === false && !child.props.tabIndex ? {
      tabIndex: 0
    } : {}));
  });
  const handleKeyDown2 = (event) => {
    const list = tabListRef.current;
    const currentFocus = ownerDocument(list).activeElement;
    const role = currentFocus.getAttribute("role");
    if (role !== "tab") {
      return;
    }
    let previousItemKey = orientation === "horizontal" ? "ArrowLeft" : "ArrowUp";
    let nextItemKey = orientation === "horizontal" ? "ArrowRight" : "ArrowDown";
    if (orientation === "horizontal" && isRtl) {
      previousItemKey = "ArrowRight";
      nextItemKey = "ArrowLeft";
    }
    switch (event.key) {
      case previousItemKey:
        event.preventDefault();
        moveFocus(list, currentFocus, previousItem);
        break;
      case nextItemKey:
        event.preventDefault();
        moveFocus(list, currentFocus, nextItem);
        break;
      case "Home":
        event.preventDefault();
        moveFocus(list, null, nextItem);
        break;
      case "End":
        event.preventDefault();
        moveFocus(list, null, previousItem);
        break;
    }
  };
  const conditionalElements = getConditionalElements();
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState,
    ref: ref2,
    as: component
  }, other, {
    children: [conditionalElements.scrollButtonStart, conditionalElements.scrollbarSizeListener, /* @__PURE__ */ jsxRuntimeExports.jsxs(TabsScroller, {
      className: classes.scroller,
      ownerState,
      style: {
        overflow: scrollerStyle.overflow,
        [vertical ? `margin${isRtl ? "Left" : "Right"}` : "marginBottom"]: visibleScrollbar ? void 0 : -scrollerStyle.scrollbarWidth
      },
      ref: tabsRef,
      children: [/* @__PURE__ */ jsxRuntimeExports.jsx(FlexContainer, {
        "aria-label": ariaLabel,
        "aria-labelledby": ariaLabelledBy,
        "aria-orientation": orientation === "vertical" ? "vertical" : null,
        className: classes.flexContainer,
        ownerState,
        onKeyDown: handleKeyDown2,
        ref: tabListRef,
        role: "tablist",
        children
      }), mounted && indicator]
    }), conditionalElements.scrollButtonEnd]
  }));
});
function getTextFieldUtilityClass(slot) {
  return generateUtilityClass("MuiTextField", slot);
}
generateUtilityClasses("MuiTextField", ["root"]);
const _excluded$c = ["autoComplete", "autoFocus", "children", "className", "color", "defaultValue", "disabled", "error", "FormHelperTextProps", "fullWidth", "helperText", "id", "InputLabelProps", "inputProps", "InputProps", "inputRef", "label", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onFocus", "placeholder", "required", "rows", "select", "SelectProps", "type", "value", "variant"];
const variantComponent = {
  standard: Input$2,
  filled: FilledInput,
  outlined: OutlinedInput
};
const useUtilityClasses$b = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getTextFieldUtilityClass, classes);
};
const TextFieldRoot = styled(FormControl, {
  name: "MuiTextField",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({});
const TextField = /* @__PURE__ */ reactExports.forwardRef(function TextField2(inProps, ref2) {
  const props = useDefaultProps({
    props: inProps,
    name: "MuiTextField"
  });
  const {
    autoComplete,
    autoFocus = false,
    children,
    className,
    color: color2 = "primary",
    defaultValue,
    disabled = false,
    error = false,
    FormHelperTextProps,
    fullWidth = false,
    helperText,
    id: idOverride,
    InputLabelProps,
    inputProps,
    InputProps,
    inputRef,
    label,
    maxRows,
    minRows,
    multiline = false,
    name,
    onBlur,
    onChange,
    onFocus,
    placeholder,
    required = false,
    rows,
    select = false,
    SelectProps,
    type: type2,
    value,
    variant: variant2 = "outlined"
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$c);
  const ownerState = _extends$1({}, props, {
    autoFocus,
    color: color2,
    disabled,
    error,
    fullWidth,
    multiline,
    required,
    select,
    variant: variant2
  });
  const classes = useUtilityClasses$b(ownerState);
  const InputMore = {};
  if (variant2 === "outlined") {
    if (InputLabelProps && typeof InputLabelProps.shrink !== "undefined") {
      InputMore.notched = InputLabelProps.shrink;
    }
    InputMore.label = label;
  }
  if (select) {
    if (!SelectProps || !SelectProps.native) {
      InputMore.id = void 0;
    }
    InputMore["aria-describedby"] = void 0;
  }
  const id = useId$1(idOverride);
  const helperTextId = helperText && id ? `${id}-helper-text` : void 0;
  const inputLabelId = label && id ? `${id}-label` : void 0;
  const InputComponent = variantComponent[variant2];
  const InputElement = /* @__PURE__ */ jsxRuntimeExports.jsx(InputComponent, _extends$1({
    "aria-describedby": helperTextId,
    autoComplete,
    autoFocus,
    defaultValue,
    fullWidth,
    multiline,
    name,
    rows,
    maxRows,
    minRows,
    type: type2,
    value,
    id,
    inputRef,
    onBlur,
    onChange,
    onFocus,
    placeholder,
    inputProps
  }, InputMore, InputProps));
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(TextFieldRoot, _extends$1({
    className: clsx$3(classes.root, className),
    disabled,
    error,
    fullWidth,
    ref: ref2,
    required,
    color: color2,
    variant: variant2,
    ownerState
  }, other, {
    children: [label != null && label !== "" && /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, _extends$1({
      htmlFor: id,
      id: inputLabelId
    }, InputLabelProps, {
      children: label
    })), select ? /* @__PURE__ */ jsxRuntimeExports.jsx(Select, _extends$1({
      "aria-describedby": helperTextId,
      id,
      labelId: inputLabelId,
      value,
      input: InputElement
    }, SelectProps, {
      children
    })) : InputElement, helperText && /* @__PURE__ */ jsxRuntimeExports.jsx(FormHelperText, _extends$1({
      id: helperTextId
    }, FormHelperTextProps, {
      children: helperText
    }))]
  }));
});
function bind(fn2, thisArg) {
  return function wrap2() {
    return fn2.apply(thisArg, arguments);
  };
}
const { toString } = Object.prototype;
const { getPrototypeOf } = Object;
const { iterator, toStringTag } = Symbol;
const kindOf = /* @__PURE__ */ ((cache2) => (thing) => {
  const str = toString.call(thing);
  return cache2[str] || (cache2[str] = str.slice(8, -1).toLowerCase());
})(/* @__PURE__ */ Object.create(null));
const kindOfTest = (type2) => {
  type2 = type2.toLowerCase();
  return (thing) => kindOf(thing) === type2;
};
const typeOfTest = (type2) => (thing) => typeof thing === type2;
const { isArray } = Array;
const isUndefined = typeOfTest("undefined");
function isBuffer(val) {
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
}
const isArrayBuffer = kindOfTest("ArrayBuffer");
function isArrayBufferView(val) {
  let result;
  if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
    result = ArrayBuffer.isView(val);
  } else {
    result = val && val.buffer && isArrayBuffer(val.buffer);
  }
  return result;
}
const isString$2 = typeOfTest("string");
const isFunction = typeOfTest("function");
const isNumber = typeOfTest("number");
const isObject$1 = (thing) => thing !== null && typeof thing === "object";
const isBoolean = (thing) => thing === true || thing === false;
const isPlainObject = (val) => {
  if (kindOf(val) !== "object") {
    return false;
  }
  const prototype2 = getPrototypeOf(val);
  return (prototype2 === null || prototype2 === Object.prototype || Object.getPrototypeOf(prototype2) === null) && !(toStringTag in val) && !(iterator in val);
};
const isDate = kindOfTest("Date");
const isFile = kindOfTest("File");
const isBlob = kindOfTest("Blob");
const isFileList = kindOfTest("FileList");
const isStream = (val) => isObject$1(val) && isFunction(val.pipe);
const isFormData = (thing) => {
  let kind;
  return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
  kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
};
const isURLSearchParams = kindOfTest("URLSearchParams");
const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
function forEach(obj2, fn2, { allOwnKeys = false } = {}) {
  if (obj2 === null || typeof obj2 === "undefined") {
    return;
  }
  let i;
  let l;
  if (typeof obj2 !== "object") {
    obj2 = [obj2];
  }
  if (isArray(obj2)) {
    for (i = 0, l = obj2.length; i < l; i++) {
      fn2.call(null, obj2[i], i, obj2);
    }
  } else {
    const keys = allOwnKeys ? Object.getOwnPropertyNames(obj2) : Object.keys(obj2);
    const len = keys.length;
    let key;
    for (i = 0; i < len; i++) {
      key = keys[i];
      fn2.call(null, obj2[key], key, obj2);
    }
  }
}
function findKey(obj2, key) {
  key = key.toLowerCase();
  const keys = Object.keys(obj2);
  let i = keys.length;
  let _key;
  while (i-- > 0) {
    _key = keys[i];
    if (key === _key.toLowerCase()) {
      return _key;
    }
  }
  return null;
}
const _global = (() => {
  if (typeof globalThis !== "undefined") return globalThis;
  return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
})();
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
function merge() {
  const { caseless } = isContextDefined(this) && this || {};
  const result = {};
  const assignValue = (val, key) => {
    const targetKey = caseless && findKey(result, key) || key;
    if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
      result[targetKey] = merge(result[targetKey], val);
    } else if (isPlainObject(val)) {
      result[targetKey] = merge({}, val);
    } else if (isArray(val)) {
      result[targetKey] = val.slice();
    } else {
      result[targetKey] = val;
    }
  };
  for (let i = 0, l = arguments.length; i < l; i++) {
    arguments[i] && forEach(arguments[i], assignValue);
  }
  return result;
}
const extend$1 = (a2, b2, thisArg, { allOwnKeys } = {}) => {
  forEach(b2, (val, key) => {
    if (thisArg && isFunction(val)) {
      a2[key] = bind(val, thisArg);
    } else {
      a2[key] = val;
    }
  }, { allOwnKeys });
  return a2;
};
const stripBOM = (content2) => {
  if (content2.charCodeAt(0) === 65279) {
    content2 = content2.slice(1);
  }
  return content2;
};
const inherits = (constructor, superConstructor, props, descriptors2) => {
  constructor.prototype = Object.create(superConstructor.prototype, descriptors2);
  constructor.prototype.constructor = constructor;
  Object.defineProperty(constructor, "super", {
    value: superConstructor.prototype
  });
  props && Object.assign(constructor.prototype, props);
};
const toFlatObject = (sourceObj, destObj, filter2, propFilter) => {
  let props;
  let i;
  let prop;
  const merged = {};
  destObj = destObj || {};
  if (sourceObj == null) return destObj;
  do {
    props = Object.getOwnPropertyNames(sourceObj);
    i = props.length;
    while (i-- > 0) {
      prop = props[i];
      if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
        destObj[prop] = sourceObj[prop];
        merged[prop] = true;
      }
    }
    sourceObj = filter2 !== false && getPrototypeOf(sourceObj);
  } while (sourceObj && (!filter2 || filter2(sourceObj, destObj)) && sourceObj !== Object.prototype);
  return destObj;
};
const endsWith = (str, searchString, position2) => {
  str = String(str);
  if (position2 === void 0 || position2 > str.length) {
    position2 = str.length;
  }
  position2 -= searchString.length;
  const lastIndex = str.indexOf(searchString, position2);
  return lastIndex !== -1 && lastIndex === position2;
};
const toArray = (thing) => {
  if (!thing) return null;
  if (isArray(thing)) return thing;
  let i = thing.length;
  if (!isNumber(i)) return null;
  const arr = new Array(i);
  while (i-- > 0) {
    arr[i] = thing[i];
  }
  return arr;
};
const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
  return (thing) => {
    return TypedArray && thing instanceof TypedArray;
  };
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
const forEachEntry = (obj2, fn2) => {
  const generator = obj2 && obj2[iterator];
  const _iterator = generator.call(obj2);
  let result;
  while ((result = _iterator.next()) && !result.done) {
    const pair = result.value;
    fn2.call(obj2, pair[0], pair[1]);
  }
};
const matchAll = (regExp, str) => {
  let matches;
  const arr = [];
  while ((matches = regExp.exec(str)) !== null) {
    arr.push(matches);
  }
  return arr;
};
const isHTMLForm = kindOfTest("HTMLFormElement");
const toCamelCase = (str) => {
  return str.toLowerCase().replace(
    /[-_\s]([a-z\d])(\w*)/g,
    function replacer(m2, p1, p2) {
      return p1.toUpperCase() + p2;
    }
  );
};
const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj2, prop) => hasOwnProperty2.call(obj2, prop))(Object.prototype);
const isRegExp = kindOfTest("RegExp");
const reduceDescriptors = (obj2, reducer) => {
  const descriptors2 = Object.getOwnPropertyDescriptors(obj2);
  const reducedDescriptors = {};
  forEach(descriptors2, (descriptor, name) => {
    let ret;
    if ((ret = reducer(descriptor, name, obj2)) !== false) {
      reducedDescriptors[name] = ret || descriptor;
    }
  });
  Object.defineProperties(obj2, reducedDescriptors);
};
const freezeMethods = (obj2) => {
  reduceDescriptors(obj2, (descriptor, name) => {
    if (isFunction(obj2) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
      return false;
    }
    const value = obj2[name];
    if (!isFunction(value)) return;
    descriptor.enumerable = false;
    if ("writable" in descriptor) {
      descriptor.writable = false;
      return;
    }
    if (!descriptor.set) {
      descriptor.set = () => {
        throw Error("Can not rewrite read-only method '" + name + "'");
      };
    }
  });
};
const toObjectSet = (arrayOrString, delimiter2) => {
  const obj2 = {};
  const define2 = (arr) => {
    arr.forEach((value) => {
      obj2[value] = true;
    });
  };
  isArray(arrayOrString) ? define2(arrayOrString) : define2(String(arrayOrString).split(delimiter2));
  return obj2;
};
const noop$2 = () => {
};
const toFiniteNumber = (value, defaultValue) => {
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
};
function isSpecCompliantForm(thing) {
  return !!(thing && isFunction(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
}
const toJSONObject = (obj2) => {
  const stack = new Array(10);
  const visit = (source, i) => {
    if (isObject$1(source)) {
      if (stack.indexOf(source) >= 0) {
        return;
      }
      if (!("toJSON" in source)) {
        stack[i] = source;
        const target = isArray(source) ? [] : {};
        forEach(source, (value, key) => {
          const reducedValue = visit(value, i + 1);
          !isUndefined(reducedValue) && (target[key] = reducedValue);
        });
        stack[i] = void 0;
        return target;
      }
    }
    return source;
  };
  return visit(obj2, 0);
};
const isAsyncFn = kindOfTest("AsyncFunction");
const isThenable = (thing) => thing && (isObject$1(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
  if (setImmediateSupported) {
    return setImmediate;
  }
  return postMessageSupported ? ((token2, callbacks) => {
    _global.addEventListener("message", ({ source, data }) => {
      if (source === _global && data === token2) {
        callbacks.length && callbacks.shift()();
      }
    }, false);
    return (cb) => {
      callbacks.push(cb);
      _global.postMessage(token2, "*");
    };
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
})(
  typeof setImmediate === "function",
  isFunction(_global.postMessage)
);
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
const utils$2 = {
  isArray,
  isArrayBuffer,
  isBuffer,
  isFormData,
  isArrayBufferView,
  isString: isString$2,
  isNumber,
  isBoolean,
  isObject: isObject$1,
  isPlainObject,
  isReadableStream,
  isRequest,
  isResponse,
  isHeaders,
  isUndefined,
  isDate,
  isFile,
  isBlob,
  isRegExp,
  isFunction,
  isStream,
  isURLSearchParams,
  isTypedArray,
  isFileList,
  forEach,
  merge,
  extend: extend$1,
  trim,
  stripBOM,
  inherits,
  toFlatObject,
  kindOf,
  kindOfTest,
  endsWith,
  toArray,
  forEachEntry,
  matchAll,
  isHTMLForm,
  hasOwnProperty,
  hasOwnProp: hasOwnProperty,
  // an alias to avoid ESLint no-prototype-builtins detection
  reduceDescriptors,
  freezeMethods,
  toObjectSet,
  toCamelCase,
  noop: noop$2,
  toFiniteNumber,
  findKey,
  global: _global,
  isContextDefined,
  isSpecCompliantForm,
  toJSONObject,
  isAsyncFn,
  isThenable,
  setImmediate: _setImmediate,
  asap,
  isIterable
};
function AxiosError$1(message, code, config2, request, response) {
  Error.call(this);
  if (Error.captureStackTrace) {
    Error.captureStackTrace(this, this.constructor);
  } else {
    this.stack = new Error().stack;
  }
  this.message = message;
  this.name = "AxiosError";
  code && (this.code = code);
  config2 && (this.config = config2);
  request && (this.request = request);
  if (response) {
    this.response = response;
    this.status = response.status ? response.status : null;
  }
}
utils$2.inherits(AxiosError$1, Error, {
  toJSON: function toJSON() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: utils$2.toJSONObject(this.config),
      code: this.code,
      status: this.status
    };
  }
});
const prototype$1 = AxiosError$1.prototype;
const descriptors = {};
[
  "ERR_BAD_OPTION_VALUE",
  "ERR_BAD_OPTION",
  "ECONNABORTED",
  "ETIMEDOUT",
  "ERR_NETWORK",
  "ERR_FR_TOO_MANY_REDIRECTS",
  "ERR_DEPRECATED",
  "ERR_BAD_RESPONSE",
  "ERR_BAD_REQUEST",
  "ERR_CANCELED",
  "ERR_NOT_SUPPORT",
  "ERR_INVALID_URL"
  // eslint-disable-next-line func-names
].forEach((code) => {
  descriptors[code] = { value: code };
});
Object.defineProperties(AxiosError$1, descriptors);
Object.defineProperty(prototype$1, "isAxiosError", { value: true });
AxiosError$1.from = (error, code, config2, request, response, customProps) => {
  const axiosError = Object.create(prototype$1);
  utils$2.toFlatObject(error, axiosError, function filter2(obj2) {
    return obj2 !== Error.prototype;
  }, (prop) => {
    return prop !== "isAxiosError";
  });
  AxiosError$1.call(axiosError, error.message, code, config2, request, response);
  axiosError.cause = error;
  axiosError.name = error.name;
  customProps && Object.assign(axiosError, customProps);
  return axiosError;
};
const httpAdapter = null;
function isVisitable(thing) {
  return utils$2.isPlainObject(thing) || utils$2.isArray(thing);
}
function removeBrackets(key) {
  return utils$2.endsWith(key, "[]") ? key.slice(0, -2) : key;
}
function renderKey(path, key, dots) {
  if (!path) return key;
  return path.concat(key).map(function each(token2, i) {
    token2 = removeBrackets(token2);
    return !dots && i ? "[" + token2 + "]" : token2;
  }).join(dots ? "." : "");
}
function isFlatArray(arr) {
  return utils$2.isArray(arr) && !arr.some(isVisitable);
}
const predicates = utils$2.toFlatObject(utils$2, {}, null, function filter(prop) {
  return /^is[A-Z]/.test(prop);
});
function toFormData$1(obj2, formData, options) {
  if (!utils$2.isObject(obj2)) {
    throw new TypeError("target must be an object");
  }
  formData = formData || new FormData();
  options = utils$2.toFlatObject(options, {
    metaTokens: true,
    dots: false,
    indexes: false
  }, false, function defined(option, source) {
    return !utils$2.isUndefined(source[option]);
  });
  const metaTokens = options.metaTokens;
  const visitor = options.visitor || defaultVisitor;
  const dots = options.dots;
  const indexes = options.indexes;
  const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
  const useBlob = _Blob && utils$2.isSpecCompliantForm(formData);
  if (!utils$2.isFunction(visitor)) {
    throw new TypeError("visitor must be a function");
  }
  function convertValue(value) {
    if (value === null) return "";
    if (utils$2.isDate(value)) {
      return value.toISOString();
    }
    if (!useBlob && utils$2.isBlob(value)) {
      throw new AxiosError$1("Blob is not supported. Use a Buffer instead.");
    }
    if (utils$2.isArrayBuffer(value) || utils$2.isTypedArray(value)) {
      return useBlob && typeof Blob === "function" ? new Blob([value]) : Buffer.from(value);
    }
    return value;
  }
  function defaultVisitor(value, key, path) {
    let arr = value;
    if (value && !path && typeof value === "object") {
      if (utils$2.endsWith(key, "{}")) {
        key = metaTokens ? key : key.slice(0, -2);
        value = JSON.stringify(value);
      } else if (utils$2.isArray(value) && isFlatArray(value) || (utils$2.isFileList(value) || utils$2.endsWith(key, "[]")) && (arr = utils$2.toArray(value))) {
        key = removeBrackets(key);
        arr.forEach(function each(el, index2) {
          !(utils$2.isUndefined(el) || el === null) && formData.append(
            // eslint-disable-next-line no-nested-ternary
            indexes === true ? renderKey([key], index2, dots) : indexes === null ? key : key + "[]",
            convertValue(el)
          );
        });
        return false;
      }
    }
    if (isVisitable(value)) {
      return true;
    }
    formData.append(renderKey(path, key, dots), convertValue(value));
    return false;
  }
  const stack = [];
  const exposedHelpers = Object.assign(predicates, {
    defaultVisitor,
    convertValue,
    isVisitable
  });
  function build(value, path) {
    if (utils$2.isUndefined(value)) return;
    if (stack.indexOf(value) !== -1) {
      throw Error("Circular reference detected in " + path.join("."));
    }
    stack.push(value);
    utils$2.forEach(value, function each(el, key) {
      const result = !(utils$2.isUndefined(el) || el === null) && visitor.call(
        formData,
        el,
        utils$2.isString(key) ? key.trim() : key,
        path,
        exposedHelpers
      );
      if (result === true) {
        build(el, path ? path.concat(key) : [key]);
      }
    });
    stack.pop();
  }
  if (!utils$2.isObject(obj2)) {
    throw new TypeError("data must be an object");
  }
  build(obj2);
  return formData;
}
function encode$1(str) {
  const charMap = {
    "!": "%21",
    "'": "%27",
    "(": "%28",
    ")": "%29",
    "~": "%7E",
    "%20": "+",
    "%00": "\0"
  };
  return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match2) {
    return charMap[match2];
  });
}
function AxiosURLSearchParams(params2, options) {
  this._pairs = [];
  params2 && toFormData$1(params2, this, options);
}
const prototype = AxiosURLSearchParams.prototype;
prototype.append = function append2(name, value) {
  this._pairs.push([name, value]);
};
prototype.toString = function toString2(encoder) {
  const _encode = encoder ? function(value) {
    return encoder.call(this, value, encode$1);
  } : encode$1;
  return this._pairs.map(function each(pair) {
    return _encode(pair[0]) + "=" + _encode(pair[1]);
  }, "").join("&");
};
function encode(val) {
  return encodeURIComponent(val).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
}
function buildURL(url, params2, options) {
  if (!params2) {
    return url;
  }
  const _encode = options && options.encode || encode;
  if (utils$2.isFunction(options)) {
    options = {
      serialize: options
    };
  }
  const serializeFn = options && options.serialize;
  let serializedParams;
  if (serializeFn) {
    serializedParams = serializeFn(params2, options);
  } else {
    serializedParams = utils$2.isURLSearchParams(params2) ? params2.toString() : new AxiosURLSearchParams(params2, options).toString(_encode);
  }
  if (serializedParams) {
    const hashmarkIndex = url.indexOf("#");
    if (hashmarkIndex !== -1) {
      url = url.slice(0, hashmarkIndex);
    }
    url += (url.indexOf("?") === -1 ? "?" : "&") + serializedParams;
  }
  return url;
}
class InterceptorManager {
  constructor() {
    this.handlers = [];
  }
  /**
   * Add a new interceptor to the stack
   *
   * @param {Function} fulfilled The function to handle `then` for a `Promise`
   * @param {Function} rejected The function to handle `reject` for a `Promise`
   *
   * @return {Number} An ID used to remove interceptor later
   */
  use(fulfilled, rejected, options) {
    this.handlers.push({
      fulfilled,
      rejected,
      synchronous: options ? options.synchronous : false,
      runWhen: options ? options.runWhen : null
    });
    return this.handlers.length - 1;
  }
  /**
   * Remove an interceptor from the stack
   *
   * @param {Number} id The ID that was returned by `use`
   *
   * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
   */
  eject(id) {
    if (this.handlers[id]) {
      this.handlers[id] = null;
    }
  }
  /**
   * Clear all interceptors from the stack
   *
   * @returns {void}
   */
  clear() {
    if (this.handlers) {
      this.handlers = [];
    }
  }
  /**
   * Iterate over all the registered interceptors
   *
   * This method is particularly useful for skipping over any
   * interceptors that may have become `null` calling `eject`.
   *
   * @param {Function} fn The function to call for each interceptor
   *
   * @returns {void}
   */
  forEach(fn2) {
    utils$2.forEach(this.handlers, function forEachHandler(h2) {
      if (h2 !== null) {
        fn2(h2);
      }
    });
  }
}
const transitionalDefaults = {
  silentJSONParsing: true,
  forcedJSONParsing: true,
  clarifyTimeoutError: false
};
const URLSearchParams$1 = typeof URLSearchParams !== "undefined" ? URLSearchParams : AxiosURLSearchParams;
const FormData$1 = typeof FormData !== "undefined" ? FormData : null;
const Blob$1 = typeof Blob !== "undefined" ? Blob : null;
const platform$1 = {
  isBrowser: true,
  classes: {
    URLSearchParams: URLSearchParams$1,
    FormData: FormData$1,
    Blob: Blob$1
  },
  protocols: ["http", "https", "file", "blob", "url", "data"]
};
const hasBrowserEnv = typeof window !== "undefined" && typeof document !== "undefined";
const _navigator = typeof navigator === "object" && navigator || void 0;
const hasStandardBrowserEnv = hasBrowserEnv && (!_navigator || ["ReactNative", "NativeScript", "NS"].indexOf(_navigator.product) < 0);
const hasStandardBrowserWebWorkerEnv = (() => {
  return typeof WorkerGlobalScope !== "undefined" && // eslint-disable-next-line no-undef
  self instanceof WorkerGlobalScope && typeof self.importScripts === "function";
})();
const origin = hasBrowserEnv && window.location.href || "http://localhost";
const utils$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  hasBrowserEnv,
  hasStandardBrowserEnv,
  hasStandardBrowserWebWorkerEnv,
  navigator: _navigator,
  origin
}, Symbol.toStringTag, { value: "Module" }));
const platform = {
  ...utils$1,
  ...platform$1
};
function toURLEncodedForm(data, options) {
  return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
    visitor: function(value, key, path, helpers) {
      if (platform.isNode && utils$2.isBuffer(value)) {
        this.append(key, value.toString("base64"));
        return false;
      }
      return helpers.defaultVisitor.apply(this, arguments);
    }
  }, options));
}
function parsePropPath(name) {
  return utils$2.matchAll(/\w+|\[(\w*)]/g, name).map((match2) => {
    return match2[0] === "[]" ? "" : match2[1] || match2[0];
  });
}
function arrayToObject(arr) {
  const obj2 = {};
  const keys = Object.keys(arr);
  let i;
  const len = keys.length;
  let key;
  for (i = 0; i < len; i++) {
    key = keys[i];
    obj2[key] = arr[key];
  }
  return obj2;
}
function formDataToJSON(formData) {
  function buildPath(path, value, target, index2) {
    let name = path[index2++];
    if (name === "__proto__") return true;
    const isNumericKey = Number.isFinite(+name);
    const isLast = index2 >= path.length;
    name = !name && utils$2.isArray(target) ? target.length : name;
    if (isLast) {
      if (utils$2.hasOwnProp(target, name)) {
        target[name] = [target[name], value];
      } else {
        target[name] = value;
      }
      return !isNumericKey;
    }
    if (!target[name] || !utils$2.isObject(target[name])) {
      target[name] = [];
    }
    const result = buildPath(path, value, target[name], index2);
    if (result && utils$2.isArray(target[name])) {
      target[name] = arrayToObject(target[name]);
    }
    return !isNumericKey;
  }
  if (utils$2.isFormData(formData) && utils$2.isFunction(formData.entries)) {
    const obj2 = {};
    utils$2.forEachEntry(formData, (name, value) => {
      buildPath(parsePropPath(name), value, obj2, 0);
    });
    return obj2;
  }
  return null;
}
function stringifySafely(rawValue, parser, encoder) {
  if (utils$2.isString(rawValue)) {
    try {
      (parser || JSON.parse)(rawValue);
      return utils$2.trim(rawValue);
    } catch (e2) {
      if (e2.name !== "SyntaxError") {
        throw e2;
      }
    }
  }
  return (encoder || JSON.stringify)(rawValue);
}
const defaults = {
  transitional: transitionalDefaults,
  adapter: ["xhr", "http", "fetch"],
  transformRequest: [function transformRequest(data, headers) {
    const contentType = headers.getContentType() || "";
    const hasJSONContentType = contentType.indexOf("application/json") > -1;
    const isObjectPayload = utils$2.isObject(data);
    if (isObjectPayload && utils$2.isHTMLForm(data)) {
      data = new FormData(data);
    }
    const isFormData2 = utils$2.isFormData(data);
    if (isFormData2) {
      return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
    }
    if (utils$2.isArrayBuffer(data) || utils$2.isBuffer(data) || utils$2.isStream(data) || utils$2.isFile(data) || utils$2.isBlob(data) || utils$2.isReadableStream(data)) {
      return data;
    }
    if (utils$2.isArrayBufferView(data)) {
      return data.buffer;
    }
    if (utils$2.isURLSearchParams(data)) {
      headers.setContentType("application/x-www-form-urlencoded;charset=utf-8", false);
      return data.toString();
    }
    let isFileList2;
    if (isObjectPayload) {
      if (contentType.indexOf("application/x-www-form-urlencoded") > -1) {
        return toURLEncodedForm(data, this.formSerializer).toString();
      }
      if ((isFileList2 = utils$2.isFileList(data)) || contentType.indexOf("multipart/form-data") > -1) {
        const _FormData = this.env && this.env.FormData;
        return toFormData$1(
          isFileList2 ? { "files[]": data } : data,
          _FormData && new _FormData(),
          this.formSerializer
        );
      }
    }
    if (isObjectPayload || hasJSONContentType) {
      headers.setContentType("application/json", false);
      return stringifySafely(data);
    }
    return data;
  }],
  transformResponse: [function transformResponse(data) {
    const transitional2 = this.transitional || defaults.transitional;
    const forcedJSONParsing = transitional2 && transitional2.forcedJSONParsing;
    const JSONRequested = this.responseType === "json";
    if (utils$2.isResponse(data) || utils$2.isReadableStream(data)) {
      return data;
    }
    if (data && utils$2.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
      const silentJSONParsing = transitional2 && transitional2.silentJSONParsing;
      const strictJSONParsing = !silentJSONParsing && JSONRequested;
      try {
        return JSON.parse(data);
      } catch (e2) {
        if (strictJSONParsing) {
          if (e2.name === "SyntaxError") {
            throw AxiosError$1.from(e2, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
          }
          throw e2;
        }
      }
    }
    return data;
  }],
  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,
  xsrfCookieName: "XSRF-TOKEN",
  xsrfHeaderName: "X-XSRF-TOKEN",
  maxContentLength: -1,
  maxBodyLength: -1,
  env: {
    FormData: platform.classes.FormData,
    Blob: platform.classes.Blob
  },
  validateStatus: function validateStatus(status) {
    return status >= 200 && status < 300;
  },
  headers: {
    common: {
      "Accept": "application/json, text/plain, */*",
      "Content-Type": void 0
    }
  }
};
utils$2.forEach(["delete", "get", "head", "post", "put", "patch"], (method) => {
  defaults.headers[method] = {};
});
const ignoreDuplicateOf = utils$2.toObjectSet([
  "age",
  "authorization",
  "content-length",
  "content-type",
  "etag",
  "expires",
  "from",
  "host",
  "if-modified-since",
  "if-unmodified-since",
  "last-modified",
  "location",
  "max-forwards",
  "proxy-authorization",
  "referer",
  "retry-after",
  "user-agent"
]);
const parseHeaders = (rawHeaders) => {
  const parsed = {};
  let key;
  let val;
  let i;
  rawHeaders && rawHeaders.split("\n").forEach(function parser(line2) {
    i = line2.indexOf(":");
    key = line2.substring(0, i).trim().toLowerCase();
    val = line2.substring(i + 1).trim();
    if (!key || parsed[key] && ignoreDuplicateOf[key]) {
      return;
    }
    if (key === "set-cookie") {
      if (parsed[key]) {
        parsed[key].push(val);
      } else {
        parsed[key] = [val];
      }
    } else {
      parsed[key] = parsed[key] ? parsed[key] + ", " + val : val;
    }
  });
  return parsed;
};
const $internals = Symbol("internals");
function normalizeHeader(header) {
  return header && String(header).trim().toLowerCase();
}
function normalizeValue(value) {
  if (value === false || value == null) {
    return value;
  }
  return utils$2.isArray(value) ? value.map(normalizeValue) : String(value);
}
function parseTokens(str) {
  const tokens = /* @__PURE__ */ Object.create(null);
  const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
  let match2;
  while (match2 = tokensRE.exec(str)) {
    tokens[match2[1]] = match2[2];
  }
  return tokens;
}
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
function matchHeaderValue(context, value, header, filter2, isHeaderNameFilter) {
  if (utils$2.isFunction(filter2)) {
    return filter2.call(this, value, header);
  }
  if (isHeaderNameFilter) {
    value = header;
  }
  if (!utils$2.isString(value)) return;
  if (utils$2.isString(filter2)) {
    return value.indexOf(filter2) !== -1;
  }
  if (utils$2.isRegExp(filter2)) {
    return filter2.test(value);
  }
}
function formatHeader(header) {
  return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char2, str) => {
    return char2.toUpperCase() + str;
  });
}
function buildAccessors(obj2, header) {
  const accessorName = utils$2.toCamelCase(" " + header);
  ["get", "set", "has"].forEach((methodName) => {
    Object.defineProperty(obj2, methodName + accessorName, {
      value: function(arg1, arg2, arg3) {
        return this[methodName].call(this, header, arg1, arg2, arg3);
      },
      configurable: true
    });
  });
}
let AxiosHeaders$1 = class AxiosHeaders {
  constructor(headers) {
    headers && this.set(headers);
  }
  set(header, valueOrRewrite, rewrite) {
    const self2 = this;
    function setHeader(_value, _header, _rewrite) {
      const lHeader = normalizeHeader(_header);
      if (!lHeader) {
        throw new Error("header name must be a non-empty string");
      }
      const key = utils$2.findKey(self2, lHeader);
      if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
        self2[key || _header] = normalizeValue(_value);
      }
    }
    const setHeaders = (headers, _rewrite) => utils$2.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
    if (utils$2.isPlainObject(header) || header instanceof this.constructor) {
      setHeaders(header, valueOrRewrite);
    } else if (utils$2.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
      setHeaders(parseHeaders(header), valueOrRewrite);
    } else if (utils$2.isObject(header) && utils$2.isIterable(header)) {
      let obj2 = {}, dest, key;
      for (const entry of header) {
        if (!utils$2.isArray(entry)) {
          throw TypeError("Object iterator must return a key-value pair");
        }
        obj2[key = entry[0]] = (dest = obj2[key]) ? utils$2.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
      }
      setHeaders(obj2, valueOrRewrite);
    } else {
      header != null && setHeader(valueOrRewrite, header, rewrite);
    }
    return this;
  }
  get(header, parser) {
    header = normalizeHeader(header);
    if (header) {
      const key = utils$2.findKey(this, header);
      if (key) {
        const value = this[key];
        if (!parser) {
          return value;
        }
        if (parser === true) {
          return parseTokens(value);
        }
        if (utils$2.isFunction(parser)) {
          return parser.call(this, value, key);
        }
        if (utils$2.isRegExp(parser)) {
          return parser.exec(value);
        }
        throw new TypeError("parser must be boolean|regexp|function");
      }
    }
  }
  has(header, matcher) {
    header = normalizeHeader(header);
    if (header) {
      const key = utils$2.findKey(this, header);
      return !!(key && this[key] !== void 0 && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
    }
    return false;
  }
  delete(header, matcher) {
    const self2 = this;
    let deleted = false;
    function deleteHeader(_header) {
      _header = normalizeHeader(_header);
      if (_header) {
        const key = utils$2.findKey(self2, _header);
        if (key && (!matcher || matchHeaderValue(self2, self2[key], key, matcher))) {
          delete self2[key];
          deleted = true;
        }
      }
    }
    if (utils$2.isArray(header)) {
      header.forEach(deleteHeader);
    } else {
      deleteHeader(header);
    }
    return deleted;
  }
  clear(matcher) {
    const keys = Object.keys(this);
    let i = keys.length;
    let deleted = false;
    while (i--) {
      const key = keys[i];
      if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
        delete this[key];
        deleted = true;
      }
    }
    return deleted;
  }
  normalize(format) {
    const self2 = this;
    const headers = {};
    utils$2.forEach(this, (value, header) => {
      const key = utils$2.findKey(headers, header);
      if (key) {
        self2[key] = normalizeValue(value);
        delete self2[header];
        return;
      }
      const normalized = format ? formatHeader(header) : String(header).trim();
      if (normalized !== header) {
        delete self2[header];
      }
      self2[normalized] = normalizeValue(value);
      headers[normalized] = true;
    });
    return this;
  }
  concat(...targets) {
    return this.constructor.concat(this, ...targets);
  }
  toJSON(asStrings) {
    const obj2 = /* @__PURE__ */ Object.create(null);
    utils$2.forEach(this, (value, header) => {
      value != null && value !== false && (obj2[header] = asStrings && utils$2.isArray(value) ? value.join(", ") : value);
    });
    return obj2;
  }
  [Symbol.iterator]() {
    return Object.entries(this.toJSON())[Symbol.iterator]();
  }
  toString() {
    return Object.entries(this.toJSON()).map(([header, value]) => header + ": " + value).join("\n");
  }
  getSetCookie() {
    return this.get("set-cookie") || [];
  }
  get [Symbol.toStringTag]() {
    return "AxiosHeaders";
  }
  static from(thing) {
    return thing instanceof this ? thing : new this(thing);
  }
  static concat(first, ...targets) {
    const computed = new this(first);
    targets.forEach((target) => computed.set(target));
    return computed;
  }
  static accessor(header) {
    const internals = this[$internals] = this[$internals] = {
      accessors: {}
    };
    const accessors = internals.accessors;
    const prototype2 = this.prototype;
    function defineAccessor(_header) {
      const lHeader = normalizeHeader(_header);
      if (!accessors[lHeader]) {
        buildAccessors(prototype2, _header);
        accessors[lHeader] = true;
      }
    }
    utils$2.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
    return this;
  }
};
AxiosHeaders$1.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
utils$2.reduceDescriptors(AxiosHeaders$1.prototype, ({ value }, key) => {
  let mapped = key[0].toUpperCase() + key.slice(1);
  return {
    get: () => value,
    set(headerValue) {
      this[mapped] = headerValue;
    }
  };
});
utils$2.freezeMethods(AxiosHeaders$1);
function transformData(fns2, response) {
  const config2 = this || defaults;
  const context = response || config2;
  const headers = AxiosHeaders$1.from(context.headers);
  let data = context.data;
  utils$2.forEach(fns2, function transform2(fn2) {
    data = fn2.call(config2, data, headers.normalize(), response ? response.status : void 0);
  });
  headers.normalize();
  return data;
}
function isCancel$1(value) {
  return !!(value && value.__CANCEL__);
}
function CanceledError$1(message, config2, request) {
  AxiosError$1.call(this, message == null ? "canceled" : message, AxiosError$1.ERR_CANCELED, config2, request);
  this.name = "CanceledError";
}
utils$2.inherits(CanceledError$1, AxiosError$1, {
  __CANCEL__: true
});
function settle(resolve, reject, response) {
  const validateStatus2 = response.config.validateStatus;
  if (!response.status || !validateStatus2 || validateStatus2(response.status)) {
    resolve(response);
  } else {
    reject(new AxiosError$1(
      "Request failed with status code " + response.status,
      [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
      response.config,
      response.request,
      response
    ));
  }
}
function parseProtocol(url) {
  const match2 = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
  return match2 && match2[1] || "";
}
function speedometer(samplesCount, min2) {
  samplesCount = samplesCount || 10;
  const bytes = new Array(samplesCount);
  const timestamps = new Array(samplesCount);
  let head = 0;
  let tail = 0;
  let firstSampleTS;
  min2 = min2 !== void 0 ? min2 : 1e3;
  return function push(chunkLength) {
    const now = Date.now();
    const startedAt = timestamps[tail];
    if (!firstSampleTS) {
      firstSampleTS = now;
    }
    bytes[head] = chunkLength;
    timestamps[head] = now;
    let i = tail;
    let bytesCount = 0;
    while (i !== head) {
      bytesCount += bytes[i++];
      i = i % samplesCount;
    }
    head = (head + 1) % samplesCount;
    if (head === tail) {
      tail = (tail + 1) % samplesCount;
    }
    if (now - firstSampleTS < min2) {
      return;
    }
    const passed = startedAt && now - startedAt;
    return passed ? Math.round(bytesCount * 1e3 / passed) : void 0;
  };
}
function throttle$1(fn2, freq) {
  let timestamp = 0;
  let threshold = 1e3 / freq;
  let lastArgs;
  let timer2;
  const invoke = (args, now = Date.now()) => {
    timestamp = now;
    lastArgs = null;
    if (timer2) {
      clearTimeout(timer2);
      timer2 = null;
    }
    fn2.apply(null, args);
  };
  const throttled = (...args) => {
    const now = Date.now();
    const passed = now - timestamp;
    if (passed >= threshold) {
      invoke(args, now);
    } else {
      lastArgs = args;
      if (!timer2) {
        timer2 = setTimeout(() => {
          timer2 = null;
          invoke(lastArgs);
        }, threshold - passed);
      }
    }
  };
  const flush = () => lastArgs && invoke(lastArgs);
  return [throttled, flush];
}
const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
  let bytesNotified = 0;
  const _speedometer = speedometer(50, 250);
  return throttle$1((e2) => {
    const loaded = e2.loaded;
    const total = e2.lengthComputable ? e2.total : void 0;
    const progressBytes = loaded - bytesNotified;
    const rate = _speedometer(progressBytes);
    const inRange = loaded <= total;
    bytesNotified = loaded;
    const data = {
      loaded,
      total,
      progress: total ? loaded / total : void 0,
      bytes: progressBytes,
      rate: rate ? rate : void 0,
      estimated: rate && total && inRange ? (total - loaded) / rate : void 0,
      event: e2,
      lengthComputable: total != null,
      [isDownloadStream ? "download" : "upload"]: true
    };
    listener(data);
  }, freq);
};
const progressEventDecorator = (total, throttled) => {
  const lengthComputable = total != null;
  return [(loaded) => throttled[0]({
    lengthComputable,
    total,
    loaded
  }), throttled[1]];
};
const asyncDecorator = (fn2) => (...args) => utils$2.asap(() => fn2(...args));
const isURLSameOrigin = platform.hasStandardBrowserEnv ? /* @__PURE__ */ ((origin2, isMSIE) => (url) => {
  url = new URL(url, platform.origin);
  return origin2.protocol === url.protocol && origin2.host === url.host && (isMSIE || origin2.port === url.port);
})(
  new URL(platform.origin),
  platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
) : () => true;
const cookies = platform.hasStandardBrowserEnv ? (
  // Standard browser envs support document.cookie
  {
    write(name, value, expires, path, domain, secure) {
      const cookie = [name + "=" + encodeURIComponent(value)];
      utils$2.isNumber(expires) && cookie.push("expires=" + new Date(expires).toGMTString());
      utils$2.isString(path) && cookie.push("path=" + path);
      utils$2.isString(domain) && cookie.push("domain=" + domain);
      secure === true && cookie.push("secure");
      document.cookie = cookie.join("; ");
    },
    read(name) {
      const match2 = document.cookie.match(new RegExp("(^|;\\s*)(" + name + ")=([^;]*)"));
      return match2 ? decodeURIComponent(match2[3]) : null;
    },
    remove(name) {
      this.write(name, "", Date.now() - 864e5);
    }
  }
) : (
  // Non-standard browser env (web workers, react-native) lack needed support.
  {
    write() {
    },
    read() {
      return null;
    },
    remove() {
    }
  }
);
function isAbsoluteURL(url) {
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
function combineURLs(baseURL, relativeURL) {
  return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
}
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
  let isRelativeUrl = !isAbsoluteURL(requestedURL);
  if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
    return combineURLs(baseURL, requestedURL);
  }
  return requestedURL;
}
const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
function mergeConfig$1(config1, config2) {
  config2 = config2 || {};
  const config3 = {};
  function getMergedValue(target, source, prop, caseless) {
    if (utils$2.isPlainObject(target) && utils$2.isPlainObject(source)) {
      return utils$2.merge.call({ caseless }, target, source);
    } else if (utils$2.isPlainObject(source)) {
      return utils$2.merge({}, source);
    } else if (utils$2.isArray(source)) {
      return source.slice();
    }
    return source;
  }
  function mergeDeepProperties(a2, b2, prop, caseless) {
    if (!utils$2.isUndefined(b2)) {
      return getMergedValue(a2, b2, prop, caseless);
    } else if (!utils$2.isUndefined(a2)) {
      return getMergedValue(void 0, a2, prop, caseless);
    }
  }
  function valueFromConfig2(a2, b2) {
    if (!utils$2.isUndefined(b2)) {
      return getMergedValue(void 0, b2);
    }
  }
  function defaultToConfig2(a2, b2) {
    if (!utils$2.isUndefined(b2)) {
      return getMergedValue(void 0, b2);
    } else if (!utils$2.isUndefined(a2)) {
      return getMergedValue(void 0, a2);
    }
  }
  function mergeDirectKeys(a2, b2, prop) {
    if (prop in config2) {
      return getMergedValue(a2, b2);
    } else if (prop in config1) {
      return getMergedValue(void 0, a2);
    }
  }
  const mergeMap = {
    url: valueFromConfig2,
    method: valueFromConfig2,
    data: valueFromConfig2,
    baseURL: defaultToConfig2,
    transformRequest: defaultToConfig2,
    transformResponse: defaultToConfig2,
    paramsSerializer: defaultToConfig2,
    timeout: defaultToConfig2,
    timeoutMessage: defaultToConfig2,
    withCredentials: defaultToConfig2,
    withXSRFToken: defaultToConfig2,
    adapter: defaultToConfig2,
    responseType: defaultToConfig2,
    xsrfCookieName: defaultToConfig2,
    xsrfHeaderName: defaultToConfig2,
    onUploadProgress: defaultToConfig2,
    onDownloadProgress: defaultToConfig2,
    decompress: defaultToConfig2,
    maxContentLength: defaultToConfig2,
    maxBodyLength: defaultToConfig2,
    beforeRedirect: defaultToConfig2,
    transport: defaultToConfig2,
    httpAgent: defaultToConfig2,
    httpsAgent: defaultToConfig2,
    cancelToken: defaultToConfig2,
    socketPath: defaultToConfig2,
    responseEncoding: defaultToConfig2,
    validateStatus: mergeDirectKeys,
    headers: (a2, b2, prop) => mergeDeepProperties(headersToObject(a2), headersToObject(b2), prop, true)
  };
  utils$2.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
    const merge2 = mergeMap[prop] || mergeDeepProperties;
    const configValue = merge2(config1[prop], config2[prop], prop);
    utils$2.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config3[prop] = configValue);
  });
  return config3;
}
const resolveConfig = (config2) => {
  const newConfig = mergeConfig$1({}, config2);
  let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
  newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config2.params, config2.paramsSerializer);
  if (auth) {
    headers.set(
      "Authorization",
      "Basic " + btoa((auth.username || "") + ":" + (auth.password ? unescape(encodeURIComponent(auth.password)) : ""))
    );
  }
  let contentType;
  if (utils$2.isFormData(data)) {
    if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
      headers.setContentType(void 0);
    } else if ((contentType = headers.getContentType()) !== false) {
      const [type2, ...tokens] = contentType ? contentType.split(";").map((token2) => token2.trim()).filter(Boolean) : [];
      headers.setContentType([type2 || "multipart/form-data", ...tokens].join("; "));
    }
  }
  if (platform.hasStandardBrowserEnv) {
    withXSRFToken && utils$2.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
    if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
      const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
      if (xsrfValue) {
        headers.set(xsrfHeaderName, xsrfValue);
      }
    }
  }
  return newConfig;
};
const isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
const xhrAdapter = isXHRAdapterSupported && function(config2) {
  return new Promise(function dispatchXhrRequest(resolve, reject) {
    const _config = resolveConfig(config2);
    let requestData = _config.data;
    const requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
    let { responseType, onUploadProgress, onDownloadProgress } = _config;
    let onCanceled;
    let uploadThrottled, downloadThrottled;
    let flushUpload, flushDownload;
    function done() {
      flushUpload && flushUpload();
      flushDownload && flushDownload();
      _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);
      _config.signal && _config.signal.removeEventListener("abort", onCanceled);
    }
    let request = new XMLHttpRequest();
    request.open(_config.method.toUpperCase(), _config.url, true);
    request.timeout = _config.timeout;
    function onloadend() {
      if (!request) {
        return;
      }
      const responseHeaders = AxiosHeaders$1.from(
        "getAllResponseHeaders" in request && request.getAllResponseHeaders()
      );
      const responseData = !responseType || responseType === "text" || responseType === "json" ? request.responseText : request.response;
      const response = {
        data: responseData,
        status: request.status,
        statusText: request.statusText,
        headers: responseHeaders,
        config: config2,
        request
      };
      settle(function _resolve(value) {
        resolve(value);
        done();
      }, function _reject(err) {
        reject(err);
        done();
      }, response);
      request = null;
    }
    if ("onloadend" in request) {
      request.onloadend = onloadend;
    } else {
      request.onreadystatechange = function handleLoad() {
        if (!request || request.readyState !== 4) {
          return;
        }
        if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf("file:") === 0)) {
          return;
        }
        setTimeout(onloadend);
      };
    }
    request.onabort = function handleAbort() {
      if (!request) {
        return;
      }
      reject(new AxiosError$1("Request aborted", AxiosError$1.ECONNABORTED, config2, request));
      request = null;
    };
    request.onerror = function handleError() {
      reject(new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config2, request));
      request = null;
    };
    request.ontimeout = function handleTimeout() {
      let timeoutErrorMessage = _config.timeout ? "timeout of " + _config.timeout + "ms exceeded" : "timeout exceeded";
      const transitional2 = _config.transitional || transitionalDefaults;
      if (_config.timeoutErrorMessage) {
        timeoutErrorMessage = _config.timeoutErrorMessage;
      }
      reject(new AxiosError$1(
        timeoutErrorMessage,
        transitional2.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
        config2,
        request
      ));
      request = null;
    };
    requestData === void 0 && requestHeaders.setContentType(null);
    if ("setRequestHeader" in request) {
      utils$2.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
        request.setRequestHeader(key, val);
      });
    }
    if (!utils$2.isUndefined(_config.withCredentials)) {
      request.withCredentials = !!_config.withCredentials;
    }
    if (responseType && responseType !== "json") {
      request.responseType = _config.responseType;
    }
    if (onDownloadProgress) {
      [downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true);
      request.addEventListener("progress", downloadThrottled);
    }
    if (onUploadProgress && request.upload) {
      [uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress);
      request.upload.addEventListener("progress", uploadThrottled);
      request.upload.addEventListener("loadend", flushUpload);
    }
    if (_config.cancelToken || _config.signal) {
      onCanceled = (cancel) => {
        if (!request) {
          return;
        }
        reject(!cancel || cancel.type ? new CanceledError$1(null, config2, request) : cancel);
        request.abort();
        request = null;
      };
      _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
      if (_config.signal) {
        _config.signal.aborted ? onCanceled() : _config.signal.addEventListener("abort", onCanceled);
      }
    }
    const protocol = parseProtocol(_config.url);
    if (protocol && platform.protocols.indexOf(protocol) === -1) {
      reject(new AxiosError$1("Unsupported protocol " + protocol + ":", AxiosError$1.ERR_BAD_REQUEST, config2));
      return;
    }
    request.send(requestData || null);
  });
};
const composeSignals = (signals, timeout) => {
  const { length: length2 } = signals = signals ? signals.filter(Boolean) : [];
  if (timeout || length2) {
    let controller = new AbortController();
    let aborted;
    const onabort = function(reason) {
      if (!aborted) {
        aborted = true;
        unsubscribe();
        const err = reason instanceof Error ? reason : this.reason;
        controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
      }
    };
    let timer2 = timeout && setTimeout(() => {
      timer2 = null;
      onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
    }, timeout);
    const unsubscribe = () => {
      if (signals) {
        timer2 && clearTimeout(timer2);
        timer2 = null;
        signals.forEach((signal2) => {
          signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
        });
        signals = null;
      }
    };
    signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
    const { signal } = controller;
    signal.unsubscribe = () => utils$2.asap(unsubscribe);
    return signal;
  }
};
const streamChunk = function* (chunk, chunkSize) {
  let len = chunk.byteLength;
  if (len < chunkSize) {
    yield chunk;
    return;
  }
  let pos = 0;
  let end2;
  while (pos < len) {
    end2 = pos + chunkSize;
    yield chunk.slice(pos, end2);
    pos = end2;
  }
};
const readBytes = async function* (iterable, chunkSize) {
  for await (const chunk of readStream(iterable)) {
    yield* streamChunk(chunk, chunkSize);
  }
};
const readStream = async function* (stream) {
  if (stream[Symbol.asyncIterator]) {
    yield* stream;
    return;
  }
  const reader = stream.getReader();
  try {
    for (; ; ) {
      const { done, value } = await reader.read();
      if (done) {
        break;
      }
      yield value;
    }
  } finally {
    await reader.cancel();
  }
};
const trackStream = (stream, chunkSize, onProgress, onFinish) => {
  const iterator2 = readBytes(stream, chunkSize);
  let bytes = 0;
  let done;
  let _onFinish = (e2) => {
    if (!done) {
      done = true;
      onFinish && onFinish(e2);
    }
  };
  return new ReadableStream({
    async pull(controller) {
      try {
        const { done: done2, value } = await iterator2.next();
        if (done2) {
          _onFinish();
          controller.close();
          return;
        }
        let len = value.byteLength;
        if (onProgress) {
          let loadedBytes = bytes += len;
          onProgress(loadedBytes);
        }
        controller.enqueue(new Uint8Array(value));
      } catch (err) {
        _onFinish(err);
        throw err;
      }
    },
    cancel(reason) {
      _onFinish(reason);
      return iterator2.return();
    }
  }, {
    highWaterMark: 2
  });
};
const isFetchSupported = typeof fetch === "function" && typeof Request === "function" && typeof Response === "function";
const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === "function";
const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Response(str).arrayBuffer()));
const test = (fn2, ...args) => {
  try {
    return !!fn2(...args);
  } catch (e2) {
    return false;
  }
};
const supportsRequestStream = isReadableStreamSupported && test(() => {
  let duplexAccessed = false;
  const hasContentType = new Request(platform.origin, {
    body: new ReadableStream(),
    method: "POST",
    get duplex() {
      duplexAccessed = true;
      return "half";
    }
  }).headers.has("Content-Type");
  return duplexAccessed && !hasContentType;
});
const DEFAULT_CHUNK_SIZE = 64 * 1024;
const supportsResponseStream = isReadableStreamSupported && test(() => utils$2.isReadableStream(new Response("").body));
const resolvers = {
  stream: supportsResponseStream && ((res) => res.body)
};
isFetchSupported && ((res) => {
  ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((type2) => {
    !resolvers[type2] && (resolvers[type2] = utils$2.isFunction(res[type2]) ? (res2) => res2[type2]() : (_2, config2) => {
      throw new AxiosError$1(`Response type '${type2}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config2);
    });
  });
})(new Response());
const getBodyLength = async (body2) => {
  if (body2 == null) {
    return 0;
  }
  if (utils$2.isBlob(body2)) {
    return body2.size;
  }
  if (utils$2.isSpecCompliantForm(body2)) {
    const _request = new Request(platform.origin, {
      method: "POST",
      body: body2
    });
    return (await _request.arrayBuffer()).byteLength;
  }
  if (utils$2.isArrayBufferView(body2) || utils$2.isArrayBuffer(body2)) {
    return body2.byteLength;
  }
  if (utils$2.isURLSearchParams(body2)) {
    body2 = body2 + "";
  }
  if (utils$2.isString(body2)) {
    return (await encodeText(body2)).byteLength;
  }
};
const resolveBodyLength = async (headers, body2) => {
  const length2 = utils$2.toFiniteNumber(headers.getContentLength());
  return length2 == null ? getBodyLength(body2) : length2;
};
const fetchAdapter = isFetchSupported && (async (config2) => {
  let {
    url,
    method,
    data,
    signal,
    cancelToken,
    timeout,
    onDownloadProgress,
    onUploadProgress,
    responseType,
    headers,
    withCredentials = "same-origin",
    fetchOptions
  } = resolveConfig(config2);
  responseType = responseType ? (responseType + "").toLowerCase() : "text";
  let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
  let request;
  const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
    composedSignal.unsubscribe();
  });
  let requestContentLength;
  try {
    if (onUploadProgress && supportsRequestStream && method !== "get" && method !== "head" && (requestContentLength = await resolveBodyLength(headers, data)) !== 0) {
      let _request = new Request(url, {
        method: "POST",
        body: data,
        duplex: "half"
      });
      let contentTypeHeader;
      if (utils$2.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
        headers.setContentType(contentTypeHeader);
      }
      if (_request.body) {
        const [onProgress, flush] = progressEventDecorator(
          requestContentLength,
          progressEventReducer(asyncDecorator(onUploadProgress))
        );
        data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
      }
    }
    if (!utils$2.isString(withCredentials)) {
      withCredentials = withCredentials ? "include" : "omit";
    }
    const isCredentialsSupported = "credentials" in Request.prototype;
    request = new Request(url, {
      ...fetchOptions,
      signal: composedSignal,
      method: method.toUpperCase(),
      headers: headers.normalize().toJSON(),
      body: data,
      duplex: "half",
      credentials: isCredentialsSupported ? withCredentials : void 0
    });
    let response = await fetch(request);
    const isStreamResponse = supportsResponseStream && (responseType === "stream" || responseType === "response");
    if (supportsResponseStream && (onDownloadProgress || isStreamResponse && unsubscribe)) {
      const options = {};
      ["status", "statusText", "headers"].forEach((prop) => {
        options[prop] = response[prop];
      });
      const responseContentLength = utils$2.toFiniteNumber(response.headers.get("content-length"));
      const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
        responseContentLength,
        progressEventReducer(asyncDecorator(onDownloadProgress), true)
      ) || [];
      response = new Response(
        trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
          flush && flush();
          unsubscribe && unsubscribe();
        }),
        options
      );
    }
    responseType = responseType || "text";
    let responseData = await resolvers[utils$2.findKey(resolvers, responseType) || "text"](response, config2);
    !isStreamResponse && unsubscribe && unsubscribe();
    return await new Promise((resolve, reject) => {
      settle(resolve, reject, {
        data: responseData,
        headers: AxiosHeaders$1.from(response.headers),
        status: response.status,
        statusText: response.statusText,
        config: config2,
        request
      });
    });
  } catch (err) {
    unsubscribe && unsubscribe();
    if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
      throw Object.assign(
        new AxiosError$1("Network Error", AxiosError$1.ERR_NETWORK, config2, request),
        {
          cause: err.cause || err
        }
      );
    }
    throw AxiosError$1.from(err, err && err.code, config2, request);
  }
});
const knownAdapters = {
  http: httpAdapter,
  xhr: xhrAdapter,
  fetch: fetchAdapter
};
utils$2.forEach(knownAdapters, (fn2, value) => {
  if (fn2) {
    try {
      Object.defineProperty(fn2, "name", { value });
    } catch (e2) {
    }
    Object.defineProperty(fn2, "adapterName", { value });
  }
});
const renderReason = (reason) => `- ${reason}`;
const isResolvedHandle = (adapter) => utils$2.isFunction(adapter) || adapter === null || adapter === false;
const adapters = {
  getAdapter: (adapters2) => {
    adapters2 = utils$2.isArray(adapters2) ? adapters2 : [adapters2];
    const { length: length2 } = adapters2;
    let nameOrAdapter;
    let adapter;
    const rejectedReasons = {};
    for (let i = 0; i < length2; i++) {
      nameOrAdapter = adapters2[i];
      let id;
      adapter = nameOrAdapter;
      if (!isResolvedHandle(nameOrAdapter)) {
        adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
        if (adapter === void 0) {
          throw new AxiosError$1(`Unknown adapter '${id}'`);
        }
      }
      if (adapter) {
        break;
      }
      rejectedReasons[id || "#" + i] = adapter;
    }
    if (!adapter) {
      const reasons = Object.entries(rejectedReasons).map(
        ([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build")
      );
      let s = length2 ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
      throw new AxiosError$1(
        `There is no suitable adapter to dispatch the request ` + s,
        "ERR_NOT_SUPPORT"
      );
    }
    return adapter;
  },
  adapters: knownAdapters
};
function throwIfCancellationRequested(config2) {
  if (config2.cancelToken) {
    config2.cancelToken.throwIfRequested();
  }
  if (config2.signal && config2.signal.aborted) {
    throw new CanceledError$1(null, config2);
  }
}
function dispatchRequest(config2) {
  throwIfCancellationRequested(config2);
  config2.headers = AxiosHeaders$1.from(config2.headers);
  config2.data = transformData.call(
    config2,
    config2.transformRequest
  );
  if (["post", "put", "patch"].indexOf(config2.method) !== -1) {
    config2.headers.setContentType("application/x-www-form-urlencoded", false);
  }
  const adapter = adapters.getAdapter(config2.adapter || defaults.adapter);
  return adapter(config2).then(function onAdapterResolution(response) {
    throwIfCancellationRequested(config2);
    response.data = transformData.call(
      config2,
      config2.transformResponse,
      response
    );
    response.headers = AxiosHeaders$1.from(response.headers);
    return response;
  }, function onAdapterRejection(reason) {
    if (!isCancel$1(reason)) {
      throwIfCancellationRequested(config2);
      if (reason && reason.response) {
        reason.response.data = transformData.call(
          config2,
          config2.transformResponse,
          reason.response
        );
        reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
      }
    }
    return Promise.reject(reason);
  });
}
const VERSION$1 = "1.9.0";
const validators$1 = {};
["object", "boolean", "number", "function", "string", "symbol"].forEach((type2, i) => {
  validators$1[type2] = function validator2(thing) {
    return typeof thing === type2 || "a" + (i < 1 ? "n " : " ") + type2;
  };
});
const deprecatedWarnings = {};
validators$1.transitional = function transitional(validator2, version, message) {
  function formatMessage(opt, desc) {
    return "[Axios v" + VERSION$1 + "] Transitional option '" + opt + "'" + desc + (message ? ". " + message : "");
  }
  return (value, opt, opts) => {
    if (validator2 === false) {
      throw new AxiosError$1(
        formatMessage(opt, " has been removed" + (version ? " in " + version : "")),
        AxiosError$1.ERR_DEPRECATED
      );
    }
    if (version && !deprecatedWarnings[opt]) {
      deprecatedWarnings[opt] = true;
      console.warn(
        formatMessage(
          opt,
          " has been deprecated since v" + version + " and will be removed in the near future"
        )
      );
    }
    return validator2 ? validator2(value, opt, opts) : true;
  };
};
validators$1.spelling = function spelling(correctSpelling) {
  return (value, opt) => {
    console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);
    return true;
  };
};
function assertOptions(options, schema, allowUnknown) {
  if (typeof options !== "object") {
    throw new AxiosError$1("options must be an object", AxiosError$1.ERR_BAD_OPTION_VALUE);
  }
  const keys = Object.keys(options);
  let i = keys.length;
  while (i-- > 0) {
    const opt = keys[i];
    const validator2 = schema[opt];
    if (validator2) {
      const value = options[opt];
      const result = value === void 0 || validator2(value, opt, options);
      if (result !== true) {
        throw new AxiosError$1("option " + opt + " must be " + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
      }
      continue;
    }
    if (allowUnknown !== true) {
      throw new AxiosError$1("Unknown option " + opt, AxiosError$1.ERR_BAD_OPTION);
    }
  }
}
const validator = {
  assertOptions,
  validators: validators$1
};
const validators = validator.validators;
let Axios$1 = class Axios {
  constructor(instanceConfig) {
    this.defaults = instanceConfig || {};
    this.interceptors = {
      request: new InterceptorManager(),
      response: new InterceptorManager()
    };
  }
  /**
   * Dispatch a request
   *
   * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
   * @param {?Object} config
   *
   * @returns {Promise} The Promise to be fulfilled
   */
  async request(configOrUrl, config2) {
    try {
      return await this._request(configOrUrl, config2);
    } catch (err) {
      if (err instanceof Error) {
        let dummy = {};
        Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
        const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, "") : "";
        try {
          if (!err.stack) {
            err.stack = stack;
          } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ""))) {
            err.stack += "\n" + stack;
          }
        } catch (e2) {
        }
      }
      throw err;
    }
  }
  _request(configOrUrl, config2) {
    if (typeof configOrUrl === "string") {
      config2 = config2 || {};
      config2.url = configOrUrl;
    } else {
      config2 = configOrUrl || {};
    }
    config2 = mergeConfig$1(this.defaults, config2);
    const { transitional: transitional2, paramsSerializer, headers } = config2;
    if (transitional2 !== void 0) {
      validator.assertOptions(transitional2, {
        silentJSONParsing: validators.transitional(validators.boolean),
        forcedJSONParsing: validators.transitional(validators.boolean),
        clarifyTimeoutError: validators.transitional(validators.boolean)
      }, false);
    }
    if (paramsSerializer != null) {
      if (utils$2.isFunction(paramsSerializer)) {
        config2.paramsSerializer = {
          serialize: paramsSerializer
        };
      } else {
        validator.assertOptions(paramsSerializer, {
          encode: validators.function,
          serialize: validators.function
        }, true);
      }
    }
    if (config2.allowAbsoluteUrls !== void 0) ;
    else if (this.defaults.allowAbsoluteUrls !== void 0) {
      config2.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
    } else {
      config2.allowAbsoluteUrls = true;
    }
    validator.assertOptions(config2, {
      baseUrl: validators.spelling("baseURL"),
      withXsrfToken: validators.spelling("withXSRFToken")
    }, true);
    config2.method = (config2.method || this.defaults.method || "get").toLowerCase();
    let contextHeaders = headers && utils$2.merge(
      headers.common,
      headers[config2.method]
    );
    headers && utils$2.forEach(
      ["delete", "get", "head", "post", "put", "patch", "common"],
      (method) => {
        delete headers[method];
      }
    );
    config2.headers = AxiosHeaders$1.concat(contextHeaders, headers);
    const requestInterceptorChain = [];
    let synchronousRequestInterceptors = true;
    this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
      if (typeof interceptor.runWhen === "function" && interceptor.runWhen(config2) === false) {
        return;
      }
      synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
      requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
    });
    const responseInterceptorChain = [];
    this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
      responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
    });
    let promise;
    let i = 0;
    let len;
    if (!synchronousRequestInterceptors) {
      const chain = [dispatchRequest.bind(this), void 0];
      chain.unshift.apply(chain, requestInterceptorChain);
      chain.push.apply(chain, responseInterceptorChain);
      len = chain.length;
      promise = Promise.resolve(config2);
      while (i < len) {
        promise = promise.then(chain[i++], chain[i++]);
      }
      return promise;
    }
    len = requestInterceptorChain.length;
    let newConfig = config2;
    i = 0;
    while (i < len) {
      const onFulfilled = requestInterceptorChain[i++];
      const onRejected = requestInterceptorChain[i++];
      try {
        newConfig = onFulfilled(newConfig);
      } catch (error) {
        onRejected.call(this, error);
        break;
      }
    }
    try {
      promise = dispatchRequest.call(this, newConfig);
    } catch (error) {
      return Promise.reject(error);
    }
    i = 0;
    len = responseInterceptorChain.length;
    while (i < len) {
      promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
    }
    return promise;
  }
  getUri(config2) {
    config2 = mergeConfig$1(this.defaults, config2);
    const fullPath = buildFullPath(config2.baseURL, config2.url, config2.allowAbsoluteUrls);
    return buildURL(fullPath, config2.params, config2.paramsSerializer);
  }
};
utils$2.forEach(["delete", "get", "head", "options"], function forEachMethodNoData(method) {
  Axios$1.prototype[method] = function(url, config2) {
    return this.request(mergeConfig$1(config2 || {}, {
      method,
      url,
      data: (config2 || {}).data
    }));
  };
});
utils$2.forEach(["post", "put", "patch"], function forEachMethodWithData(method) {
  function generateHTTPMethod(isForm) {
    return function httpMethod(url, data, config2) {
      return this.request(mergeConfig$1(config2 || {}, {
        method,
        headers: isForm ? {
          "Content-Type": "multipart/form-data"
        } : {},
        url,
        data
      }));
    };
  }
  Axios$1.prototype[method] = generateHTTPMethod();
  Axios$1.prototype[method + "Form"] = generateHTTPMethod(true);
});
let CancelToken$1 = class CancelToken {
  constructor(executor) {
    if (typeof executor !== "function") {
      throw new TypeError("executor must be a function.");
    }
    let resolvePromise;
    this.promise = new Promise(function promiseExecutor(resolve) {
      resolvePromise = resolve;
    });
    const token2 = this;
    this.promise.then((cancel) => {
      if (!token2._listeners) return;
      let i = token2._listeners.length;
      while (i-- > 0) {
        token2._listeners[i](cancel);
      }
      token2._listeners = null;
    });
    this.promise.then = (onfulfilled) => {
      let _resolve;
      const promise = new Promise((resolve) => {
        token2.subscribe(resolve);
        _resolve = resolve;
      }).then(onfulfilled);
      promise.cancel = function reject() {
        token2.unsubscribe(_resolve);
      };
      return promise;
    };
    executor(function cancel(message, config2, request) {
      if (token2.reason) {
        return;
      }
      token2.reason = new CanceledError$1(message, config2, request);
      resolvePromise(token2.reason);
    });
  }
  /**
   * Throws a `CanceledError` if cancellation has been requested.
   */
  throwIfRequested() {
    if (this.reason) {
      throw this.reason;
    }
  }
  /**
   * Subscribe to the cancel signal
   */
  subscribe(listener) {
    if (this.reason) {
      listener(this.reason);
      return;
    }
    if (this._listeners) {
      this._listeners.push(listener);
    } else {
      this._listeners = [listener];
    }
  }
  /**
   * Unsubscribe from the cancel signal
   */
  unsubscribe(listener) {
    if (!this._listeners) {
      return;
    }
    const index2 = this._listeners.indexOf(listener);
    if (index2 !== -1) {
      this._listeners.splice(index2, 1);
    }
  }
  toAbortSignal() {
    const controller = new AbortController();
    const abort = (err) => {
      controller.abort(err);
    };
    this.subscribe(abort);
    controller.signal.unsubscribe = () => this.unsubscribe(abort);
    return controller.signal;
  }
  /**
   * Returns an object that contains a new `CancelToken` and a function that, when called,
   * cancels the `CancelToken`.
   */
  static source() {
    let cancel;
    const token2 = new CancelToken(function executor(c) {
      cancel = c;
    });
    return {
      token: token2,
      cancel
    };
  }
};
function spread$1(callback) {
  return function wrap2(arr) {
    return callback.apply(null, arr);
  };
}
function isAxiosError$1(payload) {
  return utils$2.isObject(payload) && payload.isAxiosError === true;
}
const HttpStatusCode$1 = {
  Continue: 100,
  SwitchingProtocols: 101,
  Processing: 102,
  EarlyHints: 103,
  Ok: 200,
  Created: 201,
  Accepted: 202,
  NonAuthoritativeInformation: 203,
  NoContent: 204,
  ResetContent: 205,
  PartialContent: 206,
  MultiStatus: 207,
  AlreadyReported: 208,
  ImUsed: 226,
  MultipleChoices: 300,
  MovedPermanently: 301,
  Found: 302,
  SeeOther: 303,
  NotModified: 304,
  UseProxy: 305,
  Unused: 306,
  TemporaryRedirect: 307,
  PermanentRedirect: 308,
  BadRequest: 400,
  Unauthorized: 401,
  PaymentRequired: 402,
  Forbidden: 403,
  NotFound: 404,
  MethodNotAllowed: 405,
  NotAcceptable: 406,
  ProxyAuthenticationRequired: 407,
  RequestTimeout: 408,
  Conflict: 409,
  Gone: 410,
  LengthRequired: 411,
  PreconditionFailed: 412,
  PayloadTooLarge: 413,
  UriTooLong: 414,
  UnsupportedMediaType: 415,
  RangeNotSatisfiable: 416,
  ExpectationFailed: 417,
  ImATeapot: 418,
  MisdirectedRequest: 421,
  UnprocessableEntity: 422,
  Locked: 423,
  FailedDependency: 424,
  TooEarly: 425,
  UpgradeRequired: 426,
  PreconditionRequired: 428,
  TooManyRequests: 429,
  RequestHeaderFieldsTooLarge: 431,
  UnavailableForLegalReasons: 451,
  InternalServerError: 500,
  NotImplemented: 501,
  BadGateway: 502,
  ServiceUnavailable: 503,
  GatewayTimeout: 504,
  HttpVersionNotSupported: 505,
  VariantAlsoNegotiates: 506,
  InsufficientStorage: 507,
  LoopDetected: 508,
  NotExtended: 510,
  NetworkAuthenticationRequired: 511
};
Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
  HttpStatusCode$1[value] = key;
});
function createInstance(defaultConfig2) {
  const context = new Axios$1(defaultConfig2);
  const instance = bind(Axios$1.prototype.request, context);
  utils$2.extend(instance, Axios$1.prototype, context, { allOwnKeys: true });
  utils$2.extend(instance, context, null, { allOwnKeys: true });
  instance.create = function create(instanceConfig) {
    return createInstance(mergeConfig$1(defaultConfig2, instanceConfig));
  };
  return instance;
}
const axios = createInstance(defaults);
axios.Axios = Axios$1;
axios.CanceledError = CanceledError$1;
axios.CancelToken = CancelToken$1;
axios.isCancel = isCancel$1;
axios.VERSION = VERSION$1;
axios.toFormData = toFormData$1;
axios.AxiosError = AxiosError$1;
axios.Cancel = axios.CanceledError;
axios.all = function all(promises) {
  return Promise.all(promises);
};
axios.spread = spread$1;
axios.isAxiosError = isAxiosError$1;
axios.mergeConfig = mergeConfig$1;
axios.AxiosHeaders = AxiosHeaders$1;
axios.formToJSON = (thing) => formDataToJSON(utils$2.isHTMLForm(thing) ? new FormData(thing) : thing);
axios.getAdapter = adapters.getAdapter;
axios.HttpStatusCode = HttpStatusCode$1;
axios.default = axios;
const {
  Axios: Axios2,
  AxiosError,
  CanceledError,
  isCancel,
  CancelToken: CancelToken2,
  VERSION,
  all: all2,
  Cancel: Cancel$1,
  isAxiosError,
  spread,
  toFormData,
  AxiosHeaders: AxiosHeaders2,
  HttpStatusCode,
  formToJSON,
  getAdapter,
  mergeConfig
} = axios;
var dayjs_min$1 = { exports: {} };
var dayjs_min = dayjs_min$1.exports;
var hasRequiredDayjs_min;
function requireDayjs_min() {
  if (hasRequiredDayjs_min) return dayjs_min$1.exports;
  hasRequiredDayjs_min = 1;
  (function(module2, exports2) {
    !function(t, e2) {
      module2.exports = e2();
    }(dayjs_min, function() {
      var t = 1e3, e2 = 6e4, n = 36e5, r2 = "millisecond", i = "second", s = "minute", u2 = "hour", a2 = "day", o = "week", c = "month", f2 = "quarter", h2 = "year", d2 = "date", l = "Invalid Date", $ = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y2 = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, M2 = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(t2) {
        var e3 = ["th", "st", "nd", "rd"], n2 = t2 % 100;
        return "[" + t2 + (e3[(n2 - 20) % 10] || e3[n2] || e3[0]) + "]";
      } }, m2 = function(t2, e3, n2) {
        var r3 = String(t2);
        return !r3 || r3.length >= e3 ? t2 : "" + Array(e3 + 1 - r3.length).join(n2) + t2;
      }, v2 = { s: m2, z: function(t2) {
        var e3 = -t2.utcOffset(), n2 = Math.abs(e3), r3 = Math.floor(n2 / 60), i2 = n2 % 60;
        return (e3 <= 0 ? "+" : "-") + m2(r3, 2, "0") + ":" + m2(i2, 2, "0");
      }, m: function t2(e3, n2) {
        if (e3.date() < n2.date()) return -t2(n2, e3);
        var r3 = 12 * (n2.year() - e3.year()) + (n2.month() - e3.month()), i2 = e3.clone().add(r3, c), s2 = n2 - i2 < 0, u3 = e3.clone().add(r3 + (s2 ? -1 : 1), c);
        return +(-(r3 + (n2 - i2) / (s2 ? i2 - u3 : u3 - i2)) || 0);
      }, a: function(t2) {
        return t2 < 0 ? Math.ceil(t2) || 0 : Math.floor(t2);
      }, p: function(t2) {
        return { M: c, y: h2, w: o, d: a2, D: d2, h: u2, m: s, s: i, ms: r2, Q: f2 }[t2] || String(t2 || "").toLowerCase().replace(/s$/, "");
      }, u: function(t2) {
        return void 0 === t2;
      } }, g2 = "en", D2 = {};
      D2[g2] = M2;
      var p2 = "$isDayjsObject", S2 = function(t2) {
        return t2 instanceof _2 || !(!t2 || !t2[p2]);
      }, w = function t2(e3, n2, r3) {
        var i2;
        if (!e3) return g2;
        if ("string" == typeof e3) {
          var s2 = e3.toLowerCase();
          D2[s2] && (i2 = s2), n2 && (D2[s2] = n2, i2 = s2);
          var u3 = e3.split("-");
          if (!i2 && u3.length > 1) return t2(u3[0]);
        } else {
          var a3 = e3.name;
          D2[a3] = e3, i2 = a3;
        }
        return !r3 && i2 && (g2 = i2), i2 || !r3 && g2;
      }, O2 = function(t2, e3) {
        if (S2(t2)) return t2.clone();
        var n2 = "object" == typeof e3 ? e3 : {};
        return n2.date = t2, n2.args = arguments, new _2(n2);
      }, b2 = v2;
      b2.l = w, b2.i = S2, b2.w = function(t2, e3) {
        return O2(t2, { locale: e3.$L, utc: e3.$u, x: e3.$x, $offset: e3.$offset });
      };
      var _2 = function() {
        function M3(t2) {
          this.$L = w(t2.locale, null, true), this.parse(t2), this.$x = this.$x || t2.x || {}, this[p2] = true;
        }
        var m3 = M3.prototype;
        return m3.parse = function(t2) {
          this.$d = function(t3) {
            var e3 = t3.date, n2 = t3.utc;
            if (null === e3) return /* @__PURE__ */ new Date(NaN);
            if (b2.u(e3)) return /* @__PURE__ */ new Date();
            if (e3 instanceof Date) return new Date(e3);
            if ("string" == typeof e3 && !/Z$/i.test(e3)) {
              var r3 = e3.match($);
              if (r3) {
                var i2 = r3[2] - 1 || 0, s2 = (r3[7] || "0").substring(0, 3);
                return n2 ? new Date(Date.UTC(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s2)) : new Date(r3[1], i2, r3[3] || 1, r3[4] || 0, r3[5] || 0, r3[6] || 0, s2);
              }
            }
            return new Date(e3);
          }(t2), this.init();
        }, m3.init = function() {
          var t2 = this.$d;
          this.$y = t2.getFullYear(), this.$M = t2.getMonth(), this.$D = t2.getDate(), this.$W = t2.getDay(), this.$H = t2.getHours(), this.$m = t2.getMinutes(), this.$s = t2.getSeconds(), this.$ms = t2.getMilliseconds();
        }, m3.$utils = function() {
          return b2;
        }, m3.isValid = function() {
          return !(this.$d.toString() === l);
        }, m3.isSame = function(t2, e3) {
          var n2 = O2(t2);
          return this.startOf(e3) <= n2 && n2 <= this.endOf(e3);
        }, m3.isAfter = function(t2, e3) {
          return O2(t2) < this.startOf(e3);
        }, m3.isBefore = function(t2, e3) {
          return this.endOf(e3) < O2(t2);
        }, m3.$g = function(t2, e3, n2) {
          return b2.u(t2) ? this[e3] : this.set(n2, t2);
        }, m3.unix = function() {
          return Math.floor(this.valueOf() / 1e3);
        }, m3.valueOf = function() {
          return this.$d.getTime();
        }, m3.startOf = function(t2, e3) {
          var n2 = this, r3 = !!b2.u(e3) || e3, f3 = b2.p(t2), l2 = function(t3, e4) {
            var i2 = b2.w(n2.$u ? Date.UTC(n2.$y, e4, t3) : new Date(n2.$y, e4, t3), n2);
            return r3 ? i2 : i2.endOf(a2);
          }, $2 = function(t3, e4) {
            return b2.w(n2.toDate()[t3].apply(n2.toDate("s"), (r3 ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(e4)), n2);
          }, y3 = this.$W, M4 = this.$M, m4 = this.$D, v3 = "set" + (this.$u ? "UTC" : "");
          switch (f3) {
            case h2:
              return r3 ? l2(1, 0) : l2(31, 11);
            case c:
              return r3 ? l2(1, M4) : l2(0, M4 + 1);
            case o:
              var g3 = this.$locale().weekStart || 0, D3 = (y3 < g3 ? y3 + 7 : y3) - g3;
              return l2(r3 ? m4 - D3 : m4 + (6 - D3), M4);
            case a2:
            case d2:
              return $2(v3 + "Hours", 0);
            case u2:
              return $2(v3 + "Minutes", 1);
            case s:
              return $2(v3 + "Seconds", 2);
            case i:
              return $2(v3 + "Milliseconds", 3);
            default:
              return this.clone();
          }
        }, m3.endOf = function(t2) {
          return this.startOf(t2, false);
        }, m3.$set = function(t2, e3) {
          var n2, o2 = b2.p(t2), f3 = "set" + (this.$u ? "UTC" : ""), l2 = (n2 = {}, n2[a2] = f3 + "Date", n2[d2] = f3 + "Date", n2[c] = f3 + "Month", n2[h2] = f3 + "FullYear", n2[u2] = f3 + "Hours", n2[s] = f3 + "Minutes", n2[i] = f3 + "Seconds", n2[r2] = f3 + "Milliseconds", n2)[o2], $2 = o2 === a2 ? this.$D + (e3 - this.$W) : e3;
          if (o2 === c || o2 === h2) {
            var y3 = this.clone().set(d2, 1);
            y3.$d[l2]($2), y3.init(), this.$d = y3.set(d2, Math.min(this.$D, y3.daysInMonth())).$d;
          } else l2 && this.$d[l2]($2);
          return this.init(), this;
        }, m3.set = function(t2, e3) {
          return this.clone().$set(t2, e3);
        }, m3.get = function(t2) {
          return this[b2.p(t2)]();
        }, m3.add = function(r3, f3) {
          var d3, l2 = this;
          r3 = Number(r3);
          var $2 = b2.p(f3), y3 = function(t2) {
            var e3 = O2(l2);
            return b2.w(e3.date(e3.date() + Math.round(t2 * r3)), l2);
          };
          if ($2 === c) return this.set(c, this.$M + r3);
          if ($2 === h2) return this.set(h2, this.$y + r3);
          if ($2 === a2) return y3(1);
          if ($2 === o) return y3(7);
          var M4 = (d3 = {}, d3[s] = e2, d3[u2] = n, d3[i] = t, d3)[$2] || 1, m4 = this.$d.getTime() + r3 * M4;
          return b2.w(m4, this);
        }, m3.subtract = function(t2, e3) {
          return this.add(-1 * t2, e3);
        }, m3.format = function(t2) {
          var e3 = this, n2 = this.$locale();
          if (!this.isValid()) return n2.invalidDate || l;
          var r3 = t2 || "YYYY-MM-DDTHH:mm:ssZ", i2 = b2.z(this), s2 = this.$H, u3 = this.$m, a3 = this.$M, o2 = n2.weekdays, c2 = n2.months, f3 = n2.meridiem, h3 = function(t3, n3, i3, s3) {
            return t3 && (t3[n3] || t3(e3, r3)) || i3[n3].slice(0, s3);
          }, d3 = function(t3) {
            return b2.s(s2 % 12 || 12, t3, "0");
          }, $2 = f3 || function(t3, e4, n3) {
            var r4 = t3 < 12 ? "AM" : "PM";
            return n3 ? r4.toLowerCase() : r4;
          };
          return r3.replace(y2, function(t3, r4) {
            return r4 || function(t4) {
              switch (t4) {
                case "YY":
                  return String(e3.$y).slice(-2);
                case "YYYY":
                  return b2.s(e3.$y, 4, "0");
                case "M":
                  return a3 + 1;
                case "MM":
                  return b2.s(a3 + 1, 2, "0");
                case "MMM":
                  return h3(n2.monthsShort, a3, c2, 3);
                case "MMMM":
                  return h3(c2, a3);
                case "D":
                  return e3.$D;
                case "DD":
                  return b2.s(e3.$D, 2, "0");
                case "d":
                  return String(e3.$W);
                case "dd":
                  return h3(n2.weekdaysMin, e3.$W, o2, 2);
                case "ddd":
                  return h3(n2.weekdaysShort, e3.$W, o2, 3);
                case "dddd":
                  return o2[e3.$W];
                case "H":
                  return String(s2);
                case "HH":
                  return b2.s(s2, 2, "0");
                case "h":
                  return d3(1);
                case "hh":
                  return d3(2);
                case "a":
                  return $2(s2, u3, true);
                case "A":
                  return $2(s2, u3, false);
                case "m":
                  return String(u3);
                case "mm":
                  return b2.s(u3, 2, "0");
                case "s":
                  return String(e3.$s);
                case "ss":
                  return b2.s(e3.$s, 2, "0");
                case "SSS":
                  return b2.s(e3.$ms, 3, "0");
                case "Z":
                  return i2;
              }
              return null;
            }(t3) || i2.replace(":", "");
          });
        }, m3.utcOffset = function() {
          return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
        }, m3.diff = function(r3, d3, l2) {
          var $2, y3 = this, M4 = b2.p(d3), m4 = O2(r3), v3 = (m4.utcOffset() - this.utcOffset()) * e2, g3 = this - m4, D3 = function() {
            return b2.m(y3, m4);
          };
          switch (M4) {
            case h2:
              $2 = D3() / 12;
              break;
            case c:
              $2 = D3();
              break;
            case f2:
              $2 = D3() / 3;
              break;
            case o:
              $2 = (g3 - v3) / 6048e5;
              break;
            case a2:
              $2 = (g3 - v3) / 864e5;
              break;
            case u2:
              $2 = g3 / n;
              break;
            case s:
              $2 = g3 / e2;
              break;
            case i:
              $2 = g3 / t;
              break;
            default:
              $2 = g3;
          }
          return l2 ? $2 : b2.a($2);
        }, m3.daysInMonth = function() {
          return this.endOf(c).$D;
        }, m3.$locale = function() {
          return D2[this.$L];
        }, m3.locale = function(t2, e3) {
          if (!t2) return this.$L;
          var n2 = this.clone(), r3 = w(t2, e3, true);
          return r3 && (n2.$L = r3), n2;
        }, m3.clone = function() {
          return b2.w(this.$d, this);
        }, m3.toDate = function() {
          return new Date(this.valueOf());
        }, m3.toJSON = function() {
          return this.isValid() ? this.toISOString() : null;
        }, m3.toISOString = function() {
          return this.$d.toISOString();
        }, m3.toString = function() {
          return this.$d.toUTCString();
        }, M3;
      }(), k2 = _2.prototype;
      return O2.prototype = k2, [["$ms", r2], ["$s", i], ["$m", s], ["$H", u2], ["$W", a2], ["$M", c], ["$y", h2], ["$D", d2]].forEach(function(t2) {
        k2[t2[1]] = function(e3) {
          return this.$g(e3, t2[0], t2[1]);
        };
      }), O2.extend = function(t2, e3) {
        return t2.$i || (t2(e3, _2, O2), t2.$i = true), O2;
      }, O2.locale = w, O2.isDayjs = S2, O2.unix = function(t2) {
        return O2(1e3 * t2);
      }, O2.en = D2[g2], O2.Ls = D2, O2.p = {}, O2;
    });
  })(dayjs_min$1);
  return dayjs_min$1.exports;
}
var dayjs_minExports = requireDayjs_min();
const dayjs = /* @__PURE__ */ getDefaultExportFromCjs(dayjs_minExports);
var type;
var hasRequiredType;
function requireType() {
  if (hasRequiredType) return type;
  hasRequiredType = 1;
  type = TypeError;
  return type;
}
const __viteBrowserExternal = {};
const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: __viteBrowserExternal
}, Symbol.toStringTag, { value: "Module" }));
const require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);
var objectInspect;
var hasRequiredObjectInspect;
function requireObjectInspect() {
  if (hasRequiredObjectInspect) return objectInspect;
  hasRequiredObjectInspect = 1;
  var hasMap = typeof Map === "function" && Map.prototype;
  var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
  var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
  var mapForEach = hasMap && Map.prototype.forEach;
  var hasSet = typeof Set === "function" && Set.prototype;
  var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
  var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
  var setForEach = hasSet && Set.prototype.forEach;
  var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
  var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
  var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
  var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
  var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
  var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
  var booleanValueOf = Boolean.prototype.valueOf;
  var objectToString = Object.prototype.toString;
  var functionToString = Function.prototype.toString;
  var $match = String.prototype.match;
  var $slice = String.prototype.slice;
  var $replace = String.prototype.replace;
  var $toUpperCase = String.prototype.toUpperCase;
  var $toLowerCase = String.prototype.toLowerCase;
  var $test = RegExp.prototype.test;
  var $concat = Array.prototype.concat;
  var $join = Array.prototype.join;
  var $arrSlice = Array.prototype.slice;
  var $floor = Math.floor;
  var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
  var gOPS = Object.getOwnPropertySymbols;
  var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
  var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
  var toStringTag2 = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
  var isEnumerable = Object.prototype.propertyIsEnumerable;
  var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O2) {
    return O2.__proto__;
  } : null);
  function addNumericSeparator(num, str) {
    if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
      return str;
    }
    var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
    if (typeof num === "number") {
      var int = num < 0 ? -$floor(-num) : $floor(num);
      if (int !== num) {
        var intStr = String(int);
        var dec = $slice.call(str, intStr.length + 1);
        return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
      }
    }
    return $replace.call(str, sepRegex, "$&_");
  }
  var utilInspect = require$$0$1;
  var inspectCustom = utilInspect.custom;
  var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
  var quotes2 = {
    __proto__: null,
    "double": '"',
    single: "'"
  };
  var quoteREs = {
    __proto__: null,
    "double": /(["\\])/g,
    single: /(['\\])/g
  };
  objectInspect = function inspect_(obj2, options, depth, seen2) {
    var opts = options || {};
    if (has(opts, "quoteStyle") && !has(quotes2, opts.quoteStyle)) {
      throw new TypeError('option "quoteStyle" must be "single" or "double"');
    }
    if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
      throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
    }
    var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
    if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
      throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
    }
    if (has(opts, "indent") && opts.indent !== null && opts.indent !== "	" && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
      throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
    }
    if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
      throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
    }
    var numericSeparator = opts.numericSeparator;
    if (typeof obj2 === "undefined") {
      return "undefined";
    }
    if (obj2 === null) {
      return "null";
    }
    if (typeof obj2 === "boolean") {
      return obj2 ? "true" : "false";
    }
    if (typeof obj2 === "string") {
      return inspectString(obj2, opts);
    }
    if (typeof obj2 === "number") {
      if (obj2 === 0) {
        return Infinity / obj2 > 0 ? "0" : "-0";
      }
      var str = String(obj2);
      return numericSeparator ? addNumericSeparator(obj2, str) : str;
    }
    if (typeof obj2 === "bigint") {
      var bigIntStr = String(obj2) + "n";
      return numericSeparator ? addNumericSeparator(obj2, bigIntStr) : bigIntStr;
    }
    var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
    if (typeof depth === "undefined") {
      depth = 0;
    }
    if (depth >= maxDepth && maxDepth > 0 && typeof obj2 === "object") {
      return isArray2(obj2) ? "[Array]" : "[Object]";
    }
    var indent = getIndent(opts, depth);
    if (typeof seen2 === "undefined") {
      seen2 = [];
    } else if (indexOf(seen2, obj2) >= 0) {
      return "[Circular]";
    }
    function inspect(value, from2, noIndent) {
      if (from2) {
        seen2 = $arrSlice.call(seen2);
        seen2.push(from2);
      }
      if (noIndent) {
        var newOpts = {
          depth: opts.depth
        };
        if (has(opts, "quoteStyle")) {
          newOpts.quoteStyle = opts.quoteStyle;
        }
        return inspect_(value, newOpts, depth + 1, seen2);
      }
      return inspect_(value, opts, depth + 1, seen2);
    }
    if (typeof obj2 === "function" && !isRegExp2(obj2)) {
      var name = nameOf(obj2);
      var keys = arrObjKeys(obj2, inspect);
      return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
    }
    if (isSymbol(obj2)) {
      var symString = hasShammedSymbols ? $replace.call(String(obj2), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj2);
      return typeof obj2 === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
    }
    if (isElement2(obj2)) {
      var s = "<" + $toLowerCase.call(String(obj2.nodeName));
      var attrs = obj2.attributes || [];
      for (var i = 0; i < attrs.length; i++) {
        s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
      }
      s += ">";
      if (obj2.childNodes && obj2.childNodes.length) {
        s += "...";
      }
      s += "</" + $toLowerCase.call(String(obj2.nodeName)) + ">";
      return s;
    }
    if (isArray2(obj2)) {
      if (obj2.length === 0) {
        return "[]";
      }
      var xs = arrObjKeys(obj2, inspect);
      if (indent && !singleLineValues(xs)) {
        return "[" + indentedJoin(xs, indent) + "]";
      }
      return "[ " + $join.call(xs, ", ") + " ]";
    }
    if (isError(obj2)) {
      var parts = arrObjKeys(obj2, inspect);
      if (!("cause" in Error.prototype) && "cause" in obj2 && !isEnumerable.call(obj2, "cause")) {
        return "{ [" + String(obj2) + "] " + $join.call($concat.call("[cause]: " + inspect(obj2.cause), parts), ", ") + " }";
      }
      if (parts.length === 0) {
        return "[" + String(obj2) + "]";
      }
      return "{ [" + String(obj2) + "] " + $join.call(parts, ", ") + " }";
    }
    if (typeof obj2 === "object" && customInspect) {
      if (inspectSymbol && typeof obj2[inspectSymbol] === "function" && utilInspect) {
        return utilInspect(obj2, { depth: maxDepth - depth });
      } else if (customInspect !== "symbol" && typeof obj2.inspect === "function") {
        return obj2.inspect();
      }
    }
    if (isMap(obj2)) {
      var mapParts = [];
      if (mapForEach) {
        mapForEach.call(obj2, function(value, key) {
          mapParts.push(inspect(key, obj2, true) + " => " + inspect(value, obj2));
        });
      }
      return collectionOf("Map", mapSize.call(obj2), mapParts, indent);
    }
    if (isSet(obj2)) {
      var setParts = [];
      if (setForEach) {
        setForEach.call(obj2, function(value) {
          setParts.push(inspect(value, obj2));
        });
      }
      return collectionOf("Set", setSize.call(obj2), setParts, indent);
    }
    if (isWeakMap(obj2)) {
      return weakCollectionOf("WeakMap");
    }
    if (isWeakSet(obj2)) {
      return weakCollectionOf("WeakSet");
    }
    if (isWeakRef(obj2)) {
      return weakCollectionOf("WeakRef");
    }
    if (isNumber2(obj2)) {
      return markBoxed(inspect(Number(obj2)));
    }
    if (isBigInt(obj2)) {
      return markBoxed(inspect(bigIntValueOf.call(obj2)));
    }
    if (isBoolean2(obj2)) {
      return markBoxed(booleanValueOf.call(obj2));
    }
    if (isString2(obj2)) {
      return markBoxed(inspect(String(obj2)));
    }
    if (typeof window !== "undefined" && obj2 === window) {
      return "{ [object Window] }";
    }
    if (typeof globalThis !== "undefined" && obj2 === globalThis || typeof commonjsGlobal !== "undefined" && obj2 === commonjsGlobal) {
      return "{ [object globalThis] }";
    }
    if (!isDate2(obj2) && !isRegExp2(obj2)) {
      var ys = arrObjKeys(obj2, inspect);
      var isPlainObject2 = gPO ? gPO(obj2) === Object.prototype : obj2 instanceof Object || obj2.constructor === Object;
      var protoTag = obj2 instanceof Object ? "" : "null prototype";
      var stringTag = !isPlainObject2 && toStringTag2 && Object(obj2) === obj2 && toStringTag2 in obj2 ? $slice.call(toStr(obj2), 8, -1) : protoTag ? "Object" : "";
      var constructorTag = isPlainObject2 || typeof obj2.constructor !== "function" ? "" : obj2.constructor.name ? obj2.constructor.name + " " : "";
      var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
      if (ys.length === 0) {
        return tag + "{}";
      }
      if (indent) {
        return tag + "{" + indentedJoin(ys, indent) + "}";
      }
      return tag + "{ " + $join.call(ys, ", ") + " }";
    }
    return String(obj2);
  };
  function wrapQuotes(s, defaultStyle, opts) {
    var style2 = opts.quoteStyle || defaultStyle;
    var quoteChar = quotes2[style2];
    return quoteChar + s + quoteChar;
  }
  function quote(s) {
    return $replace.call(String(s), /"/g, "&quot;");
  }
  function canTrustToString(obj2) {
    return !toStringTag2 || !(typeof obj2 === "object" && (toStringTag2 in obj2 || typeof obj2[toStringTag2] !== "undefined"));
  }
  function isArray2(obj2) {
    return toStr(obj2) === "[object Array]" && canTrustToString(obj2);
  }
  function isDate2(obj2) {
    return toStr(obj2) === "[object Date]" && canTrustToString(obj2);
  }
  function isRegExp2(obj2) {
    return toStr(obj2) === "[object RegExp]" && canTrustToString(obj2);
  }
  function isError(obj2) {
    return toStr(obj2) === "[object Error]" && canTrustToString(obj2);
  }
  function isString2(obj2) {
    return toStr(obj2) === "[object String]" && canTrustToString(obj2);
  }
  function isNumber2(obj2) {
    return toStr(obj2) === "[object Number]" && canTrustToString(obj2);
  }
  function isBoolean2(obj2) {
    return toStr(obj2) === "[object Boolean]" && canTrustToString(obj2);
  }
  function isSymbol(obj2) {
    if (hasShammedSymbols) {
      return obj2 && typeof obj2 === "object" && obj2 instanceof Symbol;
    }
    if (typeof obj2 === "symbol") {
      return true;
    }
    if (!obj2 || typeof obj2 !== "object" || !symToString) {
      return false;
    }
    try {
      symToString.call(obj2);
      return true;
    } catch (e2) {
    }
    return false;
  }
  function isBigInt(obj2) {
    if (!obj2 || typeof obj2 !== "object" || !bigIntValueOf) {
      return false;
    }
    try {
      bigIntValueOf.call(obj2);
      return true;
    } catch (e2) {
    }
    return false;
  }
  var hasOwn2 = Object.prototype.hasOwnProperty || function(key) {
    return key in this;
  };
  function has(obj2, key) {
    return hasOwn2.call(obj2, key);
  }
  function toStr(obj2) {
    return objectToString.call(obj2);
  }
  function nameOf(f2) {
    if (f2.name) {
      return f2.name;
    }
    var m2 = $match.call(functionToString.call(f2), /^function\s*([\w$]+)/);
    if (m2) {
      return m2[1];
    }
    return null;
  }
  function indexOf(xs, x) {
    if (xs.indexOf) {
      return xs.indexOf(x);
    }
    for (var i = 0, l = xs.length; i < l; i++) {
      if (xs[i] === x) {
        return i;
      }
    }
    return -1;
  }
  function isMap(x) {
    if (!mapSize || !x || typeof x !== "object") {
      return false;
    }
    try {
      mapSize.call(x);
      try {
        setSize.call(x);
      } catch (s) {
        return true;
      }
      return x instanceof Map;
    } catch (e2) {
    }
    return false;
  }
  function isWeakMap(x) {
    if (!weakMapHas || !x || typeof x !== "object") {
      return false;
    }
    try {
      weakMapHas.call(x, weakMapHas);
      try {
        weakSetHas.call(x, weakSetHas);
      } catch (s) {
        return true;
      }
      return x instanceof WeakMap;
    } catch (e2) {
    }
    return false;
  }
  function isWeakRef(x) {
    if (!weakRefDeref || !x || typeof x !== "object") {
      return false;
    }
    try {
      weakRefDeref.call(x);
      return true;
    } catch (e2) {
    }
    return false;
  }
  function isSet(x) {
    if (!setSize || !x || typeof x !== "object") {
      return false;
    }
    try {
      setSize.call(x);
      try {
        mapSize.call(x);
      } catch (m2) {
        return true;
      }
      return x instanceof Set;
    } catch (e2) {
    }
    return false;
  }
  function isWeakSet(x) {
    if (!weakSetHas || !x || typeof x !== "object") {
      return false;
    }
    try {
      weakSetHas.call(x, weakSetHas);
      try {
        weakMapHas.call(x, weakMapHas);
      } catch (s) {
        return true;
      }
      return x instanceof WeakSet;
    } catch (e2) {
    }
    return false;
  }
  function isElement2(x) {
    if (!x || typeof x !== "object") {
      return false;
    }
    if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
      return true;
    }
    return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
  }
  function inspectString(str, opts) {
    if (str.length > opts.maxStringLength) {
      var remaining = str.length - opts.maxStringLength;
      var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
      return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
    }
    var quoteRE = quoteREs[opts.quoteStyle || "single"];
    quoteRE.lastIndex = 0;
    var s = $replace.call($replace.call(str, quoteRE, "\\$1"), /[\x00-\x1f]/g, lowbyte);
    return wrapQuotes(s, "single", opts);
  }
  function lowbyte(c) {
    var n = c.charCodeAt(0);
    var x = {
      8: "b",
      9: "t",
      10: "n",
      12: "f",
      13: "r"
    }[n];
    if (x) {
      return "\\" + x;
    }
    return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
  }
  function markBoxed(str) {
    return "Object(" + str + ")";
  }
  function weakCollectionOf(type2) {
    return type2 + " { ? }";
  }
  function collectionOf(type2, size, entries, indent) {
    var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
    return type2 + " (" + size + ") {" + joinedEntries + "}";
  }
  function singleLineValues(xs) {
    for (var i = 0; i < xs.length; i++) {
      if (indexOf(xs[i], "\n") >= 0) {
        return false;
      }
    }
    return true;
  }
  function getIndent(opts, depth) {
    var baseIndent;
    if (opts.indent === "	") {
      baseIndent = "	";
    } else if (typeof opts.indent === "number" && opts.indent > 0) {
      baseIndent = $join.call(Array(opts.indent + 1), " ");
    } else {
      return null;
    }
    return {
      base: baseIndent,
      prev: $join.call(Array(depth + 1), baseIndent)
    };
  }
  function indentedJoin(xs, indent) {
    if (xs.length === 0) {
      return "";
    }
    var lineJoiner = "\n" + indent.prev + indent.base;
    return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
  }
  function arrObjKeys(obj2, inspect) {
    var isArr = isArray2(obj2);
    var xs = [];
    if (isArr) {
      xs.length = obj2.length;
      for (var i = 0; i < obj2.length; i++) {
        xs[i] = has(obj2, i) ? inspect(obj2[i], obj2) : "";
      }
    }
    var syms = typeof gOPS === "function" ? gOPS(obj2) : [];
    var symMap;
    if (hasShammedSymbols) {
      symMap = {};
      for (var k2 = 0; k2 < syms.length; k2++) {
        symMap["$" + syms[k2]] = syms[k2];
      }
    }
    for (var key in obj2) {
      if (!has(obj2, key)) {
        continue;
      }
      if (isArr && String(Number(key)) === key && key < obj2.length) {
        continue;
      }
      if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
        continue;
      } else if ($test.call(/[^\w$]/, key)) {
        xs.push(inspect(key, obj2) + ": " + inspect(obj2[key], obj2));
      } else {
        xs.push(key + ": " + inspect(obj2[key], obj2));
      }
    }
    if (typeof gOPS === "function") {
      for (var j = 0; j < syms.length; j++) {
        if (isEnumerable.call(obj2, syms[j])) {
          xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj2[syms[j]], obj2));
        }
      }
    }
    return xs;
  }
  return objectInspect;
}
var sideChannelList;
var hasRequiredSideChannelList;
function requireSideChannelList() {
  if (hasRequiredSideChannelList) return sideChannelList;
  hasRequiredSideChannelList = 1;
  var inspect = /* @__PURE__ */ requireObjectInspect();
  var $TypeError = /* @__PURE__ */ requireType();
  var listGetNode = function(list, key, isDelete) {
    var prev2 = list;
    var curr;
    for (; (curr = prev2.next) != null; prev2 = curr) {
      if (curr.key === key) {
        prev2.next = curr.next;
        if (!isDelete) {
          curr.next = /** @type {NonNullable<typeof list.next>} */
          list.next;
          list.next = curr;
        }
        return curr;
      }
    }
  };
  var listGet = function(objects, key) {
    if (!objects) {
      return void 0;
    }
    var node2 = listGetNode(objects, key);
    return node2 && node2.value;
  };
  var listSet = function(objects, key, value) {
    var node2 = listGetNode(objects, key);
    if (node2) {
      node2.value = value;
    } else {
      objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
      {
        // eslint-disable-line no-param-reassign, no-extra-parens
        key,
        next: objects.next,
        value
      };
    }
  };
  var listHas = function(objects, key) {
    if (!objects) {
      return false;
    }
    return !!listGetNode(objects, key);
  };
  var listDelete = function(objects, key) {
    if (objects) {
      return listGetNode(objects, key, true);
    }
  };
  sideChannelList = function getSideChannelList() {
    var $o;
    var channel = {
      assert: function(key) {
        if (!channel.has(key)) {
          throw new $TypeError("Side channel does not contain " + inspect(key));
        }
      },
      "delete": function(key) {
        var root = $o && $o.next;
        var deletedNode = listDelete($o, key);
        if (deletedNode && root && root === deletedNode) {
          $o = void 0;
        }
        return !!deletedNode;
      },
      get: function(key) {
        return listGet($o, key);
      },
      has: function(key) {
        return listHas($o, key);
      },
      set: function(key, value) {
        if (!$o) {
          $o = {
            next: void 0
          };
        }
        listSet(
          /** @type {NonNullable<typeof $o>} */
          $o,
          key,
          value
        );
      }
    };
    return channel;
  };
  return sideChannelList;
}
var esObjectAtoms;
var hasRequiredEsObjectAtoms;
function requireEsObjectAtoms() {
  if (hasRequiredEsObjectAtoms) return esObjectAtoms;
  hasRequiredEsObjectAtoms = 1;
  esObjectAtoms = Object;
  return esObjectAtoms;
}
var esErrors;
var hasRequiredEsErrors;
function requireEsErrors() {
  if (hasRequiredEsErrors) return esErrors;
  hasRequiredEsErrors = 1;
  esErrors = Error;
  return esErrors;
}
var _eval;
var hasRequired_eval;
function require_eval() {
  if (hasRequired_eval) return _eval;
  hasRequired_eval = 1;
  _eval = EvalError;
  return _eval;
}
var range;
var hasRequiredRange;
function requireRange() {
  if (hasRequiredRange) return range;
  hasRequiredRange = 1;
  range = RangeError;
  return range;
}
var ref;
var hasRequiredRef;
function requireRef() {
  if (hasRequiredRef) return ref;
  hasRequiredRef = 1;
  ref = ReferenceError;
  return ref;
}
var syntax;
var hasRequiredSyntax;
function requireSyntax() {
  if (hasRequiredSyntax) return syntax;
  hasRequiredSyntax = 1;
  syntax = SyntaxError;
  return syntax;
}
var uri;
var hasRequiredUri;
function requireUri() {
  if (hasRequiredUri) return uri;
  hasRequiredUri = 1;
  uri = URIError;
  return uri;
}
var abs;
var hasRequiredAbs;
function requireAbs() {
  if (hasRequiredAbs) return abs;
  hasRequiredAbs = 1;
  abs = Math.abs;
  return abs;
}
var floor;
var hasRequiredFloor;
function requireFloor() {
  if (hasRequiredFloor) return floor;
  hasRequiredFloor = 1;
  floor = Math.floor;
  return floor;
}
var max$1;
var hasRequiredMax;
function requireMax() {
  if (hasRequiredMax) return max$1;
  hasRequiredMax = 1;
  max$1 = Math.max;
  return max$1;
}
var min;
var hasRequiredMin;
function requireMin() {
  if (hasRequiredMin) return min;
  hasRequiredMin = 1;
  min = Math.min;
  return min;
}
var pow;
var hasRequiredPow;
function requirePow() {
  if (hasRequiredPow) return pow;
  hasRequiredPow = 1;
  pow = Math.pow;
  return pow;
}
var round;
var hasRequiredRound;
function requireRound() {
  if (hasRequiredRound) return round;
  hasRequiredRound = 1;
  round = Math.round;
  return round;
}
var _isNaN;
var hasRequired_isNaN;
function require_isNaN() {
  if (hasRequired_isNaN) return _isNaN;
  hasRequired_isNaN = 1;
  _isNaN = Number.isNaN || function isNaN2(a2) {
    return a2 !== a2;
  };
  return _isNaN;
}
var sign;
var hasRequiredSign;
function requireSign() {
  if (hasRequiredSign) return sign;
  hasRequiredSign = 1;
  var $isNaN = /* @__PURE__ */ require_isNaN();
  sign = function sign2(number) {
    if ($isNaN(number) || number === 0) {
      return number;
    }
    return number < 0 ? -1 : 1;
  };
  return sign;
}
var gOPD;
var hasRequiredGOPD;
function requireGOPD() {
  if (hasRequiredGOPD) return gOPD;
  hasRequiredGOPD = 1;
  gOPD = Object.getOwnPropertyDescriptor;
  return gOPD;
}
var gopd;
var hasRequiredGopd;
function requireGopd() {
  if (hasRequiredGopd) return gopd;
  hasRequiredGopd = 1;
  var $gOPD = /* @__PURE__ */ requireGOPD();
  if ($gOPD) {
    try {
      $gOPD([], "length");
    } catch (e2) {
      $gOPD = null;
    }
  }
  gopd = $gOPD;
  return gopd;
}
var esDefineProperty;
var hasRequiredEsDefineProperty;
function requireEsDefineProperty() {
  if (hasRequiredEsDefineProperty) return esDefineProperty;
  hasRequiredEsDefineProperty = 1;
  var $defineProperty = Object.defineProperty || false;
  if ($defineProperty) {
    try {
      $defineProperty({}, "a", { value: 1 });
    } catch (e2) {
      $defineProperty = false;
    }
  }
  esDefineProperty = $defineProperty;
  return esDefineProperty;
}
var shams;
var hasRequiredShams;
function requireShams() {
  if (hasRequiredShams) return shams;
  hasRequiredShams = 1;
  shams = function hasSymbols2() {
    if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
      return false;
    }
    if (typeof Symbol.iterator === "symbol") {
      return true;
    }
    var obj2 = {};
    var sym = Symbol("test");
    var symObj = Object(sym);
    if (typeof sym === "string") {
      return false;
    }
    if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
      return false;
    }
    if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
      return false;
    }
    var symVal = 42;
    obj2[sym] = symVal;
    for (var _2 in obj2) {
      return false;
    }
    if (typeof Object.keys === "function" && Object.keys(obj2).length !== 0) {
      return false;
    }
    if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj2).length !== 0) {
      return false;
    }
    var syms = Object.getOwnPropertySymbols(obj2);
    if (syms.length !== 1 || syms[0] !== sym) {
      return false;
    }
    if (!Object.prototype.propertyIsEnumerable.call(obj2, sym)) {
      return false;
    }
    if (typeof Object.getOwnPropertyDescriptor === "function") {
      var descriptor = (
        /** @type {PropertyDescriptor} */
        Object.getOwnPropertyDescriptor(obj2, sym)
      );
      if (descriptor.value !== symVal || descriptor.enumerable !== true) {
        return false;
      }
    }
    return true;
  };
  return shams;
}
var hasSymbols;
var hasRequiredHasSymbols;
function requireHasSymbols() {
  if (hasRequiredHasSymbols) return hasSymbols;
  hasRequiredHasSymbols = 1;
  var origSymbol = typeof Symbol !== "undefined" && Symbol;
  var hasSymbolSham = requireShams();
  hasSymbols = function hasNativeSymbols() {
    if (typeof origSymbol !== "function") {
      return false;
    }
    if (typeof Symbol !== "function") {
      return false;
    }
    if (typeof origSymbol("foo") !== "symbol") {
      return false;
    }
    if (typeof Symbol("bar") !== "symbol") {
      return false;
    }
    return hasSymbolSham();
  };
  return hasSymbols;
}
var Reflect_getPrototypeOf;
var hasRequiredReflect_getPrototypeOf;
function requireReflect_getPrototypeOf() {
  if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
  hasRequiredReflect_getPrototypeOf = 1;
  Reflect_getPrototypeOf = typeof Reflect !== "undefined" && Reflect.getPrototypeOf || null;
  return Reflect_getPrototypeOf;
}
var Object_getPrototypeOf;
var hasRequiredObject_getPrototypeOf;
function requireObject_getPrototypeOf() {
  if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
  hasRequiredObject_getPrototypeOf = 1;
  var $Object = /* @__PURE__ */ requireEsObjectAtoms();
  Object_getPrototypeOf = $Object.getPrototypeOf || null;
  return Object_getPrototypeOf;
}
var implementation;
var hasRequiredImplementation;
function requireImplementation() {
  if (hasRequiredImplementation) return implementation;
  hasRequiredImplementation = 1;
  var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
  var toStr = Object.prototype.toString;
  var max2 = Math.max;
  var funcType = "[object Function]";
  var concatty = function concatty2(a2, b2) {
    var arr = [];
    for (var i = 0; i < a2.length; i += 1) {
      arr[i] = a2[i];
    }
    for (var j = 0; j < b2.length; j += 1) {
      arr[j + a2.length] = b2[j];
    }
    return arr;
  };
  var slicy = function slicy2(arrLike, offset2) {
    var arr = [];
    for (var i = offset2, j = 0; i < arrLike.length; i += 1, j += 1) {
      arr[j] = arrLike[i];
    }
    return arr;
  };
  var joiny = function(arr, joiner) {
    var str = "";
    for (var i = 0; i < arr.length; i += 1) {
      str += arr[i];
      if (i + 1 < arr.length) {
        str += joiner;
      }
    }
    return str;
  };
  implementation = function bind2(that) {
    var target = this;
    if (typeof target !== "function" || toStr.apply(target) !== funcType) {
      throw new TypeError(ERROR_MESSAGE + target);
    }
    var args = slicy(arguments, 1);
    var bound;
    var binder = function() {
      if (this instanceof bound) {
        var result = target.apply(
          this,
          concatty(args, arguments)
        );
        if (Object(result) === result) {
          return result;
        }
        return this;
      }
      return target.apply(
        that,
        concatty(args, arguments)
      );
    };
    var boundLength = max2(0, target.length - args.length);
    var boundArgs = [];
    for (var i = 0; i < boundLength; i++) {
      boundArgs[i] = "$" + i;
    }
    bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
    if (target.prototype) {
      var Empty = function Empty2() {
      };
      Empty.prototype = target.prototype;
      bound.prototype = new Empty();
      Empty.prototype = null;
    }
    return bound;
  };
  return implementation;
}
var functionBind;
var hasRequiredFunctionBind;
function requireFunctionBind() {
  if (hasRequiredFunctionBind) return functionBind;
  hasRequiredFunctionBind = 1;
  var implementation2 = requireImplementation();
  functionBind = Function.prototype.bind || implementation2;
  return functionBind;
}
var functionCall;
var hasRequiredFunctionCall;
function requireFunctionCall() {
  if (hasRequiredFunctionCall) return functionCall;
  hasRequiredFunctionCall = 1;
  functionCall = Function.prototype.call;
  return functionCall;
}
var functionApply;
var hasRequiredFunctionApply;
function requireFunctionApply() {
  if (hasRequiredFunctionApply) return functionApply;
  hasRequiredFunctionApply = 1;
  functionApply = Function.prototype.apply;
  return functionApply;
}
var reflectApply;
var hasRequiredReflectApply;
function requireReflectApply() {
  if (hasRequiredReflectApply) return reflectApply;
  hasRequiredReflectApply = 1;
  reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
  return reflectApply;
}
var actualApply;
var hasRequiredActualApply;
function requireActualApply() {
  if (hasRequiredActualApply) return actualApply;
  hasRequiredActualApply = 1;
  var bind2 = requireFunctionBind();
  var $apply = requireFunctionApply();
  var $call = requireFunctionCall();
  var $reflectApply = requireReflectApply();
  actualApply = $reflectApply || bind2.call($call, $apply);
  return actualApply;
}
var callBindApplyHelpers;
var hasRequiredCallBindApplyHelpers;
function requireCallBindApplyHelpers() {
  if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
  hasRequiredCallBindApplyHelpers = 1;
  var bind2 = requireFunctionBind();
  var $TypeError = /* @__PURE__ */ requireType();
  var $call = requireFunctionCall();
  var $actualApply = requireActualApply();
  callBindApplyHelpers = function callBindBasic(args) {
    if (args.length < 1 || typeof args[0] !== "function") {
      throw new $TypeError("a function is required");
    }
    return $actualApply(bind2, $call, args);
  };
  return callBindApplyHelpers;
}
var get;
var hasRequiredGet;
function requireGet() {
  if (hasRequiredGet) return get;
  hasRequiredGet = 1;
  var callBind = requireCallBindApplyHelpers();
  var gOPD2 = /* @__PURE__ */ requireGopd();
  var hasProtoAccessor;
  try {
    hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */
    [].__proto__ === Array.prototype;
  } catch (e2) {
    if (!e2 || typeof e2 !== "object" || !("code" in e2) || e2.code !== "ERR_PROTO_ACCESS") {
      throw e2;
    }
  }
  var desc = !!hasProtoAccessor && gOPD2 && gOPD2(
    Object.prototype,
    /** @type {keyof typeof Object.prototype} */
    "__proto__"
  );
  var $Object = Object;
  var $getPrototypeOf = $Object.getPrototypeOf;
  get = desc && typeof desc.get === "function" ? callBind([desc.get]) : typeof $getPrototypeOf === "function" ? (
    /** @type {import('./get')} */
    function getDunder(value) {
      return $getPrototypeOf(value == null ? value : $Object(value));
    }
  ) : false;
  return get;
}
var getProto;
var hasRequiredGetProto;
function requireGetProto() {
  if (hasRequiredGetProto) return getProto;
  hasRequiredGetProto = 1;
  var reflectGetProto = requireReflect_getPrototypeOf();
  var originalGetProto = requireObject_getPrototypeOf();
  var getDunderProto = /* @__PURE__ */ requireGet();
  getProto = reflectGetProto ? function getProto2(O2) {
    return reflectGetProto(O2);
  } : originalGetProto ? function getProto2(O2) {
    if (!O2 || typeof O2 !== "object" && typeof O2 !== "function") {
      throw new TypeError("getProto: not an object");
    }
    return originalGetProto(O2);
  } : getDunderProto ? function getProto2(O2) {
    return getDunderProto(O2);
  } : null;
  return getProto;
}
var hasown;
var hasRequiredHasown;
function requireHasown() {
  if (hasRequiredHasown) return hasown;
  hasRequiredHasown = 1;
  var call = Function.prototype.call;
  var $hasOwn = Object.prototype.hasOwnProperty;
  var bind2 = requireFunctionBind();
  hasown = bind2.call(call, $hasOwn);
  return hasown;
}
var getIntrinsic;
var hasRequiredGetIntrinsic;
function requireGetIntrinsic() {
  if (hasRequiredGetIntrinsic) return getIntrinsic;
  hasRequiredGetIntrinsic = 1;
  var undefined$1;
  var $Object = /* @__PURE__ */ requireEsObjectAtoms();
  var $Error = /* @__PURE__ */ requireEsErrors();
  var $EvalError = /* @__PURE__ */ require_eval();
  var $RangeError = /* @__PURE__ */ requireRange();
  var $ReferenceError = /* @__PURE__ */ requireRef();
  var $SyntaxError = /* @__PURE__ */ requireSyntax();
  var $TypeError = /* @__PURE__ */ requireType();
  var $URIError = /* @__PURE__ */ requireUri();
  var abs2 = /* @__PURE__ */ requireAbs();
  var floor2 = /* @__PURE__ */ requireFloor();
  var max2 = /* @__PURE__ */ requireMax();
  var min2 = /* @__PURE__ */ requireMin();
  var pow2 = /* @__PURE__ */ requirePow();
  var round2 = /* @__PURE__ */ requireRound();
  var sign2 = /* @__PURE__ */ requireSign();
  var $Function = Function;
  var getEvalledConstructor = function(expressionSyntax) {
    try {
      return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
    } catch (e2) {
    }
  };
  var $gOPD = /* @__PURE__ */ requireGopd();
  var $defineProperty = /* @__PURE__ */ requireEsDefineProperty();
  var throwTypeError = function() {
    throw new $TypeError();
  };
  var ThrowTypeError = $gOPD ? function() {
    try {
      arguments.callee;
      return throwTypeError;
    } catch (calleeThrows) {
      try {
        return $gOPD(arguments, "callee").get;
      } catch (gOPDthrows) {
        return throwTypeError;
      }
    }
  }() : throwTypeError;
  var hasSymbols2 = requireHasSymbols()();
  var getProto2 = requireGetProto();
  var $ObjectGPO = requireObject_getPrototypeOf();
  var $ReflectGPO = requireReflect_getPrototypeOf();
  var $apply = requireFunctionApply();
  var $call = requireFunctionCall();
  var needsEval = {};
  var TypedArray = typeof Uint8Array === "undefined" || !getProto2 ? undefined$1 : getProto2(Uint8Array);
  var INTRINSICS = {
    __proto__: null,
    "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
    "%Array%": Array,
    "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
    "%ArrayIteratorPrototype%": hasSymbols2 && getProto2 ? getProto2([][Symbol.iterator]()) : undefined$1,
    "%AsyncFromSyncIteratorPrototype%": undefined$1,
    "%AsyncFunction%": needsEval,
    "%AsyncGenerator%": needsEval,
    "%AsyncGeneratorFunction%": needsEval,
    "%AsyncIteratorPrototype%": needsEval,
    "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
    "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
    "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
    "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
    "%Boolean%": Boolean,
    "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
    "%Date%": Date,
    "%decodeURI%": decodeURI,
    "%decodeURIComponent%": decodeURIComponent,
    "%encodeURI%": encodeURI,
    "%encodeURIComponent%": encodeURIComponent,
    "%Error%": $Error,
    "%eval%": eval,
    // eslint-disable-line no-eval
    "%EvalError%": $EvalError,
    "%Float16Array%": typeof Float16Array === "undefined" ? undefined$1 : Float16Array,
    "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
    "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
    "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
    "%Function%": $Function,
    "%GeneratorFunction%": needsEval,
    "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
    "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
    "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
    "%isFinite%": isFinite,
    "%isNaN%": isNaN,
    "%IteratorPrototype%": hasSymbols2 && getProto2 ? getProto2(getProto2([][Symbol.iterator]())) : undefined$1,
    "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
    "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
    "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto2 ? undefined$1 : getProto2((/* @__PURE__ */ new Map())[Symbol.iterator]()),
    "%Math%": Math,
    "%Number%": Number,
    "%Object%": $Object,
    "%Object.getOwnPropertyDescriptor%": $gOPD,
    "%parseFloat%": parseFloat,
    "%parseInt%": parseInt,
    "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
    "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
    "%RangeError%": $RangeError,
    "%ReferenceError%": $ReferenceError,
    "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
    "%RegExp%": RegExp,
    "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
    "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto2 ? undefined$1 : getProto2((/* @__PURE__ */ new Set())[Symbol.iterator]()),
    "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
    "%String%": String,
    "%StringIteratorPrototype%": hasSymbols2 && getProto2 ? getProto2(""[Symbol.iterator]()) : undefined$1,
    "%Symbol%": hasSymbols2 ? Symbol : undefined$1,
    "%SyntaxError%": $SyntaxError,
    "%ThrowTypeError%": ThrowTypeError,
    "%TypedArray%": TypedArray,
    "%TypeError%": $TypeError,
    "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
    "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
    "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
    "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
    "%URIError%": $URIError,
    "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
    "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
    "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet,
    "%Function.prototype.call%": $call,
    "%Function.prototype.apply%": $apply,
    "%Object.defineProperty%": $defineProperty,
    "%Object.getPrototypeOf%": $ObjectGPO,
    "%Math.abs%": abs2,
    "%Math.floor%": floor2,
    "%Math.max%": max2,
    "%Math.min%": min2,
    "%Math.pow%": pow2,
    "%Math.round%": round2,
    "%Math.sign%": sign2,
    "%Reflect.getPrototypeOf%": $ReflectGPO
  };
  if (getProto2) {
    try {
      null.error;
    } catch (e2) {
      var errorProto = getProto2(getProto2(e2));
      INTRINSICS["%Error.prototype%"] = errorProto;
    }
  }
  var doEval = function doEval2(name) {
    var value;
    if (name === "%AsyncFunction%") {
      value = getEvalledConstructor("async function () {}");
    } else if (name === "%GeneratorFunction%") {
      value = getEvalledConstructor("function* () {}");
    } else if (name === "%AsyncGeneratorFunction%") {
      value = getEvalledConstructor("async function* () {}");
    } else if (name === "%AsyncGenerator%") {
      var fn2 = doEval2("%AsyncGeneratorFunction%");
      if (fn2) {
        value = fn2.prototype;
      }
    } else if (name === "%AsyncIteratorPrototype%") {
      var gen = doEval2("%AsyncGenerator%");
      if (gen && getProto2) {
        value = getProto2(gen.prototype);
      }
    }
    INTRINSICS[name] = value;
    return value;
  };
  var LEGACY_ALIASES = {
    __proto__: null,
    "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
    "%ArrayPrototype%": ["Array", "prototype"],
    "%ArrayProto_entries%": ["Array", "prototype", "entries"],
    "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
    "%ArrayProto_keys%": ["Array", "prototype", "keys"],
    "%ArrayProto_values%": ["Array", "prototype", "values"],
    "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
    "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
    "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
    "%BooleanPrototype%": ["Boolean", "prototype"],
    "%DataViewPrototype%": ["DataView", "prototype"],
    "%DatePrototype%": ["Date", "prototype"],
    "%ErrorPrototype%": ["Error", "prototype"],
    "%EvalErrorPrototype%": ["EvalError", "prototype"],
    "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
    "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
    "%FunctionPrototype%": ["Function", "prototype"],
    "%Generator%": ["GeneratorFunction", "prototype"],
    "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
    "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
    "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
    "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
    "%JSONParse%": ["JSON", "parse"],
    "%JSONStringify%": ["JSON", "stringify"],
    "%MapPrototype%": ["Map", "prototype"],
    "%NumberPrototype%": ["Number", "prototype"],
    "%ObjectPrototype%": ["Object", "prototype"],
    "%ObjProto_toString%": ["Object", "prototype", "toString"],
    "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
    "%PromisePrototype%": ["Promise", "prototype"],
    "%PromiseProto_then%": ["Promise", "prototype", "then"],
    "%Promise_all%": ["Promise", "all"],
    "%Promise_reject%": ["Promise", "reject"],
    "%Promise_resolve%": ["Promise", "resolve"],
    "%RangeErrorPrototype%": ["RangeError", "prototype"],
    "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
    "%RegExpPrototype%": ["RegExp", "prototype"],
    "%SetPrototype%": ["Set", "prototype"],
    "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
    "%StringPrototype%": ["String", "prototype"],
    "%SymbolPrototype%": ["Symbol", "prototype"],
    "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
    "%TypedArrayPrototype%": ["TypedArray", "prototype"],
    "%TypeErrorPrototype%": ["TypeError", "prototype"],
    "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
    "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
    "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
    "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
    "%URIErrorPrototype%": ["URIError", "prototype"],
    "%WeakMapPrototype%": ["WeakMap", "prototype"],
    "%WeakSetPrototype%": ["WeakSet", "prototype"]
  };
  var bind2 = requireFunctionBind();
  var hasOwn2 = /* @__PURE__ */ requireHasown();
  var $concat = bind2.call($call, Array.prototype.concat);
  var $spliceApply = bind2.call($apply, Array.prototype.splice);
  var $replace = bind2.call($call, String.prototype.replace);
  var $strSlice = bind2.call($call, String.prototype.slice);
  var $exec = bind2.call($call, RegExp.prototype.exec);
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  var reEscapeChar = /\\(\\)?/g;
  var stringToPath = function stringToPath2(string) {
    var first = $strSlice(string, 0, 1);
    var last = $strSlice(string, -1);
    if (first === "%" && last !== "%") {
      throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
    } else if (last === "%" && first !== "%") {
      throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
    }
    var result = [];
    $replace(string, rePropName, function(match2, number, quote, subString) {
      result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match2;
    });
    return result;
  };
  var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
    var intrinsicName = name;
    var alias;
    if (hasOwn2(LEGACY_ALIASES, intrinsicName)) {
      alias = LEGACY_ALIASES[intrinsicName];
      intrinsicName = "%" + alias[0] + "%";
    }
    if (hasOwn2(INTRINSICS, intrinsicName)) {
      var value = INTRINSICS[intrinsicName];
      if (value === needsEval) {
        value = doEval(intrinsicName);
      }
      if (typeof value === "undefined" && !allowMissing) {
        throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
      }
      return {
        alias,
        name: intrinsicName,
        value
      };
    }
    throw new $SyntaxError("intrinsic " + name + " does not exist!");
  };
  getIntrinsic = function GetIntrinsic(name, allowMissing) {
    if (typeof name !== "string" || name.length === 0) {
      throw new $TypeError("intrinsic name must be a non-empty string");
    }
    if (arguments.length > 1 && typeof allowMissing !== "boolean") {
      throw new $TypeError('"allowMissing" argument must be a boolean');
    }
    if ($exec(/^%?[^%]*%?$/, name) === null) {
      throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
    }
    var parts = stringToPath(name);
    var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
    var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
    var intrinsicRealName = intrinsic.name;
    var value = intrinsic.value;
    var skipFurtherCaching = false;
    var alias = intrinsic.alias;
    if (alias) {
      intrinsicBaseName = alias[0];
      $spliceApply(parts, $concat([0, 1], alias));
    }
    for (var i = 1, isOwn = true; i < parts.length; i += 1) {
      var part = parts[i];
      var first = $strSlice(part, 0, 1);
      var last = $strSlice(part, -1);
      if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
        throw new $SyntaxError("property names with quotes must have matching quotes");
      }
      if (part === "constructor" || !isOwn) {
        skipFurtherCaching = true;
      }
      intrinsicBaseName += "." + part;
      intrinsicRealName = "%" + intrinsicBaseName + "%";
      if (hasOwn2(INTRINSICS, intrinsicRealName)) {
        value = INTRINSICS[intrinsicRealName];
      } else if (value != null) {
        if (!(part in value)) {
          if (!allowMissing) {
            throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
          }
          return void 0;
        }
        if ($gOPD && i + 1 >= parts.length) {
          var desc = $gOPD(value, part);
          isOwn = !!desc;
          if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
            value = desc.get;
          } else {
            value = value[part];
          }
        } else {
          isOwn = hasOwn2(value, part);
          value = value[part];
        }
        if (isOwn && !skipFurtherCaching) {
          INTRINSICS[intrinsicRealName] = value;
        }
      }
    }
    return value;
  };
  return getIntrinsic;
}
var callBound;
var hasRequiredCallBound;
function requireCallBound() {
  if (hasRequiredCallBound) return callBound;
  hasRequiredCallBound = 1;
  var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
  var callBindBasic = requireCallBindApplyHelpers();
  var $indexOf = callBindBasic([GetIntrinsic("%String.prototype.indexOf%")]);
  callBound = function callBoundIntrinsic(name, allowMissing) {
    var intrinsic = (
      /** @type {(this: unknown, ...args: unknown[]) => unknown} */
      GetIntrinsic(name, !!allowMissing)
    );
    if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
      return callBindBasic(
        /** @type {const} */
        [intrinsic]
      );
    }
    return intrinsic;
  };
  return callBound;
}
var sideChannelMap;
var hasRequiredSideChannelMap;
function requireSideChannelMap() {
  if (hasRequiredSideChannelMap) return sideChannelMap;
  hasRequiredSideChannelMap = 1;
  var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
  var callBound2 = /* @__PURE__ */ requireCallBound();
  var inspect = /* @__PURE__ */ requireObjectInspect();
  var $TypeError = /* @__PURE__ */ requireType();
  var $Map = GetIntrinsic("%Map%", true);
  var $mapGet = callBound2("Map.prototype.get", true);
  var $mapSet = callBound2("Map.prototype.set", true);
  var $mapHas = callBound2("Map.prototype.has", true);
  var $mapDelete = callBound2("Map.prototype.delete", true);
  var $mapSize = callBound2("Map.prototype.size", true);
  sideChannelMap = !!$Map && /** @type {Exclude<import('.'), false>} */
  function getSideChannelMap() {
    var $m;
    var channel = {
      assert: function(key) {
        if (!channel.has(key)) {
          throw new $TypeError("Side channel does not contain " + inspect(key));
        }
      },
      "delete": function(key) {
        if ($m) {
          var result = $mapDelete($m, key);
          if ($mapSize($m) === 0) {
            $m = void 0;
          }
          return result;
        }
        return false;
      },
      get: function(key) {
        if ($m) {
          return $mapGet($m, key);
        }
      },
      has: function(key) {
        if ($m) {
          return $mapHas($m, key);
        }
        return false;
      },
      set: function(key, value) {
        if (!$m) {
          $m = new $Map();
        }
        $mapSet($m, key, value);
      }
    };
    return channel;
  };
  return sideChannelMap;
}
var sideChannelWeakmap;
var hasRequiredSideChannelWeakmap;
function requireSideChannelWeakmap() {
  if (hasRequiredSideChannelWeakmap) return sideChannelWeakmap;
  hasRequiredSideChannelWeakmap = 1;
  var GetIntrinsic = /* @__PURE__ */ requireGetIntrinsic();
  var callBound2 = /* @__PURE__ */ requireCallBound();
  var inspect = /* @__PURE__ */ requireObjectInspect();
  var getSideChannelMap = requireSideChannelMap();
  var $TypeError = /* @__PURE__ */ requireType();
  var $WeakMap = GetIntrinsic("%WeakMap%", true);
  var $weakMapGet = callBound2("WeakMap.prototype.get", true);
  var $weakMapSet = callBound2("WeakMap.prototype.set", true);
  var $weakMapHas = callBound2("WeakMap.prototype.has", true);
  var $weakMapDelete = callBound2("WeakMap.prototype.delete", true);
  sideChannelWeakmap = $WeakMap ? (
    /** @type {Exclude<import('.'), false>} */
    function getSideChannelWeakMap() {
      var $wm;
      var $m;
      var channel = {
        assert: function(key) {
          if (!channel.has(key)) {
            throw new $TypeError("Side channel does not contain " + inspect(key));
          }
        },
        "delete": function(key) {
          if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
            if ($wm) {
              return $weakMapDelete($wm, key);
            }
          } else if (getSideChannelMap) {
            if ($m) {
              return $m["delete"](key);
            }
          }
          return false;
        },
        get: function(key) {
          if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
            if ($wm) {
              return $weakMapGet($wm, key);
            }
          }
          return $m && $m.get(key);
        },
        has: function(key) {
          if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
            if ($wm) {
              return $weakMapHas($wm, key);
            }
          }
          return !!$m && $m.has(key);
        },
        set: function(key, value) {
          if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
            if (!$wm) {
              $wm = new $WeakMap();
            }
            $weakMapSet($wm, key, value);
          } else if (getSideChannelMap) {
            if (!$m) {
              $m = getSideChannelMap();
            }
            $m.set(key, value);
          }
        }
      };
      return channel;
    }
  ) : getSideChannelMap;
  return sideChannelWeakmap;
}
var sideChannel;
var hasRequiredSideChannel;
function requireSideChannel() {
  if (hasRequiredSideChannel) return sideChannel;
  hasRequiredSideChannel = 1;
  var $TypeError = /* @__PURE__ */ requireType();
  var inspect = /* @__PURE__ */ requireObjectInspect();
  var getSideChannelList = requireSideChannelList();
  var getSideChannelMap = requireSideChannelMap();
  var getSideChannelWeakMap = requireSideChannelWeakmap();
  var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
  sideChannel = function getSideChannel() {
    var $channelData;
    var channel = {
      assert: function(key) {
        if (!channel.has(key)) {
          throw new $TypeError("Side channel does not contain " + inspect(key));
        }
      },
      "delete": function(key) {
        return !!$channelData && $channelData["delete"](key);
      },
      get: function(key) {
        return $channelData && $channelData.get(key);
      },
      has: function(key) {
        return !!$channelData && $channelData.has(key);
      },
      set: function(key, value) {
        if (!$channelData) {
          $channelData = makeChannel();
        }
        $channelData.set(key, value);
      }
    };
    return channel;
  };
  return sideChannel;
}
var formats;
var hasRequiredFormats;
function requireFormats() {
  if (hasRequiredFormats) return formats;
  hasRequiredFormats = 1;
  var replace2 = String.prototype.replace;
  var percentTwenties = /%20/g;
  var Format = {
    RFC1738: "RFC1738",
    RFC3986: "RFC3986"
  };
  formats = {
    "default": Format.RFC3986,
    formatters: {
      RFC1738: function(value) {
        return replace2.call(value, percentTwenties, "+");
      },
      RFC3986: function(value) {
        return String(value);
      }
    },
    RFC1738: Format.RFC1738,
    RFC3986: Format.RFC3986
  };
  return formats;
}
var utils;
var hasRequiredUtils;
function requireUtils() {
  if (hasRequiredUtils) return utils;
  hasRequiredUtils = 1;
  var formats2 = /* @__PURE__ */ requireFormats();
  var has = Object.prototype.hasOwnProperty;
  var isArray2 = Array.isArray;
  var hexTable = function() {
    var array = [];
    for (var i = 0; i < 256; ++i) {
      array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
    }
    return array;
  }();
  var compactQueue = function compactQueue2(queue) {
    while (queue.length > 1) {
      var item = queue.pop();
      var obj2 = item.obj[item.prop];
      if (isArray2(obj2)) {
        var compacted = [];
        for (var j = 0; j < obj2.length; ++j) {
          if (typeof obj2[j] !== "undefined") {
            compacted.push(obj2[j]);
          }
        }
        item.obj[item.prop] = compacted;
      }
    }
  };
  var arrayToObject2 = function arrayToObject3(source, options) {
    var obj2 = options && options.plainObjects ? { __proto__: null } : {};
    for (var i = 0; i < source.length; ++i) {
      if (typeof source[i] !== "undefined") {
        obj2[i] = source[i];
      }
    }
    return obj2;
  };
  var merge2 = function merge3(target, source, options) {
    if (!source) {
      return target;
    }
    if (typeof source !== "object" && typeof source !== "function") {
      if (isArray2(target)) {
        target.push(source);
      } else if (target && typeof target === "object") {
        if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
          target[source] = true;
        }
      } else {
        return [target, source];
      }
      return target;
    }
    if (!target || typeof target !== "object") {
      return [target].concat(source);
    }
    var mergeTarget = target;
    if (isArray2(target) && !isArray2(source)) {
      mergeTarget = arrayToObject2(target, options);
    }
    if (isArray2(target) && isArray2(source)) {
      source.forEach(function(item, i) {
        if (has.call(target, i)) {
          var targetItem = target[i];
          if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
            target[i] = merge3(targetItem, item, options);
          } else {
            target.push(item);
          }
        } else {
          target[i] = item;
        }
      });
      return target;
    }
    return Object.keys(source).reduce(function(acc, key) {
      var value = source[key];
      if (has.call(acc, key)) {
        acc[key] = merge3(acc[key], value, options);
      } else {
        acc[key] = value;
      }
      return acc;
    }, mergeTarget);
  };
  var assign2 = function assignSingleSource(target, source) {
    return Object.keys(source).reduce(function(acc, key) {
      acc[key] = source[key];
      return acc;
    }, target);
  };
  var decode2 = function(str, defaultDecoder, charset) {
    var strWithoutPlus = str.replace(/\+/g, " ");
    if (charset === "iso-8859-1") {
      return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
    }
    try {
      return decodeURIComponent(strWithoutPlus);
    } catch (e2) {
      return strWithoutPlus;
    }
  };
  var limit = 1024;
  var encode2 = function encode3(str, defaultEncoder, charset, kind, format) {
    if (str.length === 0) {
      return str;
    }
    var string = str;
    if (typeof str === "symbol") {
      string = Symbol.prototype.toString.call(str);
    } else if (typeof str !== "string") {
      string = String(str);
    }
    if (charset === "iso-8859-1") {
      return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
        return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
      });
    }
    var out = "";
    for (var j = 0; j < string.length; j += limit) {
      var segment = string.length >= limit ? string.slice(j, j + limit) : string;
      var arr = [];
      for (var i = 0; i < segment.length; ++i) {
        var c = segment.charCodeAt(i);
        if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats2.RFC1738 && (c === 40 || c === 41)) {
          arr[arr.length] = segment.charAt(i);
          continue;
        }
        if (c < 128) {
          arr[arr.length] = hexTable[c];
          continue;
        }
        if (c < 2048) {
          arr[arr.length] = hexTable[192 | c >> 6] + hexTable[128 | c & 63];
          continue;
        }
        if (c < 55296 || c >= 57344) {
          arr[arr.length] = hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
          continue;
        }
        i += 1;
        c = 65536 + ((c & 1023) << 10 | segment.charCodeAt(i) & 1023);
        arr[arr.length] = hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
      }
      out += arr.join("");
    }
    return out;
  };
  var compact = function compact2(value) {
    var queue = [{ obj: { o: value }, prop: "o" }];
    var refs = [];
    for (var i = 0; i < queue.length; ++i) {
      var item = queue[i];
      var obj2 = item.obj[item.prop];
      var keys = Object.keys(obj2);
      for (var j = 0; j < keys.length; ++j) {
        var key = keys[j];
        var val = obj2[key];
        if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
          queue.push({ obj: obj2, prop: key });
          refs.push(val);
        }
      }
    }
    compactQueue(queue);
    return value;
  };
  var isRegExp2 = function isRegExp3(obj2) {
    return Object.prototype.toString.call(obj2) === "[object RegExp]";
  };
  var isBuffer2 = function isBuffer3(obj2) {
    if (!obj2 || typeof obj2 !== "object") {
      return false;
    }
    return !!(obj2.constructor && obj2.constructor.isBuffer && obj2.constructor.isBuffer(obj2));
  };
  var combine2 = function combine3(a2, b2) {
    return [].concat(a2, b2);
  };
  var maybeMap = function maybeMap2(val, fn2) {
    if (isArray2(val)) {
      var mapped = [];
      for (var i = 0; i < val.length; i += 1) {
        mapped.push(fn2(val[i]));
      }
      return mapped;
    }
    return fn2(val);
  };
  utils = {
    arrayToObject: arrayToObject2,
    assign: assign2,
    combine: combine2,
    compact,
    decode: decode2,
    encode: encode2,
    isBuffer: isBuffer2,
    isRegExp: isRegExp2,
    maybeMap,
    merge: merge2
  };
  return utils;
}
var stringify_1;
var hasRequiredStringify;
function requireStringify() {
  if (hasRequiredStringify) return stringify_1;
  hasRequiredStringify = 1;
  var getSideChannel = requireSideChannel();
  var utils2 = /* @__PURE__ */ requireUtils();
  var formats2 = /* @__PURE__ */ requireFormats();
  var has = Object.prototype.hasOwnProperty;
  var arrayPrefixGenerators = {
    brackets: function brackets(prefix2) {
      return prefix2 + "[]";
    },
    comma: "comma",
    indices: function indices(prefix2, key) {
      return prefix2 + "[" + key + "]";
    },
    repeat: function repeat(prefix2) {
      return prefix2;
    }
  };
  var isArray2 = Array.isArray;
  var push = Array.prototype.push;
  var pushToArray = function(arr, valueOrArray) {
    push.apply(arr, isArray2(valueOrArray) ? valueOrArray : [valueOrArray]);
  };
  var toISO = Date.prototype.toISOString;
  var defaultFormat = formats2["default"];
  var defaults2 = {
    addQueryPrefix: false,
    allowDots: false,
    allowEmptyArrays: false,
    arrayFormat: "indices",
    charset: "utf-8",
    charsetSentinel: false,
    commaRoundTrip: false,
    delimiter: "&",
    encode: true,
    encodeDotInKeys: false,
    encoder: utils2.encode,
    encodeValuesOnly: false,
    filter: void 0,
    format: defaultFormat,
    formatter: formats2.formatters[defaultFormat],
    // deprecated
    indices: false,
    serializeDate: function serializeDate(date) {
      return toISO.call(date);
    },
    skipNulls: false,
    strictNullHandling: false
  };
  var isNonNullishPrimitive = function isNonNullishPrimitive2(v2) {
    return typeof v2 === "string" || typeof v2 === "number" || typeof v2 === "boolean" || typeof v2 === "symbol" || typeof v2 === "bigint";
  };
  var sentinel = {};
  var stringify2 = function stringify3(object, prefix2, generateArrayPrefix, commaRoundTrip, allowEmptyArrays, strictNullHandling, skipNulls, encodeDotInKeys, encoder, filter2, sort, allowDots, serializeDate, format, formatter, encodeValuesOnly, charset, sideChannel2) {
    var obj2 = object;
    var tmpSc = sideChannel2;
    var step = 0;
    var findFlag = false;
    while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
      var pos = tmpSc.get(object);
      step += 1;
      if (typeof pos !== "undefined") {
        if (pos === step) {
          throw new RangeError("Cyclic object value");
        } else {
          findFlag = true;
        }
      }
      if (typeof tmpSc.get(sentinel) === "undefined") {
        step = 0;
      }
    }
    if (typeof filter2 === "function") {
      obj2 = filter2(prefix2, obj2);
    } else if (obj2 instanceof Date) {
      obj2 = serializeDate(obj2);
    } else if (generateArrayPrefix === "comma" && isArray2(obj2)) {
      obj2 = utils2.maybeMap(obj2, function(value2) {
        if (value2 instanceof Date) {
          return serializeDate(value2);
        }
        return value2;
      });
    }
    if (obj2 === null) {
      if (strictNullHandling) {
        return encoder && !encodeValuesOnly ? encoder(prefix2, defaults2.encoder, charset, "key", format) : prefix2;
      }
      obj2 = "";
    }
    if (isNonNullishPrimitive(obj2) || utils2.isBuffer(obj2)) {
      if (encoder) {
        var keyValue = encodeValuesOnly ? prefix2 : encoder(prefix2, defaults2.encoder, charset, "key", format);
        return [formatter(keyValue) + "=" + formatter(encoder(obj2, defaults2.encoder, charset, "value", format))];
      }
      return [formatter(prefix2) + "=" + formatter(String(obj2))];
    }
    var values2 = [];
    if (typeof obj2 === "undefined") {
      return values2;
    }
    var objKeys;
    if (generateArrayPrefix === "comma" && isArray2(obj2)) {
      if (encodeValuesOnly && encoder) {
        obj2 = utils2.maybeMap(obj2, encoder);
      }
      objKeys = [{ value: obj2.length > 0 ? obj2.join(",") || null : void 0 }];
    } else if (isArray2(filter2)) {
      objKeys = filter2;
    } else {
      var keys = Object.keys(obj2);
      objKeys = sort ? keys.sort(sort) : keys;
    }
    var encodedPrefix = encodeDotInKeys ? String(prefix2).replace(/\./g, "%2E") : String(prefix2);
    var adjustedPrefix = commaRoundTrip && isArray2(obj2) && obj2.length === 1 ? encodedPrefix + "[]" : encodedPrefix;
    if (allowEmptyArrays && isArray2(obj2) && obj2.length === 0) {
      return adjustedPrefix + "[]";
    }
    for (var j = 0; j < objKeys.length; ++j) {
      var key = objKeys[j];
      var value = typeof key === "object" && key && typeof key.value !== "undefined" ? key.value : obj2[key];
      if (skipNulls && value === null) {
        continue;
      }
      var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, "%2E") : String(key);
      var keyPrefix = isArray2(obj2) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? "." + encodedKey : "[" + encodedKey + "]");
      sideChannel2.set(object, step);
      var valueSideChannel = getSideChannel();
      valueSideChannel.set(sentinel, sideChannel2);
      pushToArray(values2, stringify3(
        value,
        keyPrefix,
        generateArrayPrefix,
        commaRoundTrip,
        allowEmptyArrays,
        strictNullHandling,
        skipNulls,
        encodeDotInKeys,
        generateArrayPrefix === "comma" && encodeValuesOnly && isArray2(obj2) ? null : encoder,
        filter2,
        sort,
        allowDots,
        serializeDate,
        format,
        formatter,
        encodeValuesOnly,
        charset,
        valueSideChannel
      ));
    }
    return values2;
  };
  var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
    if (!opts) {
      return defaults2;
    }
    if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
      throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    }
    if (typeof opts.encodeDotInKeys !== "undefined" && typeof opts.encodeDotInKeys !== "boolean") {
      throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
    }
    if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
      throw new TypeError("Encoder has to be a function.");
    }
    var charset = opts.charset || defaults2.charset;
    if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
      throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    }
    var format = formats2["default"];
    if (typeof opts.format !== "undefined") {
      if (!has.call(formats2.formatters, opts.format)) {
        throw new TypeError("Unknown format option provided.");
      }
      format = opts.format;
    }
    var formatter = formats2.formatters[format];
    var filter2 = defaults2.filter;
    if (typeof opts.filter === "function" || isArray2(opts.filter)) {
      filter2 = opts.filter;
    }
    var arrayFormat;
    if (opts.arrayFormat in arrayPrefixGenerators) {
      arrayFormat = opts.arrayFormat;
    } else if ("indices" in opts) {
      arrayFormat = opts.indices ? "indices" : "repeat";
    } else {
      arrayFormat = defaults2.arrayFormat;
    }
    if ("commaRoundTrip" in opts && typeof opts.commaRoundTrip !== "boolean") {
      throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
    }
    var allowDots = typeof opts.allowDots === "undefined" ? opts.encodeDotInKeys === true ? true : defaults2.allowDots : !!opts.allowDots;
    return {
      addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults2.addQueryPrefix,
      allowDots,
      allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults2.allowEmptyArrays,
      arrayFormat,
      charset,
      charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults2.charsetSentinel,
      commaRoundTrip: !!opts.commaRoundTrip,
      delimiter: typeof opts.delimiter === "undefined" ? defaults2.delimiter : opts.delimiter,
      encode: typeof opts.encode === "boolean" ? opts.encode : defaults2.encode,
      encodeDotInKeys: typeof opts.encodeDotInKeys === "boolean" ? opts.encodeDotInKeys : defaults2.encodeDotInKeys,
      encoder: typeof opts.encoder === "function" ? opts.encoder : defaults2.encoder,
      encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults2.encodeValuesOnly,
      filter: filter2,
      format,
      formatter,
      serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults2.serializeDate,
      skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults2.skipNulls,
      sort: typeof opts.sort === "function" ? opts.sort : null,
      strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults2.strictNullHandling
    };
  };
  stringify_1 = function(object, opts) {
    var obj2 = object;
    var options = normalizeStringifyOptions(opts);
    var objKeys;
    var filter2;
    if (typeof options.filter === "function") {
      filter2 = options.filter;
      obj2 = filter2("", obj2);
    } else if (isArray2(options.filter)) {
      filter2 = options.filter;
      objKeys = filter2;
    }
    var keys = [];
    if (typeof obj2 !== "object" || obj2 === null) {
      return "";
    }
    var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
    var commaRoundTrip = generateArrayPrefix === "comma" && options.commaRoundTrip;
    if (!objKeys) {
      objKeys = Object.keys(obj2);
    }
    if (options.sort) {
      objKeys.sort(options.sort);
    }
    var sideChannel2 = getSideChannel();
    for (var i = 0; i < objKeys.length; ++i) {
      var key = objKeys[i];
      var value = obj2[key];
      if (options.skipNulls && value === null) {
        continue;
      }
      pushToArray(keys, stringify2(
        value,
        key,
        generateArrayPrefix,
        commaRoundTrip,
        options.allowEmptyArrays,
        options.strictNullHandling,
        options.skipNulls,
        options.encodeDotInKeys,
        options.encode ? options.encoder : null,
        options.filter,
        options.sort,
        options.allowDots,
        options.serializeDate,
        options.format,
        options.formatter,
        options.encodeValuesOnly,
        options.charset,
        sideChannel2
      ));
    }
    var joined = keys.join(options.delimiter);
    var prefix2 = options.addQueryPrefix === true ? "?" : "";
    if (options.charsetSentinel) {
      if (options.charset === "iso-8859-1") {
        prefix2 += "utf8=%26%2310003%3B&";
      } else {
        prefix2 += "utf8=%E2%9C%93&";
      }
    }
    return joined.length > 0 ? prefix2 + joined : "";
  };
  return stringify_1;
}
var parse$4;
var hasRequiredParse$1;
function requireParse$1() {
  if (hasRequiredParse$1) return parse$4;
  hasRequiredParse$1 = 1;
  var utils2 = /* @__PURE__ */ requireUtils();
  var has = Object.prototype.hasOwnProperty;
  var isArray2 = Array.isArray;
  var defaults2 = {
    allowDots: false,
    allowEmptyArrays: false,
    allowPrototypes: false,
    allowSparse: false,
    arrayLimit: 20,
    charset: "utf-8",
    charsetSentinel: false,
    comma: false,
    decodeDotInKeys: false,
    decoder: utils2.decode,
    delimiter: "&",
    depth: 5,
    duplicates: "combine",
    ignoreQueryPrefix: false,
    interpretNumericEntities: false,
    parameterLimit: 1e3,
    parseArrays: true,
    plainObjects: false,
    strictDepth: false,
    strictNullHandling: false,
    throwOnLimitExceeded: false
  };
  var interpretNumericEntities = function(str) {
    return str.replace(/&#(\d+);/g, function($0, numberStr) {
      return String.fromCharCode(parseInt(numberStr, 10));
    });
  };
  var parseArrayValue = function(val, options, currentArrayLength) {
    if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
      return val.split(",");
    }
    if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
      throw new RangeError("Array limit exceeded. Only " + options.arrayLimit + " element" + (options.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
    }
    return val;
  };
  var isoSentinel = "utf8=%26%2310003%3B";
  var charsetSentinel = "utf8=%E2%9C%93";
  var parseValues = function parseQueryStringValues(str, options) {
    var obj2 = { __proto__: null };
    var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
    cleanStr = cleanStr.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
    var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
    var parts = cleanStr.split(
      options.delimiter,
      options.throwOnLimitExceeded ? limit + 1 : limit
    );
    if (options.throwOnLimitExceeded && parts.length > limit) {
      throw new RangeError("Parameter limit exceeded. Only " + limit + " parameter" + (limit === 1 ? "" : "s") + " allowed.");
    }
    var skipIndex = -1;
    var i;
    var charset = options.charset;
    if (options.charsetSentinel) {
      for (i = 0; i < parts.length; ++i) {
        if (parts[i].indexOf("utf8=") === 0) {
          if (parts[i] === charsetSentinel) {
            charset = "utf-8";
          } else if (parts[i] === isoSentinel) {
            charset = "iso-8859-1";
          }
          skipIndex = i;
          i = parts.length;
        }
      }
    }
    for (i = 0; i < parts.length; ++i) {
      if (i === skipIndex) {
        continue;
      }
      var part = parts[i];
      var bracketEqualsPos = part.indexOf("]=");
      var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
      var key;
      var val;
      if (pos === -1) {
        key = options.decoder(part, defaults2.decoder, charset, "key");
        val = options.strictNullHandling ? null : "";
      } else {
        key = options.decoder(part.slice(0, pos), defaults2.decoder, charset, "key");
        val = utils2.maybeMap(
          parseArrayValue(
            part.slice(pos + 1),
            options,
            isArray2(obj2[key]) ? obj2[key].length : 0
          ),
          function(encodedVal) {
            return options.decoder(encodedVal, defaults2.decoder, charset, "value");
          }
        );
      }
      if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
        val = interpretNumericEntities(String(val));
      }
      if (part.indexOf("[]=") > -1) {
        val = isArray2(val) ? [val] : val;
      }
      var existing = has.call(obj2, key);
      if (existing && options.duplicates === "combine") {
        obj2[key] = utils2.combine(obj2[key], val);
      } else if (!existing || options.duplicates === "last") {
        obj2[key] = val;
      }
    }
    return obj2;
  };
  var parseObject = function(chain, val, options, valuesParsed) {
    var currentArrayLength = 0;
    if (chain.length > 0 && chain[chain.length - 1] === "[]") {
      var parentKey = chain.slice(0, -1).join("");
      currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
    }
    var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
    for (var i = chain.length - 1; i >= 0; --i) {
      var obj2;
      var root = chain[i];
      if (root === "[]" && options.parseArrays) {
        obj2 = options.allowEmptyArrays && (leaf === "" || options.strictNullHandling && leaf === null) ? [] : utils2.combine([], leaf);
      } else {
        obj2 = options.plainObjects ? { __proto__: null } : {};
        var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
        var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, ".") : cleanRoot;
        var index2 = parseInt(decodedRoot, 10);
        if (!options.parseArrays && decodedRoot === "") {
          obj2 = { 0: leaf };
        } else if (!isNaN(index2) && root !== decodedRoot && String(index2) === decodedRoot && index2 >= 0 && (options.parseArrays && index2 <= options.arrayLimit)) {
          obj2 = [];
          obj2[index2] = leaf;
        } else if (decodedRoot !== "__proto__") {
          obj2[decodedRoot] = leaf;
        }
      }
      leaf = obj2;
    }
    return leaf;
  };
  var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
    if (!givenKey) {
      return;
    }
    var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
    var brackets = /(\[[^[\]]*])/;
    var child = /(\[[^[\]]*])/g;
    var segment = options.depth > 0 && brackets.exec(key);
    var parent = segment ? key.slice(0, segment.index) : key;
    var keys = [];
    if (parent) {
      if (!options.plainObjects && has.call(Object.prototype, parent)) {
        if (!options.allowPrototypes) {
          return;
        }
      }
      keys.push(parent);
    }
    var i = 0;
    while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
      i += 1;
      if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
        if (!options.allowPrototypes) {
          return;
        }
      }
      keys.push(segment[1]);
    }
    if (segment) {
      if (options.strictDepth === true) {
        throw new RangeError("Input depth exceeded depth option of " + options.depth + " and strictDepth is true");
      }
      keys.push("[" + key.slice(segment.index) + "]");
    }
    return parseObject(keys, val, options, valuesParsed);
  };
  var normalizeParseOptions = function normalizeParseOptions2(opts) {
    if (!opts) {
      return defaults2;
    }
    if (typeof opts.allowEmptyArrays !== "undefined" && typeof opts.allowEmptyArrays !== "boolean") {
      throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
    }
    if (typeof opts.decodeDotInKeys !== "undefined" && typeof opts.decodeDotInKeys !== "boolean") {
      throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
    }
    if (opts.decoder !== null && typeof opts.decoder !== "undefined" && typeof opts.decoder !== "function") {
      throw new TypeError("Decoder has to be a function.");
    }
    if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
      throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
    }
    if (typeof opts.throwOnLimitExceeded !== "undefined" && typeof opts.throwOnLimitExceeded !== "boolean") {
      throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
    }
    var charset = typeof opts.charset === "undefined" ? defaults2.charset : opts.charset;
    var duplicates = typeof opts.duplicates === "undefined" ? defaults2.duplicates : opts.duplicates;
    if (duplicates !== "combine" && duplicates !== "first" && duplicates !== "last") {
      throw new TypeError("The duplicates option must be either combine, first, or last");
    }
    var allowDots = typeof opts.allowDots === "undefined" ? opts.decodeDotInKeys === true ? true : defaults2.allowDots : !!opts.allowDots;
    return {
      allowDots,
      allowEmptyArrays: typeof opts.allowEmptyArrays === "boolean" ? !!opts.allowEmptyArrays : defaults2.allowEmptyArrays,
      allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults2.allowPrototypes,
      allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults2.allowSparse,
      arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults2.arrayLimit,
      charset,
      charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults2.charsetSentinel,
      comma: typeof opts.comma === "boolean" ? opts.comma : defaults2.comma,
      decodeDotInKeys: typeof opts.decodeDotInKeys === "boolean" ? opts.decodeDotInKeys : defaults2.decodeDotInKeys,
      decoder: typeof opts.decoder === "function" ? opts.decoder : defaults2.decoder,
      delimiter: typeof opts.delimiter === "string" || utils2.isRegExp(opts.delimiter) ? opts.delimiter : defaults2.delimiter,
      // eslint-disable-next-line no-implicit-coercion, no-extra-parens
      depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults2.depth,
      duplicates,
      ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
      interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults2.interpretNumericEntities,
      parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults2.parameterLimit,
      parseArrays: opts.parseArrays !== false,
      plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults2.plainObjects,
      strictDepth: typeof opts.strictDepth === "boolean" ? !!opts.strictDepth : defaults2.strictDepth,
      strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults2.strictNullHandling,
      throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === "boolean" ? opts.throwOnLimitExceeded : false
    };
  };
  parse$4 = function(str, opts) {
    var options = normalizeParseOptions(opts);
    if (str === "" || str === null || typeof str === "undefined") {
      return options.plainObjects ? { __proto__: null } : {};
    }
    var tempObj = typeof str === "string" ? parseValues(str, options) : str;
    var obj2 = options.plainObjects ? { __proto__: null } : {};
    var keys = Object.keys(tempObj);
    for (var i = 0; i < keys.length; ++i) {
      var key = keys[i];
      var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
      obj2 = utils2.merge(obj2, newObj, options);
    }
    if (options.allowSparse === true) {
      return obj2;
    }
    return utils2.compact(obj2);
  };
  return parse$4;
}
var lib$1;
var hasRequiredLib$1;
function requireLib$1() {
  if (hasRequiredLib$1) return lib$1;
  hasRequiredLib$1 = 1;
  var stringify2 = /* @__PURE__ */ requireStringify();
  var parse2 = /* @__PURE__ */ requireParse$1();
  var formats2 = /* @__PURE__ */ requireFormats();
  lib$1 = {
    formats: formats2,
    parse: parse2,
    stringify: stringify2
  };
  return lib$1;
}
var libExports$1 = /* @__PURE__ */ requireLib$1();
const qs = /* @__PURE__ */ getDefaultExportFromCjs(libExports$1);
var ParamSetOption = /* @__PURE__ */ ((ParamSetOption2) => {
  ParamSetOption2[ParamSetOption2["Disabled"] = 1] = "Disabled";
  ParamSetOption2[ParamSetOption2["InConfig"] = 2] = "InConfig";
  ParamSetOption2[ParamSetOption2["Calculated"] = 4] = "Calculated";
  ParamSetOption2[ParamSetOption2["Detalization"] = 8] = "Detalization";
  ParamSetOption2[ParamSetOption2["Markable"] = 16] = "Markable";
  ParamSetOption2[ParamSetOption2["Collapsed"] = 32] = "Collapsed";
  ParamSetOption2[ParamSetOption2["Reference"] = 64] = "Reference";
  ParamSetOption2[ParamSetOption2["RedNegative"] = 128] = "RedNegative";
  ParamSetOption2[ParamSetOption2["Inspector"] = 256] = "Inspector";
  ParamSetOption2[ParamSetOption2["Grid"] = 512] = "Grid";
  ParamSetOption2[ParamSetOption2["Sortable"] = 1024] = "Sortable";
  ParamSetOption2[ParamSetOption2["Filterable"] = 2048] = "Filterable";
  ParamSetOption2[ParamSetOption2["Override"] = 4096] = "Override";
  ParamSetOption2[ParamSetOption2["Hidden"] = 8192] = "Hidden";
  ParamSetOption2[ParamSetOption2["History"] = 16384] = "History";
  ParamSetOption2[ParamSetOption2["CanGroup"] = 32768] = "CanGroup";
  ParamSetOption2[ParamSetOption2["Fixed"] = 65536] = "Fixed";
  ParamSetOption2[ParamSetOption2["NotEdit"] = 131072] = "NotEdit";
  return ParamSetOption2;
})(ParamSetOption || {});
var EditStyle = /* @__PURE__ */ ((EditStyle2) => {
  EditStyle2[EditStyle2["PickList"] = 1] = "PickList";
  EditStyle2[EditStyle2["Calendar"] = 2] = "Calendar";
  EditStyle2[EditStyle2["Check"] = 4] = "Check";
  EditStyle2[EditStyle2["UpDown"] = 8] = "UpDown";
  EditStyle2[EditStyle2["Ellipsis"] = 16] = "Ellipsis";
  EditStyle2[EditStyle2["CheckList"] = 32] = "CheckList";
  EditStyle2[EditStyle2["ReadOnly"] = 64] = "ReadOnly";
  EditStyle2[EditStyle2["EditList"] = 128] = "EditList";
  EditStyle2[EditStyle2["ColorBox"] = 256] = "ColorBox";
  EditStyle2[EditStyle2["AutoList"] = 512] = "AutoList";
  EditStyle2[EditStyle2["Password"] = 1024] = "Password";
  return EditStyle2;
})(EditStyle || {});
var Rights = /* @__PURE__ */ ((Rights2) => {
  Rights2[Rights2["Insert"] = 1] = "Insert";
  Rights2[Rights2["Modify"] = 2] = "Modify";
  Rights2[Rights2["Delete"] = 4] = "Delete";
  Rights2[Rights2["Access"] = 8] = "Access";
  Rights2[Rights2["All"] = 15] = "All";
  return Rights2;
})(Rights || {});
var Button$1 = /* @__PURE__ */ ((Button22) => {
  Button22[Button22["Ok"] = 1] = "Ok";
  Button22[Button22["Cancel"] = 2] = "Cancel";
  Button22[Button22["Yes"] = 4] = "Yes";
  Button22[Button22["No"] = 8] = "No";
  Button22[Button22["Abort"] = 16] = "Abort";
  Button22[Button22["Retry"] = 32] = "Retry";
  Button22[Button22["Ignore"] = 64] = "Ignore";
  Button22[Button22["All"] = 128] = "All";
  Button22[Button22["NoToAll"] = 256] = "NoToAll";
  Button22[Button22["YesToAll"] = 512] = "YesToAll";
  Button22[Button22["Execute"] = 1024] = "Execute";
  return Button22;
})(Button$1 || {});
var Param = /* @__PURE__ */ ((Param2) => {
  Param2[Param2["Money"] = 0] = "Money";
  Param2[Param2["Percent"] = 1] = "Percent";
  Param2[Param2["Days"] = 2] = "Days";
  Param2[Param2["Hours"] = 3] = "Hours";
  Param2[Param2["Date"] = 4] = "Date";
  Param2[Param2["Integer"] = 5] = "Integer";
  Param2[Param2["Float"] = 6] = "Float";
  Param2[Param2["Str008"] = 7] = "Str008";
  Param2[Param2["Str016"] = 8] = "Str016";
  Param2[Param2["Str032"] = 9] = "Str032";
  Param2[Param2["Str064"] = 10] = "Str064";
  Param2[Param2["Str128"] = 11] = "Str128";
  Param2[Param2["Str256"] = 12] = "Str256";
  Param2[Param2["Check"] = 13] = "Check";
  Param2[Param2["HandBook"] = 14] = "HandBook";
  Param2[Param2["PickList"] = 15] = "PickList";
  Param2[Param2["CheckList"] = 16] = "CheckList";
  Param2[Param2["Quantity"] = 17] = "Quantity";
  Param2[Param2["Color"] = 18] = "Color";
  Param2[Param2["DateTime"] = 19] = "DateTime";
  Param2[Param2["Stream"] = 20] = "Stream";
  Param2[
    Param2["LoStr"] = 7
    /* Str008 */
  ] = "LoStr";
  Param2[
    Param2["HiStr"] = 12
    /* Str256 */
  ] = "HiStr";
  Param2[
    Param2["First"] = 0
    /* Money */
  ] = "First";
  Param2[
    Param2["Last"] = 13
    /* Check */
  ] = "Last";
  return Param2;
})(Param || {});
var ObjNameFlag = /* @__PURE__ */ ((ObjNameFlag2) => {
  ObjNameFlag2[ObjNameFlag2["FullName"] = 0] = "FullName";
  ObjNameFlag2[ObjNameFlag2["ShortName"] = 1] = "ShortName";
  ObjNameFlag2[ObjNameFlag2["ObjPrompt"] = 2] = "ObjPrompt";
  ObjNameFlag2[ObjNameFlag2["EditText"] = 3] = "EditText";
  ObjNameFlag2[ObjNameFlag2["Code"] = 4] = "Code";
  ObjNameFlag2[ObjNameFlag2["Name"] = 5] = "Name";
  ObjNameFlag2[ObjNameFlag2["Mask"] = 6] = "Mask";
  return ObjNameFlag2;
})(ObjNameFlag || {});
var DayMask = /* @__PURE__ */ ((DayMask2) => {
  DayMask2[DayMask2["Monday"] = 65536] = "Monday";
  DayMask2[DayMask2["Tuesday"] = 131072] = "Tuesday";
  DayMask2[DayMask2["Wednesday"] = 262144] = "Wednesday";
  DayMask2[DayMask2["Thursday"] = 524288] = "Thursday";
  DayMask2[DayMask2["Friday"] = 1048576] = "Friday";
  DayMask2[DayMask2["Saturday"] = 2097152] = "Saturday";
  DayMask2[DayMask2["Sunday"] = 4194304] = "Sunday";
  DayMask2[DayMask2["FiveDays"] = 2031616] = "FiveDays";
  DayMask2[DayMask2["SixDays"] = 4128768] = "SixDays";
  DayMask2[DayMask2["AllWeek"] = 8323072] = "AllWeek";
  DayMask2[DayMask2["OffDays"] = 6291456] = "OffDays";
  DayMask2[DayMask2["WorkMode"] = 8388608] = "WorkMode";
  DayMask2[DayMask2["Normal"] = 16777216] = "Normal";
  DayMask2[DayMask2["Feast"] = 33554432] = "Feast";
  DayMask2[DayMask2["DayOff"] = 67108864] = "DayOff";
  DayMask2[DayMask2["Before"] = 134217728] = "Before";
  DayMask2[DayMask2["AllTypes"] = 251658240] = "AllTypes";
  DayMask2[DayMask2["Charging"] = 268435456] = "Charging";
  DayMask2[DayMask2["Free"] = 536870912] = "Free";
  DayMask2[DayMask2["Whole"] = 1073741824] = "Whole";
  DayMask2[DayMask2["AllKinds"] = 1879048192] = "AllKinds";
  return DayMask2;
})(DayMask || {});
var HourMask = /* @__PURE__ */ ((HourMask2) => {
  HourMask2[HourMask2["Day"] = 1] = "Day";
  HourMask2[HourMask2["Evening"] = 2] = "Evening";
  HourMask2[HourMask2["Night"] = 4] = "Night";
  HourMask2[HourMask2["Total"] = 7] = "Total";
  return HourMask2;
})(HourMask || {});
var DlgType = /* @__PURE__ */ ((DlgType2) => {
  DlgType2[DlgType2["Warning"] = 0] = "Warning";
  DlgType2[DlgType2["Error"] = 1] = "Error";
  DlgType2[DlgType2["Information"] = 2] = "Information";
  DlgType2[DlgType2["Confirmation"] = 3] = "Confirmation";
  return DlgType2;
})(DlgType || {});
var DlgRes = /* @__PURE__ */ ((DlgRes2) => {
  DlgRes2[DlgRes2["Ok"] = 1] = "Ok";
  DlgRes2[DlgRes2["Cancel"] = 2] = "Cancel";
  DlgRes2[DlgRes2["Abort"] = 3] = "Abort";
  DlgRes2[DlgRes2["Retry"] = 4] = "Retry";
  DlgRes2[DlgRes2["Ignore"] = 5] = "Ignore";
  DlgRes2[DlgRes2["Yes"] = 6] = "Yes";
  DlgRes2[DlgRes2["No"] = 7] = "No";
  DlgRes2[DlgRes2["Continue"] = 11] = "Continue";
  DlgRes2[DlgRes2["All"] = 12] = "All";
  DlgRes2[DlgRes2["NoToAll"] = 13] = "NoToAll";
  DlgRes2[DlgRes2["YesToAll"] = 14] = "YesToAll";
  return DlgRes2;
})(DlgRes || {});
const TITLE_MESSAGE_MODAL_WINDOW = {
  [
    0
    /* Warning */
  ]: "Предупреждение",
  [
    1
    /* Error */
  ]: "Ошибка",
  [
    2
    /* Information */
  ]: "Информация",
  [
    3
    /* Confirmation */
  ]: "Подтверждение"
};
var Prefixes = /* @__PURE__ */ ((Prefixes2) => {
  Prefixes2["default"] = "project";
  Prefixes2["doc"] = "documents";
  Prefixes2["form"] = "forms";
  Prefixes2["cadr"] = "cadres";
  Prefixes2["person"] = "persons";
  Prefixes2["kladr"] = "kladr";
  Prefixes2["deps"] = "departments";
  Prefixes2["orgs"] = "organizations";
  Prefixes2["abl"] = "ABLUtils";
  Prefixes2["progs"] = "programs";
  Prefixes2["tables"] = "tables";
  Prefixes2["audit"] = "audit";
  Prefixes2["grade"] = "grades";
  Prefixes2["paytype"] = "paytypes";
  Prefixes2["config"] = "config";
  Prefixes2["db"] = "dbview";
  Prefixes2["address"] = "address";
  Prefixes2["amount"] = "amounts";
  Prefixes2["salary"] = "salary";
  Prefixes2["staff"] = "staff";
  Prefixes2["repTabs"] = "reptabs";
  Prefixes2["bgProcess"] = "queue";
  Prefixes2["seq"] = "sequence";
  Prefixes2["acc"] = "accounts";
  Prefixes2["tools"] = "tools";
  Prefixes2["books"] = "books";
  Prefixes2["doccfg"] = "doccfg";
  Prefixes2["usercfg"] = "usercfg";
  Prefixes2["storobj"] = "storobj";
  Prefixes2["resours"] = "resources";
  Prefixes2["acctools"] = "acctools";
  Prefixes2["report"] = "reports";
  return Prefixes2;
})(Prefixes || {});
var DelphiColors = /* @__PURE__ */ ((DelphiColors2) => {
  DelphiColors2[DelphiColors2["clBlack"] = 0] = "clBlack";
  DelphiColors2[DelphiColors2["clMaroon"] = 128] = "clMaroon";
  DelphiColors2[DelphiColors2["clGreen"] = 32768] = "clGreen";
  DelphiColors2[DelphiColors2["clOlive"] = 32896] = "clOlive";
  DelphiColors2[DelphiColors2["clNavy"] = 8388608] = "clNavy";
  DelphiColors2[DelphiColors2["clPurple"] = 8388736] = "clPurple";
  DelphiColors2[DelphiColors2["clTeal"] = 8421376] = "clTeal";
  DelphiColors2[DelphiColors2["clGray"] = 8421504] = "clGray";
  DelphiColors2[DelphiColors2["clSilver"] = 12632256] = "clSilver";
  DelphiColors2[DelphiColors2["clRed"] = 255] = "clRed";
  DelphiColors2[DelphiColors2["clLime"] = 65280] = "clLime";
  DelphiColors2[DelphiColors2["clYellow"] = 65535] = "clYellow";
  DelphiColors2[DelphiColors2["clBlue"] = 16711680] = "clBlue";
  DelphiColors2[DelphiColors2["clFuchsia"] = 16711935] = "clFuchsia";
  DelphiColors2[DelphiColors2["clAqua"] = 16776960] = "clAqua";
  DelphiColors2[DelphiColors2["clWhite"] = 16777215] = "clWhite";
  DelphiColors2[DelphiColors2["clInfoBk"] = 14811135] = "clInfoBk";
  return DelphiColors2;
})(DelphiColors || {});
var InfoRounded = {};
var hasRequiredInfoRounded;
function requireInfoRounded() {
  if (hasRequiredInfoRounded) return InfoRounded;
  hasRequiredInfoRounded = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(InfoRounded, "__esModule", {
    value: true
  });
  InfoRounded.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  InfoRounded.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1-8h-2V7h2z"
  }), "InfoRounded");
  return InfoRounded;
}
var InfoRoundedExports = /* @__PURE__ */ requireInfoRounded();
const InfoRoundedIcon = /* @__PURE__ */ getDefaultExportFromCjs(InfoRoundedExports);
var ReportRounded = {};
var hasRequiredReportRounded;
function requireReportRounded() {
  if (hasRequiredReportRounded) return ReportRounded;
  hasRequiredReportRounded = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ReportRounded, "__esModule", {
    value: true
  });
  ReportRounded.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ReportRounded.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M15.32 3H8.68c-.26 0-.52.11-.7.29L3.29 7.98c-.18.18-.29.44-.29.7v6.63c0 .27.11.52.29.71l4.68 4.68c.19.19.45.3.71.3h6.63c.27 0 .52-.11.71-.29l4.68-4.68c.19-.19.29-.44.29-.71V8.68c0-.27-.11-.52-.29-.71l-4.68-4.68c-.18-.18-.44-.29-.7-.29M12 17.3c-.72 0-1.3-.58-1.3-1.3s.58-1.3 1.3-1.3 1.3.58 1.3 1.3-.58 1.3-1.3 1.3m0-4.3c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1"
  }), "ReportRounded");
  return ReportRounded;
}
var ReportRoundedExports = /* @__PURE__ */ requireReportRounded();
const ReportRoundedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ReportRoundedExports);
var ErrorRounded = {};
var hasRequiredErrorRounded;
function requireErrorRounded() {
  if (hasRequiredErrorRounded) return ErrorRounded;
  hasRequiredErrorRounded = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ErrorRounded, "__esModule", {
    value: true
  });
  ErrorRounded.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ErrorRounded.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1m1 4h-2v-2h2z"
  }), "ErrorRounded");
  return ErrorRounded;
}
var ErrorRoundedExports = /* @__PURE__ */ requireErrorRounded();
const ErrorRoundedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ErrorRoundedExports);
const Transition$3 = reactExports.forwardRef(function Transition2(props, ref2) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Slide, { direction: "up", ref: ref2, ...props });
});
function ModalContainer(props) {
  const [open, setOpen] = reactExports.useState(true);
  reactExports.useEffect(() => {
    if (!open) {
      setOpen(true);
    }
  }, [props]);
  const title = () => {
    switch (props.dlgType) {
      case "Предупреждение":
        return /* @__PURE__ */ jsxRuntimeExports.jsx(ReportRoundedIcon, { fontSize: "large" });
      case "Ошибка":
        return /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorRoundedIcon, { fontSize: "large", sx: { color: red[500] } });
      case "Информация":
        return /* @__PURE__ */ jsxRuntimeExports.jsx(InfoRoundedIcon, { fontSize: "large" });
      case "Вопрос":
        return;
    }
  };
  const DefaultButtonOk = () => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { style: { textTransform: "none" }, onClick: handleClose, variant: "outlined", children: "Ок" });
  };
  const handleClose = () => {
    setOpen(false);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Dialog,
    {
      open: props.open === void 0 ? open : props.open,
      TransitionComponent: Transition$3,
      keepMounted: true,
      "aria-describedby": "alert-dialog-slide-description",
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: props.dlgType }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "center", alignItems: "center", spacing: 2, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: title() }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContentText, { children: props.content }) })
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogActions, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "DialogActionTest", children: props.buttons ? props.buttons : /* @__PURE__ */ jsxRuntimeExports.jsx(DefaultButtonOk, {}) }) })
      ]
    }
  ) });
}
const ChangeStatusProgressFooter = (props) => {
  const [Progress, setProgress] = React.useState(0);
  const [data, setData] = React.useState({});
  const [Title, setTitle] = React.useState("");
  const [ReqId, setReqId] = React.useState("");
  const [stop, setStop] = React.useState(false);
  React.useEffect(() => {
  }, []);
  React.useEffect(() => {
    if (data.error) {
      const Message = `Ошибка выполнения операции на сервере: ${data.error.content}`;
      const renderDefaultEl = document.getElementById("RenderDefault");
      const renderDefaultElRoot = renderDefaultEl.root || clientExports.createRoot(renderDefaultEl);
      renderDefaultEl.root = renderDefaultElRoot;
      renderDefaultElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(ModalContainer, { dlgType: "Ошибка", content: Message }));
    }
    tokenProcessing(data);
  }, [data]);
  React.useEffect(() => {
    tokenProcessing(props.Json);
  }, [props]);
  async function ChangeProgress(RequestID, result) {
    const params2 = /* @__PURE__ */ new Map(), data2 = { Result: result || "" };
    params2.set("prefix", "project");
    params2.set("comand", "ResumeRequest");
    params2.set("RequestID", RequestID);
    params2.set("WSM", "1");
    const resp = await AxiosRequest(true, params2, data2);
    setData(resp);
  }
  const Close2 = () => {
    const footerProgressElRoot = document.getElementById("footerProgress").root;
    footerProgressElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
  };
  const normalise = (value, MAX) => (Number(value) - 0) * 100 / (Number(MAX) - 0);
  function tokenProcessing(json) {
    const footerProgressElRoot = document.getElementById("footerProgress").root;
    if (json.Break !== void 0) {
      let Token, RequestID;
      Token = json.Token;
      RequestID = json.Params.RequestID;
      if (Token === "ChangeStatusProgress") {
        let Count, Stop, Title2, Index;
        Count = json.Params.Count;
        Stop = json.Params.Stop;
        Title2 = json.Params.Title;
        Index = json.Params.Index;
        if (isNaN(Index)) Index = 0;
        if (Title2 !== void 0) setTitle(Title2);
        if (Stop !== void 0) setStop(true);
        if (ReqId === "") setReqId(RequestID);
        setProgress(normalise(Index, Count));
        ChangeProgress(RequestID);
      } else if (Token === "ShellExecute") {
        footerProgressElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
        tokenProcessingTest(json, props.subData);
      } else if (Token === "SetProgressLabel") {
        footerProgressElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
        if (props.setReturnValue !== void 0 && props.from === "ModalProgress") {
          props.setReturnValue(json);
        } else {
          tokenProcessingTest(json);
        }
      } else {
        footerProgressElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
        tokenProcessingTest(json, props.subData);
      }
    } else if (isNaN(Progress)) {
      footerProgressElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
      if (props.setReturnValue !== void 0) {
        if (props.from !== "Forms") {
          footerProgressElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
          props.setReturnValue(json);
        } else if (props.from === "Forms" && json.Form !== void 0) props.setReturnValue(json);
      }
      ClearAllLoadMask();
    } else ;
  }
  return (
    // <Backdrop
    //   sx={{ zIndex: (theme) => theme.zIndex.drawer + 1 }}
    //   open={true}
    //   style={{ backgroundColor: "inherit" }}
    // >
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Grid$1,
        {
          container: true,
          sx: { pl: 2 },
          direction: "row",
          justifyContent: "flex-start",
          alignItems: "center",
          style: {
            width: "fit-content",
            height: "33px"
            // position: "absolute",
            // bottom: "1.7%",
            // left: "0%",
          },
          spacing: 1,
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LinearProgress, { variant: "determinate", value: Progress, style: { height: "10px", width: "100px" } }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { color: "black" }, children: Title })
          ]
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Grid$1,
        {
          style: {
            width: "150px",
            height: "20px",
            // position: "absolute",
            // bottom: "1.15%",
            // right: "1%",
            display: stop ? "unset" : "none"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              id: ReqId,
              variant: "contained",
              style: {
                height: "inherit",
                width: "inherit",
                textTransform: "none"
              },
              onClick: (ev) => {
                ChangeProgress(ev.target.id, "1");
                Close2();
              },
              children: "Прервать"
            }
          )
        }
      )
    ] })
  );
};
var cjs = { exports: {} };
var Draggable$1 = {};
function r$1(e2) {
  var t, f2, n = "";
  if ("string" == typeof e2 || "number" == typeof e2) n += e2;
  else if ("object" == typeof e2) if (Array.isArray(e2)) for (t = 0; t < e2.length; t++) e2[t] && (f2 = r$1(e2[t])) && (n && (n += " "), n += f2);
  else for (t in e2) e2[t] && (n && (n += " "), n += t);
  return n;
}
function clsx$2() {
  for (var e2, t, f2 = 0, n = ""; f2 < arguments.length; ) (e2 = arguments[f2++]) && (t = r$1(e2)) && (n && (n += " "), n += t);
  return n;
}
const clsx_m = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  clsx: clsx$2,
  default: clsx$2
}, Symbol.toStringTag, { value: "Module" }));
const require$$3 = /* @__PURE__ */ getAugmentedNamespace(clsx_m);
var domFns = {};
var shims = {};
var hasRequiredShims;
function requireShims() {
  if (hasRequiredShims) return shims;
  hasRequiredShims = 1;
  Object.defineProperty(shims, "__esModule", {
    value: true
  });
  shims.dontSetMe = dontSetMe;
  shims.findInArray = findInArray;
  shims.int = int;
  shims.isFunction = isFunction2;
  shims.isNum = isNum;
  function findInArray(array, callback) {
    for (let i = 0, length2 = array.length; i < length2; i++) {
      if (callback.apply(callback, [array[i], i, array])) return array[i];
    }
  }
  function isFunction2(func) {
    return typeof func === "function" || Object.prototype.toString.call(func) === "[object Function]";
  }
  function isNum(num) {
    return typeof num === "number" && !isNaN(num);
  }
  function int(a2) {
    return parseInt(a2, 10);
  }
  function dontSetMe(props, propName, componentName) {
    if (props[propName]) {
      return new Error("Invalid prop ".concat(propName, " passed to ").concat(componentName, " - do not set this, set it on the child."));
    }
  }
  return shims;
}
var getPrefix = {};
var hasRequiredGetPrefix;
function requireGetPrefix() {
  if (hasRequiredGetPrefix) return getPrefix;
  hasRequiredGetPrefix = 1;
  Object.defineProperty(getPrefix, "__esModule", {
    value: true
  });
  getPrefix.browserPrefixToKey = browserPrefixToKey;
  getPrefix.browserPrefixToStyle = browserPrefixToStyle;
  getPrefix.default = void 0;
  getPrefix.getPrefix = getPrefix$1;
  const prefixes = ["Moz", "Webkit", "O", "ms"];
  function getPrefix$1() {
    var _window$document;
    let prop = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
    if (typeof window === "undefined") return "";
    const style2 = (_window$document = window.document) === null || _window$document === void 0 || (_window$document = _window$document.documentElement) === null || _window$document === void 0 ? void 0 : _window$document.style;
    if (!style2) return "";
    if (prop in style2) return "";
    for (let i = 0; i < prefixes.length; i++) {
      if (browserPrefixToKey(prop, prefixes[i]) in style2) return prefixes[i];
    }
    return "";
  }
  function browserPrefixToKey(prop, prefix2) {
    return prefix2 ? "".concat(prefix2).concat(kebabToTitleCase(prop)) : prop;
  }
  function browserPrefixToStyle(prop, prefix2) {
    return prefix2 ? "-".concat(prefix2.toLowerCase(), "-").concat(prop) : prop;
  }
  function kebabToTitleCase(str) {
    let out = "";
    let shouldCapitalize = true;
    for (let i = 0; i < str.length; i++) {
      if (shouldCapitalize) {
        out += str[i].toUpperCase();
        shouldCapitalize = false;
      } else if (str[i] === "-") {
        shouldCapitalize = true;
      } else {
        out += str[i];
      }
    }
    return out;
  }
  getPrefix.default = getPrefix$1();
  return getPrefix;
}
var hasRequiredDomFns;
function requireDomFns() {
  if (hasRequiredDomFns) return domFns;
  hasRequiredDomFns = 1;
  Object.defineProperty(domFns, "__esModule", {
    value: true
  });
  domFns.addClassName = addClassName;
  domFns.addEvent = addEvent;
  domFns.addUserSelectStyles = addUserSelectStyles;
  domFns.createCSSTransform = createCSSTransform;
  domFns.createSVGTransform = createSVGTransform;
  domFns.getTouch = getTouch;
  domFns.getTouchIdentifier = getTouchIdentifier;
  domFns.getTranslation = getTranslation;
  domFns.innerHeight = innerHeight;
  domFns.innerWidth = innerWidth;
  domFns.matchesSelector = matchesSelector;
  domFns.matchesSelectorAndParentsTo = matchesSelectorAndParentsTo;
  domFns.offsetXYFromParent = offsetXYFromParent;
  domFns.outerHeight = outerHeight;
  domFns.outerWidth = outerWidth;
  domFns.removeClassName = removeClassName;
  domFns.removeEvent = removeEvent;
  domFns.removeUserSelectStyles = removeUserSelectStyles;
  var _shims = requireShims();
  var _getPrefix = _interopRequireWildcard(requireGetPrefix());
  function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
    var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop2) {
      return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
  }
  function _interopRequireWildcard(obj2, nodeInterop) {
    if (obj2 && obj2.__esModule) {
      return obj2;
    }
    if (obj2 === null || typeof obj2 !== "object" && typeof obj2 !== "function") {
      return { default: obj2 };
    }
    var cache2 = _getRequireWildcardCache(nodeInterop);
    if (cache2 && cache2.has(obj2)) {
      return cache2.get(obj2);
    }
    var newObj = {};
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for (var key in obj2) {
      if (key !== "default" && Object.prototype.hasOwnProperty.call(obj2, key)) {
        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj2, key) : null;
        if (desc && (desc.get || desc.set)) {
          Object.defineProperty(newObj, key, desc);
        } else {
          newObj[key] = obj2[key];
        }
      }
    }
    newObj.default = obj2;
    if (cache2) {
      cache2.set(obj2, newObj);
    }
    return newObj;
  }
  let matchesSelectorFunc = "";
  function matchesSelector(el, selector) {
    if (!matchesSelectorFunc) {
      matchesSelectorFunc = (0, _shims.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(method) {
        return (0, _shims.isFunction)(el[method]);
      });
    }
    if (!(0, _shims.isFunction)(el[matchesSelectorFunc])) return false;
    return el[matchesSelectorFunc](selector);
  }
  function matchesSelectorAndParentsTo(el, selector, baseNode) {
    let node2 = el;
    do {
      if (matchesSelector(node2, selector)) return true;
      if (node2 === baseNode) return false;
      node2 = node2.parentNode;
    } while (node2);
    return false;
  }
  function addEvent(el, event, handler, inputOptions) {
    if (!el) return;
    const options = {
      capture: true,
      ...inputOptions
    };
    if (el.addEventListener) {
      el.addEventListener(event, handler, options);
    } else if (el.attachEvent) {
      el.attachEvent("on" + event, handler);
    } else {
      el["on" + event] = handler;
    }
  }
  function removeEvent(el, event, handler, inputOptions) {
    if (!el) return;
    const options = {
      capture: true,
      ...inputOptions
    };
    if (el.removeEventListener) {
      el.removeEventListener(event, handler, options);
    } else if (el.detachEvent) {
      el.detachEvent("on" + event, handler);
    } else {
      el["on" + event] = null;
    }
  }
  function outerHeight(node2) {
    let height2 = node2.clientHeight;
    const computedStyle = node2.ownerDocument.defaultView.getComputedStyle(node2);
    height2 += (0, _shims.int)(computedStyle.borderTopWidth);
    height2 += (0, _shims.int)(computedStyle.borderBottomWidth);
    return height2;
  }
  function outerWidth(node2) {
    let width2 = node2.clientWidth;
    const computedStyle = node2.ownerDocument.defaultView.getComputedStyle(node2);
    width2 += (0, _shims.int)(computedStyle.borderLeftWidth);
    width2 += (0, _shims.int)(computedStyle.borderRightWidth);
    return width2;
  }
  function innerHeight(node2) {
    let height2 = node2.clientHeight;
    const computedStyle = node2.ownerDocument.defaultView.getComputedStyle(node2);
    height2 -= (0, _shims.int)(computedStyle.paddingTop);
    height2 -= (0, _shims.int)(computedStyle.paddingBottom);
    return height2;
  }
  function innerWidth(node2) {
    let width2 = node2.clientWidth;
    const computedStyle = node2.ownerDocument.defaultView.getComputedStyle(node2);
    width2 -= (0, _shims.int)(computedStyle.paddingLeft);
    width2 -= (0, _shims.int)(computedStyle.paddingRight);
    return width2;
  }
  function offsetXYFromParent(evt, offsetParent, scale) {
    const isBody = offsetParent === offsetParent.ownerDocument.body;
    const offsetParentRect = isBody ? {
      left: 0,
      top: 0
    } : offsetParent.getBoundingClientRect();
    const x = (evt.clientX + offsetParent.scrollLeft - offsetParentRect.left) / scale;
    const y2 = (evt.clientY + offsetParent.scrollTop - offsetParentRect.top) / scale;
    return {
      x,
      y: y2
    };
  }
  function createCSSTransform(controlPos, positionOffset) {
    const translation = getTranslation(controlPos, positionOffset, "px");
    return {
      [(0, _getPrefix.browserPrefixToKey)("transform", _getPrefix.default)]: translation
    };
  }
  function createSVGTransform(controlPos, positionOffset) {
    const translation = getTranslation(controlPos, positionOffset, "");
    return translation;
  }
  function getTranslation(_ref, positionOffset, unitSuffix) {
    let {
      x,
      y: y2
    } = _ref;
    let translation = "translate(".concat(x).concat(unitSuffix, ",").concat(y2).concat(unitSuffix, ")");
    if (positionOffset) {
      const defaultX = "".concat(typeof positionOffset.x === "string" ? positionOffset.x : positionOffset.x + unitSuffix);
      const defaultY = "".concat(typeof positionOffset.y === "string" ? positionOffset.y : positionOffset.y + unitSuffix);
      translation = "translate(".concat(defaultX, ", ").concat(defaultY, ")") + translation;
    }
    return translation;
  }
  function getTouch(e2, identifier2) {
    return e2.targetTouches && (0, _shims.findInArray)(e2.targetTouches, (t) => identifier2 === t.identifier) || e2.changedTouches && (0, _shims.findInArray)(e2.changedTouches, (t) => identifier2 === t.identifier);
  }
  function getTouchIdentifier(e2) {
    if (e2.targetTouches && e2.targetTouches[0]) return e2.targetTouches[0].identifier;
    if (e2.changedTouches && e2.changedTouches[0]) return e2.changedTouches[0].identifier;
  }
  function addUserSelectStyles(doc) {
    if (!doc) return;
    let styleEl = doc.getElementById("react-draggable-style-el");
    if (!styleEl) {
      styleEl = doc.createElement("style");
      styleEl.type = "text/css";
      styleEl.id = "react-draggable-style-el";
      styleEl.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n";
      styleEl.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n";
      doc.getElementsByTagName("head")[0].appendChild(styleEl);
    }
    if (doc.body) addClassName(doc.body, "react-draggable-transparent-selection");
  }
  function removeUserSelectStyles(doc) {
    if (!doc) return;
    try {
      if (doc.body) removeClassName(doc.body, "react-draggable-transparent-selection");
      if (doc.selection) {
        doc.selection.empty();
      } else {
        const selection = (doc.defaultView || window).getSelection();
        if (selection && selection.type !== "Caret") {
          selection.removeAllRanges();
        }
      }
    } catch (e2) {
    }
  }
  function addClassName(el, className) {
    if (el.classList) {
      el.classList.add(className);
    } else {
      if (!el.className.match(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)")))) {
        el.className += " ".concat(className);
      }
    }
  }
  function removeClassName(el, className) {
    if (el.classList) {
      el.classList.remove(className);
    } else {
      el.className = el.className.replace(new RegExp("(?:^|\\s)".concat(className, "(?!\\S)"), "g"), "");
    }
  }
  return domFns;
}
var positionFns = {};
var hasRequiredPositionFns;
function requirePositionFns() {
  if (hasRequiredPositionFns) return positionFns;
  hasRequiredPositionFns = 1;
  Object.defineProperty(positionFns, "__esModule", {
    value: true
  });
  positionFns.canDragX = canDragX;
  positionFns.canDragY = canDragY;
  positionFns.createCoreData = createCoreData;
  positionFns.createDraggableData = createDraggableData;
  positionFns.getBoundPosition = getBoundPosition;
  positionFns.getControlPosition = getControlPosition;
  positionFns.snapToGrid = snapToGrid;
  var _shims = requireShims();
  var _domFns = requireDomFns();
  function getBoundPosition(draggable, x, y2) {
    if (!draggable.props.bounds) return [x, y2];
    let {
      bounds
    } = draggable.props;
    bounds = typeof bounds === "string" ? bounds : cloneBounds(bounds);
    const node2 = findDOMNode(draggable);
    if (typeof bounds === "string") {
      const {
        ownerDocument: ownerDocument2
      } = node2;
      const ownerWindow2 = ownerDocument2.defaultView;
      let boundNode;
      if (bounds === "parent") {
        boundNode = node2.parentNode;
      } else {
        boundNode = ownerDocument2.querySelector(bounds);
      }
      if (!(boundNode instanceof ownerWindow2.HTMLElement)) {
        throw new Error('Bounds selector "' + bounds + '" could not find an element.');
      }
      const boundNodeEl = boundNode;
      const nodeStyle = ownerWindow2.getComputedStyle(node2);
      const boundNodeStyle = ownerWindow2.getComputedStyle(boundNodeEl);
      bounds = {
        left: -node2.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingLeft) + (0, _shims.int)(nodeStyle.marginLeft),
        top: -node2.offsetTop + (0, _shims.int)(boundNodeStyle.paddingTop) + (0, _shims.int)(nodeStyle.marginTop),
        right: (0, _domFns.innerWidth)(boundNodeEl) - (0, _domFns.outerWidth)(node2) - node2.offsetLeft + (0, _shims.int)(boundNodeStyle.paddingRight) - (0, _shims.int)(nodeStyle.marginRight),
        bottom: (0, _domFns.innerHeight)(boundNodeEl) - (0, _domFns.outerHeight)(node2) - node2.offsetTop + (0, _shims.int)(boundNodeStyle.paddingBottom) - (0, _shims.int)(nodeStyle.marginBottom)
      };
    }
    if ((0, _shims.isNum)(bounds.right)) x = Math.min(x, bounds.right);
    if ((0, _shims.isNum)(bounds.bottom)) y2 = Math.min(y2, bounds.bottom);
    if ((0, _shims.isNum)(bounds.left)) x = Math.max(x, bounds.left);
    if ((0, _shims.isNum)(bounds.top)) y2 = Math.max(y2, bounds.top);
    return [x, y2];
  }
  function snapToGrid(grid, pendingX, pendingY) {
    const x = Math.round(pendingX / grid[0]) * grid[0];
    const y2 = Math.round(pendingY / grid[1]) * grid[1];
    return [x, y2];
  }
  function canDragX(draggable) {
    return draggable.props.axis === "both" || draggable.props.axis === "x";
  }
  function canDragY(draggable) {
    return draggable.props.axis === "both" || draggable.props.axis === "y";
  }
  function getControlPosition(e2, touchIdentifier, draggableCore) {
    const touchObj = typeof touchIdentifier === "number" ? (0, _domFns.getTouch)(e2, touchIdentifier) : null;
    if (typeof touchIdentifier === "number" && !touchObj) return null;
    const node2 = findDOMNode(draggableCore);
    const offsetParent = draggableCore.props.offsetParent || node2.offsetParent || node2.ownerDocument.body;
    return (0, _domFns.offsetXYFromParent)(touchObj || e2, offsetParent, draggableCore.props.scale);
  }
  function createCoreData(draggable, x, y2) {
    const isStart = !(0, _shims.isNum)(draggable.lastX);
    const node2 = findDOMNode(draggable);
    if (isStart) {
      return {
        node: node2,
        deltaX: 0,
        deltaY: 0,
        lastX: x,
        lastY: y2,
        x,
        y: y2
      };
    } else {
      return {
        node: node2,
        deltaX: x - draggable.lastX,
        deltaY: y2 - draggable.lastY,
        lastX: draggable.lastX,
        lastY: draggable.lastY,
        x,
        y: y2
      };
    }
  }
  function createDraggableData(draggable, coreData) {
    const scale = draggable.props.scale;
    return {
      node: coreData.node,
      x: draggable.state.x + coreData.deltaX / scale,
      y: draggable.state.y + coreData.deltaY / scale,
      deltaX: coreData.deltaX / scale,
      deltaY: coreData.deltaY / scale,
      lastX: draggable.state.x,
      lastY: draggable.state.y
    };
  }
  function cloneBounds(bounds) {
    return {
      left: bounds.left,
      top: bounds.top,
      right: bounds.right,
      bottom: bounds.bottom
    };
  }
  function findDOMNode(draggable) {
    const node2 = draggable.findDOMNode();
    if (!node2) {
      throw new Error("<DraggableCore>: Unmounted during event!");
    }
    return node2;
  }
  return positionFns;
}
var DraggableCore = {};
var log = {};
var hasRequiredLog;
function requireLog() {
  if (hasRequiredLog) return log;
  hasRequiredLog = 1;
  Object.defineProperty(log, "__esModule", {
    value: true
  });
  log.default = log$1;
  function log$1() {
  }
  return log;
}
var hasRequiredDraggableCore;
function requireDraggableCore() {
  if (hasRequiredDraggableCore) return DraggableCore;
  hasRequiredDraggableCore = 1;
  Object.defineProperty(DraggableCore, "__esModule", {
    value: true
  });
  DraggableCore.default = void 0;
  var React2 = _interopRequireWildcard(requireReact());
  var _propTypes = _interopRequireDefault(/* @__PURE__ */ requirePropTypes());
  var _reactDom = _interopRequireDefault(requireReactDom());
  var _domFns = requireDomFns();
  var _positionFns = requirePositionFns();
  var _shims = requireShims();
  var _log = _interopRequireDefault(requireLog());
  function _interopRequireDefault(obj2) {
    return obj2 && obj2.__esModule ? obj2 : { default: obj2 };
  }
  function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
    var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop2) {
      return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
  }
  function _interopRequireWildcard(obj2, nodeInterop) {
    if (obj2 && obj2.__esModule) {
      return obj2;
    }
    if (obj2 === null || typeof obj2 !== "object" && typeof obj2 !== "function") {
      return { default: obj2 };
    }
    var cache2 = _getRequireWildcardCache(nodeInterop);
    if (cache2 && cache2.has(obj2)) {
      return cache2.get(obj2);
    }
    var newObj = {};
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for (var key in obj2) {
      if (key !== "default" && Object.prototype.hasOwnProperty.call(obj2, key)) {
        var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj2, key) : null;
        if (desc && (desc.get || desc.set)) {
          Object.defineProperty(newObj, key, desc);
        } else {
          newObj[key] = obj2[key];
        }
      }
    }
    newObj.default = obj2;
    if (cache2) {
      cache2.set(obj2, newObj);
    }
    return newObj;
  }
  function _defineProperty(obj2, key, value) {
    key = _toPropertyKey(key);
    if (key in obj2) {
      Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true });
    } else {
      obj2[key] = value;
    }
    return obj2;
  }
  function _toPropertyKey(arg) {
    var key = _toPrimitive(arg, "string");
    return typeof key === "symbol" ? key : String(key);
  }
  function _toPrimitive(input, hint) {
    if (typeof input !== "object" || input === null) return input;
    var prim = input[Symbol.toPrimitive];
    if (prim !== void 0) {
      var res = prim.call(input, hint);
      if (typeof res !== "object") return res;
      throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return (hint === "string" ? String : Number)(input);
  }
  const eventsFor = {
    touch: {
      start: "touchstart",
      move: "touchmove",
      stop: "touchend"
    },
    mouse: {
      start: "mousedown",
      move: "mousemove",
      stop: "mouseup"
    }
  };
  let dragEventFor = eventsFor.mouse;
  let DraggableCore$1 = class DraggableCore extends React2.Component {
    constructor() {
      super(...arguments);
      _defineProperty(this, "dragging", false);
      _defineProperty(this, "lastX", NaN);
      _defineProperty(this, "lastY", NaN);
      _defineProperty(this, "touchIdentifier", null);
      _defineProperty(this, "mounted", false);
      _defineProperty(this, "handleDragStart", (e2) => {
        this.props.onMouseDown(e2);
        if (!this.props.allowAnyClick && typeof e2.button === "number" && e2.button !== 0) return false;
        const thisNode = this.findDOMNode();
        if (!thisNode || !thisNode.ownerDocument || !thisNode.ownerDocument.body) {
          throw new Error("<DraggableCore> not mounted on DragStart!");
        }
        const {
          ownerDocument: ownerDocument2
        } = thisNode;
        if (this.props.disabled || !(e2.target instanceof ownerDocument2.defaultView.Node) || this.props.handle && !(0, _domFns.matchesSelectorAndParentsTo)(e2.target, this.props.handle, thisNode) || this.props.cancel && (0, _domFns.matchesSelectorAndParentsTo)(e2.target, this.props.cancel, thisNode)) {
          return;
        }
        if (e2.type === "touchstart") e2.preventDefault();
        const touchIdentifier = (0, _domFns.getTouchIdentifier)(e2);
        this.touchIdentifier = touchIdentifier;
        const position2 = (0, _positionFns.getControlPosition)(e2, touchIdentifier, this);
        if (position2 == null) return;
        const {
          x,
          y: y2
        } = position2;
        const coreEvent = (0, _positionFns.createCoreData)(this, x, y2);
        (0, _log.default)("DraggableCore: handleDragStart: %j", coreEvent);
        (0, _log.default)("calling", this.props.onStart);
        const shouldUpdate = this.props.onStart(e2, coreEvent);
        if (shouldUpdate === false || this.mounted === false) return;
        if (this.props.enableUserSelectHack) (0, _domFns.addUserSelectStyles)(ownerDocument2);
        this.dragging = true;
        this.lastX = x;
        this.lastY = y2;
        (0, _domFns.addEvent)(ownerDocument2, dragEventFor.move, this.handleDrag);
        (0, _domFns.addEvent)(ownerDocument2, dragEventFor.stop, this.handleDragStop);
      });
      _defineProperty(this, "handleDrag", (e2) => {
        const position2 = (0, _positionFns.getControlPosition)(e2, this.touchIdentifier, this);
        if (position2 == null) return;
        let {
          x,
          y: y2
        } = position2;
        if (Array.isArray(this.props.grid)) {
          let deltaX = x - this.lastX, deltaY = y2 - this.lastY;
          [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
          if (!deltaX && !deltaY) return;
          x = this.lastX + deltaX, y2 = this.lastY + deltaY;
        }
        const coreEvent = (0, _positionFns.createCoreData)(this, x, y2);
        (0, _log.default)("DraggableCore: handleDrag: %j", coreEvent);
        const shouldUpdate = this.props.onDrag(e2, coreEvent);
        if (shouldUpdate === false || this.mounted === false) {
          try {
            this.handleDragStop(new MouseEvent("mouseup"));
          } catch (err) {
            const event = document.createEvent("MouseEvents");
            event.initMouseEvent("mouseup", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
            this.handleDragStop(event);
          }
          return;
        }
        this.lastX = x;
        this.lastY = y2;
      });
      _defineProperty(this, "handleDragStop", (e2) => {
        if (!this.dragging) return;
        const position2 = (0, _positionFns.getControlPosition)(e2, this.touchIdentifier, this);
        if (position2 == null) return;
        let {
          x,
          y: y2
        } = position2;
        if (Array.isArray(this.props.grid)) {
          let deltaX = x - this.lastX || 0;
          let deltaY = y2 - this.lastY || 0;
          [deltaX, deltaY] = (0, _positionFns.snapToGrid)(this.props.grid, deltaX, deltaY);
          x = this.lastX + deltaX, y2 = this.lastY + deltaY;
        }
        const coreEvent = (0, _positionFns.createCoreData)(this, x, y2);
        const shouldContinue = this.props.onStop(e2, coreEvent);
        if (shouldContinue === false || this.mounted === false) return false;
        const thisNode = this.findDOMNode();
        if (thisNode) {
          if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(thisNode.ownerDocument);
        }
        (0, _log.default)("DraggableCore: handleDragStop: %j", coreEvent);
        this.dragging = false;
        this.lastX = NaN;
        this.lastY = NaN;
        if (thisNode) {
          (0, _log.default)("DraggableCore: Removing handlers");
          (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.move, this.handleDrag);
          (0, _domFns.removeEvent)(thisNode.ownerDocument, dragEventFor.stop, this.handleDragStop);
        }
      });
      _defineProperty(this, "onMouseDown", (e2) => {
        dragEventFor = eventsFor.mouse;
        return this.handleDragStart(e2);
      });
      _defineProperty(this, "onMouseUp", (e2) => {
        dragEventFor = eventsFor.mouse;
        return this.handleDragStop(e2);
      });
      _defineProperty(this, "onTouchStart", (e2) => {
        dragEventFor = eventsFor.touch;
        return this.handleDragStart(e2);
      });
      _defineProperty(this, "onTouchEnd", (e2) => {
        dragEventFor = eventsFor.touch;
        return this.handleDragStop(e2);
      });
    }
    componentDidMount() {
      this.mounted = true;
      const thisNode = this.findDOMNode();
      if (thisNode) {
        (0, _domFns.addEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
          passive: false
        });
      }
    }
    componentWillUnmount() {
      this.mounted = false;
      const thisNode = this.findDOMNode();
      if (thisNode) {
        const {
          ownerDocument: ownerDocument2
        } = thisNode;
        (0, _domFns.removeEvent)(ownerDocument2, eventsFor.mouse.move, this.handleDrag);
        (0, _domFns.removeEvent)(ownerDocument2, eventsFor.touch.move, this.handleDrag);
        (0, _domFns.removeEvent)(ownerDocument2, eventsFor.mouse.stop, this.handleDragStop);
        (0, _domFns.removeEvent)(ownerDocument2, eventsFor.touch.stop, this.handleDragStop);
        (0, _domFns.removeEvent)(thisNode, eventsFor.touch.start, this.onTouchStart, {
          passive: false
        });
        if (this.props.enableUserSelectHack) (0, _domFns.removeUserSelectStyles)(ownerDocument2);
      }
    }
    // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
    // the underlying DOM node ourselves. See the README for more information.
    findDOMNode() {
      var _this$props, _this$props2;
      return (_this$props = this.props) !== null && _this$props !== void 0 && _this$props.nodeRef ? (_this$props2 = this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.nodeRef) === null || _this$props2 === void 0 ? void 0 : _this$props2.current : _reactDom.default.findDOMNode(this);
    }
    render() {
      return /* @__PURE__ */ React2.cloneElement(React2.Children.only(this.props.children), {
        // Note: mouseMove handler is attached to document so it will still function
        // when the user drags quickly and leaves the bounds of the element.
        onMouseDown: this.onMouseDown,
        onMouseUp: this.onMouseUp,
        // onTouchStart is added on `componentDidMount` so they can be added with
        // {passive: false}, which allows it to cancel. See
        // https://developers.google.com/web/updates/2017/01/scrolling-intervention
        onTouchEnd: this.onTouchEnd
      });
    }
  };
  DraggableCore.default = DraggableCore$1;
  _defineProperty(DraggableCore$1, "displayName", "DraggableCore");
  _defineProperty(DraggableCore$1, "propTypes", {
    /**
     * `allowAnyClick` allows dragging using any mouse button.
     * By default, we only accept the left button.
     *
     * Defaults to `false`.
     */
    allowAnyClick: _propTypes.default.bool,
    children: _propTypes.default.node.isRequired,
    /**
     * `disabled`, if true, stops the <Draggable> from dragging. All handlers,
     * with the exception of `onMouseDown`, will not fire.
     */
    disabled: _propTypes.default.bool,
    /**
     * By default, we add 'user-select:none' attributes to the document body
     * to prevent ugly text selection during drag. If this is causing problems
     * for your app, set this to `false`.
     */
    enableUserSelectHack: _propTypes.default.bool,
    /**
     * `offsetParent`, if set, uses the passed DOM node to compute drag offsets
     * instead of using the parent node.
     */
    offsetParent: function(props, propName) {
      if (props[propName] && props[propName].nodeType !== 1) {
        throw new Error("Draggable's offsetParent must be a DOM Node.");
      }
    },
    /**
     * `grid` specifies the x and y that dragging should snap to.
     */
    grid: _propTypes.default.arrayOf(_propTypes.default.number),
    /**
     * `handle` specifies a selector to be used as the handle that initiates drag.
     *
     * Example:
     *
     * ```jsx
     *   let App = React.createClass({
     *       render: function () {
     *         return (
     *            <Draggable handle=".handle">
     *              <div>
     *                  <div className="handle">Click me to drag</div>
     *                  <div>This is some other content</div>
     *              </div>
     *           </Draggable>
     *         );
     *       }
     *   });
     * ```
     */
    handle: _propTypes.default.string,
    /**
     * `cancel` specifies a selector to be used to prevent drag initialization.
     *
     * Example:
     *
     * ```jsx
     *   let App = React.createClass({
     *       render: function () {
     *           return(
     *               <Draggable cancel=".cancel">
     *                   <div>
     *                     <div className="cancel">You can't drag from here</div>
     *                     <div>Dragging here works fine</div>
     *                   </div>
     *               </Draggable>
     *           );
     *       }
     *   });
     * ```
     */
    cancel: _propTypes.default.string,
    /* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
     * Unfortunately, in order for <Draggable> to work properly, we need raw access
     * to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
     * as in this example:
     *
     * function MyComponent() {
     *   const nodeRef = React.useRef(null);
     *   return (
     *     <Draggable nodeRef={nodeRef}>
     *       <div ref={nodeRef}>Example Target</div>
     *     </Draggable>
     *   );
     * }
     *
     * This can be used for arbitrarily nested components, so long as the ref ends up
     * pointing to the actual child DOM node and not a custom component.
     */
    nodeRef: _propTypes.default.object,
    /**
     * Called when dragging starts.
     * If this function returns the boolean false, dragging will be canceled.
     */
    onStart: _propTypes.default.func,
    /**
     * Called while dragging.
     * If this function returns the boolean false, dragging will be canceled.
     */
    onDrag: _propTypes.default.func,
    /**
     * Called when dragging stops.
     * If this function returns the boolean false, the drag will remain active.
     */
    onStop: _propTypes.default.func,
    /**
     * A workaround option which can be passed if onMouseDown needs to be accessed,
     * since it'll always be blocked (as there is internal use of onMouseDown)
     */
    onMouseDown: _propTypes.default.func,
    /**
     * `scale`, if set, applies scaling while dragging an element
     */
    scale: _propTypes.default.number,
    /**
     * These properties should be defined on the child, not here.
     */
    className: _shims.dontSetMe,
    style: _shims.dontSetMe,
    transform: _shims.dontSetMe
  });
  _defineProperty(DraggableCore$1, "defaultProps", {
    allowAnyClick: false,
    // by default only accept left click
    disabled: false,
    enableUserSelectHack: true,
    onStart: function() {
    },
    onDrag: function() {
    },
    onStop: function() {
    },
    onMouseDown: function() {
    },
    scale: 1
  });
  return DraggableCore;
}
var hasRequiredDraggable;
function requireDraggable() {
  if (hasRequiredDraggable) return Draggable$1;
  hasRequiredDraggable = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    Object.defineProperty(exports2, "DraggableCore", {
      enumerable: true,
      get: function() {
        return _DraggableCore.default;
      }
    });
    exports2.default = void 0;
    var React2 = _interopRequireWildcard(requireReact());
    var _propTypes = _interopRequireDefault(/* @__PURE__ */ requirePropTypes());
    var _reactDom = _interopRequireDefault(requireReactDom());
    var _clsx = _interopRequireDefault(require$$3);
    var _domFns = requireDomFns();
    var _positionFns = requirePositionFns();
    var _shims = requireShims();
    var _DraggableCore = _interopRequireDefault(requireDraggableCore());
    var _log = _interopRequireDefault(requireLog());
    function _interopRequireDefault(obj2) {
      return obj2 && obj2.__esModule ? obj2 : { default: obj2 };
    }
    function _getRequireWildcardCache(nodeInterop) {
      if (typeof WeakMap !== "function") return null;
      var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
      var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
      return (_getRequireWildcardCache = function(nodeInterop2) {
        return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
      })(nodeInterop);
    }
    function _interopRequireWildcard(obj2, nodeInterop) {
      if (obj2 && obj2.__esModule) {
        return obj2;
      }
      if (obj2 === null || typeof obj2 !== "object" && typeof obj2 !== "function") {
        return { default: obj2 };
      }
      var cache2 = _getRequireWildcardCache(nodeInterop);
      if (cache2 && cache2.has(obj2)) {
        return cache2.get(obj2);
      }
      var newObj = {};
      var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
      for (var key in obj2) {
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj2, key)) {
          var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj2, key) : null;
          if (desc && (desc.get || desc.set)) {
            Object.defineProperty(newObj, key, desc);
          } else {
            newObj[key] = obj2[key];
          }
        }
      }
      newObj.default = obj2;
      if (cache2) {
        cache2.set(obj2, newObj);
      }
      return newObj;
    }
    function _extends2() {
      _extends2 = Object.assign ? Object.assign.bind() : function(target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];
          for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }
        return target;
      };
      return _extends2.apply(this, arguments);
    }
    function _defineProperty(obj2, key, value) {
      key = _toPropertyKey(key);
      if (key in obj2) {
        Object.defineProperty(obj2, key, { value, enumerable: true, configurable: true, writable: true });
      } else {
        obj2[key] = value;
      }
      return obj2;
    }
    function _toPropertyKey(arg) {
      var key = _toPrimitive(arg, "string");
      return typeof key === "symbol" ? key : String(key);
    }
    function _toPrimitive(input, hint) {
      if (typeof input !== "object" || input === null) return input;
      var prim = input[Symbol.toPrimitive];
      if (prim !== void 0) {
        var res = prim.call(input, hint);
        if (typeof res !== "object") return res;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (hint === "string" ? String : Number)(input);
    }
    class Draggable2 extends React2.Component {
      // React 16.3+
      // Arity (props, state)
      static getDerivedStateFromProps(_ref, _ref2) {
        let {
          position: position2
        } = _ref;
        let {
          prevPropsPosition
        } = _ref2;
        if (position2 && (!prevPropsPosition || position2.x !== prevPropsPosition.x || position2.y !== prevPropsPosition.y)) {
          (0, _log.default)("Draggable: getDerivedStateFromProps %j", {
            position: position2,
            prevPropsPosition
          });
          return {
            x: position2.x,
            y: position2.y,
            prevPropsPosition: {
              ...position2
            }
          };
        }
        return null;
      }
      constructor(props) {
        super(props);
        _defineProperty(this, "onDragStart", (e2, coreData) => {
          (0, _log.default)("Draggable: onDragStart: %j", coreData);
          const shouldStart = this.props.onStart(e2, (0, _positionFns.createDraggableData)(this, coreData));
          if (shouldStart === false) return false;
          this.setState({
            dragging: true,
            dragged: true
          });
        });
        _defineProperty(this, "onDrag", (e2, coreData) => {
          if (!this.state.dragging) return false;
          (0, _log.default)("Draggable: onDrag: %j", coreData);
          const uiData = (0, _positionFns.createDraggableData)(this, coreData);
          const newState = {
            x: uiData.x,
            y: uiData.y,
            slackX: 0,
            slackY: 0
          };
          if (this.props.bounds) {
            const {
              x,
              y: y2
            } = newState;
            newState.x += this.state.slackX;
            newState.y += this.state.slackY;
            const [newStateX, newStateY] = (0, _positionFns.getBoundPosition)(this, newState.x, newState.y);
            newState.x = newStateX;
            newState.y = newStateY;
            newState.slackX = this.state.slackX + (x - newState.x);
            newState.slackY = this.state.slackY + (y2 - newState.y);
            uiData.x = newState.x;
            uiData.y = newState.y;
            uiData.deltaX = newState.x - this.state.x;
            uiData.deltaY = newState.y - this.state.y;
          }
          const shouldUpdate = this.props.onDrag(e2, uiData);
          if (shouldUpdate === false) return false;
          this.setState(newState);
        });
        _defineProperty(this, "onDragStop", (e2, coreData) => {
          if (!this.state.dragging) return false;
          const shouldContinue = this.props.onStop(e2, (0, _positionFns.createDraggableData)(this, coreData));
          if (shouldContinue === false) return false;
          (0, _log.default)("Draggable: onDragStop: %j", coreData);
          const newState = {
            dragging: false,
            slackX: 0,
            slackY: 0
          };
          const controlled = Boolean(this.props.position);
          if (controlled) {
            const {
              x,
              y: y2
            } = this.props.position;
            newState.x = x;
            newState.y = y2;
          }
          this.setState(newState);
        });
        this.state = {
          // Whether or not we are currently dragging.
          dragging: false,
          // Whether or not we have been dragged before.
          dragged: false,
          // Current transform x and y.
          x: props.position ? props.position.x : props.defaultPosition.x,
          y: props.position ? props.position.y : props.defaultPosition.y,
          prevPropsPosition: {
            ...props.position
          },
          // Used for compensating for out-of-bounds drags
          slackX: 0,
          slackY: 0,
          // Can only determine if SVG after mounting
          isElementSVG: false
        };
        if (props.position && !(props.onDrag || props.onStop)) {
          console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
        }
      }
      componentDidMount() {
        if (typeof window.SVGElement !== "undefined" && this.findDOMNode() instanceof window.SVGElement) {
          this.setState({
            isElementSVG: true
          });
        }
      }
      componentWillUnmount() {
        this.setState({
          dragging: false
        });
      }
      // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
      // the underlying DOM node ourselves. See the README for more information.
      findDOMNode() {
        var _this$props$nodeRef$c, _this$props;
        return (_this$props$nodeRef$c = (_this$props = this.props) === null || _this$props === void 0 || (_this$props = _this$props.nodeRef) === null || _this$props === void 0 ? void 0 : _this$props.current) !== null && _this$props$nodeRef$c !== void 0 ? _this$props$nodeRef$c : _reactDom.default.findDOMNode(this);
      }
      render() {
        const {
          axis,
          bounds,
          children,
          defaultPosition,
          defaultClassName,
          defaultClassNameDragging,
          defaultClassNameDragged,
          position: position2,
          positionOffset,
          scale,
          ...draggableCoreProps
        } = this.props;
        let style2 = {};
        let svgTransform = null;
        const controlled = Boolean(position2);
        const draggable = !controlled || this.state.dragging;
        const validPosition = position2 || defaultPosition;
        const transformOpts = {
          // Set left if horizontal drag is enabled
          x: (0, _positionFns.canDragX)(this) && draggable ? this.state.x : validPosition.x,
          // Set top if vertical drag is enabled
          y: (0, _positionFns.canDragY)(this) && draggable ? this.state.y : validPosition.y
        };
        if (this.state.isElementSVG) {
          svgTransform = (0, _domFns.createSVGTransform)(transformOpts, positionOffset);
        } else {
          style2 = (0, _domFns.createCSSTransform)(transformOpts, positionOffset);
        }
        const className = (0, _clsx.default)(children.props.className || "", defaultClassName, {
          [defaultClassNameDragging]: this.state.dragging,
          [defaultClassNameDragged]: this.state.dragged
        });
        return /* @__PURE__ */ React2.createElement(_DraggableCore.default, _extends2({}, draggableCoreProps, {
          onStart: this.onDragStart,
          onDrag: this.onDrag,
          onStop: this.onDragStop
        }), /* @__PURE__ */ React2.cloneElement(React2.Children.only(children), {
          className,
          style: {
            ...children.props.style,
            ...style2
          },
          transform: svgTransform
        }));
      }
    }
    exports2.default = Draggable2;
    _defineProperty(Draggable2, "displayName", "Draggable");
    _defineProperty(Draggable2, "propTypes", {
      // Accepts all props <DraggableCore> accepts.
      ..._DraggableCore.default.propTypes,
      /**
       * `axis` determines which axis the draggable can move.
       *
       *  Note that all callbacks will still return data as normal. This only
       *  controls flushing to the DOM.
       *
       * 'both' allows movement horizontally and vertically.
       * 'x' limits movement to horizontal axis.
       * 'y' limits movement to vertical axis.
       * 'none' limits all movement.
       *
       * Defaults to 'both'.
       */
      axis: _propTypes.default.oneOf(["both", "x", "y", "none"]),
      /**
       * `bounds` determines the range of movement available to the element.
       * Available values are:
       *
       * 'parent' restricts movement within the Draggable's parent node.
       *
       * Alternatively, pass an object with the following properties, all of which are optional:
       *
       * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
       *
       * All values are in px.
       *
       * Example:
       *
       * ```jsx
       *   let App = React.createClass({
       *       render: function () {
       *         return (
       *            <Draggable bounds={{right: 300, bottom: 300}}>
       *              <div>Content</div>
       *           </Draggable>
       *         );
       *       }
       *   });
       * ```
       */
      bounds: _propTypes.default.oneOfType([_propTypes.default.shape({
        left: _propTypes.default.number,
        right: _propTypes.default.number,
        top: _propTypes.default.number,
        bottom: _propTypes.default.number
      }), _propTypes.default.string, _propTypes.default.oneOf([false])]),
      defaultClassName: _propTypes.default.string,
      defaultClassNameDragging: _propTypes.default.string,
      defaultClassNameDragged: _propTypes.default.string,
      /**
       * `defaultPosition` specifies the x and y that the dragged item should start at
       *
       * Example:
       *
       * ```jsx
       *      let App = React.createClass({
       *          render: function () {
       *              return (
       *                  <Draggable defaultPosition={{x: 25, y: 25}}>
       *                      <div>I start with transformX: 25px and transformY: 25px;</div>
       *                  </Draggable>
       *              );
       *          }
       *      });
       * ```
       */
      defaultPosition: _propTypes.default.shape({
        x: _propTypes.default.number,
        y: _propTypes.default.number
      }),
      positionOffset: _propTypes.default.shape({
        x: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
        y: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string])
      }),
      /**
       * `position`, if present, defines the current position of the element.
       *
       *  This is similar to how form elements in React work - if no `position` is supplied, the component
       *  is uncontrolled.
       *
       * Example:
       *
       * ```jsx
       *      let App = React.createClass({
       *          render: function () {
       *              return (
       *                  <Draggable position={{x: 25, y: 25}}>
       *                      <div>I start with transformX: 25px and transformY: 25px;</div>
       *                  </Draggable>
       *              );
       *          }
       *      });
       * ```
       */
      position: _propTypes.default.shape({
        x: _propTypes.default.number,
        y: _propTypes.default.number
      }),
      /**
       * These properties should be defined on the child, not here.
       */
      className: _shims.dontSetMe,
      style: _shims.dontSetMe,
      transform: _shims.dontSetMe
    });
    _defineProperty(Draggable2, "defaultProps", {
      ..._DraggableCore.default.defaultProps,
      axis: "both",
      bounds: false,
      defaultClassName: "react-draggable",
      defaultClassNameDragging: "react-draggable-dragging",
      defaultClassNameDragged: "react-draggable-dragged",
      defaultPosition: {
        x: 0,
        y: 0
      },
      scale: 1
    });
  })(Draggable$1);
  return Draggable$1;
}
var hasRequiredCjs;
function requireCjs() {
  if (hasRequiredCjs) return cjs.exports;
  hasRequiredCjs = 1;
  const {
    default: Draggable2,
    DraggableCore: DraggableCore2
  } = requireDraggable();
  cjs.exports = Draggable2;
  cjs.exports.default = Draggable2;
  cjs.exports.DraggableCore = DraggableCore2;
  return cjs.exports;
}
var cjsExports = requireCjs();
const Draggable = /* @__PURE__ */ getDefaultExportFromCjs(cjsExports);
const Transition$2 = React.forwardRef(function Transition22(props, ref2) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Slide, { direction: "up", ref: ref2, ...props });
});
function PaperComponent$2(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Draggable, { cancel: '[class*="MuiDialogContent-root"]', children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { ...props }) });
}
const style = {
  position: "absolute",
  top: "50%",
  left: "50%",
  transform: "translate(-50%, -50%)",
  width: 400,
  bgcolor: "background.paper",
  boxShadow: 24,
  pt: 2,
  px: 4,
  pb: 3
};
function ChildModal(props) {
  const [open, setOpen] = reactExports.useState(true);
  reactExports.useEffect(() => {
    setOpen(true);
  }, [props.Path]);
  const handleClose = () => {
    setOpen(false);
  };
  async function handleCloseButton() {
    props.Cancel();
    setOpen(false);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Draggable, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { hideBackdrop: true, open, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { sx: { ...style, width: "20%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("h2", { id: "child-modal-title", children: "Подтверждение" }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { id: "child-modal-description", children: "Остановить процесс?" }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button$2,
      {
        size: "small",
        variant: "outlined",
        style: { textTransform: "none", marginRight: "10px" },
        onClick: handleCloseButton,
        children: "Да"
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", style: { textTransform: "none" }, onClick: handleClose, children: "Нет" })
  ] }) }) }) });
}
function ModalProgress(props) {
  const [open, setOpen] = reactExports.useState(true);
  const [activeStep, setActiveStep] = reactExports.useState(0);
  const [count, setCount] = reactExports.useState(0);
  const [data, setData] = reactExports.useState({});
  const [title, setTitle] = reactExports.useState();
  const [allSteps, setAllSteps] = reactExports.useState([]);
  const [prevToken, setPrevToken] = reactExports.useState("");
  const [textLoad, setTextLoad] = reactExports.useState("");
  const [currentLoad, setCurrentLoad] = reactExports.useState("Load");
  const dialogref = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (data.error) {
      const message = `Ошибка выполнения операции на сервере: ${data.error.content}`;
      const renderDefaultEl = document.getElementById("RenderDefault");
      const renderDefaultElRoot = renderDefaultEl.root || clientExports.createRoot(renderDefaultEl);
      renderDefaultEl.root = renderDefaultElRoot;
      renderDefaultElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(ModalContainer, { dlgType: "Ошибка", content: message }));
    }
    tokenProcessing(data);
    if (dialogref.current) {
      dialogref.current.hideDialog = () => {
        var _a2;
        setOpen(false);
        const footerProcess = document.getElementById("footerProgress");
        const footerProcessRoot = footerProcess.root || clientExports.createRoot(footerProcess);
        footerProcess.root = footerProcessRoot;
        (_a2 = footerProcess == null ? void 0 : footerProcess.firstChild) == null ? void 0 : _a2.remove();
        footerProcessRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
      };
    }
  }, [data]);
  reactExports.useEffect(() => {
    tokenProcessing(props.Json);
    openDialog();
    setActiveStep(0);
    setCurrentLoad("Load");
    setTextLoad("");
  }, [props.Json]);
  function setCharAt(str, index2, chr) {
    if (index2 > str.length - 1) return str;
    return str.substring(0, index2) + chr + str.substring(index2 + 1);
  }
  async function emptyRequest(requestID, load) {
    const data2 = { Result: "" };
    smetaAxios.post("ResumeRequest", data2, {
      prefix: Prefixes.default,
      params: { RequestID: requestID, WSM: "1" },
      loadMask: load ? load : false
    }).then((res) => {
      setData(res);
    });
  }
  const normalise = (value, max2) => (Number(value) - 0) * 100 / (Number(max2) - 0);
  async function tokenProcessing(json) {
    if (json.Break !== void 0) {
      const returnSmth = [];
      const token2 = json.Token;
      const requestID = json.Params.RequestID;
      if (token2 === "ShowProgressDialog") {
        let sectionsArray, section;
        const sections = json.Params.Sections;
        const title2 = json.Params.Title;
        if (sections !== void 0) {
          sectionsArray = sections.split(",");
          for (const value of Object.values(sectionsArray)) {
            let fixedSection = value;
            section = value;
            for (const [key, value2] of Object.entries(section)) {
              if (value2 === section[Number(key) + 1] && value2 === '"') {
                fixedSection = setCharAt(fixedSection, Number(key), "");
              }
            }
            if (fixedSection[0] === '"' && fixedSection[fixedSection.length - 1] === '"') {
              fixedSection = setCharAt(fixedSection, 0, "");
              fixedSection = setCharAt(fixedSection, fixedSection.length - 1, "");
            }
            returnSmth.push(fixedSection);
          }
        }
        setOpen(true);
        setAllSteps(returnSmth);
        setTitle(title2);
        setPrevToken(token2);
        emptyRequest(requestID);
      } else if (token2 === "SetProgressSection") {
        let index2 = Number(json.Params.Index);
        if (isNaN(index2)) index2 = 0;
        setActiveStep(index2);
        setPrevToken(token2);
        emptyRequest(requestID);
      } else if (token2 === "StepProgress") {
        let index2 = json.Params.Index;
        if (isNaN(index2)) index2 = 0;
        const max2 = json.Params.Count;
        setCount(normalise(index2, max2));
        setPrevToken(token2);
        emptyRequest(requestID);
      } else if (token2 === "SetProgressLabel") {
        const text = json.Params.Text;
        if (prevToken === "StepProgress") {
          setCurrentLoad("Mix");
          setTextLoad(text);
        } else if (prevToken === "SetProgressSection" || prevToken === "SetProgressLabel" || prevToken === "ShowProgressDialog") {
          setTextLoad(text);
          setCurrentLoad("Text");
        }
        setPrevToken(token2);
        emptyRequest(requestID);
      } else if (token2 === "HideProgressDialog") {
        setPrevToken(token2);
        setOpen(false);
        const renderModalSubEl = document.getElementById("RenderModalSub");
        const renderModalSubElRoot = renderModalSubEl.root || clientExports.createRoot(renderModalSubEl);
        renderModalSubEl.root = renderModalSubElRoot;
        renderModalSubElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
        emptyRequest(requestID, true);
      } else if (token2 === "ClearOutPut") {
        emptyRequest(requestID);
      } else if (token2 === "OutPutText") {
        emptyRequest(requestID);
      } else {
        if (props.from) {
          tokenProcessingTest(json, {
            func: props.setReturnValue,
            from: props.from
          });
        } else {
          tokenProcessingTest(json, { func: setData, from: "ModalProgress" });
        }
      }
    } else {
      if (props.setReturnValue !== void 0 && !isEmptyObject(json)) {
        setOpen(false);
        if (props.from !== "Forms") {
          const footerProcessEl = document.getElementById("footerProgress");
          const footerProcessRoot = footerProcessEl.root || clientExports.createRoot(footerProcessEl);
          footerProcessEl.root = footerProcessRoot;
          footerProcessRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
          props.setReturnValue(json);
        } else if (props.from === "Forms") props.setReturnValue(json);
      }
    }
  }
  function renderCancelModal() {
    const renderModalSubEl = document.getElementById("RenderModalSub");
    const renderModalSubElRoot = renderModalSubEl.root || clientExports.createRoot(renderModalSubEl);
    renderModalSubEl.root = renderModalSubElRoot;
    renderModalSubElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(ChildModal, { Path: props.path, openIt: open, Cancel: cancelProgress }));
  }
  function openDialog() {
    if (props.open) {
      setOpen(true);
    }
  }
  function cancelProgress() {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "programs");
    params2.set("comand", "StopProcess");
    params2.set("smart", "1");
    params2.set("Path", props.path);
    const url = getUrlForRequest(params2);
    axios.post(url).then((resp) => {
      var _a2;
      setOpen(false);
      const footerProcess = document.getElementById("footerProgress");
      const footerProcessRoot = footerProcess.root || clientExports.createRoot(footerProcess);
      footerProcess.root = footerProcessRoot;
      (_a2 = footerProcess == null ? void 0 : footerProcess.firstChild) == null ? void 0 : _a2.remove();
      footerProcessRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
      if (resp.data.Params) {
        emptyRequest(resp.data.Params.RequestID);
      }
    });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Dialog,
    {
      disableEnforceFocus: true,
      maxWidth: "sm",
      id: "ProgressDialog" + props.Json.Params.RequestID,
      fullWidth: true,
      style: { overflow: "hidden", height: "100%" },
      open,
      ref: dialogref,
      TransitionComponent: Transition$2,
      keepMounted: true,
      PaperComponent: PaperComponent$2,
      sx: {
        "&.MuiDialog-container": {
          zIndex: 1e3 + CheckModalBackGrounds(dialogref.current)
        },
        zIndex: 1e3 + CheckModalBackGrounds(dialogref.current)
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { children: title }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { style: { paddingLeft: "35px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            style: { display: "block" },
            container: true,
            direction: "row",
            justifyContent: "space-evenly",
            alignItems: "center",
            spacing: 2,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, id: "Steps", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Stepper, { activeStep, orientation: "vertical", connector: /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}), children: allSteps.map((step) => /* @__PURE__ */ jsxRuntimeExports.jsx(Step, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(StepLabel, { children: step }) }, step)) }) })
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogActions, { style: { height: "60px", paddingRight: "4px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "center", alignItems: "center", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, style: { width: "78%", paddingRight: "26px", paddingTop: "4px" }, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: {}, children: currentLoad === "Text" || currentLoad === "Mix" ? textLoad : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                item: true,
                style: {
                  marginBottom: currentLoad === "Mix" ? "21px" : "01px"
                },
                children: currentLoad === "Load" || currentLoad === "Mix" ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                  LinearProgress,
                  {
                    variant: "determinate",
                    value: count,
                    sx: { ".MuiLinearProgress-bar": { transition: "none" } }
                  }
                ) : /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {})
              }
            )
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { paddingLeft: "20px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", style: { textTransform: "none" }, onClick: renderCancelModal, children: "Отмена" }) })
        ] }) })
      ]
    }
  ) });
}
var reactNativeMimeTypes = {};
const require$$0 = {
  "application/1d-interleaved-parityfec": { "source": "iana" },
  "application/3gpdash-qoe-report+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/3gpp-ims+xml": { "source": "iana", "compressible": true },
  "application/3gpphal+json": { "source": "iana", "compressible": true },
  "application/3gpphalforms+json": { "source": "iana", "compressible": true },
  "application/a2l": { "source": "iana" },
  "application/ace+cbor": { "source": "iana" },
  "application/activemessage": { "source": "iana" },
  "application/activity+json": { "source": "iana", "compressible": true },
  "application/alto-costmap+json": { "source": "iana", "compressible": true },
  "application/alto-costmapfilter+json": { "source": "iana", "compressible": true },
  "application/alto-directory+json": { "source": "iana", "compressible": true },
  "application/alto-endpointcost+json": { "source": "iana", "compressible": true },
  "application/alto-endpointcostparams+json": { "source": "iana", "compressible": true },
  "application/alto-endpointprop+json": { "source": "iana", "compressible": true },
  "application/alto-endpointpropparams+json": { "source": "iana", "compressible": true },
  "application/alto-error+json": { "source": "iana", "compressible": true },
  "application/alto-networkmap+json": { "source": "iana", "compressible": true },
  "application/alto-networkmapfilter+json": { "source": "iana", "compressible": true },
  "application/alto-updatestreamcontrol+json": { "source": "iana", "compressible": true },
  "application/alto-updatestreamparams+json": { "source": "iana", "compressible": true },
  "application/aml": { "source": "iana" },
  "application/andrew-inset": { "source": "iana", "extensions": ["ez"] },
  "application/applefile": { "source": "iana" },
  "application/applixware": { "source": "apache", "extensions": ["aw"] },
  "application/at+jwt": { "source": "iana" },
  "application/atf": { "source": "iana" },
  "application/atfx": { "source": "iana" },
  "application/atom+xml": { "source": "iana", "compressible": true, "extensions": ["atom"] },
  "application/atomcat+xml": { "source": "iana", "compressible": true, "extensions": ["atomcat"] },
  "application/atomdeleted+xml": { "source": "iana", "compressible": true, "extensions": ["atomdeleted"] },
  "application/atomicmail": { "source": "iana" },
  "application/atomsvc+xml": { "source": "iana", "compressible": true, "extensions": ["atomsvc"] },
  "application/atsc-dwd+xml": { "source": "iana", "compressible": true, "extensions": ["dwd"] },
  "application/atsc-dynamic-event-message": { "source": "iana" },
  "application/atsc-held+xml": { "source": "iana", "compressible": true, "extensions": ["held"] },
  "application/atsc-rdt+json": { "source": "iana", "compressible": true },
  "application/atsc-rsat+xml": { "source": "iana", "compressible": true, "extensions": ["rsat"] },
  "application/atxml": { "source": "iana" },
  "application/auth-policy+xml": { "source": "iana", "compressible": true },
  "application/bacnet-xdd+zip": { "source": "iana", "compressible": false },
  "application/batch-smtp": { "source": "iana" },
  "application/bdoc": { "compressible": false, "extensions": ["bdoc"] },
  "application/beep+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/calendar+json": { "source": "iana", "compressible": true },
  "application/calendar+xml": { "source": "iana", "compressible": true, "extensions": ["xcs"] },
  "application/call-completion": { "source": "iana" },
  "application/cals-1840": { "source": "iana" },
  "application/captive+json": { "source": "iana", "compressible": true },
  "application/cbor": { "source": "iana" },
  "application/cbor-seq": { "source": "iana" },
  "application/cccex": { "source": "iana" },
  "application/ccmp+xml": { "source": "iana", "compressible": true },
  "application/ccxml+xml": { "source": "iana", "compressible": true, "extensions": ["ccxml"] },
  "application/cdfx+xml": { "source": "iana", "compressible": true, "extensions": ["cdfx"] },
  "application/cdmi-capability": { "source": "iana", "extensions": ["cdmia"] },
  "application/cdmi-container": { "source": "iana", "extensions": ["cdmic"] },
  "application/cdmi-domain": { "source": "iana", "extensions": ["cdmid"] },
  "application/cdmi-object": { "source": "iana", "extensions": ["cdmio"] },
  "application/cdmi-queue": { "source": "iana", "extensions": ["cdmiq"] },
  "application/cdni": { "source": "iana" },
  "application/cea": { "source": "iana" },
  "application/cea-2018+xml": { "source": "iana", "compressible": true },
  "application/cellml+xml": { "source": "iana", "compressible": true },
  "application/cfw": { "source": "iana" },
  "application/city+json": { "source": "iana", "compressible": true },
  "application/clr": { "source": "iana" },
  "application/clue+xml": { "source": "iana", "compressible": true },
  "application/clue_info+xml": { "source": "iana", "compressible": true },
  "application/cms": { "source": "iana" },
  "application/cnrp+xml": { "source": "iana", "compressible": true },
  "application/coap-group+json": { "source": "iana", "compressible": true },
  "application/coap-payload": { "source": "iana" },
  "application/commonground": { "source": "iana" },
  "application/conference-info+xml": { "source": "iana", "compressible": true },
  "application/cose": { "source": "iana" },
  "application/cose-key": { "source": "iana" },
  "application/cose-key-set": { "source": "iana" },
  "application/cpl+xml": { "source": "iana", "compressible": true, "extensions": ["cpl"] },
  "application/csrattrs": { "source": "iana" },
  "application/csta+xml": { "source": "iana", "compressible": true },
  "application/cstadata+xml": { "source": "iana", "compressible": true },
  "application/csvm+json": { "source": "iana", "compressible": true },
  "application/cu-seeme": { "source": "apache", "extensions": ["cu"] },
  "application/cwt": { "source": "iana" },
  "application/cybercash": { "source": "iana" },
  "application/dart": { "compressible": true },
  "application/dash+xml": { "source": "iana", "compressible": true, "extensions": ["mpd"] },
  "application/dash-patch+xml": { "source": "iana", "compressible": true, "extensions": ["mpp"] },
  "application/dashdelta": { "source": "iana" },
  "application/davmount+xml": { "source": "iana", "compressible": true, "extensions": ["davmount"] },
  "application/dca-rft": { "source": "iana" },
  "application/dcd": { "source": "iana" },
  "application/dec-dx": { "source": "iana" },
  "application/dialog-info+xml": { "source": "iana", "compressible": true },
  "application/dicom": { "source": "iana" },
  "application/dicom+json": { "source": "iana", "compressible": true },
  "application/dicom+xml": { "source": "iana", "compressible": true },
  "application/dii": { "source": "iana" },
  "application/dit": { "source": "iana" },
  "application/dns": { "source": "iana" },
  "application/dns+json": { "source": "iana", "compressible": true },
  "application/dns-message": { "source": "iana" },
  "application/docbook+xml": { "source": "apache", "compressible": true, "extensions": ["dbk"] },
  "application/dots+cbor": { "source": "iana" },
  "application/dskpp+xml": { "source": "iana", "compressible": true },
  "application/dssc+der": { "source": "iana", "extensions": ["dssc"] },
  "application/dssc+xml": { "source": "iana", "compressible": true, "extensions": ["xdssc"] },
  "application/dvcs": { "source": "iana" },
  "application/ecmascript": { "source": "iana", "compressible": true, "extensions": ["es", "ecma"] },
  "application/edi-consent": { "source": "iana" },
  "application/edi-x12": { "source": "iana", "compressible": false },
  "application/edifact": { "source": "iana", "compressible": false },
  "application/efi": { "source": "iana" },
  "application/elm+json": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/elm+xml": { "source": "iana", "compressible": true },
  "application/emergencycalldata.cap+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/emergencycalldata.comment+xml": { "source": "iana", "compressible": true },
  "application/emergencycalldata.control+xml": { "source": "iana", "compressible": true },
  "application/emergencycalldata.deviceinfo+xml": { "source": "iana", "compressible": true },
  "application/emergencycalldata.ecall.msd": { "source": "iana" },
  "application/emergencycalldata.providerinfo+xml": { "source": "iana", "compressible": true },
  "application/emergencycalldata.serviceinfo+xml": { "source": "iana", "compressible": true },
  "application/emergencycalldata.subscriberinfo+xml": { "source": "iana", "compressible": true },
  "application/emergencycalldata.veds+xml": { "source": "iana", "compressible": true },
  "application/emma+xml": { "source": "iana", "compressible": true, "extensions": ["emma"] },
  "application/emotionml+xml": { "source": "iana", "compressible": true, "extensions": ["emotionml"] },
  "application/encaprtp": { "source": "iana" },
  "application/epp+xml": { "source": "iana", "compressible": true },
  "application/epub+zip": { "source": "iana", "compressible": false, "extensions": ["epub"] },
  "application/eshop": { "source": "iana" },
  "application/exi": { "source": "iana", "extensions": ["exi"] },
  "application/expect-ct-report+json": { "source": "iana", "compressible": true },
  "application/express": { "source": "iana", "extensions": ["exp"] },
  "application/fastinfoset": { "source": "iana" },
  "application/fastsoap": { "source": "iana" },
  "application/fdt+xml": { "source": "iana", "compressible": true, "extensions": ["fdt"] },
  "application/fhir+json": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/fhir+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/fido.trusted-apps+json": { "compressible": true },
  "application/fits": { "source": "iana" },
  "application/flexfec": { "source": "iana" },
  "application/font-sfnt": { "source": "iana" },
  "application/font-tdpfr": { "source": "iana", "extensions": ["pfr"] },
  "application/font-woff": { "source": "iana", "compressible": false },
  "application/framework-attributes+xml": { "source": "iana", "compressible": true },
  "application/geo+json": { "source": "iana", "compressible": true, "extensions": ["geojson"] },
  "application/geo+json-seq": { "source": "iana" },
  "application/geopackage+sqlite3": { "source": "iana" },
  "application/geoxacml+xml": { "source": "iana", "compressible": true },
  "application/gltf-buffer": { "source": "iana" },
  "application/gml+xml": { "source": "iana", "compressible": true, "extensions": ["gml"] },
  "application/gpx+xml": { "source": "apache", "compressible": true, "extensions": ["gpx"] },
  "application/gxf": { "source": "apache", "extensions": ["gxf"] },
  "application/gzip": { "source": "iana", "compressible": false, "extensions": ["gz"] },
  "application/h224": { "source": "iana" },
  "application/held+xml": { "source": "iana", "compressible": true },
  "application/hjson": { "extensions": ["hjson"] },
  "application/http": { "source": "iana" },
  "application/hyperstudio": { "source": "iana", "extensions": ["stk"] },
  "application/ibe-key-request+xml": { "source": "iana", "compressible": true },
  "application/ibe-pkg-reply+xml": { "source": "iana", "compressible": true },
  "application/ibe-pp-data": { "source": "iana" },
  "application/iges": { "source": "iana" },
  "application/im-iscomposing+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/index": { "source": "iana" },
  "application/index.cmd": { "source": "iana" },
  "application/index.obj": { "source": "iana" },
  "application/index.response": { "source": "iana" },
  "application/index.vnd": { "source": "iana" },
  "application/inkml+xml": { "source": "iana", "compressible": true, "extensions": ["ink", "inkml"] },
  "application/iotp": { "source": "iana" },
  "application/ipfix": { "source": "iana", "extensions": ["ipfix"] },
  "application/ipp": { "source": "iana" },
  "application/isup": { "source": "iana" },
  "application/its+xml": { "source": "iana", "compressible": true, "extensions": ["its"] },
  "application/java-archive": { "source": "apache", "compressible": false, "extensions": ["jar", "war", "ear"] },
  "application/java-serialized-object": { "source": "apache", "compressible": false, "extensions": ["ser"] },
  "application/java-vm": { "source": "apache", "compressible": false, "extensions": ["class"] },
  "application/javascript": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["js", "mjs"] },
  "application/jf2feed+json": { "source": "iana", "compressible": true },
  "application/jose": { "source": "iana" },
  "application/jose+json": { "source": "iana", "compressible": true },
  "application/jrd+json": { "source": "iana", "compressible": true },
  "application/jscalendar+json": { "source": "iana", "compressible": true },
  "application/json": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["json", "map"] },
  "application/json-patch+json": { "source": "iana", "compressible": true },
  "application/json-seq": { "source": "iana" },
  "application/json5": { "extensions": ["json5"] },
  "application/jsonml+json": { "source": "apache", "compressible": true, "extensions": ["jsonml"] },
  "application/jwk+json": { "source": "iana", "compressible": true },
  "application/jwk-set+json": { "source": "iana", "compressible": true },
  "application/jwt": { "source": "iana" },
  "application/kpml-request+xml": { "source": "iana", "compressible": true },
  "application/kpml-response+xml": { "source": "iana", "compressible": true },
  "application/ld+json": { "source": "iana", "compressible": true, "extensions": ["jsonld"] },
  "application/lgr+xml": { "source": "iana", "compressible": true, "extensions": ["lgr"] },
  "application/link-format": { "source": "iana" },
  "application/load-control+xml": { "source": "iana", "compressible": true },
  "application/lost+xml": { "source": "iana", "compressible": true, "extensions": ["lostxml"] },
  "application/lostsync+xml": { "source": "iana", "compressible": true },
  "application/lpf+zip": { "source": "iana", "compressible": false },
  "application/lxf": { "source": "iana" },
  "application/mac-binhex40": { "source": "iana", "extensions": ["hqx"] },
  "application/mac-compactpro": { "source": "apache", "extensions": ["cpt"] },
  "application/macwriteii": { "source": "iana" },
  "application/mads+xml": { "source": "iana", "compressible": true, "extensions": ["mads"] },
  "application/manifest+json": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["webmanifest"] },
  "application/marc": { "source": "iana", "extensions": ["mrc"] },
  "application/marcxml+xml": { "source": "iana", "compressible": true, "extensions": ["mrcx"] },
  "application/mathematica": { "source": "iana", "extensions": ["ma", "nb", "mb"] },
  "application/mathml+xml": { "source": "iana", "compressible": true, "extensions": ["mathml"] },
  "application/mathml-content+xml": { "source": "iana", "compressible": true },
  "application/mathml-presentation+xml": { "source": "iana", "compressible": true },
  "application/mbms-associated-procedure-description+xml": { "source": "iana", "compressible": true },
  "application/mbms-deregister+xml": { "source": "iana", "compressible": true },
  "application/mbms-envelope+xml": { "source": "iana", "compressible": true },
  "application/mbms-msk+xml": { "source": "iana", "compressible": true },
  "application/mbms-msk-response+xml": { "source": "iana", "compressible": true },
  "application/mbms-protection-description+xml": { "source": "iana", "compressible": true },
  "application/mbms-reception-report+xml": { "source": "iana", "compressible": true },
  "application/mbms-register+xml": { "source": "iana", "compressible": true },
  "application/mbms-register-response+xml": { "source": "iana", "compressible": true },
  "application/mbms-schedule+xml": { "source": "iana", "compressible": true },
  "application/mbms-user-service-description+xml": { "source": "iana", "compressible": true },
  "application/mbox": { "source": "iana", "extensions": ["mbox"] },
  "application/media-policy-dataset+xml": { "source": "iana", "compressible": true, "extensions": ["mpf"] },
  "application/media_control+xml": { "source": "iana", "compressible": true },
  "application/mediaservercontrol+xml": { "source": "iana", "compressible": true, "extensions": ["mscml"] },
  "application/merge-patch+json": { "source": "iana", "compressible": true },
  "application/metalink+xml": { "source": "apache", "compressible": true, "extensions": ["metalink"] },
  "application/metalink4+xml": { "source": "iana", "compressible": true, "extensions": ["meta4"] },
  "application/mets+xml": { "source": "iana", "compressible": true, "extensions": ["mets"] },
  "application/mf4": { "source": "iana" },
  "application/mikey": { "source": "iana" },
  "application/mipc": { "source": "iana" },
  "application/missing-blocks+cbor-seq": { "source": "iana" },
  "application/mmt-aei+xml": { "source": "iana", "compressible": true, "extensions": ["maei"] },
  "application/mmt-usd+xml": { "source": "iana", "compressible": true, "extensions": ["musd"] },
  "application/mods+xml": { "source": "iana", "compressible": true, "extensions": ["mods"] },
  "application/moss-keys": { "source": "iana" },
  "application/moss-signature": { "source": "iana" },
  "application/mosskey-data": { "source": "iana" },
  "application/mosskey-request": { "source": "iana" },
  "application/mp21": { "source": "iana", "extensions": ["m21", "mp21"] },
  "application/mp4": { "source": "iana", "extensions": ["mp4s", "m4p"] },
  "application/mpeg4-generic": { "source": "iana" },
  "application/mpeg4-iod": { "source": "iana" },
  "application/mpeg4-iod-xmt": { "source": "iana" },
  "application/mrb-consumer+xml": { "source": "iana", "compressible": true },
  "application/mrb-publish+xml": { "source": "iana", "compressible": true },
  "application/msc-ivr+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/msc-mixer+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/msword": { "source": "iana", "compressible": false, "extensions": ["doc", "dot"] },
  "application/mud+json": { "source": "iana", "compressible": true },
  "application/multipart-core": { "source": "iana" },
  "application/mxf": { "source": "iana", "extensions": ["mxf"] },
  "application/n-quads": { "source": "iana", "extensions": ["nq"] },
  "application/n-triples": { "source": "iana", "extensions": ["nt"] },
  "application/nasdata": { "source": "iana" },
  "application/news-checkgroups": { "source": "iana", "charset": "US-ASCII" },
  "application/news-groupinfo": { "source": "iana", "charset": "US-ASCII" },
  "application/news-transmission": { "source": "iana" },
  "application/nlsml+xml": { "source": "iana", "compressible": true },
  "application/node": { "source": "iana", "extensions": ["cjs"] },
  "application/nss": { "source": "iana" },
  "application/oauth-authz-req+jwt": { "source": "iana" },
  "application/oblivious-dns-message": { "source": "iana" },
  "application/ocsp-request": { "source": "iana" },
  "application/ocsp-response": { "source": "iana" },
  "application/octet-stream": { "source": "iana", "compressible": false, "extensions": ["bin", "dms", "lrf", "mar", "so", "dist", "distz", "pkg", "bpk", "dump", "elc", "deploy", "exe", "dll", "deb", "dmg", "iso", "img", "msi", "msp", "msm", "buffer"] },
  "application/oda": { "source": "iana", "extensions": ["oda"] },
  "application/odm+xml": { "source": "iana", "compressible": true },
  "application/odx": { "source": "iana" },
  "application/oebps-package+xml": { "source": "iana", "compressible": true, "extensions": ["opf"] },
  "application/ogg": { "source": "iana", "compressible": false, "extensions": ["ogx"] },
  "application/omdoc+xml": { "source": "apache", "compressible": true, "extensions": ["omdoc"] },
  "application/onenote": { "source": "apache", "extensions": ["onetoc", "onetoc2", "onetmp", "onepkg"] },
  "application/opc-nodeset+xml": { "source": "iana", "compressible": true },
  "application/oscore": { "source": "iana" },
  "application/oxps": { "source": "iana", "extensions": ["oxps"] },
  "application/p21": { "source": "iana" },
  "application/p21+zip": { "source": "iana", "compressible": false },
  "application/p2p-overlay+xml": { "source": "iana", "compressible": true, "extensions": ["relo"] },
  "application/parityfec": { "source": "iana" },
  "application/passport": { "source": "iana" },
  "application/patch-ops-error+xml": { "source": "iana", "compressible": true, "extensions": ["xer"] },
  "application/pdf": { "source": "iana", "compressible": false, "extensions": ["pdf"] },
  "application/pdx": { "source": "iana" },
  "application/pem-certificate-chain": { "source": "iana" },
  "application/pgp-encrypted": { "source": "iana", "compressible": false, "extensions": ["pgp"] },
  "application/pgp-keys": { "source": "iana", "extensions": ["asc"] },
  "application/pgp-signature": { "source": "iana", "extensions": ["asc", "sig"] },
  "application/pics-rules": { "source": "apache", "extensions": ["prf"] },
  "application/pidf+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/pidf-diff+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/pkcs10": { "source": "iana", "extensions": ["p10"] },
  "application/pkcs12": { "source": "iana" },
  "application/pkcs7-mime": { "source": "iana", "extensions": ["p7m", "p7c"] },
  "application/pkcs7-signature": { "source": "iana", "extensions": ["p7s"] },
  "application/pkcs8": { "source": "iana", "extensions": ["p8"] },
  "application/pkcs8-encrypted": { "source": "iana" },
  "application/pkix-attr-cert": { "source": "iana", "extensions": ["ac"] },
  "application/pkix-cert": { "source": "iana", "extensions": ["cer"] },
  "application/pkix-crl": { "source": "iana", "extensions": ["crl"] },
  "application/pkix-pkipath": { "source": "iana", "extensions": ["pkipath"] },
  "application/pkixcmp": { "source": "iana", "extensions": ["pki"] },
  "application/pls+xml": { "source": "iana", "compressible": true, "extensions": ["pls"] },
  "application/poc-settings+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/postscript": { "source": "iana", "compressible": true, "extensions": ["ai", "eps", "ps"] },
  "application/ppsp-tracker+json": { "source": "iana", "compressible": true },
  "application/problem+json": { "source": "iana", "compressible": true },
  "application/problem+xml": { "source": "iana", "compressible": true },
  "application/provenance+xml": { "source": "iana", "compressible": true, "extensions": ["provx"] },
  "application/prs.alvestrand.titrax-sheet": { "source": "iana" },
  "application/prs.cww": { "source": "iana", "extensions": ["cww"] },
  "application/prs.cyn": { "source": "iana", "charset": "7-BIT" },
  "application/prs.hpub+zip": { "source": "iana", "compressible": false },
  "application/prs.nprend": { "source": "iana" },
  "application/prs.plucker": { "source": "iana" },
  "application/prs.rdf-xml-crypt": { "source": "iana" },
  "application/prs.xsf+xml": { "source": "iana", "compressible": true },
  "application/pskc+xml": { "source": "iana", "compressible": true, "extensions": ["pskcxml"] },
  "application/pvd+json": { "source": "iana", "compressible": true },
  "application/qsig": { "source": "iana" },
  "application/raml+yaml": { "compressible": true, "extensions": ["raml"] },
  "application/raptorfec": { "source": "iana" },
  "application/rdap+json": { "source": "iana", "compressible": true },
  "application/rdf+xml": { "source": "iana", "compressible": true, "extensions": ["rdf", "owl"] },
  "application/reginfo+xml": { "source": "iana", "compressible": true, "extensions": ["rif"] },
  "application/relax-ng-compact-syntax": { "source": "iana", "extensions": ["rnc"] },
  "application/remote-printing": { "source": "iana" },
  "application/reputon+json": { "source": "iana", "compressible": true },
  "application/resource-lists+xml": { "source": "iana", "compressible": true, "extensions": ["rl"] },
  "application/resource-lists-diff+xml": { "source": "iana", "compressible": true, "extensions": ["rld"] },
  "application/rfc+xml": { "source": "iana", "compressible": true },
  "application/riscos": { "source": "iana" },
  "application/rlmi+xml": { "source": "iana", "compressible": true },
  "application/rls-services+xml": { "source": "iana", "compressible": true, "extensions": ["rs"] },
  "application/route-apd+xml": { "source": "iana", "compressible": true, "extensions": ["rapd"] },
  "application/route-s-tsid+xml": { "source": "iana", "compressible": true, "extensions": ["sls"] },
  "application/route-usd+xml": { "source": "iana", "compressible": true, "extensions": ["rusd"] },
  "application/rpki-ghostbusters": { "source": "iana", "extensions": ["gbr"] },
  "application/rpki-manifest": { "source": "iana", "extensions": ["mft"] },
  "application/rpki-publication": { "source": "iana" },
  "application/rpki-roa": { "source": "iana", "extensions": ["roa"] },
  "application/rpki-updown": { "source": "iana" },
  "application/rsd+xml": { "source": "apache", "compressible": true, "extensions": ["rsd"] },
  "application/rss+xml": { "source": "apache", "compressible": true, "extensions": ["rss"] },
  "application/rtf": { "source": "iana", "compressible": true, "extensions": ["rtf"] },
  "application/rtploopback": { "source": "iana" },
  "application/rtx": { "source": "iana" },
  "application/samlassertion+xml": { "source": "iana", "compressible": true },
  "application/samlmetadata+xml": { "source": "iana", "compressible": true },
  "application/sarif+json": { "source": "iana", "compressible": true },
  "application/sarif-external-properties+json": { "source": "iana", "compressible": true },
  "application/sbe": { "source": "iana" },
  "application/sbml+xml": { "source": "iana", "compressible": true, "extensions": ["sbml"] },
  "application/scaip+xml": { "source": "iana", "compressible": true },
  "application/scim+json": { "source": "iana", "compressible": true },
  "application/scvp-cv-request": { "source": "iana", "extensions": ["scq"] },
  "application/scvp-cv-response": { "source": "iana", "extensions": ["scs"] },
  "application/scvp-vp-request": { "source": "iana", "extensions": ["spq"] },
  "application/scvp-vp-response": { "source": "iana", "extensions": ["spp"] },
  "application/sdp": { "source": "iana", "extensions": ["sdp"] },
  "application/secevent+jwt": { "source": "iana" },
  "application/senml+cbor": { "source": "iana" },
  "application/senml+json": { "source": "iana", "compressible": true },
  "application/senml+xml": { "source": "iana", "compressible": true, "extensions": ["senmlx"] },
  "application/senml-etch+cbor": { "source": "iana" },
  "application/senml-etch+json": { "source": "iana", "compressible": true },
  "application/senml-exi": { "source": "iana" },
  "application/sensml+cbor": { "source": "iana" },
  "application/sensml+json": { "source": "iana", "compressible": true },
  "application/sensml+xml": { "source": "iana", "compressible": true, "extensions": ["sensmlx"] },
  "application/sensml-exi": { "source": "iana" },
  "application/sep+xml": { "source": "iana", "compressible": true },
  "application/sep-exi": { "source": "iana" },
  "application/session-info": { "source": "iana" },
  "application/set-payment": { "source": "iana" },
  "application/set-payment-initiation": { "source": "iana", "extensions": ["setpay"] },
  "application/set-registration": { "source": "iana" },
  "application/set-registration-initiation": { "source": "iana", "extensions": ["setreg"] },
  "application/sgml": { "source": "iana" },
  "application/sgml-open-catalog": { "source": "iana" },
  "application/shf+xml": { "source": "iana", "compressible": true, "extensions": ["shf"] },
  "application/sieve": { "source": "iana", "extensions": ["siv", "sieve"] },
  "application/simple-filter+xml": { "source": "iana", "compressible": true },
  "application/simple-message-summary": { "source": "iana" },
  "application/simplesymbolcontainer": { "source": "iana" },
  "application/sipc": { "source": "iana" },
  "application/slate": { "source": "iana" },
  "application/smil": { "source": "iana" },
  "application/smil+xml": { "source": "iana", "compressible": true, "extensions": ["smi", "smil"] },
  "application/smpte336m": { "source": "iana" },
  "application/soap+fastinfoset": { "source": "iana" },
  "application/soap+xml": { "source": "iana", "compressible": true },
  "application/sparql-query": { "source": "iana", "extensions": ["rq"] },
  "application/sparql-results+xml": { "source": "iana", "compressible": true, "extensions": ["srx"] },
  "application/spdx+json": { "source": "iana", "compressible": true },
  "application/spirits-event+xml": { "source": "iana", "compressible": true },
  "application/sql": { "source": "iana" },
  "application/srgs": { "source": "iana", "extensions": ["gram"] },
  "application/srgs+xml": { "source": "iana", "compressible": true, "extensions": ["grxml"] },
  "application/sru+xml": { "source": "iana", "compressible": true, "extensions": ["sru"] },
  "application/ssdl+xml": { "source": "apache", "compressible": true, "extensions": ["ssdl"] },
  "application/ssml+xml": { "source": "iana", "compressible": true, "extensions": ["ssml"] },
  "application/stix+json": { "source": "iana", "compressible": true },
  "application/swid+xml": { "source": "iana", "compressible": true, "extensions": ["swidtag"] },
  "application/tamp-apex-update": { "source": "iana" },
  "application/tamp-apex-update-confirm": { "source": "iana" },
  "application/tamp-community-update": { "source": "iana" },
  "application/tamp-community-update-confirm": { "source": "iana" },
  "application/tamp-error": { "source": "iana" },
  "application/tamp-sequence-adjust": { "source": "iana" },
  "application/tamp-sequence-adjust-confirm": { "source": "iana" },
  "application/tamp-status-query": { "source": "iana" },
  "application/tamp-status-response": { "source": "iana" },
  "application/tamp-update": { "source": "iana" },
  "application/tamp-update-confirm": { "source": "iana" },
  "application/tar": { "compressible": true },
  "application/taxii+json": { "source": "iana", "compressible": true },
  "application/td+json": { "source": "iana", "compressible": true },
  "application/tei+xml": { "source": "iana", "compressible": true, "extensions": ["tei", "teicorpus"] },
  "application/tetra_isi": { "source": "iana" },
  "application/thraud+xml": { "source": "iana", "compressible": true, "extensions": ["tfi"] },
  "application/timestamp-query": { "source": "iana" },
  "application/timestamp-reply": { "source": "iana" },
  "application/timestamped-data": { "source": "iana", "extensions": ["tsd"] },
  "application/tlsrpt+gzip": { "source": "iana" },
  "application/tlsrpt+json": { "source": "iana", "compressible": true },
  "application/tnauthlist": { "source": "iana" },
  "application/token-introspection+jwt": { "source": "iana" },
  "application/toml": { "compressible": true, "extensions": ["toml"] },
  "application/trickle-ice-sdpfrag": { "source": "iana" },
  "application/trig": { "source": "iana", "extensions": ["trig"] },
  "application/ttml+xml": { "source": "iana", "compressible": true, "extensions": ["ttml"] },
  "application/tve-trigger": { "source": "iana" },
  "application/tzif": { "source": "iana" },
  "application/tzif-leap": { "source": "iana" },
  "application/ubjson": { "compressible": false, "extensions": ["ubj"] },
  "application/ulpfec": { "source": "iana" },
  "application/urc-grpsheet+xml": { "source": "iana", "compressible": true },
  "application/urc-ressheet+xml": { "source": "iana", "compressible": true, "extensions": ["rsheet"] },
  "application/urc-targetdesc+xml": { "source": "iana", "compressible": true, "extensions": ["td"] },
  "application/urc-uisocketdesc+xml": { "source": "iana", "compressible": true },
  "application/vcard+json": { "source": "iana", "compressible": true },
  "application/vcard+xml": { "source": "iana", "compressible": true },
  "application/vemmi": { "source": "iana" },
  "application/vividence.scriptfile": { "source": "apache" },
  "application/vnd.1000minds.decision-model+xml": { "source": "iana", "compressible": true, "extensions": ["1km"] },
  "application/vnd.3gpp-prose+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp-prose-pc3ch+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp-v2x-local-service-information": { "source": "iana" },
  "application/vnd.3gpp.5gnas": { "source": "iana" },
  "application/vnd.3gpp.access-transfer-events+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.bsf+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.gmop+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.gtpc": { "source": "iana" },
  "application/vnd.3gpp.interworking-data": { "source": "iana" },
  "application/vnd.3gpp.lpp": { "source": "iana" },
  "application/vnd.3gpp.mc-signalling-ear": { "source": "iana" },
  "application/vnd.3gpp.mcdata-affiliation-command+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcdata-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcdata-payload": { "source": "iana" },
  "application/vnd.3gpp.mcdata-service-config+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcdata-signalling": { "source": "iana" },
  "application/vnd.3gpp.mcdata-ue-config+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcdata-user-profile+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-affiliation-command+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-floor-request+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-location-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-mbms-usage-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-service-config+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-signed+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-ue-config+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-ue-init-config+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcptt-user-profile+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-affiliation-command+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-affiliation-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-location-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-mbms-usage-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-service-config+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-transmission-request+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-ue-config+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mcvideo-user-profile+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.mid-call+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.ngap": { "source": "iana" },
  "application/vnd.3gpp.pfcp": { "source": "iana" },
  "application/vnd.3gpp.pic-bw-large": { "source": "iana", "extensions": ["plb"] },
  "application/vnd.3gpp.pic-bw-small": { "source": "iana", "extensions": ["psb"] },
  "application/vnd.3gpp.pic-bw-var": { "source": "iana", "extensions": ["pvb"] },
  "application/vnd.3gpp.s1ap": { "source": "iana" },
  "application/vnd.3gpp.sms": { "source": "iana" },
  "application/vnd.3gpp.sms+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.srvcc-ext+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.srvcc-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.state-and-event-info+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp.ussd+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp2.bcmcsinfo+xml": { "source": "iana", "compressible": true },
  "application/vnd.3gpp2.sms": { "source": "iana" },
  "application/vnd.3gpp2.tcap": { "source": "iana", "extensions": ["tcap"] },
  "application/vnd.3lightssoftware.imagescal": { "source": "iana" },
  "application/vnd.3m.post-it-notes": { "source": "iana", "extensions": ["pwn"] },
  "application/vnd.accpac.simply.aso": { "source": "iana", "extensions": ["aso"] },
  "application/vnd.accpac.simply.imp": { "source": "iana", "extensions": ["imp"] },
  "application/vnd.acucobol": { "source": "iana", "extensions": ["acu"] },
  "application/vnd.acucorp": { "source": "iana", "extensions": ["atc", "acutc"] },
  "application/vnd.adobe.air-application-installer-package+zip": { "source": "apache", "compressible": false, "extensions": ["air"] },
  "application/vnd.adobe.flash.movie": { "source": "iana" },
  "application/vnd.adobe.formscentral.fcdt": { "source": "iana", "extensions": ["fcdt"] },
  "application/vnd.adobe.fxp": { "source": "iana", "extensions": ["fxp", "fxpl"] },
  "application/vnd.adobe.partial-upload": { "source": "iana" },
  "application/vnd.adobe.xdp+xml": { "source": "iana", "compressible": true, "extensions": ["xdp"] },
  "application/vnd.adobe.xfdf": { "source": "iana", "extensions": ["xfdf"] },
  "application/vnd.aether.imp": { "source": "iana" },
  "application/vnd.afpc.afplinedata": { "source": "iana" },
  "application/vnd.afpc.afplinedata-pagedef": { "source": "iana" },
  "application/vnd.afpc.cmoca-cmresource": { "source": "iana" },
  "application/vnd.afpc.foca-charset": { "source": "iana" },
  "application/vnd.afpc.foca-codedfont": { "source": "iana" },
  "application/vnd.afpc.foca-codepage": { "source": "iana" },
  "application/vnd.afpc.modca": { "source": "iana" },
  "application/vnd.afpc.modca-cmtable": { "source": "iana" },
  "application/vnd.afpc.modca-formdef": { "source": "iana" },
  "application/vnd.afpc.modca-mediummap": { "source": "iana" },
  "application/vnd.afpc.modca-objectcontainer": { "source": "iana" },
  "application/vnd.afpc.modca-overlay": { "source": "iana" },
  "application/vnd.afpc.modca-pagesegment": { "source": "iana" },
  "application/vnd.age": { "source": "iana", "extensions": ["age"] },
  "application/vnd.ah-barcode": { "source": "iana" },
  "application/vnd.ahead.space": { "source": "iana", "extensions": ["ahead"] },
  "application/vnd.airzip.filesecure.azf": { "source": "iana", "extensions": ["azf"] },
  "application/vnd.airzip.filesecure.azs": { "source": "iana", "extensions": ["azs"] },
  "application/vnd.amadeus+json": { "source": "iana", "compressible": true },
  "application/vnd.amazon.ebook": { "source": "apache", "extensions": ["azw"] },
  "application/vnd.amazon.mobi8-ebook": { "source": "iana" },
  "application/vnd.americandynamics.acc": { "source": "iana", "extensions": ["acc"] },
  "application/vnd.amiga.ami": { "source": "iana", "extensions": ["ami"] },
  "application/vnd.amundsen.maze+xml": { "source": "iana", "compressible": true },
  "application/vnd.android.ota": { "source": "iana" },
  "application/vnd.android.package-archive": { "source": "apache", "compressible": false, "extensions": ["apk"] },
  "application/vnd.anki": { "source": "iana" },
  "application/vnd.anser-web-certificate-issue-initiation": { "source": "iana", "extensions": ["cii"] },
  "application/vnd.anser-web-funds-transfer-initiation": { "source": "apache", "extensions": ["fti"] },
  "application/vnd.antix.game-component": { "source": "iana", "extensions": ["atx"] },
  "application/vnd.apache.arrow.file": { "source": "iana" },
  "application/vnd.apache.arrow.stream": { "source": "iana" },
  "application/vnd.apache.thrift.binary": { "source": "iana" },
  "application/vnd.apache.thrift.compact": { "source": "iana" },
  "application/vnd.apache.thrift.json": { "source": "iana" },
  "application/vnd.api+json": { "source": "iana", "compressible": true },
  "application/vnd.aplextor.warrp+json": { "source": "iana", "compressible": true },
  "application/vnd.apothekende.reservation+json": { "source": "iana", "compressible": true },
  "application/vnd.apple.installer+xml": { "source": "iana", "compressible": true, "extensions": ["mpkg"] },
  "application/vnd.apple.keynote": { "source": "iana", "extensions": ["key"] },
  "application/vnd.apple.mpegurl": { "source": "iana", "extensions": ["m3u8"] },
  "application/vnd.apple.numbers": { "source": "iana", "extensions": ["numbers"] },
  "application/vnd.apple.pages": { "source": "iana", "extensions": ["pages"] },
  "application/vnd.apple.pkpass": { "compressible": false, "extensions": ["pkpass"] },
  "application/vnd.arastra.swi": { "source": "iana" },
  "application/vnd.aristanetworks.swi": { "source": "iana", "extensions": ["swi"] },
  "application/vnd.artisan+json": { "source": "iana", "compressible": true },
  "application/vnd.artsquare": { "source": "iana" },
  "application/vnd.astraea-software.iota": { "source": "iana", "extensions": ["iota"] },
  "application/vnd.audiograph": { "source": "iana", "extensions": ["aep"] },
  "application/vnd.autopackage": { "source": "iana" },
  "application/vnd.avalon+json": { "source": "iana", "compressible": true },
  "application/vnd.avistar+xml": { "source": "iana", "compressible": true },
  "application/vnd.balsamiq.bmml+xml": { "source": "iana", "compressible": true, "extensions": ["bmml"] },
  "application/vnd.balsamiq.bmpr": { "source": "iana" },
  "application/vnd.banana-accounting": { "source": "iana" },
  "application/vnd.bbf.usp.error": { "source": "iana" },
  "application/vnd.bbf.usp.msg": { "source": "iana" },
  "application/vnd.bbf.usp.msg+json": { "source": "iana", "compressible": true },
  "application/vnd.bekitzur-stech+json": { "source": "iana", "compressible": true },
  "application/vnd.bint.med-content": { "source": "iana" },
  "application/vnd.biopax.rdf+xml": { "source": "iana", "compressible": true },
  "application/vnd.blink-idb-value-wrapper": { "source": "iana" },
  "application/vnd.blueice.multipass": { "source": "iana", "extensions": ["mpm"] },
  "application/vnd.bluetooth.ep.oob": { "source": "iana" },
  "application/vnd.bluetooth.le.oob": { "source": "iana" },
  "application/vnd.bmi": { "source": "iana", "extensions": ["bmi"] },
  "application/vnd.bpf": { "source": "iana" },
  "application/vnd.bpf3": { "source": "iana" },
  "application/vnd.businessobjects": { "source": "iana", "extensions": ["rep"] },
  "application/vnd.byu.uapi+json": { "source": "iana", "compressible": true },
  "application/vnd.cab-jscript": { "source": "iana" },
  "application/vnd.canon-cpdl": { "source": "iana" },
  "application/vnd.canon-lips": { "source": "iana" },
  "application/vnd.capasystems-pg+json": { "source": "iana", "compressible": true },
  "application/vnd.cendio.thinlinc.clientconf": { "source": "iana" },
  "application/vnd.century-systems.tcp_stream": { "source": "iana" },
  "application/vnd.chemdraw+xml": { "source": "iana", "compressible": true, "extensions": ["cdxml"] },
  "application/vnd.chess-pgn": { "source": "iana" },
  "application/vnd.chipnuts.karaoke-mmd": { "source": "iana", "extensions": ["mmd"] },
  "application/vnd.ciedi": { "source": "iana" },
  "application/vnd.cinderella": { "source": "iana", "extensions": ["cdy"] },
  "application/vnd.cirpack.isdn-ext": { "source": "iana" },
  "application/vnd.citationstyles.style+xml": { "source": "iana", "compressible": true, "extensions": ["csl"] },
  "application/vnd.claymore": { "source": "iana", "extensions": ["cla"] },
  "application/vnd.cloanto.rp9": { "source": "iana", "extensions": ["rp9"] },
  "application/vnd.clonk.c4group": { "source": "iana", "extensions": ["c4g", "c4d", "c4f", "c4p", "c4u"] },
  "application/vnd.cluetrust.cartomobile-config": { "source": "iana", "extensions": ["c11amc"] },
  "application/vnd.cluetrust.cartomobile-config-pkg": { "source": "iana", "extensions": ["c11amz"] },
  "application/vnd.coffeescript": { "source": "iana" },
  "application/vnd.collabio.xodocuments.document": { "source": "iana" },
  "application/vnd.collabio.xodocuments.document-template": { "source": "iana" },
  "application/vnd.collabio.xodocuments.presentation": { "source": "iana" },
  "application/vnd.collabio.xodocuments.presentation-template": { "source": "iana" },
  "application/vnd.collabio.xodocuments.spreadsheet": { "source": "iana" },
  "application/vnd.collabio.xodocuments.spreadsheet-template": { "source": "iana" },
  "application/vnd.collection+json": { "source": "iana", "compressible": true },
  "application/vnd.collection.doc+json": { "source": "iana", "compressible": true },
  "application/vnd.collection.next+json": { "source": "iana", "compressible": true },
  "application/vnd.comicbook+zip": { "source": "iana", "compressible": false },
  "application/vnd.comicbook-rar": { "source": "iana" },
  "application/vnd.commerce-battelle": { "source": "iana" },
  "application/vnd.commonspace": { "source": "iana", "extensions": ["csp"] },
  "application/vnd.contact.cmsg": { "source": "iana", "extensions": ["cdbcmsg"] },
  "application/vnd.coreos.ignition+json": { "source": "iana", "compressible": true },
  "application/vnd.cosmocaller": { "source": "iana", "extensions": ["cmc"] },
  "application/vnd.crick.clicker": { "source": "iana", "extensions": ["clkx"] },
  "application/vnd.crick.clicker.keyboard": { "source": "iana", "extensions": ["clkk"] },
  "application/vnd.crick.clicker.palette": { "source": "iana", "extensions": ["clkp"] },
  "application/vnd.crick.clicker.template": { "source": "iana", "extensions": ["clkt"] },
  "application/vnd.crick.clicker.wordbank": { "source": "iana", "extensions": ["clkw"] },
  "application/vnd.criticaltools.wbs+xml": { "source": "iana", "compressible": true, "extensions": ["wbs"] },
  "application/vnd.cryptii.pipe+json": { "source": "iana", "compressible": true },
  "application/vnd.crypto-shade-file": { "source": "iana" },
  "application/vnd.cryptomator.encrypted": { "source": "iana" },
  "application/vnd.cryptomator.vault": { "source": "iana" },
  "application/vnd.ctc-posml": { "source": "iana", "extensions": ["pml"] },
  "application/vnd.ctct.ws+xml": { "source": "iana", "compressible": true },
  "application/vnd.cups-pdf": { "source": "iana" },
  "application/vnd.cups-postscript": { "source": "iana" },
  "application/vnd.cups-ppd": { "source": "iana", "extensions": ["ppd"] },
  "application/vnd.cups-raster": { "source": "iana" },
  "application/vnd.cups-raw": { "source": "iana" },
  "application/vnd.curl": { "source": "iana" },
  "application/vnd.curl.car": { "source": "apache", "extensions": ["car"] },
  "application/vnd.curl.pcurl": { "source": "apache", "extensions": ["pcurl"] },
  "application/vnd.cyan.dean.root+xml": { "source": "iana", "compressible": true },
  "application/vnd.cybank": { "source": "iana" },
  "application/vnd.cyclonedx+json": { "source": "iana", "compressible": true },
  "application/vnd.cyclonedx+xml": { "source": "iana", "compressible": true },
  "application/vnd.d2l.coursepackage1p0+zip": { "source": "iana", "compressible": false },
  "application/vnd.d3m-dataset": { "source": "iana" },
  "application/vnd.d3m-problem": { "source": "iana" },
  "application/vnd.dart": { "source": "iana", "compressible": true, "extensions": ["dart"] },
  "application/vnd.data-vision.rdz": { "source": "iana", "extensions": ["rdz"] },
  "application/vnd.datapackage+json": { "source": "iana", "compressible": true },
  "application/vnd.dataresource+json": { "source": "iana", "compressible": true },
  "application/vnd.dbf": { "source": "iana", "extensions": ["dbf"] },
  "application/vnd.debian.binary-package": { "source": "iana" },
  "application/vnd.dece.data": { "source": "iana", "extensions": ["uvf", "uvvf", "uvd", "uvvd"] },
  "application/vnd.dece.ttml+xml": { "source": "iana", "compressible": true, "extensions": ["uvt", "uvvt"] },
  "application/vnd.dece.unspecified": { "source": "iana", "extensions": ["uvx", "uvvx"] },
  "application/vnd.dece.zip": { "source": "iana", "extensions": ["uvz", "uvvz"] },
  "application/vnd.denovo.fcselayout-link": { "source": "iana", "extensions": ["fe_launch"] },
  "application/vnd.desmume.movie": { "source": "iana" },
  "application/vnd.dir-bi.plate-dl-nosuffix": { "source": "iana" },
  "application/vnd.dm.delegation+xml": { "source": "iana", "compressible": true },
  "application/vnd.dna": { "source": "iana", "extensions": ["dna"] },
  "application/vnd.document+json": { "source": "iana", "compressible": true },
  "application/vnd.dolby.mlp": { "source": "apache", "extensions": ["mlp"] },
  "application/vnd.dolby.mobile.1": { "source": "iana" },
  "application/vnd.dolby.mobile.2": { "source": "iana" },
  "application/vnd.doremir.scorecloud-binary-document": { "source": "iana" },
  "application/vnd.dpgraph": { "source": "iana", "extensions": ["dpg"] },
  "application/vnd.dreamfactory": { "source": "iana", "extensions": ["dfac"] },
  "application/vnd.drive+json": { "source": "iana", "compressible": true },
  "application/vnd.ds-keypoint": { "source": "apache", "extensions": ["kpxx"] },
  "application/vnd.dtg.local": { "source": "iana" },
  "application/vnd.dtg.local.flash": { "source": "iana" },
  "application/vnd.dtg.local.html": { "source": "iana" },
  "application/vnd.dvb.ait": { "source": "iana", "extensions": ["ait"] },
  "application/vnd.dvb.dvbisl+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.dvbj": { "source": "iana" },
  "application/vnd.dvb.esgcontainer": { "source": "iana" },
  "application/vnd.dvb.ipdcdftnotifaccess": { "source": "iana" },
  "application/vnd.dvb.ipdcesgaccess": { "source": "iana" },
  "application/vnd.dvb.ipdcesgaccess2": { "source": "iana" },
  "application/vnd.dvb.ipdcesgpdd": { "source": "iana" },
  "application/vnd.dvb.ipdcroaming": { "source": "iana" },
  "application/vnd.dvb.iptv.alfec-base": { "source": "iana" },
  "application/vnd.dvb.iptv.alfec-enhancement": { "source": "iana" },
  "application/vnd.dvb.notif-aggregate-root+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.notif-container+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.notif-generic+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.notif-ia-msglist+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.notif-ia-registration-request+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.notif-ia-registration-response+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.notif-init+xml": { "source": "iana", "compressible": true },
  "application/vnd.dvb.pfr": { "source": "iana" },
  "application/vnd.dvb.service": { "source": "iana", "extensions": ["svc"] },
  "application/vnd.dxr": { "source": "iana" },
  "application/vnd.dynageo": { "source": "iana", "extensions": ["geo"] },
  "application/vnd.dzr": { "source": "iana" },
  "application/vnd.easykaraoke.cdgdownload": { "source": "iana" },
  "application/vnd.ecdis-update": { "source": "iana" },
  "application/vnd.ecip.rlp": { "source": "iana" },
  "application/vnd.eclipse.ditto+json": { "source": "iana", "compressible": true },
  "application/vnd.ecowin.chart": { "source": "iana", "extensions": ["mag"] },
  "application/vnd.ecowin.filerequest": { "source": "iana" },
  "application/vnd.ecowin.fileupdate": { "source": "iana" },
  "application/vnd.ecowin.series": { "source": "iana" },
  "application/vnd.ecowin.seriesrequest": { "source": "iana" },
  "application/vnd.ecowin.seriesupdate": { "source": "iana" },
  "application/vnd.efi.img": { "source": "iana" },
  "application/vnd.efi.iso": { "source": "iana" },
  "application/vnd.emclient.accessrequest+xml": { "source": "iana", "compressible": true },
  "application/vnd.enliven": { "source": "iana", "extensions": ["nml"] },
  "application/vnd.enphase.envoy": { "source": "iana" },
  "application/vnd.eprints.data+xml": { "source": "iana", "compressible": true },
  "application/vnd.epson.esf": { "source": "iana", "extensions": ["esf"] },
  "application/vnd.epson.msf": { "source": "iana", "extensions": ["msf"] },
  "application/vnd.epson.quickanime": { "source": "iana", "extensions": ["qam"] },
  "application/vnd.epson.salt": { "source": "iana", "extensions": ["slt"] },
  "application/vnd.epson.ssf": { "source": "iana", "extensions": ["ssf"] },
  "application/vnd.ericsson.quickcall": { "source": "iana" },
  "application/vnd.espass-espass+zip": { "source": "iana", "compressible": false },
  "application/vnd.eszigno3+xml": { "source": "iana", "compressible": true, "extensions": ["es3", "et3"] },
  "application/vnd.etsi.aoc+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.asic-e+zip": { "source": "iana", "compressible": false },
  "application/vnd.etsi.asic-s+zip": { "source": "iana", "compressible": false },
  "application/vnd.etsi.cug+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvcommand+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvdiscovery+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvprofile+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvsad-bc+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvsad-cod+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvsad-npvr+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvservice+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvsync+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.iptvueprofile+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.mcid+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.mheg5": { "source": "iana" },
  "application/vnd.etsi.overload-control-policy-dataset+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.pstn+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.sci+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.simservs+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.timestamp-token": { "source": "iana" },
  "application/vnd.etsi.tsl+xml": { "source": "iana", "compressible": true },
  "application/vnd.etsi.tsl.der": { "source": "iana" },
  "application/vnd.eu.kasparian.car+json": { "source": "iana", "compressible": true },
  "application/vnd.eudora.data": { "source": "iana" },
  "application/vnd.evolv.ecig.profile": { "source": "iana" },
  "application/vnd.evolv.ecig.settings": { "source": "iana" },
  "application/vnd.evolv.ecig.theme": { "source": "iana" },
  "application/vnd.exstream-empower+zip": { "source": "iana", "compressible": false },
  "application/vnd.exstream-package": { "source": "iana" },
  "application/vnd.ezpix-album": { "source": "iana", "extensions": ["ez2"] },
  "application/vnd.ezpix-package": { "source": "iana", "extensions": ["ez3"] },
  "application/vnd.f-secure.mobile": { "source": "iana" },
  "application/vnd.familysearch.gedcom+zip": { "source": "iana", "compressible": false },
  "application/vnd.fastcopy-disk-image": { "source": "iana" },
  "application/vnd.fdf": { "source": "iana", "extensions": ["fdf"] },
  "application/vnd.fdsn.mseed": { "source": "iana", "extensions": ["mseed"] },
  "application/vnd.fdsn.seed": { "source": "iana", "extensions": ["seed", "dataless"] },
  "application/vnd.ffsns": { "source": "iana" },
  "application/vnd.ficlab.flb+zip": { "source": "iana", "compressible": false },
  "application/vnd.filmit.zfc": { "source": "iana" },
  "application/vnd.fints": { "source": "iana" },
  "application/vnd.firemonkeys.cloudcell": { "source": "iana" },
  "application/vnd.flographit": { "source": "iana", "extensions": ["gph"] },
  "application/vnd.fluxtime.clip": { "source": "iana", "extensions": ["ftc"] },
  "application/vnd.font-fontforge-sfd": { "source": "iana" },
  "application/vnd.framemaker": { "source": "iana", "extensions": ["fm", "frame", "maker", "book"] },
  "application/vnd.frogans.fnc": { "source": "iana", "extensions": ["fnc"] },
  "application/vnd.frogans.ltf": { "source": "iana", "extensions": ["ltf"] },
  "application/vnd.fsc.weblaunch": { "source": "iana", "extensions": ["fsc"] },
  "application/vnd.fujifilm.fb.docuworks": { "source": "iana" },
  "application/vnd.fujifilm.fb.docuworks.binder": { "source": "iana" },
  "application/vnd.fujifilm.fb.docuworks.container": { "source": "iana" },
  "application/vnd.fujifilm.fb.jfi+xml": { "source": "iana", "compressible": true },
  "application/vnd.fujitsu.oasys": { "source": "iana", "extensions": ["oas"] },
  "application/vnd.fujitsu.oasys2": { "source": "iana", "extensions": ["oa2"] },
  "application/vnd.fujitsu.oasys3": { "source": "iana", "extensions": ["oa3"] },
  "application/vnd.fujitsu.oasysgp": { "source": "iana", "extensions": ["fg5"] },
  "application/vnd.fujitsu.oasysprs": { "source": "iana", "extensions": ["bh2"] },
  "application/vnd.fujixerox.art-ex": { "source": "iana" },
  "application/vnd.fujixerox.art4": { "source": "iana" },
  "application/vnd.fujixerox.ddd": { "source": "iana", "extensions": ["ddd"] },
  "application/vnd.fujixerox.docuworks": { "source": "iana", "extensions": ["xdw"] },
  "application/vnd.fujixerox.docuworks.binder": { "source": "iana", "extensions": ["xbd"] },
  "application/vnd.fujixerox.docuworks.container": { "source": "iana" },
  "application/vnd.fujixerox.hbpl": { "source": "iana" },
  "application/vnd.fut-misnet": { "source": "iana" },
  "application/vnd.futoin+cbor": { "source": "iana" },
  "application/vnd.futoin+json": { "source": "iana", "compressible": true },
  "application/vnd.fuzzysheet": { "source": "iana", "extensions": ["fzs"] },
  "application/vnd.genomatix.tuxedo": { "source": "iana", "extensions": ["txd"] },
  "application/vnd.gentics.grd+json": { "source": "iana", "compressible": true },
  "application/vnd.geo+json": { "source": "iana", "compressible": true },
  "application/vnd.geocube+xml": { "source": "iana", "compressible": true },
  "application/vnd.geogebra.file": { "source": "iana", "extensions": ["ggb"] },
  "application/vnd.geogebra.slides": { "source": "iana" },
  "application/vnd.geogebra.tool": { "source": "iana", "extensions": ["ggt"] },
  "application/vnd.geometry-explorer": { "source": "iana", "extensions": ["gex", "gre"] },
  "application/vnd.geonext": { "source": "iana", "extensions": ["gxt"] },
  "application/vnd.geoplan": { "source": "iana", "extensions": ["g2w"] },
  "application/vnd.geospace": { "source": "iana", "extensions": ["g3w"] },
  "application/vnd.gerber": { "source": "iana" },
  "application/vnd.globalplatform.card-content-mgt": { "source": "iana" },
  "application/vnd.globalplatform.card-content-mgt-response": { "source": "iana" },
  "application/vnd.gmx": { "source": "iana", "extensions": ["gmx"] },
  "application/vnd.google-apps.document": { "compressible": false, "extensions": ["gdoc"] },
  "application/vnd.google-apps.presentation": { "compressible": false, "extensions": ["gslides"] },
  "application/vnd.google-apps.spreadsheet": { "compressible": false, "extensions": ["gsheet"] },
  "application/vnd.google-earth.kml+xml": { "source": "iana", "compressible": true, "extensions": ["kml"] },
  "application/vnd.google-earth.kmz": { "source": "iana", "compressible": false, "extensions": ["kmz"] },
  "application/vnd.gov.sk.e-form+xml": { "source": "iana", "compressible": true },
  "application/vnd.gov.sk.e-form+zip": { "source": "iana", "compressible": false },
  "application/vnd.gov.sk.xmldatacontainer+xml": { "source": "iana", "compressible": true },
  "application/vnd.grafeq": { "source": "iana", "extensions": ["gqf", "gqs"] },
  "application/vnd.gridmp": { "source": "iana" },
  "application/vnd.groove-account": { "source": "iana", "extensions": ["gac"] },
  "application/vnd.groove-help": { "source": "iana", "extensions": ["ghf"] },
  "application/vnd.groove-identity-message": { "source": "iana", "extensions": ["gim"] },
  "application/vnd.groove-injector": { "source": "iana", "extensions": ["grv"] },
  "application/vnd.groove-tool-message": { "source": "iana", "extensions": ["gtm"] },
  "application/vnd.groove-tool-template": { "source": "iana", "extensions": ["tpl"] },
  "application/vnd.groove-vcard": { "source": "iana", "extensions": ["vcg"] },
  "application/vnd.hal+json": { "source": "iana", "compressible": true },
  "application/vnd.hal+xml": { "source": "iana", "compressible": true, "extensions": ["hal"] },
  "application/vnd.handheld-entertainment+xml": { "source": "iana", "compressible": true, "extensions": ["zmm"] },
  "application/vnd.hbci": { "source": "iana", "extensions": ["hbci"] },
  "application/vnd.hc+json": { "source": "iana", "compressible": true },
  "application/vnd.hcl-bireports": { "source": "iana" },
  "application/vnd.hdt": { "source": "iana" },
  "application/vnd.heroku+json": { "source": "iana", "compressible": true },
  "application/vnd.hhe.lesson-player": { "source": "iana", "extensions": ["les"] },
  "application/vnd.hl7cda+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/vnd.hl7v2+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/vnd.hp-hpgl": { "source": "iana", "extensions": ["hpgl"] },
  "application/vnd.hp-hpid": { "source": "iana", "extensions": ["hpid"] },
  "application/vnd.hp-hps": { "source": "iana", "extensions": ["hps"] },
  "application/vnd.hp-jlyt": { "source": "iana", "extensions": ["jlt"] },
  "application/vnd.hp-pcl": { "source": "iana", "extensions": ["pcl"] },
  "application/vnd.hp-pclxl": { "source": "iana", "extensions": ["pclxl"] },
  "application/vnd.httphone": { "source": "iana" },
  "application/vnd.hydrostatix.sof-data": { "source": "iana", "extensions": ["sfd-hdstx"] },
  "application/vnd.hyper+json": { "source": "iana", "compressible": true },
  "application/vnd.hyper-item+json": { "source": "iana", "compressible": true },
  "application/vnd.hyperdrive+json": { "source": "iana", "compressible": true },
  "application/vnd.hzn-3d-crossword": { "source": "iana" },
  "application/vnd.ibm.afplinedata": { "source": "iana" },
  "application/vnd.ibm.electronic-media": { "source": "iana" },
  "application/vnd.ibm.minipay": { "source": "iana", "extensions": ["mpy"] },
  "application/vnd.ibm.modcap": { "source": "iana", "extensions": ["afp", "listafp", "list3820"] },
  "application/vnd.ibm.rights-management": { "source": "iana", "extensions": ["irm"] },
  "application/vnd.ibm.secure-container": { "source": "iana", "extensions": ["sc"] },
  "application/vnd.iccprofile": { "source": "iana", "extensions": ["icc", "icm"] },
  "application/vnd.ieee.1905": { "source": "iana" },
  "application/vnd.igloader": { "source": "iana", "extensions": ["igl"] },
  "application/vnd.imagemeter.folder+zip": { "source": "iana", "compressible": false },
  "application/vnd.imagemeter.image+zip": { "source": "iana", "compressible": false },
  "application/vnd.immervision-ivp": { "source": "iana", "extensions": ["ivp"] },
  "application/vnd.immervision-ivu": { "source": "iana", "extensions": ["ivu"] },
  "application/vnd.ims.imsccv1p1": { "source": "iana" },
  "application/vnd.ims.imsccv1p2": { "source": "iana" },
  "application/vnd.ims.imsccv1p3": { "source": "iana" },
  "application/vnd.ims.lis.v2.result+json": { "source": "iana", "compressible": true },
  "application/vnd.ims.lti.v2.toolconsumerprofile+json": { "source": "iana", "compressible": true },
  "application/vnd.ims.lti.v2.toolproxy+json": { "source": "iana", "compressible": true },
  "application/vnd.ims.lti.v2.toolproxy.id+json": { "source": "iana", "compressible": true },
  "application/vnd.ims.lti.v2.toolsettings+json": { "source": "iana", "compressible": true },
  "application/vnd.ims.lti.v2.toolsettings.simple+json": { "source": "iana", "compressible": true },
  "application/vnd.informedcontrol.rms+xml": { "source": "iana", "compressible": true },
  "application/vnd.informix-visionary": { "source": "iana" },
  "application/vnd.infotech.project": { "source": "iana" },
  "application/vnd.infotech.project+xml": { "source": "iana", "compressible": true },
  "application/vnd.innopath.wamp.notification": { "source": "iana" },
  "application/vnd.insors.igm": { "source": "iana", "extensions": ["igm"] },
  "application/vnd.intercon.formnet": { "source": "iana", "extensions": ["xpw", "xpx"] },
  "application/vnd.intergeo": { "source": "iana", "extensions": ["i2g"] },
  "application/vnd.intertrust.digibox": { "source": "iana" },
  "application/vnd.intertrust.nncp": { "source": "iana" },
  "application/vnd.intu.qbo": { "source": "iana", "extensions": ["qbo"] },
  "application/vnd.intu.qfx": { "source": "iana", "extensions": ["qfx"] },
  "application/vnd.iptc.g2.catalogitem+xml": { "source": "iana", "compressible": true },
  "application/vnd.iptc.g2.conceptitem+xml": { "source": "iana", "compressible": true },
  "application/vnd.iptc.g2.knowledgeitem+xml": { "source": "iana", "compressible": true },
  "application/vnd.iptc.g2.newsitem+xml": { "source": "iana", "compressible": true },
  "application/vnd.iptc.g2.newsmessage+xml": { "source": "iana", "compressible": true },
  "application/vnd.iptc.g2.packageitem+xml": { "source": "iana", "compressible": true },
  "application/vnd.iptc.g2.planningitem+xml": { "source": "iana", "compressible": true },
  "application/vnd.ipunplugged.rcprofile": { "source": "iana", "extensions": ["rcprofile"] },
  "application/vnd.irepository.package+xml": { "source": "iana", "compressible": true, "extensions": ["irp"] },
  "application/vnd.is-xpr": { "source": "iana", "extensions": ["xpr"] },
  "application/vnd.isac.fcs": { "source": "iana", "extensions": ["fcs"] },
  "application/vnd.iso11783-10+zip": { "source": "iana", "compressible": false },
  "application/vnd.jam": { "source": "iana", "extensions": ["jam"] },
  "application/vnd.japannet-directory-service": { "source": "iana" },
  "application/vnd.japannet-jpnstore-wakeup": { "source": "iana" },
  "application/vnd.japannet-payment-wakeup": { "source": "iana" },
  "application/vnd.japannet-registration": { "source": "iana" },
  "application/vnd.japannet-registration-wakeup": { "source": "iana" },
  "application/vnd.japannet-setstore-wakeup": { "source": "iana" },
  "application/vnd.japannet-verification": { "source": "iana" },
  "application/vnd.japannet-verification-wakeup": { "source": "iana" },
  "application/vnd.jcp.javame.midlet-rms": { "source": "iana", "extensions": ["rms"] },
  "application/vnd.jisp": { "source": "iana", "extensions": ["jisp"] },
  "application/vnd.joost.joda-archive": { "source": "iana", "extensions": ["joda"] },
  "application/vnd.jsk.isdn-ngn": { "source": "iana" },
  "application/vnd.kahootz": { "source": "iana", "extensions": ["ktz", "ktr"] },
  "application/vnd.kde.karbon": { "source": "iana", "extensions": ["karbon"] },
  "application/vnd.kde.kchart": { "source": "iana", "extensions": ["chrt"] },
  "application/vnd.kde.kformula": { "source": "iana", "extensions": ["kfo"] },
  "application/vnd.kde.kivio": { "source": "iana", "extensions": ["flw"] },
  "application/vnd.kde.kontour": { "source": "iana", "extensions": ["kon"] },
  "application/vnd.kde.kpresenter": { "source": "iana", "extensions": ["kpr", "kpt"] },
  "application/vnd.kde.kspread": { "source": "iana", "extensions": ["ksp"] },
  "application/vnd.kde.kword": { "source": "iana", "extensions": ["kwd", "kwt"] },
  "application/vnd.kenameaapp": { "source": "iana", "extensions": ["htke"] },
  "application/vnd.kidspiration": { "source": "iana", "extensions": ["kia"] },
  "application/vnd.kinar": { "source": "iana", "extensions": ["kne", "knp"] },
  "application/vnd.koan": { "source": "iana", "extensions": ["skp", "skd", "skt", "skm"] },
  "application/vnd.kodak-descriptor": { "source": "iana", "extensions": ["sse"] },
  "application/vnd.las": { "source": "iana" },
  "application/vnd.las.las+json": { "source": "iana", "compressible": true },
  "application/vnd.las.las+xml": { "source": "iana", "compressible": true, "extensions": ["lasxml"] },
  "application/vnd.laszip": { "source": "iana" },
  "application/vnd.leap+json": { "source": "iana", "compressible": true },
  "application/vnd.liberty-request+xml": { "source": "iana", "compressible": true },
  "application/vnd.llamagraphics.life-balance.desktop": { "source": "iana", "extensions": ["lbd"] },
  "application/vnd.llamagraphics.life-balance.exchange+xml": { "source": "iana", "compressible": true, "extensions": ["lbe"] },
  "application/vnd.logipipe.circuit+zip": { "source": "iana", "compressible": false },
  "application/vnd.loom": { "source": "iana" },
  "application/vnd.lotus-1-2-3": { "source": "iana", "extensions": ["123"] },
  "application/vnd.lotus-approach": { "source": "iana", "extensions": ["apr"] },
  "application/vnd.lotus-freelance": { "source": "iana", "extensions": ["pre"] },
  "application/vnd.lotus-notes": { "source": "iana", "extensions": ["nsf"] },
  "application/vnd.lotus-organizer": { "source": "iana", "extensions": ["org"] },
  "application/vnd.lotus-screencam": { "source": "iana", "extensions": ["scm"] },
  "application/vnd.lotus-wordpro": { "source": "iana", "extensions": ["lwp"] },
  "application/vnd.macports.portpkg": { "source": "iana", "extensions": ["portpkg"] },
  "application/vnd.mapbox-vector-tile": { "source": "iana", "extensions": ["mvt"] },
  "application/vnd.marlin.drm.actiontoken+xml": { "source": "iana", "compressible": true },
  "application/vnd.marlin.drm.conftoken+xml": { "source": "iana", "compressible": true },
  "application/vnd.marlin.drm.license+xml": { "source": "iana", "compressible": true },
  "application/vnd.marlin.drm.mdcf": { "source": "iana" },
  "application/vnd.mason+json": { "source": "iana", "compressible": true },
  "application/vnd.maxar.archive.3tz+zip": { "source": "iana", "compressible": false },
  "application/vnd.maxmind.maxmind-db": { "source": "iana" },
  "application/vnd.mcd": { "source": "iana", "extensions": ["mcd"] },
  "application/vnd.medcalcdata": { "source": "iana", "extensions": ["mc1"] },
  "application/vnd.mediastation.cdkey": { "source": "iana", "extensions": ["cdkey"] },
  "application/vnd.meridian-slingshot": { "source": "iana" },
  "application/vnd.mfer": { "source": "iana", "extensions": ["mwf"] },
  "application/vnd.mfmp": { "source": "iana", "extensions": ["mfm"] },
  "application/vnd.micro+json": { "source": "iana", "compressible": true },
  "application/vnd.micrografx.flo": { "source": "iana", "extensions": ["flo"] },
  "application/vnd.micrografx.igx": { "source": "iana", "extensions": ["igx"] },
  "application/vnd.microsoft.portable-executable": { "source": "iana" },
  "application/vnd.microsoft.windows.thumbnail-cache": { "source": "iana" },
  "application/vnd.miele+json": { "source": "iana", "compressible": true },
  "application/vnd.mif": { "source": "iana", "extensions": ["mif"] },
  "application/vnd.minisoft-hp3000-save": { "source": "iana" },
  "application/vnd.mitsubishi.misty-guard.trustweb": { "source": "iana" },
  "application/vnd.mobius.daf": { "source": "iana", "extensions": ["daf"] },
  "application/vnd.mobius.dis": { "source": "iana", "extensions": ["dis"] },
  "application/vnd.mobius.mbk": { "source": "iana", "extensions": ["mbk"] },
  "application/vnd.mobius.mqy": { "source": "iana", "extensions": ["mqy"] },
  "application/vnd.mobius.msl": { "source": "iana", "extensions": ["msl"] },
  "application/vnd.mobius.plc": { "source": "iana", "extensions": ["plc"] },
  "application/vnd.mobius.txf": { "source": "iana", "extensions": ["txf"] },
  "application/vnd.mophun.application": { "source": "iana", "extensions": ["mpn"] },
  "application/vnd.mophun.certificate": { "source": "iana", "extensions": ["mpc"] },
  "application/vnd.motorola.flexsuite": { "source": "iana" },
  "application/vnd.motorola.flexsuite.adsi": { "source": "iana" },
  "application/vnd.motorola.flexsuite.fis": { "source": "iana" },
  "application/vnd.motorola.flexsuite.gotap": { "source": "iana" },
  "application/vnd.motorola.flexsuite.kmr": { "source": "iana" },
  "application/vnd.motorola.flexsuite.ttc": { "source": "iana" },
  "application/vnd.motorola.flexsuite.wem": { "source": "iana" },
  "application/vnd.motorola.iprm": { "source": "iana" },
  "application/vnd.mozilla.xul+xml": { "source": "iana", "compressible": true, "extensions": ["xul"] },
  "application/vnd.ms-3mfdocument": { "source": "iana" },
  "application/vnd.ms-artgalry": { "source": "iana", "extensions": ["cil"] },
  "application/vnd.ms-asf": { "source": "iana" },
  "application/vnd.ms-cab-compressed": { "source": "iana", "extensions": ["cab"] },
  "application/vnd.ms-color.iccprofile": { "source": "apache" },
  "application/vnd.ms-excel": { "source": "iana", "compressible": false, "extensions": ["xls", "xlm", "xla", "xlc", "xlt", "xlw"] },
  "application/vnd.ms-excel.addin.macroenabled.12": { "source": "iana", "extensions": ["xlam"] },
  "application/vnd.ms-excel.sheet.binary.macroenabled.12": { "source": "iana", "extensions": ["xlsb"] },
  "application/vnd.ms-excel.sheet.macroenabled.12": { "source": "iana", "extensions": ["xlsm"] },
  "application/vnd.ms-excel.template.macroenabled.12": { "source": "iana", "extensions": ["xltm"] },
  "application/vnd.ms-fontobject": { "source": "iana", "compressible": true, "extensions": ["eot"] },
  "application/vnd.ms-htmlhelp": { "source": "iana", "extensions": ["chm"] },
  "application/vnd.ms-ims": { "source": "iana", "extensions": ["ims"] },
  "application/vnd.ms-lrm": { "source": "iana", "extensions": ["lrm"] },
  "application/vnd.ms-office.activex+xml": { "source": "iana", "compressible": true },
  "application/vnd.ms-officetheme": { "source": "iana", "extensions": ["thmx"] },
  "application/vnd.ms-opentype": { "source": "apache", "compressible": true },
  "application/vnd.ms-outlook": { "compressible": false, "extensions": ["msg"] },
  "application/vnd.ms-package.obfuscated-opentype": { "source": "apache" },
  "application/vnd.ms-pki.seccat": { "source": "apache", "extensions": ["cat"] },
  "application/vnd.ms-pki.stl": { "source": "apache", "extensions": ["stl"] },
  "application/vnd.ms-playready.initiator+xml": { "source": "iana", "compressible": true },
  "application/vnd.ms-powerpoint": { "source": "iana", "compressible": false, "extensions": ["ppt", "pps", "pot"] },
  "application/vnd.ms-powerpoint.addin.macroenabled.12": { "source": "iana", "extensions": ["ppam"] },
  "application/vnd.ms-powerpoint.presentation.macroenabled.12": { "source": "iana", "extensions": ["pptm"] },
  "application/vnd.ms-powerpoint.slide.macroenabled.12": { "source": "iana", "extensions": ["sldm"] },
  "application/vnd.ms-powerpoint.slideshow.macroenabled.12": { "source": "iana", "extensions": ["ppsm"] },
  "application/vnd.ms-powerpoint.template.macroenabled.12": { "source": "iana", "extensions": ["potm"] },
  "application/vnd.ms-printdevicecapabilities+xml": { "source": "iana", "compressible": true },
  "application/vnd.ms-printing.printticket+xml": { "source": "apache", "compressible": true },
  "application/vnd.ms-printschematicket+xml": { "source": "iana", "compressible": true },
  "application/vnd.ms-project": { "source": "iana", "extensions": ["mpp", "mpt"] },
  "application/vnd.ms-tnef": { "source": "iana" },
  "application/vnd.ms-windows.devicepairing": { "source": "iana" },
  "application/vnd.ms-windows.nwprinting.oob": { "source": "iana" },
  "application/vnd.ms-windows.printerpairing": { "source": "iana" },
  "application/vnd.ms-windows.wsd.oob": { "source": "iana" },
  "application/vnd.ms-wmdrm.lic-chlg-req": { "source": "iana" },
  "application/vnd.ms-wmdrm.lic-resp": { "source": "iana" },
  "application/vnd.ms-wmdrm.meter-chlg-req": { "source": "iana" },
  "application/vnd.ms-wmdrm.meter-resp": { "source": "iana" },
  "application/vnd.ms-word.document.macroenabled.12": { "source": "iana", "extensions": ["docm"] },
  "application/vnd.ms-word.template.macroenabled.12": { "source": "iana", "extensions": ["dotm"] },
  "application/vnd.ms-works": { "source": "iana", "extensions": ["wps", "wks", "wcm", "wdb"] },
  "application/vnd.ms-wpl": { "source": "iana", "extensions": ["wpl"] },
  "application/vnd.ms-xpsdocument": { "source": "iana", "compressible": false, "extensions": ["xps"] },
  "application/vnd.msa-disk-image": { "source": "iana" },
  "application/vnd.mseq": { "source": "iana", "extensions": ["mseq"] },
  "application/vnd.msign": { "source": "iana" },
  "application/vnd.multiad.creator": { "source": "iana" },
  "application/vnd.multiad.creator.cif": { "source": "iana" },
  "application/vnd.music-niff": { "source": "iana" },
  "application/vnd.musician": { "source": "iana", "extensions": ["mus"] },
  "application/vnd.muvee.style": { "source": "iana", "extensions": ["msty"] },
  "application/vnd.mynfc": { "source": "iana", "extensions": ["taglet"] },
  "application/vnd.nacamar.ybrid+json": { "source": "iana", "compressible": true },
  "application/vnd.ncd.control": { "source": "iana" },
  "application/vnd.ncd.reference": { "source": "iana" },
  "application/vnd.nearst.inv+json": { "source": "iana", "compressible": true },
  "application/vnd.nebumind.line": { "source": "iana" },
  "application/vnd.nervana": { "source": "iana" },
  "application/vnd.netfpx": { "source": "iana" },
  "application/vnd.neurolanguage.nlu": { "source": "iana", "extensions": ["nlu"] },
  "application/vnd.nimn": { "source": "iana" },
  "application/vnd.nintendo.nitro.rom": { "source": "iana" },
  "application/vnd.nintendo.snes.rom": { "source": "iana" },
  "application/vnd.nitf": { "source": "iana", "extensions": ["ntf", "nitf"] },
  "application/vnd.noblenet-directory": { "source": "iana", "extensions": ["nnd"] },
  "application/vnd.noblenet-sealer": { "source": "iana", "extensions": ["nns"] },
  "application/vnd.noblenet-web": { "source": "iana", "extensions": ["nnw"] },
  "application/vnd.nokia.catalogs": { "source": "iana" },
  "application/vnd.nokia.conml+wbxml": { "source": "iana" },
  "application/vnd.nokia.conml+xml": { "source": "iana", "compressible": true },
  "application/vnd.nokia.iptv.config+xml": { "source": "iana", "compressible": true },
  "application/vnd.nokia.isds-radio-presets": { "source": "iana" },
  "application/vnd.nokia.landmark+wbxml": { "source": "iana" },
  "application/vnd.nokia.landmark+xml": { "source": "iana", "compressible": true },
  "application/vnd.nokia.landmarkcollection+xml": { "source": "iana", "compressible": true },
  "application/vnd.nokia.n-gage.ac+xml": { "source": "iana", "compressible": true, "extensions": ["ac"] },
  "application/vnd.nokia.n-gage.data": { "source": "iana", "extensions": ["ngdat"] },
  "application/vnd.nokia.n-gage.symbian.install": { "source": "iana", "extensions": ["n-gage"] },
  "application/vnd.nokia.ncd": { "source": "iana" },
  "application/vnd.nokia.pcd+wbxml": { "source": "iana" },
  "application/vnd.nokia.pcd+xml": { "source": "iana", "compressible": true },
  "application/vnd.nokia.radio-preset": { "source": "iana", "extensions": ["rpst"] },
  "application/vnd.nokia.radio-presets": { "source": "iana", "extensions": ["rpss"] },
  "application/vnd.novadigm.edm": { "source": "iana", "extensions": ["edm"] },
  "application/vnd.novadigm.edx": { "source": "iana", "extensions": ["edx"] },
  "application/vnd.novadigm.ext": { "source": "iana", "extensions": ["ext"] },
  "application/vnd.ntt-local.content-share": { "source": "iana" },
  "application/vnd.ntt-local.file-transfer": { "source": "iana" },
  "application/vnd.ntt-local.ogw_remote-access": { "source": "iana" },
  "application/vnd.ntt-local.sip-ta_remote": { "source": "iana" },
  "application/vnd.ntt-local.sip-ta_tcp_stream": { "source": "iana" },
  "application/vnd.oasis.opendocument.chart": { "source": "iana", "extensions": ["odc"] },
  "application/vnd.oasis.opendocument.chart-template": { "source": "iana", "extensions": ["otc"] },
  "application/vnd.oasis.opendocument.database": { "source": "iana", "extensions": ["odb"] },
  "application/vnd.oasis.opendocument.formula": { "source": "iana", "extensions": ["odf"] },
  "application/vnd.oasis.opendocument.formula-template": { "source": "iana", "extensions": ["odft"] },
  "application/vnd.oasis.opendocument.graphics": { "source": "iana", "compressible": false, "extensions": ["odg"] },
  "application/vnd.oasis.opendocument.graphics-template": { "source": "iana", "extensions": ["otg"] },
  "application/vnd.oasis.opendocument.image": { "source": "iana", "extensions": ["odi"] },
  "application/vnd.oasis.opendocument.image-template": { "source": "iana", "extensions": ["oti"] },
  "application/vnd.oasis.opendocument.presentation": { "source": "iana", "compressible": false, "extensions": ["odp"] },
  "application/vnd.oasis.opendocument.presentation-template": { "source": "iana", "extensions": ["otp"] },
  "application/vnd.oasis.opendocument.spreadsheet": { "source": "iana", "compressible": false, "extensions": ["ods"] },
  "application/vnd.oasis.opendocument.spreadsheet-template": { "source": "iana", "extensions": ["ots"] },
  "application/vnd.oasis.opendocument.text": { "source": "iana", "compressible": false, "extensions": ["odt"] },
  "application/vnd.oasis.opendocument.text-master": { "source": "iana", "extensions": ["odm"] },
  "application/vnd.oasis.opendocument.text-template": { "source": "iana", "extensions": ["ott"] },
  "application/vnd.oasis.opendocument.text-web": { "source": "iana", "extensions": ["oth"] },
  "application/vnd.obn": { "source": "iana" },
  "application/vnd.ocf+cbor": { "source": "iana" },
  "application/vnd.oci.image.manifest.v1+json": { "source": "iana", "compressible": true },
  "application/vnd.oftn.l10n+json": { "source": "iana", "compressible": true },
  "application/vnd.oipf.contentaccessdownload+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.contentaccessstreaming+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.cspg-hexbinary": { "source": "iana" },
  "application/vnd.oipf.dae.svg+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.dae.xhtml+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.mippvcontrolmessage+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.pae.gem": { "source": "iana" },
  "application/vnd.oipf.spdiscovery+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.spdlist+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.ueprofile+xml": { "source": "iana", "compressible": true },
  "application/vnd.oipf.userprofile+xml": { "source": "iana", "compressible": true },
  "application/vnd.olpc-sugar": { "source": "iana", "extensions": ["xo"] },
  "application/vnd.oma-scws-config": { "source": "iana" },
  "application/vnd.oma-scws-http-request": { "source": "iana" },
  "application/vnd.oma-scws-http-response": { "source": "iana" },
  "application/vnd.oma.bcast.associated-procedure-parameter+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.bcast.drm-trigger+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.bcast.imd+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.bcast.ltkm": { "source": "iana" },
  "application/vnd.oma.bcast.notification+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.bcast.provisioningtrigger": { "source": "iana" },
  "application/vnd.oma.bcast.sgboot": { "source": "iana" },
  "application/vnd.oma.bcast.sgdd+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.bcast.sgdu": { "source": "iana" },
  "application/vnd.oma.bcast.simple-symbol-container": { "source": "iana" },
  "application/vnd.oma.bcast.smartcard-trigger+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.bcast.sprov+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.bcast.stkm": { "source": "iana" },
  "application/vnd.oma.cab-address-book+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.cab-feature-handler+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.cab-pcc+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.cab-subs-invite+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.cab-user-prefs+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.dcd": { "source": "iana" },
  "application/vnd.oma.dcdc": { "source": "iana" },
  "application/vnd.oma.dd2+xml": { "source": "iana", "compressible": true, "extensions": ["dd2"] },
  "application/vnd.oma.drm.risd+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.group-usage-list+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.lwm2m+cbor": { "source": "iana" },
  "application/vnd.oma.lwm2m+json": { "source": "iana", "compressible": true },
  "application/vnd.oma.lwm2m+tlv": { "source": "iana" },
  "application/vnd.oma.pal+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.poc.detailed-progress-report+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.poc.final-report+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.poc.groups+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.poc.invocation-descriptor+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.poc.optimized-progress-report+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.push": { "source": "iana" },
  "application/vnd.oma.scidm.messages+xml": { "source": "iana", "compressible": true },
  "application/vnd.oma.xcap-directory+xml": { "source": "iana", "compressible": true },
  "application/vnd.omads-email+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/vnd.omads-file+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/vnd.omads-folder+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/vnd.omaloc-supl-init": { "source": "iana" },
  "application/vnd.onepager": { "source": "iana" },
  "application/vnd.onepagertamp": { "source": "iana" },
  "application/vnd.onepagertamx": { "source": "iana" },
  "application/vnd.onepagertat": { "source": "iana" },
  "application/vnd.onepagertatp": { "source": "iana" },
  "application/vnd.onepagertatx": { "source": "iana" },
  "application/vnd.openblox.game+xml": { "source": "iana", "compressible": true, "extensions": ["obgx"] },
  "application/vnd.openblox.game-binary": { "source": "iana" },
  "application/vnd.openeye.oeb": { "source": "iana" },
  "application/vnd.openofficeorg.extension": { "source": "apache", "extensions": ["oxt"] },
  "application/vnd.openstreetmap.data+xml": { "source": "iana", "compressible": true, "extensions": ["osm"] },
  "application/vnd.opentimestamps.ots": { "source": "iana" },
  "application/vnd.openxmlformats-officedocument.custom-properties+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.customxmlproperties+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.drawing+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.drawingml.chart+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.extended-properties+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.comments+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.presentation": { "source": "iana", "compressible": false, "extensions": ["pptx"] },
  "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.presprops+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.slide": { "source": "iana", "extensions": ["sldx"] },
  "application/vnd.openxmlformats-officedocument.presentationml.slide+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.slideshow": { "source": "iana", "extensions": ["ppsx"] },
  "application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.tags+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.template": { "source": "iana", "extensions": ["potx"] },
  "application/vnd.openxmlformats-officedocument.presentationml.template.main+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": { "source": "iana", "compressible": false, "extensions": ["xlsx"] },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.template": { "source": "iana", "extensions": ["xltx"] },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.theme+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.themeoverride+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.vmldrawing": { "source": "iana" },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": { "source": "iana", "compressible": false, "extensions": ["docx"] },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.template": { "source": "iana", "extensions": ["dotx"] },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-package.core-properties+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml": { "source": "iana", "compressible": true },
  "application/vnd.openxmlformats-package.relationships+xml": { "source": "iana", "compressible": true },
  "application/vnd.oracle.resource+json": { "source": "iana", "compressible": true },
  "application/vnd.orange.indata": { "source": "iana" },
  "application/vnd.osa.netdeploy": { "source": "iana" },
  "application/vnd.osgeo.mapguide.package": { "source": "iana", "extensions": ["mgp"] },
  "application/vnd.osgi.bundle": { "source": "iana" },
  "application/vnd.osgi.dp": { "source": "iana", "extensions": ["dp"] },
  "application/vnd.osgi.subsystem": { "source": "iana", "extensions": ["esa"] },
  "application/vnd.otps.ct-kip+xml": { "source": "iana", "compressible": true },
  "application/vnd.oxli.countgraph": { "source": "iana" },
  "application/vnd.pagerduty+json": { "source": "iana", "compressible": true },
  "application/vnd.palm": { "source": "iana", "extensions": ["pdb", "pqa", "oprc"] },
  "application/vnd.panoply": { "source": "iana" },
  "application/vnd.paos.xml": { "source": "iana" },
  "application/vnd.patentdive": { "source": "iana" },
  "application/vnd.patientecommsdoc": { "source": "iana" },
  "application/vnd.pawaafile": { "source": "iana", "extensions": ["paw"] },
  "application/vnd.pcos": { "source": "iana" },
  "application/vnd.pg.format": { "source": "iana", "extensions": ["str"] },
  "application/vnd.pg.osasli": { "source": "iana", "extensions": ["ei6"] },
  "application/vnd.piaccess.application-licence": { "source": "iana" },
  "application/vnd.picsel": { "source": "iana", "extensions": ["efif"] },
  "application/vnd.pmi.widget": { "source": "iana", "extensions": ["wg"] },
  "application/vnd.poc.group-advertisement+xml": { "source": "iana", "compressible": true },
  "application/vnd.pocketlearn": { "source": "iana", "extensions": ["plf"] },
  "application/vnd.powerbuilder6": { "source": "iana", "extensions": ["pbd"] },
  "application/vnd.powerbuilder6-s": { "source": "iana" },
  "application/vnd.powerbuilder7": { "source": "iana" },
  "application/vnd.powerbuilder7-s": { "source": "iana" },
  "application/vnd.powerbuilder75": { "source": "iana" },
  "application/vnd.powerbuilder75-s": { "source": "iana" },
  "application/vnd.preminet": { "source": "iana" },
  "application/vnd.previewsystems.box": { "source": "iana", "extensions": ["box"] },
  "application/vnd.proteus.magazine": { "source": "iana", "extensions": ["mgz"] },
  "application/vnd.psfs": { "source": "iana" },
  "application/vnd.publishare-delta-tree": { "source": "iana", "extensions": ["qps"] },
  "application/vnd.pvi.ptid1": { "source": "iana", "extensions": ["ptid"] },
  "application/vnd.pwg-multiplexed": { "source": "iana" },
  "application/vnd.pwg-xhtml-print+xml": { "source": "iana", "compressible": true },
  "application/vnd.qualcomm.brew-app-res": { "source": "iana" },
  "application/vnd.quarantainenet": { "source": "iana" },
  "application/vnd.quark.quarkxpress": { "source": "iana", "extensions": ["qxd", "qxt", "qwd", "qwt", "qxl", "qxb"] },
  "application/vnd.quobject-quoxdocument": { "source": "iana" },
  "application/vnd.radisys.moml+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-audit+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-audit-conf+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-audit-conn+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-audit-dialog+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-audit-stream+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-conf+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-dialog+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-dialog-base+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-dialog-fax-detect+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-dialog-fax-sendrecv+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-dialog-group+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-dialog-speech+xml": { "source": "iana", "compressible": true },
  "application/vnd.radisys.msml-dialog-transform+xml": { "source": "iana", "compressible": true },
  "application/vnd.rainstor.data": { "source": "iana" },
  "application/vnd.rapid": { "source": "iana" },
  "application/vnd.rar": { "source": "iana", "extensions": ["rar"] },
  "application/vnd.realvnc.bed": { "source": "iana", "extensions": ["bed"] },
  "application/vnd.recordare.musicxml": { "source": "iana", "extensions": ["mxl"] },
  "application/vnd.recordare.musicxml+xml": { "source": "iana", "compressible": true, "extensions": ["musicxml"] },
  "application/vnd.renlearn.rlprint": { "source": "iana" },
  "application/vnd.resilient.logic": { "source": "iana" },
  "application/vnd.restful+json": { "source": "iana", "compressible": true },
  "application/vnd.rig.cryptonote": { "source": "iana", "extensions": ["cryptonote"] },
  "application/vnd.rim.cod": { "source": "apache", "extensions": ["cod"] },
  "application/vnd.rn-realmedia": { "source": "apache", "extensions": ["rm"] },
  "application/vnd.rn-realmedia-vbr": { "source": "apache", "extensions": ["rmvb"] },
  "application/vnd.route66.link66+xml": { "source": "iana", "compressible": true, "extensions": ["link66"] },
  "application/vnd.rs-274x": { "source": "iana" },
  "application/vnd.ruckus.download": { "source": "iana" },
  "application/vnd.s3sms": { "source": "iana" },
  "application/vnd.sailingtracker.track": { "source": "iana", "extensions": ["st"] },
  "application/vnd.sar": { "source": "iana" },
  "application/vnd.sbm.cid": { "source": "iana" },
  "application/vnd.sbm.mid2": { "source": "iana" },
  "application/vnd.scribus": { "source": "iana" },
  "application/vnd.sealed.3df": { "source": "iana" },
  "application/vnd.sealed.csf": { "source": "iana" },
  "application/vnd.sealed.doc": { "source": "iana" },
  "application/vnd.sealed.eml": { "source": "iana" },
  "application/vnd.sealed.mht": { "source": "iana" },
  "application/vnd.sealed.net": { "source": "iana" },
  "application/vnd.sealed.ppt": { "source": "iana" },
  "application/vnd.sealed.tiff": { "source": "iana" },
  "application/vnd.sealed.xls": { "source": "iana" },
  "application/vnd.sealedmedia.softseal.html": { "source": "iana" },
  "application/vnd.sealedmedia.softseal.pdf": { "source": "iana" },
  "application/vnd.seemail": { "source": "iana", "extensions": ["see"] },
  "application/vnd.seis+json": { "source": "iana", "compressible": true },
  "application/vnd.sema": { "source": "iana", "extensions": ["sema"] },
  "application/vnd.semd": { "source": "iana", "extensions": ["semd"] },
  "application/vnd.semf": { "source": "iana", "extensions": ["semf"] },
  "application/vnd.shade-save-file": { "source": "iana" },
  "application/vnd.shana.informed.formdata": { "source": "iana", "extensions": ["ifm"] },
  "application/vnd.shana.informed.formtemplate": { "source": "iana", "extensions": ["itp"] },
  "application/vnd.shana.informed.interchange": { "source": "iana", "extensions": ["iif"] },
  "application/vnd.shana.informed.package": { "source": "iana", "extensions": ["ipk"] },
  "application/vnd.shootproof+json": { "source": "iana", "compressible": true },
  "application/vnd.shopkick+json": { "source": "iana", "compressible": true },
  "application/vnd.shp": { "source": "iana" },
  "application/vnd.shx": { "source": "iana" },
  "application/vnd.sigrok.session": { "source": "iana" },
  "application/vnd.simtech-mindmapper": { "source": "iana", "extensions": ["twd", "twds"] },
  "application/vnd.siren+json": { "source": "iana", "compressible": true },
  "application/vnd.smaf": { "source": "iana", "extensions": ["mmf"] },
  "application/vnd.smart.notebook": { "source": "iana" },
  "application/vnd.smart.teacher": { "source": "iana", "extensions": ["teacher"] },
  "application/vnd.snesdev-page-table": { "source": "iana" },
  "application/vnd.software602.filler.form+xml": { "source": "iana", "compressible": true, "extensions": ["fo"] },
  "application/vnd.software602.filler.form-xml-zip": { "source": "iana" },
  "application/vnd.solent.sdkm+xml": { "source": "iana", "compressible": true, "extensions": ["sdkm", "sdkd"] },
  "application/vnd.spotfire.dxp": { "source": "iana", "extensions": ["dxp"] },
  "application/vnd.spotfire.sfs": { "source": "iana", "extensions": ["sfs"] },
  "application/vnd.sqlite3": { "source": "iana" },
  "application/vnd.sss-cod": { "source": "iana" },
  "application/vnd.sss-dtf": { "source": "iana" },
  "application/vnd.sss-ntf": { "source": "iana" },
  "application/vnd.stardivision.calc": { "source": "apache", "extensions": ["sdc"] },
  "application/vnd.stardivision.draw": { "source": "apache", "extensions": ["sda"] },
  "application/vnd.stardivision.impress": { "source": "apache", "extensions": ["sdd"] },
  "application/vnd.stardivision.math": { "source": "apache", "extensions": ["smf"] },
  "application/vnd.stardivision.writer": { "source": "apache", "extensions": ["sdw", "vor"] },
  "application/vnd.stardivision.writer-global": { "source": "apache", "extensions": ["sgl"] },
  "application/vnd.stepmania.package": { "source": "iana", "extensions": ["smzip"] },
  "application/vnd.stepmania.stepchart": { "source": "iana", "extensions": ["sm"] },
  "application/vnd.street-stream": { "source": "iana" },
  "application/vnd.sun.wadl+xml": { "source": "iana", "compressible": true, "extensions": ["wadl"] },
  "application/vnd.sun.xml.calc": { "source": "apache", "extensions": ["sxc"] },
  "application/vnd.sun.xml.calc.template": { "source": "apache", "extensions": ["stc"] },
  "application/vnd.sun.xml.draw": { "source": "apache", "extensions": ["sxd"] },
  "application/vnd.sun.xml.draw.template": { "source": "apache", "extensions": ["std"] },
  "application/vnd.sun.xml.impress": { "source": "apache", "extensions": ["sxi"] },
  "application/vnd.sun.xml.impress.template": { "source": "apache", "extensions": ["sti"] },
  "application/vnd.sun.xml.math": { "source": "apache", "extensions": ["sxm"] },
  "application/vnd.sun.xml.writer": { "source": "apache", "extensions": ["sxw"] },
  "application/vnd.sun.xml.writer.global": { "source": "apache", "extensions": ["sxg"] },
  "application/vnd.sun.xml.writer.template": { "source": "apache", "extensions": ["stw"] },
  "application/vnd.sus-calendar": { "source": "iana", "extensions": ["sus", "susp"] },
  "application/vnd.svd": { "source": "iana", "extensions": ["svd"] },
  "application/vnd.swiftview-ics": { "source": "iana" },
  "application/vnd.sycle+xml": { "source": "iana", "compressible": true },
  "application/vnd.syft+json": { "source": "iana", "compressible": true },
  "application/vnd.symbian.install": { "source": "apache", "extensions": ["sis", "sisx"] },
  "application/vnd.syncml+xml": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["xsm"] },
  "application/vnd.syncml.dm+wbxml": { "source": "iana", "charset": "UTF-8", "extensions": ["bdm"] },
  "application/vnd.syncml.dm+xml": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["xdm"] },
  "application/vnd.syncml.dm.notification": { "source": "iana" },
  "application/vnd.syncml.dmddf+wbxml": { "source": "iana" },
  "application/vnd.syncml.dmddf+xml": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["ddf"] },
  "application/vnd.syncml.dmtnds+wbxml": { "source": "iana" },
  "application/vnd.syncml.dmtnds+xml": { "source": "iana", "charset": "UTF-8", "compressible": true },
  "application/vnd.syncml.ds.notification": { "source": "iana" },
  "application/vnd.tableschema+json": { "source": "iana", "compressible": true },
  "application/vnd.tao.intent-module-archive": { "source": "iana", "extensions": ["tao"] },
  "application/vnd.tcpdump.pcap": { "source": "iana", "extensions": ["pcap", "cap", "dmp"] },
  "application/vnd.think-cell.ppttc+json": { "source": "iana", "compressible": true },
  "application/vnd.tmd.mediaflex.api+xml": { "source": "iana", "compressible": true },
  "application/vnd.tml": { "source": "iana" },
  "application/vnd.tmobile-livetv": { "source": "iana", "extensions": ["tmo"] },
  "application/vnd.tri.onesource": { "source": "iana" },
  "application/vnd.trid.tpt": { "source": "iana", "extensions": ["tpt"] },
  "application/vnd.triscape.mxs": { "source": "iana", "extensions": ["mxs"] },
  "application/vnd.trueapp": { "source": "iana", "extensions": ["tra"] },
  "application/vnd.truedoc": { "source": "iana" },
  "application/vnd.ubisoft.webplayer": { "source": "iana" },
  "application/vnd.ufdl": { "source": "iana", "extensions": ["ufd", "ufdl"] },
  "application/vnd.uiq.theme": { "source": "iana", "extensions": ["utz"] },
  "application/vnd.umajin": { "source": "iana", "extensions": ["umj"] },
  "application/vnd.unity": { "source": "iana", "extensions": ["unityweb"] },
  "application/vnd.uoml+xml": { "source": "iana", "compressible": true, "extensions": ["uoml"] },
  "application/vnd.uplanet.alert": { "source": "iana" },
  "application/vnd.uplanet.alert-wbxml": { "source": "iana" },
  "application/vnd.uplanet.bearer-choice": { "source": "iana" },
  "application/vnd.uplanet.bearer-choice-wbxml": { "source": "iana" },
  "application/vnd.uplanet.cacheop": { "source": "iana" },
  "application/vnd.uplanet.cacheop-wbxml": { "source": "iana" },
  "application/vnd.uplanet.channel": { "source": "iana" },
  "application/vnd.uplanet.channel-wbxml": { "source": "iana" },
  "application/vnd.uplanet.list": { "source": "iana" },
  "application/vnd.uplanet.list-wbxml": { "source": "iana" },
  "application/vnd.uplanet.listcmd": { "source": "iana" },
  "application/vnd.uplanet.listcmd-wbxml": { "source": "iana" },
  "application/vnd.uplanet.signal": { "source": "iana" },
  "application/vnd.uri-map": { "source": "iana" },
  "application/vnd.valve.source.material": { "source": "iana" },
  "application/vnd.vcx": { "source": "iana", "extensions": ["vcx"] },
  "application/vnd.vd-study": { "source": "iana" },
  "application/vnd.vectorworks": { "source": "iana" },
  "application/vnd.vel+json": { "source": "iana", "compressible": true },
  "application/vnd.verimatrix.vcas": { "source": "iana" },
  "application/vnd.veritone.aion+json": { "source": "iana", "compressible": true },
  "application/vnd.veryant.thin": { "source": "iana" },
  "application/vnd.ves.encrypted": { "source": "iana" },
  "application/vnd.vidsoft.vidconference": { "source": "iana" },
  "application/vnd.visio": { "source": "iana", "extensions": ["vsd", "vst", "vss", "vsw"] },
  "application/vnd.visionary": { "source": "iana", "extensions": ["vis"] },
  "application/vnd.vividence.scriptfile": { "source": "iana" },
  "application/vnd.vsf": { "source": "iana", "extensions": ["vsf"] },
  "application/vnd.wap.sic": { "source": "iana" },
  "application/vnd.wap.slc": { "source": "iana" },
  "application/vnd.wap.wbxml": { "source": "iana", "charset": "UTF-8", "extensions": ["wbxml"] },
  "application/vnd.wap.wmlc": { "source": "iana", "extensions": ["wmlc"] },
  "application/vnd.wap.wmlscriptc": { "source": "iana", "extensions": ["wmlsc"] },
  "application/vnd.webturbo": { "source": "iana", "extensions": ["wtb"] },
  "application/vnd.wfa.dpp": { "source": "iana" },
  "application/vnd.wfa.p2p": { "source": "iana" },
  "application/vnd.wfa.wsc": { "source": "iana" },
  "application/vnd.windows.devicepairing": { "source": "iana" },
  "application/vnd.wmc": { "source": "iana" },
  "application/vnd.wmf.bootstrap": { "source": "iana" },
  "application/vnd.wolfram.mathematica": { "source": "iana" },
  "application/vnd.wolfram.mathematica.package": { "source": "iana" },
  "application/vnd.wolfram.player": { "source": "iana", "extensions": ["nbp"] },
  "application/vnd.wordperfect": { "source": "iana", "extensions": ["wpd"] },
  "application/vnd.wqd": { "source": "iana", "extensions": ["wqd"] },
  "application/vnd.wrq-hp3000-labelled": { "source": "iana" },
  "application/vnd.wt.stf": { "source": "iana", "extensions": ["stf"] },
  "application/vnd.wv.csp+wbxml": { "source": "iana" },
  "application/vnd.wv.csp+xml": { "source": "iana", "compressible": true },
  "application/vnd.wv.ssp+xml": { "source": "iana", "compressible": true },
  "application/vnd.xacml+json": { "source": "iana", "compressible": true },
  "application/vnd.xara": { "source": "iana", "extensions": ["xar"] },
  "application/vnd.xfdl": { "source": "iana", "extensions": ["xfdl"] },
  "application/vnd.xfdl.webform": { "source": "iana" },
  "application/vnd.xmi+xml": { "source": "iana", "compressible": true },
  "application/vnd.xmpie.cpkg": { "source": "iana" },
  "application/vnd.xmpie.dpkg": { "source": "iana" },
  "application/vnd.xmpie.plan": { "source": "iana" },
  "application/vnd.xmpie.ppkg": { "source": "iana" },
  "application/vnd.xmpie.xlim": { "source": "iana" },
  "application/vnd.yamaha.hv-dic": { "source": "iana", "extensions": ["hvd"] },
  "application/vnd.yamaha.hv-script": { "source": "iana", "extensions": ["hvs"] },
  "application/vnd.yamaha.hv-voice": { "source": "iana", "extensions": ["hvp"] },
  "application/vnd.yamaha.openscoreformat": { "source": "iana", "extensions": ["osf"] },
  "application/vnd.yamaha.openscoreformat.osfpvg+xml": { "source": "iana", "compressible": true, "extensions": ["osfpvg"] },
  "application/vnd.yamaha.remote-setup": { "source": "iana" },
  "application/vnd.yamaha.smaf-audio": { "source": "iana", "extensions": ["saf"] },
  "application/vnd.yamaha.smaf-phrase": { "source": "iana", "extensions": ["spf"] },
  "application/vnd.yamaha.through-ngn": { "source": "iana" },
  "application/vnd.yamaha.tunnel-udpencap": { "source": "iana" },
  "application/vnd.yaoweme": { "source": "iana" },
  "application/vnd.yellowriver-custom-menu": { "source": "iana", "extensions": ["cmp"] },
  "application/vnd.youtube.yt": { "source": "iana" },
  "application/vnd.zul": { "source": "iana", "extensions": ["zir", "zirz"] },
  "application/vnd.zzazz.deck+xml": { "source": "iana", "compressible": true, "extensions": ["zaz"] },
  "application/voicexml+xml": { "source": "iana", "compressible": true, "extensions": ["vxml"] },
  "application/voucher-cms+json": { "source": "iana", "compressible": true },
  "application/vq-rtcpxr": { "source": "iana" },
  "application/wasm": { "source": "iana", "compressible": true, "extensions": ["wasm"] },
  "application/watcherinfo+xml": { "source": "iana", "compressible": true, "extensions": ["wif"] },
  "application/webpush-options+json": { "source": "iana", "compressible": true },
  "application/whoispp-query": { "source": "iana" },
  "application/whoispp-response": { "source": "iana" },
  "application/widget": { "source": "iana", "extensions": ["wgt"] },
  "application/winhlp": { "source": "apache", "extensions": ["hlp"] },
  "application/wita": { "source": "iana" },
  "application/wordperfect5.1": { "source": "iana" },
  "application/wsdl+xml": { "source": "iana", "compressible": true, "extensions": ["wsdl"] },
  "application/wspolicy+xml": { "source": "iana", "compressible": true, "extensions": ["wspolicy"] },
  "application/x-7z-compressed": { "source": "apache", "compressible": false, "extensions": ["7z"] },
  "application/x-abiword": { "source": "apache", "extensions": ["abw"] },
  "application/x-ace-compressed": { "source": "apache", "extensions": ["ace"] },
  "application/x-amf": { "source": "apache" },
  "application/x-apple-diskimage": { "source": "apache", "extensions": ["dmg"] },
  "application/x-arj": { "compressible": false, "extensions": ["arj"] },
  "application/x-authorware-bin": { "source": "apache", "extensions": ["aab", "x32", "u32", "vox"] },
  "application/x-authorware-map": { "source": "apache", "extensions": ["aam"] },
  "application/x-authorware-seg": { "source": "apache", "extensions": ["aas"] },
  "application/x-bcpio": { "source": "apache", "extensions": ["bcpio"] },
  "application/x-bdoc": { "compressible": false, "extensions": ["bdoc"] },
  "application/x-bittorrent": { "source": "apache", "extensions": ["torrent"] },
  "application/x-blorb": { "source": "apache", "extensions": ["blb", "blorb"] },
  "application/x-bzip": { "source": "apache", "compressible": false, "extensions": ["bz"] },
  "application/x-bzip2": { "source": "apache", "compressible": false, "extensions": ["bz2", "boz"] },
  "application/x-cbr": { "source": "apache", "extensions": ["cbr", "cba", "cbt", "cbz", "cb7"] },
  "application/x-cdlink": { "source": "apache", "extensions": ["vcd"] },
  "application/x-cfs-compressed": { "source": "apache", "extensions": ["cfs"] },
  "application/x-chat": { "source": "apache", "extensions": ["chat"] },
  "application/x-chess-pgn": { "source": "apache", "extensions": ["pgn"] },
  "application/x-chrome-extension": { "extensions": ["crx"] },
  "application/x-cocoa": { "source": "nginx", "extensions": ["cco"] },
  "application/x-compress": { "source": "apache" },
  "application/x-conference": { "source": "apache", "extensions": ["nsc"] },
  "application/x-cpio": { "source": "apache", "extensions": ["cpio"] },
  "application/x-csh": { "source": "apache", "extensions": ["csh"] },
  "application/x-deb": { "compressible": false },
  "application/x-debian-package": { "source": "apache", "extensions": ["deb", "udeb"] },
  "application/x-dgc-compressed": { "source": "apache", "extensions": ["dgc"] },
  "application/x-director": { "source": "apache", "extensions": ["dir", "dcr", "dxr", "cst", "cct", "cxt", "w3d", "fgd", "swa"] },
  "application/x-doom": { "source": "apache", "extensions": ["wad"] },
  "application/x-dtbncx+xml": { "source": "apache", "compressible": true, "extensions": ["ncx"] },
  "application/x-dtbook+xml": { "source": "apache", "compressible": true, "extensions": ["dtb"] },
  "application/x-dtbresource+xml": { "source": "apache", "compressible": true, "extensions": ["res"] },
  "application/x-dvi": { "source": "apache", "compressible": false, "extensions": ["dvi"] },
  "application/x-envoy": { "source": "apache", "extensions": ["evy"] },
  "application/x-eva": { "source": "apache", "extensions": ["eva"] },
  "application/x-font-bdf": { "source": "apache", "extensions": ["bdf"] },
  "application/x-font-dos": { "source": "apache" },
  "application/x-font-framemaker": { "source": "apache" },
  "application/x-font-ghostscript": { "source": "apache", "extensions": ["gsf"] },
  "application/x-font-libgrx": { "source": "apache" },
  "application/x-font-linux-psf": { "source": "apache", "extensions": ["psf"] },
  "application/x-font-pcf": { "source": "apache", "extensions": ["pcf"] },
  "application/x-font-snf": { "source": "apache", "extensions": ["snf"] },
  "application/x-font-speedo": { "source": "apache" },
  "application/x-font-sunos-news": { "source": "apache" },
  "application/x-font-type1": { "source": "apache", "extensions": ["pfa", "pfb", "pfm", "afm"] },
  "application/x-font-vfont": { "source": "apache" },
  "application/x-freearc": { "source": "apache", "extensions": ["arc"] },
  "application/x-futuresplash": { "source": "apache", "extensions": ["spl"] },
  "application/x-gca-compressed": { "source": "apache", "extensions": ["gca"] },
  "application/x-glulx": { "source": "apache", "extensions": ["ulx"] },
  "application/x-gnumeric": { "source": "apache", "extensions": ["gnumeric"] },
  "application/x-gramps-xml": { "source": "apache", "extensions": ["gramps"] },
  "application/x-gtar": { "source": "apache", "extensions": ["gtar"] },
  "application/x-gzip": { "source": "apache" },
  "application/x-hdf": { "source": "apache", "extensions": ["hdf"] },
  "application/x-httpd-php": { "compressible": true, "extensions": ["php"] },
  "application/x-install-instructions": { "source": "apache", "extensions": ["install"] },
  "application/x-iso9660-image": { "source": "apache", "extensions": ["iso"] },
  "application/x-iwork-keynote-sffkey": { "extensions": ["key"] },
  "application/x-iwork-numbers-sffnumbers": { "extensions": ["numbers"] },
  "application/x-iwork-pages-sffpages": { "extensions": ["pages"] },
  "application/x-java-archive-diff": { "source": "nginx", "extensions": ["jardiff"] },
  "application/x-java-jnlp-file": { "source": "apache", "compressible": false, "extensions": ["jnlp"] },
  "application/x-javascript": { "compressible": true },
  "application/x-keepass2": { "extensions": ["kdbx"] },
  "application/x-latex": { "source": "apache", "compressible": false, "extensions": ["latex"] },
  "application/x-lua-bytecode": { "extensions": ["luac"] },
  "application/x-lzh-compressed": { "source": "apache", "extensions": ["lzh", "lha"] },
  "application/x-makeself": { "source": "nginx", "extensions": ["run"] },
  "application/x-mie": { "source": "apache", "extensions": ["mie"] },
  "application/x-mobipocket-ebook": { "source": "apache", "extensions": ["prc", "mobi"] },
  "application/x-mpegurl": { "compressible": false },
  "application/x-ms-application": { "source": "apache", "extensions": ["application"] },
  "application/x-ms-shortcut": { "source": "apache", "extensions": ["lnk"] },
  "application/x-ms-wmd": { "source": "apache", "extensions": ["wmd"] },
  "application/x-ms-wmz": { "source": "apache", "extensions": ["wmz"] },
  "application/x-ms-xbap": { "source": "apache", "extensions": ["xbap"] },
  "application/x-msaccess": { "source": "apache", "extensions": ["mdb"] },
  "application/x-msbinder": { "source": "apache", "extensions": ["obd"] },
  "application/x-mscardfile": { "source": "apache", "extensions": ["crd"] },
  "application/x-msclip": { "source": "apache", "extensions": ["clp"] },
  "application/x-msdos-program": { "extensions": ["exe"] },
  "application/x-msdownload": { "source": "apache", "extensions": ["exe", "dll", "com", "bat", "msi"] },
  "application/x-msmediaview": { "source": "apache", "extensions": ["mvb", "m13", "m14"] },
  "application/x-msmetafile": { "source": "apache", "extensions": ["wmf", "wmz", "emf", "emz"] },
  "application/x-msmoney": { "source": "apache", "extensions": ["mny"] },
  "application/x-mspublisher": { "source": "apache", "extensions": ["pub"] },
  "application/x-msschedule": { "source": "apache", "extensions": ["scd"] },
  "application/x-msterminal": { "source": "apache", "extensions": ["trm"] },
  "application/x-mswrite": { "source": "apache", "extensions": ["wri"] },
  "application/x-netcdf": { "source": "apache", "extensions": ["nc", "cdf"] },
  "application/x-ns-proxy-autoconfig": { "compressible": true, "extensions": ["pac"] },
  "application/x-nzb": { "source": "apache", "extensions": ["nzb"] },
  "application/x-perl": { "source": "nginx", "extensions": ["pl", "pm"] },
  "application/x-pilot": { "source": "nginx", "extensions": ["prc", "pdb"] },
  "application/x-pkcs12": { "source": "apache", "compressible": false, "extensions": ["p12", "pfx"] },
  "application/x-pkcs7-certificates": { "source": "apache", "extensions": ["p7b", "spc"] },
  "application/x-pkcs7-certreqresp": { "source": "apache", "extensions": ["p7r"] },
  "application/x-pki-message": { "source": "iana" },
  "application/x-rar-compressed": { "source": "apache", "compressible": false, "extensions": ["rar"] },
  "application/x-redhat-package-manager": { "source": "nginx", "extensions": ["rpm"] },
  "application/x-research-info-systems": { "source": "apache", "extensions": ["ris"] },
  "application/x-sea": { "source": "nginx", "extensions": ["sea"] },
  "application/x-sh": { "source": "apache", "compressible": true, "extensions": ["sh"] },
  "application/x-shar": { "source": "apache", "extensions": ["shar"] },
  "application/x-shockwave-flash": { "source": "apache", "compressible": false, "extensions": ["swf"] },
  "application/x-silverlight-app": { "source": "apache", "extensions": ["xap"] },
  "application/x-sql": { "source": "apache", "extensions": ["sql"] },
  "application/x-stuffit": { "source": "apache", "compressible": false, "extensions": ["sit"] },
  "application/x-stuffitx": { "source": "apache", "extensions": ["sitx"] },
  "application/x-subrip": { "source": "apache", "extensions": ["srt"] },
  "application/x-sv4cpio": { "source": "apache", "extensions": ["sv4cpio"] },
  "application/x-sv4crc": { "source": "apache", "extensions": ["sv4crc"] },
  "application/x-t3vm-image": { "source": "apache", "extensions": ["t3"] },
  "application/x-tads": { "source": "apache", "extensions": ["gam"] },
  "application/x-tar": { "source": "apache", "compressible": true, "extensions": ["tar"] },
  "application/x-tcl": { "source": "apache", "extensions": ["tcl", "tk"] },
  "application/x-tex": { "source": "apache", "extensions": ["tex"] },
  "application/x-tex-tfm": { "source": "apache", "extensions": ["tfm"] },
  "application/x-texinfo": { "source": "apache", "extensions": ["texinfo", "texi"] },
  "application/x-tgif": { "source": "apache", "extensions": ["obj"] },
  "application/x-ustar": { "source": "apache", "extensions": ["ustar"] },
  "application/x-virtualbox-hdd": { "compressible": true, "extensions": ["hdd"] },
  "application/x-virtualbox-ova": { "compressible": true, "extensions": ["ova"] },
  "application/x-virtualbox-ovf": { "compressible": true, "extensions": ["ovf"] },
  "application/x-virtualbox-vbox": { "compressible": true, "extensions": ["vbox"] },
  "application/x-virtualbox-vbox-extpack": { "compressible": false, "extensions": ["vbox-extpack"] },
  "application/x-virtualbox-vdi": { "compressible": true, "extensions": ["vdi"] },
  "application/x-virtualbox-vhd": { "compressible": true, "extensions": ["vhd"] },
  "application/x-virtualbox-vmdk": { "compressible": true, "extensions": ["vmdk"] },
  "application/x-wais-source": { "source": "apache", "extensions": ["src"] },
  "application/x-web-app-manifest+json": { "compressible": true, "extensions": ["webapp"] },
  "application/x-www-form-urlencoded": { "source": "iana", "compressible": true },
  "application/x-x509-ca-cert": { "source": "iana", "extensions": ["der", "crt", "pem"] },
  "application/x-x509-ca-ra-cert": { "source": "iana" },
  "application/x-x509-next-ca-cert": { "source": "iana" },
  "application/x-xfig": { "source": "apache", "extensions": ["fig"] },
  "application/x-xliff+xml": { "source": "apache", "compressible": true, "extensions": ["xlf"] },
  "application/x-xpinstall": { "source": "apache", "compressible": false, "extensions": ["xpi"] },
  "application/x-xz": { "source": "apache", "extensions": ["xz"] },
  "application/x-zmachine": { "source": "apache", "extensions": ["z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8"] },
  "application/x400-bp": { "source": "iana" },
  "application/xacml+xml": { "source": "iana", "compressible": true },
  "application/xaml+xml": { "source": "apache", "compressible": true, "extensions": ["xaml"] },
  "application/xcap-att+xml": { "source": "iana", "compressible": true, "extensions": ["xav"] },
  "application/xcap-caps+xml": { "source": "iana", "compressible": true, "extensions": ["xca"] },
  "application/xcap-diff+xml": { "source": "iana", "compressible": true, "extensions": ["xdf"] },
  "application/xcap-el+xml": { "source": "iana", "compressible": true, "extensions": ["xel"] },
  "application/xcap-error+xml": { "source": "iana", "compressible": true },
  "application/xcap-ns+xml": { "source": "iana", "compressible": true, "extensions": ["xns"] },
  "application/xcon-conference-info+xml": { "source": "iana", "compressible": true },
  "application/xcon-conference-info-diff+xml": { "source": "iana", "compressible": true },
  "application/xenc+xml": { "source": "iana", "compressible": true, "extensions": ["xenc"] },
  "application/xhtml+xml": { "source": "iana", "compressible": true, "extensions": ["xhtml", "xht"] },
  "application/xhtml-voice+xml": { "source": "apache", "compressible": true },
  "application/xliff+xml": { "source": "iana", "compressible": true, "extensions": ["xlf"] },
  "application/xml": { "source": "iana", "compressible": true, "extensions": ["xml", "xsl", "xsd", "rng"] },
  "application/xml-dtd": { "source": "iana", "compressible": true, "extensions": ["dtd"] },
  "application/xml-external-parsed-entity": { "source": "iana" },
  "application/xml-patch+xml": { "source": "iana", "compressible": true },
  "application/xmpp+xml": { "source": "iana", "compressible": true },
  "application/xop+xml": { "source": "iana", "compressible": true, "extensions": ["xop"] },
  "application/xproc+xml": { "source": "apache", "compressible": true, "extensions": ["xpl"] },
  "application/xslt+xml": { "source": "iana", "compressible": true, "extensions": ["xsl", "xslt"] },
  "application/xspf+xml": { "source": "apache", "compressible": true, "extensions": ["xspf"] },
  "application/xv+xml": { "source": "iana", "compressible": true, "extensions": ["mxml", "xhvml", "xvml", "xvm"] },
  "application/yang": { "source": "iana", "extensions": ["yang"] },
  "application/yang-data+json": { "source": "iana", "compressible": true },
  "application/yang-data+xml": { "source": "iana", "compressible": true },
  "application/yang-patch+json": { "source": "iana", "compressible": true },
  "application/yang-patch+xml": { "source": "iana", "compressible": true },
  "application/yin+xml": { "source": "iana", "compressible": true, "extensions": ["yin"] },
  "application/zip": { "source": "iana", "compressible": false, "extensions": ["zip"] },
  "application/zlib": { "source": "iana" },
  "application/zstd": { "source": "iana" },
  "audio/1d-interleaved-parityfec": { "source": "iana" },
  "audio/32kadpcm": { "source": "iana" },
  "audio/3gpp": { "source": "iana", "compressible": false, "extensions": ["3gpp"] },
  "audio/3gpp2": { "source": "iana" },
  "audio/aac": { "source": "iana" },
  "audio/ac3": { "source": "iana" },
  "audio/adpcm": { "source": "apache", "extensions": ["adp"] },
  "audio/amr": { "source": "iana", "extensions": ["amr"] },
  "audio/amr-wb": { "source": "iana" },
  "audio/amr-wb+": { "source": "iana" },
  "audio/aptx": { "source": "iana" },
  "audio/asc": { "source": "iana" },
  "audio/atrac-advanced-lossless": { "source": "iana" },
  "audio/atrac-x": { "source": "iana" },
  "audio/atrac3": { "source": "iana" },
  "audio/basic": { "source": "iana", "compressible": false, "extensions": ["au", "snd"] },
  "audio/bv16": { "source": "iana" },
  "audio/bv32": { "source": "iana" },
  "audio/clearmode": { "source": "iana" },
  "audio/cn": { "source": "iana" },
  "audio/dat12": { "source": "iana" },
  "audio/dls": { "source": "iana" },
  "audio/dsr-es201108": { "source": "iana" },
  "audio/dsr-es202050": { "source": "iana" },
  "audio/dsr-es202211": { "source": "iana" },
  "audio/dsr-es202212": { "source": "iana" },
  "audio/dv": { "source": "iana" },
  "audio/dvi4": { "source": "iana" },
  "audio/eac3": { "source": "iana" },
  "audio/encaprtp": { "source": "iana" },
  "audio/evrc": { "source": "iana" },
  "audio/evrc-qcp": { "source": "iana" },
  "audio/evrc0": { "source": "iana" },
  "audio/evrc1": { "source": "iana" },
  "audio/evrcb": { "source": "iana" },
  "audio/evrcb0": { "source": "iana" },
  "audio/evrcb1": { "source": "iana" },
  "audio/evrcnw": { "source": "iana" },
  "audio/evrcnw0": { "source": "iana" },
  "audio/evrcnw1": { "source": "iana" },
  "audio/evrcwb": { "source": "iana" },
  "audio/evrcwb0": { "source": "iana" },
  "audio/evrcwb1": { "source": "iana" },
  "audio/evs": { "source": "iana" },
  "audio/flexfec": { "source": "iana" },
  "audio/fwdred": { "source": "iana" },
  "audio/g711-0": { "source": "iana" },
  "audio/g719": { "source": "iana" },
  "audio/g722": { "source": "iana" },
  "audio/g7221": { "source": "iana" },
  "audio/g723": { "source": "iana" },
  "audio/g726-16": { "source": "iana" },
  "audio/g726-24": { "source": "iana" },
  "audio/g726-32": { "source": "iana" },
  "audio/g726-40": { "source": "iana" },
  "audio/g728": { "source": "iana" },
  "audio/g729": { "source": "iana" },
  "audio/g7291": { "source": "iana" },
  "audio/g729d": { "source": "iana" },
  "audio/g729e": { "source": "iana" },
  "audio/gsm": { "source": "iana" },
  "audio/gsm-efr": { "source": "iana" },
  "audio/gsm-hr-08": { "source": "iana" },
  "audio/ilbc": { "source": "iana" },
  "audio/ip-mr_v2.5": { "source": "iana" },
  "audio/isac": { "source": "apache" },
  "audio/l16": { "source": "iana" },
  "audio/l20": { "source": "iana" },
  "audio/l24": { "source": "iana", "compressible": false },
  "audio/l8": { "source": "iana" },
  "audio/lpc": { "source": "iana" },
  "audio/melp": { "source": "iana" },
  "audio/melp1200": { "source": "iana" },
  "audio/melp2400": { "source": "iana" },
  "audio/melp600": { "source": "iana" },
  "audio/mhas": { "source": "iana" },
  "audio/midi": { "source": "apache", "extensions": ["mid", "midi", "kar", "rmi"] },
  "audio/mobile-xmf": { "source": "iana", "extensions": ["mxmf"] },
  "audio/mp3": { "compressible": false, "extensions": ["mp3"] },
  "audio/mp4": { "source": "iana", "compressible": false, "extensions": ["m4a", "mp4a"] },
  "audio/mp4a-latm": { "source": "iana" },
  "audio/mpa": { "source": "iana" },
  "audio/mpa-robust": { "source": "iana" },
  "audio/mpeg": { "source": "iana", "compressible": false, "extensions": ["mpga", "mp2", "mp2a", "mp3", "m2a", "m3a"] },
  "audio/mpeg4-generic": { "source": "iana" },
  "audio/musepack": { "source": "apache" },
  "audio/ogg": { "source": "iana", "compressible": false, "extensions": ["oga", "ogg", "spx", "opus"] },
  "audio/opus": { "source": "iana" },
  "audio/parityfec": { "source": "iana" },
  "audio/pcma": { "source": "iana" },
  "audio/pcma-wb": { "source": "iana" },
  "audio/pcmu": { "source": "iana" },
  "audio/pcmu-wb": { "source": "iana" },
  "audio/prs.sid": { "source": "iana" },
  "audio/qcelp": { "source": "iana" },
  "audio/raptorfec": { "source": "iana" },
  "audio/red": { "source": "iana" },
  "audio/rtp-enc-aescm128": { "source": "iana" },
  "audio/rtp-midi": { "source": "iana" },
  "audio/rtploopback": { "source": "iana" },
  "audio/rtx": { "source": "iana" },
  "audio/s3m": { "source": "apache", "extensions": ["s3m"] },
  "audio/scip": { "source": "iana" },
  "audio/silk": { "source": "apache", "extensions": ["sil"] },
  "audio/smv": { "source": "iana" },
  "audio/smv-qcp": { "source": "iana" },
  "audio/smv0": { "source": "iana" },
  "audio/sofa": { "source": "iana" },
  "audio/sp-midi": { "source": "iana" },
  "audio/speex": { "source": "iana" },
  "audio/t140c": { "source": "iana" },
  "audio/t38": { "source": "iana" },
  "audio/telephone-event": { "source": "iana" },
  "audio/tetra_acelp": { "source": "iana" },
  "audio/tetra_acelp_bb": { "source": "iana" },
  "audio/tone": { "source": "iana" },
  "audio/tsvcis": { "source": "iana" },
  "audio/uemclip": { "source": "iana" },
  "audio/ulpfec": { "source": "iana" },
  "audio/usac": { "source": "iana" },
  "audio/vdvi": { "source": "iana" },
  "audio/vmr-wb": { "source": "iana" },
  "audio/vnd.3gpp.iufp": { "source": "iana" },
  "audio/vnd.4sb": { "source": "iana" },
  "audio/vnd.audiokoz": { "source": "iana" },
  "audio/vnd.celp": { "source": "iana" },
  "audio/vnd.cisco.nse": { "source": "iana" },
  "audio/vnd.cmles.radio-events": { "source": "iana" },
  "audio/vnd.cns.anp1": { "source": "iana" },
  "audio/vnd.cns.inf1": { "source": "iana" },
  "audio/vnd.dece.audio": { "source": "iana", "extensions": ["uva", "uvva"] },
  "audio/vnd.digital-winds": { "source": "iana", "extensions": ["eol"] },
  "audio/vnd.dlna.adts": { "source": "iana" },
  "audio/vnd.dolby.heaac.1": { "source": "iana" },
  "audio/vnd.dolby.heaac.2": { "source": "iana" },
  "audio/vnd.dolby.mlp": { "source": "iana" },
  "audio/vnd.dolby.mps": { "source": "iana" },
  "audio/vnd.dolby.pl2": { "source": "iana" },
  "audio/vnd.dolby.pl2x": { "source": "iana" },
  "audio/vnd.dolby.pl2z": { "source": "iana" },
  "audio/vnd.dolby.pulse.1": { "source": "iana" },
  "audio/vnd.dra": { "source": "iana", "extensions": ["dra"] },
  "audio/vnd.dts": { "source": "iana", "extensions": ["dts"] },
  "audio/vnd.dts.hd": { "source": "iana", "extensions": ["dtshd"] },
  "audio/vnd.dts.uhd": { "source": "iana" },
  "audio/vnd.dvb.file": { "source": "iana" },
  "audio/vnd.everad.plj": { "source": "iana" },
  "audio/vnd.hns.audio": { "source": "iana" },
  "audio/vnd.lucent.voice": { "source": "iana", "extensions": ["lvp"] },
  "audio/vnd.ms-playready.media.pya": { "source": "iana", "extensions": ["pya"] },
  "audio/vnd.nokia.mobile-xmf": { "source": "iana" },
  "audio/vnd.nortel.vbk": { "source": "iana" },
  "audio/vnd.nuera.ecelp4800": { "source": "iana", "extensions": ["ecelp4800"] },
  "audio/vnd.nuera.ecelp7470": { "source": "iana", "extensions": ["ecelp7470"] },
  "audio/vnd.nuera.ecelp9600": { "source": "iana", "extensions": ["ecelp9600"] },
  "audio/vnd.octel.sbc": { "source": "iana" },
  "audio/vnd.presonus.multitrack": { "source": "iana" },
  "audio/vnd.qcelp": { "source": "iana" },
  "audio/vnd.rhetorex.32kadpcm": { "source": "iana" },
  "audio/vnd.rip": { "source": "iana", "extensions": ["rip"] },
  "audio/vnd.rn-realaudio": { "compressible": false },
  "audio/vnd.sealedmedia.softseal.mpeg": { "source": "iana" },
  "audio/vnd.vmx.cvsd": { "source": "iana" },
  "audio/vnd.wave": { "compressible": false },
  "audio/vorbis": { "source": "iana", "compressible": false },
  "audio/vorbis-config": { "source": "iana" },
  "audio/wav": { "compressible": false, "extensions": ["wav"] },
  "audio/wave": { "compressible": false, "extensions": ["wav"] },
  "audio/webm": { "source": "apache", "compressible": false, "extensions": ["weba"] },
  "audio/x-aac": { "source": "apache", "compressible": false, "extensions": ["aac"] },
  "audio/x-aiff": { "source": "apache", "extensions": ["aif", "aiff", "aifc"] },
  "audio/x-caf": { "source": "apache", "compressible": false, "extensions": ["caf"] },
  "audio/x-flac": { "source": "apache", "extensions": ["flac"] },
  "audio/x-m4a": { "source": "nginx", "extensions": ["m4a"] },
  "audio/x-matroska": { "source": "apache", "extensions": ["mka"] },
  "audio/x-mpegurl": { "source": "apache", "extensions": ["m3u"] },
  "audio/x-ms-wax": { "source": "apache", "extensions": ["wax"] },
  "audio/x-ms-wma": { "source": "apache", "extensions": ["wma"] },
  "audio/x-pn-realaudio": { "source": "apache", "extensions": ["ram", "ra"] },
  "audio/x-pn-realaudio-plugin": { "source": "apache", "extensions": ["rmp"] },
  "audio/x-realaudio": { "source": "nginx", "extensions": ["ra"] },
  "audio/x-tta": { "source": "apache" },
  "audio/x-wav": { "source": "apache", "extensions": ["wav"] },
  "audio/xm": { "source": "apache", "extensions": ["xm"] },
  "chemical/x-cdx": { "source": "apache", "extensions": ["cdx"] },
  "chemical/x-cif": { "source": "apache", "extensions": ["cif"] },
  "chemical/x-cmdf": { "source": "apache", "extensions": ["cmdf"] },
  "chemical/x-cml": { "source": "apache", "extensions": ["cml"] },
  "chemical/x-csml": { "source": "apache", "extensions": ["csml"] },
  "chemical/x-pdb": { "source": "apache" },
  "chemical/x-xyz": { "source": "apache", "extensions": ["xyz"] },
  "font/collection": { "source": "iana", "extensions": ["ttc"] },
  "font/otf": { "source": "iana", "compressible": true, "extensions": ["otf"] },
  "font/sfnt": { "source": "iana" },
  "font/ttf": { "source": "iana", "compressible": true, "extensions": ["ttf"] },
  "font/woff": { "source": "iana", "extensions": ["woff"] },
  "font/woff2": { "source": "iana", "extensions": ["woff2"] },
  "image/aces": { "source": "iana", "extensions": ["exr"] },
  "image/apng": { "compressible": false, "extensions": ["apng"] },
  "image/avci": { "source": "iana", "extensions": ["avci"] },
  "image/avcs": { "source": "iana", "extensions": ["avcs"] },
  "image/avif": { "source": "iana", "compressible": false, "extensions": ["avif"] },
  "image/bmp": { "source": "iana", "compressible": true, "extensions": ["bmp"] },
  "image/cgm": { "source": "iana", "extensions": ["cgm"] },
  "image/dicom-rle": { "source": "iana", "extensions": ["drle"] },
  "image/emf": { "source": "iana", "extensions": ["emf"] },
  "image/fits": { "source": "iana", "extensions": ["fits"] },
  "image/g3fax": { "source": "iana", "extensions": ["g3"] },
  "image/gif": { "source": "iana", "compressible": false, "extensions": ["gif"] },
  "image/heic": { "source": "iana", "extensions": ["heic"] },
  "image/heic-sequence": { "source": "iana", "extensions": ["heics"] },
  "image/heif": { "source": "iana", "extensions": ["heif"] },
  "image/heif-sequence": { "source": "iana", "extensions": ["heifs"] },
  "image/hej2k": { "source": "iana", "extensions": ["hej2"] },
  "image/hsj2": { "source": "iana", "extensions": ["hsj2"] },
  "image/ief": { "source": "iana", "extensions": ["ief"] },
  "image/jls": { "source": "iana", "extensions": ["jls"] },
  "image/jp2": { "source": "iana", "compressible": false, "extensions": ["jp2", "jpg2"] },
  "image/jpeg": { "source": "iana", "compressible": false, "extensions": ["jpeg", "jpg", "jpe"] },
  "image/jph": { "source": "iana", "extensions": ["jph"] },
  "image/jphc": { "source": "iana", "extensions": ["jhc"] },
  "image/jpm": { "source": "iana", "compressible": false, "extensions": ["jpm"] },
  "image/jpx": { "source": "iana", "compressible": false, "extensions": ["jpx", "jpf"] },
  "image/jxr": { "source": "iana", "extensions": ["jxr"] },
  "image/jxra": { "source": "iana", "extensions": ["jxra"] },
  "image/jxrs": { "source": "iana", "extensions": ["jxrs"] },
  "image/jxs": { "source": "iana", "extensions": ["jxs"] },
  "image/jxsc": { "source": "iana", "extensions": ["jxsc"] },
  "image/jxsi": { "source": "iana", "extensions": ["jxsi"] },
  "image/jxss": { "source": "iana", "extensions": ["jxss"] },
  "image/ktx": { "source": "iana", "extensions": ["ktx"] },
  "image/ktx2": { "source": "iana", "extensions": ["ktx2"] },
  "image/naplps": { "source": "iana" },
  "image/pjpeg": { "compressible": false },
  "image/png": { "source": "iana", "compressible": false, "extensions": ["png"] },
  "image/prs.btif": { "source": "iana", "extensions": ["btif"] },
  "image/prs.pti": { "source": "iana", "extensions": ["pti"] },
  "image/pwg-raster": { "source": "iana" },
  "image/sgi": { "source": "apache", "extensions": ["sgi"] },
  "image/svg+xml": { "source": "iana", "compressible": true, "extensions": ["svg", "svgz"] },
  "image/t38": { "source": "iana", "extensions": ["t38"] },
  "image/tiff": { "source": "iana", "compressible": false, "extensions": ["tif", "tiff"] },
  "image/tiff-fx": { "source": "iana", "extensions": ["tfx"] },
  "image/vnd.adobe.photoshop": { "source": "iana", "compressible": true, "extensions": ["psd"] },
  "image/vnd.airzip.accelerator.azv": { "source": "iana", "extensions": ["azv"] },
  "image/vnd.cns.inf2": { "source": "iana" },
  "image/vnd.dece.graphic": { "source": "iana", "extensions": ["uvi", "uvvi", "uvg", "uvvg"] },
  "image/vnd.djvu": { "source": "iana", "extensions": ["djvu", "djv"] },
  "image/vnd.dvb.subtitle": { "source": "iana", "extensions": ["sub"] },
  "image/vnd.dwg": { "source": "iana", "extensions": ["dwg"] },
  "image/vnd.dxf": { "source": "iana", "extensions": ["dxf"] },
  "image/vnd.fastbidsheet": { "source": "iana", "extensions": ["fbs"] },
  "image/vnd.fpx": { "source": "iana", "extensions": ["fpx"] },
  "image/vnd.fst": { "source": "iana", "extensions": ["fst"] },
  "image/vnd.fujixerox.edmics-mmr": { "source": "iana", "extensions": ["mmr"] },
  "image/vnd.fujixerox.edmics-rlc": { "source": "iana", "extensions": ["rlc"] },
  "image/vnd.globalgraphics.pgb": { "source": "iana" },
  "image/vnd.microsoft.icon": { "source": "iana", "compressible": true, "extensions": ["ico"] },
  "image/vnd.mix": { "source": "iana" },
  "image/vnd.mozilla.apng": { "source": "iana" },
  "image/vnd.ms-dds": { "compressible": true, "extensions": ["dds"] },
  "image/vnd.ms-modi": { "source": "iana", "extensions": ["mdi"] },
  "image/vnd.ms-photo": { "source": "apache", "extensions": ["wdp"] },
  "image/vnd.net-fpx": { "source": "iana", "extensions": ["npx"] },
  "image/vnd.pco.b16": { "source": "iana", "extensions": ["b16"] },
  "image/vnd.radiance": { "source": "iana" },
  "image/vnd.sealed.png": { "source": "iana" },
  "image/vnd.sealedmedia.softseal.gif": { "source": "iana" },
  "image/vnd.sealedmedia.softseal.jpg": { "source": "iana" },
  "image/vnd.svf": { "source": "iana" },
  "image/vnd.tencent.tap": { "source": "iana", "extensions": ["tap"] },
  "image/vnd.valve.source.texture": { "source": "iana", "extensions": ["vtf"] },
  "image/vnd.wap.wbmp": { "source": "iana", "extensions": ["wbmp"] },
  "image/vnd.xiff": { "source": "iana", "extensions": ["xif"] },
  "image/vnd.zbrush.pcx": { "source": "iana", "extensions": ["pcx"] },
  "image/webp": { "source": "apache", "extensions": ["webp"] },
  "image/wmf": { "source": "iana", "extensions": ["wmf"] },
  "image/x-3ds": { "source": "apache", "extensions": ["3ds"] },
  "image/x-cmu-raster": { "source": "apache", "extensions": ["ras"] },
  "image/x-cmx": { "source": "apache", "extensions": ["cmx"] },
  "image/x-freehand": { "source": "apache", "extensions": ["fh", "fhc", "fh4", "fh5", "fh7"] },
  "image/x-icon": { "source": "apache", "compressible": true, "extensions": ["ico"] },
  "image/x-jng": { "source": "nginx", "extensions": ["jng"] },
  "image/x-mrsid-image": { "source": "apache", "extensions": ["sid"] },
  "image/x-ms-bmp": { "source": "nginx", "compressible": true, "extensions": ["bmp"] },
  "image/x-pcx": { "source": "apache", "extensions": ["pcx"] },
  "image/x-pict": { "source": "apache", "extensions": ["pic", "pct"] },
  "image/x-portable-anymap": { "source": "apache", "extensions": ["pnm"] },
  "image/x-portable-bitmap": { "source": "apache", "extensions": ["pbm"] },
  "image/x-portable-graymap": { "source": "apache", "extensions": ["pgm"] },
  "image/x-portable-pixmap": { "source": "apache", "extensions": ["ppm"] },
  "image/x-rgb": { "source": "apache", "extensions": ["rgb"] },
  "image/x-tga": { "source": "apache", "extensions": ["tga"] },
  "image/x-xbitmap": { "source": "apache", "extensions": ["xbm"] },
  "image/x-xcf": { "compressible": false },
  "image/x-xpixmap": { "source": "apache", "extensions": ["xpm"] },
  "image/x-xwindowdump": { "source": "apache", "extensions": ["xwd"] },
  "message/cpim": { "source": "iana" },
  "message/delivery-status": { "source": "iana" },
  "message/disposition-notification": { "source": "iana", "extensions": ["disposition-notification"] },
  "message/external-body": { "source": "iana" },
  "message/feedback-report": { "source": "iana" },
  "message/global": { "source": "iana", "extensions": ["u8msg"] },
  "message/global-delivery-status": { "source": "iana", "extensions": ["u8dsn"] },
  "message/global-disposition-notification": { "source": "iana", "extensions": ["u8mdn"] },
  "message/global-headers": { "source": "iana", "extensions": ["u8hdr"] },
  "message/http": { "source": "iana", "compressible": false },
  "message/imdn+xml": { "source": "iana", "compressible": true },
  "message/news": { "source": "iana" },
  "message/partial": { "source": "iana", "compressible": false },
  "message/rfc822": { "source": "iana", "compressible": true, "extensions": ["eml", "mime"] },
  "message/s-http": { "source": "iana" },
  "message/sip": { "source": "iana" },
  "message/sipfrag": { "source": "iana" },
  "message/tracking-status": { "source": "iana" },
  "message/vnd.si.simp": { "source": "iana" },
  "message/vnd.wfa.wsc": { "source": "iana", "extensions": ["wsc"] },
  "model/3mf": { "source": "iana", "extensions": ["3mf"] },
  "model/e57": { "source": "iana" },
  "model/gltf+json": { "source": "iana", "compressible": true, "extensions": ["gltf"] },
  "model/gltf-binary": { "source": "iana", "compressible": true, "extensions": ["glb"] },
  "model/iges": { "source": "iana", "compressible": false, "extensions": ["igs", "iges"] },
  "model/mesh": { "source": "iana", "compressible": false, "extensions": ["msh", "mesh", "silo"] },
  "model/mtl": { "source": "iana", "extensions": ["mtl"] },
  "model/obj": { "source": "iana", "extensions": ["obj"] },
  "model/step": { "source": "iana" },
  "model/step+xml": { "source": "iana", "compressible": true, "extensions": ["stpx"] },
  "model/step+zip": { "source": "iana", "compressible": false, "extensions": ["stpz"] },
  "model/step-xml+zip": { "source": "iana", "compressible": false, "extensions": ["stpxz"] },
  "model/stl": { "source": "iana", "extensions": ["stl"] },
  "model/vnd.collada+xml": { "source": "iana", "compressible": true, "extensions": ["dae"] },
  "model/vnd.dwf": { "source": "iana", "extensions": ["dwf"] },
  "model/vnd.flatland.3dml": { "source": "iana" },
  "model/vnd.gdl": { "source": "iana", "extensions": ["gdl"] },
  "model/vnd.gs-gdl": { "source": "apache" },
  "model/vnd.gs.gdl": { "source": "iana" },
  "model/vnd.gtw": { "source": "iana", "extensions": ["gtw"] },
  "model/vnd.moml+xml": { "source": "iana", "compressible": true },
  "model/vnd.mts": { "source": "iana", "extensions": ["mts"] },
  "model/vnd.opengex": { "source": "iana", "extensions": ["ogex"] },
  "model/vnd.parasolid.transmit.binary": { "source": "iana", "extensions": ["x_b"] },
  "model/vnd.parasolid.transmit.text": { "source": "iana", "extensions": ["x_t"] },
  "model/vnd.pytha.pyox": { "source": "iana" },
  "model/vnd.rosette.annotated-data-model": { "source": "iana" },
  "model/vnd.sap.vds": { "source": "iana", "extensions": ["vds"] },
  "model/vnd.usdz+zip": { "source": "iana", "compressible": false, "extensions": ["usdz"] },
  "model/vnd.valve.source.compiled-map": { "source": "iana", "extensions": ["bsp"] },
  "model/vnd.vtu": { "source": "iana", "extensions": ["vtu"] },
  "model/vrml": { "source": "iana", "compressible": false, "extensions": ["wrl", "vrml"] },
  "model/x3d+binary": { "source": "apache", "compressible": false, "extensions": ["x3db", "x3dbz"] },
  "model/x3d+fastinfoset": { "source": "iana", "extensions": ["x3db"] },
  "model/x3d+vrml": { "source": "apache", "compressible": false, "extensions": ["x3dv", "x3dvz"] },
  "model/x3d+xml": { "source": "iana", "compressible": true, "extensions": ["x3d", "x3dz"] },
  "model/x3d-vrml": { "source": "iana", "extensions": ["x3dv"] },
  "multipart/alternative": { "source": "iana", "compressible": false },
  "multipart/appledouble": { "source": "iana" },
  "multipart/byteranges": { "source": "iana" },
  "multipart/digest": { "source": "iana" },
  "multipart/encrypted": { "source": "iana", "compressible": false },
  "multipart/form-data": { "source": "iana", "compressible": false },
  "multipart/header-set": { "source": "iana" },
  "multipart/mixed": { "source": "iana" },
  "multipart/multilingual": { "source": "iana" },
  "multipart/parallel": { "source": "iana" },
  "multipart/related": { "source": "iana", "compressible": false },
  "multipart/report": { "source": "iana" },
  "multipart/signed": { "source": "iana", "compressible": false },
  "multipart/vnd.bint.med-plus": { "source": "iana" },
  "multipart/voice-message": { "source": "iana" },
  "multipart/x-mixed-replace": { "source": "iana" },
  "text/1d-interleaved-parityfec": { "source": "iana" },
  "text/cache-manifest": { "source": "iana", "compressible": true, "extensions": ["appcache", "manifest"] },
  "text/calendar": { "source": "iana", "extensions": ["ics", "ifb"] },
  "text/calender": { "compressible": true },
  "text/cmd": { "compressible": true },
  "text/coffeescript": { "extensions": ["coffee", "litcoffee"] },
  "text/cql": { "source": "iana" },
  "text/cql-expression": { "source": "iana" },
  "text/cql-identifier": { "source": "iana" },
  "text/css": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["css"] },
  "text/csv": { "source": "iana", "compressible": true, "extensions": ["csv"] },
  "text/csv-schema": { "source": "iana" },
  "text/directory": { "source": "iana" },
  "text/dns": { "source": "iana" },
  "text/ecmascript": { "source": "iana" },
  "text/encaprtp": { "source": "iana" },
  "text/enriched": { "source": "iana" },
  "text/fhirpath": { "source": "iana" },
  "text/flexfec": { "source": "iana" },
  "text/fwdred": { "source": "iana" },
  "text/gff3": { "source": "iana" },
  "text/grammar-ref-list": { "source": "iana" },
  "text/html": { "source": "iana", "compressible": true, "extensions": ["html", "htm", "shtml"] },
  "text/jade": { "extensions": ["jade"] },
  "text/javascript": { "source": "iana", "compressible": true },
  "text/jcr-cnd": { "source": "iana" },
  "text/jsx": { "compressible": true, "extensions": ["jsx"] },
  "text/less": { "compressible": true, "extensions": ["less"] },
  "text/markdown": { "source": "iana", "compressible": true, "extensions": ["markdown", "md"] },
  "text/mathml": { "source": "nginx", "extensions": ["mml"] },
  "text/mdx": { "compressible": true, "extensions": ["mdx"] },
  "text/mizar": { "source": "iana" },
  "text/n3": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["n3"] },
  "text/parameters": { "source": "iana", "charset": "UTF-8" },
  "text/parityfec": { "source": "iana" },
  "text/plain": { "source": "iana", "compressible": true, "extensions": ["txt", "text", "conf", "def", "list", "log", "in", "ini"] },
  "text/provenance-notation": { "source": "iana", "charset": "UTF-8" },
  "text/prs.fallenstein.rst": { "source": "iana" },
  "text/prs.lines.tag": { "source": "iana", "extensions": ["dsc"] },
  "text/prs.prop.logic": { "source": "iana" },
  "text/raptorfec": { "source": "iana" },
  "text/red": { "source": "iana" },
  "text/rfc822-headers": { "source": "iana" },
  "text/richtext": { "source": "iana", "compressible": true, "extensions": ["rtx"] },
  "text/rtf": { "source": "iana", "compressible": true, "extensions": ["rtf"] },
  "text/rtp-enc-aescm128": { "source": "iana" },
  "text/rtploopback": { "source": "iana" },
  "text/rtx": { "source": "iana" },
  "text/sgml": { "source": "iana", "extensions": ["sgml", "sgm"] },
  "text/shaclc": { "source": "iana" },
  "text/shex": { "source": "iana", "extensions": ["shex"] },
  "text/slim": { "extensions": ["slim", "slm"] },
  "text/spdx": { "source": "iana", "extensions": ["spdx"] },
  "text/strings": { "source": "iana" },
  "text/stylus": { "extensions": ["stylus", "styl"] },
  "text/t140": { "source": "iana" },
  "text/tab-separated-values": { "source": "iana", "compressible": true, "extensions": ["tsv"] },
  "text/troff": { "source": "iana", "extensions": ["t", "tr", "roff", "man", "me", "ms"] },
  "text/turtle": { "source": "iana", "charset": "UTF-8", "extensions": ["ttl"] },
  "text/ulpfec": { "source": "iana" },
  "text/uri-list": { "source": "iana", "compressible": true, "extensions": ["uri", "uris", "urls"] },
  "text/vcard": { "source": "iana", "compressible": true, "extensions": ["vcard"] },
  "text/vnd.a": { "source": "iana" },
  "text/vnd.abc": { "source": "iana" },
  "text/vnd.ascii-art": { "source": "iana" },
  "text/vnd.curl": { "source": "iana", "extensions": ["curl"] },
  "text/vnd.curl.dcurl": { "source": "apache", "extensions": ["dcurl"] },
  "text/vnd.curl.mcurl": { "source": "apache", "extensions": ["mcurl"] },
  "text/vnd.curl.scurl": { "source": "apache", "extensions": ["scurl"] },
  "text/vnd.debian.copyright": { "source": "iana", "charset": "UTF-8" },
  "text/vnd.dmclientscript": { "source": "iana" },
  "text/vnd.dvb.subtitle": { "source": "iana", "extensions": ["sub"] },
  "text/vnd.esmertec.theme-descriptor": { "source": "iana", "charset": "UTF-8" },
  "text/vnd.familysearch.gedcom": { "source": "iana", "extensions": ["ged"] },
  "text/vnd.ficlab.flt": { "source": "iana" },
  "text/vnd.fly": { "source": "iana", "extensions": ["fly"] },
  "text/vnd.fmi.flexstor": { "source": "iana", "extensions": ["flx"] },
  "text/vnd.gml": { "source": "iana" },
  "text/vnd.graphviz": { "source": "iana", "extensions": ["gv"] },
  "text/vnd.hans": { "source": "iana" },
  "text/vnd.hgl": { "source": "iana" },
  "text/vnd.in3d.3dml": { "source": "iana", "extensions": ["3dml"] },
  "text/vnd.in3d.spot": { "source": "iana", "extensions": ["spot"] },
  "text/vnd.iptc.newsml": { "source": "iana" },
  "text/vnd.iptc.nitf": { "source": "iana" },
  "text/vnd.latex-z": { "source": "iana" },
  "text/vnd.motorola.reflex": { "source": "iana" },
  "text/vnd.ms-mediapackage": { "source": "iana" },
  "text/vnd.net2phone.commcenter.command": { "source": "iana" },
  "text/vnd.radisys.msml-basic-layout": { "source": "iana" },
  "text/vnd.senx.warpscript": { "source": "iana" },
  "text/vnd.si.uricatalogue": { "source": "iana" },
  "text/vnd.sosi": { "source": "iana" },
  "text/vnd.sun.j2me.app-descriptor": { "source": "iana", "charset": "UTF-8", "extensions": ["jad"] },
  "text/vnd.trolltech.linguist": { "source": "iana", "charset": "UTF-8" },
  "text/vnd.wap.si": { "source": "iana" },
  "text/vnd.wap.sl": { "source": "iana" },
  "text/vnd.wap.wml": { "source": "iana", "extensions": ["wml"] },
  "text/vnd.wap.wmlscript": { "source": "iana", "extensions": ["wmls"] },
  "text/vtt": { "source": "iana", "charset": "UTF-8", "compressible": true, "extensions": ["vtt"] },
  "text/x-asm": { "source": "apache", "extensions": ["s", "asm"] },
  "text/x-c": { "source": "apache", "extensions": ["c", "cc", "cxx", "cpp", "h", "hh", "dic"] },
  "text/x-component": { "source": "nginx", "extensions": ["htc"] },
  "text/x-fortran": { "source": "apache", "extensions": ["f", "for", "f77", "f90"] },
  "text/x-gwt-rpc": { "compressible": true },
  "text/x-handlebars-template": { "extensions": ["hbs"] },
  "text/x-java-source": { "source": "apache", "extensions": ["java"] },
  "text/x-jquery-tmpl": { "compressible": true },
  "text/x-lua": { "extensions": ["lua"] },
  "text/x-markdown": { "compressible": true, "extensions": ["mkd"] },
  "text/x-nfo": { "source": "apache", "extensions": ["nfo"] },
  "text/x-opml": { "source": "apache", "extensions": ["opml"] },
  "text/x-org": { "compressible": true, "extensions": ["org"] },
  "text/x-pascal": { "source": "apache", "extensions": ["p", "pas"] },
  "text/x-processing": { "compressible": true, "extensions": ["pde"] },
  "text/x-sass": { "extensions": ["sass"] },
  "text/x-scss": { "extensions": ["scss"] },
  "text/x-setext": { "source": "apache", "extensions": ["etx"] },
  "text/x-sfv": { "source": "apache", "extensions": ["sfv"] },
  "text/x-suse-ymp": { "compressible": true, "extensions": ["ymp"] },
  "text/x-uuencode": { "source": "apache", "extensions": ["uu"] },
  "text/x-vcalendar": { "source": "apache", "extensions": ["vcs"] },
  "text/x-vcard": { "source": "apache", "extensions": ["vcf"] },
  "text/xml": { "source": "iana", "compressible": true, "extensions": ["xml"] },
  "text/xml-external-parsed-entity": { "source": "iana" },
  "text/yaml": { "compressible": true, "extensions": ["yaml", "yml"] },
  "video/1d-interleaved-parityfec": { "source": "iana" },
  "video/3gpp": { "source": "iana", "extensions": ["3gp", "3gpp"] },
  "video/3gpp-tt": { "source": "iana" },
  "video/3gpp2": { "source": "iana", "extensions": ["3g2"] },
  "video/av1": { "source": "iana" },
  "video/bmpeg": { "source": "iana" },
  "video/bt656": { "source": "iana" },
  "video/celb": { "source": "iana" },
  "video/dv": { "source": "iana" },
  "video/encaprtp": { "source": "iana" },
  "video/ffv1": { "source": "iana" },
  "video/flexfec": { "source": "iana" },
  "video/h261": { "source": "iana", "extensions": ["h261"] },
  "video/h263": { "source": "iana", "extensions": ["h263"] },
  "video/h263-1998": { "source": "iana" },
  "video/h263-2000": { "source": "iana" },
  "video/h264": { "source": "iana", "extensions": ["h264"] },
  "video/h264-rcdo": { "source": "iana" },
  "video/h264-svc": { "source": "iana" },
  "video/h265": { "source": "iana" },
  "video/iso.segment": { "source": "iana", "extensions": ["m4s"] },
  "video/jpeg": { "source": "iana", "extensions": ["jpgv"] },
  "video/jpeg2000": { "source": "iana" },
  "video/jpm": { "source": "apache", "extensions": ["jpm", "jpgm"] },
  "video/jxsv": { "source": "iana" },
  "video/mj2": { "source": "iana", "extensions": ["mj2", "mjp2"] },
  "video/mp1s": { "source": "iana" },
  "video/mp2p": { "source": "iana" },
  "video/mp2t": { "source": "iana", "extensions": ["ts"] },
  "video/mp4": { "source": "iana", "compressible": false, "extensions": ["mp4", "mp4v", "mpg4"] },
  "video/mp4v-es": { "source": "iana" },
  "video/mpeg": { "source": "iana", "compressible": false, "extensions": ["mpeg", "mpg", "mpe", "m1v", "m2v"] },
  "video/mpeg4-generic": { "source": "iana" },
  "video/mpv": { "source": "iana" },
  "video/nv": { "source": "iana" },
  "video/ogg": { "source": "iana", "compressible": false, "extensions": ["ogv"] },
  "video/parityfec": { "source": "iana" },
  "video/pointer": { "source": "iana" },
  "video/quicktime": { "source": "iana", "compressible": false, "extensions": ["qt", "mov"] },
  "video/raptorfec": { "source": "iana" },
  "video/raw": { "source": "iana" },
  "video/rtp-enc-aescm128": { "source": "iana" },
  "video/rtploopback": { "source": "iana" },
  "video/rtx": { "source": "iana" },
  "video/scip": { "source": "iana" },
  "video/smpte291": { "source": "iana" },
  "video/smpte292m": { "source": "iana" },
  "video/ulpfec": { "source": "iana" },
  "video/vc1": { "source": "iana" },
  "video/vc2": { "source": "iana" },
  "video/vnd.cctv": { "source": "iana" },
  "video/vnd.dece.hd": { "source": "iana", "extensions": ["uvh", "uvvh"] },
  "video/vnd.dece.mobile": { "source": "iana", "extensions": ["uvm", "uvvm"] },
  "video/vnd.dece.mp4": { "source": "iana" },
  "video/vnd.dece.pd": { "source": "iana", "extensions": ["uvp", "uvvp"] },
  "video/vnd.dece.sd": { "source": "iana", "extensions": ["uvs", "uvvs"] },
  "video/vnd.dece.video": { "source": "iana", "extensions": ["uvv", "uvvv"] },
  "video/vnd.directv.mpeg": { "source": "iana" },
  "video/vnd.directv.mpeg-tts": { "source": "iana" },
  "video/vnd.dlna.mpeg-tts": { "source": "iana" },
  "video/vnd.dvb.file": { "source": "iana", "extensions": ["dvb"] },
  "video/vnd.fvt": { "source": "iana", "extensions": ["fvt"] },
  "video/vnd.hns.video": { "source": "iana" },
  "video/vnd.iptvforum.1dparityfec-1010": { "source": "iana" },
  "video/vnd.iptvforum.1dparityfec-2005": { "source": "iana" },
  "video/vnd.iptvforum.2dparityfec-1010": { "source": "iana" },
  "video/vnd.iptvforum.2dparityfec-2005": { "source": "iana" },
  "video/vnd.iptvforum.ttsavc": { "source": "iana" },
  "video/vnd.iptvforum.ttsmpeg2": { "source": "iana" },
  "video/vnd.motorola.video": { "source": "iana" },
  "video/vnd.motorola.videop": { "source": "iana" },
  "video/vnd.mpegurl": { "source": "iana", "extensions": ["mxu", "m4u"] },
  "video/vnd.ms-playready.media.pyv": { "source": "iana", "extensions": ["pyv"] },
  "video/vnd.nokia.interleaved-multimedia": { "source": "iana" },
  "video/vnd.nokia.mp4vr": { "source": "iana" },
  "video/vnd.nokia.videovoip": { "source": "iana" },
  "video/vnd.objectvideo": { "source": "iana" },
  "video/vnd.radgamettools.bink": { "source": "iana" },
  "video/vnd.radgamettools.smacker": { "source": "iana" },
  "video/vnd.sealed.mpeg1": { "source": "iana" },
  "video/vnd.sealed.mpeg4": { "source": "iana" },
  "video/vnd.sealed.swf": { "source": "iana" },
  "video/vnd.sealedmedia.softseal.mov": { "source": "iana" },
  "video/vnd.uvvu.mp4": { "source": "iana", "extensions": ["uvu", "uvvu"] },
  "video/vnd.vivo": { "source": "iana", "extensions": ["viv"] },
  "video/vnd.youtube.yt": { "source": "iana" },
  "video/vp8": { "source": "iana" },
  "video/vp9": { "source": "iana" },
  "video/webm": { "source": "apache", "compressible": false, "extensions": ["webm"] },
  "video/x-f4v": { "source": "apache", "extensions": ["f4v"] },
  "video/x-fli": { "source": "apache", "extensions": ["fli"] },
  "video/x-flv": { "source": "apache", "compressible": false, "extensions": ["flv"] },
  "video/x-m4v": { "source": "apache", "extensions": ["m4v"] },
  "video/x-matroska": { "source": "apache", "compressible": false, "extensions": ["mkv", "mk3d", "mks"] },
  "video/x-mng": { "source": "apache", "extensions": ["mng"] },
  "video/x-ms-asf": { "source": "apache", "extensions": ["asf", "asx"] },
  "video/x-ms-vob": { "source": "apache", "extensions": ["vob"] },
  "video/x-ms-wm": { "source": "apache", "extensions": ["wm"] },
  "video/x-ms-wmv": { "source": "apache", "compressible": false, "extensions": ["wmv"] },
  "video/x-ms-wmx": { "source": "apache", "extensions": ["wmx"] },
  "video/x-ms-wvx": { "source": "apache", "extensions": ["wvx"] },
  "video/x-msvideo": { "source": "apache", "extensions": ["avi"] },
  "video/x-sgi-movie": { "source": "apache", "extensions": ["movie"] },
  "video/x-smv": { "source": "apache", "extensions": ["smv"] },
  "x-conference/x-cooltalk": { "source": "apache", "extensions": ["ice"] },
  "x-shader/x-fragment": { "compressible": true },
  "x-shader/x-vertex": { "compressible": true }
};
/*!
 * mime-db
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015-2022 Douglas Christopher Wilson
 * MIT Licensed
 */
var mimeDb;
var hasRequiredMimeDb;
function requireMimeDb() {
  if (hasRequiredMimeDb) return mimeDb;
  hasRequiredMimeDb = 1;
  mimeDb = require$$0;
  return mimeDb;
}
/*!
 * mime-types
 * Copyright(c) 2014 Jonathan Ong
 * Copyright(c) 2015 Douglas Christopher Wilson
 * MIT Licensed
 */
var hasRequiredReactNativeMimeTypes;
function requireReactNativeMimeTypes() {
  if (hasRequiredReactNativeMimeTypes) return reactNativeMimeTypes;
  hasRequiredReactNativeMimeTypes = 1;
  (function(exports2) {
    var db = requireMimeDb();
    const extname = function(path) {
      if (!path || path.indexOf(".") === -1) {
        return "";
      }
      path = "." + path.split(".").pop().toLowerCase();
      return /.*(\..*)/g.exec(path)[1] || "";
    };
    var extractTypeRegExp = /^\s*([^;\s]*)(?:;|\s|$)/;
    var textTypeRegExp = /^text\//i;
    exports2.charset = charset;
    exports2.charsets = { lookup: charset };
    exports2.contentType = contentType;
    exports2.extension = extension;
    exports2.extensions = /* @__PURE__ */ Object.create(null);
    exports2.lookup = lookup2;
    exports2.types = /* @__PURE__ */ Object.create(null);
    populateMaps(exports2.extensions, exports2.types);
    function charset(type2) {
      if (!type2 || typeof type2 !== "string") {
        return false;
      }
      var match2 = extractTypeRegExp.exec(type2);
      var mime = match2 && db[match2[1].toLowerCase()];
      if (mime && mime.charset) {
        return mime.charset;
      }
      if (match2 && textTypeRegExp.test(match2[1])) {
        return "UTF-8";
      }
      return false;
    }
    function contentType(str) {
      if (!str || typeof str !== "string") {
        return false;
      }
      var mime = str.indexOf("/") === -1 ? exports2.lookup(str) : str;
      if (!mime) {
        return false;
      }
      if (mime.indexOf("charset") === -1) {
        var charset2 = exports2.charset(mime);
        if (charset2) mime += "; charset=" + charset2.toLowerCase();
      }
      return mime;
    }
    function extension(type2) {
      if (!type2 || typeof type2 !== "string") {
        return false;
      }
      var match2 = extractTypeRegExp.exec(type2);
      var exts = match2 && exports2.extensions[match2[1].toLowerCase()];
      if (!exts || !exts.length) {
        return false;
      }
      return exts[0];
    }
    function lookup2(path) {
      if (!path || typeof path !== "string") {
        return false;
      }
      var extension2 = extname("x." + path).toLowerCase().substr(1);
      if (!extension2) {
        return false;
      }
      return exports2.types[extension2] || false;
    }
    function populateMaps(extensions, types) {
      var preference = ["nginx", "apache", void 0, "iana"];
      Object.keys(db).forEach(function forEachMimeType(type2) {
        var mime = db[type2];
        var exts = mime.extensions;
        if (!exts || !exts.length) {
          return;
        }
        extensions[type2] = exts;
        for (var i = 0; i < exts.length; i++) {
          var extension2 = exts[i];
          if (types[extension2]) {
            var from2 = preference.indexOf(db[types[extension2]].source);
            var to = preference.indexOf(mime.source);
            if (types[extension2] !== "application/octet-stream" && from2 > to || from2 === to && types[extension2].substr(0, 12) === "application/") {
              continue;
            }
          }
          types[extension2] = type2;
        }
      });
    }
  })(reactNativeMimeTypes);
  return reactNativeMimeTypes;
}
var reactNativeMimeTypesExports = requireReactNativeMimeTypes();
var ArrowForwardIosSharp = {};
var hasRequiredArrowForwardIosSharp;
function requireArrowForwardIosSharp() {
  if (hasRequiredArrowForwardIosSharp) return ArrowForwardIosSharp;
  hasRequiredArrowForwardIosSharp = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ArrowForwardIosSharp, "__esModule", {
    value: true
  });
  ArrowForwardIosSharp.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ArrowForwardIosSharp.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M6.23 20.23 8 22l10-10L8 2 6.23 3.77 14.46 12z"
  }), "ArrowForwardIosSharp");
  return ArrowForwardIosSharp;
}
var ArrowForwardIosSharpExports = /* @__PURE__ */ requireArrowForwardIosSharp();
const ArrowForwardIosSharpIcon = /* @__PURE__ */ getDefaultExportFromCjs(ArrowForwardIosSharpExports);
var smart_tabs = {};
var hasRequiredSmart_tabs;
function requireSmart_tabs() {
  if (hasRequiredSmart_tabs) return smart_tabs;
  hasRequiredSmart_tabs = 1;
  (() => {
    var __webpack_modules__ = {
      /***/
      2612: (
        /***/
        () => {
          Smart("smart-button", class extends Smart.ContentElement {
            static get properties() {
              return { value: { type: "string" }, name: { type: "string" }, type: { value: "button", type: "string" }, clickMode: { allowedValues: ["hover", "press", "release", "pressAndRelease"], type: "string", value: "release" } };
            }
            static get styleUrls() {
              return ["smart.button.css"];
            }
            template() {
              return `<button class="smart-button smart-unselectable" inner-h-t-m-l='[[innerHTML]]' id='button' type='[[type]]' name='[[name]]' value='[[value]]' disabled='[[disabled]]' role="presentation"></button>`;
            }
            refresh() {
            }
            static get listeners() {
              return { "button.down": "_downHandler", "button.mouseenter": "_mouseEnterHandler", "button.mouseleave": "_mouseLeaveHandler", "button.touchend": "_touchEndHandler", "button.click": "_clickHandler", "button.up": "_upHandler", up: "_upHandler", "button.focus": "_focusHandler", "button.blur": "_blurHandler" };
            }
            focus() {
              const e2 = this;
              e2.$.button ? e2.$.button.focus() : HTMLElement.prototype.focus.call(e2);
            }
            blur() {
              const e2 = this;
              e2.$.button ? e2.$.button.blur() : HTMLElement.prototype.blur.call(e2);
            }
            _upHandler(e2) {
              const t = this;
              if (e2.stopPropagation(), t.$.setAttributeValue("active", false), t.dataset.target) {
                const n = document.querySelector(t.dataset.target);
                let a2 = t.dataset.toggle;
                const r2 = "smart-window".toLowerCase();
                if (n && n.nodeName.toLowerCase() === r2 && "modal" === a2 && (a2 = "openModal"), "tab" === a2 || "pill" === a2 || "list" === a2) {
                  const e3 = this.closest(".nav, .list-group"), a3 = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', r3 = !e3 || "UL" !== e3.nodeName && "OL" !== e3.nodeName ? e3.children(".active") : e3.querySelectorAll("li > .active");
                  if (e3) {
                    const n2 = e3.querySelectorAll(a3);
                    for (let e4 = 0; e4 < n2.length; e4++) n2[e4].classList.remove("primary");
                    for (let e4 = 0; e4 < r3.length; e4++) r3[e4].classList.remove("active");
                    let i = t.parentNode;
                    for (; i; ) {
                      if ("LI" === i.nodeName) {
                        i.classList.add("active");
                        break;
                      }
                      i = i.parentNode;
                    }
                    t.classList.add("primary");
                  }
                  return n.parentNode.querySelectorAll(".active").forEach((e4) => {
                    e4.classList.remove("active"), e4.classList.add("smart-hidden");
                  }), n.classList.add("active"), void n.classList.remove("smart-hidden");
                }
                a2 && n && !n[a2] && "collapse" === a2 && (setTimeout(() => {
                  n.classList.contains("smart-hidden") ? n.classList.remove("smart-hidden") : n.classList.add("smart-hidden");
                }), e2.originalEvent.preventDefault()), a2 && n && !n[a2] && "dropdown" === a2 ? (setTimeout(() => {
                  n.opened = !n.opened;
                }), e2.originalEvent.preventDefault()) : a2 && n && n[a2] && (setTimeout(() => {
                  n[a2]();
                }, 50), e2.originalEvent.preventDefault());
              }
            }
            _focusHandler() {
              this.$.setAttributeValue("focus", true), this.$.fireEvent("focus");
            }
            _blurHandler() {
              this.$.setAttributeValue("focus", false), this.$.fireEvent("blur");
            }
            _clickHandler(e2) {
              const t = this;
              ("release" !== t.clickMode && "pressAndRelease" !== t.clickMode || t.readonly) && (e2.preventDefault(), e2.stopPropagation());
            }
            _downHandler(e2) {
              const t = this;
              if (!(t.disabled || (t.hasRippleAnimation && Smart.Utilities.Animation.Ripple.animate(t, e2.pageX, e2.pageY), t.$.setAttributeValue("active", true), "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || t.readonly))) {
                if (t.hasAttribute("smart-blazor")) return void t.$.dispatchEvent(new Event("click"));
                const n = "buttons" in e2 ? e2.buttons : e2.which;
                t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY });
              }
            }
            _mouseEnterHandler(e2) {
              const t = this;
              if (!t.readonly && (t.$button.setAttributeValue("hover", true), t.$.setAttributeValue("hover", true), "hover" === t.clickMode)) {
                const n = "buttons" in e2 ? e2.buttons : e2.which;
                if (t.hasAttribute("smart-blazor")) return void t.$.dispatchEvent(new Event("click"));
                t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY });
              }
            }
            _touchEndHandler() {
              const e2 = this;
              setTimeout(function() {
                e2.$button.setAttributeValue("hover", false), e2.$.setAttributeValue("hover", false);
              }, 300);
            }
            _mouseLeaveHandler() {
              this.$button.setAttributeValue("hover", false), this.$.setAttributeValue("hover", false);
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const a2 = this;
              "disabled" === e2 ? (a2._setFocusable(), a2.$button && a2.$button.setAttributeValue("hover", false), a2.$.setAttributeValue("hover", false), a2 instanceof Smart.RepeatButton && a2._stopRepeat()) : "unfocusable" === e2 && a2._setFocusable();
            }
            _setFocusable() {
              const e2 = this, t = e2.$.button ? e2.$.button : e2;
              if (e2.disabled || e2.unfocusable) return t.removeAttribute("tabindex"), void (t.tabIndex = -1);
              t.tabIndex = e2.tabIndex > 0 ? e2.tabIndex : 0;
            }
            ready() {
              const e2 = this;
              super.ready(), e2.setAttribute("role", "button"), e2._setFocusable(), e2.enableShadowDOM && e2.$.hiddenInput && e2.appendChild(e2.$.hiddenInput);
            }
          }), Smart("smart-repeat-button", class extends Smart.Button {
            static get properties() {
              return { delay: { value: 50, type: "number" }, initialDelay: { value: 150, type: "number" } };
            }
            static get listeners() {
              return { "button.down": "_startRepeat", "button.mouseenter": "_overriddenHandler", "button.mouseleave": "_overriddenHandler", "button.pointerenter": "_updateInBoundsFlag", "button.pointerleave": "_updateInBoundsFlag", "button.touchmove": "_touchmoveHandler", "document.up": "_stopRepeat" };
            }
            _clickHandler(e2) {
              const t = this;
              ("release" !== t.clickMode || t.preventDefaultClick || t.readonly || t.disabled) && (e2.preventDefault(), e2.stopPropagation(), t.preventDefaultClick = false);
            }
            _updateInBoundsFlag(e2) {
              const t = this;
              -1 !== e2.type.indexOf("leave") ? (t._isPointerInBounds = false, t.$button.setAttributeValue("hover", false), t.$.setAttributeValue("hover", false)) : (t._isPointerInBounds = true, t.$button.setAttributeValue("hover", true), t.$.setAttributeValue("hover", true)), 1 !== ("buttons" in e2 ? e2.buttons : e2.which) && t._stopRepeat(e2);
            }
            _startRepeat(e2) {
              const t = this;
              t.setAttribute("active", ""), t._initialTimer || t.readonly || (t._initialTimer = setTimeout(function() {
                t._repeatTimer = setInterval(() => {
                  if (t._isPointerInBounds) {
                    if (t.hasAttribute("smart-blazor")) return t.$.dispatchEvent(new Event("click")), void (t.preventDefaultClick = true);
                    const n = "buttons" in e2 ? e2.buttons : e2.which;
                    t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY }), t.preventDefaultClick = true;
                  }
                }, t.delay);
              }, t.initialDelay));
            }
            _stopRepeat(e2) {
              const t = this;
              t.readonly || e2 && ("pointercancel" === e2.type || e2.originalEvent && "pointercancel" === e2.originalEvent.type) || (t.$.setAttributeValue("active", false), t._repeatTimer && (clearInterval(t._repeatTimer), t._repeatTimer = null), t._initialTimer && (clearTimeout(t._initialTimer), t._initialTimer = null));
            }
            _touchmoveHandler(e2) {
              this.preventDefaultClick && e2.cancelable && (e2.preventDefault(), e2.stopPropagation());
            }
            _overriddenHandler() {
            }
          }), Smart("smart-toggle-button", class extends Smart.Button {
            static get properties() {
              return { checked: { value: false, type: "boolean?" }, falseContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminateContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminate: { value: false, type: "boolean" }, trueContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminateTemplate: { value: null, type: "any" }, trueTemplate: { value: null, type: "any" }, falseTemplate: { value: null, type: "any" }, type: { value: "toggle", type: "string", defaultReflectToAttribute: true, readonly: true } };
            }
            static get listeners() {
              return { keydown: "_keyHandler", keyup: "_keyHandler", dragstart: "_dragStartHandler", "button.click": "_buttonClickHandler", "button.mouseenter": "_buttonMouseEnterHandler", "button.mouseleave": "_buttonMouseLeaveHandler", "document.up": "_documentUpHandler" };
            }
            ready() {
              super.ready(), this._setAriaState();
            }
            _setAriaState() {
              const e2 = this, t = e2.checked;
              null !== t ? e2.setAttribute("aria-pressed", t) : e2.setAttribute("aria-pressed", "mixed");
            }
            _buttonClickHandler() {
            }
            _buttonMouseLeaveHandler() {
              this.removeAttribute("hover");
            }
            _buttonMouseEnterHandler() {
              const e2 = this;
              e2.setAttribute("hover", ""), e2.disabled || e2.readonly || "hover" !== e2.clickMode || (e2._changeCheckState("pointer"), e2.focus(), e2._updateHidenInputNameAndValue());
            }
            _documentUpHandler(e2) {
              const t = this;
              t._pressed && (t._pressed = false, t.disabled || t.readonly || "press" === t.clickMode || "pointercancel" === e2.originalEvent.type || (t._changeCheckState("pointer"), t.focus(), t._updateHidenInputNameAndValue()));
            }
            _downHandler(e2) {
              const t = this;
              t.disabled || t.readonly || (t.hasRippleAnimation && Smart.Utilities.Animation.Ripple.animate(t, e2.pageX, e2.pageY), t._pressed = true, "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || (t._changeCheckState("pointer"), t.hasAttribute("smart-blazor") ? t.$.dispatchEvent(new Event("click")) : t.$.fireEvent("click"), t._updateHidenInputNameAndValue()), "press" === t.clickMode && (e2.preventDefault(), e2.stopPropagation()));
            }
            _dragStartHandler(e2) {
              e2.preventDefault();
            }
            _keyHandler(e2) {
              const t = this;
              if (true !== t.disabled && !t.readonly && 32 === e2.keyCode) {
                if ("keydown" === e2.type) return void e2.preventDefault();
                if ("none" === t.switchMode) return;
                t._changeCheckState("keyboard"), t._updateHidenInputNameAndValue();
              }
            }
            _changeCheckState(e2) {
              const t = this;
              let n = null;
              null === t.checked ? t.checked = true : (n = t.checked, t.checked = !t.checked), t._handleTextSelection(), t.$.fireEvent("change", { value: t.checked, oldValue: n, changeType: e2 }), t.checked ? t.$.fireEvent("checkValue", { changeType: e2 }) : t.$.fireEvent("uncheckValue", { changeType: e2 }), t._setAriaState();
            }
            _handleTextSelection() {
              const e2 = this;
              e2.$.addClass("smart-unselectable"), e2.timer && clearTimeout(e2.timer), e2.timer = setTimeout(() => e2.$.removeClass("smart-unselectable"), 500);
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const a2 = this;
              if ("checked" === e2) return a2.$.fireEvent("change", { value: n, oldValue: t, changeType: "api" }), void a2._setAriaState();
              switch (e2) {
                case "trueTemplate":
                  a2._handleTemplate(true);
                  break;
                case "falseTemplate":
                  a2._handleTemplate(false);
                  break;
                case "indeterminateTemplate":
                  a2._handleTemplate();
              }
            }
            _htmlBindOnInitialization() {
              const e2 = this;
              e2._bindContentProperty("trueContent", "smart-true-content"), e2._bindContentProperty("falseContent", "smart-false-content"), e2._bindContentProperty("indeterminateContent", "smart-indeterminate-content");
            }
            _bindContentProperty(e2, t) {
              const n = this;
              if (!n.$[e2 + "Container"]) return;
              let a2 = document.createElement("div");
              a2.innerHTML = n.innerHTML;
              let r2, i = a2.getElementsByClassName(t);
              if (i.length > 0) for (let e3 = 0; e3 < i.length; e3++) r2 = i[e3];
              "" === n[e2] && (n[e2] = void 0 === r2 ? "" : r2.outerHTML), n.$[e2 + "Container"].innerHTML = n[e2];
            }
            _updateContentProperties() {
              const e2 = this;
              function t(t2) {
                e2.$[t2 + "Container"] && (e2[t2] = e2.$[t2 + "Container"].innerHTML);
              }
              t("trueContent"), t("falseContent"), t("indeterminateContent");
            }
            _updateHidenInputValue() {
              const e2 = this;
              if (!e2.$.hiddenInput) return;
              let t;
              t = null === e2.checked ? "null" : false === e2.checked ? "off" : e2.value || "on", e2.$.hiddenInput.setAttribute("value", t);
            }
            _updateHidenInputName() {
              const e2 = this;
              if (!e2.$.hiddenInput) return;
              let t = false === e2.checked ? "" : e2.name || "";
              e2.$.hiddenInput.setAttribute("name", t);
            }
            _updateHidenInputNameAndValue() {
              this._updateHidenInputName(), this._updateHidenInputValue();
            }
            _handleTemplate(e2, t) {
              const n = this;
              let a2, r2, i;
              if (true === e2 ? (a2 = n.trueTemplate, r2 = n.$.trueContentContainer, i = n.trueContent) : false === e2 ? (a2 = n.falseTemplate, r2 = n.$.falseContentContainer, i = n.falseContent) : (a2 = n.indeterminateTemplate, r2 = n.$.indeterminateContentContainer, i = n.indeterminateContent), t && (r2.innerHTML = i || ""), null === a2 || !a2) return;
              if ("function" == typeof a2) return void a2(r2, { value: i });
              if (!("content" in document.createElement("template"))) return void n.error(n.localize("htmlTemplateNotSuported", { elementType: n.nodeName.toLowerCase() }));
              if (a2 = document.getElementById(a2), null === a2 || !("content" in a2)) return void n.error(n.localize("invalidTemplate", { elementType: n.nodeName.toLowerCase(), property: "template" }));
              const l = a2.content, o = l.childNodes.length, s = /{{\w+}}/g;
              let u2, d2 = [];
              for (let e3 = 0; e3 < o; e3++) for (u2 = s.exec(l.childNodes[e3].innerHTML); u2; ) d2.push({ childNodeIndex: e3, bindingString: u2[0] }), u2 = s.exec(l.childNodes[e3].innerHTML);
              const c = d2.length;
              let p2, h2, m2 = document.importNode(a2.content, true);
              for (let e3 = 0; e3 < c; e3++) {
                p2 = m2.childNodes[d2[e3].childNodeIndex], h2 = d2.length;
                for (let t2 = 0; t2 < h2; t2++) p2.innerHTML = p2.innerHTML.replace(d2[e3].bindingString, i);
              }
              r2.innerHTML = "";
              for (let e3 = 0; e3 < m2.childNodes.length; e3++) m2.childNodes[e3].outerHTML && (r2.innerHTML += m2.childNodes[e3].outerHTML);
            }
          });
        }
      ),
      /***/
      6321: (
        /***/
        () => {
          !function() {
            const e2 = "11.0.0", t = [];
            let n = "Smart";
            if (window[n] && window[n].Version) {
              if (window[n].Version === e2) return;
              if (window[n].Version !== e2) n += e2;
              else {
                let e3 = 2;
                for (; window[n]; ) n += e3.toString(), e3++;
              }
            }
            const o = navigator.userAgent.indexOf("Edge") > -1 && navigator.appVersion.indexOf("Edge") > -1;
            document.elementsFromPoint || (document.elementsFromPoint = document.msElementsFromPoint);
            class r2 {
              static isBoolean(e3) {
                return "boolean" == typeof e3;
              }
              static isFunction(e3) {
                return !!(e3 && e3.constructor && e3.call && e3.apply);
              }
              static isArray(e3) {
                return Array.isArray(e3);
              }
              static isObject(e3) {
                return e3 && ("object" == typeof e3 || this.isFunction(e3)) || false;
              }
              static isDate(e3) {
                return e3 instanceof Date;
              }
              static isString(e3) {
                return "string" == typeof e3;
              }
              static isNumber(e3) {
                return "number" == typeof e3;
              }
              static getType(e3) {
                const t2 = this, n2 = ["Boolean", "Number", "String", "Function", "Array", "Date", "Object"].find((n3) => {
                  if (t2["is" + n3](e3)) return n3;
                });
                return n2 ? n2.toLowerCase() : void 0;
              }
            }
            class i {
              static animate(e3, t2, o2, r3) {
                const i2 = e3;
                if (!i2 || i2 instanceof HTMLElement == 0) return;
                if (0 === i2.getElementsByClassName("smart-ripple").length) {
                  const e4 = document.createElement("span");
                  e4.classList.add("smart-ripple"), e4.setAttribute("role", "presentation");
                  let t3 = true, o3 = null;
                  if (window[n].EnableShadowDOM && i2.enableShadowDOM && true !== i2.isInShadowDOM) {
                    for (let e5 = 0; e5 < i2.shadowRoot.host.shadowRoot.children.length; e5++) "link" !== i2.shadowRoot.host.shadowRoot.children[e5].tagName.toLowerCase() && (o3 = i2.shadowRoot.host.shadowRoot.children[e5]);
                    i2.shadowRoot.host.shadowRoot.querySelector(".smart-ripple") && (t3 = false);
                  } else o3 = i2.firstElementChild;
                  t3 && (o3 && !o3.noRipple && o3.offsetHeight > 0 ? o3.appendChild(e4) : i2.appendChild(e4));
                }
                let s2 = null;
                if (s2 = window[n].EnableShadowDOM && i2.shadowRoot ? i2.shadowRoot.host.shadowRoot.querySelector(".smart-ripple") : i2.getElementsByClassName("smart-ripple")[0], !s2) return;
                s2.innerHTML = "", s2.classList.remove("smart-animate"), s2.style.height = s2.style.width = Math.max(i2.offsetHeight, i2.offsetWidth) + "px";
                const a3 = window.getComputedStyle(s2.parentElement), l2 = parseInt(a3.borderLeftWidth) || 0, d3 = parseInt(a3.borderTopWidth) || 0, c2 = i2.getBoundingClientRect(), u3 = t2 - (c2.left + window.pageXOffset) - s2.offsetWidth / 2 - l2, p3 = o2 - (c2.top + window.pageYOffset) - s2.offsetHeight / 2 - d3;
                s2.style.left = u3 + "px", s2.style.top = p3 + "px", s2.classList.add("smart-animate"), s2.addEventListener("animationend", function e4() {
                  s2.parentElement && s2.parentElement.removeChild(s2), r3 && r3(), s2.removeEventListener("animationend", e4), s2.removeEventListener("animationcancel", e4);
                }), s2.addEventListener("animationcancel", function e4() {
                  s2.parentElement && s2.parentElement.removeChild(s2), r3 && r3(), s2.removeEventListener("animationcancel", e4), s2.removeEventListener("animationend", e4);
                });
              }
            }
            class s {
              static easeInQuad(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 + t2;
              }
              static easeOutQuad(e3, t2, n2, o2) {
                return -n2 * (e3 /= o2) * (e3 - 2) + t2;
              }
              static easeInOutQuad(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 + t2 : -n2 / 2 * (--e3 * (e3 - 2) - 1) + t2;
              }
              static easeInCubic(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 + t2;
              }
              static easeOutCubic(e3, t2, n2, o2) {
                return n2 * ((e3 = e3 / o2 - 1) * e3 * e3 + 1) + t2;
              }
              static easeInOutCubic(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 + t2 : n2 / 2 * ((e3 -= 2) * e3 * e3 + 2) + t2;
              }
              static easeInQuart(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 * e3 + t2;
              }
              static easeOutQuart(e3, t2, n2, o2) {
                return -n2 * ((e3 = e3 / o2 - 1) * e3 * e3 * e3 - 1) + t2;
              }
              static easeInOutQuart(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 * e3 + t2 : -n2 / 2 * ((e3 -= 2) * e3 * e3 * e3 - 2) + t2;
              }
              static easeInQuint(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 * e3 * e3 + t2;
              }
              static easeOutQuint(e3, t2, n2, o2) {
                return n2 * ((e3 = e3 / o2 - 1) * e3 * e3 * e3 * e3 + 1) + t2;
              }
              static easeInOutQuint(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 * e3 * e3 + t2 : n2 / 2 * ((e3 -= 2) * e3 * e3 * e3 * e3 + 2) + t2;
              }
              static easeInSine(e3, t2, n2, o2) {
                return -n2 * Math.cos(e3 / o2 * (Math.PI / 2)) + n2 + t2;
              }
              static easeOutSine(e3, t2, n2, o2) {
                return n2 * Math.sin(e3 / o2 * (Math.PI / 2)) + t2;
              }
              static easeInOutSine(e3, t2, n2, o2) {
                return -n2 / 2 * (Math.cos(Math.PI * e3 / o2) - 1) + t2;
              }
              static easeInExpo(e3, t2, n2, o2) {
                return 0 === e3 ? t2 : n2 * Math.pow(2, 10 * (e3 / o2 - 1)) + t2;
              }
              static easeOutExpo(e3, t2, n2, o2) {
                return e3 === o2 ? t2 + n2 : n2 * (1 - Math.pow(2, -10 * e3 / o2)) + t2;
              }
              static easeInOutExpo(e3, t2, n2, o2) {
                return 0 === e3 ? t2 : e3 === o2 ? t2 + n2 : (e3 /= o2 / 2) < 1 ? n2 / 2 * Math.pow(2, 10 * (e3 - 1)) + t2 : n2 / 2 * (2 - Math.pow(2, -10 * --e3)) + t2;
              }
              static easeInCirc(e3, t2, n2, o2) {
                return -n2 * (Math.sqrt(1 - (e3 /= o2) * e3) - 1) + t2;
              }
              static easeOutCirc(e3, t2, n2, o2) {
                return n2 * Math.sqrt(1 - (e3 = e3 / o2 - 1) * e3) + t2;
              }
              static easeInOutCirc(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? -n2 / 2 * (Math.sqrt(1 - e3 * e3) - 1) + t2 : n2 / 2 * (Math.sqrt(1 - (e3 -= 2) * e3) + 1) + t2;
              }
              static easeInElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 1 == (e3 /= o2) ? t2 + n2 : (i2 || (i2 = 0.3 * o2), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), -s2 * Math.pow(2, 10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) + t2);
              }
              static easeOutElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 1 == (e3 /= o2) ? t2 + n2 : (i2 || (i2 = 0.3 * o2), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), s2 * Math.pow(2, -10 * e3) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) + n2 + t2);
              }
              static easeInOutElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 2 == (e3 /= o2 / 2) ? t2 + n2 : (i2 || (i2 = o2 * (0.3 * 1.5)), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), e3 < 1 ? s2 * Math.pow(2, 10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) * -0.5 + t2 : s2 * Math.pow(2, -10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) * 0.5 + n2 + t2);
              }
              static easeInBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), n2 * (e3 /= o2) * e3 * ((r3 + 1) * e3 - r3) + t2;
              }
              static easeOutBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), n2 * ((e3 = e3 / o2 - 1) * e3 * ((r3 + 1) * e3 + r3) + 1) + t2;
              }
              static easeInOutBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), (e3 /= o2 / 2) < 1 ? n2 / 2 * (e3 * e3 * ((1 + (r3 *= 1.525)) * e3 - r3)) + t2 : n2 / 2 * ((e3 -= 2) * e3 * ((1 + (r3 *= 1.525)) * e3 + r3) + 2) + t2;
              }
              static easeInBounce(e3, t2, n2, o2) {
                return n2 - this.easeOutBounce(o2 - e3, 0, n2, o2) + t2;
              }
              static easeOutBounce(e3, t2, n2, o2) {
                return (e3 /= o2) < 1 / 2.75 ? n2 * (7.5625 * e3 * e3) + t2 : e3 < 2 / 2.75 ? n2 * (7.5625 * (e3 -= 1.5 / 2.75) * e3 + 0.75) + t2 : e3 < 2.5 / 2.75 ? n2 * (7.5625 * (e3 -= 2.25 / 2.75) * e3 + 0.9375) + t2 : n2 * (7.5625 * (e3 -= 2.625 / 2.75) * e3 + 0.984375) + t2;
              }
              static easeInOutBounce(e3, t2, n2, o2) {
                return e3 < o2 / 2 ? 0.5 * this.easeInBounce(2 * e3, 0, n2, o2) + t2 : 0.5 * this.easeOutBounce(2 * e3 - o2, 0, n2, o2) + 0.5 * n2 + t2;
              }
            }
            class a2 {
              static get isMobile() {
                const e3 = /(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());
                return e3 || ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
              }
              static get Browser() {
                let e3;
                const t2 = function(t3) {
                  let n3 = t3.indexOf(e3);
                  if (-1 === n3) return;
                  const o2 = t3.indexOf("rv:");
                  return "Trident" === e3 && -1 !== o2 ? parseFloat(t3.substring(o2 + 3)) : parseFloat(t3.substring(n3 + e3.length + 1));
                };
                let n2 = {};
                return n2[function() {
                  const t3 = [{ string: navigator.userAgent, subString: "Edge", identity: "Edge" }, { string: navigator.userAgent, subString: "MSIE", identity: "IE" }, { string: navigator.userAgent, subString: "Trident", identity: "IE" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.userAgent, subString: "Opera", identity: "Opera" }, { string: navigator.userAgent, subString: "OPR", identity: "Opera" }, { string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "Safari", identity: "Safari" }];
                  for (let n3 = 0; n3 < t3.length; n3++) {
                    let o2 = t3[n3].string;
                    if (e3 = t3[n3].subString, -1 !== o2.indexOf(t3[n3].subString)) return t3[n3].identity;
                  }
                  return "Other";
                }()] = true, n2.version = t2(navigator.userAgent) || t2(navigator.appVersion) || "Unknown", n2;
              }
              static toCamelCase(e3) {
                return e3.replace(/-([a-z])/g, function(e4) {
                  return e4[1].toUpperCase();
                });
              }
              static toDash(e3) {
                return e3.split(/(?=[A-Z])/).join("-").toLowerCase();
              }
              static unescapeHTML(e3) {
                return new DOMParser().parseFromString(e3, "text/html").documentElement.textContent;
              }
              static escapeHTML(e3) {
                const t2 = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;", "`": "&#x60;", "=": "&#x3D;" };
                return String(e3).replace(/[&<>"'`=\/]/g, (e4) => t2[e4]);
              }
              static sanitizeHTML(e3) {
                if (e3 && (e3.indexOf("onclick") >= 0 || e3.indexOf("onload") >= 0 || e3.indexOf("onerror") >= 0)) return this.escapeHTML(e3);
                const t2 = new RegExp("<s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<s*/s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>", "ig");
                return String(e3).replace(t2, (e4) => this.escapeHTML(e4));
              }
              static createGUID() {
                function e3() {
                  return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                }
                return e3() + e3() + "-" + e3() + "-" + e3() + "-" + e3() + "-" + e3() + e3() + e3();
              }
              static getScriptLocation() {
                return "./" !== window[n].BaseUrl ? window[n].BaseUrl : function() {
                  if (document.currentScript) {
                    let e4 = document.currentScript.src, t3 = e4.lastIndexOf("/");
                    return e4 = e4.substring(0, t3), e4;
                  }
                  const e3 = new Error();
                  let t2 = "(", n2 = ")";
                  if (Smart.Utilities.Core.Browser.Safari && (t2 = "@", n2 = "\n"), e3.fileName) return e3.fileName.replace("/smart.element.js", "");
                  let o2 = e3.stack.split(t2);
                  return o2 = o2[1], o2 = o2.split(n2)[0], o2 = o2.split(":"), o2.splice(-2, 2), o2 = o2.join(":"), o2.replace("/smart.element.js", "");
                }();
              }
              static CSSVariablesSupport() {
                return window.CSS && window.CSS.supports && window.CSS.supports("(--fake-var: 0)");
              }
              static assign(e3, t2) {
                const n2 = (e4) => e4 && "object" == typeof e4 && !Array.isArray(e4) && null !== e4;
                let o2 = Object.assign({}, e3);
                return n2(e3) && n2(t2) && Object.keys(t2).forEach((r3) => {
                  n2(t2[r3]) ? r3 in e3 ? o2[r3] = this.assign(e3[r3], t2[r3]) : Object.assign(o2, { [r3]: t2[r3] }) : Object.assign(o2, { [r3]: t2[r3] });
                }), o2;
              }
              static html(e3, t2) {
                const n2 = this;
                let o2 = "", r3 = e3.childNodes;
                if (!t2) {
                  for (let e4, t3 = 0, i2 = r3.length; t3 < i2 && (e4 = r3[t3]); t3++) {
                    const t4 = ["strong"];
                    if (e4 instanceof HTMLElement || e4.tagName && t4.indexOf(e4.tagName.toLowerCase()) >= 0) {
                      const t5 = e4.tagName.toLowerCase(), r4 = e4.attributes;
                      let i3 = "<" + t5;
                      for (let e5, t6 = 0; e5 = r4[t6]; t6++) i3 += " " + e5.name + '="' + e5.value.replace(/[&\u00A0"]/g, y2.Core.escapeHTML) + '"';
                      i3 += ">", ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"][t5] && (o2 += i3), o2 = o2 + i3 + n2.html(e4) + "</" + t5 + ">";
                    } else {
                      if (8 === e4.nodeType) continue;
                      o2 += e4.textContent.replace(/[&\u00A0<>]/g, y2.Core.escapeHTML);
                    }
                  }
                  return o2;
                }
                {
                  const n3 = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
                  e3.innerHTML = t2.replace(n3, "<$1></$2>");
                }
              }
            }
            let l = [];
            class d2 {
              static watch(e3) {
                switch (e3.nodeName.toLowerCase()) {
                  case "smart-grid":
                  case "smart-kanban":
                  case "smart-table":
                  case "smart-pivot-table":
                  case "smart-scheduler":
                  case "smart-tabs":
                  case "smart-card-view":
                  case "smart-list-box":
                  case "smart-combo-box":
                  case "smart-drop-down-list":
                  case "smart-calendar":
                  case "smart-gauge":
                  case "smart-numeric-text-box":
                  case "smart-menu":
                  case "smart-tree":
                    l.push(e3);
                    break;
                  default:
                    return;
                }
                d2.start();
              }
              static start() {
                d2.isStarted || (d2.isStarted = true, d2.interval && clearInterval(d2.interval), 0 === l.length || document.hidden ? d2.isStarted = false : d2.interval = setInterval(function() {
                  d2.observe();
                }, 100));
              }
              static stop() {
                d2.isStarted = false, d2.interval && clearInterval(d2.interval);
              }
              static observeElement(e3) {
                const t2 = e3;
                if ("test" === window.Smart.Mode || document.hidden) return void (d2.interval && clearInterval(d2.interval));
                let n2 = e3._computedStyle || "resize" !== t2.hasStyleObserver ? document.defaultView.getComputedStyle(t2, null) : {}, o2 = true, r3 = "resize" !== t2.hasStyleObserver ? ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth", "display", "visibility", "font-size", "font-family", "font-style", "font-weight", "max-height", "min-height", "max-width", "min-width", "overflow", "overflow-x", "overflow-y"] : [];
                if (e3.styleProperties && (r3 = r3.concat(e3.styleProperties)), e3.observableStyleProperties && (r3 = e3.observableStyleProperties), !t2._styleInfo) {
                  t2._styleInfo = [];
                  for (let e4 = 0; e4 < r3.length; e4++) {
                    const o3 = r3[e4], i3 = o3.startsWith("--") ? n2.getPropertyValue(o3) : n2[o3];
                    t2._styleInfo[o3] = i3;
                  }
                  return;
                }
                if (e3.isHidden || "none" !== n2.display && (0 !== e3.offsetWidth && 0 !== e3.offsetHeight || (e3.isHidden = true)), e3.isHidden) {
                  if (e3.visibilityChangedHandler(), e3.isHidden) return;
                  o2 = false;
                }
                let i2 = [];
                for (let e4 = 0; e4 < r3.length; e4++) {
                  const o3 = r3[e4], s2 = o3.startsWith("--") ? n2.getPropertyValue(o3) : n2[o3];
                  t2._styleInfo[o3] !== s2 && (i2[o3] = { oldValue: t2._styleInfo[o3], value: s2 }, i2.length++), t2._styleInfo[o3] = s2;
                }
                i2.length > 0 && (t2.$.fireEvent("styleChanged", { styleProperties: i2 }, { bubbles: false, cancelable: true }), i2.display && o2 && t2.$.fireEvent("resize", t2, { bubbles: false, cancelable: true }));
              }
              static observe() {
                for (let e3 = 0; e3 < l.length; e3++) {
                  const t2 = l[e3];
                  this.observeElement(t2);
                }
              }
              static unwatch(e3) {
                d2.stop();
                const t2 = l.indexOf(e3);
                -1 !== t2 && l.splice(t2, 1), d2.start();
              }
            }
            let c = [];
            const u2 = [], p2 = ["resize", "down", "up", "move", "tap", "taphold", "swipeleft", "swiperight", "swipetop", "swipebottom"];
            class h2 {
              constructor(e3) {
                const t2 = this;
                t2.target = e3, t2.$target = new f2(e3), t2.$document = e3.$document ? e3.$document : new f2(document), t2.id = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase();
                let n2 = { handlers: {}, boundEventTypes: [], listen: t2.listen.bind(t2), unlisten: t2.unlisten.bind(t2) };
                return t2.tapHoldDelay = 750, t2.swipeMin = 10, t2.swipeMax = 5e3, t2.swipeDelay = 1e3, t2.tapHoldDelay = 750, t2.inputEventProperties = ["clientX", "clientY", "pageX", "pageY", "screenX", "screenY"], p2.forEach((e4) => {
                  n2[e4] = (t3) => {
                    n2.handlers[e4] = t3;
                  }, t2[e4] = (e5) => {
                    if (!n2.handlers[e5.type]) {
                      if (("mousemove" === e5.type || "pointermove" === e5.type || "touchmove" === e5.type) && n2.handlers.move) {
                        const o2 = t2.createEvent(e5, "move");
                        n2.handlers.move(o2);
                      }
                      return true;
                    }
                    return n2.handlers[e5.type](e5);
                  };
                }), t2.listen(), t2.handlers = n2.handlers, n2;
              }
              listen(e3) {
                const t2 = this;
                if ("resize" === e3 && t2.target !== document && t2.target !== window && false !== t2.target.hasResizeObserver) {
                  if (Smart.Utilities.Core.Browser.Firefox) {
                    if (!t2.target.resizeObserver) {
                      let e4, n2, o2, r3 = false, i2 = t2.target.offsetWidth, s2 = t2.target.offsetHeight;
                      const a3 = new ResizeObserver(() => {
                        if (!r3) return void (r3 = true);
                        const a4 = new CustomEvent("resize", { bubbles: false, cancelable: true });
                        n2 = t2.target.offsetWidth, o2 = t2.target.offsetHeight, e4 = n2 !== i2 || o2 !== s2, t2.target.requiresLayout && (e4 = true), e4 && (t2.resize(a4), t2.target.requiresLayout = false);
                      });
                      a3.observe(t2.target), t2.target.resizeObserver = a3;
                    }
                  } else if (!t2.target.resizeTrigger) {
                    const e4 = document.createElement("div");
                    e4.className = "smart-resize-trigger-container", e4.innerHTML = '<div class="smart-resize-trigger-container"><div class="smart-resize-trigger"></div></div><div class="smart-resize-trigger-container"><div class="smart-resize-trigger-shrink"></div></div>', e4.setAttribute("aria-hidden", true), window[n].EnableShadowDOM && t2.target.shadowRoot ? t2.target.shadowRoot.appendChild(e4) : t2.target.appendChild(e4), t2.target.resizeTrigger = e4;
                    const o2 = e4.childNodes[0], r3 = o2.childNodes[0], i2 = e4.childNodes[1], s2 = function() {
                      r3.style.width = "100000px", r3.style.height = "100000px", o2.scrollLeft = 1e5, o2.scrollTop = 1e5, i2.scrollLeft = 1e5, i2.scrollTop = 1e5;
                    };
                    let a3, l2, d3, c2, u3 = t2.target.offsetWidth, p3 = t2.target.offsetHeight;
                    if (0 === u3 || 0 === p3) {
                      const e5 = function() {
                        s2(), t2.target.removeEventListener("resize", e5);
                      };
                      t2.target.addEventListener("resize", e5), s2();
                    } else s2();
                    t2.target.resizeHandler = function() {
                      l2 || (l2 = requestAnimationFrame(function() {
                        if (l2 = 0, d3 = t2.target.offsetWidth, c2 = t2.target.offsetHeight, a3 = d3 !== u3 || c2 !== p3, t2.target.requiresLayout && (a3 = true), !a3) return;
                        u3 = d3, p3 = c2;
                        const e5 = new CustomEvent("resize", { bubbles: false, cancelable: true });
                        t2.resize(e5), t2.target.requiresLayout = false;
                      })), s2();
                    }, o2.addEventListener("scroll", t2.target.resizeHandler), i2.addEventListener("scroll", t2.target.resizeHandler);
                  }
                }
                t2.isListening || (t2.isListening = true, t2.isPressed = false, t2.isReleased = false, t2.isInBounds = false, window.PointerEvent ? (t2.$target.listen("pointerdown.inputEvents" + t2.id, t2.pointerDown.bind(t2)), t2.$target.listen("pointerup.inputEvents" + t2.id, t2.pointerUp.bind(t2)), t2.$target.listen("pointermove.inputEvents" + t2.id, t2.pointerMove.bind(t2)), t2.$target.listen("pointercancel.inputEvents" + t2.id, t2.pointerCancel.bind(t2))) : ("ontouchstart" in window && (t2.$target.listen("touchmove.inputEvents" + t2.id, t2.touchMove.bind(t2)), t2.$target.listen("touchstart.inputEvents" + t2.id, t2.touchStart.bind(t2)), t2.$target.listen("touchend.inputEvents" + t2.id, t2.touchEnd.bind(t2)), t2.$target.listen("touchcancel.inputEvents" + t2.id, t2.touchCancel.bind(t2))), t2.$target.listen("mousedown.inputEvents" + t2.id, t2.mouseDown.bind(t2)), t2.$target.listen("mouseup.inputEvents" + t2.id, t2.mouseUp.bind(t2)), t2.$target.listen("mousemove.inputEvents" + t2.id, t2.mouseMove.bind(t2)), t2.$target.listen("mouseleave.inputEvents" + t2.id, t2.mouseLeave.bind(t2))), t2.target._handleDocumentUp || (t2.target._handleDocumentUp = t2.handleDocumentUp.bind(t2), t2.target._handleDocumentUpId = t2.id, t2.$document.listen("mouseup.inputEvents" + t2.target._handleDocumentUpId, t2.target._handleDocumentUp)));
              }
              unlisten(e3) {
                const t2 = this;
                if (t2.isListening = false, window.PointerEvent ? (t2.$target.unlisten("pointerdown.inputEvents" + t2.id), t2.$target.unlisten("pointerup.inputEvents" + t2.id), t2.$target.unlisten("pointermove.inputEvents" + t2.id), t2.$target.unlisten("pointercancel.inputEvents" + t2.id)) : ("ontouchstart" in window && (t2.$target.unlisten("touchstart.inputEvents" + t2.id), t2.$target.unlisten("touchmove.inputEvents" + t2.id), t2.$target.unlisten("touchend.inputEvents" + t2.id), t2.$target.unlisten("touchcancel.inputEvents" + t2.id)), t2.$target.unlisten("mousedown.inputEvents" + t2.id), t2.$target.unlisten("mouseup.inputEvents" + t2.id), t2.$target.unlisten("mousemove.inputEvents" + t2.id), t2.$target.unlisten("mouseleave.inputEvents" + t2.id)), t2.target._handleDocumentUp && (t2.$document.unlisten("mouseup.inputEvents" + t2.target._handleDocumentUpId, t2.target._handleDocumentUp), delete t2.target._handleDocumentUp, delete t2.target._handleDocumentUpId), "resize" === e3) {
                  if (Smart.Utilities.Core.Browser.Firefox) t2.target.resizeObserver && (t2.target.resizeObserver.unobserve(t2.target), delete t2.target.resizeObserver);
                  else if (t2.target.resizeTrigger) {
                    const e4 = t2.target.resizeTrigger, n2 = e4.childNodes[0], o2 = e4.childNodes[1];
                    n2.removeEventListener("scroll", t2.target.resizeHandler), o2.removeEventListener("scroll", t2.target.resizeHandler), t2.target.resizeHandler = null, e4.parentNode.removeChild(e4), delete t2.target.resizeTrigger;
                  }
                }
              }
              handleDocumentUp(e3) {
                const t2 = this;
                t2.isPressed = false, t2.isReleased = false, t2.resetSwipe(e3);
              }
              createEvent(e3, t2) {
                const n2 = this, o2 = e3.touches, r3 = e3.changedTouches, i2 = o2 && o2.length ? o2[0] : r3 && r3.length ? r3[0] : void 0, s2 = new CustomEvent(t2, { bubbles: true, cancelable: true, composed: void 0 !== n2.$target.element.getRootNode().host });
                if (s2.originalEvent = e3, i2) {
                  for (let e4 = 0; e4 < n2.inputEventProperties.length; e4++) {
                    const t3 = n2.inputEventProperties[e4];
                    s2[t3] = i2[t3];
                  }
                  return s2;
                }
                for (let t3 in e3) t3 in s2 || (s2[t3] = e3[t3]);
                return s2;
              }
              fireTap(e3) {
                const t2 = this;
                if (clearTimeout(this.tapHoldTimeout), !this.tapHoldFired && this.isInBounds) {
                  const n2 = t2.createEvent(e3, "tap");
                  t2.tap(n2);
                }
              }
              initTap(e3) {
                const t2 = this;
                t2.isInBounds = true, t2.tapHoldFired = false, t2.tapHoldTimeout = setTimeout(function() {
                  if (t2.isInBounds) {
                    t2.tapHoldFired = true;
                    const n2 = t2.createEvent(e3, "taphold");
                    t2.taphold(n2);
                  }
                }, t2.tapHoldDelay);
              }
              pointerDown(e3) {
                return this.handleDown(e3);
              }
              mouseDown(e3) {
                const t2 = this;
                if (!(t2.isPressed || t2.touchStartTime && /* @__PURE__ */ new Date() - t2.touchStartTime < 500)) return t2.handleDown(e3);
              }
              touchStart(e3) {
                const t2 = this;
                return t2.touchStartTime = /* @__PURE__ */ new Date(), t2.isTouchMoved = true, t2.handleDown(e3);
              }
              mouseUp(e3) {
                const t2 = this;
                if (!(t2.isReleased || t2.touchEndTime && /* @__PURE__ */ new Date() - t2.touchEndTime < 500)) return t2.handleUp(e3);
              }
              handleDown(e3) {
                const t2 = this;
                t2.isReleased = false, t2.isPressed = true;
                const n2 = t2.createEvent(e3, "down");
                return (t2.handlers.tap || t2.handlers.taphold) && t2.initTap(n2), (t2.handlers.swipeleft || t2.handlers.swiperight || t2.handlers.swipetop || t2.handlers.swipebottom) && t2.initSwipe(n2), t2.down(n2);
              }
              handleUp(e3) {
                const t2 = this;
                t2.isReleased = true, t2.isPressed = false;
                const n2 = t2.createEvent(e3, "up"), o2 = t2.up(n2);
                return (t2.handlers.tap || t2.handlers.taphold) && t2.fireTap(n2), t2.resetSwipe(n2), o2;
              }
              handleMove(e3) {
                const t2 = this;
                let n2 = t2.move(e3);
                return t2.isPressed && (t2._maxSwipeVerticalDistance = Math.max(t2._maxSwipeVerticalDistance, Math.abs(t2._startY - e3.pageY)), t2._maxSwipeHorizontalDistance = Math.max(t2._maxSwipeHorizontalDistance, Math.abs(t2._startX - e3.pageX)), n2 = t2.handleSwipeEvents(e3)), n2;
              }
              touchEnd(e3) {
                return this.touchEndTime = /* @__PURE__ */ new Date(), this.handleUp(e3);
              }
              pointerUp(e3) {
                return this.handleUp(e3);
              }
              pointerCancel(e3) {
                this.pointerUp(e3);
              }
              touchCancel(e3) {
                this.touchEnd(e3);
              }
              mouseLeave() {
                this.isInBounds = false;
              }
              mouseMove(e3) {
                if (!this.isTouchMoved) return this.handleMove(e3);
              }
              pointerMove(e3) {
                return this.handleMove(e3);
              }
              touchMove(e3) {
                const t2 = this, n2 = e3.touches, o2 = e3.changedTouches, r3 = n2 && n2.length ? n2[0] : o2 && o2.length ? o2[0] : void 0;
                for (let n3 = 0; n3 < t2.inputEventProperties.length; n3++) {
                  const o3 = t2.inputEventProperties[n3];
                  void 0 === e3[o3] && (e3[o3] = r3[o3]);
                }
                return t2.isTouchMoved = true, t2.handleMove(e3);
              }
              handleSwipeEvents(e3) {
                const t2 = this;
                let n2 = true;
                return (t2.handlers.swipetop || t2.handlers.swipebottom) && (n2 = this.handleVerticalSwipeEvents(e3)), false === n2 || (t2.handlers.swipeleft || t2.handlers.swiperight) && (n2 = this.handleHorizontalSwipeEvents(e3)), n2;
              }
              handleVerticalSwipeEvents(e3) {
                let t2, n2;
                return t2 = e3.pageY, n2 = t2 - this._startY, this.swiped(e3, n2, "vertical");
              }
              handleHorizontalSwipeEvents(e3) {
                let t2, n2;
                return t2 = e3.pageX, n2 = t2 - this._startX, this.swiped(e3, n2, "horizontal");
              }
              swiped(e3, t2, n2) {
                const o2 = this;
                if (n2 = n2 || 0, Math.abs(t2) >= o2.swipeMin && !o2._swipeEvent && !o2._swipeLocked) {
                  let r3 = t2 < 0 ? "swipeleft" : "swiperight";
                  if ("horizontal" === n2 ? o2._swipeEvent = o2.createEvent(e3, r3) : (r3 = t2 < 0 ? "swipetop" : "swipebottom", o2._swipeEvent = o2.createEvent(e3, t2 < 0 ? "swipetop" : "swipebottom")), o2[r3] && (o2[r3](this._swipeEvent), Math.abs(t2) <= this.swipeMax)) return e3.stopImmediatePropagation(), false;
                }
                return true;
              }
              resetSwipe() {
                this._swipeEvent = null, clearTimeout(this._swipeTimeout);
              }
              initSwipe(e3) {
                const t2 = this;
                t2._maxSwipeVerticalDistance = 0, t2._maxSwipeHorizontalDistance = 0, t2._startX = e3.pageX, t2._startY = e3.pageY, t2._swipeLocked = false, t2._swipeEvent = null, t2._swipeTimeout = setTimeout(function() {
                  t2._swipeLocked = true;
                }, t2.swipeDelay);
              }
            }
            class m2 {
              get scrollWidth() {
                const e3 = this;
                return e3.horizontalScrollBar ? e3.horizontalScrollBar.max : -1;
              }
              set scrollWidth(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.horizontalScrollBar && (t2.horizontalScrollBar.max = e3);
              }
              get scrollHeight() {
                const e3 = this;
                return e3.verticalScrollBar ? e3.verticalScrollBar.max : -1;
              }
              set scrollHeight(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.verticalScrollBar && (t2.verticalScrollBar.max = e3);
              }
              get scrollLeft() {
                const e3 = this;
                return e3.horizontalScrollBar ? e3.horizontalScrollBar.value : -1;
              }
              set scrollLeft(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.horizontalScrollBar && (t2.horizontalScrollBar.value = e3);
              }
              get scrollTop() {
                const e3 = this;
                return e3.verticalScrollBar ? e3.verticalScrollBar.value : -1;
              }
              set scrollTop(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.verticalScrollBar && (t2.verticalScrollBar.value = e3);
              }
              get vScrollBar() {
                return this.verticalScrollBar;
              }
              get hScrollBar() {
                return this.horizontalScrollBar;
              }
              constructor(e3, t2, n2) {
                const o2 = this;
                o2.container = e3, o2.horizontalScrollBar = t2, o2.verticalScrollBar = n2, o2.disableSwipeScroll = false, o2.listen();
              }
              listen() {
                const e3 = this, t2 = a2.isMobile, n2 = e3.horizontalScrollBar, o2 = e3.verticalScrollBar;
                let r3, i2, s2, l2, d3, c2, u3, p3;
                e3.inputEvents = new h2(e3.container);
                const m3 = function(e4) {
                  return { amplitude: 0, delta: 0, initialValue: 0, min: 0, max: e4.max, previousValue: 0, pointerPosition: 0, targetValue: 0, scrollBar: e4, value: 0, velocity: 0 };
                }, f3 = m3(n2), g3 = m3(o2), w2 = function() {
                  const t3 = e3.container.touchVelocityCoefficient || 50;
                  c2 = Date.now(), u3 = c2 - l2, l2 = c2;
                  const n3 = function(e4) {
                    e4.delta = e4.value - e4.previousValue, e4.previousValue = e4.value;
                    let n4 = t3 * e4.delta / (1 + u3);
                    e4.velocity = 0.8 * n4 + 0.2 * e4.velocity;
                  };
                  n3(g3), n3(f3);
                }, b3 = function(e4) {
                  return p3.value = e4 > p3.max ? p3.max : e4 < p3.min ? p3.min : e4, p3.scrollBar.value = p3.value, e4 > p3.max ? "max" : e4 < p3.min ? "min" : "value";
                };
                function v3() {
                  let t3, n3;
                  p3.amplitude && (e3.container.$.fireEvent("kineticScroll"), t3 = Date.now() - l2, n3 = -p3.amplitude * Math.exp(-t3 / 500), n3 > 5 || n3 < -5 ? (b3(p3.targetValue + n3), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(v3)) : b3(p3.targetValue));
                }
                let C3;
                e3.inputEvents.down(function(n3) {
                  if (!t2) return;
                  const o3 = n3.originalEvent.target, i3 = o3 && o3.closest ? o3.closest("smart-scroll-bar") : void 0;
                  if (i3 === e3.horizontalScrollBar || i3 === e3.verticalScrollBar) return;
                  s2 = true, r3 = false;
                  const a3 = function(e4, t3) {
                    e4.amplitude = 0, e4.pointerPosition = t3, e4.previousValue = e4.value, e4.value = e4.scrollBar.value, e4.initialValue = e4.value, e4.max = e4.scrollBar.max;
                  };
                  a3(g3, n3.clientY), a3(f3, n3.clientX), l2 = Date.now(), clearInterval(d3), d3 = setInterval(w2, 500);
                }), e3.inputEvents.up(function() {
                  if (!s2) return true;
                  if (clearInterval(d3), e3.disableSwipeScroll) return void (s2 = false);
                  const t3 = function(e4) {
                    p3 = e4, e4.amplitude = 0.8 * e4.velocity, e4.targetValue = Math.round(e4.value + e4.amplitude), l2 = Date.now(), cancelAnimationFrame(i2), i2 = requestAnimationFrame(v3), e4.velocity = 0;
                  };
                  g3.velocity > 10 || g3.velocity < -10 ? t3(g3) : (f3.velocity > 10 || f3.velocity < -10) && t3(f3), s2 = false;
                }), e3.inputEvents.move(function(t3) {
                  if (!s2) return true;
                  if (e3.disableSwipeScroll) return;
                  if (r3 && (t3.originalEvent.preventDefault(), t3.originalEvent.stopPropagation()), f3.visible = e3.scrollWidth > 0, g3.visible = e3.scrollHeight > 0, !s2 || !f3.visible && !g3.visible) return;
                  const n3 = e3.container.touchScrollRatio, o3 = e3.container;
                  let i3, a3;
                  n3 && ("number" == typeof n3 ? (i3 = -n3, a3 = -n3) : "function" == typeof n3 && (i3 = n3(g3.max, o3.offsetHeight), a3 = n3(f3.max, o3.offsetWidth))), g3.ratio = i3 || -g3.max / o3.offsetHeight, g3.delta = (t3.clientY - g3.pointerPosition) * g3.ratio, f3.ratio = a3 || -f3.max / o3.offsetWidth, f3.delta = (t3.clientX - f3.pointerPosition) * f3.ratio;
                  let l3 = "value";
                  const d4 = function(t4, n4, o4) {
                    return t4.delta > 5 || t4.delta < -5 ? (p3 = t4, l3 = t4.initialValue + t4.delta > p3.max ? "max" : t4.initialValue + t4.delta < p3.min ? "min" : "value", "min" === l3 && 0 === t4.initialValue || "max" === l3 && t4.initialValue === t4.max || !t4.visible || (e3.container.$.fireEvent("kineticScroll"), b3(t4.initialValue + t4.delta), w2(), o4.originalEvent.preventDefault(), o4.originalEvent.stopPropagation(), r3 = true, false)) : null;
                  };
                  let c3 = d4(g3, t3.clientY, t3);
                  if (null !== c3) return c3;
                  {
                    let e4 = d4(f3, t3.clientX, t3);
                    if (null !== e4) return e4;
                  }
                }), e3.scrollTo = function(t3, n3) {
                  const o3 = false === n3 ? f3 : g3;
                  let r4 = false;
                  l2 || (l2 = Date.now()), C3 || (C3 = Date.now()), Math.abs(Date.now() - C3) > 375 ? l2 = Date.now() : r4 = true, C3 = Date.now(), o3.value = o3.scrollBar.value, o3.delta = t3 - o3.value, o3.max = o3.scrollBar.max, t3 <= o3.min && (t3 = o3.min), t3 >= o3.max && (t3 = o3.max), o3.targetValue = t3;
                  const s3 = t3;
                  let a3 = o3.value;
                  o3.velocity = 100 * o3.delta / (1 + o3.max), o3.from = a3;
                  const d4 = function(e4) {
                    return o3.value = e4 > o3.max ? o3.max : e4 < o3.min ? o3.min : e4, o3.scrollBar.value = o3.value, e4 > o3.max ? "max" : e4 < o3.min ? "min" : "value";
                  }, c3 = function() {
                    let n4, u4 = Date.now() - C3, p4 = Math.min(1e3, Date.now() - l2), h3 = o3.velocity * Math.exp(p4 / 175);
                    if (r4) (h3 < 0 && o3.value <= t3 || h3 > 0 && o3.value >= t3) && (h3 = 0), (o3.value + h3 <= o3.min || o3.value + h3 >= o3.max) && (h3 = 0), h3 > 0.5 || h3 < -0.5 ? (d4(o3.value + h3), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(c3)) : d4(o3.targetValue);
                    else {
                      if (u4 >= 175) return cancelAnimationFrame(i2), e3.container.$.fireEvent("kineticScroll"), void (i2 = 0);
                      n4 = y2.Animation.Easings.easeInSine(u4, a3, s3 - a3, 175), d4(n4), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(c3);
                    }
                  };
                  cancelAnimationFrame(i2), i2 = requestAnimationFrame(c3);
                }, e3.inputEvents.listen();
              }
              unlisten() {
                const e3 = this;
                e3.inputEvents && e3.inputEvents.unlisten(), delete e3.inputEvents;
              }
            }
            class f2 {
              constructor(e3) {
                this.events = {}, this.handlers = {}, this.element = e3;
              }
              hasClass(e3) {
                const t2 = this, n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) if (!t2.element.classList.contains(n2[e4])) return false;
                return true;
              }
              addClass(e3) {
                const t2 = this;
                if (t2.hasClass(e3)) return;
                const n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) t2.element.classList.add(n2[e4]);
                t2.isNativeElement || d2.observeElement(t2.element);
              }
              removeClass(e3) {
                const t2 = this;
                if (0 === arguments.length) return void t2.element.removeAttribute("class");
                const n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) t2.element.classList.remove(n2[e4]);
                "" === t2.element.className && t2.element.removeAttribute("class"), t2.isNativeElement || d2.observeElement(t2.element);
              }
              get isCustomElement() {
                const e3 = this;
                return !!e3.element.tagName.startsWith(n) || e3.element instanceof window[n].BaseElement == 1 || "DIV" !== e3.element.tagName && "SPAN" !== e3.element.tagName && "BUTTON" !== e3.element.tagName && "INPUT" !== e3.element.tagName && "UL" !== e3.element.tagName && "LI" !== e3.element.tagName && document.createElement(e3.element.nodeName) instanceof window[n].BaseElement == 1;
              }
              get isNativeElement() {
                return !this.isCustomElement;
              }
              dispatch(e3) {
                const t2 = this, n2 = t2.events[e3.type];
                let o2 = false;
                if (n2.length > 1) for (let e4 = 0; e4 < n2.length; e4++) {
                  const t3 = n2[e4];
                  if (t3.namespace && t3.namespace.indexOf("_") >= 0) {
                    o2 = true;
                    break;
                  }
                }
                o2 && n2.sort(function(e4, t3) {
                  let n3 = e4.namespace, o3 = t3.namespace;
                  return n3 = -1 === n3.indexOf("_") ? 0 : parseInt(n3.substring(n3.indexOf("_") + 1)), o3 = -1 === o3.indexOf("_") ? 0 : parseInt(o3.substring(o3.indexOf("_") + 1)), n3 < o3 ? -1 : n3 > o3 ? 1 : 0;
                });
                for (let o3 = 0; o3 < n2.length; o3++) {
                  const r3 = n2[o3];
                  if (e3.namespace = r3.namespace, e3.context = r3.context, e3.defaultPrevented) break;
                  const i2 = r3.handler.apply(t2.element, [e3]);
                  if (void 0 !== i2 && (e3.result = i2, false === i2)) {
                    e3.preventDefault(), e3.stopPropagation();
                    break;
                  }
                }
                return e3.result;
              }
              fireEvent(e3, t2, n2) {
                const o2 = this;
                n2 || (n2 = { bubbles: true, cancelable: true, composed: null !== o2.element.getRootNode().host }), n2.detail = t2 || {};
                const r3 = new CustomEvent(e3, n2);
                return r3.originalStopPropagation = r3.stopPropagation, r3.stopPropagation = function() {
                  return r3.isPropagationStopped = true, r3.originalStopPropagation();
                }, o2.dispatchEvent(r3), r3;
              }
              get isPassiveSupported() {
                const e3 = this;
                if (void 0 !== e3.supportsPassive) return e3.supportsPassive;
                e3.supportsPassive = false;
                try {
                  let t2 = Object.defineProperty({}, "passive", { get: function() {
                    e3.supportsPassive = true;
                  } });
                  window.addEventListener("testPassive", null, t2), window.removeEventListener("testPassive", null, t2);
                } catch (e4) {
                }
                return e3.supportsPassive;
              }
              dispatchEvent(e3) {
                const t2 = this, n2 = e3.type, o2 = t2.element.context, r3 = n2.substring(0, 1).toUpperCase() + n2.substring(1);
                t2.element.context = document, t2.element["on" + r3] ? t2.element["on" + r3](e3) : t2.element["on" + n2.toLowerCase()] ? t2.element["on" + n2.toLowerCase()](e3) : t2.element.dispatchEvent(e3), t2.element.context = o2;
              }
              listen(e3, t2) {
                const n2 = this, o2 = e3.split("."), r3 = o2.slice(1).join("."), i2 = o2[0];
                n2.events[i2] || (n2.events[i2] = []);
                const s2 = { type: i2, handler: t2, context: n2.element, namespace: r3 };
                p2.indexOf(i2) >= 0 && (n2.inputEvents || (n2.inputEvents = new h2(n2.element)), n2.inputEvents[i2](function(e4) {
                  n2.dispatchEvent(e4);
                }), n2.inputEvents.boundEventTypes.push(i2), n2.inputEvents.listen(i2)), 0 === n2.events[i2].length && (n2.handlers[i2] = n2.dispatch.bind(n2), "wheel" === i2 ? n2.element.addEventListener("wheel", n2.handlers[i2], !!n2.isPassiveSupported && { passive: false }) : "touchmove" === i2 || "touchstart" === i2 || "touchend" === i2 ? n2.element.addEventListener(i2, n2.handlers[i2], !!n2.isPassiveSupported && { passive: false }) : n2.element.addEventListener(i2, n2.handlers[i2], false)), n2.events[i2].push(s2);
              }
              unlisten(e3) {
                const t2 = this, n2 = e3.split("."), o2 = n2.slice(1).join("."), r3 = n2[0];
                let i2 = t2.events[r3];
                if (t2.inputEvents && t2.inputEvents.boundEventTypes.indexOf(r3) >= 0 && (t2.inputEvents.boundEventTypes.splice(t2.inputEvents.boundEventTypes.indexOf(r3), 1), 0 === t2.inputEvents.boundEventTypes.length && t2.inputEvents.unlisten(r3)), i2) {
                  for (let e4 = 0; e4 < i2.length; e4++) {
                    if ("" !== o2) {
                      let e5 = i2.findIndex((e6) => e6.namespace === o2);
                      i2.splice(e5, 1);
                      break;
                    }
                    i2 = [];
                  }
                  0 === i2.length && (t2.element.removeEventListener(r3, t2.handlers[r3]), t2.events[r3] = [], delete t2.handlers[r3]);
                }
              }
              getAttributeValue(e3, t2) {
                const n2 = this, o2 = n2.element.getAttribute(e3);
                if (n2.isNativeElement) return n2.deserialize(o2, t2);
                const r3 = n2.element.propertyByAttributeName[e3];
                return void 0 === r3.deserialize ? n2.deserialize(o2, t2, r3.nullable) : n2.element[r3.deserialize](o2);
              }
              setAttributeValue(e3, t2, n2) {
                const o2 = this;
                let r3, i2 = false;
                if (o2.isNativeElement) {
                  if (r3 = o2.serialize(t2, n2), "boolean" === n2 && ["checked", "selected", "async", "autofocus", "autoplay", "controls", "defer", "disabled", "hidden", "ismap", "loop", "multiple", "open", "readonly", "required", "scoped"].indexOf(e3) >= 0) return void (t2 ? o2.element.setAttribute(e3, "") : o2.element.removeAttribute(e3));
                } else {
                  const s2 = o2.element.propertyByAttributeName[e3];
                  i2 = !s2 || s2.nullable, r3 = s2 && s2.serialize ? o2.element[s2.serialize](t2) : o2.serialize(t2, n2, i2);
                }
                "array" !== n2 && "object" !== n2 || "[]" !== r3 && "{}" !== r3 ? void 0 === r3 ? (o2.element.removeAttribute(e3), o2.element.shadowRoot && o2.element.$.root && o2.element.$.root.removeAttribute(e3)) : (o2.element.setAttribute(e3, r3), o2.element.shadowRoot && o2.element.$.root && o2.element.$.root.setAttribute(e3, r3)) : o2.element.removeAttribute(e3);
              }
              serialize(e3, t2, n2) {
                if (void 0 === t2 && (t2 = y2.Types.getType(e3)), void 0 !== e3 && (n2 || null !== e3)) {
                  if (n2 && null === e3) return "null";
                  if ("string" === t2) return e3;
                  if ("boolean" === t2 || "bool" === t2) {
                    if (true === e3 || "true" === e3 || 1 === e3 || "1" === e3) return "";
                    if (false === e3 || "false" === e3 || 0 === e3 || "0" === e3) return;
                  }
                  return "array" === t2 ? JSON.stringify(e3) : ["string", "number", "int", "integer", "float", "date", "any", "function"].indexOf(t2) >= 0 ? e3.toString() : "object" === t2 ? JSON.stringify(e3) : void 0;
                }
              }
              deserialize(e3, t2, n2) {
                const o2 = "null" === e3;
                if (void 0 !== e3 && (!o2 || n2)) {
                  if (o2 && n2) return null;
                  if ("boolean" === t2 || "bool" === t2) return null !== e3;
                  if ("number" === t2 || "float" === t2) return "NaN" === e3 ? NaN : "Infinity" === e3 ? 1 / 0 : "-Infinity" === e3 ? -1 / 0 : parseFloat(e3);
                  if ("int" === t2 || "integer" === t2) return "NaN" === e3 ? NaN : "Infinity" === e3 ? 1 / 0 : "-Infinity" === e3 ? -1 / 0 : parseInt(e3);
                  if ("string" === t2) return e3;
                  if ("any" === t2) return e3;
                  if ("date" === t2) return new Date(e3);
                  if ("function" === t2) {
                    if ("function" == typeof window[e3]) return window[e3];
                  } else if ("array" === t2 || "object" === t2) try {
                    const t3 = JSON.parse(e3);
                    if (t3) return t3;
                  } catch (n3) {
                    if (window[e3] && "object" == typeof window[e3]) return window[e3];
                    if ("array" === t2 && e3.indexOf("[") >= 0) {
                      if (e3.indexOf("{") >= 0) {
                        let t3 = e3.replace(/{/gi, "").replace("[", "").replace("]", "").replace(/'/gi, "").replace(/"/gi, "").trim();
                        t3 = t3.split("},");
                        for (let e4 = 0; e4 < t3.length; e4++) {
                          let n4 = {}, o3 = t3[e4].trim().split(",");
                          for (let e5 = 0; e5 < o3.length; e5++) {
                            const t4 = o3[e5].split(":")[0].trim(), r3 = o3[e5].split(":")[1].trim();
                            n4[t4] = r3;
                          }
                          t3[e4] = n4;
                        }
                        return t3;
                      }
                      return e3.replace("[", "").replace("]", "").replace(/'/gi, "").replace(/"/gi, "").trim().split(",");
                    }
                  }
                }
              }
            }
            class g2 {
              static get Ripple() {
                return i;
              }
              static get Easings() {
                return s;
              }
            }
            class y2 {
              static get Types() {
                return r2;
              }
              static get Core() {
                return a2;
              }
              static get Animation() {
                return g2;
              }
              static get Scroll() {
                return m2;
              }
              static get InputEvents() {
                return h2;
              }
              static Extend(e3) {
                return new f2(e3);
              }
              static Assign(e3, t2) {
                if (e3.indexOf(".") >= 0) {
                  const n2 = e3.split(".");
                  return y2[n2[0]] || (y2[n2[0]] = {}), void (y2[n2[0]][n2[1]] = t2);
                }
                y2[e3] = t2;
              }
            }
            const w = y2.Extend(document);
            let b2 = null;
            document.addEventListener("click", () => {
              d2.start(), b2 && clearTimeout(b2), b2 = setTimeout(() => {
                d2.stop();
              }, 1e4);
            }), document.addEventListener("mouseenter", () => {
              d2.start();
            }), document.addEventListener("mouseleave", () => {
              d2.stop();
            });
            class v2 {
            }
            v2.cache = {};
            class C2 extends HTMLElement {
              static get properties() {
                return { animation: { value: "advanced", type: "string", allowedValues: ["none", "simple", "advanced"] }, unfocusable: { value: false, type: "boolean" }, disabled: { value: false, type: "boolean" }, dataContext: { value: null, reflectToAttribute: false, type: "any" }, debugMode: { value: true, type: "boolean", reflectToAttribute: false }, locale: { value: "en", type: "string", reflectToAttribute: false }, localizeFormatFunction: { value: void 0, type: "function", reflectToAttribute: false }, messages: { value: { en: { propertyUnknownName: "Invalid property name: '{{name}}'!", propertyUnknownType: "'{{name}}' property is with undefined 'type' member!", propertyInvalidValue: "Invalid '{{name}}' property value! Actual value: '{{actualValue}}', Expected value: '{{value}}'!", propertyInvalidValueType: "Invalid '{{name}}' property value type! Actual type: '{{actualType}}', Expected type: '{{type}}'!", methodInvalidValueType: "Invalid '{{name}}' method argument value type! Actual type: '{{actualType}}', Expected type: '{{type}}' for argument with index: '{{argumentIndex}}'!", methodInvalidArgumentsCount: "Invalid '{{name}}' method arguments count! Actual arguments count: '{{actualArgumentsCount}}', Expected at least: '{{argumentsCount}}' argument(s)!", methodInvalidReturnType: "Invalid '{{name}}' method return type! Actual type: '{{actualType}}', Expected type: '{{type}}'!", elementNotInDOM: "Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.", moduleUndefined: "Module is undefined.", missingReference: "{{elementType}}: Missing reference to '{{files}}'.", htmlTemplateNotSuported: "{{elementType}}: Web Browser doesn't support HTMLTemplate elements.", invalidTemplate: "{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM." } }, reflectToAttribute: false, inherit: true, type: "object" }, props: { value: null, reflectToAttribute: false, isHierarchicalProperty: true, type: "any" }, readonly: { value: false, type: "boolean" }, renderMode: { value: "auto", type: "string", reflectToAttribute: false, allowedValues: ["auto", "manual"] }, rightToLeft: { value: false, type: "boolean" }, rethrowError: { value: true, type: "boolean", reflectToAttribute: false }, theme: { value: window[n].Theme, type: "string" }, visibility: { value: "visible", allowedValues: ["visible", "collapsed", "hidden"], type: "string" }, wait: { value: false, type: "boolean" } };
              }
              getBindings(e3, t2) {
                const n2 = this;
                let o2 = 0, r3 = {}, i2 = ((e4) => {
                  if (e4 instanceof HTMLElement) return n2.parseAttributes(e4);
                  {
                    let t3 = n2.parseProperty(e4.data ? e4.data.trim() : null, "textContent", e4);
                    if (t3) return n2 && e4.parentNode === n2.$.content && (t3.value = "" !== n2.$.html ? n2.$.html : void 0, n2.innerHTML = ""), { textContent: t3 };
                  }
                })(e3);
                i2 && (r3.data = i2), t2 || (r3.mapping = [], t2 = r3), e3.getAttribute && (r3.nodeId = e3.getAttribute("smart-id"), t2 && i2 && (t2.mapping[r3.nodeId] = i2)), r3.node = e3, e3.firstChild && (r3.children = {});
                for (let i3 = e3.firstChild; i3; i3 = i3.nextSibling) r3.children[o2++] = n2.getBindings(i3, t2);
                return r3;
              }
              _addRemovePropertyBinding(e3, t2, n2, o2, r3) {
                if (!e3 || !t2 || !n2) return;
                const i2 = this, s2 = i2.bindings, a3 = n2.getAttribute("smart-id"), l2 = e3.indexOf("{{") >= 0;
                let d3 = false;
                (e3 = e3.replace("{{", "").replace("}}", "").replace("[[", "").replace("]]", "")).indexOf("!") >= 0 && (e3 = e3.replace("!", ""), d3 = true);
                const c2 = i2._properties[e3], u3 = { name: e3, reflectToAttribute: c2.reflectToAttribute, twoWay: l2, type: c2.type, not: d3 };
                if (r3 && !o2) {
                  const n3 = {}, o3 = { name: e3, targetPropertyName: t2, reflectToAttribute: c2.reflectToAttribute, twoWay: l2, type: c2.type, not: d3 };
                  n3[e3] = o3, s2.mapping[a3] = n3;
                }
                const p3 = function(e4) {
                  for (let r4 in e4) {
                    const s3 = e4[r4];
                    if (s3.nodeId === a3) {
                      s3.data || (s3.data = {}), o2 ? (s3.data[t2] = null, delete s3.data[t2]) : s3.data[t2] = u3;
                      break;
                    }
                    if (s3.children) p3(s3.children);
                    else if (s3.node && s3.node.children && s3.node === n2.parentElement) {
                      const e5 = s3.node;
                      if (!e5.firstChild) continue;
                      s3.children = {};
                      let t3 = 0;
                      for (let n3 = e5.firstChild; n3; n3 = n3.nextSibling) s3.children[t3++] = i2.getBindings(n3);
                      p3(s3.children);
                    }
                  }
                };
                p3(s2.children), o2 ? delete i2.boundProperties[e3] : i2.boundProperties[e3] = true, i2.updateBoundNodes(e3);
              }
              addPropertyBinding(e3, t2, n2, o2) {
                this._addRemovePropertyBinding(e3, t2, n2, false, o2);
              }
              removePropertyBinding(e3, t2, n2, o2) {
                this._addRemovePropertyBinding(e3, t2, n2, true, o2);
              }
              parseAttributes(e3) {
                const t2 = this;
                let n2;
                for (let o2 = 0; o2 < e3.attributes.length; o2++) {
                  const r3 = e3.attributes[o2], i2 = r3.name, s2 = r3.value;
                  v2.cache["toCamelCase" + i2] || (v2.cache["toCamelCase" + i2] = y2.Core.toCamelCase(i2));
                  const a3 = v2.cache["toCamelCase" + i2];
                  if (i2.indexOf("(") >= 0) {
                    let o3 = i2.substring(1, i2.length - 1);
                    if (t2 && !t2.dataContext) {
                      t2.templateListeners[e3.getAttribute("smart-id") + "." + o3] = s2, e3.removeAttribute(i2);
                      continue;
                    }
                    {
                      n2 || (n2 = {});
                      const e4 = s2.substring(0, s2.indexOf("("));
                      n2[a3] = { isEvent: true, name: o3, value: e4 };
                      continue;
                    }
                  }
                  let l2 = t2.parseProperty(s2, i2, e3);
                  l2 && (n2 || (n2 = {}), n2[a3] = l2);
                }
                return n2;
              }
              parseProperty(e3, t2) {
                if (!e3 || !e3.length) return;
                const n2 = this;
                let o2, r3 = e3.length, i2 = 0, s2 = 0, a3 = 0, l2 = true;
                for (; s2 < r3; ) {
                  i2 = e3.indexOf("{{", s2);
                  let t3 = e3.indexOf("[[", s2), n3 = "}}";
                  if (t3 >= 0 && (i2 < 0 || t3 < i2) && (i2 = t3, l2 = false, n3 = "]]"), a3 = i2 < 0 ? -1 : e3.indexOf(n3, i2 + 2), a3 < 0) return;
                  o2 = o2 || {};
                  let r4 = e3.slice(i2 + 2, a3).trim();
                  o2.name = r4, s2 = a3 + 2;
                }
                const d3 = o2.name, c2 = n2 ? n2._properties[d3] : null;
                return o2.twoWay = l2, o2.ready = false, n2 && (d3.indexOf("::") >= 0 ? n2.boundProperties[d3.substring(0, d3.indexOf("::"))] = true : n2.boundProperties[d3] = true), c2 ? (o2.type = c2.type, o2.reflectToAttribute = c2.reflectToAttribute) : (["checked", "selected", "async", "autofocus", "autoplay", "controls", "defer", "disabled", "hidden", "ismap", "loop", "multiple", "open", "readonly", "required", "scoped"].indexOf(t2) >= 0 ? o2.type = "boolean" : o2.type = "string", o2.reflectToAttribute = true), o2;
              }
              updateTextNodes() {
                const e3 = this;
                e3.updateTextNode(e3.shadowRoot || e3, e3.bindings, e3);
              }
              updateTextNode(e3, t2, n2) {
                const o2 = this;
                if (!t2) return;
                let r3 = 0;
                for (let i2 = e3.firstChild; i2 && t2.children; i2 = i2.nextSibling) o2.updateTextNode(i2, t2.children[r3++], n2);
                if (t2 && t2.data) for (let e4 in t2.data) {
                  const o3 = t2.data[e4], r4 = o3.name;
                  "textContent" === e4 && o3.twoWay && !o3.updating && void 0 !== o3.value && (n2[r4] = o3.value);
                }
              }
              updateBoundProperty(e3, t2) {
                if (t2.updating) return;
                const n2 = this;
                t2.updating = true, n2[e3] = t2.value, t2.updating = false;
              }
              updateBoundNodes(e3) {
                const t2 = this;
                if (t2.updateBoundNode(t2.shadowRoot || t2, t2.bindings, t2, e3), t2.detachedChildren.length > 0) for (let n2 = 0; n2 < t2.detachedChildren.length; n2++) {
                  const o2 = t2.detachedChildren[n2], r3 = o2.getAttribute("smart-id"), i2 = function(e4) {
                    if (e4.nodeId === r3) return e4;
                    for (let t3 in e4.children) {
                      const n3 = e4.children[t3];
                      if ((n3.getAttribute ? n3.getAttribute("smart-id") : "") === r3) return e4;
                      if (n3.children) {
                        const e5 = i2(n3);
                        if (e5) return e5;
                      }
                    }
                    return null;
                  }, s2 = i2(t2.bindings);
                  if (s2) t2.updateBoundNode(o2, s2, t2, e3, true);
                  else if (o2.getAttribute && t2.bindings.mapping) {
                    const n3 = t2, o3 = t2.bindings;
                    if (o3) for (let r4 in o3.mapping) {
                      const i3 = n3.querySelector('[smart-id="' + r4 + '"]');
                      if (i3) {
                        const s3 = o3.mapping[r4];
                        t2.updateBoundData(i3, s3, n3, e3);
                      }
                    }
                  }
                }
              }
              updateBoundMappedNodes() {
                const e3 = this, t2 = e3.bindings, n2 = e3;
                if (t2.mapping) for (let o2 in t2.mapping) {
                  let r3 = n2.querySelector('[smart-id="' + o2 + '"]');
                  if (n2.shadowRoot && (r3 = n2.querySelector('[id="' + o2 + '"]'), r3 || (r3 = n2.shadowRoot.querySelector('[id="' + o2 + '"]') || n2.shadowRoot.querySelector('[smart-id="' + o2 + '"]'))), r3) {
                    const i2 = t2.mapping[o2];
                    e3.updateBoundData(r3, i2, n2);
                  } else if (n2.getAttribute("aria-controls")) {
                    let i2 = document.getElementById(n2.getAttribute("aria-controls"));
                    if (!i2 && n2.shadowRoot && (i2 = n2.shadowRoot.getElementById(n2.getAttribute("aria-controls"))), r3 = i2.querySelector('[smart-id="' + o2 + '"]'), r3) {
                      const i3 = t2.mapping[o2];
                      e3.updateBoundData(r3, i3, n2);
                    }
                  }
                }
              }
              updateBoundNode(e3, t2, n2, o2, r3) {
                const i2 = this;
                if (!t2) return;
                let s2 = 0;
                if (r3) {
                  if (r3 && !t2.data) for (let a4 = e3.firstChild; a4 && t2.children; a4 = a4.nextSibling) if (a4.getAttribute) {
                    const e4 = a4.getAttribute("smart-id"), r4 = function() {
                      for (let n3 in t2.children) if (t2.children[n3].nodeId === e4) return t2.children[n3];
                    }();
                    i2.updateBoundNode(a4, r4, n2, o2), s2++;
                  } else i2.updateBoundNode(a4, t2.children[s2++], n2, o2, r3);
                } else for (let r4 = e3.firstChild; r4 && t2.children; r4 = r4.nextSibling) if (r4.getAttribute) {
                  const e4 = r4.getAttribute("smart-id"), a4 = function() {
                    for (let n3 in t2.children) if (t2.children[n3].nodeId === e4) return t2.children[n3];
                  }();
                  i2.updateBoundNode(r4, a4, n2, o2), s2++;
                } else i2.updateBoundNode(r4, t2.children[s2++], n2, o2);
                if (!t2 || !t2.data) return;
                const a3 = t2.data;
                i2.updateBoundData(e3, a3, n2, o2);
              }
              updateBoundData(e3, t2, n2, o2) {
                const r3 = this;
                for (let i2 in t2) {
                  const s2 = t2[i2];
                  let a3 = s2.name;
                  if (!s2.updating && (a3.indexOf("::") >= 0 && (a3 = a3.substring(0, a3.indexOf("::"))), void 0 === o2 || o2 === a3)) {
                    if (a3.indexOf("(") >= 0) {
                      let e4 = a3.substring(a3.indexOf("("));
                      const t3 = a3.substring(0, a3.indexOf("("));
                      if (e4 = e4.substring(1, e4.length - 1), e4 = e4.replace(/ /gi, ""), e4 = e4.split(","), e4.length > 0 && "" !== e4[0]) {
                        let o3 = [];
                        for (let t4 = 0; t4 < e4.length; t4++) o3.push(n2[e4[t4]]);
                        s2.value = n2[t3].apply(n2, o3);
                      } else s2.value = n2[t3]();
                      s2.type = typeof s2.value;
                    } else s2.value = n2[a3];
                    if ("innerHTML" === a3) {
                      if (e3[i2].toString().trim() !== n2[a3].toString().trim()) {
                        if (window.smartBlazor && e3[i2].indexOf("<!--") >= 0) {
                          (s2.ready || n2._properties[a3].defaultValue !== s2.value) && (e3[i2] = s2.value.toString());
                          continue;
                        }
                        (s2.ready || n2._properties[a3].defaultValue !== s2.value) && (e3[i2] = s2.value.toString().trim());
                      }
                    } else s2.not ? (e3[i2] = !s2.value, s2.targetPropertyName && (e3[s2.targetPropertyName] = !s2.value)) : (e3[i2] = s2.value, s2.targetPropertyName && (e3[s2.targetPropertyName] = s2.value));
                    if (e3.$ && e3.$.isNativeElement) {
                      v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                      const t3 = v2.cache["toDash" + i2], n3 = e3.$.getAttributeValue(t3, s2.type);
                      !s2.reflectToAttribute || n3 === s2.value && s2.ready || e3.$.setAttributeValue(t3, s2.value, s2.type), s2.reflectToAttribute || e3.$.setAttributeValue(t3, null, s2.type);
                    }
                    if (!s2.ready) {
                      if (e3.$ && e3.$.isCustomElement) {
                        v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                        const t3 = v2.cache["toDash" + i2];
                        e3._properties || (e3._beforeCreatedProperties = e3._properties = e3.propertyByAttributeName = []), e3._properties[i2] || (e3._properties[i2] = { attributeName: t3 }, e3._beforeCreatedProperties && (e3._beforeCreatedProperties[i2] = e3._properties[i2]), e3.propertyByAttributeName[t3] = e3._properties[i2]);
                        const n3 = e3._properties[i2];
                        n3.isUpdating = true, s2.reflectToAttribute && (s2.not ? e3.$.setAttributeValue(n3.attributeName, !s2.value, s2.type) : e3.$.setAttributeValue(n3.attributeName, s2.value, s2.type)), s2.reflectToAttribute || e3.$.setAttributeValue(n3.attributeName, null, s2.type), n3.isUpdating = false;
                      }
                      if (s2.twoWay) {
                        const t3 = function(t4) {
                          if (s2.value = t4, e3.$ && e3.$.isNativeElement) {
                            v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                            const t5 = v2.cache["toDash" + i2], n3 = e3.$.getAttributeValue(t5, s2.type);
                            s2.reflectToAttribute && n3 !== s2.value && e3.$.setAttributeValue(t5, s2.value, s2.type), s2.reflectToAttribute || e3.$.setAttributeValue(t5, null, s2.type);
                          }
                        };
                        if (s2.name.indexOf("::") >= 0) {
                          const n3 = s2.name.indexOf("::"), o3 = s2.name.substring(n3 + 2);
                          r3["$" + e3.getAttribute("smart-id")].listen(o3, function() {
                            t3(e3[i2]);
                            const n4 = s2.name.substring(0, s2.name.indexOf("::"));
                            r3.updateBoundProperty(n4, s2);
                          });
                        }
                        if (e3.$ && e3.$.isCustomElement) {
                          e3._properties[i2] && (e3._properties[i2].notify = true), v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                          const n3 = v2.cache["toDash" + i2];
                          r3["$" + e3.getAttribute("smart-id")].listen(n3 + "-changed", function(e4) {
                            let n4 = e4.detail;
                            t3(n4.value);
                            const o3 = r3.context;
                            e4.context !== document && (r3.context = r3), r3.updateBoundProperty(s2.name, s2), r3.context = o3;
                          });
                        }
                      }
                    }
                    s2.ready = true;
                  }
                }
              }
              static clearCache() {
                this.cache = {};
              }
              addMessages(e3, t2) {
                Object.assign(this.messages[e3], t2);
              }
              localize(e3, t2) {
                const n2 = this;
                if (!n2.messages || !n2.messages[n2.locale]) return;
                let o2 = n2.messages[n2.locale][e3];
                if ("" === o2) return "";
                if (!o2) {
                  const t3 = n2.messages.en;
                  if (t3) {
                    const n3 = t3[e3];
                    return n3 || e3;
                  }
                }
                const r3 = o2;
                for (let e4 in t2) {
                  let n3 = t2[e4];
                  o2 = o2.replace(new RegExp("{{" + e4 + "}}", "g"), n3);
                }
                return n2.localizeFormatFunction && n2.localizeFormatFunction(r3, o2, t2), o2;
              }
              static get requires() {
                return {};
              }
              static get listeners() {
                return { "theme-changed": function(e3) {
                  this.theme = e3.detail.newValue;
                } };
              }
              static get methods() {
                return {};
              }
              get classNamesMap() {
                return { animation: "smart-animate", rippleAnimation: "smart-ripple" };
              }
              get hasAnimation() {
                return "none" !== this.animation;
              }
              get hasRippleAnimation() {
                return "none" !== this.animation && "advanced" === this.animation;
              }
              static get modules() {
                return window[n].Modules;
              }
              get properties() {
                const e3 = this;
                return e3._properties || (e3._properties = []), e3._properties;
              }
              get parents() {
                const e3 = this;
                let t2 = [], o2 = e3.parentNode;
                for (; o2 && 9 !== o2.nodeType; ) o2 instanceof HTMLElement == 1 && t2.push(o2), o2 = o2.parentNode;
                const r3 = e3.getRootNode();
                if (r3.host) {
                  const e4 = (e5) => {
                    let t3 = [e5], n2 = e5.parentNode;
                    for (; n2 && 9 !== n2.nodeType; ) n2 instanceof HTMLElement == 1 && t3.push(n2), n2 = n2.parentNode;
                    return t3;
                  };
                  t2 = t2.concat(e4(r3.host));
                }
                return window[n].EnableShadowDOM && e3.isInShadowDOM && e3.shadowParent && (t2 = t2.concat(e3.shadowParent.parents)), t2;
              }
              log(e3) {
                this._logger("log", e3);
              }
              warn(e3) {
                this._logger("warn", e3);
              }
              error(e3) {
                this._logger("error", e3);
              }
              _logger(e3, t2) {
                if (this.debugMode) {
                  const n2 = t2 instanceof Error ? t2.message : t2.toString();
                  console[e3](n2);
                }
                if (this.rethrowError && "error" === e3) throw t2;
              }
              get focused() {
                return this.contains(document.activeElement);
              }
              template() {
                return "<div></div>";
              }
              registered() {
                const e3 = this;
                e3.onRegistered && e3.onRegistered();
              }
              created() {
                const e3 = this;
                e3.isReady = false, e3._initElement(e3), e3._setModuleState("created"), e3.onCreated && e3.onCreated();
              }
              completed() {
                const e3 = this;
                e3.isCompleted = true, e3._onCompleted && e3._onCompleted(), e3.onCompleted && e3.onCompleted();
              }
              whenReady(e3) {
                const t2 = this;
                t2.isCompleted ? e3() : (t2.whenReadyCallbacks || (t2.whenReadyCallbacks = []), t2.whenReadyCallbacks.push(e3));
              }
              whenRendered(e3) {
                const t2 = this;
                t2.isRendered ? e3() : (t2.whenRenderedCallbacks || (t2.whenRenderedCallbacks = []), t2.whenRenderedCallbacks.push(e3));
              }
              addThemeClass() {
                const e3 = this;
                "" !== e3.theme && e3.classList.add("smart-" + e3.theme);
              }
              addDefaultClass() {
                const e3 = this;
                e3.classList.add(n.toLowerCase() + "-element"), e3.classList.add(e3.nodeName.toLowerCase());
              }
              _renderShadowRoot() {
                const e3 = this;
                if (e3.shadowRoot) {
                  e3.$.root.classList.add(e3.nodeName.toLowerCase());
                  for (let t2 = 0; t2 < e3.attributes.length; t2++) {
                    const n2 = e3.attributes[t2];
                    "class" === n2.name || "id" === n2.name || "style" === n2.name || "tabindex" === n2.name || n2.name.indexOf("aria") >= 0 || e3.$.root.setAttribute(n2.name, n2.value);
                  }
                  for (let t2 = 0; t2 < e3.classList.length; t2++) {
                    const n2 = e3.classList[t2];
                    "smart-element-init" !== n2 && "smart-element" !== n2 && "smart-hidden" !== n2 && "smart-visibility-hidden" !== n2 && e3.$.root.classList.add(n2);
                  }
                }
              }
              render() {
                const e3 = this;
                if (!e3.isRendered && (e3.isRendered = true, e3.isRendering = false, e3.context = document, e3._renderShadowRoot(), e3.whenRenderedCallbacks)) {
                  for (let t2 = 0; t2 < e3.whenRenderedCallbacks.length; t2++) e3.whenRenderedCallbacks[t2]();
                  e3.whenRenderedCallbacks = [];
                }
                e3.onRender && e3.onRender(), e3.disabled && e3.setAttribute("aria-disabled", true), e3.readonly && -1 !== ["checkbox", "combobox", "grid", "gridcell", "listbox", "radiogroup", "slider", "spinbutton", "textbox"].indexOf(e3.getAttribute("role")) && e3.setAttribute("aria-readonly", true);
              }
              ready() {
                const e3 = this;
                if (e3._setId(), e3.addThemeClass(), e3.addDefaultClass(), "collapsed" === e3.visibility ? e3.classList.add("smart-hidden") : "hidden" === e3.visibility && e3.classList.add("smart-visibility-hidden"), e3.dataContext && e3.applyDataContext(), e3.onReady && e3.onReady(), e3.shadowRoot && Smart(e3._selector)) {
                  if (Smart(e3._selector).styleUrls) {
                    const t2 = Smart(e3._selector).styleUrls;
                    for (let n2 = 0; n2 < t2.length; n2++) e3.importStyle(t2[n2]);
                  }
                  if (Smart(e3._selector).styles) {
                    const t2 = document.createElement("style");
                    t2.innerHTML = Smart(e3._selector).styles, e3.shadowRoot.insertBefore(t2, e3.shadowRoot.firstChild);
                  }
                }
                Smart(e3._selector) && Smart(e3._selector).ready && Smart(e3._selector).ready();
              }
              _setId() {
                const e3 = this;
                if (!e3.id) {
                  const t2 = e3.elementName;
                  e3.id = t2.slice(0, 1).toLowerCase() + t2.slice(1) + Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                }
              }
              checkLicense() {
                const e3 = this;
                "Evaluation" === window[n].License && -1 === window.location.hostname.indexOf("htmlelements") && (e3.logWatermark(), e3.logLicense(), window[n].License = "");
              }
              logWatermark() {
                const e3 = document.createElement("a");
                e3.href = "https://www.htmlelements.com/", e3.innerHTML = "https://www.htmlelements.com/", e3.style.position = "absolute", e3.style.right = "5px", e3.style.bottom = "5px", e3.style.color = "#fff", e3.style.padding = "20px", e3.style.borderRadius = "5px", e3.style.background = "#0C3D78", e3.style.cursor = "pointer", e3.style.zIndex = "999999", e3.style.display = "block", e3.style.fontSize = "24px", e3.style.textDecoration = "none", e3.style.fontWeight = "bold", e3.style.opacity = 0, e3.style.transition = "opacity .35s ease-in-out", e3.id = "watermark", document.getElementById("watermark") || setTimeout(() => {
                  document.getElementById("watermark") || (document.body.appendChild(e3), setTimeout(() => {
                    e3.style.opacity = 1;
                  }), setTimeout(() => {
                    e3.style.opacity = 0, setTimeout(() => {
                      e3.parentNode.removeChild(e3);
                    }, 350);
                  }, 6e3));
                }, 1e3);
              }
              logLicense() {
                console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("*jQWidgets License Key Not Found."), console.log("*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION."), console.log("*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license."), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************");
              }
              get _selector() {
                const e3 = this;
                return e3.id ? "#" + e3.id : e3.classList.length > 0 ? "." + e3.classList[0] : "";
              }
              applyDataContext(e3) {
                const t2 = this;
                let n2 = "string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext;
                if (e3 && (n2 = e3, t2.dataContext = e3), n2) {
                  if (!n2._uid) {
                    n2._uid = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase(), n2._properties = [];
                    for (let e4 in n2) {
                      const o2 = n2[e4];
                      "function" != typeof o2 && "_properties" !== e4 && "_uid" !== e4 && (n2._properties[e4] = o2, Object.defineProperty(n2, e4, { configurable: false, enumerable: true, get: () => n2._properties[e4], set(o3) {
                        const r3 = n2._properties[e4];
                        n2._properties[e4] = o3;
                        let i2 = [];
                        i2[e4] = { oldValue: r3, value: o3 }, i2.length++, t2.updatingDataContext = true, w.fireEvent("dataContextPropertyChanged", { dataContext: n2, properties: i2 }, { bubbles: false, cancelable: true }), t2.updatingDataContext = false;
                      } }));
                    }
                  }
                  if (t2.dataContextProperties = t2.parseAttributes(t2), t2.dataContextPropertiesMap = {}, t2.dataContextListeners = {}, t2.dataContextProperties) {
                    t2.updatingDataContext = true;
                    for (let e4 in t2.dataContextProperties) {
                      const o2 = t2.dataContextProperties[e4], r3 = o2.name;
                      if (o2.propertyName = e4, t2.dataContextPropertiesMap[r3] = e4, v2.cache["toDash" + e4] || (v2.cache["toDash" + e4] = y2.Core.toDash(r3)), o2.isEvent) {
                        const e5 = o2.value;
                        t2.dataContextListeners[r3] && t2.removeEventListener(r3, t2.dataContextListeners[r3]), t2.dataContextListeners[r3] = function(t3) {
                          n2[e5](t3);
                        }, t2.addEventListener(r3, t2.dataContextListeners[r3]);
                      }
                      if (r3.indexOf(".") >= 0) {
                        const o3 = r3.split(".");
                        let i2 = n2[o3[0]];
                        for (let e5 = 1; e5 < o3.length; e5++) i2 = i2[o3[e5]];
                        void 0 !== i2 && (t2[e4] = i2);
                      } else t2[e4] = n2[r3];
                    }
                    t2.dataContextPropertyChangedHandler = function(e4) {
                      const n3 = e4.detail.properties;
                      if (e4.detail.dataContext === ("string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext)) for (let e5 in n3) {
                        const o2 = t2.dataContextPropertiesMap[e5], r3 = t2.context;
                        o2 && (t2.context = document, t2[o2] = n3[e5].value, t2.context = r3);
                      }
                    }, w.listen("dataContextPropertyChanged", t2.dataContextPropertyChangedHandler), t2.updatingDataContext = false;
                  } else t2.dataContextProperties = null;
                } else {
                  t2.dataContextProperties = null;
                  const e4 = function() {
                    ("string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext) && (t2.applyDataContext(), window.removeEventListener("load", e4));
                  };
                  window.addEventListener("load", e4);
                }
              }
              updateDataContextProperty(e3) {
                const t2 = this, n2 = "string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext, o2 = t2.dataContextProperties[e3];
                if (!t2.updatingDataContext && o2.twoWay) {
                  const r3 = o2.name;
                  if (r3.indexOf(".") >= 0) {
                    const o3 = r3.split(".");
                    let i2 = n2[o3[0]];
                    for (let e4 = 1; e4 < o3.length; e4++) i2 = i2[o3[e4]];
                    void 0 !== i2 && (i2 = t2[e3], c[n2._uid] && (c[n2._uid][e3] = i2));
                  } else n2[r3] = t2[e3], c[n2._uid] && (c[n2._uid][e3] = n2[r3]);
                }
              }
              static get version() {
                return window[n].Version;
              }
              initProperties() {
                const e3 = this;
                if (Smart(e3._selector) && Smart(e3._selector).properties && (e3._initProperties = Smart(e3._selector).properties), e3.hasAttribute("props") && !e3.props ? e3._initProperties = window[e3.getAttribute("props")] : e3.props && (e3._initProperties = e3.props), e3._initProperties) {
                  const t2 = Object.keys(e3._initProperties);
                  for (let n2 = 0; n2 < t2.length; n2++) {
                    const o2 = t2[n2], r3 = e3._initProperties[o2];
                    if (r3.constructor === Smart.ObservableArray || r3 instanceof Smart.ObservableArray) e3[o2] = r3.toArray();
                    else if (r3.constructor === Smart.DataAdapter || "smartDataAdapter" === r3.constructor.name || "object" == typeof r3 && Smart.DataAdapter && r3 instanceof Smart.DataAdapter || r3 instanceof Smart.Observable || r3.constructor === Smart.Observable || "object" != typeof r3 || y2.Types.isArray(r3) || r3 instanceof Date) {
                      if (void 0 === e3[o2] && -1 === ["onReady", "onAttached", "onDetached", "onCreated", "onCompleted"].indexOf(o2)) {
                        const t3 = e3.localize("propertyUnknownName", { name: o2 });
                        e3.log(t3);
                      }
                      e3[o2] = r3;
                    } else if ("messages" !== o2 && "dataSourceMap" !== o2) {
                      if ("object" == typeof r3) {
                        const t3 = function(n3, o3) {
                          const r4 = Object.keys(n3);
                          for (let i2 = 0; i2 < r4.length; i2++) {
                            const s2 = r4[i2], a3 = n3[s2], l2 = e3._properties[o3 + "_" + s2];
                            if (l2 && null === l2.value) {
                              if (void 0 === e3[o3 + "_" + s2]) {
                                const t4 = e3.localize("propertyUnknownName", { name: o3 + "_" + s2 });
                                e3.log(t4);
                              }
                              e3[o3 + "_" + s2] = a3;
                            } else if ("object" == typeof a3 && !y2.Types.isArray(a3) && a3 && a3.constructor !== Date) t3(a3, o3 + "_" + s2);
                            else {
                              if (void 0 === e3[o3 + "_" + s2]) {
                                const t4 = e3.localize("propertyUnknownName", { name: o3 + "_" + s2 });
                                e3.log(t4);
                              }
                              e3[o3 + "_" + s2] = a3;
                            }
                          }
                        };
                        t3(r3, o2);
                      }
                    } else e3[o2] = r3;
                  }
                }
              }
              setup() {
                const e3 = this;
                if (e3.context = this, e3.isReady && !e3.isCompleted) return;
                if (e3.isReady) return e3._setModuleState("attached"), e3.isAttached = true, e3.attached(), e3._handleListeners("listen"), void (e3.context = document);
                e3.ownerElement && e3.ownerElement.detachedChildren.indexOf(e3) >= 0 && e3.ownerElement.detachedChildren.splice(e3.ownerElement.detachedChildren.indexOf(e3), 1), e3.isReady = true, e3.methods = e3.getStaticMember("methods"), e3.initProperties(), a2.isMobile && e3.classList.add("smart-mobile");
                for (let t3 = 0; t3 < e3.attributes.length; t3 += 1) {
                  const n2 = e3.propertyByAttributeName[e3.attributes[t3].name];
                  if (!n2) continue;
                  let o3 = e3.$.getAttributeValue(n2.attributeName, n2.type);
                  const r3 = o3 ? o3.toString() : "";
                  if (!(r3.indexOf("{{") >= 0 || r3.indexOf("[[") >= 0 || "object" !== n2.type && "array" !== n2.type && (e3.attributes[t3].value.indexOf("{{") >= 0 || e3.attributes[t3].value.indexOf("[[") >= 0) || void 0 === o3 || n2.value === o3)) {
                    const r4 = y2.Types.getType(o3), i2 = e3.attributes[t3].value;
                    if (("any" === n2.type || "object" === n2.type) && "" + e3[n2.name] === o3) continue;
                    if ("array" === n2.type && e3[n2.name] && JSON.stringify(e3[n2.name]) === o3) continue;
                    if ("number" === r4 && isNaN(o3) && "NaN" !== i2 && "Infinity" !== i2 && "-Infinity" !== i2) {
                      const t4 = e3.localize("propertyInvalidValueType", { name: n2.name, actualType: "string", type: n2.type });
                      e3.log(t4);
                    }
                    n2.isUpdatingFromAttribute = true, e3[n2.name] = o3, n2.isUpdatingFromAttribute = false;
                  }
                }
                for (let t3 in e3._properties) {
                  const n2 = e3._properties[t3];
                  if ("innerHTML" === t3 && n2.value === n2.defaultValue && (n2.value = n2.defaultValue = y2.Core.html(e3)), "boolean" !== n2.type && "bool" !== n2.type || "false" === e3.getAttribute(n2.attributeName) && (n2.isUpdating = true, e3.setAttribute(n2.attributeName, ""), n2.isUpdating = false), n2.defaultReflectToAttribute && n2.reflectToAttribute) {
                    if (n2.defaultReflectToAttribute && n2.defaultReflectToAttributeConditions) {
                      let t4 = true;
                      for (let o3 = 0; o3 < n2.defaultReflectToAttributeConditions.length; o3++) {
                        const r3 = n2.defaultReflectToAttributeConditions[o3];
                        let i2, s2;
                        for (let e4 in r3) i2 = e4, s2 = r3[e4];
                        e3._properties[i2] && e3._properties[i2].value !== s2 && (t4 = false);
                      }
                      if (!t4) continue;
                    }
                    n2.isUpdating = true, e3.$.setAttributeValue(n2.attributeName, n2.value, n2.type), n2.isUpdating = false;
                  }
                }
                const t2 = [];
                if (e3.children.length > 0) for (let n2 = 0; n2 < e3.children.length; n2++) {
                  const o3 = e3.children[n2];
                  y2.Extend(o3).isCustomElement && t2.push(o3);
                }
                e3.applyTemplate(), e3.complete = function() {
                  if (!e3.templateBindingsReady) {
                    const t4 = (e4) => {
                      e4.templateBindingsReady || (e4.templateBindingsReady = true, e4.updateTextNodes(), e4.updateBoundNodes());
                    };
                    if (e3.ownerElement) {
                      let n2 = e3.ownerElement, o3 = [];
                      for (; n2; ) o3.push(n2), n2 = n2.ownerElement;
                      for (let e4 = o3.length - 1; e4 >= 0; e4--) t4(o3[e4]);
                      t4(e3);
                    } else t4(e3);
                  }
                  const t3 = () => {
                    if (e3._setModuleState("ready"), e3.ready(), "auto" !== e3.renderMode || e3.isRendered || e3.render(), e3.isAttached = true, e3._setModuleState("attached"), e3.attached(), e3._handleListeners("listen"), e3.isHidden || 0 !== e3.offsetWidth && 0 !== e3.offsetHeight || (e3.isHidden = true), e3.completed(), e3.isRendered && (e3.context = document), e3.whenReadyCallbacks) {
                      for (let t4 = 0; t4 < e3.whenReadyCallbacks.length; t4++) e3.whenReadyCallbacks[t4]();
                      e3.whenReadyCallbacks = [];
                    }
                  };
                  if (e3.wait) e3.classList.add("smart-visibility-hidden");
                  else if (e3.classList.contains("smart-async")) requestAnimationFrame(() => {
                    t3();
                  });
                  else {
                    const n2 = e3.shadowParent;
                    e3.shadowParent = null;
                    const o3 = e3.parents;
                    if (e3.shadowParent = n2, 0 === o3.length) return;
                    const r3 = () => {
                      let t4 = e3.ownerElement, n3 = [];
                      for (; t4; ) n3.push(t4), t4 = t4.ownerElement;
                      for (let e4 = n3.length - 1; e4 >= 0; e4--) n3[e4].updateBoundMappedNodes();
                    };
                    e3.ownerElement && "HTML" !== o3[o3.length - 1].nodeName ? e3.getRootNode().host ? t3() : e3.ownerElement && "HTML" === e3.ownerElement.parents[e3.ownerElement.parents.length - 1].nodeName ? (r3(), t3()) : e3.checkIsInDomInterval = setInterval(() => {
                      const n3 = e3.parents;
                      "HTML" === n3[n3.length - 1].nodeName && (clearInterval(e3.checkIsInDomInterval), r3(), t3());
                    }, 100) : t3();
                  }
                };
                let o2 = [].slice.call(e3.querySelectorAll("[smart-id]")).concat(t2);
                if (window[n].EnableShadowDOM && true !== e3.isInShadowDOM && (o2 = [].slice.call(e3.shadowRoot.querySelectorAll("[smart-id]")).concat(t2)), 0 === o2.length) e3.complete();
                else {
                  e3._completeListeners = 0;
                  for (let t3 = 0; t3 < o2.length; t3++) {
                    const n2 = o2[t3];
                    if (y2.Extend(n2).isCustomElement) {
                      const t4 = (function() {
                        e3._completeListeners--, 0 === e3._completeListeners && (e3.complete(), delete e3._completeListeners);
                      }).bind(e3);
                      n2.isCompleted || n2.isUtilityElement || true === n2.wait || (e3._completeListeners++, n2._onCompleted || (n2.completeHandlers = [], n2._onCompleted = function() {
                        for (let e4 = 0; e4 < n2.completeHandlers.length; e4++) n2.completeHandlers[e4]();
                      }), n2.completeHandlers.push(t4));
                    }
                  }
                  0 === e3._completeListeners && e3.complete();
                }
              }
              visibilityChangedHandler() {
                const e3 = this;
                e3.isReady && requestAnimationFrame(() => {
                  0 === e3.offsetWidth || 0 === e3.offsetHeight ? e3.isHidden = true : (e3.isHidden = false, e3.$.fireEvent("resize", e3, { bubbles: false, cancelable: true }));
                });
              }
              attributeChangedCallback(e3, t2, n2) {
                const o2 = this, r3 = o2.propertyByAttributeName[e3];
                if ("class" !== e3 && "style" !== e3 || o2.visibilityChangedHandler(), r3 || o2.attributeChanged(e3, t2, n2), o2.onAttributeChanged && o2.onAttributeChanged(e3, t2, n2), !r3 || r3 && r3.isUpdating) return;
                let i2 = o2.$.getAttributeValue(r3.attributeName, r3.type);
                void 0 !== n2 && o2[r3.name] !== i2 && (r3.isUpdatingFromAttribute = true, o2[r3.name] = void 0 !== i2 ? i2 : o2._properties[r3.name].defaultValue, r3.isUpdatingFromAttribute = false);
              }
              attributeChanged(e3, t2, n2) {
              }
              set hasStyleObserver(e3) {
                const t2 = this;
                void 0 === t2._hasStyleObserver && (t2._hasStyleObserver = e3), e3 ? d2.watch(t2) : d2.unwatch(t2);
              }
              get hasStyleObserver() {
                const e3 = this;
                return void 0 === e3._hasStyleObserver || e3._hasStyleObserver;
              }
              attached() {
                const e3 = this;
                e3.hasStyleObserver && d2.watch(e3), e3.onAttached && e3.onAttached(), Smart(e3._selector) && Smart(e3._selector).attached && Smart(e3._selector).attached();
              }
              detached() {
                const e3 = this;
                e3.hasStyleObserver && d2.unwatch(e3), e3._setModuleState("detached"), e3.isAttached = false, e3.ownerElement && -1 === e3.ownerElement.detachedChildren.indexOf(e3) && e3.ownerElement.detachedChildren.push(e3), e3._handleListeners("unlisten"), e3.onDetached && e3.onDetached(), Smart(e3._selector) && Smart(e3._selector).detached && Smart(e3._selector).detached(), u2 && u2[e3._selector] && delete u2[e3._selector];
              }
              propertyChangedHandler(e3, t2, n2) {
                const o2 = this;
                t2 !== n2 && ("theme" === e3 && ("" !== t2 && o2.classList.remove("smart-" + t2), "" !== n2 && o2.classList.add("smart-" + n2)), "visibility" === e3 ? ("collapsed" === t2 ? o2.classList.remove("smart-hidden") : "hidden" === t2 && o2.classList.remove("smart-visibility-hidden"), "collapsed" === n2 ? o2.classList.add("smart-hidden") : "hidden" === n2 && o2.classList.add("smart-visibility-hidden")) : ("disabled" === e3 || "readonly" === e3) && o2._ariaPropertyChangedHandler(e3, n2), o2.propertyChanged && o2.propertyChanged(e3, t2, n2));
              }
              _ariaPropertyChangedHandler(e3, t2) {
                const n2 = this;
                "readonly" === e3 && -1 === ["checkbox", "combobox", "grid", "gridcell", "listbox", "radiogroup", "slider", "spinbutton", "textbox"].indexOf(n2.getAttribute("role")) || (t2 ? n2.setAttribute("aria-" + e3, true) : n2.removeAttribute("aria-" + e3));
              }
              _handleListeners(e3) {
                const t2 = this, n2 = t2.tagName.toLowerCase(), o2 = (o3) => {
                  for (let r3 in o3) {
                    const i2 = r3.split(".");
                    let s2 = i2[0], a3 = t2.$;
                    if (i2[1]) if (s2 = i2[1], a3 = t2["$" + i2[0]], "document" === i2[0]) {
                      let e4 = t2.smartId;
                      "" === e4 && (e4 = y2.Core.toCamelCase(n2)), s2 = s2 + "." + e4;
                    } else t2.smartId && (s2 = s2 + "." + t2.smartId + "_" + t2.parents.length);
                    else t2.smartId && (s2 = s2 + "." + t2.smartId);
                    const l2 = o3[r3], d3 = function(e4) {
                      const n3 = t2.context;
                      t2.context = t2, t2[l2] && t2[l2].apply(t2, [e4]), t2.context = n3;
                    };
                    a3 && a3[e3](s2, d3);
                  }
                };
                o2(t2.getStaticMember("listeners")), o2(t2.templateListeners), Smart(t2._selector) && Smart(t2._selector).properties && o2(Smart(t2._selector).listeners);
              }
              parseTemplate() {
                const e3 = this, n2 = e3.template(), r3 = document.createDocumentFragment();
                if (t[e3.nodeName] && !o) return t[e3.nodeName].cloneNode(true);
                if ("" === n2) return null;
                let i2 = document.createElement("div");
                r3.appendChild(i2), i2.innerHTML = n2;
                let s2 = i2.childNodes;
                i2.parentNode.removeChild(i2);
                for (let e4 = 0; e4 < s2.length; e4++) r3.appendChild(s2[e4]);
                return t[e3.nodeName] = r3, o ? r3 : r3.cloneNode(true);
              }
              applyTemplate() {
                const e3 = this, t2 = e3.parseTemplate();
                if (!t2) return;
                if (!t2.hasChildNodes) return;
                const n2 = t2.childNodes[0], o2 = (t3, n3) => {
                  e3["$" + t3] = n3.$ = y2.Extend(n3), e3.$[t3] = n3, n3.ownerElement = e3;
                };
                let r3 = n2;
                if (n2.getElementsByTagName("content").length > 0) {
                  let e4 = n2.getElementsByTagName("content")[0];
                  r3 = e4.parentNode, r3.removeChild(e4);
                } else {
                  const e4 = t2.querySelectorAll("[inner-h-t-m-l]");
                  e4 && e4.length > 0 && (r3 = e4[0]);
                }
                e3.$.template = "template" === n2.nodeName.toLowerCase() ? n2 : n2.querySelector("template");
                let i2 = t2.querySelectorAll("[id]");
                0 === i2.length && (i2 = t2.querySelectorAll("*")), o2("root", n2), o2("content", r3), e3.$.html = e3.innerHTML.toString().trim();
                for (let t3 = 0; t3 < i2.length; t3 += 1) {
                  let n3 = i2[t3];
                  "" === n3.id && (n3.id = "child" + t3), o2(n3.id, n3), n3.setAttribute("smart-id", n3.id), e3.shadowRoot ? n3.shadowParent = e3 : n3.removeAttribute("id");
                }
                for (false !== e3.hasTemplateBindings ? e3.bindings = e3.getBindings(t2) : e3.bindings = [], e3.$root.addClass("smart-container"); e3.childNodes.length; ) r3.appendChild(e3.firstChild);
                if (e3.appendTemplate(t2), e3.$.template) {
                  const t3 = document.createElement("div");
                  t3.classList.add("smart-template-container"), e3.$.templateContainer = t3, e3.$.template.parentNode.insertBefore(t3, e3.$.template), e3.refreshTemplate();
                }
              }
              refreshTemplate() {
                const e3 = this;
                if (!e3.$.templateContainer) return;
                e3.templateDetached(e3.$.templateContainer);
                const t2 = e3.$.template.content.cloneNode(true);
                e3.templateBindings = e3.getBindings(t2), e3.templateProperties = [];
                let n2 = document.createDocumentFragment();
                const o2 = function(t3, n3, r3) {
                  for (let i2 in t3) {
                    const s2 = t3[i2], a3 = s2.node.cloneNode();
                    n3.appendChild(a3);
                    let l2 = [], d3 = false;
                    if (s2.data) for (let t4 in s2.data) {
                      const o3 = s2.data[t4], i3 = o3.name;
                      if (e3.templateProperties[i3] = true, a3.removeAttribute(y2.Core.toDash(t4)), "*items" === t4) l2 = e3[i3], d3 = true;
                      else if (i3.indexOf("item.") >= 0 && void 0 !== r3) o3.value = r3[i3.substring("item.".length)], a3[t4] = o3.value;
                      else if (i3.indexOf("item") >= 0 && void 0 !== r3) o3.value = r3, a3[t4] = o3.value;
                      else if ("*if" === t4) if (i3.indexOf("(") >= 0) {
                        let t5, o4 = i3.substring(i3.indexOf("("));
                        const r4 = i3.substring(0, i3.indexOf("("));
                        if (o4 = o4.substring(1, o4.length - 1), o4 = o4.replace(/ /gi, ""), o4 = o4.split(","), o4.length > 0 && "" !== o4[0]) {
                          let n4 = [];
                          for (let t6 = 0; t6 < o4.length; t6++) n4.push(e3[o4[t6]]);
                          t5 = e3[r4].apply(e3, n4);
                        } else t5 = e3[r4]();
                        false === t5 && n3.removeChild(a3);
                      } else e3[i3] || n3.removeChild(a3);
                      else e3.updateBoundNode(a3, s2, e3, i3);
                    }
                    if (l2.length > 0 || d3) {
                      for (let e4 = 0; e4 < l2.length; e4++) s2.children && o2(s2.children, a3, l2[e4]);
                      if ("number" == typeof l2) for (let e4 = 0; e4 < l2; e4++) s2.children && o2(s2.children, a3, e4);
                    } else s2.children && o2(s2.children, a3, r3);
                  }
                };
                o2(e3.templateBindings.children, n2), e3.$.templateContainer.innerHTML = "", e3.$.templateContainer.appendChild(n2), e3.templateAttached(e3.$.templateContainer);
              }
              templateAttached() {
              }
              templateDetached() {
              }
              appendTemplate(e3) {
                this.appendChild(e3);
              }
              defineElementModules() {
                const e3 = this, t2 = e3.constructor.prototype;
                if ("BaseElement" === t2.elementName) {
                  t2.modules = e3.constructor.modules;
                  const n2 = t2.modules;
                  for (let t3 = 0; t3 < n2.length; t3 += 1) e3.addModule(n2[t3]);
                } else {
                  const n2 = t2.modules;
                  if (!n2) return;
                  for (let t3 = 0; t3 < n2.length; t3 += 1) {
                    const o2 = n2[t3], r3 = o2.prototype;
                    e3.defineElementMethods(r3.methodNames, r3), e3.defineElementProperties(o2.properties);
                  }
                }
              }
              watch(e3, t2) {
                const n2 = this;
                n2._watch = null !== e3 && null !== t2 ? { properties: e3, propertyChangedCallback: t2 } : null;
              }
              unwatch() {
                this._watch = null;
              }
              set(e3, t2, n2) {
                const o2 = this, r3 = o2.context;
                o2.context = true === n2 ? document : o2, o2[e3] = t2, o2.context = r3;
              }
              get(e3) {
                return this[e3];
              }
              _setModuleState(e3, t2) {
                const n2 = this, o2 = "is" + e3.substring(0, 1).toUpperCase() + e3.substring(1), r3 = "on" + e3.substring(0, 1).toUpperCase() + e3.substring(1);
                for (let i2 = 0; i2 < n2.modulesList.length; i2++) {
                  const s2 = n2.modulesList[i2];
                  s2[o2] = true, s2[e3] && s2[e3](t2), s2[r3] && s2[r3](t2);
                }
              }
              addModule(e3, t2) {
                const n2 = this;
                if (!e3) return;
                const o2 = n2.modules.slice(0), r3 = e3.prototype, i2 = Object.getPrototypeOf(e3);
                if (i2.name && i2.name !== e3.name && n2.addModule(i2), !e3.moduleName && e3.name && (e3.moduleName = e3.name), -1 === o2.findIndex((t3) => e3.moduleName === t3.moduleName) && o2.push(e3), n2.defineModule(e3), n2.defineElementMethods(r3.methodNames, r3), n2.defineElementProperties(e3.properties), n2.constructor.prototype.modules = o2, t2) for (let t3 in Smart.Elements.tagNames) {
                  const o3 = Smart.Elements.tagNames[t3];
                  let r4 = Object.getPrototypeOf(o3), i3 = [];
                  for (; r4 !== HTMLElement; ) i3.push(r4.prototype), r4 = Object.getPrototypeOf(r4);
                  i3.indexOf(n2) >= 0 && o3 !== n2 && o3.prototype.addModule(e3);
                }
              }
              defineModule(e3) {
                if (e3.isDefined) return;
                e3.prototype._initModule = function(e4) {
                  this.ownerElement = e4;
                };
                const t2 = e3.properties || {}, n2 = Object.keys(t2), o2 = Object.getOwnPropertyNames(e3.prototype);
                e3.prototype.methodNames = o2;
                for (let o3 = 0; o3 < n2.length; o3 += 1) {
                  const r3 = n2[o3], i2 = t2[r3];
                  Object.defineProperty(e3.prototype, r3, { configurable: false, enumerable: true, get() {
                    return this.ownerElement ? this.ownerElement[r3] : i2.value;
                  }, set(e4) {
                    this.ownerElement[r3] = e4;
                  } });
                }
                e3.isDefined = true;
              }
              getStaticMember(e3, t2) {
                const o2 = window[n][this.elementName], r3 = o2[e3];
                t2 || (t2 = "");
                let i2 = "array" === t2 ? [] : "string" === t2 ? "" : {}, s2 = Object.getPrototypeOf(o2), a3 = [];
                for (; s2[e3]; ) a3.push(s2[e3]), s2 = Object.getPrototypeOf(s2);
                for (let e4 = a3.length - 1; e4 >= 0; e4--) if ("array" === t2) for (let t3 = 0; t3 < a3[e4].length; t3++) -1 === i2.indexOf(a3[e4][t3]) && i2.push(a3[e4][t3]);
                else "string" === t2 ? -1 === i2.indexOf(a3[e4]) && (i2 += a3[e4]) : i2 = y2.Core.assign(i2, a3[e4]);
                if ("array" === t2) {
                  for (let e4 = 0; e4 < r3.length; e4++) -1 === i2.indexOf(r3[e4]) && i2.push(r3[e4]);
                  return i2;
                }
                return "string" === t2 ? (-1 === i2.indexOf(r3) && (i2 += r3), i2) : y2.Core.assign(i2, r3);
              }
              defineElementHierarchicalProperties(e3, t2) {
                const n2 = this, o2 = [];
                !function(e4) {
                  const n3 = Object.keys(e4);
                  for (let r3 = 0; r3 < n3.length; r3++) {
                    const i2 = n3[r3];
                    if ("messages" === i2) continue;
                    const s2 = e4[i2], a3 = Object.keys(s2), l2 = a3.indexOf("value") >= 0 && a3.indexOf("type") >= 0 && "object" == typeof s2.value;
                    if ("propertyObject" === s2.type || l2) {
                      const e5 = function(n4, r4) {
                        if (!n4.value) return;
                        const i3 = Object.keys(n4.value);
                        for (let s3 = 0; s3 < i3.length; s3++) {
                          const a4 = i3[s3], l3 = n4.value[a4], d3 = r4 + "_" + a4;
                          if ("object" != typeof l3 || null === l3) break;
                          const c2 = Object.keys(l3);
                          if (!(c2.indexOf("value") >= 0 && c2.indexOf("type") >= 0)) break;
                          if ("array" !== n4.type && (n4.isHierarchicalProperty = true), l3.parentPropertyName = r4, t2) {
                            const e6 = t2._properties[d3];
                            if (n4.value.hasOwnProperty(a4)) {
                              if (e6.isDefined) continue;
                              delete n4.value[a4];
                            }
                            e6.isDefined = true, Object.defineProperty(n4.value, a4, { configurable: false, enumerable: true, get: () => t2._properties[d3].value, set(e7) {
                              t2.updateProperty(t2, t2._properties[d3], e7);
                            } });
                          }
                          o2[d3] || (o2[d3] = l3, o2.length++), ("propertyObject" === l3.type || "object" == typeof l3.value && "array" !== l3.type) && e5(t2 ? t2._properties[d3] : l3, d3);
                        }
                      };
                      e5(s2, i2);
                    }
                  }
                }(e3), o2.length > 0 && !t2 && n2.defineElementProperties(o2);
              }
              defineElement() {
                const e3 = this, t2 = e3.constructor.prototype, n2 = e3.getStaticMember("properties"), o2 = Object.getOwnPropertyNames(t2);
                t2.extendedProperties = {}, t2.boundProperties = {}, t2.templateListeners = {}, e3.defineElementModules(), e3.defineElementMethods(o2, t2), e3.defineElementProperties(n2), e3.defineElementHierarchicalProperties(e3.extendedProperties), t2._initElement = function() {
                  const e4 = this, n3 = t2.extendedProperties, o3 = Object.keys(n3), r3 = e4.modules;
                  e4.$ = y2.Extend(e4), e4.$document = w, e4.smartId = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase(), e4.isCreated || (e4.modulesList = [], e4._properties = [], e4._beforeCreatedProperties && (e4._properties = e4._beforeCreatedProperties, delete e4._beforeCreatedProperties), e4.detachedChildren = [], e4.propertyByAttributeName = []);
                  for (let t3 = 0; t3 < r3.length; t3 += 1) {
                    let n4 = new r3[t3]();
                    n4._initModule(e4), e4.modulesList.push(n4);
                  }
                  for (let t3 = 0; t3 < o3.length; t3 += 1) {
                    const r4 = o3[t3], i2 = n3[r4];
                    let s2 = i2.value;
                    if (e4._properties[r4]) {
                      if (void 0 !== e4._properties[r4].notify) continue;
                      delete e4._properties[r4];
                    }
                    if (E2 && "innerHTML" === r4 && delete e4[r4], -1 === window.navigator.userAgent.indexOf("PhantomJS") && e4.hasOwnProperty(r4) && (s2 = e4[r4], delete e4[r4]), "array" === i2.type && null != s2 && (s2 = s2.slice(0)), "object" === i2.type && null != s2 && (s2 = Array.isArray(s2) ? s2.slice(0) : Object.assign({}, s2)), e4._properties[r4] = { name: r4, notify: i2.notify, allowedValues: i2.allowedValues, type: i2.type, nullable: i2.nullable, reflectToAttribute: i2.reflectToAttribute, defaultReflectToAttribute: i2.defaultReflectToAttribute, defaultReflectToAttributeConditions: i2.defaultReflectToAttributeConditions, value: s2, readOnly: i2.readOnly, defaultValue: s2, attributeName: i2.attributeName, observer: i2.observer, inherit: i2.inherit, extend: i2.extend, validator: i2.validator }, e4.propertyByAttributeName[i2.attributeName] = e4._properties[r4], !i2.hasOwnProperty("type")) {
                      const t4 = e4.localize("propertyUnknownType", { name: r4 });
                      e4.log(t4);
                    }
                    if ("any" === i2.type || "propertyObject" === i2.type) continue;
                    const a3 = y2.Types.getType(s2);
                    if (null != s2 && i2.type !== a3 && !i2.validator) {
                      if ("object" === i2.type && "array" === a3) continue;
                      if ("number" === a3 && ["integer", "int", "float"].findIndex((e5) => e5 === i2.type) >= 0) continue;
                      const t4 = e4.localize("propertyInvalidValueType", { name: r4, actualType: a3, type: i2.type });
                      e4.log(t4);
                    }
                  }
                  e4.defineElementHierarchicalProperties(e4._properties, e4), e4.isCreated = true;
                }, t2.registered();
              }
              defineElementMethods(e3, t2) {
                const n2 = this.constructor.prototype, o2 = function(e4, t3) {
                  const n3 = Array.prototype.slice.call(arguments, 2), o3 = function() {
                    if (!this.isReady && "localize" !== t3 && "localize" !== t3 && "cloneNode" !== t3 && "importStyle" !== t3 && "log" !== t3 && "parseAttributes" !== t3) {
                      const e5 = this.localize("elementNotInDOM");
                      this.log(e5);
                    }
                    let o4 = this;
                    for (let e5 = 0; e5 < this.modulesList.length; e5++) {
                      let n4 = this.modulesList[e5];
                      if (t3 in n4) {
                        o4 = n4;
                        break;
                      }
                    }
                    const r4 = this.context, i2 = n3.concat(Array.prototype.slice.call(arguments));
                    let s2 = null;
                    const a3 = function(e5, t4) {
                      return e5 === t4 || "number" === e5 && ("int" === t4 || "integer" === t4 || "float" === t4) || "bool" === e5 && "boolean" === t4 || "boolean" === e5 && "bool" === t4 || "object" === e5 && "any" === t4 || void 0;
                    };
                    if (this.methods) {
                      const e5 = this.methods[t3];
                      if (e5) {
                        const n4 = e5.split(":");
                        s2 = n4[n4.length - 1].trim();
                        const o5 = [], r5 = e5.substring(1 + e5.indexOf("("), e5.lastIndexOf(")")).split(",");
                        let l3 = "";
                        for (let e6 = 0; e6 < r5.length; e6++) {
                          const t4 = r5[e6];
                          l3 += t4, t4.indexOf(":") >= 0 ? (o5.push(l3), l3 = "") : l3 += ",";
                        }
                        let d3 = o5.length;
                        for (let e6 = 0; e6 < o5.length; e6++) {
                          const n5 = o5[e6].trim().split(":"), r6 = n5[0].split("=")[0].trim().indexOf("?") >= 0, s3 = n5[1].indexOf("?") >= 0, l4 = n5[1].replace(/\?/gi, "").trim(), c2 = l4.split("|");
                          let u3 = n5[0].split("=")[1];
                          const p3 = y2.Types.getType(i2[e6]);
                          if (void 0 === i2[e6] && u3) {
                            switch (u3 = u3.trim(), l4[0]) {
                              case "date": {
                                let e7 = u3.substring(u3.indexOf("(") + 1, u3.lastIndexOf(")"));
                                e7 = e7.length > 0 ? e7.split(",").map((e8) => parseInt(e8)) : [], u3 = 0 === e7.length ? /* @__PURE__ */ new Date() : new Date(e7[0], e7[1], e7[2]);
                                break;
                              }
                              case "bool":
                              case "boolean":
                                u3 = "true" === u3 || "1" === u3;
                                break;
                              case "int":
                              case "integer":
                                u3 = parseInt(u3);
                                break;
                              case "float":
                              case "number":
                                u3 = parseFloat(u3);
                                break;
                              case "any":
                              case "object":
                                u3 = u3.indexOf("{") >= 0 ? JSON.parse(u3) : u3;
                            }
                            i2.push(u3);
                          } else r6 && d3--;
                          if (l4 !== p3 && p3) {
                            let n6 = true;
                            for (let e7 = 0; e7 < c2.length; e7++) if (a3(p3, c2[e7])) {
                              n6 = false;
                              break;
                            }
                            if (n6 && (null !== i2[e6] || !s3)) {
                              const n7 = this.localize("methodInvalidValueType", { name: t3, actualType: p3, type: l4, argumentIndex: e6 });
                              this.log(n7);
                            }
                          }
                          if (i2.length < d3) {
                            const e7 = this.localize("methodInvalidArgumentsCount", { name: t3, actualArgumentsCount: i2.length, argumentsCount: d3 });
                            this.log(e7);
                          }
                        }
                      }
                    }
                    this.context = this;
                    const l2 = e4.apply(o4, i2);
                    if (s2) {
                      const e5 = void 0 === y2.Types.getType(l2) ? "void" : y2.Types.getType(l2);
                      if (!a3(e5, s2)) {
                        const n4 = this.localize("methodInvalidReturnType", { name: t3, actualType: e5, type: s2 });
                        this.log(n4);
                      }
                    }
                    return this.context = r4, l2;
                  };
                  return o3;
                }, r3 = ["constructor", "ready", "created", "render", "attached", "detached", "appendChild", "insertBefore", "removeChild", "connect", "disconnectedCallback", "connectedCallback", "attributeChangedCallback", "propertyChangedHandler", "enableShadowDOM", "isInShadowDOM", "addPropertyBindings"];
                for (let i2 in e3) {
                  let s2 = e3[i2];
                  s2.startsWith("_") || void 0 !== r3.find((e4) => e4 === s2) || n2.extendedProperties[s2] || y2.Types.isFunction(t2[s2]) && (n2[s2] = o2(t2[s2], s2));
                }
              }
              defineElementProperties(e3) {
                if (!e3) return;
                const t2 = this, n2 = t2.constructor.prototype, o2 = Object.keys(e3), r3 = t2.getStaticMember("properties");
                Object.assign(n2.extendedProperties, e3), t2.updateProperty = function(e4, t3, n3) {
                  const o3 = e4;
                  if (!t3 || t3.readOnly) return;
                  if (t3.allowedValues) {
                    let e5 = false;
                    for (let o4 = 0; o4 < t3.allowedValues.length; o4++) if (t3.allowedValues[o4] === n3) {
                      e5 = true;
                      break;
                    }
                    if (!e5) {
                      const e6 = JSON.stringify(t3.allowedValues).replace(/\[|\]/gi, "").replace(",", ", ").replace(/"/gi, "'"), r5 = "'" + n3 + "'", i3 = o3.localize("propertyInvalidValue", { name: t3.name, actualValue: r5, value: e6 });
                      return void o3.log(i3);
                    }
                  }
                  const r4 = t3.name, i2 = o3._properties[r4].value;
                  if (t3.validator && o3[t3.validator]) {
                    const e5 = o3.context;
                    o3.context = o3;
                    const r5 = o3[t3.validator](i2, n3);
                    void 0 !== r5 && (n3 = r5), o3.context = e5;
                  }
                  if (i2 !== n3) {
                    if (o3.propertyChanging) {
                      const e5 = o3.propertyChanging(r4, i2, n3);
                      if (false === e5 || null === e5) return;
                    }
                    if (!t3.hasOwnProperty("type")) {
                      const e5 = o3.localize("propertyUnknownType", { name: r4 });
                      o3.log(e5);
                    }
                    if ("array" !== t3.type || JSON.stringify(i2) !== JSON.stringify(n3)) {
                      if (null != n3 && "any" !== t3.type && "propertyObject" !== t3.type && t3.type !== y2.Types.getType(n3) && !t3.validator || null === n3 && !t3.nullable) {
                        let e5 = true;
                        if ("object" === t3.type && "array" === y2.Types.getType(n3) && (e5 = false), "number" === y2.Types.getType(n3) && ["integer", "int", "float"].findIndex((e6) => e6 === t3.type) >= 0 && (e5 = false), e5) {
                          const e6 = o3.localize("propertyInvalidValueType", { name: r4, actualType: y2.Types.getType(n3), type: t3.type });
                          return void o3.error(e6);
                        }
                      }
                      if (t3.isUpdating = true, t3.isHierarchicalProperty) {
                        const e5 = function(t4, n4) {
                          const r5 = Object.keys(t4);
                          for (let i3 = 0; i3 < r5.length; i3++) {
                            const s2 = r5[i3], a3 = t4[s2];
                            "object" == typeof a3 && !y2.Types.isArray(a3) && a3 && a3.constructor !== Date ? e5(a3, n4 + "_" + s2) : o3[n4 + "_" + s2] = a3;
                          }
                        };
                        e5(n3, r4);
                      } else o3._properties[r4].value = n3;
                      if (!t3.isUpdatingFromAttribute && t3.reflectToAttribute && o3.$.setAttributeValue(t3.attributeName, n3, t3.type), o3.isReady && (!o3.ownerElement || o3.ownerElement && o3.ownerElement.isReady)) {
                        if ("wait" === r4 && (n3 || !i2 || o3.isCompleted || (o3.classList.remove("smart-visibility-hidden"), o3.ownerElement && o3.ownerElement.updateBoundMappedNodes(), o3.updateBoundMappedNodes(), o3.complete())), "renderMode" === r4) return;
                        if (o3.context !== o3 && !o3.wait) {
                          const e6 = o3.context;
                          o3.context = o3, o3.propertyChangedHandler(r4, i2, n3), o3.context = e6, t3.observer && o3[t3.observer] && (o3.context = o3, o3[t3.observer](i2, n3), o3.context = document), o3._watch && o3._watch.properties.indexOf(r4) >= 0 && o3._watch.propertyChangedCallback(r4, i2, n3);
                        }
                        const e5 = t3.notify || o3.boundProperties[r4];
                        e5 && (o3.$.fireEvent(t3.attributeName + "-changed", { context: o3.context, oldValue: i2, value: o3[r4] }), o3.boundProperties[r4] && o3.updateBoundNodes(r4)), e5 && o3.templateProperties && o3.templateProperties[r4] && o3.refreshTemplate(), o3.dataContextProperties && ("dataContext" === r4 ? o3.applyDataContext() : o3.dataContextProperties[r4] && o3.updateDataContextProperty(r4));
                      }
                      t3.isUpdating = false;
                    }
                  }
                };
                for (let t3 = 0; t3 < o2.length; t3 += 1) {
                  const i2 = o2[t3], s2 = e3[i2], a3 = y2.Core.toDash(i2), l2 = s2.type || "any", d3 = l2.indexOf("?") >= 0 || "any" === l2;
                  d3 && "any" !== l2 && (s2.type = l2.substring(0, l2.length - 1)), s2.nullable = d3, s2.attributeName = a3.toLowerCase(), s2.name = i2, s2.reflectToAttribute = void 0 === s2.reflectToAttribute || s2.reflectToAttribute, s2.inherit && r3[i2] && (s2.value = r3[i2].value), s2.extend && r3[i2] && y2.Core.assign(s2.value, r3[i2].value), n2.hasOwnProperty(i2) || Object.defineProperty(n2, i2, { configurable: false, enumerable: true, get() {
                    if (this._properties[i2]) return this._properties[i2].value;
                  }, set(e4) {
                    const t4 = this;
                    t4.updateProperty(t4, t4._properties[i2], e4);
                  } });
                }
              }
            }
            let _2 = [], S2 = [], x = [], E2 = false;
            const A2 = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
            A2 && parseInt(A2[2], 10) <= 50 && (E2 = true);
            class T2 {
              static register(e3, t2) {
                const o2 = t2.prototype;
                let r3 = a2.toCamelCase(e3).replace(/[a-z]+/, ""), i2 = t2.version || window[n].Version;
                if (window.customElements.get(e3) && window.customElements.get(e3).version === i2) return;
                let s2 = e3;
                for (i2 = i2.split("."); window.customElements.get(e3); ) e3 = s2 + "-" + i2.join("."), i2[2] = parseInt(i2[2]) + 1;
                if (!_2[e3]) {
                  if (e3.startsWith(n.toLowerCase())) _2[e3] = window[n][r3] = window[n.toLowerCase() + r3] = t2;
                  else {
                    let o3 = e3.split("-")[0];
                    o3 = o3.substring(0, 1).toUpperCase() + o3.substring(1), window[n][o3] || (window[n][o3] = {}), _2[e3] = window[n][o3][r3] = window[o3.toLowerCase() + r3] = t2, window[n][r3] && (r3 = a2.toCamelCase(e3)), window[n][r3] = t2;
                  }
                  o2.elementName = r3, o2.defineElement(), S2[e3] && S2[e3](o2), window.customElements.define(e3, t2);
                }
              }
              static registerElements() {
                const e3 = this;
                if (e3.toRegister) {
                  e3.isRegistering = true;
                  for (let t2 = 0; t2 < e3.toRegister.length; t2++) {
                    const n2 = e3.toRegister[t2];
                    e3.register(n2.tagName, n2.element);
                  }
                  e3.isRegistering = false;
                }
              }
              static get(e3) {
                if (_2[e3]) return _2[e3];
              }
              static whenRegistered(e3, t2) {
                if (!e3) throw new Error("Syntax Error: Invalid tag name");
                const n2 = S2[e3], o2 = this.get(e3), r3 = o2 ? o2.modules.length : 3;
                try {
                  n2 || o2 ? !n2 && o2 ? (t2(o2.prototype), S2[e3] = void 0) : n2 && !o2 ? S2[e3] = function(e4) {
                    n2(e4), t2(e4);
                  } : n2 && o2 && (o2.proto && (n2(o2.proto), t2(o2.proto)), S2[e3] = void 0) : S2[e3] = function(e4) {
                    try {
                      t2(e4);
                    } catch (e5) {
                      const t3 = e5 instanceof Error ? e5.message : e5.toString();
                      console.log(t3);
                    }
                  };
                } catch (e4) {
                  const t3 = e4 instanceof Error ? e4.message : e4.toString();
                  console.log(t3);
                }
                if (o2 && r3 !== o2.prototype.modules.length) {
                  const t3 = document.querySelectorAll(e3);
                  for (let e4 = 0; e4 < t3.length; e4++) {
                    const n3 = t3[e4];
                    n3.isCreated && n3._initElement();
                  }
                }
              }
            }
            T2.lazyRegister = false, T2.tagNames = [];
            class P2 {
              constructor() {
                const e3 = this;
                e3.name = "observableArray", e3.observables = arguments.length < 3 ? null : arguments[2];
                const t2 = new Proxy(e3, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, apply: function(e4, t3, n2) {
                  return e4.apply(t3, n2);
                }, get: function(t3, n2) {
                  return t3[n2] || isNaN(parseInt(n2)) ? t3[n2] : e3.getItem(parseInt(n2));
                }, set: function(t3, n2, o2) {
                  return t3[n2] || isNaN(parseInt(n2)) ? (t3[n2] = o2, true) : (e3.setItem(parseInt(n2), o2), true);
                } });
                if (e3._addArgs = { eventName: "change", object: t2, action: "add", index: null, removed: new Array(), addedCount: 1 }, e3._removeArgs = { eventName: "change", object: t2, action: "remove", index: null, removed: null, addedCount: 0 }, arguments.length >= 1 && Array.isArray(arguments[0])) {
                  e3._array = [];
                  const t3 = arguments[0];
                  for (let n2 = 0, o2 = t3.length; n2 < o2; n2++) {
                    const o3 = e3._getItem(e3._array.length, t3[n2]);
                    e3._array.push(o3);
                  }
                } else e3._array = Array.apply(null, arguments);
                return 2 === arguments.length && (e3.notifyFn = arguments[1]), t2;
              }
              get canNotify() {
                const e3 = this;
                return void 0 === e3._canNotify && (e3._canNotify = true), e3._canNotify;
              }
              set canNotify(e3) {
                this._canNotify = e3;
              }
              _notify(e3) {
                const t2 = this;
                t2.canNotify && t2.notifyFn && t2.notifyFn(e3);
              }
              notify(e3) {
                e3 && (this.notifyFn = e3);
              }
              toArray() {
                return this._array;
              }
              _getItem(e3, t2) {
                const n2 = this;
                return "string" == typeof t2 || "number" == typeof t2 || void 0 === t2 ? t2 : new Proxy(t2, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, set: function(t3, o2, r3) {
                  const i2 = t3[o2];
                  return t3[o2] = r3, !n2._canNotify || false === t3.canNotify || (n2.observables && !n2.observables[o2] || n2._notify({ eventName: "change", object: n2, target: t3, action: "update", index: e3, path: e3 + "." + o2, oldValue: i2, newValue: r3, propertyName: o2 }), true);
                } });
              }
              getItem(e3) {
                return this._array[e3];
              }
              setItem(e3, t2) {
                const n2 = this, o2 = n2._array[e3];
                n2._array[e3] = n2._getItem(e3, t2), n2._notify({ eventName: "change", object: n2._array, action: "update", index: e3, removed: [o2], addedCount: 1 });
              }
              get length() {
                return this._array.length;
              }
              set length(e3) {
                const t2 = this;
                r2.isNumber(e3) && t2._array && t2._array.length !== e3 && t2.splice(e3, t2._array.length - e3);
              }
              toString() {
                return this._array.toString();
              }
              toLocaleString() {
                return this._array.toLocaleString();
              }
              concat() {
                const e3 = this;
                e3._addArgs.index = e3._array.length;
                const t2 = e3._array.concat.apply(e3._array, arguments);
                return new Smart.ObservableArray(t2);
              }
              join(e3) {
                return this._array.join(e3);
              }
              pop() {
                const e3 = this;
                e3._removeArgs.index = e3._array.length - 1, delete e3[e3._array.length - 1];
                const t2 = e3._array.pop();
                return e3._removeArgs.removed = [t2], e3._notify(e3._removeArgs), e3._notifyLengthChange(), t2;
              }
              push() {
                const e3 = this;
                if (e3._addArgs.index = e3._array.length, 1 === arguments.length && Array.isArray(arguments[0])) {
                  const t2 = arguments[0];
                  for (let n2 = 0, o2 = t2.length; n2 < o2; n2++) {
                    const o3 = e3._getItem(e3._array.length, t2[n2]);
                    e3._array.push(o3);
                  }
                } else {
                  const t2 = e3._getItem(e3._addArgs.index, arguments[0]);
                  e3._array.push.apply(e3._array, [t2]);
                }
                return e3._addArgs.addedCount = e3._array.length - e3._addArgs.index, e3._notify(e3._addArgs), e3._notifyLengthChange(), e3._array.length;
              }
              _notifyLengthChange() {
                const e3 = this;
                if (!e3.canNotify) return;
                const t2 = e3._createPropertyChangeData("length", e3._array.length);
                e3._notify(t2);
              }
              _createPropertyChangeData(e3, t2, n2) {
                return { eventName: "change", object: this, action: e3, value: t2, oldValue: n2 };
              }
              reverse() {
                return this._array.reverse();
              }
              shift() {
                const e3 = this, t2 = e3._array.shift();
                return e3._removeArgs.index = 0, e3._removeArgs.removed = [t2], e3._notify(e3._removeArgs), e3._notifyLengthChange(), t2;
              }
              slice(e3, t2) {
                return this._array.slice(e3, t2);
              }
              sort(e3) {
                return this._array.sort(e3);
              }
              splice(e3, t2, n2) {
                const o2 = this, r3 = o2._array.length;
                let i2;
                if (n2 && n2.length) for (let r4 = 0; r4 < n2.length; r4++) i2 = o2._array.splice(e3 + r4, t2, n2[r4]);
                else i2 = o2._array.splice.apply(o2._array, arguments);
                if (n2) {
                  let t3 = o2.canNotify;
                  if (o2.canNotify = false, n2.length) for (let t4 = 0; t4 < n2.length; t4++) o2.setItem(e3 + t4, n2[t4]);
                  else o2.setItem(e3, n2);
                  o2.canNotify = t3, o2._notify({ eventName: "change", object: this, action: "add", index: e3, added: i2, addedCount: o2._array.length > r3 ? o2._array.length - r3 : 0 });
                } else o2._notify({ eventName: "change", object: this, action: "remove", index: e3, removed: i2, addedCount: o2._array.length > r3 ? o2._array.length - r3 : 0 });
                return o2._array.length !== r3 && o2._notifyLengthChange(), i2;
              }
              unshift() {
                const e3 = this, t2 = e3._array.length, n2 = e3._array.unshift.apply(e3._array, arguments);
                return e3._addArgs.index = 0, e3._addArgs.addedCount = n2 - t2, e3._notify(this._addArgs), e3._notifyLengthChange(), n2;
              }
              indexOf(e3, t2) {
                const n2 = this;
                for (let o2 = t2 || 0, r3 = n2._array.length; o2 < r3; o2++) if (n2._array[o2] === e3) return o2;
                return -1;
              }
              lastIndexOf(e3, t2) {
                const n2 = this;
                for (let o2 = t2 || n2._array.length - 1; o2 >= 0; o2--) if (n2._array[o2] === e3) return o2;
                return -1;
              }
              find(e3, t2) {
                return this._array.find(e3, t2);
              }
              findIndex(e3, t2) {
                return this._array.findIndex(e3, t2);
              }
              every(e3, t2) {
                return this._array.every(e3, t2);
              }
              some(e3, t2) {
                return this._array.some(e3, t2);
              }
              forEach(e3, t2) {
                this._array.forEach(e3, t2);
              }
              map(e3, t2) {
                return this._array.map(e3, t2);
              }
              filter(e3, t2) {
                return this._array.filter(e3, t2);
              }
              reduce(e3, t2) {
                return void 0 !== t2 ? this._array.reduce(e3, t2) : this._array.reduce(e3);
              }
              reduceRight(e3, t2) {
                return void 0 !== t2 ? this._array.reduceRight(e3, t2) : this._array.reduceRight(e3);
              }
              move(e3, t2) {
                this.splice(t2, 0, this.splice(e3, 1)[0]);
              }
            }
            let D2 = {};
            window[n] && (D2 = window[n]), window[n] = function(e3, t2) {
              let o2 = e3;
              if (e3) {
                if (e3.indexOf("#") >= 0 || e3.indexOf(".") >= 0) return u2[e3] ? u2[e3] : t2 ? (u2[e3] = new t2(), function(e4, t3) {
                  const n2 = t3.properties;
                  t3._properties = [];
                  const o3 = function(n3, r4) {
                    const i2 = Object.keys(n3);
                    for (let s2 = 0; s2 < i2.length; s2++) {
                      const a3 = i2[s2], l2 = n3[a3];
                      t3._properties[r4 + a3] = l2, Array.isArray(l2) ? t3._properties[r4 + a3] = new P2(l2, function(t4) {
                        const n4 = a3 + "." + t4.path, o4 = t4.newValue, r5 = document.querySelector(e4);
                        if (r5) {
                          const e5 = n4.split(".");
                          let t5 = r5;
                          for (let n5 = 0; n5 < e5.length; n5++) t5 = t5[e5[n5]];
                          t5 = o4;
                        }
                      }) : (Object.defineProperty(n3, a3, { configurable: false, enumerable: true, get: () => t3._properties[r4 + a3], set(e5) {
                        t3._properties[r4 + a3] = e5;
                      } }), l2 && "DataAdapter" === l2.constructor.name || l2 && "object" == typeof l2 && Smart.DataAdapter && l2 instanceof Smart.DataAdapter || "object" == typeof l2 && l2 && Object.keys(l2).length > 0 && o3(l2, r4 + a3 + "."));
                    }
                  };
                  o3(n2, ""), Object.defineProperty(t3, "properties", { configurable: false, enumerable: true, get: () => n2 });
                  const r3 = document.querySelector(e4);
                  if (r3 && r3.isReady) for (let e5 in n2) r3[e5] = n2[e5];
                  else if (r3) {
                    r3.props = {};
                    for (let e5 in n2) r3.props[e5] = n2[e5];
                  }
                }(e3, u2[e3]), u2[e3]) : void 0;
                if (t2) {
                  if (T2.tagNames[e3] = t2, T2.lazyRegister) {
                    T2.toRegister || (T2.toRegister = []);
                    const e4 = a2.toCamelCase(o2).replace(/[a-z]+/, "");
                    return window[n][e4] = t2, void T2.toRegister.push({ tagName: o2, element: t2 });
                  }
                  T2.register(o2, t2);
                }
              }
            }, window.addEventListener("load", function() {
              const e3 = window[n].Elements.tagNames;
              let t2 = [];
              for (let o2 in e3) {
                const r3 = e3[o2];
                let i2 = document.querySelectorAll("[" + o2 + "]");
                for (let e4 = 0; e4 < i2.length; e4++) {
                  const t3 = i2[e4];
                  t3 instanceof HTMLDivElement && (t3.__proto__ = r3.prototype, t3.created(), t3.connectedCallback()), t3.classList.add("smart-element-ready");
                }
                let s2 = r3.name;
                "Item" === s2 && (s2 = "ListItem"), i2 = document.querySelectorAll('[is="' + n.toLocaleLowerCase() + s2 + '"]');
                for (let e4 = 0; e4 < i2.length; e4++) t2.push(i2[e4]);
              }
              if (t2.length > 0) {
                const e4 = (e5) => {
                  let t3 = [], n2 = e5.parentNode;
                  for (; n2 && 9 !== n2.nodeType; ) n2 instanceof HTMLElement == 1 && t3.push(n2), n2 = n2.parentNode;
                  return t3;
                };
                t2.sort(function(t3, n2) {
                  let o2 = e4(t3).length, r3 = e4(n2).length;
                  return o2 < r3 ? 1 : o2 > r3 ? -1 : 0;
                });
                for (let e5 = 0; e5 < t2.length; e5++) {
                  const n2 = t2[e5], o2 = n2.getAttribute("is");
                  let r3;
                  r3 = "smartItem" === o2 ? new window.smartListItem(n2) : new window[o2](n2), r3.removeAttribute("is");
                }
              }
            });
            const L2 = function() {
              if ("complete" === document.readyState && "manual" !== window[n].RenderMode) {
                x.sort(function(e3, t2) {
                  let n2 = e3.element.parents.length, o2 = t2.element.parents.length;
                  return n2 < o2 ? -1 : n2 > o2 ? 1 : 0;
                });
                for (let e3 = 0; e3 < x.length; e3++) window[n].RenderMode = "", x[e3].element.isLoading = false, x[e3].callback(), window[n].RenderMode = "";
                x = [], document.removeEventListener("readystatechange", L2);
              }
            };
            Object.assign(window[n], { Elements: T2, Modules: [], BaseElement: class extends C2 {
              static get observedAttributes() {
                let e3 = this, t2 = ["external-style"];
                for (let n2 in e3.prototype.extendedProperties) {
                  const o2 = e3.prototype.extendedProperties[n2];
                  t2.push(o2.attributeName);
                }
                return t2;
              }
              static get styleUrls() {
                return [];
              }
              static get styles() {
                return "";
              }
              get styleUrl() {
                return this._styleUrl;
              }
              set styleUrl(e3) {
                this._styleUrl = e3;
              }
              get isInShadowDOM() {
                const e3 = this, t2 = e3.getRootNode();
                return !e3.hasAttribute("smart-blazor") && t2 !== document && t2 !== e3;
              }
              getShadowRootOrBody() {
                const e3 = this;
                return e3.isInShadowDOM && e3.getRootNode().host ? e3.getRootNode().host.shadowRoot : document.body;
              }
              get enableShadowDOM() {
                return window[n].EnableShadowDOM;
              }
              importStyle(e3, t2) {
                this._importStyle(e3, t2);
              }
              _importStyle(e3, t2) {
                const n2 = this;
                if (!n2.shadowRoot || !e3) return;
                const o2 = (e4) => {
                  const o3 = n2.shadowRoot.children;
                  for (let n3 = 0; n3 < o3.length; n3++) {
                    const r5 = o3[n3];
                    if (r5 instanceof HTMLLinkElement && r5.href === e4) return t2 && t2(), null;
                  }
                  const r4 = document.createElement("link");
                  return r4.rel = "stylesheet", r4.type = "text/css", r4.href = e4, r4.onload = t2, r4;
                }, r3 = (() => {
                  const e4 = n2.shadowRoot.children;
                  let t3 = null;
                  for (let n3 = 0; n3 < e4.length; n3++) {
                    const o3 = e4[n3];
                    o3 instanceof HTMLLinkElement && (t3 = o3);
                  }
                  return t3;
                })(), i2 = (e4, t3) => {
                  t3.parentNode.insertBefore(e4, t3.nextSibling);
                };
                if (Array.isArray(e3)) {
                  const t3 = document.createDocumentFragment();
                  for (let n3 = 0; n3 < e3.length; n3++) {
                    const r4 = o2(e3[n3]);
                    r4 && t3.appendChild(r4);
                  }
                  r3 ? i2(t3, r3) : n2.shadowRoot.insertBefore(t3, n2.shadowRoot.firstChild);
                } else {
                  const t3 = o2(e3);
                  if (!t3) return;
                  r3 ? i2(t3, r3) : n2.shadowRoot.insertBefore(t3, n2.shadowRoot.firstChild);
                }
              }
              attributeChanged(e3, t2, n2) {
                "style-url" === e3 && (this.styleUrl = n2);
              }
              attributeChangedCallback(e3, t2, n2) {
                this.isReady && super.attributeChangedCallback(e3, t2, n2);
              }
              constructor(e3, t2) {
                super();
                const n2 = this;
                if (e3) {
                  t2 && (n2._initProperties = t2);
                  const o2 = (e4) => {
                    if ("string" == typeof e4 ? document.querySelector(e4) : e4) {
                      const o3 = "string" == typeof e4 ? document.querySelector(e4) : e4;
                      if (o3 instanceof HTMLDivElement) {
                        const r3 = document.createElement(n2.tagName);
                        for (let e5 of o3.attributes) r3.setAttribute(e5.name, o3.getAttribute(e5.name));
                        for (; o3.childNodes.length; ) r3.appendChild(o3.firstChild);
                        return "string" == typeof e4 && (r3.id = e4.substring(1)), r3._initProperties = t2, o3.parentNode && o3.parentNode.replaceChild(r3, o3), r3;
                      }
                      if (t2) {
                        const e5 = o3.context;
                        if (o3._initProperties = t2, o3.isReady) {
                          o3.context = o3;
                          const n3 = {}, r3 = {};
                          for (let e6 in t2) n3[e6] = o3[e6], r3[e6] = t2[e6];
                          Object.getOwnPropertyNames(t2).length > 0 && (o3.initProperties(), o3.propertyChangedHandler(t2, n3, r3)), o3.context = e5;
                        }
                      }
                      return o3;
                    }
                  };
                  if ("string" == typeof e3) {
                    const t3 = document.querySelectorAll(e3), n3 = [];
                    if (t3.length > 1) {
                      for (let e4 = 0; e4 < t3.length; e4++) {
                        const r3 = o2(t3[e4]);
                        n3.push(r3);
                      }
                      return n3;
                    }
                  } else if (e3 && e3.length > 0) {
                    const t3 = e3;
                    if (t3.length > 1) {
                      for (let e4 = 0; e4 < t3.length; e4++) {
                        const n3 = o2(t3[e4]);
                        _2.push(n3);
                      }
                      return _2;
                    }
                  }
                  return o2(e3);
                }
                n2._styleUrl = "", n2.isUtilityElement || n2.created();
              }
              _getRootShadowParent() {
                let e3 = this.shadowParent;
                for (; e3; ) {
                  if (!e3.shadowParent) return e3;
                  e3 = e3.shadowParent;
                }
                return e3 || this.shadowParent;
              }
              _getStyleUrl(e3) {
                let t2 = y2.Core.getScriptLocation() + window[n].StyleBaseUrl + e3;
                return this.shadowParent && (t2 = t2.replace("scoped/", "")), t2;
              }
              _getStyleUrls() {
                const e3 = this;
                e3.nodeName.startsWith(n);
                const t2 = e3.getStaticMember("styleUrls", "array"), o2 = [];
                for (let n2 = 0; n2 < t2.length; n2++) {
                  const r3 = t2[n2], i2 = e3._getStyleUrl(r3);
                  o2.push(i2);
                }
                return o2;
              }
              _setupShadowRoot() {
                const e3 = this;
                e3.classList.add("smart-element-init");
                const t2 = (t3) => {
                  t3.$.root && (t3.$.root.classList.add(n.toLowerCase() + "-element"), t3.$.root.classList.add(e3.nodeName.toLowerCase())), t3.setup(), t3.classList.remove("smart-element-init");
                };
                if (document.adoptedStyleSheets) if (window[n].AdoptedStyleSheets) window[n].AdoptedStyleSheetsLoaded ? (e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets, t2(e3)) : (e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets, window[n].AdoptedStyleSheetsLoadedQueue || (window[n].AdoptedStyleSheetsLoadedQueue = []), window[n].AdoptedStyleSheetsLoadedQueue.push(e3));
                else {
                  const o2 = new CSSStyleSheet();
                  let r3 = y2.Core.getScriptLocation() + "/styles/smart.default.css";
                  o2.replace('@import url("' + r3 + '")').then(() => {
                    if (t2(e3), window[n].AdoptedStyleSheetsLoaded = true, window[n].AdoptedStyleSheetsLoadedQueue) {
                      const e4 = window[n].AdoptedStyleSheetsLoadedQueue;
                      for (let n2 = 0; n2 < e4.length; n2++) {
                        const o3 = e4[n2];
                        t2(o3);
                      }
                      delete window[n].AdoptedStyleSheetsLoadedQueue;
                    }
                  }).catch((e4) => {
                    console.error("Failed to load:", e4);
                  }), window[n].AdoptedStyleSheets = [o2], document.adoptedStyleSheets = [o2], e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets;
                }
              }
              connect() {
                const e3 = this;
                window[n].EnableShadowDOM && !e3.shadowRoot && true !== e3.isInShadowDOM && (e3.attachShadow({ mode: "open" }), e3.shadowRoot && e3.$.root && (e3.shadowRoot.appendChild(e3.$.root), e3.$.root.classList.add(e3.nodeName.toLowerCase()))), e3.shadowRoot || e3.shadowParent ? e3.shadowRoot ? e3._setupShadowRoot() : (e3.shadowParent && window[n].EnableShadowDOM, e3.setup()) : e3.setup();
              }
              connectedCallback() {
                const e3 = this;
                if (e3.isLoading || e3.isUtilityElement) return;
                e3.classList.add("smart-element-init");
                const t2 = function() {
                  e3.classList.remove("smart-element-init");
                };
                if ("complete" === document.readyState && (void 0 === window[n].isAngular && (window[n].isAngular = null !== document.body.querySelector("[ng-version]")), window[n].isAngular)) {
                  for (let t3 = 0; t3 < e3.parents.length && !e3.parents[t3].nodeName.toLowerCase().startsWith(n.toLowerCase() + "-"); t3++) if (e3.parents[t3].hasAttribute("ng-version") && !e3.classList.contains("smart-angular")) {
                    window[n].RenderMode = "manual";
                    break;
                  }
                }
                if ("complete" === document.readyState && "manual" !== window[n].RenderMode) {
                  const n2 = e3.parents;
                  n2.length && "HTML" === n2[n2.length - 1].nodeName || e3.getRootNode().host ? (e3.checkIsInDomTimer && clearInterval(e3.checkIsInDomTimer), t2(), e3.connect()) : (e3.checkIsInDomTimer && clearInterval(e3.checkIsInDomTimer), n2.length > 0 && (e3.checkIsInDomTimer = setInterval(() => {
                    const n3 = e3.parents;
                    0 === n3.length && clearInterval(e3.checkIsInDomTimer), n3.length > 0 && "HTML" === n3[n3.length - 1].nodeName && (clearInterval(e3.checkIsInDomTimer), t2(), e3.connect());
                  }, 100)));
                } else e3.isLoading = true, x.push({ element: this, callback: (function() {
                  this.isReady || (t2(), this.connect());
                }).bind(e3) });
              }
              disconnectedCallback() {
                const e3 = this;
                e3.isAttached ? (e3.shadowParent = null, e3.detached()) : e3._resetShadowParent();
              }
              adoptedCallback() {
                this.setup();
              }
              appendTemplate(e3) {
                const t2 = this;
                t2.shadowRoot ? t2.shadowRoot.appendChild(e3) : t2.appendChild(e3);
              }
              _resetShadowParent() {
                const e3 = this;
                if (!window[n].EnableShadowDOM || null === e3.shadowParent) return;
                const t2 = [];
                let o2 = e3.parentNode;
                for (; o2 && 9 !== o2.nodeType; ) {
                  if (o2 instanceof HTMLElement == 1) t2.push(o2);
                  else if (11 === o2.nodeType && o2.host) {
                    o2 = o2.host;
                    continue;
                  }
                  o2 = o2.parentNode;
                }
                for (let n2 = 0; n2 < t2.length; n2++) if (t2[n2] === e3.shadowParent) return;
                t2.length > 0 && "HTML" === t2[t2.length - 1].nodeName && (e3.shadowParent = null);
              }
            }, Utilities: y2, Import: function(e3, t2) {
              let n2 = 0;
              const o2 = function(e4, t3) {
                return new Promise((n3) => {
                  const o3 = document.createElement("script");
                  o3.src = e4, o3.onload = n3;
                  for (let e5 = 0; e5 < document.head.children.length; e5++) {
                    const o4 = document.head.children[e5];
                    if (o4.src && o4.src.toString().indexOf(t3) >= 0) return void n3();
                  }
                  document.head.appendChild(o3);
                });
              };
              return new Promise((r3) => {
                const i2 = y2.Core.getScriptLocation(), s2 = function(t3) {
                  if (!e3[t3]) return;
                  const a3 = i2 + "/" + e3[t3];
                  o2(a3, e3[t3]).then(function() {
                    n2++, n2 === e3.length && r3(), s2(t3 + 1);
                  });
                };
                if (t2) for (let t3 = 0; t3 < e3.length; t3++) {
                  const s3 = i2 + "/" + e3[t3];
                  o2(s3, e3[t3]).then(function() {
                    n2++, n2 === e3.length && r3();
                  });
                }
                else s2(0);
              });
            }, ObservableArray: P2, Observable: class {
              constructor(e3, t2) {
                const n2 = this;
                var o2;
                return this.name = "observable", e3 && Object.assign(n2, e3), o2 = e3, Object.getOwnPropertyNames(Object.getPrototypeOf(o2)).forEach((e4) => "constructor" === e4 || !!e4.startsWith("_") || void (n2[e4] = o2[e4])), new Proxy(n2, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, get: function(e4, t3) {
                  return e4[t3];
                }, set: function(e4, o3, r3) {
                  const i2 = e4[o3];
                  return i2 === r3 || (e4[o3] = r3, !("notifyFn" !== o3 && !o3.startsWith("_") && "canNotify" !== o3 && (!t2 || -1 !== t2.indexOf(o3)) && n2.canNotify && (n2._notify({ target: e4, propertyName: o3, oldValue: i2, newValue: r3 }), 0)));
                } });
              }
              get canNotify() {
                const e3 = this;
                return void 0 === e3._canNotify && (e3._canNotify = true), e3._canNotify;
              }
              set canNotify(e3) {
                this._canNotify = e3;
              }
              _notify(e3) {
                const t2 = this;
                if (t2.canNotify && t2.notifyFn) for (let n2 = 0; n2 < t2.notifyFn.length; n2++) t2.notifyFn[n2](e3);
              }
              notify(e3) {
                const t2 = this;
                e3 && (t2.notifyFn || (t2.notifyFn = []), t2.notifyFn.push(e3));
              }
            }, Component: class {
              constructor(e3, t2) {
                const n2 = this.name;
                let o2 = null;
                return e3 ? o2 = new window[n2](e3, t2) : (o2 = new window[n2](), o2._initProperties = t2), this._element = o2, o2;
              }
              get name() {
                return "Component";
              }
              get element() {
                return this._element;
              }
            }, Theme: D2.Theme || "", EnableShadowDOM: D2.ShadowDom || false, BaseUrl: "./", StyleBaseUrl: "/styles/default/", Version: e2, Templates: t, RenderMode: D2.RenderMode || "auto", Render: function() {
              const e3 = () => {
                window[n].RenderMode = "", L2();
              };
              "complete" === document.readyState ? e3() : (window.removeEventListener("load", e3), window.addEventListener("load", e3));
            }, Data: u2, Mode: D2.Mode || "production", License: "Evaluation" });
            let O2 = window[n].Theme;
            "manual" !== window[n].RenderMode && document.addEventListener("readystatechange", L2), Object.defineProperty(window[n], "Theme", { configurable: false, enumerable: true, get: () => O2, set(e3) {
              const t2 = O2;
              O2 = e3, w.fireEvent("theme-changed", { oldValue: t2, newValue: e3 }, { bubbles: true, cancelable: true });
            } }), window[n]("smart-base-element", window[n].BaseElement), window[n]("smart-content-element", class extends window[n].BaseElement {
              static get properties() {
                return { content: { type: "any", reflectToAttribute: false }, innerHTML: { type: "string", reflectToAttribute: false } };
              }
              template() {
                return "<div inner-h-t-m-l='[[innerHTML]]'></div>";
              }
              ready() {
                super.ready(), this.applyContent();
              }
              refresh() {
              }
              clearContent() {
                const e3 = this;
                for (; e3.$.content.firstChild; ) e3.$.content.removeChild(e3.$.content.firstChild);
              }
              applyContent() {
                const e3 = this;
                if (void 0 === e3.content) return void (e3.content = e3.$.content);
                if ("" === e3.content || null === e3.content) return void e3.clearContent();
                if (e3.content instanceof HTMLElement) return e3.clearContent(), void e3.$.content.appendChild(e3.content);
                const t2 = document.createDocumentFragment();
                let n2 = document.createElement("div");
                t2.appendChild(n2), e3.content instanceof HTMLElement ? n2.appendChild(e3.content) : n2.innerHTML = e3.content;
                let o2 = Array.from(n2.childNodes);
                n2.parentNode.removeChild(n2);
                for (let e4 = 0; e4 < o2.length; e4++) t2.appendChild(o2[e4]);
                e3.clearContent(), e3.$.content.appendChild(t2);
              }
              propertyChangedHandler(e3, t2, n2) {
                super.propertyChangedHandler(e3, t2, n2);
                const o2 = this;
                t2 !== n2 && ("innerHTML" === e3 && (o2.content = n2, o2.applyContent(), o2.innerHTML = o2.content = y2.Core.html(o2.$.content)), "content" === e3 && o2.applyContent());
              }
            }), window[n]("smart-scroll-viewer", class extends window[n].ContentElement {
              static get properties() {
                return { horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, touchScrollRatio: { type: "any", value: null }, touchVelocityCoefficient: { type: "number", value: 50 }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] } };
              }
              static get listeners() {
                return { touchmove: "_touchmoveHandler", touchstart: "_touchstartHandler", wheel: "_mouseWheelHandler", "document.up": "_upHandler" };
              }
              static get styleUrls() {
                return ["smart.scrollviewer.css"];
              }
              template() {
                return `<div id="container" class="smart-container" role="presentation">
                        <div id="scrollViewerContainer" class="smart-scroll-viewer-container" role="presentation">
                            <div id="scrollViewerContentContainer" inner-h-t-m-l='[[innerHTML]]' class="smart-scroll-viewer-content-container" role="presentation">
                                <content></content>
                            </div>
                        </div>
                        <smart-scroll-bar id="verticalScrollBar" theme="[[theme]]"  animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" orientation="vertical"></smart-scroll-bar>
                        <smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]"></smart-scroll-bar>
                    </div>`;
              }
              appendChild(e3) {
                const t2 = this;
                if (e3) {
                  if (!t2.isCompleted || e3.classList && e3.classList.contains("smart-resize-trigger-container")) {
                    const e4 = Array.prototype.slice.call(arguments, 2);
                    return HTMLElement.prototype.appendChild.apply(t2, e4.concat(Array.prototype.slice.call(arguments)));
                  }
                  t2.$.scrollViewerContentContainer.appendChild(e3);
                }
              }
              removeChild(e3) {
                const t2 = this;
                if (e3) {
                  if (!t2.isCompleted || e3.classList && e3.classList.contains("smart-resize-trigger-container")) {
                    const e4 = Array.prototype.slice.call(arguments, 2);
                    return HTMLElement.prototype.removeChild.apply(t2, e4.concat(Array.prototype.slice.call(arguments)));
                  }
                  t2.$.scrollViewerContentContainer.removeChild(e3);
                }
              }
              removeAll() {
                const e3 = this;
                e3.isCompleted && (e3.$.scrollViewerContentContainer.innerHTML = "");
              }
              _horizontalScrollbarHandler(e3) {
                const t2 = this;
                t2.$.scrollViewerContentContainer.style.left = (t2.rightToLeft ? 1 : -1) * t2.scrollLeft + "px", e3.stopPropagation && e3.stopPropagation(), t2.onHorizontalChange && t2.onHorizontalChange(e3);
              }
              _verticalScrollbarHandler(e3) {
                const t2 = this;
                t2.$.scrollViewerContentContainer.style.top = -t2.scrollTop + "px", e3.stopPropagation && e3.stopPropagation(), t2.onVerticalChange && t2.onVerticalChange(e3);
              }
              _touchmoveHandler(e3) {
                const t2 = this;
                if (t2._touchmoveInside && e3.cancelable) return e3.preventDefault(), void e3.stopPropagation();
                const n2 = t2.scrollHeight > 0, o2 = t2.scrollWidth > 0, r3 = t2._touchCoords;
                if (!n2 && !o2 || !r3) return;
                const i2 = e3.touches[0];
                let s2, a3, l2, d3;
                t2._touchCoords = [i2.pageX, i2.pageY], n2 ? (s2 = t2.scrollTop, a3 = t2.scrollHeight, l2 = i2.pageY, d3 = r3[1]) : (s2 = t2.scrollLeft, a3 = t2.scrollWidth, l2 = i2.pageX, d3 = r3[0]);
                const c2 = parseFloat(l2.toFixed(5)), u3 = parseFloat(d3.toFixed(5));
                0 === s2 && c2 >= u3 || s2 === a3 && c2 <= u3 || (l2 !== d3 && (t2._touchmoveInside = true), e3.cancelable && (e3.preventDefault(), e3.stopPropagation()));
              }
              _touchstartHandler(e3) {
                const t2 = e3.touches[0];
                this._touchCoords = [t2.pageX, t2.pageY];
              }
              _mouseWheelHandler(e3) {
                const t2 = this;
                if (!t2.disabled && (t2.computedHorizontalScrollBarVisibility || t2.computedVerticalScrollBarVisibility)) {
                  if (e3.shiftKey && t2.computedHorizontalScrollBarVisibility) {
                    const n2 = t2.scrollLeft;
                    if (0 === n2 && e3.deltaX < 0 || n2 === t2.scrollHeight && e3.deltaX > 0) return;
                    return e3.stopPropagation(), e3.preventDefault(), void (t2.scrollWidth > 0 && t2.scrollTo(void 0, t2.scrollLeft + t2._getScrollCoefficient(e3, t2.offsetWidth)));
                  }
                  if (t2.computedVerticalScrollBarVisibility) {
                    const n2 = t2.scrollTop;
                    if (0 === n2 && e3.deltaY < 0 || n2 === t2.scrollHeight && e3.deltaY > 0) return;
                    e3.stopPropagation(), e3.preventDefault(), t2.scrollHeight > 0 && t2.scrollTo(t2.scrollTop + t2._getScrollCoefficient(e3, t2.offsetHeight));
                  }
                }
              }
              _overriddenHandler() {
              }
              _upHandler() {
                delete this._touchCoords, delete this._touchmoveInside;
              }
              _getScrollCoefficient(e3, t2) {
                const n2 = e3.deltaMode, o2 = Math.abs(e3.deltaY);
                let r3;
                return 0 === n2 ? r3 = o2 < 100 / 3 ? o2 : t2 : 1 === n2 ? r3 = o2 < 1 ? o2 * (100 / 3) : t2 : 2 === n2 && (r3 = t2), e3.deltaY < 0 ? -r3 : r3;
              }
              applyContent() {
                super.applyContent(), this.refresh();
              }
              get computedHorizontalScrollBarVisibility() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? !e3._scrollView.hScrollBar.$.hasClass("smart-hidden") : null;
              }
              get computedVerticalScrollBarVisibility() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? !e3._scrollView.vScrollBar.$.hasClass("smart-hidden") : null;
              }
              scrollTo(e3, t2) {
                const n2 = this;
                n2._scrollView && (void 0 !== e3 && n2._scrollView.scrollTo(e3), void 0 !== t2 && n2._scrollView.scrollTo(t2, false));
              }
              refreshScrollBarsVisibility() {
                const e3 = this;
                e3._scrollView && (e3._scrollView.hScrollBar.disabled = e3.disabled, e3._scrollView.vScrollBar.disabled = e3.disabled, "disabled" === e3.horizontalScrollBarVisibility && (e3._scrollView.hScrollBar.disabled = true), "disabled" === e3.verticalScrollBarVisibility && (e3._scrollView.vScrollBar.disabled = true), e3.scrollWidth > 0 ? e3._scrollView.hScrollBar.$.removeClass("smart-hidden") : "visible" !== e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.addClass("smart-hidden"), e3.scrollHeight > 0 ? e3._scrollView.vScrollBar.$.removeClass("smart-hidden") : "visible" !== e3.verticalScrollBarVisibility && e3._scrollView.vScrollBar.$.addClass("smart-hidden"), "hidden" === e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.addClass("smart-hidden"), "hidden" === e3.verticalScrollBarVisibility && e3._scrollView.vScrollBar.$.addClass("smart-hidden"), "visible" === e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.removeClass("smart-hidden"), "visible" === e3.verticalScrollBarVisibility && (e3._scrollView.vScrollBar.$.removeClass("smart-hidden"), e3.disabled || (e3._scrollView.vScrollBar.disabled = e3.scrollHeight <= 0)), e3.computedHorizontalScrollBarVisibility && e3.computedVerticalScrollBarVisibility ? (e3._scrollView.hScrollBar.$.addClass("bottom-corner"), e3._scrollView.vScrollBar.$.addClass("bottom-corner")) : (e3._scrollView.hScrollBar.$.removeClass("bottom-corner"), e3._scrollView.vScrollBar.$.removeClass("bottom-corner")));
              }
              ready() {
                super.ready();
                const e3 = this;
                e3.$.verticalScrollBar.onChange = (t2) => {
                  t2.detail = t2, e3._verticalScrollbarHandler(t2);
                }, e3.$.horizontalScrollBar.onChange = (t2) => {
                  t2.detail = t2, e3._horizontalScrollbarHandler(t2);
                }, e3.$.verticalScrollBar.setAttribute("aria-controls", e3.id), e3.$.horizontalScrollBar.setAttribute("aria-controls", e3.id), e3._customScrollView || (e3._scrollView = new Smart.Utilities.Scroll(e3, e3.$.horizontalScrollBar, e3.$.verticalScrollBar)), e3.refresh();
              }
              refresh() {
                const e3 = this;
                function t2() {
                  const t3 = e3.$.scrollViewerContainer.classList.contains("vscroll");
                  e3.$.scrollViewerContainer.classList.remove("vscroll");
                  const n3 = e3.$.scrollViewerContentContainer.offsetWidth - e3.$.scrollViewerContainer.offsetWidth;
                  return n3 > 0 && "hidden" !== e3.horizontalScrollBarVisibility || "visible" === e3.horizontalScrollBarVisibility ? e3.$.scrollViewerContainer.classList.add("hscroll") : e3.$.scrollViewerContainer.classList.remove("hscroll"), t3 && e3.$.scrollViewerContainer.classList.add("vscroll"), n3;
                }
                function n2() {
                  let t3;
                  const n3 = e3.$.scrollViewerContainer.classList.contains("hscroll");
                  if (e3.$.scrollViewerContainer.classList.remove("hscroll"), Smart.Utilities.Core.Browser.Safari) {
                    const n4 = e3.$.scrollViewerContentContainer.getBoundingClientRect().height, o3 = e3.$.scrollViewerContainer.getBoundingClientRect().height;
                    t3 = n4 && o3 ? parseInt(n4) - parseInt(o3) : e3.$.scrollViewerContentContainer.offsetHeight - e3.$.scrollViewerContainer.offsetHeight;
                  } else t3 = e3.$.scrollViewerContentContainer.offsetHeight - e3.$.scrollViewerContainer.offsetHeight;
                  return t3 > 0 && "hidden" !== e3.verticalScrollBarVisibility || "visible" === e3.verticalScrollBarVisibility ? e3.$.scrollViewerContainer.classList.add("vscroll") : e3.$.scrollViewerContainer.classList.remove("vscroll"), n3 && e3.$.scrollViewerContainer.classList.add("hscroll"), t3;
                }
                if (!e3.$.scrollViewerContentContainer) return;
                let o2 = e3.scrollWidth, r3 = e3.scrollHeight;
                e3.scrollWidth = t2(), e3.scrollHeight = n2(), e3.scrollHeight && r3 === e3.scrollHeight || (e3.scrollWidth = t2()), e3.scrollWidth && o2 === e3.scrollWidth || (e3.scrollHeight = n2()), e3.computedVerticalScrollBarVisibility && (e3.scrollHeight += e3._scrollView.hScrollBar.offsetHeight), e3.computedHorizontalScrollBarVisibility && (e3.scrollWidth += e3._scrollView.vScrollBar.offsetWidth), 0 === e3.scrollHeight && e3.scrollWidth > 0 && e3.$.container.offsetHeight - e3.$.content.offsetHeight < 5 && (e3.$.container.style.paddingBottom = e3._scrollView.hScrollBar.offsetHeight + "px");
              }
              attached() {
                const e3 = this;
                super.attached(), e3._scrollView || e3._customScrollView || (e3._scrollView = new Smart.Utilities.Scroll(e3, e3.$.horizontalScrollBar, e3.$.verticalScrollBar));
              }
              detached() {
                const e3 = this;
                super.detached(), e3._scrollView && (e3._scrollView.unlisten(), delete e3._scrollView);
              }
              get scrollWidth() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? 1 === e3._scrollView.hScrollBar.max && "visible" === e3.horizontalScrollBarVisibility ? 0 : e3._scrollView.hScrollBar.max : -1;
              }
              set scrollWidth(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.hScrollBar && (0 === e3 && "visible" === t2.horizontalScrollBarVisibility ? t2._scrollView.hScrollBar.max = 0 : t2._scrollView.hScrollBar.max = e3, t2.refreshScrollBarsVisibility());
              }
              get scrollHeight() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? 1 === e3._scrollView.vScrollBar.max && "visible" === e3.verticalScrollBarVisibility ? 0 : e3._scrollView.vScrollBar.max : 0;
              }
              set scrollHeight(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.vScrollBar && (0 === e3 && "visible" === t2.verticalScrollBarVisibility ? t2._scrollView.vScrollBar.max = 1 : t2._scrollView.vScrollBar.max = e3, t2.refreshScrollBarsVisibility());
              }
              get scrollLeft() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? e3._scrollView.hScrollBar.value : 0;
              }
              set scrollLeft(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.hScrollBar && (t2._scrollView.hScrollBar.value = e3);
              }
              get scrollTop() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? e3._scrollView.vScrollBar.value : 0;
              }
              set scrollTop(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.vScrollBar && (t2._scrollView.vScrollBar.value = e3);
              }
              propertyChangedHandler(e3, t2, n2) {
                const o2 = this;
                super.propertyChangedHandler(e3, t2, n2), "animation" !== e3 && "theme" !== e3 && o2.refresh();
              }
            }), window[n].Utilities.Assign("PositionDetection", class {
              constructor(e3, t2, n2, o2) {
                const r3 = this;
                if (t2) {
                  const n3 = "dropDown" + Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                  t2.id = n3, e3.setAttribute("aria-owns", n3);
                }
                r3.context = e3, r3.dropDown = t2, r3.defaultParent = n2, r3.closeMethod = o2;
              }
              handleAutoPositioning() {
                const e3 = this, t2 = e3.context;
                if ("auto" !== t2.dropDownPosition || t2.disabled || t2.isHidden) return;
                const n2 = window.requestAnimationFrame;
                let o2, r3 = Date.now();
                return o2 = n2(function i2() {
                  t2.isHidden || document.hidden || (o2 = n2(i2), "auto" === t2.dropDownPosition && !t2.disabled && (t2.isInShadowDOM ? document.body.contains(t2.shadowParent) : document.body.contains(t2)) || cancelAnimationFrame(o2), t2.isHidden && cancelAnimationFrame(o2), Date.now() - r3 >= 200 && (e3.scrollHandler(), r3 = Date.now()));
                });
              }
              checkBrowserBounds(e3) {
                const t2 = this.context;
                if ("auto" === t2.dropDownPosition && !t2.disabled) switch (e3) {
                  case "vertically":
                    this.checkBrowserBoundsVertically();
                    break;
                  case "horizontally":
                    this.checkBrowserBoundsHorizontally();
                    break;
                  default:
                    this.checkBrowserBoundsVertically(), this.checkBrowserBoundsHorizontally();
                }
              }
              checkBrowserBoundsHorizontally() {
                const e3 = this.context, t2 = this.dropDown;
                let n2, o2 = 0;
                a2.isMobile || window.innerWidth === document.documentElement.clientWidth || (o2 = window.innerWidth - document.documentElement.clientWidth), null !== e3._dropDownParent ? n2 = true : t2.style.left = "";
                const r3 = window.innerWidth - o2;
                let i2 = e3.getBoundingClientRect().left;
                if (i2 < 0 && (t2.style.left = (n2 ? 0 : Math.abs(i2)) + "px", i2 = parseFloat(t2.style.left)), i2 + t2.offsetWidth > r3) {
                  let e4 = i2 - Math.abs(r3 - i2 - t2.offsetWidth);
                  n2 && (e4 += window.pageXOffset), t2.style.left = (n2 ? e4 : e4 - i2) + "px", window.innerWidth === document.documentElement.clientWidth && (t2.style.left = parseFloat(t2.style.left) + o2 + "px"), n2 && window.innerHeight === document.documentElement.clientHeight && this.positionDropDown(true);
                }
              }
              checkBrowserBoundsVertically(e3) {
                const t2 = this.context, n2 = this.dropDown, o2 = t2._dropDownListPosition;
                e3 || (e3 = t2.getBoundingClientRect()), 0 !== e3.height && (document.documentElement.clientHeight - Math.abs(e3.top + e3.height + n2.offsetHeight) >= 0 ? t2._dropDownListPosition = "bottom" : e3.top - n2.offsetHeight >= 0 ? t2._dropDownListPosition = "top" : t2._dropDownListPosition = "overlay-center", this.updatePositionAttribute(o2, t2._dropDownListPosition));
              }
              scrollHandler() {
                const e3 = this.context;
                if (!e3.parentElement) return;
                const t2 = e3.getBoundingClientRect();
                if (t2.top === e3._positionTop) return;
                const n2 = e3._dropDownListPosition;
                this.checkBrowserBoundsVertically(t2), e3._dropDownListPosition !== n2 && this.positionDropDown(), e3._positionTop = t2.top;
              }
              getDropDownParent(e3) {
                const t2 = this.context, n2 = this.dropDown;
                let o2 = t2.dropDownAppendTo;
                t2._positionedParent = null, null === o2 ? t2._dropDownParent = null : "body" === o2 || o2 === document.body ? t2.getRootNode().host ? t2._dropDownParent = t2.getRootNode().host.shadowRoot : t2._dropDownParent = document.body : o2 instanceof HTMLElement ? t2._dropDownParent = o2 : "string" == typeof o2 ? (o2 = document.getElementById(o2), o2 instanceof HTMLElement ? t2._dropDownParent = o2 : (t2.dropDownAppendTo = null, t2._dropDownParent = null)) : (t2.dropDownAppendTo = null, t2._dropDownParent = null);
                let r3 = t2._dropDownParent;
                if (null !== r3) {
                  for (; r3 && r3 instanceof HTMLElement && "static" === window.getComputedStyle(r3).position && r3 !== t2.getShadowRootOrBody(); ) r3 = r3.parentElement;
                  r3 === document.body ? t2._positionedParent = null : t2._positionedParent = r3, n2 && (n2.setAttribute("animation", t2.animation), "" !== t2.theme && n2.$.addClass(t2.theme), e3 && (t2._dropDownParent.appendChild(n2), n2.$.addClass("smart-drop-down-repositioned")), -1 === t2.detachedChildren.indexOf(n2) && t2.detachedChildren.push(n2));
                }
              }
              dropDownAppendToChangedHandler() {
                const e3 = this.context, t2 = this.dropDown, n2 = e3._dropDownParent;
                this.getDropDownParent(), e3._dropDownParent !== n2 && (e3[this.closeMethod](), ["left", "top", "font-size", "font-family", "font-style", "font-weight"].forEach((e4) => t2.style[e4] = null), null === e3._dropDownParent ? (this.defaultParent.appendChild(t2), t2.$.removeClass("smart-drop-down-repositioned")) : (e3._dropDownParent.appendChild(t2), t2.$.addClass("smart-drop-down-repositioned")));
              }
              dropDownPositionChangedHandler() {
                const e3 = this;
                e3.dropDown.style.transition = "none", e3.context[e3.closeMethod](), e3.setDropDownPosition(), e3.handleAutoPositioning();
              }
              dropDownAttached(e3) {
                const t2 = this.context;
                null !== t2._dropDownParent && (t2._dropDownParent.appendChild(this.dropDown), this.handleAutoPositioning(), e3 && t2[e3]());
              }
              dropDownDetached() {
                const e3 = this.context;
                null !== e3._dropDownParent && document.body.contains(this.dropDown) && document.body.contains(e3._dropDownParent) && e3._dropDownParent.removeChild(this.dropDown);
              }
              setDropDownPosition() {
                const e3 = this.context, t2 = e3.dropDownPosition, n2 = e3._dropDownListPosition;
                "auto" === t2 ? this.checkBrowserBounds() : e3._dropDownListPosition = t2, this.updatePositionAttribute(n2, e3._dropDownListPosition);
              }
              updatePositionAttribute(e3, t2) {
                const n2 = this.context, o2 = this.dropDown;
                n2.$.dropDownButton && !n2.$.dropDownButton.hasAttribute(t2) && (n2.$.dropDownButton.removeAttribute(e3), n2.$.dropDownButton.setAttribute(t2, "")), o2.hasAttribute(t2) || (o2.style.transition = "none", o2.removeAttribute(e3), o2.setAttribute(t2, ""), requestAnimationFrame(function() {
                  o2.style.transition = null;
                }));
              }
              positionDropDown(e3) {
                const t2 = this.context, n2 = this.dropDown;
                if (!t2.opened || null === t2._dropDownParent) return;
                const o2 = t2.getBoundingClientRect();
                let r3, i2;
                if (this.customPositionDropDown) {
                  const e4 = this.customPositionDropDown(o2);
                  r3 = e4.left, i2 = e4.top;
                } else switch (r3 = o2.left, i2 = o2.top, t2._dropDownListPosition) {
                  case "bottom":
                    i2 += t2.$.container.offsetHeight - 1;
                    break;
                  case "center-bottom":
                    i2 += t2.$.container.offsetHeight - 1, r3 += t2.offsetWidth - n2.offsetWidth / 2;
                    break;
                  case "center-top":
                    i2 -= n2.offsetHeight - 1, r3 += t2.offsetWidth - n2.offsetWidth / 2;
                    break;
                  case "top":
                    i2 -= n2.offsetHeight - 1;
                    break;
                  case "overlay-bottom":
                    break;
                  case "overlay-center":
                    i2 -= n2.offsetHeight / 2 - t2.offsetHeight / 2;
                    break;
                  case "overlay-top":
                    i2 -= n2.offsetHeight - t2.offsetHeight;
                }
                const s2 = this.getDropDownOffset();
                n2.style.top = i2 + s2.y + "px", e3 || (n2.style.left = r3 + s2.x + "px");
              }
              getDropDownOffset() {
                const e3 = this.context._positionedParent;
                let t2, n2;
                if (e3 && "#document-fragment" !== e3.nodeName) {
                  const o2 = e3.getBoundingClientRect();
                  t2 = -o2.left, n2 = -o2.top;
                } else t2 = window.pageXOffset, n2 = window.pageYOffset;
                return { x: t2, y: n2 };
              }
              placeOverlay() {
                const e3 = this.context;
                if (!e3.dropDownOverlay || e3._overlay) return;
                const t2 = document.createElement("div");
                t2.classList.add("smart-drop-down-overlay"), t2.style.width = document.documentElement.scrollWidth + "px", t2.style.height = document.documentElement.scrollHeight + "px", document.body.appendChild(t2), e3._overlay = t2;
              }
              removeOverlay(e3) {
                const t2 = this, n2 = t2.context;
                n2._overlay && (n2.hasAnimation && e3 ? requestAnimationFrame(function e4() {
                  t2.dropDown.getBoundingClientRect().height > 0 ? requestAnimationFrame(e4) : (document.body.removeChild(n2._overlay), delete n2._overlay);
                }) : (document.body.removeChild(n2._overlay), delete n2._overlay));
              }
            }), window.Smart.Color = class {
              constructor(e3) {
                this.r = this.g = this.b = 0, this.hex = "";
                const t2 = this.getStandardizedColor(e3);
                t2 && this.setHex(t2.substring(1));
              }
              getStandardizedColor(e3) {
                const t2 = document.createElement("canvas").getContext("2d");
                return t2.fillStyle = e3, t2.fillStyle;
              }
              getInvertedColor() {
                return "" === this.hex ? "transparent" : 255 - (0.299 * this.r + 0.587 * this.g + 0.114 * this.b) < 105 ? "Black" : "White";
              }
              hexToRgb(e3) {
                let t2 = "00", n2 = "00", o2 = "00";
                return 6 === (e3 = this.validateHex(e3)).length ? (t2 = e3.substring(0, 2), n2 = e3.substring(2, 4), o2 = e3.substring(4, 6)) : (e3.length > 4 && (t2 = e3.substring(4, e3.length), e3 = e3.substring(0, 4)), e3.length > 2 && (n2 = e3.substring(2, e3.length), e3 = e3.substring(0, 2)), e3.length > 0 && (o2 = e3.substring(0, e3.length))), { r: this.hexToInt(t2), g: this.hexToInt(n2), b: this.hexToInt(o2) };
              }
              validateHex(e3) {
                return (e3 = (e3 = new String(e3).toUpperCase()).replace(/[^A-F0-9]/g, "0")).length > 6 && (e3 = e3.substring(0, 6)), e3;
              }
              webSafeDec(e3) {
                return e3 = Math.round(e3 / 51), e3 *= 51;
              }
              hexToWebSafe(e3) {
                let t2, n2, o2;
                return 3 === e3.length ? (t2 = e3.substring(0, 1), n2 = e3.substring(1, 1), o2 = e3.substring(2, 1)) : (t2 = e3.substring(0, 2), n2 = e3.substring(2, 4), o2 = e3.substring(4, 6)), this.intToHex(this.webSafeDec(this.hexToInt(t2))) + this.intToHex(this.webSafeDec(this.hexToInt(n2))) + this.intToHex(this.webSafeDec(this.hexToInt(o2)));
              }
              rgbToWebSafe(e3) {
                return { r: this.webSafeDec(e3.r), g: this.webSafeDec(e3.g), b: this.webSafeDec(e3.b) };
              }
              rgbToHex(e3) {
                return this.intToHex(e3.r) + this.intToHex(e3.g) + this.intToHex(e3.b);
              }
              intToHex(e3) {
                let t2 = parseInt(e3).toString(16);
                return 1 === t2.length && (t2 = "0" + t2), t2.toUpperCase();
              }
              hexToInt(e3) {
                return parseInt(e3, 16);
              }
              setRgb(e3, t2, n2) {
                let o2 = function(e4) {
                  return e4 < 0 || e4 > 255 || isNaN(parseInt(e4)) ? 0 : e4;
                };
                this.r = o2(e3), this.g = o2(t2), this.b = o2(n2), this.hex = this.rgbToHex(this);
              }
              setHex(e3) {
                this.hex = e3;
                let t2 = this.hexToRgb(this.hex);
                this.r = t2.r, this.g = t2.g, this.b = t2.b;
              }
            };
          }();
        }
      ),
      /***/
      9135: (
        /***/
        () => {
          Smart("smart-scroll-bar", class extends Smart.BaseElement {
            static get properties() {
              return { clickRepeatDelay: { type: "integer", value: 50 }, largeStep: { type: "integer", value: 100 }, min: { type: "integer", value: 0 }, max: { type: "integer", value: 1e3 }, mechanicalAction: { value: "switchWhileDragging", allowedValues: ["switchUntilReleased", "switchWhenReleased", "switchWhileDragging"], type: "string" }, orientation: { type: "string", value: "horizontal", allowedValues: ["horizontal", "vertical"] }, step: { type: "integer", value: 10 }, showButtons: { type: "boolean", value: true, defaultReflectToAttribute: true }, value: { type: "integer", value: 0 } };
            }
            static get styleUrls() {
              return ["smart.scrollbar.css"];
            }
            template() {
              return '<div id="container" class="smart-container" role="presentation">\n                    <div id="nearButton" class="smart-scroll-button smart-arrow-left" role="presentation" aria-hidden="true"></div>\n                    <div  id="track" class="smart-track" role="presentation">\n                        <div id="thumb" class="smart-thumb" role="presentation"></div>\n                    </div>\n                    <div id="farButton" class="smart-scroll-button smart-arrow-right" role="presentation" aria-hidden="true"></div>\n            </div>';
            }
            static get listeners() {
              return { "nearButton.click": "_nearButtonClickHandler", "nearButton.down": "_startRepeat", "nearButton.up": "_stopRepeat", "nearButton.pointerenter": "_updateInBoundsFlag", "nearButton.pointerleave": "_updateInBoundsFlag", "farButton.click": "_farButtonClickHandler", "farButton.down": "_startRepeat", "farButton.up": "_stopRepeat", "farButton.pointerenter": "_updateInBoundsFlag", "farButton.pointerleave": "_updateInBoundsFlag", "track.down": "_trackDownHandler", "track.click": "_trackClickHandler", "track.move": "_trackMoveHandler", "thumb.down": "_dragStartHandler", "document.move": "_dragHandler", "document.up": "_dragEndHandler", up: "_dragEndHandler", "document.selectstart": "_selectStartHandler", resize: "_resizeHandler" };
            }
            _updateInBoundsFlag(t) {
              const e2 = this, a2 = t.target;
              a2._isPointerInBounds = true, -1 !== t.type.indexOf("leave") && (a2._isPointerInBounds = false), 1 !== ("buttons" in t ? t.buttons : t.which) && e2._stopRepeat(t);
            }
            _startRepeat(t) {
              const e2 = this;
              if (e2.disabled) return;
              const a2 = t.target;
              a2._initialTimer || (a2._initialTimer = setTimeout(function() {
                a2._repeatTimer = setInterval(() => {
                  if (a2._isPointerInBounds) {
                    const e3 = "buttons" in t ? t.buttons : t.which;
                    a2.$.fireEvent("click", { buttons: e3, clientX: t.clientX, clientY: t.clientY, pageX: t.pageX, pageY: t.pageY, screenX: t.screenX, screenY: t.screenY });
                  }
                }, e2.clickRepeatDelay);
              }, 3 * e2.clickRepeatDelay));
            }
            _stopRepeat(t) {
              if (this.disabled) return;
              const e2 = t.target;
              e2._repeatTimer && (clearInterval(e2._repeatTimer), e2._repeatTimer = null), e2._initialTimer && (clearTimeout(e2._initialTimer), e2._initialTimer = null);
            }
            _calculateThumbSize(t) {
              const e2 = this, a2 = e2.max - e2.min, r2 = "horizontal" === e2.orientation ? e2.$.track.offsetWidth > 10 : e2.$.track.offsetHeight > 10;
              let n = 0;
              return a2 >= 1 && r2 ? (n = t / (a2 + t) * t, e2.$.thumb.className.indexOf("smart-hidden") >= 0 && e2.$thumb.removeClass("smart-hidden")) : e2.$thumb.addClass("smart-hidden"), Math.max(10, Math.min(n, t));
            }
            _dragStartHandler(t) {
              const e2 = this;
              e2.disabled || (e2.thumbCapture = true, e2.dragStartX = t.clientX, e2.dragStartY = t.clientY, e2.dragStartValue = e2.value, t.stopPropagation(), t.preventDefault());
            }
            _dragHandler(t) {
              const e2 = this;
              if (true !== e2.thumbCapture) return;
              e2._isThumbDragged = true;
              const a2 = (e2.max - e2.min) / (e2.scrollBarSize - e2.thumbSize), r2 = "horizontal" === e2.orientation ? (t.clientX - e2.dragStartX) * a2 : (t.clientY - e2.dragStartY) * a2;
              let n = r2;
              e2.rightToLeft && "horizontal" === e2.orientation && (n = -r2), e2._updateValue(e2.dragStartValue + n), t.stopPropagation(), t.preventDefault(), t.originalEvent && (t.originalEvent.stopPropagation(), t.originalEvent.preventDefault());
            }
            _dragEndHandler(t) {
              const e2 = this;
              e2._trackDownTimer && (clearInterval(e2._trackDownTimer), e2._trackDownTimer = null), e2.thumbCapture && (e2.thumbCapture = false, e2._isThumbDragged = false, "switchWhenReleased" === e2.mechanicalAction ? e2._updateValue(e2.dragStartValue, e2.value) : "switchUntilReleased" === this.mechanicalAction && e2._updateValue(e2.dragStartValue), t.preventDefault(), t.stopPropagation(), t.originalEvent.preventDefault(), t.originalEvent.stopPropagation());
            }
            _farButtonClickHandler() {
              const t = this;
              if (t.disabled) return;
              const e2 = t.value;
              t._updateValue(t.value + ("horizontal" === t.orientation && t.rightToLeft ? -1 : 1) * t.step), "switchUntilReleased" === t.mechanicalAction && t._updateValue(e2);
            }
            _nearButtonClickHandler() {
              const t = this;
              if (t.disabled) return;
              const e2 = t.value;
              t._updateValue(t.value - ("horizontal" === t.orientation && t.rightToLeft ? -1 : 1) * t.step), "switchUntilReleased" === t.mechanicalAction && t._updateValue(e2);
            }
            propertyChangedHandler(t, e2, a2) {
              super.propertyChangedHandler(t, e2, a2);
              const r2 = this;
              switch (t) {
                case "min":
                case "max":
                case "orientation":
                case "showButtons":
                  r2._layout(), "min" === t ? r2.setAttribute("aria-valuemin", a2) : "max" === t ? r2.setAttribute("aria-valuemax", a2) : "orientation" === t && r2.setAttribute("aria-orientation", a2);
                  break;
                case "value":
                  r2._updateValue(e2, a2);
                  break;
                default:
                  r2._layout();
              }
            }
            render() {
              const t = this;
              t.setAttribute("role", "scrollbar"), t.setAttribute("aria-orientation", t.orientation), t.setAttribute("aria-valuemin", t.min), t.setAttribute("aria-valuemax", t.max), t.setAttribute("aria-valuenow", t.value), t._layout(), super.render();
            }
            _resizeHandler() {
              this._layout();
            }
            refresh() {
              this._layout();
            }
            beginUpdate() {
              this._isUpdating = true;
            }
            endUpdate() {
              this._isUpdating = false, this.refreshValue();
            }
            refreshValue() {
              const t = this;
              t._layout(), t._updateValue(t.value);
            }
            _layout() {
              const t = this;
              t._isUpdating || (t.scrollBarSize = "horizontal" === t.orientation ? t.$.track.offsetWidth : t.$.track.offsetHeight, t.thumbSize = t._calculateThumbSize(t.scrollBarSize), "horizontal" === t.orientation && t.$.thumb.style.width !== t.thumbSize + "px" ? t.$.thumb.style.width = t.thumbSize + "px" : "vertical" === t.orientation && t.$.thumb.style.height !== t.thumbSize + "px" && (t.$.thumb.style.height = t.thumbSize + "px"), "horizontal" === t.orientation ? (t.$.nearButton.classList.contains("smart-arrow-up") && t.$.nearButton.classList.remove("smart-arrow-up"), t.$.farButton.classList.contains("smart-arrow-down") && t.$.farButton.classList.remove("smart-arrow-down"), t.$.nearButton.classList.contains("smart-arrow-left") || t.$.nearButton.classList.add("smart-arrow-left"), t.$.farButton.classList.contains("smart-arrow-right") || t.$.farButton.classList.add("smart-arrow-right")) : (t.$.nearButton.classList.contains("smart-arrow-left") && t.$.nearButton.classList.remove("smart-arrow-left"), t.$.farButton.classList.contains("smart-arrow-right") && t.$.farButton.classList.remove("smart-arrow-right"), t.$.nearButton.classList.contains("smart-arrow-up") || t.$.nearButton.classList.add("smart-arrow-up"), t.$.farButton.classList.contains("smart-arrow-down") || t.$.farButton.classList.add("smart-arrow-down")), t._updateThumbPosition(), (t.value > t.max || t.value < t.min) && t._updateValue(t.value, t.value > t.max ? t.max : t.min));
            }
            _selectStartHandler(t) {
              this.thumbCapture && t.preventDefault();
            }
            _trackDownHandler(t) {
              const e2 = this;
              t.target === e2.$.track && (e2._trackDownTimer && clearInterval(e2._trackDownTimer), e2.thumbCapture || (e2._trackDownTimer = setInterval(function() {
                e2._trackClickHandler(t);
              }, e2.clickRepeatDelay), t.stopPropagation(), t.preventDefault()));
            }
            _trackClickHandler(t) {
              const e2 = this;
              if (e2.disabled) return;
              if (e2._isThumbDragged) return clearInterval(e2._trackDownTimer), void (e2._trackDownTimer = null);
              const a2 = e2.$.thumb.getBoundingClientRect(), r2 = t.pageX - window.pageXOffset, n = t.pageY - window.pageYOffset, i = (e2.rightToLeft ? -1 : 1) * e2.value;
              "horizontal" === e2.orientation ? r2 > (e2._isThumbDragged ? e2.dragStartX : a2.right) ? e2._updateValue(e2.value + (e2.rightToLeft ? -1 : 1) * e2.largeStep) : r2 < (e2._isThumbDragged ? e2.dragStartX : a2.left) && e2._updateValue(e2.value - (e2.rightToLeft ? -1 : 1) * e2.largeStep) : n > (e2._isThumbDragged ? e2.dragStartY : a2.bottom) ? e2._updateValue(e2.value + e2.largeStep) : n < (e2._isThumbDragged ? e2.dragStartY : a2.top) && e2._updateValue(e2.value - e2.largeStep), "switchUntilReleased" === e2.mechanicalAction && e2._updateValue(i);
            }
            _trackMoveHandler(t) {
              "touchmove" === t.originalEvent.type && t.originalEvent.preventDefault();
            }
            _updateValue(t, e2) {
              const a2 = this;
              if (!a2._isUpdating && (1 === arguments.length && (e2 = t, t = a2.value), (void 0 === e2 || isNaN(e2)) && (e2 = a2.min), e2 > a2.max && (e2 = a2.max), e2 < a2.min && (e2 = a2.min), a2.value = e2, t !== e2)) {
                if (a2.setAttribute("aria-valuenow", e2), a2._updateThumbPosition(), a2.thumbCapture && "switchWhenReleased" === a2.mechanicalAction) return;
                if (a2.onChange) return void a2.onChange({ value: a2.value, oldValue: t, min: a2.min, max: a2.max, context: a2 });
                a2.$.fireEvent("change", { value: a2.value, oldValue: t, min: a2.min, max: a2.max });
              }
            }
            _updateThumbPosition() {
              const t = this, e2 = "horizontal" === t.orientation ? t.$.track.offsetWidth : t.$.track.offsetHeight, a2 = t._calculateThumbSize(e2), r2 = e2 - a2;
              let n = (e2 - a2) / (t.max - t.min) * (t.value - t.min);
              t.rightToLeft && "horizontal" === t.orientation && (n = (e2 - a2) / (t.max - t.min) * (t.max - t.value - t.min)), n = Math.min(r2, Math.max(0, n)), "vertical" === t.orientation && t.$.thumb.style.top !== n + "px" ? t.$.thumb.style.top = n + "px" : "horizontal" === t.orientation && t.$.thumb.style.left !== n + "px" && (t.$.thumb.style.left = n + "px");
            }
          });
        }
      ),
      /***/
      9532: (
        /***/
        () => {
          Smart("smart-tab-item", class extends Smart.ContentElement {
            static get properties() {
              return { closeButtonHidden: { value: false, type: "boolean" }, index: { value: null, type: "number?" }, selected: { value: false, type: "boolean" }, label: { value: "", type: "string" }, labelSize: { value: null, type: "number?" } };
            }
            get enableShadowDOM() {
              return false;
            }
            render() {
              this.setAttribute("role", "tabpanel"), this.firstElementChild.setAttribute("role", "presentation"), super.render();
            }
            attached() {
              const e2 = this;
              super.attached(), e2.isCompleted && (e2.$.removeClass("right"), e2.$.removeClass("left"), e2.$.removeClass("top"), e2.$.removeClass("bottom"), e2.$.removeClass("animate"));
            }
            propertyChangedHandler(e2, t, o) {
              super.propertyChangedHandler(e2, t, o);
              const n = this;
              if (n._preventPropertyChangedHandler) delete n._preventPropertyChangedHandler;
              else switch (e2) {
                case "closeButtonHidden":
                  n.$.fireEvent("closeButtonVisibilityChange", { hidden: o });
                  break;
                case "disabled": {
                  const e3 = n.tabLabelContainer;
                  e3 && (o ? e3.setAttribute("disabled", "") : e3.removeAttribute("disabled"));
                  break;
                }
                case "index":
                  n.$.fireEvent("indexChange", { newIndex: o, oldIndex: t, tabItem: n });
                  break;
                case "label": {
                  const e3 = n.closest("smart-tabs");
                  e3 ? e3._updateTabLabel(n, o) : n.setAttribute("aria-label", o);
                  break;
                }
                case "selected":
                  n.tabLabelContainer && n.tabLabelContainer.setAttribute("aria-selected", o);
                  break;
                case "labelSize":
                  n.$.fireEvent("labelSizeChange", { size: o });
              }
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              t.firstElementChild.appendChild(e2);
            }
            insertBefore(e2, t) {
              const o = this;
              if (!o.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(o, e3.concat(Array.prototype.slice.call(arguments)));
              }
              o.firstElementChild.insertBefore(e2, t);
            }
            _setIndex(e2) {
              const t = this, o = t.context;
              t.context = t, t.index = e2, t.context = o;
            }
          }), Smart("smart-tab-items-group", class extends Smart.ContentElement {
            static get properties() {
              return { label: { value: "", type: "string" }, labelSize: { value: null, type: "number?" } };
            }
            get enableShadowDOM() {
              return false;
            }
            template() {
              return "";
            }
            propertyChangedHandler(e2, t, o) {
              super.propertyChangedHandler(e2, t, o);
              const n = this;
              if (n._preventPropertyChangedHandler) delete n._preventPropertyChangedHandler;
              else switch (e2) {
                case "label": {
                  const e3 = n.closest("smart-tabs");
                  if (!e3) return;
                  const a2 = e3._groups.indexOf(t);
                  if (a2 < 0) break;
                  const r2 = Array.from(e3.$.tabStrip.querySelectorAll(".smart-tab-group-container")).find((e4) => e4.group === t);
                  Array.from(n.querySelectorAll("smart-tab-item")).forEach((e4) => e4.group = o), r2.querySelector(".smart-tab-label-text-container").innerHTML = o, r2.setAttribute("aria-label", o), r2.group = o, e3._groups[a2] = o;
                  break;
                }
                case "labelSize":
                  this.$.fireEvent("labelSizeChange", { size: o });
              }
            }
          }), Smart("smart-tabs", class extends Smart.BaseElement {
            static get properties() {
              return { addNewTab: { value: false, type: "boolean" }, addNewTabAutoCreate: { value: true, type: "boolean" }, allowToggle: { value: false, type: "boolean" }, closeButtonMode: { value: "default", allowedValues: ["default", "selected"], type: "string" }, closeButtons: { value: false, type: "boolean" }, collapsed: { value: false, type: "boolean" }, collapsible: { value: false, type: "boolean" }, dataSource: { value: null, type: "array?", reflectToAttribute: false }, enableMouseWheelAction: { value: false, type: "boolean" }, messages: { value: { en: { ambiguousIndexes: "smart-tabs: Initially set smart-tab-item indexes are ambiguous and are ignored in favour of the HTML structure.", detailsObjectRequired: 'smart-tabs: The method "insert" requires a details Object to be passed as a second argument.', invalidIndex: 'smart-tabs: "{{method}}" method accepts an index of type number.', referenceNodeNotChild: "smart-tabs: Passed {{argument}} is not part of this smart-tabs element.", tabItemRequired: 'smart-tabs: The method "{{method}}" requires a "smart-tab-item" element to be passed as an argument.' } }, type: "object", extend: true }, name: { value: "", type: "string" }, overflow: { value: "auto", allowedValues: ["auto", "hidden", "scroll"], type: "string" }, reorder: { value: false, type: "boolean" }, resize: { value: false, type: "boolean" }, scrollButtonsPosition: { value: "both", allowedValues: ["near", "far", "both"], type: "string" }, scrollMode: { value: "paging", allowedValues: ["paging", "continuous"], type: "string" }, selectedIndex: { value: null, type: "number?" }, selectionMode: { value: "click", allowedValues: ["click", "dblclick", "mouseenter", "none"], type: "string" }, tabLayout: { value: "scroll", allowedValues: ["scroll", "dropDown", "wrap", "shrink"], type: "string", defaultReflectToAttribute: true }, tabPosition: { value: "top", allowedValues: ["top", "bottom", "left", "right", "hidden"], type: "string" }, tabTextOrientation: { value: "horizontal", allowedValues: ["horizontal", "vertical"], type: "string" } };
            }
            static get listeners() {
              return { closeButtonVisibilityChange: "_closeButtonVisibilityChangeHandler", indexChange: "_indexChangeHandler", keydown: "_keydownHandler", labelSizeChange: "_labelSizeChangeHandler", resize: "_applyTabOverflow", styleChanged: "_applyTabOverflow", "container.dblclick": "_containerHandler", "container.down": "_containerHandler", "container.mouseout": "_containerHandler", "container.mouseover": "_containerHandler", "scrollButtonFar.click": "_scrollButtonClickHandler", "scrollButtonNear.click": "_scrollButtonClickHandler", "tabContentSection.transitionend": "_tabContentSectionTransitionendHandler", "tabsHeaderItems.wheel": "_tabsHeaderItemsWheelHandler", "tabStrip.mouseleave": "_tabStripMouseleaveHandler", "tabStrip.move": "_tabStripMoveHandler", "tabStrip.touchmove": "_tabStripTouchmoveHandler", "tabStrip.touchstart": "_tabStripTouchstartHandler", "document.move": "_documentMoveHandler", "document.selectstart": "_selectStartHandler", "document.up": "_documentUpHandler" };
            }
            static get requires() {
              return { "Smart.RepeatButton": "smart.button.js" };
            }
            static get styleUrls() {
              return ["smart.tabs.css"];
            }
            template() {
              return '<div id="container">\n                    <div id="tabsHeaderSection" class="smart-header smart-tabs-header-section">\n                        <div id="tabsHeaderItems" class="smart-tabs-header-items">\n                            <smart-repeat-button id="scrollButtonNear" class="smart-tabs-scroll-button smart-nav-button smart-spin-button smart-hidden" animation="[[animation]]" unfocusable>\n                                <div id="arrowNear" class="smart-arrow" aria-hidden="true"></div>\n                            </smart-repeat-button>\n                            <div id="tabStrip" class="smart-tab-strip"></div>\n                            <smart-repeat-button id="scrollButtonFar" class="smart-tabs-scroll-button smart-nav-button smart-spin-button smart-hidden" animation="[[animation]]" unfocusable>\n                                <div id="arrowFar" class="smart-arrow" aria-hidden="true"></div>\n                            </smart-repeat-button>\n                            <div id="dropDownButton" class="smart-drop-down-button" role="button" aria-expanded="false" aria-label="Open tab selection popup">\n                                <div id="dropDownButtonArrow" class="smart-drop-down-button-arrow smart-unselectable" aria-hidden="true"></div>\n                            </div>\n                            <span id="tabSelectionBar" class="smart-tabs-selection-bar" role="presentation"></span>\n                            <div id="resizeToken" class="smart-tabs-resize-token smart-hidden" role="presentation"></div>\n                        </div>\n                        <div id="tabHeaderControls" class="smart-tabs-header-controls"></div>\n                    </div>\n                    <div id="tabContentSection" class="smart-tabs-content-section">\n                       <content></content>\n                    </div>\n                    <div id="dropDownButtonDropDown" class="smart-drop-down-button-drop-down smart-hidden"></div>\n                    <input id="hiddenInput" type="hidden" name="[[name]]">\n                </div>';
            }
            attached() {
              const e2 = this;
              super.attached(), e2.isCompleted && e2.isRendered && e2._applyTabOverflow();
            }
            ready() {
              super.ready(), this._flexWritingModeNoFullSupport = true;
            }
            render() {
              this._createElement(), super.render();
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof Smart.TabItem || t.error(t.localize("tabItemRequired", { method: "appendChild" })), t.isRendered ? t.insert(t._tabs.length, { node: e2 }) : t.whenRendered(() => t.insert(t._tabs.length, { node: e2 }));
            }
            collapse() {
              const e2 = this;
              e2.collapsible && !e2.collapsed && (e2.collapsed = true);
            }
            ensureVisible(e2) {
              const t = this;
              if (null === e2 || "wrap" === t.tabLayout || "shrink" === t.tabLayout || "hidden" === t.tabPosition) return;
              t._validateIndex(e2, "ensureVisible"), e2 = Math.max(0, Math.min(e2, t._tabs.length - 1));
              const o = t._tabs[e2].group, n = t.$.tabStrip, a2 = n.getBoundingClientRect(), r2 = (null === o ? t._tabLabelContainers[e2] : t._groupLabels[t._groups.indexOf(o)]).getBoundingClientRect();
              "top" === t.tabPosition || "bottom" === t.tabPosition ? (a2.left > r2.left ? n.scrollLeft += Math.round(r2.left - a2.left) : n.scrollLeft += Math.round(r2.right - a2.right), t.addNewTab && e2 === t._tabs.length - 1 && (n.scrollLeft = n.scrollWidth - n.offsetWidth)) : "left" !== t.tabPosition && "right" !== t.tabPosition || !(a2.top > r2.top || a2.bottom < r2.bottom) ? (n.scrollLeft = t._getScrollLeft(0), t.$.tabStrip.scrollTop = 0) : n.scrollTop += Math.round(r2.bottom - n.offsetHeight - a2.top), t._updateScrollButtonVisibility(), t.resize && t._getTabCoordinates();
            }
            expand() {
              const e2 = this;
              e2.collapsible && e2.collapsed && (e2.collapsed = false);
            }
            getOffsetFromEdgeOfElement(e2) {
              const t = this;
              t._validateIndex(e2, "getOffsetFromEdgeOfElement"), e2 = Math.max(0, Math.min(e2, t._tabs.length - 1));
              const o = t._tabs[e2], n = t.tabPosition;
              return "hidden" !== n ? Math.abs(o.getBoundingClientRect()[n] - t.getBoundingClientRect()[n]) : o.getBoundingClientRect().top - t.getBoundingClientRect().top;
            }
            getTabs() {
              const e2 = this, t = e2._tabs;
              return t ? t.slice(0) : Array.from(e2.shadowRoot ? e2.shadowRoot.querySelectorAll("smart-tab-item") : e2.getElementsByTagName("smart-tab-item"));
            }
            insert(e2, t) {
              const o = this;
              let n, a2;
              if (o._validateIndex(e2, "insert"), (void 0 === t || void 0 === t.label && void 0 === t.content && void 0 === t.node) && o.error(o.localize("detailsObjectRequired")), void 0 === t.node) n = t.group, a2 = document.createElement("smart-tab-item"), a2.label = void 0 !== t.label ? t.label : "", a2.labelSize = void 0 !== t.labelSize ? t.labelSize : null, a2.content = t.content;
              else if (a2 = t.node, void 0 !== a2.index && null !== a2.index) {
                const e3 = a2.context;
                a2.context = a2, a2.index = null, a2.context = e3;
              }
              a2.$.addClass("smart-visibility-hidden"), a2.group = null;
              const r2 = o._addTabLabelContainer(a2), s = r2.tabLabelContainer, i = r2.dropDownLabelContainer;
              s.tab = a2, a2.tabLabelContainer = s;
              const l = { index: e2, tab: a2, tabLabelContainer: s, dropDownLabelContainer: i };
              if (o._setAriaRelations(a2, s, i), 0 === o._groups.length && void 0 === n) o._insertNoGrouping(l);
              else if (null != n) {
                l.group = n;
                const e3 = o.$.tabContentSection.querySelector('smart-tab-items-group[label="' + n + '"]');
                null !== e3 ? (l.smartTabItemsGroup = e3, o._insertIntoExistingGroup(l)) : o._insertIntoNewGroup(l);
              } else o._insertNearAGroup(l);
              o._getReorderItems(), null === o.selectedIndex && !o.allowToggle && o._tabs.length && o._select(0, true), null !== a2.group && null !== a2.labelSize && "shrink" !== o.tabLayout && s.style.removeProperty([o._orientationSettings.dimension]), o._applyTabOverflow();
            }
            insertBefore(e2, t) {
              const o = this;
              if (!o.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(o, e3.concat(Array.prototype.slice.call(arguments)));
              }
              let n;
              e2 instanceof Smart.TabItem && (null == t || t instanceof Smart.TabItem) || o.error(o.localize("tabItemRequired", { method: "insertBefore" })), o.contains(e2) && (e2.selected && (n = true), o.removeAt(e2.index)), null != t ? (o.contains(t) || o.error(o.localize("referenceNodeNotChild", { argument: "referenceNode" })), o.insert(t.index, { node: e2 })) : o.insert(o._tabs.length, { node: e2 }), n && o._select(e2.index, false);
            }
            refreshTabHeader() {
              const e2 = this;
              "scroll" === e2.tabLayout && e2._checkOverflowScroll(), e2._positionTabSelectionBar(e2._tabLabelContainers ? e2._tabLabelContainers[e2.selectedIndex] : void 0, true);
            }
            removeAt(e2) {
              const t = this, o = t._tabs.length;
              if (0 === o) return;
              t._validateIndex(e2, "remove"), e2 = Math.max(0, Math.min(e2, o - 1));
              const n = t._tabs[e2], a2 = t._tabLabelContainers[e2];
              if (a2._lazyRemove ? a2.classList.add("smart-hidden") : a2.parentElement.removeChild(a2), n.parentElement.removeChild(n), null !== n.group) {
                const e3 = t.$.tabContentSection.querySelector('smart-tab-items-group[label="' + n.group + '"]');
                if (0 === e3.childElementCount) {
                  const o2 = t._groups.indexOf(n.group);
                  t.$.tabStrip.removeChild(t._groupLabels[o2]), t._groups.splice(o2, 1), t.$.container.removeChild(t._groupLabels[0].dropDown), t._groupLabels.splice(o2, 1), t.$.tabContentSection.removeChild(e3);
                }
              }
              o > 1 ? e2 < t.selectedIndex ? t.selectedIndex-- : e2 === t.selectedIndex && (e2 === o - 1 ? t._select(e2 - 1, false) : (t._select(e2 + 1, false), t.selectedIndex--)) : (t.selectedIndex = null, t.$.tabContentSection.innerHTML = ""), t._tabLabelContainers.splice(e2, 1), t.$.dropDownButtonDropDown.removeChild(t.$.dropDownButtonDropDown.children[e2]), t._tabs.splice(e2, 1), t._focusedItem === n && (t._focusedItem = t._tabs[t._focusedItem.index]), t._updateTabIndexes(), t._getReorderItems(), t._applyTabOverflow(), t.ensureVisible(t.selectedIndex), t.$.hiddenInput.value = t.selectedIndex;
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof Smart.TabItem || t.error(t.localize("tabItemRequired", { method: "removeChild" })), t.contains(e2) || t.error(t.localize("referenceNodeNotChild", { argument: "node" })), t.removeAt(e2.index);
            }
            select(e2) {
              const t = this;
              0 !== t._tabs.length && (t._validateIndex(e2, "select"), e2 = Math.max(0, Math.min(e2, t._tabs.length - 1)), t.ensureVisible(e2), t._select(e2, true));
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.removeAttribute("tabindex") : (null === e2.getAttribute("tabindex") || e2.getAttribute("tabindex") < 0) && e2.setAttribute("tabindex", 0);
            }
            getTabs() {
              return 0 === this._tabs.length ? [] : this._tabs;
            }
            getTabContent(e2) {
              return this._getTabProperty(e2, "content");
            }
            getTabLabel(e2) {
              return this._getTabProperty(e2, "label");
            }
            _getTabProperty(e2, t) {
              if (0 === this._tabs.length) return null;
              const o = this._tabs[e2];
              return o ? o[t] : null;
            }
            setTabLabel(e2, t) {
              const o = this;
              if (0 === o._tabs.length) return;
              o._validateIndex(e2, "update"), e2 = Math.max(0, Math.min(e2, o._tabs.length - 1));
              const n = o._tabs[e2];
              void 0 !== t && n.label !== t && o._updateTabLabel(n, t);
            }
            update(e2, t, o) {
              const n = this;
              if (0 === n._tabs.length) return;
              n._validateIndex(e2, "update"), e2 = Math.max(0, Math.min(e2, n._tabs.length - 1));
              const a2 = n._tabs[e2];
              void 0 !== t && a2.label !== t && n._updateTabLabel(a2, t), void 0 !== o && (a2.content = o);
            }
            _createElement() {
              const e2 = this;
              e2.$.dropDownButton.id || (e2.$.dropDownButton.id = e2.id + "DropDownButton"), e2.$.dropDownButtonDropDown.id || (e2.$.dropDownButtonDropDown.id = e2.id + "DropDown"), e2.setAttribute("role", "tablist"), e2.$.dropDownButton.setAttribute("role", "button"), e2.$.dropDownButton.setAttribute("aria-haspopup", true), e2.$.dropDownButton.setAttribute("aria-owns", e2.$.dropDownButtonDropDown.id), e2.$.dropDownButtonDropDown.setAttribute("role", "menu"), e2.disabled && (e2.$.scrollButtonNear.disabled = true, e2.$.scrollButtonFar.disabled = true), e2.rightToLeft && (e2.$.tabsHeaderItems.removeChild(e2.$.dropDownButton), "top" === e2.tabPosition || "bottom" === e2.tabPosition ? e2.$.tabsHeaderItems.insertBefore(e2.$.dropDownButton, e2.$.scrollButtonNear) : e2.$.tabsHeaderItems.insertBefore(e2.$.dropDownButton, e2.$.tabSelectionBar)), e2._handlePosition(e2.tabPosition), e2._handleScrollButtonsPosition(e2.scrollButtonsPosition, "both"), null !== e2.dataSource && e2._processDataSource(), e2._setFocusable(), e2.collapsed && !e2.collapsible && (e2.collapsed = false), e2.collapsible && e2.allowToggle && (e2.allowToggle = false), e2._processHTML(), null === e2.selectedIndex && e2.$.tabContentSection.setAttribute("show-placeholder", ""), setTimeout(() => e2.refreshTabHeader(), 300), e2.$.hiddenInput.value = e2.selectedIndex, e2.enableShadowDOM && HTMLElement.prototype.appendChild.apply(e2, [e2.$.hiddenInput]);
            }
            propertyChangedHandler(e2, t, o) {
              super.propertyChangedHandler(e2, t, o);
              const n = this;
              switch (e2) {
                case "addNewTab":
                  o ? n._insertAddNewTab() : (n.$.tabStrip.removeChild(n._addNewTab), delete n._addNewTab), n._applyTabOverflow();
                  break;
                case "allowToggle":
                  o && n.collapsible ? (n.collapsed && n._toggleCollapsedState(), n.collapsible = false) : o || null !== n.selectedIndex || (n.ensureVisible(n.selectedIndex = 0), n._select(n.selectedIndex, true, null));
                  break;
                case "closeButtonMode":
                  if ("selected" === o) {
                    for (let e3 = 0; e3 < n._tabs.length; e3++) n._disableCloseButton(e3);
                    n._enableCloseButton(n.selectedIndex);
                  } else {
                    n._disableCloseButton(n.selectedIndex);
                    const e3 = n._tabLabelContainers;
                    for (let t2 = 0; t2 < e3.length; t2++) {
                      const o2 = e3[t2];
                      o2.closeButtonEnabled = true !== n._tabs[t2].closeButtonHidden, n._showCloseButton(o2);
                    }
                  }
                  n._applyTabOverflow();
                  break;
                case "closeButtons": {
                  const e3 = n._tabLabelContainers, t2 = o ? n._showCloseButton : n._hideCloseButton;
                  for (let o2 = 0; o2 < e3.length; o2++) t2(e3[o2]);
                  n._applyTabOverflow();
                  break;
                }
                case "collapsed":
                  if (!n.collapsible && o) return void (n.collapsed = false);
                  break;
                case "collapsible":
                  !o && n.collapsed && (n.collapsed = false), n.allowToggle = false, void 0 === n.selectedIndex && n.select(n._focusedItem.index);
                  break;
                case "dataSource":
                  n.selectedIndex = null;
                  for (let e3 = 0; e3 < n._groupLabels.length; e3++) n.$.container.removeChild(n._groupLabels[e3].dropDown);
                  n.$.tabStrip.innerHTML = "", n._processDataSource(), n._processHTML();
                  break;
                case "disabled":
                  n._setFocusable(), n.$.scrollButtonNear.disabled = o, n.$.scrollButtonFar.disabled = o, o || n._updateScrollButtonVisibility(), n._closeDropDownButtonDropDown();
                  break;
                case "messages":
                case "scrollMode":
                case "selectionMode":
                case "readonly":
                case "reorder":
                  break;
                case "overflow":
                  if ("scroll" !== n.tabLayout) return;
                  n.$.tabStrip.scrollLeft = n._getScrollLeft(0), n.$.tabStrip.scrollTop = 0, "hidden" === o ? (n.$tabsHeaderSection.removeClass("scroll-buttons-shown"), n.$scrollButtonNear.addClass("smart-hidden"), n.$scrollButtonFar.addClass("smart-hidden")) : n._checkOverflowScroll(), n._getTabCoordinates();
                  break;
                case "tabPosition":
                  n.$.tabSelectionBar.style.transition = "none", n._tabPositionChanging = true, n._closeGroupDropDown(), n._handlePosition(o, t), "shrink" !== n.tabLayout && n._applyLabelSizes("tabPosition"), n.rightToLeft && (n.$.tabsHeaderItems.removeChild(n.$.dropDownButton), "top" === n.tabPosition || "bottom" === n.tabPosition ? n.$.tabsHeaderItems.insertBefore(n.$.dropDownButton, n.$.scrollButtonNear) : n.$.tabsHeaderItems.insertBefore(n.$.dropDownButton, n.$.tabSelectionBar)), n._applyTabOverflow(), delete n._tabPositionChanging, requestAnimationFrame(function() {
                    n.$.tabSelectionBar.style.transition = null;
                  });
                  break;
                case "resize":
                  o && n._getTabCoordinates();
                  break;
                case "rightToLeft":
                  n._positionTabSelectionBar(n._tabLabelContainers[n.selectedIndex], true), n.$.tabsHeaderItems.removeChild(n.$.dropDownButton), !o || "top" !== n.tabPosition && "bottom" !== n.tabPosition ? n.$.tabsHeaderItems.insertBefore(n.$.dropDownButton, n.$.tabSelectionBar) : n.$.tabsHeaderItems.insertBefore(n.$.dropDownButton, n.$.scrollButtonNear), n.ensureVisible(n.selectedIndex);
                  break;
                case "scrollButtonsPosition":
                  n._handleScrollButtonsPosition(o, t);
                  break;
                case "selectedIndex": {
                  if (isNaN(o) && (n.selectedIndex = o = t), !n.allowToggle && null === o) return void (n.selectedIndex = t);
                  let e3 = o;
                  null !== o && (e3 = Math.max(0, Math.min(o, n._tabs.length - 1)), n.ensureVisible(e3)), n._select(e3, true, t);
                  break;
                }
                case "tabLayout":
                  "scroll" === t && (n.$tabsHeaderSection.removeClass("scroll-buttons-shown"), n.$scrollButtonNear.addClass("smart-hidden"), n.$scrollButtonFar.addClass("smart-hidden")), "shrink" === o ? n._applyLabelSizes("shrink", true) : "shrink" === t && n._applyLabelSizes("shrink", false), n._applyTabOverflow(), "scroll" === o && n.disabled && (n.$.scrollButtonNear.disabled = true, n.$.scrollButtonFar.disabled = true), n.ensureVisible(n.selectedIndex);
                  break;
                case "tabTextOrientation":
                  n._applyTabOverflow(), n.ensureVisible(n.selectedIndex);
                  break;
                case "unfocusable":
                  n._setFocusable();
              }
            }
            _addGroupContainer(e2, t) {
              const o = this, n = document.createElement("div"), a2 = document.createElement("div"), r2 = document.createElement("div"), s = document.createElement("div"), i = document.createElement("div");
              return n.className = "smart-tab-group-container smart-unselectable", n.$ = Smart.Utilities.Extend(n), n.setAttribute("role", "group"), n.setAttribute("aria-expanded", false), n.setAttribute("aria-haspopup", true), n.setAttribute("aria-label", e2), a2.className = "smart-tab-label-text-wrapper", a2.setAttribute("role", "presentation"), a2.setAttribute("aria-hidden", true), null !== t && "shrink" !== o.tabLayout && (n.style[o._orientationSettings.dimension] = parseInt(t, 10) + "px"), r2.className = "smart-tab-label-text-container", r2.innerHTML = e2, s.className = "smart-tab-group-arrow", i.className = "smart-tab-group-drop-down smart-hidden", i.$ = Smart.Utilities.Extend(i), i.id = o.id + "GroupDropDown" + e2, i.setAttribute("role", "tablist"), i.setAttribute("aria-orientation", "vertical"), n.setAttribute("aria-owns", i.id), a2.appendChild(r2), a2.appendChild(s), n.appendChild(a2), o.$.container.appendChild(i), n.group = e2, n.dropDown = i, i.groupContainer = n, { label: n, dropDown: i };
            }
            _addGroupElements(e2) {
              const t = this, o = e2.groups, n = e2.groupLabels, a2 = e2.group, r2 = o.indexOf(a2), s = e2.tabLabelContainer;
              let i;
              if (-1 !== r2) i = n[r2], i.dropDown.appendChild(s);
              else {
                o.push(a2);
                const r3 = t._addGroupContainer(a2, e2.smartTabItemsGroup.labelSize), l = r3.dropDown;
                i = r3.label, l.appendChild(s), l.groupContainer = r3.label, e2.documentFragment.appendChild(i), n.push(i);
              }
              t.selectedIndex === e2.i && (t._selectedGroup = i, i.$.addClass("smart-tab-group-selected"));
            }
            _addNewTabHandler(e2, t, o) {
              const n = this;
              n._swiping || (o ? (e2.removeAttribute("hover"), n.addNewTabAutoCreate && (n.insert(n._tabs.length, { label: "New Tab", content: "" }), n._select(n._tabs.length - 1, true)), n.$.fireEvent("addNewTabClick")) : n._reordering || n._swiping || ("mouseover" === t ? e2.setAttribute("hover", "") : "mouseout" === t && e2.removeAttribute("hover")));
            }
            _addTabLabelContainer(e2, t) {
              const o = this, n = document.createElement("div"), a2 = document.createElement("div"), r2 = document.createElement("div"), s = document.createElement("div");
              let i;
              return e2 && (e2.disabled ? n.setAttribute("disabled", "") : n.removeAttribute("disabled")), n.className = "smart-tab-label-container smart-unselectable", a2.className = "smart-tab-label-text-wrapper", r2.className = "smart-tab-label-text-container", r2.setAttribute("role", "presentation"), s.className = "smart-tab-close-button", s.setAttribute("role", "button"), s.setAttribute("aria-label", "Close"), void 0 === t ? (o.closeButtons ? "default" === o.closeButtonMode && e2.closeButtonHidden || "selected" === o.closeButtonMode && !e2.selected ? (s.classList.add("smart-hidden"), n.closeButtonEnabled = false) : (r2.classList.add("smart-close-button-enabled"), n.closeButtonEnabled = true) : (s.classList.add("smart-hidden"), n.closeButtonEnabled = true), i = document.createElement("div"), i.className = "smart-tab-label-container smart-unselectable", e2 && null === e2.group && null !== e2.labelSize && "shrink" !== o.tabLayout && (n.style[o._orientationSettings.dimension] = parseInt(e2.labelSize, 10) + "px")) : (s.classList.add("smart-hidden"), n.closeButtonEnabled = false), o._setLabel(e2 ? e2.label : "+", r2, i), r2.$ = Smart.Utilities.Extend(r2), s.$ = Smart.Utilities.Extend(s), a2.appendChild(r2), a2.appendChild(s), n.appendChild(a2), n.$ = Smart.Utilities.Extend(n), { tabLabelContainer: n, dropDownLabelContainer: i };
            }
            _animateSelection(e2, t, o) {
              const n = this;
              let a2 = "right", r2 = "left";
              if (n.rightToLeft && (a2 = "left", a2 = "right"), n._animatedTab = e2, n._animatedOldTab = t, n._animatedTab && n._animatedOldTab) {
                "left" !== n.tabPosition && "right" !== n.tabPosition || (a2 = "top", r2 = "bottom");
                for (let e3 = 0; e3 < n._tabs.length; e3++) n._tabs[e3].$.removeClass(a2), n._tabs[e3].$.removeClass(r2), n._tabs[e3].$.removeClass("animate");
                if (e2 === t) return e2.$.hasClass("smart-visibility-hidden") ? e2.$.removeClass("smart-visibility-hidden") : e2.$.addClass("smart-visibility-hidden"), void (n._animatedOldTab.classToRemove = a2);
                o ? (e2.$.addClass(a2), e2.$.removeClass("smart-visibility-hidden"), t.$.addClass("smart-visibility-hidden"), requestAnimationFrame(() => {
                  t.$.addClass("animate"), e2.$.addClass("animate"), requestAnimationFrame(() => {
                    t.$.addClass(r2), e2.$.removeClass(a2);
                  });
                }), n._animatedOldTab.classToRemove = r2) : (e2.$.addClass(r2), e2.$.removeClass("smart-visibility-hidden"), t.$.addClass("smart-visibility-hidden"), requestAnimationFrame(() => {
                  t.$.addClass("animate"), e2.$.addClass("animate"), requestAnimationFrame(() => {
                    t.$.addClass(a2), e2.$.removeClass(r2);
                  });
                }), n._animatedOldTab.classToRemove = a2);
              }
            }
            _applyConditionalTabOverflow() {
              const e2 = this, t = "left" === e2.tabPosition || "right" === e2.tabPosition, o = e2.$.tabStrip;
              if ("scroll" !== e2.tabLayout) {
                if (e2._flexWritingModeNoFullSupport && "shrink" === e2.tabLayout && t && o.scrollHeight > o.offsetHeight) {
                  const t2 = o.children, n = 100 / t2.length + "%";
                  o.$.addClass("shrink-tabs-vertical");
                  for (let e3 = 0; e3 < t2.length; e3++) t2[e3].style.height = n, t2[e3].firstElementChild.firstElementChild.classList.add("smart-tab-label-text-container-full-height");
                  e2._inlineStyleTabStripChildren = true;
                }
              } else e2._checkOverflowScroll();
            }
            _applyLabelSizes(e2, t) {
              const o = this, n = o._orientationSettings.dimension, a2 = "width" === n ? "height" : "width";
              for (let r2 = 0; r2 < o._reorderItems.length; r2++) {
                const s = o._reorderItems[r2], i = o._getCorrespondingCustomElement(s);
                null !== i.labelSize && ("tabPosition" === e2 && s.style.removeProperty(a2), t ? s.style.removeProperty(n) : s.style[n] = parseInt(i.labelSize, 10) + "px");
              }
            }
            refresh() {
              this._applyTabOverflow();
            }
            _applyTabOverflow() {
              const e2 = this;
              if (!e2._tabs) return;
              if (e2._removeInlineStyle(), 0 === e2._tabs.length) return void e2._toggleNavigationElementsVisibility();
              const t = e2.tabLayout, o = e2.tabPosition, n = "left" === o || "right" === o, a2 = e2.$.tabStrip;
              switch (e2._closeDropDownButtonDropDown(), t) {
                case "scroll":
                case "dropDown":
                  e2._flexWritingModeNoFullSupport && "vertical" === e2.tabTextOrientation && n && e2._fixTabStripNotChrome(a2);
                  break;
                case "wrap":
                  if ("vertical" === e2.tabTextOrientation) if (e2._flexWritingModeNoFullSupport) if (n) e2._fixTabStripNotChrome(a2);
                  else {
                    const t2 = a2.children;
                    let o2 = t2[0].offsetHeight;
                    for (let e3 = 1; e3 < t2.length; e3++) o2 = Math.max(o2, t2[e3].offsetHeight);
                    for (let e3 = 1; e3 < t2.length; e3++) t2[e3].style.height = o2 + "px";
                    e2._inlineStyleTabStripChildren = true;
                  }
                  else n || a2.scrollHeight > a2.offsetHeight && (a2.style.height = a2.scrollHeight + "px", e2._inlineStyleTabStrip = true);
                  else n && a2.scrollWidth > a2.offsetWidth && (a2.style.width = a2.scrollWidth + "px", "right" === o && (a2.style.flexWrap = "wrap-reverse"), e2._inlineStyleTabStrip = true);
                  break;
                case "shrink":
                  if (n) {
                    if (e2._flexWritingModeNoFullSupport && "vertical" === e2.tabTextOrientation) {
                      const t2 = a2.children, o2 = window.getComputedStyle(t2[0].firstElementChild), n2 = parseInt(o2.paddingLeft, 10) + parseInt(o2.paddingRight, 10);
                      let r2 = 0;
                      for (let e3 = 0; e3 < t2.length; e3++) r2 = Math.max(r2, t2[e3].firstElementChild.firstElementChild.offsetWidth);
                      a2.style.width = n2 + r2 + "px", e2._inlineStyleTabStrip = true;
                      break;
                    }
                  } else a2.scrollWidth > a2.offsetWidth && a2.$.addClass("shrink-tabs");
              }
              e2._applyConditionalTabOverflow(), e2._getTabCoordinates(), e2._fixTabStripFlex(t), e2._toggleNavigationElementsVisibility(), e2._positionTabSelectionBar(e2._tabLabelContainers[e2.selectedIndex], true);
            }
            _checkOverflowScroll() {
              const e2 = this, t = e2.$tabsHeaderSection, o = e2.$.tabStrip, n = e2.overflow;
              if ("hidden" === n) return;
              let a2, r2, s;
              if ("left" !== e2.tabPosition && "right" !== e2.tabPosition) {
                const t2 = Math.abs(e2._getScrollLeft());
                a2 = Math.round(o.scrollWidth) > Math.round(o.offsetWidth), e2.rightToLeft ? (s = Math.round(t2) > 0, r2 = Math.round(o.offsetWidth + t2) < Math.round(o.scrollWidth)) : (r2 = Math.round(t2) > 0, s = Math.round(o.offsetWidth + t2) < Math.round(o.scrollWidth));
              } else a2 = Math.round(o.scrollHeight) > Math.round(o.offsetHeight), r2 = Math.round(o.scrollTop) > 0, s = Math.round(o.offsetHeight + o.scrollTop) < Math.round(o.scrollHeight);
              "scroll" === n && (t.addClass("scroll-buttons-shown"), e2.$scrollButtonNear.removeClass("smart-hidden"), e2.$scrollButtonFar.removeClass("smart-hidden")), a2 ? "auto" === n ? (t.hasClass("scroll-buttons-shown") || t.addClass("scroll-buttons-shown"), r2 ? e2.$scrollButtonNear.removeClass("smart-hidden") : e2.$scrollButtonNear.addClass("smart-hidden"), s ? e2.$scrollButtonFar.removeClass("smart-hidden") : e2.$scrollButtonFar.addClass("smart-hidden"), false === (r2 && s) ? t.addClass("one-button-shown") : t.removeClass("one-button-shown"), e2.disabled || (e2.$.scrollButtonNear.disabled = false, e2.$.scrollButtonFar.disabled = false)) : (t.removeClass("one-button-shown"), e2.disabled ? (e2.$.scrollButtonNear.disabled = true, e2.$.scrollButtonFar.disabled = true) : (e2.$.scrollButtonNear.disabled = !r2, e2.$.scrollButtonFar.disabled = !s)) : !a2 && "auto" === n && t.hasClass("scroll-buttons-shown") ? (t.removeClass("scroll-buttons-shown"), t.removeClass("one-button-shown"), e2.$scrollButtonNear.addClass("smart-hidden"), e2.$scrollButtonFar.addClass("smart-hidden")) : a2 || "scroll" !== n || (e2.$.scrollButtonNear.disabled = true, e2.$.scrollButtonFar.disabled = true);
            }
            _closeButtonVisibilityChangeHandler(e2) {
              const t = this, o = (Smart.EnableShadowDOM ? e2.composedPath()[0] : e2.target).index;
              "selected" !== t.closeButtonMode ? e2.detail.hidden ? t._disableCloseButton(o) : t._enableCloseButton(o) : t._tabLabelContainers[o].closeButtonEnabled = e2.detail.hidden;
            }
            _closeDropDownButtonDropDown() {
              const e2 = this;
              e2._dropDownButtonDropDownOpened && (e2.$.dropDownButton.setAttribute("aria-expanded", false), e2.$dropDownButtonDropDown.addClass("smart-hidden"), e2._dropDownButtonDropDownOpened = false);
            }
            _closeGroupDropDown() {
              const e2 = this;
              if (!e2._openDropDown) return;
              const t = e2._openDropDown.groupContainer;
              e2._openDropDown.rippleInProgress ? setTimeout(function() {
                e2._openDropDown && (t.setAttribute("aria-expanded", false), e2._openDropDown.$.addClass("smart-hidden"), delete e2._openDropDown.rippleInProgress, e2._openDropDown = void 0);
              }, 450) : (t.setAttribute("aria-expanded", false), e2._openDropDown.$.addClass("smart-hidden"), e2._openDropDown = void 0);
            }
            _containerHandler(e2) {
              const t = this, o = e2.type;
              if (t.disabled || t.readonly || t._resizing && "mouseout" !== o || ("down" === o || "up" === o) && 1 !== e2.which && !Smart.Utilities.Core.isMobile) return;
              const n = t.shadowRoot || t.isInShadowDOM ? (e2.originalEvent || e2).composedPath()[0] : (e2.originalEvent || e2).target;
              t.$.tabContentSection.contains(n) || (t.$.dropDownButton.contains(n) ? t._dropDownButtonHandler(n, e2) : t.$.dropDownButtonDropDown.contains(n) ? t._dropDownButtonHandler(n, e2, true) : t._tabStripHandler(n, e2));
            }
            _disableCloseButton(e2) {
              const t = this, o = t._tabLabelContainers[e2];
              o.closeButtonEnabled = false, t.closeButtons && t._hideCloseButton(o);
            }
            _documentMoveHandler(e2) {
              const t = this, o = t._orientationSettings;
              if (t._reordering) {
                t._reorderStartThrown || (t._fireDragEvent(e2, "dragStart"), t._reorderStartThrown = true);
                const n = e2[o.coordinate], a2 = "wrap" !== t.tabLayout ? function(e3) {
                  return n >= e3[o.from] && n <= e3[o.to];
                } : function(t2) {
                  return e2.pageX >= t2.fromX && e2.pageX <= t2.toX && e2.pageY >= t2.fromY && e2.pageY <= t2.toY;
                };
                let r2 = false;
                for (let e3 = 0; e3 < t._tabCoordinates.length; e3++) if (a2(t._tabCoordinates[e3])) {
                  r2 = e3;
                  break;
                }
                true !== t._preventReorder && false !== r2 && r2 !== t._draggedIndex && (t._reorderTabs(t._draggedIndex, r2), t._closeGroupDropDown(), t._draggedIndex = r2, t._getReorderItems(), t._getTabCoordinates());
                const s = t._tabCoordinates[t._draggedIndex];
                "wrap" !== t.tabLayout && (n < s[o.from] || n > s[o.to]) || "wrap" === t.tabLayout && (null !== e2.originalEvent.target.closest(".smart-tab-label-container") || null !== e2.originalEvent.target.closest(".smart-tab-group-container")) && !(e2.pageX >= s.fromX && e2.pageX <= s.toX && e2.pageY >= s.fromY && e2.pageY <= s.toY) ? t._preventReorder = true : t._preventReorder = false;
              } else t._resizing && (t.$.resizeToken.style[o.edge] = e2[o.coordinate] - t._tabsHeaderSectionCoordinate + "px", t.$resizeToken.removeClass("smart-hidden"));
            }
            _documentUpHandler(e2) {
              const t = this;
              let o = t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              t.$.container.contains(o) && t._containerHandler(e2), t._touchmoveInside ? t._endSwiping(e2, Date.now()) : (delete t._dragStartDetails, delete t._swiping), delete t._touchCoords, delete t._touchmoveInside, !t._openDropDown || t._openDropDown.rippleInProgress || o !== document && o.closest(".smart-tab-group-container") === t._openDropDown.groupContainer || "pointercancel" === e2.originalEvent.type || t._closeGroupDropDown(), t.$.dropDownButton.contains(o) || "pointercancel" === e2.originalEvent.type || t._closeDropDownButtonDropDown(), t._endReordering(e2, o), t._resize(e2), void 0 !== t._tabToResize && (t._tabToResize = void 0), delete t._downTarget;
            }
            _dropDownButtonHandler(e2, t, o) {
              const n = this, a2 = t.type;
              if (o) {
                if (e2.classList.contains("smart-tab-label-container")) switch (a2) {
                  case "down":
                    n._downTarget = e2;
                    break;
                  case "mouseout":
                    e2.removeAttribute("hover");
                    break;
                  case "mouseover":
                    e2.setAttribute("hover", "");
                    break;
                  case "up":
                    e2 === n._downTarget && t.originalEvent && "pointercancel" !== t.originalEvent.type && (n.select(Array.from(n.$.dropDownButtonDropDown.children).indexOf(e2)), n._closeDropDownButtonDropDown());
                }
              } else if ("down" === a2) n._downTarget = n.$.dropDownButton;
              else if ("up" === a2 && n._downTarget === n.$.dropDownButton) if (n._dropDownButtonDropDownOpened) n._closeDropDownButtonDropDown();
              else {
                const e3 = n.tabPosition;
                let t2, o2;
                switch (n.$.dropDownButton.setAttribute("aria-expanded", true), e3) {
                  case "top":
                    t2 = n.$.dropDownButton.offsetLeft, o2 = n.$.tabsHeaderSection.offsetTop + n.$.dropDownButton.offsetHeight;
                    break;
                  case "bottom":
                    t2 = n.$.dropDownButton.offsetLeft, o2 = n.$.tabsHeaderSection.offsetTop;
                    break;
                  case "left":
                    t2 = n.$.dropDownButton.offsetWidth, o2 = n.$.dropDownButton.offsetTop;
                    break;
                  case "right":
                    t2 = n.$.tabsHeaderSection.offsetLeft, o2 = n.$.dropDownButton.offsetTop;
                }
                n.$.dropDownButtonDropDown.style.left = t2 + "px", n.$.dropDownButtonDropDown.style.top = o2 + "px", n.$dropDownButtonDropDown.removeClass("smart-hidden"), n._dropDownButtonDropDownOpened = true;
              }
            }
            _enableCloseButton(e2) {
              const t = this, o = t._tabLabelContainers[e2];
              o.closeButtonEnabled = true, t.closeButtons && t._showCloseButton(o);
            }
            _endReordering(e2, t) {
              const o = this;
              o._reordering && (o._draggedHoveredTab && (o._draggedHoveredTab.contains(t) || o._draggedHoveredTab.removeAttribute("hover"), delete o._draggedHoveredTab), o._reorderedIndex = void 0, o._reordering = false, o._reorderStartThrown = false, o.removeAttribute("dragged"), e2 && o._fireDragEvent(e2, "dragEnd"));
            }
            _endSwiping(e2, t) {
              const o = this;
              if (!o._dragStartDetails) return;
              const n = o._orientationSettings, a2 = o.$.tabStrip, r2 = Math.abs(o._dragStartDetails.startTime - t), s = 200 / r2, i = (o._dragStartDetails[n.startCoordinate] - e2[n.coordinate]) * s;
              let l = Math.abs(i);
              const d2 = function() {
                if (o.rightToLeft && "scrollLeft" === n.scrollDirection) {
                  const e3 = Math.abs(o._getScrollLeft());
                  if (i < 0 && e3 === a2[n.scrollSize] - a2[n.size] || i > 0 && 0 === e3) return false;
                } else if (i > 0 && a2[n.scrollDirection] === a2[n.scrollSize] - a2[n.size] || i < 0 && 0 === a2[n.scrollDirection]) return false;
                return true;
              };
              let c = 0.03 * Math.abs(i) * s;
              const b2 = function() {
                if (c > 5) {
                  const e4 = (l - c) / Math.abs(i);
                  e4 < 0.1 ? c /= 1.25 : e4 < 0.15 ? c /= 1.2 : e4 < 0.2 ? c /= 1.15 : e4 < 0.25 ? c /= 1.1 : e4 < 0.3 && (c /= 1.05);
                }
                c = Math.round(c);
                const e3 = a2[n.scrollDirection];
                o.rightToLeft && "scrollLeft" === n.scrollDirection ? Smart.Utilities.Core.Browser.Chrome ? a2[n.scrollDirection] = i > 0 ? Math.max(e3 + c, 0) : Math.min(e3 - c, a2[n.scrollSize] - a2[n.size]) : a2[n.scrollDirection] = i > 0 ? Math.min(e3 + c, a2[n.scrollSize] - a2[n.size]) : Math.min(e3 - c, 0) : a2[n.scrollDirection] = i > 0 ? Math.min(e3 + c, a2[n.scrollSize] - a2[n.size]) : Math.max(e3 - c, 0), l -= c, o._updateScrollButtonVisibility(true);
                const t2 = d2();
                l > 0 && t2 ? o._scrollingAnimationFrame = window.requestAnimationFrame(b2) : o._wheelInProgress = false;
              };
              o._scrollingAnimationFrame && cancelAnimationFrame(o._scrollingAnimationFrame), r2 < 500 && d2() ? o._scrollingAnimationFrame = window.requestAnimationFrame(b2) : o._wheelInProgress = false, delete o._dragStartDetails, o._swiping && delete o._swiping;
            }
            _fireDragEvent(e2, t) {
              const o = this, n = o.$.tabStrip.children[o._draggedIndex], a2 = n.tab;
              let r2, s, i;
              a2 ? (r2 = a2.selected, s = a2.index, i = a2.label) : i = n.group, o.$.fireEvent(t, { position: { left: e2.pageX, top: e2.pageY }, left: e2.pageX, top: e2.pageY, target: n, selected: r2, index: s, label: i });
            }
            _fixTabStripNotChrome(e2) {
              const t = this;
              function o() {
                const o2 = [].slice.call(e2.children).filter((e3) => !e3._lazyRemove);
                let n = o2[0].getBoundingClientRect(), a2 = n.left, r2 = a2 + o2[0].offsetWidth;
                for (let e3 = 1; e3 < o2.length; e3++) n = o2[e3].getBoundingClientRect(), a2 = Math.min(a2, n.left), r2 = Math.max(r2, n.left + o2[e3].offsetWidth);
                e2.style.width = r2 - a2 + "px", t._inlineStyleTabStrip = true;
              }
              0 !== t._tabs.length && (o(), Smart.Utilities.Core.Browser.Safari && setTimeout(function() {
                e2.parentElement.classList.add("smart-hidden"), setTimeout(function() {
                  e2.parentElement.classList.remove("smart-hidden"), o();
                }, 10);
              }, 10), t.$.fireEvent("tabStripResize"));
            }
            _fixTabStripFlex(e2) {
              const t = this;
              t._flexWritingModeNoFullSupport || "vertical" !== t.tabTextOrientation || "left" !== t.tabPosition && "right" !== t.tabPosition || setTimeout(function() {
                t.$tabsHeaderSection.addClass("smart-hidden"), setTimeout(function() {
                  t.$tabsHeaderSection.removeClass("smart-hidden"), t._getTabCoordinates(), "scroll" === e2 && t._checkOverflowScroll();
                }, 10);
              }, 10);
            }
            _getCorrespondingCustomElement(e2) {
              return e2.$.hasClass("smart-tab-label-container") ? e2.tab : this.$.tabContentSection.querySelector('smart-tab-items-group[label="' + e2.group + '"]');
            }
            _getReorderItems() {
              const e2 = this;
              let t;
              0 === e2._groups.length ? t = e2._tabLabelContainers : (t = Array.from(e2.$.tabStrip.children), e2.addNewTab && t.pop()), e2._reorderItems = t;
            }
            _getTabCoordinates() {
              const e2 = this;
              if (!e2.reorder && !e2.resize || "hidden" === e2.tabPosition) return;
              const t = [], o = window.scrollX || window.pageXOffset, n = window.scrollY || window.pageYOffset;
              for (let a2 = 0; a2 < e2._reorderItems.length; a2++) {
                const r2 = e2._reorderItems[a2], s = r2.getBoundingClientRect(), i = window.getComputedStyle(r2), l = parseFloat(i.marginLeft), d2 = parseFloat(i.marginRight), c = parseFloat(i.marginTop), b2 = parseFloat(i.marginBottom);
                t.push({ fromX: s.left - l + o, toX: s.right + d2 + o, fromY: s.top - c + n, toY: s.bottom + b2 + n });
              }
              e2._tabCoordinates = t;
            }
            _getTabs() {
              const e2 = this;
              let t = e2.shadowRoot ? e2.shadowRoot.querySelectorAll("smart-tab-item") : e2.getElementsByTagName("smart-tab-item");
              if (e2.querySelector("smart-tabs")) {
                t = e2.shadowRoot ? e2.shadowRoot.querySelectorAll("smart-tab-item") : e2.getElementsByTagName("smart-tab-item");
                let o = [];
                const n = e2.querySelector(".smart-tabs-content-section");
                if (n) {
                  for (let e3 = 0; e3 < t.length; e3++) t[e3].parentNode === n && o.push(t[e3]);
                  t = o;
                }
              }
              null !== e2.selectedIndex && (0 === t.length ? e2.selectedIndex = null : e2.selectedIndex = Math.max(0, Math.min(e2.selectedIndex, t.length - 1))), e2._tabs = Array.from(t), e2.$.hiddenInput.value = e2.selectedIndex;
            }
            _groupContainerHandler(e2, t) {
              const o = this, n = e2.dropDown;
              if ("down" === t) return o._downTarget = e2, void (o.reorder && o._reorderItems.length > 1 && (o._getTabCoordinates(), o._reordering = true, o.setAttribute("dragged", ""), o._draggedIndex = Array.from(o.$.tabStrip.children).indexOf(e2)));
              o._reordering || o._swiping || (n === o._openDropDown || "mouseover" !== t || e2.classList.contains("smart-tab-group-selected") ? "mouseout" === t && e2.removeAttribute("hover") : e2.setAttribute("hover", "")), "up" !== t || o._downTarget !== e2 || void 0 !== o._reorderedIndex || o._swiping || (n === o._openDropDown ? (o._closeGroupDropDown(), e2.classList.contains("smart-tab-group-selected") || e2.setAttribute("hover", "")) : o._openGroupDropDown(e2));
            }
            _handlePosition(e2, t) {
              const o = this;
              if (-1 === [void 0, "top", "left", "hidden"].indexOf(t) || "bottom" !== e2 && "right" !== e2 ? "bottom" !== t && "right" !== t || -1 === ["top", "left", "hidden"].indexOf(e2) || o.$.container.insertBefore(o.$.tabsHeaderSection, o.$.tabContentSection) : o.$.container.insertBefore(o.$.tabContentSection, o.$.tabsHeaderSection), "hidden" === e2) return o._orientationSettings = { coordinate: "pageY", dimension: "height", edge: "top", from: "fromY", size: "offsetHeight", to: "toY", scrollDirection: "scrollTop", scrollSize: "scrollHeight", startCoordinate: "startY", wheelOffset: 35 }, o.removeAttribute("horizontal"), o.removeAttribute("vertical"), void o.setAttribute("aria-orientation", "horizontal");
              "top" === e2 || "bottom" === e2 ? (o._orientationSettings = { coordinate: "pageX", dimension: "width", edge: "left", from: "fromX", size: "offsetWidth", to: "toX", scrollDirection: "scrollLeft", scrollSize: "scrollWidth", startCoordinate: "startX", wheelOffset: 70 }, o.removeAttribute("vertical"), o.setAttribute("horizontal", ""), o.$arrowNear.removeClass("smart-arrow-up"), o.$arrowNear.addClass("smart-arrow-left"), o.$arrowFar.removeClass("smart-arrow-down"), o.$arrowFar.addClass("smart-arrow-right"), o.setAttribute("aria-orientation", "horizontal"), o.$.scrollButtonNear.setAttribute("aria-label", "Scroll left"), o.$.scrollButtonFar.setAttribute("aria-label", "Scroll right")) : (o._orientationSettings = { coordinate: "pageY", dimension: "height", edge: "top", from: "fromY", size: "offsetHeight", to: "toY", scrollDirection: "scrollTop", scrollSize: "scrollHeight", startCoordinate: "startY", wheelOffset: 35 }, o.removeAttribute("horizontal"), o.setAttribute("vertical", ""), o.$arrowNear.removeClass("smart-arrow-left"), o.$arrowNear.addClass("smart-arrow-up"), o.$arrowFar.removeClass("smart-arrow-right"), o.$arrowFar.addClass("smart-arrow-down"), o.setAttribute("aria-orientation", "vertical"), o.$.scrollButtonNear.setAttribute("aria-label", "Scroll up"), o.$.scrollButtonFar.setAttribute("aria-label", "Scroll down"));
            }
            _handleScrollButtonsPosition(e2, t) {
              const o = this, n = o.$.tabsHeaderItems;
              e2 !== t && ("both" === e2 ? "near" === t ? n.insertBefore(o.$.scrollButtonFar, o.$.dropDownButton) : n.insertBefore(o.$.scrollButtonNear, o.$.tabStrip) : "near" === e2 ? ("far" === t && n.insertBefore(o.$.scrollButtonNear, o.$.tabStrip), n.insertBefore(o.$.scrollButtonFar, o.$.tabStrip)) : ("near" === t && n.insertBefore(o.$.scrollButtonFar, o.$.dropDownButton), n.insertBefore(o.$.scrollButtonNear, o.$.scrollButtonFar)));
            }
            _hideCloseButton(e2) {
              e2.firstElementChild.children[0].$.removeClass("smart-close-button-enabled"), e2.firstElementChild.children[1].$.addClass("smart-hidden");
            }
            _indexChangeHandler(e2) {
              const t = this, o = e2.detail.oldIndex, n = Math.max(0, Math.min(e2.detail.newIndex, t._tabs.length - 1));
              if (o !== n) {
                if (0 === t._groups.length) t._reorderTabs(o, n);
                else {
                  const a2 = e2.detail.tabItem;
                  a2._setIndex(o), t.removeAt(o), t.insert(n, { node: a2 }), t.selectedIndex === o && t._select(n, false);
                }
                t._reorderedIndex = void 0;
              }
            }
            _insertAddNewTab() {
              const e2 = this, t = e2._addTabLabelContainer(void 0, true).tabLabelContainer;
              t.$.addClass("smart-add-new-tab"), e2.$.tabStrip.appendChild(t), e2._addNewTab = t;
            }
            _insertIntoExistingGroup(e2) {
              const t = this, o = e2.smartTabItemsGroup, n = e2.tab, a2 = e2.tabLabelContainer, r2 = e2.group, s = t._groupLabels[t._groups.indexOf(r2)].dropDown;
              let i = e2.index;
              i = Math.max(0, Math.min(i, o.childElementCount)), s.insertBefore(a2, s.children[i]);
              const l = o.children[i];
              let d2;
              d2 = l ? l.index : o.children[i - 1].index + 1, o.insertBefore(n, l), t._tabLabelContainers.splice(d2, 0, a2), t.$.dropDownButtonDropDown.insertBefore(e2.dropDownLabelContainer, t.$.dropDownButtonDropDown.children[d2] || null), t._tabs.splice(d2, 0, n), i = d2, n.group = r2, t._updateIndexes(i);
            }
            _insertIntoNewGroup(e2) {
              const t = this, o = e2.tab, n = e2.tabLabelContainer, a2 = e2.group, r2 = t._addGroupContainer(a2), s = r2.label;
              r2.dropDown.appendChild(n), t._groups.push(a2);
              let i = Math.max(0, Math.min(e2.index, t.$.tabStrip.childElementCount)), l = i;
              t._addNewTab && l === t.$.tabStrip.childElementCount && l--, t.$.tabStrip.insertBefore(s, t.$.tabStrip.children[l] || null), t._groupLabels.push(s);
              const d2 = document.createElement("smart-tab-items-group");
              d2.appendChild(o), t.$.tabContentSection.insertBefore(d2, t.$.tabContentSection.children[i]), d2.label = a2;
              const c = d2.previousElementSibling;
              let b2 = 0;
              c && (c instanceof Smart.TabItem ? b2 = c.index + 1 : c && (b2 = c.lastElementChild.index + 1)), t._tabLabelContainers.splice(b2, 0, n), t.$.dropDownButtonDropDown.insertBefore(e2.dropDownLabelContainer, t.$.dropDownButtonDropDown.children[b2] || null), t._tabs.splice(b2, 0, o), i = b2, o.group = a2, t._updateIndexes(i);
            }
            _insertNearAGroup(e2) {
              const t = this, o = e2.tab, n = e2.tabLabelContainer;
              let a2 = e2.index;
              a2 = Math.max(0, Math.min(a2, t._tabs.length));
              const r2 = t._tabs[a2 - 1], s = t._tabs[a2], i = s ? s.group : void 0;
              r2 && null !== r2.group && s && null !== i ? (s.tabLabelContainer.parentElement.insertBefore(n, s.tabLabelContainer), s.parentElement.insertBefore(o, s), o.group = i) : s ? null !== i ? (t.$.tabStrip.insertBefore(n, t._groupLabels[t._groups.indexOf(i)]), t.$.tabContentSection.insertBefore(o, t.$.tabContentSection.querySelector('smart-tab-items-group[label="' + i + '"]'))) : (t.$.tabStrip.insertBefore(n, s.tabLabelContainer), t.$.tabContentSection.insertBefore(o, s)) : (t.$.tabStrip.insertBefore(n, t._addNewTab || null), t.$.tabContentSection.appendChild(o)), t._tabLabelContainers.splice(a2, 0, n), t.$.dropDownButtonDropDown.insertBefore(e2.dropDownLabelContainer, t.$.dropDownButtonDropDown.children[a2] || null), t._tabs.splice(a2, 0, o), t._updateIndexes(a2);
            }
            _insertNoGrouping(e2) {
              const t = this, o = Math.max(0, Math.min(e2.index, t._tabs.length)), n = e2.tab, a2 = e2.tabLabelContainer;
              t.$.tabStrip.insertBefore(a2, t._tabLabelContainers[o] || t._addNewTab || null), t.$.tabContentSection.insertBefore(n, t._tabs[o] || null), t._tabLabelContainers.splice(o, 0, a2), t.$.dropDownButtonDropDown.insertBefore(e2.dropDownLabelContainer, t.$.dropDownButtonDropDown.children[o] || null), t._tabs.splice(o, 0, n), t._updateIndexes(o);
            }
            _keydownHandler(e2) {
              const t = this, o = e2.key;
              if ((t.isInShadowDOM ? t.getRootNode().activeElement : document.activeElement) !== t || -1 === ["ArrowLeft", "ArrowDown", "ArrowRight", "ArrowUp", "End", "Home", "Enter", " ", "Escape"].indexOf(o) || t.disabled || t.readonly || "none" === t.selectionMode || !t.allowToggle && null === t.selectedIndex || t._reordering || t._swiping) return;
              e2.preventDefault();
              const n = t._tabs.length - 1;
              let a2, r2, s, i, l = 0;
              switch (t.rightToLeft ? (s = "ArrowRight", i = "ArrowLeft") : (s = "ArrowLeft", i = "ArrowRight"), o) {
                case s:
                case "ArrowUp":
                  if (t.collapsible && e2.ctrlKey) return void (o === s ? "right" === t.tabPosition ? t.expand() : "left" === t.tabPosition && t.collapse() : "ArrowUp" === o && ("bottom" === t.tabPosition ? t.expand() : "top" === t.tabPosition && t.collapse()));
                  if (l = -1, 0 === t.selectedIndex) {
                    r2 = true;
                    break;
                  }
                  a2 = t.selectedIndex + l;
                  break;
                case i:
                case "ArrowDown":
                  if (t.collapsible && e2.ctrlKey) return void (o === i ? "right" === t.tabPosition ? t.collapse() : "left" === t.tabPosition && t.expand() : "ArrowDown" === o && ("bottom" === t.tabPosition ? t.collapse() : "top" === t.tabPosition && t.expand()));
                  if (l = 1, t.selectedIndex === n) {
                    r2 = true;
                    break;
                  }
                  a2 = t.selectedIndex + l;
                  break;
                case "End":
                  if (t.selectedIndex === n) {
                    r2 = true;
                    break;
                  }
                  a2 = n;
                  break;
                case "Home":
                  if (0 === t.selectedIndex) {
                    r2 = true;
                    break;
                  }
                  a2 = 0;
                  break;
                case "Enter":
                case " ":
                  if (!t.allowToggle) return;
                  if (t._focusedItem) {
                    t.select(t._focusedItem.index);
                    const e3 = t._focusedItem.tabLabelContainer.closest(".smart-tab-group-drop-down");
                    e3 && t._openGroupDropDown(e3.groupContainer);
                  }
                  return;
                case "Escape":
                  return void (t._openDropDown && t._closeGroupDropDown());
              }
              if (t.allowToggle && t._tabs.length > 0) {
                t._focusedItem ? t._focusedItem.tabLabelContainer.removeAttribute("focus") : t._focusedItem = t._focusedItem || t._tabs[t.selectedIndex] || t._tabs[0], t._focusedItem = t._tabs[Math.min(Math.max(0, t._focusedItem.index + l), n)], t._focusedItem.tabLabelContainer.setAttribute("focus", ""), t.ensureVisible(t._focusedItem.index);
                const e3 = t._focusedItem.tabLabelContainer.closest(".smart-tab-group-drop-down");
                e3 && e3.groupContainer ? (t._openDropDown && t._openDropDown !== e3.dropDown && t._closeGroupDropDown(), t._openGroupDropDown(e3.groupContainer)) : t._openDropDown && t._closeGroupDropDown();
              } else r2 || t.select(a2);
            }
            _labelContainerHandler(e2, t, o) {
              const n = this, a2 = "up" === o && n._downTarget === e2;
              if ("down" === o && (n._downTarget = e2, "click" === n.selectionMode && e2 !== n._addNewTab)) if (Smart.Utilities.Core.isMobile && null === e2.tab.group) {
                const o2 = n.$.tabStrip[n._orientationSettings.scrollDirection];
                setTimeout(function() {
                  o2 === n.$.tabStrip[n._orientationSettings.scrollDirection] && n._ripple(t, e2) && n._openDropDown && n._openDropDown.contains(e2) && (n._openDropDown.rippleInProgress = true);
                }, 100);
              } else n._ripple(t, e2) && n._openDropDown && n._openDropDown.contains(e2) && (n._openDropDown.rippleInProgress = true);
              if (e2 === n._addNewTab) return void n._addNewTabHandler(e2, o, a2);
              const r2 = e2.tab.index, s = !(n._reordering && void 0 !== n._reorderedIndex);
              a2 && r2 === n.selectedIndex && (n._closeGroupDropDown(), s && null === e2.tab.group && n._toggleCollapsedState()), !n._swiping && (s && "click" === n.selectionMode && a2 || !n._reordering && (n.selectionMode === o || "mouseenter" === n.selectionMode && "mouseover" === o)) && n._select(r2, true), n._reordering || n._swiping || "click" !== n.selectionMode && "dblclick" !== n.selectionMode || ("mouseover" !== o || e2.hasAttribute("selected") ? "mouseout" === o && e2.removeAttribute("hover") : e2.setAttribute("hover", "")), n.reorder && "down" === o && null === e2.tab.group && n._reorderItems.length > 1 && (n._getTabCoordinates(), n._reordering = true, n.setAttribute("dragged", ""), e2.hasAttribute("hover") && (n._draggedHoveredTab = e2), 0 === n._groups.length ? n._draggedIndex = e2.tab.index : n._draggedIndex = Array.from(n.$.tabStrip.children).indexOf(e2));
            }
            _labelSizeChangeHandler(e2) {
              const t = this, o = e2.detail.size;
              let n;
              "shrink" !== t.tabLayout && (n = e2.target instanceof Smart.TabItem ? e2.target.tabLabelContainer : t._groupLabels[t._groups.indexOf(e2.target.label)], null !== o ? n.style[t._orientationSettings.dimension] = parseInt(o, 10) + "px" : n.style.removeProperty(t._orientationSettings.dimension), t._applyTabOverflow());
            }
            _openGroupDropDown(e2) {
              const t = this;
              e2 && (t._openDropDown && t._openDropDown.$.addClass("smart-hidden"), e2.dropDown.$.removeClass("smart-hidden"), t._positionGroupDropDown(e2), t._openDropDown = e2.dropDown, e2.removeAttribute("hover"), e2.setAttribute("aria-expanded", true));
            }
            _orderTabs() {
              const e2 = this, t = [], o = [];
              let n = true, a2 = false;
              if (0 === e2.getElementsByTagName("smart-tab-items-group").length) for (let r2 = 0; r2 < e2._tabs.length; r2++) {
                const s = e2._tabs[r2], i = s.index;
                if (n && null !== i && (n = false), -1 !== t.indexOf(i || 0) && (a2 = true, null !== i)) break;
                t.push(i || 0), o.push({ tab: s, index: i });
              }
              if (!a2) {
                const e3 = t.slice(0).sort(function(e4, t2) {
                  return e4 - t2;
                });
                JSON.stringify(t) === JSON.stringify(e3) && (n = true);
              }
              if (n || a2) {
                n || e2.warn(e2.localize("ambiguousIndexes"));
                for (let t2 = 0; t2 < e2._tabs.length; t2++) e2._tabs[t2]._setIndex(t2);
              } else {
                o.sort(function(e3, t2) {
                  return e3.index - t2.index;
                });
                for (let t2 = 0; t2 < o.length; t2++) {
                  const n2 = o[t2].tab;
                  n2._setIndex(t2), e2.$.tabContentSection.removeChild(n2);
                }
                for (let t2 = 0; t2 < o.length; t2++) {
                  const n2 = o[t2].tab;
                  e2.$.tabContentSection.appendChild(n2), e2._tabs[t2] = n2;
                }
              }
            }
            _populateTabStrip() {
              const e2 = this, t = document.createDocumentFragment(), o = [], n = [], a2 = [];
              let r2 = null;
              for (let s = 0; s < e2._tabs.length; s++) {
                const i = e2._tabs[s], l = i.parentElement, d2 = l instanceof Smart.TabItemsGroup ? l.label : null;
                i.group = d2;
                const c = e2._addTabLabelContainer(i), b2 = c.tabLabelContainer, p2 = c.dropDownLabelContainer;
                e2.selectedIndex === s && (b2.$.addClass("smart-tab-selected"), b2.setAttribute("selected", ""), r2 = b2), i.tabLabelContainer = b2, b2.tab = i, o.push(b2), e2._setAriaRelations(i, b2, p2), null === d2 ? t.appendChild(b2) : e2._addGroupElements({ documentFragment: t, groups: n, groupLabels: a2, i: s, group: d2, tabLabelContainer: b2, smartTabItemsGroup: l }), e2.$.dropDownButtonDropDown.appendChild(p2);
              }
              e2.$.tabStrip.appendChild(t), e2._tabLabelContainers = o, e2._groups = n, e2._groupLabels = a2, e2._positionTabSelectionBar(r2, true);
            }
            _setAriaRelations(e2, t, o) {
              const n = this.id;
              e2.id || (e2.id = n + "TabItem" + e2.index), t.id || (t.id = n + "TabLabelContainer" + e2.index), t.setAttribute("role", "tab"), t.setAttribute("aria-controls", e2.id), t.setAttribute("aria-label", e2.label), t.setAttribute("aria-selected", e2.selected), e2.setAttribute("aria-label", e2.label), o.setAttribute("role", "menuitem"), o.setAttribute("aria-controls", e2.id);
            }
            _positionTabSelectionBar(e2, t) {
              const o = this;
              if (!e2) return;
              const n = o.tabPosition;
              let a2, r2, s, i;
              if (t && (o.$.tabSelectionBar.style.transition = "none"), e2.tab.group && (e2 = o._groupLabels[o._groups.indexOf(e2.tab.group)]), "top" === n || "bottom" === n) {
                if ("wrap" === o.tabLayout ? (r2 = e2.offsetTop, "top" === n && (r2 += e2.offsetHeight - o.$.tabSelectionBar.offsetHeight), r2 += "px") : r2 = null, i = null, o.rightToLeft && "horizontal" === o.tabTextOrientation) if (Smart.Utilities.Core.Browser.Chrome) {
                  const t2 = o.$.tabStrip;
                  a2 = -(t2.scrollLeft - (t2.scrollWidth - t2.offsetWidth)) + e2.offsetLeft + "px";
                } else a2 = -o.$.tabStrip.scrollLeft + e2.offsetLeft + "px";
                else a2 = -o.$.tabStrip.scrollLeft + e2.offsetLeft + "px";
                s = e2.offsetWidth + "px";
              } else "left" !== n && "right" !== n || ("wrap" === o.tabLayout ? (a2 = e2.offsetLeft, "left" === n && (a2 += e2.offsetWidth - o.$.tabSelectionBar.offsetWidth), a2 += "px") : a2 = null, s = null, r2 = -o.$.tabStrip.scrollTop + e2.offsetTop + "px", i = e2.offsetHeight + "px");
              function l() {
                o.$.tabSelectionBar.style.top = r2, o.$.tabSelectionBar.style.height = i, o.$.tabSelectionBar.style.left = a2, o.$.tabSelectionBar.style.width = s;
              }
              Smart.Utilities.Core.isMobile && o.hasAnimation && !t ? requestAnimationFrame(function() {
                requestAnimationFrame(l);
              }) : l(), t && !o._tabPositionChanging && requestAnimationFrame(() => o.$.tabSelectionBar.style.transition = null);
            }
            _positionGroupDropDown(e2) {
              const t = this, o = t.tabPosition, n = e2.dropDown, a2 = window.getComputedStyle(t.$.tabsHeaderSection), r2 = parseFloat(a2[t.rightToLeft ? "paddingRight" : "paddingLeft"]), s = parseFloat(a2.paddingTop);
              if ("top" === o || "bottom" === o) {
                if (t.rightToLeft ? n.style.left = e2.offsetLeft - t._getScrollLeft() - r2 - n.offsetWidth + e2.offsetWidth + "px" : n.style.left = e2.offsetLeft - t.$.tabStrip.scrollLeft + r2 + "px", "top" === o) n.style.top = e2.offsetTop + e2.offsetHeight + s + "px";
                else {
                  let o2 = e2.getBoundingClientRect().top - t.$.container.getBoundingClientRect().top + s;
                  n.style.top = o2 + "px";
                }
              } else n.style.top = e2.offsetTop - t.$.tabStrip.scrollTop + s + "px", n.style.left = "left" === o ? e2.offsetLeft + e2.offsetWidth + r2 + "px" : e2.getBoundingClientRect().left - t.$.container.getBoundingClientRect().left + r2 + "px";
            }
            _processDataSource() {
              const e2 = this, t = e2.dataSource;
              function o(e3, t2) {
                let n;
                if (Array.isArray(e3.items) && e3.items.length > 0) {
                  n = document.createElement("smart-tab-items-group");
                  for (let t3 = 0; t3 < e3.items.length; t3++) e3.items[t3].items || o(e3.items[t3], n);
                } else n = document.createElement("smart-tab-item"), true === e3.closeButtonHidden && (n.closeButtonHidden = true), void 0 !== e3.content && (n.innerHTML = e3.content), void 0 !== e3.index && (n.index = e3.index), true === e3.selected && (n.selected = e3.selected);
                void 0 !== e3.label && (n.label = e3.label), void 0 !== e3.labelSize && (n.labelSize = e3.labelSize), t2.appendChild(n);
              }
              if (e2.$.tabContentSection.innerHTML = "", null !== t) for (let n = 0; n < t.length; n++) o(t[n], e2.$.tabContentSection);
            }
            _processHTML() {
              const e2 = this;
              e2._getTabs(), e2._orderTabs(), e2._validateInitialSelection(), e2._populateTabStrip(), e2.addNewTab && e2._insertAddNewTab(), e2._getReorderItems(), e2._applyTabOverflow(), e2.ensureVisible(e2.selectedIndex), e2.$.hiddenInput.value = e2.selectedIndex;
            }
            _removeInlineStyle() {
              const e2 = this, t = e2.$.tabStrip;
              if (e2._inlineStyleTabStripChildren) {
                const o = t.children;
                for (let e3 = 0; e3 < o.length; e3++) o[e3].removeAttribute("style"), o[e3].firstElementChild.firstElementChild.classList.remove("smart-tab-label-text-container-full-height");
                delete e2._inlineStyleTabStripChildren;
              }
              e2._inlineStyleTabStrip && (t.removeAttribute("style"), delete e2._inlineStyleTabStrip), t.$.removeClass("shrink-tabs"), t.$.removeClass("shrink-tabs-vertical");
            }
            _reorderTabs(e2, t) {
              function o(e3, t2, o2) {
                const n2 = e3[t2];
                e3.splice(t2, 1), e3.splice(o2, 0, n2);
              }
              const n = this, a2 = n.$.tabStrip[n._orientationSettings.scrollDirection];
              if (0 === n._groups.length) {
                const a3 = n._tabs, r2 = n._tabLabelContainers, s = e2 > t ? t : t + 1;
                let i;
                n.selectedIndex === e2 ? n.selectedIndex = t : n.selectedIndex <= t && n.selectedIndex > e2 ? n.selectedIndex-- : n.selectedIndex >= t && n.selectedIndex < e2 && n.selectedIndex++, i = r2[s] ? r2[s] : n.addNewTab ? n._addNewTab : null, n.$.tabStrip.insertBefore(r2[e2], i), n.$.dropDownButtonDropDown.insertBefore(n.$.dropDownButtonDropDown.children[e2], n.$.dropDownButtonDropDown.children[s] || null), n.$.tabContentSection.insertBefore(a3[e2], a3[s] || null), o(a3, e2, t), o(r2, e2, t), n._updateTabIndexes();
              } else n._reorderTabsGrouping(e2, t);
              n.$.tabStrip[n._orientationSettings.scrollDirection] = a2, n.$.fireEvent("reorder", { index: t, oldIndex: e2, newIndex: t, originalIndex: e2 }), n._reorderedIndex = t, n._positionTabSelectionBar(n._tabLabelContainers[n.selectedIndex], true), n.$.hiddenInput.value = n.selectedIndex;
            }
            _reorderTabsGrouping(e2, t) {
              const o = this, n = o.$.tabStrip.children, a2 = o.$.tabContentSection.children, r2 = e2 > t ? t : t + 1, s = o._tabs[o.selectedIndex];
              o.$.tabStrip.insertBefore(n[e2], n[r2] || null), o.$.tabContentSection.insertBefore(a2[e2], a2[r2] || null), o._groupLabels = Array.from(o.$.tabStrip.getElementsByClassName("smart-tab-group-container")), o._groups = [];
              for (let e3 = 0; e3 < o._groupLabels.length; e3++) o._groups.push(o._groupLabels[e3].group);
              o._tabs = Array.from(o.$.tabContentSection.getElementsByTagName("smart-tab-item"));
              const i = document.createDocumentFragment();
              let l = [];
              for (let e3 = 0; e3 < o._tabs.length; e3++) i.appendChild(o.$.dropDownButtonDropDown.children[o._tabs[e3].index].cloneNode(true));
              o.$.dropDownButtonDropDown.innerHTML = "", o.$.dropDownButtonDropDown.appendChild(i);
              for (let e3 = 0; e3 < o.$.tabStrip.childElementCount; e3++) {
                const t2 = o.$.tabStrip.children[e3];
                t2.$.hasClass("smart-tab-label-container") && t2 !== o._addNewTab ? l.push(t2) : t2.$.hasClass("smart-tab-group-container") && (l = l.concat(Array.from(t2.dropDown.children)));
              }
              o._tabLabelContainers = l, o._updateTabIndexes(), s && (o.selectedIndex = s.index);
            }
            _resize(e2) {
              const t = this;
              if (!t._resizing) return;
              const o = t._orientationSettings, n = e2[o.coordinate] - t._resizeFrom, a2 = t._getCorrespondingCustomElement(t._tabToResize);
              let r2;
              r2 = null === a2.labelSize ? t._tabToResize[o.size] : a2.labelSize;
              const s = Math.max(10, r2 + n);
              s !== r2 && (a2._preventPropertyChangedHandler = true, a2.labelSize = s, t._tabToResize.style[o.dimension] = parseInt(s, 10) + "px"), t.$resizeToken.addClass("smart-hidden"), t._applyTabOverflow(), t._resizing = false, t.removeAttribute("resizing");
            }
            _ripple(e2, t) {
              if (this.hasRippleAnimation) {
                const o = document.createElement("div");
                return o.className = "ripple-agent", t.firstElementChild.appendChild(o), setTimeout(function() {
                  t.firstElementChild.removeChild(o);
                }, 1e3), Smart.Utilities.Animation.Ripple.animate(o, e2.pageX, e2.pageY), true;
              }
            }
            _scrollButtonClickHandler(e2) {
              const t = this, o = t.$.tabStrip;
              let n = e2.target.closest("smart-repeat-button") === t.$.scrollButtonNear ? -1 : 1;
              if ("paging" === t.scrollMode) {
                const a2 = t._orientationSettings, r2 = {};
                return t._dragStartDetails = { startX: 0, startY: 0, pageX: 0, pageY: 0, startTime: Date.now(), target: e2.target }, t._wheelInProgress = true, r2[a2.coordinate] = -n * (o[a2.size] / 1.1428571428571428), void t._endSwiping(r2, t._dragStartDetails.startTime + 175);
              }
              t.hasAttribute("horizontal") ? o.scrollLeft += 10 * n : o.scrollTop += 10 * n, t._updateScrollButtonVisibility(true);
            }
            _getScrollLeft(e2) {
              const t = this, o = t.$.tabStrip;
              return void 0 === e2 ? t.rightToLeft && Smart.Utilities.Core.Browser.Chrome ? o.scrollLeft - (o.scrollWidth - o.offsetWidth) : o.scrollLeft : (!t.rightToLeft || "top" !== t.tabPosition && "bottom" !== t.tabPosition || (Smart.Utilities.Core.Browser.Chrome ? e2 = o.scrollWidth - o.offsetWidth - e2 : e2 *= -1), e2);
            }
            _select(e2, t, o) {
              const n = this, a2 = n.hasAnimation;
              void 0 === o && (o = n.selectedIndex);
              const r2 = n._tabs[e2];
              if (!r2 || r2.disabled || e2 === o && (!n.allowToggle || n.allowToggle && "mouseenter" === n.selectionMode)) n.$.hiddenInput.value = n.selectedIndex;
              else {
                if (n._focusedItem && n._focusedItem.tabLabelContainer.removeAttribute("focus"), null !== o) {
                  const t2 = n._tabs[o];
                  a2 ? n._animateSelection(r2, t2, e2 > o) : t2.$.addClass("smart-visibility-hidden"), t2.selected = false, n._tabLabelContainers[o].$.removeClass("smart-tab-selected"), n._tabLabelContainers[o].removeAttribute("selected"), n.closeButtons && "selected" === n.closeButtonMode && n._disableCloseButton(o);
                }
                null !== e2 && (n._tabLabelContainers[e2].removeAttribute("hover"), n.closeButtons && "selected" === n.closeButtonMode && n._enableCloseButton(e2)), !n.allowToggle || null !== e2 && (void 0 !== arguments[2] ? o : n.selectedIndex) !== e2 ? (r2.selected = true, n.$.tabContentSection.removeAttribute("show-placeholder"), null !== o && a2 || r2.$.removeClass("smart-visibility-hidden"), n.selectedIndex = e2, n._focusedItem = n._tabs[e2], n._focusedItem.tabLabelContainer.$.addClass("smart-tab-selected"), n._focusedItem.tabLabelContainer.setAttribute("selected", ""), n._positionTabSelectionBar(n._focusedItem.tabLabelContainer, null === o)) : (n.selectedIndex = null, n.$.tabContentSection.setAttribute("show-placeholder", ""), n.allowToggle && (n._focusedItem = n._tabs[null === e2 ? o : e2], n._focusedItem && n._focusedItem.tabLabelContainer.setAttribute("focus", ""))), t && (n.$.hiddenInput.value = n.selectedIndex, n.$.fireEvent("change", { index: n.selectedIndex, oldIndex: o })), n._closeGroupDropDown(), r2 && null !== r2.group ? (n._selectedGroup && n._selectedGroup.$.removeClass("smart-tab-group-selected"), null !== n.selectedIndex && (n._selectedGroup = n._groupLabels[n._groups.indexOf(r2.group)], n._selectedGroup.$.addClass("smart-tab-group-selected"))) : n._selectedGroup && (n._selectedGroup.$.removeClass("smart-tab-group-selected"), delete n._selectedGroup), n.$.hiddenInput.value = n.selectedIndex;
              }
            }
            _selectStartHandler(e2) {
              (this._reordering || this._resizing) && e2.preventDefault();
            }
            _setLabel(e2, t, o) {
              const n = e2 ? document.getElementById(e2) : null;
              if (null !== n && "template" === n.tagName.toLowerCase()) {
                const e3 = document.importNode(n.content, true);
                if (t.appendChild(e3), o) {
                  const e4 = document.importNode(n.content, true);
                  o.appendChild(e4);
                }
              } else "" === e2 && (e2 = "&nbsp;"), t.innerHTML = e2, o && (o.innerHTML = e2);
            }
            _showCloseButton(e2) {
              e2.closeButtonEnabled && (e2.firstElementChild.children[0].$.addClass("smart-close-button-enabled"), e2.firstElementChild.children[1].$.removeClass("smart-hidden"));
            }
            _tabContentSectionTransitionendHandler(e2) {
              const t = this, o = e2.target;
              o instanceof Smart.TabItem && (o === t._animatedOldTab ? (o.$.addClass("smart-hidden"), o.$.removeClass("animate"), o.$.removeClass(t._animatedOldTab.classToRemove), o.$.removeClass("smart-hidden"), delete t._animatedOldTab) : o === t._animatedTab && (o.$.removeClass("animate"), delete t._animatedTab), o.classList.remove("left"), o.classList.remove("right"), o.classList.remove("top"), o.classList.remove("bottom"));
            }
            _tabsHeaderItemsWheelHandler(e2) {
              const t = this;
              if (!t.enableMouseWheelAction || t.disabled) return;
              const o = t.$.tabStrip, n = t._orientationSettings, a2 = o[n.size], r2 = o[n.scrollSize], s = o[n.scrollDirection], i = e2.deltaY;
              if (a2 === r2 || 0 === s && i < 0 || s + a2 === r2 && i > 0) return;
              if (e2.preventDefault(), t._wheelInProgress) return;
              t._dragStartDetails = { startX: e2.pageX, startY: e2.pageY, pageX: e2.pageX, pageY: e2.pageY, startTime: Date.now(), target: e2.target }, t._wheelInProgress = true;
              const l = {};
              l[n.coordinate] = e2[n.coordinate] + (e2.deltaY > 0 ? -1 : 1) * n.wheelOffset, t._endSwiping(l, t._dragStartDetails.startTime + 100);
            }
            _tabStripHandler(e2, t) {
              const o = this, n = t.type;
              if ("down" === n && void 0 !== o._tabToResize) return o._resizing = true, void (o._tabsHeaderSectionCoordinate = o.$.tabsHeaderSection.getBoundingClientRect()[o._orientationSettings.edge]);
              "down" === n && Smart.Utilities.Core.isMobile && (o._dragStartDetails = { startX: t.pageX, startY: t.pageY, pageX: t.pageX, pageY: t.pageY, startTime: Date.now(), originalTime: Date.now(), target: t.originalEvent.target });
              const a2 = e2.closest("smart-repeat-button");
              if ("up" === n && a2) return o.focus(), void (o.resize && o._getTabCoordinates());
              if (e2.classList.contains("smart-tab-close-button")) if ("up" === n) {
                if (e2 === o._downTarget) {
                  const t2 = e2.parentElement.parentElement.tab.index;
                  return void (o.$.fireEvent("closing", { index: t2 }).defaultPrevented || (o.removeAt(t2), o.$.fireEvent("close", { index: t2 })));
                }
              } else {
                if ("down" === n) return void (o._downTarget = e2);
                o._reordering || o._swiping || ("mouseover" === n ? e2.setAttribute("hover", "") : "mouseout" === n && e2.removeAttribute("hover"));
              }
              const r2 = e2.closest(".smart-tab-label-container");
              if (null !== r2) return void (t.originalEvent && "pointercancel" === t.originalEvent.type ? r2.tab.group && delete r2.parentElement.rippleInProgress : o._labelContainerHandler(r2, t, n));
              const s = e2.closest(".smart-tab-group-container");
              null !== s && o._groupContainerHandler(s, n);
            }
            _tabStripMouseleaveHandler() {
              const e2 = this;
              e2.resize && !e2._resizing && e2.hasAttribute("resizing") && e2.removeAttribute("resizing");
            }
            _tabStripMoveHandler(e2) {
              const t = this;
              if (t._dragStartDetails && !t._dragStartDetails.checked && (Date.now() - t._dragStartDetails.originalTime < 500 ? (t._endReordering(void 0, void 0), t._dragStartDetails.checked = true) : delete t._dragStartDetails), t._dragStartDetails && (Math.abs(t._dragStartDetails.pageX - e2.pageX) >= 5 || Math.abs(t._dragStartDetails.pageY - e2.pageY) >= 5)) {
                const o2 = t._orientationSettings, n2 = t._dragStartDetails[o2.coordinate] - e2[o2.coordinate], a3 = t.$.tabStrip[o2.scrollDirection];
                return t.$.tabStrip[o2.scrollDirection] += n2, a3 !== t.$.tabStrip[o2.scrollDirection] && t._updateScrollButtonVisibility(), t._dragStartDetails = { startX: t._dragStartDetails.startX, startY: t._dragStartDetails.startY, pageX: e2.pageX, pageY: e2.pageY, startTime: t._dragStartDetails.startTime, originalTime: t._dragStartDetails.originalTime, target: e2.originalEvent.target, checked: t._dragStartDetails.checked }, void (t._swiping = true);
              }
              if (!t.resize || t._resizing || t._reordering || "shrink" === t.tabLayout) return;
              const o = t._orientationSettings, n = e2[o.coordinate], a2 = t._tabCoordinates;
              let r2;
              for (let e3 = 0; e3 < a2.length; e3++) {
                const s = a2[e3][o.to];
                if (n >= s - 4 && n <= s + 4) {
                  r2 = t._reorderItems[e3], t._resizeFrom = n;
                  break;
                }
              }
              void 0 !== r2 ? (t._tabToResize = r2, t.setAttribute("resizing", "")) : (t._tabToResize = void 0, t.removeAttribute("resizing"));
            }
            _tabStripTouchmoveHandler(e2) {
              const t = this;
              if (t._touchmoveInside && e2.cancelable) return e2.preventDefault(), void e2.stopPropagation();
              const o = t.$.tabStrip, n = t._orientationSettings, a2 = o[n.size], r2 = o[n.scrollSize], s = t._touchCoords;
              if (a2 === r2 || !s) return;
              const i = e2.touches[0], l = o[n.scrollDirection], d2 = i[n.coordinate], c = parseFloat(d2.toFixed(5)), b2 = s["pageY" === n.coordinate ? 1 : 0], p2 = parseFloat(b2.toFixed(5));
              t._touchCoords = [i.pageX, i.pageY], 0 === l && c >= p2 || l + a2 === r2 && c <= p2 || (d2 !== b2 && (t._touchmoveInside = true), e2.cancelable && (e2.preventDefault(), e2.stopPropagation()));
            }
            _tabStripTouchstartHandler(e2) {
              const t = e2.touches[0];
              this._touchCoords = [t.pageX, t.pageY];
            }
            _toggleCollapsedState() {
              const e2 = this;
              e2.collapsible && (e2.collapsed ? e2.expand() : e2.collapse());
            }
            _toggleNavigationElementsVisibility() {
              const e2 = this, t = e2._tabs.length;
              let o;
              if (0 === t) o = "addClass";
              else {
                if (1 !== t) return;
                o = "removeClass";
              }
              "scroll" === e2.tabLayout && "scroll" === e2.overflow ? (e2.$scrollButtonNear[o]("smart-hidden"), e2.$scrollButtonFar[o]("smart-hidden")) : "dropDown" === e2.tabLayout && e2.$dropDownButton[o]("smart-hidden");
            }
            _updateIndexes(e2) {
              const t = this;
              null !== t.selectedIndex && e2 <= t.selectedIndex && t.selectedIndex++, t._updateTabIndexes();
            }
            _updateScrollButtonVisibility(e2) {
              const t = this;
              if ("scroll" !== t.tabLayout || "hidden" === t.overflow) return void t._positionTabSelectionBar(t._tabLabelContainers[t.selectedIndex], e2);
              const o = t.$tabsHeaderSection, n = t.$.tabStrip, a2 = t._orientationSettings;
              let r2 = true, s = true;
              if (t.rightToLeft && "scrollLeft" === a2.scrollDirection) {
                const e3 = Math.abs(t._getScrollLeft());
                0 === Math.round(e3) && (s = false), Math.round(n[a2.size] + e3) >= Math.round(n[a2.scrollSize]) - 1 && (r2 = false);
              } else 0 === Math.round(n[a2.scrollDirection]) && (r2 = false), Math.round(n[a2.size] + n[a2.scrollDirection]) >= Math.round(n[a2.scrollSize]) - 1 && (s = false);
              if ("auto" === t.overflow) {
                if (r2 && s) return t.$scrollButtonNear.removeClass("smart-hidden"), t.$scrollButtonFar.removeClass("smart-hidden"), o.removeClass("one-button-shown"), void (t._tabLabelContainers[t.selectedIndex] && t._positionTabSelectionBar(t._tabLabelContainers[t.selectedIndex], e2));
                r2 ? t.$scrollButtonNear.removeClass("smart-hidden") : t.$scrollButtonNear.addClass("smart-hidden"), s ? t.$scrollButtonFar.removeClass("smart-hidden") : t.$scrollButtonFar.addClass("smart-hidden"), o.addClass("one-button-shown"), t._getTabCoordinates();
              } else "scroll" !== t.overflow || t.disabled || (t.$.scrollButtonNear.disabled = !r2, t.$.scrollButtonFar.disabled = !s);
              t._tabLabelContainers[t.selectedIndex] && t._positionTabSelectionBar(t._tabLabelContainers[t.selectedIndex], e2);
            }
            _updateTabIndexes() {
              const e2 = this;
              if (e2._tabs.length > 0) for (let t = 0; t < e2._tabs.length; t++) e2._tabs[t]._setIndex(t);
              else e2.selectedIndex = null;
              e2.$.hiddenInput.value = e2.selectedIndex;
            }
            _updateTabLabel(e2, t) {
              const o = this, n = e2.index, a2 = o._tabLabelContainers[n].firstElementChild.children[0], r2 = o.$.dropDownButtonDropDown.children[n];
              e2.set("label", t), a2.innerHTML = "", r2.innerHTML = "", o._setLabel(t, a2, r2), o._applyTabOverflow(), e2.setAttribute("aria-label", t), e2.tabLabelContainer && e2.tabLabelContainer.setAttribute("aria-label", t);
            }
            _validateIndex(e2, t) {
              if (isNaN(parseInt(e2, 10)) || "object" == typeof e2) {
                const e3 = this;
                e3.error(e3.localize("invalidIndex", { method: t }));
              }
            }
            _validateInitialSelection() {
              const e2 = this;
              let t = e2.selectedIndex;
              for (let o = 0; o < e2._tabs.length; o++) {
                const n = e2._tabs[o];
                t === o ? (n.selected = true, n.$.removeClass("smart-visibility-hidden")) : n.selected ? null === t ? (t = o, n.$.removeClass("smart-visibility-hidden")) : (n.selected = false, n.$.addClass("smart-visibility-hidden")) : n.$.addClass("smart-visibility-hidden");
              }
              e2._tabs.length > 0 && null === t && !e2.allowToggle && (t = 0, e2._tabs[0].selected = true, e2._tabs[0].$.removeClass("smart-visibility-hidden")), e2.selectedIndex = t, null !== e2.selectedIndex && (e2._focusedItem = e2._tabs[e2.selectedIndex]);
            }
          });
        }
      )
      /******/
    };
    var __webpack_module_cache__ = {};
    function __webpack_require__(moduleId) {
      var cachedModule = __webpack_module_cache__[moduleId];
      if (cachedModule !== void 0) {
        return cachedModule.exports;
      }
      var module2 = __webpack_module_cache__[moduleId] = {
        /******/
        // no module.id needed
        /******/
        // no module.loaded needed
        /******/
        exports: {}
        /******/
      };
      __webpack_modules__[moduleId](module2, module2.exports, __webpack_require__);
      return module2.exports;
    }
    (() => {
      __webpack_require__.n = (module2) => {
        var getter = module2 && module2.__esModule ? (
          /******/
          () => module2["default"]
        ) : (
          /******/
          () => module2
        );
        __webpack_require__.d(getter, { a: getter });
        return getter;
      };
    })();
    (() => {
      __webpack_require__.d = (exports2, definition) => {
        for (var key in definition) {
          if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports2, key)) {
            Object.defineProperty(exports2, key, { enumerable: true, get: definition[key] });
          }
        }
      };
    })();
    (() => {
      __webpack_require__.o = (obj2, prop) => Object.prototype.hasOwnProperty.call(obj2, prop);
    })();
    (() => {
      __webpack_require__(6321);
      __webpack_require__(2612);
      __webpack_require__(9135);
      __webpack_require__(9532);
      class smartTabs extends Smart.Component {
        get name() {
          return "smartTabs";
        }
      }
      class smartTabItem extends Smart.Component {
        get name() {
          return "smartTabItem";
        }
      }
    })();
  })();
  return smart_tabs;
}
requireSmart_tabs();
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __awaiter$3(thisArg, _arguments, P2, generator) {
  function adopt(value) {
    return value instanceof P2 ? value : new P2(function(resolve) {
      resolve(value);
    });
  }
  return new (P2 || (P2 = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e2) {
        reject(e2);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e2) {
        reject(e2);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, [])).next());
  });
}
class TabItem extends React.Component {
  constructor(props) {
    super(props);
    this.componentRef = React.createRef();
  }
  // Gets the id of the React component.
  get id() {
    if (!this._id) {
      this._id = "TabItem" + Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
    }
    return this._id;
  }
  /** Tab item close button state
  *	Property type: boolean
  */
  get closeButtonHidden() {
    return this.nativeElement ? this.nativeElement.closeButtonHidden : void 0;
  }
  set closeButtonHidden(value) {
    if (this.nativeElement) {
      this.nativeElement.closeButtonHidden = value;
    }
  }
  /** Disables the Tab item
  *	Property type: boolean
  */
  get disabled() {
    return this.nativeElement ? this.nativeElement.disabled : void 0;
  }
  set disabled(value) {
    if (this.nativeElement) {
      this.nativeElement.disabled = value;
    }
  }
  /** Tab item index
  *	Property type: number
  */
  get index() {
    return this.nativeElement ? this.nativeElement.index : void 0;
  }
  set index(value) {
    if (this.nativeElement) {
      this.nativeElement.index = value;
    }
  }
  /** Tab item selected state
  *	Property type: boolean
  */
  get selected() {
    return this.nativeElement ? this.nativeElement.selected : void 0;
  }
  set selected(value) {
    if (this.nativeElement) {
      this.nativeElement.selected = value;
    }
  }
  /** Tab item label
  *	Property type: string
  */
  get label() {
    return this.nativeElement ? this.nativeElement.label : void 0;
  }
  set label(value) {
    if (this.nativeElement) {
      this.nativeElement.label = value;
    }
  }
  /** Tab item content
  *	Property type: number
  */
  get labelSize() {
    return this.nativeElement ? this.nativeElement.labelSize : void 0;
  }
  set labelSize(value) {
    if (this.nativeElement) {
      this.nativeElement.labelSize = value;
    }
  }
  // Gets the properties of the React component.
  get properties() {
    return ["closeButtonHidden", "disabled", "index", "selected", "label", "content", "labelSize"];
  }
  // Gets the events of the React component.
  get eventListeners() {
    return ["onCreate", "onReady"];
  }
  componentDidRender(initialize) {
    const that = this;
    const props = {};
    const events = {};
    let styles2 = null;
    for (let prop in that.props) {
      if (prop === "children") {
        continue;
      }
      if (prop === "style") {
        styles2 = that.props[prop];
        continue;
      }
      if (prop.startsWith("on") && that.properties.indexOf(prop) === -1) {
        events[prop] = that.props[prop];
        continue;
      }
      props[prop] = that.props[prop];
    }
    if (initialize) {
      that.nativeElement = this.componentRef.current;
    }
    for (let prop in props) {
      if (prop === "class") {
        const classNames = props[prop].trim().split(" ");
        for (let className in classNames) {
          if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
            that.nativeElement.classList.add(classNames[className]);
          }
        }
        continue;
      }
      if (props[prop] !== that.nativeElement[prop]) {
        const normalizeProp = (str) => {
          return str.replace(/-([a-z])/g, function(g2) {
            return g2[1].toUpperCase();
          });
        };
        if (prop === "hover" || prop === "active" || prop === "focus" || prop === "selected") {
          that.nativeElement.setAttribute(prop, "");
        }
        const normalizedProp = normalizeProp(prop);
        that.nativeElement[normalizedProp] = props[prop];
      }
    }
    for (let eventName in events) {
      that[eventName] = events[eventName];
      that.nativeElement[eventName.toLowerCase()] = events[eventName];
    }
    if (initialize) {
      if (that.onCreate) {
        that.onCreate();
      }
      that.nativeElement.whenRendered(() => {
        if (that.onReady) {
          that.onReady();
        }
      });
    }
    if (styles2) {
      for (let styleName in styles2) {
        that.nativeElement.style[styleName] = styles2[styleName];
      }
    }
  }
  componentDidMount() {
    this.componentDidRender(true);
  }
  componentDidUpdate() {
    this.componentDidRender(false);
  }
  componentWillUnmount() {
    const that = this;
    if (!that.nativeElement) {
      return;
    }
    that.nativeElement.whenRenderedCallbacks = [];
    for (let i = 0; i < that.eventListeners.length; i++) {
      const eventName = that.eventListeners[i];
      that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
    }
  }
  render() {
    return React.createElement("smart-tab-item", { ref: this.componentRef }, this.props.children);
  }
}
class TabItemsGroup extends React.Component {
  constructor(props) {
    super(props);
    this.componentRef = React.createRef();
  }
  // Gets the id of the React component.
  get id() {
    if (!this._id) {
      this._id = "TabItemsGroup" + Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
    }
    return this._id;
  }
  /**
  *	Property type: string
  */
  get label() {
    return this.nativeElement ? this.nativeElement.label : void 0;
  }
  set label(value) {
    if (this.nativeElement) {
      this.nativeElement.label = value;
    }
  }
  /**
  *	Property type: number
  */
  get labelSize() {
    return this.nativeElement ? this.nativeElement.labelSize : void 0;
  }
  set labelSize(value) {
    if (this.nativeElement) {
      this.nativeElement.labelSize = value;
    }
  }
  // Gets the properties of the React component.
  get properties() {
    return ["label", "labelSize"];
  }
  // Gets the events of the React component.
  get eventListeners() {
    return ["onCreate", "onReady"];
  }
  componentDidRender(initialize) {
    const that = this;
    const props = {};
    const events = {};
    let styles2 = null;
    for (let prop in that.props) {
      if (prop === "children") {
        continue;
      }
      if (prop === "style") {
        styles2 = that.props[prop];
        continue;
      }
      if (prop.startsWith("on") && that.properties.indexOf(prop) === -1) {
        events[prop] = that.props[prop];
        continue;
      }
      props[prop] = that.props[prop];
    }
    if (initialize) {
      that.nativeElement = this.componentRef.current;
    }
    for (let prop in props) {
      if (prop === "class") {
        const classNames = props[prop].trim().split(" ");
        for (let className in classNames) {
          if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
            that.nativeElement.classList.add(classNames[className]);
          }
        }
        continue;
      }
      if (props[prop] !== that.nativeElement[prop]) {
        const normalizeProp = (str) => {
          return str.replace(/-([a-z])/g, function(g2) {
            return g2[1].toUpperCase();
          });
        };
        if (prop === "hover" || prop === "active" || prop === "focus" || prop === "selected") {
          that.nativeElement.setAttribute(prop, "");
        }
        const normalizedProp = normalizeProp(prop);
        that.nativeElement[normalizedProp] = props[prop];
      }
    }
    for (let eventName in events) {
      that[eventName] = events[eventName];
      that.nativeElement[eventName.toLowerCase()] = events[eventName];
    }
    if (initialize) {
      if (that.onCreate) {
        that.onCreate();
      }
      that.nativeElement.whenRendered(() => {
        if (that.onReady) {
          that.onReady();
        }
      });
    }
    if (styles2) {
      for (let styleName in styles2) {
        that.nativeElement.style[styleName] = styles2[styleName];
      }
    }
  }
  componentDidMount() {
    this.componentDidRender(true);
  }
  componentDidUpdate() {
    this.componentDidRender(false);
  }
  componentWillUnmount() {
    const that = this;
    if (!that.nativeElement) {
      return;
    }
    that.nativeElement.whenRenderedCallbacks = [];
    for (let i = 0; i < that.eventListeners.length; i++) {
      const eventName = that.eventListeners[i];
      that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
    }
  }
  render() {
    return React.createElement("smart-tab-items-group", { ref: this.componentRef }, this.props.children);
  }
}
class Tabs extends React.Component {
  constructor(props) {
    super(props);
    this.componentRef = React.createRef();
  }
  // Gets the id of the React component.
  get id() {
    if (!this._id) {
      this._id = "Tabs" + Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
    }
    return this._id;
  }
  /** Sets or gets whether the "Add new tab" button (+) is displayed.
  *	Property type: boolean
  */
  get addNewTab() {
    return this.nativeElement ? this.nativeElement.addNewTab : void 0;
  }
  set addNewTab(value) {
    if (this.nativeElement) {
      this.nativeElement.addNewTab = value;
    }
  }
  /** Allows toggle. If set to true, **selectedIndex** can be set to null (no selected tab).
  *	Property type: boolean
  */
  get allowToggle() {
    return this.nativeElement ? this.nativeElement.allowToggle : void 0;
  }
  set allowToggle(value) {
    if (this.nativeElement) {
      this.nativeElement.allowToggle = value;
    }
  }
  /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
  *	Property type: Animation
  */
  get animation() {
    return this.nativeElement ? this.nativeElement.animation : void 0;
  }
  set animation(value) {
    if (this.nativeElement) {
      this.nativeElement.animation = value;
    }
  }
  /** Sets or gets the close button mode.
  *	Property type: TabsCloseButtonMode
  */
  get closeButtonMode() {
    return this.nativeElement ? this.nativeElement.closeButtonMode : void 0;
  }
  set closeButtonMode(value) {
    if (this.nativeElement) {
      this.nativeElement.closeButtonMode = value;
    }
  }
  /** Sets or gets whether close buttons are displayed.
  *	Property type: boolean
  */
  get closeButtons() {
    return this.nativeElement ? this.nativeElement.closeButtons : void 0;
  }
  set closeButtons(value) {
    if (this.nativeElement) {
      this.nativeElement.closeButtons = value;
    }
  }
  /** Sets or gets whether the Tabs content section is collapsed.
  *	Property type: boolean
  */
  get collapsed() {
    return this.nativeElement ? this.nativeElement.collapsed : void 0;
  }
  set collapsed(value) {
    if (this.nativeElement) {
      this.nativeElement.collapsed = value;
    }
  }
  /** Enables or disables the collapsible feature.
  *	Property type: boolean
  */
  get collapsible() {
    return this.nativeElement ? this.nativeElement.collapsible : void 0;
  }
  set collapsible(value) {
    if (this.nativeElement) {
      this.nativeElement.collapsible = value;
    }
  }
  /** Determines the data source that will be loaded to the Tabs.
  *	Property type: any
  */
  get dataSource() {
    return this.nativeElement ? this.nativeElement.dataSource : void 0;
  }
  set dataSource(value) {
    if (this.nativeElement) {
      this.nativeElement.dataSource = value;
    }
  }
  /** Enables or disables the element.
  *	Property type: boolean
  */
  get disabled() {
    return this.nativeElement ? this.nativeElement.disabled : void 0;
  }
  set disabled(value) {
    if (this.nativeElement) {
      this.nativeElement.disabled = value;
    }
  }
  /** Enables or disables scrolling using the mouse wheel through overflowing tab labels in the tab strip.
  *	Property type: boolean
  */
  get enableMouseWheelAction() {
    return this.nativeElement ? this.nativeElement.enableMouseWheelAction : void 0;
  }
  set enableMouseWheelAction(value) {
    if (this.nativeElement) {
      this.nativeElement.enableMouseWheelAction = value;
    }
  }
  /** Sets or gets the locale. Used in conjunction with the property messages.
  *	Property type: string
  */
  get locale() {
    return this.nativeElement ? this.nativeElement.locale : void 0;
  }
  set locale(value) {
    if (this.nativeElement) {
      this.nativeElement.locale = value;
    }
  }
  /** Callback, related to localization module.
  *	Property type: any
  */
  get localizeFormatFunction() {
    return this.nativeElement ? this.nativeElement.localizeFormatFunction : void 0;
  }
  set localizeFormatFunction(value) {
    if (this.nativeElement) {
      this.nativeElement.localizeFormatFunction = value;
    }
  }
  /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
  *	Property type: any
  */
  get messages() {
    return this.nativeElement ? this.nativeElement.messages : void 0;
  }
  set messages(value) {
    if (this.nativeElement) {
      this.nativeElement.messages = value;
    }
  }
  /** Sets or gets the widget's name.
  *	Property type: string
  */
  get name() {
    return this.nativeElement ? this.nativeElement.name : void 0;
  }
  set name(value) {
    if (this.nativeElement) {
      this.nativeElement.name = value;
    }
  }
  /** Sets or gets the Tabs scroll buttons behavior. Applicable only when tabLayout is 'scroll'.
  *	Property type: Overflow
  */
  get overflow() {
    return this.nativeElement ? this.nativeElement.overflow : void 0;
  }
  set overflow(value) {
    if (this.nativeElement) {
      this.nativeElement.overflow = value;
    }
  }
  /** Disables user interaction with the element.
  *	Property type: boolean
  */
  get readonly() {
    return this.nativeElement ? this.nativeElement.readonly : void 0;
  }
  set readonly(value) {
    if (this.nativeElement) {
      this.nativeElement.readonly = value;
    }
  }
  /** Enables or disables the reorder feature. When this feature is enabled, the end-user can drag a tab and drop it over another tab. As a result the tabs will be reordered.
  *	Property type: boolean
  */
  get reorder() {
    return this.nativeElement ? this.nativeElement.reorder : void 0;
  }
  set reorder(value) {
    if (this.nativeElement) {
      this.nativeElement.reorder = value;
    }
  }
  /** Sets or gets whether tab labels can be resized by dragging with the mouse.
  *	Property type: boolean
  */
  get resize() {
    return this.nativeElement ? this.nativeElement.resize : void 0;
  }
  set resize(value) {
    if (this.nativeElement) {
      this.nativeElement.resize = value;
    }
  }
  /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
  *	Property type: boolean
  */
  get rightToLeft() {
    return this.nativeElement ? this.nativeElement.rightToLeft : void 0;
  }
  set rightToLeft(value) {
    if (this.nativeElement) {
      this.nativeElement.rightToLeft = value;
    }
  }
  /** Sets or gets the position of the scroll buttons.
  *	Property type: LayoutPosition
  */
  get scrollButtonsPosition() {
    return this.nativeElement ? this.nativeElement.scrollButtonsPosition : void 0;
  }
  set scrollButtonsPosition(value) {
    if (this.nativeElement) {
      this.nativeElement.scrollButtonsPosition = value;
    }
  }
  /** Sets or gets the behavior when scrolling the tab strip via the scroll buttons.
  *	Property type: TabsScrollMode
  */
  get scrollMode() {
    return this.nativeElement ? this.nativeElement.scrollMode : void 0;
  }
  set scrollMode(value) {
    if (this.nativeElement) {
      this.nativeElement.scrollMode = value;
    }
  }
  /** Sets or gets which tab is selected.
  *	Property type: number | null
  */
  get selectedIndex() {
    return this.nativeElement ? this.nativeElement.selectedIndex : void 0;
  }
  set selectedIndex(value) {
    if (this.nativeElement) {
      this.nativeElement.selectedIndex = value;
    }
  }
  /** Determines the way the user can switch between tabs.
  *	Property type: TabSelectionMode
  */
  get selectionMode() {
    return this.nativeElement ? this.nativeElement.selectionMode : void 0;
  }
  set selectionMode(value) {
    if (this.nativeElement) {
      this.nativeElement.selectionMode = value;
    }
  }
  /** Applies one of four behaviors when the element is not wide enough to display all tab labels.
  *	Property type: TabsTabLayout
  */
  get tabLayout() {
    return this.nativeElement ? this.nativeElement.tabLayout : void 0;
  }
  set tabLayout(value) {
    if (this.nativeElement) {
      this.nativeElement.tabLayout = value;
    }
  }
  /** Sets or gets where the tab strip is positioned.
  *	Property type: TabPosition
  */
  get tabPosition() {
    return this.nativeElement ? this.nativeElement.tabPosition : void 0;
  }
  set tabPosition(value) {
    if (this.nativeElement) {
      this.nativeElement.tabPosition = value;
    }
  }
  /** Sets or gets the orientation of the text in the tabs.
  *	Property type: Orientation
  */
  get tabTextOrientation() {
    return this.nativeElement ? this.nativeElement.tabTextOrientation : void 0;
  }
  set tabTextOrientation(value) {
    if (this.nativeElement) {
      this.nativeElement.tabTextOrientation = value;
    }
  }
  /** Determines the theme. Theme defines the look of the element
  *	Property type: string
  */
  get theme() {
    return this.nativeElement ? this.nativeElement.theme : void 0;
  }
  set theme(value) {
    if (this.nativeElement) {
      this.nativeElement.theme = value;
    }
  }
  /** If is set to true, the element cannot be focused.
  *	Property type: boolean
  */
  get unfocusable() {
    return this.nativeElement ? this.nativeElement.unfocusable : void 0;
  }
  set unfocusable(value) {
    if (this.nativeElement) {
      this.nativeElement.unfocusable = value;
    }
  }
  // Gets the properties of the React component.
  get properties() {
    return ["addNewTab", "allowToggle", "animation", "closeButtonMode", "closeButtons", "collapsed", "collapsible", "dataSource", "disabled", "enableMouseWheelAction", "locale", "localizeFormatFunction", "messages", "name", "overflow", "readonly", "reorder", "resize", "rightToLeft", "scrollButtonsPosition", "scrollMode", "selectedIndex", "selectionMode", "tabLayout", "tabPosition", "tabTextOrientation", "theme", "unfocusable"];
  }
  // Gets the events of the React component.
  get eventListeners() {
    return ["onAddNewTabClick", "onChange", "onClose", "onClosing", "onDragEnd", "onDragStart", "onReorder", "onCreate", "onReady"];
  }
  /** Collapses the content section.
  */
  collapse() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.collapse();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.collapse();
      });
    }
  }
  /** Returns the label of a Tab at given index.
    * @param {number} index. The index of the tab.
    * @returns {string}
  */
  getTabLabel(index2) {
    return __awaiter$3(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.getTabLabel(index2);
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Returns the content of a Tab at given index.
    * @param {number} index. The index of the tab.
    * @returns {HTMLElement}
  */
  getTabContent(index2) {
    return __awaiter$3(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.getTabContent(index2);
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Makes sure a tab is visible by scrolling to it.
  * @param {number} index. The index of the tab to scroll to.
  */
  ensureVisible(index2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.ensureVisible(index2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.ensureVisible(index2);
      });
    }
  }
  /** Expands the content section.
  */
  expand() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.expand();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.expand();
      });
    }
  }
  /** Returns an array of the TabItems inside the element.
    * @returns {TabItem[]}
  */
  getTabs() {
    return __awaiter$3(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.getTabs();
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Returns the offset of the tab item container (smart-tab-item element) from the edge of the Tabs (smart-tabs element) where the tab strip is positioned.
    * @param {number} index. The index of the tab item.
    * @returns {number}
  */
  getOffsetFromEdgeOfElement(index2) {
    return __awaiter$3(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.getOffsetFromEdgeOfElement(index2);
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Inserts a new tab and an associated content section.
  * @param {number} index. The index to insert a new tab at.
  * @param {any} details. An Object with the fields "label", "labelSize", "content" and "group".
  */
  insert(index2, details) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.insert(index2, details);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.insert(index2, details);
      });
    }
  }
  /** Refreshes the Tabs header section. Useful when the header contains elements (such as images) loaded slower than the Tabs itself.
  */
  refreshTabHeader() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.refreshTabHeader();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.refreshTabHeader();
      });
    }
  }
  /** Removes a tab and its associated content section.
  * @param {number} index. The index of the tab to remove.
  */
  removeAt(index2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.removeAt(index2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.removeAt(index2);
      });
    }
  }
  /** Selects a tab.
  * @param {number} index. The index of the tab to select.
  */
  select(index2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.select(index2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.select(index2);
      });
    }
  }
  /** Updates a tab and its associated content section.
  * @param {number} index. The index of the tab to update.
  * @param {string} label. The new label of the tab. The value can be the id of an HTMLTemplateElement
  * @param {string | HTMLElement} content. The new content of the tab.
  */
  update(index2, label, content2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.update(index2, label, content2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.update(index2, label, content2);
      });
    }
  }
  componentDidRender(initialize) {
    const that = this;
    const props = {};
    const events = {};
    let styles2 = null;
    for (let prop in that.props) {
      if (prop === "children") {
        continue;
      }
      if (prop === "style") {
        styles2 = that.props[prop];
        continue;
      }
      if (prop.startsWith("on") && that.properties.indexOf(prop) === -1) {
        events[prop] = that.props[prop];
        continue;
      }
      props[prop] = that.props[prop];
    }
    if (initialize) {
      that.nativeElement = this.componentRef.current;
    }
    for (let prop in props) {
      if (prop === "class") {
        const classNames = props[prop].trim().split(" ");
        for (let className in classNames) {
          if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
            that.nativeElement.classList.add(classNames[className]);
          }
        }
        continue;
      }
      if (props[prop] !== that.nativeElement[prop]) {
        const normalizeProp = (str) => {
          return str.replace(/-([a-z])/g, function(g2) {
            return g2[1].toUpperCase();
          });
        };
        if (prop === "hover" || prop === "active" || prop === "focus" || prop === "selected") {
          that.nativeElement.setAttribute(prop, "");
        }
        const normalizedProp = normalizeProp(prop);
        that.nativeElement[normalizedProp] = props[prop];
      }
    }
    for (let eventName in events) {
      that[eventName] = events[eventName];
      that.nativeElement[eventName.toLowerCase()] = events[eventName];
    }
    if (initialize) {
      if (that.onCreate) {
        that.onCreate();
      }
      that.nativeElement.whenRendered(() => {
        if (that.onReady) {
          that.onReady();
        }
      });
    }
    if (styles2) {
      for (let styleName in styles2) {
        that.nativeElement.style[styleName] = styles2[styleName];
      }
    }
  }
  componentDidMount() {
    this.componentDidRender(true);
  }
  componentDidUpdate() {
    this.componentDidRender(false);
  }
  componentWillUnmount() {
    const that = this;
    if (!that.nativeElement) {
      return;
    }
    that.nativeElement.whenRenderedCallbacks = [];
    for (let i = 0; i < that.eventListeners.length; i++) {
      const eventName = that.eventListeners[i];
      that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
    }
  }
  render() {
    return React.createElement("smart-tabs", { ref: this.componentRef }, this.props.children);
  }
}
const StyledMenuItem = styled$1(MenuItem)({
  paddingRight: 0,
  paddingLeft: "4px",
  display: "flex",
  justifyContent: "space-between"
});
const StyledTypography = styled$1(Typography)({
  paddingLeft: "8px",
  paddingRight: "8px",
  textAlign: "left",
  position: "relative",
  top: "0px",
  alignSelf: "center"
});
const FlexBox = styled$1(Box$2)({
  display: "flex"
});
const IconMenuItem = ({ leftIcon, rightIcon, onClick: onClick2, label, MenuItemProps, className, ref: ref2 }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(StyledMenuItem, { ...MenuItemProps, ref: ref2, className, onClick: onClick2, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(FlexBox, { children: [
      leftIcon,
      /* @__PURE__ */ jsxRuntimeExports.jsx(StyledTypography, { children: label })
    ] }),
    rightIcon
  ] });
};
var ChevronRightRounded = {};
var hasRequiredChevronRightRounded;
function requireChevronRightRounded() {
  if (hasRequiredChevronRightRounded) return ChevronRightRounded;
  hasRequiredChevronRightRounded = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ChevronRightRounded, "__esModule", {
    value: true
  });
  ChevronRightRounded.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ChevronRightRounded.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M9.29 6.71c-.39.39-.39 1.02 0 1.41L13.17 12l-3.88 3.88c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0l4.59-4.59c.39-.39.39-1.02 0-1.41L10.7 6.7c-.38-.38-1.02-.38-1.41.01"
  }), "ChevronRightRounded");
  return ChevronRightRounded;
}
var ChevronRightRoundedExports = /* @__PURE__ */ requireChevronRightRounded();
const ArrowRight = /* @__PURE__ */ getDefaultExportFromCjs(ChevronRightRoundedExports);
const NestedMenuItem = React.forwardRef(function NestedMenuItem2(props, ref2) {
  const {
    parentMenuOpen,
    label,
    rightIcon = /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowRight, {}),
    leftIcon = null,
    children,
    className,
    tabIndex: tabIndexProp,
    ContainerProps: ContainerPropsProp = {},
    ...MenuItemProps
  } = props;
  const { ref: containerRefProp, ...ContainerProps } = ContainerPropsProp;
  const menuItemRef = reactExports.useRef(null);
  reactExports.useImperativeHandle(ref2, () => menuItemRef.current);
  const containerRef = reactExports.useRef(null);
  reactExports.useImperativeHandle(containerRefProp, () => containerRef.current);
  const menuContainerRef = reactExports.useRef(null);
  const [isSubMenuOpen, setIsSubMenuOpen] = reactExports.useState(false);
  const handleMouseEnter = (event) => {
    setTimeout(() => {
      setIsSubMenuOpen(true);
      if (ContainerProps.onMouseEnter) {
        ContainerProps.onMouseEnter(event);
      }
    }, 200);
  };
  const handleMouseLeave = (event) => {
    setTimeout(() => {
      setIsSubMenuOpen(false);
      if (ContainerProps.onMouseLeave) {
        ContainerProps.onMouseLeave(event);
      }
    }, 201);
  };
  const isSubmenuFocused = () => {
    const active = containerRef.current.ownerDocument.activeElement;
    for (const child of menuContainerRef.current.children) {
      if (child === active) {
        return true;
      }
    }
    return false;
  };
  const handleFocus = (event) => {
    if (event.target === containerRef.current) {
      setIsSubMenuOpen(true);
    }
    if (ContainerProps.onFocus) {
      ContainerProps.onFocus(event);
    }
  };
  const handleKeyDown2 = (event) => {
    if (event.key === "Escape") {
      return;
    }
    if (isSubmenuFocused()) {
      event.stopPropagation();
    }
    const active = containerRef.current.ownerDocument.activeElement;
    if (event.key === "ArrowLeft" && isSubmenuFocused()) {
      containerRef.current.focus();
    }
    if (event.key === "ArrowRight" && event.target === containerRef.current && event.target === active) {
      const firstChild = menuContainerRef.current.children[0];
      firstChild.focus();
    }
  };
  const open = isSubMenuOpen && parentMenuOpen;
  let tabIndex;
  if (!props.disabled) {
    tabIndex = tabIndexProp !== void 0 ? tabIndexProp : -1;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    "div",
    {
      ...ContainerProps,
      ref: containerRef,
      onFocus: handleFocus,
      tabIndex,
      onMouseEnter: handleMouseEnter,
      onMouseLeave: handleMouseLeave,
      onKeyDown: handleKeyDown2,
      children: [
        IconMenuItem({
          MenuItemProps,
          className,
          ref: menuItemRef,
          onClick: props.onClick,
          leftIcon,
          rightIcon,
          label
        }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Menu,
          {
            style: {
              pointerEvents: "none",
              paddingTop: "0px",
              paddingBottom: "0px"
            },
            anchorEl: menuItemRef.current,
            anchorOrigin: {
              vertical: "top",
              horizontal: "right"
            },
            transformOrigin: {
              vertical: "top",
              horizontal: "left"
            },
            PaperProps: {
              style: { pointerEvents: "auto" }
            },
            open,
            autoFocus: false,
            disableAutoFocus: true,
            disableEnforceFocus: true,
            onClose: () => {
              setIsSubMenuOpen(false);
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                ref: menuContainerRef,
                style: {
                  pointerEvents: "auto",
                  paddingTop: "0px",
                  paddingBottom: "0px"
                },
                children
              }
            )
          }
        )
      ]
    }
  );
});
const SectionToolsJS = (props) => {
  const [menuBarSection, setMenuBarSection] = reactExports.useState([]);
  const [buttonsSection, setButtonsSection] = reactExports.useState([]);
  const [workSpaceTools, setWorkSpaceTools] = useAtom(workPlaceToolsAtom);
  const [dataButtonsDefault, setDataButtonsDefault] = reactExports.useState();
  const [open1, setOpen1] = reactExports.useState(false);
  const [menuBarDefault, setMenuBarDefault] = reactExports.useState(void 0);
  const [ID2, setID] = reactExports.useState();
  const [AssMass, setAssMass] = reactExports.useState(/* @__PURE__ */ new Map());
  const [anchorElAss, setAnchorElAss] = reactExports.useState(/* @__PURE__ */ new Map());
  const [subForms, setSubForms] = reactExports.useState(void 0);
  const [display2, setDisplay] = reactExports.useState("flex");
  reactExports.useLayoutEffect(() => {
    getWorkPlaceTools();
  }, []);
  reactExports.useEffect(() => {
    if (subForms !== void 0) {
      setTimeout(() => {
        tokenProcessingTest(subForms);
      }, 10);
    }
  }, [subForms]);
  const handleClick = (event) => {
    setOpen1(!open1);
    const id = event.currentTarget.getAttribute("id");
    setAssMass(AssMass.set(id, true));
    setAnchorElAss(anchorElAss.set(id, event.currentTarget));
    setID(id);
  };
  const handleClose = (event) => {
    setOpen1(!open1);
    setAssMass(AssMass.set(ID2, false));
    setAnchorElAss(anchorElAss.set(ID2, null));
  };
  const handleClickItemMenu = (event) => {
    setOpen1(!open1);
    const Path = event.currentTarget.getAttribute("path");
    const Token = event.currentTarget.getAttribute("token");
    const Params2 = event.currentTarget.getAttribute("params");
    const Module = event.currentTarget.getAttribute("module");
    setAssMass(AssMass.set(ID2, false));
    setAnchorElAss(anchorElAss.set(ID2, null));
    if (Path !== null) {
      handeleExecToolprogram(event);
    } else if (Token === "SelectObject") {
      let ObjType2 = getObjType(Params2);
      let CLSID = getCLSID(Params2);
      GetSelectObject(ObjType2, CLSID);
    } else if (Token) {
      let params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", Module);
      params2.set("comand", Token);
      params2.set("WSM", "1");
      AxiosRequest(true, params2).then((res) => {
        tokenProcessingTest(res, { propsId: props.ID });
      });
    }
  };
  function getObjType(str) {
    let pos = str.indexOf("ObjType=") + 8;
    return str.substring(pos, str.indexOf(",", pos));
  }
  function getCLSID(str) {
    let pos = str.indexOf("CLSID=") + 6;
    return str.substring(pos, str.indexOf(",", pos));
  }
  const GetSectionTools = async () => {
    let params2 = /* @__PURE__ */ new Map(), json;
    params2.set("prefix", "tools");
    params2.set("comand", "GetSectionTools");
    params2.set("SectionID", props.ID);
    json = await AxiosRequest(true, params2);
    if (isEmptyObject(json)) {
      setMenuBarSection([]);
    } else {
      if (json["Buttons"]) setButtonsSection(json["Buttons"]);
      if (json) setMenuBarSection(json["MenuBar"]);
    }
  };
  const getWorkPlaceTools = async () => {
    var _a2;
    let json = {};
    if (workSpaceTools === void 0) {
      let params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", "config");
      params2.set("comand", "GetWorkPlaceTools");
      json = await AxiosRequest(true, params2);
      setWorkSpaceTools(json);
    } else {
      json = Object.assign({}, workSpaceTools);
    }
    if (json === void 0 && isEmptyObject(json) && ((_a2 = getOptionsForUser()) == null ? void 0 : _a2.authed_by) !== void 0) {
      DisableBar();
    } else {
      if (json["Buttons"]) setDataButtonsDefault(json["Buttons"]["Button"]);
      if (json["MenuBar"]) {
        setMenuBarDefault(json["MenuBar"]);
        CreateMap(json["MenuBar"]);
        GetSectionTools();
      } else {
        if (props.setHeight) props.setHeight("95%");
        if (props.setLoad) props.setLoad(true);
        GetSectionTools();
      }
    }
  };
  function DisableBar() {
    setDisplay("none");
    if (props.setHeight) {
      props.setHeight("100%");
    }
  }
  const GetSelectObject = (ObjType2, CLSID) => {
    let param = /* @__PURE__ */ new Map(), json;
    param.set("prefix", "ABLUtils");
    param.set("comand", "SelectObject");
    param.set("CLSID", CLSID);
    param.set("ObjType", ObjType2);
    param.set("OnlyView", "1");
    param.set("WSM", "1");
    json = XMLrequest(param);
    setSubForms(json);
  };
  function CreateMap(List3) {
    for (const key of Object.keys(List3)) {
      setAnchorElAss(anchorElAss.set(key, null));
      setAssMass(AssMass.set(key, false));
    }
  }
  function RecItems(jsonItems, CurrentID) {
    if (jsonItems !== void 0) {
      let DeepFirst, Token, Params2, Module, openSet, Path, Image2;
      let assemblyLists = [];
      for (const [key, value] of Object.entries(jsonItems)) {
        Token = jsonItems[key]["Token"];
        Path = jsonItems[key]["Path"];
        Image2 = jsonItems[key]["Image"];
        Params2 = jsonItems[key]["Params"];
        Module = jsonItems[key]["Module"];
        DeepFirst = value;
        if (Token !== void 0 || Path !== void 0) {
          let prS = Image2 === void 0 ? 0.5 : 0.2;
          let Type = jsonItems[key]["Type"];
          assemblyLists.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
              MenuItem,
              {
                token: Token,
                params: Params2,
                path: Path,
                type: Type,
                module: Module,
                id: key,
                onClick: handleClickItemMenu,
                style: { height: "32px", marginLeft: 2 },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { sx: { pr: prS, pt: 0.5 }, children: Image2 === void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { paddingLeft: "13px" } }) : ImgURL(Image2, { width: "16px", height: "16px" }) }),
                  key
                ]
              }
            ) }, key)
          );
        } else if (typeof DeepFirst === "object" && Object.keys(DeepFirst).length > 0) {
          openSet = AssMass.get(CurrentID);
          if (key !== "Image" && key !== "-") {
            assemblyLists.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                NestedMenuItem,
                {
                  style: {
                    paddingLeft: "10px",
                    height: "32px",
                    marginLeft: 3
                  },
                  leftIcon: Image2 === void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { paddingLeft: "16px" } }) : ImgURL(Image2, {
                    height: "16px",
                    width: "16px",
                    marginLeft: 7,
                    marginTop: 3,
                    marginRight: -5
                  }),
                  label: key,
                  parentMenuOpen: openSet,
                  children: RecItems(DeepFirst, CurrentID)
                }
              ) }, key)
            );
          }
        }
      }
      return assemblyLists;
    }
  }
  function Rec(jsonItems, jsonItemsSection) {
    if (jsonItems !== void 0 && jsonItemsSection !== void 0) {
      let DeepFirst, openSet = false, anchorElset, Token;
      let assemblyLists = [];
      let assignedButtons = {};
      assignedButtons = extend(true, jsonItems, jsonItemsSection);
      for (const [key, value] of Object.entries(assignedButtons)) {
        Token = value["Token"];
        DeepFirst = value;
        if (Token === void 0) {
          openSet = AssMass.get(key);
          anchorElset = anchorElAss.get(key);
          assemblyLists.push(
            /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { id: key, onClick: handleClick, style: { textTransform: "none", height: "25px" }, children: key }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Menu,
                {
                  id: key,
                  anchorEl: anchorElset,
                  open: openSet ? true : false,
                  onClose: handleClose,
                  sx: {
                    boxShadow: "rgba(0, 0, 0, 0.2) 0px 5px 1px -3px, rgba(0, 0, 0, 0.14) 0px 8px 30px 1px, rgba(0, 0, 0, 0.12) 0px 3px 30px 2px"
                  },
                  children: RecItems(DeepFirst, key)
                }
              )
            ] }, key)
          );
        }
      }
      return assemblyLists;
    }
  }
  async function handeleExecToolprogram(event, type2) {
    let Path = event.currentTarget.getAttribute("path"), Type, params2 = /* @__PURE__ */ new Map();
    if (Path === "SetupProjectParams") {
      params2.set("prefix", "config");
      params2.set("comand", "SetupProjectParams");
      params2.set("WSM", "1");
      AxiosRequest(true, params2).then((res) => {
        tokenProcessingTest(res, { propsId: props.ID });
      });
      return;
    }
    Type = event.currentTarget.getAttribute("type");
    params2.set("prefix", "tools");
    params2.set("comand", "ExecToolProgram");
    params2.set("Path", encodeURIComponent(Path));
    params2.set("Type", Type);
    params2.set("Checked", "0");
    params2.set("WSM", "1");
    AxiosRequest(true, params2, props.postData).then((res) => {
      tokenProcessingTest(res, { propsId: props.ID });
    });
  }
  const RenderButtons = (ButtonsLocal, WichButton) => {
    let newKey = 0;
    if (ButtonsLocal !== void 0 && WichButton === "SectionTools") {
      let items = [], Path, Module, Type;
      items.push(
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: props.defaultButton }, "default-button-section-tools0")
      );
      for (const [key, value] of Object.entries(ButtonsLocal)) {
        Path = backValue(value, "Path");
        Type = backValue(value, "Type");
        Module = backValue(value, "Module");
        items.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, toolsbutton: "", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: key, arrow: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              path: Path,
              type: Type,
              module: Module,
              color: "primary",
              component: "span",
              onClick: handeleExecToolprogram,
              children: ImgURL(backValue(value, "Image"))
            }
          ) }) }, key)
        );
      }
      return items;
    } else if (ButtonsLocal !== void 0 && WichButton === "WorkPlace") {
      let items = [], Token, Hint;
      Hint = ButtonsLocal.Hint;
      Token = ButtonsLocal.Token;
      items.push(
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, toolsbutton: "", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: Hint, arrow: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            path: Token,
            color: "primary",
            component: "span",
            onClick: (e2) => handeleExecToolprogram(e2),
            children: ImgURL(ButtonsLocal.Image)
          }
        ) }) }, `button-${newKey}`)
      );
      newKey++;
      return items;
    }
  };
  const backValue = (value, param) => {
    return value[param];
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "row",
      justifyContent: "flex-start",
      alignItems: "center",
      sx: { pl: 1 },
      id: "tools" + props.ID,
      style: { flex: "0 1 auto", display: display2 },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            container: true,
            direction: "row",
            justifyContent: "flex-start",
            alignItems: "center",
            id: "buttons_for_section" + props.ID
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
          RenderButtons(dataButtonsDefault, "WorkPlace"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true }),
          RenderButtons(buttonsSection, "SectionTools"),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true }),
          Rec(menuBarDefault, menuBarSection)
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { id: "RenderDefault" })
      ]
    }
  );
};
const SectionToolsJS$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: SectionToolsJS
}, Symbol.toStringTag, { value: "Module" }));
const EditStyleJson = {
  "чек": 4,
  "список": 1,
  "кнопка": 16,
  "спин": 8,
  "дата": 2
};
function isString$1(str) {
  return typeof str === "string" || str instanceof String;
}
function isObject(obj2) {
  var _obj$constructor;
  return typeof obj2 === "object" && obj2 != null && (obj2 == null || (_obj$constructor = obj2.constructor) == null ? void 0 : _obj$constructor.name) === "Object";
}
function pick$1(obj2, keys) {
  if (Array.isArray(keys)) return pick$1(obj2, (_2, k2) => keys.includes(k2));
  return Object.entries(obj2).reduce((acc, _ref) => {
    let [k2, v2] = _ref;
    if (keys(v2, k2)) acc[k2] = v2;
    return acc;
  }, {});
}
const DIRECTION = {
  NONE: "NONE",
  LEFT: "LEFT",
  FORCE_LEFT: "FORCE_LEFT",
  RIGHT: "RIGHT",
  FORCE_RIGHT: "FORCE_RIGHT"
};
function forceDirection(direction2) {
  switch (direction2) {
    case DIRECTION.LEFT:
      return DIRECTION.FORCE_LEFT;
    case DIRECTION.RIGHT:
      return DIRECTION.FORCE_RIGHT;
    default:
      return direction2;
  }
}
function escapeRegExp(str) {
  return str.replace(/([.*+?^=!:${}()|[\]/\\])/g, "\\$1");
}
function objectIncludes(b2, a2) {
  if (a2 === b2) return true;
  const arrA = Array.isArray(a2), arrB = Array.isArray(b2);
  let i;
  if (arrA && arrB) {
    if (a2.length != b2.length) return false;
    for (i = 0; i < a2.length; i++) if (!objectIncludes(a2[i], b2[i])) return false;
    return true;
  }
  if (arrA != arrB) return false;
  if (a2 && b2 && typeof a2 === "object" && typeof b2 === "object") {
    const dateA = a2 instanceof Date, dateB = b2 instanceof Date;
    if (dateA && dateB) return a2.getTime() == b2.getTime();
    if (dateA != dateB) return false;
    const regexpA = a2 instanceof RegExp, regexpB = b2 instanceof RegExp;
    if (regexpA && regexpB) return a2.toString() == b2.toString();
    if (regexpA != regexpB) return false;
    const keys = Object.keys(a2);
    for (i = 0; i < keys.length; i++) if (!Object.prototype.hasOwnProperty.call(b2, keys[i])) return false;
    for (i = 0; i < keys.length; i++) if (!objectIncludes(b2[keys[i]], a2[keys[i]])) return false;
    return true;
  } else if (a2 && b2 && typeof a2 === "function" && typeof b2 === "function") {
    return a2.toString() === b2.toString();
  }
  return false;
}
class ActionDetails {
  /** Current input value */
  /** Current cursor position */
  /** Old input value */
  /** Old selection */
  constructor(opts) {
    Object.assign(this, opts);
    while (this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos)) {
      --this.oldSelection.start;
    }
    if (this.insertedCount) {
      while (this.value.slice(this.cursorPos) !== this.oldValue.slice(this.oldSelection.end)) {
        if (this.value.length - this.cursorPos < this.oldValue.length - this.oldSelection.end) ++this.oldSelection.end;
        else ++this.cursorPos;
      }
    }
  }
  /** Start changing position */
  get startChangePos() {
    return Math.min(this.cursorPos, this.oldSelection.start);
  }
  /** Inserted symbols count */
  get insertedCount() {
    return this.cursorPos - this.startChangePos;
  }
  /** Inserted symbols */
  get inserted() {
    return this.value.substr(this.startChangePos, this.insertedCount);
  }
  /** Removed symbols count */
  get removedCount() {
    return Math.max(this.oldSelection.end - this.startChangePos || // for Delete
    this.oldValue.length - this.value.length, 0);
  }
  /** Removed symbols */
  get removed() {
    return this.oldValue.substr(this.startChangePos, this.removedCount);
  }
  /** Unchanged head symbols */
  get head() {
    return this.value.substring(0, this.startChangePos);
  }
  /** Unchanged tail symbols */
  get tail() {
    return this.value.substring(this.startChangePos + this.insertedCount);
  }
  /** Remove direction */
  get removeDirection() {
    if (!this.removedCount || this.insertedCount) return DIRECTION.NONE;
    return (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) && // if not range removed (event with backspace)
    this.oldSelection.end === this.oldSelection.start ? DIRECTION.RIGHT : DIRECTION.LEFT;
  }
}
function IMask(el, opts) {
  return new IMask.InputMask(el, opts);
}
function maskedClass(mask) {
  if (mask == null) throw new Error("mask property should be defined");
  if (mask instanceof RegExp) return IMask.MaskedRegExp;
  if (isString$1(mask)) return IMask.MaskedPattern;
  if (mask === Date) return IMask.MaskedDate;
  if (mask === Number) return IMask.MaskedNumber;
  if (Array.isArray(mask) || mask === Array) return IMask.MaskedDynamic;
  if (IMask.Masked && mask.prototype instanceof IMask.Masked) return mask;
  if (IMask.Masked && mask instanceof IMask.Masked) return mask.constructor;
  if (mask instanceof Function) return IMask.MaskedFunction;
  console.warn("Mask not found for mask", mask);
  return IMask.Masked;
}
function normalizeOpts(opts) {
  if (!opts) throw new Error("Options in not defined");
  if (IMask.Masked) {
    if (opts.prototype instanceof IMask.Masked) return {
      mask: opts
    };
    const {
      mask = void 0,
      ...instanceOpts
    } = opts instanceof IMask.Masked ? {
      mask: opts
    } : isObject(opts) && opts.mask instanceof IMask.Masked ? opts : {};
    if (mask) {
      const _mask = mask.mask;
      return {
        ...pick$1(mask, (_2, k2) => !k2.startsWith("_")),
        mask: mask.constructor,
        _mask,
        ...instanceOpts
      };
    }
  }
  if (!isObject(opts)) return {
    mask: opts
  };
  return {
    ...opts
  };
}
function createMask(opts) {
  if (IMask.Masked && opts instanceof IMask.Masked) return opts;
  const nOpts = normalizeOpts(opts);
  const MaskedClass = maskedClass(nOpts.mask);
  if (!MaskedClass) throw new Error("Masked class is not found for provided mask " + nOpts.mask + ", appropriate module needs to be imported manually before creating mask.");
  if (nOpts.mask === MaskedClass) delete nOpts.mask;
  if (nOpts._mask) {
    nOpts.mask = nOpts._mask;
    delete nOpts._mask;
  }
  return new MaskedClass(nOpts);
}
IMask.createMask = createMask;
class MaskElement {
  /** */
  /** */
  /** */
  /** Safely returns selection start */
  get selectionStart() {
    let start2;
    try {
      start2 = this._unsafeSelectionStart;
    } catch {
    }
    return start2 != null ? start2 : this.value.length;
  }
  /** Safely returns selection end */
  get selectionEnd() {
    let end2;
    try {
      end2 = this._unsafeSelectionEnd;
    } catch {
    }
    return end2 != null ? end2 : this.value.length;
  }
  /** Safely sets element selection */
  select(start2, end2) {
    if (start2 == null || end2 == null || start2 === this.selectionStart && end2 === this.selectionEnd) return;
    try {
      this._unsafeSelect(start2, end2);
    } catch {
    }
  }
  /** */
  get isActive() {
    return false;
  }
  /** */
  /** */
  /** */
}
IMask.MaskElement = MaskElement;
const KEY_Z = 90;
const KEY_Y = 89;
class HTMLMaskElement extends MaskElement {
  /** HTMLElement to use mask on */
  constructor(input) {
    super();
    this.input = input;
    this._onKeydown = this._onKeydown.bind(this);
    this._onInput = this._onInput.bind(this);
    this._onBeforeinput = this._onBeforeinput.bind(this);
    this._onCompositionEnd = this._onCompositionEnd.bind(this);
  }
  get rootElement() {
    var _this$input$getRootNo, _this$input$getRootNo2, _this$input;
    return (_this$input$getRootNo = (_this$input$getRootNo2 = (_this$input = this.input).getRootNode) == null ? void 0 : _this$input$getRootNo2.call(_this$input)) != null ? _this$input$getRootNo : document;
  }
  /** Is element in focus */
  get isActive() {
    return this.input === this.rootElement.activeElement;
  }
  /** Binds HTMLElement events to mask internal events */
  bindEvents(handlers) {
    this.input.addEventListener("keydown", this._onKeydown);
    this.input.addEventListener("input", this._onInput);
    this.input.addEventListener("beforeinput", this._onBeforeinput);
    this.input.addEventListener("compositionend", this._onCompositionEnd);
    this.input.addEventListener("drop", handlers.drop);
    this.input.addEventListener("click", handlers.click);
    this.input.addEventListener("focus", handlers.focus);
    this.input.addEventListener("blur", handlers.commit);
    this._handlers = handlers;
  }
  _onKeydown(e2) {
    if (this._handlers.redo && (e2.keyCode === KEY_Z && e2.shiftKey && (e2.metaKey || e2.ctrlKey) || e2.keyCode === KEY_Y && e2.ctrlKey)) {
      e2.preventDefault();
      return this._handlers.redo(e2);
    }
    if (this._handlers.undo && e2.keyCode === KEY_Z && (e2.metaKey || e2.ctrlKey)) {
      e2.preventDefault();
      return this._handlers.undo(e2);
    }
    if (!e2.isComposing) this._handlers.selectionChange(e2);
  }
  _onBeforeinput(e2) {
    if (e2.inputType === "historyUndo" && this._handlers.undo) {
      e2.preventDefault();
      return this._handlers.undo(e2);
    }
    if (e2.inputType === "historyRedo" && this._handlers.redo) {
      e2.preventDefault();
      return this._handlers.redo(e2);
    }
  }
  _onCompositionEnd(e2) {
    this._handlers.input(e2);
  }
  _onInput(e2) {
    if (!e2.isComposing) this._handlers.input(e2);
  }
  /** Unbinds HTMLElement events to mask internal events */
  unbindEvents() {
    this.input.removeEventListener("keydown", this._onKeydown);
    this.input.removeEventListener("input", this._onInput);
    this.input.removeEventListener("beforeinput", this._onBeforeinput);
    this.input.removeEventListener("compositionend", this._onCompositionEnd);
    this.input.removeEventListener("drop", this._handlers.drop);
    this.input.removeEventListener("click", this._handlers.click);
    this.input.removeEventListener("focus", this._handlers.focus);
    this.input.removeEventListener("blur", this._handlers.commit);
    this._handlers = {};
  }
}
IMask.HTMLMaskElement = HTMLMaskElement;
class HTMLInputMaskElement extends HTMLMaskElement {
  /** InputElement to use mask on */
  constructor(input) {
    super(input);
    this.input = input;
  }
  /** Returns InputElement selection start */
  get _unsafeSelectionStart() {
    return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;
  }
  /** Returns InputElement selection end */
  get _unsafeSelectionEnd() {
    return this.input.selectionEnd;
  }
  /** Sets InputElement selection */
  _unsafeSelect(start2, end2) {
    this.input.setSelectionRange(start2, end2);
  }
  get value() {
    return this.input.value;
  }
  set value(value) {
    this.input.value = value;
  }
}
IMask.HTMLMaskElement = HTMLMaskElement;
class HTMLContenteditableMaskElement extends HTMLMaskElement {
  /** Returns HTMLElement selection start */
  get _unsafeSelectionStart() {
    const root = this.rootElement;
    const selection = root.getSelection && root.getSelection();
    const anchorOffset = selection && selection.anchorOffset;
    const focusOffset = selection && selection.focusOffset;
    if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) {
      return anchorOffset;
    }
    return focusOffset;
  }
  /** Returns HTMLElement selection end */
  get _unsafeSelectionEnd() {
    const root = this.rootElement;
    const selection = root.getSelection && root.getSelection();
    const anchorOffset = selection && selection.anchorOffset;
    const focusOffset = selection && selection.focusOffset;
    if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) {
      return anchorOffset;
    }
    return focusOffset;
  }
  /** Sets HTMLElement selection */
  _unsafeSelect(start2, end2) {
    if (!this.rootElement.createRange) return;
    const range2 = this.rootElement.createRange();
    range2.setStart(this.input.firstChild || this.input, start2);
    range2.setEnd(this.input.lastChild || this.input, end2);
    const root = this.rootElement;
    const selection = root.getSelection && root.getSelection();
    if (selection) {
      selection.removeAllRanges();
      selection.addRange(range2);
    }
  }
  /** HTMLElement value */
  get value() {
    return this.input.textContent || "";
  }
  set value(value) {
    this.input.textContent = value;
  }
}
IMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;
class InputHistory {
  constructor() {
    this.states = [];
    this.currentIndex = 0;
  }
  get currentState() {
    return this.states[this.currentIndex];
  }
  get isEmpty() {
    return this.states.length === 0;
  }
  push(state) {
    if (this.currentIndex < this.states.length - 1) this.states.length = this.currentIndex + 1;
    this.states.push(state);
    if (this.states.length > InputHistory.MAX_LENGTH) this.states.shift();
    this.currentIndex = this.states.length - 1;
  }
  go(steps) {
    this.currentIndex = Math.min(Math.max(this.currentIndex + steps, 0), this.states.length - 1);
    return this.currentState;
  }
  undo() {
    return this.go(-1);
  }
  redo() {
    return this.go(1);
  }
  clear() {
    this.states.length = 0;
    this.currentIndex = 0;
  }
}
InputHistory.MAX_LENGTH = 100;
class InputMask {
  /**
    View element
  */
  /** Internal {@link Masked} model */
  constructor(el, opts) {
    this.el = el instanceof MaskElement ? el : el.isContentEditable && el.tagName !== "INPUT" && el.tagName !== "TEXTAREA" ? new HTMLContenteditableMaskElement(el) : new HTMLInputMaskElement(el);
    this.masked = createMask(opts);
    this._listeners = {};
    this._value = "";
    this._unmaskedValue = "";
    this._rawInputValue = "";
    this.history = new InputHistory();
    this._saveSelection = this._saveSelection.bind(this);
    this._onInput = this._onInput.bind(this);
    this._onChange = this._onChange.bind(this);
    this._onDrop = this._onDrop.bind(this);
    this._onFocus = this._onFocus.bind(this);
    this._onClick = this._onClick.bind(this);
    this._onUndo = this._onUndo.bind(this);
    this._onRedo = this._onRedo.bind(this);
    this.alignCursor = this.alignCursor.bind(this);
    this.alignCursorFriendly = this.alignCursorFriendly.bind(this);
    this._bindEvents();
    this.updateValue();
    this._onChange();
  }
  maskEquals(mask) {
    var _this$masked;
    return mask == null || ((_this$masked = this.masked) == null ? void 0 : _this$masked.maskEquals(mask));
  }
  /** Masked */
  get mask() {
    return this.masked.mask;
  }
  set mask(mask) {
    if (this.maskEquals(mask)) return;
    if (!(mask instanceof IMask.Masked) && this.masked.constructor === maskedClass(mask)) {
      this.masked.updateOptions({
        mask
      });
      return;
    }
    const masked = mask instanceof IMask.Masked ? mask : createMask({
      mask
    });
    masked.unmaskedValue = this.masked.unmaskedValue;
    this.masked = masked;
  }
  /** Raw value */
  get value() {
    return this._value;
  }
  set value(str) {
    if (this.value === str) return;
    this.masked.value = str;
    this.updateControl("auto");
  }
  /** Unmasked value */
  get unmaskedValue() {
    return this._unmaskedValue;
  }
  set unmaskedValue(str) {
    if (this.unmaskedValue === str) return;
    this.masked.unmaskedValue = str;
    this.updateControl("auto");
  }
  /** Raw input value */
  get rawInputValue() {
    return this._rawInputValue;
  }
  set rawInputValue(str) {
    if (this.rawInputValue === str) return;
    this.masked.rawInputValue = str;
    this.updateControl();
    this.alignCursor();
  }
  /** Typed unmasked value */
  get typedValue() {
    return this.masked.typedValue;
  }
  set typedValue(val) {
    if (this.masked.typedValueEquals(val)) return;
    this.masked.typedValue = val;
    this.updateControl("auto");
  }
  /** Display value */
  get displayValue() {
    return this.masked.displayValue;
  }
  /** Starts listening to element events */
  _bindEvents() {
    this.el.bindEvents({
      selectionChange: this._saveSelection,
      input: this._onInput,
      drop: this._onDrop,
      click: this._onClick,
      focus: this._onFocus,
      commit: this._onChange,
      undo: this._onUndo,
      redo: this._onRedo
    });
  }
  /** Stops listening to element events */
  _unbindEvents() {
    if (this.el) this.el.unbindEvents();
  }
  /** Fires custom event */
  _fireEvent(ev, e2) {
    const listeners = this._listeners[ev];
    if (!listeners) return;
    listeners.forEach((l) => l(e2));
  }
  /** Current selection start */
  get selectionStart() {
    return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart;
  }
  /** Current cursor position */
  get cursorPos() {
    return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd;
  }
  set cursorPos(pos) {
    if (!this.el || !this.el.isActive) return;
    this.el.select(pos, pos);
    this._saveSelection();
  }
  /** Stores current selection */
  _saveSelection() {
    if (this.displayValue !== this.el.value) {
      console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.");
    }
    this._selection = {
      start: this.selectionStart,
      end: this.cursorPos
    };
  }
  /** Syncronizes model value from view */
  updateValue() {
    this.masked.value = this.el.value;
    this._value = this.masked.value;
    this._unmaskedValue = this.masked.unmaskedValue;
    this._rawInputValue = this.masked.rawInputValue;
  }
  /** Syncronizes view from model value, fires change events */
  updateControl(cursorPos) {
    const newUnmaskedValue = this.masked.unmaskedValue;
    const newValue = this.masked.value;
    const newRawInputValue = this.masked.rawInputValue;
    const newDisplayValue = this.displayValue;
    const isChanged = this.unmaskedValue !== newUnmaskedValue || this.value !== newValue || this._rawInputValue !== newRawInputValue;
    this._unmaskedValue = newUnmaskedValue;
    this._value = newValue;
    this._rawInputValue = newRawInputValue;
    if (this.el.value !== newDisplayValue) this.el.value = newDisplayValue;
    if (cursorPos === "auto") this.alignCursor();
    else if (cursorPos != null) this.cursorPos = cursorPos;
    if (isChanged) this._fireChangeEvents();
    if (!this._historyChanging && (isChanged || this.history.isEmpty)) this.history.push({
      unmaskedValue: newUnmaskedValue,
      selection: {
        start: this.selectionStart,
        end: this.cursorPos
      }
    });
  }
  /** Updates options with deep equal check, recreates {@link Masked} model if mask type changes */
  updateOptions(opts) {
    const {
      mask,
      ...restOpts
    } = opts;
    const updateMask = !this.maskEquals(mask);
    const updateOpts = this.masked.optionsIsChanged(restOpts);
    if (updateMask) this.mask = mask;
    if (updateOpts) this.masked.updateOptions(restOpts);
    if (updateMask || updateOpts) this.updateControl();
  }
  /** Updates cursor */
  updateCursor(cursorPos) {
    if (cursorPos == null) return;
    this.cursorPos = cursorPos;
    this._delayUpdateCursor(cursorPos);
  }
  /** Delays cursor update to support mobile browsers */
  _delayUpdateCursor(cursorPos) {
    this._abortUpdateCursor();
    this._changingCursorPos = cursorPos;
    this._cursorChanging = setTimeout(() => {
      if (!this.el) return;
      this.cursorPos = this._changingCursorPos;
      this._abortUpdateCursor();
    }, 10);
  }
  /** Fires custom events */
  _fireChangeEvents() {
    this._fireEvent("accept", this._inputEvent);
    if (this.masked.isComplete) this._fireEvent("complete", this._inputEvent);
  }
  /** Aborts delayed cursor update */
  _abortUpdateCursor() {
    if (this._cursorChanging) {
      clearTimeout(this._cursorChanging);
      delete this._cursorChanging;
    }
  }
  /** Aligns cursor to nearest available position */
  alignCursor() {
    this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT));
  }
  /** Aligns cursor only if selection is empty */
  alignCursorFriendly() {
    if (this.selectionStart !== this.cursorPos) return;
    this.alignCursor();
  }
  /** Adds listener on custom event */
  on(ev, handler) {
    if (!this._listeners[ev]) this._listeners[ev] = [];
    this._listeners[ev].push(handler);
    return this;
  }
  /** Removes custom event listener */
  off(ev, handler) {
    if (!this._listeners[ev]) return this;
    if (!handler) {
      delete this._listeners[ev];
      return this;
    }
    const hIndex = this._listeners[ev].indexOf(handler);
    if (hIndex >= 0) this._listeners[ev].splice(hIndex, 1);
    return this;
  }
  /** Handles view input event */
  _onInput(e2) {
    this._inputEvent = e2;
    this._abortUpdateCursor();
    const details = new ActionDetails({
      // new state
      value: this.el.value,
      cursorPos: this.cursorPos,
      // old state
      oldValue: this.displayValue,
      oldSelection: this._selection
    });
    const oldRawValue = this.masked.rawInputValue;
    const offset2 = this.masked.splice(details.startChangePos, details.removed.length, details.inserted, details.removeDirection, {
      input: true,
      raw: true
    }).offset;
    const removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE;
    let cursorPos = this.masked.nearestInputPos(details.startChangePos + offset2, removeDirection);
    if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE);
    this.updateControl(cursorPos);
    delete this._inputEvent;
  }
  /** Handles view change event and commits model value */
  _onChange() {
    if (this.displayValue !== this.el.value) this.updateValue();
    this.masked.doCommit();
    this.updateControl();
    this._saveSelection();
  }
  /** Handles view drop event, prevents by default */
  _onDrop(ev) {
    ev.preventDefault();
    ev.stopPropagation();
  }
  /** Restore last selection on focus */
  _onFocus(ev) {
    this.alignCursorFriendly();
  }
  /** Restore last selection on focus */
  _onClick(ev) {
    this.alignCursorFriendly();
  }
  _onUndo() {
    this._applyHistoryState(this.history.undo());
  }
  _onRedo() {
    this._applyHistoryState(this.history.redo());
  }
  _applyHistoryState(state) {
    if (!state) return;
    this._historyChanging = true;
    this.unmaskedValue = state.unmaskedValue;
    this.el.select(state.selection.start, state.selection.end);
    this._saveSelection();
    this._historyChanging = false;
  }
  /** Unbind view events and removes element reference */
  destroy() {
    this._unbindEvents();
    this._listeners.length = 0;
    delete this.el;
  }
}
IMask.InputMask = InputMask;
class ChangeDetails {
  /** Inserted symbols */
  /** Additional offset if any changes occurred before tail */
  /** Raw inserted is used by dynamic mask */
  /** Can skip chars */
  static normalize(prep) {
    return Array.isArray(prep) ? prep : [prep, new ChangeDetails()];
  }
  constructor(details) {
    Object.assign(this, {
      inserted: "",
      rawInserted: "",
      tailShift: 0,
      skip: false
    }, details);
  }
  /** Aggregate changes */
  aggregate(details) {
    this.inserted += details.inserted;
    this.rawInserted += details.rawInserted;
    this.tailShift += details.tailShift;
    this.skip = this.skip || details.skip;
    return this;
  }
  /** Total offset considering all changes */
  get offset() {
    return this.tailShift + this.inserted.length;
  }
  get consumed() {
    return Boolean(this.rawInserted) || this.skip;
  }
  equals(details) {
    return this.inserted === details.inserted && this.tailShift === details.tailShift && this.rawInserted === details.rawInserted && this.skip === details.skip;
  }
}
IMask.ChangeDetails = ChangeDetails;
class ContinuousTailDetails {
  /** Tail value as string */
  /** Tail start position */
  /** Start position */
  constructor(value, from2, stop) {
    if (value === void 0) {
      value = "";
    }
    if (from2 === void 0) {
      from2 = 0;
    }
    this.value = value;
    this.from = from2;
    this.stop = stop;
  }
  toString() {
    return this.value;
  }
  extend(tail) {
    this.value += String(tail);
  }
  appendTo(masked) {
    return masked.append(this.toString(), {
      tail: true
    }).aggregate(masked._appendPlaceholder());
  }
  get state() {
    return {
      value: this.value,
      from: this.from,
      stop: this.stop
    };
  }
  set state(state) {
    Object.assign(this, state);
  }
  unshift(beforePos) {
    if (!this.value.length || beforePos != null && this.from >= beforePos) return "";
    const shiftChar = this.value[0];
    this.value = this.value.slice(1);
    return shiftChar;
  }
  shift() {
    if (!this.value.length) return "";
    const shiftChar = this.value[this.value.length - 1];
    this.value = this.value.slice(0, -1);
    return shiftChar;
  }
}
class Masked {
  /** */
  /** */
  /** Transforms value before mask processing */
  /** Transforms each char before mask processing */
  /** Validates if value is acceptable */
  /** Does additional processing at the end of editing */
  /** Format typed value to string */
  /** Parse string to get typed value */
  /** Enable characters overwriting */
  /** */
  /** */
  /** */
  /** */
  constructor(opts) {
    this._value = "";
    this._update({
      ...Masked.DEFAULTS,
      ...opts
    });
    this._initialized = true;
  }
  /** Sets and applies new options */
  updateOptions(opts) {
    if (!this.optionsIsChanged(opts)) return;
    this.withValueRefresh(this._update.bind(this, opts));
  }
  /** Sets new options */
  _update(opts) {
    Object.assign(this, opts);
  }
  /** Mask state */
  get state() {
    return {
      _value: this.value,
      _rawInputValue: this.rawInputValue
    };
  }
  set state(state) {
    this._value = state._value;
  }
  /** Resets value */
  reset() {
    this._value = "";
  }
  get value() {
    return this._value;
  }
  set value(value) {
    this.resolve(value, {
      input: true
    });
  }
  /** Resolve new value */
  resolve(value, flags) {
    if (flags === void 0) {
      flags = {
        input: true
      };
    }
    this.reset();
    this.append(value, flags, "");
    this.doCommit();
  }
  get unmaskedValue() {
    return this.value;
  }
  set unmaskedValue(value) {
    this.resolve(value, {});
  }
  get typedValue() {
    return this.parse ? this.parse(this.value, this) : this.unmaskedValue;
  }
  set typedValue(value) {
    if (this.format) {
      this.value = this.format(value, this);
    } else {
      this.unmaskedValue = String(value);
    }
  }
  /** Value that includes raw user input */
  get rawInputValue() {
    return this.extractInput(0, this.displayValue.length, {
      raw: true
    });
  }
  set rawInputValue(value) {
    this.resolve(value, {
      raw: true
    });
  }
  get displayValue() {
    return this.value;
  }
  get isComplete() {
    return true;
  }
  get isFilled() {
    return this.isComplete;
  }
  /** Finds nearest input position in direction */
  nearestInputPos(cursorPos, direction2) {
    return cursorPos;
  }
  totalInputPositions(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    return Math.min(this.displayValue.length, toPos - fromPos);
  }
  /** Extracts value in range considering flags */
  extractInput(fromPos, toPos, flags) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    return this.displayValue.slice(fromPos, toPos);
  }
  /** Extracts tail in range */
  extractTail(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    return new ContinuousTailDetails(this.extractInput(fromPos, toPos), fromPos);
  }
  /** Appends tail */
  appendTail(tail) {
    if (isString$1(tail)) tail = new ContinuousTailDetails(String(tail));
    return tail.appendTo(this);
  }
  /** Appends char */
  _appendCharRaw(ch, flags) {
    if (!ch) return new ChangeDetails();
    this._value += ch;
    return new ChangeDetails({
      inserted: ch,
      rawInserted: ch
    });
  }
  /** Appends char */
  _appendChar(ch, flags, checkTail) {
    if (flags === void 0) {
      flags = {};
    }
    const consistentState = this.state;
    let details;
    [ch, details] = this.doPrepareChar(ch, flags);
    if (ch) {
      details = details.aggregate(this._appendCharRaw(ch, flags));
      if (!details.rawInserted && this.autofix === "pad") {
        const noFixState = this.state;
        this.state = consistentState;
        let fixDetails = this.pad(flags);
        const chDetails = this._appendCharRaw(ch, flags);
        fixDetails = fixDetails.aggregate(chDetails);
        if (chDetails.rawInserted || fixDetails.equals(details)) {
          details = fixDetails;
        } else {
          this.state = noFixState;
        }
      }
    }
    if (details.inserted) {
      let consistentTail;
      let appended = this.doValidate(flags) !== false;
      if (appended && checkTail != null) {
        const beforeTailState = this.state;
        if (this.overwrite === true) {
          consistentTail = checkTail.state;
          for (let i = 0; i < details.rawInserted.length; ++i) {
            checkTail.unshift(this.displayValue.length - details.tailShift);
          }
        }
        let tailDetails = this.appendTail(checkTail);
        appended = tailDetails.rawInserted.length === checkTail.toString().length;
        if (!(appended && tailDetails.inserted) && this.overwrite === "shift") {
          this.state = beforeTailState;
          consistentTail = checkTail.state;
          for (let i = 0; i < details.rawInserted.length; ++i) {
            checkTail.shift();
          }
          tailDetails = this.appendTail(checkTail);
          appended = tailDetails.rawInserted.length === checkTail.toString().length;
        }
        if (appended && tailDetails.inserted) this.state = beforeTailState;
      }
      if (!appended) {
        details = new ChangeDetails();
        this.state = consistentState;
        if (checkTail && consistentTail) checkTail.state = consistentTail;
      }
    }
    return details;
  }
  /** Appends optional placeholder at the end */
  _appendPlaceholder() {
    return new ChangeDetails();
  }
  /** Appends optional eager placeholder at the end */
  _appendEager() {
    return new ChangeDetails();
  }
  /** Appends symbols considering flags */
  append(str, flags, tail) {
    if (!isString$1(str)) throw new Error("value should be string");
    const checkTail = isString$1(tail) ? new ContinuousTailDetails(String(tail)) : tail;
    if (flags != null && flags.tail) flags._beforeTailState = this.state;
    let details;
    [str, details] = this.doPrepare(str, flags);
    for (let ci = 0; ci < str.length; ++ci) {
      const d2 = this._appendChar(str[ci], flags, checkTail);
      if (!d2.rawInserted && !this.doSkipInvalid(str[ci], flags, checkTail)) break;
      details.aggregate(d2);
    }
    if ((this.eager === true || this.eager === "append") && flags != null && flags.input && str) {
      details.aggregate(this._appendEager());
    }
    if (checkTail != null) {
      details.tailShift += this.appendTail(checkTail).tailShift;
    }
    return details;
  }
  remove(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    this._value = this.displayValue.slice(0, fromPos) + this.displayValue.slice(toPos);
    return new ChangeDetails();
  }
  /** Calls function and reapplies current value */
  withValueRefresh(fn2) {
    if (this._refreshing || !this._initialized) return fn2();
    this._refreshing = true;
    const rawInput = this.rawInputValue;
    const value = this.value;
    const ret = fn2();
    this.rawInputValue = rawInput;
    if (this.value && this.value !== value && value.indexOf(this.value) === 0) {
      this.append(value.slice(this.displayValue.length), {}, "");
      this.doCommit();
    }
    delete this._refreshing;
    return ret;
  }
  runIsolated(fn2) {
    if (this._isolated || !this._initialized) return fn2(this);
    this._isolated = true;
    const state = this.state;
    const ret = fn2(this);
    this.state = state;
    delete this._isolated;
    return ret;
  }
  doSkipInvalid(ch, flags, checkTail) {
    return Boolean(this.skipInvalid);
  }
  /** Prepares string before mask processing */
  doPrepare(str, flags) {
    if (flags === void 0) {
      flags = {};
    }
    return ChangeDetails.normalize(this.prepare ? this.prepare(str, this, flags) : str);
  }
  /** Prepares each char before mask processing */
  doPrepareChar(str, flags) {
    if (flags === void 0) {
      flags = {};
    }
    return ChangeDetails.normalize(this.prepareChar ? this.prepareChar(str, this, flags) : str);
  }
  /** Validates if value is acceptable */
  doValidate(flags) {
    return (!this.validate || this.validate(this.value, this, flags)) && (!this.parent || this.parent.doValidate(flags));
  }
  /** Does additional processing at the end of editing */
  doCommit() {
    if (this.commit) this.commit(this.value, this);
  }
  splice(start2, deleteCount, inserted, removeDirection, flags) {
    if (inserted === void 0) {
      inserted = "";
    }
    if (removeDirection === void 0) {
      removeDirection = DIRECTION.NONE;
    }
    if (flags === void 0) {
      flags = {
        input: true
      };
    }
    const tailPos = start2 + deleteCount;
    const tail = this.extractTail(tailPos);
    const eagerRemove = this.eager === true || this.eager === "remove";
    let oldRawValue;
    if (eagerRemove) {
      removeDirection = forceDirection(removeDirection);
      oldRawValue = this.extractInput(0, tailPos, {
        raw: true
      });
    }
    let startChangePos = start2;
    const details = new ChangeDetails();
    if (removeDirection !== DIRECTION.NONE) {
      startChangePos = this.nearestInputPos(start2, deleteCount > 1 && start2 !== 0 && !eagerRemove ? DIRECTION.NONE : removeDirection);
      details.tailShift = startChangePos - start2;
    }
    details.aggregate(this.remove(startChangePos));
    if (eagerRemove && removeDirection !== DIRECTION.NONE && oldRawValue === this.rawInputValue) {
      if (removeDirection === DIRECTION.FORCE_LEFT) {
        let valLength;
        while (oldRawValue === this.rawInputValue && (valLength = this.displayValue.length)) {
          details.aggregate(new ChangeDetails({
            tailShift: -1
          })).aggregate(this.remove(valLength - 1));
        }
      } else if (removeDirection === DIRECTION.FORCE_RIGHT) {
        tail.unshift();
      }
    }
    return details.aggregate(this.append(inserted, flags, tail));
  }
  maskEquals(mask) {
    return this.mask === mask;
  }
  optionsIsChanged(opts) {
    return !objectIncludes(this, opts);
  }
  typedValueEquals(value) {
    const tval = this.typedValue;
    return value === tval || Masked.EMPTY_VALUES.includes(value) && Masked.EMPTY_VALUES.includes(tval) || (this.format ? this.format(value, this) === this.format(this.typedValue, this) : false);
  }
  pad(flags) {
    return new ChangeDetails();
  }
}
Masked.DEFAULTS = {
  skipInvalid: true
};
Masked.EMPTY_VALUES = [void 0, null, ""];
IMask.Masked = Masked;
class ChunksTailDetails {
  /** */
  constructor(chunks, from2) {
    if (chunks === void 0) {
      chunks = [];
    }
    if (from2 === void 0) {
      from2 = 0;
    }
    this.chunks = chunks;
    this.from = from2;
  }
  toString() {
    return this.chunks.map(String).join("");
  }
  extend(tailChunk) {
    if (!String(tailChunk)) return;
    tailChunk = isString$1(tailChunk) ? new ContinuousTailDetails(String(tailChunk)) : tailChunk;
    const lastChunk = this.chunks[this.chunks.length - 1];
    const extendLast = lastChunk && // if stops are same or tail has no stop
    (lastChunk.stop === tailChunk.stop || tailChunk.stop == null) && // if tail chunk goes just after last chunk
    tailChunk.from === lastChunk.from + lastChunk.toString().length;
    if (tailChunk instanceof ContinuousTailDetails) {
      if (extendLast) {
        lastChunk.extend(tailChunk.toString());
      } else {
        this.chunks.push(tailChunk);
      }
    } else if (tailChunk instanceof ChunksTailDetails) {
      if (tailChunk.stop == null) {
        let firstTailChunk;
        while (tailChunk.chunks.length && tailChunk.chunks[0].stop == null) {
          firstTailChunk = tailChunk.chunks.shift();
          firstTailChunk.from += tailChunk.from;
          this.extend(firstTailChunk);
        }
      }
      if (tailChunk.toString()) {
        tailChunk.stop = tailChunk.blockIndex;
        this.chunks.push(tailChunk);
      }
    }
  }
  appendTo(masked) {
    if (!(masked instanceof IMask.MaskedPattern)) {
      const tail = new ContinuousTailDetails(this.toString());
      return tail.appendTo(masked);
    }
    const details = new ChangeDetails();
    for (let ci = 0; ci < this.chunks.length; ++ci) {
      const chunk = this.chunks[ci];
      const lastBlockIter = masked._mapPosToBlock(masked.displayValue.length);
      const stop = chunk.stop;
      let chunkBlock;
      if (stop != null && // if block not found or stop is behind lastBlock
      (!lastBlockIter || lastBlockIter.index <= stop)) {
        if (chunk instanceof ChunksTailDetails || // for continuous block also check if stop is exist
        masked._stops.indexOf(stop) >= 0) {
          details.aggregate(masked._appendPlaceholder(stop));
        }
        chunkBlock = chunk instanceof ChunksTailDetails && masked._blocks[stop];
      }
      if (chunkBlock) {
        const tailDetails = chunkBlock.appendTail(chunk);
        details.aggregate(tailDetails);
        const remainChars = chunk.toString().slice(tailDetails.rawInserted.length);
        if (remainChars) details.aggregate(masked.append(remainChars, {
          tail: true
        }));
      } else {
        details.aggregate(masked.append(chunk.toString(), {
          tail: true
        }));
      }
    }
    return details;
  }
  get state() {
    return {
      chunks: this.chunks.map((c) => c.state),
      from: this.from,
      stop: this.stop,
      blockIndex: this.blockIndex
    };
  }
  set state(state) {
    const {
      chunks,
      ...props
    } = state;
    Object.assign(this, props);
    this.chunks = chunks.map((cstate) => {
      const chunk = "chunks" in cstate ? new ChunksTailDetails() : new ContinuousTailDetails();
      chunk.state = cstate;
      return chunk;
    });
  }
  unshift(beforePos) {
    if (!this.chunks.length || beforePos != null && this.from >= beforePos) return "";
    const chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos;
    let ci = 0;
    while (ci < this.chunks.length) {
      const chunk = this.chunks[ci];
      const shiftChar = chunk.unshift(chunkShiftPos);
      if (chunk.toString()) {
        if (!shiftChar) break;
        ++ci;
      } else {
        this.chunks.splice(ci, 1);
      }
      if (shiftChar) return shiftChar;
    }
    return "";
  }
  shift() {
    if (!this.chunks.length) return "";
    let ci = this.chunks.length - 1;
    while (0 <= ci) {
      const chunk = this.chunks[ci];
      const shiftChar = chunk.shift();
      if (chunk.toString()) {
        if (!shiftChar) break;
        --ci;
      } else {
        this.chunks.splice(ci, 1);
      }
      if (shiftChar) return shiftChar;
    }
    return "";
  }
}
class PatternCursor {
  constructor(masked, pos) {
    this.masked = masked;
    this._log = [];
    const {
      offset: offset2,
      index: index2
    } = masked._mapPosToBlock(pos) || (pos < 0 ? (
      // first
      {
        index: 0,
        offset: 0
      }
    ) : (
      // last
      {
        index: this.masked._blocks.length,
        offset: 0
      }
    ));
    this.offset = offset2;
    this.index = index2;
    this.ok = false;
  }
  get block() {
    return this.masked._blocks[this.index];
  }
  get pos() {
    return this.masked._blockStartPos(this.index) + this.offset;
  }
  get state() {
    return {
      index: this.index,
      offset: this.offset,
      ok: this.ok
    };
  }
  set state(s) {
    Object.assign(this, s);
  }
  pushState() {
    this._log.push(this.state);
  }
  popState() {
    const s = this._log.pop();
    if (s) this.state = s;
    return s;
  }
  bindBlock() {
    if (this.block) return;
    if (this.index < 0) {
      this.index = 0;
      this.offset = 0;
    }
    if (this.index >= this.masked._blocks.length) {
      this.index = this.masked._blocks.length - 1;
      this.offset = this.block.displayValue.length;
    }
  }
  _pushLeft(fn2) {
    this.pushState();
    for (this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((_this$block = this.block) == null ? void 0 : _this$block.displayValue.length) || 0) {
      var _this$block;
      if (fn2()) return this.ok = true;
    }
    return this.ok = false;
  }
  _pushRight(fn2) {
    this.pushState();
    for (this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0) {
      if (fn2()) return this.ok = true;
    }
    return this.ok = false;
  }
  pushLeftBeforeFilled() {
    return this._pushLeft(() => {
      if (this.block.isFixed || !this.block.value) return;
      this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_LEFT);
      if (this.offset !== 0) return true;
    });
  }
  pushLeftBeforeInput() {
    return this._pushLeft(() => {
      if (this.block.isFixed) return;
      this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);
      return true;
    });
  }
  pushLeftBeforeRequired() {
    return this._pushLeft(() => {
      if (this.block.isFixed || this.block.isOptional && !this.block.value) return;
      this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);
      return true;
    });
  }
  pushRightBeforeFilled() {
    return this._pushRight(() => {
      if (this.block.isFixed || !this.block.value) return;
      this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_RIGHT);
      if (this.offset !== this.block.value.length) return true;
    });
  }
  pushRightBeforeInput() {
    return this._pushRight(() => {
      if (this.block.isFixed) return;
      this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);
      return true;
    });
  }
  pushRightBeforeRequired() {
    return this._pushRight(() => {
      if (this.block.isFixed || this.block.isOptional && !this.block.value) return;
      this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);
      return true;
    });
  }
}
class PatternFixedDefinition {
  /** */
  /** */
  /** */
  /** */
  /** */
  /** */
  constructor(opts) {
    Object.assign(this, opts);
    this._value = "";
    this.isFixed = true;
  }
  get value() {
    return this._value;
  }
  get unmaskedValue() {
    return this.isUnmasking ? this.value : "";
  }
  get rawInputValue() {
    return this._isRawInput ? this.value : "";
  }
  get displayValue() {
    return this.value;
  }
  reset() {
    this._isRawInput = false;
    this._value = "";
  }
  remove(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this._value.length;
    }
    this._value = this._value.slice(0, fromPos) + this._value.slice(toPos);
    if (!this._value) this._isRawInput = false;
    return new ChangeDetails();
  }
  nearestInputPos(cursorPos, direction2) {
    if (direction2 === void 0) {
      direction2 = DIRECTION.NONE;
    }
    const minPos = 0;
    const maxPos = this._value.length;
    switch (direction2) {
      case DIRECTION.LEFT:
      case DIRECTION.FORCE_LEFT:
        return minPos;
      case DIRECTION.NONE:
      case DIRECTION.RIGHT:
      case DIRECTION.FORCE_RIGHT:
      default:
        return maxPos;
    }
  }
  totalInputPositions(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this._value.length;
    }
    return this._isRawInput ? toPos - fromPos : 0;
  }
  extractInput(fromPos, toPos, flags) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this._value.length;
    }
    if (flags === void 0) {
      flags = {};
    }
    return flags.raw && this._isRawInput && this._value.slice(fromPos, toPos) || "";
  }
  get isComplete() {
    return true;
  }
  get isFilled() {
    return Boolean(this._value);
  }
  _appendChar(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    if (this.isFilled) return new ChangeDetails();
    const appendEager = this.eager === true || this.eager === "append";
    const appended = this.char === ch;
    const isResolved = appended && (this.isUnmasking || flags.input || flags.raw) && (!flags.raw || !appendEager) && !flags.tail;
    const details = new ChangeDetails({
      inserted: this.char,
      rawInserted: isResolved ? this.char : ""
    });
    this._value = this.char;
    this._isRawInput = isResolved && (flags.raw || flags.input);
    return details;
  }
  _appendEager() {
    return this._appendChar(this.char, {
      tail: true
    });
  }
  _appendPlaceholder() {
    const details = new ChangeDetails();
    if (this.isFilled) return details;
    this._value = details.inserted = this.char;
    return details;
  }
  extractTail() {
    return new ContinuousTailDetails("");
  }
  appendTail(tail) {
    if (isString$1(tail)) tail = new ContinuousTailDetails(String(tail));
    return tail.appendTo(this);
  }
  append(str, flags, tail) {
    const details = this._appendChar(str[0], flags);
    if (tail != null) {
      details.tailShift += this.appendTail(tail).tailShift;
    }
    return details;
  }
  doCommit() {
  }
  get state() {
    return {
      _value: this._value,
      _rawInputValue: this.rawInputValue
    };
  }
  set state(state) {
    this._value = state._value;
    this._isRawInput = Boolean(state._rawInputValue);
  }
  pad(flags) {
    return this._appendPlaceholder();
  }
}
class PatternInputDefinition {
  /** */
  /** */
  /** */
  /** */
  /** */
  /** */
  /** */
  /** */
  constructor(opts) {
    const {
      parent,
      isOptional,
      placeholderChar,
      displayChar,
      lazy,
      eager,
      ...maskOpts
    } = opts;
    this.masked = createMask(maskOpts);
    Object.assign(this, {
      parent,
      isOptional,
      placeholderChar,
      displayChar,
      lazy,
      eager
    });
  }
  reset() {
    this.isFilled = false;
    this.masked.reset();
  }
  remove(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.value.length;
    }
    if (fromPos === 0 && toPos >= 1) {
      this.isFilled = false;
      return this.masked.remove(fromPos, toPos);
    }
    return new ChangeDetails();
  }
  get value() {
    return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : "");
  }
  get unmaskedValue() {
    return this.masked.unmaskedValue;
  }
  get rawInputValue() {
    return this.masked.rawInputValue;
  }
  get displayValue() {
    return this.masked.value && this.displayChar || this.value;
  }
  get isComplete() {
    return Boolean(this.masked.value) || this.isOptional;
  }
  _appendChar(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    if (this.isFilled) return new ChangeDetails();
    const state = this.masked.state;
    let details = this.masked._appendChar(ch, this.currentMaskFlags(flags));
    if (details.inserted && this.doValidate(flags) === false) {
      details = new ChangeDetails();
      this.masked.state = state;
    }
    if (!details.inserted && !this.isOptional && !this.lazy && !flags.input) {
      details.inserted = this.placeholderChar;
    }
    details.skip = !details.inserted && !this.isOptional;
    this.isFilled = Boolean(details.inserted);
    return details;
  }
  append(str, flags, tail) {
    return this.masked.append(str, this.currentMaskFlags(flags), tail);
  }
  _appendPlaceholder() {
    if (this.isFilled || this.isOptional) return new ChangeDetails();
    this.isFilled = true;
    return new ChangeDetails({
      inserted: this.placeholderChar
    });
  }
  _appendEager() {
    return new ChangeDetails();
  }
  extractTail(fromPos, toPos) {
    return this.masked.extractTail(fromPos, toPos);
  }
  appendTail(tail) {
    return this.masked.appendTail(tail);
  }
  extractInput(fromPos, toPos, flags) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.value.length;
    }
    return this.masked.extractInput(fromPos, toPos, flags);
  }
  nearestInputPos(cursorPos, direction2) {
    if (direction2 === void 0) {
      direction2 = DIRECTION.NONE;
    }
    const minPos = 0;
    const maxPos = this.value.length;
    const boundPos = Math.min(Math.max(cursorPos, minPos), maxPos);
    switch (direction2) {
      case DIRECTION.LEFT:
      case DIRECTION.FORCE_LEFT:
        return this.isComplete ? boundPos : minPos;
      case DIRECTION.RIGHT:
      case DIRECTION.FORCE_RIGHT:
        return this.isComplete ? boundPos : maxPos;
      case DIRECTION.NONE:
      default:
        return boundPos;
    }
  }
  totalInputPositions(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.value.length;
    }
    return this.value.slice(fromPos, toPos).length;
  }
  doValidate(flags) {
    return this.masked.doValidate(this.currentMaskFlags(flags)) && (!this.parent || this.parent.doValidate(this.currentMaskFlags(flags)));
  }
  doCommit() {
    this.masked.doCommit();
  }
  get state() {
    return {
      _value: this.value,
      _rawInputValue: this.rawInputValue,
      masked: this.masked.state,
      isFilled: this.isFilled
    };
  }
  set state(state) {
    this.masked.state = state.masked;
    this.isFilled = state.isFilled;
  }
  currentMaskFlags(flags) {
    var _flags$_beforeTailSta;
    return {
      ...flags,
      _beforeTailState: (flags == null || (_flags$_beforeTailSta = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta.masked) || (flags == null ? void 0 : flags._beforeTailState)
    };
  }
  pad(flags) {
    return new ChangeDetails();
  }
}
PatternInputDefinition.DEFAULT_DEFINITIONS = {
  "0": /\d/,
  "a": /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,
  // http://stackoverflow.com/a/22075070
  "*": /./
};
class MaskedRegExp extends Masked {
  /** */
  /** Enable characters overwriting */
  /** */
  /** */
  /** */
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    const mask = opts.mask;
    if (mask) opts.validate = (value) => value.search(mask) >= 0;
    super._update(opts);
  }
}
IMask.MaskedRegExp = MaskedRegExp;
class MaskedPattern extends Masked {
  /** */
  /** */
  /** Single char for empty input */
  /** Single char for filled input */
  /** Show placeholder only when needed */
  /** Enable characters overwriting */
  /** */
  /** */
  /** */
  constructor(opts) {
    super({
      ...MaskedPattern.DEFAULTS,
      ...opts,
      definitions: Object.assign({}, PatternInputDefinition.DEFAULT_DEFINITIONS, opts == null ? void 0 : opts.definitions)
    });
  }
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    opts.definitions = Object.assign({}, this.definitions, opts.definitions);
    super._update(opts);
    this._rebuildMask();
  }
  _rebuildMask() {
    const defs = this.definitions;
    this._blocks = [];
    this.exposeBlock = void 0;
    this._stops = [];
    this._maskedBlocks = {};
    const pattern = this.mask;
    if (!pattern || !defs) return;
    let unmaskingBlock = false;
    let optionalBlock = false;
    for (let i = 0; i < pattern.length; ++i) {
      if (this.blocks) {
        const p2 = pattern.slice(i);
        const bNames = Object.keys(this.blocks).filter((bName2) => p2.indexOf(bName2) === 0);
        bNames.sort((a2, b2) => b2.length - a2.length);
        const bName = bNames[0];
        if (bName) {
          const {
            expose,
            repeat,
            ...bOpts
          } = normalizeOpts(this.blocks[bName]);
          const blockOpts = {
            lazy: this.lazy,
            eager: this.eager,
            placeholderChar: this.placeholderChar,
            displayChar: this.displayChar,
            overwrite: this.overwrite,
            autofix: this.autofix,
            ...bOpts,
            repeat,
            parent: this
          };
          const maskedBlock = repeat != null ? new IMask.RepeatBlock(
            blockOpts
            /* TODO */
          ) : createMask(blockOpts);
          if (maskedBlock) {
            this._blocks.push(maskedBlock);
            if (expose) this.exposeBlock = maskedBlock;
            if (!this._maskedBlocks[bName]) this._maskedBlocks[bName] = [];
            this._maskedBlocks[bName].push(this._blocks.length - 1);
          }
          i += bName.length - 1;
          continue;
        }
      }
      let char2 = pattern[i];
      let isInput = char2 in defs;
      if (char2 === MaskedPattern.STOP_CHAR) {
        this._stops.push(this._blocks.length);
        continue;
      }
      if (char2 === "{" || char2 === "}") {
        unmaskingBlock = !unmaskingBlock;
        continue;
      }
      if (char2 === "[" || char2 === "]") {
        optionalBlock = !optionalBlock;
        continue;
      }
      if (char2 === MaskedPattern.ESCAPE_CHAR) {
        ++i;
        char2 = pattern[i];
        if (!char2) break;
        isInput = false;
      }
      const def = isInput ? new PatternInputDefinition({
        isOptional: optionalBlock,
        lazy: this.lazy,
        eager: this.eager,
        placeholderChar: this.placeholderChar,
        displayChar: this.displayChar,
        ...normalizeOpts(defs[char2]),
        parent: this
      }) : new PatternFixedDefinition({
        char: char2,
        eager: this.eager,
        isUnmasking: unmaskingBlock
      });
      this._blocks.push(def);
    }
  }
  get state() {
    return {
      ...super.state,
      _blocks: this._blocks.map((b2) => b2.state)
    };
  }
  set state(state) {
    if (!state) {
      this.reset();
      return;
    }
    const {
      _blocks,
      ...maskedState
    } = state;
    this._blocks.forEach((b2, bi) => b2.state = _blocks[bi]);
    super.state = maskedState;
  }
  reset() {
    super.reset();
    this._blocks.forEach((b2) => b2.reset());
  }
  get isComplete() {
    return this.exposeBlock ? this.exposeBlock.isComplete : this._blocks.every((b2) => b2.isComplete);
  }
  get isFilled() {
    return this._blocks.every((b2) => b2.isFilled);
  }
  get isFixed() {
    return this._blocks.every((b2) => b2.isFixed);
  }
  get isOptional() {
    return this._blocks.every((b2) => b2.isOptional);
  }
  doCommit() {
    this._blocks.forEach((b2) => b2.doCommit());
    super.doCommit();
  }
  get unmaskedValue() {
    return this.exposeBlock ? this.exposeBlock.unmaskedValue : this._blocks.reduce((str, b2) => str += b2.unmaskedValue, "");
  }
  set unmaskedValue(unmaskedValue) {
    if (this.exposeBlock) {
      const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
      this.exposeBlock.unmaskedValue = unmaskedValue;
      this.appendTail(tail);
      this.doCommit();
    } else super.unmaskedValue = unmaskedValue;
  }
  get value() {
    return this.exposeBlock ? this.exposeBlock.value : (
      // TODO return _value when not in change?
      this._blocks.reduce((str, b2) => str += b2.value, "")
    );
  }
  set value(value) {
    if (this.exposeBlock) {
      const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
      this.exposeBlock.value = value;
      this.appendTail(tail);
      this.doCommit();
    } else super.value = value;
  }
  get typedValue() {
    return this.exposeBlock ? this.exposeBlock.typedValue : super.typedValue;
  }
  set typedValue(value) {
    if (this.exposeBlock) {
      const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
      this.exposeBlock.typedValue = value;
      this.appendTail(tail);
      this.doCommit();
    } else super.typedValue = value;
  }
  get displayValue() {
    return this._blocks.reduce((str, b2) => str += b2.displayValue, "");
  }
  appendTail(tail) {
    return super.appendTail(tail).aggregate(this._appendPlaceholder());
  }
  _appendEager() {
    var _this$_mapPosToBlock;
    const details = new ChangeDetails();
    let startBlockIndex = (_this$_mapPosToBlock = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : _this$_mapPosToBlock.index;
    if (startBlockIndex == null) return details;
    if (this._blocks[startBlockIndex].isFilled) ++startBlockIndex;
    for (let bi = startBlockIndex; bi < this._blocks.length; ++bi) {
      const d2 = this._blocks[bi]._appendEager();
      if (!d2.inserted) break;
      details.aggregate(d2);
    }
    return details;
  }
  _appendCharRaw(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    const blockIter = this._mapPosToBlock(this.displayValue.length);
    const details = new ChangeDetails();
    if (!blockIter) return details;
    for (let bi = blockIter.index, block; block = this._blocks[bi]; ++bi) {
      var _flags$_beforeTailSta;
      const blockDetails = block._appendChar(ch, {
        ...flags,
        _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) == null || (_flags$_beforeTailSta = _flags$_beforeTailSta._blocks) == null ? void 0 : _flags$_beforeTailSta[bi]
      });
      details.aggregate(blockDetails);
      if (blockDetails.consumed) break;
    }
    return details;
  }
  extractTail(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    const chunkTail = new ChunksTailDetails();
    if (fromPos === toPos) return chunkTail;
    this._forEachBlocksInRange(fromPos, toPos, (b2, bi, bFromPos, bToPos) => {
      const blockChunk = b2.extractTail(bFromPos, bToPos);
      blockChunk.stop = this._findStopBefore(bi);
      blockChunk.from = this._blockStartPos(bi);
      if (blockChunk instanceof ChunksTailDetails) blockChunk.blockIndex = bi;
      chunkTail.extend(blockChunk);
    });
    return chunkTail;
  }
  extractInput(fromPos, toPos, flags) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    if (flags === void 0) {
      flags = {};
    }
    if (fromPos === toPos) return "";
    let input = "";
    this._forEachBlocksInRange(fromPos, toPos, (b2, _2, fromPos2, toPos2) => {
      input += b2.extractInput(fromPos2, toPos2, flags);
    });
    return input;
  }
  _findStopBefore(blockIndex) {
    let stopBefore;
    for (let si = 0; si < this._stops.length; ++si) {
      const stop = this._stops[si];
      if (stop <= blockIndex) stopBefore = stop;
      else break;
    }
    return stopBefore;
  }
  /** Appends placeholder depending on laziness */
  _appendPlaceholder(toBlockIndex) {
    const details = new ChangeDetails();
    if (this.lazy && toBlockIndex == null) return details;
    const startBlockIter = this._mapPosToBlock(this.displayValue.length);
    if (!startBlockIter) return details;
    const startBlockIndex = startBlockIter.index;
    const endBlockIndex = toBlockIndex != null ? toBlockIndex : this._blocks.length;
    this._blocks.slice(startBlockIndex, endBlockIndex).forEach((b2) => {
      if (!b2.lazy || toBlockIndex != null) {
        var _blocks2;
        details.aggregate(b2._appendPlaceholder((_blocks2 = b2._blocks) == null ? void 0 : _blocks2.length));
      }
    });
    return details;
  }
  /** Finds block in pos */
  _mapPosToBlock(pos) {
    let accVal = "";
    for (let bi = 0; bi < this._blocks.length; ++bi) {
      const block = this._blocks[bi];
      const blockStartPos = accVal.length;
      accVal += block.displayValue;
      if (pos <= accVal.length) {
        return {
          index: bi,
          offset: pos - blockStartPos
        };
      }
    }
  }
  _blockStartPos(blockIndex) {
    return this._blocks.slice(0, blockIndex).reduce((pos, b2) => pos += b2.displayValue.length, 0);
  }
  _forEachBlocksInRange(fromPos, toPos, fn2) {
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    const fromBlockIter = this._mapPosToBlock(fromPos);
    if (fromBlockIter) {
      const toBlockIter = this._mapPosToBlock(toPos);
      const isSameBlock = toBlockIter && fromBlockIter.index === toBlockIter.index;
      const fromBlockStartPos = fromBlockIter.offset;
      const fromBlockEndPos = toBlockIter && isSameBlock ? toBlockIter.offset : this._blocks[fromBlockIter.index].displayValue.length;
      fn2(this._blocks[fromBlockIter.index], fromBlockIter.index, fromBlockStartPos, fromBlockEndPos);
      if (toBlockIter && !isSameBlock) {
        for (let bi = fromBlockIter.index + 1; bi < toBlockIter.index; ++bi) {
          fn2(this._blocks[bi], bi, 0, this._blocks[bi].displayValue.length);
        }
        fn2(this._blocks[toBlockIter.index], toBlockIter.index, 0, toBlockIter.offset);
      }
    }
  }
  remove(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    const removeDetails = super.remove(fromPos, toPos);
    this._forEachBlocksInRange(fromPos, toPos, (b2, _2, bFromPos, bToPos) => {
      removeDetails.aggregate(b2.remove(bFromPos, bToPos));
    });
    return removeDetails;
  }
  nearestInputPos(cursorPos, direction2) {
    if (direction2 === void 0) {
      direction2 = DIRECTION.NONE;
    }
    if (!this._blocks.length) return 0;
    const cursor2 = new PatternCursor(this, cursorPos);
    if (direction2 === DIRECTION.NONE) {
      if (cursor2.pushRightBeforeInput()) return cursor2.pos;
      cursor2.popState();
      if (cursor2.pushLeftBeforeInput()) return cursor2.pos;
      return this.displayValue.length;
    }
    if (direction2 === DIRECTION.LEFT || direction2 === DIRECTION.FORCE_LEFT) {
      if (direction2 === DIRECTION.LEFT) {
        cursor2.pushRightBeforeFilled();
        if (cursor2.ok && cursor2.pos === cursorPos) return cursorPos;
        cursor2.popState();
      }
      cursor2.pushLeftBeforeInput();
      cursor2.pushLeftBeforeRequired();
      cursor2.pushLeftBeforeFilled();
      if (direction2 === DIRECTION.LEFT) {
        cursor2.pushRightBeforeInput();
        cursor2.pushRightBeforeRequired();
        if (cursor2.ok && cursor2.pos <= cursorPos) return cursor2.pos;
        cursor2.popState();
        if (cursor2.ok && cursor2.pos <= cursorPos) return cursor2.pos;
        cursor2.popState();
      }
      if (cursor2.ok) return cursor2.pos;
      if (direction2 === DIRECTION.FORCE_LEFT) return 0;
      cursor2.popState();
      if (cursor2.ok) return cursor2.pos;
      cursor2.popState();
      if (cursor2.ok) return cursor2.pos;
      return 0;
    }
    if (direction2 === DIRECTION.RIGHT || direction2 === DIRECTION.FORCE_RIGHT) {
      cursor2.pushRightBeforeInput();
      cursor2.pushRightBeforeRequired();
      if (cursor2.pushRightBeforeFilled()) return cursor2.pos;
      if (direction2 === DIRECTION.FORCE_RIGHT) return this.displayValue.length;
      cursor2.popState();
      if (cursor2.ok) return cursor2.pos;
      cursor2.popState();
      if (cursor2.ok) return cursor2.pos;
      return this.nearestInputPos(cursorPos, DIRECTION.LEFT);
    }
    return cursorPos;
  }
  totalInputPositions(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    let total = 0;
    this._forEachBlocksInRange(fromPos, toPos, (b2, _2, bFromPos, bToPos) => {
      total += b2.totalInputPositions(bFromPos, bToPos);
    });
    return total;
  }
  /** Get block by name */
  maskedBlock(name) {
    return this.maskedBlocks(name)[0];
  }
  /** Get all blocks by name */
  maskedBlocks(name) {
    const indices = this._maskedBlocks[name];
    if (!indices) return [];
    return indices.map((gi) => this._blocks[gi]);
  }
  pad(flags) {
    const details = new ChangeDetails();
    this._forEachBlocksInRange(0, this.displayValue.length, (b2) => details.aggregate(b2.pad(flags)));
    return details;
  }
}
MaskedPattern.DEFAULTS = {
  ...Masked.DEFAULTS,
  lazy: true,
  placeholderChar: "_"
};
MaskedPattern.STOP_CHAR = "`";
MaskedPattern.ESCAPE_CHAR = "\\";
MaskedPattern.InputDefinition = PatternInputDefinition;
MaskedPattern.FixedDefinition = PatternFixedDefinition;
IMask.MaskedPattern = MaskedPattern;
class MaskedRange extends MaskedPattern {
  /**
    Optionally sets max length of pattern.
    Used when pattern length is longer then `to` param length. Pads zeros at start in this case.
  */
  /** Min bound */
  /** Max bound */
  get _matchFrom() {
    return this.maxLength - String(this.from).length;
  }
  constructor(opts) {
    super(opts);
  }
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    const {
      to = this.to || 0,
      from: from2 = this.from || 0,
      maxLength = this.maxLength || 0,
      autofix = this.autofix,
      ...patternOpts
    } = opts;
    this.to = to;
    this.from = from2;
    this.maxLength = Math.max(String(to).length, maxLength);
    this.autofix = autofix;
    const fromStr = String(this.from).padStart(this.maxLength, "0");
    const toStr = String(this.to).padStart(this.maxLength, "0");
    let sameCharsCount = 0;
    while (sameCharsCount < toStr.length && toStr[sameCharsCount] === fromStr[sameCharsCount]) ++sameCharsCount;
    patternOpts.mask = toStr.slice(0, sameCharsCount).replace(/0/g, "\\0") + "0".repeat(this.maxLength - sameCharsCount);
    super._update(patternOpts);
  }
  get isComplete() {
    return super.isComplete && Boolean(this.value);
  }
  boundaries(str) {
    let minstr = "";
    let maxstr = "";
    const [, placeholder, num] = str.match(/^(\D*)(\d*)(\D*)/) || [];
    if (num) {
      minstr = "0".repeat(placeholder.length) + num;
      maxstr = "9".repeat(placeholder.length) + num;
    }
    minstr = minstr.padEnd(this.maxLength, "0");
    maxstr = maxstr.padEnd(this.maxLength, "9");
    return [minstr, maxstr];
  }
  doPrepareChar(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    let details;
    [ch, details] = super.doPrepareChar(ch.replace(/\D/g, ""), flags);
    if (!ch) details.skip = !this.isComplete;
    return [ch, details];
  }
  _appendCharRaw(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    if (!this.autofix || this.value.length + 1 > this.maxLength) return super._appendCharRaw(ch, flags);
    const fromStr = String(this.from).padStart(this.maxLength, "0");
    const toStr = String(this.to).padStart(this.maxLength, "0");
    const [minstr, maxstr] = this.boundaries(this.value + ch);
    if (Number(maxstr) < this.from) return super._appendCharRaw(fromStr[this.value.length], flags);
    if (Number(minstr) > this.to) {
      if (!flags.tail && this.autofix === "pad" && this.value.length + 1 < this.maxLength) {
        return super._appendCharRaw(fromStr[this.value.length], flags).aggregate(this._appendCharRaw(ch, flags));
      }
      return super._appendCharRaw(toStr[this.value.length], flags);
    }
    return super._appendCharRaw(ch, flags);
  }
  doValidate(flags) {
    const str = this.value;
    const firstNonZero = str.search(/[^0]/);
    if (firstNonZero === -1 && str.length <= this._matchFrom) return true;
    const [minstr, maxstr] = this.boundaries(str);
    return this.from <= Number(maxstr) && Number(minstr) <= this.to && super.doValidate(flags);
  }
  pad(flags) {
    const details = new ChangeDetails();
    if (this.value.length === this.maxLength) return details;
    const value = this.value;
    const padLength = this.maxLength - this.value.length;
    if (padLength) {
      this.reset();
      for (let i = 0; i < padLength; ++i) {
        details.aggregate(super._appendCharRaw("0", flags));
      }
      value.split("").forEach((ch) => this._appendCharRaw(ch));
    }
    return details;
  }
}
IMask.MaskedRange = MaskedRange;
const DefaultPattern = "d{.}`m{.}`Y";
class MaskedDate extends MaskedPattern {
  static extractPatternOptions(opts) {
    const {
      mask,
      pattern,
      ...patternOpts
    } = opts;
    return {
      ...patternOpts,
      mask: isString$1(mask) ? mask : pattern
    };
  }
  /** Pattern mask for date according to {@link MaskedDate#format} */
  /** Start date */
  /** End date */
  /** Format typed value to string */
  /** Parse string to get typed value */
  constructor(opts) {
    super(MaskedDate.extractPatternOptions({
      ...MaskedDate.DEFAULTS,
      ...opts
    }));
  }
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    const {
      mask,
      pattern,
      blocks,
      ...patternOpts
    } = {
      ...MaskedDate.DEFAULTS,
      ...opts
    };
    const patternBlocks = Object.assign({}, MaskedDate.GET_DEFAULT_BLOCKS());
    if (opts.min) patternBlocks.Y.from = opts.min.getFullYear();
    if (opts.max) patternBlocks.Y.to = opts.max.getFullYear();
    if (opts.min && opts.max && patternBlocks.Y.from === patternBlocks.Y.to) {
      patternBlocks.m.from = opts.min.getMonth() + 1;
      patternBlocks.m.to = opts.max.getMonth() + 1;
      if (patternBlocks.m.from === patternBlocks.m.to) {
        patternBlocks.d.from = opts.min.getDate();
        patternBlocks.d.to = opts.max.getDate();
      }
    }
    Object.assign(patternBlocks, this.blocks, blocks);
    super._update({
      ...patternOpts,
      mask: isString$1(mask) ? mask : pattern,
      blocks: patternBlocks
    });
  }
  doValidate(flags) {
    const date = this.date;
    return super.doValidate(flags) && (!this.isComplete || this.isDateExist(this.value) && date != null && (this.min == null || this.min <= date) && (this.max == null || date <= this.max));
  }
  /** Checks if date is exists */
  isDateExist(str) {
    return this.format(this.parse(str, this), this).indexOf(str) >= 0;
  }
  /** Parsed Date */
  get date() {
    return this.typedValue;
  }
  set date(date) {
    this.typedValue = date;
  }
  get typedValue() {
    return this.isComplete ? super.typedValue : null;
  }
  set typedValue(value) {
    super.typedValue = value;
  }
  maskEquals(mask) {
    return mask === Date || super.maskEquals(mask);
  }
  optionsIsChanged(opts) {
    return super.optionsIsChanged(MaskedDate.extractPatternOptions(opts));
  }
}
MaskedDate.GET_DEFAULT_BLOCKS = () => ({
  d: {
    mask: MaskedRange,
    from: 1,
    to: 31,
    maxLength: 2
  },
  m: {
    mask: MaskedRange,
    from: 1,
    to: 12,
    maxLength: 2
  },
  Y: {
    mask: MaskedRange,
    from: 1900,
    to: 9999
  }
});
MaskedDate.DEFAULTS = {
  ...MaskedPattern.DEFAULTS,
  mask: Date,
  pattern: DefaultPattern,
  format: (date, masked) => {
    if (!date) return "";
    const day = String(date.getDate()).padStart(2, "0");
    const month = String(date.getMonth() + 1).padStart(2, "0");
    const year2 = date.getFullYear();
    return [day, month, year2].join(".");
  },
  parse: (str, masked) => {
    const [day, month, year2] = str.split(".").map(Number);
    return new Date(year2, month - 1, day);
  }
};
IMask.MaskedDate = MaskedDate;
class MaskedDynamic extends Masked {
  constructor(opts) {
    super({
      ...MaskedDynamic.DEFAULTS,
      ...opts
    });
    this.currentMask = void 0;
  }
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    super._update(opts);
    if ("mask" in opts) {
      this.exposeMask = void 0;
      this.compiledMasks = Array.isArray(opts.mask) ? opts.mask.map((m2) => {
        const {
          expose,
          ...maskOpts
        } = normalizeOpts(m2);
        const masked = createMask({
          overwrite: this._overwrite,
          eager: this._eager,
          skipInvalid: this._skipInvalid,
          ...maskOpts
        });
        if (expose) this.exposeMask = masked;
        return masked;
      }) : [];
    }
  }
  _appendCharRaw(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    const details = this._applyDispatch(ch, flags);
    if (this.currentMask) {
      details.aggregate(this.currentMask._appendChar(ch, this.currentMaskFlags(flags)));
    }
    return details;
  }
  _applyDispatch(appended, flags, tail) {
    if (appended === void 0) {
      appended = "";
    }
    if (flags === void 0) {
      flags = {};
    }
    if (tail === void 0) {
      tail = "";
    }
    const prevValueBeforeTail = flags.tail && flags._beforeTailState != null ? flags._beforeTailState._value : this.value;
    const inputValue = this.rawInputValue;
    const insertValue = flags.tail && flags._beforeTailState != null ? flags._beforeTailState._rawInputValue : inputValue;
    const tailValue = inputValue.slice(insertValue.length);
    const prevMask = this.currentMask;
    const details = new ChangeDetails();
    const prevMaskState = prevMask == null ? void 0 : prevMask.state;
    this.currentMask = this.doDispatch(appended, {
      ...flags
    }, tail);
    if (this.currentMask) {
      if (this.currentMask !== prevMask) {
        this.currentMask.reset();
        if (insertValue) {
          this.currentMask.append(insertValue, {
            raw: true
          });
          details.tailShift = this.currentMask.value.length - prevValueBeforeTail.length;
        }
        if (tailValue) {
          details.tailShift += this.currentMask.append(tailValue, {
            raw: true,
            tail: true
          }).tailShift;
        }
      } else if (prevMaskState) {
        this.currentMask.state = prevMaskState;
      }
    }
    return details;
  }
  _appendPlaceholder() {
    const details = this._applyDispatch();
    if (this.currentMask) {
      details.aggregate(this.currentMask._appendPlaceholder());
    }
    return details;
  }
  _appendEager() {
    const details = this._applyDispatch();
    if (this.currentMask) {
      details.aggregate(this.currentMask._appendEager());
    }
    return details;
  }
  appendTail(tail) {
    const details = new ChangeDetails();
    if (tail) details.aggregate(this._applyDispatch("", {}, tail));
    return details.aggregate(this.currentMask ? this.currentMask.appendTail(tail) : super.appendTail(tail));
  }
  currentMaskFlags(flags) {
    var _flags$_beforeTailSta, _flags$_beforeTailSta2;
    return {
      ...flags,
      _beforeTailState: ((_flags$_beforeTailSta = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta.currentMaskRef) === this.currentMask && ((_flags$_beforeTailSta2 = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta2.currentMask) || flags._beforeTailState
    };
  }
  doDispatch(appended, flags, tail) {
    if (flags === void 0) {
      flags = {};
    }
    if (tail === void 0) {
      tail = "";
    }
    return this.dispatch(appended, this, flags, tail);
  }
  doValidate(flags) {
    return super.doValidate(flags) && (!this.currentMask || this.currentMask.doValidate(this.currentMaskFlags(flags)));
  }
  doPrepare(str, flags) {
    if (flags === void 0) {
      flags = {};
    }
    let [s, details] = super.doPrepare(str, flags);
    if (this.currentMask) {
      let currentDetails;
      [s, currentDetails] = super.doPrepare(s, this.currentMaskFlags(flags));
      details = details.aggregate(currentDetails);
    }
    return [s, details];
  }
  doPrepareChar(str, flags) {
    if (flags === void 0) {
      flags = {};
    }
    let [s, details] = super.doPrepareChar(str, flags);
    if (this.currentMask) {
      let currentDetails;
      [s, currentDetails] = super.doPrepareChar(s, this.currentMaskFlags(flags));
      details = details.aggregate(currentDetails);
    }
    return [s, details];
  }
  reset() {
    var _this$currentMask;
    (_this$currentMask = this.currentMask) == null || _this$currentMask.reset();
    this.compiledMasks.forEach((m2) => m2.reset());
  }
  get value() {
    return this.exposeMask ? this.exposeMask.value : this.currentMask ? this.currentMask.value : "";
  }
  set value(value) {
    if (this.exposeMask) {
      this.exposeMask.value = value;
      this.currentMask = this.exposeMask;
      this._applyDispatch();
    } else super.value = value;
  }
  get unmaskedValue() {
    return this.exposeMask ? this.exposeMask.unmaskedValue : this.currentMask ? this.currentMask.unmaskedValue : "";
  }
  set unmaskedValue(unmaskedValue) {
    if (this.exposeMask) {
      this.exposeMask.unmaskedValue = unmaskedValue;
      this.currentMask = this.exposeMask;
      this._applyDispatch();
    } else super.unmaskedValue = unmaskedValue;
  }
  get typedValue() {
    return this.exposeMask ? this.exposeMask.typedValue : this.currentMask ? this.currentMask.typedValue : "";
  }
  set typedValue(typedValue) {
    if (this.exposeMask) {
      this.exposeMask.typedValue = typedValue;
      this.currentMask = this.exposeMask;
      this._applyDispatch();
      return;
    }
    let unmaskedValue = String(typedValue);
    if (this.currentMask) {
      this.currentMask.typedValue = typedValue;
      unmaskedValue = this.currentMask.unmaskedValue;
    }
    this.unmaskedValue = unmaskedValue;
  }
  get displayValue() {
    return this.currentMask ? this.currentMask.displayValue : "";
  }
  get isComplete() {
    var _this$currentMask2;
    return Boolean((_this$currentMask2 = this.currentMask) == null ? void 0 : _this$currentMask2.isComplete);
  }
  get isFilled() {
    var _this$currentMask3;
    return Boolean((_this$currentMask3 = this.currentMask) == null ? void 0 : _this$currentMask3.isFilled);
  }
  remove(fromPos, toPos) {
    const details = new ChangeDetails();
    if (this.currentMask) {
      details.aggregate(this.currentMask.remove(fromPos, toPos)).aggregate(this._applyDispatch());
    }
    return details;
  }
  get state() {
    var _this$currentMask4;
    return {
      ...super.state,
      _rawInputValue: this.rawInputValue,
      compiledMasks: this.compiledMasks.map((m2) => m2.state),
      currentMaskRef: this.currentMask,
      currentMask: (_this$currentMask4 = this.currentMask) == null ? void 0 : _this$currentMask4.state
    };
  }
  set state(state) {
    const {
      compiledMasks,
      currentMaskRef,
      currentMask,
      ...maskedState
    } = state;
    if (compiledMasks) this.compiledMasks.forEach((m2, mi) => m2.state = compiledMasks[mi]);
    if (currentMaskRef != null) {
      this.currentMask = currentMaskRef;
      this.currentMask.state = currentMask;
    }
    super.state = maskedState;
  }
  extractInput(fromPos, toPos, flags) {
    return this.currentMask ? this.currentMask.extractInput(fromPos, toPos, flags) : "";
  }
  extractTail(fromPos, toPos) {
    return this.currentMask ? this.currentMask.extractTail(fromPos, toPos) : super.extractTail(fromPos, toPos);
  }
  doCommit() {
    if (this.currentMask) this.currentMask.doCommit();
    super.doCommit();
  }
  nearestInputPos(cursorPos, direction2) {
    return this.currentMask ? this.currentMask.nearestInputPos(cursorPos, direction2) : super.nearestInputPos(cursorPos, direction2);
  }
  get overwrite() {
    return this.currentMask ? this.currentMask.overwrite : this._overwrite;
  }
  set overwrite(overwrite) {
    this._overwrite = overwrite;
  }
  get eager() {
    return this.currentMask ? this.currentMask.eager : this._eager;
  }
  set eager(eager) {
    this._eager = eager;
  }
  get skipInvalid() {
    return this.currentMask ? this.currentMask.skipInvalid : this._skipInvalid;
  }
  set skipInvalid(skipInvalid) {
    this._skipInvalid = skipInvalid;
  }
  get autofix() {
    return this.currentMask ? this.currentMask.autofix : this._autofix;
  }
  set autofix(autofix) {
    this._autofix = autofix;
  }
  maskEquals(mask) {
    return Array.isArray(mask) ? this.compiledMasks.every((m2, mi) => {
      if (!mask[mi]) return;
      const {
        mask: oldMask,
        ...restOpts
      } = mask[mi];
      return objectIncludes(m2, restOpts) && m2.maskEquals(oldMask);
    }) : super.maskEquals(mask);
  }
  typedValueEquals(value) {
    var _this$currentMask5;
    return Boolean((_this$currentMask5 = this.currentMask) == null ? void 0 : _this$currentMask5.typedValueEquals(value));
  }
}
MaskedDynamic.DEFAULTS = {
  ...Masked.DEFAULTS,
  dispatch: (appended, masked, flags, tail) => {
    if (!masked.compiledMasks.length) return;
    const inputValue = masked.rawInputValue;
    const inputs = masked.compiledMasks.map((m2, index2) => {
      const isCurrent = masked.currentMask === m2;
      const startInputPos = isCurrent ? m2.displayValue.length : m2.nearestInputPos(m2.displayValue.length, DIRECTION.FORCE_LEFT);
      if (m2.rawInputValue !== inputValue) {
        m2.reset();
        m2.append(inputValue, {
          raw: true
        });
      } else if (!isCurrent) {
        m2.remove(startInputPos);
      }
      m2.append(appended, masked.currentMaskFlags(flags));
      m2.appendTail(tail);
      return {
        index: index2,
        weight: m2.rawInputValue.length,
        totalInputPositions: m2.totalInputPositions(0, Math.max(startInputPos, m2.nearestInputPos(m2.displayValue.length, DIRECTION.FORCE_LEFT)))
      };
    });
    inputs.sort((i1, i2) => i2.weight - i1.weight || i2.totalInputPositions - i1.totalInputPositions);
    return masked.compiledMasks[inputs[0].index];
  }
};
IMask.MaskedDynamic = MaskedDynamic;
class MaskedEnum extends MaskedPattern {
  constructor(opts) {
    super({
      ...MaskedEnum.DEFAULTS,
      ...opts
    });
  }
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    const {
      enum: enum_,
      ...eopts
    } = opts;
    if (enum_) {
      const lengths = enum_.map((e2) => e2.length);
      const requiredLength = Math.min(...lengths);
      const optionalLength = Math.max(...lengths) - requiredLength;
      eopts.mask = "*".repeat(requiredLength);
      if (optionalLength) eopts.mask += "[" + "*".repeat(optionalLength) + "]";
      this.enum = enum_;
    }
    super._update(eopts);
  }
  _appendCharRaw(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    const matchFrom = Math.min(this.nearestInputPos(0, DIRECTION.FORCE_RIGHT), this.value.length);
    const matches = this.enum.filter((e2) => this.matchValue(e2, this.unmaskedValue + ch, matchFrom));
    if (matches.length) {
      if (matches.length === 1) {
        this._forEachBlocksInRange(0, this.value.length, (b2, bi) => {
          const mch = matches[0][bi];
          if (bi >= this.value.length || mch === b2.value) return;
          b2.reset();
          b2._appendChar(mch, flags);
        });
      }
      const d2 = super._appendCharRaw(matches[0][this.value.length], flags);
      if (matches.length === 1) {
        matches[0].slice(this.unmaskedValue.length).split("").forEach((mch) => d2.aggregate(super._appendCharRaw(mch)));
      }
      return d2;
    }
    return new ChangeDetails({
      skip: !this.isComplete
    });
  }
  extractTail(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    return new ContinuousTailDetails("", fromPos);
  }
  remove(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    if (fromPos === toPos) return new ChangeDetails();
    const matchFrom = Math.min(super.nearestInputPos(0, DIRECTION.FORCE_RIGHT), this.value.length);
    let pos;
    for (pos = fromPos; pos >= 0; --pos) {
      const matches = this.enum.filter((e2) => this.matchValue(e2, this.value.slice(matchFrom, pos), matchFrom));
      if (matches.length > 1) break;
    }
    const details = super.remove(pos, toPos);
    details.tailShift += pos - fromPos;
    return details;
  }
  get isComplete() {
    return this.enum.indexOf(this.value) >= 0;
  }
}
MaskedEnum.DEFAULTS = {
  ...MaskedPattern.DEFAULTS,
  matchValue: (estr, istr, matchFrom) => estr.indexOf(istr, matchFrom) === matchFrom
};
IMask.MaskedEnum = MaskedEnum;
class MaskedFunction extends Masked {
  /** */
  /** Enable characters overwriting */
  /** */
  /** */
  /** */
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    super._update({
      ...opts,
      validate: opts.mask
    });
  }
}
IMask.MaskedFunction = MaskedFunction;
var _MaskedNumber;
class MaskedNumber extends Masked {
  /** Single char */
  /** Single char */
  /** Array of single chars */
  /** */
  /** */
  /** Digits after point */
  /** Flag to remove leading and trailing zeros in the end of editing */
  /** Flag to pad trailing zeros after point in the end of editing */
  /** Enable characters overwriting */
  /** */
  /** */
  /** */
  /** Format typed value to string */
  /** Parse string to get typed value */
  constructor(opts) {
    super({
      ...MaskedNumber.DEFAULTS,
      ...opts
    });
  }
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    super._update(opts);
    this._updateRegExps();
  }
  _updateRegExps() {
    const start2 = "^" + (this.allowNegative ? "[+|\\-]?" : "");
    const mid = "\\d*";
    const end2 = (this.scale ? "(" + escapeRegExp(this.radix) + "\\d{0," + this.scale + "})?" : "") + "$";
    this._numberRegExp = new RegExp(start2 + mid + end2);
    this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map(escapeRegExp).join("") + "]", "g");
    this._thousandsSeparatorRegExp = new RegExp(escapeRegExp(this.thousandsSeparator), "g");
  }
  _removeThousandsSeparators(value) {
    return value.replace(this._thousandsSeparatorRegExp, "");
  }
  _insertThousandsSeparators(value) {
    const parts = value.split(this.radix);
    parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandsSeparator);
    return parts.join(this.radix);
  }
  doPrepareChar(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    const [prepCh, details] = super.doPrepareChar(this._removeThousandsSeparators(this.scale && this.mapToRadix.length && /*
      radix should be mapped when
      1) input is done from keyboard = flags.input && flags.raw
      2) unmasked value is set = !flags.input && !flags.raw
      and should not be mapped when
      1) value is set = flags.input && !flags.raw
      2) raw value is set = !flags.input && flags.raw
    */
    (flags.input && flags.raw || !flags.input && !flags.raw) ? ch.replace(this._mapToRadixRegExp, this.radix) : ch), flags);
    if (ch && !prepCh) details.skip = true;
    if (prepCh && !this.allowPositive && !this.value && prepCh !== "-") details.aggregate(this._appendChar("-"));
    return [prepCh, details];
  }
  _separatorsCount(to, extendOnSeparators) {
    if (extendOnSeparators === void 0) {
      extendOnSeparators = false;
    }
    let count = 0;
    for (let pos = 0; pos < to; ++pos) {
      if (this._value.indexOf(this.thousandsSeparator, pos) === pos) {
        ++count;
        if (extendOnSeparators) to += this.thousandsSeparator.length;
      }
    }
    return count;
  }
  _separatorsCountFromSlice(slice2) {
    if (slice2 === void 0) {
      slice2 = this._value;
    }
    return this._separatorsCount(this._removeThousandsSeparators(slice2).length, true);
  }
  extractInput(fromPos, toPos, flags) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos);
    return this._removeThousandsSeparators(super.extractInput(fromPos, toPos, flags));
  }
  _appendCharRaw(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    const prevBeforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value;
    const prevBeforeTailSeparatorsCount = this._separatorsCountFromSlice(prevBeforeTailValue);
    this._value = this._removeThousandsSeparators(this.value);
    const oldValue = this._value;
    this._value += ch;
    const num = this.number;
    let accepted = !isNaN(num);
    let skip = false;
    if (accepted) {
      let fixedNum;
      if (this.min != null && this.min < 0 && this.number < this.min) fixedNum = this.min;
      if (this.max != null && this.max > 0 && this.number > this.max) fixedNum = this.max;
      if (fixedNum != null) {
        if (this.autofix) {
          this._value = this.format(fixedNum, this).replace(MaskedNumber.UNMASKED_RADIX, this.radix);
          skip || (skip = oldValue === this._value && !flags.tail);
        } else {
          accepted = false;
        }
      }
      accepted && (accepted = Boolean(this._value.match(this._numberRegExp)));
    }
    let appendDetails;
    if (!accepted) {
      this._value = oldValue;
      appendDetails = new ChangeDetails();
    } else {
      appendDetails = new ChangeDetails({
        inserted: this._value.slice(oldValue.length),
        rawInserted: skip ? "" : ch,
        skip
      });
    }
    this._value = this._insertThousandsSeparators(this._value);
    const beforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value;
    const beforeTailSeparatorsCount = this._separatorsCountFromSlice(beforeTailValue);
    appendDetails.tailShift += (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length;
    return appendDetails;
  }
  _findSeparatorAround(pos) {
    if (this.thousandsSeparator) {
      const searchFrom = pos - this.thousandsSeparator.length + 1;
      const separatorPos = this.value.indexOf(this.thousandsSeparator, searchFrom);
      if (separatorPos <= pos) return separatorPos;
    }
    return -1;
  }
  _adjustRangeWithSeparators(from2, to) {
    const separatorAroundFromPos = this._findSeparatorAround(from2);
    if (separatorAroundFromPos >= 0) from2 = separatorAroundFromPos;
    const separatorAroundToPos = this._findSeparatorAround(to);
    if (separatorAroundToPos >= 0) to = separatorAroundToPos + this.thousandsSeparator.length;
    return [from2, to];
  }
  remove(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos);
    const valueBeforePos = this.value.slice(0, fromPos);
    const valueAfterPos = this.value.slice(toPos);
    const prevBeforeTailSeparatorsCount = this._separatorsCount(valueBeforePos.length);
    this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(valueBeforePos + valueAfterPos));
    const beforeTailSeparatorsCount = this._separatorsCountFromSlice(valueBeforePos);
    return new ChangeDetails({
      tailShift: (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length
    });
  }
  nearestInputPos(cursorPos, direction2) {
    if (!this.thousandsSeparator) return cursorPos;
    switch (direction2) {
      case DIRECTION.NONE:
      case DIRECTION.LEFT:
      case DIRECTION.FORCE_LEFT: {
        const separatorAtLeftPos = this._findSeparatorAround(cursorPos - 1);
        if (separatorAtLeftPos >= 0) {
          const separatorAtLeftEndPos = separatorAtLeftPos + this.thousandsSeparator.length;
          if (cursorPos < separatorAtLeftEndPos || this.value.length <= separatorAtLeftEndPos || direction2 === DIRECTION.FORCE_LEFT) {
            return separatorAtLeftPos;
          }
        }
        break;
      }
      case DIRECTION.RIGHT:
      case DIRECTION.FORCE_RIGHT: {
        const separatorAtRightPos = this._findSeparatorAround(cursorPos);
        if (separatorAtRightPos >= 0) {
          return separatorAtRightPos + this.thousandsSeparator.length;
        }
      }
    }
    return cursorPos;
  }
  doCommit() {
    if (this.value) {
      const number = this.number;
      let validnum = number;
      if (this.min != null) validnum = Math.max(validnum, this.min);
      if (this.max != null) validnum = Math.min(validnum, this.max);
      if (validnum !== number) this.unmaskedValue = this.format(validnum, this);
      let formatted = this.value;
      if (this.normalizeZeros) formatted = this._normalizeZeros(formatted);
      if (this.padFractionalZeros && this.scale > 0) formatted = this._padFractionalZeros(formatted);
      this._value = formatted;
    }
    super.doCommit();
  }
  _normalizeZeros(value) {
    const parts = this._removeThousandsSeparators(value).split(this.radix);
    parts[0] = parts[0].replace(/^(\D*)(0*)(\d*)/, (match2, sign2, zeros, num) => sign2 + num);
    if (value.length && !/\d$/.test(parts[0])) parts[0] = parts[0] + "0";
    if (parts.length > 1) {
      parts[1] = parts[1].replace(/0*$/, "");
      if (!parts[1].length) parts.length = 1;
    }
    return this._insertThousandsSeparators(parts.join(this.radix));
  }
  _padFractionalZeros(value) {
    if (!value) return value;
    const parts = value.split(this.radix);
    if (parts.length < 2) parts.push("");
    parts[1] = parts[1].padEnd(this.scale, "0");
    return parts.join(this.radix);
  }
  doSkipInvalid(ch, flags, checkTail) {
    if (flags === void 0) {
      flags = {};
    }
    const dropFractional = this.scale === 0 && ch !== this.thousandsSeparator && (ch === this.radix || ch === MaskedNumber.UNMASKED_RADIX || this.mapToRadix.includes(ch));
    return super.doSkipInvalid(ch, flags, checkTail) && !dropFractional;
  }
  get unmaskedValue() {
    return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, MaskedNumber.UNMASKED_RADIX);
  }
  set unmaskedValue(unmaskedValue) {
    super.unmaskedValue = unmaskedValue;
  }
  get typedValue() {
    return this.parse(this.unmaskedValue, this);
  }
  set typedValue(n) {
    this.rawInputValue = this.format(n, this).replace(MaskedNumber.UNMASKED_RADIX, this.radix);
  }
  /** Parsed Number */
  get number() {
    return this.typedValue;
  }
  set number(number) {
    this.typedValue = number;
  }
  get allowNegative() {
    return this.min != null && this.min < 0 || this.max != null && this.max < 0;
  }
  get allowPositive() {
    return this.min != null && this.min > 0 || this.max != null && this.max > 0;
  }
  typedValueEquals(value) {
    return (super.typedValueEquals(value) || MaskedNumber.EMPTY_VALUES.includes(value) && MaskedNumber.EMPTY_VALUES.includes(this.typedValue)) && !(value === 0 && this.value === "");
  }
}
_MaskedNumber = MaskedNumber;
MaskedNumber.UNMASKED_RADIX = ".";
MaskedNumber.EMPTY_VALUES = [...Masked.EMPTY_VALUES, 0];
MaskedNumber.DEFAULTS = {
  ...Masked.DEFAULTS,
  mask: Number,
  radix: ",",
  thousandsSeparator: "",
  mapToRadix: [_MaskedNumber.UNMASKED_RADIX],
  min: Number.MIN_SAFE_INTEGER,
  max: Number.MAX_SAFE_INTEGER,
  scale: 2,
  normalizeZeros: true,
  padFractionalZeros: false,
  parse: Number,
  format: (n) => n.toLocaleString("en-US", {
    useGrouping: false,
    maximumFractionDigits: 20
  })
};
IMask.MaskedNumber = MaskedNumber;
const PIPE_TYPE = {
  MASKED: "value",
  UNMASKED: "unmaskedValue",
  TYPED: "typedValue"
};
function createPipe(arg, from2, to) {
  if (from2 === void 0) {
    from2 = PIPE_TYPE.MASKED;
  }
  if (to === void 0) {
    to = PIPE_TYPE.MASKED;
  }
  const masked = createMask(arg);
  return (value) => masked.runIsolated((m2) => {
    m2[from2] = value;
    return m2[to];
  });
}
function pipe(value, mask, from2, to) {
  return createPipe(mask, from2, to)(value);
}
IMask.PIPE_TYPE = PIPE_TYPE;
IMask.createPipe = createPipe;
IMask.pipe = pipe;
class RepeatBlock extends MaskedPattern {
  get repeatFrom() {
    var _ref;
    return (_ref = Array.isArray(this.repeat) ? this.repeat[0] : this.repeat === Infinity ? 0 : this.repeat) != null ? _ref : 0;
  }
  get repeatTo() {
    var _ref2;
    return (_ref2 = Array.isArray(this.repeat) ? this.repeat[1] : this.repeat) != null ? _ref2 : Infinity;
  }
  constructor(opts) {
    super(opts);
  }
  updateOptions(opts) {
    super.updateOptions(opts);
  }
  _update(opts) {
    var _ref3, _ref4, _this$_blocks;
    const {
      repeat,
      ...blockOpts
    } = normalizeOpts(opts);
    this._blockOpts = Object.assign({}, this._blockOpts, blockOpts);
    const block = createMask(this._blockOpts);
    this.repeat = (_ref3 = (_ref4 = repeat != null ? repeat : block.repeat) != null ? _ref4 : this.repeat) != null ? _ref3 : Infinity;
    super._update({
      mask: "m".repeat(Math.max(this.repeatTo === Infinity && ((_this$_blocks = this._blocks) == null ? void 0 : _this$_blocks.length) || 0, this.repeatFrom)),
      blocks: {
        m: block
      },
      eager: block.eager,
      overwrite: block.overwrite,
      skipInvalid: block.skipInvalid,
      lazy: block.lazy,
      placeholderChar: block.placeholderChar,
      displayChar: block.displayChar
    });
  }
  _allocateBlock(bi) {
    if (bi < this._blocks.length) return this._blocks[bi];
    if (this.repeatTo === Infinity || this._blocks.length < this.repeatTo) {
      this._blocks.push(createMask(this._blockOpts));
      this.mask += "m";
      return this._blocks[this._blocks.length - 1];
    }
  }
  _appendCharRaw(ch, flags) {
    if (flags === void 0) {
      flags = {};
    }
    const details = new ChangeDetails();
    for (
      let bi = (_this$_mapPosToBlock$ = (_this$_mapPosToBlock = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : _this$_mapPosToBlock.index) != null ? _this$_mapPosToBlock$ : Math.max(this._blocks.length - 1, 0), block, allocated;
      // try to get a block or
      // try to allocate a new block if not allocated already
      block = (_this$_blocks$bi = this._blocks[bi]) != null ? _this$_blocks$bi : allocated = !allocated && this._allocateBlock(bi);
      ++bi
    ) {
      var _this$_mapPosToBlock$, _this$_mapPosToBlock, _this$_blocks$bi, _flags$_beforeTailSta;
      const blockDetails = block._appendChar(ch, {
        ...flags,
        _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) == null || (_flags$_beforeTailSta = _flags$_beforeTailSta._blocks) == null ? void 0 : _flags$_beforeTailSta[bi]
      });
      if (blockDetails.skip && allocated) {
        this._blocks.pop();
        this.mask = this.mask.slice(1);
        break;
      }
      details.aggregate(blockDetails);
      if (blockDetails.consumed) break;
    }
    return details;
  }
  _trimEmptyTail(fromPos, toPos) {
    var _this$_mapPosToBlock2, _this$_mapPosToBlock3;
    if (fromPos === void 0) {
      fromPos = 0;
    }
    const firstBlockIndex = Math.max(((_this$_mapPosToBlock2 = this._mapPosToBlock(fromPos)) == null ? void 0 : _this$_mapPosToBlock2.index) || 0, this.repeatFrom, 0);
    let lastBlockIndex;
    if (toPos != null) lastBlockIndex = (_this$_mapPosToBlock3 = this._mapPosToBlock(toPos)) == null ? void 0 : _this$_mapPosToBlock3.index;
    if (lastBlockIndex == null) lastBlockIndex = this._blocks.length - 1;
    let removeCount = 0;
    for (let blockIndex = lastBlockIndex; firstBlockIndex <= blockIndex; --blockIndex, ++removeCount) {
      if (this._blocks[blockIndex].unmaskedValue) break;
    }
    if (removeCount) {
      this._blocks.splice(lastBlockIndex - removeCount + 1, removeCount);
      this.mask = this.mask.slice(removeCount);
    }
  }
  reset() {
    super.reset();
    this._trimEmptyTail();
  }
  remove(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos === void 0) {
      toPos = this.displayValue.length;
    }
    const removeDetails = super.remove(fromPos, toPos);
    this._trimEmptyTail(fromPos, toPos);
    return removeDetails;
  }
  totalInputPositions(fromPos, toPos) {
    if (fromPos === void 0) {
      fromPos = 0;
    }
    if (toPos == null && this.repeatTo === Infinity) return Infinity;
    return super.totalInputPositions(fromPos, toPos);
  }
  get state() {
    return super.state;
  }
  set state(state) {
    this._blocks.length = state._blocks.length;
    this.mask = this.mask.slice(0, this._blocks.length);
    super.state = state;
  }
}
IMask.RepeatBlock = RepeatBlock;
try {
  globalThis.IMask = IMask;
} catch {
}
const MASK_PROPS = {
  // common
  mask: PropTypes.oneOfType([PropTypes.array, PropTypes.func, PropTypes.string, PropTypes.instanceOf(RegExp), PropTypes.oneOf([Date, Number, IMask.Masked]), PropTypes.instanceOf(IMask.Masked)]),
  value: PropTypes.any,
  unmask: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(["typed"])]),
  prepare: PropTypes.func,
  prepareChar: PropTypes.func,
  validate: PropTypes.func,
  commit: PropTypes.func,
  overwrite: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(["shift"])]),
  eager: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(["append", "remove"])]),
  skipInvalid: PropTypes.bool,
  // events
  onAccept: PropTypes.func,
  onComplete: PropTypes.func,
  // pattern
  placeholderChar: PropTypes.string,
  displayChar: PropTypes.string,
  lazy: PropTypes.bool,
  definitions: PropTypes.object,
  blocks: PropTypes.object,
  // enum
  enum: PropTypes.arrayOf(PropTypes.string),
  // range
  maxLength: PropTypes.number,
  from: PropTypes.number,
  to: PropTypes.number,
  // date
  pattern: PropTypes.string,
  format: PropTypes.func,
  parse: PropTypes.func,
  autofix: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(["pad"])]),
  // number
  radix: PropTypes.string,
  thousandsSeparator: PropTypes.string,
  mapToRadix: PropTypes.arrayOf(PropTypes.string),
  scale: PropTypes.number,
  normalizeZeros: PropTypes.bool,
  padFractionalZeros: PropTypes.bool,
  min: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),
  max: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),
  // dynamic
  dispatch: PropTypes.func,
  // ref
  inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
    current: PropTypes.object
  })])
};
const MASK_PROPS_NAMES = Object.keys(MASK_PROPS).filter((p2) => p2 !== "value");
const NON_MASK_OPTIONS_NAMES = ["value", "unmask", "onAccept", "onComplete", "inputRef"];
const MASK_OPTIONS_NAMES = MASK_PROPS_NAMES.filter((pName) => NON_MASK_OPTIONS_NAMES.indexOf(pName) < 0);
function IMaskMixin(ComposedComponent) {
  var _Class;
  const MaskedComponent = (_Class = class MaskedComponent extends React.Component {
    constructor(props) {
      super(props);
      this._inputRef = this._inputRef.bind(this);
    }
    componentDidMount() {
      if (!this.props.mask) return;
      this.initMask();
    }
    componentDidUpdate() {
      const props = this.props;
      const maskOptions = this._extractMaskOptionsFromProps(props);
      if (maskOptions.mask) {
        if (this.maskRef) {
          this.maskRef.updateOptions(maskOptions);
          if ("value" in props && props.value !== void 0) this.maskValue = props.value;
        } else {
          this.initMask(maskOptions);
        }
      } else {
        this.destroyMask();
        if ("value" in props && props.value !== void 0) {
          var _this$element;
          if ((_this$element = this.element) != null && _this$element.isContentEditable && this.element.tagName !== "INPUT" && this.element.tagName !== "TEXTAREA") this.element.textContent = props.value;
          else this.element.value = props.value;
        }
      }
    }
    componentWillUnmount() {
      this.destroyMask();
    }
    _inputRef(el) {
      this.element = el;
      if (this.props.inputRef) {
        if (Object.prototype.hasOwnProperty.call(this.props.inputRef, "current")) this.props.inputRef.current = el;
        else this.props.inputRef(el);
      }
    }
    initMask(maskOptions) {
      if (maskOptions === void 0) {
        maskOptions = this._extractMaskOptionsFromProps(this.props);
      }
      this.maskRef = IMask(this.element, maskOptions).on("accept", this._onAccept.bind(this)).on("complete", this._onComplete.bind(this));
      if ("value" in this.props && this.props.value !== void 0) this.maskValue = this.props.value;
    }
    destroyMask() {
      if (this.maskRef) {
        this.maskRef.destroy();
        delete this.maskRef;
      }
    }
    _extractMaskOptionsFromProps(props) {
      const {
        ...cloneProps
      } = props;
      Object.keys(cloneProps).filter((prop) => MASK_OPTIONS_NAMES.indexOf(prop) < 0).forEach((nonMaskProp) => {
        delete cloneProps[nonMaskProp];
      });
      return cloneProps;
    }
    _extractNonMaskProps(props) {
      const {
        ...cloneProps
      } = props;
      MASK_PROPS_NAMES.forEach((maskProp) => {
        if (maskProp !== "maxLength") delete cloneProps[maskProp];
      });
      if (!("defaultValue" in cloneProps)) cloneProps.defaultValue = props.mask ? "" : cloneProps.value;
      delete cloneProps.value;
      return cloneProps;
    }
    get maskValue() {
      if (!this.maskRef) return "";
      if (this.props.unmask === "typed") return this.maskRef.typedValue;
      if (this.props.unmask) return this.maskRef.unmaskedValue;
      return this.maskRef.value;
    }
    set maskValue(value) {
      if (!this.maskRef) return;
      value = value == null && this.props.unmask !== "typed" ? "" : value;
      if (this.props.unmask === "typed") this.maskRef.typedValue = value;
      else if (this.props.unmask) this.maskRef.unmaskedValue = value;
      else this.maskRef.value = value;
    }
    _onAccept(e2) {
      if (this.props.onAccept && this.maskRef) this.props.onAccept(this.maskValue, this.maskRef, e2);
    }
    _onComplete(e2) {
      if (this.props.onComplete && this.maskRef) this.props.onComplete(this.maskValue, this.maskRef, e2);
    }
    render() {
      return React.createElement(ComposedComponent, {
        ...this._extractNonMaskProps(this.props),
        inputRef: this._inputRef
      });
    }
  }, _Class.displayName = void 0, _Class.propTypes = void 0, _Class);
  const nestedComponentName = ComposedComponent.displayName || ComposedComponent.name || "Component";
  MaskedComponent.displayName = "IMask(" + nestedComponentName + ")";
  MaskedComponent.propTypes = MASK_PROPS;
  return React.forwardRef((props, ref2) => React.createElement(MaskedComponent, {
    ...props,
    ref: ref2
  }));
}
const IMaskInputClass = IMaskMixin((_ref) => {
  let {
    inputRef,
    ...props
  } = _ref;
  return React.createElement("input", {
    ...props,
    ref: inputRef
  });
});
const IMaskInputFn = (props, ref2) => React.createElement(IMaskInputClass, {
  ...props,
  ref: ref2
});
const IMaskInput = React.forwardRef(IMaskInputFn);
const _excluded$b = ["localeText"];
const MuiPickersAdapterContext = /* @__PURE__ */ reactExports.createContext(null);
const LocalizationProvider = function LocalizationProvider2(inProps) {
  var _React$useContext;
  const {
    localeText: inLocaleText
  } = inProps, otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded$b);
  const {
    utils: parentUtils,
    localeText: parentLocaleText
  } = (_React$useContext = reactExports.useContext(MuiPickersAdapterContext)) != null ? _React$useContext : {
    utils: void 0,
    localeText: void 0
  };
  const props = useThemeProps({
    // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,
    // We will then merge this theme value with our value manually
    props: otherInProps,
    name: "MuiLocalizationProvider"
  });
  const {
    children,
    dateAdapter: DateAdapter,
    dateFormats,
    dateLibInstance,
    adapterLocale,
    localeText: themeLocaleText
  } = props;
  const localeText = reactExports.useMemo(() => _extends$1({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);
  const utils2 = reactExports.useMemo(() => {
    if (!DateAdapter) {
      if (parentUtils) {
        return parentUtils;
      }
      return null;
    }
    const adapter = new DateAdapter({
      locale: adapterLocale,
      formats: dateFormats,
      instance: dateLibInstance
    });
    if (!adapter.isMUIAdapter) {
      throw new Error(["MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`", "For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`", "More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation"].join(`
`));
    }
    return adapter;
  }, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentUtils]);
  const defaultDates = reactExports.useMemo(() => {
    if (!utils2) {
      return null;
    }
    return {
      minDate: utils2.date("1900-01-01T00:00:00.000"),
      maxDate: utils2.date("2099-12-31T00:00:00.000")
    };
  }, [utils2]);
  const contextValue = reactExports.useMemo(() => {
    return {
      utils: utils2,
      defaultDates,
      localeText
    };
  }, [defaultDates, utils2, localeText]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MuiPickersAdapterContext.Provider, {
    value: contextValue,
    children
  });
};
const getPickersLocalization = (pickersTranslations) => {
  return {
    components: {
      MuiLocalizationProvider: {
        defaultProps: {
          localeText: _extends$1({}, pickersTranslations)
        }
      }
    }
  };
};
const enUSPickers = {
  // Calendar navigation
  previousMonth: "Previous month",
  nextMonth: "Next month",
  // View navigation
  openPreviousView: "open previous view",
  openNextView: "open next view",
  calendarViewSwitchingButtonAriaLabel: (view) => view === "year" ? "year view is open, switch to calendar view" : "calendar view is open, switch to year view",
  // DateRange placeholders
  start: "Start",
  end: "End",
  // Action bar
  cancelButtonLabel: "Cancel",
  clearButtonLabel: "Clear",
  okButtonLabel: "OK",
  todayButtonLabel: "Today",
  // Toolbar titles
  datePickerToolbarTitle: "Select date",
  dateTimePickerToolbarTitle: "Select date & time",
  timePickerToolbarTitle: "Select time",
  dateRangePickerToolbarTitle: "Select date range",
  // Clock labels
  clockLabelText: (view, time2, adapter) => `Select ${view}. ${time2 === null ? "No time selected" : `Selected time is ${adapter.format(time2, "fullTime")}`}`,
  hoursClockNumberText: (hours) => `${hours} hours`,
  minutesClockNumberText: (minutes) => `${minutes} minutes`,
  secondsClockNumberText: (seconds) => `${seconds} seconds`,
  // Digital clock labels
  selectViewText: (view) => `Select ${view}`,
  // Calendar labels
  calendarWeekNumberHeaderLabel: "Week number",
  calendarWeekNumberHeaderText: "#",
  calendarWeekNumberAriaLabelText: (weekNumber) => `Week ${weekNumber}`,
  calendarWeekNumberText: (weekNumber) => `${weekNumber}`,
  // Open picker labels
  openDatePickerDialogue: (value, utils2) => value !== null && utils2.isValid(value) ? `Choose date, selected date is ${utils2.format(value, "fullDate")}` : "Choose date",
  openTimePickerDialogue: (value, utils2) => value !== null && utils2.isValid(value) ? `Choose time, selected time is ${utils2.format(value, "fullTime")}` : "Choose time",
  fieldClearLabel: "Clear value",
  // Table labels
  timeTableLabel: "pick time",
  dateTableLabel: "pick date",
  // Field section placeholders
  fieldYearPlaceholder: (params2) => "Y".repeat(params2.digitAmount),
  fieldMonthPlaceholder: (params2) => params2.contentType === "letter" ? "MMMM" : "MM",
  fieldDayPlaceholder: () => "DD",
  fieldWeekDayPlaceholder: (params2) => params2.contentType === "letter" ? "EEEE" : "EE",
  fieldHoursPlaceholder: () => "hh",
  fieldMinutesPlaceholder: () => "mm",
  fieldSecondsPlaceholder: () => "ss",
  fieldMeridiemPlaceholder: () => "aa"
};
const DEFAULT_LOCALE = enUSPickers;
getPickersLocalization(enUSPickers);
const useLocalizationContext = () => {
  const localization2 = reactExports.useContext(MuiPickersAdapterContext);
  if (localization2 === null) {
    throw new Error(["MUI: Can not find the date and time pickers localization context.", "It looks like you forgot to wrap your component in LocalizationProvider.", "This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package"].join("\n"));
  }
  if (localization2.utils === null) {
    throw new Error(["MUI: Can not find the date and time pickers adapter from its localization context.", "It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider."].join("\n"));
  }
  const localeText = reactExports.useMemo(() => _extends$1({}, DEFAULT_LOCALE, localization2.localeText), [localization2.localeText]);
  return reactExports.useMemo(() => _extends$1({}, localization2, {
    localeText
  }), [localization2, localeText]);
};
const useUtils = () => useLocalizationContext().utils;
const useDefaultDates = () => useLocalizationContext().defaultDates;
const useLocaleText = () => useLocalizationContext().localeText;
const useNow = (timezone) => {
  const utils2 = useUtils();
  const now = reactExports.useRef();
  if (now.current === void 0) {
    now.current = utils2.dateWithTimezone(void 0, timezone);
  }
  return now.current;
};
const ArrowDropDownIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M7 10l5 5 5-5z"
}), "ArrowDropDown");
const ArrowLeftIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
}), "ArrowLeft");
const ArrowRightIcon = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
}), "ArrowRight");
createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"
}), "Calendar");
createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
    d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("path", {
    d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
  })]
}), "Clock");
createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"
}), "DateRange");
createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsxs(reactExports.Fragment, {
  children: [/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
    d: "M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
  }), /* @__PURE__ */ jsxRuntimeExports.jsx("path", {
    d: "M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"
  })]
}), "Time");
const ClearIcon$1 = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}), "Clear");
function getPickersArrowSwitcherUtilityClass(slot) {
  return generateUtilityClass("MuiPickersArrowSwitcher", slot);
}
generateUtilityClasses("MuiPickersArrowSwitcher", ["root", "spacer", "button"]);
const _excluded$a = ["children", "className", "slots", "slotProps", "isNextDisabled", "isNextHidden", "onGoToNext", "nextLabel", "isPreviousDisabled", "isPreviousHidden", "onGoToPrevious", "previousLabel"], _excluded2$2 = ["ownerState"], _excluded3 = ["ownerState"];
const PickersArrowSwitcherRoot = styled("div", {
  name: "MuiPickersArrowSwitcher",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  display: "flex"
});
const PickersArrowSwitcherSpacer = styled("div", {
  name: "MuiPickersArrowSwitcher",
  slot: "Spacer",
  overridesResolver: (props, styles2) => styles2.spacer
})(({
  theme
}) => ({
  width: theme.spacing(3)
}));
const PickersArrowSwitcherButton = styled(IconButton, {
  name: "MuiPickersArrowSwitcher",
  slot: "Button",
  overridesResolver: (props, styles2) => styles2.button
})(({
  ownerState
}) => _extends$1({}, ownerState.hidden && {
  visibility: "hidden"
}));
const useUtilityClasses$a = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    spacer: ["spacer"],
    button: ["button"]
  };
  return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes);
};
const PickersArrowSwitcher = /* @__PURE__ */ reactExports.forwardRef(function PickersArrowSwitcher2(inProps, ref2) {
  var _slots$previousIconBu, _slots$nextIconButton, _slots$leftArrowIcon, _slots$rightArrowIcon;
  const theme = useTheme$1();
  const isRTL = theme.direction === "rtl";
  const props = useThemeProps({
    props: inProps,
    name: "MuiPickersArrowSwitcher"
  });
  const {
    children,
    className,
    slots,
    slotProps,
    isNextDisabled,
    isNextHidden,
    onGoToNext,
    nextLabel,
    isPreviousDisabled,
    isPreviousHidden,
    onGoToPrevious,
    previousLabel
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$a);
  const ownerState = props;
  const classes = useUtilityClasses$a(ownerState);
  const nextProps = {
    isDisabled: isNextDisabled,
    isHidden: isNextHidden,
    goTo: onGoToNext,
    label: nextLabel
  };
  const previousProps = {
    isDisabled: isPreviousDisabled,
    isHidden: isPreviousHidden,
    goTo: onGoToPrevious,
    label: previousLabel
  };
  const PreviousIconButton = (_slots$previousIconBu = slots == null ? void 0 : slots.previousIconButton) != null ? _slots$previousIconBu : PickersArrowSwitcherButton;
  const previousIconButtonProps = useSlotProps({
    elementType: PreviousIconButton,
    externalSlotProps: slotProps == null ? void 0 : slotProps.previousIconButton,
    additionalProps: {
      size: "medium",
      title: previousProps.label,
      "aria-label": previousProps.label,
      disabled: previousProps.isDisabled,
      edge: "end",
      onClick: previousProps.goTo
    },
    ownerState: _extends$1({}, ownerState, {
      hidden: previousProps.isHidden
    }),
    className: classes.button
  });
  const NextIconButton = (_slots$nextIconButton = slots == null ? void 0 : slots.nextIconButton) != null ? _slots$nextIconButton : PickersArrowSwitcherButton;
  const nextIconButtonProps = useSlotProps({
    elementType: NextIconButton,
    externalSlotProps: slotProps == null ? void 0 : slotProps.nextIconButton,
    additionalProps: {
      size: "medium",
      title: nextProps.label,
      "aria-label": nextProps.label,
      disabled: nextProps.isDisabled,
      edge: "start",
      onClick: nextProps.goTo
    },
    ownerState: _extends$1({}, ownerState, {
      hidden: nextProps.isHidden
    }),
    className: classes.button
  });
  const LeftArrowIcon = (_slots$leftArrowIcon = slots == null ? void 0 : slots.leftArrowIcon) != null ? _slots$leftArrowIcon : ArrowLeftIcon;
  const _useSlotProps = useSlotProps({
    elementType: LeftArrowIcon,
    externalSlotProps: slotProps == null ? void 0 : slotProps.leftArrowIcon,
    additionalProps: {
      fontSize: "inherit"
    },
    ownerState: void 0
  }), leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$2);
  const RightArrowIcon = (_slots$rightArrowIcon = slots == null ? void 0 : slots.rightArrowIcon) != null ? _slots$rightArrowIcon : ArrowRightIcon;
  const _useSlotProps2 = useSlotProps({
    elementType: RightArrowIcon,
    externalSlotProps: slotProps == null ? void 0 : slotProps.rightArrowIcon,
    additionalProps: {
      fontSize: "inherit"
    },
    ownerState: void 0
  }), rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersArrowSwitcherRoot, _extends$1({
    ref: ref2,
    className: clsx$3(classes.root, className),
    ownerState
  }, other, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(PreviousIconButton, _extends$1({}, previousIconButtonProps, {
      children: isRTL ? /* @__PURE__ */ jsxRuntimeExports.jsx(RightArrowIcon, _extends$1({}, rightArrowIconProps)) : /* @__PURE__ */ jsxRuntimeExports.jsx(LeftArrowIcon, _extends$1({}, leftArrowIconProps))
    })), children ? /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, {
      variant: "subtitle1",
      component: "span",
      children
    }) : /* @__PURE__ */ jsxRuntimeExports.jsx(PickersArrowSwitcherSpacer, {
      className: classes.spacer,
      ownerState
    }), /* @__PURE__ */ jsxRuntimeExports.jsx(NextIconButton, _extends$1({}, nextIconButtonProps, {
      children: isRTL ? /* @__PURE__ */ jsxRuntimeExports.jsx(LeftArrowIcon, _extends$1({}, leftArrowIconProps)) : /* @__PURE__ */ jsxRuntimeExports.jsx(RightArrowIcon, _extends$1({}, rightArrowIconProps))
    }))]
  }));
});
const getSecondsInDay = (date, utils2) => {
  return utils2.getHours(date) * 3600 + utils2.getMinutes(date) * 60 + utils2.getSeconds(date);
};
const createIsAfterIgnoreDatePart = (disableIgnoringDatePartForTimeValidation, utils2) => (dateLeft, dateRight) => {
  if (disableIgnoringDatePartForTimeValidation) {
    return utils2.isAfter(dateLeft, dateRight);
  }
  return getSecondsInDay(dateLeft, utils2) > getSecondsInDay(dateRight, utils2);
};
function useViews({
  onChange,
  onViewChange,
  openTo,
  view: inView,
  views,
  autoFocus,
  focusedView: inFocusedView,
  onFocusedViewChange
}) {
  var _views, _views2;
  const previousOpenTo = reactExports.useRef(openTo);
  const previousViews = reactExports.useRef(views);
  const defaultView = reactExports.useRef(views.includes(openTo) ? openTo : views[0]);
  const [view, setView] = useControlled({
    name: "useViews",
    state: "view",
    controlled: inView,
    default: defaultView.current
  });
  const defaultFocusedView = reactExports.useRef(autoFocus ? view : null);
  const [focusedView, setFocusedView] = useControlled({
    name: "useViews",
    state: "focusedView",
    controlled: inFocusedView,
    default: defaultFocusedView.current
  });
  reactExports.useEffect(() => {
    if (previousOpenTo.current && previousOpenTo.current !== openTo || previousViews.current && previousViews.current.some((previousView2) => !views.includes(previousView2))) {
      setView(views.includes(openTo) ? openTo : views[0]);
      previousViews.current = views;
      previousOpenTo.current = openTo;
    }
  }, [openTo, setView, view, views]);
  const viewIndex = views.indexOf(view);
  const previousView = (_views = views[viewIndex - 1]) != null ? _views : null;
  const nextView = (_views2 = views[viewIndex + 1]) != null ? _views2 : null;
  const handleFocusedViewChange = useEventCallback((viewToFocus, hasFocus) => {
    if (hasFocus) {
      setFocusedView(viewToFocus);
    } else {
      setFocusedView(
        (prevFocusedView) => viewToFocus === prevFocusedView ? null : prevFocusedView
        // If false the blur is due to view switching
      );
    }
    onFocusedViewChange == null || onFocusedViewChange(viewToFocus, hasFocus);
  });
  const handleChangeView = useEventCallback((newView) => {
    handleFocusedViewChange(newView, true);
    if (newView === view) {
      return;
    }
    setView(newView);
    if (onViewChange) {
      onViewChange(newView);
    }
  });
  const goToNextView = useEventCallback(() => {
    if (nextView) {
      handleChangeView(nextView);
    }
  });
  const setValueAndGoToNextView = useEventCallback((value, currentViewSelectionState, selectedView) => {
    const isSelectionFinishedOnCurrentView = currentViewSelectionState === "finish";
    const hasMoreViews = selectedView ? (
      // handles case like `DateTimePicker`, where a view might return a `finish` selection state
      // but we it's not the final view given all `views` -> overall selection state should be `partial`.
      views.indexOf(selectedView) < views.length - 1
    ) : Boolean(nextView);
    const globalSelectionState = isSelectionFinishedOnCurrentView && hasMoreViews ? "partial" : currentViewSelectionState;
    onChange(value, globalSelectionState, selectedView);
    if (selectedView && selectedView !== view) {
      const nextViewAfterSelected = views[views.indexOf(selectedView) + 1];
      if (nextViewAfterSelected) {
        handleChangeView(nextViewAfterSelected);
      }
    } else if (isSelectionFinishedOnCurrentView) {
      goToNextView();
    }
  });
  return {
    view,
    setView: handleChangeView,
    focusedView,
    setFocusedView: handleFocusedViewChange,
    nextView,
    previousView,
    // Always return up to date default view instead of the initial one (i.e. defaultView.current)
    defaultView: views.includes(openTo) ? openTo : views[0],
    goToNextView,
    setValueAndGoToNextView
  };
}
function useNextMonthDisabled(month, {
  disableFuture,
  maxDate,
  timezone
}) {
  const utils2 = useUtils();
  return reactExports.useMemo(() => {
    const now = utils2.dateWithTimezone(void 0, timezone);
    const lastEnabledMonth = utils2.startOfMonth(disableFuture && utils2.isBefore(now, maxDate) ? now : maxDate);
    return !utils2.isAfter(lastEnabledMonth, month);
  }, [disableFuture, maxDate, month, utils2, timezone]);
}
function usePreviousMonthDisabled(month, {
  disablePast,
  minDate,
  timezone
}) {
  const utils2 = useUtils();
  return reactExports.useMemo(() => {
    const now = utils2.dateWithTimezone(void 0, timezone);
    const firstEnabledMonth = utils2.startOfMonth(disablePast && utils2.isAfter(now, minDate) ? now : minDate);
    return !utils2.isBefore(firstEnabledMonth, month);
  }, [disablePast, minDate, month, utils2, timezone]);
}
const DAY_SIZE = 36;
const DAY_MARGIN = 2;
const DIALOG_WIDTH = 320;
const MAX_CALENDAR_HEIGHT = 280;
const VIEW_HEIGHT = 334;
const PickerViewRoot = styled("div")({
  overflow: "hidden",
  width: DIALOG_WIDTH,
  maxHeight: VIEW_HEIGHT,
  display: "flex",
  flexDirection: "column",
  margin: "0 auto"
});
const mergeDateAndTime = (utils2, dateParam, timeParam) => {
  let mergedDate = dateParam;
  mergedDate = utils2.setHours(mergedDate, utils2.getHours(timeParam));
  mergedDate = utils2.setMinutes(mergedDate, utils2.getMinutes(timeParam));
  mergedDate = utils2.setSeconds(mergedDate, utils2.getSeconds(timeParam));
  return mergedDate;
};
const findClosestEnabledDate = ({
  date,
  disableFuture,
  disablePast,
  maxDate,
  minDate,
  isDateDisabled,
  utils: utils2,
  timezone
}) => {
  const today = mergeDateAndTime(utils2, utils2.dateWithTimezone(void 0, timezone), date);
  if (disablePast && utils2.isBefore(minDate, today)) {
    minDate = today;
  }
  if (disableFuture && utils2.isAfter(maxDate, today)) {
    maxDate = today;
  }
  let forward = date;
  let backward = date;
  if (utils2.isBefore(date, minDate)) {
    forward = minDate;
    backward = null;
  }
  if (utils2.isAfter(date, maxDate)) {
    if (backward) {
      backward = maxDate;
    }
    forward = null;
  }
  while (forward || backward) {
    if (forward && utils2.isAfter(forward, maxDate)) {
      forward = null;
    }
    if (backward && utils2.isBefore(backward, minDate)) {
      backward = null;
    }
    if (forward) {
      if (!isDateDisabled(forward)) {
        return forward;
      }
      forward = utils2.addDays(forward, 1);
    }
    if (backward) {
      if (!isDateDisabled(backward)) {
        return backward;
      }
      backward = utils2.addDays(backward, -1);
    }
  }
  return null;
};
const replaceInvalidDateByNull = (utils2, value) => value == null || !utils2.isValid(value) ? null : value;
const applyDefaultDate = (utils2, value, defaultValue) => {
  if (value == null || !utils2.isValid(value)) {
    return defaultValue;
  }
  return value;
};
const areDatesEqual = (utils2, a2, b2) => {
  if (!utils2.isValid(a2) && a2 != null && !utils2.isValid(b2) && b2 != null) {
    return true;
  }
  return utils2.isEqual(a2, b2);
};
const getMonthsInYear = (utils2, year2) => {
  const firstMonth = utils2.startOfYear(year2);
  const months = [firstMonth];
  while (months.length < 12) {
    const prevMonth = months[months.length - 1];
    months.push(utils2.addMonths(prevMonth, 1));
  }
  return months;
};
const getTodayDate = (utils2, timezone, valueType) => valueType === "date" ? utils2.startOfDay(utils2.dateWithTimezone(void 0, timezone)) : utils2.dateWithTimezone(void 0, timezone);
const getWeekdays = (utils2, date) => {
  const start2 = utils2.startOfWeek(date);
  return [0, 1, 2, 3, 4, 5, 6].map((diff) => utils2.addDays(start2, diff));
};
const useValueWithTimezone = ({
  timezone: timezoneProp,
  value: valueProp,
  defaultValue,
  onChange,
  valueManager
}) => {
  var _ref, _ref2;
  const utils2 = useUtils();
  const firstDefaultValue = reactExports.useRef(defaultValue);
  const inputValue = (_ref = valueProp != null ? valueProp : firstDefaultValue.current) != null ? _ref : valueManager.emptyValue;
  const inputTimezone = reactExports.useMemo(() => valueManager.getTimezone(utils2, inputValue), [utils2, valueManager, inputValue]);
  const setInputTimezone = useEventCallback((newValue) => {
    if (inputTimezone == null) {
      return newValue;
    }
    return valueManager.setTimezone(utils2, inputTimezone, newValue);
  });
  const timezoneToRender = (_ref2 = timezoneProp != null ? timezoneProp : inputTimezone) != null ? _ref2 : "default";
  const valueWithTimezoneToRender = reactExports.useMemo(() => valueManager.setTimezone(utils2, timezoneToRender, inputValue), [valueManager, utils2, timezoneToRender, inputValue]);
  const handleValueChange = useEventCallback((newValue, ...otherParams) => {
    const newValueWithInputTimezone = setInputTimezone(newValue);
    onChange == null || onChange(newValueWithInputTimezone, ...otherParams);
  });
  return {
    value: valueWithTimezoneToRender,
    handleValueChange,
    timezone: timezoneToRender
  };
};
const useControlledValueWithTimezone = ({
  name,
  timezone: timezoneProp,
  value: valueProp,
  defaultValue,
  onChange: onChangeProp,
  valueManager
}) => {
  const [valueWithInputTimezone, setValue] = useControlled({
    name,
    state: "value",
    controlled: valueProp,
    default: defaultValue != null ? defaultValue : valueManager.emptyValue
  });
  const onChange = useEventCallback((newValue, ...otherParams) => {
    setValue(newValue);
    onChangeProp == null || onChangeProp(newValue, ...otherParams);
  });
  return useValueWithTimezone({
    timezone: timezoneProp,
    value: valueWithInputTimezone,
    defaultValue: void 0,
    onChange,
    valueManager
  });
};
const SECTION_TYPE_GRANULARITY = {
  year: 1,
  month: 2,
  day: 3,
  minutes: 5,
  seconds: 6,
  milliseconds: 7
};
const roundDate = (utils2, granularity, date) => {
  if (granularity === SECTION_TYPE_GRANULARITY.year) {
    return utils2.startOfYear(date);
  }
  if (granularity === SECTION_TYPE_GRANULARITY.month) {
    return utils2.startOfMonth(date);
  }
  if (granularity === SECTION_TYPE_GRANULARITY.day) {
    return utils2.startOfDay(date);
  }
  let roundedDate = date;
  if (granularity < SECTION_TYPE_GRANULARITY.minutes) {
    roundedDate = utils2.setMinutes(roundedDate, 0);
  }
  if (granularity < SECTION_TYPE_GRANULARITY.seconds) {
    roundedDate = utils2.setSeconds(roundedDate, 0);
  }
  if (granularity < SECTION_TYPE_GRANULARITY.milliseconds) {
    roundedDate = utils2.setMilliseconds(roundedDate, 0);
  }
  return roundedDate;
};
const getDefaultReferenceDate = ({
  props,
  utils: utils2,
  granularity,
  timezone,
  getTodayDate: inGetTodayDate
}) => {
  var _props$disableIgnorin;
  let referenceDate = inGetTodayDate ? inGetTodayDate() : roundDate(utils2, granularity, getTodayDate(utils2, timezone));
  if (props.minDate != null && utils2.isAfterDay(props.minDate, referenceDate)) {
    referenceDate = roundDate(utils2, granularity, props.minDate);
  }
  if (props.maxDate != null && utils2.isBeforeDay(props.maxDate, referenceDate)) {
    referenceDate = roundDate(utils2, granularity, props.maxDate);
  }
  const isAfter = createIsAfterIgnoreDatePart((_props$disableIgnorin = props.disableIgnoringDatePartForTimeValidation) != null ? _props$disableIgnorin : false, utils2);
  if (props.minTime != null && isAfter(props.minTime, referenceDate)) {
    referenceDate = roundDate(utils2, granularity, props.disableIgnoringDatePartForTimeValidation ? props.minTime : mergeDateAndTime(utils2, referenceDate, props.minTime));
  }
  if (props.maxTime != null && isAfter(referenceDate, props.maxTime)) {
    referenceDate = roundDate(utils2, granularity, props.disableIgnoringDatePartForTimeValidation ? props.maxTime : mergeDateAndTime(utils2, referenceDate, props.maxTime));
  }
  return referenceDate;
};
const _excluded$9 = ["value", "referenceDate"];
const singleItemValueManager = {
  emptyValue: null,
  getTodayValue: getTodayDate,
  getInitialReferenceValue: (_ref) => {
    let {
      value,
      referenceDate
    } = _ref, params2 = _objectWithoutPropertiesLoose(_ref, _excluded$9);
    if (value != null && params2.utils.isValid(value)) {
      return value;
    }
    if (referenceDate != null) {
      return referenceDate;
    }
    return getDefaultReferenceDate(params2);
  },
  cleanValue: replaceInvalidDateByNull,
  areValuesEqual: areDatesEqual,
  isSameError: (a2, b2) => a2 === b2,
  hasError: (error) => error != null,
  defaultErrorState: null,
  getTimezone: (utils2, value) => value == null || !utils2.isValid(value) ? null : utils2.getTimezone(value),
  setTimezone: (utils2, timezone, value) => value == null ? null : utils2.setTimezone(value, timezone)
};
function getPickersDayUtilityClass(slot) {
  return generateUtilityClass("MuiPickersDay", slot);
}
const pickersDayClasses = generateUtilityClasses("MuiPickersDay", ["root", "dayWithMargin", "dayOutsideMonth", "hiddenDaySpacingFiller", "today", "selected", "disabled"]);
const _excluded$8 = ["autoFocus", "className", "day", "disabled", "disableHighlightToday", "disableMargin", "hidden", "isAnimating", "onClick", "onDaySelect", "onFocus", "onBlur", "onKeyDown", "onMouseDown", "onMouseEnter", "outsideCurrentMonth", "selected", "showDaysOutsideCurrentMonth", "children", "today", "isFirstVisibleCell", "isLastVisibleCell"];
const useUtilityClasses$9 = (ownerState) => {
  const {
    selected,
    disableMargin,
    disableHighlightToday,
    today,
    disabled,
    outsideCurrentMonth,
    showDaysOutsideCurrentMonth,
    classes
  } = ownerState;
  const isHiddenDaySpacingFiller = outsideCurrentMonth && !showDaysOutsideCurrentMonth;
  const slots = {
    root: ["root", selected && !isHiddenDaySpacingFiller && "selected", disabled && "disabled", !disableMargin && "dayWithMargin", !disableHighlightToday && today && "today", outsideCurrentMonth && showDaysOutsideCurrentMonth && "dayOutsideMonth", isHiddenDaySpacingFiller && "hiddenDaySpacingFiller"],
    hiddenDaySpacingFiller: ["hiddenDaySpacingFiller"]
  };
  return composeClasses(slots, getPickersDayUtilityClass, classes);
};
const styleArg = ({
  theme,
  ownerState
}) => _extends$1({}, theme.typography.caption, {
  width: DAY_SIZE,
  height: DAY_SIZE,
  borderRadius: "50%",
  padding: 0,
  // explicitly setting to `transparent` to avoid potentially getting impacted by change from the overridden component
  backgroundColor: "transparent",
  transition: theme.transitions.create("background-color", {
    duration: theme.transitions.duration.short
  }),
  color: (theme.vars || theme).palette.text.primary,
  "@media (pointer: fine)": {
    "&:hover": {
      backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)
    }
  },
  "&:focus": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.focusOpacity),
    [`&.${pickersDayClasses.selected}`]: {
      willChange: "background-color",
      backgroundColor: (theme.vars || theme).palette.primary.dark
    }
  },
  [`&.${pickersDayClasses.selected}`]: {
    color: (theme.vars || theme).palette.primary.contrastText,
    backgroundColor: (theme.vars || theme).palette.primary.main,
    fontWeight: theme.typography.fontWeightMedium,
    "&:hover": {
      willChange: "background-color",
      backgroundColor: (theme.vars || theme).palette.primary.dark
    }
  },
  [`&.${pickersDayClasses.disabled}:not(.${pickersDayClasses.selected})`]: {
    color: (theme.vars || theme).palette.text.disabled
  },
  [`&.${pickersDayClasses.disabled}&.${pickersDayClasses.selected}`]: {
    opacity: 0.6
  }
}, !ownerState.disableMargin && {
  margin: `0 ${DAY_MARGIN}px`
}, ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && {
  color: (theme.vars || theme).palette.text.secondary
}, !ownerState.disableHighlightToday && ownerState.today && {
  [`&:not(.${pickersDayClasses.selected})`]: {
    border: `1px solid ${(theme.vars || theme).palette.text.secondary}`
  }
});
const overridesResolver = (props, styles2) => {
  const {
    ownerState
  } = props;
  return [styles2.root, !ownerState.disableMargin && styles2.dayWithMargin, !ownerState.disableHighlightToday && ownerState.today && styles2.today, !ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && styles2.dayOutsideMonth, ownerState.outsideCurrentMonth && !ownerState.showDaysOutsideCurrentMonth && styles2.hiddenDaySpacingFiller];
};
const PickersDayRoot = styled(ButtonBase, {
  name: "MuiPickersDay",
  slot: "Root",
  overridesResolver
})(styleArg);
const PickersDayFiller = styled("div", {
  name: "MuiPickersDay",
  slot: "Root",
  overridesResolver
})(({
  theme,
  ownerState
}) => _extends$1({}, styleArg({
  theme,
  ownerState
}), {
  // visibility: 'hidden' does not work here as it hides the element from screen readers as well
  opacity: 0,
  pointerEvents: "none"
}));
const noop$1 = () => {
};
const PickersDayRaw = /* @__PURE__ */ reactExports.forwardRef(function PickersDay2(inProps, forwardedRef) {
  const props = useThemeProps({
    props: inProps,
    name: "MuiPickersDay"
  });
  const {
    autoFocus = false,
    className,
    day,
    disabled = false,
    disableHighlightToday = false,
    disableMargin = false,
    isAnimating,
    onClick: onClick2,
    onDaySelect,
    onFocus = noop$1,
    onBlur = noop$1,
    onKeyDown = noop$1,
    onMouseDown: onMouseDown2 = noop$1,
    onMouseEnter: onMouseEnter2 = noop$1,
    outsideCurrentMonth,
    selected = false,
    showDaysOutsideCurrentMonth = false,
    children,
    today: isToday = false
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$8);
  const ownerState = _extends$1({}, props, {
    autoFocus,
    disabled,
    disableHighlightToday,
    disableMargin,
    selected,
    showDaysOutsideCurrentMonth,
    today: isToday
  });
  const classes = useUtilityClasses$9(ownerState);
  const utils2 = useUtils();
  const ref2 = reactExports.useRef(null);
  const handleRef = useForkRef(ref2, forwardedRef);
  useEnhancedEffect(() => {
    if (autoFocus && !disabled && !isAnimating && !outsideCurrentMonth) {
      ref2.current.focus();
    }
  }, [autoFocus, disabled, isAnimating, outsideCurrentMonth]);
  const handleMouseDown = (event) => {
    onMouseDown2(event);
    if (outsideCurrentMonth) {
      event.preventDefault();
    }
  };
  const handleClick = (event) => {
    if (!disabled) {
      onDaySelect(day);
    }
    if (outsideCurrentMonth) {
      event.currentTarget.focus();
    }
    if (onClick2) {
      onClick2(event);
    }
  };
  if (outsideCurrentMonth && !showDaysOutsideCurrentMonth) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersDayFiller, {
      className: clsx$3(classes.root, classes.hiddenDaySpacingFiller, className),
      ownerState,
      role: other.role
    });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersDayRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ref: handleRef,
    centerRipple: true,
    disabled,
    tabIndex: selected ? 0 : -1,
    onKeyDown: (event) => onKeyDown(event, day),
    onFocus: (event) => onFocus(event, day),
    onBlur: (event) => onBlur(event, day),
    onMouseEnter: (event) => onMouseEnter2(event, day),
    onClick: handleClick,
    onMouseDown: handleMouseDown
  }, other, {
    ownerState,
    children: !children ? utils2.format(day, "dayOfMonth") : children
  }));
});
const PickersDay = /* @__PURE__ */ reactExports.memo(PickersDayRaw);
const validateDate = ({
  props,
  value,
  adapter
}) => {
  if (value === null) {
    return null;
  }
  const {
    shouldDisableDate,
    shouldDisableMonth,
    shouldDisableYear,
    disablePast,
    disableFuture,
    timezone
  } = props;
  const now = adapter.utils.dateWithTimezone(void 0, timezone);
  const minDate = applyDefaultDate(adapter.utils, props.minDate, adapter.defaultDates.minDate);
  const maxDate = applyDefaultDate(adapter.utils, props.maxDate, adapter.defaultDates.maxDate);
  switch (true) {
    case !adapter.utils.isValid(value):
      return "invalidDate";
    case Boolean(shouldDisableDate && shouldDisableDate(value)):
      return "shouldDisableDate";
    case Boolean(shouldDisableMonth && shouldDisableMonth(value)):
      return "shouldDisableMonth";
    case Boolean(shouldDisableYear && shouldDisableYear(value)):
      return "shouldDisableYear";
    case Boolean(disableFuture && adapter.utils.isAfterDay(value, now)):
      return "disableFuture";
    case Boolean(disablePast && adapter.utils.isBeforeDay(value, now)):
      return "disablePast";
    case Boolean(minDate && adapter.utils.isBeforeDay(value, minDate)):
      return "minDate";
    case Boolean(maxDate && adapter.utils.isAfterDay(value, maxDate)):
      return "maxDate";
    default:
      return null;
  }
};
const PREFERS_REDUCED_MOTION = "@media (prefers-reduced-motion: reduce)";
const mobileVersionMatches = typeof navigator !== "undefined" && navigator.userAgent.match(/android\s(\d+)|OS\s(\d+)/i);
const androidVersion = mobileVersionMatches && mobileVersionMatches[1] ? parseInt(mobileVersionMatches[1], 10) : null;
const iOSVersion = mobileVersionMatches && mobileVersionMatches[2] ? parseInt(mobileVersionMatches[2], 10) : null;
const slowAnimationDevices = androidVersion && androidVersion < 10 || iOSVersion && iOSVersion < 13 || false;
const useDefaultReduceAnimations = () => {
  const prefersReduced = useMediaQuery(PREFERS_REDUCED_MOTION, {
    defaultMatches: false
  });
  return prefersReduced || slowAnimationDevices;
};
const buildWarning = (message, gravity = "warning") => {
  let alreadyWarned = false;
  const cleanMessage = Array.isArray(message) ? message.join("\n") : message;
  return () => {
    if (!alreadyWarned) {
      alreadyWarned = true;
      if (gravity === "error") {
        console.error(cleanMessage);
      } else {
        console.warn(cleanMessage);
      }
    }
  };
};
const getPickersSlideTransitionUtilityClass = (slot) => generateUtilityClass("MuiPickersSlideTransition", slot);
const pickersSlideTransitionClasses = generateUtilityClasses("MuiPickersSlideTransition", ["root", "slideEnter-left", "slideEnter-right", "slideEnterActive", "slideExit", "slideExitActiveLeft-left", "slideExitActiveLeft-right"]);
const _excluded$7 = ["children", "className", "reduceAnimations", "slideDirection", "transKey", "classes"];
const useUtilityClasses$8 = (ownerState) => {
  const {
    classes,
    slideDirection
  } = ownerState;
  const slots = {
    root: ["root"],
    exit: ["slideExit"],
    enterActive: ["slideEnterActive"],
    enter: [`slideEnter-${slideDirection}`],
    exitActive: [`slideExitActiveLeft-${slideDirection}`]
  };
  return composeClasses(slots, getPickersSlideTransitionUtilityClass, classes);
};
const PickersSlideTransitionRoot = styled(TransitionGroup, {
  name: "MuiPickersSlideTransition",
  slot: "Root",
  overridesResolver: (_2, styles2) => [styles2.root, {
    [`.${pickersSlideTransitionClasses["slideEnter-left"]}`]: styles2["slideEnter-left"]
  }, {
    [`.${pickersSlideTransitionClasses["slideEnter-right"]}`]: styles2["slideEnter-right"]
  }, {
    [`.${pickersSlideTransitionClasses.slideEnterActive}`]: styles2.slideEnterActive
  }, {
    [`.${pickersSlideTransitionClasses.slideExit}`]: styles2.slideExit
  }, {
    [`.${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]: styles2["slideExitActiveLeft-left"]
  }, {
    [`.${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]: styles2["slideExitActiveLeft-right"]
  }]
})(({
  theme
}) => {
  const slideTransition = theme.transitions.create("transform", {
    duration: theme.transitions.duration.complex,
    easing: "cubic-bezier(0.35, 0.8, 0.4, 1)"
  });
  return {
    display: "block",
    position: "relative",
    overflowX: "hidden",
    "& > *": {
      position: "absolute",
      top: 0,
      right: 0,
      left: 0
    },
    [`& .${pickersSlideTransitionClasses["slideEnter-left"]}`]: {
      willChange: "transform",
      transform: "translate(100%)",
      zIndex: 1
    },
    [`& .${pickersSlideTransitionClasses["slideEnter-right"]}`]: {
      willChange: "transform",
      transform: "translate(-100%)",
      zIndex: 1
    },
    [`& .${pickersSlideTransitionClasses.slideEnterActive}`]: {
      transform: "translate(0%)",
      transition: slideTransition
    },
    [`& .${pickersSlideTransitionClasses.slideExit}`]: {
      transform: "translate(0%)"
    },
    [`& .${pickersSlideTransitionClasses["slideExitActiveLeft-left"]}`]: {
      willChange: "transform",
      transform: "translate(-100%)",
      transition: slideTransition,
      zIndex: 0
    },
    [`& .${pickersSlideTransitionClasses["slideExitActiveLeft-right"]}`]: {
      willChange: "transform",
      transform: "translate(100%)",
      transition: slideTransition,
      zIndex: 0
    }
  };
});
function PickersSlideTransition(inProps) {
  const props = useThemeProps({
    props: inProps,
    name: "MuiPickersSlideTransition"
  });
  const {
    children,
    className,
    reduceAnimations,
    transKey
    // extracting `classes` from `other`
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$7);
  const classes = useUtilityClasses$8(props);
  const theme = useTheme$1();
  if (reduceAnimations) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
      className: clsx$3(classes.root, className),
      children
    });
  }
  const transitionClasses = {
    exit: classes.exit,
    enterActive: classes.enterActive,
    enter: classes.enter,
    exitActive: classes.exitActive
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersSlideTransitionRoot, {
    className: clsx$3(classes.root, className),
    childFactory: (element) => /* @__PURE__ */ reactExports.cloneElement(element, {
      classNames: transitionClasses
    }),
    role: "presentation",
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(CSSTransition, _extends$1({
      mountOnEnter: true,
      unmountOnExit: true,
      timeout: theme.transitions.duration.complex,
      classNames: transitionClasses
    }, other, {
      children
    }), transKey)
  });
}
const useIsDateDisabled = ({
  shouldDisableDate,
  shouldDisableMonth,
  shouldDisableYear,
  minDate,
  maxDate,
  disableFuture,
  disablePast,
  timezone
}) => {
  const adapter = useLocalizationContext();
  return reactExports.useCallback((day) => validateDate({
    adapter,
    value: day,
    props: {
      shouldDisableDate,
      shouldDisableMonth,
      shouldDisableYear,
      minDate,
      maxDate,
      disableFuture,
      disablePast,
      timezone
    }
  }) !== null, [adapter, shouldDisableDate, shouldDisableMonth, shouldDisableYear, minDate, maxDate, disableFuture, disablePast, timezone]);
};
const getDayCalendarUtilityClass = (slot) => generateUtilityClass("MuiDayCalendar", slot);
generateUtilityClasses("MuiDayCalendar", ["root", "header", "weekDayLabel", "loadingContainer", "slideTransition", "monthContainer", "weekContainer", "weekNumberLabel", "weekNumber"]);
const _excluded$6 = ["parentProps", "day", "focusableDay", "selectedDays", "isDateDisabled", "currentMonthNumber", "isViewFocused"], _excluded2$1 = ["ownerState"];
const useUtilityClasses$7 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    header: ["header"],
    weekDayLabel: ["weekDayLabel"],
    loadingContainer: ["loadingContainer"],
    slideTransition: ["slideTransition"],
    monthContainer: ["monthContainer"],
    weekContainer: ["weekContainer"],
    weekNumberLabel: ["weekNumberLabel"],
    weekNumber: ["weekNumber"]
  };
  return composeClasses(slots, getDayCalendarUtilityClass, classes);
};
const weeksContainerHeight = (DAY_SIZE + DAY_MARGIN * 2) * 6;
const PickersCalendarDayRoot = styled("div", {
  name: "MuiDayCalendar",
  slot: "Root",
  overridesResolver: (_2, styles2) => styles2.root
})({});
const PickersCalendarDayHeader = styled("div", {
  name: "MuiDayCalendar",
  slot: "Header",
  overridesResolver: (_2, styles2) => styles2.header
})({
  display: "flex",
  justifyContent: "center",
  alignItems: "center"
});
const PickersCalendarWeekDayLabel = styled(Typography, {
  name: "MuiDayCalendar",
  slot: "WeekDayLabel",
  overridesResolver: (_2, styles2) => styles2.weekDayLabel
})(({
  theme
}) => ({
  width: 36,
  height: 40,
  margin: "0 2px",
  textAlign: "center",
  display: "flex",
  justifyContent: "center",
  alignItems: "center",
  color: (theme.vars || theme).palette.text.secondary
}));
const PickersCalendarWeekNumberLabel = styled(Typography, {
  name: "MuiDayCalendar",
  slot: "WeekNumberLabel",
  overridesResolver: (_2, styles2) => styles2.weekNumberLabel
})(({
  theme
}) => ({
  width: 36,
  height: 40,
  margin: "0 2px",
  textAlign: "center",
  display: "flex",
  justifyContent: "center",
  alignItems: "center",
  color: theme.palette.text.disabled
}));
const PickersCalendarWeekNumber = styled(Typography, {
  name: "MuiDayCalendar",
  slot: "WeekNumber",
  overridesResolver: (_2, styles2) => styles2.weekNumber
})(({
  theme
}) => _extends$1({}, theme.typography.caption, {
  width: DAY_SIZE,
  height: DAY_SIZE,
  padding: 0,
  margin: `0 ${DAY_MARGIN}px`,
  color: theme.palette.text.disabled,
  fontSize: "0.75rem",
  alignItems: "center",
  justifyContent: "center",
  display: "inline-flex"
}));
const PickersCalendarLoadingContainer = styled("div", {
  name: "MuiDayCalendar",
  slot: "LoadingContainer",
  overridesResolver: (_2, styles2) => styles2.loadingContainer
})({
  display: "flex",
  justifyContent: "center",
  alignItems: "center",
  minHeight: weeksContainerHeight
});
const PickersCalendarSlideTransition = styled(PickersSlideTransition, {
  name: "MuiDayCalendar",
  slot: "SlideTransition",
  overridesResolver: (_2, styles2) => styles2.slideTransition
})({
  minHeight: weeksContainerHeight
});
const PickersCalendarWeekContainer = styled("div", {
  name: "MuiDayCalendar",
  slot: "MonthContainer",
  overridesResolver: (_2, styles2) => styles2.monthContainer
})({
  overflow: "hidden"
});
const PickersCalendarWeek = styled("div", {
  name: "MuiDayCalendar",
  slot: "WeekContainer",
  overridesResolver: (_2, styles2) => styles2.weekContainer
})({
  margin: `${DAY_MARGIN}px 0`,
  display: "flex",
  justifyContent: "center"
});
function WrappedDay(_ref) {
  var _ref2, _slots$day, _slotProps$day;
  let {
    parentProps,
    day,
    focusableDay,
    selectedDays,
    isDateDisabled,
    currentMonthNumber,
    isViewFocused
  } = _ref, other = _objectWithoutPropertiesLoose(_ref, _excluded$6);
  const {
    disabled,
    disableHighlightToday,
    isMonthSwitchingAnimating,
    showDaysOutsideCurrentMonth,
    components,
    componentsProps,
    slots,
    slotProps,
    timezone
  } = parentProps;
  const utils2 = useUtils();
  const now = useNow(timezone);
  const isFocusableDay = focusableDay !== null && utils2.isSameDay(day, focusableDay);
  const isSelected = selectedDays.some((selectedDay) => utils2.isSameDay(selectedDay, day));
  const isToday = utils2.isSameDay(day, now);
  const Day = (_ref2 = (_slots$day = slots == null ? void 0 : slots.day) != null ? _slots$day : components == null ? void 0 : components.Day) != null ? _ref2 : PickersDay;
  const _useSlotProps = useSlotProps({
    elementType: Day,
    externalSlotProps: (_slotProps$day = slotProps == null ? void 0 : slotProps.day) != null ? _slotProps$day : componentsProps == null ? void 0 : componentsProps.day,
    additionalProps: _extends$1({
      disableHighlightToday,
      showDaysOutsideCurrentMonth,
      role: "gridcell",
      isAnimating: isMonthSwitchingAnimating,
      // it is used in date range dragging logic by accessing `dataset.timestamp`
      "data-timestamp": utils2.toJsDate(day).valueOf()
    }, other),
    ownerState: _extends$1({}, parentProps, {
      day,
      selected: isSelected
    })
  }), dayProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2$1);
  const isDisabled = reactExports.useMemo(() => disabled || isDateDisabled(day), [disabled, isDateDisabled, day]);
  const outsideCurrentMonth = reactExports.useMemo(() => utils2.getMonth(day) !== currentMonthNumber, [utils2, day, currentMonthNumber]);
  const isFirstVisibleCell = reactExports.useMemo(() => {
    const startOfMonth = utils2.startOfMonth(utils2.setMonth(day, currentMonthNumber));
    if (!showDaysOutsideCurrentMonth) {
      return utils2.isSameDay(day, startOfMonth);
    }
    return utils2.isSameDay(day, utils2.startOfWeek(startOfMonth));
  }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils2]);
  const isLastVisibleCell = reactExports.useMemo(() => {
    const endOfMonth = utils2.endOfMonth(utils2.setMonth(day, currentMonthNumber));
    if (!showDaysOutsideCurrentMonth) {
      return utils2.isSameDay(day, endOfMonth);
    }
    return utils2.isSameDay(day, utils2.endOfWeek(endOfMonth));
  }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils2]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Day, _extends$1({}, dayProps, {
    day,
    disabled: isDisabled,
    autoFocus: isViewFocused && isFocusableDay,
    today: isToday,
    outsideCurrentMonth,
    isFirstVisibleCell,
    isLastVisibleCell,
    selected: isSelected,
    tabIndex: isFocusableDay ? 0 : -1,
    "aria-selected": isSelected,
    "aria-current": isToday ? "date" : void 0
  }));
}
function DayCalendar(inProps) {
  const props = useThemeProps({
    props: inProps,
    name: "MuiDayCalendar"
  });
  const {
    onFocusedDayChange,
    className,
    currentMonth,
    selectedDays,
    focusedDay,
    loading,
    onSelectedDaysChange,
    onMonthSwitchingAnimationEnd,
    readOnly,
    reduceAnimations,
    renderLoading = () => /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
      children: "..."
    }),
    slideDirection,
    TransitionProps,
    disablePast,
    disableFuture,
    minDate,
    maxDate,
    shouldDisableDate,
    shouldDisableMonth,
    shouldDisableYear,
    dayOfWeekFormatter: dayOfWeekFormatterFromProps,
    hasFocus,
    onFocusedViewChange,
    gridLabelId,
    displayWeekNumber,
    fixedWeekNumber,
    autoFocus,
    timezone
  } = props;
  const now = useNow(timezone);
  const utils2 = useUtils();
  const classes = useUtilityClasses$7(props);
  const theme = useTheme$1();
  const isRTL = theme.direction === "rtl";
  const dayOfWeekFormatter = dayOfWeekFormatterFromProps || ((_day, date) => utils2.format(date, "weekdayShort").charAt(0).toUpperCase());
  const isDateDisabled = useIsDateDisabled({
    shouldDisableDate,
    shouldDisableMonth,
    shouldDisableYear,
    minDate,
    maxDate,
    disablePast,
    disableFuture,
    timezone
  });
  const localeText = useLocaleText();
  const [internalHasFocus, setInternalHasFocus] = useControlled({
    name: "DayCalendar",
    state: "hasFocus",
    controlled: hasFocus,
    default: autoFocus != null ? autoFocus : false
  });
  const [internalFocusedDay, setInternalFocusedDay] = reactExports.useState(() => focusedDay || now);
  const handleDaySelect = useEventCallback((day) => {
    if (readOnly) {
      return;
    }
    onSelectedDaysChange(day);
  });
  const focusDay = (day) => {
    if (!isDateDisabled(day)) {
      onFocusedDayChange(day);
      setInternalFocusedDay(day);
      onFocusedViewChange == null || onFocusedViewChange(true);
      setInternalHasFocus(true);
    }
  };
  const handleKeyDown2 = useEventCallback((event, day) => {
    switch (event.key) {
      case "ArrowUp":
        focusDay(utils2.addDays(day, -7));
        event.preventDefault();
        break;
      case "ArrowDown":
        focusDay(utils2.addDays(day, 7));
        event.preventDefault();
        break;
      case "ArrowLeft": {
        const newFocusedDayDefault = utils2.addDays(day, isRTL ? 1 : -1);
        const nextAvailableMonth = utils2.addMonths(day, isRTL ? 1 : -1);
        const closestDayToFocus = findClosestEnabledDate({
          utils: utils2,
          date: newFocusedDayDefault,
          minDate: isRTL ? newFocusedDayDefault : utils2.startOfMonth(nextAvailableMonth),
          maxDate: isRTL ? utils2.endOfMonth(nextAvailableMonth) : newFocusedDayDefault,
          isDateDisabled,
          timezone
        });
        focusDay(closestDayToFocus || newFocusedDayDefault);
        event.preventDefault();
        break;
      }
      case "ArrowRight": {
        const newFocusedDayDefault = utils2.addDays(day, isRTL ? -1 : 1);
        const nextAvailableMonth = utils2.addMonths(day, isRTL ? -1 : 1);
        const closestDayToFocus = findClosestEnabledDate({
          utils: utils2,
          date: newFocusedDayDefault,
          minDate: isRTL ? utils2.startOfMonth(nextAvailableMonth) : newFocusedDayDefault,
          maxDate: isRTL ? newFocusedDayDefault : utils2.endOfMonth(nextAvailableMonth),
          isDateDisabled,
          timezone
        });
        focusDay(closestDayToFocus || newFocusedDayDefault);
        event.preventDefault();
        break;
      }
      case "Home":
        focusDay(utils2.startOfWeek(day));
        event.preventDefault();
        break;
      case "End":
        focusDay(utils2.endOfWeek(day));
        event.preventDefault();
        break;
      case "PageUp":
        focusDay(utils2.addMonths(day, 1));
        event.preventDefault();
        break;
      case "PageDown":
        focusDay(utils2.addMonths(day, -1));
        event.preventDefault();
        break;
    }
  });
  const handleFocus = useEventCallback((event, day) => focusDay(day));
  const handleBlur = useEventCallback((event, day) => {
    if (internalHasFocus && utils2.isSameDay(internalFocusedDay, day)) {
      onFocusedViewChange == null || onFocusedViewChange(false);
    }
  });
  const currentMonthNumber = utils2.getMonth(currentMonth);
  const validSelectedDays = reactExports.useMemo(() => selectedDays.filter((day) => !!day).map((day) => utils2.startOfDay(day)), [utils2, selectedDays]);
  const transitionKey = currentMonthNumber;
  const slideNodeRef = reactExports.useMemo(() => /* @__PURE__ */ reactExports.createRef(), [transitionKey]);
  const startOfCurrentWeek = utils2.startOfWeek(now);
  const focusableDay = reactExports.useMemo(() => {
    const startOfMonth = utils2.startOfMonth(currentMonth);
    const endOfMonth = utils2.endOfMonth(currentMonth);
    if (isDateDisabled(internalFocusedDay) || utils2.isAfterDay(internalFocusedDay, endOfMonth) || utils2.isBeforeDay(internalFocusedDay, startOfMonth)) {
      return findClosestEnabledDate({
        utils: utils2,
        date: internalFocusedDay,
        minDate: startOfMonth,
        maxDate: endOfMonth,
        disablePast,
        disableFuture,
        isDateDisabled,
        timezone
      });
    }
    return internalFocusedDay;
  }, [currentMonth, disableFuture, disablePast, internalFocusedDay, isDateDisabled, utils2, timezone]);
  const weeksToDisplay = reactExports.useMemo(() => {
    const currentMonthWithTimezone = utils2.setTimezone(currentMonth, timezone);
    const toDisplay = utils2.getWeekArray(currentMonthWithTimezone);
    let nextMonth = utils2.addMonths(currentMonthWithTimezone, 1);
    while (fixedWeekNumber && toDisplay.length < fixedWeekNumber) {
      const additionalWeeks = utils2.getWeekArray(nextMonth);
      const hasCommonWeek = utils2.isSameDay(toDisplay[toDisplay.length - 1][0], additionalWeeks[0][0]);
      additionalWeeks.slice(hasCommonWeek ? 1 : 0).forEach((week) => {
        if (toDisplay.length < fixedWeekNumber) {
          toDisplay.push(week);
        }
      });
      nextMonth = utils2.addMonths(nextMonth, 1);
    }
    return toDisplay;
  }, [currentMonth, fixedWeekNumber, utils2, timezone]);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersCalendarDayRoot, {
    role: "grid",
    "aria-labelledby": gridLabelId,
    className: classes.root,
    children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(PickersCalendarDayHeader, {
      role: "row",
      className: classes.header,
      children: [displayWeekNumber && /* @__PURE__ */ jsxRuntimeExports.jsx(PickersCalendarWeekNumberLabel, {
        variant: "caption",
        role: "columnheader",
        "aria-label": localeText.calendarWeekNumberHeaderLabel,
        className: classes.weekNumberLabel,
        children: localeText.calendarWeekNumberHeaderText
      }), getWeekdays(utils2, now).map((weekday, i) => {
        var _dayOfWeekFormatter;
        const day = utils2.format(weekday, "weekdayShort");
        return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersCalendarWeekDayLabel, {
          variant: "caption",
          role: "columnheader",
          "aria-label": utils2.format(utils2.addDays(startOfCurrentWeek, i), "weekday"),
          className: classes.weekDayLabel,
          children: (_dayOfWeekFormatter = dayOfWeekFormatter == null ? void 0 : dayOfWeekFormatter(day, weekday)) != null ? _dayOfWeekFormatter : day
        }, day + i.toString());
      })]
    }), loading ? /* @__PURE__ */ jsxRuntimeExports.jsx(PickersCalendarLoadingContainer, {
      className: classes.loadingContainer,
      children: renderLoading()
    }) : /* @__PURE__ */ jsxRuntimeExports.jsx(PickersCalendarSlideTransition, _extends$1({
      transKey: transitionKey,
      onExited: onMonthSwitchingAnimationEnd,
      reduceAnimations,
      slideDirection,
      className: clsx$3(className, classes.slideTransition)
    }, TransitionProps, {
      nodeRef: slideNodeRef,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(PickersCalendarWeekContainer, {
        ref: slideNodeRef,
        role: "rowgroup",
        className: classes.monthContainer,
        children: weeksToDisplay.map((week, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersCalendarWeek, {
          role: "row",
          className: classes.weekContainer,
          "aria-rowindex": index2 + 1,
          children: [displayWeekNumber && /* @__PURE__ */ jsxRuntimeExports.jsx(PickersCalendarWeekNumber, {
            className: classes.weekNumber,
            role: "rowheader",
            "aria-label": localeText.calendarWeekNumberAriaLabelText(utils2.getWeekNumber(week[0])),
            children: localeText.calendarWeekNumberText(utils2.getWeekNumber(week[0]))
          }), week.map((day, dayIndex) => /* @__PURE__ */ jsxRuntimeExports.jsx(WrappedDay, {
            parentProps: props,
            day,
            selectedDays: validSelectedDays,
            focusableDay,
            onKeyDown: handleKeyDown2,
            onFocus: handleFocus,
            onBlur: handleBlur,
            onDaySelect: handleDaySelect,
            isDateDisabled,
            currentMonthNumber,
            isViewFocused: internalHasFocus,
            "aria-colindex": dayIndex + 1
          }, day.toString()))]
        }, `week-${week[0]}`))
      })
    }))]
  });
}
const createCalendarStateReducer = (reduceAnimations, disableSwitchToMonthOnDayFocus, utils2) => (state, action) => {
  switch (action.type) {
    case "changeMonth":
      return _extends$1({}, state, {
        slideDirection: action.direction,
        currentMonth: action.newMonth,
        isMonthSwitchingAnimating: !reduceAnimations
      });
    case "finishMonthSwitchingAnimation":
      return _extends$1({}, state, {
        isMonthSwitchingAnimating: false
      });
    case "changeFocusedDay": {
      if (state.focusedDay != null && action.focusedDay != null && utils2.isSameDay(action.focusedDay, state.focusedDay)) {
        return state;
      }
      const needMonthSwitch = action.focusedDay != null && !disableSwitchToMonthOnDayFocus && !utils2.isSameMonth(state.currentMonth, action.focusedDay);
      return _extends$1({}, state, {
        focusedDay: action.focusedDay,
        isMonthSwitchingAnimating: needMonthSwitch && !reduceAnimations && !action.withoutMonthSwitchingAnimation,
        currentMonth: needMonthSwitch ? utils2.startOfMonth(action.focusedDay) : state.currentMonth,
        slideDirection: action.focusedDay != null && utils2.isAfterDay(action.focusedDay, state.currentMonth) ? "left" : "right"
      });
    }
    default:
      throw new Error("missing support");
  }
};
const useCalendarState = (params2) => {
  const {
    value,
    referenceDate: referenceDateProp,
    defaultCalendarMonth,
    disableFuture,
    disablePast,
    disableSwitchToMonthOnDayFocus = false,
    maxDate,
    minDate,
    onMonthChange,
    reduceAnimations,
    shouldDisableDate,
    timezone
  } = params2;
  const utils2 = useUtils();
  const reducerFn = reactExports.useRef(createCalendarStateReducer(Boolean(reduceAnimations), disableSwitchToMonthOnDayFocus, utils2)).current;
  const referenceDate = reactExports.useMemo(
    () => {
      let externalReferenceDate = null;
      if (referenceDateProp) {
        externalReferenceDate = referenceDateProp;
      } else if (defaultCalendarMonth) {
        externalReferenceDate = utils2.startOfMonth(defaultCalendarMonth);
      }
      return singleItemValueManager.getInitialReferenceValue({
        value,
        utils: utils2,
        timezone,
        props: params2,
        referenceDate: externalReferenceDate,
        granularity: SECTION_TYPE_GRANULARITY.day
      });
    },
    []
    // eslint-disable-line react-hooks/exhaustive-deps
  );
  const [calendarState, dispatch] = reactExports.useReducer(reducerFn, {
    isMonthSwitchingAnimating: false,
    focusedDay: referenceDate,
    currentMonth: utils2.startOfMonth(referenceDate),
    slideDirection: "left"
  });
  const handleChangeMonth = reactExports.useCallback((payload) => {
    dispatch(_extends$1({
      type: "changeMonth"
    }, payload));
    if (onMonthChange) {
      onMonthChange(payload.newMonth);
    }
  }, [onMonthChange]);
  const changeMonth = reactExports.useCallback((newDate) => {
    const newDateRequested = newDate;
    if (utils2.isSameMonth(newDateRequested, calendarState.currentMonth)) {
      return;
    }
    handleChangeMonth({
      newMonth: utils2.startOfMonth(newDateRequested),
      direction: utils2.isAfterDay(newDateRequested, calendarState.currentMonth) ? "left" : "right"
    });
  }, [calendarState.currentMonth, handleChangeMonth, utils2]);
  const isDateDisabled = useIsDateDisabled({
    shouldDisableDate,
    minDate,
    maxDate,
    disableFuture,
    disablePast,
    timezone
  });
  const onMonthSwitchingAnimationEnd = reactExports.useCallback(() => {
    dispatch({
      type: "finishMonthSwitchingAnimation"
    });
  }, []);
  const changeFocusedDay = useEventCallback((newFocusedDate, withoutMonthSwitchingAnimation) => {
    if (!isDateDisabled(newFocusedDate)) {
      dispatch({
        type: "changeFocusedDay",
        focusedDay: newFocusedDate,
        withoutMonthSwitchingAnimation
      });
    }
  });
  return {
    referenceDate,
    calendarState,
    changeMonth,
    changeFocusedDay,
    isDateDisabled,
    onMonthSwitchingAnimationEnd,
    handleChangeMonth
  };
};
const getPickersFadeTransitionGroupUtilityClass = (slot) => generateUtilityClass("MuiPickersFadeTransitionGroup", slot);
generateUtilityClasses("MuiPickersFadeTransitionGroup", ["root"]);
const useUtilityClasses$6 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getPickersFadeTransitionGroupUtilityClass, classes);
};
const PickersFadeTransitionGroupRoot = styled(TransitionGroup, {
  name: "MuiPickersFadeTransitionGroup",
  slot: "Root",
  overridesResolver: (_2, styles2) => styles2.root
})({
  display: "block",
  position: "relative"
});
function PickersFadeTransitionGroup(inProps) {
  const props = useThemeProps({
    props: inProps,
    name: "MuiPickersFadeTransitionGroup"
  });
  const {
    children,
    className,
    reduceAnimations,
    transKey
  } = props;
  const classes = useUtilityClasses$6(props);
  const theme = useTheme$1();
  if (reduceAnimations) {
    return children;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersFadeTransitionGroupRoot, {
    className: clsx$3(classes.root, className),
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(Fade, {
      appear: false,
      mountOnEnter: true,
      unmountOnExit: true,
      timeout: {
        appear: theme.transitions.duration.enteringScreen,
        enter: theme.transitions.duration.enteringScreen,
        exit: 0
      },
      children
    }, transKey)
  });
}
function getPickersMonthUtilityClass(slot) {
  return generateUtilityClass("MuiPickersMonth", slot);
}
const pickersMonthClasses = generateUtilityClasses("MuiPickersMonth", ["root", "monthButton", "disabled", "selected"]);
const _excluded$5 = ["autoFocus", "children", "disabled", "selected", "value", "tabIndex", "onClick", "onKeyDown", "onFocus", "onBlur", "aria-current", "aria-label", "monthsPerRow"];
const useUtilityClasses$5 = (ownerState) => {
  const {
    disabled,
    selected,
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    monthButton: ["monthButton", disabled && "disabled", selected && "selected"]
  };
  return composeClasses(slots, getPickersMonthUtilityClass, classes);
};
const PickersMonthRoot = styled("div", {
  name: "MuiPickersMonth",
  slot: "Root",
  overridesResolver: (_2, styles2) => [styles2.root]
})(({
  ownerState
}) => ({
  flexBasis: ownerState.monthsPerRow === 3 ? "33.3%" : "25%",
  display: "flex",
  alignItems: "center",
  justifyContent: "center"
}));
const PickersMonthButton = styled("button", {
  name: "MuiPickersMonth",
  slot: "MonthButton",
  overridesResolver: (_2, styles2) => [styles2.monthButton, {
    [`&.${pickersMonthClasses.disabled}`]: styles2.disabled
  }, {
    [`&.${pickersMonthClasses.selected}`]: styles2.selected
  }]
})(({
  theme
}) => _extends$1({
  color: "unset",
  backgroundColor: "transparent",
  border: 0,
  outline: 0
}, theme.typography.subtitle1, {
  margin: "8px 0",
  height: 36,
  width: 72,
  borderRadius: 18,
  cursor: "pointer",
  "&:focus": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
  },
  "&:hover": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
  },
  "&:disabled": {
    cursor: "auto",
    pointerEvents: "none"
  },
  [`&.${pickersMonthClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.secondary
  },
  [`&.${pickersMonthClasses.selected}`]: {
    color: (theme.vars || theme).palette.primary.contrastText,
    backgroundColor: (theme.vars || theme).palette.primary.main,
    "&:focus, &:hover": {
      backgroundColor: (theme.vars || theme).palette.primary.dark
    }
  }
}));
const PickersMonth = /* @__PURE__ */ reactExports.memo(function PickersMonth2(inProps) {
  const props = useThemeProps({
    props: inProps,
    name: "MuiPickersMonth"
  });
  const {
    autoFocus,
    children,
    disabled,
    selected,
    value,
    tabIndex,
    onClick: onClick2,
    onKeyDown,
    onFocus,
    onBlur,
    "aria-current": ariaCurrent,
    "aria-label": ariaLabel
    // We don't want to forward this prop to the root element
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$5);
  const ref2 = reactExports.useRef(null);
  const classes = useUtilityClasses$5(props);
  useEnhancedEffect(() => {
    if (autoFocus) {
      var _ref$current;
      (_ref$current = ref2.current) == null || _ref$current.focus();
    }
  }, [autoFocus]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersMonthRoot, _extends$1({
    className: classes.root,
    ownerState: props
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(PickersMonthButton, {
      ref: ref2,
      disabled,
      type: "button",
      role: "radio",
      tabIndex: disabled ? -1 : tabIndex,
      "aria-current": ariaCurrent,
      "aria-checked": selected,
      "aria-label": ariaLabel,
      onClick: (event) => onClick2(event, value),
      onKeyDown: (event) => onKeyDown(event, value),
      onFocus: (event) => onFocus(event, value),
      onBlur: (event) => onBlur(event, value),
      className: classes.monthButton,
      ownerState: props,
      children
    })
  }));
});
function getMonthCalendarUtilityClass(slot) {
  return generateUtilityClass("MuiMonthCalendar", slot);
}
generateUtilityClasses("MuiMonthCalendar", ["root"]);
const _excluded$4 = ["className", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "shouldDisableMonth", "readOnly", "disableHighlightToday", "autoFocus", "onMonthFocus", "hasFocus", "onFocusedViewChange", "monthsPerRow", "timezone", "gridLabelId"];
const useUtilityClasses$4 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getMonthCalendarUtilityClass, classes);
};
function useMonthCalendarDefaultizedProps(props, name) {
  const utils2 = useUtils();
  const defaultDates = useDefaultDates();
  const themeProps = useThemeProps({
    props,
    name
  });
  return _extends$1({
    disableFuture: false,
    disablePast: false
  }, themeProps, {
    minDate: applyDefaultDate(utils2, themeProps.minDate, defaultDates.minDate),
    maxDate: applyDefaultDate(utils2, themeProps.maxDate, defaultDates.maxDate)
  });
}
const MonthCalendarRoot = styled("div", {
  name: "MuiMonthCalendar",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  display: "flex",
  flexWrap: "wrap",
  alignContent: "stretch",
  padding: "0 4px",
  width: DIALOG_WIDTH,
  // avoid padding increasing width over defined
  boxSizing: "border-box"
});
const MonthCalendar = /* @__PURE__ */ reactExports.forwardRef(function MonthCalendar2(inProps, ref2) {
  const props = useMonthCalendarDefaultizedProps(inProps, "MuiMonthCalendar");
  const {
    className,
    value: valueProp,
    defaultValue,
    referenceDate: referenceDateProp,
    disabled,
    disableFuture,
    disablePast,
    maxDate,
    minDate,
    onChange,
    shouldDisableMonth,
    readOnly,
    disableHighlightToday,
    autoFocus = false,
    onMonthFocus,
    hasFocus,
    onFocusedViewChange,
    monthsPerRow = 3,
    timezone: timezoneProp,
    gridLabelId
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$4);
  const {
    value,
    handleValueChange,
    timezone
  } = useControlledValueWithTimezone({
    name: "MonthCalendar",
    timezone: timezoneProp,
    value: valueProp,
    defaultValue,
    onChange,
    valueManager: singleItemValueManager
  });
  const now = useNow(timezone);
  const theme = useTheme$3();
  const utils2 = useUtils();
  const referenceDate = reactExports.useMemo(
    () => singleItemValueManager.getInitialReferenceValue({
      value,
      utils: utils2,
      props,
      timezone,
      referenceDate: referenceDateProp,
      granularity: SECTION_TYPE_GRANULARITY.month
    }),
    []
    // eslint-disable-line react-hooks/exhaustive-deps
  );
  const ownerState = props;
  const classes = useUtilityClasses$4(ownerState);
  const todayMonth = reactExports.useMemo(() => utils2.getMonth(now), [utils2, now]);
  const selectedMonth = reactExports.useMemo(() => {
    if (value != null) {
      return utils2.getMonth(value);
    }
    if (disableHighlightToday) {
      return null;
    }
    return utils2.getMonth(referenceDate);
  }, [value, utils2, disableHighlightToday, referenceDate]);
  const [focusedMonth, setFocusedMonth] = reactExports.useState(() => selectedMonth || todayMonth);
  const [internalHasFocus, setInternalHasFocus] = useControlled({
    name: "MonthCalendar",
    state: "hasFocus",
    controlled: hasFocus,
    default: autoFocus != null ? autoFocus : false
  });
  const changeHasFocus = useEventCallback((newHasFocus) => {
    setInternalHasFocus(newHasFocus);
    if (onFocusedViewChange) {
      onFocusedViewChange(newHasFocus);
    }
  });
  const isMonthDisabled = reactExports.useCallback((dateToValidate) => {
    const firstEnabledMonth = utils2.startOfMonth(disablePast && utils2.isAfter(now, minDate) ? now : minDate);
    const lastEnabledMonth = utils2.startOfMonth(disableFuture && utils2.isBefore(now, maxDate) ? now : maxDate);
    const monthToValidate = utils2.startOfMonth(dateToValidate);
    if (utils2.isBefore(monthToValidate, firstEnabledMonth)) {
      return true;
    }
    if (utils2.isAfter(monthToValidate, lastEnabledMonth)) {
      return true;
    }
    if (!shouldDisableMonth) {
      return false;
    }
    return shouldDisableMonth(monthToValidate);
  }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableMonth, utils2]);
  const handleMonthSelection = useEventCallback((event, month) => {
    if (readOnly) {
      return;
    }
    const newDate = utils2.setMonth(value != null ? value : referenceDate, month);
    handleValueChange(newDate);
  });
  const focusMonth = useEventCallback((month) => {
    if (!isMonthDisabled(utils2.setMonth(value != null ? value : referenceDate, month))) {
      setFocusedMonth(month);
      changeHasFocus(true);
      if (onMonthFocus) {
        onMonthFocus(month);
      }
    }
  });
  reactExports.useEffect(() => {
    setFocusedMonth((prevFocusedMonth) => selectedMonth !== null && prevFocusedMonth !== selectedMonth ? selectedMonth : prevFocusedMonth);
  }, [selectedMonth]);
  const handleKeyDown2 = useEventCallback((event, month) => {
    const monthsInYear = 12;
    const monthsInRow = 3;
    switch (event.key) {
      case "ArrowUp":
        focusMonth((monthsInYear + month - monthsInRow) % monthsInYear);
        event.preventDefault();
        break;
      case "ArrowDown":
        focusMonth((monthsInYear + month + monthsInRow) % monthsInYear);
        event.preventDefault();
        break;
      case "ArrowLeft":
        focusMonth((monthsInYear + month + (theme.direction === "ltr" ? -1 : 1)) % monthsInYear);
        event.preventDefault();
        break;
      case "ArrowRight":
        focusMonth((monthsInYear + month + (theme.direction === "ltr" ? 1 : -1)) % monthsInYear);
        event.preventDefault();
        break;
    }
  });
  const handleMonthFocus = useEventCallback((event, month) => {
    focusMonth(month);
  });
  const handleMonthBlur = useEventCallback((event, month) => {
    if (focusedMonth === month) {
      changeHasFocus(false);
    }
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(MonthCalendarRoot, _extends$1({
    ref: ref2,
    className: clsx$3(classes.root, className),
    ownerState,
    role: "radiogroup",
    "aria-labelledby": gridLabelId
  }, other, {
    children: getMonthsInYear(utils2, value != null ? value : referenceDate).map((month) => {
      const monthNumber = utils2.getMonth(month);
      const monthText = utils2.format(month, "monthShort");
      const monthLabel = utils2.format(month, "month");
      const isSelected = monthNumber === selectedMonth;
      const isDisabled = disabled || isMonthDisabled(month);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersMonth, {
        selected: isSelected,
        value: monthNumber,
        onClick: handleMonthSelection,
        onKeyDown: handleKeyDown2,
        autoFocus: internalHasFocus && monthNumber === focusedMonth,
        disabled: isDisabled,
        tabIndex: monthNumber === focusedMonth ? 0 : -1,
        onFocus: handleMonthFocus,
        onBlur: handleMonthBlur,
        "aria-current": todayMonth === monthNumber ? "date" : void 0,
        "aria-label": monthLabel,
        monthsPerRow,
        children: monthText
      }, monthText);
    })
  }));
});
function getPickersYearUtilityClass(slot) {
  return generateUtilityClass("MuiPickersYear", slot);
}
const pickersYearClasses = generateUtilityClasses("MuiPickersYear", ["root", "yearButton", "selected", "disabled"]);
const _excluded$3 = ["autoFocus", "className", "children", "disabled", "selected", "value", "tabIndex", "onClick", "onKeyDown", "onFocus", "onBlur", "aria-current", "yearsPerRow"];
const useUtilityClasses$3 = (ownerState) => {
  const {
    disabled,
    selected,
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    yearButton: ["yearButton", disabled && "disabled", selected && "selected"]
  };
  return composeClasses(slots, getPickersYearUtilityClass, classes);
};
const PickersYearRoot = styled("div", {
  name: "MuiPickersYear",
  slot: "Root",
  overridesResolver: (_2, styles2) => [styles2.root]
})(({
  ownerState
}) => ({
  flexBasis: ownerState.yearsPerRow === 3 ? "33.3%" : "25%",
  display: "flex",
  alignItems: "center",
  justifyContent: "center"
}));
const PickersYearButton = styled("button", {
  name: "MuiPickersYear",
  slot: "YearButton",
  overridesResolver: (_2, styles2) => [styles2.yearButton, {
    [`&.${pickersYearClasses.disabled}`]: styles2.disabled
  }, {
    [`&.${pickersYearClasses.selected}`]: styles2.selected
  }]
})(({
  theme
}) => _extends$1({
  color: "unset",
  backgroundColor: "transparent",
  border: 0,
  outline: 0
}, theme.typography.subtitle1, {
  margin: "6px 0",
  height: 36,
  width: 72,
  borderRadius: 18,
  cursor: "pointer",
  "&:focus": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.action.active, theme.palette.action.focusOpacity)
  },
  "&:hover": {
    backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
  },
  "&:disabled": {
    cursor: "auto",
    pointerEvents: "none"
  },
  [`&.${pickersYearClasses.disabled}`]: {
    color: (theme.vars || theme).palette.text.secondary
  },
  [`&.${pickersYearClasses.selected}`]: {
    color: (theme.vars || theme).palette.primary.contrastText,
    backgroundColor: (theme.vars || theme).palette.primary.main,
    "&:focus, &:hover": {
      backgroundColor: (theme.vars || theme).palette.primary.dark
    }
  }
}));
const PickersYear = /* @__PURE__ */ reactExports.memo(function PickersYear2(inProps) {
  const props = useThemeProps({
    props: inProps,
    name: "MuiPickersYear"
  });
  const {
    autoFocus,
    className,
    children,
    disabled,
    selected,
    value,
    tabIndex,
    onClick: onClick2,
    onKeyDown,
    onFocus,
    onBlur,
    "aria-current": ariaCurrent
    // We don't want to forward this prop to the root element
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$3);
  const ref2 = reactExports.useRef(null);
  const classes = useUtilityClasses$3(props);
  reactExports.useEffect(() => {
    if (autoFocus) {
      ref2.current.focus();
    }
  }, [autoFocus]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersYearRoot, _extends$1({
    className: clsx$3(classes.root, className),
    ownerState: props
  }, other, {
    children: /* @__PURE__ */ jsxRuntimeExports.jsx(PickersYearButton, {
      ref: ref2,
      disabled,
      type: "button",
      role: "radio",
      tabIndex: disabled ? -1 : tabIndex,
      "aria-current": ariaCurrent,
      "aria-checked": selected,
      onClick: (event) => onClick2(event, value),
      onKeyDown: (event) => onKeyDown(event, value),
      onFocus: (event) => onFocus(event, value),
      onBlur: (event) => onBlur(event, value),
      className: classes.yearButton,
      ownerState: props,
      children
    })
  }));
});
function getYearCalendarUtilityClass(slot) {
  return generateUtilityClass("MuiYearCalendar", slot);
}
generateUtilityClasses("MuiYearCalendar", ["root"]);
const _excluded$2 = ["autoFocus", "className", "value", "defaultValue", "referenceDate", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onChange", "readOnly", "shouldDisableYear", "disableHighlightToday", "onYearFocus", "hasFocus", "onFocusedViewChange", "yearsPerRow", "timezone", "gridLabelId"];
const useUtilityClasses$2 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"]
  };
  return composeClasses(slots, getYearCalendarUtilityClass, classes);
};
function useYearCalendarDefaultizedProps(props, name) {
  var _themeProps$yearsPerR;
  const utils2 = useUtils();
  const defaultDates = useDefaultDates();
  const themeProps = useThemeProps({
    props,
    name
  });
  return _extends$1({
    disablePast: false,
    disableFuture: false
  }, themeProps, {
    yearsPerRow: (_themeProps$yearsPerR = themeProps.yearsPerRow) != null ? _themeProps$yearsPerR : 3,
    minDate: applyDefaultDate(utils2, themeProps.minDate, defaultDates.minDate),
    maxDate: applyDefaultDate(utils2, themeProps.maxDate, defaultDates.maxDate)
  });
}
const YearCalendarRoot = styled("div", {
  name: "MuiYearCalendar",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  display: "flex",
  flexDirection: "row",
  flexWrap: "wrap",
  overflowY: "auto",
  height: "100%",
  padding: "0 4px",
  width: DIALOG_WIDTH,
  maxHeight: MAX_CALENDAR_HEIGHT,
  // avoid padding increasing width over defined
  boxSizing: "border-box",
  position: "relative"
});
const YearCalendar = /* @__PURE__ */ reactExports.forwardRef(function YearCalendar2(inProps, ref2) {
  const props = useYearCalendarDefaultizedProps(inProps, "MuiYearCalendar");
  const {
    autoFocus,
    className,
    value: valueProp,
    defaultValue,
    referenceDate: referenceDateProp,
    disabled,
    disableFuture,
    disablePast,
    maxDate,
    minDate,
    onChange,
    readOnly,
    shouldDisableYear,
    disableHighlightToday,
    onYearFocus,
    hasFocus,
    onFocusedViewChange,
    yearsPerRow,
    timezone: timezoneProp,
    gridLabelId
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$2);
  const {
    value,
    handleValueChange,
    timezone
  } = useControlledValueWithTimezone({
    name: "YearCalendar",
    timezone: timezoneProp,
    value: valueProp,
    defaultValue,
    onChange,
    valueManager: singleItemValueManager
  });
  const now = useNow(timezone);
  const theme = useTheme$3();
  const utils2 = useUtils();
  const referenceDate = reactExports.useMemo(
    () => singleItemValueManager.getInitialReferenceValue({
      value,
      utils: utils2,
      props,
      timezone,
      referenceDate: referenceDateProp,
      granularity: SECTION_TYPE_GRANULARITY.year
    }),
    []
    // eslint-disable-line react-hooks/exhaustive-deps
  );
  const ownerState = props;
  const classes = useUtilityClasses$2(ownerState);
  const todayYear = reactExports.useMemo(() => utils2.getYear(now), [utils2, now]);
  const selectedYear = reactExports.useMemo(() => {
    if (value != null) {
      return utils2.getYear(value);
    }
    if (disableHighlightToday) {
      return null;
    }
    return utils2.getYear(referenceDate);
  }, [value, utils2, disableHighlightToday, referenceDate]);
  const [focusedYear, setFocusedYear] = reactExports.useState(() => selectedYear || todayYear);
  const [internalHasFocus, setInternalHasFocus] = useControlled({
    name: "YearCalendar",
    state: "hasFocus",
    controlled: hasFocus,
    default: autoFocus != null ? autoFocus : false
  });
  const changeHasFocus = useEventCallback((newHasFocus) => {
    setInternalHasFocus(newHasFocus);
    if (onFocusedViewChange) {
      onFocusedViewChange(newHasFocus);
    }
  });
  const isYearDisabled = reactExports.useCallback((dateToValidate) => {
    if (disablePast && utils2.isBeforeYear(dateToValidate, now)) {
      return true;
    }
    if (disableFuture && utils2.isAfterYear(dateToValidate, now)) {
      return true;
    }
    if (minDate && utils2.isBeforeYear(dateToValidate, minDate)) {
      return true;
    }
    if (maxDate && utils2.isAfterYear(dateToValidate, maxDate)) {
      return true;
    }
    if (!shouldDisableYear) {
      return false;
    }
    const yearToValidate = utils2.startOfYear(dateToValidate);
    return shouldDisableYear(yearToValidate);
  }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableYear, utils2]);
  const handleYearSelection = useEventCallback((event, year2) => {
    if (readOnly) {
      return;
    }
    const newDate = utils2.setYear(value != null ? value : referenceDate, year2);
    handleValueChange(newDate);
  });
  const focusYear = useEventCallback((year2) => {
    if (!isYearDisabled(utils2.setYear(value != null ? value : referenceDate, year2))) {
      setFocusedYear(year2);
      changeHasFocus(true);
      onYearFocus == null || onYearFocus(year2);
    }
  });
  reactExports.useEffect(() => {
    setFocusedYear((prevFocusedYear) => selectedYear !== null && prevFocusedYear !== selectedYear ? selectedYear : prevFocusedYear);
  }, [selectedYear]);
  const handleKeyDown2 = useEventCallback((event, year2) => {
    switch (event.key) {
      case "ArrowUp":
        focusYear(year2 - yearsPerRow);
        event.preventDefault();
        break;
      case "ArrowDown":
        focusYear(year2 + yearsPerRow);
        event.preventDefault();
        break;
      case "ArrowLeft":
        focusYear(year2 + (theme.direction === "ltr" ? -1 : 1));
        event.preventDefault();
        break;
      case "ArrowRight":
        focusYear(year2 + (theme.direction === "ltr" ? 1 : -1));
        event.preventDefault();
        break;
    }
  });
  const handleYearFocus = useEventCallback((event, year2) => {
    focusYear(year2);
  });
  const handleYearBlur = useEventCallback((event, year2) => {
    if (focusedYear === year2) {
      changeHasFocus(false);
    }
  });
  const scrollerRef = reactExports.useRef(null);
  const handleRef = useForkRef(ref2, scrollerRef);
  reactExports.useEffect(() => {
    if (autoFocus || scrollerRef.current === null) {
      return;
    }
    const tabbableButton = scrollerRef.current.querySelector('[tabindex="0"]');
    if (!tabbableButton) {
      return;
    }
    const offsetHeight = tabbableButton.offsetHeight;
    const offsetTop = tabbableButton.offsetTop;
    const clientHeight = scrollerRef.current.clientHeight;
    const scrollTop = scrollerRef.current.scrollTop;
    const elementBottom = offsetTop + offsetHeight;
    if (offsetHeight > clientHeight || offsetTop < scrollTop) {
      return;
    }
    scrollerRef.current.scrollTop = elementBottom - clientHeight / 2 - offsetHeight / 2;
  }, [autoFocus]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(YearCalendarRoot, _extends$1({
    ref: handleRef,
    className: clsx$3(classes.root, className),
    ownerState,
    role: "radiogroup",
    "aria-labelledby": gridLabelId
  }, other, {
    children: utils2.getYearRange(minDate, maxDate).map((year2) => {
      const yearNumber = utils2.getYear(year2);
      const isSelected = yearNumber === selectedYear;
      const isDisabled = disabled || isYearDisabled(year2);
      return /* @__PURE__ */ jsxRuntimeExports.jsx(PickersYear, {
        selected: isSelected,
        value: yearNumber,
        onClick: handleYearSelection,
        onKeyDown: handleKeyDown2,
        autoFocus: internalHasFocus && yearNumber === focusedYear,
        disabled: isDisabled,
        tabIndex: yearNumber === focusedYear ? 0 : -1,
        onFocus: handleYearFocus,
        onBlur: handleYearBlur,
        "aria-current": todayYear === yearNumber ? "date" : void 0,
        yearsPerRow,
        children: utils2.format(year2, "year")
      }, utils2.format(year2, "year"));
    })
  }));
});
const getPickersCalendarHeaderUtilityClass = (slot) => generateUtilityClass("MuiPickersCalendarHeader", slot);
const pickersCalendarHeaderClasses = generateUtilityClasses("MuiPickersCalendarHeader", ["root", "labelContainer", "label", "switchViewButton", "switchViewIcon"]);
const _excluded$1 = ["slots", "slotProps", "components", "componentsProps", "currentMonth", "disabled", "disableFuture", "disablePast", "maxDate", "minDate", "onMonthChange", "onViewChange", "view", "reduceAnimations", "views", "labelId", "className", "timezone"], _excluded2 = ["ownerState"];
const useUtilityClasses$1 = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    labelContainer: ["labelContainer"],
    label: ["label"],
    switchViewButton: ["switchViewButton"],
    switchViewIcon: ["switchViewIcon"]
  };
  return composeClasses(slots, getPickersCalendarHeaderUtilityClass, classes);
};
const PickersCalendarHeaderRoot = styled("div", {
  name: "MuiPickersCalendarHeader",
  slot: "Root",
  overridesResolver: (_2, styles2) => styles2.root
})({
  display: "flex",
  alignItems: "center",
  marginTop: 16,
  marginBottom: 8,
  paddingLeft: 24,
  paddingRight: 12,
  // prevent jumping in safari
  maxHeight: 30,
  minHeight: 30
});
const PickersCalendarHeaderLabelContainer = styled("div", {
  name: "MuiPickersCalendarHeader",
  slot: "LabelContainer",
  overridesResolver: (_2, styles2) => styles2.labelContainer
})(({
  theme
}) => _extends$1({
  display: "flex",
  overflow: "hidden",
  alignItems: "center",
  cursor: "pointer",
  marginRight: "auto"
}, theme.typography.body1, {
  fontWeight: theme.typography.fontWeightMedium
}));
const PickersCalendarHeaderLabel = styled("div", {
  name: "MuiPickersCalendarHeader",
  slot: "Label",
  overridesResolver: (_2, styles2) => styles2.label
})({
  marginRight: 6
});
const PickersCalendarHeaderSwitchViewButton = styled(IconButton, {
  name: "MuiPickersCalendarHeader",
  slot: "SwitchViewButton",
  overridesResolver: (_2, styles2) => styles2.switchViewButton
})(({
  ownerState
}) => _extends$1({
  marginRight: "auto"
}, ownerState.view === "year" && {
  [`.${pickersCalendarHeaderClasses.switchViewIcon}`]: {
    transform: "rotate(180deg)"
  }
}));
const PickersCalendarHeaderSwitchViewIcon = styled(ArrowDropDownIcon$1, {
  name: "MuiPickersCalendarHeader",
  slot: "SwitchViewIcon",
  overridesResolver: (_2, styles2) => styles2.switchViewIcon
})(({
  theme
}) => ({
  willChange: "transform",
  transition: theme.transitions.create("transform"),
  transform: "rotate(0deg)"
}));
const PickersCalendarHeader = /* @__PURE__ */ reactExports.forwardRef(function PickersCalendarHeader2(inProps, ref2) {
  var _ref, _slots$switchViewButt, _ref2, _slots$switchViewIcon;
  const localeText = useLocaleText();
  const utils2 = useUtils();
  const props = useThemeProps({
    props: inProps,
    name: "MuiPickersCalendarHeader"
  });
  const {
    slots,
    slotProps,
    components,
    currentMonth: month,
    disabled,
    disableFuture,
    disablePast,
    maxDate,
    minDate,
    onMonthChange,
    onViewChange,
    view,
    reduceAnimations,
    views,
    labelId,
    className,
    timezone
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded$1);
  const ownerState = props;
  const classes = useUtilityClasses$1(props);
  const SwitchViewButton = (_ref = (_slots$switchViewButt = slots == null ? void 0 : slots.switchViewButton) != null ? _slots$switchViewButt : components == null ? void 0 : components.SwitchViewButton) != null ? _ref : PickersCalendarHeaderSwitchViewButton;
  const switchViewButtonProps = useSlotProps({
    elementType: SwitchViewButton,
    externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewButton,
    additionalProps: {
      size: "small",
      "aria-label": localeText.calendarViewSwitchingButtonAriaLabel(view)
    },
    ownerState,
    className: classes.switchViewButton
  });
  const SwitchViewIcon = (_ref2 = (_slots$switchViewIcon = slots == null ? void 0 : slots.switchViewIcon) != null ? _slots$switchViewIcon : components == null ? void 0 : components.SwitchViewIcon) != null ? _ref2 : PickersCalendarHeaderSwitchViewIcon;
  const _useSlotProps = useSlotProps({
    elementType: SwitchViewIcon,
    externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon,
    ownerState: void 0,
    className: classes.switchViewIcon
  }), switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);
  const selectNextMonth = () => onMonthChange(utils2.addMonths(month, 1), "left");
  const selectPreviousMonth = () => onMonthChange(utils2.addMonths(month, -1), "right");
  const isNextMonthDisabled = useNextMonthDisabled(month, {
    disableFuture,
    maxDate,
    timezone
  });
  const isPreviousMonthDisabled = usePreviousMonthDisabled(month, {
    disablePast,
    minDate,
    timezone
  });
  const handleToggleView = () => {
    if (views.length === 1 || !onViewChange || disabled) {
      return;
    }
    if (views.length === 2) {
      onViewChange(views.find((el) => el !== view) || views[0]);
    } else {
      const nextIndexToOpen = views.indexOf(view) !== 0 ? 0 : 1;
      onViewChange(views[nextIndexToOpen]);
    }
  };
  if (views.length === 1 && views[0] === "year") {
    return null;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(PickersCalendarHeaderRoot, _extends$1({}, other, {
    ownerState,
    className: clsx$3(className, classes.root),
    ref: ref2,
    children: [/* @__PURE__ */ jsxRuntimeExports.jsxs(PickersCalendarHeaderLabelContainer, {
      role: "presentation",
      onClick: handleToggleView,
      ownerState,
      "aria-live": "polite",
      className: classes.labelContainer,
      children: [/* @__PURE__ */ jsxRuntimeExports.jsx(PickersFadeTransitionGroup, {
        reduceAnimations,
        transKey: utils2.format(month, "monthAndYear"),
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(PickersCalendarHeaderLabel, {
          id: labelId,
          ownerState,
          className: classes.label,
          children: utils2.format(month, "monthAndYear")
        })
      }), views.length > 1 && !disabled && /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchViewButton, _extends$1({}, switchViewButtonProps, {
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(SwitchViewIcon, _extends$1({}, switchViewIconProps))
      }))]
    }), /* @__PURE__ */ jsxRuntimeExports.jsx(Fade, {
      in: view === "day",
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(PickersArrowSwitcher, {
        slots,
        slotProps,
        onGoToPrevious: selectPreviousMonth,
        isPreviousDisabled: isPreviousMonthDisabled,
        previousLabel: localeText.previousMonth,
        onGoToNext: selectNextMonth,
        isNextDisabled: isNextMonthDisabled,
        nextLabel: localeText.nextMonth
      })
    })]
  }));
});
const getDateCalendarUtilityClass = (slot) => generateUtilityClass("MuiDateCalendar", slot);
generateUtilityClasses("MuiDateCalendar", ["root", "viewTransitionContainer"]);
const _excluded = ["autoFocus", "onViewChange", "value", "defaultValue", "referenceDate", "disableFuture", "disablePast", "defaultCalendarMonth", "onChange", "onYearChange", "onMonthChange", "reduceAnimations", "shouldDisableDate", "shouldDisableMonth", "shouldDisableYear", "view", "views", "openTo", "className", "disabled", "readOnly", "minDate", "maxDate", "disableHighlightToday", "focusedView", "onFocusedViewChange", "showDaysOutsideCurrentMonth", "fixedWeekNumber", "dayOfWeekFormatter", "components", "componentsProps", "slots", "slotProps", "loading", "renderLoading", "displayWeekNumber", "yearsPerRow", "monthsPerRow", "timezone"];
const useUtilityClasses = (ownerState) => {
  const {
    classes
  } = ownerState;
  const slots = {
    root: ["root"],
    viewTransitionContainer: ["viewTransitionContainer"]
  };
  return composeClasses(slots, getDateCalendarUtilityClass, classes);
};
function useDateCalendarDefaultizedProps(props, name) {
  var _themeProps$loading, _themeProps$disablePa, _themeProps$disableFu, _themeProps$openTo, _themeProps$views, _themeProps$reduceAni, _themeProps$renderLoa;
  const utils2 = useUtils();
  const defaultDates = useDefaultDates();
  const defaultReduceAnimations = useDefaultReduceAnimations();
  const themeProps = useThemeProps({
    props,
    name
  });
  return _extends$1({}, themeProps, {
    loading: (_themeProps$loading = themeProps.loading) != null ? _themeProps$loading : false,
    disablePast: (_themeProps$disablePa = themeProps.disablePast) != null ? _themeProps$disablePa : false,
    disableFuture: (_themeProps$disableFu = themeProps.disableFuture) != null ? _themeProps$disableFu : false,
    openTo: (_themeProps$openTo = themeProps.openTo) != null ? _themeProps$openTo : "day",
    views: (_themeProps$views = themeProps.views) != null ? _themeProps$views : ["year", "day"],
    reduceAnimations: (_themeProps$reduceAni = themeProps.reduceAnimations) != null ? _themeProps$reduceAni : defaultReduceAnimations,
    renderLoading: (_themeProps$renderLoa = themeProps.renderLoading) != null ? _themeProps$renderLoa : () => /* @__PURE__ */ jsxRuntimeExports.jsx("span", {
      children: "..."
    }),
    minDate: applyDefaultDate(utils2, themeProps.minDate, defaultDates.minDate),
    maxDate: applyDefaultDate(utils2, themeProps.maxDate, defaultDates.maxDate)
  });
}
const DateCalendarRoot = styled(PickerViewRoot, {
  name: "MuiDateCalendar",
  slot: "Root",
  overridesResolver: (props, styles2) => styles2.root
})({
  display: "flex",
  flexDirection: "column",
  height: VIEW_HEIGHT
});
const DateCalendarViewTransitionContainer = styled(PickersFadeTransitionGroup, {
  name: "MuiDateCalendar",
  slot: "ViewTransitionContainer",
  overridesResolver: (props, styles2) => styles2.viewTransitionContainer
})({});
const DateCalendar = /* @__PURE__ */ reactExports.forwardRef(function DateCalendar2(inProps, ref2) {
  var _ref, _slots$calendarHeader, _slotProps$calendarHe;
  const utils2 = useUtils();
  const id = useId$1();
  const props = useDateCalendarDefaultizedProps(inProps, "MuiDateCalendar");
  const {
    autoFocus,
    onViewChange,
    value: valueProp,
    defaultValue,
    referenceDate: referenceDateProp,
    disableFuture,
    disablePast,
    defaultCalendarMonth,
    onChange,
    onYearChange,
    onMonthChange,
    reduceAnimations,
    shouldDisableDate,
    shouldDisableMonth,
    shouldDisableYear,
    view: inView,
    views,
    openTo,
    className,
    disabled,
    readOnly,
    minDate,
    maxDate,
    disableHighlightToday,
    focusedView: inFocusedView,
    onFocusedViewChange,
    showDaysOutsideCurrentMonth,
    fixedWeekNumber,
    dayOfWeekFormatter,
    components,
    componentsProps,
    slots,
    slotProps,
    loading,
    renderLoading,
    displayWeekNumber,
    yearsPerRow,
    monthsPerRow,
    timezone: timezoneProp
  } = props, other = _objectWithoutPropertiesLoose(props, _excluded);
  const {
    value,
    handleValueChange,
    timezone
  } = useControlledValueWithTimezone({
    name: "DateCalendar",
    timezone: timezoneProp,
    value: valueProp,
    defaultValue,
    onChange,
    valueManager: singleItemValueManager
  });
  const {
    view,
    setView,
    focusedView,
    setFocusedView,
    goToNextView,
    setValueAndGoToNextView
  } = useViews({
    view: inView,
    views,
    openTo,
    onChange: handleValueChange,
    onViewChange,
    autoFocus,
    focusedView: inFocusedView,
    onFocusedViewChange
  });
  const {
    referenceDate,
    calendarState,
    changeFocusedDay,
    changeMonth,
    handleChangeMonth,
    isDateDisabled,
    onMonthSwitchingAnimationEnd
  } = useCalendarState({
    value,
    defaultCalendarMonth,
    referenceDate: referenceDateProp,
    reduceAnimations,
    onMonthChange,
    minDate,
    maxDate,
    shouldDisableDate,
    disablePast,
    disableFuture,
    timezone
  });
  const minDateWithDisabled = disabled && value || minDate;
  const maxDateWithDisabled = disabled && value || maxDate;
  const gridLabelId = `${id}-grid-label`;
  const hasFocus = focusedView !== null;
  const CalendarHeader = (_ref = (_slots$calendarHeader = slots == null ? void 0 : slots.calendarHeader) != null ? _slots$calendarHeader : components == null ? void 0 : components.CalendarHeader) != null ? _ref : PickersCalendarHeader;
  const calendarHeaderProps = useSlotProps({
    elementType: CalendarHeader,
    externalSlotProps: (_slotProps$calendarHe = slotProps == null ? void 0 : slotProps.calendarHeader) != null ? _slotProps$calendarHe : componentsProps == null ? void 0 : componentsProps.calendarHeader,
    additionalProps: {
      views,
      view,
      currentMonth: calendarState.currentMonth,
      onViewChange: setView,
      onMonthChange: (newMonth, direction2) => handleChangeMonth({
        newMonth,
        direction: direction2
      }),
      minDate: minDateWithDisabled,
      maxDate: maxDateWithDisabled,
      disabled,
      disablePast,
      disableFuture,
      reduceAnimations,
      timezone,
      labelId: gridLabelId,
      slots,
      slotProps
    },
    ownerState: props
  });
  const handleDateMonthChange = useEventCallback((newDate) => {
    const startOfMonth = utils2.startOfMonth(newDate);
    const endOfMonth = utils2.endOfMonth(newDate);
    const closestEnabledDate = isDateDisabled(newDate) ? findClosestEnabledDate({
      utils: utils2,
      date: newDate,
      minDate: utils2.isBefore(minDate, startOfMonth) ? startOfMonth : minDate,
      maxDate: utils2.isAfter(maxDate, endOfMonth) ? endOfMonth : maxDate,
      disablePast,
      disableFuture,
      isDateDisabled,
      timezone
    }) : newDate;
    if (closestEnabledDate) {
      setValueAndGoToNextView(closestEnabledDate, "finish");
      onMonthChange == null || onMonthChange(startOfMonth);
    } else {
      goToNextView();
      changeMonth(startOfMonth);
    }
    changeFocusedDay(closestEnabledDate, true);
  });
  const handleDateYearChange = useEventCallback((newDate) => {
    const startOfYear = utils2.startOfYear(newDate);
    const endOfYear = utils2.endOfYear(newDate);
    const closestEnabledDate = isDateDisabled(newDate) ? findClosestEnabledDate({
      utils: utils2,
      date: newDate,
      minDate: utils2.isBefore(minDate, startOfYear) ? startOfYear : minDate,
      maxDate: utils2.isAfter(maxDate, endOfYear) ? endOfYear : maxDate,
      disablePast,
      disableFuture,
      isDateDisabled,
      timezone
    }) : newDate;
    if (closestEnabledDate) {
      setValueAndGoToNextView(closestEnabledDate, "finish");
      onYearChange == null || onYearChange(closestEnabledDate);
    } else {
      goToNextView();
      changeMonth(startOfYear);
    }
    changeFocusedDay(closestEnabledDate, true);
  });
  const handleSelectedDayChange = useEventCallback((day) => {
    if (day) {
      return handleValueChange(mergeDateAndTime(utils2, day, value != null ? value : referenceDate), "finish", view);
    }
    return handleValueChange(day, "finish", view);
  });
  reactExports.useEffect(() => {
    if (value != null && utils2.isValid(value)) {
      changeMonth(value);
    }
  }, [value]);
  const ownerState = props;
  const classes = useUtilityClasses(ownerState);
  const baseDateValidationProps = {
    disablePast,
    disableFuture,
    maxDate,
    minDate
  };
  const commonViewProps = {
    disableHighlightToday,
    readOnly,
    disabled,
    timezone,
    gridLabelId
  };
  const prevOpenViewRef = reactExports.useRef(view);
  reactExports.useEffect(() => {
    if (prevOpenViewRef.current === view) {
      return;
    }
    if (focusedView === prevOpenViewRef.current) {
      setFocusedView(view, true);
    }
    prevOpenViewRef.current = view;
  }, [focusedView, setFocusedView, view]);
  const selectedDays = reactExports.useMemo(() => [value], [value]);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(DateCalendarRoot, _extends$1({
    ref: ref2,
    className: clsx$3(classes.root, className),
    ownerState
  }, other, {
    children: [/* @__PURE__ */ jsxRuntimeExports.jsx(CalendarHeader, _extends$1({}, calendarHeaderProps)), /* @__PURE__ */ jsxRuntimeExports.jsx(DateCalendarViewTransitionContainer, {
      reduceAnimations,
      className: classes.viewTransitionContainer,
      transKey: view,
      ownerState,
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
        children: [view === "year" && /* @__PURE__ */ jsxRuntimeExports.jsx(YearCalendar, _extends$1({}, baseDateValidationProps, commonViewProps, {
          value,
          onChange: handleDateYearChange,
          shouldDisableYear,
          hasFocus,
          onFocusedViewChange: (isViewFocused) => setFocusedView("year", isViewFocused),
          yearsPerRow,
          referenceDate
        })), view === "month" && /* @__PURE__ */ jsxRuntimeExports.jsx(MonthCalendar, _extends$1({}, baseDateValidationProps, commonViewProps, {
          hasFocus,
          className,
          value,
          onChange: handleDateMonthChange,
          shouldDisableMonth,
          onFocusedViewChange: (isViewFocused) => setFocusedView("month", isViewFocused),
          monthsPerRow,
          referenceDate
        })), view === "day" && /* @__PURE__ */ jsxRuntimeExports.jsx(DayCalendar, _extends$1({}, calendarState, baseDateValidationProps, commonViewProps, {
          onMonthSwitchingAnimationEnd,
          onFocusedDayChange: changeFocusedDay,
          reduceAnimations,
          selectedDays,
          onSelectedDaysChange: handleSelectedDayChange,
          shouldDisableDate,
          shouldDisableMonth,
          shouldDisableYear,
          hasFocus,
          onFocusedViewChange: (isViewFocused) => setFocusedView("day", isViewFocused),
          showDaysOutsideCurrentMonth,
          fixedWeekNumber,
          dayOfWeekFormatter,
          displayWeekNumber,
          components,
          componentsProps,
          slots,
          slotProps,
          loading,
          renderLoading
        }))]
      })
    })]
  }));
});
var weekOfYear$2 = { exports: {} };
var weekOfYear$1 = weekOfYear$2.exports;
var hasRequiredWeekOfYear;
function requireWeekOfYear() {
  if (hasRequiredWeekOfYear) return weekOfYear$2.exports;
  hasRequiredWeekOfYear = 1;
  (function(module2, exports2) {
    !function(e2, t) {
      module2.exports = t();
    }(weekOfYear$1, function() {
      var e2 = "week", t = "year";
      return function(i, n, r2) {
        var f2 = n.prototype;
        f2.week = function(i2) {
          if (void 0 === i2 && (i2 = null), null !== i2) return this.add(7 * (i2 - this.week()), "day");
          var n2 = this.$locale().yearStart || 1;
          if (11 === this.month() && this.date() > 25) {
            var f3 = r2(this).startOf(t).add(1, t).date(n2), s = r2(this).endOf(e2);
            if (f3.isBefore(s)) return 1;
          }
          var a2 = r2(this).startOf(t).date(n2).startOf(e2).subtract(1, "millisecond"), o = this.diff(a2, e2, true);
          return o < 0 ? r2(this).startOf("week").week() : Math.ceil(o);
        }, f2.weeks = function(e3) {
          return void 0 === e3 && (e3 = null), this.week(e3);
        };
      };
    });
  })(weekOfYear$2);
  return weekOfYear$2.exports;
}
var weekOfYearExports = requireWeekOfYear();
const weekOfYear = /* @__PURE__ */ getDefaultExportFromCjs(weekOfYearExports);
var customParseFormat$1 = { exports: {} };
var customParseFormat = customParseFormat$1.exports;
var hasRequiredCustomParseFormat;
function requireCustomParseFormat() {
  if (hasRequiredCustomParseFormat) return customParseFormat$1.exports;
  hasRequiredCustomParseFormat = 1;
  (function(module2, exports2) {
    !function(e2, t) {
      module2.exports = t();
    }(customParseFormat, function() {
      var e2 = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, t = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, n = /\d/, r2 = /\d\d/, i = /\d\d?/, o = /\d*[^-_:/,()\s\d]+/, s = {}, a2 = function(e3) {
        return (e3 = +e3) + (e3 > 68 ? 1900 : 2e3);
      };
      var f2 = function(e3) {
        return function(t2) {
          this[e3] = +t2;
        };
      }, h2 = [/[+-]\d\d:?(\d\d)?|Z/, function(e3) {
        (this.zone || (this.zone = {})).offset = function(e4) {
          if (!e4) return 0;
          if ("Z" === e4) return 0;
          var t2 = e4.match(/([+-]|\d\d)/g), n2 = 60 * t2[1] + (+t2[2] || 0);
          return 0 === n2 ? 0 : "+" === t2[0] ? -n2 : n2;
        }(e3);
      }], u2 = function(e3) {
        var t2 = s[e3];
        return t2 && (t2.indexOf ? t2 : t2.s.concat(t2.f));
      }, d2 = function(e3, t2) {
        var n2, r3 = s.meridiem;
        if (r3) {
          for (var i2 = 1; i2 <= 24; i2 += 1) if (e3.indexOf(r3(i2, 0, t2)) > -1) {
            n2 = i2 > 12;
            break;
          }
        } else n2 = e3 === (t2 ? "pm" : "PM");
        return n2;
      }, c = { A: [o, function(e3) {
        this.afternoon = d2(e3, false);
      }], a: [o, function(e3) {
        this.afternoon = d2(e3, true);
      }], Q: [n, function(e3) {
        this.month = 3 * (e3 - 1) + 1;
      }], S: [n, function(e3) {
        this.milliseconds = 100 * +e3;
      }], SS: [r2, function(e3) {
        this.milliseconds = 10 * +e3;
      }], SSS: [/\d{3}/, function(e3) {
        this.milliseconds = +e3;
      }], s: [i, f2("seconds")], ss: [i, f2("seconds")], m: [i, f2("minutes")], mm: [i, f2("minutes")], H: [i, f2("hours")], h: [i, f2("hours")], HH: [i, f2("hours")], hh: [i, f2("hours")], D: [i, f2("day")], DD: [r2, f2("day")], Do: [o, function(e3) {
        var t2 = s.ordinal, n2 = e3.match(/\d+/);
        if (this.day = n2[0], t2) for (var r3 = 1; r3 <= 31; r3 += 1) t2(r3).replace(/\[|\]/g, "") === e3 && (this.day = r3);
      }], w: [i, f2("week")], ww: [r2, f2("week")], M: [i, f2("month")], MM: [r2, f2("month")], MMM: [o, function(e3) {
        var t2 = u2("months"), n2 = (u2("monthsShort") || t2.map(function(e4) {
          return e4.slice(0, 3);
        })).indexOf(e3) + 1;
        if (n2 < 1) throw new Error();
        this.month = n2 % 12 || n2;
      }], MMMM: [o, function(e3) {
        var t2 = u2("months").indexOf(e3) + 1;
        if (t2 < 1) throw new Error();
        this.month = t2 % 12 || t2;
      }], Y: [/[+-]?\d+/, f2("year")], YY: [r2, function(e3) {
        this.year = a2(e3);
      }], YYYY: [/\d{4}/, f2("year")], Z: h2, ZZ: h2 };
      function l(n2) {
        var r3, i2;
        r3 = n2, i2 = s && s.formats;
        for (var o2 = (n2 = r3.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t2, n3, r4) {
          var o3 = r4 && r4.toUpperCase();
          return n3 || i2[r4] || e2[r4] || i2[o3].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e3, t3, n4) {
            return t3 || n4.slice(1);
          });
        })).match(t), a3 = o2.length, f3 = 0; f3 < a3; f3 += 1) {
          var h3 = o2[f3], u3 = c[h3], d3 = u3 && u3[0], l2 = u3 && u3[1];
          o2[f3] = l2 ? { regex: d3, parser: l2 } : h3.replace(/^\[|\]$/g, "");
        }
        return function(e3) {
          for (var t2 = {}, n3 = 0, r4 = 0; n3 < a3; n3 += 1) {
            var i3 = o2[n3];
            if ("string" == typeof i3) r4 += i3.length;
            else {
              var s2 = i3.regex, f4 = i3.parser, h4 = e3.slice(r4), u4 = s2.exec(h4)[0];
              f4.call(t2, u4), e3 = e3.replace(u4, "");
            }
          }
          return function(e4) {
            var t3 = e4.afternoon;
            if (void 0 !== t3) {
              var n4 = e4.hours;
              t3 ? n4 < 12 && (e4.hours += 12) : 12 === n4 && (e4.hours = 0), delete e4.afternoon;
            }
          }(t2), t2;
        };
      }
      return function(e3, t2, n2) {
        n2.p.customParseFormat = true, e3 && e3.parseTwoDigitYear && (a2 = e3.parseTwoDigitYear);
        var r3 = t2.prototype, i2 = r3.parse;
        r3.parse = function(e4) {
          var t3 = e4.date, r4 = e4.utc, o2 = e4.args;
          this.$u = r4;
          var a3 = o2[1];
          if ("string" == typeof a3) {
            var f3 = true === o2[2], h3 = true === o2[3], u3 = f3 || h3, d3 = o2[2];
            h3 && (d3 = o2[2]), s = this.$locale(), !f3 && d3 && (s = n2.Ls[d3]), this.$d = function(e5, t4, n3, r5) {
              try {
                if (["x", "X"].indexOf(t4) > -1) return new Date(("X" === t4 ? 1e3 : 1) * e5);
                var i3 = l(t4)(e5), o3 = i3.year, s2 = i3.month, a4 = i3.day, f4 = i3.hours, h4 = i3.minutes, u4 = i3.seconds, d4 = i3.milliseconds, c3 = i3.zone, m3 = i3.week, M3 = /* @__PURE__ */ new Date(), Y = a4 || (o3 || s2 ? 1 : M3.getDate()), p2 = o3 || M3.getFullYear(), v2 = 0;
                o3 && !s2 || (v2 = s2 > 0 ? s2 - 1 : M3.getMonth());
                var D2, w = f4 || 0, g2 = h4 || 0, y2 = u4 || 0, L2 = d4 || 0;
                return c3 ? new Date(Date.UTC(p2, v2, Y, w, g2, y2, L2 + 60 * c3.offset * 1e3)) : n3 ? new Date(Date.UTC(p2, v2, Y, w, g2, y2, L2)) : (D2 = new Date(p2, v2, Y, w, g2, y2, L2), m3 && (D2 = r5(D2).week(m3).toDate()), D2);
              } catch (e6) {
                return /* @__PURE__ */ new Date("");
              }
            }(t3, a3, r4, n2), this.init(), d3 && true !== d3 && (this.$L = this.locale(d3).$L), u3 && t3 != this.format(a3) && (this.$d = /* @__PURE__ */ new Date("")), s = {};
          } else if (a3 instanceof Array) for (var c2 = a3.length, m2 = 1; m2 <= c2; m2 += 1) {
            o2[1] = a3[m2 - 1];
            var M2 = n2.apply(this, o2);
            if (M2.isValid()) {
              this.$d = M2.$d, this.$L = M2.$L, this.init();
              break;
            }
            m2 === c2 && (this.$d = /* @__PURE__ */ new Date(""));
          }
          else i2.call(this, e4);
        };
      };
    });
  })(customParseFormat$1);
  return customParseFormat$1.exports;
}
var customParseFormatExports = requireCustomParseFormat();
const customParseFormatPlugin = /* @__PURE__ */ getDefaultExportFromCjs(customParseFormatExports);
var localizedFormat$1 = { exports: {} };
var localizedFormat = localizedFormat$1.exports;
var hasRequiredLocalizedFormat;
function requireLocalizedFormat() {
  if (hasRequiredLocalizedFormat) return localizedFormat$1.exports;
  hasRequiredLocalizedFormat = 1;
  (function(module2, exports2) {
    !function(e2, t) {
      module2.exports = t();
    }(localizedFormat, function() {
      var e2 = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" };
      return function(t, o, n) {
        var r2 = o.prototype, i = r2.format;
        n.en.formats = e2, r2.format = function(t2) {
          void 0 === t2 && (t2 = "YYYY-MM-DDTHH:mm:ssZ");
          var o2 = this.$locale().formats, n2 = function(t3, o3) {
            return t3.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, function(t4, n3, r3) {
              var i2 = r3 && r3.toUpperCase();
              return n3 || o3[r3] || e2[r3] || o3[i2].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(e3, t5, o4) {
                return t5 || o4.slice(1);
              });
            });
          }(t2, void 0 === o2 ? {} : o2);
          return i.call(this, n2);
        };
      };
    });
  })(localizedFormat$1);
  return localizedFormat$1.exports;
}
var localizedFormatExports = requireLocalizedFormat();
const localizedFormatPlugin = /* @__PURE__ */ getDefaultExportFromCjs(localizedFormatExports);
var isBetween$1 = { exports: {} };
var isBetween = isBetween$1.exports;
var hasRequiredIsBetween;
function requireIsBetween() {
  if (hasRequiredIsBetween) return isBetween$1.exports;
  hasRequiredIsBetween = 1;
  (function(module2, exports2) {
    !function(e2, i) {
      module2.exports = i();
    }(isBetween, function() {
      return function(e2, i, t) {
        i.prototype.isBetween = function(e3, i2, s, f2) {
          var n = t(e3), o = t(i2), r2 = "(" === (f2 = f2 || "()")[0], u2 = ")" === f2[1];
          return (r2 ? this.isAfter(n, s) : !this.isBefore(n, s)) && (u2 ? this.isBefore(o, s) : !this.isAfter(o, s)) || (r2 ? this.isBefore(n, s) : !this.isAfter(n, s)) && (u2 ? this.isAfter(o, s) : !this.isBefore(o, s));
        };
      };
    });
  })(isBetween$1);
  return isBetween$1.exports;
}
var isBetweenExports = requireIsBetween();
const isBetweenPlugin = /* @__PURE__ */ getDefaultExportFromCjs(isBetweenExports);
dayjs.extend(customParseFormatPlugin);
dayjs.extend(localizedFormatPlugin);
dayjs.extend(isBetweenPlugin);
const localeNotFoundWarning = buildWarning(["Your locale has not been found.", "Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale", "Or you forget to import the locale from 'dayjs/locale/{localeUsed}'", "fallback on English locale"]);
const formatTokenMap = {
  // Year
  YY: "year",
  YYYY: {
    sectionType: "year",
    contentType: "digit",
    maxLength: 4
  },
  // Month
  M: {
    sectionType: "month",
    contentType: "digit",
    maxLength: 2
  },
  MM: "month",
  MMM: {
    sectionType: "month",
    contentType: "letter"
  },
  MMMM: {
    sectionType: "month",
    contentType: "letter"
  },
  // Day of the month
  D: {
    sectionType: "day",
    contentType: "digit",
    maxLength: 2
  },
  DD: "day",
  Do: {
    sectionType: "day",
    contentType: "digit-with-letter"
  },
  // Day of the week
  d: {
    sectionType: "weekDay",
    contentType: "digit",
    maxLength: 2
  },
  dd: {
    sectionType: "weekDay",
    contentType: "letter"
  },
  ddd: {
    sectionType: "weekDay",
    contentType: "letter"
  },
  dddd: {
    sectionType: "weekDay",
    contentType: "letter"
  },
  // Meridiem
  A: "meridiem",
  a: "meridiem",
  // Hours
  H: {
    sectionType: "hours",
    contentType: "digit",
    maxLength: 2
  },
  HH: "hours",
  h: {
    sectionType: "hours",
    contentType: "digit",
    maxLength: 2
  },
  hh: "hours",
  // Minutes
  m: {
    sectionType: "minutes",
    contentType: "digit",
    maxLength: 2
  },
  mm: "minutes",
  // Seconds
  s: {
    sectionType: "seconds",
    contentType: "digit",
    maxLength: 2
  },
  ss: "seconds"
};
const defaultFormats = {
  year: "YYYY",
  month: "MMMM",
  monthShort: "MMM",
  dayOfMonth: "D",
  weekday: "dddd",
  weekdayShort: "dd",
  hours24h: "HH",
  hours12h: "hh",
  meridiem: "A",
  minutes: "mm",
  seconds: "ss",
  fullDate: "ll",
  fullDateWithWeekday: "dddd, LL",
  keyboardDate: "L",
  shortDate: "MMM D",
  normalDate: "D MMMM",
  normalDateWithWeekday: "ddd, MMM D",
  monthAndYear: "MMMM YYYY",
  monthAndDate: "MMMM D",
  fullTime: "LT",
  fullTime12h: "hh:mm A",
  fullTime24h: "HH:mm",
  fullDateTime: "lll",
  fullDateTime12h: "ll hh:mm A",
  fullDateTime24h: "ll HH:mm",
  keyboardDateTime: "L LT",
  keyboardDateTime12h: "L hh:mm A",
  keyboardDateTime24h: "L HH:mm"
};
const MISSING_UTC_PLUGIN = ["Missing UTC plugin", "To be able to use UTC or timezones, you have to enable the `utc` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n");
const MISSING_TIMEZONE_PLUGIN = ["Missing timezone plugin", "To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");
const withLocale = (dayjs2, locale) => !locale ? dayjs2 : (...args) => dayjs2(...args).locale(locale);
class AdapterDayjs {
  constructor({
    locale: _locale,
    formats: formats2,
    instance
  } = {}) {
    var _this$rawDayJsInstanc;
    this.isMUIAdapter = true;
    this.isTimezoneCompatible = true;
    this.lib = "dayjs";
    this.rawDayJsInstance = void 0;
    this.dayjs = void 0;
    this.locale = void 0;
    this.formats = void 0;
    this.escapedCharacters = {
      start: "[",
      end: "]"
    };
    this.formatTokenMap = formatTokenMap;
    this.setLocaleToValue = (value) => {
      const expectedLocale = this.getCurrentLocaleCode();
      if (expectedLocale === value.locale()) {
        return value;
      }
      return value.locale(expectedLocale);
    };
    this.hasUTCPlugin = () => typeof dayjs.utc !== "undefined";
    this.hasTimezonePlugin = () => typeof dayjs.tz !== "undefined";
    this.isSame = (value, comparing, comparisonTemplate) => {
      const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));
      return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);
    };
    this.cleanTimezone = (timezone) => {
      switch (timezone) {
        case "default": {
          return void 0;
        }
        case "system": {
          return dayjs.tz.guess();
        }
        default: {
          return timezone;
        }
      }
    };
    this.createSystemDate = (value) => {
      if (this.rawDayJsInstance) {
        return this.rawDayJsInstance(value);
      }
      if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
        const timezone = dayjs.tz.guess();
        if (timezone !== "UTC") {
          return dayjs.tz(value, timezone);
        }
        return dayjs(value);
      }
      return dayjs(value);
    };
    this.createUTCDate = (value) => {
      if (!this.hasUTCPlugin()) {
        throw new Error(MISSING_UTC_PLUGIN);
      }
      return dayjs.utc(value);
    };
    this.createTZDate = (value, timezone) => {
      if (!this.hasUTCPlugin()) {
        throw new Error(MISSING_UTC_PLUGIN);
      }
      if (!this.hasTimezonePlugin()) {
        throw new Error(MISSING_TIMEZONE_PLUGIN);
      }
      const keepLocalTime = value !== void 0 && !value.endsWith("Z");
      return dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime);
    };
    this.getLocaleFormats = () => {
      const locales = dayjs.Ls;
      const locale = this.locale || "en";
      let localeObject = locales[locale];
      if (localeObject === void 0) {
        localeNotFoundWarning();
        localeObject = locales.en;
      }
      return localeObject.formats;
    };
    this.adjustOffset = (value) => {
      if (!this.hasTimezonePlugin()) {
        return value;
      }
      const timezone = this.getTimezone(value);
      if (timezone !== "UTC") {
        var _fixedValue$$offset, _value$$offset;
        const fixedValue = value.tz(this.cleanTimezone(timezone), true);
        if (((_fixedValue$$offset = fixedValue.$offset) != null ? _fixedValue$$offset : 0) === ((_value$$offset = value.$offset) != null ? _value$$offset : 0)) {
          return value;
        }
        value.$offset = fixedValue.$offset;
      }
      return value;
    };
    this.date = (value) => {
      if (value === null) {
        return null;
      }
      return this.dayjs(value);
    };
    this.dateWithTimezone = (value, timezone) => {
      if (value === null) {
        return null;
      }
      let parsedValue;
      if (timezone === "UTC") {
        parsedValue = this.createUTCDate(value);
      } else if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
        parsedValue = this.createSystemDate(value);
      } else {
        parsedValue = this.createTZDate(value, timezone);
      }
      if (this.locale === void 0) {
        return parsedValue;
      }
      return parsedValue.locale(this.locale);
    };
    this.getTimezone = (value) => {
      if (this.hasTimezonePlugin()) {
        var _value$$x;
        const zone = (_value$$x = value.$x) == null ? void 0 : _value$$x.$timezone;
        if (zone) {
          return zone;
        }
      }
      if (this.hasUTCPlugin() && value.isUTC()) {
        return "UTC";
      }
      return "system";
    };
    this.setTimezone = (value, timezone) => {
      if (this.getTimezone(value) === timezone) {
        return value;
      }
      if (timezone === "UTC") {
        if (!this.hasUTCPlugin()) {
          throw new Error(MISSING_UTC_PLUGIN);
        }
        return value.utc();
      }
      if (timezone === "system") {
        return value.local();
      }
      if (!this.hasTimezonePlugin()) {
        if (timezone === "default") {
          return value;
        }
        throw new Error(MISSING_TIMEZONE_PLUGIN);
      }
      return dayjs.tz(value, this.cleanTimezone(timezone));
    };
    this.toJsDate = (value) => {
      return value.toDate();
    };
    this.parseISO = (isoString) => {
      return this.dayjs(isoString);
    };
    this.toISO = (value) => {
      return value.toISOString();
    };
    this.parse = (value, format) => {
      if (value === "") {
        return null;
      }
      return this.dayjs(value, format, this.locale, true);
    };
    this.getCurrentLocaleCode = () => {
      return this.locale || "en";
    };
    this.is12HourCycleInCurrentLocale = () => {
      return /A|a/.test(this.getLocaleFormats().LT || "");
    };
    this.expandFormat = (format) => {
      const localeFormats = this.getLocaleFormats();
      const t = (formatBis) => formatBis.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, (_2, a2, b2) => a2 || b2.slice(1));
      return format.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_2, a2, b2) => {
        const B3 = b2 && b2.toUpperCase();
        return a2 || localeFormats[b2] || t(localeFormats[B3]);
      });
    };
    this.getFormatHelperText = (format) => {
      return this.expandFormat(format).replace(/a/gi, "(a|p)m").toLocaleLowerCase();
    };
    this.isNull = (value) => {
      return value === null;
    };
    this.isValid = (value) => {
      return this.dayjs(value).isValid();
    };
    this.format = (value, formatKey) => {
      return this.formatByString(value, this.formats[formatKey]);
    };
    this.formatByString = (value, formatString) => {
      return this.dayjs(value).format(formatString);
    };
    this.formatNumber = (numberToFormat) => {
      return numberToFormat;
    };
    this.getDiff = (value, comparing, unit) => {
      return value.diff(comparing, unit);
    };
    this.isEqual = (value, comparing) => {
      if (value === null && comparing === null) {
        return true;
      }
      return this.dayjs(value).toDate().getTime() === this.dayjs(comparing).toDate().getTime();
    };
    this.isSameYear = (value, comparing) => {
      return this.isSame(value, comparing, "YYYY");
    };
    this.isSameMonth = (value, comparing) => {
      return this.isSame(value, comparing, "YYYY-MM");
    };
    this.isSameDay = (value, comparing) => {
      return this.isSame(value, comparing, "YYYY-MM-DD");
    };
    this.isSameHour = (value, comparing) => {
      return value.isSame(comparing, "hour");
    };
    this.isAfter = (value, comparing) => {
      return value > comparing;
    };
    this.isAfterYear = (value, comparing) => {
      if (!this.hasUTCPlugin()) {
        return value.isAfter(comparing, "year");
      }
      return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();
    };
    this.isAfterDay = (value, comparing) => {
      if (!this.hasUTCPlugin()) {
        return value.isAfter(comparing, "day");
      }
      return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();
    };
    this.isBefore = (value, comparing) => {
      return value < comparing;
    };
    this.isBeforeYear = (value, comparing) => {
      if (!this.hasUTCPlugin()) {
        return value.isBefore(comparing, "year");
      }
      return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();
    };
    this.isBeforeDay = (value, comparing) => {
      if (!this.hasUTCPlugin()) {
        return value.isBefore(comparing, "day");
      }
      return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();
    };
    this.isWithinRange = (value, [start2, end2]) => {
      return value >= start2 && value <= end2;
    };
    this.startOfYear = (value) => {
      return this.adjustOffset(value.startOf("year"));
    };
    this.startOfMonth = (value) => {
      return this.adjustOffset(value.startOf("month"));
    };
    this.startOfWeek = (value) => {
      return this.adjustOffset(value.startOf("week"));
    };
    this.startOfDay = (value) => {
      return this.adjustOffset(value.startOf("day"));
    };
    this.endOfYear = (value) => {
      return this.adjustOffset(value.endOf("year"));
    };
    this.endOfMonth = (value) => {
      return this.adjustOffset(value.endOf("month"));
    };
    this.endOfWeek = (value) => {
      return this.adjustOffset(value.endOf("week"));
    };
    this.endOfDay = (value) => {
      return this.adjustOffset(value.endOf("day"));
    };
    this.addYears = (value, amount) => {
      return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "year") : value.add(amount, "year"));
    };
    this.addMonths = (value, amount) => {
      return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "month") : value.add(amount, "month"));
    };
    this.addWeeks = (value, amount) => {
      return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "week") : value.add(amount, "week"));
    };
    this.addDays = (value, amount) => {
      return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "day") : value.add(amount, "day"));
    };
    this.addHours = (value, amount) => {
      return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "hour") : value.add(amount, "hour"));
    };
    this.addMinutes = (value, amount) => {
      return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "minute") : value.add(amount, "minute"));
    };
    this.addSeconds = (value, amount) => {
      return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), "second") : value.add(amount, "second"));
    };
    this.getYear = (value) => {
      return value.year();
    };
    this.getMonth = (value) => {
      return value.month();
    };
    this.getDate = (value) => {
      return value.date();
    };
    this.getHours = (value) => {
      return value.hour();
    };
    this.getMinutes = (value) => {
      return value.minute();
    };
    this.getSeconds = (value) => {
      return value.second();
    };
    this.getMilliseconds = (value) => {
      return value.millisecond();
    };
    this.setYear = (value, year2) => {
      return this.adjustOffset(value.set("year", year2));
    };
    this.setMonth = (value, month) => {
      return this.adjustOffset(value.set("month", month));
    };
    this.setDate = (value, date) => {
      return this.adjustOffset(value.set("date", date));
    };
    this.setHours = (value, hours) => {
      return this.adjustOffset(value.set("hour", hours));
    };
    this.setMinutes = (value, minutes) => {
      return this.adjustOffset(value.set("minute", minutes));
    };
    this.setSeconds = (value, seconds) => {
      return this.adjustOffset(value.set("second", seconds));
    };
    this.setMilliseconds = (value, milliseconds) => {
      return this.adjustOffset(value.set("millisecond", milliseconds));
    };
    this.getDaysInMonth = (value) => {
      return value.daysInMonth();
    };
    this.getNextMonth = (value) => {
      return this.addMonths(value, 1);
    };
    this.getPreviousMonth = (value) => {
      return this.addMonths(value, -1);
    };
    this.getMonthArray = (value) => {
      const firstMonth = value.startOf("year");
      const monthArray = [firstMonth];
      while (monthArray.length < 12) {
        const prevMonth = monthArray[monthArray.length - 1];
        monthArray.push(this.addMonths(prevMonth, 1));
      }
      return monthArray;
    };
    this.mergeDateAndTime = (dateParam, timeParam) => {
      return dateParam.hour(timeParam.hour()).minute(timeParam.minute()).second(timeParam.second());
    };
    this.getWeekdays = () => {
      const start2 = this.dayjs().startOf("week");
      return [0, 1, 2, 3, 4, 5, 6].map((diff) => this.formatByString(this.addDays(start2, diff), "dd"));
    };
    this.getWeekArray = (value) => {
      const cleanValue = this.setLocaleToValue(value);
      const start2 = cleanValue.startOf("month").startOf("week");
      const end2 = cleanValue.endOf("month").endOf("week");
      let count = 0;
      let current = start2;
      const nestedWeeks = [];
      while (current < end2) {
        const weekNumber = Math.floor(count / 7);
        nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];
        nestedWeeks[weekNumber].push(current);
        current = this.addDays(current, 1);
        count += 1;
      }
      return nestedWeeks;
    };
    this.getWeekNumber = (value) => {
      return value.week();
    };
    this.getYearRange = (start2, end2) => {
      const startDate = start2.startOf("year");
      const endDate = end2.endOf("year");
      const years = [];
      let current = startDate;
      while (current < endDate) {
        years.push(current);
        current = this.addYears(current, 1);
      }
      return years;
    };
    this.getMeridiemText = (ampm) => {
      return ampm === "am" ? "AM" : "PM";
    };
    this.rawDayJsInstance = instance;
    this.dayjs = withLocale((_this$rawDayJsInstanc = this.rawDayJsInstance) != null ? _this$rawDayJsInstanc : dayjs, _locale);
    this.locale = _locale;
    this.formats = _extends$1({}, defaultFormats, formats2);
    dayjs.extend(weekOfYear);
  }
}
var ru$1 = { exports: {} };
var ru = ru$1.exports;
var hasRequiredRu;
function requireRu() {
  if (hasRequiredRu) return ru$1.exports;
  hasRequiredRu = 1;
  (function(module2, exports2) {
    !function(_2, t) {
      module2.exports = t(requireDayjs_min());
    }(ru, function(_2) {
      function t(_3) {
        return _3 && "object" == typeof _3 && "default" in _3 ? _3 : { default: _3 };
      }
      var e2 = t(_2), n = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"), s = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"), r2 = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"), o = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"), i = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
      function d2(_3, t2, e3) {
        var n2, s2;
        return "m" === e3 ? t2 ? "минута" : "минуту" : _3 + " " + (n2 = +_3, s2 = { mm: t2 ? "минута_минуты_минут" : "минуту_минуты_минут", hh: "час_часа_часов", dd: "день_дня_дней", MM: "месяц_месяца_месяцев", yy: "год_года_лет" }[e3].split("_"), n2 % 10 == 1 && n2 % 100 != 11 ? s2[0] : n2 % 10 >= 2 && n2 % 10 <= 4 && (n2 % 100 < 10 || n2 % 100 >= 20) ? s2[1] : s2[2]);
      }
      var u2 = function(_3, t2) {
        return i.test(t2) ? n[_3.month()] : s[_3.month()];
      };
      u2.s = s, u2.f = n;
      var a2 = function(_3, t2) {
        return i.test(t2) ? r2[_3.month()] : o[_3.month()];
      };
      a2.s = o, a2.f = r2;
      var m2 = { name: "ru", weekdays: "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"), weekdaysShort: "вск_пнд_втр_срд_чтв_птн_сбт".split("_"), weekdaysMin: "вс_пн_вт_ср_чт_пт_сб".split("_"), months: u2, monthsShort: a2, weekStart: 1, yearStart: 4, formats: { LT: "H:mm", LTS: "H:mm:ss", L: "DD.MM.YYYY", LL: "D MMMM YYYY г.", LLL: "D MMMM YYYY г., H:mm", LLLL: "dddd, D MMMM YYYY г., H:mm" }, relativeTime: { future: "через %s", past: "%s назад", s: "несколько секунд", m: d2, mm: d2, h: "час", hh: d2, d: "день", dd: d2, M: "месяц", MM: d2, y: "год", yy: d2 }, ordinal: function(_3) {
        return _3;
      }, meridiem: function(_3) {
        return _3 < 4 ? "ночи" : _3 < 12 ? "утра" : _3 < 17 ? "дня" : "вечера";
      } };
      return e2.default.locale(m2, null, true), m2;
    });
  })(ru$1);
  return ru$1.exports;
}
requireRu();
var KeyboardDoubleArrowLeft = {};
var hasRequiredKeyboardDoubleArrowLeft;
function requireKeyboardDoubleArrowLeft() {
  if (hasRequiredKeyboardDoubleArrowLeft) return KeyboardDoubleArrowLeft;
  hasRequiredKeyboardDoubleArrowLeft = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardDoubleArrowLeft, "__esModule", {
    value: true
  });
  KeyboardDoubleArrowLeft.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardDoubleArrowLeft.default = (0, _createSvgIcon.default)([/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6z"
  }, "0"), /* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6z"
  }, "1")], "KeyboardDoubleArrowLeft");
  return KeyboardDoubleArrowLeft;
}
var KeyboardDoubleArrowLeftExports = /* @__PURE__ */ requireKeyboardDoubleArrowLeft();
const KeyboardDoubleArrowLeftIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardDoubleArrowLeftExports);
var KeyboardDoubleArrowRight = {};
var hasRequiredKeyboardDoubleArrowRight;
function requireKeyboardDoubleArrowRight() {
  if (hasRequiredKeyboardDoubleArrowRight) return KeyboardDoubleArrowRight;
  hasRequiredKeyboardDoubleArrowRight = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardDoubleArrowRight, "__esModule", {
    value: true
  });
  KeyboardDoubleArrowRight.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardDoubleArrowRight.default = (0, _createSvgIcon.default)([/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6z"
  }, "0"), /* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6z"
  }, "1")], "KeyboardDoubleArrowRight");
  return KeyboardDoubleArrowRight;
}
var KeyboardDoubleArrowRightExports = /* @__PURE__ */ requireKeyboardDoubleArrowRight();
const KeyboardDoubleArrowRightIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardDoubleArrowRightExports);
var Today = {};
var hasRequiredToday;
function requireToday() {
  if (hasRequiredToday) return Today;
  hasRequiredToday = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Today, "__esModule", {
    value: true
  });
  Today.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Today.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V8h14zM7 10h5v5H7z"
  }), "Today");
  return Today;
}
var TodayExports = /* @__PURE__ */ requireToday();
const TodayIcon = /* @__PURE__ */ getDefaultExportFromCjs(TodayExports);
function DateCalendarEditor(props) {
  const calendar = React.useRef();
  const [value, setValue] = React.useState(null);
  reactExports.useEffect(() => {
    if (!props.open) return;
    if ((!props.inputValue || props.inputValue === ".." || props.inputValue === "__.__.____") && (!props.objRef || props.objRef === "0")) {
      const date = /* @__PURE__ */ new Date();
      setValue(dayjs(props.getDateInFormat(getStrDateOfDateObj(date))));
    }
  }, []);
  reactExports.useEffect(() => {
    if (!props.open) return;
    if ((!props.inputValue || props.inputValue === ".." || props.inputValue === "__.__.____") && (!props.objRef || props.objRef === "0")) {
      return;
    }
    setValue(dayjs(props.getDateInFormat(props.inputValue) || props.getDateInFormat(getDateOfInt(props.objRef))));
  }, [props.inputValue, props.objRef, props.open]);
  reactExports.useEffect(() => {
    if (calendar.current) {
      const prev2 = calendar.current.querySelector(".MuiIconButton-edgeEnd");
      if (prev2) {
        prev2.title = "Предыдущий месяц";
      }
      const next2 = calendar.current.querySelector(".MuiIconButton-edgeStart");
      if (next2) {
        next2.title = "Следующий месяц";
      }
    }
  }, [calendar.current]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Popover,
    {
      id: props.id,
      open: props.open,
      anchorEl: props.anchorEl,
      onClose: () => {
        props.handleClose();
      },
      anchorOrigin: {
        vertical: "bottom",
        horizontal: "left"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: calendar, calendar: "", children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "ru", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          DateCalendar,
          {
            showDaysOutsideCurrentMonth: true,
            views: ["year", "month", "day"],
            value,
            onChange: (newValue, comand) => {
              props.valueChanged.current = true;
              let value2 = `${newValue.get("date") < 10 ? `0${newValue.get("date")}` : newValue.get("date")}.${newValue.month() + 1 < 10 ? `0${newValue.month() + 1}` : newValue.month() + 1}.${newValue.year()}`;
              props.setInputValue(value2);
              setValue(newValue);
              if (comand === "finish") {
                props.onEditValue(void 0, value2);
                props.handleClose();
              }
            }
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", alignItems: "center", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              size: "small",
              title: "В начало года",
              onClick: () => {
                const date = props.getDateInFormat(props.inputValue) ? new Date(props.getDateInFormat(props.inputValue)) : /* @__PURE__ */ new Date();
                props.setInputValue(`01.01.${date.getFullYear()}`);
                setValue(dayjs(props.getDateInFormat(`01.01.${date.getFullYear()}`)));
                props.valueChanged.current = true;
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowLeftIcon, {})
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              title: "Текущая дата",
              onClick: () => {
                const date = /* @__PURE__ */ new Date();
                props.setInputValue(
                  `${date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()}.${date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1}.${date.getFullYear()}`
                );
                setValue(
                  dayjs(
                    props.getDateInFormat(
                      `${date.getDate() < 10 ? `0${date.getDate()}` : date.getDate()}.${date.getMonth() + 1 < 10 ? `0${date.getMonth() + 1}` : date.getMonth() + 1}.${date.getFullYear()}`
                    )
                  )
                );
                props.valueChanged.current = true;
              },
              size: "small",
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(TodayIcon, {})
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              title: "В конец года",
              onClick: () => {
                const date = props.getDateInFormat(props.inputValue) ? new Date(props.getDateInFormat(props.inputValue)) : /* @__PURE__ */ new Date();
                props.setInputValue(`31.12.${date.getFullYear()}`);
                setValue(dayjs(props.getDateInFormat(`31.12.${date.getFullYear()}`)));
                props.valueChanged.current = true;
              },
              size: "small",
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowRightIcon, {})
            }
          )
        ] })
      ] })
    }
  );
}
var CalendarToday = {};
var hasRequiredCalendarToday;
function requireCalendarToday() {
  if (hasRequiredCalendarToday) return CalendarToday;
  hasRequiredCalendarToday = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(CalendarToday, "__esModule", {
    value: true
  });
  CalendarToday.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  CalendarToday.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"
  }), "CalendarToday");
  return CalendarToday;
}
var CalendarTodayExports = /* @__PURE__ */ requireCalendarToday();
const CalendarTodayIcon = /* @__PURE__ */ getDefaultExportFromCjs(CalendarTodayExports);
function CalendarButton(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    IconButton,
    {
      ref: props.buttonRef,
      disabled: props.disabled,
      "aria-describedby": props.id,
      onClick: (ev) => {
        if (props.disabled) return;
        props.handleClick(ev);
      },
      className: "calendar-button",
      style: {
        width: "20px !important",
        height: "100%",
        borderRadius: "0px",
        padding: "0",
        display: props.EditStyle_Calendar ? "" : "none"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(CalendarTodayIcon, { style: { maxHeight: "17px" } })
    },
    `calendar_${props.itemId}`
  );
}
var ExpandMore = {};
var hasRequiredExpandMore;
function requireExpandMore() {
  if (hasRequiredExpandMore) return ExpandMore;
  hasRequiredExpandMore = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ExpandMore, "__esModule", {
    value: true
  });
  ExpandMore.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ExpandMore.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
  }), "ExpandMore");
  return ExpandMore;
}
var ExpandMoreExports = /* @__PURE__ */ requireExpandMore();
const ExpandMoreIcon = /* @__PURE__ */ getDefaultExportFromCjs(ExpandMoreExports);
var ExpandLess$1 = {};
var hasRequiredExpandLess;
function requireExpandLess() {
  if (hasRequiredExpandLess) return ExpandLess$1;
  hasRequiredExpandLess = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ExpandLess$1, "__esModule", {
    value: true
  });
  ExpandLess$1.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ExpandLess$1.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"
  }), "ExpandLess");
  return ExpandLess$1;
}
var ExpandLessExports = /* @__PURE__ */ requireExpandLess();
const ExpandLess = /* @__PURE__ */ getDefaultExportFromCjs(ExpandLessExports);
function UpDownButtons(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "column",
      justifyContent: "center",
      alignItems: "center",
      style: {
        height: "100%",
        borderRadius: "0px",
        padding: "0",
        display: props.EditStyle_UpDown ? "" : "none"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            disabled: props.disabled,
            style: {
              width: "20px !important",
              height: "50%",
              borderRadius: "0px",
              padding: "0"
            },
            onClick: () => {
              if (props.disabled) return;
              props.incValue(props.inputValue, props.setInputValue, props.valueChanged);
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandLess, { style: { maxHeight: "10px" } })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            disabled: props.disabled,
            style: {
              width: "20px !important",
              height: "50%",
              borderRadius: "0px",
              padding: "0"
            },
            onClick: () => {
              if (props.disabled) return;
              props.decValue(props.inputValue, props.setInputValue, props.valueChanged);
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { style: { maxHeight: "10px" } })
          }
        )
      ]
    }
  );
}
function PickListEditor(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    IconButton,
    {
      ref: props.buttonRef,
      disabled: props.disabled,
      "aria-describedby": props.id,
      className: "list-button",
      style: {
        width: "20px !important",
        height: "100%",
        borderRadius: "0px",
        padding: "0",
        display: props.EditStyle_PickList ? "flex" : "none"
      },
      onClick: (ev) => {
        if (props.disabled) return;
        props.onPickListClick(ev);
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { style: { maxHeight: "20px" } })
    },
    `picklist_${props.itemId}`
  );
}
var MoreHoriz = {};
var hasRequiredMoreHoriz;
function requireMoreHoriz() {
  if (hasRequiredMoreHoriz) return MoreHoriz;
  hasRequiredMoreHoriz = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(MoreHoriz, "__esModule", {
    value: true
  });
  MoreHoriz.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  MoreHoriz.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"
  }), "MoreHoriz");
  return MoreHoriz;
}
var MoreHorizExports = /* @__PURE__ */ requireMoreHoriz();
const MoreHorizIcon = /* @__PURE__ */ getDefaultExportFromCjs(MoreHorizExports);
var smart_window = {};
var hasRequiredSmart_window;
function requireSmart_window() {
  if (hasRequiredSmart_window) return smart_window;
  hasRequiredSmart_window = 1;
  (() => {
    var __webpack_modules__ = {
      /***/
      2737: (
        /***/
        (module2) => {
          var runtime = function(exports2) {
            var Op = Object.prototype;
            var hasOwn2 = Op.hasOwnProperty;
            var undefined$1;
            var $Symbol = typeof Symbol === "function" ? Symbol : {};
            var iteratorSymbol = $Symbol.iterator || "@@iterator";
            var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
            var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
            function define2(obj2, key, value) {
              Object.defineProperty(obj2, key, {
                value,
                enumerable: true,
                configurable: true,
                writable: true
              });
              return obj2[key];
            }
            try {
              define2({}, "");
            } catch (err) {
              define2 = function(obj2, key, value) {
                return obj2[key] = value;
              };
            }
            function wrap2(innerFn, outerFn, self2, tryLocsList) {
              var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
              var generator = Object.create(protoGenerator.prototype);
              var context = new Context2(tryLocsList || []);
              generator._invoke = makeInvokeMethod(innerFn, self2, context);
              return generator;
            }
            exports2.wrap = wrap2;
            function tryCatch(fn2, obj2, arg) {
              try {
                return { type: "normal", arg: fn2.call(obj2, arg) };
              } catch (err) {
                return { type: "throw", arg: err };
              }
            }
            var GenStateSuspendedStart = "suspendedStart";
            var GenStateSuspendedYield = "suspendedYield";
            var GenStateExecuting = "executing";
            var GenStateCompleted = "completed";
            var ContinueSentinel = {};
            function Generator() {
            }
            function GeneratorFunction() {
            }
            function GeneratorFunctionPrototype() {
            }
            var IteratorPrototype = {};
            IteratorPrototype[iteratorSymbol] = function() {
              return this;
            };
            var getProto2 = Object.getPrototypeOf;
            var NativeIteratorPrototype = getProto2 && getProto2(getProto2(values2([])));
            if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn2.call(NativeIteratorPrototype, iteratorSymbol)) {
              IteratorPrototype = NativeIteratorPrototype;
            }
            var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
            GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
            GeneratorFunctionPrototype.constructor = GeneratorFunction;
            GeneratorFunction.displayName = define2(
              GeneratorFunctionPrototype,
              toStringTagSymbol,
              "GeneratorFunction"
            );
            function defineIteratorMethods(prototype2) {
              ["next", "throw", "return"].forEach(function(method) {
                define2(prototype2, method, function(arg) {
                  return this._invoke(method, arg);
                });
              });
            }
            exports2.isGeneratorFunction = function(genFun) {
              var ctor = typeof genFun === "function" && genFun.constructor;
              return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
              // do is to check its .name property.
              (ctor.displayName || ctor.name) === "GeneratorFunction" : false;
            };
            exports2.mark = function(genFun) {
              if (Object.setPrototypeOf) {
                Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
              } else {
                genFun.__proto__ = GeneratorFunctionPrototype;
                define2(genFun, toStringTagSymbol, "GeneratorFunction");
              }
              genFun.prototype = Object.create(Gp);
              return genFun;
            };
            exports2.awrap = function(arg) {
              return { __await: arg };
            };
            function AsyncIterator(generator, PromiseImpl) {
              function invoke(method, arg, resolve, reject) {
                var record = tryCatch(generator[method], generator, arg);
                if (record.type === "throw") {
                  reject(record.arg);
                } else {
                  var result = record.arg;
                  var value = result.value;
                  if (value && typeof value === "object" && hasOwn2.call(value, "__await")) {
                    return PromiseImpl.resolve(value.__await).then(function(value2) {
                      invoke("next", value2, resolve, reject);
                    }, function(err) {
                      invoke("throw", err, resolve, reject);
                    });
                  }
                  return PromiseImpl.resolve(value).then(function(unwrapped) {
                    result.value = unwrapped;
                    resolve(result);
                  }, function(error) {
                    return invoke("throw", error, resolve, reject);
                  });
                }
              }
              var previousPromise;
              function enqueue(method, arg) {
                function callInvokeWithMethodAndArg() {
                  return new PromiseImpl(function(resolve, reject) {
                    invoke(method, arg, resolve, reject);
                  });
                }
                return previousPromise = // If enqueue has been called before, then we want to wait until
                // all previous Promises have been resolved before calling invoke,
                // so that results are always delivered in the correct order. If
                // enqueue has not been called before, then it is important to
                // call invoke immediately, without waiting on a callback to fire,
                // so that the async generator function has the opportunity to do
                // any necessary setup in a predictable way. This predictability
                // is why the Promise constructor synchronously invokes its
                // executor callback, and why async functions synchronously
                // execute code before the first await. Since we implement simple
                // async functions in terms of async generators, it is especially
                // important to get this right, even though it requires care.
                previousPromise ? previousPromise.then(
                  callInvokeWithMethodAndArg,
                  // Avoid propagating failures to Promises returned by later
                  // invocations of the iterator.
                  callInvokeWithMethodAndArg
                ) : callInvokeWithMethodAndArg();
              }
              this._invoke = enqueue;
            }
            defineIteratorMethods(AsyncIterator.prototype);
            AsyncIterator.prototype[asyncIteratorSymbol] = function() {
              return this;
            };
            exports2.AsyncIterator = AsyncIterator;
            exports2.async = function(innerFn, outerFn, self2, tryLocsList, PromiseImpl) {
              if (PromiseImpl === void 0) PromiseImpl = Promise;
              var iter = new AsyncIterator(
                wrap2(innerFn, outerFn, self2, tryLocsList),
                PromiseImpl
              );
              return exports2.isGeneratorFunction(outerFn) ? iter : iter.next().then(function(result) {
                return result.done ? result.value : iter.next();
              });
            };
            function makeInvokeMethod(innerFn, self2, context) {
              var state = GenStateSuspendedStart;
              return function invoke(method, arg) {
                if (state === GenStateExecuting) {
                  throw new Error("Generator is already running");
                }
                if (state === GenStateCompleted) {
                  if (method === "throw") {
                    throw arg;
                  }
                  return doneResult();
                }
                context.method = method;
                context.arg = arg;
                while (true) {
                  var delegate = context.delegate;
                  if (delegate) {
                    var delegateResult = maybeInvokeDelegate(delegate, context);
                    if (delegateResult) {
                      if (delegateResult === ContinueSentinel) continue;
                      return delegateResult;
                    }
                  }
                  if (context.method === "next") {
                    context.sent = context._sent = context.arg;
                  } else if (context.method === "throw") {
                    if (state === GenStateSuspendedStart) {
                      state = GenStateCompleted;
                      throw context.arg;
                    }
                    context.dispatchException(context.arg);
                  } else if (context.method === "return") {
                    context.abrupt("return", context.arg);
                  }
                  state = GenStateExecuting;
                  var record = tryCatch(innerFn, self2, context);
                  if (record.type === "normal") {
                    state = context.done ? GenStateCompleted : GenStateSuspendedYield;
                    if (record.arg === ContinueSentinel) {
                      continue;
                    }
                    return {
                      value: record.arg,
                      done: context.done
                    };
                  } else if (record.type === "throw") {
                    state = GenStateCompleted;
                    context.method = "throw";
                    context.arg = record.arg;
                  }
                }
              };
            }
            function maybeInvokeDelegate(delegate, context) {
              var method = delegate.iterator[context.method];
              if (method === undefined$1) {
                context.delegate = null;
                if (context.method === "throw") {
                  if (delegate.iterator["return"]) {
                    context.method = "return";
                    context.arg = undefined$1;
                    maybeInvokeDelegate(delegate, context);
                    if (context.method === "throw") {
                      return ContinueSentinel;
                    }
                  }
                  context.method = "throw";
                  context.arg = new TypeError(
                    "The iterator does not provide a 'throw' method"
                  );
                }
                return ContinueSentinel;
              }
              var record = tryCatch(method, delegate.iterator, context.arg);
              if (record.type === "throw") {
                context.method = "throw";
                context.arg = record.arg;
                context.delegate = null;
                return ContinueSentinel;
              }
              var info = record.arg;
              if (!info) {
                context.method = "throw";
                context.arg = new TypeError("iterator result is not an object");
                context.delegate = null;
                return ContinueSentinel;
              }
              if (info.done) {
                context[delegate.resultName] = info.value;
                context.next = delegate.nextLoc;
                if (context.method !== "return") {
                  context.method = "next";
                  context.arg = undefined$1;
                }
              } else {
                return info;
              }
              context.delegate = null;
              return ContinueSentinel;
            }
            defineIteratorMethods(Gp);
            define2(Gp, toStringTagSymbol, "Generator");
            Gp[iteratorSymbol] = function() {
              return this;
            };
            Gp.toString = function() {
              return "[object Generator]";
            };
            function pushTryEntry(locs) {
              var entry = { tryLoc: locs[0] };
              if (1 in locs) {
                entry.catchLoc = locs[1];
              }
              if (2 in locs) {
                entry.finallyLoc = locs[2];
                entry.afterLoc = locs[3];
              }
              this.tryEntries.push(entry);
            }
            function resetTryEntry(entry) {
              var record = entry.completion || {};
              record.type = "normal";
              delete record.arg;
              entry.completion = record;
            }
            function Context2(tryLocsList) {
              this.tryEntries = [{ tryLoc: "root" }];
              tryLocsList.forEach(pushTryEntry, this);
              this.reset(true);
            }
            exports2.keys = function(object) {
              var keys = [];
              for (var key in object) {
                keys.push(key);
              }
              keys.reverse();
              return function next2() {
                while (keys.length) {
                  var key2 = keys.pop();
                  if (key2 in object) {
                    next2.value = key2;
                    next2.done = false;
                    return next2;
                  }
                }
                next2.done = true;
                return next2;
              };
            };
            function values2(iterable) {
              if (iterable) {
                var iteratorMethod = iterable[iteratorSymbol];
                if (iteratorMethod) {
                  return iteratorMethod.call(iterable);
                }
                if (typeof iterable.next === "function") {
                  return iterable;
                }
                if (!isNaN(iterable.length)) {
                  var i = -1, next2 = function next3() {
                    while (++i < iterable.length) {
                      if (hasOwn2.call(iterable, i)) {
                        next3.value = iterable[i];
                        next3.done = false;
                        return next3;
                      }
                    }
                    next3.value = undefined$1;
                    next3.done = true;
                    return next3;
                  };
                  return next2.next = next2;
                }
              }
              return { next: doneResult };
            }
            exports2.values = values2;
            function doneResult() {
              return { value: undefined$1, done: true };
            }
            Context2.prototype = {
              constructor: Context2,
              reset: function(skipTempReset) {
                this.prev = 0;
                this.next = 0;
                this.sent = this._sent = undefined$1;
                this.done = false;
                this.delegate = null;
                this.method = "next";
                this.arg = undefined$1;
                this.tryEntries.forEach(resetTryEntry);
                if (!skipTempReset) {
                  for (var name in this) {
                    if (name.charAt(0) === "t" && hasOwn2.call(this, name) && !isNaN(+name.slice(1))) {
                      this[name] = undefined$1;
                    }
                  }
                }
              },
              stop: function() {
                this.done = true;
                var rootEntry = this.tryEntries[0];
                var rootRecord = rootEntry.completion;
                if (rootRecord.type === "throw") {
                  throw rootRecord.arg;
                }
                return this.rval;
              },
              dispatchException: function(exception) {
                if (this.done) {
                  throw exception;
                }
                var context = this;
                function handle(loc, caught) {
                  record.type = "throw";
                  record.arg = exception;
                  context.next = loc;
                  if (caught) {
                    context.method = "next";
                    context.arg = undefined$1;
                  }
                  return !!caught;
                }
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                  var entry = this.tryEntries[i];
                  var record = entry.completion;
                  if (entry.tryLoc === "root") {
                    return handle("end");
                  }
                  if (entry.tryLoc <= this.prev) {
                    var hasCatch = hasOwn2.call(entry, "catchLoc");
                    var hasFinally = hasOwn2.call(entry, "finallyLoc");
                    if (hasCatch && hasFinally) {
                      if (this.prev < entry.catchLoc) {
                        return handle(entry.catchLoc, true);
                      } else if (this.prev < entry.finallyLoc) {
                        return handle(entry.finallyLoc);
                      }
                    } else if (hasCatch) {
                      if (this.prev < entry.catchLoc) {
                        return handle(entry.catchLoc, true);
                      }
                    } else if (hasFinally) {
                      if (this.prev < entry.finallyLoc) {
                        return handle(entry.finallyLoc);
                      }
                    } else {
                      throw new Error("try statement without catch or finally");
                    }
                  }
                }
              },
              abrupt: function(type2, arg) {
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                  var entry = this.tryEntries[i];
                  if (entry.tryLoc <= this.prev && hasOwn2.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
                    var finallyEntry = entry;
                    break;
                  }
                }
                if (finallyEntry && (type2 === "break" || type2 === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) {
                  finallyEntry = null;
                }
                var record = finallyEntry ? finallyEntry.completion : {};
                record.type = type2;
                record.arg = arg;
                if (finallyEntry) {
                  this.method = "next";
                  this.next = finallyEntry.finallyLoc;
                  return ContinueSentinel;
                }
                return this.complete(record);
              },
              complete: function(record, afterLoc) {
                if (record.type === "throw") {
                  throw record.arg;
                }
                if (record.type === "break" || record.type === "continue") {
                  this.next = record.arg;
                } else if (record.type === "return") {
                  this.rval = this.arg = record.arg;
                  this.method = "return";
                  this.next = "end";
                } else if (record.type === "normal" && afterLoc) {
                  this.next = afterLoc;
                }
                return ContinueSentinel;
              },
              finish: function(finallyLoc) {
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                  var entry = this.tryEntries[i];
                  if (entry.finallyLoc === finallyLoc) {
                    this.complete(entry.completion, entry.afterLoc);
                    resetTryEntry(entry);
                    return ContinueSentinel;
                  }
                }
              },
              "catch": function(tryLoc) {
                for (var i = this.tryEntries.length - 1; i >= 0; --i) {
                  var entry = this.tryEntries[i];
                  if (entry.tryLoc === tryLoc) {
                    var record = entry.completion;
                    if (record.type === "throw") {
                      var thrown = record.arg;
                      resetTryEntry(entry);
                    }
                    return thrown;
                  }
                }
                throw new Error("illegal catch attempt");
              },
              delegateYield: function(iterable, resultName, nextLoc) {
                this.delegate = {
                  iterator: values2(iterable),
                  resultName,
                  nextLoc
                };
                if (this.method === "next") {
                  this.arg = undefined$1;
                }
                return ContinueSentinel;
              }
            };
            return exports2;
          }(
            // If this script is executing as a CommonJS module, use module.exports
            // as the regeneratorRuntime namespace. Otherwise create a new empty
            // object. Either way, the resulting object will be used to initialize
            // the regeneratorRuntime variable at the top of this file.
            module2.exports
          );
          try {
            regeneratorRuntime = runtime;
          } catch (accidentalStrictMode) {
            Function("r", "regeneratorRuntime = r")(runtime);
          }
        }
      ),
      /***/
      2612: (
        /***/
        () => {
          Smart("smart-button", class extends Smart.ContentElement {
            static get properties() {
              return { value: { type: "string" }, name: { type: "string" }, type: { value: "button", type: "string" }, clickMode: { allowedValues: ["hover", "press", "release", "pressAndRelease"], type: "string", value: "release" } };
            }
            static get styleUrls() {
              return ["smart.button.css"];
            }
            template() {
              return `<button class="smart-button smart-unselectable" inner-h-t-m-l='[[innerHTML]]' id='button' type='[[type]]' name='[[name]]' value='[[value]]' disabled='[[disabled]]' role="presentation"></button>`;
            }
            refresh() {
            }
            static get listeners() {
              return { "button.down": "_downHandler", "button.mouseenter": "_mouseEnterHandler", "button.mouseleave": "_mouseLeaveHandler", "button.touchend": "_touchEndHandler", "button.click": "_clickHandler", "button.up": "_upHandler", up: "_upHandler", "button.focus": "_focusHandler", "button.blur": "_blurHandler" };
            }
            focus() {
              const e2 = this;
              e2.$.button ? e2.$.button.focus() : HTMLElement.prototype.focus.call(e2);
            }
            blur() {
              const e2 = this;
              e2.$.button ? e2.$.button.blur() : HTMLElement.prototype.blur.call(e2);
            }
            _upHandler(e2) {
              const t = this;
              if (e2.stopPropagation(), t.$.setAttributeValue("active", false), t.dataset.target) {
                const n = document.querySelector(t.dataset.target);
                let a2 = t.dataset.toggle;
                const r2 = "smart-window".toLowerCase();
                if (n && n.nodeName.toLowerCase() === r2 && "modal" === a2 && (a2 = "openModal"), "tab" === a2 || "pill" === a2 || "list" === a2) {
                  const e3 = this.closest(".nav, .list-group"), a3 = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', r3 = !e3 || "UL" !== e3.nodeName && "OL" !== e3.nodeName ? e3.children(".active") : e3.querySelectorAll("li > .active");
                  if (e3) {
                    const n2 = e3.querySelectorAll(a3);
                    for (let e4 = 0; e4 < n2.length; e4++) n2[e4].classList.remove("primary");
                    for (let e4 = 0; e4 < r3.length; e4++) r3[e4].classList.remove("active");
                    let i = t.parentNode;
                    for (; i; ) {
                      if ("LI" === i.nodeName) {
                        i.classList.add("active");
                        break;
                      }
                      i = i.parentNode;
                    }
                    t.classList.add("primary");
                  }
                  return n.parentNode.querySelectorAll(".active").forEach((e4) => {
                    e4.classList.remove("active"), e4.classList.add("smart-hidden");
                  }), n.classList.add("active"), void n.classList.remove("smart-hidden");
                }
                a2 && n && !n[a2] && "collapse" === a2 && (setTimeout(() => {
                  n.classList.contains("smart-hidden") ? n.classList.remove("smart-hidden") : n.classList.add("smart-hidden");
                }), e2.originalEvent.preventDefault()), a2 && n && !n[a2] && "dropdown" === a2 ? (setTimeout(() => {
                  n.opened = !n.opened;
                }), e2.originalEvent.preventDefault()) : a2 && n && n[a2] && (setTimeout(() => {
                  n[a2]();
                }, 50), e2.originalEvent.preventDefault());
              }
            }
            _focusHandler() {
              this.$.setAttributeValue("focus", true), this.$.fireEvent("focus");
            }
            _blurHandler() {
              this.$.setAttributeValue("focus", false), this.$.fireEvent("blur");
            }
            _clickHandler(e2) {
              const t = this;
              ("release" !== t.clickMode && "pressAndRelease" !== t.clickMode || t.readonly) && (e2.preventDefault(), e2.stopPropagation());
            }
            _downHandler(e2) {
              const t = this;
              if (!(t.disabled || (t.hasRippleAnimation && Smart.Utilities.Animation.Ripple.animate(t, e2.pageX, e2.pageY), t.$.setAttributeValue("active", true), "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || t.readonly))) {
                if (t.hasAttribute("smart-blazor")) return void t.$.dispatchEvent(new Event("click"));
                const n = "buttons" in e2 ? e2.buttons : e2.which;
                t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY });
              }
            }
            _mouseEnterHandler(e2) {
              const t = this;
              if (!t.readonly && (t.$button.setAttributeValue("hover", true), t.$.setAttributeValue("hover", true), "hover" === t.clickMode)) {
                const n = "buttons" in e2 ? e2.buttons : e2.which;
                if (t.hasAttribute("smart-blazor")) return void t.$.dispatchEvent(new Event("click"));
                t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY });
              }
            }
            _touchEndHandler() {
              const e2 = this;
              setTimeout(function() {
                e2.$button.setAttributeValue("hover", false), e2.$.setAttributeValue("hover", false);
              }, 300);
            }
            _mouseLeaveHandler() {
              this.$button.setAttributeValue("hover", false), this.$.setAttributeValue("hover", false);
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const a2 = this;
              "disabled" === e2 ? (a2._setFocusable(), a2.$button && a2.$button.setAttributeValue("hover", false), a2.$.setAttributeValue("hover", false), a2 instanceof Smart.RepeatButton && a2._stopRepeat()) : "unfocusable" === e2 && a2._setFocusable();
            }
            _setFocusable() {
              const e2 = this, t = e2.$.button ? e2.$.button : e2;
              if (e2.disabled || e2.unfocusable) return t.removeAttribute("tabindex"), void (t.tabIndex = -1);
              t.tabIndex = e2.tabIndex > 0 ? e2.tabIndex : 0;
            }
            ready() {
              const e2 = this;
              super.ready(), e2.setAttribute("role", "button"), e2._setFocusable(), e2.enableShadowDOM && e2.$.hiddenInput && e2.appendChild(e2.$.hiddenInput);
            }
          }), Smart("smart-repeat-button", class extends Smart.Button {
            static get properties() {
              return { delay: { value: 50, type: "number" }, initialDelay: { value: 150, type: "number" } };
            }
            static get listeners() {
              return { "button.down": "_startRepeat", "button.mouseenter": "_overriddenHandler", "button.mouseleave": "_overriddenHandler", "button.pointerenter": "_updateInBoundsFlag", "button.pointerleave": "_updateInBoundsFlag", "button.touchmove": "_touchmoveHandler", "document.up": "_stopRepeat" };
            }
            _clickHandler(e2) {
              const t = this;
              ("release" !== t.clickMode || t.preventDefaultClick || t.readonly || t.disabled) && (e2.preventDefault(), e2.stopPropagation(), t.preventDefaultClick = false);
            }
            _updateInBoundsFlag(e2) {
              const t = this;
              -1 !== e2.type.indexOf("leave") ? (t._isPointerInBounds = false, t.$button.setAttributeValue("hover", false), t.$.setAttributeValue("hover", false)) : (t._isPointerInBounds = true, t.$button.setAttributeValue("hover", true), t.$.setAttributeValue("hover", true)), 1 !== ("buttons" in e2 ? e2.buttons : e2.which) && t._stopRepeat(e2);
            }
            _startRepeat(e2) {
              const t = this;
              t.setAttribute("active", ""), t._initialTimer || t.readonly || (t._initialTimer = setTimeout(function() {
                t._repeatTimer = setInterval(() => {
                  if (t._isPointerInBounds) {
                    if (t.hasAttribute("smart-blazor")) return t.$.dispatchEvent(new Event("click")), void (t.preventDefaultClick = true);
                    const n = "buttons" in e2 ? e2.buttons : e2.which;
                    t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY }), t.preventDefaultClick = true;
                  }
                }, t.delay);
              }, t.initialDelay));
            }
            _stopRepeat(e2) {
              const t = this;
              t.readonly || e2 && ("pointercancel" === e2.type || e2.originalEvent && "pointercancel" === e2.originalEvent.type) || (t.$.setAttributeValue("active", false), t._repeatTimer && (clearInterval(t._repeatTimer), t._repeatTimer = null), t._initialTimer && (clearTimeout(t._initialTimer), t._initialTimer = null));
            }
            _touchmoveHandler(e2) {
              this.preventDefaultClick && e2.cancelable && (e2.preventDefault(), e2.stopPropagation());
            }
            _overriddenHandler() {
            }
          }), Smart("smart-toggle-button", class extends Smart.Button {
            static get properties() {
              return { checked: { value: false, type: "boolean?" }, falseContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminateContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminate: { value: false, type: "boolean" }, trueContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminateTemplate: { value: null, type: "any" }, trueTemplate: { value: null, type: "any" }, falseTemplate: { value: null, type: "any" }, type: { value: "toggle", type: "string", defaultReflectToAttribute: true, readonly: true } };
            }
            static get listeners() {
              return { keydown: "_keyHandler", keyup: "_keyHandler", dragstart: "_dragStartHandler", "button.click": "_buttonClickHandler", "button.mouseenter": "_buttonMouseEnterHandler", "button.mouseleave": "_buttonMouseLeaveHandler", "document.up": "_documentUpHandler" };
            }
            ready() {
              super.ready(), this._setAriaState();
            }
            _setAriaState() {
              const e2 = this, t = e2.checked;
              null !== t ? e2.setAttribute("aria-pressed", t) : e2.setAttribute("aria-pressed", "mixed");
            }
            _buttonClickHandler() {
            }
            _buttonMouseLeaveHandler() {
              this.removeAttribute("hover");
            }
            _buttonMouseEnterHandler() {
              const e2 = this;
              e2.setAttribute("hover", ""), e2.disabled || e2.readonly || "hover" !== e2.clickMode || (e2._changeCheckState("pointer"), e2.focus(), e2._updateHidenInputNameAndValue());
            }
            _documentUpHandler(e2) {
              const t = this;
              t._pressed && (t._pressed = false, t.disabled || t.readonly || "press" === t.clickMode || "pointercancel" === e2.originalEvent.type || (t._changeCheckState("pointer"), t.focus(), t._updateHidenInputNameAndValue()));
            }
            _downHandler(e2) {
              const t = this;
              t.disabled || t.readonly || (t.hasRippleAnimation && Smart.Utilities.Animation.Ripple.animate(t, e2.pageX, e2.pageY), t._pressed = true, "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || (t._changeCheckState("pointer"), t.hasAttribute("smart-blazor") ? t.$.dispatchEvent(new Event("click")) : t.$.fireEvent("click"), t._updateHidenInputNameAndValue()), "press" === t.clickMode && (e2.preventDefault(), e2.stopPropagation()));
            }
            _dragStartHandler(e2) {
              e2.preventDefault();
            }
            _keyHandler(e2) {
              const t = this;
              if (true !== t.disabled && !t.readonly && 32 === e2.keyCode) {
                if ("keydown" === e2.type) return void e2.preventDefault();
                if ("none" === t.switchMode) return;
                t._changeCheckState("keyboard"), t._updateHidenInputNameAndValue();
              }
            }
            _changeCheckState(e2) {
              const t = this;
              let n = null;
              null === t.checked ? t.checked = true : (n = t.checked, t.checked = !t.checked), t._handleTextSelection(), t.$.fireEvent("change", { value: t.checked, oldValue: n, changeType: e2 }), t.checked ? t.$.fireEvent("checkValue", { changeType: e2 }) : t.$.fireEvent("uncheckValue", { changeType: e2 }), t._setAriaState();
            }
            _handleTextSelection() {
              const e2 = this;
              e2.$.addClass("smart-unselectable"), e2.timer && clearTimeout(e2.timer), e2.timer = setTimeout(() => e2.$.removeClass("smart-unselectable"), 500);
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const a2 = this;
              if ("checked" === e2) return a2.$.fireEvent("change", { value: n, oldValue: t, changeType: "api" }), void a2._setAriaState();
              switch (e2) {
                case "trueTemplate":
                  a2._handleTemplate(true);
                  break;
                case "falseTemplate":
                  a2._handleTemplate(false);
                  break;
                case "indeterminateTemplate":
                  a2._handleTemplate();
              }
            }
            _htmlBindOnInitialization() {
              const e2 = this;
              e2._bindContentProperty("trueContent", "smart-true-content"), e2._bindContentProperty("falseContent", "smart-false-content"), e2._bindContentProperty("indeterminateContent", "smart-indeterminate-content");
            }
            _bindContentProperty(e2, t) {
              const n = this;
              if (!n.$[e2 + "Container"]) return;
              let a2 = document.createElement("div");
              a2.innerHTML = n.innerHTML;
              let r2, i = a2.getElementsByClassName(t);
              if (i.length > 0) for (let e3 = 0; e3 < i.length; e3++) r2 = i[e3];
              "" === n[e2] && (n[e2] = void 0 === r2 ? "" : r2.outerHTML), n.$[e2 + "Container"].innerHTML = n[e2];
            }
            _updateContentProperties() {
              const e2 = this;
              function t(t2) {
                e2.$[t2 + "Container"] && (e2[t2] = e2.$[t2 + "Container"].innerHTML);
              }
              t("trueContent"), t("falseContent"), t("indeterminateContent");
            }
            _updateHidenInputValue() {
              const e2 = this;
              if (!e2.$.hiddenInput) return;
              let t;
              t = null === e2.checked ? "null" : false === e2.checked ? "off" : e2.value || "on", e2.$.hiddenInput.setAttribute("value", t);
            }
            _updateHidenInputName() {
              const e2 = this;
              if (!e2.$.hiddenInput) return;
              let t = false === e2.checked ? "" : e2.name || "";
              e2.$.hiddenInput.setAttribute("name", t);
            }
            _updateHidenInputNameAndValue() {
              this._updateHidenInputName(), this._updateHidenInputValue();
            }
            _handleTemplate(e2, t) {
              const n = this;
              let a2, r2, i;
              if (true === e2 ? (a2 = n.trueTemplate, r2 = n.$.trueContentContainer, i = n.trueContent) : false === e2 ? (a2 = n.falseTemplate, r2 = n.$.falseContentContainer, i = n.falseContent) : (a2 = n.indeterminateTemplate, r2 = n.$.indeterminateContentContainer, i = n.indeterminateContent), t && (r2.innerHTML = i || ""), null === a2 || !a2) return;
              if ("function" == typeof a2) return void a2(r2, { value: i });
              if (!("content" in document.createElement("template"))) return void n.error(n.localize("htmlTemplateNotSuported", { elementType: n.nodeName.toLowerCase() }));
              if (a2 = document.getElementById(a2), null === a2 || !("content" in a2)) return void n.error(n.localize("invalidTemplate", { elementType: n.nodeName.toLowerCase(), property: "template" }));
              const l = a2.content, o = l.childNodes.length, s = /{{\w+}}/g;
              let u2, d2 = [];
              for (let e3 = 0; e3 < o; e3++) for (u2 = s.exec(l.childNodes[e3].innerHTML); u2; ) d2.push({ childNodeIndex: e3, bindingString: u2[0] }), u2 = s.exec(l.childNodes[e3].innerHTML);
              const c = d2.length;
              let p2, h2, m2 = document.importNode(a2.content, true);
              for (let e3 = 0; e3 < c; e3++) {
                p2 = m2.childNodes[d2[e3].childNodeIndex], h2 = d2.length;
                for (let t2 = 0; t2 < h2; t2++) p2.innerHTML = p2.innerHTML.replace(d2[e3].bindingString, i);
              }
              r2.innerHTML = "";
              for (let e3 = 0; e3 < m2.childNodes.length; e3++) m2.childNodes[e3].outerHTML && (r2.innerHTML += m2.childNodes[e3].outerHTML);
            }
          });
        }
      ),
      /***/
      1139: (
        /***/
        () => {
          Smart("smart-combo-box", class extends Smart.DropDownList {
            static get properties() {
              return { autoComplete: { allowedValues: ["none", "manual", "auto", "inline", "list"], type: "string", value: "none" }, autoCompleteDelay: { value: 100, type: "number" }, autoOpenShortcutKey: { value: [], type: "array" }, dropDownOpenMode: { allowedValues: ["none", "default", "dropDownButton", "auto"], value: "dropDownButton", defaultReflectToAttribute: true, type: "string" }, escKeyMode: { allowedValues: ["clearValue", "firstPossibleValue", "none", "previousValue"], type: "string", value: "none" }, inputPurpose: { type: "string", value: "off" }, minLength: { type: "number", value: 2 }, value: { value: "", type: "string" } };
            }
            static get listeners() {
              return { "input.focus": "_inputFocusHandler", "input.blur": "_inputFocusHandler", "dropDownButton.focus": "_dropDownButtonFocusHandler", "dropDownButton.blur": "_dropDownButtonFocusHandler", "input.change": "_inputChangeEventHandler", "input.mouseenter": "_buttonsMouseEventsHandler", "input.mouseleave": "_buttonsMouseEventsHandler", "document.down": "_documentDownHandler", "document.up": "_documentUpHandler", "document.selectstart": "_selectStartHandler", "dropDownButton.down": "_buttonsDownHandler", "dropDownButton.mouseenter": "_buttonsMouseEventsHandler", "dropDownButton.mouseleave": "_buttonsMouseEventsHandler", keydown: "_keyDownHandler", keyup: "_keyUpHandler", "listBox.change": "_listBoxChangeHandler", "listBox.itemClick": "_listBoxItemClickHandler", "listBox.keydown": "_listBoxKeyDownHandler", wheel: "_mouseWheelHandler" };
            }
            static get styleUrls() {
              return ["smart.combobox.css"];
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span class="smart-label" id="label">[[label]]</span>\n                    <div id="content" class="smart-content" role="presentation">\n                        <div class="smart-buttons-container" id="buttonsContainer" role="presentation">\n                            <span id="actionButton" class="smart-action-button" role="presentation">\n                                <input name="[[name]]" class="smart-input" id="input" placeholder="[[placeholder]]" autocomplete="[[inputPurpose]]" role="textbox" aria-label="[[placeholder]]" />\n                                <div class="smart-combo-box-auto-complete-string" id="autoCompleteString"></div>\n                            </span>\n                            <span id="dropDownButton" class="smart-drop-down-button" role="button" aria-label="Toggle popup">\n                                <span class="smart-drop-down-button-icon" id="arrow" aria-hidden="true"></span>\n                            </span>\n                        </div>\n                        <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n                            <smart-list-box id="listBox" unfocusable\n                                    animation="[[animation]]"\n                                    data-source="[[dataSource]]"\n                                    disabled="[[disabled]]"\n                                    display-loading-indicator="[[displayLoadingIndicator]]"\n                                    display-member="[[displayMember]]"\n                                    filterable="[[filterable]]"\n                                    filter-callback="[[filterCallback]]"\n                                    filter-mode="[[filterMode]]"\n                                    filter-input-placeholder="[[filterInputPlaceholder]]"\n                                    grouped="[[grouped]]"\n                                    group-member="[[groupMember]]"\n                                    item-height="[[itemHeight]]"\n                                    item-measure-mode="[[itemMeasureMode]]"\n                                    item-template="[[itemTemplate]]"\n                                    incremental-search-delay="[[incrementalSearchDelay]]"\n                                    incremental-search-mode="[[incrementalSearchMode]]"\n                                    loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n                                    loading-indicator-position="[[loadingIndicatorPosition]]"\n                                    placeholder="[[dropDownPlaceholder]]"\n                                    readonly="[[readonly]]"\n                                    right-to-left="[[rightToLeft]]"\n                                    selected-indexes="{{selectedIndexes}}"\n                                    selection-mode="[[selectionMode]]"\n                                    selected-values="{{selectedValues}}"\n                                    sorted="[[sorted]]"\n                                    theme="[[theme]]"\n                                    value-member="[[valueMember]]"\n                                    horizontal-scroll-bar-visibility="[[horizontalScrollBarVisibility]]"\n                                    vertical-scroll-bar-visibility="[[verticalScrollBarVisibility]]"\n                                    virtualized="[[virtualized]]">\n                                <content></content>\n                            </smart-list-box>\n                            <div id="resizeBar" class="smart-drop-down-resize-bar" aria-label="Resize">\n                                <div></div>\n                            </div>\n                         </div>\n                    </div>\n                    <span class="smart-hint" id="hint">[[hint]]</span>\n                </div>';
            }
            propertyChangedHandler(e2, t, o) {
              const n = this;
              switch (e2) {
                case "autoComplete":
                  if ("list" === o) {
                    n.$.listBox.$.filterInput.value = "";
                    let e3 = n.$.listBox.context;
                    n.$.listBox.context = n.$.listBox, n.$.listBox._filterItems(true), n.$.listBox.context = e3, n._setDropDownSize();
                  }
                  n._autoComplete(true), n._setAriaAutocomplete();
                  break;
                case "dataSource":
                case "displayMember":
                  n._clearSelection(true), n._setDropDownSize(), n._positionDetection.checkBrowserBounds("vertically"), n._positionDetection.positionDropDown(), n._positionDetection.checkBrowserBounds("horizontally");
                  break;
                case "disabled":
                  n.$.input.disabled = o, n._setFocusable(), n.close(), n._positionDetection && n._positionDetection.handleAutoPositioning(), n._ariaPropertyChangedHandler("disabled", o);
                  break;
                case "readonly":
                  n.$.input.readOnly = o, n.close(), n._ariaPropertyChangedHandler("readonly", o);
                  break;
                case "selectedValues":
                case "selectedIndexes":
                  n._clearSelection(true);
                  break;
                case "selectionMode":
                case "selectionDisplayMode":
                  n._clearSelection(), n._applySelectionDisplayMode(), "tokens" === n.selectionDisplayMode && (n._currentSelection = void 0), n._applySelection(n.selectionMode), "selectionMode" === e2 && super.propertyChangedHandler(e2, t, o);
                  break;
                case "tokenTemplate":
                  if (n.$.selectionField) for (; "SPAN" === n.$.selectionField.firstElementChild.nodeName; ) n.$.selectionField.removeChild(n.$.selectionField.firstElementChild);
                  n._tokenTemplate = n._validateTemplate(n.tokenTemplate), n._applySelection();
                  break;
                case "value":
                  n.clearSelection(), n.value = n.$.input.value = n._oldValue = o, n._queryItems(true), n._currentSelection && !n._currentSelection.length && n.$.fireEvent("change", { oldValue: t, value: n.$.input.value, addedItems: [], removedItems: [], selected: [], disabled: [], index: [], label: [] });
                  break;
                default:
                  super.propertyChangedHandler(e2, t, o);
              }
            }
            clearItems() {
              this.$.listBox.clearItems(), this._clearSelection(true);
            }
            clearSelection() {
              this.$.listBox.clearSelection(), this._clearSelection(!arguments[0]);
            }
            blur() {
              this.$.input.blur();
            }
            close() {
              super.close(), this.$.input.removeAttribute("aria-controls");
            }
            focus() {
              this.$.input.focus();
            }
            open() {
              super.open(), this.$.input.setAttribute("aria-controls", this.$.listBox.id);
            }
            _setFocusable() {
              const e2 = this;
              if (!e2.disabled && !e2.unfocusable) {
                let t = e2.tabIndex > 0 ? e2.tabIndex : 0;
                return e2.$.input.tabIndex = t, void ("dropDownButton" === e2.dropDownOpenMode ? e2.$.dropDownButton.setAttribute("tabindex", t) : e2.$.dropDownButton.removeAttribute("tabindex"));
              }
              e2.$.input.tabIndex = -1, e2.$.dropDownButton.removeAttribute("tabindex");
            }
            _autoComplete(e2) {
              const t = this;
              if ("list" === t.autoComplete) return;
              if (0 === t.$.listBox._items.length && "function" != typeof t.dataSource) return void t.close();
              const o = t.$.input.value.length < t.minLength ? "" : "escaped" === t.displayMode ? t._toDefaultDisplayMode(t.$.input.value) : t.$.input.value;
              let n;
              1 === t.$.listBox.selectedValues.length && (n = t.$.listBox.getItem(t.$.listBox.selectedValues[0])), t.$.autoCompleteString.textContent = "", t.$.listBox.$.filterInput.value = "none" === t.autoComplete || t.$.input.value.length < t.minLength ? "" : o;
              let i = t.$.listBox.context;
              t.$.listBox.context = t.$.listBox, t.$.listBox._filterItems(!!e2, function() {
                if (!t.$.listBox.isAttached || !t.$.input) return;
                const e3 = t.enableShadowDOM ? t.shadowRoot.activeElement : document.activeElement;
                if (t._setDropDownSize(), t.opened && (t._positionDetection.positionDropDown(), t._positionDetection.checkBrowserBounds()), t.$.listBox._filteredItems && t.$.listBox._filteredItems.length > 0) {
                  if (t.$.listBox._scrollView.scrollTop = t.$.listBox._filteredItems[0].offsetTop, "none" !== t.autoComplete && t.$.input.value.length >= t.minLength && !function(e4) {
                    for (let t2 = 0; t2 < e4.length; t2++) if (e4[t2]._focused && e4[t2].hasAttribute("focus")) return true;
                  }(t.$.listBox._filteredItems) && t._focus(t.$.listBox._filteredItems[0]), e3 === t.$.input && "inline" === t.autoComplete && t.$.input.value.length >= t.minLength && t._updateAutoCompleteHelper(), n && n[t.inputMember] === t.$.listBox._filteredItems[0][t.inputMember] && n.value === t.$.listBox._filteredItems[0].value && (t.$.listBox.context = t.$.listBox, t.$.listBox._select(t.$.listBox._filteredItems[0], true), t.$.listBox.context = i), o !== t.$.listBox._filteredItems[0][t.inputMember] || Smart.TextBox && t instanceof Smart.TextBox && "auto" === t.dropDownOpenMode) {
                    if (t._closedFromKeyCombination) return void (t._closedFromKeyCombination = false);
                    if (o.length < t.minLength && !(Smart.TextBox && t instanceof Smart.TextBox && "auto" === t.dropDownOpenMode)) return void t.close();
                    t.isCompleted && "none" !== t.dropDownOpenMode && e3 === t.$.input && t.open();
                  }
                } else t["function" == typeof t.dataSource ? "open" : "close"]();
              }, Smart.TextBox && t instanceof Smart.TextBox && "auto" === t.dropDownOpenMode), t.$.listBox.context = i;
            }
            _updateAutoCompleteHelper() {
              const e2 = this, t = e2.$.autoCompleteString;
              if (t.style.width = e2.$.input.offsetWidth + "px", t.style.height = e2.$.input.offsetHeight + "px", t.style.left = e2.$.input.offsetLeft + "px", t.style.top = e2.$.input.offsetTop + "px", t.style.paddingLeft = e2.selectedIndexes.length > 0 ? 0 : null, !e2._focusedItem) return void (t.textContent = "");
              const o = e2.$.input.value, n = e2._focusedItem[e2.inputMember];
              n.length !== o.length && 0 === n.toLowerCase().indexOf(o.toLowerCase()) && (t.textContent = e2.$.input.value + n.slice(o.length));
            }
            _applySelection(e2, t) {
              const o = this;
              if (o.$.selectionField || (o.$.selectionField = o.$.actionButton), o.$.autoCompleteString.textContent = "", 0 !== o.selectedIndexes.length) {
                if (o.$.listBox._items && 0 !== o.$.listBox._items.length) if ("one" === o.selectionMode || "zeroAndOne" === o.selectionMode || "zeroOrOne" === o.selectionMode || "radioButton" === o.selectionMode) {
                  if (o._currentSelection && o._currentSelection.length > o.selectedIndexes.length) return o._currentSelection = o.selectedIndexes.map((e3) => o.$.listBox._items[e3][o.inputMember]), o.$.input.value = o._currentSelection.toString(), void (o._oldValue = o.value = o._currentSelection.toString());
                  o._clearSelection(), o._currentSelection = o.selectedIndexes.map((e3) => o.$.listBox._items[e3][o.inputMember]), o.$.input.value = o._currentSelection.toString(), o._oldValue = o.value = o._currentSelection.toString(), o.$.container.setAttribute("has-value", ""), "none" !== o.autoComplete && "function" != typeof o.dataSource && (o._autoComplete(true), o._keyboardNavigation || o.close());
                } else {
                  for (o.$.input.value = "", o.$.input.placeholder = "", o.$.container.setAttribute("has-value", ""); "SPAN" === o.$.selectionField.firstElementChild.nodeName; ) o.$.selectionField.removeChild(o.$.selectionField.firstElementChild);
                  let e3, t2, n = document.createDocumentFragment();
                  t2 = 1 !== o.selectedIndexes.length || "oneOrManyExtended" !== o.selectionMode && "oneOrMany" !== o.selectionMode ? "tokens" === o.selectionDisplayMode ? "&#10006" : "," : "", o.selectedIndexes.map((i) => {
                    e3 = o._applyTokenTemplate(o.$.listBox._items[i][o.inputMember], t2), e3._value = o.$.listBox._items[i].value, n.appendChild(e3);
                  }), o.$.selectionField.insertBefore(n, o.$.input), o._currentSelection = o.selectedIndexes.map((e4) => o.$.listBox._items[e4][o.inputMember]), o._oldValue = o.value = o._currentSelection.toString(), o._positionDetection.positionDropDown();
                }
              } else o._clearSelection(t && t.index > -1 && o.$.input.value === o.$.listBox._items[t.index][o.inputMember]);
            }
            _applySelectionDisplayMode() {
              const e2 = this;
              "one" === e2.selectionMode || "zeroAndOne" === e2.selectionMode || "zeroOrOne" === e2.selectionMode || "radioButton" === e2.selectionMode ? e2.$.removeClass("auto-height") : e2.$.addClass("auto-height");
            }
            _bindingCompleteHandler() {
              this._queryItems(), this._setDropDownSize();
            }
            _buttonsMouseEventsHandler(e2) {
              const t = this;
              t.disabled || t.readonly || ("mouseenter" === e2.type ? (e2.target.setAttribute("hover", ""), t.setAttribute("hover", ""), "auto" !== t.dropDownOpenMode || Smart.TextBox && t instanceof Smart.TextBox ? "dropDownButton" === t.dropDownOpenMode && e2.target === t.$.dropDownButton && t.setAttribute("drop-down-button-hover", "") : e2.target === t.$.dropDownButton ? (t.open(), t.$.input.focus()) : t.close()) : (e2.target.removeAttribute("hover"), t.removeAttribute("hover"), t.removeAttribute("drop-down-button-hover")));
            }
            _createElement() {
              const e2 = this;
              e2.classList.add("smart-drop-down-box"), e2._tokenTemplate = e2._validateTemplate(e2.tokenTemplate), e2._applySelectionDisplayMode(), e2._applySelection(e2.selectionMode), "none" !== e2.autoComplete && e2._autoComplete(true), e2._setDropDownSize(), e2.$.input.disabled = e2.disabled, e2.$.input.readOnly = e2.readonly, e2._setFocusable(), e2.$.input.value.length > 0 && 0 === e2.selectedIndexes.length && (e2.$.container.setAttribute("has-value", ""), e2._oldValue = e2.value = e2.$.input.value), e2.$.arrow.noRipple = true, e2.checkLicense(), e2._setAriaRelations(true);
            }
            _clearSelection(e2) {
              const t = this;
              if (e2 && (t.$.input.value = "", t.value = ""), t.$.input.placeholder = t.placeholder, t.$.autoCompleteString.textContent = "", t._currentSelection = [], t.$.selectionField) for (; "SPAN" === t.$.selectionField.firstElementChild.nodeName; ) t.$.selectionField.removeChild(t.$.selectionField.firstElementChild);
              "none" !== t.autoComplete && "list" !== t.autoComplete && t.$.input.value.length > 0 && (t._autoCompleteTimer && clearTimeout(t._autoCompleteTimer), "function" != typeof t.dataSource && (t._autoCompleteTimer = setTimeout(function() {
                t._autoComplete(true);
              }, t.autoCompleteDelay))), t.$.input.value.length || t.$.container.removeAttribute("has-value");
            }
            _documentDownHandler(e2) {
              const t = this;
              super._documentDownHandler(e2);
              let o = e2.originalEvent.target;
              (t.shadowRoot || t.isInShadowDOM) && (o = e2.originalEvent.composedPath()[0]), o !== t.$.dropDownButton || "none" === t.dropDownOpenMode || Smart.Utilities.Core.isMobile || requestAnimationFrame(() => t.$.input.focus());
            }
            _documentUpHandler(e2) {
              const t = this;
              let o = e2.originalEvent.target, n = o.closest ? o.closest("smart-combo-box") : void 0;
              (t.shadowRoot || t.isInShadowDOM) && (o = e2.originalEvent.composedPath()[0], n = o.getRootNode().host);
              const i = o;
              if (t._resizeDetails && t._resizeDetails.started) return t._resizeDetails.started = t._resizeDetails.resizeEventFired = false, t.removeAttribute("resizing"), t._dropDownResized = true, void t.$.fireEvent("resizeEnd", { position: { left: e2.pageX, top: e2.pageY } });
              if (t.disabled || t._isDropDownClicked || t.readonly) return void delete t._isDropDownClicked;
              if (t._overlayDown) return t.close(), void delete t._overlayDown;
              if (o === t.$.input || void 0 === o || o === t.$.resizeBar) return;
              if (o === t.$.selectionField) return void t.$.input.focus();
              if (o === t.$.dropDownButton && "none" !== t.dropDownOpenMode) return t._preventDropDownClose = true, o === t._buttonClicked && t.$dropDownContainer.hasClass("smart-visibility-hidden") && "pointercancel" !== e2.originalEvent.type ? t.open() : t.close(), Smart.Utilities.Core.isMobile || requestAnimationFrame(() => t.$.input.focus()), void (t._buttonClicked = void 0);
              const l = o.closest(".smart-drop-down-list-selection-label");
              if (l && n === t && "none" !== t.dropDownOpenMode) {
                const e3 = t.$.listBox._items.filter((e4) => e4[t.inputMember].toString() === l.innerHTML)[0];
                if (!e3 || t.$.fireEvent("tokenClick", { index: t.$.listBox._items.indexOf(e3), label: e3.label, value: e3.value }).defaultPrevented) return;
                return t.open(), t.$.input.focus(), t.$.listBox.ensureVisible(e3), void t._focus(e3);
              }
              if ("tokens" === t.selectionDisplayMode && o.closest(".smart-drop-down-list-unselect-button") && n === t) {
                if (1 === t.selectedIndexes.length && ["zeroOrMany", "zeroOrOne", "checkBox"].indexOf(t.selectionMode) < 0) return;
                return t.unselect(t.$.listBox._items.filter((e3) => e3[t.inputMember].toString() === o.previousElementSibling.innerHTML)[0]), void t.$.input.focus();
              }
              o = t._getUpEventTarget(o), void 0 !== o ? ((!t.$dropDownContainer.hasClass("smart-visibility-hidden") && "dropDownContainer" !== o && "item" !== o || "item" === o && t.selectionMode.indexOf("Many") < 0 && "checkBox" !== t.selectionMode) && t.close(), ("item" === o || "dropDownContainer" === o && i !== t.$.listBox.$.filterInput) && t.$.input.focus()) : t.$.input.focus();
            }
            _dropDownButtonFocusHandler(e2) {
              const t = this;
              "focus" === e2.type ? ("dropDownButton" !== t.dropDownOpenMode && t.$.input.focus(), t.setAttribute("focus", "")) : t.removeAttribute("focus");
            }
            _inputFocusHandler(e2) {
              const t = this;
              if (!t.disabled) if ("focus" === e2.type) t.setAttribute("focus", ""), t._buttonClicked || (t._oldValue = t.$.input.value), t.$.fireEvent("focus");
              else {
                if (t.removeAttribute("focus"), t.$.fireEvent("blur"), "" !== e2.target.value || 0 !== t.selectedIndexes.length && "" === e2.target.value ? t.$.container.setAttribute("has-value", "") : t.$.container.removeAttribute("has-value"), t._preventDropDownClose || (t.opened && ("auto" === t.autoComplete || "inline" === t.autoComplete) && t.$.input.value.length > 0 && t._focusedItem && !t._focusedItem.selected && t.select(t._focusedItem), t.close()), !t._handleAutoCompleteModeList()) return;
                "previousValue" === t.escKeyMode && (t.value = t.$.input.value);
              }
            }
            _handleAutoCompleteModeList() {
              const e2 = this;
              if ("list" === e2.autoComplete && !e2._buttonClicked) {
                if (e2.opened && e2._isDropDownClicked) return false;
                if (e2.$.autoCompleteString.textContent = "", e2._lastSelectedItem) e2._lastSelectedItem.selected || e2.select(e2._lastSelectedItem);
                else if (e2.$.input.value.length && e2._oldValue) {
                  const t = e2.$.listBox._queryItems(e2._oldValue, e2.incrementalSearchMode);
                  for (let o = 0; o < t.length; o++) if (!t[o].hidden) {
                    t[o].selected || e2.select(t[o]), e2._focus(t[o]);
                    break;
                  }
                  e2.value = e2.$.input.value = e2._oldValue;
                } else e2.value = e2.$.input.value = "";
              }
            }
            _inputChangeEventHandler(e2) {
              const t = this;
              e2.stopPropagation(), t._preventInputChangeEvent ? delete t._preventInputChangeEvent : t._isDropDownClicked || t._oldValue === t.$.input.value || t.$.fireEvent("change", { oldValue: t._oldValue, value: t.$.input.value, addedItems: [], removedItems: [], selected: [], disabled: [], index: [], label: [] });
            }
            _keyDownHandler(e2) {
              const t = this, o = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              if (t.disabled || t.readonly || o === t.$.listBox.$.filterInput) return;
              const n = "function" == typeof t._focusedItem ? t._focusedItem() : t._focusedItem;
              switch (e2.key) {
                case "Enter":
                  if (delete t._preventInputChangeEvent, o === t.$.input && n && t.opened) {
                    if (n.selected && "list" === t.autoComplete) return t.close(), t._unfocus(), void t._handleAutoCompleteModeList();
                    n.disabled || (t.select(n), t._preventInputChangeEvent = true), !t.$dropDownContainer.hasClass("smart-visibility-hidden") && t.selectionMode.indexOf("one") > -1 && (t.close(), t._unfocus());
                  } else o === t.$.dropDownButton ? (t.$.dropDownButton.setAttribute("active", ""), t.$dropDownContainer.hasClass("smart-visibility-hidden") && "none" !== t.dropDownOpenMode ? t.open() : t.close(), t.$.input.focus()) : t.close();
                  return void t._handleAutoCompleteModeList();
                case "Escape":
                  switch (t.escKeyMode) {
                    case "none":
                      t.$dropDownContainer.hasClass("smart-visibility-hidden") || (t.close(), t._unfocus());
                      break;
                    case "clearValue":
                      t.value = t.$.input.value = "", t.close();
                      break;
                    case "previousValue":
                      t.$.input.value = t._oldValue;
                      break;
                    case "firstPossibleValue": {
                      const e3 = t.$.listBox._items.find((e4) => !e4.disabled && !e4.hidden && !e4.readonly);
                      if (e3) {
                        const o2 = e3[t.inputMember];
                        t.$.input.value === o2 && t.close(), t.$.input.value = o2;
                      }
                      t.close();
                      break;
                    }
                  }
                  break;
                case "End":
                case "Home":
                case "PageUp":
                case "PageDown":
                case "ArrowUp":
                case "ArrowDown":
                  if (true === t._autoOpenOnKeyDown(e2)) return;
                  if (e2.altKey) {
                    if (t._closedFromKeyCombination = true, t.$dropDownContainer.hasClass("smart-visibility-hidden") && "none" !== t.dropDownOpenMode) {
                      if ("ArrowDown" === e2.key && t.open(), !t.opened) return;
                      if (0 === t.items.length) return;
                      0 === t.selectedIndexes.length ? t._focus(t.items[0]) : t.selectedIndexes.length > 0 && !t.$.listBox._items[t.selectedIndexes[t.selectedIndexes.length - 1]].hidden && t._focus(t.items[t.selectedIndexes[t.selectedIndexes.length - 1]]);
                    } else t.close();
                    return;
                  }
                  if (o === t.$.input && t.$dropDownContainer.hasClass("smart-visibility-hidden")) return void (e2.ctrlKey && (e2.preventDefault(), t._handleKeyStroke(e2.key)));
                  if (("PageUp" === e2.key || "PageDown" === e2.key) && !n || o === t.$.listBox.$.filterInput) return;
                  if (e2.preventDefault(), !n || n && !n._focused) return void t._focus(t.items[0]);
                  t._handleKeyStroke(e2.key), "inline" !== t.autoComplete && "list" !== t.autoComplete || t._updateAutoCompleteHelper();
                  break;
                case "Backspace":
                  if (t.$.input.previousElementSibling) {
                    if (0 === t.$.input.value.length) {
                      if (1 === t.selectedIndexes.length && ["zeroOrMany", "zeroOrOne", "checkBox"].indexOf(t.selectionMode) < 0) return;
                      const e3 = t.$.listBox.getItem(t.$.input.previousElementSibling._value);
                      e3 ? t.unselect(e3) : t.$.selectionField.firstElementChild && "SPAN" === t.$.selectionField.firstElementChild.nodeName && t.$.selectionField.removeChild(t.$.selectionField.firstElementChild);
                    }
                    return;
                  }
                  t.selectedIndexes.length > 1 && t.clearSelection(true);
                  break;
                default:
                  if (o === t.$.input && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = true), true === t._autoOpenOnKeyDown(e2)) return;
              }
            }
            _handleKeyStroke(e2) {
              const t = this, o = t.$.listBox;
              if ("none" === t.autoComplete) return void o._handleKeyStrokes(e2);
              const n = t.items;
              switch (e2) {
                case "ArrowLeft":
                case "ArrowUp":
                  t._handleArrowKeys(true);
                  break;
                case "ArrowRight":
                case "ArrowDown":
                  t._handleArrowKeys(false);
                  break;
                case "Home":
                case "End": {
                  if (0 === n.length) return;
                  const i = "Home" === e2;
                  t._focus(i ? n[0] : n[n.length - 1]), o.scrollTop = i ? 0 : o.scrollHeight;
                  break;
                }
                case "PageUp":
                  t._pageUpKeyHandler(n);
                  break;
                case "PageDown":
                  t._pageDownKeyHandler(n);
              }
              o._recycle();
            }
            _handleArrowKeys(e2) {
              const t = this, o = t.$.listBox;
              let n;
              if (t._focusedItem) n = t.$.listBox._indexOf(t._focusedItem), t._focusedItem._focused = false;
              else {
                if (0 === t.selectedIndexes.length) return;
                n = t.selectedIndexes[t.selectedIndexes.length - 1];
              }
              const i = e2 ? o._getPreviousItem(n) : o._getNextItem(n);
              t._focus(i), "list" === t.autoComplete && o._items[n] !== i && (t._keyboardNavigation = true, o.clearSelection(), o.select(i), delete t._keyboardNavigation), t.ensureVisible(i);
            }
            _pageDownKeyHandler(e2) {
              const t = this, o = t.$.listBox;
              let n, i = o._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              o._focusedItem && (i = o._focusedItem);
              const l = o._indexOf(i);
              let s = i.top + o.$.itemsContainer.offsetHeight - i.height;
              for (let t2 = l; t2 < e2.length; t2++) if (e2[t2].top >= s) {
                n = e2[t2];
                break;
              }
              n || (n = e2[e2.length - 1]), t._focus(n), (n.height + n.top > o.$.itemsContainer.scrollTop + o.$.itemsContainer.offsetHeight || n.top < o.$.itemsContainer.scrollTop) && (o.scrollTop = n.top - o.$.itemsContainer.offsetHeight + n.height);
            }
            _pageUpKeyHandler(e2) {
              const t = this, o = t.$.listBox;
              let n = o._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              o._focusedItem && (n = o._focusedItem);
              const i = n.top - o.$.itemsContainer.offsetHeight;
              let l;
              for (let t2 = o._indexOf(n); t2 > 0; t2--) if (e2[t2].top <= i) {
                l = e2[t2];
                break;
              }
              l || (l = e2[0]), o._focus(l), o.scrollTop = l.top, 0 === o._indexOf(l) && (o.scrollTop = 0);
            }
            _autoOpenOnKeyDown(e2) {
              const t = this;
              if (t.opened || !t.opened && t.autoOpenShortcutKey.indexOf(e2.key) < 0) return;
              t.selectedIndexes.length && t._focus(t.items[t.selectedIndexes[t.selectedIndexes.length - 1]]);
              const o = "function" == typeof t._focusedItem ? t._focusedItem() : t._focusedItem;
              return t.open(), (!o || o && !o._focused) && ("ArrowDown" === e2.key ? t._focus(t.items[0]) : "ArrowUp" === e2.key && t._focus(t.items[t.items.length - 1]), t.ensureVisible(t._focusedItem)), true;
            }
            _keyUpHandler(e2) {
              const t = this, o = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              if (!(t.disabled || "none" === t.escKeyMode && "Escape" === e2.key || o === t.$.listBox.$.filterInput)) if (delete t._preventInputChangeEvent, o === t.$.input && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = false), ["one", "zeroAndOne", "radioButton", "zeroOrOne"].indexOf(t.selectionMode) > -1 && 1 === t.selectedIndexes.length && t.$.input.value !== (t._currentSelection ? t._currentSelection[0] : void 0) && (t._preventInputChangeEvent = true, t.unselect(t.$.listBox._items[t.selectedIndexes[0]])), "Enter" !== e2.key) {
                if (o === t.$.input && e2.key.indexOf("Arrow") < 0 && ["Control", "Shift"].indexOf(e2.key) < 0) {
                  if (t.value === t.$.input.value) return;
                  if (t._currentSelection ? t.value = t._currentSelection.toString() + (t._currentSelection.length > 0 ? "," : "") + t.$.input.value : t.value = t.$.input.value, t.$.autoCompleteString.textContent = "", t._closedFromKeyCombination) return void (t._closedFromKeyCombination = false);
                  if ("none" !== t.autoComplete && "list" !== t.autoComplete ? (t.$.input.value !== (t._currentSelection ? t._currentSelection.toString() : void 0) || t.$.listBox._filteredItems && t.$.listBox._filteredItems.length !== t.$.listBox._items.length) && (t._autoCompleteTimer && clearTimeout(t._autoCompleteTimer), t._autoCompleteTimer = setTimeout(function() {
                    t._autoComplete(true);
                  }, t.autoCompleteDelay)) : (t.$.input.value.length > 0 && t._queryItems(), !t._focusedItem || "Escape" === e2.key && "firstPossibleValue" === t.escKeyMode || (t.open(), " " !== e2.key && (t.$.listBox._scrollView.scrollTop = t._focusedItem.offsetTop))), "none" !== t.autoComplete && "list" !== t.autoComplete && t.$.listBox._filteredItems && t.$.listBox._filteredItems.length === t.$.listBox._items.length) return void t.close();
                }
              } else t.$.dropDownButton.removeAttribute("active");
            }
            _queryItems(e2) {
              const t = this;
              if (!t.value || !t.$.input) return void t.close();
              let o = t.$.listBox._queryItems(t.$.input.previousElementSibling ? t.$.input.value : t.value, t.incrementalSearchMode);
              0 === o.length && t._unfocus();
              for (let n = 0; n < o.length; n++) if (!o[n].hidden) {
                e2 && !o[n].selected && t.select(o[n]), t._focus(o[n]);
                break;
              }
              "list" === t.autoComplete && (t.enableShadowDOM ? t.shadowRoot.activeElement : document.activeElement) === t.$.input && t.$.input.value.length >= t.minLength ? (t._lastSelectedItem = t._focusedItem, t._updateAutoCompleteHelper()) : t._lastSelectedItem = void 0;
            }
            _selectStartHandler(e2) {
              this._resizeDetails && this._resizeDetails.started && e2.preventDefault();
            }
            _unfocus() {
              const e2 = this;
              e2._focusedItem && (e2._focusedItem._focused = false, e2.$.listBox._focusedItem = void 0);
            }
            _setAriaRelations() {
              const e2 = this;
              e2.setAttribute("role", "combobox"), e2.setAttribute("aria-describedby", e2.$.hint.id), e2.setAttribute("aria-expanded", e2.opened), e2.setAttribute("aria-haspopup", "listbox"), e2.setAttribute("aria-labelledby", e2.$.label.id), e2._ariaButton = e2, e2._setAriaAutocomplete();
            }
            _setAriaAutocomplete() {
              const e2 = this.autoComplete, t = this.$.input;
              "none" === e2 ? t.setAttribute("aria-autocomplete", "none") : "auto" === e2 || "manual" === e2 ? t.setAttribute("aria-autocomplete", "list") : t.setAttribute("aria-autocomplete", "both");
            }
          });
        }
      ),
      /***/
      7650: (
        /***/
        () => {
          Smart("smart-drop-down-list", class extends Smart.ContentElement {
            static get properties() {
              return { autoCloseDelay: { value: 100, type: "number" }, dataSource: { value: null, type: "any", reflectToAttribute: false }, displayLoadingIndicator: { value: false, type: "boolean" }, displayMember: { value: "", type: "string" }, displayMode: { allowedValues: ["outlined", "filled", "underlined"], value: "outlined", type: "string" }, dropDownAppendTo: { value: null, type: "any" }, dropDownButtonPosition: { allowedValues: ["none", "left", "right", "top", "bottom"], value: "right", defaultReflectToAttribute: true, type: "string" }, dropDownMinHeight: { value: "", type: "any", validator: "_propertyValidator" }, dropDownHeight: { value: "", type: "any", validator: "_propertyValidator" }, dropDownMaxHeight: { value: "", type: "any", validator: "_propertyValidator" }, dropDownOpenMode: { allowedValues: ["none", "default", "dropDownButton", "auto"], value: "default", type: "string" }, dropDownOverlay: { value: false, type: "boolean" }, dropDownPlaceholder: { value: "No Items", type: "string" }, dropDownPosition: { allowedValues: ["auto", "top", "bottom", "overlay-top", "overlay-center", "overlay-bottom", "center-bottom", "center-top"], value: "auto", type: "string" }, dropDownMinWidth: { value: "", type: "any", validator: "_propertyValidator" }, dropDownWidth: { value: "", type: "any", validator: "_propertyValidator" }, dropDownMaxWidth: { value: "", type: "any", validator: "_propertyValidator" }, filterable: { value: false, type: "boolean" }, filterInputPlaceholder: { value: "", type: "string" }, filterCallback: { value: null, type: "function?" }, filterMode: { value: "startsWithIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase", "custom"], type: "string" }, grouped: { value: false, type: "boolean" }, groupMember: { value: "", type: "string" }, hint: { value: "", type: "string" }, horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, incrementalSearchDelay: { value: 700, type: "number?" }, incrementalSearchMode: { value: "startsWithIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase"], type: "string" }, itemMeasureMode: { value: "auto", allowedValues: ["auto", "precise"], type: "string" }, inputMember: { value: "label", type: "string" }, itemTemplate: { value: null, type: "any" }, itemHeight: { value: null, type: "number?" }, label: { value: "", type: "string" }, loadingIndicatorPlaceholder: { value: "Loading...", type: "string" }, loadingIndicatorPosition: { value: "center", allowedValues: ["bottom", "center", "top"], type: "string" }, messages: { extend: true, value: { en: { invalidNode: '{{elementType}}: Invalid parameter "{{node}}" when calling {{method}}.' } }, type: "object" }, name: { value: "", type: "string" }, opened: { value: false, type: "boolean" }, placeholder: { value: "", type: "string" }, resizeMode: { value: "none", allowedValues: ["none", "horizontal", "vertical", "both"], type: "string" }, resizeIndicator: { value: false, type: "boolean" }, selectionDisplayMode: { value: "plain", allowedValues: ["plain", "placeholder", "tokens"], type: "string" }, selectionMode: { value: "zeroAndOne", allowedValues: ["none", "oneOrManyExtended", "zeroOrMany", "oneOrMany", "zeroOrOne", "zeroAndOne", "one", "checkBox", "radioButton"], type: "string" }, selectedIndexes: { value: [], type: "array" }, selectedValues: { value: [], type: "array" }, sorted: { value: false, type: "boolean" }, sortDirection: { value: "asc", type: "string" }, tokenTemplate: { value: null, type: "any" }, type: { value: "list", type: "string", defaultReflectToAttribute: true, readonly: true }, valueMember: { value: "", type: "string" }, virtualized: { value: false, type: "boolean" }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] } };
            }
            static get listeners() {
              return { "actionButton.down": "_buttonsDownHandler", "actionButton.mouseenter": "_buttonsMouseEventsHandler", "actionButton.mouseleave": "_buttonsMouseEventsHandler", "actionButton.focus": "_buttonsFocusHandler", "actionButton.blur": "_buttonsFocusHandler", "document.selectstart": "_selectStartHandler", "document.dragstart": "_dragStartHandler", "document.down": "_documentDownHandler", "document.up": "_documentUpHandler", "document.move": "_documentMoveHandler", "dropDownButton.down": "_buttonsDownHandler", "dropDownButton.mouseenter": "_buttonsMouseEventsHandler", "dropDownButton.mouseleave": "_buttonsMouseEventsHandler", keydown: "_keyDownHandler", keyup: "_keyUpHandler", focus: "_focusEventHandler", blur: "_blurEventHandler", "dropDownButton.focus": "_buttonsFocusHandler", "dropDownButton.blur": "_buttonsFocusHandler", "dropDownContainer.transitionend": "_dropDownTransitionendHandler", "listBox.change": "_listBoxChangeHandler", "listBox.itemClick": "_listBoxItemClickHandler", "listBox.keydown": "_listBoxKeyDownHandler", "listBox.bindingComplete": "_bindingCompleteHandler", mouseenter: "_mouseEnterHandler", mouseleave: "_mouseLeaveHandler", resize: "_resizeHandler", "resizeBar.move": "_resizeBarMoveHandler", styleChanged: "_styleChangedHandler", wheel: "_mouseWheelHandler" };
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span class="smart-label" id="label">[[label]]</span>\n                    <div id="content" class="smart-content" role="presentation">\n                        <div class="smart-buttons-container" id="buttonsContainer" role="presentation">\n                            <span id="actionButton" class ="smart-action-button" role="presentation">[[placeholder]]</span>\n                            <span id="dropDownButton" class="smart-drop-down-button">\n                                <span class ="smart-drop-down-button-icon" id="arrow" aria-hidden="true"></span>\n                            </span>\n                        </div>\n                        <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n                            <smart-list-box id="listBox" unfocusable\n                                    animation="[[animation]]"\n                                    data-source="[[dataSource]]"\n                                    disabled="[[disabled]]"\n                                    display-loading-indicator="[[displayLoadingIndicator]]"\n                                    display-member="[[displayMember]]"\n                                    filterable="[[filterable]]"\n                                    filter-callback="[[filterCallback]]"\n                                    filter-mode="[[filterMode]]"\n                                    filter-input-placeholder="[[filterInputPlaceholder]]"\n                                    grouped="[[grouped]]"\n                                    group-member="[[groupMember]]"\n                                    item-height="[[itemHeight]]"\n                                    item-measure-mode="[[itemMeasureMode]]"\n                                    item-template="[[itemTemplate]]"\n                                    incremental-search-delay="[[incrementalSearchDelay]]"\n                                    incremental-search-mode="[[incrementalSearchMode]]"\n                                    loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n                                    loading-indicator-position="[[loadingIndicatorPosition]]"\n                                    name="[[name]]"\n                                    placeholder="[[dropDownPlaceholder]]"\n                                    right-to-left="[[rightToLeft]]"\n                                    readonly="[[readonly]]"\n                                    selected-indexes="{{selectedIndexes}}"\n                                    selection-mode="[[selectionMode]]"\n                                    selected-values="{{selectedValues}}"\n                                    sorted="[[sorted]]"\n                                    sort-direction="[[sortDirection]]"\n                                    theme="[[theme]]"\n                                    value-member="[[valueMember]]"\n                                    horizontal-scroll-bar-visibility="[[horizontalScrollBarVisibility]]"\n                                    vertical-scroll-bar-visibility="[[verticalScrollBarVisibility]]"\n                                    virtualized="[[virtualized]]">\n                                <content></content>\n                            </smart-list-box>\n                            <div id="resizeBar" class="smart-drop-down-resize-bar" aria-label="Resize">\n                                <div></div>\n                            </div>\n                         </div>\n                    </div>\n                    <span class="smart-hint smart-hidden" id="hint">[[hint]]</span>\n                </div>';
            }
            static get styleUrls() {
              return ["smart.dropdownlist.css", "smart.dropdown.css"];
            }
            propertyChangedHandler(e2, t, o) {
              super.propertyChangedHandler(e2, t, o);
              const n = this;
              switch (e2) {
                case "animation":
                  n.$.dropDownContainer.setAttribute("animation", n.animation);
                  break;
                case "disabled":
                  n._setFocusable(), n.close(), n._positionDetection.handleAutoPositioning();
                  break;
                case "dataSource":
                case "displayMember":
                case "inputMember":
                  n.$.actionButton && (n.$.actionButton.innerHTML = n.placeholder), n._setDropDownSize(), n._positionDetection.checkBrowserBounds("vertically"), n._positionDetection.positionDropDown(), n._positionDetection.checkBrowserBounds("horizontally");
                  break;
                case "dropDownAppendTo":
                  n._positionDetection.dropDownAppendToChangedHandler();
                  break;
                case "dropDownOpenMode":
                  n._setFocusable(), n.$dropDownContainer.addClass("smart-visibility-hidden"), n.$.dropDownContainer.setAttribute("drop-down-open-mode", o), n.$.dropDownButton.removeAttribute("selected"), n.removeAttribute("drop-down-button-focus"), n.removeAttribute("action-button-focus"), n.opened = false, n._ariaButton && n._ariaButton.setAttribute("aria-expanded", false), n._setAriaRelations();
                  break;
                case "dropDownOverlay":
                  o || n._positionDetection.removeOverlay();
                  break;
                case "dropDownPosition":
                  n._positionDetection.dropDownPositionChangedHandler();
                  break;
                case "dropDownMinWidth":
                case "dropDownWidth":
                case "dropDownMaxWidth":
                case "dropDownHeight":
                case "dropDownMinHeight":
                case "dropDownMaxHeight":
                  n._setDropDownSize();
                  break;
                case "filterable":
                  n.$.listBox.filterable = o, n._dropDownSize && "auto" === n._dropDownSize.height && n._setDropDownSize();
                  break;
                case "label":
                  if (!n._ariaButton) return;
                  o ? n._ariaButton.setAttribute("aria-labelledby", n.$.label.id) : "DropDownList" === n.elementName && n._ariaButton.setAttribute("aria-labelledby", n.$.actionButton.id);
                  break;
                case "opened":
                  if (n.disabled || n.readonly) return;
                  o ? n.open() : n.close();
                  break;
                case "placeholder":
                  n._applySelection();
                  break;
                case "readonly":
                  n.close();
                  break;
                case "resizeIndicator":
                  o ? n.$.dropDownContainer.setAttribute("resize-indicator", "") : n.$.dropDownContainer.removeAttribute("resize-indicator");
                  break;
                case "resizeMode":
                  n.$.dropDownContainer.setAttribute("resize-mode", n.resizeMode);
                  break;
                case "selectedValues":
                case "selectedIndexes":
                  0 === o.length ? n.$.actionButton.innerHTML = n.placeholder : n._applySelection();
                  break;
                case "selectionMode":
                  n.$.listBox && (n.$.listBox[e2] = o, "checkBox" !== o && "radioButton" !== o && "checkBox" !== t && "radioButton" !== t || n._setDropDownSize());
                  break;
                case "selectionDisplayMode":
                  n._applySelection();
                  break;
                case "tokenTemplate":
                  n._tokenTemplate = n._validateTemplate(n.tokenTemplate), n._applySelection();
                  break;
                case "unfocusable":
                  n._setFocusable();
              }
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? (t.$.listBox.appendChild(e2), t._dropDownSize && "auto" === t._dropDownSize.height && t._setDropDownSize()) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "appendChild", node: "node" }));
            }
            attached() {
              const e2 = this;
              super.attached(), e2.isCompleted && e2.$.dropDownContainer && (e2._positionDetection.dropDownAttached("_setDropDownSize"), e2._positionDetection.checkBrowserBounds(), e2.selectedIndexes && e2._applySelection());
            }
            detached() {
              const e2 = this;
              super.detached(), e2.$.dropDownContainer && (e2.close(), e2._positionDetection && e2._positionDetection.dropDownDetached());
            }
            clearItems() {
              const e2 = this;
              e2.$.listBox && (e2.$.listBox.clearItems(), e2.$.actionButton.innerHTML = e2.placeholder);
            }
            clearSelection() {
              const e2 = this;
              e2.$.listBox && (e2.$.listBox.clearSelection(), e2.$.actionButton.innerHTML = e2.placeholder);
            }
            close() {
              const e2 = this;
              e2.$dropDownContainer.hasClass("smart-visibility-hidden") || e2.$.fireEvent("closing").defaultPrevented || (e2.$dropDownContainer.addClass("smart-visibility-hidden"), e2.$.fireEvent("close"), e2.$.dropDownButton && e2.$.dropDownButton.removeAttribute("selected"), e2.opened = false, e2._ariaButton && e2._ariaButton.setAttribute("aria-expanded", false), e2._preventDropDownClose = false, e2._positionDetection.removeOverlay(true), e2.$.listBox.removeAttribute("focus"), e2._edgeMacFF && !e2.hasAnimation && e2.$.dropDownContainer && (e2.$.dropDownContainer.style.top = e2.$.dropDownContainer.style.left = "", e2.$dropDownContainer.addClass("not-in-view")));
            }
            cloneNode() {
              const e2 = this;
              if (!e2.$.listBox) return;
              let t = HTMLElement.prototype.cloneNode.apply(e2, Array.prototype.slice.call(arguments, 0, 1));
              return t.dataSource = e2.dataSource, t;
            }
            ensureVisible(e2) {
              this.$.listBox && this.$.listBox.ensureVisible(e2);
            }
            getItem(e2) {
              if (this.$.listBox) return this.$.listBox.getItem(e2);
            }
            get items() {
              const e2 = this;
              return e2.$ && e2.$.listBox ? e2.$.listBox.items : [];
            }
            get _focusedItem() {
              const e2 = this;
              return e2.$ && e2.$.listBox ? e2.$.listBox._focusedItem : null;
            }
            insert(e2, t) {
              const o = this;
              o.$.listBox && (o.$.listBox.insert(e2, t), o._applySelection(), o._dropDownSize && "auto" === o._dropDownSize.height && o._setDropDownSize());
            }
            insertBefore(e2, t) {
              const o = this;
              if (!o.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(o, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 && t ? o.$.listBox && (o.$.listBox.insertBefore(e2, t), o._dropDownSize && "auto" === o._dropDownSize.height && o._setDropDownSize()) : o.error(o.localize("invalidNode", { elementType: o.nodeName.toLowerCase(), method: "insertBefore", node: "newNode/referenceNode" }));
            }
            toggle() {
              const e2 = this;
              e2.opened ? e2.close() : e2.open();
            }
            open() {
              const e2 = this, t = function() {
                for (let t2 = 0; t2 < e2.items.length; t2++) if (!e2.items[t2].disabled) return e2.items[t2];
              };
              if (!e2.disabled && e2.offsetHeight && e2.$dropDownContainer.hasClass("smart-visibility-hidden")) {
                if (e2.$dropDownContainer.hasClass("not-in-view") && e2.$dropDownContainer.removeClass("not-in-view"), e2.$.dropDownContainer.style.transition = null, e2.dropDownAppendTo) {
                  const t2 = e2.getBoundingClientRect();
                  if (e2.$.container.contains(e2.$.dropDownContainer)) {
                    let t3 = 0;
                    const o = setInterval(function() {
                      const n = e2.getBoundingClientRect();
                      t3++, n.top === e2._positionTop && t3 < 10 || (e2.open(), clearInterval(o), e2._positionTop = n.top);
                    }, 100);
                    return;
                  }
                  t2.top !== e2._positionTop && (e2._positionTop = t2.top);
                }
                e2.$.fireEvent("opening").defaultPrevented || (e2._shadowDOMStylesDelay && (e2._setDropDownSize(), delete e2._shadowDOMStylesDelay), e2.opened = true, e2._ariaButton && e2._ariaButton.setAttribute("aria-expanded", true), e2.$.listBox.setAttribute("focus", ""), e2._positionDetection.placeOverlay(), e2._positionDetection.checkBrowserBounds("vertically"), e2._positionDetection.positionDropDown(), e2._positionDetection.checkBrowserBounds("horizontally"), e2.$dropDownContainer.removeClass("smart-visibility-hidden"), e2.$.fireEvent("open"), e2.$.dropDownButton && ("dropDownButton" === e2.dropDownOpenMode ? e2.$.dropDownButton.setAttribute("selected", "") : e2.$.dropDownButton.removeAttribute("selected")), (e2.$.listBox && !e2._focusedItem || e2._focusedItem && !e2._focusedItem._focused) && (e2.selectedIndexes.length > 0 ? e2._focus(e2.items[e2.selectedIndexes[0]]) : e2._focus(t)), e2.$.input && !Smart.Utilities.Core.isMobile && e2.$.input.focus());
              }
            }
            ready() {
              super.ready();
            }
            render() {
              const e2 = this;
              e2.rightToLeft && (e2.dropDownButtonPosition = "right" === e2.dropDownButtonPosition ? "left" : "right"), e2.classList.add("smart-drop-down-box"), e2.$.dropDownContainer && (e2._positionDetection = new Smart.Utilities.PositionDetection(e2, e2.$.dropDownContainer, e2.$.container, "close"), e2._positionDetection.getDropDownParent(true), e2._positionDetection.setDropDownPosition(), e2._calculateDropDownSize(), e2.$.dropDownContainer.setAttribute("resize-mode", e2.resizeMode), e2.$.dropDownContainer.setAttribute("drop-down-open-mode", e2.dropDownOpenMode), e2.resizeIndicator && e2.$.dropDownContainer.setAttribute("resize-indicator", ""), e2._positionDetection.handleAutoPositioning()), e2.opened && e2.open(), e2._positionTop = e2.getBoundingClientRect().top, e2._edgeMacFF = Smart.Utilities.Core.Browser.Edge || Smart.Utilities.Core.Browser.Firefox && -1 !== navigator.platform.toLowerCase().indexOf("mac"), e2._edgeMacFF && e2.hasAnimation && e2.$.dropDownContainer && e2.$dropDownContainer.addClass("not-in-view"), e2.$.label && !e2.$.label.id && (e2.$.label.id = e2.id + "Label"), e2.$.actionButton && !e2.$.actionButton.id && (e2.$.actionButton.id = e2.id + "ActionButton"), e2.$.hint && !e2.$.hint.id && (e2.$.hint.id = e2.id + "Hint"), e2._createElement(), super.render();
            }
            removeAt(e2) {
              const t = this;
              t.$.listBox && (t.$.listBox.removeAt(e2), t._applySelection(), t._dropDownSize && "auto" === t._dropDownSize.height && t._setDropDownSize());
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 && e2 instanceof Smart.ListItem ? (t.$.listBox.removeChild(e2), t._dropDownSize && "auto" === t._dropDownSize.height && t._setDropDownSize()) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "removeChild", node: "node" }));
            }
            get value() {
              const e2 = this;
              return e2.isRendered && e2.$.listBox ? e2.$.listBox.value : null;
            }
            set value(e2) {
              const t = this;
              return t.isRendered && t.$.listBox ? void (t.$.listBox.value = e2) : null;
            }
            select(e2) {
              this.$.listBox && this.$.listBox.select(e2);
            }
            _setFocusable() {
              const e2 = this;
              if (e2.disabled || e2.unfocusable) return e2.removeAttribute("tabindex"), e2.$.actionButton.removeAttribute("tabindex"), void e2.$.dropDownButton.removeAttribute("tabindex");
              let t = e2.tabIndex > 0 ? e2.tabIndex : 0;
              e2.tabIndex = t, "dropDownButton" === e2.dropDownOpenMode ? (e2.removeAttribute("tabindex"), e2.$.actionButton.setAttribute("tabindex", t), e2.$.dropDownButton.setAttribute("tabindex", t)) : (e2.$.actionButton.removeAttribute("tabindex"), e2.$.dropDownButton.removeAttribute("tabindex"));
            }
            static get requires() {
              return { "Smart.ListBox": "smart.listbox.js" };
            }
            unselect(e2) {
              this.$.listBox && this.$.listBox.unselect(e2);
            }
            update(e2, t) {
              const o = this;
              o.$.listBox && (o.$.listBox.update(e2, t), o._applySelection());
            }
            _resizeBarMoveHandler(e2) {
              "touchmove" === e2.originalEvent.type && e2.originalEvent.preventDefault();
            }
            _createToken() {
              const e2 = this;
              let t, o = false;
              const n = document.createDocumentFragment(), i = e2.selectedIndexes[e2.selectedIndexes.length - 1];
              "plain" !== e2.selectionDisplayMode || "one" !== e2.selectionMode && "zeroAndOne" !== e2.selectionMode && "zeroOrOne" !== e2.selectionMode && "radioButton" !== e2.selectionMode ? "tokens" === e2.selectionDisplayMode ? 1 === e2.selectedIndexes.length && ["oneOrManyExtended", "oneOrMany", "zeroAndOne", "one", "radioButton"].indexOf(e2.selectionMode) > -1 ? t = "" : (t = "&#10006", o = true) : t = 1 === e2.selectedIndexes.length ? "" : "," : t = "";
              const r2 = e2.selectedIndexes, a2 = e2.$.listBox._items;
              for (let s = 0; s < r2.length; s++) {
                const l = r2[s];
                a2[l] && n.appendChild(e2._applyTokenTemplate(a2[l][e2.inputMember], "tokens" !== e2.selectionDisplayMode && l === i ? "" : t, o));
              }
              return n;
            }
            _applySelection() {
              const e2 = this;
              if ("placeholder" !== e2.selectionDisplayMode && 0 !== e2.selectedIndexes.length) {
                if (e2.$.listBox._items && 0 !== e2.$.listBox._items.length) if ("plain" !== e2.selectionDisplayMode) e2.$.actionButton.innerHTML = "", e2.$.actionButton.appendChild(e2._createToken());
                else {
                  const t = e2.$.listBox.selectedIndexes, o = e2.$.listBox._items;
                  let n = [];
                  for (let i = 0; i < t.length; i++) {
                    const r2 = t[i];
                    o[r2] && n.push(o[r2][e2.inputMember]);
                  }
                  e2.$.actionButton.innerHTML = n.length ? `<span class="smart-token">${n.join(", ").trim()}</span>` : "";
                }
              } else e2.$.actionButton.innerHTML = e2.placeholder;
            }
            _applyTokenTemplate(e2, t, o) {
              const n = this, i = document.createElement("span"), r2 = function() {
                return `<span class='smart-drop-down-list-selection-label' role="presentation">` + e2 + `</span><span class='smart-drop-down-list-unselect-button' role="button"${o ? ' aria-label="Unselect"' : ""}>${t}</span>`;
              };
              if (i.classList.add("smart-token"), n._tokenTemplate) {
                let e3 = document.importNode(n._tokenTemplate.content, true);
                const t2 = e3.childNodes.length, o2 = /{{\w+}}/g;
                let a2;
                for (let n2 = 0; n2 < t2; n2++) a2 = o2.exec(e3.childNodes[n2].innerHTML), a2 && (e3.childNodes[n2].innerHTML = e3.childNodes[n2].innerHTML.replace(a2[0], r2())), e3.childNodes[n2].outerHTML && (i.innerHTML += e3.childNodes[n2].outerHTML);
              } else "function" == typeof n.tokenTemplate ? n.tokenTemplate(i, { label: e2, iconSeparator: t }) : i.innerHTML = r2();
              return i;
            }
            _bindingCompleteHandler() {
              const e2 = this;
              e2.$.listBox && requestAnimationFrame(() => {
                e2._setDropDownSize(), e2._positionDetection.checkBrowserBounds();
              });
            }
            _buttonsDownHandler(e2) {
              const t = this;
              if (!t.disabled) {
                if (t.hasRippleAnimation) if (t.$.buttonsContainer && "dropDownButton" !== t.dropDownOpenMode) {
                  const o = t.$.buttonsContainer;
                  o.firstElementChild.noRipple = true, Smart.Utilities.Animation.Ripple.animate(o, e2.pageX, e2.pageY), o.firstElementChild.noRipple = false;
                } else Smart.Utilities.Animation.Ripple.animate(e2.target, e2.pageX, e2.pageY);
                t._preventsSelectStart = true, t.tagName.toLowerCase().indexOf("smart-drop-down-") > -1 && "dropDownButton" === t.dropDownOpenMode && e2.target === t.$.actionButton && t.$.actionButton.setAttribute("active", ""), t.opened && (t._preventDropDownClose = true);
              }
            }
            _buttonsMouseEventsHandler(e2) {
              const t = this;
              t.disabled || ("mouseenter" === e2.type ? (t.setAttribute("hover", ""), e2.target.setAttribute("hover", ""), "dropDownButton" === t.dropDownOpenMode && e2.target === t.$.dropDownButton && t.setAttribute("drop-down-button-hover", "")) : (t.removeAttribute("hover"), t.removeAttribute("drop-down-button-hover"), e2.target.removeAttribute("hover")));
            }
            _calculateDropDownSize() {
              const e2 = this;
              e2._dropDownSize = {};
              const t = window.getComputedStyle(e2.$.dropDownContainer), o = parseFloat(t.getPropertyValue("border-top-width").trim()), n = parseFloat(t.getPropertyValue("border-bottom-width").trim()), i = parseFloat(t.getPropertyValue("margin-top").trim()), r2 = parseFloat(t.getPropertyValue("margin-bottom").trim()), a2 = parseFloat(t.getPropertyValue("padding-top").trim()), s = parseFloat(t.getPropertyValue("padding-bottom").trim());
              Smart.Utilities.Core.CSSVariablesSupport() && (e2._dropDownSize.width = t.getPropertyValue("--smart-drop-down-list-drop-down-width").trim(), e2._dropDownSize.height = t.getPropertyValue("--smart-drop-down-list-drop-down-height").trim()), (!e2._dropDownSize.width || e2._dropDownSize.width.indexOf("initial") > -1) && (e2._dropDownSize.width = e2.offsetWidth), e2._dropDownSize.height || (e2._dropDownSize.height = "auto"), e2._dropDownSize.minHeight = parseFloat(t.getPropertyValue("min-height").trim()), e2._dropDownSize.maxHeight = parseFloat(t.getPropertyValue("max-height").trim()), e2._dropDownSize.borderWidth = (isNaN(o) ? 0 : o) + (isNaN(n) ? 0 : n), e2._dropDownSize.paddingWidth = (isNaN(a2) ? 0 : a2) + (isNaN(s) ? 0 : s), e2._dropDownSize.marginWidth = (isNaN(i) ? 0 : i) + (isNaN(r2) ? 0 : r2);
            }
            _createElement() {
              const e2 = this;
              e2._tokenTemplate = e2._validateTemplate(e2.tokenTemplate), e2._applySelection(), e2._setDropDownSize(), e2._setFocusable(), e2.$.arrow.noRipple = true, e2._shadowDOMStylesDelay = e2.shadowRoot, e2._setAriaRelations(true);
            }
            _documentDownHandler(e2) {
              const t = this;
              if (t.disabled || t.readonly) return;
              let o = e2.originalEvent.target;
              if (o === t._overlay && (t._overlayDown = true), t.shadowRoot) {
                o = e2.originalEvent.composedPath()[0];
                let n2 = o.getRootNode().host;
                for (; n2; ) n2.closest(".smart-drop-down-container") === t.$.dropDownContainer && (t._isDropDownClicked = true), n2 = n2.getRootNode().host;
              } else t.isInShadowDOM && (o = e2.originalEvent.composedPath()[0]), t._isDropDownClicked = o.closest(".smart-drop-down-container") === t.$.dropDownContainer;
              if (t._buttonClicked = o.closest(".smart-action-button") || o.closest(".smart-drop-down-button"), t.$.listBox) {
                let n2 = o.closest("smart-list-item");
                t.$.listBox.contains(n2) || (n2 = void 0), t.hasRippleAnimation && n2 && Smart.Utilities.Animation.Ripple.animate(n2, e2.pageX, e2.pageY), (n2 || o === t.$.listBox.$.filterInput || o.closest(".smart-token")) && (t._preventDropDownClose = true);
              }
              if (t._isDropDownClicked && (t._preventDropDownClose = true), o !== t.$.resizeBar || "none" === t.resizeMode) return;
              t._resizeDetails || (t._resizeDetails = {});
              const n = t.$.dropDownContainer.getBoundingClientRect();
              t._resizeDetails.started = true, t._resizeDetails.x = e2.pageX, t._resizeDetails.y = e2.pageY, t._resizeDetails.width = t.$.dropDownContainer.offsetWidth, t._resizeDetails.height = t.$.dropDownContainer.offsetHeight, t._resizeDetails.offsetXL = e2.clientX - n.left, t._resizeDetails.offsetXR = n.left + t.$.dropDownContainer.offsetWidth - e2.clientX, t._resizeDetails.offsetY = n.top + t.$.dropDownContainer.offsetHeight - e2.clientY, t._resizeDetails.offsetYtop = e2.clientY - n.top, t._preventDropDownClose = true;
            }
            _documentMoveHandler(e2) {
              const t = this, o = t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if ("auto" === t.dropDownOpenMode && null !== t.dropDownAppendTo && (t.contains(o) || t.$.dropDownContainer.contains(o) ? t._isElementHovered = true : (t._isElementHovered = false, t._autoClose())), !t._resizeDetails || t._resizeDetails && !t._resizeDetails.started) return;
              t.setAttribute("resizing", ""), t._resizeDetails.resizeEventFired || (t.$.fireEvent("resizeStart", { position: { left: e2.pageX, top: e2.pageY } }), t._resizeDetails.resizeEventFired = true);
              const n = document.documentElement, i = t.$.dropDownContainer.getBoundingClientRect(), r2 = t.getBoundingClientRect(), a2 = t.$.dropDownContainer.hasAttribute("top") ? "top" : "bottom";
              let s;
              function l() {
                if (s = e2.pageY - t._resizeDetails.y, "bottom" === a2) t._resizeDetails.height = Math.min(n.clientHeight - i.top - 6, Math.max(0, t._resizeDetails.height + s)), t._resizeDetails.y = Math.max(i.top + n.scrollTop - t._resizeDetails.offsetY, Math.min(n.clientHeight + n.scrollTop - 1.5 * t._resizeDetails.offsetY, e2.pageY));
                else {
                  if (t._resizeDetails.height = Math.min(t._dropDownSize.maxHeight, Math.max(0, Math.min(r2.top, t._resizeDetails.height - s))), s = Math.max(0, i.top + (i.height - Math.max(t._dropDownSize.minHeight, t._resizeDetails.height))), t.dropDownAppendTo) {
                    const e3 = Math.abs(parseFloat(getComputedStyle(t.$.dropDownContainer).getPropertyValue("margin-bottom"))) || 0;
                    t.$.dropDownContainer.style.top = t.dropDownAppendTo ? e3 + s + "px" : "";
                  }
                  const o2 = r2.top + n.scrollTop + t._resizeDetails.offsetYtop;
                  t._resizeDetails.y = Math.max(t._resizeDetails.offsetYtop, Math.min(o2, Math.max(o2 - t._dropDownSize.maxHeight, e2.pageY)));
                }
                t.$.dropDownContainer.style.height = t._resizeDetails.height + "px";
              }
              function d2() {
                s = e2.pageX - t._resizeDetails.x, t._resizeDetails.width = Math.min(n.clientWidth - i.left - 6, Math.max(0, t._resizeDetails.width + s)), t.$.dropDownContainer.style.width = t._resizeDetails.width + "px", t._resizeDetails.x = Math.max(i.left + n.scrollLeft - t._resizeDetails.offsetXR, Math.min(n.clientWidth + n.scrollLeft - 1.5 * t._resizeDetails.offsetXR, e2.pageX));
              }
              switch (t.resizeMode) {
                case "vertical":
                  l();
                  break;
                case "horizontal":
                  d2();
                  break;
                case "both":
                  d2(), l();
              }
            }
            _documentUpHandler(e2) {
              const t = this;
              if (t.$.actionButton.removeAttribute("active"), t._resizeDetails && t._resizeDetails.started) return t._resizeDetails.started = t._resizeDetails.resizeEventFired = false, t.removeAttribute("resizing"), t._preventDropDownClose = false, t.focus(), void t.$.fireEvent("resizeEnd", { position: { left: e2.pageX, top: e2.pageY } });
              if (t.disabled || t._isDropDownClicked || t.readonly) return void delete t._isDropDownClicked;
              if (t._overlayDown) return t.close(), void delete t._overlayDown;
              let o = e2.originalEvent.target, n = o.closest ? o.closest("smart-drop-down-list") : void 0;
              if ((t.enableShadowDOM || t.isInShadowDOM) && (o = e2.originalEvent.composedPath()[0], n = o.getRootNode().host), t._preventsSelectStart = false, void 0 === o || o === t.$.resizeBar) return;
              if ("tokens" === t.selectionDisplayMode && o.classList.contains("smart-drop-down-list-selection-label") && n === t) {
                "none" !== t.dropDownOpenMode && t.open();
                let e3 = t.$.listBox._items.filter((e4) => e4[t.inputMember].toString() === o.textContent)[0];
                return t.$.listBox._scrollView.scrollTop = e3.offsetTop, void t._focus(e3);
              }
              if ("tokens" === t.selectionDisplayMode && o.classList.contains("smart-drop-down-list-unselect-button") && n === t) {
                if (1 === t.selectedIndexes.length && ["zeroOrMany", "zeroOrOne", "checkBox"].indexOf(t.selectionMode) < 0) return;
                return void t.unselect(t.$.listBox._items.filter((e3) => e3[t.inputMember].toString() === o.previousElementSibling.textContent)[0]);
              }
              const i = o.closest(".smart-action-button");
              let r2;
              if (t._buttonClicked && ("dropDownButton" === t.dropDownOpenMode && i && t._buttonClicked === t.$.actionButton ? t.$.fireEvent("actionButtonClick") : o.closest(".smart-drop-down-button") !== t._buttonClicked && i !== t._buttonClicked || (r2 = true, t.$.fireEvent("dropDownButtonClick"))), t._buttonClicked = void 0, i === t.$.actionButton || o.closest(".smart-drop-down-button") === t.$.dropDownButton) return "dropDownButton" === t.dropDownOpenMode && i === t.$.actionButton ? void t.close() : void (t.$dropDownContainer.hasClass("smart-visibility-hidden") && "none" !== t.dropDownOpenMode && r2 && "pointercancel" !== e2.originalEvent.type ? t.open() : t.close());
              o = t._getUpEventTarget(o), void 0 !== o && ("dropDownContainer" !== o && "item" !== o || "item" === o && "checkBox" !== t.selectionMode && t.selectionMode.indexOf("Many") < 0) && t.close();
            }
            _dragStartHandler(e2) {
              this._resizeDetails && this._resizeDetails.started && e2.preventDefault();
            }
            _dropDownTransitionendHandler() {
              const e2 = this;
              e2._edgeMacFF && !e2.opened && e2.hasAnimation && (e2.$.dropDownContainer.style.top = e2.$.dropDownContainer.style.left = "", e2.$dropDownContainer.addClass("not-in-view"));
            }
            _focus(e2) {
              this.$.listBox._focus(e2);
            }
            _blurEventHandler() {
              const e2 = this;
              e2.$.dropDownButton && (e2.removeAttribute("focus"), e2.$.dropDownButton.removeAttribute("focus")), e2.$.actionButton && (e2.removeAttribute("focus"), e2.$.actionButton.removeAttribute("focus")), e2.nodeName && "smart-drop-down-list" === e2.nodeName.toLowerCase() && !e2._preventDropDownClose && e2.close();
            }
            _focusEventHandler() {
              const e2 = this;
              e2.$.dropDownButton && (e2.setAttribute("focus", ""), e2.$.dropDownButton.setAttribute("focus", "")), e2.$.actionButton && (e2.setAttribute("focus", ""), e2.$.actionButton.setAttribute("focus", "")), e2.removeAttribute("drop-down-button-focus"), e2.removeAttribute("action-button-focus");
            }
            _buttonsFocusHandler(e2) {
              const t = this;
              e2.target === t.$.dropDownButton ? "focus" === e2.type ? t.setAttribute("drop-down-button-focus", "") : (t.removeAttribute("drop-down-button-focus"), t.nodeName && "smart-drop-down-list" === t.nodeName.toLowerCase() && !t._preventDropDownClose && t.close()) : "focus" === e2.type ? t.setAttribute("action-button-focus", "") : t.removeAttribute("action-button-focus");
            }
            _getUpEventTarget(e2) {
              const t = this;
              let o = e2;
              for (o = void 0 === o.parentElement ? o.getRootNode().host : o.parentElement; o; ) {
                if (o === t.$.dropDownContainer) {
                  o = "dropDownContainer";
                  break;
                }
                o = void 0 === o.parentElement ? o.getRootNode().host : o.parentElement;
              }
              return o;
            }
            _keyDownHandler(e2) {
              const t = this, o = t.enableShadowDOM && t.shadowRoot.activeElement || document.activeElement, n = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              if (!(t.$.listBox && n === t.$.listBox.$.filterInput || o !== t && o !== t.$.dropDownButton && o !== t.$.actionButton)) switch (e2.key) {
                case "Enter":
                case " ":
                  e2.preventDefault(), n !== t.$.actionButton && (t._keyPressed = true, t.opened ? (t._focusedItem && t.select(t._focusedItem), ("Enter" === e2.key && ["none"].indexOf(t.selectionMode) < 0 || " " === e2.key && ["none", "zeroAndOne", "one", "radioButton"].indexOf(t.selectionMode) > -1) && t.close()) : t.opened || t.readonly || "none" === t.dropDownOpenMode || t.open()), "dropDownButton" === t.dropDownOpenMode && n.setAttribute("active", "");
                  break;
                case "End":
                case "Home":
                case "PageUp":
                case "PageDown":
                case "ArrowUp":
                case "ArrowDown":
                  if (t.readonly) return;
                  if (e2.altKey) return t._keyPressed = false, void (t.$dropDownContainer.hasClass("smart-visibility-hidden") ? t.open() : t.close());
                  e2.preventDefault(), t.$.listBox._handleKeyStrokes(e2.key);
                  break;
                case "Escape":
                  e2.preventDefault(), t.close();
                  break;
                default:
                  if (t.readonly) return;
                  "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = true), t.$.listBox._applyIncrementalSearch(e2.key);
              }
            }
            _keyUpHandler(e2) {
              const t = this, o = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              t.$.listBox && o === t.$.listBox.$.filterInput || ("Enter" !== e2.key && " " !== e2.key || (o.removeAttribute("active"), t.$dropDownContainer.hasClass("smart-visibility-hidden") || (t._keyPressed = false)), t.$.listBox && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = false));
            }
            _listBoxChangeHandler(e2) {
              const t = this;
              if (e2.target === t.$.listBox) {
                if ((t.dropDownAppendTo || t.enableShadowDOM) && t.$.fireEvent("change", e2.detail), "list" === t.autoComplete && e2.detail) {
                  const o = t.$.listBox._items[e2.detail.index];
                  t._lastSelectedItem = o && o.selected ? o : void 0;
                }
                t._applySelection(t.selectionMode, e2.detail);
              } else e2.stopPropagation();
            }
            _listBoxItemClickHandler(e2) {
              const t = this;
              (t.dropDownAppendTo || t.enableShadowDOM) && t.$.fireEvent(e2.type, e2.detail), "checkBox" !== t.selectionMode && t.selectionMode.indexOf("Many") < 0 && t.close(), Smart.Utilities.Core.isMobile || t.focus(), delete t._isDropDownClicked;
            }
            _listBoxKeyDownHandler(e2) {
              const t = this;
              if ("Enter" === e2.key) return t.close(), "dropDownButton" === t.dropDownOpenMode ? t.$.dropDownButton.focus() : t.focus(), void e2.stopPropagation();
              "Escape" !== e2.key || t.close();
            }
            _mouseEnterHandler() {
              const e2 = this;
              e2._isElementHovered = true, e2.tagName.toLowerCase().indexOf("smart-drop-down-") > -1 && "auto" === e2.dropDownOpenMode && !e2.disabled && !e2.readonly && e2.open();
            }
            _mouseLeaveHandler() {
              const e2 = this;
              e2.removeAttribute("hover"), e2._isElementHovered = false, "auto" !== e2.dropDownOpenMode || e2.disabled || e2.readonly || e2._autoClose();
            }
            _mouseWheelHandler(e2) {
              const t = this;
              t.disabled || t.readonly || t.items && 0 === t.items.length || t.$dropDownContainer && !t.$dropDownContainer.hasClass("smart-visibility-hidden") || t.$.listBox && (e2.preventDefault(), t.$.listBox._handleKeyStrokes(e2.deltaY > 0 ? "ArrowDown" : "ArrowUp"));
            }
            _autoClose() {
              const e2 = this;
              e2._autoCloseTimeout = setTimeout((function() {
                e2._isElementHovered || e2.close(), clearTimeout(e2._autoCloseTimeout);
              }).bind(e2), e2.autoCloseDelay);
            }
            _propertyValidator(e2, t) {
              return "number" != typeof t && "string" != typeof t ? e2 : t;
            }
            _resizeHandler() {
              this.refresh();
            }
            refresh() {
              const e2 = this;
              "none" === e2.resizeMode && (e2._calculateDropDownSize(), e2._setDropDownSize());
            }
            _selectStartHandler(e2) {
              this._preventsSelectStart && e2.preventDefault();
            }
            _setAriaRelations(e2) {
              const t = this;
              let o, n;
              "dropDownButton" !== t.dropDownOpenMode ? (o = t.$.dropDownButton, o.setAttribute("aria-hidden", true), n = t, t.$.actionButton.removeAttribute("role")) : (o = t, n = t.$.dropDownButton, n.removeAttribute("aria-hidden"), t.$.actionButton.setAttribute("role", "button")), t._ariaButton = n, n.setAttribute("role", "button"), n.setAttribute("aria-haspopup", "listbox"), n.setAttribute("aria-owns", t.$.listBox.id), n.setAttribute("aria-describedby", t.$.hint.id), t.label ? n.setAttribute("aria-labelledby", t.$.label.id) : "DropDownList" === t.elementName && n.setAttribute("aria-labelledby", t.$.actionButton.id), o.setAttribute("role", "presentation"), o.removeAttribute("aria-owns"), e2 ? n.setAttribute("aria-expanded", t.opened) : (o.removeAttribute("aria-describedby"), o.removeAttribute("aria-expanded"), o.removeAttribute("aria-haspopup"), o.removeAttribute("aria-labelledby"));
            }
            _setDropDownSize() {
              const e2 = this, t = e2.$.listBox;
              let o;
              if (e2._dropDownSize || e2._calculateDropDownSize(), ["dropDownMinWidth", "dropDownMaxWidth"].forEach((t2) => {
                e2.$.dropDownContainer.style[t2.replace("dropDown", "").replace(/^./, "m")] = "initial" === e2[t2] ? e2.offsetWidth + "px" : e2[t2] ? parseFloat(e2[t2]) + (e2[t2].toString().endsWith("%") ? "%" : "px") : null;
              }), ["dropDownMinHeight", "dropDownMaxHeight"].forEach((t2) => {
                e2.$.dropDownContainer.style[t2.replace("dropDown", "").replace(/^./, "m")] = e2[t2] ? parseFloat(e2[t2]) + (e2[t2].toString().endsWith("%") ? "%" : "px") : null;
              }), e2.dropDownWidth ? "auto" !== e2.dropDownWidth ? e2.$.dropDownContainer.style.width = ("initial" === e2.dropDownWidth ? e2.offsetWidth : parseFloat(e2.dropDownWidth)) + "px" : e2.$.dropDownContainer.style.width = "auto" : e2.$.dropDownContainer.style.width = "auto" === e2._dropDownSize.width ? "auto" : (parseFloat(e2._dropDownSize.width) || 0) + "px", e2.dropDownHeight && "auto" !== e2.dropDownHeight) e2.$.dropDownContainer.style.height = parseFloat(e2.dropDownHeight) + ((e2.dropDownHeight + "").indexOf("%") > -1 ? "%" : "px");
              else if (!e2.$.listBox || "auto" !== e2._dropDownSize.height && "auto" !== e2.dropDownHeight) e2.$.dropDownContainer.style.height = e2._dropDownSize.height;
              else {
                e2.$.dropDownContainer.style.height = "";
                let n = 0;
                if (t.$.itemsContainer && (n = 2 * parseInt(window.getComputedStyle(t.$.itemsContainer).getPropertyValue("--smart-list-item-vertical-offset"))), isNaN(n) && (n = 6), o = n, t.items && t.items.length > 0 ? t.items.map((e3) => o += e3.height || e3.offsetHeight) : o = t.$.placeholder.offsetHeight, e2.filterable) {
                  const e3 = t.$.filterInputContainer;
                  o += e3.offsetHeight + e3.offsetTop;
                }
                o = o + e2._dropDownSize.paddingWidth + e2._dropDownSize.borderWidth, e2.$.dropDownContainer.style.height = o + "px";
              }
              if (t) {
                if (void 0 === o || !t.$) return void t._refreshLayout();
                const n = Math.max(0, e2._dropDownSize.minHeight - (o - t.$.horizontalScrollBar.offsetHeight));
                n && (e2.$.dropDownContainer.style.height = o + n + "px"), !e2.opened && e2.virtualized && t.refresh();
              }
            }
            _styleChangedHandler(e2) {
              const t = this;
              if (t.dropDownAppendTo) {
                const o = e2.detail.styleProperties, n = ["font-size", "font-family", "font-style", "font-weight"];
                for (let e3 = 0; e3 < n.length; e3++) o[n[e3]] && (t.$.dropDownContainer.style[n[e3]] = o[n[e3]].value);
              }
              "auto" === t._dropDownSize.height && t._setDropDownSize();
            }
            _validateTemplate(e2) {
              const t = this;
              if (e2 && "function" != typeof e2) if ("content" in document.createElement("template")) {
                if (e2 instanceof HTMLTemplateElement || (e2 = document.getElementById(e2)), null !== e2 && "content" in e2) return e2;
                t.error(t.localize("invalidTemplate", { elementType: t.nodeName.toLowerCase(), property: "tokenTemplate" }));
              } else t.error(t.localize("htmlTemplateNotSuported", { elementType: t.nodeName.toLowerCase() }));
            }
          });
        }
      ),
      /***/
      6321: (
        /***/
        () => {
          !function() {
            const e2 = "11.0.0", t = [];
            let n = "Smart";
            if (window[n] && window[n].Version) {
              if (window[n].Version === e2) return;
              if (window[n].Version !== e2) n += e2;
              else {
                let e3 = 2;
                for (; window[n]; ) n += e3.toString(), e3++;
              }
            }
            const o = navigator.userAgent.indexOf("Edge") > -1 && navigator.appVersion.indexOf("Edge") > -1;
            document.elementsFromPoint || (document.elementsFromPoint = document.msElementsFromPoint);
            class r2 {
              static isBoolean(e3) {
                return "boolean" == typeof e3;
              }
              static isFunction(e3) {
                return !!(e3 && e3.constructor && e3.call && e3.apply);
              }
              static isArray(e3) {
                return Array.isArray(e3);
              }
              static isObject(e3) {
                return e3 && ("object" == typeof e3 || this.isFunction(e3)) || false;
              }
              static isDate(e3) {
                return e3 instanceof Date;
              }
              static isString(e3) {
                return "string" == typeof e3;
              }
              static isNumber(e3) {
                return "number" == typeof e3;
              }
              static getType(e3) {
                const t2 = this, n2 = ["Boolean", "Number", "String", "Function", "Array", "Date", "Object"].find((n3) => {
                  if (t2["is" + n3](e3)) return n3;
                });
                return n2 ? n2.toLowerCase() : void 0;
              }
            }
            class i {
              static animate(e3, t2, o2, r3) {
                const i2 = e3;
                if (!i2 || i2 instanceof HTMLElement == 0) return;
                if (0 === i2.getElementsByClassName("smart-ripple").length) {
                  const e4 = document.createElement("span");
                  e4.classList.add("smart-ripple"), e4.setAttribute("role", "presentation");
                  let t3 = true, o3 = null;
                  if (window[n].EnableShadowDOM && i2.enableShadowDOM && true !== i2.isInShadowDOM) {
                    for (let e5 = 0; e5 < i2.shadowRoot.host.shadowRoot.children.length; e5++) "link" !== i2.shadowRoot.host.shadowRoot.children[e5].tagName.toLowerCase() && (o3 = i2.shadowRoot.host.shadowRoot.children[e5]);
                    i2.shadowRoot.host.shadowRoot.querySelector(".smart-ripple") && (t3 = false);
                  } else o3 = i2.firstElementChild;
                  t3 && (o3 && !o3.noRipple && o3.offsetHeight > 0 ? o3.appendChild(e4) : i2.appendChild(e4));
                }
                let s2 = null;
                if (s2 = window[n].EnableShadowDOM && i2.shadowRoot ? i2.shadowRoot.host.shadowRoot.querySelector(".smart-ripple") : i2.getElementsByClassName("smart-ripple")[0], !s2) return;
                s2.innerHTML = "", s2.classList.remove("smart-animate"), s2.style.height = s2.style.width = Math.max(i2.offsetHeight, i2.offsetWidth) + "px";
                const a3 = window.getComputedStyle(s2.parentElement), l2 = parseInt(a3.borderLeftWidth) || 0, d3 = parseInt(a3.borderTopWidth) || 0, c2 = i2.getBoundingClientRect(), u3 = t2 - (c2.left + window.pageXOffset) - s2.offsetWidth / 2 - l2, p3 = o2 - (c2.top + window.pageYOffset) - s2.offsetHeight / 2 - d3;
                s2.style.left = u3 + "px", s2.style.top = p3 + "px", s2.classList.add("smart-animate"), s2.addEventListener("animationend", function e4() {
                  s2.parentElement && s2.parentElement.removeChild(s2), r3 && r3(), s2.removeEventListener("animationend", e4), s2.removeEventListener("animationcancel", e4);
                }), s2.addEventListener("animationcancel", function e4() {
                  s2.parentElement && s2.parentElement.removeChild(s2), r3 && r3(), s2.removeEventListener("animationcancel", e4), s2.removeEventListener("animationend", e4);
                });
              }
            }
            class s {
              static easeInQuad(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 + t2;
              }
              static easeOutQuad(e3, t2, n2, o2) {
                return -n2 * (e3 /= o2) * (e3 - 2) + t2;
              }
              static easeInOutQuad(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 + t2 : -n2 / 2 * (--e3 * (e3 - 2) - 1) + t2;
              }
              static easeInCubic(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 + t2;
              }
              static easeOutCubic(e3, t2, n2, o2) {
                return n2 * ((e3 = e3 / o2 - 1) * e3 * e3 + 1) + t2;
              }
              static easeInOutCubic(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 + t2 : n2 / 2 * ((e3 -= 2) * e3 * e3 + 2) + t2;
              }
              static easeInQuart(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 * e3 + t2;
              }
              static easeOutQuart(e3, t2, n2, o2) {
                return -n2 * ((e3 = e3 / o2 - 1) * e3 * e3 * e3 - 1) + t2;
              }
              static easeInOutQuart(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 * e3 + t2 : -n2 / 2 * ((e3 -= 2) * e3 * e3 * e3 - 2) + t2;
              }
              static easeInQuint(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 * e3 * e3 + t2;
              }
              static easeOutQuint(e3, t2, n2, o2) {
                return n2 * ((e3 = e3 / o2 - 1) * e3 * e3 * e3 * e3 + 1) + t2;
              }
              static easeInOutQuint(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 * e3 * e3 + t2 : n2 / 2 * ((e3 -= 2) * e3 * e3 * e3 * e3 + 2) + t2;
              }
              static easeInSine(e3, t2, n2, o2) {
                return -n2 * Math.cos(e3 / o2 * (Math.PI / 2)) + n2 + t2;
              }
              static easeOutSine(e3, t2, n2, o2) {
                return n2 * Math.sin(e3 / o2 * (Math.PI / 2)) + t2;
              }
              static easeInOutSine(e3, t2, n2, o2) {
                return -n2 / 2 * (Math.cos(Math.PI * e3 / o2) - 1) + t2;
              }
              static easeInExpo(e3, t2, n2, o2) {
                return 0 === e3 ? t2 : n2 * Math.pow(2, 10 * (e3 / o2 - 1)) + t2;
              }
              static easeOutExpo(e3, t2, n2, o2) {
                return e3 === o2 ? t2 + n2 : n2 * (1 - Math.pow(2, -10 * e3 / o2)) + t2;
              }
              static easeInOutExpo(e3, t2, n2, o2) {
                return 0 === e3 ? t2 : e3 === o2 ? t2 + n2 : (e3 /= o2 / 2) < 1 ? n2 / 2 * Math.pow(2, 10 * (e3 - 1)) + t2 : n2 / 2 * (2 - Math.pow(2, -10 * --e3)) + t2;
              }
              static easeInCirc(e3, t2, n2, o2) {
                return -n2 * (Math.sqrt(1 - (e3 /= o2) * e3) - 1) + t2;
              }
              static easeOutCirc(e3, t2, n2, o2) {
                return n2 * Math.sqrt(1 - (e3 = e3 / o2 - 1) * e3) + t2;
              }
              static easeInOutCirc(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? -n2 / 2 * (Math.sqrt(1 - e3 * e3) - 1) + t2 : n2 / 2 * (Math.sqrt(1 - (e3 -= 2) * e3) + 1) + t2;
              }
              static easeInElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 1 == (e3 /= o2) ? t2 + n2 : (i2 || (i2 = 0.3 * o2), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), -s2 * Math.pow(2, 10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) + t2);
              }
              static easeOutElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 1 == (e3 /= o2) ? t2 + n2 : (i2 || (i2 = 0.3 * o2), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), s2 * Math.pow(2, -10 * e3) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) + n2 + t2);
              }
              static easeInOutElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 2 == (e3 /= o2 / 2) ? t2 + n2 : (i2 || (i2 = o2 * (0.3 * 1.5)), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), e3 < 1 ? s2 * Math.pow(2, 10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) * -0.5 + t2 : s2 * Math.pow(2, -10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) * 0.5 + n2 + t2);
              }
              static easeInBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), n2 * (e3 /= o2) * e3 * ((r3 + 1) * e3 - r3) + t2;
              }
              static easeOutBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), n2 * ((e3 = e3 / o2 - 1) * e3 * ((r3 + 1) * e3 + r3) + 1) + t2;
              }
              static easeInOutBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), (e3 /= o2 / 2) < 1 ? n2 / 2 * (e3 * e3 * ((1 + (r3 *= 1.525)) * e3 - r3)) + t2 : n2 / 2 * ((e3 -= 2) * e3 * ((1 + (r3 *= 1.525)) * e3 + r3) + 2) + t2;
              }
              static easeInBounce(e3, t2, n2, o2) {
                return n2 - this.easeOutBounce(o2 - e3, 0, n2, o2) + t2;
              }
              static easeOutBounce(e3, t2, n2, o2) {
                return (e3 /= o2) < 1 / 2.75 ? n2 * (7.5625 * e3 * e3) + t2 : e3 < 2 / 2.75 ? n2 * (7.5625 * (e3 -= 1.5 / 2.75) * e3 + 0.75) + t2 : e3 < 2.5 / 2.75 ? n2 * (7.5625 * (e3 -= 2.25 / 2.75) * e3 + 0.9375) + t2 : n2 * (7.5625 * (e3 -= 2.625 / 2.75) * e3 + 0.984375) + t2;
              }
              static easeInOutBounce(e3, t2, n2, o2) {
                return e3 < o2 / 2 ? 0.5 * this.easeInBounce(2 * e3, 0, n2, o2) + t2 : 0.5 * this.easeOutBounce(2 * e3 - o2, 0, n2, o2) + 0.5 * n2 + t2;
              }
            }
            class a2 {
              static get isMobile() {
                const e3 = /(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());
                return e3 || ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
              }
              static get Browser() {
                let e3;
                const t2 = function(t3) {
                  let n3 = t3.indexOf(e3);
                  if (-1 === n3) return;
                  const o2 = t3.indexOf("rv:");
                  return "Trident" === e3 && -1 !== o2 ? parseFloat(t3.substring(o2 + 3)) : parseFloat(t3.substring(n3 + e3.length + 1));
                };
                let n2 = {};
                return n2[function() {
                  const t3 = [{ string: navigator.userAgent, subString: "Edge", identity: "Edge" }, { string: navigator.userAgent, subString: "MSIE", identity: "IE" }, { string: navigator.userAgent, subString: "Trident", identity: "IE" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.userAgent, subString: "Opera", identity: "Opera" }, { string: navigator.userAgent, subString: "OPR", identity: "Opera" }, { string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "Safari", identity: "Safari" }];
                  for (let n3 = 0; n3 < t3.length; n3++) {
                    let o2 = t3[n3].string;
                    if (e3 = t3[n3].subString, -1 !== o2.indexOf(t3[n3].subString)) return t3[n3].identity;
                  }
                  return "Other";
                }()] = true, n2.version = t2(navigator.userAgent) || t2(navigator.appVersion) || "Unknown", n2;
              }
              static toCamelCase(e3) {
                return e3.replace(/-([a-z])/g, function(e4) {
                  return e4[1].toUpperCase();
                });
              }
              static toDash(e3) {
                return e3.split(/(?=[A-Z])/).join("-").toLowerCase();
              }
              static unescapeHTML(e3) {
                return new DOMParser().parseFromString(e3, "text/html").documentElement.textContent;
              }
              static escapeHTML(e3) {
                const t2 = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;", "`": "&#x60;", "=": "&#x3D;" };
                return String(e3).replace(/[&<>"'`=\/]/g, (e4) => t2[e4]);
              }
              static sanitizeHTML(e3) {
                if (e3 && (e3.indexOf("onclick") >= 0 || e3.indexOf("onload") >= 0 || e3.indexOf("onerror") >= 0)) return this.escapeHTML(e3);
                const t2 = new RegExp("<s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<s*/s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>", "ig");
                return String(e3).replace(t2, (e4) => this.escapeHTML(e4));
              }
              static createGUID() {
                function e3() {
                  return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                }
                return e3() + e3() + "-" + e3() + "-" + e3() + "-" + e3() + "-" + e3() + e3() + e3();
              }
              static getScriptLocation() {
                return "./" !== window[n].BaseUrl ? window[n].BaseUrl : function() {
                  if (document.currentScript) {
                    let e4 = document.currentScript.src, t3 = e4.lastIndexOf("/");
                    return e4 = e4.substring(0, t3), e4;
                  }
                  const e3 = new Error();
                  let t2 = "(", n2 = ")";
                  if (Smart.Utilities.Core.Browser.Safari && (t2 = "@", n2 = "\n"), e3.fileName) return e3.fileName.replace("/smart.element.js", "");
                  let o2 = e3.stack.split(t2);
                  return o2 = o2[1], o2 = o2.split(n2)[0], o2 = o2.split(":"), o2.splice(-2, 2), o2 = o2.join(":"), o2.replace("/smart.element.js", "");
                }();
              }
              static CSSVariablesSupport() {
                return window.CSS && window.CSS.supports && window.CSS.supports("(--fake-var: 0)");
              }
              static assign(e3, t2) {
                const n2 = (e4) => e4 && "object" == typeof e4 && !Array.isArray(e4) && null !== e4;
                let o2 = Object.assign({}, e3);
                return n2(e3) && n2(t2) && Object.keys(t2).forEach((r3) => {
                  n2(t2[r3]) ? r3 in e3 ? o2[r3] = this.assign(e3[r3], t2[r3]) : Object.assign(o2, { [r3]: t2[r3] }) : Object.assign(o2, { [r3]: t2[r3] });
                }), o2;
              }
              static html(e3, t2) {
                const n2 = this;
                let o2 = "", r3 = e3.childNodes;
                if (!t2) {
                  for (let e4, t3 = 0, i2 = r3.length; t3 < i2 && (e4 = r3[t3]); t3++) {
                    const t4 = ["strong"];
                    if (e4 instanceof HTMLElement || e4.tagName && t4.indexOf(e4.tagName.toLowerCase()) >= 0) {
                      const t5 = e4.tagName.toLowerCase(), r4 = e4.attributes;
                      let i3 = "<" + t5;
                      for (let e5, t6 = 0; e5 = r4[t6]; t6++) i3 += " " + e5.name + '="' + e5.value.replace(/[&\u00A0"]/g, y2.Core.escapeHTML) + '"';
                      i3 += ">", ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"][t5] && (o2 += i3), o2 = o2 + i3 + n2.html(e4) + "</" + t5 + ">";
                    } else {
                      if (8 === e4.nodeType) continue;
                      o2 += e4.textContent.replace(/[&\u00A0<>]/g, y2.Core.escapeHTML);
                    }
                  }
                  return o2;
                }
                {
                  const n3 = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
                  e3.innerHTML = t2.replace(n3, "<$1></$2>");
                }
              }
            }
            let l = [];
            class d2 {
              static watch(e3) {
                switch (e3.nodeName.toLowerCase()) {
                  case "smart-grid":
                  case "smart-kanban":
                  case "smart-table":
                  case "smart-pivot-table":
                  case "smart-scheduler":
                  case "smart-tabs":
                  case "smart-card-view":
                  case "smart-list-box":
                  case "smart-combo-box":
                  case "smart-drop-down-list":
                  case "smart-calendar":
                  case "smart-gauge":
                  case "smart-numeric-text-box":
                  case "smart-menu":
                  case "smart-tree":
                    l.push(e3);
                    break;
                  default:
                    return;
                }
                d2.start();
              }
              static start() {
                d2.isStarted || (d2.isStarted = true, d2.interval && clearInterval(d2.interval), 0 === l.length || document.hidden ? d2.isStarted = false : d2.interval = setInterval(function() {
                  d2.observe();
                }, 100));
              }
              static stop() {
                d2.isStarted = false, d2.interval && clearInterval(d2.interval);
              }
              static observeElement(e3) {
                const t2 = e3;
                if ("test" === window.Smart.Mode || document.hidden) return void (d2.interval && clearInterval(d2.interval));
                let n2 = e3._computedStyle || "resize" !== t2.hasStyleObserver ? document.defaultView.getComputedStyle(t2, null) : {}, o2 = true, r3 = "resize" !== t2.hasStyleObserver ? ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth", "display", "visibility", "font-size", "font-family", "font-style", "font-weight", "max-height", "min-height", "max-width", "min-width", "overflow", "overflow-x", "overflow-y"] : [];
                if (e3.styleProperties && (r3 = r3.concat(e3.styleProperties)), e3.observableStyleProperties && (r3 = e3.observableStyleProperties), !t2._styleInfo) {
                  t2._styleInfo = [];
                  for (let e4 = 0; e4 < r3.length; e4++) {
                    const o3 = r3[e4], i3 = o3.startsWith("--") ? n2.getPropertyValue(o3) : n2[o3];
                    t2._styleInfo[o3] = i3;
                  }
                  return;
                }
                if (e3.isHidden || "none" !== n2.display && (0 !== e3.offsetWidth && 0 !== e3.offsetHeight || (e3.isHidden = true)), e3.isHidden) {
                  if (e3.visibilityChangedHandler(), e3.isHidden) return;
                  o2 = false;
                }
                let i2 = [];
                for (let e4 = 0; e4 < r3.length; e4++) {
                  const o3 = r3[e4], s2 = o3.startsWith("--") ? n2.getPropertyValue(o3) : n2[o3];
                  t2._styleInfo[o3] !== s2 && (i2[o3] = { oldValue: t2._styleInfo[o3], value: s2 }, i2.length++), t2._styleInfo[o3] = s2;
                }
                i2.length > 0 && (t2.$.fireEvent("styleChanged", { styleProperties: i2 }, { bubbles: false, cancelable: true }), i2.display && o2 && t2.$.fireEvent("resize", t2, { bubbles: false, cancelable: true }));
              }
              static observe() {
                for (let e3 = 0; e3 < l.length; e3++) {
                  const t2 = l[e3];
                  this.observeElement(t2);
                }
              }
              static unwatch(e3) {
                d2.stop();
                const t2 = l.indexOf(e3);
                -1 !== t2 && l.splice(t2, 1), d2.start();
              }
            }
            let c = [];
            const u2 = [], p2 = ["resize", "down", "up", "move", "tap", "taphold", "swipeleft", "swiperight", "swipetop", "swipebottom"];
            class h2 {
              constructor(e3) {
                const t2 = this;
                t2.target = e3, t2.$target = new f2(e3), t2.$document = e3.$document ? e3.$document : new f2(document), t2.id = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase();
                let n2 = { handlers: {}, boundEventTypes: [], listen: t2.listen.bind(t2), unlisten: t2.unlisten.bind(t2) };
                return t2.tapHoldDelay = 750, t2.swipeMin = 10, t2.swipeMax = 5e3, t2.swipeDelay = 1e3, t2.tapHoldDelay = 750, t2.inputEventProperties = ["clientX", "clientY", "pageX", "pageY", "screenX", "screenY"], p2.forEach((e4) => {
                  n2[e4] = (t3) => {
                    n2.handlers[e4] = t3;
                  }, t2[e4] = (e5) => {
                    if (!n2.handlers[e5.type]) {
                      if (("mousemove" === e5.type || "pointermove" === e5.type || "touchmove" === e5.type) && n2.handlers.move) {
                        const o2 = t2.createEvent(e5, "move");
                        n2.handlers.move(o2);
                      }
                      return true;
                    }
                    return n2.handlers[e5.type](e5);
                  };
                }), t2.listen(), t2.handlers = n2.handlers, n2;
              }
              listen(e3) {
                const t2 = this;
                if ("resize" === e3 && t2.target !== document && t2.target !== window && false !== t2.target.hasResizeObserver) {
                  if (Smart.Utilities.Core.Browser.Firefox) {
                    if (!t2.target.resizeObserver) {
                      let e4, n2, o2, r3 = false, i2 = t2.target.offsetWidth, s2 = t2.target.offsetHeight;
                      const a3 = new ResizeObserver(() => {
                        if (!r3) return void (r3 = true);
                        const a4 = new CustomEvent("resize", { bubbles: false, cancelable: true });
                        n2 = t2.target.offsetWidth, o2 = t2.target.offsetHeight, e4 = n2 !== i2 || o2 !== s2, t2.target.requiresLayout && (e4 = true), e4 && (t2.resize(a4), t2.target.requiresLayout = false);
                      });
                      a3.observe(t2.target), t2.target.resizeObserver = a3;
                    }
                  } else if (!t2.target.resizeTrigger) {
                    const e4 = document.createElement("div");
                    e4.className = "smart-resize-trigger-container", e4.innerHTML = '<div class="smart-resize-trigger-container"><div class="smart-resize-trigger"></div></div><div class="smart-resize-trigger-container"><div class="smart-resize-trigger-shrink"></div></div>', e4.setAttribute("aria-hidden", true), window[n].EnableShadowDOM && t2.target.shadowRoot ? t2.target.shadowRoot.appendChild(e4) : t2.target.appendChild(e4), t2.target.resizeTrigger = e4;
                    const o2 = e4.childNodes[0], r3 = o2.childNodes[0], i2 = e4.childNodes[1], s2 = function() {
                      r3.style.width = "100000px", r3.style.height = "100000px", o2.scrollLeft = 1e5, o2.scrollTop = 1e5, i2.scrollLeft = 1e5, i2.scrollTop = 1e5;
                    };
                    let a3, l2, d3, c2, u3 = t2.target.offsetWidth, p3 = t2.target.offsetHeight;
                    if (0 === u3 || 0 === p3) {
                      const e5 = function() {
                        s2(), t2.target.removeEventListener("resize", e5);
                      };
                      t2.target.addEventListener("resize", e5), s2();
                    } else s2();
                    t2.target.resizeHandler = function() {
                      l2 || (l2 = requestAnimationFrame(function() {
                        if (l2 = 0, d3 = t2.target.offsetWidth, c2 = t2.target.offsetHeight, a3 = d3 !== u3 || c2 !== p3, t2.target.requiresLayout && (a3 = true), !a3) return;
                        u3 = d3, p3 = c2;
                        const e5 = new CustomEvent("resize", { bubbles: false, cancelable: true });
                        t2.resize(e5), t2.target.requiresLayout = false;
                      })), s2();
                    }, o2.addEventListener("scroll", t2.target.resizeHandler), i2.addEventListener("scroll", t2.target.resizeHandler);
                  }
                }
                t2.isListening || (t2.isListening = true, t2.isPressed = false, t2.isReleased = false, t2.isInBounds = false, window.PointerEvent ? (t2.$target.listen("pointerdown.inputEvents" + t2.id, t2.pointerDown.bind(t2)), t2.$target.listen("pointerup.inputEvents" + t2.id, t2.pointerUp.bind(t2)), t2.$target.listen("pointermove.inputEvents" + t2.id, t2.pointerMove.bind(t2)), t2.$target.listen("pointercancel.inputEvents" + t2.id, t2.pointerCancel.bind(t2))) : ("ontouchstart" in window && (t2.$target.listen("touchmove.inputEvents" + t2.id, t2.touchMove.bind(t2)), t2.$target.listen("touchstart.inputEvents" + t2.id, t2.touchStart.bind(t2)), t2.$target.listen("touchend.inputEvents" + t2.id, t2.touchEnd.bind(t2)), t2.$target.listen("touchcancel.inputEvents" + t2.id, t2.touchCancel.bind(t2))), t2.$target.listen("mousedown.inputEvents" + t2.id, t2.mouseDown.bind(t2)), t2.$target.listen("mouseup.inputEvents" + t2.id, t2.mouseUp.bind(t2)), t2.$target.listen("mousemove.inputEvents" + t2.id, t2.mouseMove.bind(t2)), t2.$target.listen("mouseleave.inputEvents" + t2.id, t2.mouseLeave.bind(t2))), t2.target._handleDocumentUp || (t2.target._handleDocumentUp = t2.handleDocumentUp.bind(t2), t2.target._handleDocumentUpId = t2.id, t2.$document.listen("mouseup.inputEvents" + t2.target._handleDocumentUpId, t2.target._handleDocumentUp)));
              }
              unlisten(e3) {
                const t2 = this;
                if (t2.isListening = false, window.PointerEvent ? (t2.$target.unlisten("pointerdown.inputEvents" + t2.id), t2.$target.unlisten("pointerup.inputEvents" + t2.id), t2.$target.unlisten("pointermove.inputEvents" + t2.id), t2.$target.unlisten("pointercancel.inputEvents" + t2.id)) : ("ontouchstart" in window && (t2.$target.unlisten("touchstart.inputEvents" + t2.id), t2.$target.unlisten("touchmove.inputEvents" + t2.id), t2.$target.unlisten("touchend.inputEvents" + t2.id), t2.$target.unlisten("touchcancel.inputEvents" + t2.id)), t2.$target.unlisten("mousedown.inputEvents" + t2.id), t2.$target.unlisten("mouseup.inputEvents" + t2.id), t2.$target.unlisten("mousemove.inputEvents" + t2.id), t2.$target.unlisten("mouseleave.inputEvents" + t2.id)), t2.target._handleDocumentUp && (t2.$document.unlisten("mouseup.inputEvents" + t2.target._handleDocumentUpId, t2.target._handleDocumentUp), delete t2.target._handleDocumentUp, delete t2.target._handleDocumentUpId), "resize" === e3) {
                  if (Smart.Utilities.Core.Browser.Firefox) t2.target.resizeObserver && (t2.target.resizeObserver.unobserve(t2.target), delete t2.target.resizeObserver);
                  else if (t2.target.resizeTrigger) {
                    const e4 = t2.target.resizeTrigger, n2 = e4.childNodes[0], o2 = e4.childNodes[1];
                    n2.removeEventListener("scroll", t2.target.resizeHandler), o2.removeEventListener("scroll", t2.target.resizeHandler), t2.target.resizeHandler = null, e4.parentNode.removeChild(e4), delete t2.target.resizeTrigger;
                  }
                }
              }
              handleDocumentUp(e3) {
                const t2 = this;
                t2.isPressed = false, t2.isReleased = false, t2.resetSwipe(e3);
              }
              createEvent(e3, t2) {
                const n2 = this, o2 = e3.touches, r3 = e3.changedTouches, i2 = o2 && o2.length ? o2[0] : r3 && r3.length ? r3[0] : void 0, s2 = new CustomEvent(t2, { bubbles: true, cancelable: true, composed: void 0 !== n2.$target.element.getRootNode().host });
                if (s2.originalEvent = e3, i2) {
                  for (let e4 = 0; e4 < n2.inputEventProperties.length; e4++) {
                    const t3 = n2.inputEventProperties[e4];
                    s2[t3] = i2[t3];
                  }
                  return s2;
                }
                for (let t3 in e3) t3 in s2 || (s2[t3] = e3[t3]);
                return s2;
              }
              fireTap(e3) {
                const t2 = this;
                if (clearTimeout(this.tapHoldTimeout), !this.tapHoldFired && this.isInBounds) {
                  const n2 = t2.createEvent(e3, "tap");
                  t2.tap(n2);
                }
              }
              initTap(e3) {
                const t2 = this;
                t2.isInBounds = true, t2.tapHoldFired = false, t2.tapHoldTimeout = setTimeout(function() {
                  if (t2.isInBounds) {
                    t2.tapHoldFired = true;
                    const n2 = t2.createEvent(e3, "taphold");
                    t2.taphold(n2);
                  }
                }, t2.tapHoldDelay);
              }
              pointerDown(e3) {
                return this.handleDown(e3);
              }
              mouseDown(e3) {
                const t2 = this;
                if (!(t2.isPressed || t2.touchStartTime && /* @__PURE__ */ new Date() - t2.touchStartTime < 500)) return t2.handleDown(e3);
              }
              touchStart(e3) {
                const t2 = this;
                return t2.touchStartTime = /* @__PURE__ */ new Date(), t2.isTouchMoved = true, t2.handleDown(e3);
              }
              mouseUp(e3) {
                const t2 = this;
                if (!(t2.isReleased || t2.touchEndTime && /* @__PURE__ */ new Date() - t2.touchEndTime < 500)) return t2.handleUp(e3);
              }
              handleDown(e3) {
                const t2 = this;
                t2.isReleased = false, t2.isPressed = true;
                const n2 = t2.createEvent(e3, "down");
                return (t2.handlers.tap || t2.handlers.taphold) && t2.initTap(n2), (t2.handlers.swipeleft || t2.handlers.swiperight || t2.handlers.swipetop || t2.handlers.swipebottom) && t2.initSwipe(n2), t2.down(n2);
              }
              handleUp(e3) {
                const t2 = this;
                t2.isReleased = true, t2.isPressed = false;
                const n2 = t2.createEvent(e3, "up"), o2 = t2.up(n2);
                return (t2.handlers.tap || t2.handlers.taphold) && t2.fireTap(n2), t2.resetSwipe(n2), o2;
              }
              handleMove(e3) {
                const t2 = this;
                let n2 = t2.move(e3);
                return t2.isPressed && (t2._maxSwipeVerticalDistance = Math.max(t2._maxSwipeVerticalDistance, Math.abs(t2._startY - e3.pageY)), t2._maxSwipeHorizontalDistance = Math.max(t2._maxSwipeHorizontalDistance, Math.abs(t2._startX - e3.pageX)), n2 = t2.handleSwipeEvents(e3)), n2;
              }
              touchEnd(e3) {
                return this.touchEndTime = /* @__PURE__ */ new Date(), this.handleUp(e3);
              }
              pointerUp(e3) {
                return this.handleUp(e3);
              }
              pointerCancel(e3) {
                this.pointerUp(e3);
              }
              touchCancel(e3) {
                this.touchEnd(e3);
              }
              mouseLeave() {
                this.isInBounds = false;
              }
              mouseMove(e3) {
                if (!this.isTouchMoved) return this.handleMove(e3);
              }
              pointerMove(e3) {
                return this.handleMove(e3);
              }
              touchMove(e3) {
                const t2 = this, n2 = e3.touches, o2 = e3.changedTouches, r3 = n2 && n2.length ? n2[0] : o2 && o2.length ? o2[0] : void 0;
                for (let n3 = 0; n3 < t2.inputEventProperties.length; n3++) {
                  const o3 = t2.inputEventProperties[n3];
                  void 0 === e3[o3] && (e3[o3] = r3[o3]);
                }
                return t2.isTouchMoved = true, t2.handleMove(e3);
              }
              handleSwipeEvents(e3) {
                const t2 = this;
                let n2 = true;
                return (t2.handlers.swipetop || t2.handlers.swipebottom) && (n2 = this.handleVerticalSwipeEvents(e3)), false === n2 || (t2.handlers.swipeleft || t2.handlers.swiperight) && (n2 = this.handleHorizontalSwipeEvents(e3)), n2;
              }
              handleVerticalSwipeEvents(e3) {
                let t2, n2;
                return t2 = e3.pageY, n2 = t2 - this._startY, this.swiped(e3, n2, "vertical");
              }
              handleHorizontalSwipeEvents(e3) {
                let t2, n2;
                return t2 = e3.pageX, n2 = t2 - this._startX, this.swiped(e3, n2, "horizontal");
              }
              swiped(e3, t2, n2) {
                const o2 = this;
                if (n2 = n2 || 0, Math.abs(t2) >= o2.swipeMin && !o2._swipeEvent && !o2._swipeLocked) {
                  let r3 = t2 < 0 ? "swipeleft" : "swiperight";
                  if ("horizontal" === n2 ? o2._swipeEvent = o2.createEvent(e3, r3) : (r3 = t2 < 0 ? "swipetop" : "swipebottom", o2._swipeEvent = o2.createEvent(e3, t2 < 0 ? "swipetop" : "swipebottom")), o2[r3] && (o2[r3](this._swipeEvent), Math.abs(t2) <= this.swipeMax)) return e3.stopImmediatePropagation(), false;
                }
                return true;
              }
              resetSwipe() {
                this._swipeEvent = null, clearTimeout(this._swipeTimeout);
              }
              initSwipe(e3) {
                const t2 = this;
                t2._maxSwipeVerticalDistance = 0, t2._maxSwipeHorizontalDistance = 0, t2._startX = e3.pageX, t2._startY = e3.pageY, t2._swipeLocked = false, t2._swipeEvent = null, t2._swipeTimeout = setTimeout(function() {
                  t2._swipeLocked = true;
                }, t2.swipeDelay);
              }
            }
            class m2 {
              get scrollWidth() {
                const e3 = this;
                return e3.horizontalScrollBar ? e3.horizontalScrollBar.max : -1;
              }
              set scrollWidth(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.horizontalScrollBar && (t2.horizontalScrollBar.max = e3);
              }
              get scrollHeight() {
                const e3 = this;
                return e3.verticalScrollBar ? e3.verticalScrollBar.max : -1;
              }
              set scrollHeight(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.verticalScrollBar && (t2.verticalScrollBar.max = e3);
              }
              get scrollLeft() {
                const e3 = this;
                return e3.horizontalScrollBar ? e3.horizontalScrollBar.value : -1;
              }
              set scrollLeft(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.horizontalScrollBar && (t2.horizontalScrollBar.value = e3);
              }
              get scrollTop() {
                const e3 = this;
                return e3.verticalScrollBar ? e3.verticalScrollBar.value : -1;
              }
              set scrollTop(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.verticalScrollBar && (t2.verticalScrollBar.value = e3);
              }
              get vScrollBar() {
                return this.verticalScrollBar;
              }
              get hScrollBar() {
                return this.horizontalScrollBar;
              }
              constructor(e3, t2, n2) {
                const o2 = this;
                o2.container = e3, o2.horizontalScrollBar = t2, o2.verticalScrollBar = n2, o2.disableSwipeScroll = false, o2.listen();
              }
              listen() {
                const e3 = this, t2 = a2.isMobile, n2 = e3.horizontalScrollBar, o2 = e3.verticalScrollBar;
                let r3, i2, s2, l2, d3, c2, u3, p3;
                e3.inputEvents = new h2(e3.container);
                const m3 = function(e4) {
                  return { amplitude: 0, delta: 0, initialValue: 0, min: 0, max: e4.max, previousValue: 0, pointerPosition: 0, targetValue: 0, scrollBar: e4, value: 0, velocity: 0 };
                }, f3 = m3(n2), g3 = m3(o2), w2 = function() {
                  const t3 = e3.container.touchVelocityCoefficient || 50;
                  c2 = Date.now(), u3 = c2 - l2, l2 = c2;
                  const n3 = function(e4) {
                    e4.delta = e4.value - e4.previousValue, e4.previousValue = e4.value;
                    let n4 = t3 * e4.delta / (1 + u3);
                    e4.velocity = 0.8 * n4 + 0.2 * e4.velocity;
                  };
                  n3(g3), n3(f3);
                }, b3 = function(e4) {
                  return p3.value = e4 > p3.max ? p3.max : e4 < p3.min ? p3.min : e4, p3.scrollBar.value = p3.value, e4 > p3.max ? "max" : e4 < p3.min ? "min" : "value";
                };
                function v3() {
                  let t3, n3;
                  p3.amplitude && (e3.container.$.fireEvent("kineticScroll"), t3 = Date.now() - l2, n3 = -p3.amplitude * Math.exp(-t3 / 500), n3 > 5 || n3 < -5 ? (b3(p3.targetValue + n3), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(v3)) : b3(p3.targetValue));
                }
                let C3;
                e3.inputEvents.down(function(n3) {
                  if (!t2) return;
                  const o3 = n3.originalEvent.target, i3 = o3 && o3.closest ? o3.closest("smart-scroll-bar") : void 0;
                  if (i3 === e3.horizontalScrollBar || i3 === e3.verticalScrollBar) return;
                  s2 = true, r3 = false;
                  const a3 = function(e4, t3) {
                    e4.amplitude = 0, e4.pointerPosition = t3, e4.previousValue = e4.value, e4.value = e4.scrollBar.value, e4.initialValue = e4.value, e4.max = e4.scrollBar.max;
                  };
                  a3(g3, n3.clientY), a3(f3, n3.clientX), l2 = Date.now(), clearInterval(d3), d3 = setInterval(w2, 500);
                }), e3.inputEvents.up(function() {
                  if (!s2) return true;
                  if (clearInterval(d3), e3.disableSwipeScroll) return void (s2 = false);
                  const t3 = function(e4) {
                    p3 = e4, e4.amplitude = 0.8 * e4.velocity, e4.targetValue = Math.round(e4.value + e4.amplitude), l2 = Date.now(), cancelAnimationFrame(i2), i2 = requestAnimationFrame(v3), e4.velocity = 0;
                  };
                  g3.velocity > 10 || g3.velocity < -10 ? t3(g3) : (f3.velocity > 10 || f3.velocity < -10) && t3(f3), s2 = false;
                }), e3.inputEvents.move(function(t3) {
                  if (!s2) return true;
                  if (e3.disableSwipeScroll) return;
                  if (r3 && (t3.originalEvent.preventDefault(), t3.originalEvent.stopPropagation()), f3.visible = e3.scrollWidth > 0, g3.visible = e3.scrollHeight > 0, !s2 || !f3.visible && !g3.visible) return;
                  const n3 = e3.container.touchScrollRatio, o3 = e3.container;
                  let i3, a3;
                  n3 && ("number" == typeof n3 ? (i3 = -n3, a3 = -n3) : "function" == typeof n3 && (i3 = n3(g3.max, o3.offsetHeight), a3 = n3(f3.max, o3.offsetWidth))), g3.ratio = i3 || -g3.max / o3.offsetHeight, g3.delta = (t3.clientY - g3.pointerPosition) * g3.ratio, f3.ratio = a3 || -f3.max / o3.offsetWidth, f3.delta = (t3.clientX - f3.pointerPosition) * f3.ratio;
                  let l3 = "value";
                  const d4 = function(t4, n4, o4) {
                    return t4.delta > 5 || t4.delta < -5 ? (p3 = t4, l3 = t4.initialValue + t4.delta > p3.max ? "max" : t4.initialValue + t4.delta < p3.min ? "min" : "value", "min" === l3 && 0 === t4.initialValue || "max" === l3 && t4.initialValue === t4.max || !t4.visible || (e3.container.$.fireEvent("kineticScroll"), b3(t4.initialValue + t4.delta), w2(), o4.originalEvent.preventDefault(), o4.originalEvent.stopPropagation(), r3 = true, false)) : null;
                  };
                  let c3 = d4(g3, t3.clientY, t3);
                  if (null !== c3) return c3;
                  {
                    let e4 = d4(f3, t3.clientX, t3);
                    if (null !== e4) return e4;
                  }
                }), e3.scrollTo = function(t3, n3) {
                  const o3 = false === n3 ? f3 : g3;
                  let r4 = false;
                  l2 || (l2 = Date.now()), C3 || (C3 = Date.now()), Math.abs(Date.now() - C3) > 375 ? l2 = Date.now() : r4 = true, C3 = Date.now(), o3.value = o3.scrollBar.value, o3.delta = t3 - o3.value, o3.max = o3.scrollBar.max, t3 <= o3.min && (t3 = o3.min), t3 >= o3.max && (t3 = o3.max), o3.targetValue = t3;
                  const s3 = t3;
                  let a3 = o3.value;
                  o3.velocity = 100 * o3.delta / (1 + o3.max), o3.from = a3;
                  const d4 = function(e4) {
                    return o3.value = e4 > o3.max ? o3.max : e4 < o3.min ? o3.min : e4, o3.scrollBar.value = o3.value, e4 > o3.max ? "max" : e4 < o3.min ? "min" : "value";
                  }, c3 = function() {
                    let n4, u4 = Date.now() - C3, p4 = Math.min(1e3, Date.now() - l2), h3 = o3.velocity * Math.exp(p4 / 175);
                    if (r4) (h3 < 0 && o3.value <= t3 || h3 > 0 && o3.value >= t3) && (h3 = 0), (o3.value + h3 <= o3.min || o3.value + h3 >= o3.max) && (h3 = 0), h3 > 0.5 || h3 < -0.5 ? (d4(o3.value + h3), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(c3)) : d4(o3.targetValue);
                    else {
                      if (u4 >= 175) return cancelAnimationFrame(i2), e3.container.$.fireEvent("kineticScroll"), void (i2 = 0);
                      n4 = y2.Animation.Easings.easeInSine(u4, a3, s3 - a3, 175), d4(n4), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(c3);
                    }
                  };
                  cancelAnimationFrame(i2), i2 = requestAnimationFrame(c3);
                }, e3.inputEvents.listen();
              }
              unlisten() {
                const e3 = this;
                e3.inputEvents && e3.inputEvents.unlisten(), delete e3.inputEvents;
              }
            }
            class f2 {
              constructor(e3) {
                this.events = {}, this.handlers = {}, this.element = e3;
              }
              hasClass(e3) {
                const t2 = this, n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) if (!t2.element.classList.contains(n2[e4])) return false;
                return true;
              }
              addClass(e3) {
                const t2 = this;
                if (t2.hasClass(e3)) return;
                const n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) t2.element.classList.add(n2[e4]);
                t2.isNativeElement || d2.observeElement(t2.element);
              }
              removeClass(e3) {
                const t2 = this;
                if (0 === arguments.length) return void t2.element.removeAttribute("class");
                const n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) t2.element.classList.remove(n2[e4]);
                "" === t2.element.className && t2.element.removeAttribute("class"), t2.isNativeElement || d2.observeElement(t2.element);
              }
              get isCustomElement() {
                const e3 = this;
                return !!e3.element.tagName.startsWith(n) || e3.element instanceof window[n].BaseElement == 1 || "DIV" !== e3.element.tagName && "SPAN" !== e3.element.tagName && "BUTTON" !== e3.element.tagName && "INPUT" !== e3.element.tagName && "UL" !== e3.element.tagName && "LI" !== e3.element.tagName && document.createElement(e3.element.nodeName) instanceof window[n].BaseElement == 1;
              }
              get isNativeElement() {
                return !this.isCustomElement;
              }
              dispatch(e3) {
                const t2 = this, n2 = t2.events[e3.type];
                let o2 = false;
                if (n2.length > 1) for (let e4 = 0; e4 < n2.length; e4++) {
                  const t3 = n2[e4];
                  if (t3.namespace && t3.namespace.indexOf("_") >= 0) {
                    o2 = true;
                    break;
                  }
                }
                o2 && n2.sort(function(e4, t3) {
                  let n3 = e4.namespace, o3 = t3.namespace;
                  return n3 = -1 === n3.indexOf("_") ? 0 : parseInt(n3.substring(n3.indexOf("_") + 1)), o3 = -1 === o3.indexOf("_") ? 0 : parseInt(o3.substring(o3.indexOf("_") + 1)), n3 < o3 ? -1 : n3 > o3 ? 1 : 0;
                });
                for (let o3 = 0; o3 < n2.length; o3++) {
                  const r3 = n2[o3];
                  if (e3.namespace = r3.namespace, e3.context = r3.context, e3.defaultPrevented) break;
                  const i2 = r3.handler.apply(t2.element, [e3]);
                  if (void 0 !== i2 && (e3.result = i2, false === i2)) {
                    e3.preventDefault(), e3.stopPropagation();
                    break;
                  }
                }
                return e3.result;
              }
              fireEvent(e3, t2, n2) {
                const o2 = this;
                n2 || (n2 = { bubbles: true, cancelable: true, composed: null !== o2.element.getRootNode().host }), n2.detail = t2 || {};
                const r3 = new CustomEvent(e3, n2);
                return r3.originalStopPropagation = r3.stopPropagation, r3.stopPropagation = function() {
                  return r3.isPropagationStopped = true, r3.originalStopPropagation();
                }, o2.dispatchEvent(r3), r3;
              }
              get isPassiveSupported() {
                const e3 = this;
                if (void 0 !== e3.supportsPassive) return e3.supportsPassive;
                e3.supportsPassive = false;
                try {
                  let t2 = Object.defineProperty({}, "passive", { get: function() {
                    e3.supportsPassive = true;
                  } });
                  window.addEventListener("testPassive", null, t2), window.removeEventListener("testPassive", null, t2);
                } catch (e4) {
                }
                return e3.supportsPassive;
              }
              dispatchEvent(e3) {
                const t2 = this, n2 = e3.type, o2 = t2.element.context, r3 = n2.substring(0, 1).toUpperCase() + n2.substring(1);
                t2.element.context = document, t2.element["on" + r3] ? t2.element["on" + r3](e3) : t2.element["on" + n2.toLowerCase()] ? t2.element["on" + n2.toLowerCase()](e3) : t2.element.dispatchEvent(e3), t2.element.context = o2;
              }
              listen(e3, t2) {
                const n2 = this, o2 = e3.split("."), r3 = o2.slice(1).join("."), i2 = o2[0];
                n2.events[i2] || (n2.events[i2] = []);
                const s2 = { type: i2, handler: t2, context: n2.element, namespace: r3 };
                p2.indexOf(i2) >= 0 && (n2.inputEvents || (n2.inputEvents = new h2(n2.element)), n2.inputEvents[i2](function(e4) {
                  n2.dispatchEvent(e4);
                }), n2.inputEvents.boundEventTypes.push(i2), n2.inputEvents.listen(i2)), 0 === n2.events[i2].length && (n2.handlers[i2] = n2.dispatch.bind(n2), "wheel" === i2 ? n2.element.addEventListener("wheel", n2.handlers[i2], !!n2.isPassiveSupported && { passive: false }) : "touchmove" === i2 || "touchstart" === i2 || "touchend" === i2 ? n2.element.addEventListener(i2, n2.handlers[i2], !!n2.isPassiveSupported && { passive: false }) : n2.element.addEventListener(i2, n2.handlers[i2], false)), n2.events[i2].push(s2);
              }
              unlisten(e3) {
                const t2 = this, n2 = e3.split("."), o2 = n2.slice(1).join("."), r3 = n2[0];
                let i2 = t2.events[r3];
                if (t2.inputEvents && t2.inputEvents.boundEventTypes.indexOf(r3) >= 0 && (t2.inputEvents.boundEventTypes.splice(t2.inputEvents.boundEventTypes.indexOf(r3), 1), 0 === t2.inputEvents.boundEventTypes.length && t2.inputEvents.unlisten(r3)), i2) {
                  for (let e4 = 0; e4 < i2.length; e4++) {
                    if ("" !== o2) {
                      let e5 = i2.findIndex((e6) => e6.namespace === o2);
                      i2.splice(e5, 1);
                      break;
                    }
                    i2 = [];
                  }
                  0 === i2.length && (t2.element.removeEventListener(r3, t2.handlers[r3]), t2.events[r3] = [], delete t2.handlers[r3]);
                }
              }
              getAttributeValue(e3, t2) {
                const n2 = this, o2 = n2.element.getAttribute(e3);
                if (n2.isNativeElement) return n2.deserialize(o2, t2);
                const r3 = n2.element.propertyByAttributeName[e3];
                return void 0 === r3.deserialize ? n2.deserialize(o2, t2, r3.nullable) : n2.element[r3.deserialize](o2);
              }
              setAttributeValue(e3, t2, n2) {
                const o2 = this;
                let r3, i2 = false;
                if (o2.isNativeElement) {
                  if (r3 = o2.serialize(t2, n2), "boolean" === n2 && ["checked", "selected", "async", "autofocus", "autoplay", "controls", "defer", "disabled", "hidden", "ismap", "loop", "multiple", "open", "readonly", "required", "scoped"].indexOf(e3) >= 0) return void (t2 ? o2.element.setAttribute(e3, "") : o2.element.removeAttribute(e3));
                } else {
                  const s2 = o2.element.propertyByAttributeName[e3];
                  i2 = !s2 || s2.nullable, r3 = s2 && s2.serialize ? o2.element[s2.serialize](t2) : o2.serialize(t2, n2, i2);
                }
                "array" !== n2 && "object" !== n2 || "[]" !== r3 && "{}" !== r3 ? void 0 === r3 ? (o2.element.removeAttribute(e3), o2.element.shadowRoot && o2.element.$.root && o2.element.$.root.removeAttribute(e3)) : (o2.element.setAttribute(e3, r3), o2.element.shadowRoot && o2.element.$.root && o2.element.$.root.setAttribute(e3, r3)) : o2.element.removeAttribute(e3);
              }
              serialize(e3, t2, n2) {
                if (void 0 === t2 && (t2 = y2.Types.getType(e3)), void 0 !== e3 && (n2 || null !== e3)) {
                  if (n2 && null === e3) return "null";
                  if ("string" === t2) return e3;
                  if ("boolean" === t2 || "bool" === t2) {
                    if (true === e3 || "true" === e3 || 1 === e3 || "1" === e3) return "";
                    if (false === e3 || "false" === e3 || 0 === e3 || "0" === e3) return;
                  }
                  return "array" === t2 ? JSON.stringify(e3) : ["string", "number", "int", "integer", "float", "date", "any", "function"].indexOf(t2) >= 0 ? e3.toString() : "object" === t2 ? JSON.stringify(e3) : void 0;
                }
              }
              deserialize(e3, t2, n2) {
                const o2 = "null" === e3;
                if (void 0 !== e3 && (!o2 || n2)) {
                  if (o2 && n2) return null;
                  if ("boolean" === t2 || "bool" === t2) return null !== e3;
                  if ("number" === t2 || "float" === t2) return "NaN" === e3 ? NaN : "Infinity" === e3 ? 1 / 0 : "-Infinity" === e3 ? -1 / 0 : parseFloat(e3);
                  if ("int" === t2 || "integer" === t2) return "NaN" === e3 ? NaN : "Infinity" === e3 ? 1 / 0 : "-Infinity" === e3 ? -1 / 0 : parseInt(e3);
                  if ("string" === t2) return e3;
                  if ("any" === t2) return e3;
                  if ("date" === t2) return new Date(e3);
                  if ("function" === t2) {
                    if ("function" == typeof window[e3]) return window[e3];
                  } else if ("array" === t2 || "object" === t2) try {
                    const t3 = JSON.parse(e3);
                    if (t3) return t3;
                  } catch (n3) {
                    if (window[e3] && "object" == typeof window[e3]) return window[e3];
                    if ("array" === t2 && e3.indexOf("[") >= 0) {
                      if (e3.indexOf("{") >= 0) {
                        let t3 = e3.replace(/{/gi, "").replace("[", "").replace("]", "").replace(/'/gi, "").replace(/"/gi, "").trim();
                        t3 = t3.split("},");
                        for (let e4 = 0; e4 < t3.length; e4++) {
                          let n4 = {}, o3 = t3[e4].trim().split(",");
                          for (let e5 = 0; e5 < o3.length; e5++) {
                            const t4 = o3[e5].split(":")[0].trim(), r3 = o3[e5].split(":")[1].trim();
                            n4[t4] = r3;
                          }
                          t3[e4] = n4;
                        }
                        return t3;
                      }
                      return e3.replace("[", "").replace("]", "").replace(/'/gi, "").replace(/"/gi, "").trim().split(",");
                    }
                  }
                }
              }
            }
            class g2 {
              static get Ripple() {
                return i;
              }
              static get Easings() {
                return s;
              }
            }
            class y2 {
              static get Types() {
                return r2;
              }
              static get Core() {
                return a2;
              }
              static get Animation() {
                return g2;
              }
              static get Scroll() {
                return m2;
              }
              static get InputEvents() {
                return h2;
              }
              static Extend(e3) {
                return new f2(e3);
              }
              static Assign(e3, t2) {
                if (e3.indexOf(".") >= 0) {
                  const n2 = e3.split(".");
                  return y2[n2[0]] || (y2[n2[0]] = {}), void (y2[n2[0]][n2[1]] = t2);
                }
                y2[e3] = t2;
              }
            }
            const w = y2.Extend(document);
            let b2 = null;
            document.addEventListener("click", () => {
              d2.start(), b2 && clearTimeout(b2), b2 = setTimeout(() => {
                d2.stop();
              }, 1e4);
            }), document.addEventListener("mouseenter", () => {
              d2.start();
            }), document.addEventListener("mouseleave", () => {
              d2.stop();
            });
            class v2 {
            }
            v2.cache = {};
            class C2 extends HTMLElement {
              static get properties() {
                return { animation: { value: "advanced", type: "string", allowedValues: ["none", "simple", "advanced"] }, unfocusable: { value: false, type: "boolean" }, disabled: { value: false, type: "boolean" }, dataContext: { value: null, reflectToAttribute: false, type: "any" }, debugMode: { value: true, type: "boolean", reflectToAttribute: false }, locale: { value: "en", type: "string", reflectToAttribute: false }, localizeFormatFunction: { value: void 0, type: "function", reflectToAttribute: false }, messages: { value: { en: { propertyUnknownName: "Invalid property name: '{{name}}'!", propertyUnknownType: "'{{name}}' property is with undefined 'type' member!", propertyInvalidValue: "Invalid '{{name}}' property value! Actual value: '{{actualValue}}', Expected value: '{{value}}'!", propertyInvalidValueType: "Invalid '{{name}}' property value type! Actual type: '{{actualType}}', Expected type: '{{type}}'!", methodInvalidValueType: "Invalid '{{name}}' method argument value type! Actual type: '{{actualType}}', Expected type: '{{type}}' for argument with index: '{{argumentIndex}}'!", methodInvalidArgumentsCount: "Invalid '{{name}}' method arguments count! Actual arguments count: '{{actualArgumentsCount}}', Expected at least: '{{argumentsCount}}' argument(s)!", methodInvalidReturnType: "Invalid '{{name}}' method return type! Actual type: '{{actualType}}', Expected type: '{{type}}'!", elementNotInDOM: "Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.", moduleUndefined: "Module is undefined.", missingReference: "{{elementType}}: Missing reference to '{{files}}'.", htmlTemplateNotSuported: "{{elementType}}: Web Browser doesn't support HTMLTemplate elements.", invalidTemplate: "{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM." } }, reflectToAttribute: false, inherit: true, type: "object" }, props: { value: null, reflectToAttribute: false, isHierarchicalProperty: true, type: "any" }, readonly: { value: false, type: "boolean" }, renderMode: { value: "auto", type: "string", reflectToAttribute: false, allowedValues: ["auto", "manual"] }, rightToLeft: { value: false, type: "boolean" }, rethrowError: { value: true, type: "boolean", reflectToAttribute: false }, theme: { value: window[n].Theme, type: "string" }, visibility: { value: "visible", allowedValues: ["visible", "collapsed", "hidden"], type: "string" }, wait: { value: false, type: "boolean" } };
              }
              getBindings(e3, t2) {
                const n2 = this;
                let o2 = 0, r3 = {}, i2 = ((e4) => {
                  if (e4 instanceof HTMLElement) return n2.parseAttributes(e4);
                  {
                    let t3 = n2.parseProperty(e4.data ? e4.data.trim() : null, "textContent", e4);
                    if (t3) return n2 && e4.parentNode === n2.$.content && (t3.value = "" !== n2.$.html ? n2.$.html : void 0, n2.innerHTML = ""), { textContent: t3 };
                  }
                })(e3);
                i2 && (r3.data = i2), t2 || (r3.mapping = [], t2 = r3), e3.getAttribute && (r3.nodeId = e3.getAttribute("smart-id"), t2 && i2 && (t2.mapping[r3.nodeId] = i2)), r3.node = e3, e3.firstChild && (r3.children = {});
                for (let i3 = e3.firstChild; i3; i3 = i3.nextSibling) r3.children[o2++] = n2.getBindings(i3, t2);
                return r3;
              }
              _addRemovePropertyBinding(e3, t2, n2, o2, r3) {
                if (!e3 || !t2 || !n2) return;
                const i2 = this, s2 = i2.bindings, a3 = n2.getAttribute("smart-id"), l2 = e3.indexOf("{{") >= 0;
                let d3 = false;
                (e3 = e3.replace("{{", "").replace("}}", "").replace("[[", "").replace("]]", "")).indexOf("!") >= 0 && (e3 = e3.replace("!", ""), d3 = true);
                const c2 = i2._properties[e3], u3 = { name: e3, reflectToAttribute: c2.reflectToAttribute, twoWay: l2, type: c2.type, not: d3 };
                if (r3 && !o2) {
                  const n3 = {}, o3 = { name: e3, targetPropertyName: t2, reflectToAttribute: c2.reflectToAttribute, twoWay: l2, type: c2.type, not: d3 };
                  n3[e3] = o3, s2.mapping[a3] = n3;
                }
                const p3 = function(e4) {
                  for (let r4 in e4) {
                    const s3 = e4[r4];
                    if (s3.nodeId === a3) {
                      s3.data || (s3.data = {}), o2 ? (s3.data[t2] = null, delete s3.data[t2]) : s3.data[t2] = u3;
                      break;
                    }
                    if (s3.children) p3(s3.children);
                    else if (s3.node && s3.node.children && s3.node === n2.parentElement) {
                      const e5 = s3.node;
                      if (!e5.firstChild) continue;
                      s3.children = {};
                      let t3 = 0;
                      for (let n3 = e5.firstChild; n3; n3 = n3.nextSibling) s3.children[t3++] = i2.getBindings(n3);
                      p3(s3.children);
                    }
                  }
                };
                p3(s2.children), o2 ? delete i2.boundProperties[e3] : i2.boundProperties[e3] = true, i2.updateBoundNodes(e3);
              }
              addPropertyBinding(e3, t2, n2, o2) {
                this._addRemovePropertyBinding(e3, t2, n2, false, o2);
              }
              removePropertyBinding(e3, t2, n2, o2) {
                this._addRemovePropertyBinding(e3, t2, n2, true, o2);
              }
              parseAttributes(e3) {
                const t2 = this;
                let n2;
                for (let o2 = 0; o2 < e3.attributes.length; o2++) {
                  const r3 = e3.attributes[o2], i2 = r3.name, s2 = r3.value;
                  v2.cache["toCamelCase" + i2] || (v2.cache["toCamelCase" + i2] = y2.Core.toCamelCase(i2));
                  const a3 = v2.cache["toCamelCase" + i2];
                  if (i2.indexOf("(") >= 0) {
                    let o3 = i2.substring(1, i2.length - 1);
                    if (t2 && !t2.dataContext) {
                      t2.templateListeners[e3.getAttribute("smart-id") + "." + o3] = s2, e3.removeAttribute(i2);
                      continue;
                    }
                    {
                      n2 || (n2 = {});
                      const e4 = s2.substring(0, s2.indexOf("("));
                      n2[a3] = { isEvent: true, name: o3, value: e4 };
                      continue;
                    }
                  }
                  let l2 = t2.parseProperty(s2, i2, e3);
                  l2 && (n2 || (n2 = {}), n2[a3] = l2);
                }
                return n2;
              }
              parseProperty(e3, t2) {
                if (!e3 || !e3.length) return;
                const n2 = this;
                let o2, r3 = e3.length, i2 = 0, s2 = 0, a3 = 0, l2 = true;
                for (; s2 < r3; ) {
                  i2 = e3.indexOf("{{", s2);
                  let t3 = e3.indexOf("[[", s2), n3 = "}}";
                  if (t3 >= 0 && (i2 < 0 || t3 < i2) && (i2 = t3, l2 = false, n3 = "]]"), a3 = i2 < 0 ? -1 : e3.indexOf(n3, i2 + 2), a3 < 0) return;
                  o2 = o2 || {};
                  let r4 = e3.slice(i2 + 2, a3).trim();
                  o2.name = r4, s2 = a3 + 2;
                }
                const d3 = o2.name, c2 = n2 ? n2._properties[d3] : null;
                return o2.twoWay = l2, o2.ready = false, n2 && (d3.indexOf("::") >= 0 ? n2.boundProperties[d3.substring(0, d3.indexOf("::"))] = true : n2.boundProperties[d3] = true), c2 ? (o2.type = c2.type, o2.reflectToAttribute = c2.reflectToAttribute) : (["checked", "selected", "async", "autofocus", "autoplay", "controls", "defer", "disabled", "hidden", "ismap", "loop", "multiple", "open", "readonly", "required", "scoped"].indexOf(t2) >= 0 ? o2.type = "boolean" : o2.type = "string", o2.reflectToAttribute = true), o2;
              }
              updateTextNodes() {
                const e3 = this;
                e3.updateTextNode(e3.shadowRoot || e3, e3.bindings, e3);
              }
              updateTextNode(e3, t2, n2) {
                const o2 = this;
                if (!t2) return;
                let r3 = 0;
                for (let i2 = e3.firstChild; i2 && t2.children; i2 = i2.nextSibling) o2.updateTextNode(i2, t2.children[r3++], n2);
                if (t2 && t2.data) for (let e4 in t2.data) {
                  const o3 = t2.data[e4], r4 = o3.name;
                  "textContent" === e4 && o3.twoWay && !o3.updating && void 0 !== o3.value && (n2[r4] = o3.value);
                }
              }
              updateBoundProperty(e3, t2) {
                if (t2.updating) return;
                const n2 = this;
                t2.updating = true, n2[e3] = t2.value, t2.updating = false;
              }
              updateBoundNodes(e3) {
                const t2 = this;
                if (t2.updateBoundNode(t2.shadowRoot || t2, t2.bindings, t2, e3), t2.detachedChildren.length > 0) for (let n2 = 0; n2 < t2.detachedChildren.length; n2++) {
                  const o2 = t2.detachedChildren[n2], r3 = o2.getAttribute("smart-id"), i2 = function(e4) {
                    if (e4.nodeId === r3) return e4;
                    for (let t3 in e4.children) {
                      const n3 = e4.children[t3];
                      if ((n3.getAttribute ? n3.getAttribute("smart-id") : "") === r3) return e4;
                      if (n3.children) {
                        const e5 = i2(n3);
                        if (e5) return e5;
                      }
                    }
                    return null;
                  }, s2 = i2(t2.bindings);
                  if (s2) t2.updateBoundNode(o2, s2, t2, e3, true);
                  else if (o2.getAttribute && t2.bindings.mapping) {
                    const n3 = t2, o3 = t2.bindings;
                    if (o3) for (let r4 in o3.mapping) {
                      const i3 = n3.querySelector('[smart-id="' + r4 + '"]');
                      if (i3) {
                        const s3 = o3.mapping[r4];
                        t2.updateBoundData(i3, s3, n3, e3);
                      }
                    }
                  }
                }
              }
              updateBoundMappedNodes() {
                const e3 = this, t2 = e3.bindings, n2 = e3;
                if (t2.mapping) for (let o2 in t2.mapping) {
                  let r3 = n2.querySelector('[smart-id="' + o2 + '"]');
                  if (n2.shadowRoot && (r3 = n2.querySelector('[id="' + o2 + '"]'), r3 || (r3 = n2.shadowRoot.querySelector('[id="' + o2 + '"]') || n2.shadowRoot.querySelector('[smart-id="' + o2 + '"]'))), r3) {
                    const i2 = t2.mapping[o2];
                    e3.updateBoundData(r3, i2, n2);
                  } else if (n2.getAttribute("aria-controls")) {
                    let i2 = document.getElementById(n2.getAttribute("aria-controls"));
                    if (!i2 && n2.shadowRoot && (i2 = n2.shadowRoot.getElementById(n2.getAttribute("aria-controls"))), r3 = i2.querySelector('[smart-id="' + o2 + '"]'), r3) {
                      const i3 = t2.mapping[o2];
                      e3.updateBoundData(r3, i3, n2);
                    }
                  }
                }
              }
              updateBoundNode(e3, t2, n2, o2, r3) {
                const i2 = this;
                if (!t2) return;
                let s2 = 0;
                if (r3) {
                  if (r3 && !t2.data) for (let a4 = e3.firstChild; a4 && t2.children; a4 = a4.nextSibling) if (a4.getAttribute) {
                    const e4 = a4.getAttribute("smart-id"), r4 = function() {
                      for (let n3 in t2.children) if (t2.children[n3].nodeId === e4) return t2.children[n3];
                    }();
                    i2.updateBoundNode(a4, r4, n2, o2), s2++;
                  } else i2.updateBoundNode(a4, t2.children[s2++], n2, o2, r3);
                } else for (let r4 = e3.firstChild; r4 && t2.children; r4 = r4.nextSibling) if (r4.getAttribute) {
                  const e4 = r4.getAttribute("smart-id"), a4 = function() {
                    for (let n3 in t2.children) if (t2.children[n3].nodeId === e4) return t2.children[n3];
                  }();
                  i2.updateBoundNode(r4, a4, n2, o2), s2++;
                } else i2.updateBoundNode(r4, t2.children[s2++], n2, o2);
                if (!t2 || !t2.data) return;
                const a3 = t2.data;
                i2.updateBoundData(e3, a3, n2, o2);
              }
              updateBoundData(e3, t2, n2, o2) {
                const r3 = this;
                for (let i2 in t2) {
                  const s2 = t2[i2];
                  let a3 = s2.name;
                  if (!s2.updating && (a3.indexOf("::") >= 0 && (a3 = a3.substring(0, a3.indexOf("::"))), void 0 === o2 || o2 === a3)) {
                    if (a3.indexOf("(") >= 0) {
                      let e4 = a3.substring(a3.indexOf("("));
                      const t3 = a3.substring(0, a3.indexOf("("));
                      if (e4 = e4.substring(1, e4.length - 1), e4 = e4.replace(/ /gi, ""), e4 = e4.split(","), e4.length > 0 && "" !== e4[0]) {
                        let o3 = [];
                        for (let t4 = 0; t4 < e4.length; t4++) o3.push(n2[e4[t4]]);
                        s2.value = n2[t3].apply(n2, o3);
                      } else s2.value = n2[t3]();
                      s2.type = typeof s2.value;
                    } else s2.value = n2[a3];
                    if ("innerHTML" === a3) {
                      if (e3[i2].toString().trim() !== n2[a3].toString().trim()) {
                        if (window.smartBlazor && e3[i2].indexOf("<!--") >= 0) {
                          (s2.ready || n2._properties[a3].defaultValue !== s2.value) && (e3[i2] = s2.value.toString());
                          continue;
                        }
                        (s2.ready || n2._properties[a3].defaultValue !== s2.value) && (e3[i2] = s2.value.toString().trim());
                      }
                    } else s2.not ? (e3[i2] = !s2.value, s2.targetPropertyName && (e3[s2.targetPropertyName] = !s2.value)) : (e3[i2] = s2.value, s2.targetPropertyName && (e3[s2.targetPropertyName] = s2.value));
                    if (e3.$ && e3.$.isNativeElement) {
                      v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                      const t3 = v2.cache["toDash" + i2], n3 = e3.$.getAttributeValue(t3, s2.type);
                      !s2.reflectToAttribute || n3 === s2.value && s2.ready || e3.$.setAttributeValue(t3, s2.value, s2.type), s2.reflectToAttribute || e3.$.setAttributeValue(t3, null, s2.type);
                    }
                    if (!s2.ready) {
                      if (e3.$ && e3.$.isCustomElement) {
                        v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                        const t3 = v2.cache["toDash" + i2];
                        e3._properties || (e3._beforeCreatedProperties = e3._properties = e3.propertyByAttributeName = []), e3._properties[i2] || (e3._properties[i2] = { attributeName: t3 }, e3._beforeCreatedProperties && (e3._beforeCreatedProperties[i2] = e3._properties[i2]), e3.propertyByAttributeName[t3] = e3._properties[i2]);
                        const n3 = e3._properties[i2];
                        n3.isUpdating = true, s2.reflectToAttribute && (s2.not ? e3.$.setAttributeValue(n3.attributeName, !s2.value, s2.type) : e3.$.setAttributeValue(n3.attributeName, s2.value, s2.type)), s2.reflectToAttribute || e3.$.setAttributeValue(n3.attributeName, null, s2.type), n3.isUpdating = false;
                      }
                      if (s2.twoWay) {
                        const t3 = function(t4) {
                          if (s2.value = t4, e3.$ && e3.$.isNativeElement) {
                            v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                            const t5 = v2.cache["toDash" + i2], n3 = e3.$.getAttributeValue(t5, s2.type);
                            s2.reflectToAttribute && n3 !== s2.value && e3.$.setAttributeValue(t5, s2.value, s2.type), s2.reflectToAttribute || e3.$.setAttributeValue(t5, null, s2.type);
                          }
                        };
                        if (s2.name.indexOf("::") >= 0) {
                          const n3 = s2.name.indexOf("::"), o3 = s2.name.substring(n3 + 2);
                          r3["$" + e3.getAttribute("smart-id")].listen(o3, function() {
                            t3(e3[i2]);
                            const n4 = s2.name.substring(0, s2.name.indexOf("::"));
                            r3.updateBoundProperty(n4, s2);
                          });
                        }
                        if (e3.$ && e3.$.isCustomElement) {
                          e3._properties[i2] && (e3._properties[i2].notify = true), v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                          const n3 = v2.cache["toDash" + i2];
                          r3["$" + e3.getAttribute("smart-id")].listen(n3 + "-changed", function(e4) {
                            let n4 = e4.detail;
                            t3(n4.value);
                            const o3 = r3.context;
                            e4.context !== document && (r3.context = r3), r3.updateBoundProperty(s2.name, s2), r3.context = o3;
                          });
                        }
                      }
                    }
                    s2.ready = true;
                  }
                }
              }
              static clearCache() {
                this.cache = {};
              }
              addMessages(e3, t2) {
                Object.assign(this.messages[e3], t2);
              }
              localize(e3, t2) {
                const n2 = this;
                if (!n2.messages || !n2.messages[n2.locale]) return;
                let o2 = n2.messages[n2.locale][e3];
                if ("" === o2) return "";
                if (!o2) {
                  const t3 = n2.messages.en;
                  if (t3) {
                    const n3 = t3[e3];
                    return n3 || e3;
                  }
                }
                const r3 = o2;
                for (let e4 in t2) {
                  let n3 = t2[e4];
                  o2 = o2.replace(new RegExp("{{" + e4 + "}}", "g"), n3);
                }
                return n2.localizeFormatFunction && n2.localizeFormatFunction(r3, o2, t2), o2;
              }
              static get requires() {
                return {};
              }
              static get listeners() {
                return { "theme-changed": function(e3) {
                  this.theme = e3.detail.newValue;
                } };
              }
              static get methods() {
                return {};
              }
              get classNamesMap() {
                return { animation: "smart-animate", rippleAnimation: "smart-ripple" };
              }
              get hasAnimation() {
                return "none" !== this.animation;
              }
              get hasRippleAnimation() {
                return "none" !== this.animation && "advanced" === this.animation;
              }
              static get modules() {
                return window[n].Modules;
              }
              get properties() {
                const e3 = this;
                return e3._properties || (e3._properties = []), e3._properties;
              }
              get parents() {
                const e3 = this;
                let t2 = [], o2 = e3.parentNode;
                for (; o2 && 9 !== o2.nodeType; ) o2 instanceof HTMLElement == 1 && t2.push(o2), o2 = o2.parentNode;
                const r3 = e3.getRootNode();
                if (r3.host) {
                  const e4 = (e5) => {
                    let t3 = [e5], n2 = e5.parentNode;
                    for (; n2 && 9 !== n2.nodeType; ) n2 instanceof HTMLElement == 1 && t3.push(n2), n2 = n2.parentNode;
                    return t3;
                  };
                  t2 = t2.concat(e4(r3.host));
                }
                return window[n].EnableShadowDOM && e3.isInShadowDOM && e3.shadowParent && (t2 = t2.concat(e3.shadowParent.parents)), t2;
              }
              log(e3) {
                this._logger("log", e3);
              }
              warn(e3) {
                this._logger("warn", e3);
              }
              error(e3) {
                this._logger("error", e3);
              }
              _logger(e3, t2) {
                if (this.debugMode) {
                  const n2 = t2 instanceof Error ? t2.message : t2.toString();
                  console[e3](n2);
                }
                if (this.rethrowError && "error" === e3) throw t2;
              }
              get focused() {
                return this.contains(document.activeElement);
              }
              template() {
                return "<div></div>";
              }
              registered() {
                const e3 = this;
                e3.onRegistered && e3.onRegistered();
              }
              created() {
                const e3 = this;
                e3.isReady = false, e3._initElement(e3), e3._setModuleState("created"), e3.onCreated && e3.onCreated();
              }
              completed() {
                const e3 = this;
                e3.isCompleted = true, e3._onCompleted && e3._onCompleted(), e3.onCompleted && e3.onCompleted();
              }
              whenReady(e3) {
                const t2 = this;
                t2.isCompleted ? e3() : (t2.whenReadyCallbacks || (t2.whenReadyCallbacks = []), t2.whenReadyCallbacks.push(e3));
              }
              whenRendered(e3) {
                const t2 = this;
                t2.isRendered ? e3() : (t2.whenRenderedCallbacks || (t2.whenRenderedCallbacks = []), t2.whenRenderedCallbacks.push(e3));
              }
              addThemeClass() {
                const e3 = this;
                "" !== e3.theme && e3.classList.add("smart-" + e3.theme);
              }
              addDefaultClass() {
                const e3 = this;
                e3.classList.add(n.toLowerCase() + "-element"), e3.classList.add(e3.nodeName.toLowerCase());
              }
              _renderShadowRoot() {
                const e3 = this;
                if (e3.shadowRoot) {
                  e3.$.root.classList.add(e3.nodeName.toLowerCase());
                  for (let t2 = 0; t2 < e3.attributes.length; t2++) {
                    const n2 = e3.attributes[t2];
                    "class" === n2.name || "id" === n2.name || "style" === n2.name || "tabindex" === n2.name || n2.name.indexOf("aria") >= 0 || e3.$.root.setAttribute(n2.name, n2.value);
                  }
                  for (let t2 = 0; t2 < e3.classList.length; t2++) {
                    const n2 = e3.classList[t2];
                    "smart-element-init" !== n2 && "smart-element" !== n2 && "smart-hidden" !== n2 && "smart-visibility-hidden" !== n2 && e3.$.root.classList.add(n2);
                  }
                }
              }
              render() {
                const e3 = this;
                if (!e3.isRendered && (e3.isRendered = true, e3.isRendering = false, e3.context = document, e3._renderShadowRoot(), e3.whenRenderedCallbacks)) {
                  for (let t2 = 0; t2 < e3.whenRenderedCallbacks.length; t2++) e3.whenRenderedCallbacks[t2]();
                  e3.whenRenderedCallbacks = [];
                }
                e3.onRender && e3.onRender(), e3.disabled && e3.setAttribute("aria-disabled", true), e3.readonly && -1 !== ["checkbox", "combobox", "grid", "gridcell", "listbox", "radiogroup", "slider", "spinbutton", "textbox"].indexOf(e3.getAttribute("role")) && e3.setAttribute("aria-readonly", true);
              }
              ready() {
                const e3 = this;
                if (e3._setId(), e3.addThemeClass(), e3.addDefaultClass(), "collapsed" === e3.visibility ? e3.classList.add("smart-hidden") : "hidden" === e3.visibility && e3.classList.add("smart-visibility-hidden"), e3.dataContext && e3.applyDataContext(), e3.onReady && e3.onReady(), e3.shadowRoot && Smart(e3._selector)) {
                  if (Smart(e3._selector).styleUrls) {
                    const t2 = Smart(e3._selector).styleUrls;
                    for (let n2 = 0; n2 < t2.length; n2++) e3.importStyle(t2[n2]);
                  }
                  if (Smart(e3._selector).styles) {
                    const t2 = document.createElement("style");
                    t2.innerHTML = Smart(e3._selector).styles, e3.shadowRoot.insertBefore(t2, e3.shadowRoot.firstChild);
                  }
                }
                Smart(e3._selector) && Smart(e3._selector).ready && Smart(e3._selector).ready();
              }
              _setId() {
                const e3 = this;
                if (!e3.id) {
                  const t2 = e3.elementName;
                  e3.id = t2.slice(0, 1).toLowerCase() + t2.slice(1) + Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                }
              }
              checkLicense() {
                const e3 = this;
                "Evaluation" === window[n].License && -1 === window.location.hostname.indexOf("htmlelements") && (e3.logWatermark(), e3.logLicense(), window[n].License = "");
              }
              logWatermark() {
                const e3 = document.createElement("a");
                e3.href = "https://www.htmlelements.com/", e3.innerHTML = "https://www.htmlelements.com/", e3.style.position = "absolute", e3.style.right = "5px", e3.style.bottom = "5px", e3.style.color = "#fff", e3.style.padding = "20px", e3.style.borderRadius = "5px", e3.style.background = "#0C3D78", e3.style.cursor = "pointer", e3.style.zIndex = "999999", e3.style.display = "block", e3.style.fontSize = "24px", e3.style.textDecoration = "none", e3.style.fontWeight = "bold", e3.style.opacity = 0, e3.style.transition = "opacity .35s ease-in-out", e3.id = "watermark", document.getElementById("watermark") || setTimeout(() => {
                  document.getElementById("watermark") || (document.body.appendChild(e3), setTimeout(() => {
                    e3.style.opacity = 1;
                  }), setTimeout(() => {
                    e3.style.opacity = 0, setTimeout(() => {
                      e3.parentNode.removeChild(e3);
                    }, 350);
                  }, 6e3));
                }, 1e3);
              }
              logLicense() {
                console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("*jQWidgets License Key Not Found."), console.log("*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION."), console.log("*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license."), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************");
              }
              get _selector() {
                const e3 = this;
                return e3.id ? "#" + e3.id : e3.classList.length > 0 ? "." + e3.classList[0] : "";
              }
              applyDataContext(e3) {
                const t2 = this;
                let n2 = "string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext;
                if (e3 && (n2 = e3, t2.dataContext = e3), n2) {
                  if (!n2._uid) {
                    n2._uid = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase(), n2._properties = [];
                    for (let e4 in n2) {
                      const o2 = n2[e4];
                      "function" != typeof o2 && "_properties" !== e4 && "_uid" !== e4 && (n2._properties[e4] = o2, Object.defineProperty(n2, e4, { configurable: false, enumerable: true, get: () => n2._properties[e4], set(o3) {
                        const r3 = n2._properties[e4];
                        n2._properties[e4] = o3;
                        let i2 = [];
                        i2[e4] = { oldValue: r3, value: o3 }, i2.length++, t2.updatingDataContext = true, w.fireEvent("dataContextPropertyChanged", { dataContext: n2, properties: i2 }, { bubbles: false, cancelable: true }), t2.updatingDataContext = false;
                      } }));
                    }
                  }
                  if (t2.dataContextProperties = t2.parseAttributes(t2), t2.dataContextPropertiesMap = {}, t2.dataContextListeners = {}, t2.dataContextProperties) {
                    t2.updatingDataContext = true;
                    for (let e4 in t2.dataContextProperties) {
                      const o2 = t2.dataContextProperties[e4], r3 = o2.name;
                      if (o2.propertyName = e4, t2.dataContextPropertiesMap[r3] = e4, v2.cache["toDash" + e4] || (v2.cache["toDash" + e4] = y2.Core.toDash(r3)), o2.isEvent) {
                        const e5 = o2.value;
                        t2.dataContextListeners[r3] && t2.removeEventListener(r3, t2.dataContextListeners[r3]), t2.dataContextListeners[r3] = function(t3) {
                          n2[e5](t3);
                        }, t2.addEventListener(r3, t2.dataContextListeners[r3]);
                      }
                      if (r3.indexOf(".") >= 0) {
                        const o3 = r3.split(".");
                        let i2 = n2[o3[0]];
                        for (let e5 = 1; e5 < o3.length; e5++) i2 = i2[o3[e5]];
                        void 0 !== i2 && (t2[e4] = i2);
                      } else t2[e4] = n2[r3];
                    }
                    t2.dataContextPropertyChangedHandler = function(e4) {
                      const n3 = e4.detail.properties;
                      if (e4.detail.dataContext === ("string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext)) for (let e5 in n3) {
                        const o2 = t2.dataContextPropertiesMap[e5], r3 = t2.context;
                        o2 && (t2.context = document, t2[o2] = n3[e5].value, t2.context = r3);
                      }
                    }, w.listen("dataContextPropertyChanged", t2.dataContextPropertyChangedHandler), t2.updatingDataContext = false;
                  } else t2.dataContextProperties = null;
                } else {
                  t2.dataContextProperties = null;
                  const e4 = function() {
                    ("string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext) && (t2.applyDataContext(), window.removeEventListener("load", e4));
                  };
                  window.addEventListener("load", e4);
                }
              }
              updateDataContextProperty(e3) {
                const t2 = this, n2 = "string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext, o2 = t2.dataContextProperties[e3];
                if (!t2.updatingDataContext && o2.twoWay) {
                  const r3 = o2.name;
                  if (r3.indexOf(".") >= 0) {
                    const o3 = r3.split(".");
                    let i2 = n2[o3[0]];
                    for (let e4 = 1; e4 < o3.length; e4++) i2 = i2[o3[e4]];
                    void 0 !== i2 && (i2 = t2[e3], c[n2._uid] && (c[n2._uid][e3] = i2));
                  } else n2[r3] = t2[e3], c[n2._uid] && (c[n2._uid][e3] = n2[r3]);
                }
              }
              static get version() {
                return window[n].Version;
              }
              initProperties() {
                const e3 = this;
                if (Smart(e3._selector) && Smart(e3._selector).properties && (e3._initProperties = Smart(e3._selector).properties), e3.hasAttribute("props") && !e3.props ? e3._initProperties = window[e3.getAttribute("props")] : e3.props && (e3._initProperties = e3.props), e3._initProperties) {
                  const t2 = Object.keys(e3._initProperties);
                  for (let n2 = 0; n2 < t2.length; n2++) {
                    const o2 = t2[n2], r3 = e3._initProperties[o2];
                    if (r3.constructor === Smart.ObservableArray || r3 instanceof Smart.ObservableArray) e3[o2] = r3.toArray();
                    else if (r3.constructor === Smart.DataAdapter || "smartDataAdapter" === r3.constructor.name || "object" == typeof r3 && Smart.DataAdapter && r3 instanceof Smart.DataAdapter || r3 instanceof Smart.Observable || r3.constructor === Smart.Observable || "object" != typeof r3 || y2.Types.isArray(r3) || r3 instanceof Date) {
                      if (void 0 === e3[o2] && -1 === ["onReady", "onAttached", "onDetached", "onCreated", "onCompleted"].indexOf(o2)) {
                        const t3 = e3.localize("propertyUnknownName", { name: o2 });
                        e3.log(t3);
                      }
                      e3[o2] = r3;
                    } else if ("messages" !== o2 && "dataSourceMap" !== o2) {
                      if ("object" == typeof r3) {
                        const t3 = function(n3, o3) {
                          const r4 = Object.keys(n3);
                          for (let i2 = 0; i2 < r4.length; i2++) {
                            const s2 = r4[i2], a3 = n3[s2], l2 = e3._properties[o3 + "_" + s2];
                            if (l2 && null === l2.value) {
                              if (void 0 === e3[o3 + "_" + s2]) {
                                const t4 = e3.localize("propertyUnknownName", { name: o3 + "_" + s2 });
                                e3.log(t4);
                              }
                              e3[o3 + "_" + s2] = a3;
                            } else if ("object" == typeof a3 && !y2.Types.isArray(a3) && a3 && a3.constructor !== Date) t3(a3, o3 + "_" + s2);
                            else {
                              if (void 0 === e3[o3 + "_" + s2]) {
                                const t4 = e3.localize("propertyUnknownName", { name: o3 + "_" + s2 });
                                e3.log(t4);
                              }
                              e3[o3 + "_" + s2] = a3;
                            }
                          }
                        };
                        t3(r3, o2);
                      }
                    } else e3[o2] = r3;
                  }
                }
              }
              setup() {
                const e3 = this;
                if (e3.context = this, e3.isReady && !e3.isCompleted) return;
                if (e3.isReady) return e3._setModuleState("attached"), e3.isAttached = true, e3.attached(), e3._handleListeners("listen"), void (e3.context = document);
                e3.ownerElement && e3.ownerElement.detachedChildren.indexOf(e3) >= 0 && e3.ownerElement.detachedChildren.splice(e3.ownerElement.detachedChildren.indexOf(e3), 1), e3.isReady = true, e3.methods = e3.getStaticMember("methods"), e3.initProperties(), a2.isMobile && e3.classList.add("smart-mobile");
                for (let t3 = 0; t3 < e3.attributes.length; t3 += 1) {
                  const n2 = e3.propertyByAttributeName[e3.attributes[t3].name];
                  if (!n2) continue;
                  let o3 = e3.$.getAttributeValue(n2.attributeName, n2.type);
                  const r3 = o3 ? o3.toString() : "";
                  if (!(r3.indexOf("{{") >= 0 || r3.indexOf("[[") >= 0 || "object" !== n2.type && "array" !== n2.type && (e3.attributes[t3].value.indexOf("{{") >= 0 || e3.attributes[t3].value.indexOf("[[") >= 0) || void 0 === o3 || n2.value === o3)) {
                    const r4 = y2.Types.getType(o3), i2 = e3.attributes[t3].value;
                    if (("any" === n2.type || "object" === n2.type) && "" + e3[n2.name] === o3) continue;
                    if ("array" === n2.type && e3[n2.name] && JSON.stringify(e3[n2.name]) === o3) continue;
                    if ("number" === r4 && isNaN(o3) && "NaN" !== i2 && "Infinity" !== i2 && "-Infinity" !== i2) {
                      const t4 = e3.localize("propertyInvalidValueType", { name: n2.name, actualType: "string", type: n2.type });
                      e3.log(t4);
                    }
                    n2.isUpdatingFromAttribute = true, e3[n2.name] = o3, n2.isUpdatingFromAttribute = false;
                  }
                }
                for (let t3 in e3._properties) {
                  const n2 = e3._properties[t3];
                  if ("innerHTML" === t3 && n2.value === n2.defaultValue && (n2.value = n2.defaultValue = y2.Core.html(e3)), "boolean" !== n2.type && "bool" !== n2.type || "false" === e3.getAttribute(n2.attributeName) && (n2.isUpdating = true, e3.setAttribute(n2.attributeName, ""), n2.isUpdating = false), n2.defaultReflectToAttribute && n2.reflectToAttribute) {
                    if (n2.defaultReflectToAttribute && n2.defaultReflectToAttributeConditions) {
                      let t4 = true;
                      for (let o3 = 0; o3 < n2.defaultReflectToAttributeConditions.length; o3++) {
                        const r3 = n2.defaultReflectToAttributeConditions[o3];
                        let i2, s2;
                        for (let e4 in r3) i2 = e4, s2 = r3[e4];
                        e3._properties[i2] && e3._properties[i2].value !== s2 && (t4 = false);
                      }
                      if (!t4) continue;
                    }
                    n2.isUpdating = true, e3.$.setAttributeValue(n2.attributeName, n2.value, n2.type), n2.isUpdating = false;
                  }
                }
                const t2 = [];
                if (e3.children.length > 0) for (let n2 = 0; n2 < e3.children.length; n2++) {
                  const o3 = e3.children[n2];
                  y2.Extend(o3).isCustomElement && t2.push(o3);
                }
                e3.applyTemplate(), e3.complete = function() {
                  if (!e3.templateBindingsReady) {
                    const t4 = (e4) => {
                      e4.templateBindingsReady || (e4.templateBindingsReady = true, e4.updateTextNodes(), e4.updateBoundNodes());
                    };
                    if (e3.ownerElement) {
                      let n2 = e3.ownerElement, o3 = [];
                      for (; n2; ) o3.push(n2), n2 = n2.ownerElement;
                      for (let e4 = o3.length - 1; e4 >= 0; e4--) t4(o3[e4]);
                      t4(e3);
                    } else t4(e3);
                  }
                  const t3 = () => {
                    if (e3._setModuleState("ready"), e3.ready(), "auto" !== e3.renderMode || e3.isRendered || e3.render(), e3.isAttached = true, e3._setModuleState("attached"), e3.attached(), e3._handleListeners("listen"), e3.isHidden || 0 !== e3.offsetWidth && 0 !== e3.offsetHeight || (e3.isHidden = true), e3.completed(), e3.isRendered && (e3.context = document), e3.whenReadyCallbacks) {
                      for (let t4 = 0; t4 < e3.whenReadyCallbacks.length; t4++) e3.whenReadyCallbacks[t4]();
                      e3.whenReadyCallbacks = [];
                    }
                  };
                  if (e3.wait) e3.classList.add("smart-visibility-hidden");
                  else if (e3.classList.contains("smart-async")) requestAnimationFrame(() => {
                    t3();
                  });
                  else {
                    const n2 = e3.shadowParent;
                    e3.shadowParent = null;
                    const o3 = e3.parents;
                    if (e3.shadowParent = n2, 0 === o3.length) return;
                    const r3 = () => {
                      let t4 = e3.ownerElement, n3 = [];
                      for (; t4; ) n3.push(t4), t4 = t4.ownerElement;
                      for (let e4 = n3.length - 1; e4 >= 0; e4--) n3[e4].updateBoundMappedNodes();
                    };
                    e3.ownerElement && "HTML" !== o3[o3.length - 1].nodeName ? e3.getRootNode().host ? t3() : e3.ownerElement && "HTML" === e3.ownerElement.parents[e3.ownerElement.parents.length - 1].nodeName ? (r3(), t3()) : e3.checkIsInDomInterval = setInterval(() => {
                      const n3 = e3.parents;
                      "HTML" === n3[n3.length - 1].nodeName && (clearInterval(e3.checkIsInDomInterval), r3(), t3());
                    }, 100) : t3();
                  }
                };
                let o2 = [].slice.call(e3.querySelectorAll("[smart-id]")).concat(t2);
                if (window[n].EnableShadowDOM && true !== e3.isInShadowDOM && (o2 = [].slice.call(e3.shadowRoot.querySelectorAll("[smart-id]")).concat(t2)), 0 === o2.length) e3.complete();
                else {
                  e3._completeListeners = 0;
                  for (let t3 = 0; t3 < o2.length; t3++) {
                    const n2 = o2[t3];
                    if (y2.Extend(n2).isCustomElement) {
                      const t4 = (function() {
                        e3._completeListeners--, 0 === e3._completeListeners && (e3.complete(), delete e3._completeListeners);
                      }).bind(e3);
                      n2.isCompleted || n2.isUtilityElement || true === n2.wait || (e3._completeListeners++, n2._onCompleted || (n2.completeHandlers = [], n2._onCompleted = function() {
                        for (let e4 = 0; e4 < n2.completeHandlers.length; e4++) n2.completeHandlers[e4]();
                      }), n2.completeHandlers.push(t4));
                    }
                  }
                  0 === e3._completeListeners && e3.complete();
                }
              }
              visibilityChangedHandler() {
                const e3 = this;
                e3.isReady && requestAnimationFrame(() => {
                  0 === e3.offsetWidth || 0 === e3.offsetHeight ? e3.isHidden = true : (e3.isHidden = false, e3.$.fireEvent("resize", e3, { bubbles: false, cancelable: true }));
                });
              }
              attributeChangedCallback(e3, t2, n2) {
                const o2 = this, r3 = o2.propertyByAttributeName[e3];
                if ("class" !== e3 && "style" !== e3 || o2.visibilityChangedHandler(), r3 || o2.attributeChanged(e3, t2, n2), o2.onAttributeChanged && o2.onAttributeChanged(e3, t2, n2), !r3 || r3 && r3.isUpdating) return;
                let i2 = o2.$.getAttributeValue(r3.attributeName, r3.type);
                void 0 !== n2 && o2[r3.name] !== i2 && (r3.isUpdatingFromAttribute = true, o2[r3.name] = void 0 !== i2 ? i2 : o2._properties[r3.name].defaultValue, r3.isUpdatingFromAttribute = false);
              }
              attributeChanged(e3, t2, n2) {
              }
              set hasStyleObserver(e3) {
                const t2 = this;
                void 0 === t2._hasStyleObserver && (t2._hasStyleObserver = e3), e3 ? d2.watch(t2) : d2.unwatch(t2);
              }
              get hasStyleObserver() {
                const e3 = this;
                return void 0 === e3._hasStyleObserver || e3._hasStyleObserver;
              }
              attached() {
                const e3 = this;
                e3.hasStyleObserver && d2.watch(e3), e3.onAttached && e3.onAttached(), Smart(e3._selector) && Smart(e3._selector).attached && Smart(e3._selector).attached();
              }
              detached() {
                const e3 = this;
                e3.hasStyleObserver && d2.unwatch(e3), e3._setModuleState("detached"), e3.isAttached = false, e3.ownerElement && -1 === e3.ownerElement.detachedChildren.indexOf(e3) && e3.ownerElement.detachedChildren.push(e3), e3._handleListeners("unlisten"), e3.onDetached && e3.onDetached(), Smart(e3._selector) && Smart(e3._selector).detached && Smart(e3._selector).detached(), u2 && u2[e3._selector] && delete u2[e3._selector];
              }
              propertyChangedHandler(e3, t2, n2) {
                const o2 = this;
                t2 !== n2 && ("theme" === e3 && ("" !== t2 && o2.classList.remove("smart-" + t2), "" !== n2 && o2.classList.add("smart-" + n2)), "visibility" === e3 ? ("collapsed" === t2 ? o2.classList.remove("smart-hidden") : "hidden" === t2 && o2.classList.remove("smart-visibility-hidden"), "collapsed" === n2 ? o2.classList.add("smart-hidden") : "hidden" === n2 && o2.classList.add("smart-visibility-hidden")) : ("disabled" === e3 || "readonly" === e3) && o2._ariaPropertyChangedHandler(e3, n2), o2.propertyChanged && o2.propertyChanged(e3, t2, n2));
              }
              _ariaPropertyChangedHandler(e3, t2) {
                const n2 = this;
                "readonly" === e3 && -1 === ["checkbox", "combobox", "grid", "gridcell", "listbox", "radiogroup", "slider", "spinbutton", "textbox"].indexOf(n2.getAttribute("role")) || (t2 ? n2.setAttribute("aria-" + e3, true) : n2.removeAttribute("aria-" + e3));
              }
              _handleListeners(e3) {
                const t2 = this, n2 = t2.tagName.toLowerCase(), o2 = (o3) => {
                  for (let r3 in o3) {
                    const i2 = r3.split(".");
                    let s2 = i2[0], a3 = t2.$;
                    if (i2[1]) if (s2 = i2[1], a3 = t2["$" + i2[0]], "document" === i2[0]) {
                      let e4 = t2.smartId;
                      "" === e4 && (e4 = y2.Core.toCamelCase(n2)), s2 = s2 + "." + e4;
                    } else t2.smartId && (s2 = s2 + "." + t2.smartId + "_" + t2.parents.length);
                    else t2.smartId && (s2 = s2 + "." + t2.smartId);
                    const l2 = o3[r3], d3 = function(e4) {
                      const n3 = t2.context;
                      t2.context = t2, t2[l2] && t2[l2].apply(t2, [e4]), t2.context = n3;
                    };
                    a3 && a3[e3](s2, d3);
                  }
                };
                o2(t2.getStaticMember("listeners")), o2(t2.templateListeners), Smart(t2._selector) && Smart(t2._selector).properties && o2(Smart(t2._selector).listeners);
              }
              parseTemplate() {
                const e3 = this, n2 = e3.template(), r3 = document.createDocumentFragment();
                if (t[e3.nodeName] && !o) return t[e3.nodeName].cloneNode(true);
                if ("" === n2) return null;
                let i2 = document.createElement("div");
                r3.appendChild(i2), i2.innerHTML = n2;
                let s2 = i2.childNodes;
                i2.parentNode.removeChild(i2);
                for (let e4 = 0; e4 < s2.length; e4++) r3.appendChild(s2[e4]);
                return t[e3.nodeName] = r3, o ? r3 : r3.cloneNode(true);
              }
              applyTemplate() {
                const e3 = this, t2 = e3.parseTemplate();
                if (!t2) return;
                if (!t2.hasChildNodes) return;
                const n2 = t2.childNodes[0], o2 = (t3, n3) => {
                  e3["$" + t3] = n3.$ = y2.Extend(n3), e3.$[t3] = n3, n3.ownerElement = e3;
                };
                let r3 = n2;
                if (n2.getElementsByTagName("content").length > 0) {
                  let e4 = n2.getElementsByTagName("content")[0];
                  r3 = e4.parentNode, r3.removeChild(e4);
                } else {
                  const e4 = t2.querySelectorAll("[inner-h-t-m-l]");
                  e4 && e4.length > 0 && (r3 = e4[0]);
                }
                e3.$.template = "template" === n2.nodeName.toLowerCase() ? n2 : n2.querySelector("template");
                let i2 = t2.querySelectorAll("[id]");
                0 === i2.length && (i2 = t2.querySelectorAll("*")), o2("root", n2), o2("content", r3), e3.$.html = e3.innerHTML.toString().trim();
                for (let t3 = 0; t3 < i2.length; t3 += 1) {
                  let n3 = i2[t3];
                  "" === n3.id && (n3.id = "child" + t3), o2(n3.id, n3), n3.setAttribute("smart-id", n3.id), e3.shadowRoot ? n3.shadowParent = e3 : n3.removeAttribute("id");
                }
                for (false !== e3.hasTemplateBindings ? e3.bindings = e3.getBindings(t2) : e3.bindings = [], e3.$root.addClass("smart-container"); e3.childNodes.length; ) r3.appendChild(e3.firstChild);
                if (e3.appendTemplate(t2), e3.$.template) {
                  const t3 = document.createElement("div");
                  t3.classList.add("smart-template-container"), e3.$.templateContainer = t3, e3.$.template.parentNode.insertBefore(t3, e3.$.template), e3.refreshTemplate();
                }
              }
              refreshTemplate() {
                const e3 = this;
                if (!e3.$.templateContainer) return;
                e3.templateDetached(e3.$.templateContainer);
                const t2 = e3.$.template.content.cloneNode(true);
                e3.templateBindings = e3.getBindings(t2), e3.templateProperties = [];
                let n2 = document.createDocumentFragment();
                const o2 = function(t3, n3, r3) {
                  for (let i2 in t3) {
                    const s2 = t3[i2], a3 = s2.node.cloneNode();
                    n3.appendChild(a3);
                    let l2 = [], d3 = false;
                    if (s2.data) for (let t4 in s2.data) {
                      const o3 = s2.data[t4], i3 = o3.name;
                      if (e3.templateProperties[i3] = true, a3.removeAttribute(y2.Core.toDash(t4)), "*items" === t4) l2 = e3[i3], d3 = true;
                      else if (i3.indexOf("item.") >= 0 && void 0 !== r3) o3.value = r3[i3.substring("item.".length)], a3[t4] = o3.value;
                      else if (i3.indexOf("item") >= 0 && void 0 !== r3) o3.value = r3, a3[t4] = o3.value;
                      else if ("*if" === t4) if (i3.indexOf("(") >= 0) {
                        let t5, o4 = i3.substring(i3.indexOf("("));
                        const r4 = i3.substring(0, i3.indexOf("("));
                        if (o4 = o4.substring(1, o4.length - 1), o4 = o4.replace(/ /gi, ""), o4 = o4.split(","), o4.length > 0 && "" !== o4[0]) {
                          let n4 = [];
                          for (let t6 = 0; t6 < o4.length; t6++) n4.push(e3[o4[t6]]);
                          t5 = e3[r4].apply(e3, n4);
                        } else t5 = e3[r4]();
                        false === t5 && n3.removeChild(a3);
                      } else e3[i3] || n3.removeChild(a3);
                      else e3.updateBoundNode(a3, s2, e3, i3);
                    }
                    if (l2.length > 0 || d3) {
                      for (let e4 = 0; e4 < l2.length; e4++) s2.children && o2(s2.children, a3, l2[e4]);
                      if ("number" == typeof l2) for (let e4 = 0; e4 < l2; e4++) s2.children && o2(s2.children, a3, e4);
                    } else s2.children && o2(s2.children, a3, r3);
                  }
                };
                o2(e3.templateBindings.children, n2), e3.$.templateContainer.innerHTML = "", e3.$.templateContainer.appendChild(n2), e3.templateAttached(e3.$.templateContainer);
              }
              templateAttached() {
              }
              templateDetached() {
              }
              appendTemplate(e3) {
                this.appendChild(e3);
              }
              defineElementModules() {
                const e3 = this, t2 = e3.constructor.prototype;
                if ("BaseElement" === t2.elementName) {
                  t2.modules = e3.constructor.modules;
                  const n2 = t2.modules;
                  for (let t3 = 0; t3 < n2.length; t3 += 1) e3.addModule(n2[t3]);
                } else {
                  const n2 = t2.modules;
                  if (!n2) return;
                  for (let t3 = 0; t3 < n2.length; t3 += 1) {
                    const o2 = n2[t3], r3 = o2.prototype;
                    e3.defineElementMethods(r3.methodNames, r3), e3.defineElementProperties(o2.properties);
                  }
                }
              }
              watch(e3, t2) {
                const n2 = this;
                n2._watch = null !== e3 && null !== t2 ? { properties: e3, propertyChangedCallback: t2 } : null;
              }
              unwatch() {
                this._watch = null;
              }
              set(e3, t2, n2) {
                const o2 = this, r3 = o2.context;
                o2.context = true === n2 ? document : o2, o2[e3] = t2, o2.context = r3;
              }
              get(e3) {
                return this[e3];
              }
              _setModuleState(e3, t2) {
                const n2 = this, o2 = "is" + e3.substring(0, 1).toUpperCase() + e3.substring(1), r3 = "on" + e3.substring(0, 1).toUpperCase() + e3.substring(1);
                for (let i2 = 0; i2 < n2.modulesList.length; i2++) {
                  const s2 = n2.modulesList[i2];
                  s2[o2] = true, s2[e3] && s2[e3](t2), s2[r3] && s2[r3](t2);
                }
              }
              addModule(e3, t2) {
                const n2 = this;
                if (!e3) return;
                const o2 = n2.modules.slice(0), r3 = e3.prototype, i2 = Object.getPrototypeOf(e3);
                if (i2.name && i2.name !== e3.name && n2.addModule(i2), !e3.moduleName && e3.name && (e3.moduleName = e3.name), -1 === o2.findIndex((t3) => e3.moduleName === t3.moduleName) && o2.push(e3), n2.defineModule(e3), n2.defineElementMethods(r3.methodNames, r3), n2.defineElementProperties(e3.properties), n2.constructor.prototype.modules = o2, t2) for (let t3 in Smart.Elements.tagNames) {
                  const o3 = Smart.Elements.tagNames[t3];
                  let r4 = Object.getPrototypeOf(o3), i3 = [];
                  for (; r4 !== HTMLElement; ) i3.push(r4.prototype), r4 = Object.getPrototypeOf(r4);
                  i3.indexOf(n2) >= 0 && o3 !== n2 && o3.prototype.addModule(e3);
                }
              }
              defineModule(e3) {
                if (e3.isDefined) return;
                e3.prototype._initModule = function(e4) {
                  this.ownerElement = e4;
                };
                const t2 = e3.properties || {}, n2 = Object.keys(t2), o2 = Object.getOwnPropertyNames(e3.prototype);
                e3.prototype.methodNames = o2;
                for (let o3 = 0; o3 < n2.length; o3 += 1) {
                  const r3 = n2[o3], i2 = t2[r3];
                  Object.defineProperty(e3.prototype, r3, { configurable: false, enumerable: true, get() {
                    return this.ownerElement ? this.ownerElement[r3] : i2.value;
                  }, set(e4) {
                    this.ownerElement[r3] = e4;
                  } });
                }
                e3.isDefined = true;
              }
              getStaticMember(e3, t2) {
                const o2 = window[n][this.elementName], r3 = o2[e3];
                t2 || (t2 = "");
                let i2 = "array" === t2 ? [] : "string" === t2 ? "" : {}, s2 = Object.getPrototypeOf(o2), a3 = [];
                for (; s2[e3]; ) a3.push(s2[e3]), s2 = Object.getPrototypeOf(s2);
                for (let e4 = a3.length - 1; e4 >= 0; e4--) if ("array" === t2) for (let t3 = 0; t3 < a3[e4].length; t3++) -1 === i2.indexOf(a3[e4][t3]) && i2.push(a3[e4][t3]);
                else "string" === t2 ? -1 === i2.indexOf(a3[e4]) && (i2 += a3[e4]) : i2 = y2.Core.assign(i2, a3[e4]);
                if ("array" === t2) {
                  for (let e4 = 0; e4 < r3.length; e4++) -1 === i2.indexOf(r3[e4]) && i2.push(r3[e4]);
                  return i2;
                }
                return "string" === t2 ? (-1 === i2.indexOf(r3) && (i2 += r3), i2) : y2.Core.assign(i2, r3);
              }
              defineElementHierarchicalProperties(e3, t2) {
                const n2 = this, o2 = [];
                !function(e4) {
                  const n3 = Object.keys(e4);
                  for (let r3 = 0; r3 < n3.length; r3++) {
                    const i2 = n3[r3];
                    if ("messages" === i2) continue;
                    const s2 = e4[i2], a3 = Object.keys(s2), l2 = a3.indexOf("value") >= 0 && a3.indexOf("type") >= 0 && "object" == typeof s2.value;
                    if ("propertyObject" === s2.type || l2) {
                      const e5 = function(n4, r4) {
                        if (!n4.value) return;
                        const i3 = Object.keys(n4.value);
                        for (let s3 = 0; s3 < i3.length; s3++) {
                          const a4 = i3[s3], l3 = n4.value[a4], d3 = r4 + "_" + a4;
                          if ("object" != typeof l3 || null === l3) break;
                          const c2 = Object.keys(l3);
                          if (!(c2.indexOf("value") >= 0 && c2.indexOf("type") >= 0)) break;
                          if ("array" !== n4.type && (n4.isHierarchicalProperty = true), l3.parentPropertyName = r4, t2) {
                            const e6 = t2._properties[d3];
                            if (n4.value.hasOwnProperty(a4)) {
                              if (e6.isDefined) continue;
                              delete n4.value[a4];
                            }
                            e6.isDefined = true, Object.defineProperty(n4.value, a4, { configurable: false, enumerable: true, get: () => t2._properties[d3].value, set(e7) {
                              t2.updateProperty(t2, t2._properties[d3], e7);
                            } });
                          }
                          o2[d3] || (o2[d3] = l3, o2.length++), ("propertyObject" === l3.type || "object" == typeof l3.value && "array" !== l3.type) && e5(t2 ? t2._properties[d3] : l3, d3);
                        }
                      };
                      e5(s2, i2);
                    }
                  }
                }(e3), o2.length > 0 && !t2 && n2.defineElementProperties(o2);
              }
              defineElement() {
                const e3 = this, t2 = e3.constructor.prototype, n2 = e3.getStaticMember("properties"), o2 = Object.getOwnPropertyNames(t2);
                t2.extendedProperties = {}, t2.boundProperties = {}, t2.templateListeners = {}, e3.defineElementModules(), e3.defineElementMethods(o2, t2), e3.defineElementProperties(n2), e3.defineElementHierarchicalProperties(e3.extendedProperties), t2._initElement = function() {
                  const e4 = this, n3 = t2.extendedProperties, o3 = Object.keys(n3), r3 = e4.modules;
                  e4.$ = y2.Extend(e4), e4.$document = w, e4.smartId = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase(), e4.isCreated || (e4.modulesList = [], e4._properties = [], e4._beforeCreatedProperties && (e4._properties = e4._beforeCreatedProperties, delete e4._beforeCreatedProperties), e4.detachedChildren = [], e4.propertyByAttributeName = []);
                  for (let t3 = 0; t3 < r3.length; t3 += 1) {
                    let n4 = new r3[t3]();
                    n4._initModule(e4), e4.modulesList.push(n4);
                  }
                  for (let t3 = 0; t3 < o3.length; t3 += 1) {
                    const r4 = o3[t3], i2 = n3[r4];
                    let s2 = i2.value;
                    if (e4._properties[r4]) {
                      if (void 0 !== e4._properties[r4].notify) continue;
                      delete e4._properties[r4];
                    }
                    if (E2 && "innerHTML" === r4 && delete e4[r4], -1 === window.navigator.userAgent.indexOf("PhantomJS") && e4.hasOwnProperty(r4) && (s2 = e4[r4], delete e4[r4]), "array" === i2.type && null != s2 && (s2 = s2.slice(0)), "object" === i2.type && null != s2 && (s2 = Array.isArray(s2) ? s2.slice(0) : Object.assign({}, s2)), e4._properties[r4] = { name: r4, notify: i2.notify, allowedValues: i2.allowedValues, type: i2.type, nullable: i2.nullable, reflectToAttribute: i2.reflectToAttribute, defaultReflectToAttribute: i2.defaultReflectToAttribute, defaultReflectToAttributeConditions: i2.defaultReflectToAttributeConditions, value: s2, readOnly: i2.readOnly, defaultValue: s2, attributeName: i2.attributeName, observer: i2.observer, inherit: i2.inherit, extend: i2.extend, validator: i2.validator }, e4.propertyByAttributeName[i2.attributeName] = e4._properties[r4], !i2.hasOwnProperty("type")) {
                      const t4 = e4.localize("propertyUnknownType", { name: r4 });
                      e4.log(t4);
                    }
                    if ("any" === i2.type || "propertyObject" === i2.type) continue;
                    const a3 = y2.Types.getType(s2);
                    if (null != s2 && i2.type !== a3 && !i2.validator) {
                      if ("object" === i2.type && "array" === a3) continue;
                      if ("number" === a3 && ["integer", "int", "float"].findIndex((e5) => e5 === i2.type) >= 0) continue;
                      const t4 = e4.localize("propertyInvalidValueType", { name: r4, actualType: a3, type: i2.type });
                      e4.log(t4);
                    }
                  }
                  e4.defineElementHierarchicalProperties(e4._properties, e4), e4.isCreated = true;
                }, t2.registered();
              }
              defineElementMethods(e3, t2) {
                const n2 = this.constructor.prototype, o2 = function(e4, t3) {
                  const n3 = Array.prototype.slice.call(arguments, 2), o3 = function() {
                    if (!this.isReady && "localize" !== t3 && "localize" !== t3 && "cloneNode" !== t3 && "importStyle" !== t3 && "log" !== t3 && "parseAttributes" !== t3) {
                      const e5 = this.localize("elementNotInDOM");
                      this.log(e5);
                    }
                    let o4 = this;
                    for (let e5 = 0; e5 < this.modulesList.length; e5++) {
                      let n4 = this.modulesList[e5];
                      if (t3 in n4) {
                        o4 = n4;
                        break;
                      }
                    }
                    const r4 = this.context, i2 = n3.concat(Array.prototype.slice.call(arguments));
                    let s2 = null;
                    const a3 = function(e5, t4) {
                      return e5 === t4 || "number" === e5 && ("int" === t4 || "integer" === t4 || "float" === t4) || "bool" === e5 && "boolean" === t4 || "boolean" === e5 && "bool" === t4 || "object" === e5 && "any" === t4 || void 0;
                    };
                    if (this.methods) {
                      const e5 = this.methods[t3];
                      if (e5) {
                        const n4 = e5.split(":");
                        s2 = n4[n4.length - 1].trim();
                        const o5 = [], r5 = e5.substring(1 + e5.indexOf("("), e5.lastIndexOf(")")).split(",");
                        let l3 = "";
                        for (let e6 = 0; e6 < r5.length; e6++) {
                          const t4 = r5[e6];
                          l3 += t4, t4.indexOf(":") >= 0 ? (o5.push(l3), l3 = "") : l3 += ",";
                        }
                        let d3 = o5.length;
                        for (let e6 = 0; e6 < o5.length; e6++) {
                          const n5 = o5[e6].trim().split(":"), r6 = n5[0].split("=")[0].trim().indexOf("?") >= 0, s3 = n5[1].indexOf("?") >= 0, l4 = n5[1].replace(/\?/gi, "").trim(), c2 = l4.split("|");
                          let u3 = n5[0].split("=")[1];
                          const p3 = y2.Types.getType(i2[e6]);
                          if (void 0 === i2[e6] && u3) {
                            switch (u3 = u3.trim(), l4[0]) {
                              case "date": {
                                let e7 = u3.substring(u3.indexOf("(") + 1, u3.lastIndexOf(")"));
                                e7 = e7.length > 0 ? e7.split(",").map((e8) => parseInt(e8)) : [], u3 = 0 === e7.length ? /* @__PURE__ */ new Date() : new Date(e7[0], e7[1], e7[2]);
                                break;
                              }
                              case "bool":
                              case "boolean":
                                u3 = "true" === u3 || "1" === u3;
                                break;
                              case "int":
                              case "integer":
                                u3 = parseInt(u3);
                                break;
                              case "float":
                              case "number":
                                u3 = parseFloat(u3);
                                break;
                              case "any":
                              case "object":
                                u3 = u3.indexOf("{") >= 0 ? JSON.parse(u3) : u3;
                            }
                            i2.push(u3);
                          } else r6 && d3--;
                          if (l4 !== p3 && p3) {
                            let n6 = true;
                            for (let e7 = 0; e7 < c2.length; e7++) if (a3(p3, c2[e7])) {
                              n6 = false;
                              break;
                            }
                            if (n6 && (null !== i2[e6] || !s3)) {
                              const n7 = this.localize("methodInvalidValueType", { name: t3, actualType: p3, type: l4, argumentIndex: e6 });
                              this.log(n7);
                            }
                          }
                          if (i2.length < d3) {
                            const e7 = this.localize("methodInvalidArgumentsCount", { name: t3, actualArgumentsCount: i2.length, argumentsCount: d3 });
                            this.log(e7);
                          }
                        }
                      }
                    }
                    this.context = this;
                    const l2 = e4.apply(o4, i2);
                    if (s2) {
                      const e5 = void 0 === y2.Types.getType(l2) ? "void" : y2.Types.getType(l2);
                      if (!a3(e5, s2)) {
                        const n4 = this.localize("methodInvalidReturnType", { name: t3, actualType: e5, type: s2 });
                        this.log(n4);
                      }
                    }
                    return this.context = r4, l2;
                  };
                  return o3;
                }, r3 = ["constructor", "ready", "created", "render", "attached", "detached", "appendChild", "insertBefore", "removeChild", "connect", "disconnectedCallback", "connectedCallback", "attributeChangedCallback", "propertyChangedHandler", "enableShadowDOM", "isInShadowDOM", "addPropertyBindings"];
                for (let i2 in e3) {
                  let s2 = e3[i2];
                  s2.startsWith("_") || void 0 !== r3.find((e4) => e4 === s2) || n2.extendedProperties[s2] || y2.Types.isFunction(t2[s2]) && (n2[s2] = o2(t2[s2], s2));
                }
              }
              defineElementProperties(e3) {
                if (!e3) return;
                const t2 = this, n2 = t2.constructor.prototype, o2 = Object.keys(e3), r3 = t2.getStaticMember("properties");
                Object.assign(n2.extendedProperties, e3), t2.updateProperty = function(e4, t3, n3) {
                  const o3 = e4;
                  if (!t3 || t3.readOnly) return;
                  if (t3.allowedValues) {
                    let e5 = false;
                    for (let o4 = 0; o4 < t3.allowedValues.length; o4++) if (t3.allowedValues[o4] === n3) {
                      e5 = true;
                      break;
                    }
                    if (!e5) {
                      const e6 = JSON.stringify(t3.allowedValues).replace(/\[|\]/gi, "").replace(",", ", ").replace(/"/gi, "'"), r5 = "'" + n3 + "'", i3 = o3.localize("propertyInvalidValue", { name: t3.name, actualValue: r5, value: e6 });
                      return void o3.log(i3);
                    }
                  }
                  const r4 = t3.name, i2 = o3._properties[r4].value;
                  if (t3.validator && o3[t3.validator]) {
                    const e5 = o3.context;
                    o3.context = o3;
                    const r5 = o3[t3.validator](i2, n3);
                    void 0 !== r5 && (n3 = r5), o3.context = e5;
                  }
                  if (i2 !== n3) {
                    if (o3.propertyChanging) {
                      const e5 = o3.propertyChanging(r4, i2, n3);
                      if (false === e5 || null === e5) return;
                    }
                    if (!t3.hasOwnProperty("type")) {
                      const e5 = o3.localize("propertyUnknownType", { name: r4 });
                      o3.log(e5);
                    }
                    if ("array" !== t3.type || JSON.stringify(i2) !== JSON.stringify(n3)) {
                      if (null != n3 && "any" !== t3.type && "propertyObject" !== t3.type && t3.type !== y2.Types.getType(n3) && !t3.validator || null === n3 && !t3.nullable) {
                        let e5 = true;
                        if ("object" === t3.type && "array" === y2.Types.getType(n3) && (e5 = false), "number" === y2.Types.getType(n3) && ["integer", "int", "float"].findIndex((e6) => e6 === t3.type) >= 0 && (e5 = false), e5) {
                          const e6 = o3.localize("propertyInvalidValueType", { name: r4, actualType: y2.Types.getType(n3), type: t3.type });
                          return void o3.error(e6);
                        }
                      }
                      if (t3.isUpdating = true, t3.isHierarchicalProperty) {
                        const e5 = function(t4, n4) {
                          const r5 = Object.keys(t4);
                          for (let i3 = 0; i3 < r5.length; i3++) {
                            const s2 = r5[i3], a3 = t4[s2];
                            "object" == typeof a3 && !y2.Types.isArray(a3) && a3 && a3.constructor !== Date ? e5(a3, n4 + "_" + s2) : o3[n4 + "_" + s2] = a3;
                          }
                        };
                        e5(n3, r4);
                      } else o3._properties[r4].value = n3;
                      if (!t3.isUpdatingFromAttribute && t3.reflectToAttribute && o3.$.setAttributeValue(t3.attributeName, n3, t3.type), o3.isReady && (!o3.ownerElement || o3.ownerElement && o3.ownerElement.isReady)) {
                        if ("wait" === r4 && (n3 || !i2 || o3.isCompleted || (o3.classList.remove("smart-visibility-hidden"), o3.ownerElement && o3.ownerElement.updateBoundMappedNodes(), o3.updateBoundMappedNodes(), o3.complete())), "renderMode" === r4) return;
                        if (o3.context !== o3 && !o3.wait) {
                          const e6 = o3.context;
                          o3.context = o3, o3.propertyChangedHandler(r4, i2, n3), o3.context = e6, t3.observer && o3[t3.observer] && (o3.context = o3, o3[t3.observer](i2, n3), o3.context = document), o3._watch && o3._watch.properties.indexOf(r4) >= 0 && o3._watch.propertyChangedCallback(r4, i2, n3);
                        }
                        const e5 = t3.notify || o3.boundProperties[r4];
                        e5 && (o3.$.fireEvent(t3.attributeName + "-changed", { context: o3.context, oldValue: i2, value: o3[r4] }), o3.boundProperties[r4] && o3.updateBoundNodes(r4)), e5 && o3.templateProperties && o3.templateProperties[r4] && o3.refreshTemplate(), o3.dataContextProperties && ("dataContext" === r4 ? o3.applyDataContext() : o3.dataContextProperties[r4] && o3.updateDataContextProperty(r4));
                      }
                      t3.isUpdating = false;
                    }
                  }
                };
                for (let t3 = 0; t3 < o2.length; t3 += 1) {
                  const i2 = o2[t3], s2 = e3[i2], a3 = y2.Core.toDash(i2), l2 = s2.type || "any", d3 = l2.indexOf("?") >= 0 || "any" === l2;
                  d3 && "any" !== l2 && (s2.type = l2.substring(0, l2.length - 1)), s2.nullable = d3, s2.attributeName = a3.toLowerCase(), s2.name = i2, s2.reflectToAttribute = void 0 === s2.reflectToAttribute || s2.reflectToAttribute, s2.inherit && r3[i2] && (s2.value = r3[i2].value), s2.extend && r3[i2] && y2.Core.assign(s2.value, r3[i2].value), n2.hasOwnProperty(i2) || Object.defineProperty(n2, i2, { configurable: false, enumerable: true, get() {
                    if (this._properties[i2]) return this._properties[i2].value;
                  }, set(e4) {
                    const t4 = this;
                    t4.updateProperty(t4, t4._properties[i2], e4);
                  } });
                }
              }
            }
            let _2 = [], S2 = [], x = [], E2 = false;
            const A2 = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
            A2 && parseInt(A2[2], 10) <= 50 && (E2 = true);
            class T2 {
              static register(e3, t2) {
                const o2 = t2.prototype;
                let r3 = a2.toCamelCase(e3).replace(/[a-z]+/, ""), i2 = t2.version || window[n].Version;
                if (window.customElements.get(e3) && window.customElements.get(e3).version === i2) return;
                let s2 = e3;
                for (i2 = i2.split("."); window.customElements.get(e3); ) e3 = s2 + "-" + i2.join("."), i2[2] = parseInt(i2[2]) + 1;
                if (!_2[e3]) {
                  if (e3.startsWith(n.toLowerCase())) _2[e3] = window[n][r3] = window[n.toLowerCase() + r3] = t2;
                  else {
                    let o3 = e3.split("-")[0];
                    o3 = o3.substring(0, 1).toUpperCase() + o3.substring(1), window[n][o3] || (window[n][o3] = {}), _2[e3] = window[n][o3][r3] = window[o3.toLowerCase() + r3] = t2, window[n][r3] && (r3 = a2.toCamelCase(e3)), window[n][r3] = t2;
                  }
                  o2.elementName = r3, o2.defineElement(), S2[e3] && S2[e3](o2), window.customElements.define(e3, t2);
                }
              }
              static registerElements() {
                const e3 = this;
                if (e3.toRegister) {
                  e3.isRegistering = true;
                  for (let t2 = 0; t2 < e3.toRegister.length; t2++) {
                    const n2 = e3.toRegister[t2];
                    e3.register(n2.tagName, n2.element);
                  }
                  e3.isRegistering = false;
                }
              }
              static get(e3) {
                if (_2[e3]) return _2[e3];
              }
              static whenRegistered(e3, t2) {
                if (!e3) throw new Error("Syntax Error: Invalid tag name");
                const n2 = S2[e3], o2 = this.get(e3), r3 = o2 ? o2.modules.length : 3;
                try {
                  n2 || o2 ? !n2 && o2 ? (t2(o2.prototype), S2[e3] = void 0) : n2 && !o2 ? S2[e3] = function(e4) {
                    n2(e4), t2(e4);
                  } : n2 && o2 && (o2.proto && (n2(o2.proto), t2(o2.proto)), S2[e3] = void 0) : S2[e3] = function(e4) {
                    try {
                      t2(e4);
                    } catch (e5) {
                      const t3 = e5 instanceof Error ? e5.message : e5.toString();
                      console.log(t3);
                    }
                  };
                } catch (e4) {
                  const t3 = e4 instanceof Error ? e4.message : e4.toString();
                  console.log(t3);
                }
                if (o2 && r3 !== o2.prototype.modules.length) {
                  const t3 = document.querySelectorAll(e3);
                  for (let e4 = 0; e4 < t3.length; e4++) {
                    const n3 = t3[e4];
                    n3.isCreated && n3._initElement();
                  }
                }
              }
            }
            T2.lazyRegister = false, T2.tagNames = [];
            class P2 {
              constructor() {
                const e3 = this;
                e3.name = "observableArray", e3.observables = arguments.length < 3 ? null : arguments[2];
                const t2 = new Proxy(e3, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, apply: function(e4, t3, n2) {
                  return e4.apply(t3, n2);
                }, get: function(t3, n2) {
                  return t3[n2] || isNaN(parseInt(n2)) ? t3[n2] : e3.getItem(parseInt(n2));
                }, set: function(t3, n2, o2) {
                  return t3[n2] || isNaN(parseInt(n2)) ? (t3[n2] = o2, true) : (e3.setItem(parseInt(n2), o2), true);
                } });
                if (e3._addArgs = { eventName: "change", object: t2, action: "add", index: null, removed: new Array(), addedCount: 1 }, e3._removeArgs = { eventName: "change", object: t2, action: "remove", index: null, removed: null, addedCount: 0 }, arguments.length >= 1 && Array.isArray(arguments[0])) {
                  e3._array = [];
                  const t3 = arguments[0];
                  for (let n2 = 0, o2 = t3.length; n2 < o2; n2++) {
                    const o3 = e3._getItem(e3._array.length, t3[n2]);
                    e3._array.push(o3);
                  }
                } else e3._array = Array.apply(null, arguments);
                return 2 === arguments.length && (e3.notifyFn = arguments[1]), t2;
              }
              get canNotify() {
                const e3 = this;
                return void 0 === e3._canNotify && (e3._canNotify = true), e3._canNotify;
              }
              set canNotify(e3) {
                this._canNotify = e3;
              }
              _notify(e3) {
                const t2 = this;
                t2.canNotify && t2.notifyFn && t2.notifyFn(e3);
              }
              notify(e3) {
                e3 && (this.notifyFn = e3);
              }
              toArray() {
                return this._array;
              }
              _getItem(e3, t2) {
                const n2 = this;
                return "string" == typeof t2 || "number" == typeof t2 || void 0 === t2 ? t2 : new Proxy(t2, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, set: function(t3, o2, r3) {
                  const i2 = t3[o2];
                  return t3[o2] = r3, !n2._canNotify || false === t3.canNotify || (n2.observables && !n2.observables[o2] || n2._notify({ eventName: "change", object: n2, target: t3, action: "update", index: e3, path: e3 + "." + o2, oldValue: i2, newValue: r3, propertyName: o2 }), true);
                } });
              }
              getItem(e3) {
                return this._array[e3];
              }
              setItem(e3, t2) {
                const n2 = this, o2 = n2._array[e3];
                n2._array[e3] = n2._getItem(e3, t2), n2._notify({ eventName: "change", object: n2._array, action: "update", index: e3, removed: [o2], addedCount: 1 });
              }
              get length() {
                return this._array.length;
              }
              set length(e3) {
                const t2 = this;
                r2.isNumber(e3) && t2._array && t2._array.length !== e3 && t2.splice(e3, t2._array.length - e3);
              }
              toString() {
                return this._array.toString();
              }
              toLocaleString() {
                return this._array.toLocaleString();
              }
              concat() {
                const e3 = this;
                e3._addArgs.index = e3._array.length;
                const t2 = e3._array.concat.apply(e3._array, arguments);
                return new Smart.ObservableArray(t2);
              }
              join(e3) {
                return this._array.join(e3);
              }
              pop() {
                const e3 = this;
                e3._removeArgs.index = e3._array.length - 1, delete e3[e3._array.length - 1];
                const t2 = e3._array.pop();
                return e3._removeArgs.removed = [t2], e3._notify(e3._removeArgs), e3._notifyLengthChange(), t2;
              }
              push() {
                const e3 = this;
                if (e3._addArgs.index = e3._array.length, 1 === arguments.length && Array.isArray(arguments[0])) {
                  const t2 = arguments[0];
                  for (let n2 = 0, o2 = t2.length; n2 < o2; n2++) {
                    const o3 = e3._getItem(e3._array.length, t2[n2]);
                    e3._array.push(o3);
                  }
                } else {
                  const t2 = e3._getItem(e3._addArgs.index, arguments[0]);
                  e3._array.push.apply(e3._array, [t2]);
                }
                return e3._addArgs.addedCount = e3._array.length - e3._addArgs.index, e3._notify(e3._addArgs), e3._notifyLengthChange(), e3._array.length;
              }
              _notifyLengthChange() {
                const e3 = this;
                if (!e3.canNotify) return;
                const t2 = e3._createPropertyChangeData("length", e3._array.length);
                e3._notify(t2);
              }
              _createPropertyChangeData(e3, t2, n2) {
                return { eventName: "change", object: this, action: e3, value: t2, oldValue: n2 };
              }
              reverse() {
                return this._array.reverse();
              }
              shift() {
                const e3 = this, t2 = e3._array.shift();
                return e3._removeArgs.index = 0, e3._removeArgs.removed = [t2], e3._notify(e3._removeArgs), e3._notifyLengthChange(), t2;
              }
              slice(e3, t2) {
                return this._array.slice(e3, t2);
              }
              sort(e3) {
                return this._array.sort(e3);
              }
              splice(e3, t2, n2) {
                const o2 = this, r3 = o2._array.length;
                let i2;
                if (n2 && n2.length) for (let r4 = 0; r4 < n2.length; r4++) i2 = o2._array.splice(e3 + r4, t2, n2[r4]);
                else i2 = o2._array.splice.apply(o2._array, arguments);
                if (n2) {
                  let t3 = o2.canNotify;
                  if (o2.canNotify = false, n2.length) for (let t4 = 0; t4 < n2.length; t4++) o2.setItem(e3 + t4, n2[t4]);
                  else o2.setItem(e3, n2);
                  o2.canNotify = t3, o2._notify({ eventName: "change", object: this, action: "add", index: e3, added: i2, addedCount: o2._array.length > r3 ? o2._array.length - r3 : 0 });
                } else o2._notify({ eventName: "change", object: this, action: "remove", index: e3, removed: i2, addedCount: o2._array.length > r3 ? o2._array.length - r3 : 0 });
                return o2._array.length !== r3 && o2._notifyLengthChange(), i2;
              }
              unshift() {
                const e3 = this, t2 = e3._array.length, n2 = e3._array.unshift.apply(e3._array, arguments);
                return e3._addArgs.index = 0, e3._addArgs.addedCount = n2 - t2, e3._notify(this._addArgs), e3._notifyLengthChange(), n2;
              }
              indexOf(e3, t2) {
                const n2 = this;
                for (let o2 = t2 || 0, r3 = n2._array.length; o2 < r3; o2++) if (n2._array[o2] === e3) return o2;
                return -1;
              }
              lastIndexOf(e3, t2) {
                const n2 = this;
                for (let o2 = t2 || n2._array.length - 1; o2 >= 0; o2--) if (n2._array[o2] === e3) return o2;
                return -1;
              }
              find(e3, t2) {
                return this._array.find(e3, t2);
              }
              findIndex(e3, t2) {
                return this._array.findIndex(e3, t2);
              }
              every(e3, t2) {
                return this._array.every(e3, t2);
              }
              some(e3, t2) {
                return this._array.some(e3, t2);
              }
              forEach(e3, t2) {
                this._array.forEach(e3, t2);
              }
              map(e3, t2) {
                return this._array.map(e3, t2);
              }
              filter(e3, t2) {
                return this._array.filter(e3, t2);
              }
              reduce(e3, t2) {
                return void 0 !== t2 ? this._array.reduce(e3, t2) : this._array.reduce(e3);
              }
              reduceRight(e3, t2) {
                return void 0 !== t2 ? this._array.reduceRight(e3, t2) : this._array.reduceRight(e3);
              }
              move(e3, t2) {
                this.splice(t2, 0, this.splice(e3, 1)[0]);
              }
            }
            let D2 = {};
            window[n] && (D2 = window[n]), window[n] = function(e3, t2) {
              let o2 = e3;
              if (e3) {
                if (e3.indexOf("#") >= 0 || e3.indexOf(".") >= 0) return u2[e3] ? u2[e3] : t2 ? (u2[e3] = new t2(), function(e4, t3) {
                  const n2 = t3.properties;
                  t3._properties = [];
                  const o3 = function(n3, r4) {
                    const i2 = Object.keys(n3);
                    for (let s2 = 0; s2 < i2.length; s2++) {
                      const a3 = i2[s2], l2 = n3[a3];
                      t3._properties[r4 + a3] = l2, Array.isArray(l2) ? t3._properties[r4 + a3] = new P2(l2, function(t4) {
                        const n4 = a3 + "." + t4.path, o4 = t4.newValue, r5 = document.querySelector(e4);
                        if (r5) {
                          const e5 = n4.split(".");
                          let t5 = r5;
                          for (let n5 = 0; n5 < e5.length; n5++) t5 = t5[e5[n5]];
                          t5 = o4;
                        }
                      }) : (Object.defineProperty(n3, a3, { configurable: false, enumerable: true, get: () => t3._properties[r4 + a3], set(e5) {
                        t3._properties[r4 + a3] = e5;
                      } }), l2 && "DataAdapter" === l2.constructor.name || l2 && "object" == typeof l2 && Smart.DataAdapter && l2 instanceof Smart.DataAdapter || "object" == typeof l2 && l2 && Object.keys(l2).length > 0 && o3(l2, r4 + a3 + "."));
                    }
                  };
                  o3(n2, ""), Object.defineProperty(t3, "properties", { configurable: false, enumerable: true, get: () => n2 });
                  const r3 = document.querySelector(e4);
                  if (r3 && r3.isReady) for (let e5 in n2) r3[e5] = n2[e5];
                  else if (r3) {
                    r3.props = {};
                    for (let e5 in n2) r3.props[e5] = n2[e5];
                  }
                }(e3, u2[e3]), u2[e3]) : void 0;
                if (t2) {
                  if (T2.tagNames[e3] = t2, T2.lazyRegister) {
                    T2.toRegister || (T2.toRegister = []);
                    const e4 = a2.toCamelCase(o2).replace(/[a-z]+/, "");
                    return window[n][e4] = t2, void T2.toRegister.push({ tagName: o2, element: t2 });
                  }
                  T2.register(o2, t2);
                }
              }
            }, window.addEventListener("load", function() {
              const e3 = window[n].Elements.tagNames;
              let t2 = [];
              for (let o2 in e3) {
                const r3 = e3[o2];
                let i2 = document.querySelectorAll("[" + o2 + "]");
                for (let e4 = 0; e4 < i2.length; e4++) {
                  const t3 = i2[e4];
                  t3 instanceof HTMLDivElement && (t3.__proto__ = r3.prototype, t3.created(), t3.connectedCallback()), t3.classList.add("smart-element-ready");
                }
                let s2 = r3.name;
                "Item" === s2 && (s2 = "ListItem"), i2 = document.querySelectorAll('[is="' + n.toLocaleLowerCase() + s2 + '"]');
                for (let e4 = 0; e4 < i2.length; e4++) t2.push(i2[e4]);
              }
              if (t2.length > 0) {
                const e4 = (e5) => {
                  let t3 = [], n2 = e5.parentNode;
                  for (; n2 && 9 !== n2.nodeType; ) n2 instanceof HTMLElement == 1 && t3.push(n2), n2 = n2.parentNode;
                  return t3;
                };
                t2.sort(function(t3, n2) {
                  let o2 = e4(t3).length, r3 = e4(n2).length;
                  return o2 < r3 ? 1 : o2 > r3 ? -1 : 0;
                });
                for (let e5 = 0; e5 < t2.length; e5++) {
                  const n2 = t2[e5], o2 = n2.getAttribute("is");
                  let r3;
                  r3 = "smartItem" === o2 ? new window.smartListItem(n2) : new window[o2](n2), r3.removeAttribute("is");
                }
              }
            });
            const L2 = function() {
              if ("complete" === document.readyState && "manual" !== window[n].RenderMode) {
                x.sort(function(e3, t2) {
                  let n2 = e3.element.parents.length, o2 = t2.element.parents.length;
                  return n2 < o2 ? -1 : n2 > o2 ? 1 : 0;
                });
                for (let e3 = 0; e3 < x.length; e3++) window[n].RenderMode = "", x[e3].element.isLoading = false, x[e3].callback(), window[n].RenderMode = "";
                x = [], document.removeEventListener("readystatechange", L2);
              }
            };
            Object.assign(window[n], { Elements: T2, Modules: [], BaseElement: class extends C2 {
              static get observedAttributes() {
                let e3 = this, t2 = ["external-style"];
                for (let n2 in e3.prototype.extendedProperties) {
                  const o2 = e3.prototype.extendedProperties[n2];
                  t2.push(o2.attributeName);
                }
                return t2;
              }
              static get styleUrls() {
                return [];
              }
              static get styles() {
                return "";
              }
              get styleUrl() {
                return this._styleUrl;
              }
              set styleUrl(e3) {
                this._styleUrl = e3;
              }
              get isInShadowDOM() {
                const e3 = this, t2 = e3.getRootNode();
                return !e3.hasAttribute("smart-blazor") && t2 !== document && t2 !== e3;
              }
              getShadowRootOrBody() {
                const e3 = this;
                return e3.isInShadowDOM && e3.getRootNode().host ? e3.getRootNode().host.shadowRoot : document.body;
              }
              get enableShadowDOM() {
                return window[n].EnableShadowDOM;
              }
              importStyle(e3, t2) {
                this._importStyle(e3, t2);
              }
              _importStyle(e3, t2) {
                const n2 = this;
                if (!n2.shadowRoot || !e3) return;
                const o2 = (e4) => {
                  const o3 = n2.shadowRoot.children;
                  for (let n3 = 0; n3 < o3.length; n3++) {
                    const r5 = o3[n3];
                    if (r5 instanceof HTMLLinkElement && r5.href === e4) return t2 && t2(), null;
                  }
                  const r4 = document.createElement("link");
                  return r4.rel = "stylesheet", r4.type = "text/css", r4.href = e4, r4.onload = t2, r4;
                }, r3 = (() => {
                  const e4 = n2.shadowRoot.children;
                  let t3 = null;
                  for (let n3 = 0; n3 < e4.length; n3++) {
                    const o3 = e4[n3];
                    o3 instanceof HTMLLinkElement && (t3 = o3);
                  }
                  return t3;
                })(), i2 = (e4, t3) => {
                  t3.parentNode.insertBefore(e4, t3.nextSibling);
                };
                if (Array.isArray(e3)) {
                  const t3 = document.createDocumentFragment();
                  for (let n3 = 0; n3 < e3.length; n3++) {
                    const r4 = o2(e3[n3]);
                    r4 && t3.appendChild(r4);
                  }
                  r3 ? i2(t3, r3) : n2.shadowRoot.insertBefore(t3, n2.shadowRoot.firstChild);
                } else {
                  const t3 = o2(e3);
                  if (!t3) return;
                  r3 ? i2(t3, r3) : n2.shadowRoot.insertBefore(t3, n2.shadowRoot.firstChild);
                }
              }
              attributeChanged(e3, t2, n2) {
                "style-url" === e3 && (this.styleUrl = n2);
              }
              attributeChangedCallback(e3, t2, n2) {
                this.isReady && super.attributeChangedCallback(e3, t2, n2);
              }
              constructor(e3, t2) {
                super();
                const n2 = this;
                if (e3) {
                  t2 && (n2._initProperties = t2);
                  const o2 = (e4) => {
                    if ("string" == typeof e4 ? document.querySelector(e4) : e4) {
                      const o3 = "string" == typeof e4 ? document.querySelector(e4) : e4;
                      if (o3 instanceof HTMLDivElement) {
                        const r3 = document.createElement(n2.tagName);
                        for (let e5 of o3.attributes) r3.setAttribute(e5.name, o3.getAttribute(e5.name));
                        for (; o3.childNodes.length; ) r3.appendChild(o3.firstChild);
                        return "string" == typeof e4 && (r3.id = e4.substring(1)), r3._initProperties = t2, o3.parentNode && o3.parentNode.replaceChild(r3, o3), r3;
                      }
                      if (t2) {
                        const e5 = o3.context;
                        if (o3._initProperties = t2, o3.isReady) {
                          o3.context = o3;
                          const n3 = {}, r3 = {};
                          for (let e6 in t2) n3[e6] = o3[e6], r3[e6] = t2[e6];
                          Object.getOwnPropertyNames(t2).length > 0 && (o3.initProperties(), o3.propertyChangedHandler(t2, n3, r3)), o3.context = e5;
                        }
                      }
                      return o3;
                    }
                  };
                  if ("string" == typeof e3) {
                    const t3 = document.querySelectorAll(e3), n3 = [];
                    if (t3.length > 1) {
                      for (let e4 = 0; e4 < t3.length; e4++) {
                        const r3 = o2(t3[e4]);
                        n3.push(r3);
                      }
                      return n3;
                    }
                  } else if (e3 && e3.length > 0) {
                    const t3 = e3;
                    if (t3.length > 1) {
                      for (let e4 = 0; e4 < t3.length; e4++) {
                        const n3 = o2(t3[e4]);
                        _2.push(n3);
                      }
                      return _2;
                    }
                  }
                  return o2(e3);
                }
                n2._styleUrl = "", n2.isUtilityElement || n2.created();
              }
              _getRootShadowParent() {
                let e3 = this.shadowParent;
                for (; e3; ) {
                  if (!e3.shadowParent) return e3;
                  e3 = e3.shadowParent;
                }
                return e3 || this.shadowParent;
              }
              _getStyleUrl(e3) {
                let t2 = y2.Core.getScriptLocation() + window[n].StyleBaseUrl + e3;
                return this.shadowParent && (t2 = t2.replace("scoped/", "")), t2;
              }
              _getStyleUrls() {
                const e3 = this;
                e3.nodeName.startsWith(n);
                const t2 = e3.getStaticMember("styleUrls", "array"), o2 = [];
                for (let n2 = 0; n2 < t2.length; n2++) {
                  const r3 = t2[n2], i2 = e3._getStyleUrl(r3);
                  o2.push(i2);
                }
                return o2;
              }
              _setupShadowRoot() {
                const e3 = this;
                e3.classList.add("smart-element-init");
                const t2 = (t3) => {
                  t3.$.root && (t3.$.root.classList.add(n.toLowerCase() + "-element"), t3.$.root.classList.add(e3.nodeName.toLowerCase())), t3.setup(), t3.classList.remove("smart-element-init");
                };
                if (document.adoptedStyleSheets) if (window[n].AdoptedStyleSheets) window[n].AdoptedStyleSheetsLoaded ? (e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets, t2(e3)) : (e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets, window[n].AdoptedStyleSheetsLoadedQueue || (window[n].AdoptedStyleSheetsLoadedQueue = []), window[n].AdoptedStyleSheetsLoadedQueue.push(e3));
                else {
                  const o2 = new CSSStyleSheet();
                  let r3 = y2.Core.getScriptLocation() + "/styles/smart.default.css";
                  o2.replace('@import url("' + r3 + '")').then(() => {
                    if (t2(e3), window[n].AdoptedStyleSheetsLoaded = true, window[n].AdoptedStyleSheetsLoadedQueue) {
                      const e4 = window[n].AdoptedStyleSheetsLoadedQueue;
                      for (let n2 = 0; n2 < e4.length; n2++) {
                        const o3 = e4[n2];
                        t2(o3);
                      }
                      delete window[n].AdoptedStyleSheetsLoadedQueue;
                    }
                  }).catch((e4) => {
                    console.error("Failed to load:", e4);
                  }), window[n].AdoptedStyleSheets = [o2], document.adoptedStyleSheets = [o2], e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets;
                }
              }
              connect() {
                const e3 = this;
                window[n].EnableShadowDOM && !e3.shadowRoot && true !== e3.isInShadowDOM && (e3.attachShadow({ mode: "open" }), e3.shadowRoot && e3.$.root && (e3.shadowRoot.appendChild(e3.$.root), e3.$.root.classList.add(e3.nodeName.toLowerCase()))), e3.shadowRoot || e3.shadowParent ? e3.shadowRoot ? e3._setupShadowRoot() : (e3.shadowParent && window[n].EnableShadowDOM, e3.setup()) : e3.setup();
              }
              connectedCallback() {
                const e3 = this;
                if (e3.isLoading || e3.isUtilityElement) return;
                e3.classList.add("smart-element-init");
                const t2 = function() {
                  e3.classList.remove("smart-element-init");
                };
                if ("complete" === document.readyState && (void 0 === window[n].isAngular && (window[n].isAngular = null !== document.body.querySelector("[ng-version]")), window[n].isAngular)) {
                  for (let t3 = 0; t3 < e3.parents.length && !e3.parents[t3].nodeName.toLowerCase().startsWith(n.toLowerCase() + "-"); t3++) if (e3.parents[t3].hasAttribute("ng-version") && !e3.classList.contains("smart-angular")) {
                    window[n].RenderMode = "manual";
                    break;
                  }
                }
                if ("complete" === document.readyState && "manual" !== window[n].RenderMode) {
                  const n2 = e3.parents;
                  n2.length && "HTML" === n2[n2.length - 1].nodeName || e3.getRootNode().host ? (e3.checkIsInDomTimer && clearInterval(e3.checkIsInDomTimer), t2(), e3.connect()) : (e3.checkIsInDomTimer && clearInterval(e3.checkIsInDomTimer), n2.length > 0 && (e3.checkIsInDomTimer = setInterval(() => {
                    const n3 = e3.parents;
                    0 === n3.length && clearInterval(e3.checkIsInDomTimer), n3.length > 0 && "HTML" === n3[n3.length - 1].nodeName && (clearInterval(e3.checkIsInDomTimer), t2(), e3.connect());
                  }, 100)));
                } else e3.isLoading = true, x.push({ element: this, callback: (function() {
                  this.isReady || (t2(), this.connect());
                }).bind(e3) });
              }
              disconnectedCallback() {
                const e3 = this;
                e3.isAttached ? (e3.shadowParent = null, e3.detached()) : e3._resetShadowParent();
              }
              adoptedCallback() {
                this.setup();
              }
              appendTemplate(e3) {
                const t2 = this;
                t2.shadowRoot ? t2.shadowRoot.appendChild(e3) : t2.appendChild(e3);
              }
              _resetShadowParent() {
                const e3 = this;
                if (!window[n].EnableShadowDOM || null === e3.shadowParent) return;
                const t2 = [];
                let o2 = e3.parentNode;
                for (; o2 && 9 !== o2.nodeType; ) {
                  if (o2 instanceof HTMLElement == 1) t2.push(o2);
                  else if (11 === o2.nodeType && o2.host) {
                    o2 = o2.host;
                    continue;
                  }
                  o2 = o2.parentNode;
                }
                for (let n2 = 0; n2 < t2.length; n2++) if (t2[n2] === e3.shadowParent) return;
                t2.length > 0 && "HTML" === t2[t2.length - 1].nodeName && (e3.shadowParent = null);
              }
            }, Utilities: y2, Import: function(e3, t2) {
              let n2 = 0;
              const o2 = function(e4, t3) {
                return new Promise((n3) => {
                  const o3 = document.createElement("script");
                  o3.src = e4, o3.onload = n3;
                  for (let e5 = 0; e5 < document.head.children.length; e5++) {
                    const o4 = document.head.children[e5];
                    if (o4.src && o4.src.toString().indexOf(t3) >= 0) return void n3();
                  }
                  document.head.appendChild(o3);
                });
              };
              return new Promise((r3) => {
                const i2 = y2.Core.getScriptLocation(), s2 = function(t3) {
                  if (!e3[t3]) return;
                  const a3 = i2 + "/" + e3[t3];
                  o2(a3, e3[t3]).then(function() {
                    n2++, n2 === e3.length && r3(), s2(t3 + 1);
                  });
                };
                if (t2) for (let t3 = 0; t3 < e3.length; t3++) {
                  const s3 = i2 + "/" + e3[t3];
                  o2(s3, e3[t3]).then(function() {
                    n2++, n2 === e3.length && r3();
                  });
                }
                else s2(0);
              });
            }, ObservableArray: P2, Observable: class {
              constructor(e3, t2) {
                const n2 = this;
                var o2;
                return this.name = "observable", e3 && Object.assign(n2, e3), o2 = e3, Object.getOwnPropertyNames(Object.getPrototypeOf(o2)).forEach((e4) => "constructor" === e4 || !!e4.startsWith("_") || void (n2[e4] = o2[e4])), new Proxy(n2, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, get: function(e4, t3) {
                  return e4[t3];
                }, set: function(e4, o3, r3) {
                  const i2 = e4[o3];
                  return i2 === r3 || (e4[o3] = r3, !("notifyFn" !== o3 && !o3.startsWith("_") && "canNotify" !== o3 && (!t2 || -1 !== t2.indexOf(o3)) && n2.canNotify && (n2._notify({ target: e4, propertyName: o3, oldValue: i2, newValue: r3 }), 0)));
                } });
              }
              get canNotify() {
                const e3 = this;
                return void 0 === e3._canNotify && (e3._canNotify = true), e3._canNotify;
              }
              set canNotify(e3) {
                this._canNotify = e3;
              }
              _notify(e3) {
                const t2 = this;
                if (t2.canNotify && t2.notifyFn) for (let n2 = 0; n2 < t2.notifyFn.length; n2++) t2.notifyFn[n2](e3);
              }
              notify(e3) {
                const t2 = this;
                e3 && (t2.notifyFn || (t2.notifyFn = []), t2.notifyFn.push(e3));
              }
            }, Component: class {
              constructor(e3, t2) {
                const n2 = this.name;
                let o2 = null;
                return e3 ? o2 = new window[n2](e3, t2) : (o2 = new window[n2](), o2._initProperties = t2), this._element = o2, o2;
              }
              get name() {
                return "Component";
              }
              get element() {
                return this._element;
              }
            }, Theme: D2.Theme || "", EnableShadowDOM: D2.ShadowDom || false, BaseUrl: "./", StyleBaseUrl: "/styles/default/", Version: e2, Templates: t, RenderMode: D2.RenderMode || "auto", Render: function() {
              const e3 = () => {
                window[n].RenderMode = "", L2();
              };
              "complete" === document.readyState ? e3() : (window.removeEventListener("load", e3), window.addEventListener("load", e3));
            }, Data: u2, Mode: D2.Mode || "production", License: "Evaluation" });
            let O2 = window[n].Theme;
            "manual" !== window[n].RenderMode && document.addEventListener("readystatechange", L2), Object.defineProperty(window[n], "Theme", { configurable: false, enumerable: true, get: () => O2, set(e3) {
              const t2 = O2;
              O2 = e3, w.fireEvent("theme-changed", { oldValue: t2, newValue: e3 }, { bubbles: true, cancelable: true });
            } }), window[n]("smart-base-element", window[n].BaseElement), window[n]("smart-content-element", class extends window[n].BaseElement {
              static get properties() {
                return { content: { type: "any", reflectToAttribute: false }, innerHTML: { type: "string", reflectToAttribute: false } };
              }
              template() {
                return "<div inner-h-t-m-l='[[innerHTML]]'></div>";
              }
              ready() {
                super.ready(), this.applyContent();
              }
              refresh() {
              }
              clearContent() {
                const e3 = this;
                for (; e3.$.content.firstChild; ) e3.$.content.removeChild(e3.$.content.firstChild);
              }
              applyContent() {
                const e3 = this;
                if (void 0 === e3.content) return void (e3.content = e3.$.content);
                if ("" === e3.content || null === e3.content) return void e3.clearContent();
                if (e3.content instanceof HTMLElement) return e3.clearContent(), void e3.$.content.appendChild(e3.content);
                const t2 = document.createDocumentFragment();
                let n2 = document.createElement("div");
                t2.appendChild(n2), e3.content instanceof HTMLElement ? n2.appendChild(e3.content) : n2.innerHTML = e3.content;
                let o2 = Array.from(n2.childNodes);
                n2.parentNode.removeChild(n2);
                for (let e4 = 0; e4 < o2.length; e4++) t2.appendChild(o2[e4]);
                e3.clearContent(), e3.$.content.appendChild(t2);
              }
              propertyChangedHandler(e3, t2, n2) {
                super.propertyChangedHandler(e3, t2, n2);
                const o2 = this;
                t2 !== n2 && ("innerHTML" === e3 && (o2.content = n2, o2.applyContent(), o2.innerHTML = o2.content = y2.Core.html(o2.$.content)), "content" === e3 && o2.applyContent());
              }
            }), window[n]("smart-scroll-viewer", class extends window[n].ContentElement {
              static get properties() {
                return { horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, touchScrollRatio: { type: "any", value: null }, touchVelocityCoefficient: { type: "number", value: 50 }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] } };
              }
              static get listeners() {
                return { touchmove: "_touchmoveHandler", touchstart: "_touchstartHandler", wheel: "_mouseWheelHandler", "document.up": "_upHandler" };
              }
              static get styleUrls() {
                return ["smart.scrollviewer.css"];
              }
              template() {
                return `<div id="container" class="smart-container" role="presentation">
                        <div id="scrollViewerContainer" class="smart-scroll-viewer-container" role="presentation">
                            <div id="scrollViewerContentContainer" inner-h-t-m-l='[[innerHTML]]' class="smart-scroll-viewer-content-container" role="presentation">
                                <content></content>
                            </div>
                        </div>
                        <smart-scroll-bar id="verticalScrollBar" theme="[[theme]]"  animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" orientation="vertical"></smart-scroll-bar>
                        <smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]"></smart-scroll-bar>
                    </div>`;
              }
              appendChild(e3) {
                const t2 = this;
                if (e3) {
                  if (!t2.isCompleted || e3.classList && e3.classList.contains("smart-resize-trigger-container")) {
                    const e4 = Array.prototype.slice.call(arguments, 2);
                    return HTMLElement.prototype.appendChild.apply(t2, e4.concat(Array.prototype.slice.call(arguments)));
                  }
                  t2.$.scrollViewerContentContainer.appendChild(e3);
                }
              }
              removeChild(e3) {
                const t2 = this;
                if (e3) {
                  if (!t2.isCompleted || e3.classList && e3.classList.contains("smart-resize-trigger-container")) {
                    const e4 = Array.prototype.slice.call(arguments, 2);
                    return HTMLElement.prototype.removeChild.apply(t2, e4.concat(Array.prototype.slice.call(arguments)));
                  }
                  t2.$.scrollViewerContentContainer.removeChild(e3);
                }
              }
              removeAll() {
                const e3 = this;
                e3.isCompleted && (e3.$.scrollViewerContentContainer.innerHTML = "");
              }
              _horizontalScrollbarHandler(e3) {
                const t2 = this;
                t2.$.scrollViewerContentContainer.style.left = (t2.rightToLeft ? 1 : -1) * t2.scrollLeft + "px", e3.stopPropagation && e3.stopPropagation(), t2.onHorizontalChange && t2.onHorizontalChange(e3);
              }
              _verticalScrollbarHandler(e3) {
                const t2 = this;
                t2.$.scrollViewerContentContainer.style.top = -t2.scrollTop + "px", e3.stopPropagation && e3.stopPropagation(), t2.onVerticalChange && t2.onVerticalChange(e3);
              }
              _touchmoveHandler(e3) {
                const t2 = this;
                if (t2._touchmoveInside && e3.cancelable) return e3.preventDefault(), void e3.stopPropagation();
                const n2 = t2.scrollHeight > 0, o2 = t2.scrollWidth > 0, r3 = t2._touchCoords;
                if (!n2 && !o2 || !r3) return;
                const i2 = e3.touches[0];
                let s2, a3, l2, d3;
                t2._touchCoords = [i2.pageX, i2.pageY], n2 ? (s2 = t2.scrollTop, a3 = t2.scrollHeight, l2 = i2.pageY, d3 = r3[1]) : (s2 = t2.scrollLeft, a3 = t2.scrollWidth, l2 = i2.pageX, d3 = r3[0]);
                const c2 = parseFloat(l2.toFixed(5)), u3 = parseFloat(d3.toFixed(5));
                0 === s2 && c2 >= u3 || s2 === a3 && c2 <= u3 || (l2 !== d3 && (t2._touchmoveInside = true), e3.cancelable && (e3.preventDefault(), e3.stopPropagation()));
              }
              _touchstartHandler(e3) {
                const t2 = e3.touches[0];
                this._touchCoords = [t2.pageX, t2.pageY];
              }
              _mouseWheelHandler(e3) {
                const t2 = this;
                if (!t2.disabled && (t2.computedHorizontalScrollBarVisibility || t2.computedVerticalScrollBarVisibility)) {
                  if (e3.shiftKey && t2.computedHorizontalScrollBarVisibility) {
                    const n2 = t2.scrollLeft;
                    if (0 === n2 && e3.deltaX < 0 || n2 === t2.scrollHeight && e3.deltaX > 0) return;
                    return e3.stopPropagation(), e3.preventDefault(), void (t2.scrollWidth > 0 && t2.scrollTo(void 0, t2.scrollLeft + t2._getScrollCoefficient(e3, t2.offsetWidth)));
                  }
                  if (t2.computedVerticalScrollBarVisibility) {
                    const n2 = t2.scrollTop;
                    if (0 === n2 && e3.deltaY < 0 || n2 === t2.scrollHeight && e3.deltaY > 0) return;
                    e3.stopPropagation(), e3.preventDefault(), t2.scrollHeight > 0 && t2.scrollTo(t2.scrollTop + t2._getScrollCoefficient(e3, t2.offsetHeight));
                  }
                }
              }
              _overriddenHandler() {
              }
              _upHandler() {
                delete this._touchCoords, delete this._touchmoveInside;
              }
              _getScrollCoefficient(e3, t2) {
                const n2 = e3.deltaMode, o2 = Math.abs(e3.deltaY);
                let r3;
                return 0 === n2 ? r3 = o2 < 100 / 3 ? o2 : t2 : 1 === n2 ? r3 = o2 < 1 ? o2 * (100 / 3) : t2 : 2 === n2 && (r3 = t2), e3.deltaY < 0 ? -r3 : r3;
              }
              applyContent() {
                super.applyContent(), this.refresh();
              }
              get computedHorizontalScrollBarVisibility() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? !e3._scrollView.hScrollBar.$.hasClass("smart-hidden") : null;
              }
              get computedVerticalScrollBarVisibility() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? !e3._scrollView.vScrollBar.$.hasClass("smart-hidden") : null;
              }
              scrollTo(e3, t2) {
                const n2 = this;
                n2._scrollView && (void 0 !== e3 && n2._scrollView.scrollTo(e3), void 0 !== t2 && n2._scrollView.scrollTo(t2, false));
              }
              refreshScrollBarsVisibility() {
                const e3 = this;
                e3._scrollView && (e3._scrollView.hScrollBar.disabled = e3.disabled, e3._scrollView.vScrollBar.disabled = e3.disabled, "disabled" === e3.horizontalScrollBarVisibility && (e3._scrollView.hScrollBar.disabled = true), "disabled" === e3.verticalScrollBarVisibility && (e3._scrollView.vScrollBar.disabled = true), e3.scrollWidth > 0 ? e3._scrollView.hScrollBar.$.removeClass("smart-hidden") : "visible" !== e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.addClass("smart-hidden"), e3.scrollHeight > 0 ? e3._scrollView.vScrollBar.$.removeClass("smart-hidden") : "visible" !== e3.verticalScrollBarVisibility && e3._scrollView.vScrollBar.$.addClass("smart-hidden"), "hidden" === e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.addClass("smart-hidden"), "hidden" === e3.verticalScrollBarVisibility && e3._scrollView.vScrollBar.$.addClass("smart-hidden"), "visible" === e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.removeClass("smart-hidden"), "visible" === e3.verticalScrollBarVisibility && (e3._scrollView.vScrollBar.$.removeClass("smart-hidden"), e3.disabled || (e3._scrollView.vScrollBar.disabled = e3.scrollHeight <= 0)), e3.computedHorizontalScrollBarVisibility && e3.computedVerticalScrollBarVisibility ? (e3._scrollView.hScrollBar.$.addClass("bottom-corner"), e3._scrollView.vScrollBar.$.addClass("bottom-corner")) : (e3._scrollView.hScrollBar.$.removeClass("bottom-corner"), e3._scrollView.vScrollBar.$.removeClass("bottom-corner")));
              }
              ready() {
                super.ready();
                const e3 = this;
                e3.$.verticalScrollBar.onChange = (t2) => {
                  t2.detail = t2, e3._verticalScrollbarHandler(t2);
                }, e3.$.horizontalScrollBar.onChange = (t2) => {
                  t2.detail = t2, e3._horizontalScrollbarHandler(t2);
                }, e3.$.verticalScrollBar.setAttribute("aria-controls", e3.id), e3.$.horizontalScrollBar.setAttribute("aria-controls", e3.id), e3._customScrollView || (e3._scrollView = new Smart.Utilities.Scroll(e3, e3.$.horizontalScrollBar, e3.$.verticalScrollBar)), e3.refresh();
              }
              refresh() {
                const e3 = this;
                function t2() {
                  const t3 = e3.$.scrollViewerContainer.classList.contains("vscroll");
                  e3.$.scrollViewerContainer.classList.remove("vscroll");
                  const n3 = e3.$.scrollViewerContentContainer.offsetWidth - e3.$.scrollViewerContainer.offsetWidth;
                  return n3 > 0 && "hidden" !== e3.horizontalScrollBarVisibility || "visible" === e3.horizontalScrollBarVisibility ? e3.$.scrollViewerContainer.classList.add("hscroll") : e3.$.scrollViewerContainer.classList.remove("hscroll"), t3 && e3.$.scrollViewerContainer.classList.add("vscroll"), n3;
                }
                function n2() {
                  let t3;
                  const n3 = e3.$.scrollViewerContainer.classList.contains("hscroll");
                  if (e3.$.scrollViewerContainer.classList.remove("hscroll"), Smart.Utilities.Core.Browser.Safari) {
                    const n4 = e3.$.scrollViewerContentContainer.getBoundingClientRect().height, o3 = e3.$.scrollViewerContainer.getBoundingClientRect().height;
                    t3 = n4 && o3 ? parseInt(n4) - parseInt(o3) : e3.$.scrollViewerContentContainer.offsetHeight - e3.$.scrollViewerContainer.offsetHeight;
                  } else t3 = e3.$.scrollViewerContentContainer.offsetHeight - e3.$.scrollViewerContainer.offsetHeight;
                  return t3 > 0 && "hidden" !== e3.verticalScrollBarVisibility || "visible" === e3.verticalScrollBarVisibility ? e3.$.scrollViewerContainer.classList.add("vscroll") : e3.$.scrollViewerContainer.classList.remove("vscroll"), n3 && e3.$.scrollViewerContainer.classList.add("hscroll"), t3;
                }
                if (!e3.$.scrollViewerContentContainer) return;
                let o2 = e3.scrollWidth, r3 = e3.scrollHeight;
                e3.scrollWidth = t2(), e3.scrollHeight = n2(), e3.scrollHeight && r3 === e3.scrollHeight || (e3.scrollWidth = t2()), e3.scrollWidth && o2 === e3.scrollWidth || (e3.scrollHeight = n2()), e3.computedVerticalScrollBarVisibility && (e3.scrollHeight += e3._scrollView.hScrollBar.offsetHeight), e3.computedHorizontalScrollBarVisibility && (e3.scrollWidth += e3._scrollView.vScrollBar.offsetWidth), 0 === e3.scrollHeight && e3.scrollWidth > 0 && e3.$.container.offsetHeight - e3.$.content.offsetHeight < 5 && (e3.$.container.style.paddingBottom = e3._scrollView.hScrollBar.offsetHeight + "px");
              }
              attached() {
                const e3 = this;
                super.attached(), e3._scrollView || e3._customScrollView || (e3._scrollView = new Smart.Utilities.Scroll(e3, e3.$.horizontalScrollBar, e3.$.verticalScrollBar));
              }
              detached() {
                const e3 = this;
                super.detached(), e3._scrollView && (e3._scrollView.unlisten(), delete e3._scrollView);
              }
              get scrollWidth() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? 1 === e3._scrollView.hScrollBar.max && "visible" === e3.horizontalScrollBarVisibility ? 0 : e3._scrollView.hScrollBar.max : -1;
              }
              set scrollWidth(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.hScrollBar && (0 === e3 && "visible" === t2.horizontalScrollBarVisibility ? t2._scrollView.hScrollBar.max = 0 : t2._scrollView.hScrollBar.max = e3, t2.refreshScrollBarsVisibility());
              }
              get scrollHeight() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? 1 === e3._scrollView.vScrollBar.max && "visible" === e3.verticalScrollBarVisibility ? 0 : e3._scrollView.vScrollBar.max : 0;
              }
              set scrollHeight(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.vScrollBar && (0 === e3 && "visible" === t2.verticalScrollBarVisibility ? t2._scrollView.vScrollBar.max = 1 : t2._scrollView.vScrollBar.max = e3, t2.refreshScrollBarsVisibility());
              }
              get scrollLeft() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? e3._scrollView.hScrollBar.value : 0;
              }
              set scrollLeft(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.hScrollBar && (t2._scrollView.hScrollBar.value = e3);
              }
              get scrollTop() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? e3._scrollView.vScrollBar.value : 0;
              }
              set scrollTop(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.vScrollBar && (t2._scrollView.vScrollBar.value = e3);
              }
              propertyChangedHandler(e3, t2, n2) {
                const o2 = this;
                super.propertyChangedHandler(e3, t2, n2), "animation" !== e3 && "theme" !== e3 && o2.refresh();
              }
            }), window[n].Utilities.Assign("PositionDetection", class {
              constructor(e3, t2, n2, o2) {
                const r3 = this;
                if (t2) {
                  const n3 = "dropDown" + Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                  t2.id = n3, e3.setAttribute("aria-owns", n3);
                }
                r3.context = e3, r3.dropDown = t2, r3.defaultParent = n2, r3.closeMethod = o2;
              }
              handleAutoPositioning() {
                const e3 = this, t2 = e3.context;
                if ("auto" !== t2.dropDownPosition || t2.disabled || t2.isHidden) return;
                const n2 = window.requestAnimationFrame;
                let o2, r3 = Date.now();
                return o2 = n2(function i2() {
                  t2.isHidden || document.hidden || (o2 = n2(i2), "auto" === t2.dropDownPosition && !t2.disabled && (t2.isInShadowDOM ? document.body.contains(t2.shadowParent) : document.body.contains(t2)) || cancelAnimationFrame(o2), t2.isHidden && cancelAnimationFrame(o2), Date.now() - r3 >= 200 && (e3.scrollHandler(), r3 = Date.now()));
                });
              }
              checkBrowserBounds(e3) {
                const t2 = this.context;
                if ("auto" === t2.dropDownPosition && !t2.disabled) switch (e3) {
                  case "vertically":
                    this.checkBrowserBoundsVertically();
                    break;
                  case "horizontally":
                    this.checkBrowserBoundsHorizontally();
                    break;
                  default:
                    this.checkBrowserBoundsVertically(), this.checkBrowserBoundsHorizontally();
                }
              }
              checkBrowserBoundsHorizontally() {
                const e3 = this.context, t2 = this.dropDown;
                let n2, o2 = 0;
                a2.isMobile || window.innerWidth === document.documentElement.clientWidth || (o2 = window.innerWidth - document.documentElement.clientWidth), null !== e3._dropDownParent ? n2 = true : t2.style.left = "";
                const r3 = window.innerWidth - o2;
                let i2 = e3.getBoundingClientRect().left;
                if (i2 < 0 && (t2.style.left = (n2 ? 0 : Math.abs(i2)) + "px", i2 = parseFloat(t2.style.left)), i2 + t2.offsetWidth > r3) {
                  let e4 = i2 - Math.abs(r3 - i2 - t2.offsetWidth);
                  n2 && (e4 += window.pageXOffset), t2.style.left = (n2 ? e4 : e4 - i2) + "px", window.innerWidth === document.documentElement.clientWidth && (t2.style.left = parseFloat(t2.style.left) + o2 + "px"), n2 && window.innerHeight === document.documentElement.clientHeight && this.positionDropDown(true);
                }
              }
              checkBrowserBoundsVertically(e3) {
                const t2 = this.context, n2 = this.dropDown, o2 = t2._dropDownListPosition;
                e3 || (e3 = t2.getBoundingClientRect()), 0 !== e3.height && (document.documentElement.clientHeight - Math.abs(e3.top + e3.height + n2.offsetHeight) >= 0 ? t2._dropDownListPosition = "bottom" : e3.top - n2.offsetHeight >= 0 ? t2._dropDownListPosition = "top" : t2._dropDownListPosition = "overlay-center", this.updatePositionAttribute(o2, t2._dropDownListPosition));
              }
              scrollHandler() {
                const e3 = this.context;
                if (!e3.parentElement) return;
                const t2 = e3.getBoundingClientRect();
                if (t2.top === e3._positionTop) return;
                const n2 = e3._dropDownListPosition;
                this.checkBrowserBoundsVertically(t2), e3._dropDownListPosition !== n2 && this.positionDropDown(), e3._positionTop = t2.top;
              }
              getDropDownParent(e3) {
                const t2 = this.context, n2 = this.dropDown;
                let o2 = t2.dropDownAppendTo;
                t2._positionedParent = null, null === o2 ? t2._dropDownParent = null : "body" === o2 || o2 === document.body ? t2.getRootNode().host ? t2._dropDownParent = t2.getRootNode().host.shadowRoot : t2._dropDownParent = document.body : o2 instanceof HTMLElement ? t2._dropDownParent = o2 : "string" == typeof o2 ? (o2 = document.getElementById(o2), o2 instanceof HTMLElement ? t2._dropDownParent = o2 : (t2.dropDownAppendTo = null, t2._dropDownParent = null)) : (t2.dropDownAppendTo = null, t2._dropDownParent = null);
                let r3 = t2._dropDownParent;
                if (null !== r3) {
                  for (; r3 && r3 instanceof HTMLElement && "static" === window.getComputedStyle(r3).position && r3 !== t2.getShadowRootOrBody(); ) r3 = r3.parentElement;
                  r3 === document.body ? t2._positionedParent = null : t2._positionedParent = r3, n2 && (n2.setAttribute("animation", t2.animation), "" !== t2.theme && n2.$.addClass(t2.theme), e3 && (t2._dropDownParent.appendChild(n2), n2.$.addClass("smart-drop-down-repositioned")), -1 === t2.detachedChildren.indexOf(n2) && t2.detachedChildren.push(n2));
                }
              }
              dropDownAppendToChangedHandler() {
                const e3 = this.context, t2 = this.dropDown, n2 = e3._dropDownParent;
                this.getDropDownParent(), e3._dropDownParent !== n2 && (e3[this.closeMethod](), ["left", "top", "font-size", "font-family", "font-style", "font-weight"].forEach((e4) => t2.style[e4] = null), null === e3._dropDownParent ? (this.defaultParent.appendChild(t2), t2.$.removeClass("smart-drop-down-repositioned")) : (e3._dropDownParent.appendChild(t2), t2.$.addClass("smart-drop-down-repositioned")));
              }
              dropDownPositionChangedHandler() {
                const e3 = this;
                e3.dropDown.style.transition = "none", e3.context[e3.closeMethod](), e3.setDropDownPosition(), e3.handleAutoPositioning();
              }
              dropDownAttached(e3) {
                const t2 = this.context;
                null !== t2._dropDownParent && (t2._dropDownParent.appendChild(this.dropDown), this.handleAutoPositioning(), e3 && t2[e3]());
              }
              dropDownDetached() {
                const e3 = this.context;
                null !== e3._dropDownParent && document.body.contains(this.dropDown) && document.body.contains(e3._dropDownParent) && e3._dropDownParent.removeChild(this.dropDown);
              }
              setDropDownPosition() {
                const e3 = this.context, t2 = e3.dropDownPosition, n2 = e3._dropDownListPosition;
                "auto" === t2 ? this.checkBrowserBounds() : e3._dropDownListPosition = t2, this.updatePositionAttribute(n2, e3._dropDownListPosition);
              }
              updatePositionAttribute(e3, t2) {
                const n2 = this.context, o2 = this.dropDown;
                n2.$.dropDownButton && !n2.$.dropDownButton.hasAttribute(t2) && (n2.$.dropDownButton.removeAttribute(e3), n2.$.dropDownButton.setAttribute(t2, "")), o2.hasAttribute(t2) || (o2.style.transition = "none", o2.removeAttribute(e3), o2.setAttribute(t2, ""), requestAnimationFrame(function() {
                  o2.style.transition = null;
                }));
              }
              positionDropDown(e3) {
                const t2 = this.context, n2 = this.dropDown;
                if (!t2.opened || null === t2._dropDownParent) return;
                const o2 = t2.getBoundingClientRect();
                let r3, i2;
                if (this.customPositionDropDown) {
                  const e4 = this.customPositionDropDown(o2);
                  r3 = e4.left, i2 = e4.top;
                } else switch (r3 = o2.left, i2 = o2.top, t2._dropDownListPosition) {
                  case "bottom":
                    i2 += t2.$.container.offsetHeight - 1;
                    break;
                  case "center-bottom":
                    i2 += t2.$.container.offsetHeight - 1, r3 += t2.offsetWidth - n2.offsetWidth / 2;
                    break;
                  case "center-top":
                    i2 -= n2.offsetHeight - 1, r3 += t2.offsetWidth - n2.offsetWidth / 2;
                    break;
                  case "top":
                    i2 -= n2.offsetHeight - 1;
                    break;
                  case "overlay-bottom":
                    break;
                  case "overlay-center":
                    i2 -= n2.offsetHeight / 2 - t2.offsetHeight / 2;
                    break;
                  case "overlay-top":
                    i2 -= n2.offsetHeight - t2.offsetHeight;
                }
                const s2 = this.getDropDownOffset();
                n2.style.top = i2 + s2.y + "px", e3 || (n2.style.left = r3 + s2.x + "px");
              }
              getDropDownOffset() {
                const e3 = this.context._positionedParent;
                let t2, n2;
                if (e3 && "#document-fragment" !== e3.nodeName) {
                  const o2 = e3.getBoundingClientRect();
                  t2 = -o2.left, n2 = -o2.top;
                } else t2 = window.pageXOffset, n2 = window.pageYOffset;
                return { x: t2, y: n2 };
              }
              placeOverlay() {
                const e3 = this.context;
                if (!e3.dropDownOverlay || e3._overlay) return;
                const t2 = document.createElement("div");
                t2.classList.add("smart-drop-down-overlay"), t2.style.width = document.documentElement.scrollWidth + "px", t2.style.height = document.documentElement.scrollHeight + "px", document.body.appendChild(t2), e3._overlay = t2;
              }
              removeOverlay(e3) {
                const t2 = this, n2 = t2.context;
                n2._overlay && (n2.hasAnimation && e3 ? requestAnimationFrame(function e4() {
                  t2.dropDown.getBoundingClientRect().height > 0 ? requestAnimationFrame(e4) : (document.body.removeChild(n2._overlay), delete n2._overlay);
                }) : (document.body.removeChild(n2._overlay), delete n2._overlay));
              }
            }), window.Smart.Color = class {
              constructor(e3) {
                this.r = this.g = this.b = 0, this.hex = "";
                const t2 = this.getStandardizedColor(e3);
                t2 && this.setHex(t2.substring(1));
              }
              getStandardizedColor(e3) {
                const t2 = document.createElement("canvas").getContext("2d");
                return t2.fillStyle = e3, t2.fillStyle;
              }
              getInvertedColor() {
                return "" === this.hex ? "transparent" : 255 - (0.299 * this.r + 0.587 * this.g + 0.114 * this.b) < 105 ? "Black" : "White";
              }
              hexToRgb(e3) {
                let t2 = "00", n2 = "00", o2 = "00";
                return 6 === (e3 = this.validateHex(e3)).length ? (t2 = e3.substring(0, 2), n2 = e3.substring(2, 4), o2 = e3.substring(4, 6)) : (e3.length > 4 && (t2 = e3.substring(4, e3.length), e3 = e3.substring(0, 4)), e3.length > 2 && (n2 = e3.substring(2, e3.length), e3 = e3.substring(0, 2)), e3.length > 0 && (o2 = e3.substring(0, e3.length))), { r: this.hexToInt(t2), g: this.hexToInt(n2), b: this.hexToInt(o2) };
              }
              validateHex(e3) {
                return (e3 = (e3 = new String(e3).toUpperCase()).replace(/[^A-F0-9]/g, "0")).length > 6 && (e3 = e3.substring(0, 6)), e3;
              }
              webSafeDec(e3) {
                return e3 = Math.round(e3 / 51), e3 *= 51;
              }
              hexToWebSafe(e3) {
                let t2, n2, o2;
                return 3 === e3.length ? (t2 = e3.substring(0, 1), n2 = e3.substring(1, 1), o2 = e3.substring(2, 1)) : (t2 = e3.substring(0, 2), n2 = e3.substring(2, 4), o2 = e3.substring(4, 6)), this.intToHex(this.webSafeDec(this.hexToInt(t2))) + this.intToHex(this.webSafeDec(this.hexToInt(n2))) + this.intToHex(this.webSafeDec(this.hexToInt(o2)));
              }
              rgbToWebSafe(e3) {
                return { r: this.webSafeDec(e3.r), g: this.webSafeDec(e3.g), b: this.webSafeDec(e3.b) };
              }
              rgbToHex(e3) {
                return this.intToHex(e3.r) + this.intToHex(e3.g) + this.intToHex(e3.b);
              }
              intToHex(e3) {
                let t2 = parseInt(e3).toString(16);
                return 1 === t2.length && (t2 = "0" + t2), t2.toUpperCase();
              }
              hexToInt(e3) {
                return parseInt(e3, 16);
              }
              setRgb(e3, t2, n2) {
                let o2 = function(e4) {
                  return e4 < 0 || e4 > 255 || isNaN(parseInt(e4)) ? 0 : e4;
                };
                this.r = o2(e3), this.g = o2(t2), this.b = o2(n2), this.hex = this.rgbToHex(this);
              }
              setHex(e3) {
                this.hex = e3;
                let t2 = this.hexToRgb(this.hex);
                this.r = t2.r, this.g = t2.g, this.b = t2.b;
              }
            };
          }();
        }
      ),
      /***/
      5707: (
        /***/
        () => {
          Smart("smart-list-item", class extends Smart.ContentElement {
            static get properties() {
              return { alternationIndex: { value: -1, type: "int" }, color: { value: "", type: "string" }, displayMode: { allowedValues: ["plain", "checkBox", "radioButton"], value: "plain", type: "string" }, grouped: { value: false, type: "boolean" }, selected: { value: false, type: "boolean" }, value: { value: "", type: "string" }, label: { value: "", type: "string" }, details: { value: "", type: "string" }, group: { value: "", type: "string" }, hidden: { value: false, type: "boolean" }, readonly: { value: false, type: "boolean" } };
            }
            get hasStyleObserver() {
              return false;
            }
            get enableShadowDOM() {
              return false;
            }
            get _focused() {
              const e2 = this;
              return void 0 === e2.__focused && (e2.__focused = false), e2.__focused;
            }
            set _focused(e2) {
              const t = this;
              t.__focused = e2, e2 ? (t.setAttribute("focus", ""), t.ownerListBox && t.ownerListBox.ownerElement && Smart.ComboBox && t.ownerListBox.ownerElement instanceof Smart.ComboBox && t.ownerListBox.ownerElement.$.input.setAttribute("aria-activedescendant", t.id)) : t.removeAttribute("focus");
            }
            template() {
              return `<div id="container">
                   <span id='itemInput' class='smart-input smart-hidden'></span>
                    <span class="smart-overlay" id="overlay"></span>
                    <div id="itemContainer" class="smart-content smart-list-item-container"><span class="smart-content-label" inner-h-t-m-l='[[innerHTML]]' role="presentation"><content></content></span><span inner-h-t-m-l='[[details]]' id="details" class="smart-content-details"></span></div>
                </div>`;
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted || e2.classList && e2.classList.contains("smart-ripple")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              window.smartBlazor ? t.$.itemContainer.appendChild(e2) : (t.$.itemContainer.innerHTML = "", e2 instanceof HTMLElement && t.$.itemContainer.appendChild(e2));
            }
            insertBefore(e2, t) {
              const i = this;
              if (!i.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(i, e3.concat(Array.prototype.slice.call(arguments)));
              }
              t.parentNode.insertBefore(e2, t);
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted || e2.classList.contains("smart-ripple")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof HTMLElement && t.$.itemContainer.removeChild(e2);
            }
            attached() {
              super.attached(), this.ownerListBox = this.getListBox();
            }
            static get listeners() {
              return { mouseenter: "_itemOnMouseEnter", mouseleave: "_itemOnMouseLeave" };
            }
            ready() {
              super.ready();
              const e2 = this;
              e2.setAttribute("role", "option"), "" !== e2.label ? e2.innerHTML = e2.label : "" !== e2.innerHTML && (e2.label = e2.innerHTML), e2._setDisplayMode(e2.displayMode), e2._setItemColor(), e2.$.container.noRipple = true;
              const t = e2.closest("smart-list-box");
              if (t && t.isRendered) {
                if (cancelAnimationFrame(Smart.ListBox.processTimer), t._inLazyInit || t._isUpdating) return;
                Smart.ListBox.processTimer = requestAnimationFrame(() => {
                  t._lazyInitItems();
                });
              }
            }
            propertyChangedHandler(e2, t, i) {
              const r2 = this;
              if (super.propertyChangedHandler(e2, t, i), "hidden" === e2) i ? r2.$.addClass("smart-hidden") : r2.$.removeClass("smart-hidden");
              else if ("color" === e2) r2._setItemColor();
              else if ("displayMode" === e2) r2._setDisplayMode(i);
              else if ("label" === e2 || "value" === e2) {
                const t2 = r2.context;
                r2.context = document, "label" === e2 && (r2.innerHTML = i);
                const o = r2.getListBox();
                o._applyTemplate(r2), o.onItemUpdated(r2), r2.context = t2;
              } else if ("details" === e2) {
                const e3 = r2.context;
                r2.context = document, r2.$.details.innerHTML = i, r2.getListBox().onItemUpdated(r2), r2.context = e3;
              } else if ("innerHTML" === e2) r2.getListBox().onItemUpdated(r2);
              else if ("selected" === e2) if (i) r2.setAttribute("aria-selected", true);
              else {
                const e3 = r2.getListBox();
                r2.readonly || r2.disabled || !e3 || -1 === ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox"].indexOf(e3.selectionMode) ? r2.removeAttribute("aria-selected") : r2.setAttribute("aria-selected", false);
              }
            }
            getListBox() {
              const e2 = this;
              if (!Smart.ListBox) return e2.getRootNode().host;
              let t = e2.parentNode;
              for (; t instanceof Smart.ListBox == 0 && null !== t; ) t = t.parentNode;
              return !t && Smart.EnableShadowDOM ? e2.getRootNode().host : t;
            }
            _itemOnMouseEnter() {
              const e2 = this;
              !e2.disabled && e2.ownerListBox && (Smart.ListBox.DragDrop.Dragging && e2.ownerListBox.allowDrop && (Smart.ListBox.DragDrop.DropDetails = { item: e2, position: "bottom" }), e2.ownerListBox.$.verticalScrollBar.thumbCapture || e2.ownerListBox.$.horizontalScrollBar.thumbCapture || e2.setAttribute("hover", ""));
            }
            _itemOnMouseMove(e2) {
              const t = this;
              if (t.ownerListBox && Smart.ListBox.DragDrop.Dragging && t.ownerListBox.allowDrop && !Smart.Utilities.Core.isMobile) {
                const i = [].slice.call(t.ownerListBox.getElementsByClassName("smart-list-item-bottom-line-feedback"));
                for (let e3 = 0; e3 < i.length; e3++) i[e3].$.removeClass("smart-list-item-line-feedback"), i[e3].$.removeClass("smart-list-item-bottom-line-feedback");
                if (Smart.ListBox.DragDrop.DropDetails = { item: t, position: "top" }, !t.ownerListBox._areCSSVarsSupported) {
                  if (t.ownerListBox._indexOf(t) === t.ownerListBox._items.length - 1 || t.parentNode.lastElementChild === t) {
                    const i2 = t.getBoundingClientRect();
                    e2.pageY - window.pageYOffset > i2.top + i2.height / 2 - 1 && (Smart.ListBox.DragDrop.DropDetails = { item: t, position: "bottom" });
                  }
                  return;
                }
                if (t.$.removeClass("smart-list-item-line-feedback"), t.$.removeClass("smart-list-item-bottom-line-feedback"), t.ownerListBox.sorted && t.ownerListBox.autoSort) return;
                const r2 = t.ownerListBox._items.filter((e3) => !e3.hidden);
                if (r2.indexOf(t) === r2.length - 1 || t.parentNode.lastElementChild === t) {
                  const i2 = t.getBoundingClientRect();
                  e2.pageY - window.pageYOffset > i2.top + i2.height / 2 - 1 ? (t.$.addClass("smart-list-item-bottom-line-feedback"), Smart.ListBox.DragDrop.DropDetails = { item: t, position: "bottom" }) : arguments[1] || t.$.addClass("smart-list-item-line-feedback");
                } else arguments[1] || t.$.addClass("smart-list-item-line-feedback");
              }
            }
            _itemOnMouseLeave() {
              const e2 = this;
              e2.ownerListBox && (Smart.ListBox.DragDrop.Dragging && (e2.$.removeClass("smart-list-item-line-feedback"), e2.$.removeClass("smart-list-item-bottom-line-feedback")), e2.removeAttribute("hover"));
            }
            _setDisplayMode(e2) {
              const t = this, i = t.getListBox();
              if (i) {
                const r2 = "checkBox" === i.selectionMode || "radioButton" === i.selectionMode ? i.selectionMode : "plain";
                t.displayMode = e2 = r2;
              }
              "plain" !== e2 ? t.$itemInput.removeClass("smart-hidden") : t.$itemInput.addClass("smart-hidden");
            }
            _setItemColor() {
              const e2 = this, t = e2.querySelector(".smart-content-label"), i = /(^#[0-9A-F]{3}$)|(^#[0-9A-F]{6}$)|(^#[0-9A-F]{8}$)/i.test(e2.color) ? e2.color : "";
              t.style.backgroundColor = i, t.style.color = e2._getContrastColor(i);
            }
            _getContrastColor(e2) {
              if (!e2) return "";
              let t = (i = e2.slice(1, 3), r2 = e2.slice(3, 5), o = e2.slice(5, 7), [parseInt(i, 16), parseInt(r2, 16), parseInt(o, 16)]);
              var i, r2, o;
              return parseFloat(((0.299 * t[0] + 0.61 * t[1] + 0.114 * t[2]) / 255).toFixed(2)) > 0.65 ? "#000000" : "#FFFFFF";
            }
          }), Smart("smart-list-items-group", class extends Smart.ContentElement {
            static get properties() {
              return { label: { value: "", type: "string" } };
            }
            get enableShadowDOM() {
              return false;
            }
            template() {
              return `<div id="container" role="presentation">
                 <span id="itemsLabel" class="smart-list-items-group-label">[[label]]</span>
                 <div id="listItemsGroupContainer" inner-h-t-m-l='[[innerHTML]]' class="smart-list-items-group-container" role="presentation">
                    <content></content>
                 </div>
               </div>`;
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof HTMLElement && t.$.listItemsGroupContainer.appendChild(e2);
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof HTMLElement && t.$.listItemsGroupContainer.removeChild(e2);
            }
            getListBox() {
              let e2 = this.parentNode;
              for (; e2 instanceof Smart.ListBox == 0 && null !== e2; ) e2 = e2.parentNode;
              return e2;
            }
            attached() {
              const e2 = this;
              super.attached(), e2.ownerListBox || (e2.ownerListBox = e2.getListBox()), e2.setAttribute("role", "group"), e2.$.itemsLabel.id || (e2.$.itemsLabel.id = e2.id + "Label"), e2.setAttribute("aria-labelledby", e2.$.itemsLabel.id);
            }
          }), Smart("smart-list-box", class extends Smart.ScrollViewer {
            static get properties() {
              return { allowDrag: { value: false, type: "boolean" }, allowDrop: { value: false, type: "boolean" }, alternationStart: { value: 0, type: "int" }, alternationEnd: { value: 0, type: "int" }, alternationCount: { value: 0, type: "int" }, autoSort: { value: true, type: "boolean" }, dataSource: { value: null, type: "any?", reflectToAttribute: false }, dragFeedbackFormatFunction: { value: null, type: "function?" }, dragOffset: { value: [10, 10], type: "array" }, displayLoadingIndicator: { value: false, type: "boolean" }, displayMember: { value: "", type: "string" }, shadowDomMode: { allowedValues: ["light", "shadow"], value: "shadow", type: "string" }, dropAction: { value: "move", type: "string", allowedValues: ["copy", "move", "none"] }, editable: { value: false, type: "boolean" }, filterable: { value: false, type: "boolean" }, filterCallback: { value: null, type: "function?" }, filterMode: { value: "containsIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase", "custom"], type: "string" }, filterInputPlaceholder: { value: "", type: "string" }, grouped: { value: false, type: "boolean" }, groupMember: { value: "", type: "string" }, itemTemplate: { value: null, type: "any" }, itemHeight: { value: null, type: "number?" }, incrementalSearchDelay: { value: 700, type: "number?" }, incrementalSearchMode: { value: "startsWithIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase"], type: "string" }, itemMeasureMode: { value: "auto", allowedValues: ["auto", "precise"], type: "string" }, loadingIndicatorPlaceholder: { value: "Loading...", type: "string" }, loadingIndicatorPosition: { value: "center", allowedValues: ["bottom", "center", "top"], type: "string" }, messages: { extend: true, value: { en: { overridingProperties: '{{elementType}}: Overriding properties {{property1}} and {{property2}} applied. The "{{property1}}" property is used by default.', invalidIndex: '{{elementType}}: "{{method}}" method accepts an index of type number or an Array of numbers.', indexOutOfBound: '{{elementType}}: Out of bound index/indexes in "{{method}}" method.', invalidItem: `{{elementType}}: "{{method}}" method accepts an object or an array of objects as it's second parameter.`, invalidSettings: `{{elementType}}: "{{method}}" method accepts a string or an object as it's second parameter.` } }, type: "object" }, name: { value: "", type: "string" }, placeholder: { value: "No Items", type: "string" }, selectedIndexes: { value: [], type: "array" }, selectedValues: { value: [], type: "array" }, selectionMode: { value: "oneOrManyExtended", allowedValues: ["none", "oneOrManyExtended", "zeroOrMany", "oneOrMany", "zeroOrOne", "zeroAndOne", "one", "checkBox", "radioButton"], type: "string" }, selectionChangeAction: { value: "release", allowedValues: ["press", "release"], type: "string" }, sorted: { value: false, type: "boolean" }, sortDirection: { value: "asc", type: "string" }, topVisibleIndex: { value: -1, type: "int" }, type: { value: "list", type: "string", defaultReflectToAttribute: true, readonly: true }, valueMember: { value: "", type: "string" }, virtualized: { value: false, type: "boolean" } };
            }
            static get requires() {
              return { "Smart.ScrollBar": "smart.scrollbar.js" };
            }
            static get styleUrls() {
              return ["smart.listbox.css", "smart.dropdown.css", "smart.scrollbar.css"];
            }
            static get listeners() {
              return { focus: "_focusHandler", blur: "_blurHandler", "container.wheel": "_mouseWheelHandler", "editInput.change": "_editInputEventHandler", "editInput.blur": "_editInputEventHandler", "editInput.keydown": "_editInputEventHandler", "horizontalScrollBar.change": "_horizontalScrollbarHandler", "itemsInnerContainer.down": "_downHandler", "itemsInnerContainer.dblclick": "_dblclickEventHandler", "itemsInnerContainer.move": "_itemsContainerMoveHandler", "itemsContainer.mouseleave": "_mouseLeaveHandler", "itemsInnerContainer.touchmove": "_touchmoveHandler", "itemsInnerContainer.touchstart": "_touchstartHandler", "document.move": "_moveHandler", keydown: "_keyDownHandler", keyup: "_keyUpHandler", resize: "_resizeHandler", selectstart: "_selectStartHandler", styleChanged: "_styleChangedHandler", swipeleft: "_swipeLeftHandler", swiperight: "_swipeRightHandler", touchmove: "_overriddenHandler", touchstart: "_overriddenHandler", "verticalScrollBar.change": "_verticalScrollbarHandler" };
            }
            template() {
              return `<div id="container" class="smart-container" role="presentation">
                    <div class="smart-list-box-filter-input-container smart-hidden" id="filterInputContainer" role="presentation"><input id="filterInput" disabled="[[disabled]]" placeholder='[[filterInputPlaceholder]]' role="searchbox" aria-label="[[filterInputPlaceholder]]"></div>
                    <div id="itemsContainer" class="smart-list-items-container" role="presentation">
                        <div id="placeholder" class="smart-placeholder" role="presentation" aria-hidden="true">[[placeholder]]</div>
                        <div id="itemsInnerContainer" inner-h-t-m-l='[[innerHTML]]' class="smart-list-items-inner-container" role="presentation">
                            <content></content>
                        </div>
                        <input type="text" id="editInput" class= "smart-hidden"/>
                    </div>
                    <smart-scroll-bar wait theme="[[theme]]" right-to-left="[[rightToLeft]]" id="verticalScrollBar" disabled="[[disabled]]" orientation="vertical"></smart-scroll-bar>
                    <smart-scroll-bar wait theme="[[theme]]" right-to-left="[[rightToLeft]]" id="horizontalScrollBar" disabled="[[disabled]]"></smart-scroll-bar>
                    <div id="loadingIndicatorContainer" class="smart-loader-container" role="presentation">
                        <span id="loadingIndicator" class="smart-loader" role="img" aria-label="[[loadingIndicatorPlaceholder]]"></span>
                        <span id="loadingIndicatorPlaceHolder" class="smart-loader-label smart-hidden">[[loadingIndicatorPlaceholder]]</span>
                    </div>
                    <input id="hiddenInput" type="hidden" name="[[name]]">
                </div>`;
            }
            get value() {
              const e2 = this;
              return e2.isRendered && e2._selectedItems.length > 0 ? e2._selectedItems.map((e3) => ({ label: e3.label, value: e3.value })) : null;
            }
            set value(e2) {
              const t = this;
              if (Array.isArray(e2)) {
                const i2 = t.context;
                t.context = t, t._isUpdating++, t.selectedValues = [], t.clearSelection();
                for (let i3 = 0; i3 < e2.length; i3++) {
                  const r2 = e2[i3], o = t.getItem(r2);
                  o && ("oneOrManyExtended" === t.selectionMode ? t._select(o) : t.select(o));
                }
                return t.context = i2, void t._isUpdating--;
              }
              const i = t.getItem(e2);
              i && t.select(i);
            }
            get _selectedItems() {
              const e2 = this, t = [];
              if (e2.isRendered) for (let i = 0; i < e2._items.length; i++) {
                const r2 = e2._items[i];
                r2.selected && t.push(r2);
              }
              return t;
            }
            _mouseLeaveHandler() {
              const e2 = [].slice.call(this.getElementsByClassName("smart-list-item-bottom-line-feedback"));
              for (let t = 0; t < e2.length; t++) e2[t].$.removeClass("smart-list-item-line-feedback"), e2[t].$.removeClass("smart-list-item-bottom-line-feedback");
            }
            _downHandler(e2) {
              const t = this;
              if (t.disabled || t.displayLoadingIndicator || t.readonly) return;
              let i = e2.originalEvent.target, r2 = null;
              if (!(i instanceof Smart.ListItem) || i.disabled || i.hidden || i instanceof Smart.ListItemsGroup) for (; i.parentElement; ) {
                if (i instanceof Smart.ListItem && !i.disabled && !i.hidden && !(i instanceof Smart.ListItemsGroup)) {
                  r2 = i.dataItem;
                  break;
                }
                i = i.parentElement;
              }
              else r2 = i.dataItem;
              Smart.ListBox.DragDrop.StartTime = /* @__PURE__ */ new Date(), Smart.ListBox.DragDrop.StartPosition = { left: e2.pageX, top: e2.pageY }, r2 && (e2.stopPropagation(), t.hasRippleAnimation && (r2.readonly || r2.disabled || Smart.Utilities.Animation.Ripple.animate(i.$.overlay, e2.pageX, e2.pageY)), Smart.Utilities.Core.isMobile || "press" !== t.selectionChangeAction || (t._focus(r2), t.select(r2)), !Smart.ListBox.DragDrop.Feedback && t.allowDrag && (Smart.ListBox.DragDrop.DraggedFrom = t, Smart.ListBox.DragDrop.Feedback = document.createElement("span"), t.rightToLeft ? Smart.ListBox.DragDrop.Feedback.setAttribute("right-to-left", true) : Smart.ListBox.DragDrop.Feedback.removeAttribute("right-to-left"), t.dragFeedbackFormatFunction ? Smart.ListBox.DragDrop.Feedback.innerHTML = t.dragFeedbackFormatFunction(r2) : Smart.ListBox.DragDrop.Feedback.appendChild(r2.offsetHeight ? r2.cloneNode(true) : t._createItem(r2)), Smart.ListBox.DragDrop.Item = r2, Smart.Utilities.Extend(Smart.ListBox.DragDrop.Feedback).addClass("smart-popup smart-list-item smart-list-item-feedback")));
            }
            _dblclickEventHandler(e2) {
              const t = this;
              if (!t.editable) return;
              const i = e2.target.closest("smart-list-item");
              i instanceof Smart.ListItem && !i.disabled && !i.readonly ? (t.$.editInput.dir = t.rightToLeft ? "rtl" : "ltr", t.$.editInput.style.width = t.$.itemsInnerContainer.offsetWidth + "px", t.$.editInput.owner = i, t.$.editInput.value = i.label, t.$.editInput.style.height = i.offsetHeight + "px", t.$.editInput.style.top = i.offsetTop + t.$.itemsInnerContainer.offsetTop + "px", t.$.editInput.setAttribute("aria-label", "Edit item " + i.label), t.$editInput.hasClass("smart-hidden") && t.$editInput.removeClass("smart-hidden"), t.$.editInput.focus({ preventScroll: true })) : t.$editInput.addClass("smart-hidden");
            }
            _editInputEventHandler(e2) {
              const t = this;
              if ("blur" === e2.type || "keydown" === e2.type && "Escape" === e2.key) return t.$editInput.hasClass("smart-hidden") || t.$editInput.addClass("smart-hidden"), void t.focus();
              if ("keydown" === e2.type || t.$editInput.hasClass("smart-hidden")) return;
              const i = e2.target;
              if (e2.stopPropagation(), i.owner.label !== i.value && (i.owner.label = i.value, t.itemTemplate && t._applyTemplate(i.owner), t.dataSource)) {
                const e3 = i.owner.dataIndex, r2 = t.dataSource[e3];
                r2 && (t.displayMember ? r2[t.displayMember] = i.value : r2.label = i.value);
              }
              t.$editInput.addClass("smart-hidden"), t.$.fireEvent("itemLabelChange", { selected: i.owner.selected, disabled: i.owner.disabled, index: t._indexOf(i.owner), label: i.owner.label, value: i.owner.value });
            }
            _pointerUpHandler(e2) {
              const t = this;
              let i = e2.originalEvent, r2 = i.target;
              (t.shadowRoot || t.isInShadowDOM) && (r2 = i.originalEvent ? i.originalEvent.composedPath()[0] : i.composedPath()[0]);
              const o = (e3) => {
                const i2 = e3.ownerListBox;
                i2.disabled || i2 !== t || i2.displayLoadingIndicator || "none" === i2.selectionMode || e3.grouped || e3.readonly || (i2._focus(e3), i2.select(e3), Smart.ListBox.DragDrop.StartPosition = null, t.$.fireEvent("itemClick", { selected: r2.selected, disabled: r2.disabled, index: t._indexOf(r2), label: r2.label, value: r2.value }));
              };
              if (!(i.target instanceof Smart.ListItem) || i.target.disabled || i.target instanceof Smart.ListItemsGroup) {
                for (; r2.parentElement; ) {
                  if (r2 instanceof Smart.ListItem && !r2.disabled && !(r2 instanceof Smart.ListItemsGroup)) return void o(r2.dataItem);
                  r2 = r2.parentElement;
                }
                if (this.shadowRoot && "shadow" === this.shadowDomMode) {
                  const e3 = i.composedPath();
                  for (let t2 = 0; t2 < e3.length; t2++) {
                    const i2 = e3[t2];
                    i2 instanceof Smart.ListItem && !i2.disabled && o(i2.dataItem);
                  }
                }
              } else o(r2.dataItem);
            }
            _upHandler(e2) {
              const t = this;
              if (super._upHandler(), !t.disabled && !t.readonly && Smart.ListBox.DragDrop.StartPosition) {
                if (Smart.Utilities.Core.isMobile && !Smart.ListBox.DragDrop.Dragging) {
                  const i = Math.abs(e2.pageX - Smart.ListBox.DragDrop.StartPosition.left), r2 = Math.abs(e2.pageY - Smart.ListBox.DragDrop.StartPosition.top);
                  let o = i >= 0 && i <= 3 && r2 >= 0 && r2 <= 3;
                  if (Smart.Utilities.Core.isMobile && /* @__PURE__ */ new Date() - Smart.ListBox.DragDrop.StartTime >= 300 && (o = false, Smart.ListBox.DragDrop.StartTime = null), o) {
                    const i2 = e2.originalEvent.target.closest("smart-list-box");
                    i2 ? i2._pointerUpHandler(e2) : t._pointerUpHandler(e2), Smart.ListBox.DragDrop.StartPosition = null;
                  } else {
                    let t2 = e2.originalEvent.target;
                    if (!(e2.target instanceof Smart.ListItem) || t2.readonly || e2.target.disabled || e2.target instanceof Smart.ListItemsGroup) for (; t2.parentElement; ) {
                      if (t2 instanceof Smart.ListItem && !t2.readonly && !t2.disabled && !(t2 instanceof Smart.ListItemsGroup)) {
                        e2.stopPropagation();
                        break;
                      }
                      t2 = t2.parentElement;
                    }
                    else e2.stopPropagation();
                  }
                } else if (!Smart.Utilities.Core.isMobile && !Smart.ListBox.DragDrop.Dragging && "release" === t.selectionChangeAction) {
                  const i = (t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target).closest("smart-list-box");
                  i ? i._pointerUpHandler(e2) : t._pointerUpHandler(e2);
                }
                if (Smart.ListBox.DragDrop.Feedback) {
                  let i;
                  if (Smart.ListBox.DragDrop.Feedback.parentNode && Smart.ListBox.DragDrop.Feedback.parentNode.removeChild(Smart.ListBox.DragDrop.Feedback), Smart.ListBox.DragDrop.Feedback = null, Smart.Utilities.Core.isMobile && Smart.ListBox.DragDrop.Dragging) for (let t2 = 0; t2 < Smart.ListBox.DragDrop.ListBoxes.length; t2++) {
                    const r2 = Smart.ListBox.DragDrop.ListBoxes[t2], o = r2.getBoundingClientRect();
                    if (r2.allowDrop && !r2.closest(".smart-visibility-hidden") && o.left <= e2.clientX && e2.clientX <= o.left + o.width && o.top <= e2.clientY && e2.clientY <= o.top + o.height) {
                      i = r2;
                      const t3 = r2._items.filter((e3) => !e3.hidden);
                      for (let i2 = 0; i2 < t3.length; i2++) {
                        const s = t3[i2], n = s.getBoundingClientRect();
                        if ((t3.indexOf(s) === t3.length - 1 || s.parentNode.lastElementChild === s) && e2.clientY >= o.top + s.offsetTop - r2.scrollTop + n.height / 2 && e2.clientY <= o.top - r2.scrollTop + s.offsetTop + n.height) {
                          Smart.ListBox.DragDrop.DropDetails = { item: s, position: "bottom" };
                          break;
                        }
                        if (e2.clientY >= o.top + s.offsetTop - r2.scrollTop && e2.clientY <= o.top + s.offsetTop + n.height - r2.scrollTop) {
                          Smart.ListBox.DragDrop.DropDetails = { item: s, position: "top" };
                          break;
                        }
                      }
                    }
                  }
                  if (Smart.ListBox.DragDrop.Dragging) {
                    if (Smart.ListBox.DragDrop.DropDetails) {
                      let r2 = Smart.ListBox.DragDrop.DropDetails.item, o = Smart.ListBox.DragDrop.Item;
                      const s = o.ownerListBox;
                      let n = e2.originalEvent.target;
                      if (t.isInShadowDOM && (n = e2.originalEvent ? e2.originalEvent.composedPath()[0] : e2.composedPath()[0]), i = !i && n.closest ? n.closest("smart-list-box") : i, document.body.classList.remove("smart-dragging"), r2.$.removeClass("smart-list-item-line-feedback"), r2.$.removeClass("smart-list-item-bottom-line-feedback"), i && r2.ownerListBox !== i && i.items.length > 0 && (r2 = i.items[i.items.length - 1]), Smart.ListBox.DragDrop.Item === r2 || i !== r2.ownerListBox && !Smart.Utilities.Core.isMobile) i && 0 === i._items.length && "none" !== i.dropAction && ("move" === i.dropAction ? Smart.ListBox.DragDrop.Item.ownerListBox.removeChild(Smart.ListBox.DragDrop.Item) : "copy" === i.dropAction && (o = o.cloneNode(true)), i.appendChild(o));
                      else if ("none" !== o.ownerListBox.dropAction) {
                        r2.ownerListBox !== o.ownerListBox && "move" === o.ownerListBox.dropAction && Smart.ListBox.DragDrop.Item.ownerListBox.removeChild(Smart.ListBox.DragDrop.Item), "copy" === o.ownerListBox.dropAction && (o = o.cloneNode(true)), Smart.ListBox.DragDrop.Item.group = r2.group;
                        const e3 = r2.ownerListBox;
                        "checkBox" !== e3.selectionMode && "radioButton" !== e3.selectionMode && e3.clearSelection(), "top" === Smart.ListBox.DragDrop.DropDetails.position ? e3.insertBefore(o, r2) : r2.parentNode.lastElementChild === r2 ? e3.appendChild(o) : e3.appendChild(o, r2), e3.ensureVisible(o), "checkBox" === e3.selectionMode || "radioButton" === e3.selectionMode ? (e3._focus(o), e3._refreshSelection()) : (e3.clearSelection(), e3.select(o));
                      }
                      o.selected && i !== s && s._refreshSelection();
                      const l = Smart.ListBox.DragDrop.Item, a2 = l.ownerListBox;
                      l.displayMode = "checkBox" === a2.selectionMode || "radioButton" === a2.selectionMode ? a2.selectionMode : "plain", a2.$.fireEvent("dragEnd", { item: l, target: r2, data: Smart.ListBox.DragDrop, previousContainer: s, container: i, originalEvent: e2 }), a2._focus(l);
                    } else {
                      const t2 = Smart.ListBox.DragDrop.Item, i2 = t2.ownerListBox;
                      t2.displayMode = "checkBox" === i2.selectionMode || "radioButton" === i2.selectionMode ? i2.selectionMode : "plain", document.body.classList.remove("smart-dragging"), i2.$.fireEvent("dragEnd", { item: t2, target: null, data: Smart.ListBox.DragDrop, previousContainer: i2, container: i2, originalEvent: e2 }), i2._focus(t2);
                    }
                    e2.preventDefault();
                  }
                  delete Smart.ListBox.DragDrop.DraggedFrom, Smart.ListBox.DragDrop.Dragging = false, Smart.ListBox.DragDrop.Item = null, Smart.ListBox.DragDrop.DropDetails = null;
                }
                for (let e3 = 0; e3 < Smart.ListBox.DragDrop.ListBoxes.length; e3++) {
                  const t2 = Smart.ListBox.DragDrop.ListBoxes[e3];
                  t2._dragInterval && clearInterval(t2._dragInterval);
                }
              }
            }
            _itemsContainerMoveHandler(e2) {
              const t = this;
              if (Smart.ListBox.DragDrop.Dragging) return t._applyItemFeedback(e2), t._moveHandler(e2), e2.originalEvent.preventDefault(), e2.originalEvent.stopPropagation(), false;
            }
            _touchmoveHandler(e2) {
              if (Smart.ListBox.DragDrop.Dragging && e2.cancelable) return e2.preventDefault(), void e2.stopPropagation();
              super._touchmoveHandler(e2);
            }
            _applyItemFeedback(e2) {
              const t = this, i = e2.originalEvent.target, r2 = i.closest ? i.closest("smart-list-item") : i;
              Smart.Utilities.Core.isMobile ? Smart.ListBox.DragDrop.DropDetails = { item: Smart.ListBox.DragDrop.Item, position: "bottom" } : 0 !== t.items.length && (r2 ? r2._itemOnMouseMove(e2) : t.items[t.items.length - 1]._itemOnMouseMove(e2, true));
            }
            _moveHandler(e2) {
              const t = this;
              if (!Smart.ListBox.DragDrop.Feedback || Smart.ListBox.DragDrop.DraggedFrom !== t) return;
              const i = t.dragOffset;
              if (Smart.ListBox.DragDrop.Dragging) {
                Smart.ListBox.DragDrop.Feedback.style.left = i[0] + e2.pageX + "px", Smart.ListBox.DragDrop.Feedback.style.top = i[1] + e2.pageY + "px", t.$.fireEvent("dragging", { item: Smart.ListBox.DragDrop.Item, data: Smart.ListBox.DragDrop, originalEvent: e2.originalEvent });
                for (let t2 = 0; t2 < Smart.ListBox.DragDrop.ListBoxes.length; t2++) {
                  const i2 = Smart.ListBox.DragDrop.ListBoxes[t2];
                  i2._dragInterval && clearInterval(i2._dragInterval), i2._dragInterval = setInterval(function() {
                    const t3 = i2.getBoundingClientRect();
                    t3.left <= e2.clientX && t3.left + t3.width >= e2.clientX && (e2.clientY >= t3.top && e2.clientY <= t3.top + 20 ? i2.scrollTop -= 2 : e2.clientY >= t3.top + t3.height - 20 && e2.clientY <= t3.top + t3.height && (i2.scrollTop += 2));
                  }, 1);
                }
                return e2.preventDefault(), e2.stopPropagation(), e2.originalEvent.preventDefault(), e2.originalEvent.stopPropagation(), false;
              }
              {
                const r2 = Math.abs(e2.pageX - Smart.ListBox.DragDrop.StartPosition.left), o = Math.abs(e2.pageY - Smart.ListBox.DragDrop.StartPosition.top), s = /* @__PURE__ */ new Date() - Smart.ListBox.DragDrop.StartTime;
                let n = r2 >= 5 && r2 <= 15 || o >= 5 && o <= 15;
                if (Smart.Utilities.Core.isMobile && (s < 300 || s > 1e3) && (n = false), n) {
                  Smart.ListBox.DragDrop.Dragging = true, Smart.ListBox.DragDrop.Feedback.style.left = i[0] + e2.pageX + "px", Smart.ListBox.DragDrop.Feedback.style.top = i[1] + e2.pageY + "px", t.getShadowRootOrBody().appendChild(Smart.ListBox.DragDrop.Feedback), e2.preventDefault(), e2.stopPropagation(), e2.originalEvent.preventDefault(), e2.originalEvent.stopPropagation();
                  const r3 = Smart.ListBox.DragDrop.Item, o2 = r3.ownerListBox;
                  o2.$.fireEvent("dragStart", { item: r3, data: Smart.ListBox.DragDrop, container: o2, previousContainer: o2, originalEvent: e2.originalEvent }), document.body.classList.add("smart-dragging");
                }
              }
            }
            _focusHandler() {
              this._focused = true, this.setAttribute("focus", "");
            }
            _blurHandler() {
              this._focused = false, this.removeAttribute("focus");
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              t.isVirtualized ? (t._items.indexOf(e2) > -1 && t._items.splice(t._items.indexOf(e2), 1), t._items.push(e2)) : (e2.dataItem = e2, t.shadowRoot && "light" === t.shadowDomMode ? t.appendChild(e2) : t.$.itemsInnerContainer.appendChild(e2), t._items.indexOf(e2) > -1 && t._items.splice(t._items.indexOf(e2), 1), t._items.push(e2)), t._refreshItems(), t._refreshSelection();
            }
            insertBefore(e2, t) {
              const i = this;
              if (!i.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(i, e3.concat(Array.prototype.slice.call(arguments)));
              }
              i.isVirtualized ? (i._items.indexOf(e2) > -1 && i._items.splice(i._items.indexOf(e2), 1), i._items.splice(i._indexOf(t), 0, e2)) : (e2.dataItem = e2, t.parentNode.insertBefore(e2, t), i._items.indexOf(e2) > -1 && i._items.splice(i._items.indexOf(e2), 1), i._items.splice(i._indexOf(t), 0, e2)), i._refreshItems(), i._refreshSelection();
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              if (t.isVirtualized) t._items.splice(t._indexOf(e2), 1);
              else if (e2.parentNode) {
                const i = t.selectedIndexes.slice(0), r2 = t.selectedValues.slice(0), o = i.indexOf(e2.dataIndex);
                e2.parentNode.removeChild(e2), o > -1 && (i.splice(o, 1), r2.splice(o, 1), t.selectedIndexes = i, t.selectedValues = r2);
              }
              t._refreshItems();
            }
            propertyChangedHandler(e2, t, i) {
              if ("dataSource" === e2 && (!i || i && Array.isArray(i) && 0 === i.length)) return void this.clearItems();
              super.propertyChangedHandler(e2, t, i);
              const r2 = this;
              switch (e2) {
                case "innerHTML":
                  r2.clearSelection(), r2._dataBind(), r2.innerHTML = r2.content = Smart.Utilities.Core.html(r2.$.content);
                  break;
                case "dataSource":
                case "valueMember":
                case "groupMember":
                case "displayMember":
                  r2.clearSelection(), r2._dataBind(), r2._applyDefaultSelection();
                  break;
                case "disabled":
                case "unfocusable":
                  r2._setFocusable();
                  break;
                case "displayLoadingIndicator":
                  r2._setLoadingIndicatorVisibility();
                  break;
                case "filterable":
                  r2._refreshFilter(), r2._refreshLayout();
                  break;
                case "grouped":
                  if (i ? r2._group() : r2._ungroup(), "radioButton" === r2.selectionMode) {
                    if (r2.selectedValues.length > 0) {
                      const e3 = r2.selectedValues;
                      r2.clearSelection(), r2.select(e3[0]);
                    }
                  } else r2._refreshSelection();
                  r2._refreshLayout();
                  break;
                case "itemTemplate": {
                  if (null === i || "" === i) return r2._items.map((e4) => e4.innerHTML = e4.label), delete r2._bindingDetails, void r2._refreshLayout();
                  const e3 = r2.querySelectorAll("smart-list-item"), t2 = function() {
                    r2._handleItemTemplate(i) && (r2._items.map((e4) => r2._applyTemplate(e4)), r2._refreshLayout()), r2.ownerElement && r2.ownerElement._setDropDownSize && r2.ownerElement._setDropDownSize(), r2.$.fireEvent("bindingComplete");
                  };
                  0 === e3.length ? t2() : r2._ensureItemsReady(e3, t2);
                  break;
                }
                case "selectedIndexes":
                case "selectedValues": {
                  let o = r2.selectedIndexes.slice(0), s = r2.selectedValues.slice(0);
                  if (!r2._items || 0 === r2._items.length) return r2.selectedIndexes = [], r2.selectedValues = [], void (r2.$.hiddenInput.value = r2.selectedValues.toString());
                  if (r2._propertyChanging = true, "selectedIndexes" === e2) {
                    o = t.slice(0), r2.clearSelection();
                    for (let e3 = 0; e3 < i.length; e3++) {
                      const t2 = i[e3], o2 = r2._items[t2];
                      o2 && ("oneOrManyExtended" === r2.selectionMode || "oneOrMany" === r2.selectionMode ? (r2.selectedIndexes.length > 0 && 0 === e3 && r2.clearSelection(), r2._select(o2)) : r2.select(o2));
                    }
                  } else {
                    s = t.slice(0), r2.selectedValues = [], r2.clearSelection();
                    for (let e3 = 0; e3 < i.length; e3++) {
                      const t2 = i[e3], o2 = r2.getItem(t2);
                      o2 && ("oneOrManyExtended" === r2.selectionMode ? r2._select(o2) : r2.select(o2));
                    }
                  }
                  if (r2.selectedIndexes.length > 0 && r2._focus(r2._items[r2.selectedIndexes[0]]), r2._propertyChanging = false, JSON.stringify(s) !== JSON.stringify(r2.selectedValues.slice(0))) {
                    let e3 = [], t2 = [];
                    for (let e4 = 0; e4 < o.length; e4++) r2.selectedIndexes.indexOf(o[e4]) < 0 && t2.push(r2._items[o[e4]]);
                    for (let t3 = 0; t3 < r2.selectedIndexes.length; t3++) o.indexOf(r2.selectedIndexes[t3]) < 0 && e3.push(r2._items[r2.selectedIndexes[t3]]);
                    let i2 = { addedItems: e3, removedItems: t2 };
                    if (r2.selectedIndexes.length > 0) {
                      const e4 = r2._items[r2.selectedIndexes[r2.selectedIndexes.length - 1]];
                      void 0 !== e4 && (i2.selected = e4.selected, i2.disabled = e4.disabled, i2.index = r2._indexOf(e4), i2.label = e4.label, i2.value = e4.value);
                    } else i2.selected = false, i2.disabled = false, i2.index = -1, i2.label = "", i2.value = "";
                    r2.$.fireEvent("change", i2);
                  }
                  break;
                }
                case "selectionMode": {
                  const e3 = "checkBox" === r2.selectionMode || "radioButton" === r2.selectionMode ? r2.selectionMode : "plain", o = r2.selectedIndexes.slice(0), s = r2.selectedValues.slice(0);
                  r2._propertyChanging = true;
                  const n = r2.selectedValues;
                  r2.setAttribute("aria-multiselectable", -1 !== ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox", "radioButton"].indexOf(i)), r2.selectedValues = [], r2.clearSelection();
                  for (let e4 = 0; e4 < n.length; e4++) {
                    const t2 = n[e4], i2 = r2.getItem(t2);
                    i2 && ("oneOrManyExtended" === r2.selectionMode ? r2._select(i2) : r2.select(i2));
                  }
                  if (r2._items.forEach((t2) => t2.displayMode = e3), r2._recycle(), r2._propertyChanging = false, JSON.stringify(s) !== JSON.stringify(r2.selectedValues.slice(0))) {
                    let e4 = [], t2 = [];
                    for (let e5 = 0; e5 < o.length; e5++) r2.selectedIndexes.indexOf(o[e5]) < 0 && t2.push(r2._items[o[e5]]);
                    for (let t3 = 0; t3 < r2.selectedIndexes.length; t3++) o.indexOf(r2.selectedIndexes[t3]) < 0 && e4.push(r2._items[r2.selectedIndexes[t3]]);
                    let i2 = { addedItems: e4, removedItems: t2 };
                    if (o.length > 0) {
                      const e5 = r2._items[o[o.length - 1]];
                      e5 && (i2.selected = e5.selected, i2.disabled = e5.disabled, i2.index = r2._indexOf(e5), i2.label = e5.label, i2.value = e5.value);
                    }
                    r2.$.fireEvent("change", i2);
                  }
                  r2._applyAriaSelected(), "checkBox" !== i && "radioButton" !== i && "checkBox" !== t && "radioButton" !== t || r2._refreshLayout();
                  break;
                }
                case "topVisibleIndex":
                  r2._setTopVisibleIndex(i);
                  break;
                case "autoSort":
                  r2._canSort = i;
                  break;
                case "alternationStart":
                case "alternationEnd":
                case "alternationCount":
                  r2._refreshItems(), r2._refreshLayout();
                  break;
                case "sortDirection":
                case "sorted": {
                  r2._canSort = true, i ? r2._sort() : r2._unsort();
                  const e3 = r2.selectedValues;
                  r2.selectedValues = [], r2._refreshSelection();
                  for (let t2 = 0; t2 < e3.length; t2++) {
                    const i2 = e3[t2], o = r2.getItem(i2);
                    o && ("oneOrManyExtended" === r2.selectionMode ? r2._select(o) : r2.select(o));
                  }
                  r2._refreshLayout(), r2._canSort = r2.autoSort;
                  break;
                }
              }
            }
            _refreshSelection() {
              const e2 = this;
              if (!e2._items || 0 === e2._items.length) return;
              const t = e2.selectedValues;
              e2.selectedIndexes = [], e2.selectedValues = [];
              for (let i = 0; i < e2._items.length; i++) {
                const r2 = e2._items[i];
                r2.selected = false, t.indexOf(r2.value) > -1 && e2.select(r2);
              }
              e2._recycle();
            }
            clearSelection() {
              const e2 = this;
              if (!e2._items || 0 === e2._items.length) return;
              let t = [];
              for (let i2 = 0; i2 < e2._items.length; i2++) e2._items[i2].selected && t.push(e2._items[i2]);
              e2._items.map((e3) => e3.selected = false), e2.selectedValues.slice(0);
              const i = e2.selectedIndexes.slice(0);
              if (e2.selectedIndexes = [], e2.selectedValues = [], e2.$.hiddenInput.value = e2.selectedValues.toString(), e2._recycle(), e2.context !== e2) {
                let r2 = { addedItems: [], removedItems: t };
                if (i.length > 0) {
                  const t2 = e2._items[i[i.length - 1]];
                  t2 && (r2.selected = t2.selected, r2.disabled = t2.disabled, r2.index = e2._indexOf(t2), r2.label = t2.label, r2.value = t2.value);
                }
                e2.$.fireEvent("change", r2);
              }
            }
            ensureVisible(e2) {
              const t = this;
              if (e2) return !("string" == typeof e2 && !(e2 = t.getItem(e2)) || (t.isVirtualized || t.$.itemsContainer.scrollTop === t.scrollTop || (t.scrollTop = t.$.itemsContainer.scrollTop), e2.top + e2.height >= t.scrollTop + t.offsetHeight && (t.scrollTop = t.scrollTop + e2.height, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)), (e2.top <= t.scrollTop || e2.top >= t.scrollTop + t.$.itemsContainer.offsetHeight) && (t.scrollTop = e2.top, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)), 0 === t._indexOf(e2) || 1 === t._indexOf(e2) && t._items.length > 1 && t._items[0].grouped ? (t.scrollTop = 0, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)) : t._indexOf(e2) === t._items.length - 1 && (t.scrollTop = t.scrollHeight, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)), 0));
            }
            get items() {
              const e2 = this;
              if (!window.__karma__ && !window.karma && e2 instanceof Element && e2.isRendered && e2.hasAttribute && e2.hasAttribute("smart-blazor")) {
                let t = [];
                for (let i = 0; i < e2._items.length; i++) {
                  const r2 = e2._items[i];
                  t.push({ label: r2.label, value: r2.value });
                }
                return t;
              }
              return e2._filteredItems ? e2._filteredItems : e2._items;
            }
            getItems() {
              const e2 = this, t = e2._filteredItems ? e2._filteredItems : e2._items;
              let i = [];
              if (t && t.length > 0) for (let e3 = 0; e3 < t.length; e3++) {
                const r2 = t[e3];
                i.push({ label: r2.label, value: r2.value });
              }
              return i;
            }
            ready() {
              super.ready();
              const e2 = this;
              if (e2.shadowRoot && "light" === e2.shadowDomMode) {
                const t2 = document.createDocumentFragment();
                [].slice.call(e2.$.itemsInnerContainer.children).map((e3) => t2.appendChild(e3)), e2.appendChild(t2), e2.$.itemsInnerContainer.appendChild(document.createElement("slot"));
              }
              e2._areCSSVarsSupported = Smart.Utilities.Core.CSSVariablesSupport(), e2.isUpdating = 0, e2._scrollView && (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar), e2._scrollView.hScrollBar.$.addClass("smart-hidden"), e2._scrollView.vScrollBar.$.addClass("smart-hidden"));
              const t = e2._scrollView.vScrollBar, i = e2._scrollView.hScrollBar;
              t.hasStyleObserver = false, i.hasStyleObserver = false, t.hasResizeObserver = false, i.hasResizeObserver = false, t.wait = false, i.wait = false, e2._setFocusable();
            }
            render() {
              const e2 = this;
              e2.setAttribute("role", "listbox"), e2.setAttribute("aria-orientation", "vertical"), e2.$.verticalScrollBar.setAttribute("aria-controls", e2.id), e2.$.horizontalScrollBar.setAttribute("aria-controls", e2.id), e2._keysPressed = {}, e2._incrementalSearchQuery = "", e2._incrementalSearchItems = [], e2._canSort = true, e2._previousEntry = "", e2._setLoadingIndicatorVisibility(), e2._refreshFilter(), e2._initializeInnerHTML(), e2._dataBind(), e2._applyDefaultSelection(), e2.enableShadowDOM && HTMLElement.prototype.appendChild.apply(e2, [e2.$.hiddenInput]), e2.setAttribute("aria-multiselectable", -1 !== ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox", "radioButton"].indexOf(e2.selectionMode)), super.render();
            }
            _lazyInitItems() {
              const e2 = this;
              if (e2._inLazyInit) return cancelAnimationFrame(Smart.ListBox.processTimer), void delete Smart.ListBox.processTimer;
              e2._inLazyInit = true, e2.dataSource || (e2.clearSelection(), e2._dataBind(), e2._applyDefaultSelection()), cancelAnimationFrame(Smart.ListBox.processTimer), delete Smart.ListBox.processTimer, e2._inLazyInit = false;
            }
            _applyDefaultSelection() {
              const e2 = this;
              !e2._focusedItem && e2._items && e2._items.length > 0 && 0 === e2.selectedIndexes.length && ("one" !== e2.selectionMode && "oneOrMany" !== e2.selectionMode && "oneOrManyExtended" !== e2.selectionMode || e2.select(e2._items[0]));
            }
            attached() {
              const e2 = this;
              super.attached(), Smart.ListBox.DragDrop || (Smart.ListBox.DragDrop = { ListBoxes: [] }), Smart.ListBox.DragDrop.ListBoxes.push(e2), e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar)), e2.selectedIndexes.length > 0 && e2._items && e2.ensureVisible(e2._items[e2.selectedIndexes[0]]);
            }
            detached() {
              const e2 = this;
              if (super.detached(), e2._scrollView && (e2._scrollView.unlisten(), delete e2._scrollView), Smart.ListBox.DragDrop && Smart.ListBox.DragDrop.ListBoxes) {
                const t = Smart.ListBox.DragDrop.ListBoxes.indexOf(e2);
                Smart.ListBox.DragDrop.ListBoxes.splice(t, 1);
              }
            }
            _createItem(e2, t, i) {
              const r2 = this, o = "checkBox" === r2.selectionMode || "radioButton" === r2.selectionMode ? r2.selectionMode : "plain", s = i ? {} : document.createElement("smart-list-item");
              s.ownerListBox = r2, "number" == typeof e2 && (e2 = "" + e2);
              const n = function(t2, i2) {
                return void 0 !== e2[t2] ? "" + e2[t2] : e2[i2];
              };
              let l = "string" == typeof e2 ? e2 : n(r2.displayMember, "label"), a2 = "string" == typeof e2 ? e2 : n(r2.valueMember, "value"), d2 = n(r2.groupMember, "group");
              return void 0 === l && (l = void 0 !== t ? "" + t : ""), s.label = s.innerHTML = "" + l, void 0 === a2 && (a2 = void 0 !== t ? "" + t : l), e2.color && (s.color = e2.color), s.value = "" + a2, s.displayMode = o, s.selected = !!e2.selected && e2.selected, s.disabled = !!e2.disabled && e2.disabled, s.dataItem = s, void 0 !== t && (s.dataIndex = t), r2._alternateItem(s), e2.title && (s.title = e2.title), d2 && (s.group = "" + d2), s;
            }
            _alternateItem(e2) {
              const t = this, i = t.alternationStart, r2 = t.alternationEnd > 0 ? t.alternationEnd : 1 / 0;
              t.alternationCount <= 0 || (void 0 === t._alternationIndexCounter && (t._alternationIndexCounter = 0), e2.dataIndex >= i && e2.dataIndex <= r2 && (e2.alternationIndex = t._alternationIndexCounter++, t._alternationIndexCounter === t.alternationCount && (t._alternationIndexCounter = 0)));
            }
            _beginUpdate() {
              this.isUpdating++;
            }
            _isUpdating() {
              return this.isUpdating > 0;
            }
            _endUpdate() {
              this.isUpdating--;
            }
            get _scrollHeight() {
              const e2 = this;
              if (0 === e2._items.length || e2._items.filter((e3) => !e3.hidden).length < 1) return 0;
              let t = 0;
              if (e2.isVirtualized) {
                if (e2.__scrollHeight) return e2.__scrollHeight;
                if (0 === e2._items.length) return 0;
                e2.isUpdating++;
                const i = e2._createItem(e2.dataSource[0]);
                e2.$.itemsInnerContainer.appendChild(i);
                for (let r2 = 0; r2 < e2._items.length; r2++) {
                  const o = e2._items[r2];
                  o.hidden ? (o.height = 0, o.top = t) : (e2.itemHeight ? (e2.itemHeight < 32 && (e2.itemHeight = 32), o.height = e2.itemHeight) : (i.$ && i.$.itemContainer ? i.$.itemContainer.firstElementChild.innerHTML = o.label : i.label = o.label, o.height = i.offsetHeight), o.top = t, t += o.height);
                }
                e2.$.itemsInnerContainer.removeChild(i), e2.__scrollHeight = t - e2.$.itemsInnerContainer.offsetHeight, e2.filterable && (e2.__scrollHeight += e2.$.filterInput.offsetHeight), t = e2.__scrollHeight, e2.isUpdating--;
              } else {
                for (let i = 0; i < e2._items.length; i++) {
                  const r2 = e2._items[i];
                  r2.hidden ? (r2.height = 0, r2.top = t) : (e2.itemHeight ? "auto" !== e2.itemHeight && (r2.height = e2.itemHeight, r2.style.height = r2.height + "px") : r2.height = r2.offsetHeight, r2.top = r2.offsetTop, t += r2.height);
                }
                t = e2.$.itemsInnerContainer.scrollHeight - e2.$.itemsInnerContainer.offsetHeight, e2.filterable && t > 0 && (t += e2.$.filterInput.offsetHeight), e2.__scrollHeight = t;
              }
              return t;
            }
            _initializeRecyclingItems() {
              const e2 = this;
              if (!e2.dataSource || e2.dataSource && 0 === e2.dataSource.length || !e2.isVirtualized) return;
              let t = 0, i = e2.offsetHeight || 400;
              e2.$.itemsInnerContainer.innerHTML = "", e2._recyclingItems = [];
              const r2 = function() {
                for (let r3 = 0; r3 < e2.dataSource.length; r3++) {
                  const o2 = e2.dataSource[r3], s = e2._createItem(o2);
                  if (e2.itemHeight && "auto" !== e2.itemHeight && (s.style.height = e2.itemHeight + "px"), e2.$.itemsInnerContainer.appendChild(s), t += s.offsetHeight, s.dataItem = e2._items[r3], e2._recyclingItems.push(s), t > 1.5 * i) break;
                }
              };
              r2();
              let o = 0;
              for (; t < 1.5 * i && ++o < 5; ) r2();
            }
            _dataBind() {
              const e2 = this;
              if (e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar)), "function" == typeof e2.dataSource && (e2._items = [], delete e2._filteredItems), "string" == typeof e2.dataSource && (e2.dataSource = JSON.parse(e2.dataSource)), null !== e2.dataSource && Array.isArray(e2.dataSource)) {
                e2.isUpdating++;
                const t2 = (t3) => {
                  e2._items = [], e2._groups = [], delete e2._filteredItems;
                  const i2 = e2.dataSource;
                  for (let r2 = 0; r2 < i2.length; r2++) {
                    const o = i2[r2], s = e2._createItem(o, r2, !t3);
                    e2._items[r2] = s, t3 && t3.appendChild(s);
                  }
                };
                if (e2.isVirtualized) t2(), e2._initializeRecyclingItems();
                else {
                  const i2 = document.createDocumentFragment();
                  e2.$.itemsInnerContainer.innerHTML = "", t2(i2), e2.$.itemsInnerContainer.appendChild(i2);
                }
                e2.isUpdating--;
              }
              const t = e2.shadowRoot ? e2.shadowRoot.querySelectorAll("smart-list-item") : e2.querySelectorAll("smart-list-item"), i = function() {
                e2.isUpdating++, e2.dataSource || (e2._initializeHtmlListItems(), e2._initializeHtmlListGroups()), e2.grouped && e2._group(), e2.sorted && e2._sort(), e2._refreshLayout(), e2._initializeSelection(), e2.isInitialized = true, e2._canSort = e2.autoSort, e2.isUpdating--, e2.itemTemplate && e2._handleItemTemplate(e2.itemTemplate) && (e2._items.map((t2) => e2._applyTemplate(t2)), e2._refreshLayout()), e2.__onCompleted && (e2._onCompleted = e2.__onCompleted, e2.__onCompleted = null, e2._onCompleted()), e2.topVisibleIndex > -1 && e2._setTopVisibleIndex(e2.topVisibleIndex), e2.$.fireEvent("bindingComplete"), e2._updateTopVisibleIndex(), 0 === e2._items.length && e2.clearItems(), e2._applyAriaSelected();
              };
              0 === t.length ? i() : (e2._onCompleted && (e2.__onCompleted = e2._onCompleted, e2._onCompleted = null), e2._ensureItemsReady(t, i));
            }
            _ensureItemsReady(e2, t) {
              const i = this, r2 = function() {
                const i2 = function(t2) {
                  for (let i3 = 0; i3 < e2.length; i3++) e2[i3].context = "node" === t2 ? e2[i3] : document;
                };
                i2("node"), t(), i2();
              };
              if (0 === e2.length) r2();
              else {
                i._nodesReadyListeners = 0;
                for (let t2 = 0; t2 < e2.length; t2++) {
                  const o = e2[t2], s = (function() {
                    i._nodesReadyListeners--, 0 === i._nodesReadyListeners && (r2(), delete i._nodesReadyListeners);
                  }).bind(i);
                  o.isCompleted || (i._nodesReadyListeners++, o._onCompleted = s);
                }
                0 === i._nodesReadyListeners && r2();
              }
            }
            _initializeInnerHTML() {
              const e2 = this;
              e2.$.itemsInnerContainer.innerHTML.indexOf("<option") >= 0 ? e2.$.itemsInnerContainer.innerHTML = e2.$.itemsInnerContainer.innerHTML.replace(/<optgroup/gi, "<smart-list-items-group").replace(/<\/optgroup/gi, "</smart-list-items-group").replace(/<option/gi, "<smart-list-item").replace(/<\/option/gi, "</smart-list-item") : e2.$.itemsInnerContainer.innerHTML.indexOf("<ul") >= 0 && (e2.$.itemsInnerContainer.innerHTML = e2.$.itemsInnerContainer.innerHTML.replace(/<ul/gi, "<smart-list-items-group").replace(/<\/ul/gi, "</smart-list-items-group").replace(/<li/gi, "<smart-list-item").replace(/<\/li/gi, "</smart-list-item"));
            }
            _initializeHtmlListItems() {
              const e2 = this, t = e2.shadowRoot && "shadow" === e2.shadowDomMode ? e2.shadowRoot.querySelectorAll("smart-list-item") : e2.querySelectorAll("smart-list-item"), i = "checkBox" === e2.selectionMode || "radioButton" === e2.selectionMode ? e2.selectionMode : "plain", r2 = function(e3, t2, i2) {
                return void 0 !== e3[t2] ? "" + e3[t2] : e3[i2];
              };
              e2._items = [];
              let o = 0;
              for (let s = 0; s < t.length; s++) {
                const n = t[s];
                n.dataIndex = s, n.label = n.innerHTML, n.dataItem = n, n.top || (n.top = o), n.height || (n.height = n.offsetHeight), o += n.height, n.value || (n.value = "" + s);
                const l = r2(n, e2.displayMember, "label"), a2 = r2(n, e2.valueMember, "value"), d2 = r2(n, e2.groupMember, "group");
                n.label !== l && (n.label = l), n.value !== a2 && (n.value = a2), n.group !== d2 && (n.group = d2);
                const c = n.context;
                n.context = document, n.displayMode = i, n.context = c, e2._alternateItem(n), n.selected && (e2.selectedIndexes.push(s), e2.selectedValues.push(n.value)), e2._items.push(n);
              }
              e2.itemTemplate && e2._handleItemTemplate(e2.itemTemplate) && e2._items.map((t2) => e2._applyTemplate(t2));
            }
            _group() {
              const e2 = this;
              e2.isUpdating++;
              let t = [], i = [];
              e2._canSort && e2._unsort();
              for (let i2 = 0; i2 < e2._items.length; i2++) {
                const r2 = e2._items[i2];
                let o = r2.group ? r2.group.trim() : r2.innerHTML.charAt(0) || r2.label.charAt(0);
                o += " ", t[o] ? t[o].items.push(r2) : t[t.length++] = t[o] = { items: [r2], label: o };
              }
              if (e2.isVirtualized) {
                e2._groups = [];
                for (let e3 = 0; e3 < t.length; e3++) {
                  const r2 = t[e3];
                  r2.dataIndex = e3, r2.grouped = true, r2.hidden = false, r2.displayMode = "plain", i.push(r2);
                  for (let o = 0; o < t[e3].items.length; o++) {
                    const e4 = r2.items[o];
                    e4.group = r2, i.push(e4);
                  }
                }
                e2._groups = t, e2._items = i;
              } else {
                for (; e2.$.itemsInnerContainer.firstChild; ) e2.$.itemsInnerContainer.removeChild(e2.$.itemsInnerContainer.firstChild);
                const r2 = document.createDocumentFragment();
                e2._groups = [];
                for (let o = 0; o < t.length; o++) {
                  const s = t[o], n = document.createElement("smart-list-items-group");
                  n.label = s.label, n.dataIndex = o;
                  for (let e3 = 0; e3 < t[o].items.length; e3++) {
                    const t2 = s.items[e3];
                    i.push(t2), t2.group = s.label, n.appendChild(t2);
                  }
                  e2._groups.push(n), r2.appendChild(n);
                }
                e2._items = i, /Trident|Edge/.test(navigator.userAgent) ? setTimeout(function() {
                  e2.$.itemsInnerContainer.appendChild(r2);
                }, 50) : e2.$.itemsInnerContainer.appendChild(r2);
              }
              e2.sorted && e2._sort(), e2.isUpdating--;
            }
            _ungroup() {
              const e2 = this;
              e2.isUpdating++, e2._groups = [], e2._canSort && e2._unsort();
              let t = [];
              if (e2.isVirtualized) for (let i = 0; i < e2._items.length; i++) {
                const r2 = e2._items[i];
                r2.grouped || t.push(r2);
              }
              else {
                const i = document.createDocumentFragment();
                for (let r2 = 0; r2 < e2._items.length; r2++) {
                  const o = e2._items[r2];
                  i.appendChild(o), t.push(o);
                }
                t.length > 0 && (e2.$.itemsInnerContainer.innerHTML = "", e2.$.itemsInnerContainer.appendChild(i));
              }
              e2._items = t, e2.sorted && e2._sort(), e2.isUpdating--;
            }
            _initializeHtmlListGroups() {
              const e2 = this, t = e2.$.itemsInnerContainer.querySelectorAll("smart-list-items-group");
              e2._groups = [];
              for (let i = 0; i < t.length; i++) {
                const r2 = t[i];
                r2.dataIndex = i, e2._groups.push(r2);
              }
            }
            _initializeSelection() {
              const e2 = this, t = e2.selectedIndexes.slice(0), i = e2.selectedValues.slice(0);
              e2.clearSelection(), "oneOrManyExtended" === e2.selectionMode && (e2._keysPressed.Control = true);
              for (let r2 = 0; r2 < e2._items.length; r2++) {
                const o = e2._items[r2];
                (t.indexOf(r2) >= 0 || i.indexOf(o.value || o.label) >= 0) && (e2._focusedItem && (e2._focusedItem._focused = false), e2._focusedItem = null, e2.select(o));
              }
              "oneOrManyExtended" === e2.selectionMode && (e2._keysPressed.Control = false);
            }
            onItemUpdated() {
              const e2 = this;
              e2.isInitialized && !e2._isUpdating() && (e2.isUpdating++, e2._refreshLayout(), e2.isUpdating--);
            }
            _refreshItems() {
              const e2 = this;
              if (e2.isInitialized && !e2._isUpdating()) {
                if (e2.isUpdating++, e2.grouped ? e2._ungroup() : e2.sorted && e2._canSort && e2._unsort(), !e2.isVirtualized) {
                  e2._items = [];
                  const t = e2.shadowRoot ? e2.shadowRoot.querySelectorAll("smart-list-item") : e2.querySelectorAll("smart-list-item");
                  for (let i = 0; i < t.length; i++) t[i].dataIndex = i, e2._alternateItem(t[i]), e2._items.push(t[i]);
                }
                e2.grouped ? e2._group() : e2.sorted && e2._sort(), e2._refreshLayout(), e2.isUpdating--;
              }
            }
            _applyIncrementalSearch(e2) {
              const t = this;
              null === t.incrementalSearchDelay || isNaN(t.incrementalSearchDelay) || ["Shift", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Control", "Home", "End", "PageUp", "PageDown"].indexOf(e2) > -1 || (0 !== t._incrementalSearchQuery.indexOf(e2) && (t._incrementalSearchQuery += e2), t._incrementalSearchTimer && clearTimeout(t._incrementalSearchTimer), t._incrementalSearch(), t._incrementalSearchTimer = setTimeout(function() {
                t._incrementalSearchQuery = "";
              }, t.incrementalSearchDelay));
            }
            select(e2) {
              const t = this;
              if (("string" != typeof e2 || (e2 = t.getItem(e2))) && ("number" != typeof e2 || (e2 = t.getItem(e2))) && !(e2.grouped || e2.readonly || !t._items.length || e2 instanceof HTMLElement && !t.contains(e2))) {
                if ("none" === t.selectionMode) return t.selectedIndexes = [], void (t.selectedValues = []);
                switch (!t._focusedItem !== e2 && "none" !== t.selectionMode && (t._focusedItem && (t._focusedItem._focused = false), t._focusedItem = e2, e2._focused = true), t.selectionMode) {
                  case "one":
                  case "zeroAndOne":
                    return (1 !== t.selectedIndexes.length || t.selectedIndexes[0] !== t._indexOf(e2)) && (t._previouslySelectedIndexes = t.selectedIndexes, t.selectedIndexes.length >= 1 && t.clearSelection(), t._select(e2), delete t._previouslySelectedIndexes, true);
                  case "zeroOrOne":
                    return 1 === t.selectedIndexes.length && t.selectedIndexes[0] === t._indexOf(e2) ? (t.unselect(e2), true) : (t._previouslySelectedIndexes = t.selectedIndexes, t.selectedIndexes.length >= 1 && t.clearSelection(), t._select(e2), delete t._previouslySelectedIndexes, true);
                  case "radioButton":
                    if (t._previouslySelectedIndexes = t.selectedIndexes, t.$.itemsInnerContainer.querySelectorAll("smart-list-items-group").length > 0) {
                      const i = e2.parentNode;
                      if (!e2.selected) {
                        for (let e3 in i.children) {
                          const r2 = i.children[e3];
                          r2.selected && t.unselect(r2);
                        }
                        t._select(e2);
                      }
                      return delete t._previouslySelectedIndexes, true;
                    }
                    if (t.isVirtualized && t._groups.length > 0) {
                      const i = e2.group;
                      if (!e2.selected) {
                        for (let e3 in i.items) {
                          const r2 = i.items[e3];
                          r2.selected && t.unselect(r2);
                        }
                        t._select(e2);
                      }
                      return delete t._previouslySelectedIndexes, true;
                    }
                    return e2.selected || (t.selectedIndexes.length >= 1 && t.clearSelection(), t._select(e2)), delete t._previouslySelectedIndexes, true;
                  case "oneOrMany":
                    return e2.selected ? t.selectedIndexes.length > 1 && t.unselect(e2) : t._select(e2), true;
                  case "zeroOrMany":
                  case "checkBox":
                    return e2.selected ? t.unselect(e2) : t._select(e2), true;
                  case "oneOrManyExtended": {
                    const i = t.selectedValues;
                    if (t._keysPressed.Control) return t.selectedIndexes.length > 1 && e2.selected ? (t.unselect(e2), t._focus(t._items[t.selectedIndexes[0]])) : t._select(e2), true;
                    if (t._keysPressed.Shift) {
                      const r2 = t._items[t.selectedIndexes[0]];
                      let o;
                      t.clearSelection();
                      const s = i.indexOf(r2.value) >= 0 || r2.selected;
                      if (t._select(r2, s), t._indexOf(r2) > t._indexOf(e2)) for (o = t._indexOf(r2) - 1; o >= t._indexOf(e2); ) {
                        const e3 = t._items[o], r3 = i.indexOf(e3.value) >= 0 || e3.selected;
                        t._select(e3, r3), o--;
                      }
                      else for (o = t._indexOf(r2) + 1; o <= t._indexOf(e2); ) {
                        const e3 = t._items[o], r3 = i.indexOf(e3.value) >= 0 || e3.selected;
                        t._select(e3, r3), o++;
                      }
                      const n = [];
                      for (let e3 = 0; e3 < i.length; e3++) n.push(t.getItem(i[e3]));
                      if (n.length > 0 && !t._propertyChanging) {
                        let r3 = [];
                        for (let e3 = 0; e3 < t.selectedValues.length; e3++) {
                          const o2 = t.selectedValues[e3];
                          i.indexOf(o2) < 0 && r3.push(t.getItem(o2));
                        }
                        t.$.fireEvent("change", { addedItems: r3, removedItems: n, selected: e2.selected, disabled: e2.disabled, index: t._indexOf(e2), label: e2.label, value: e2.value });
                      }
                      return true;
                    }
                    for (let r2 = 0; r2 < i.length; r2++) {
                      const o = i[r2], s = t.getItem(o);
                      e2 !== s && t.unselect(s);
                    }
                    return t.clearSelection(), t._select(e2, i.indexOf(e2.value) >= 0), true;
                  }
                }
                return false;
              }
            }
            _applyTemplate(e2, t) {
              const i = this;
              if (null === i.itemTemplate) return;
              if ("function" == typeof i.itemTemplate) return void i.itemTemplate(e2, { label: e2.label, value: e2.value, index: i._items.indexOf(e2) });
              if (!i._bindingDetails || 0 === i._bindingDetails.length) return;
              const r2 = i._bindingDetails.length;
              let o, s, n = document.importNode(i._template.content, true);
              for (let t2 = 0; t2 < r2; t2++) {
                o = n.childNodes[i._bindingDetails[t2].childNodeIndex], s = i._bindingDetails[t2].bindingString.length;
                for (let r3 = 0; r3 < s; r3++) {
                  const s2 = i._bindingDetails[t2].bindingString[r3], n2 = s2.indexOf("label") >= 0 ? e2.label : e2.value;
                  o.innerHTML = o.innerHTML.replace(s2, n2);
                }
              }
              e2.innerHTML = "";
              for (let t2 = 0; t2 < n.childNodes.length; t2++) n.childNodes[t2].outerHTML && (e2.innerHTML += n.childNodes[t2].outerHTML);
              false !== t && (i._scrollHeightTimer && (clearInterval(i._scrollHeightTimer), i._scrollHeightCounter = 0), i._scrollHeightTimer = setInterval(function() {
                i._lastScrollHeight === i.$.itemsInnerContainer.scrollHeight && 10 !== i._scrollHeightCounter || (i._refreshLayout(), clearInterval(i._scrollHeightTimer)), i._lastScrollHeight = i.$.itemsInnerContainer.scrollHeight, i._scrollHeightCounter++;
              }, 50));
            }
            _filterItems(e2, t, i) {
              const r2 = this, o = r2.$.filterInput.value;
              let s, n;
              const l = function() {
                if (0 === n.length) return r2._filteredItems = [], void (t && t());
                s = r2._queryItems(o, r2.filterMode);
                for (let e3 = 0; e3 < n.length; e3++) n[e3].hidden = true, n[e3].$ && n[e3].$.addClass("smart-hidden");
                for (let e3 = 0; e3 < s.length; e3++) {
                  const t2 = s[e3];
                  t2.hidden = false, n[e3].$ && t2.$.removeClass("smart-hidden");
                }
                if (r2.grouped && r2.isVirtualized) for (let e3 = 0; e3 < r2._groups.length; e3++) {
                  const t2 = r2._groups[e3], i2 = t2.items;
                  let o2 = true;
                  for (let e4 = 0; e4 < i2.length; e4++) i2[e4].hidden || (o2 = false);
                  o2 && (t2.hidden = true);
                }
                if (r2.grouped && !r2.isVirtualized) for (let e3 = 0; e3 < r2._groups.length; e3++) {
                  const t2 = r2._groups[e3], i2 = [].concat(...t2.querySelectorAll("smart-list-item"));
                  let o2 = true;
                  for (let e4 = 0; e4 < i2.length; e4++) i2[e4].$.hasClass("smart-hidden") || (o2 = false);
                  o2 ? t2.$.addClass("smart-hidden") : t2.$.removeClass("smart-hidden");
                }
                r2._filteredItems = s, r2._refreshLayout(), t && t(), e2 || r2._refreshSelection();
              };
              if ("function" == typeof r2.dataSource) if (o || i) {
                const e3 = function(e4) {
                  (o || i) && r2.isAttached && (r2._updateListBoxAfterQuery = function() {
                    s = n = r2._items, l();
                  }, r2.clearItems(), r2.insert(0, e4));
                }, t2 = r2.dataSource(o, e3);
                if (t2) {
                  if (!o && !i) return;
                  r2._updateListBoxAfterQuery = function() {
                    s = n = r2._items, l();
                  }, r2.clearItems(), r2.insert(0, t2);
                }
              } else r2.clearItems(), s = n = r2._items, l(), r2.$.fireEvent("bindingComplete");
              else {
                if (n = r2._items, 0 === n.length) return;
                l();
              }
            }
            _getNextItem(e2) {
              const t = this._items, i = this._items.length;
              let r2 = Math.max(e2 + 1, 0);
              for (; r2 < i; ) {
                const e3 = t[r2];
                if (!(e3.disabled || e3.hidden || e3.grouped || e3.readonly)) return e3;
                r2++;
              }
              return t[e2];
            }
            _getPreviousItem(e2) {
              const t = this._items;
              let i = Math.max(e2 - 1, 0);
              for (; i > -1; ) {
                const e3 = t[i];
                if (!(e3.disabled || e3.hidden || e3.grouped || e3.readonly)) return e3;
                i--;
              }
              return t[e2];
            }
            get _scrollWidth() {
              const e2 = this, t = e2._items;
              return e2.__scrollWidth || (e2.__scrollWidth = (() => {
                const e3 = this, i = e3.virtualized, r2 = e3.itemMeasureMode;
                let o = 0, s = "";
                function n(t2) {
                  const i2 = e3._createItem({ label: t2 });
                  i2.style.position = "absolute", e3.$.itemsContainer.appendChild(i2), i2.label = t2, i2.style.width = "auto", i2.isCompleted && (i2.$.itemContainer.style.width = "auto");
                  const r3 = getComputedStyle(i2), o2 = parseInt(r3.paddingLeft) + parseInt(r3.paddingRight), s2 = i2.$.itemContainer || i2, n2 = s2.offsetWidth + s2.offsetLeft + o2;
                  return i2.parentNode.removeChild(i2), n2;
                }
                for (let e4 = 0; e4 < t.length; e4++) {
                  const l = t[e4];
                  if (!l.hidden) if ("auto" === r2) {
                    const e5 = i ? l.label : l.textContent.trim();
                    e5.length > s.length && (s = e5);
                  } else o = Math.max(o, n(l.label));
                }
                return "auto" === r2 ? n(s) : o;
              })()), e2.__scrollWidth;
            }
            update(e2, t) {
              const i = this, r2 = i._items[e2];
              if (r2) {
                if ("string" == typeof t) r2.label = t, void 0 === r2.value && (r2.value = t);
                else for (let e3 in t) "selected" === e3 && r2[e3] !== t[e3] ? i.select(r2) : r2[e3] = t[e3], "group" === e3 && i._refreshItems();
                (i.sorted || i.grouped || i.isVirtualized) && (i._refreshItems(), i._refreshSelection());
              } else i.error(i.localize("indexOutOfBound", { elementType: i.nodeName.toLowerCase(), method: "update" }));
            }
            insert(e2, t) {
              const i = this;
              let r2 = [];
              if ((!e2 || e2 < 0) && (e2 = 0), Array.isArray(t)) {
                i.isUpdating++;
                for (let o = 0; o < t.length; o++) {
                  const s = t[o], n = i._createItem(s);
                  r2.push(n), e2 >= i._items.length || 0 === i._items.length ? i.appendChild(n) : i.insertBefore(n, i._items[e2]);
                }
                i.isUpdating--;
              } else {
                const o = i._createItem(t);
                r2.push(o), e2 >= i._items.length || 0 === i._items.length ? i.appendChild(o) : i.insertBefore(o, i._items[e2]);
              }
              r2.length > 0 ? (r2.map((e3) => i._applyTemplate(e3)), i._ensureItemsReady(r2, function() {
                i._refreshItems(), 0 !== i._items.length && (i._updateListBoxAfterQuery && (i._updateListBoxAfterQuery(), delete i._updateListBoxAfterQuery), i._refreshSelection(), i.$.fireEvent("bindingComplete"));
              })) : i._updateListBoxAfterQuery && (i._updateListBoxAfterQuery(), delete i._updateListBoxAfterQuery);
            }
            removeAt(e2) {
              const t = this, i = t._items[e2];
              i ? (i.selected && t.unselect(i), t.isVirtualized ? t._items.splice(e2, 1) : i.parentNode.removeChild(i), t._refreshItems(), t._refreshSelection(), 0 === t.selectedIndexes.length && t._items.length > 0 && ("oneOrMany" !== t.selectionMode && "one" !== t.selectionMode && "oneOrManyExtended" !== t.selectionMode || t.select(t._items[0]))) : t.error(t.localize("indexOutOfBound", { elementType: t.nodeName.toLowerCase(), method: "remove" }));
            }
            _queryItems(e2, t) {
              const i = this, r2 = [], o = function(r3, o2) {
                if (r3.grouped) return r3;
                switch (t) {
                  case "startsWith":
                    if (0 === r3.label.indexOf(o2)) return r3;
                    break;
                  case "startsWithIgnoreCase":
                    if (0 === r3.label.toLowerCase().indexOf(o2.toLowerCase())) return r3;
                    break;
                  case "doesNotContain":
                    if (r3.label.indexOf(o2) < 0) return r3;
                    break;
                  case "doesNotContainIgnoreCase":
                    if (r3.label.toLowerCase().indexOf(o2.toLowerCase()) < 0) return r3;
                    break;
                  case "contains":
                    if (r3.label.indexOf(o2) > -1) return r3;
                    break;
                  case "containsIgnoreCase":
                    if (r3.label.toLowerCase().indexOf(o2.toLowerCase()) > -1) return r3;
                    break;
                  case "equals":
                    if (0 === r3.label.localeCompare(o2)) return r3;
                    break;
                  case "equalsIgnoreCase":
                    if (0 === r3.label.toLowerCase().localeCompare(o2.toLowerCase())) return r3;
                    break;
                  case "endsWith":
                    if (r3.label.endsWith(o2)) return r3;
                    break;
                  case "endsWithIgnoreCase":
                    if (r3.label.toLowerCase().endsWith(o2.toLowerCase())) return r3;
                    break;
                  case "custom":
                    if (i.filterCallback(r3, e2)) return r3;
                }
                return null;
              };
              if (0 === e2.length) return i._items;
              for (let t2 = 0; t2 < i._items.length; t2++) {
                const s = o(i._items[t2], e2);
                s && r2.push(s);
              }
              return r2;
            }
            _select(e2, t) {
              const i = this, r2 = i.selectedIndexes.indexOf(i._indexOf(e2)), o = i.selectedIndexes.slice(0), s = i.selectedValues.slice(0);
              if (e2.selected = true, -1 !== r2) return i._recycle(), false;
              if (o.push(i._indexOf(e2)), s.push(e2.value || e2.label), i.selectedIndexes = o, i.selectedValues = s, i._recycle(), i.$.hiddenInput.value = s.toString(), !i.isCompleted || t || !i.isInitialized || i._propertyChanging) return;
              let n = [];
              if (i._previouslySelectedIndexes) {
                for (let e3 = 0; e3 < i._previouslySelectedIndexes.length; e3++) i.selectedIndexes.indexOf(i._previouslySelectedIndexes[e3]) < 0 && n.push(i._items[i._previouslySelectedIndexes[e3]]);
                delete i._previouslySelectedIndexes;
              }
              return i.$.fireEvent("change", { addedItems: [e2], removedItems: n, selected: e2.selected, disabled: e2.disabled, index: i._indexOf(e2), label: e2.label, value: e2.value }), true;
            }
            _setTopVisibleIndex(e2) {
              const t = this;
              if ("number" == typeof e2 && (t.topVisibleIndex = Math.max(0, e2), e2 = t._items[t.topVisibleIndex]), !e2) return false;
              e2.top !== t.scrollTop && (t.scrollTop = e2.top, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop), t.scrollHeight === t.scrollTop && t._updateTopVisibleIndex());
            }
            _updateTopVisibleIndex() {
              const e2 = this, t = e2.scrollTop + e2._scrollView.verticalScrollBar.offsetHeight - e2.offsetHeight;
              let i;
              if (e2.scrollTop < e2.scrollHeight / 2) {
                for (let r2 = 0; r2 < e2._items.length; r2++) if (e2._items[r2].top >= t) {
                  i = e2._items[r2];
                  break;
                }
              } else for (let r2 = e2._items.length - 1; r2 >= 0 && !(e2._items[r2].top < t); r2--) i = e2._items[r2];
              if (i) {
                const t2 = e2.context;
                e2.context = e2, e2.topVisibleIndex = i.dataIndex, e2.context = t2;
              }
            }
            unselect(e2) {
              const t = this;
              if (!e2) return;
              if ("string" == typeof e2 && !(e2 = t.getItem(e2))) return;
              if ("none" === t.selectionMode) return void t.clearSelection();
              const i = t.selectedIndexes.indexOf(t._indexOf(e2)), r2 = t.selectedIndexes.slice(0), o = t.selectedValues.slice(0);
              return e2.selected = false, i >= 0 && (r2.splice(i, 1), o.splice(i, 1), t.selectedIndexes = r2, t.selectedValues = o, t.$.hiddenInput.value = o.toString(), t.isCompleted && !t._propertyChanging ? (t.$.fireEvent("change", { addedItems: [], removedItems: [e2], selected: e2.selected, disabled: e2.disabled, index: t._indexOf(e2), label: e2.label, value: e2.value }), t._recycle(), true) : void 0);
            }
            _handleItemTemplate(e2) {
              if (null === e2 || !e2) return;
              if ("function" == typeof e2) return e2;
              const t = this;
              if (!("content" in document.createElement("template"))) return t.error(t.localize("htmlTemplateNotSuported", { elementType: t.nodeName.toLowerCase() })), void (t.itemTemplate = null);
              if (null === (e2 = document.getElementById(e2)) || !("content" in e2)) return t.error(t.localize("invalidTemplate", { elementType: t.nodeName.toLowerCase(), property: "itemTemplate" })), void (t.itemTemplate = null);
              const i = e2.content, r2 = i.childNodes.length, o = /{{\w+}}/g;
              let s, n;
              t._bindingDetails = [], t._template = e2;
              for (let e3 = 0; e3 < r2; e3++) {
                for (n = []; s = o.exec(i.childNodes[e3].innerHTML); ) n.push(s[0]);
                n.length > 0 && t._bindingDetails.push({ childNodeIndex: e3, bindingString: n });
              }
              return true;
            }
            _handleKeyStrokes(e2) {
              const t = this, i = "radioButton" === t.selectionMode || "checkBox" === t.selectionMode || "zeroOrMany" === t.selectionMode || "oneOrMany" === t.selectionMode || "zeroOrOne" === t.selectionMode;
              let r2 = t._items;
              if (t.filterable && t.$.filterInput.value.length > 0 && (r2 = t._filteredItems), !t.disabled && !t.readonly && r2.length) {
                switch (e2) {
                  case "ArrowLeft":
                  case "ArrowUp":
                    t._handleArrowKeys(true);
                    break;
                  case "ArrowRight":
                  case "ArrowDown":
                    t._handleArrowKeys(false);
                    break;
                  case " ": {
                    if (t.selectedIndexes.length < 1 && !t._focusedItem) return;
                    const e3 = t._focusedItem ? t._focusedItem : t._items[t.selectedIndexes[t.selectedIndexes.length - 1]], i2 = (e4) => {
                      e4.selected && "radioButton" !== t.selectionMode ? t.unselect(e4) : t.select(e4);
                    };
                    if ("oneOrMany" === t.selectionMode) return void (e3.selected && t.selectedIndexes.length > 1 ? i2(e3) : e3.selected || i2(e3));
                    i2(e3);
                    break;
                  }
                  case "Home":
                    if (0 === r2.length) return;
                    i || (t._keysPressed.Shift || t.clearSelection(), t.select(r2[0])), t._focus(r2[0]), t.scrollTop = 0;
                    break;
                  case "End":
                    if (0 === r2.length) return;
                    i || (t._keysPressed.Shift || t.clearSelection(), t.select(r2[r2.length - 1])), t._focus(r2[r2.length - 1]), t.scrollTop = t.scrollHeight;
                    break;
                  case "PageUp":
                    t._pageUpKeyHandler(r2);
                    break;
                  case "PageDown":
                    t._pageDownKeyHandler(r2);
                }
                t._recycle();
              }
            }
            _horizontalScrollbarHandler(e2) {
              const t = this;
              e2 && e2.stopPropagation && e2.stopPropagation(), t.isVirtualized ? t._recycle() : t.$.itemsContainer.scrollLeft = t._getScrollLeft(e2.detail.value);
            }
            _getScrollLeft(e2, t) {
              const i = this;
              if (!i.rightToLeft) return e2;
              if (Smart.Utilities.Core.Browser.Chrome) {
                if (!t) {
                  const e3 = 2 * (parseInt(getComputedStyle(i.$.itemsInnerContainer).getPropertyValue("--smart-list-item-horizontal-offset")) || 0);
                  t = i._scrollWidth - i.$.itemsContainer.offsetWidth - e3;
                }
                e2 = t - e2;
              } else e2 *= -1;
              return e2;
            }
            _unsort() {
              const e2 = this;
              e2.isUpdating++;
              const t = function(e3, t2) {
                let i = e3.dataIndex, r2 = t2.dataIndex;
                return i < r2 ? -1 : i > r2 ? 1 : 0;
              };
              if (e2.isVirtualized) if (e2._groups.length > 0) {
                e2._groups.sort(t);
                let i = [];
                for (let r2 = 0; r2 < e2._groups.length; r2++) {
                  const o = e2._groups[r2], s = [].concat(...o.items);
                  s.sort(t), i.push(o), i = i.concat(s);
                }
                e2._items = i;
              } else e2._items.sort(t);
              else {
                if (e2._groups.length > 0) {
                  e2._groups.sort(t);
                  let i = [];
                  for (let r2 = 0; r2 < e2._groups.length; r2++) {
                    const o = e2._groups[r2], s = [].concat(...o.querySelectorAll("smart-list-item"));
                    s.sort(t), i = i.concat(s);
                  }
                  e2._items = i;
                } else e2._items.sort(t);
                e2._applySortOrder();
              }
              e2.isUpdating--;
            }
            _applySortOrder() {
              const e2 = function(e3) {
                for (let t = 0; t < e3.length; t++) {
                  const i = e3[t], r2 = i.parentNode;
                  r2 && r2.appendChild(i);
                }
              };
              e2(this._items), e2(this._groups);
            }
            _sort() {
              const e2 = this;
              if (!e2._canSort) return;
              e2.isUpdating++;
              const t = function(t2, i) {
                let r2 = t2.label, o = i.label;
                if ("asc" === e2.sortDirection) {
                  if (r2 < o) return -1;
                  if (r2 > o) return 1;
                } else {
                  if (r2 < o) return 1;
                  if (r2 > o) return -1;
                }
                return 0;
              };
              if (e2._groups.sort(t), e2.isVirtualized) if (e2._groups.length > 0) {
                let i = [];
                for (let r2 = 0; r2 < e2._groups.length; r2++) {
                  const o = e2._groups[r2], s = [].concat(...o.items);
                  i.push(o), s.sort(t), i = i.concat(s);
                }
                e2._items = i;
              } else e2._items.sort(t);
              else {
                if (e2._groups.length > 0) {
                  let i = [];
                  for (let r2 = 0; r2 < e2._groups.length; r2++) {
                    const o = e2._groups[r2], s = [].concat(...o.querySelectorAll("smart-list-item"));
                    s.sort(t), i = i.concat(s);
                  }
                  e2._items = i;
                } else e2._items.sort(t);
                e2._applySortOrder();
              }
              e2.isUpdating--;
            }
            getItem(e2) {
              const t = this;
              for (let i = 0; i < t._items.length; i++) if (t._items[i].value === e2) return t._items[i];
              return null;
            }
            _focus(e2) {
              const t = this;
              !e2 || "none" === t.selectionMode || t.disabled || t.readonly || (t._focusedItem && (t._focusedItem._focused = false), t._focusedItem = e2, t._focusedItem._focused = true);
            }
            _keyDownHandler(e2) {
              const t = this, i = (t.shadowRoot || t.getRootNode()).activeElement || document.activeElement;
              let r2 = e2.key;
              if (e2.metaKey && (r2 = "Control"), !t.disabled && !t.readonly && (!t.filterable || t.$.filterInput !== i) && t._focused && 0 !== t._items.length && !t.disabled && !t.displayLoadingIndicator) {
                if (t.editable) {
                  if ("F2" === r2) return void t._dblclickEventHandler({ target: t._focusedItem });
                  if (t.$.editInput === i) return;
                }
                if ("none" !== t.selectionMode) {
                  switch (e2.stopPropagation(), r2) {
                    case "Down":
                    case "Right":
                    case "Left":
                    case "Up":
                      r2 = "Arrow" + r2;
                  }
                  if (t.filterable) switch (r2) {
                    case "ArrowLeft":
                    case "ArrowRight":
                      return;
                    case "ArrowUp":
                    case "ArrowDown":
                      e2.preventDefault();
                  }
                  if (t._applyIncrementalSearch(r2), !(["Shift", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Control", " ", "Home", "End", "PageUp", "PageDown"].indexOf(r2) < 0)) if (e2.preventDefault(), !t._focusedItem && t._items.length > 0) "one" === t.selectionMode || "oneOrMany" === t.selectionMode || "oneOrManyExtended" === t.selectionMode ? t.select(t._items[0]) : t._focus(t._items[0]);
                  else switch (t.selectionMode) {
                    case "one":
                    case "zeroAndOne":
                      if ("Shift" === r2 || "Control" === r2 || " " === r2) return;
                      t._handleKeyStrokes(r2);
                      break;
                    case "oneOrMany":
                    case "zeroOrOne":
                    case "zeroOrMany":
                    case "radioButton":
                    case "checkBox":
                      if ("Shift" === r2 || "Control" === r2) return;
                      t._handleKeyStrokes(r2);
                      break;
                    case "oneOrManyExtended":
                      if (" " === r2) return;
                      t._keysPressed[r2] = "keydown" === e2.type, t._handleKeyStrokes(r2);
                  }
                }
              }
            }
            _keyUpHandler(e2) {
              const t = this, i = (t.shadowRoot || t.getRootNode()).activeElement || document.activeElement;
              if (!t.editable || t.$.editInput !== i) {
                if (t.filterable && t.$.filterInput === i) return t._filterTimer && clearTimeout(t._filterTimer), void (t._filterTimer = setTimeout(function() {
                  const e3 = t.context;
                  t.context = t, t._filterItems(), t.scrollTop = t.$.itemsContainer.scrollTop = 0, t.scrollLeft = t.$.itemsContainer.scrollLeft = t._getScrollLeft(0), t.context = e3;
                }, 300));
                if (t._focused) {
                  if (t._focusedItem && t._focusedItem.hidden && t._filteredItems.length > 0) {
                    let e3 = t._filteredItems[0];
                    e3.grouped && t._filteredItems.length > 1 && (e3 = t._filteredItems[1]), t._focus(e3), t._recycle();
                  }
                  e2.stopPropagation(), e2.preventDefault(), t.disabled || ("Escape" === e2.key && Smart.ListBox.DragDrop.Dragging && t._cancelDrag(), ["Shift", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Control", " ", "PageUp", "PageDown"].indexOf(e2.key) < 0 || (t._keysPressed[e2.key] = false));
                }
              }
            }
            _cancelDrag() {
              if (!Smart.ListBox.DragDrop.Dragging) return;
              Smart.ListBox.DragDrop.Feedback.parentNode && Smart.ListBox.DragDrop.Feedback.parentNode.removeChild(Smart.ListBox.DragDrop.Feedback);
              const e2 = Smart.ListBox.DragDrop.Item, t = e2.ownerListBox;
              if (t.$.fireEvent("dragCancel", { item: e2, data: Smart.ListBox.DragDrop, container: t, previousContainer: t }), Smart.ListBox.DragDrop.Feedback = null, Smart.ListBox.DragDrop.DropDetails) {
                let e3 = Smart.ListBox.DragDrop.DropDetails.item;
                e3 && (e3.$.removeClass("smart-list-item-line-feedback"), e3.$.removeClass("smart-list-item-bottom-line-feedback"));
              }
              document.body.classList.remove("smart-dragging"), delete Smart.ListBox.DragDrop.DraggedFrom, Smart.ListBox.DragDrop.Dragging = false, Smart.ListBox.DragDrop.Item = null, Smart.ListBox.DragDrop.DropDetails = null;
            }
            _mouseWheelHandler(e2) {
              const t = this;
              if ((t.computedHorizontalScrollBarVisibility || t.computedVerticalScrollBarVisibility) && !t.disabled && t.computedVerticalScrollBarVisibility) {
                const i = t.scrollTop;
                if (0 === i && e2.deltaY < 0 || i === t.scrollHeight && e2.deltaY > 0) return;
                e2.stopPropagation(), e2.preventDefault(), t.scrollTo(i + t._getScrollCoefficient(e2, t.offsetHeight));
              }
            }
            _pageDownKeyHandler(e2) {
              const t = this;
              if (0 === e2.length) return;
              let i, r2 = t._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              if ("checkBox" !== t.selectionMode && "radioButton" !== t.selectionMode && "zeroOrMany" !== t.selectionMode && "oneOrMany" !== t.selectionMode && "zeroOrOne" !== t.selectionMode || t._focusedItem && (r2 = t._focusedItem), !r2) return;
              const o = t._indexOf(r2);
              let s = r2.top + t.$.itemsContainer.offsetHeight - r2.height;
              for (let t2 = o; t2 < e2.length; t2++) if (e2[t2].top >= s) {
                i = e2[t2];
                break;
              }
              i || (i = e2[e2.length - 1]), "checkBox" === t.selectionMode || "radioButton" === t.selectionMode || "zeroOrMany" === t.selectionMode || "oneOrMany" === t.selectionMode || "zeroOrOne" === t.selectionMode ? t._focus(i) : i.selected || (t._keysPressed.Shift || t.clearSelection(), t.select(i), t._focus(i)), (i.height + i.top > t.$.itemsContainer.scrollTop + t.$.itemsContainer.offsetHeight || i.top < t.$.itemsContainer.scrollTop) && (t.scrollTop = i.top - t.$.itemsContainer.offsetHeight + i.height);
            }
            _pageUpKeyHandler(e2) {
              const t = this;
              if (0 === e2.length) return;
              let i = t._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              if ("checkBox" !== t.selectionMode && "radioButton" !== t.selectionMode && "zeroOrMany" !== t.selectionMode && "oneOrMany" !== t.selectionMode && "zeroOrOne" !== t.selectionMode || t._focusedItem && (i = t._focusedItem), !i) return;
              const r2 = i.top - t.$.itemsContainer.offsetHeight;
              let o;
              for (let s = t._indexOf(i); s > 0; s--) if (e2[s].top <= r2) {
                o = e2[s];
                break;
              }
              o || (o = e2[0]), "checkBox" === t.selectionMode || "radioButton" === t.selectionMode || "zeroOrMany" === t.selectionMode || "oneOrMany" === t.selectionMode || "zeroOrOne" === t.selectionMode ? t._focus(o) : o.selected || (t._keysPressed.Shift || t.clearSelection(), t.select(o), t._focus(o)), t.scrollTop = o.top, 0 === t._indexOf(o) && (t.scrollTop = 0);
            }
            clearItems() {
              const e2 = this;
              e2.clearSelection(), e2.$.itemsInnerContainer.innerHTML = "", e2._items = [], delete e2._focusedItem, e2.$placeholder.removeClass("smart-hidden"), e2.refresh();
            }
            _resizeHandler(e2) {
              this.refresh(e2);
            }
            refresh(e2) {
              const t = this;
              if (!e2 && !t._isUpdatingScrollBars && t.isInitialized) return t._isUpdatingScrollBars = true, t._initializeRecyclingItems(), t._refreshLayout(), void (t._isUpdatingScrollBars = false);
              e2 && e2.target === t && !t._isUpdatingScrollBars && (t._isUpdatingScrollBars = true, t._initializeRecyclingItems(), t._refreshLayout(), t._isUpdatingScrollBars = false);
            }
            _indexOf(e2) {
              const t = this;
              if (!e2) return -1;
              let i = t._items.indexOf(e2);
              return -1 === i && (i = t._items.indexOf(t.getItem(e2.value))), i;
            }
            _incrementalSearch() {
              const e2 = this, t = "radioButton" !== e2.selectionMode && "checkBox" !== e2.selectionMode && "zeroOrMany" !== e2.selectionMode && "oneOrMany" !== e2.selectionMode && "zeroOrOne" !== e2.selectionMode;
              let i, r2 = 0;
              switch (e2.incrementalSearchMode) {
                case "containsIgnoreCase":
                case "equalsIgnoreCase":
                case "startsWithIgnoreCase":
                case "endsWithIgnoreCase":
                  i = e2._incrementalSearchQuery.toLowerCase();
                  break;
                default:
                  i = e2._incrementalSearchQuery;
              }
              const o = function(i2) {
                i2.grouped || i2.readonly || (t ? (e2.selectedIndexes.length > 0 && e2.clearSelection(), e2._focus(i2), e2.select(i2)) : e2._focus(i2), (i2.height + i2.top > e2.$.itemsContainer.scrollTop + e2.$.itemsContainer.offsetHeight || i2.top < e2.scrollTop) && (e2.scrollTop = i2.top), 0 === e2._indexOf(i2) && (e2.scrollTop = 0), e2._indexOf(i2) === e2._items.length - 1 && (e2.scrollTop = e2.scrollHeight));
              };
              0 !== e2._previousEntry.localeCompare(i) && (e2._incrementalSearchItems = e2._queryItems(e2._incrementalSearchQuery, e2.incrementalSearchMode), delete e2._itemPosition), e2._previousEntry = i;
              const s = e2._incrementalSearchItems.length;
              if (0 !== s) if (1 !== s) for (void 0 !== e2._itemPosition ? e2._itemPosition < s - 1 ? r2 = e2._itemPosition : (r2 = 0, t ? (e2._incrementalSearchItems[e2._itemPosition].selected = false, e2.selectedIndexes = [], e2.selectedValues = []) : e2._incrementalSearchItems[e2._itemPosition]._focused = false) : t && e2.clearSelection(); r2 < s; r2++) if (e2._incrementalSearchItems[r2].selected && t) e2._incrementalSearchItems[r2].selected = false, e2.selectedIndexes = [], e2.selectedValues = [];
              else {
                if (t || !e2._incrementalSearchItems[r2]._focused) return o(e2._incrementalSearchItems[r2]), void (e2._itemPosition = r2);
                e2._incrementalSearchItems[r2]._focused = false;
              }
              else o(e2._incrementalSearchItems[0]);
            }
            _selectStartHandler(e2) {
              const t = this, i = (t.shadowRoot || t.getRootNode()).activeElement;
              t.$.filterInput !== i && t.$.editInput !== i && e2.preventDefault();
            }
            _handleArrowKeys(e2) {
              const t = this, i = "radioButton" !== t.selectionMode && "checkBox" !== t.selectionMode && "zeroOrMany" !== t.selectionMode && "oneOrMany" !== t.selectionMode && "zeroOrOne" !== t.selectionMode;
              if (t.disabled || t.readonly) return;
              let r2;
              if (t._focusedItem && !t._keysPressed.Shift) r2 = t._indexOf(t._focusedItem), t._focusedItem._focused = false;
              else {
                if (0 === t.selectedIndexes.length) return;
                r2 = t.selectedIndexes[t.selectedIndexes.length - 1];
              }
              const o = e2 ? t._getPreviousItem(r2) : t._getNextItem(r2);
              t._focus(o), i && (t._keysPressed.Shift ? t.select(o) : t._items[r2] !== o && (t.clearSelection(), t.select(o))), t.ensureVisible(o);
            }
            _refreshFilter() {
              const e2 = this;
              if (e2.filterable) return e2.$.filterInput.disabled = !(!e2.disabled && !e2.displayLoadingIndicator), e2.$filterInputContainer.removeClass("smart-hidden"), void e2.$itemsContainer.addClass("filter");
              e2.$.filterInput.disabled = true, e2.$filterInputContainer.addClass("smart-hidden"), e2.$itemsContainer.removeClass("filter");
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.removeAttribute("tabindex") : e2.tabIndex = e2.tabIndex > 0 ? e2.tabIndex : 0;
            }
            _setLoadingIndicatorVisibility() {
              const e2 = this;
              e2.displayLoadingIndicator ? e2.$loadingIndicatorContainer.hasClass("smart-visibility-hidden") ? e2.$loadingIndicatorContainer.removeClass("smart-visibility-hidden") : e2.$loadingIndicatorContainer.removeClass("smart-hidden") : e2._areCSSVarsSupported ? e2.$loadingIndicatorContainer.addClass("smart-hidden") : e2.$loadingIndicatorContainer.addClass("smart-visibility-hidden");
            }
            _refreshLayout() {
              const e2 = this, t = e2._filteredItems || e2._items;
              if (e2.__scrollHeight = null, e2.__scrollWidth = null, e2._height = null, e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar)), e2.$itemsContainer.removeClass("hscroll"), e2.$itemsContainer.removeClass("vscroll"), !t || null === t || 0 === t.length) return e2.scrollWidth = 0, e2.scrollHeight = 0, e2.$filterInputContainer.removeClass("vscroll"), e2.$placeholder.removeClass("smart-hidden"), e2.isVirtualized && e2._recycle(), void (e2.$.itemsInnerContainer.style.width = "");
              e2.$placeholder.addClass("smart-hidden");
              const i = 2 * (parseInt(getComputedStyle(e2.$.itemsContainer).getPropertyValue("--smart-list-item-horizontal-offset")) || 0);
              let r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - i, o = e2._scrollHeight;
              if (e2._refreshHorizontalScrollBarVisibility(r2), e2._refreshVerticalScrollBarVisibility(o), e2.$.itemsInnerContainer.style.width = "", "hidden" === e2.horizontalScrollBarVisibility ? e2.$.itemsInnerContainer.style.width = e2.$.itemsContainer.offsetWidth - i : e2.$.itemsInnerContainer.style.width = Math.max(e2.$.itemsContainer.offsetWidth - i, -i + e2.__scrollWidth) + "px", e2.computedVerticalScrollBarVisibility) return r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - i, e2._refreshHorizontalScrollBarVisibility(r2), "hidden" !== e2.horizontalScrollBarVisibility && (e2.$.itemsInnerContainer.style.width = "", e2.$.itemsInnerContainer.style.width = Math.max(e2.$.itemsContainer.offsetWidth - i, -i + e2.__scrollWidth) + "px"), e2.computedHorizontalScrollBarVisibility && (("visible" !== e2.horizontalScrollBarVisibility || 0 !== e2.scrollWidth || "visible" === e2.horizontalScrollBarVisibility) && (e2.__scrollHeight += e2._scrollView.hScrollBar.offsetHeight), e2.scrollHeight = e2.__scrollHeight, e2._scrollView.hScrollBar.$.hasClass("bottom-corner") && e2._scrollView.hScrollBar.refresh()), void (e2.isVirtualized && e2._recycle());
              r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - i, e2._refreshHorizontalScrollBarVisibility(r2), e2.computedHorizontalScrollBarVisibility && (e2.scrollHeight = e2._scrollHeight, e2._refreshVerticalScrollBarVisibility(e2.scrollHeight), e2.computedVerticalScrollBarVisibility && (r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - e2._scrollView.vScrollBar.offsetWidth, e2._refreshHorizontalScrollBarVisibility(r2)), e2._scrollView.vScrollBar.$.hasClass("bottom-corner") && e2._scrollView.vScrollBar.refresh(), e2._scrollView.hScrollBar.$.hasClass("bottom-corner") && e2._scrollView.hScrollBar.refresh()), e2.isVirtualized && e2._recycle();
              const s = /Trident|Edge/.test(navigator.userAgent);
              !e2.isRefreshing && s && setTimeout(function() {
                e2.isRefreshing = true, e2._refreshLayout(), e2.isRefreshing = false;
              }, 50);
            }
            _styleChangedHandler() {
              this._refreshLayout();
            }
            _swipeLeftHandler() {
            }
            _swipeRightHandler() {
            }
            _refreshHorizontalScrollBarVisibility(e2) {
              const t = this;
              t.scrollWidth = e2, t.computedHorizontalScrollBarVisibility ? (t.scrollLeft = t._getScrollLeft(t.$.itemsContainer.scrollLeft, e2), t.$itemsContainer.addClass("hscroll")) : t.$itemsContainer.removeClass("hscroll");
            }
            _refreshVerticalScrollBarVisibility(e2) {
              const t = this;
              t.scrollHeight = e2, t.computedVerticalScrollBarVisibility ? (t.$itemsContainer.addClass("vscroll"), t.$filterInputContainer.addClass("vscroll")) : (t.$itemsContainer.removeClass("vscroll"), t.$filterInputContainer.removeClass("vscroll"));
            }
            _validateTemplate(e2, t) {
              if (null === t || !t) return;
              const i = this;
              return "content" in document.createElement("template") ? null !== (t = document.getElementById(t)) && "content" in t ? t : (i.error(i.localize("invalidTemplate", { elementType: i.nodeName.toLowerCase(), property: e2 })), void (i[e2] = null)) : (i.error(i.localize("htmlTemplateNotSuported", { elementType: i.nodeName.toLowerCase() })), void (i[e2] = null));
            }
            _getItemIndexByPosition(e2) {
              const t = this;
              return ((i) => {
                let r2 = 0, o = i.length - 1;
                if (e2 <= 0) return 0;
                if (i[i.length - 1].top <= e2) return i.length - 1;
                for (; ; ) {
                  const s = Math.floor((r2 + o) / 2), n = i[s];
                  if (t._isItemInPosition(n, e2)) return s;
                  n.top < e2 ? r2 = s + 1 : n.top > e2 && (o = s - 1);
                }
              })(t.filterable && t.$.filterInput.value.length > 0 ? t._filteredItems : t._items);
            }
            _isItemInPosition(e2, t) {
              const i = e2.top, r2 = e2.top + e2.height;
              return i <= t && r2 > t;
            }
            get isVirtualized() {
              const e2 = this;
              return e2.virtualized && e2.dataSource && e2.dataSource.length > 0;
            }
            _recycle() {
              const e2 = this;
              if (!e2._recyclingItems) return;
              let t = e2._height;
              e2._height || (t = e2._height = e2.$.itemsContainer.offsetHeight);
              let i = 0;
              const r2 = e2.scrollTop, o = e2._getItemIndexByPosition(r2), s = e2.filterable && e2.$.filterInput.value.length > 0 ? e2._filteredItems : e2._items, n = s[o];
              let l = n ? n.top : 0;
              if (e2.$.itemsInnerContainer.style.left = -e2.scrollLeft + "px", e2.$.itemsInnerContainer.style.top = -r2 + l + "px", e2.isUpdating++, o >= 0) {
                const n2 = s.length;
                for (let a2 = o; a2 < n2; a2++) {
                  const o2 = s[a2];
                  if (0 !== o2.height) {
                    if (!(l + o2.height >= r2 && l <= r2 + t)) break;
                    {
                      const t2 = e2._recyclingItems[i++];
                      if (!t2) break;
                      t2.setAttribute("aria-setsize", n2), t2.setAttribute("aria-posinset", a2), t2.context = document, t2.dataItem = o2, t2.label = o2.label, t2.value = o2.value, t2.selected = o2.selected, t2._focused = o2._focused, t2.hidden = o2.hidden, t2.grouped = o2.grouped, t2.readonly = o2.readonly, t2.style.height = o2.height + "px", e2._alternateItem(t2), o2.title ? t2.title = o2.title : t2.title = "", o2.grouped ? t2.displayMode = "plain" : t2.displayMode = o2.displayMode, e2.scrollWidth > 0 && (t2.style.width = e2.$.itemsInnerContainer.offsetWidth + e2.scrollWidth + "px"), e2.itemTemplate && e2._handleItemTemplate(e2.itemTemplate) && e2._applyTemplate(t2, false);
                    }
                    l += o2.height;
                  }
                }
              }
              if (i < e2._recyclingItems.length) for (let t2 = i; t2 < e2._recyclingItems.length; t2++) {
                const t3 = e2._recyclingItems[i++], r3 = t3.context;
                t3.context = document, t3.hidden = true, t3.context = r3;
              }
              e2.isUpdating--;
            }
            _verticalScrollbarHandler(e2) {
              const t = this, i = e2.detail.value;
              e2 && e2.stopPropagation && e2.stopPropagation(), t.isVirtualized ? t._recycle() : t.$.itemsContainer.scrollTop = i, t._updateTopVisibleIndex(), e2.context.max !== e2.context.value ? e2.context.min === e2.context.value && t.$.fireEvent("scrollTopReached") : t.$.fireEvent("scrollBottomReached");
            }
            _applyAriaSelected() {
              const e2 = this, t = e2.isVirtualized ? e2._recyclingItems : e2._items, i = e2.selectionMode;
              for (let e3 = 0; e3 < t.length; e3++) {
                const r2 = t[e3];
                r2.selected ? r2.setAttribute("aria-selected", true) : r2.readonly || r2.disabled || -1 === ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox"].indexOf(i) ? r2.removeAttribute("aria-selected") : r2.setAttribute("aria-selected", false);
              }
            }
          });
        }
      ),
      /***/
      1115: (
        /***/
        () => {
          Smart("smart-multiline-text-box", class extends Smart.TextBox {
            static get properties() {
              return { autoCapitalize: { value: "none", allowedValues: ["none", "words", "characters"], type: "string" }, autoComplete: { value: "off", allowedValues: ["on", "off"], type: "string" }, autoExpand: { value: false, type: "boolean" }, cols: { value: 20, type: "number?" }, enterKeyBehavior: { value: "newLine", allowedValues: ["submit", "clearOnSubmit", "newLine"], type: "string" }, horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, minLength: { value: 0, type: "number" }, resizable: { value: false, type: "boolean" }, rows: { value: 5, type: "number?" }, selectionDirection: { value: "none", allowedValues: ["forward", "backward", "none"], type: "string" }, selectionEnd: { value: 0, reflectToAttribute: false, type: "number" }, selectionStart: { value: 0, reflectToAttribute: false, type: "number" }, spellCheck: { value: false, type: "boolean" }, type: { value: "textarea", type: "string", defaultReflectToAttribute: true, readonly: true }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, wrap: { value: "soft", allowedValues: ["hard", "soft", "off"], type: "string" } };
            }
            static get styleUrls() {
              return ["smart.textbox.css", "smart.multilinetextbox.css"];
            }
            static get listeners() {
              return { "document.mousemove": "_documentSelectionOutsideHandler", "container.resize": "_handleScrollbarsDisplay", "document.move": "_resizeMoveHandler", "document.up": "_upHandler", focus: "_focusHandler", "horizontalScrollBar.change": "_horizontalScrollbarHandler", keydown: "_keyDownHandler", mouseenter: "_mouseEventsHandler", mouseleave: "_mouseEventsHandler", resize: "_handleScrollbarsDisplay", "resizeElement.down": "_resizeDownHandler", styleChanged: "_handleScrollbarsDisplay", "input.change": "_textBoxChangeHandler", "input.focus": "_focusHandler", "input.blur": "_blurHandler", "input.keydown": "_textBoxKeyDownHandler", "input.keyup": "_keyUpHandler", "input.paste": "_textBoxChangeHandler", "input.select": "_textBoxSelectHandler", "input.touchmove": "_inputTouchmoveHandler", "input.touchstart": "_inputTouchstartHandler", wheel: "_mouseWheelHandler", "verticalScrollBar.change": "_verticalScrollbarHandler" };
            }
            attached() {
              const e2 = this;
              super.attached(), e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2.$.input, e2.$.horizontalScrollBar, e2.$.verticalScrollBar));
            }
            detached() {
              const e2 = this;
              super.detached(), e2._scrollView && (e2._scrollView.unlisten(), delete e2._scrollView);
            }
            static get requires() {
              return { "Smart.ScrollBar": "smart.scrollbar.js" };
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span id="label" class="smart-label">[[label]]</span>\n                    <div id="innerContainer" class="smart-inner-container" role="presentation">\n                            <textarea class="smart-input" id="input"\n                                autocapitalize="[[autoCapitalize]]"\n                                autocomplete="off"\n                                cols="[[cols]]"\n                                disabled="[[disabled]]"\n                                maxlength="[[maxLength]]"\n                                minlength="[[minLength]]"\n                                name="[[name]]"\n                                placeholder="[[placeholder]]"\n                                readonly="[[readonly]]"\n                                required="[[required]]"\n                                rows="[[rows]]"\n                                spellcheck="[[spellCheck]]"\n                                wrap="[[wrap]]"\n                                aria-label="[[placeholder]]"\n                                autocomplete="[[inputPurpose]]"></textarea>\n                            <smart-scroll-bar id="verticalScrollBar" theme="[[theme]]" right-to-left="[[rightToLeft]]" animation="[[animation]]" disabled="[[disabled]]" orientation="vertical"></smart-scroll-bar>\n                            <smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" right-to-left="[[rightToLeft]]" animation="[[animation]]" disabled="[[disabled]]"></smart-scroll-bar>\n                            <div id="resizeElement" class="smart-resize-element" aria-label="Resize"></div>\n\n                            <textarea id="textBoxHidden"\n                            class="smart-text-box-hidden"\n                            autocapitalize="[[autoCapitalize]]"\n                            autocomplete="off"\n                            cols="[[cols]]"\n                            disabled="[[disabled]]"\n                            inner-h-t-m-l="[[value]]"\n                            maxlength="[[maxLength]]"\n                            minlength="[[minLength]]"\n                            name="[[name]]"\n                            placeholder="[[placeholder]]"\n                            readonly="[[readonly]]"\n                            required="[[required]]"\n                            rows="[[rows]]"\n                            spellcheck="[[spellCheck]]"\n                            wrap="[[wrap]]"></textarea>\n                    </div>\n                    <span id="hint" class="smart-hidden smart-hint">[[hint]]</span>\n                </div>';
            }
            propertyChangedHandler(e2, t, l) {
              const a2 = this;
              switch (e2) {
                case "autoExpand":
                  a2._autoExpandUpdate();
                  break;
                case "displayMode":
                  switch (l) {
                    case "escaped":
                      a2.$.input.value = a2._toEscapedDisplayMode(a2.value);
                      break;
                    default:
                      a2.$.input.value = a2.value = a2._toDefaultDisplayMode(a2.$.input.value);
                  }
                  a2._autoExpandUpdate(), a2._handleScrollbarsDisplay();
                  break;
                case "value":
                  switch (a2._preventProgramaticValueChange ? (a2._userValue = "escaped" === a2.displayMode ? a2._toDefaultDisplayMode(a2.$.input.value) : a2.$.input.value, a2._programmaticValue = l) : a2._userValue = a2._programmaticValue = l, a2.displayMode) {
                    case "escaped":
                      a2.$.input.value = a2._toEscapedDisplayMode(a2._userValue);
                      break;
                    default:
                      a2.$.input.value = a2._userValue;
                  }
                  a2._oldValue = t, a2._autoExpandUpdate(), a2._handleScrollbarsDisplay();
                  break;
                case "horizontalScrollBarVisibility":
                case "verticalScrollBarVisibility":
                case "singleLine":
                case "wrap":
                case "resizable":
                case "placeholder":
                  a2._autoExpandUpdate(), a2._handleScrollbarsDisplay();
                  break;
                case "selectionEnd":
                case "selectionStart":
                  a2._handleSelectedText();
                  break;
                case "rows":
                case "cols":
                  a2._updateSizeRowsCols();
                  break;
                case "disabled":
                  a2._setFocusable(), a2._ariaPropertyChangedHandler("disabled", l);
                  break;
                case "animation":
                  break;
                case "readonly":
                  a2._ariaPropertyChangedHandler("readonly", l);
                  break;
                default:
                  super.propertyChangedHandler(e2, t, l);
              }
            }
            selection(e2) {
              const t = this;
              let l = t.$.input.selectionStart, a2 = t.$.input.selectionEnd, i = t.value;
              return "escaped" === t.displayMode ? (i = t.$.input.value.substring(l, a2), "escaped" === e2 ? i : t._toDefaultDisplayMode(i)) : "escaped" === e2 ? (i = i.substring(l, a2), t._toEscapedDisplayMode(i)) : (i = i.substring(l, a2), i);
            }
            select(e2, t) {
              const l = this, a2 = Array.from(arguments).slice(0, 2);
              let i, n;
              for (let e3 in a2) a2[e3] = parseInt(a2[e3]) || 0;
              return 2 === a2.length ? (i = Math.min([e2, t]), n = Math.max([e2, t])) : i = a2[0], 2 === a2.length ? (i = parseInt(i), i = i > 0 ? i < l.$.input.length ? l.$.input.length : i : 0, n < i ? n = i : n > l.$.input.length && (i = 0), l.$.input.focus(), void l.$.input.setSelectionRange(i, n)) : 1 === a2.length ? (l.$.input.focus(), void l.$.input.setSelectionRange(i, i + 1)) : void l.$.input.select();
            }
            _autoExpandUpdate() {
              const e2 = this, t = e2.$.input, l = e2.$.textBoxHidden, a2 = e2.$.verticalScrollBar;
              if (!e2.autoExpand) return void (t.style.height = a2.style.height = l.style.height = null);
              const i = parseFloat(window.getComputedStyle(e2).getPropertyValue("max-height"));
              l.style.height = 0, l.value = t.value;
              let n = 0;
              e2.resizeTrigger && (n = e2.resizeTrigger.clientHeight, n === e2.clientHeight && (n = 0)), t.style.height = a2.style.height = (isNaN(i) ? l.scrollHeight : Math.min((i || 0) - n, l.scrollHeight)) + "px";
            }
            _blurHandler() {
              const e2 = this;
              e2._outsideAutoScroll && clearInterval(e2._outsideAutoScroll), e2.removeAttribute("focus"), e2._preventProgramaticValueChange = false, e2._oldValue = e2.value, e2.value = e2._userValue || e2.value, e2.$.fireEvent("blur");
            }
            _createElement() {
              const e2 = this;
              e2.$.input.id || (e2.$.input.id = e2.id + "Input"), e2.autoFocus && (navigator.userAgent.match(/Edge/) ? setTimeout(function() {
                e2.$.input.focus(), e2.setAttribute("focus", "");
              }, 10) : (e2.$.input.focus(), e2.setAttribute("focus", "")));
              const t = e2.$.input.innerHTML;
              e2.value ? e2.$.input.innerHTML = "escaped" === e2.displayMode ? e2._toEscapedDisplayMode(e2.value) : e2.value : t.length > 0 && "escaped" === e2.displayMode ? (e2.value = t, e2.$.input.innerHTML = e2._toEscapedDisplayMode(t)) : t.length > 0 && (e2.value = t), e2._setFocusable(), e2._syncTextBoxContentOnInitialization(), e2._scrollView = new Smart.Utilities.Scroll(e2.$.input, e2.$.horizontalScrollBar, e2.$.verticalScrollBar), e2._autoExpandUpdate(), e2._handleScrollbarsDisplay(), e2._initializationValue = e2._oldValue = e2.value, e2.value.length > 0 ? e2.$.addClass("has-value") : e2.$.removeClass("has-value"), e2._handleHintContainer(), e2.setAttribute("role", "textbox"), e2.setAttribute("aria-multiline", true), e2.setAttribute("aria-describedby", e2.$.hint.id), e2.setAttribute("aria-labelledby", e2.$.label.id), e2.$.verticalScrollBar.setAttribute("aria-controls", e2.$.input.id), e2.$.horizontalScrollBar.setAttribute("aria-controls", e2.$.input.id);
            }
            _handleScrollbarsDisplay(e2) {
              const t = this, l = t.$.input;
              requestAnimationFrame(() => {
                switch (t._autoExpandUpdate(), t.horizontalScrollBarVisibility) {
                  case "disabled":
                    t.$container.addClass("hscroll"), t.$.horizontalScrollBar.disabled = true;
                    break;
                  case "hidden":
                    t.$container.removeClass("hscroll");
                    break;
                  case "visible":
                    t.$container.addClass("hscroll"), t._scrollView.scrollWidth = l.scrollWidth - l.clientWidth, t._scrollView.scrollTo(t.$.input.scrollLeft, true), t.$.horizontalScrollBar.disabled = false;
                    break;
                  default:
                    l.scrollWidth > l.clientWidth ? (t.$container.addClass("hscroll"), t._scrollView.scrollWidth = l.scrollWidth - l.clientWidth, e2 && "resize" === e2.type ? t.$.input.scrollLeft = t._scrollView.scrollLeft : t._scrollView.scrollTo(t.$.input.scrollLeft, true)) : t.$container.removeClass("hscroll"), t.$.horizontalScrollBar.disabled = false;
                }
                switch (t.verticalScrollBarVisibility) {
                  case "disabled":
                    t.$container.addClass("vscroll"), t.$.verticalScrollBar.disabled = true;
                    break;
                  case "hidden":
                    t.$container.removeClass("vscroll");
                    break;
                  case "visible":
                    t.$container.addClass("vscroll"), t._scrollView.scrollHeight = l.scrollHeight - l.clientHeight, t._scrollView.scrollTo(t.$.input.scrollTop), t.$.verticalScrollBar.disabled = false;
                    break;
                  default:
                    l.scrollHeight > l.clientHeight ? (t.$container.addClass("vscroll"), t._scrollView.scrollHeight = l.scrollHeight - l.clientHeight, e2 && "resize" === e2.type ? t.$.input.scrollTop = t._scrollView.scrollTop : t._scrollView.scrollTo(t.$.input.scrollTop)) : t.$container.removeClass("vscroll"), t.$.verticalScrollBar.disabled = false;
                }
              });
            }
            _focusHandler(e2) {
              const t = this;
              if (!t.disabled) {
                if (e2.target === t) return t.$.input.focus(), void (t._edgeSelect = false);
                if (t.setAttribute("focus", ""), t.selectAllOnFocus) if (navigator.userAgent.match(/Edge/)) {
                  const e3 = t.$.input.scrollTop;
                  if (t._edgeSelect) return void (t._edgeSelect = false);
                  setTimeout(function() {
                    t._edgeSelect = true, t.$.input.select(), t.$.input.scrollTop = e3;
                  }, 5);
                } else t.$.input.select();
                t.$.fireEvent("focus");
              }
            }
            _getScrollLeft(e2, t) {
              const l = this;
              return l.rightToLeft ? (Smart.Utilities.Core.Browser.Chrome ? (t || (t = l.$.input.scrollWidth - l.$.input.offsetWidth), e2 = t - e2) : e2 *= -1, e2) : e2;
            }
            _horizontalScrollbarHandler(e2) {
              const t = this;
              t.disabled || "hidden" === t.horizontalScrollBarVisibility || "disabled" === t.horizontalScrollBarVisibility || (e2.stopPropagation(), t.$.input.scrollLeft = t._getScrollLeft(e2.detail.value));
            }
            _keyDownHandler(e2) {
              const t = this, l = e2.key, a2 = e2.shiftKey, i = e2.ctrlKey, n = t.$.input.value;
              function r2(l2) {
                let a3 = t.$.input.selectionStart, i2 = t.$.input.selectionEnd, n2 = t.$.input.value;
                e2.preventDefault(), t.$.input.value = n2.substring(0, a3) + l2 + n2.substring(i2, n2.length), t.value = t._toDefaultDisplayMode(t.$.input.value), t.$.input.selectionStart = a3 + 2, t.$.input.selectionEnd = a3 + 2;
              }
              if (t.allowVerticalScrollbar && t.$.input.selectionEnd > t.$.input.value.length - 5 && t._scrollView.scrollTo(t._scrollView.scrollTop + (e2.deltaY < 0 ? -t.offsetHeight : t.offsetHeight)), l.indexOf("Arrow") > -1) e2.stopPropagation();
              else switch (l) {
                case "Enter":
                  if ("newLine" === t.enterKeyBehavior && !i && !a2 || "newLine" !== t.enterKeyBehavior && (i || a2)) {
                    "escaped" === t.displayMode && r2("\\n");
                    break;
                  }
                  e2.preventDefault(), t._userValue = "escaped" === t.displayMode ? t._toDefaultDisplayMode(t.$.input.value) : t.$.input.value, t.value = t._userValue, ("submit" === t.enterKeyBehavior || "clearOnSubmit" === t.enterKeyBehavior || "" !== n && t._userValue !== t._oldValue) && t.$.fireEvent("change", { oldValue: t._oldValue, value: n, type: "submit" }), "clearOnSubmit" === t.enterKeyBehavior && (t.$.input.value = ""), t._oldValue = t.value = t._toDefaultDisplayMode(t.$.input.value), t._submitted = true, "escaped" === t.displayMode && t.enterKeyBehavior.toLowerCase().indexOf("submit") < 0 && !i && !a2 && r2("\\n"), ("submit" === t.enterKeyBehavior || "newLine" === t.enterKeyBehavior && i) && t.$.input.blur();
                  break;
                case "Escape":
                  if ("none" === t.escKeyMode) return;
                  switch (t.escKeyMode) {
                    case "none":
                      break;
                    case "clearValue":
                      t.value = t.$.input.value = "";
                      break;
                    case "previousValue":
                      t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(t._oldValue) : t._oldValue;
                  }
                  break;
                case " ":
                  "escaped" === t.displayMode && r2("\\s");
                  break;
                case "Backspace":
                  if ("escaped" === t.displayMode && t.$.input.selectionStart === t.$.input.selectionEnd) {
                    let e3 = t.$.input.selectionStart;
                    "\\" !== n[e3 - 2] || "s" !== n[e3 - 1] && "n" !== n[e3 - 1] || (t.$.input.value = t.$.input.value.substring(0, e3 - 2) + t.$.input.value.substring(e3 - 2, t.$.input.value.length), t.$.input.selectionStart = e3 - 2);
                  }
                  t._scrollView && t._handleScrollbarsDisplay();
              }
            }
            _keyUpHandler(e2) {
              const t = this;
              switch (e2.key) {
                case "ArrowLeft":
                case "ArrowUp":
                case "ArrowDown":
                  t._handlePointerInEscapedSymbol();
                  break;
                case "ArrowRight":
                  t._handlePointerInEscapedSymbol("next");
              }
              t._userValue = "escaped" === t.displayMode ? t._toDefaultDisplayMode(t.$.input.value) : t.$.input.value, t._submitKeyUpHandler();
            }
            _textBoxKeyDownHandler(e2) {
              const t = this, l = e2.key;
              t._scrollView && t._handleScrollbarsDisplay(), t.value && t.value.length > 0 ? t.$.addClass("has-value") : t.$.removeClass("has-value"), -1 === ["Enter", "Escape"].indexOf(l) && (t._preventProgramaticValueChange = true), ["ArrowLeft", "ArrowUp", "ArrowDown", "ArrowRight"].indexOf(l) > -1 && t._scrollView.scrollTo(t.$.input.scrollTop), ["PageUp", "PageDown"].indexOf(l) > -1 && Smart.Utilities.Core.Browser.Chrome && ("PageUp" === e2.key && (t.$.input.setSelectionRange(0, 0), t.$.input.scrollTop = 0), "PageDown" === e2.key && (t.$.input.setSelectionRange(t.$.input.value.length, t.$.input.value.length), t.$.input.scrollTop = t._scrollView.verticalScrollBar.max), e2.preventDefault());
            }
            _mouseWheelHandler(e2) {
              const t = this;
              t.disabled || t.$.verticalScrollBar.disabled || (t._scrollView.scrollTo(t._scrollView.scrollTop + (e2.deltaY < 0 ? -t.offsetHeight : t.offsetHeight)), t.$.input.scrollTop += e2.deltaY < 0 ? -t.offsetHeight : t.offsetHeight, t.$.input.scrollTop > 0 && e2.preventDefault());
            }
            _syncTextBoxContentOnInitialization() {
              const e2 = this;
              let t;
              t = "" === e2.value ? e2.innerHTML : e2.value, "escaped" !== e2.displayMode ? e2.$.input.value = e2.value = e2._initializationValue = t : t.match(/\r\n|\n\r|\n|\r|\s|\t|\f|\r/g) ? (e2.value = e2._initializationValue = t, e2.$.input.value = e2._toEscapedDisplayMode(t)) : (e2.value = e2._initializationValue = e2._toDefaultDisplayMode(t), e2.$.input.value = t);
            }
            _textBoxChangeHandler(e2) {
              const t = this, l = e2.clipboardData || e2.originalEvent && e2.originalEvent.clipboardData || window.clipboardData, a2 = t.value;
              if ("escaped" === t.displayMode) {
                const a3 = t.$.input.selectionStart, i = t.$.input.selectionEnd;
                if (l) {
                  let n = l.getData("text"), r2 = t.$.input.value;
                  e2.preventDefault(), n = t._toEscapedDisplayMode(n), t.$.input.value = r2.substring(0, a3) + n + r2.substring(i, r2.length);
                }
                t.value = t._toDefaultDisplayMode(t.$.input.value);
              } else t.value = t.$.input.value;
              t._handleScrollbarsDisplay(), t.value.length > 0 ? t.$.addClass("has-value") : t.$.removeClass("has-value"), l || t.$.fireEvent("change", { value: t.value, oldValue: a2, type: "blur" }), t._handleHintContainer();
            }
            _inputTouchmoveHandler(e2) {
              const t = this;
              if ((t._resizeStarted || t._touchmoveInside) && e2.cancelable) return e2.preventDefault(), void e2.stopPropagation();
              const l = t.$.container.classList.contains("vscroll"), a2 = t._touchCoords;
              if (!t.$.container.classList.contains("hscroll") && !l || !a2) return;
              const i = t._scrollView, n = e2.touches[0];
              let r2, o, s, c;
              t._touchCoords = [n.pageX, n.pageY], l ? (r2 = i.scrollTop, o = i.scrollHeight, s = n.pageY, c = a2[1]) : (r2 = i.scrollLeft, o = i.scrollWidth, s = n.pageX, c = a2[0]);
              const u2 = parseFloat(s.toFixed(5)), d2 = parseFloat(c.toFixed(5));
              0 === r2 && u2 >= d2 || r2 === o && u2 <= d2 || (s !== c && (t._touchmoveInside = true), e2.cancelable && (e2.preventDefault(), e2.stopPropagation()));
            }
            _inputTouchstartHandler(e2) {
              const t = e2.touches[0];
              this._touchCoords = [t.pageX, t.pageY];
            }
            _resizeDownHandler() {
              const e2 = this;
              !e2.disabled && e2.resizable && (e2._resizeStarted = true, e2.$container.addClass("smart-resize"), e2.readonly || e2.$.input.setAttribute("readonly", ""));
            }
            _resizeMoveHandler(e2) {
              const t = this;
              if (t.disabled || !t.resizable || !t._resizeStarted) return;
              const l = t.getBoundingClientRect(), a2 = 50, i = 50, n = t.rightToLeft ? l.width + l.left - e2.clientX : e2.clientX - l.left, r2 = e2.clientY - l.top;
              n > a2 && (t.style.width = n + "px"), r2 > i && (t.style.height = r2 + "px");
            }
            _updateSizeRowsCols() {
              const e2 = this;
              e2.$.container.removeAttribute("style"), setTimeout(function() {
                if (!("disabled" !== e2.horizontalScrollBarVisibility && "hidden" !== e2.horizontalScrollBarVisibility || "disabled" !== e2.verticalScrollBarVisibility && "hidden" !== e2.verticalScrollBarVisibility)) return;
                const t = e2.getBoundingClientRect();
                e2.$.container.style.width = t.width + "px", e2.$.container.style.height = t.height + "px";
              }, 0);
            }
            _upHandler(e2) {
              const t = this;
              delete t._touchCoords, delete t._touchmoveInside, t._selectionStarted = false, t.disabled || (e2.originalEvent.target !== t.$.input ? (t.$container.removeClass("smart-resize"), t.readonly || t.$.input.removeAttribute("readonly"), t._resizeStarted && t.$.input.focus(), t._resizeStarted = false) : t._handlePointerInEscapedSymbol());
            }
            _verticalScrollbarHandler(e2) {
              const t = this;
              t.disabled || "disabled" === t.verticalScrollBarVisibility || "hidden" === t.verticalScrollBarVisibility || (e2.stopPropagation(), t.$.input.scrollTop = e2.detail.value);
            }
            _documentDownHandler(e2) {
              const t = this;
              t._selectionStarted = false, e2.originalEvent && t.$.input.contains(e2.originalEvent.target) && (t._selectionStarted = true, t._selectionStartTime = /* @__PURE__ */ new Date(), t._pointerDown = { pageX: e2.pageX, pageY: e2.pageY }, t._edgeSelect = false);
            }
            _documentSelectionOutsideHandler(e2) {
              const t = this;
              if (clearInterval(t._outsideAutoScroll), !t._selectionStarted) return;
              const l = t.$.input.getBoundingClientRect(), a2 = l.y + 10, i = l.y + l.height - 10;
              function n(l2) {
                const a3 = t.getBoundingClientRect(), i2 = document.documentElement, n2 = l2 ? "Left" : "Top";
                (l2 ? a3.left + i2.scrollLeft - e2.pageX : a3.top + i2.scrollTop - e2.pageY) > 0 ? (t.$.input["scroll" + n2] -= 10, t._scrollView["scroll" + n2] -= 10) : (t.$.input["scroll" + n2] += 10, t._scrollView["scroll" + n2] += 10);
              }
              e2.pageY > a2 && e2.pageY < i || !(/* @__PURE__ */ new Date() - t._selectionStartTime < 300) && (Math.abs(t._pointerDown.pageX - e2.pageX) >= 3 || Math.abs(t._pointerDown.pageY - e2.pageY) >= 3) && (t._outsideAutoScroll = setInterval(function() {
                n(), n(true);
              }, 10));
            }
            _selectStartHandler() {
            }
            _styleChangedHandler() {
            }
          });
        }
      ),
      /***/
      5839: (
        /***/
        () => {
          Smart("smart-base-progress-bar", class extends Smart.BaseElement {
            static get properties() {
              return { indeterminate: { value: false, type: "boolean" }, inverted: { value: false, type: "boolean" }, formatFunction: { value: null, type: "function" }, max: { value: 100, type: "number" }, min: { value: 0, type: "number" }, showProgressValue: { value: false, type: "boolean" }, value: { value: 0, type: "number?" } };
            }
            static get styleUrls() {
              return ["smart.progressbar.css"];
            }
            render() {
              const e2 = this;
              e2.$.label.id || (e2.$.label.id = e2.id + "Label"), e2.setAttribute("role", "progressbar"), e2.setAttribute("aria-labelledby", e2.$.label.id), e2.setAttribute("aria-valuemin", e2.min), e2.setAttribute("aria-valuemax", e2.max), null === e2.value || e2.indeterminate || (e2.$.value.style.transition = "none"), e2._updateProgress(), requestAnimationFrame(() => e2.$.value.style.transition = ""), super.render();
            }
            propertyChangedHandler(e2, t, a2) {
              super.propertyChangedHandler(e2, t, a2);
              const r2 = this;
              r2._updateProgress(), "value" === e2 ? r2.$.fireEvent("change", { value: a2, oldValue: t, changeType: "api" }) : "min" !== e2 && "max" !== e2 || r2.setAttribute("aria-value" + e2, a2);
            }
            _updateProgress() {
              const e2 = this, t = e2.value;
              null === t || e2.indeterminate ? e2.removeAttribute("aria-valuenow") : e2.setAttribute("aria-valuenow", t);
            }
            get _percentageValue() {
              const e2 = this, t = Math.max(e2.min, e2.max), a2 = Math.min(e2.min, e2.max);
              return (Math.min(t, Math.max(a2, e2.value)) - a2) / (t - a2);
            }
          }), Smart("smart-circular-progress-bar", class extends Smart.BaseProgressBar {
            template() {
              return '<div id="container" role="presentation">\n                    <svg width="100%" height="100%" viewPort="0 0 100 100" viewBox="0 0 100 100" role="presentation" aria-hidden="true">\n                        <circle id="value" class="smart-value-path" r="50" cx="50" cy="50" transform="rotate(270 50 50)"></circle>\n                        <circle id="value" class="smart-value" r="50" cx="50" cy="50" transform="rotate(270 50 50)"></circle>\n                    </svg>\n                    <div class="smart-label-container" role="presentation">\n                        <content></content>\n                        <span id="label" class="smart-label"></span>\n                    </div>\n                </div>';
            }
            static get listeners() {
              return { resize: "_resizeHandler" };
            }
            render() {
              const e2 = this;
              e2.$.container.style.width = e2.$.container.style.height = Math.min(e2.offsetWidth, e2.offsetHeight) + "px", e2.$.hasClass("echo-animation") && (e2.value = e2.max, e2._updateProgress()), super.render();
            }
            _resizeHandler() {
              this.refresh();
            }
            refresh() {
              const e2 = this;
              e2.$.container.style.width = e2.$.container.style.height = Math.min(e2.offsetWidth, e2.offsetHeight) + "px";
            }
            async _updateProgress() {
              super._updateProgress();
              const e2 = this, t = e2.indeterminate ? 100 * Math.PI : 100 * Math.PI - e2._percentageValue * Math.PI * 100, a2 = !!document.documentMode, r2 = !a2 && !!window.StyleMedia;
              if (e2.showProgressValue) {
                const t2 = parseInt(100 * e2._percentageValue);
                e2.$.label.innerHTML = t2 + "%", e2.formatFunction && (e2.$.label.innerHTML = await e2.formatFunction(t2));
              } else e2.$.label.innerHTML = "";
              if (a2 || r2) return null === e2.value || e2.indeterminate ? (e2.$.value.style.strokeDashoffset = "", void e2.$.value.setAttribute("class", "smart-value smart-value-animation-ms")) : (e2.$.value.setAttribute("class", "smart-value"), void (e2.$.value.style.strokeDashoffset = e2.inverted && !e2.rightToLeft || !e2.inverted && e2.rightToLeft ? -t : t));
              e2.$.value.style.strokeDashoffset = e2.inverted && !e2.rightToLeft || !e2.inverted && e2.rightToLeft ? -t : t, null === e2.value || e2.indeterminate ? e2.$value.addClass("smart-value-animation") : e2.$value.removeClass("smart-value-animation");
            }
          }), Smart("smart-progress-bar", class extends Smart.BaseProgressBar {
            static get properties() {
              return { orientation: { value: "horizontal", allowedValues: ["horizontal", "vertical"], type: "string" } };
            }
            template() {
              return '<div role="presentation">\n                    <div id="value" class="smart-value"></div>\n                    <div id="label" class="smart-label"></div>\n                </div>';
            }
            async _updateProgress() {
              super._updateProgress();
              const e2 = this;
              if (e2.showProgressValue) {
                const t = parseInt(100 * e2._percentageValue);
                e2.$.label.innerHTML = t + "%", e2.formatFunction && (e2.$.label.innerHTML = await e2.formatFunction(t));
              } else e2.$.label.innerHTML = "";
              null === e2.value || e2.indeterminate ? e2.$value.addClass("smart-value-animation") : e2.$value.removeClass("smart-value-animation"), e2.$.value.style.transform = "horizontal" === e2.orientation ? "scaleX(" + e2._percentageValue + ")" : "scaleY(" + e2._percentageValue + ")";
            }
          });
        }
      ),
      /***/
      9135: (
        /***/
        () => {
          Smart("smart-scroll-bar", class extends Smart.BaseElement {
            static get properties() {
              return { clickRepeatDelay: { type: "integer", value: 50 }, largeStep: { type: "integer", value: 100 }, min: { type: "integer", value: 0 }, max: { type: "integer", value: 1e3 }, mechanicalAction: { value: "switchWhileDragging", allowedValues: ["switchUntilReleased", "switchWhenReleased", "switchWhileDragging"], type: "string" }, orientation: { type: "string", value: "horizontal", allowedValues: ["horizontal", "vertical"] }, step: { type: "integer", value: 10 }, showButtons: { type: "boolean", value: true, defaultReflectToAttribute: true }, value: { type: "integer", value: 0 } };
            }
            static get styleUrls() {
              return ["smart.scrollbar.css"];
            }
            template() {
              return '<div id="container" class="smart-container" role="presentation">\n                    <div id="nearButton" class="smart-scroll-button smart-arrow-left" role="presentation" aria-hidden="true"></div>\n                    <div  id="track" class="smart-track" role="presentation">\n                        <div id="thumb" class="smart-thumb" role="presentation"></div>\n                    </div>\n                    <div id="farButton" class="smart-scroll-button smart-arrow-right" role="presentation" aria-hidden="true"></div>\n            </div>';
            }
            static get listeners() {
              return { "nearButton.click": "_nearButtonClickHandler", "nearButton.down": "_startRepeat", "nearButton.up": "_stopRepeat", "nearButton.pointerenter": "_updateInBoundsFlag", "nearButton.pointerleave": "_updateInBoundsFlag", "farButton.click": "_farButtonClickHandler", "farButton.down": "_startRepeat", "farButton.up": "_stopRepeat", "farButton.pointerenter": "_updateInBoundsFlag", "farButton.pointerleave": "_updateInBoundsFlag", "track.down": "_trackDownHandler", "track.click": "_trackClickHandler", "track.move": "_trackMoveHandler", "thumb.down": "_dragStartHandler", "document.move": "_dragHandler", "document.up": "_dragEndHandler", up: "_dragEndHandler", "document.selectstart": "_selectStartHandler", resize: "_resizeHandler" };
            }
            _updateInBoundsFlag(t) {
              const e2 = this, a2 = t.target;
              a2._isPointerInBounds = true, -1 !== t.type.indexOf("leave") && (a2._isPointerInBounds = false), 1 !== ("buttons" in t ? t.buttons : t.which) && e2._stopRepeat(t);
            }
            _startRepeat(t) {
              const e2 = this;
              if (e2.disabled) return;
              const a2 = t.target;
              a2._initialTimer || (a2._initialTimer = setTimeout(function() {
                a2._repeatTimer = setInterval(() => {
                  if (a2._isPointerInBounds) {
                    const e3 = "buttons" in t ? t.buttons : t.which;
                    a2.$.fireEvent("click", { buttons: e3, clientX: t.clientX, clientY: t.clientY, pageX: t.pageX, pageY: t.pageY, screenX: t.screenX, screenY: t.screenY });
                  }
                }, e2.clickRepeatDelay);
              }, 3 * e2.clickRepeatDelay));
            }
            _stopRepeat(t) {
              if (this.disabled) return;
              const e2 = t.target;
              e2._repeatTimer && (clearInterval(e2._repeatTimer), e2._repeatTimer = null), e2._initialTimer && (clearTimeout(e2._initialTimer), e2._initialTimer = null);
            }
            _calculateThumbSize(t) {
              const e2 = this, a2 = e2.max - e2.min, r2 = "horizontal" === e2.orientation ? e2.$.track.offsetWidth > 10 : e2.$.track.offsetHeight > 10;
              let n = 0;
              return a2 >= 1 && r2 ? (n = t / (a2 + t) * t, e2.$.thumb.className.indexOf("smart-hidden") >= 0 && e2.$thumb.removeClass("smart-hidden")) : e2.$thumb.addClass("smart-hidden"), Math.max(10, Math.min(n, t));
            }
            _dragStartHandler(t) {
              const e2 = this;
              e2.disabled || (e2.thumbCapture = true, e2.dragStartX = t.clientX, e2.dragStartY = t.clientY, e2.dragStartValue = e2.value, t.stopPropagation(), t.preventDefault());
            }
            _dragHandler(t) {
              const e2 = this;
              if (true !== e2.thumbCapture) return;
              e2._isThumbDragged = true;
              const a2 = (e2.max - e2.min) / (e2.scrollBarSize - e2.thumbSize), r2 = "horizontal" === e2.orientation ? (t.clientX - e2.dragStartX) * a2 : (t.clientY - e2.dragStartY) * a2;
              let n = r2;
              e2.rightToLeft && "horizontal" === e2.orientation && (n = -r2), e2._updateValue(e2.dragStartValue + n), t.stopPropagation(), t.preventDefault(), t.originalEvent && (t.originalEvent.stopPropagation(), t.originalEvent.preventDefault());
            }
            _dragEndHandler(t) {
              const e2 = this;
              e2._trackDownTimer && (clearInterval(e2._trackDownTimer), e2._trackDownTimer = null), e2.thumbCapture && (e2.thumbCapture = false, e2._isThumbDragged = false, "switchWhenReleased" === e2.mechanicalAction ? e2._updateValue(e2.dragStartValue, e2.value) : "switchUntilReleased" === this.mechanicalAction && e2._updateValue(e2.dragStartValue), t.preventDefault(), t.stopPropagation(), t.originalEvent.preventDefault(), t.originalEvent.stopPropagation());
            }
            _farButtonClickHandler() {
              const t = this;
              if (t.disabled) return;
              const e2 = t.value;
              t._updateValue(t.value + ("horizontal" === t.orientation && t.rightToLeft ? -1 : 1) * t.step), "switchUntilReleased" === t.mechanicalAction && t._updateValue(e2);
            }
            _nearButtonClickHandler() {
              const t = this;
              if (t.disabled) return;
              const e2 = t.value;
              t._updateValue(t.value - ("horizontal" === t.orientation && t.rightToLeft ? -1 : 1) * t.step), "switchUntilReleased" === t.mechanicalAction && t._updateValue(e2);
            }
            propertyChangedHandler(t, e2, a2) {
              super.propertyChangedHandler(t, e2, a2);
              const r2 = this;
              switch (t) {
                case "min":
                case "max":
                case "orientation":
                case "showButtons":
                  r2._layout(), "min" === t ? r2.setAttribute("aria-valuemin", a2) : "max" === t ? r2.setAttribute("aria-valuemax", a2) : "orientation" === t && r2.setAttribute("aria-orientation", a2);
                  break;
                case "value":
                  r2._updateValue(e2, a2);
                  break;
                default:
                  r2._layout();
              }
            }
            render() {
              const t = this;
              t.setAttribute("role", "scrollbar"), t.setAttribute("aria-orientation", t.orientation), t.setAttribute("aria-valuemin", t.min), t.setAttribute("aria-valuemax", t.max), t.setAttribute("aria-valuenow", t.value), t._layout(), super.render();
            }
            _resizeHandler() {
              this._layout();
            }
            refresh() {
              this._layout();
            }
            beginUpdate() {
              this._isUpdating = true;
            }
            endUpdate() {
              this._isUpdating = false, this.refreshValue();
            }
            refreshValue() {
              const t = this;
              t._layout(), t._updateValue(t.value);
            }
            _layout() {
              const t = this;
              t._isUpdating || (t.scrollBarSize = "horizontal" === t.orientation ? t.$.track.offsetWidth : t.$.track.offsetHeight, t.thumbSize = t._calculateThumbSize(t.scrollBarSize), "horizontal" === t.orientation && t.$.thumb.style.width !== t.thumbSize + "px" ? t.$.thumb.style.width = t.thumbSize + "px" : "vertical" === t.orientation && t.$.thumb.style.height !== t.thumbSize + "px" && (t.$.thumb.style.height = t.thumbSize + "px"), "horizontal" === t.orientation ? (t.$.nearButton.classList.contains("smart-arrow-up") && t.$.nearButton.classList.remove("smart-arrow-up"), t.$.farButton.classList.contains("smart-arrow-down") && t.$.farButton.classList.remove("smart-arrow-down"), t.$.nearButton.classList.contains("smart-arrow-left") || t.$.nearButton.classList.add("smart-arrow-left"), t.$.farButton.classList.contains("smart-arrow-right") || t.$.farButton.classList.add("smart-arrow-right")) : (t.$.nearButton.classList.contains("smart-arrow-left") && t.$.nearButton.classList.remove("smart-arrow-left"), t.$.farButton.classList.contains("smart-arrow-right") && t.$.farButton.classList.remove("smart-arrow-right"), t.$.nearButton.classList.contains("smart-arrow-up") || t.$.nearButton.classList.add("smart-arrow-up"), t.$.farButton.classList.contains("smart-arrow-down") || t.$.farButton.classList.add("smart-arrow-down")), t._updateThumbPosition(), (t.value > t.max || t.value < t.min) && t._updateValue(t.value, t.value > t.max ? t.max : t.min));
            }
            _selectStartHandler(t) {
              this.thumbCapture && t.preventDefault();
            }
            _trackDownHandler(t) {
              const e2 = this;
              t.target === e2.$.track && (e2._trackDownTimer && clearInterval(e2._trackDownTimer), e2.thumbCapture || (e2._trackDownTimer = setInterval(function() {
                e2._trackClickHandler(t);
              }, e2.clickRepeatDelay), t.stopPropagation(), t.preventDefault()));
            }
            _trackClickHandler(t) {
              const e2 = this;
              if (e2.disabled) return;
              if (e2._isThumbDragged) return clearInterval(e2._trackDownTimer), void (e2._trackDownTimer = null);
              const a2 = e2.$.thumb.getBoundingClientRect(), r2 = t.pageX - window.pageXOffset, n = t.pageY - window.pageYOffset, i = (e2.rightToLeft ? -1 : 1) * e2.value;
              "horizontal" === e2.orientation ? r2 > (e2._isThumbDragged ? e2.dragStartX : a2.right) ? e2._updateValue(e2.value + (e2.rightToLeft ? -1 : 1) * e2.largeStep) : r2 < (e2._isThumbDragged ? e2.dragStartX : a2.left) && e2._updateValue(e2.value - (e2.rightToLeft ? -1 : 1) * e2.largeStep) : n > (e2._isThumbDragged ? e2.dragStartY : a2.bottom) ? e2._updateValue(e2.value + e2.largeStep) : n < (e2._isThumbDragged ? e2.dragStartY : a2.top) && e2._updateValue(e2.value - e2.largeStep), "switchUntilReleased" === e2.mechanicalAction && e2._updateValue(i);
            }
            _trackMoveHandler(t) {
              "touchmove" === t.originalEvent.type && t.originalEvent.preventDefault();
            }
            _updateValue(t, e2) {
              const a2 = this;
              if (!a2._isUpdating && (1 === arguments.length && (e2 = t, t = a2.value), (void 0 === e2 || isNaN(e2)) && (e2 = a2.min), e2 > a2.max && (e2 = a2.max), e2 < a2.min && (e2 = a2.min), a2.value = e2, t !== e2)) {
                if (a2.setAttribute("aria-valuenow", e2), a2._updateThumbPosition(), a2.thumbCapture && "switchWhenReleased" === a2.mechanicalAction) return;
                if (a2.onChange) return void a2.onChange({ value: a2.value, oldValue: t, min: a2.min, max: a2.max, context: a2 });
                a2.$.fireEvent("change", { value: a2.value, oldValue: t, min: a2.min, max: a2.max });
              }
            }
            _updateThumbPosition() {
              const t = this, e2 = "horizontal" === t.orientation ? t.$.track.offsetWidth : t.$.track.offsetHeight, a2 = t._calculateThumbSize(e2), r2 = e2 - a2;
              let n = (e2 - a2) / (t.max - t.min) * (t.value - t.min);
              t.rightToLeft && "horizontal" === t.orientation && (n = (e2 - a2) / (t.max - t.min) * (t.max - t.value - t.min)), n = Math.min(r2, Math.max(0, n)), "vertical" === t.orientation && t.$.thumb.style.top !== n + "px" ? t.$.thumb.style.top = n + "px" : "horizontal" === t.orientation && t.$.thumb.style.left !== n + "px" && (t.$.thumb.style.left = n + "px");
            }
          });
        }
      ),
      /***/
      3911: (
        /***/
        () => {
          Smart("smart-text-box", class extends Smart.ComboBox {
            static get properties() {
              return { autoFocus: { value: false, type: "boolean" }, autoComplete: { allowedValues: ["none", "manual", "auto", "inline"], type: "string", value: "manual" }, displayMode: { value: "default", allowedValues: ["default", "escaped"], type: "string" }, dropDownOpenMode: { allowedValues: ["none", "default", "auto"], value: "default", type: "string" }, enterKeyBehavior: { value: "submit", allowedValues: ["submit", "clearOnSubmit"], type: "string" }, form: { value: "", type: "string" }, hint: { value: null, type: "any" }, maxLength: { value: null, type: "number?" }, minLength: { value: 2, type: "number" }, messages: { extend: true, value: { en: { missingReference: "{{elementType}}: Missing reference to {{files}}." } }, type: "object" }, required: { value: false, type: "boolean" }, requiredMessage: { value: "", type: "string" }, selectAllOnFocus: { value: false, type: "boolean" }, selectionMode: { value: "zeroOrOne", allowedValues: ["none", "oneOrManyExtended", "zeroOrMany", "oneOrMany", "zeroOrOne", "one", "checkBox", "radioButton"], type: "string" }, type: { value: "input", type: "string", defaultReflectToAttribute: true, readonly: true }, value: { value: "", type: "string" } };
            }
            static get listeners() {
              return { "document.up": "_documentUpHandler", focus: "_focusHandler", keydown: "_keyDownHandler", mouseenter: "_mouseEventsHandler", mouseleave: "_mouseEventsHandler", "input.blur": "_focusHandler", "input.change": "_textBoxChangeHandler", "input.focus": "_focusHandler", "input.keyup": "_textBoxKeyUpHandler", "input.paste": "_textBoxChangeHandler", "input.select": "_textBoxSelectHandler", "listBox.bindingComplete": "_bindingCompleteHandler" };
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span id="label" inner-h-t-m-l="[[label]]" class="smart-label"></span>\n                    <div id="content" class="smart-content" role="presentation">\n                        <input class="smart-input" type="text" id="input"\n                            disabled="[[disabled]]"\n                            maxlength="[[maxLength]]"\n                            name="[[name]]"\n                            placeholder="[[placeholder]]"\n                            readonly="[[readonly]]"\n                            role="textbox"\n                            aria-label="[[placeholder]]"\n                            autocomplete="[[inputPurpose]]">\n                        <div id="autoCompleteString"></div>\n                        <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n                            <smart-list-box id="listBox"\n                                data-source="[[dataSource]]"\n                                unfocusable="true"\n                                disabled="[[disabled]]"\n                                display-loading-indicator="[[displayLoadingIndicator]]"\n                                display-member="[[displayMember]]"\n                                item-height="[[itemHeight]]"\n                                item-template="[[itemTemplate]]"\n                                item-measure-mode="[[itemMeasureMode]]"\n                                filter-callback="[[filterCallback]]"\n                                filter-mode="[[filterMode]]"\n                                loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n                                loading-indicator-position="[[loadingIndicatorPosition]]"\n                                placeholder="[[dropDownPlaceholder]]"\n                                readonly="[[readonly]]"\n                                right-to-left="[[rightToLeft]]"\n                                selection-mode="[[selectionMode]]"\n                                value-member="[[valueMember]]">\n                                <content></content>\n                            </smart-list-box>\n                        </div>\n                    </div>\n                    <span id="hint" class ="smart-hidden smart-hint"></span>\n                </div>';
            }
            propertyChangedHandler(e2, t, n) {
              const l = this;
              switch (e2) {
                case "autoComplete":
                  l.$.listBox._filteredItems && l.$.listBox._filteredItems.length !== l.$.listBox._items.length && super._autoComplete(true), l._setAriaAutocomplete();
                  break;
                case "dataSource":
                case "valueMember":
                  l._clearSelection(), l._setDropDownSize(), l._positionDetection.checkBrowserBounds("vertically"), l._positionDetection.positionDropDown(), l._positionDetection.checkBrowserBounds("horizontally");
                  break;
                case "displayMember":
                case "inputMember": {
                  const e3 = l.$.listBox;
                  if (e3.selectedIndexes.length) {
                    const t2 = e3._items[e3.selectedIndexes[0]][l.inputMember];
                    l.$.listBox.$.filterInput.value = t2, l.$.input.value = "escaped" === l.displayMode ? l._toEscapedDisplayMode(t2) : l._toDefaultDisplayMode(t2), l.set("value", l._toDefaultDisplayMode(l.$.input.value));
                  }
                  break;
                }
                case "displayMode":
                  l.$.input.value = "escaped" === n ? l._toEscapedDisplayMode(l.value) : l.value = l._toDefaultDisplayMode(l.$.input.value);
                  break;
                case "dropDownOpenMode":
                  l._setFocusable(), l.$dropDownContainer.addClass("smart-visibility-hidden"), l.opened = false;
                  break;
                case "value":
                  (l.$.input !== document.activeElement || l.$.input === document.activeElement && l.$.input.value === l._oldValue) && (l.$.input.value = "escaped" === l.displayMode ? l._toEscapedDisplayMode(l.value) : l.value, l._oldValue = l._changingOldValue = t), l.value || l.clearSelection(), n.length > 0 ? l.$.addClass("has-value") : l.$.removeClass("has-value");
                  break;
                case "hint":
                  if (null === n) return l.$.hint.innerHTML = "", void l.$.removeClass("invalid");
                  l._handleHintContainer();
                  break;
                default:
                  super.propertyChangedHandler(e2, t, n);
              }
            }
            static get requires() {
              return { "Smart.ComboBox": "smart.combobox.js" };
            }
            static get styleUrls() {
              return ["smart.textbox.css"];
            }
            open() {
              const e2 = this;
              0 === e2.$.listBox.items.length && "function" != typeof e2.dataSource || "none" === e2.autoComplete || (0 === e2.$.input.value.length && e2.$.listBox._filteredItems && e2.$.listBox._filteredItems.length !== e2.$.listBox._items.length ? super._autoComplete(true) : super.open());
            }
            close() {
              const e2 = this;
              super.close(), e2.$.autoCompleteString.textContent = "", e2.$.listBox._focusedItem && (e2.$.listBox._focusedItem._focused = false), "none" !== e2.autoComplete && e2.$.input._filteredItems && e2.$.input._filteredItems[0] && e2.$.input._filteredItems[0] !== e2.$.input.value && super._autoComplete(true);
            }
            cloneNode() {
              const e2 = this;
              let t = HTMLElement.prototype.cloneNode.apply(e2, Array.prototype.slice.call(arguments, 0, 1));
              return e2.$.listBox && (t.dataSource = e2.dataSource), t;
            }
            focus() {
              this.$.input.focus();
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.$.input.tabIndex = -1 : e2.$.input.removeAttribute("tabindex");
            }
            reset() {
              const e2 = this;
              "escaped" === e2.displayMode ? (e2.value = e2._initializationValue, e2.$.input.value = e2._toEscapedDisplayMode(e2._initializationValue)) : e2.$.input.value = e2.value = e2._initializationValue, !e2.value && e2.$.listBox && e2.clearSelection();
            }
            _bindingCompleteHandler() {
              const e2 = this;
              e2.$.listBox && e2.isRendered && (e2._setDropDownSize(), e2._positionDetection.checkBrowserBounds());
            }
            _createElement() {
              const e2 = this;
              e2._browserIsIEorEdge = Smart.Utilities.Core.Browser.IE || Smart.Utilities.Core.Browser.Edge, e2.value && (e2.$.input.value = "escaped" === e2.displayMode ? e2._toEscapedDisplayMode(e2.value) : e2.value), e2.autoFocus && (e2.$.input.focus(), e2.selectAllOnFocus && e2.$.input.select()), e2._setDropDownSize(), e2._handleSelectedText(), e2._setFocusable(), e2._initializationValue = e2._oldValue = e2._changingOldValue = e2.value, e2.value.length > 0 ? e2.$.addClass("has-value") : e2.$.removeClass("has-value"), e2._handleHintContainer(), e2._setAriaRelations();
            }
            _focusHandler(e2) {
              const t = this;
              if (e2.target === t && t.hasAttribute("tabindex") && (t.$.input.tabIndex = t.disabled || t.unfocusable ? -1 : t.tabIndex, t.removeAttribute("tabindex")), "blur" === e2.type) {
                if (t._isDropDownClicked || e2.target === t) return;
                if (t.removeAttribute("focus"), t.$.autoCompleteString.textContent = "", t.value.length > 0 ? t.$.addClass("has-value") : t.$.removeClass("has-value"), ("auto" === t.autoComplete || "inline" === t.autoComplete) && t.$.input.value.length > 0 && t.$.listBox._focusedItem && t.$.listBox._focusedItem._focused) {
                  const e3 = t.$.listBox._focusedItem[t.inputMember];
                  t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(e3) : t._toDefaultDisplayMode(e3), t.set("value", t._toDefaultDisplayMode(e3));
                }
                return t._preventDropDownClose || t.close(), t._oldValue !== t.value && t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value }), void t.$.fireEvent("blur");
              }
              t.disabled || (t.setAttribute("focus", ""), t._oldValue = t._changingOldValue = t.value, t.selectAllOnFocus && t.$.input.select(), e2.target === t && t.$.input.focus(), false !== t._canFireFocus && (t._canFireFocus = false, t.$.fireEvent("focus"), t._canFireFocus = true));
            }
            _handlePointerInEscapedSymbol(e2) {
              const t = this;
              if ("escaped" !== t.displayMode) return;
              let n = t.$.input.selectionStart, l = t.$.input.selectionEnd, a2 = t.$.input.value;
              if ("\\" === a2[n - 1] && a2[n].match(/n|r|s|t|f/g)) {
                if (n === l) {
                  let l2 = "next" === e2 ? 1 : -1;
                  return t.$.input.selectionStart = n + l2, void (t.$.input.selectionEnd = n + l2);
                }
                t.$.input.selectionStart = n - 1, "\\" === a2[l - 1] && a2[l].match(/n|r|s|t|f/g) && (t.$.input.selectionEnd = l + 1);
              }
            }
            _handleSelectedText() {
              const e2 = this;
              null === e2.selectionStart || null === e2.selectionEnd || e2.selectionStart === e2.selectionEnd || e2.selectAllOnFocus || (e2.selectionStart = e2.selectionStart < 0 ? 0 : e2.selectionStart, e2.selectionEnd = e2.selectionEnd > e2.value.length ? e2.value.length : e2.selectionEnd, e2.$.input.setSelectionRange(e2.selectionStart, e2.selectionEnd));
            }
            _handleHintContainer() {
              const e2 = this;
              if (!e2.hint) return;
              const t = e2.$.hint;
              if ("function" == typeof e2.hint) {
                const n = e2.value;
                e2.hint(n, t) ? e2.$.addClass("invalid") : e2.$.removeClass("invalid");
              } else "string" == typeof e2.hint && (t.innerHTML = e2.hint, e2.$.removeClass("invalid"), e2.hint.length > 0 && !e2.classList.contains("outlined") && !e2.classList.contains("underlined") && t.classList.remove("smart-hidden"));
            }
            _keyDownHandler(e2) {
              const t = this;
              switch (t._showAutoCompleteHighlighter = false, e2.key) {
                case "ArrowUp":
                case "ArrowDown":
                  if (e2.altKey) return e2.preventDefault(), void ("ArrowDown" === e2.key ? t.open() : t.close());
                  if (t.opened) {
                    if (e2.preventDefault(), t.$.listBox._handleKeyStrokes(e2.key), "inline" !== t.autoComplete) break;
                    t._showAutoCompleteHighlighter = true, super._updateAutoCompleteHelper();
                  }
                  break;
                case "PageUp":
                case "PageDown":
                  e2.preventDefault(), t.$.input.selectionStart = t.$.input.selectionEnd = "PageUp" === e2.key ? 0 : t.$.input.value.length;
                  break;
                case "Enter": {
                  const e3 = "function" == typeof t.$.listBox._focusedItem ? t.$.listBox._focusedItem() : t.$.listBox._focusedItem;
                  if (t.opened && e3 && e3._focused && (t.$.listBox.$.filterInput.value = e3[t.inputMember], t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(e3[t.inputMember]) : t._toDefaultDisplayMode(e3[t.inputMember]), t.select(e3), t.close()), "default" !== t.enterKeyBehavior) {
                    const e4 = t.$.input.value;
                    t._oldValue !== e4 && (t.close(), t.$.fireEvent("change", { oldValue: t._oldValue, value: e4, type: "submit" }), "clearOnSubmit" === t.enterKeyBehavior && (Smart.MaskedTextBox && t instanceof Smart.MaskedTextBox ? (t._cleanMask(), t._setMaskToInput(), t.$.input.selectionStart = t.$.input.selectionEnd = 0) : t.$.input.value = ""), t._oldValue = t._changingOldValue = t.value = t._toDefaultDisplayMode(t.$.input.value)), t._submitted = true;
                  }
                  break;
                }
                case "Escape":
                  if (t.$.dropDownContainer && t.close(), t._closedFromKeyCombination = true, "none" === t.escKeyMode) return;
                  switch (t.escKeyMode) {
                    case "none":
                      break;
                    case "clearValue":
                      t.value = t.$.input.value = "";
                      break;
                    case "previousValue":
                      t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(t._oldValue) : t._oldValue;
                  }
                  break;
                case " ":
                  "escaped" === t.displayMode && function(n) {
                    let l = t.$.input.selectionStart, a2 = t.$.input.selectionEnd, o = t.$.input.value;
                    e2.preventDefault(), o = o.substring(0, l) + n + o.substring(a2, o.length), t.value = t._toDefaultDisplayMode(o), t.$.input.value = o, t.$.input.selectionStart = t.$.input.selectionEnd = l + 2;
                  }("\\s");
                  break;
                case "Backspace":
                  if ("escaped" === t.displayMode && t.$.input.selectionStart === t.$.input.selectionEnd) {
                    let e3 = t.$.input.selectionStart;
                    "\\" !== t.$.input.value[e3 - 2] || "s" !== t.$.input.value[e3 - 1] && "n" !== t.$.input.value[e3 - 1] || (t.$.input.value = t.$.input.value.substring(0, e3 - 2) + t.$.input.value.substring(e3 - 2, t.$.input.value.length), t.$.input.selectionStart = e3 - 2);
                  }
              }
            }
            _keyUpHandler(e2) {
              const t = this;
              if (!t.disabled && "Escape" !== e2.key && e2.target !== t.$.listBox.$.filterInput && (e2.target === t.$.input && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = false), t.$.input)) {
                const e3 = t.$.input.value;
                t._changingOldValue !== e3 && t.$.fireEvent("changing", { oldValue: t._changingOldValue, value: e3 }), t._changingOldValue = e3;
              }
            }
            _listBoxItemClickHandler(e2) {
              const t = this, n = e2.detail;
              if (super._listBoxItemClickHandler(e2), n.selected) {
                if ("escaped" === t.displayMode) {
                  const e3 = t.$.input.value;
                  t.value = t._toDefaultDisplayMode(e3), t.$.input.value = e3;
                } else t.value = t.$.input.value;
                t._oldValue !== t.value && (t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value }), t.$.input.focus());
              }
            }
            _submitKeyUpHandler() {
              const e2 = this;
              e2._submitted && ("clearOnSubmit" === e2.enterKeyBehavior && (e2.$.input.selectionStart = e2.$.input.selectionEnd = 0), e2._submitted = false);
            }
            _textBoxKeyUpHandler(e2) {
              const t = this;
              if (t.disabled || e2.altKey || e2.ctrlKey) return;
              if ("escaped" === t.displayMode) {
                const e3 = t.$.input.value;
                t.value = t._toDefaultDisplayMode(t.$.input.value), t.$.input.value = e3;
              } else t.value = t.$.input.value;
              let n;
              if (1 === t.$.listBox.selectedIndexes.length && (n = t.$.listBox.getItem(t.$.listBox.selectedValues[0]), t.value !== n[t.inputMember] && t.unselect(n)), t._showAutoCompleteHighlighter || (t.$.autoCompleteString.textContent = ""), "Alt" === e2.key || "Control" === e2.key || !t.opened && "Escape" === e2.key || "Enter" === e2.key) t._closedFromKeyCombination = false;
              else if (e2.key && e2.key.indexOf("Arrow") > -1) t._handlePointerInEscapedSymbol("ArrowRight" === e2.key ? "next" : void 0);
              else {
                if ("none" !== t.autoComplete && (t.$.input.value.length > 0 || "auto" === t.dropDownOpenMode)) {
                  const e3 = super._autoComplete.bind(t);
                  if (t._autoCompleteTimer && clearTimeout(t._autoCompleteTimer), 0 === t.$.listBox._items.length && "function" != typeof t.dataSource) return void t.close();
                  t._autoCompleteTimer = setTimeout(function() {
                    e3(true);
                  }, t.autoCompleteDelay);
                } else t.close();
                "Enter" === e2.key && t.value != t.value && t._browserIsIEorEdge && (t.value = t.$.input.value, t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value }));
              }
            }
            _listBoxChangeHandler(e2) {
              const t = this;
              if (e2.stopPropagation(), e2.detail.selected) {
                const n = t.$.listBox._items[e2.detail.index];
                let l = "";
                n && (l = n[t.inputMember]), t.$.listBox.$.filterInput.value = l, t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(l) : t._toDefaultDisplayMode(l), t.set("value", t._toDefaultDisplayMode(t.$.input.value));
              }
              "none" !== t.autoComplete && "function" != typeof t.dataSource && t._autoComplete(true);
            }
            _mouseEventsHandler(e2) {
              "mouseenter" === e2.type ? this.setAttribute("hover", "") : this.removeAttribute("hover");
            }
            _textBoxChangeHandler(e2) {
              const t = this;
              if (e2.stopPropagation(), "escaped" === t.displayMode) {
                const n = t.$.input.value, l = t.$.input.selectionStart, a2 = t.$.input.selectionEnd, o = e2.clipboardData || e2.originalEvent && e2.originalEvent.clipboardData || window.clipboardData;
                if (o) {
                  let n2 = o.getData("text"), i = t.$.input.value;
                  e2.preventDefault(), n2 = t._toEscapedDisplayMode(n2), t.$.input.value = i.substring(0, l) + n2 + i.substring(a2, i.length);
                }
                t.value = t._toDefaultDisplayMode(t.$.input.value), t.$.input.value = n;
              } else t.value = t.$.input.value;
              t._handleHintContainer();
            }
            _textBoxSelectHandler() {
              const e2 = this;
              e2.disabled || (e2.selectionStart = e2.$.input.selectionStart, e2.selectionEnd = e2.$.input.selectionEnd);
            }
            _toEscapedDisplayMode(e2) {
              const t = [{ key: /\r\n|\n\r|\n|\r/g, value: "\\n" }, { key: /\s/g, value: "\\s" }, { key: /\n/g, value: "\\n" }, { key: /\t/g, value: "\\t" }, { key: /\f/g, value: "\\f" }, { key: /\r/g, value: "\\r" }];
              for (let n = 0; n < t.length; n++) e2 = e2.replace(t[n].key, t[n].value);
              return e2;
            }
            _toDefaultDisplayMode(e2) {
              e2 || (e2 = "");
              const t = [{ key: /\\s/g, value: " " }, { key: /\\n/g, value: "\n" }, { key: /\\t/g, value: "	" }, { key: /\\f/g, value: "\f" }, { key: /\\r/g, value: "\r" }];
              for (let n = 0; n < t.length; n++) e2 = e2.replace(t[n].key, t[n].value);
              return e2;
            }
            _documentDownHandler(e2) {
              const t = this;
              if (t.disabled || t.readonly) return;
              let n = e2.originalEvent.target;
              if (t.enableShadowDOM) if (n = e2.originalEvent.composedPath()[0], null === t._dropDownParent) t._isDropDownClicked = n.closest(".smart-drop-down-container") === t.$.dropDownContainer;
              else {
                let e3 = n.getRootNode().host;
                e3 && e3.closest(".smart-drop-down-container") === t.$.dropDownContainer && (t._isDropDownClicked = true);
              }
              else t._isDropDownClicked = n.closest(".smart-drop-down-container") === t.$.dropDownContainer;
              (e2.originalEvent.target.closest("smart-list-item") || t._isDropDownClicked) && (t._preventDropDownClose = true);
            }
            _documentMoveHandler() {
            }
            _documentUpHandler(e2) {
              const t = this;
              if (t.disabled) return;
              let n = t.enableShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if (n) if ("escaped" === t.displayMode && n === t.$.input && t._handlePointerInEscapedSymbol(), t._isDropDownClicked || t.readonly) delete t._isDropDownClicked;
              else if (n !== t.$.input || "auto" !== t.dropDownOpenMode) {
                for (; n; ) {
                  if (n instanceof Smart.ListItem && n.ownerListBox === t.$.listBox) {
                    if (n.unselectable || n.disabled) return;
                    return "escaped" === t.displayMode ? t.$.input.value = t._toEscapedDisplayMode(n[t.inputMember]) : t.$.input.value = t._toDefaultDisplayMode(n[t.inputMember]), t.value = t.$.input.value, t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value, type: "submit" }), t._oldValue = t._changingOldValue = t.value, "clearOnSubmit" === t.enterKeyBehavior && (t.$.input.value = t.value = ""), super._autoComplete(true), t.close(), n = "item", void t.$.input.focus();
                  }
                  if (n === t.$.listBox) return void (n = "listBox");
                  n = n.parentElement;
                }
                "listBox" === n || "item" === n || t.close();
              } else super._autoComplete(true);
            }
          });
        }
      ),
      /***/
      8466: (
        /***/
        () => {
          Smart("smart-window", class extends Smart.ContentElement {
            static get properties() {
              return { collapsed: { value: false, type: "boolean" }, closeOnMaskClick: { value: false, type: "boolean" }, disableSnap: { value: false, type: "boolean" }, footerPosition: { value: "bottom", allowedValues: ["bottom", "none"], type: "string" }, footerTemplate: { value: null, type: "any" }, headerButtons: { value: ["close", "maximize", "minimize"], type: "array" }, headerPosition: { value: "top", allowedValues: ["top", "bottom", "left", "right", "none"], type: "string" }, headerTemplate: { value: null, type: "any" }, label: { value: "", type: "string" }, liveResize: { value: false, type: "boolean" }, maximized: { value: false, type: "boolean" }, modal: { value: false, type: "boolean" }, minimized: { value: false, type: "boolean" }, opened: { value: false, type: "boolean" }, pinned: { value: false, type: "boolean" }, resizeIndicator: { value: false, type: "boolean" }, resizeMode: { allowedValues: ["none", "horizontal", "vertical", "both", "top", "bottom", "left", "right"], value: "none", type: "string" }, windowParent: { value: null, type: "any" } };
            }
            static get listeners() {
              return { "document.dragstart": "_dragStartHandler", "document.focusin": "_documentFocusInEventHandler", "document.move": "_documentMoveHandler", "document.up": "_documentUpHandler", "document.wheel": "_mouseWheelHandler", "document.selectstart": "_documentSelectStartHandler", down: "_downHandler", focus: "_focusHandler", blur: "_focusHandler", move: "_moveHandler", keydown: "_keyDownHandler", keyup: "_keyUpHandler" };
            }
            get hasStyleObserver() {
              return false;
            }
            static get styleUrls() {
              return ["smart.button.css", "smart.window.css"];
            }
            template() {
              return '<div role="presentation">\n                    <div class="smart-content-container" id="container">\n                        <div id="headerSection" class="smart-header-section" role="heading" aria-level="1">\n                            <div id="header" class="smart-header" role="presentation">[[label]]</div>\n                            <div id="buttonsContainer" class="smart-buttons-container" role="presentation">\n                                <button id="pinButton" class="smart-button smart-element smart-pin-button" aria-label="Pin"></button>\n                                <button id="collapseButton" class="smart-button smart-element smart-collapse-button" aria-label="Collapse"></button>\n                                <button id="minimizeButton" class="smart-button smart-element smart-minimize-button"aria-label="Minimize"></button>\n                                <button id="maximizeButton" class="smart-button smart-element smart-maximize-button" aria-label="Maximize"></button>\n                                <button id="closeButton" class="smart-button smart-element smart-close-button" aria-label="Close"></button>\n                            </div>\n                        </div>\n                        <div class="smart-content" inner-h-t-m-l="[[innerHTML]]"><content></content></div>\n                        <div id="footer" class="smart-footer"></div>\n                    </div>\n                </div>';
            }
            propertyChangedHandler(e2, t, a2) {
              const i = this;
              switch (e2) {
                case "collapsed":
                  a2 ? i.collapse(true) : i.expand(true);
                  break;
                case "disabled":
                case "unfocusable":
                  i._setFocusable();
                  break;
                case "headerTemplate":
                case "footerTemplate":
                  i._applyLayoutTemplate(i.$[e2.split(/[T]/)[0]], a2);
                  break;
                case "headerButtons":
                  i._setHeaderButtons();
                  break;
                case "headerPosition": {
                  const e3 = i.minimized;
                  i._preventEventFiring = true, i.restore(), delete i._preventEventFiring, e3 && i.minimize();
                  break;
                }
                case "label":
                  i.$.header.innerHTML = i.label;
                  break;
                case "maximized":
                  a2 ? i.maximize(true) : i.restore(e2);
                  break;
                case "modal":
                  i._setModal(), i.setAttribute("aria-modal", a2);
                  break;
                case "minimized":
                  a2 ? i.minimize(true) : i.restore(e2);
                  break;
                case "opened":
                  a2 ? i.open(true) : i.close(true);
                  break;
                case "resizeMode":
                  i.$.container.classList.remove("smart-window-resizing-bottom-right", "smart-window-resizing-top-right", "smart-window-resizing-top-left", "smart-window-resizing-bottom-left", "smart-window-resizing-top", "smart-window-resizing-bottom", "smart-window-resizing-left", "smart-window-resizing-right");
                  break;
                case "windowParent":
                  i._setElementParent(a2);
                  break;
                default:
                  super.propertyChangedHandler(e2, t, a2);
              }
            }
            ready() {
              super.ready(), this._windowParent = { initialParent: this.parentElement };
            }
            render() {
              const e2 = this, t = e2.animation;
              e2.$.header.id || (e2.$.header.id = e2.id + "Header"), e2.$.content.id || (e2.$.content.id = e2.id + "Content"), e2.opened || (e2.animation = "none"), e2._windowParent = { initialParent: e2.parentElement }, e2.$.addClass("smart-window"), e2._createElement(), e2._setElementParent(e2.windowParent), e2._setHeaderButtons(), e2.headerTemplate && e2._applyLayoutTemplate(e2.$.header, e2.headerTemplate), e2.footerTemplate && e2._applyLayoutTemplate(e2.$.footer, e2.footerTemplate), e2.opened ? e2.open() : e2.close(), e2.maximized && e2.maximize(true), e2.minimized && e2.minimize(true), e2.collapsed && e2.collapse(true), e2.pinned ? e2.pin() : e2.unpin(), e2._setFocusable(), e2.animation = t, e2.setAttribute("aria-modal", e2.modal), e2.setAttribute("aria-labelledby", e2.$.header.id), e2._setupDismissTargets(), super.render();
            }
            refresh() {
              const e2 = this;
              e2.headerTemplate && e2._applyLayoutTemplate(e2.$.header, e2.headerTemplate), e2.footerTemplate && e2._applyLayoutTemplate(e2.$.footer, e2.footerTemplate), e2.opened ? e2.open() : e2.close(), e2.maximized && e2.maximize(true), e2.minimized && e2.minimize(true), e2.collapsed && e2.collapse(true), e2.pinned ? e2.pin() : e2.unpin();
            }
            static get requires() {
              return { "Smart.Button": "smart.button.js" };
            }
            _setFocusable() {
              const e2 = this;
              if (e2.disabled || e2.unfocusable) e2.removeAttribute("tabindex");
              else {
                let t = e2.tabIndex > 0 ? e2.tabIndex : 0;
                e2.setAttribute("tabindex", t);
              }
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? t.$.content.appendChild(e2) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "appendChild", node: "node" }));
            }
            collapse(e2) {
              const t = this;
              !e2 && t.collapsed || (t.collapsed = true, t.$.fireEvent("collapse"), "left" === t.headerPosition || "right" === t.headerPosition ? t.style.width = "" : t.style.height = "");
            }
            close(e2) {
              const t = this;
              if (e2 || !t.$.hasClass("smart-visibility-hidden")) {
                if (t.isCompleted) {
                  if (t.$.fireEvent("closing").defaultPrevented) return;
                  t.$.addClass("smart-visibility-hidden"), t.opened = false, t.isRendered && t.$.fireEvent("close");
                } else t.$.addClass("smart-visibility-hidden"), t.opened = false;
                t._setModal(), t.removeAttribute("ontop");
              }
            }
            attached() {
              super.attached();
              const e2 = this;
              e2.isRendered, e2._windowParent.parent && e2._windowParent.parent !== e2.getShadowRootOrBody() && e2._windowParent.parent.querySelectorAll("smart-window, smart-dialog-window, smart-progress-window, smart-wait-window, smart-alert-window, smart-prompt-window, smart-multiline-prompt-window") && "static" === window.getComputedStyle(e2._windowParent.parent).getPropertyValue("position") && (e2._windowParent.parent.style.position = "relative"), e2.opened && e2._modal && e2.parentElement.insertBefore(e2._modal, e2);
            }
            bringToFront() {
              const e2 = this;
              if (!e2.parentElement) return;
              const t = e2.parentElement.closest(".smart-window");
              if (t) return void t.bringToFront();
              const a2 = document.body.getElementsByClassName("smart-window");
              let i = [];
              for (let e3 = 0; e3 < a2.length; e3++) {
                const t2 = a2[e3];
                t2.removeAttribute("ontop"), t2.opened && i.push(t2);
              }
              1 === i.length && i[0] === e2 || e2.setAttribute("ontop", "");
            }
            clear() {
              const e2 = this;
              e2.isCompleted && "Smart-WINDOW" === e2.nodeName && (e2.innerHTML = e2.$.content.innerHTML = "");
            }
            detached() {
              super.detached();
              const e2 = this;
              e2._windowParent.parent && !e2._windowParent.parent.querySelectorAll("smart-window, smart-dialog-window, smart-progress-window, smart-wait-window, smart-alert-window, smart-prompt-window, smart-multiline-prompt-window") && (e2._windowParent.parent.style.position = ""), e2._modal && e2._modal.parentElement && e2._modal.parentElement.removeChild(e2._modal), e2._resizeDummy && e2._resizeDummy.parentElement && e2._handleWindowResizeDummy(), e2._refreshMinimizedWindowsPosition();
            }
            expand(e2) {
              const t = this;
              (e2 || t.collapsed) && (t.collapsed = false, t.$.fireEvent("expand"), t.maximized ? "left" === t.headerPosition || "right" === t.headerPosition ? t.style.width = Math.max(t._windowParent.scrollElement.scrollWidth, t._windowParent.element.clientWidth) - t._windowParent.borderWidth + "px" : t.style.height = Math.max(t._windowParent.scrollElement.scrollHeight, t._windowParent.element.clientHeight) - t._windowParent.borderWidth + "px" : "left" === t.headerPosition || "right" === t.headerPosition ? t.style.width = t.className.indexOf("smart-window-snapped-") < 0 && t._dragDetails ? t._dragDetails.width + "px" : "" : t.style.height = t.className.indexOf("smart-window-snapped-") < 0 && t._dragDetails ? t._dragDetails.height + "px" : "");
            }
            maximize(e2) {
              const t = this;
              if (!e2 && t.maximized) return;
              t.minimized && t._restoreFromMinimization(e2), t._setDragDetails("minimize"), "none" !== t.resizeMode && t.$.container.classList.remove("smart-window-resizing-bottom-right", "smart-window-resizing-top-right", "smart-window-resizing-top-left", "smart-window-resizing-bottom-left", "smart-window-resizing-top", "smart-window-resizing-bottom", "smart-window-resizing-left", "smart-window-resizing-right"), t._snapDummy && t.$.hasClass("smart-window-snapped-" + t._snapDummy._position) && t.classList.remove("smart-window-snapped-" + t._snapDummy._position), t.maximized = true, t.$.fireEvent("maximize"), t.style.left = t.style.top = 0, t.style.maxWidth = t.style.maxHeight = "none";
              const a2 = t._windowParent.scrollElement.scrollHeight, i = t._windowParent.scrollElement.scrollWidth, n = t._windowParent.element.clientHeight, o = t._windowParent.element.clientWidth, s = Math.max(a2, n), r2 = Math.max(i, o);
              "top" === t.headerPosition || "bottom" === t.headerPosition ? (t.style.width = i > o ? r2 - t._windowParent.borderWidth + "px" : "100%", t.collapsed || (t.style.height = a2 > n ? s - t._windowParent.borderWidth + "px" : "100%")) : (t.collapsed || (t.style.width = i > o ? r2 - t._windowParent.borderWidth + "px" : "100%"), t.style.height = a2 > n ? s - t._windowParent.borderWidth + "px" : "100%"), "100%" !== t.style.height && t.addEventListener("transitionend", function e3() {
                if (!t.maximized || !t.hasAnimation) return;
                const a3 = t._windowParent.scrollElement.scrollHeight, i2 = t._windowParent.element.clientHeight, n2 = Math.max(a3, i2);
                ("top" === t.headerPosition || "bottom" === t.headerPosition) && t.collapsed || (t.style.height = a3 > i2 ? n2 - t._windowParent.borderWidth + "px" : "100%"), t.removeEventListener("transitionend", e3);
              });
            }
            minimize(e2) {
              const t = this;
              if (!e2 && t.minimized) return;
              t.maximized && (t._preventEventFiring = true, t.restore(), delete t._preventEventFiring), t._setDragDetails(), t.minimized = true, t.$.fireEvent("minimize"), t._snapDummy && t.$.hasClass("smart-window-snapped-" + t._snapDummy._position) && (t.$.removeClass("smart-window-snapped-" + t._snapDummy._position), t.style.right = t.style.top = t.style.left = "");
              const a2 = t._getAllMinimizedWindows(t._windowParent.element);
              if (a2.length > 0) {
                const e3 = a2[a2.length - 1];
                t.style.left = (e3.offsetLeft + e3.offsetWidth + t._dragDetails.minWidth + 10 > t._windowParent.element.clientWidth ? e3.offsetLeft : e3.offsetLeft + e3.offsetWidth + 5) + "px", t.style.top = e3.offsetTop + "px";
              } else t.style.left = "5px", t.style.top = t._windowParent.element.clientHeight + t._windowParent.scrollElement.scrollTop - t.$.headerSection.offsetHeight - 5 + "px";
              t.style.width = "", t.style.height = t.$.headerSection.offsetHeight + "px";
            }
            _createElement() {
              this.setAttribute("role", "dialog");
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? t.$.content.removeChild(e2) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "removeChild", node: "node" }));
            }
            restore(e2) {
              const t = this;
              if ("maximized" === e2 || t.maximized ? (t.maximized = false, t.style.width = t.style.height = t.style.top = t.style.left = "") : ("minimized" === e2 || t.minimized) && t._restoreFromMinimization(e2), t._preventEventFiring || t.$.fireEvent("restore"), t.style.maxWidth = t.style.maxHeight = "", t._dragDetails) {
                if (t.style.left = Math.max(0, Math.min(t._dragDetails.windowX, t._windowParent.element.clientWidth - t._dragDetails.width)) + "px", t.style.top = Math.max(0, Math.min(t._dragDetails.windowY, t._windowParent.scrollElement.scrollHeight - t._dragDetails.height)) + "px", t.collapsed) return void ("top" === t.headerPosition || "bottom" === t.headerPosition ? t.style.width = t._dragDetails.width + "px" : t.style.height = t._dragDetails.height + "px");
                t._dragDetails.resized && (t.style.width = t._dragDetails.width + "px", t.style.height = t._dragDetails.height + "px");
              }
            }
            toggle() {
              const e2 = this;
              e2.opened ? e2.close() : e2.open();
            }
            openModal() {
              this.modal = true, this.open();
            }
            open(e2) {
              const t = this;
              if (e2 || t.$.hasClass("smart-visibility-hidden")) {
                if (t.isCompleted) {
                  if (t.$.fireEvent("opening").defaultPrevented) return;
                  t.$.removeClass("smart-visibility-hidden"), t.opened = true, t.$.fireEvent("open");
                } else t.$.removeClass("smart-visibility-hidden"), t.opened = true;
                t.bringToFront(), t._setModal(), t._handleActiveState(), t.hasAnimation ? t.addEventListener("transitionend", a2) : a2();
              }
              function a2(e3) {
                if (!t.hasAnimation || e3 && e3.target === t) {
                  if (t.removeEventListener("transitionend", a2), t._onOpenCallback) return void t._onOpenCallback();
                  t.focus();
                }
              }
            }
            _setupDismissTargets() {
              const e2 = this;
              if (e2.querySelector('[data-dismiss="modal"]')) {
                const t = e2.querySelectorAll('[data-dismiss="modal"]'), a2 = () => {
                  e2.close();
                };
                for (let e3 = 0; e3 < t.length; e3++) t[e3].removeEventListener("click", a2, null), t[e3].addEventListener("click", a2);
              }
            }
            pin() {
              this.pinned = true;
            }
            unpin() {
              this.pinned = false;
            }
            _applyLayoutTemplate(e2, t) {
              const a2 = this;
              if (!t) return e2.innerHTML = "", void (e2 === a2.$.header && a2.label && (e2.innerHTML = a2.label));
              "content" in document.createElement("template") ? (t instanceof HTMLTemplateElement || (t = document.getElementById(t)), null !== t && "content" in t ? (e2.innerHTML = "", e2.appendChild(document.importNode(t.content, true))) : a2.error(a2.localize("invalidTemplate", { elementType: a2.nodeName.toLowerCase(), property: e2 === a2.$.footer ? "footerTemplate" : "headerTemplate" }))) : a2.error(a2.localize("htmlTemplateNotSuported", { elementType: a2.nodeName.toLowerCase() }));
            }
            _cancelDragging(e2) {
              const t = this;
              if (t._dragDetails && t._dragDetails.started && "drag" === t._dragDetails.type) {
                if (!e2) {
                  const a2 = t.getBoundingClientRect();
                  e2 = { pageX: a2.left, pageY: a2.top };
                }
                t.$.fireEvent("dragEnd", { left: e2.pageX, top: e2.pageY }), t.removeAttribute("dragged"), t._dragDetails.started = false, delete t._mouseManipulation;
              }
            }
            _documentFocusInEventHandler(e2) {
              const t = this;
              t._changingFocus && (t.contains(e2.target) || t.contains(e2.composedPath()[0]) || t.focus(), delete t._changingFocus);
            }
            _downHandler(e2) {
              const t = this;
              let a2 = Smart.Utilities.Core.isMobile ? document.elementFromPoint(e2.pageX - window.pageXOffset, e2.pageY - window.pageYOffset) : e2.originalEvent.target;
              if ((t.shadowRoot || t.isInShadowDOM) && (a2 = e2.originalEvent.composedPath()[0]), e2.stopPropagation(), t.disabled || !Smart.Utilities.Core.isMobile && 1 !== e2.which) return;
              if (t._tabsWindow && (t._tabsWindow._isAutoHideWindowClicked = true), t.hasAttribute("ontop") || t.bringToFront(), a2.closest && a2.closest(".smart-buttons-container") === t.$.buttonsContainer) {
                if (t._buttonPressed = a2.closest(".smart-button"), t._buttonPressed) return;
              } else if (a2.getRootNode() && a2.getRootNode().host && (t._buttonPressed = a2.getRootNode().host, t._buttonPressed.closest(".smart-buttons-container") === t.$.buttonsContainer)) return;
              t._isWindowContentClicked = a2.closest(".smart-content");
              let i = t.closest("smart-docking-layout");
              if (t.isInShadowDOM && !i) {
                let e3 = t.getRootNode().host;
                for (; e3 && (i = e3.closest("smart-docking-layout"), !i) && e3.getRootNode(); ) e3 = e3.getRootNode().host;
              }
              if (!(t instanceof Smart.TabsWindow && i && i.disabled)) {
                if (t._handleActiveState(), !(t instanceof Smart.TabsWindow && i)) return a2.closest(".smart-header-section") === t.$.headerSection && (void 0 === t._dblClickDetails && (t._dblClickDetails = { clicks: 0 }), clearTimeout(t._dblClickDetails.timeOut), t._dblClickDetails.clicks++, t._dblClickDetails.timeOut = setTimeout(function() {
                  t._dblClickDetails && (t._dblClickDetails.clicks = 0);
                }, 300), 2 === t._dblClickDetails.clicks) ? (t._headerDblCickHandler(e2), void (t._dblClickDetails.clicks = 0)) : void (t.maximized || (Smart.Utilities.Core.isMobile && t._moveHandler(e2), !t.pinned && !t.minimized && t.$.container.className.indexOf("smart-window-resizing") < 0 && (a2 = a2.closest(".smart-header-section"), a2 && a2 === t.$.headerSection && (t._mouseManipulation = true, t._setDragDetails("drag", e2))), "none" !== t.resizeMode && t.$.container.className.indexOf("smart-window-resizing") > -1 && (t._mouseManipulation = true, t._setDragDetails("resize", e2))));
                t.$.hasClass("smart-docking-layout-auto-hide-window") && (Smart.Utilities.Core.isMobile && t._moveHandler(e2), "none" !== t.resizeMode && t.$.container.className.indexOf("smart-window-resizing") > -1 && (t._mouseManipulation = true, t._setDragDetails("resize", e2)));
              }
            }
            _documentMoveHandler(e2) {
              const t = this;
              !t._dragDetails || !t._dragDetails.started || t.minimized || !t._mouseManipulation || Math.abs(e2.pageX - t._dragDetails.x) <= 5 && Math.abs(e2.pageY - t._dragDetails.y) <= 5 || (t.hasAttribute("dragged") || t.hasAttribute("resized") || t.$.fireEvent(t._dragDetails.type + "Start", { left: e2.pageX, top: e2.pageY, width: t.offsetWidth, height: t.offsetHeight }), e2.stopPropagation(), "drag" !== t._dragDetails.type || t.pinned ? (t._dragDetails.resized = true, t._resize(t._dragDetails.side, e2), t._dragDetails.x = Math.max(t._windowParent.offsetLeft + t._dragDetails.left, Math.min(t._windowParent.offsetLeft + t._dragDetails.left + (t._dragDetails.side.toLowerCase().indexOf("left") > -1 ? 0 : t._dragDetails.newWidth), e2.pageX)), t._dragDetails.y = Math.max(t._windowParent.offsetTop + t._dragDetails.top, Math.min(t._windowParent.offsetTop + t._dragDetails.top + (t._dragDetails.side.toLowerCase().indexOf("top") > -1 ? 0 : t._dragDetails.newHeight), e2.pageY))) : (t.setAttribute("dragged", ""), t._snapDummy && t.$.hasClass("smart-window-snapped-" + t._snapDummy._position) && (t.$.removeClass("smart-window-snapped-" + t._snapDummy._position), t.style.right = t.style.top = t.style.left = "", t.collapsed || (t.style.height = t._dragDetails.height + "px", t.style.width = t._dragDetails.width + "px")), t._drag(e2, "both"), t._dragDetails.x = Math.max(t._windowParent.offsetLeft + t._dragDetails.offsetX - t._windowParent.scrollElement.scrollLeft, Math.min(t._windowParent.offsetLeft + t._windowParent.element.offsetWidth - (t._windowParent.element.offsetWidth - t.offsetLeft) + t._dragDetails.offsetX, e2.pageX)), t._dragDetails.y = Math.max(t._windowParent.offsetTop + t._dragDetails.offsetY - t._windowParent.scrollElement.scrollTop, Math.min(t._windowParent.offsetTop + t._windowParent.element.offsetHeight - (t._windowParent.element.offsetHeight - t.offsetTop) + t._dragDetails.offsetY, e2.pageY)), e2.pageX >= t._windowParent.offsetLeft + t._windowParent.scrollElement.scrollWidth - 1 ? t._handleSnapping("right") : e2.pageY <= t._windowParent.offsetTop ? t._handleSnapping("top") : e2.pageX <= t._windowParent.offsetLeft ? t._handleSnapping("left") : t._handleSnapping()));
            }
            _documentUpHandler(e2) {
              const t = this, a2 = t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if (t.disabled) return t.removeAttribute("active"), delete t._buttonPressed, void delete t._isWindowContentClicked;
              if (t._dragDetails && t._dragDetails.started && (t.hasAttribute("resized") && (t.$.fireEvent(t._dragDetails.type + "End", { left: e2.pageX, top: e2.pageY, width: t._dragDetails.newWidth, height: t._dragDetails.newHeight }), t.removeAttribute("resized"), t._handleWindowResizeDummy(), t.$.container.classList.remove("smart-window-resizing-bottom-right", "smart-window-resizing-top-right", "smart-window-resizing-top-left", "smart-window-resizing-bottom-left", "smart-window-resizing-top", "smart-window-resizing-bottom", "smart-window-resizing-left", "smart-window-resizing-right")), setTimeout(function() {
                t.$.removeClass("no-transition");
              }, 20), t.hasAttribute("dragged") && (t.$.fireEvent(t._dragDetails.type + "End", { left: e2.pageX, top: e2.pageY }), t.removeAttribute("dragged")), t._dragDetails.started = false, delete t._mouseManipulation), t._snapDummy && !t._snapDummy.classList.contains("smart-visibility-hidden")) {
                switch (t._snapDummy._position) {
                  case "left":
                  case "top":
                    t.style.left = t.style.top = "0", t.style.right = "auto";
                    break;
                  case "right":
                    t.style.left = "auto", t.style.top = t.style.right = "0";
                }
                t.style.width = "top" === t._snapDummy._position ? "100%" : "50%", t.style.height = "100%", t.$.addClass("smart-window-snapped-" + t._snapDummy._position), t._handleSnapping();
              }
              t._modal && a2 === t._modal && !t._isWindowContentClicked && (t.closeOnMaskClick ? t.close() : t.focus()), t._isWindowButton(a2) && t.focus(), delete t._isWindowContentClicked, delete t._buttonPressed;
              const i = t.shadowRoot && t._windowParent.element && t._windowParent.element.getRootNode() ? t._windowParent.element.getRootNode().activeElement : document.activeElement;
              if (!t.hasAttribute("active") || i === t) return;
              if (!a2.closest) return;
              let n = a2.closest(".smart-window");
              for (; n && n !== t; ) n = n.parentElement, n && (n = n.closest(".smart-window"));
              t.opened && n !== t && t.removeAttribute("active");
            }
            _documentSelectStartHandler(e2) {
              this._dragDetails && this._dragDetails.started && e2.preventDefault();
            }
            _drag(e2, t) {
              const a2 = this;
              if (!e2 || a2.pinned || a2.maximized) return;
              let i, n;
              a2._dragDetails && a2._dragDetails.started || a2._setDragDetails("drag", e2), a2.$.addClass("no-transition"), "object" == typeof e2 ? (i = e2.pageX - a2._dragDetails.x, n = e2.pageY - a2._dragDetails.y) : i = n = e2;
              const o = Math.max(a2._windowParent.element.clientHeight, a2._windowParent.scrollElement.scrollHeight), s = Math.max(a2._windowParent.element.clientWidth, a2._windowParent.scrollElement.scrollWidth);
              switch (t) {
                case "horizontal":
                  a2._dragDetails.windowX = Math.max(0, Math.min(a2._dragDetails.windowX + i, s - a2.offsetWidth)), a2.style.left = a2._dragDetails.windowX + "px";
                  break;
                case "vertical":
                  a2._dragDetails.windowY = Math.max(0, Math.min(a2._dragDetails.windowY + n, o - a2.offsetHeight)), a2.style.top = a2._dragDetails.windowY + "px";
                  break;
                case "both":
                  a2._dragDetails.windowX = Math.max(0, Math.min(a2._dragDetails.windowX + i, s - a2.offsetWidth)), a2._dragDetails.windowY = Math.max(0, Math.min(a2._dragDetails.windowY + n, o - a2.offsetHeight)), a2.style.left = a2._dragDetails.windowX + "px", a2.style.top = a2._dragDetails.windowY + "px";
              }
              a2._dragDetails.top = a2.offsetTop, a2._dragDetails.left = a2.offsetLeft;
            }
            _dragStartHandler(e2) {
              this._dragDetails && this._dragDetails.started && e2.preventDefault();
            }
            _focusHandler(e2) {
              const t = this;
              "focus" === e2.type ? (t.setAttribute("focus", ""), t.bringToFront()) : t._buttonPressed || (t.removeAttribute("focus"), t._dragDetails && t._dragDetails.started && t._handleWindowResizeDummy());
            }
            _getAllMinimizedWindows(e2) {
              const t = this;
              let a2 = [];
              e2 || (e2 = t._windowParent.element);
              const i = e2.querySelectorAll("smart-window");
              for (let e3 = 0; e3 < i.length; e3++) i[e3] !== t && i[e3].hasAttribute("minimized") && a2.push(i[e3]);
              return a2.sort(function(e3, t2) {
                let a3 = e3.getBoundingClientRect(), i2 = t2.getBoundingClientRect();
                return a3.right - i2.right;
              }), a2;
            }
            _handleSnapping(e2) {
              const t = this;
              e2 ? t.disableSnap || t.collapsed || (t._snapDummy || (t._snapDummy = document.createElement("div"), t._snapDummy.addEventListener("transitionend", function() {
                t._snapDummy.classList.contains("smart-visibility-hidden") && t._snapDummy.parentElement && t._snapDummy.parentElement.removeChild(t._snapDummy);
              })), t._snapDummy.className = "smart-window-snap-" + e2 + "-feedback", t._snapDummy._position = e2, t._snapDummy.parentElement || t._windowParent.element.appendChild(t._snapDummy)) : t._snapDummy && t._snapDummy.parentElement && t._snapDummy.classList.add("smart-visibility-hidden");
            }
            _headerDblCickHandler(e2) {
              const t = this, a2 = t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              a2 !== t.$.headerSection && a2 !== t.$.header || t.$.maximizeButton && 0 === t.$.maximizeButton.offsetHeight || (t.maximized ? t.restore() : t.maximize());
            }
            _isWindowButton(e2) {
              const t = this;
              for (; e2 && (e2.closest && e2.closest(".smart-buttons-container")) !== t.$.buttonsContainer; ) e2 = e2.getRootNode().host;
              if (!e2) return;
              const a2 = /smart-(\w+[-]*\w*)-button/gi;
              if ((e2 = e2.closest(".smart-button")) && e2 === t._buttonPressed) switch (e2) {
                case t.$.closeButton:
                  return t.close(), true;
                case t.$.collapseButton:
                  return t.collapsed ? t.expand() : t.collapse(), true;
                case t.$.maximizeButton:
                  return t.maximized ? t.restore() : t.maximize(), true;
                case t.$.minimizeButton:
                  return t.minimized ? t.restore() : t.minimize(), true;
                case t.$.pinButton:
                  return t.pinned ? t.unpin() : t.pin(), true;
                default:
                  if (!a2.test(e2.className)) return;
                  return t.$.fireEvent(Smart.Utilities.Core.toCamelCase(e2.className.match(a2).toString().replace("smart-", "").replace("-button", "")), { button: e2 }), true;
              }
            }
            _keyDownHandler(e2) {
              const t = this;
              if (delete t._changingFocus, t.disabled || (t.hasAttribute("dragged") || t.hasAttribute("resized")) && t._mouseManipulation) return;
              const a2 = "ArrowDown" === e2.key || "ArrowRight" === e2.key ? 10 : -10, i = t.enableShadowDOM && t._windowParent.element.getRootNode() ? t._windowParent.element.getRootNode().activeElement : document.activeElement;
              switch (e2.key) {
                case "ArrowUp":
                case "ArrowDown":
                case "ArrowLeft":
                case "ArrowRight": {
                  if (t.minimized || i !== t) return;
                  let n = e2.key.indexOf("Right") > -1 || e2.key.indexOf("Left") > -1;
                  e2.preventDefault();
                  const o = (t.isInShadowDOM ? t.getRootNode().host : t).closest("smart-docking-layout");
                  if (!n && e2.altKey && !(t instanceof Smart.TabsWindow && o)) return void ("ArrowUp" === e2.key ? t.maximize() : t.restore());
                  if (t.maximized) return;
                  if (t.$.addClass("no-transition"), e2.ctrlKey && "none" !== t.resizeMode && !t.collapsed) return n = -1 === ["horizontal", "vertical", "both"].indexOf(t.resizeMode) ? t.resizeMode : n ? "right" : "bottom", t.hasAttribute("dragged") && t._cancelDragging(e2), t.hasAttribute("resized") || t.$.fireEvent("resizeStart", { position: { x: e2.pageX, y: e2.pageY } }), void t._resize(n, a2);
                  t.pinned || (t.hasAttribute("dragged") || (t.setAttribute("dragged", ""), t.$.fireEvent("dragStart", { left: e2.pageX, top: e2.pageY })), t._drag(a2, n ? "horizontal" : "vertical")), t.$.removeClass("no-transition");
                  break;
                }
                case "Escape":
                  t.headerButtons.indexOf("close") > -1 && t.close();
                  break;
                case "p":
                  e2.altKey && t.headerButtons.indexOf("pin") > -1 && (t.pinned ? t.unpin() : t.pin());
                  break;
                case "c":
                  e2.altKey && t.headerButtons.indexOf("collapse") > -1 && (t.collapsed ? t.expand() : t.collapse());
                  break;
                case "m":
                  e2.altKey && t.headerButtons.indexOf("minimize") > -1 && (t.minimized ? t.restore() : t.minimize());
                  break;
                case "Tab":
                  t.opened && t.modal && (t._changingFocus = true);
                  break;
                case "Enter":
                case " ": {
                  let a3;
                  if (t.shadowRoot || t.isInShadowDOM ? (a3 = e2.composedPath()[0], t._buttonPressed = a3.getRootNode().host) : (a3 = e2.target.closest && e2.target.closest(".smart-button"), t._buttonPressed = a3), !a3) return;
                  t._isWindowButton(a3), delete t._buttonPressed;
                  break;
                }
              }
            }
            _keyUpHandler(e2) {
              const t = this;
              if (e2.key) {
                if ("Control" === e2.key && t._dragDetails && t.hasAttribute("resized") && !t._mouseManipulation) {
                  if (!t._dragDetails.started) return;
                  "drag" !== t._dragDetails.type && (t.removeAttribute("resized"), t.$.fireEvent("resizeEnd", { left: e2.pageX, top: e2.pageY, width: t._dragDetails.newWidth, height: t._dragDetails.newHeight }), t._handleWindowResizeDummy()), t._dragDetails.started = false;
                }
                e2.key.indexOf("Arrow") > -1 && t.hasAttribute("dragged") && !t._mouseManipulation && t._cancelDragging(e2);
              }
            }
            _mouseWheelHandler(e2) {
              const t = this;
              !t.disabled && t._dragDetails && t._dragDetails.started && (e2.deltaY < 0 && t._windowParent.scrollElement.scrollTop + e2.deltaY <= 0 ? t.style.top = Math.max(0, t._dragDetails.windowY) + "px" : e2.deltaY > 0 && (t._dragDetails.windowY + t.offsetHeight + e2.deltaY >= t._windowParent.scrollElement.scrollHeight || t._windowParent.scrollElement.scrollTop + t._windowParent.element.clientHeight === t._windowParent.scrollElement.scrollHeight) || ("drag" === t._dragDetails.type ? (t._dragDetails.windowY += e2.deltaY, t.style.top = t._dragDetails.windowY + "px") : (t._dragDetails.height += e2.deltaY, t.style.height = t._dragDetails.height + "px")));
            }
            _moveHandler(e2) {
              const t = this;
              if (!(t.disabled || t.collapsed || t.maximized || t.minimized || (Smart.Utilities.Core.isMobile && navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform) && t.hasAttribute("dragged") && e2.originalEvent.preventDefault(), t._mouseManipulation || (t.$.container.className.indexOf("smart-window-resizing") > -1 && t.$.container.classList.remove("smart-window-resizing-bottom-right", "smart-window-resizing-top-right", "smart-window-resizing-top-left", "smart-window-resizing-bottom-left", "smart-window-resizing-top", "smart-window-resizing-bottom", "smart-window-resizing-left", "smart-window-resizing-right"), "none" === t.resizeMode)))) {
                const a2 = t.getBoundingClientRect(), i = e2.clientY < a2.top + 10, n = e2.clientY > a2.bottom - 10, o = e2.clientX > a2.right - 10, s = e2.clientX < a2.left + 10;
                switch (t.resizeMode) {
                  case "none":
                    break;
                  case "both":
                    if (t.resizeIndicator) return void (n && o && t.$.container.classList.add("smart-window-resizing-bottom-right"));
                    if (s || o) return i ? void t.$.container.classList.add("smart-window-resizing-top-" + (s ? "left" : "right")) : n ? void t.$.container.classList.add("smart-window-resizing-bottom-" + (s ? "left" : "right")) : void t.$.container.classList.add("smart-window-resizing-" + (s ? "left" : "right"));
                    if (i || n) {
                      if (o) return void t.$.container.classList.add("smart-window-resizing-" + (i ? "top-right" : "bottom-right"));
                      if (s) return void t.$.container.classList.add("smart-window-resizing-" + (i ? "top-left" : "bottom-left"));
                      t.$.container.classList.add("smart-window-resizing-" + (i ? "top" : "bottom"));
                    }
                    break;
                  case "horizontal":
                    if (t.resizeIndicator) return void (n && o && t.$.container.classList.add("smart-window-resizing-right"));
                    if (s) return void t.$.container.classList.add("smart-window-resizing-left");
                    o && t.$.container.classList.add("smart-window-resizing-right");
                    break;
                  case "vertical":
                    if (t.resizeIndicator) return void (n && o && t.$.container.classList.add("smart-window-resizing-bottom"));
                    if (i) return void t.$.container.classList.add("smart-window-resizing-top");
                    n && t.$.container.classList.add("smart-window-resizing-bottom");
                    break;
                  case "top":
                    if (i) {
                      if (t.resizeIndicator && !s) return;
                      t.$.container.classList.add("smart-window-resizing-top");
                    }
                    break;
                  case "bottom":
                    if (n) {
                      if (t.resizeIndicator && !o) return;
                      t.$.container.classList.add("smart-window-resizing-bottom");
                    }
                    break;
                  case "left":
                    if (s) {
                      if (t.resizeIndicator && !i) return;
                      t.$.container.classList.add("smart-window-resizing-left");
                    }
                    break;
                  case "right":
                    if (o) {
                      if (t.resizeIndicator && !n) return;
                      t.$.container.classList.add("smart-window-resizing-right");
                    }
                }
              }
            }
            _handleActiveState() {
              const e2 = this, t = document.querySelectorAll(".smart-window");
              for (let a2 = 0; a2 < t.length; a2++) t[a2].contains(e2) || e2.contains(t[a2]) || (t[a2].removeAttribute("active"), t[a2].removeAttribute("focus"));
              e2.setAttribute("active", "");
            }
            _handleWindowResizeDummy() {
              const e2 = this;
              if (e2._resizeDummy || (e2._resizeDummy = document.createElement("div"), e2._resizeDummy.classList.add("smart-window-resize-feedback")), !e2.hasAttribute("resized")) return e2._resizeDummy && e2._resizeDummy.remove(), void (!e2.liveResize && "resize" === e2._dragDetails.type && e2._dragDetails.started && (e2.style.top = e2._dragDetails.top + "px", e2.style.left = e2._dragDetails.left + "px", e2.style.width = e2._dragDetails.newWidth + "px", e2.style.height = e2._dragDetails.newHeight + "px"));
              e2._resizeDummy.parentElement || e2._resizeDummy.getRootNode().host || (e2._resizeDummy.style.width = e2.offsetWidth + "px", e2._resizeDummy.style.height = e2.offsetHeight + "px", e2._resizeDummy.style.top = e2.offsetTop + "px", e2._resizeDummy.style.left = e2.offsetLeft + "px", e2._windowParent.element.appendChild(e2._resizeDummy));
            }
            _resize(e2, t) {
              const a2 = this;
              let i;
              if ((!a2._dragDetails || a2._dragDetails && "drag" === a2._dragDetails.type) && a2._setDragDetails("resize"), !a2._dragDetails) return;
              a2._dragDetails.started = true, a2.hasAttribute("resized") || (a2.setAttribute("resized", ""), a2.hasAnimation && a2.$.addClass("no-transition")), a2.liveResize || a2._handleWindowResizeDummy();
              const n = a2._snapDummy && a2.$.hasClass("smart-window-snapped-" + a2._snapDummy._position) ? "snapWindowWidth" : "width";
              switch (e2) {
                case "left":
                  i = "object" == typeof t ? t.pageX - a2._dragDetails.x : t, i = i > 0 ? Math.min(i, a2._dragDetails[n] - a2._dragDetails.minWidth) : -1 * Math.min(a2._dragDetails.maxWidth ? a2._dragDetails.maxWidth - a2._dragDetails[n] : a2._dragDetails.left, Math.abs(i)), a2._dragDetails[n] = Math.min(a2._dragDetails[n] + a2._dragDetails.left - a2._windowParent.scrollElement.scrollLeft, a2._dragDetails[n] - i), a2._dragDetails.windowX = Math.max(a2._windowParent.scrollElement.scrollLeft, a2._dragDetails.windowX + i), "object" != typeof t && (a2._dragDetails[n] = Math.max(a2._dragDetails[n], a2._dragDetails.minWidth)), a2._dragDetails[n] >= a2._dragDetails.minWidth && (a2._dragDetails.left = a2._dragDetails.windowX, a2._dragDetails.newWidth = a2._dragDetails[n]);
                  break;
                case "right": {
                  const e3 = a2._windowParent.element.clientWidth !== a2._windowParent.element.offsetWidth ? a2._windowParent.borderWidth : 0, n2 = a2._snapDummy && a2.$.hasClass("smart-window-snapped-" + a2._snapDummy._position) ? "snapWindowWidth" : "width";
                  i = "object" == typeof t ? t.pageX - a2._dragDetails.x : t, i > 0 && a2._dragDetails.maxWidth && (i = Math.min(a2._dragDetails.maxWidth - a2._dragDetails[n2], i)), a2._dragDetails[n2] = Math.min(a2._windowParent.element.clientWidth + a2._windowParent.scrollElement.scrollLeft - a2._dragDetails.left - e3, Math.max(0, a2._dragDetails[n2] + i)), "object" != typeof t && (a2._dragDetails[n2] = Math.max(a2._dragDetails[n2], a2._dragDetails.minWidth)), a2._dragDetails.left = a2.offsetLeft, a2._dragDetails.newWidth = Math.max(a2._dragDetails.minWidth, a2._dragDetails[n2]);
                  break;
                }
                case "top":
                  a2._snapDummy && a2.$.hasClass("smart-window-snapped-" + a2._snapDummy._position) && (a2._dragDetails.height = a2._dragDetails.snapWindowHeight), i = "object" == typeof t ? t.pageY - a2._dragDetails.y : t, i = i > 0 ? Math.min(i, a2._dragDetails.height - a2._dragDetails.minHeight) : -1 * Math.min(a2._dragDetails.maxHeight ? a2._dragDetails.maxHeight - a2._dragDetails.height : a2._dragDetails.top, Math.abs(i)), a2._dragDetails.snapWindowHeight = a2._dragDetails.height = Math.min(a2._dragDetails.height + a2._dragDetails.top - a2._windowParent.scrollElement.scrollTop, a2._dragDetails.height - i), a2._dragDetails.windowY = Math.max(a2._windowParent.scrollElement.scrollTop, a2._dragDetails.windowY + i), "object" != typeof t && (a2._dragDetails.snapWindowHeight = a2._dragDetails.height = Math.max(a2._dragDetails.height, a2._dragDetails.minHeight)), a2._dragDetails.height >= a2._dragDetails.minHeight && (a2._dragDetails.top = a2._dragDetails.windowY, a2._dragDetails.newHeight = a2._dragDetails.height), a2._dragDetails.newWidth = Math.max(a2._dragDetails[n], a2._dragDetails.newWidth);
                  break;
                case "bottom":
                  a2._snapDummy && a2.$.hasClass("smart-window-snapped-" + a2._snapDummy._position) && (a2._dragDetails.height = a2._dragDetails.snapWindowHeight), i = "object" == typeof t ? t.pageY - a2._dragDetails.y : t, i > 0 && a2._dragDetails.maxHeight && (i = Math.min(a2._dragDetails.maxHeight - a2._dragDetails.height, i)), a2._dragDetails.snapWindowHeight = a2._dragDetails.height = Math.min(a2._windowParent.element.clientHeight + a2._windowParent.scrollElement.scrollTop - a2._dragDetails.top - a2._windowParent.borderWidth, Math.max(0, a2._dragDetails.height + i)), "object" != typeof t && (a2._dragDetails.snapWindowHeight = a2._dragDetails.height = Math.max(a2._dragDetails.height, a2._dragDetails.minHeight)), a2._dragDetails.newHeight = Math.max(a2._dragDetails.minHeight, a2._dragDetails.height), a2._dragDetails.newWidth = Math.max(a2._dragDetails[n], a2._dragDetails.newWidth);
                  break;
                case "bottomLeftCorner":
                  a2._resize("bottom", t), a2._resize("left", t);
                  break;
                case "bottomRightCorner":
                  a2._resize("bottom", t), a2._resize("right", t);
                  break;
                case "topLeftCorner":
                  a2._resize("top", t), a2._resize("left", t);
                  break;
                case "topRightCorner":
                  a2._resize("top", t), a2._resize("right", t);
              }
              const o = a2.liveResize ? a2 : a2._resizeDummy;
              a2._dragDetails.newHeight = Math.max(a2._dragDetails.snapWindowHeight, a2._dragDetails.newHeight), o.style.top = a2._dragDetails.top + "px", o.style.left = a2._dragDetails.left + "px", o.style.width = a2._dragDetails.newWidth + "px", o.style.height = a2._dragDetails.newHeight + "px";
            }
            _restoreFromMinimization() {
              const e2 = this;
              e2.minimized = false, e2.style.width = e2.style.height = e2.style.top = e2.style.left = "", e2._refreshMinimizedWindowsPosition();
            }
            _refreshMinimizedWindowsPosition() {
              const e2 = this, t = e2._getAllMinimizedWindows();
              if (0 === t.length) return;
              let a2;
              t[0].style.left = "5px";
              for (let i = 1; i < t.length; i++) parseFloat(t[i - 1].style.left) + t[i - 1].offsetWidth + t[i].offsetWidth + 10 < e2._windowParent.element.clientWidth ? (t[i].style.left = parseFloat(t[i - 1].style.left) + t[i - 1].offsetWidth + 5 + "px", t[i].style.top = t[i - 1].offsetTop + "px", a2 = t[i]) : (t[i].style.left = parseFloat(a2.style.left) + "px", t[i].style.top = a2.offsetTop + "px");
            }
            _setHeaderButtons() {
              const e2 = this, t = e2.headerButtons, a2 = e2.$.buttonsContainer.children, i = function(t2) {
                const a3 = e2.$.buttonsContainer.getElementsByClassName("smart-" + (t2 + "").split(/(?=[A-Z])/).join("-").toLowerCase() + "-button")[0];
                return a3 && a3.classList.remove("smart-hidden"), a3;
              };
              for (let e3 = 0; e3 < a2.length; e3++) a2[e3].classList.add("smart-hidden");
              if (t.length > 0) for (let a3 = 0; a3 < t.length; a3++) {
                let n = i(t[a3]);
                if (!n) {
                  const e3 = (t[a3] + "").split(/(?=[A-Z])/);
                  n = document.createElement("button"), n.setAttribute("aria-label", e3.map((e4) => e4.slice(0, 1).toUpperCase() + e4.slice(1)).join(" ")), n.classList.add("smart-" + e3.join("-").toLowerCase() + "-button", "smart-button", "smart-element");
                }
                e2.$.buttonsContainer.insertBefore(n, e2.$.buttonsContainer.firstElementChild);
              }
            }
            _setDragDetails(e2, t) {
              const a2 = this;
              if (a2._dragDetails || (a2._dragDetails = {}), void 0 === a2._dragDetails.minWidth || void 0 === a2._dragDetails.minHeight || void 0 === a2._dragDetails.maxWidth || void 0 === a2._dragDetails.maxHeight) {
                const e3 = getComputedStyle(a2);
                a2._dragDetails.minWidth = parseFloat(e3.getPropertyValue("min-width")) || 0, a2._dragDetails.minHeight = parseFloat(e3.getPropertyValue("min-height")) || 0, a2._dragDetails.maxWidth = parseFloat(e3.getPropertyValue("max-width")) || 0, a2._dragDetails.maxHeight = parseFloat(e3.getPropertyValue("max-height")) || 0;
              }
              a2._dragDetails.windowX = a2.offsetLeft, a2._dragDetails.windowY = a2.offsetTop;
              const i = a2.getBoundingClientRect();
              if (a2._snapDummy && a2.$.hasClass("smart-window-snapped-" + a2._snapDummy._position)) "right" === a2.headerPosition && a2.collapsed && (a2._dragDetails.offsetX = i.left + a2.offsetWidth - t.clientX);
              else {
                const n = a2.parentElement === document.body ? document.documentElement.getBoundingClientRect() : a2.parentElement ? a2.parentElement.getBoundingClientRect() : document.documentElement.getBoundingClientRect(), o = window.scrollX || window.pageXOffset, s = window.scrollY || window.pageYOffset;
                a2._windowParent.offsetLeft = n.left + o, a2._windowParent.offsetTop = n.top + s, t && "object" == typeof t && (a2._dragDetails.offsetX = t.clientX - i.left, a2._dragDetails.offsetY = t.clientY - i.top), a2.collapsed || (a2.hasAnimation && "minimize" === e2 ? (a2._dragDetails.width = a2._dragDetails.width ? a2._dragDetails.width : a2.offsetWidth, a2._dragDetails.height = a2._dragDetails.height ? a2._dragDetails.height : a2.offsetHeight) : (a2._dragDetails.width = a2.offsetWidth, a2._dragDetails.height = a2.offsetHeight), (a2.style.width || a2.style.height) && (a2._dragDetails.resized = true));
              }
              if ("minimize" !== e2 && e2 && (a2._dragDetails.type = e2, a2._dragDetails.started = true, a2._dragDetails.snapWindowWidth = a2.offsetWidth, a2._dragDetails.snapWindowHeight = a2.offsetHeight, t && "object" == typeof t ? (a2._dragDetails.x = t.pageX, a2._dragDetails.y = t.pageY) : (a2._dragDetails.x = a2.offsetLeft, a2._dragDetails.y = a2.offsetTop), "resize" === e2)) {
                if ("none" === a2.resizeMode) return void delete a2._dragDetails;
                a2._dragDetails.top = a2.offsetTop, a2._dragDetails.left = a2.offsetLeft, a2._dragDetails.newWidth = a2._dragDetails.width, a2._dragDetails.newHeight = a2._dragDetails.height, a2.$container.hasClass("smart-window-resizing-right") ? a2._dragDetails.side = "right" : a2.$container.hasClass("smart-window-resizing-left") ? a2._dragDetails.side = "left" : a2.$container.hasClass("smart-window-resizing-top") ? a2._dragDetails.side = "top" : a2.$container.hasClass("smart-window-resizing-bottom") ? a2._dragDetails.side = "bottom" : a2.$container.hasClass("smart-window-resizing-top-left") ? a2._dragDetails.side = "topLeftCorner" : a2.$container.hasClass("smart-window-resizing-bottom-left") ? a2._dragDetails.side = "bottomLeftCorner" : a2.$container.hasClass("smart-window-resizing-top-right") ? a2._dragDetails.side = "topRightCorner" : a2.$container.hasClass("smart-window-resizing-bottom-right") && (a2._dragDetails.side = "bottomRightCorner");
              }
            }
            _setElementParent(e2) {
              const t = this;
              if (t._windowParent.element = void 0, t._windowParent.parent && !t._windowParent.parent.querySelectorAll("smart-window, smart-dialog-window, smart-progress-window, smart-wait-window, smart-alert-window, smart-prompt-window, smart-multiline-prompt-window") && (t._windowParent.parent.style.position = ""), e2 instanceof HTMLElement) t._windowParent.element = e2;
              else if ("string" == typeof e2) if ("body" === e2) {
                const e3 = t.getRootNode();
                t._windowParent.element = e3 && e3.host ? t.getShadowRootOrBody() : document.body;
              } else t._windowParent.element = document.getElementById(e2);
              if (t._windowParent.element || (t._windowParent.initialParent ? t._windowParent.element = t._windowParent.initialParent.parentElement ? t._windowParent.initialParent : t.getShadowRootOrBody() : t._windowParent.element = t.getShadowRootOrBody()), t.parentElement !== t._windowParent.element && t._windowParent.element.appendChild(t), t._windowParent.element === document.body) t._windowParent.element = document.documentElement, t._windowParent.scrollElement = document.scrollingElement, t._windowParent.parent = document.body, t._windowParent.borderWidth = 0;
              else {
                if (t.parentElement instanceof Smart.Window && !t.parentElement.isCompleted) return void t.parentElement.whenRendered(function() {
                  t.parentElement.appendChild(t), t._setElementParent(t.windowParent);
                });
                t._windowParent.element instanceof Smart.Window && (t._windowParent.element = t._windowParent.element.$.content);
                const e3 = getComputedStyle(t.parentElement), a2 = e3.getPropertyValue("position");
                t._windowParent.borderWidth = 2 * parseInt(e3.getPropertyValue("border-width") || 0), t._windowParent.parent = t.parentElement, t._windowParent.scrollElement = t._windowParent.element, "static" === a2 && (t.parentElement.style.position = "relative");
              }
              t._setModal(), t.style.left && t.offsetLeft > t._windowParent.scrollElement.scrollWidth && (t.style.left = t._windowParent.scrollElement.scrollWidth - t.offsetWidth + "px"), t.style.top && t.offsetTop > t._windowParent.scrollElement.scrollHeight && (t.style.top = t._windowParent.scrollElement.scrollHeight - t.offsetHeight + "px");
            }
            _setModal() {
              const e2 = this;
              if (delete e2._changingFocus, e2._windowParent.element) if (e2.modal) if (e2._modal || (e2._modal = document.createElement("div"), e2._modal.classList.add("smart-modal")), e2._windowParent.parent !== document.body ? e2._modal.setAttribute("nested-modal", "") : e2._modal.removeAttribute("nested-modal"), e2._modal._window = e2, e2.opened && !e2._modal.parentElement) {
                const t = parseInt(getComputedStyle(e2).getPropertyValue("z-index"));
                isNaN(t) || (e2._modal.style.zIndex = t - 1), e2.parentElement.insertBefore(e2._modal, e2);
              } else e2._modal.parentElement && e2._modal.parentElement.removeChild(e2._modal);
              else e2._modal && e2._modal.parentElement && (e2._modal.parentElement.removeChild(e2._modal), delete e2._modal);
            }
          }), Smart("smart-dialog-window", class extends Smart.Window {
            static get properties() {
              return { cancelLabel: { value: "Cancel", type: "string" }, confirmLabel: { value: "Ok", type: "string" }, disableSnap: { value: true, readOnly: true, type: "boolean" }, headerButtons: { value: ["close"], type: "array" }, modal: { value: true, readOnly: true, type: "boolean", defaultReflectToAttribute: true } };
            }
            static get listeners() {
              return { "footer.click": "_footerClickHandler" };
            }
            template() {
              return '<div role="presentation">\n                    <div class="smart-content-container" id="container">\n                        <div id="headerSection" class="smart-header-section" role="heading" aria-level="1">\n                            <div id="header" class="smart-header">[[label]]</div>\n                            <div id="buttonsContainer" class="smart-buttons-container">\n                                <button id="pinButton" class="smart-pin-button" aria-label="Pin"></button>\n                                <button id="collapseButton" class="smart-button smart-element smart-collapse-button" aria-label="Collapse"></button>\n                                <button id="minimizeButton" class="smart-button smart-element smart-minimize-button" aria-label="Minimize"></button>\n                                <button id="maximizeButton" class="smart-button smart-element smart-maximize-button" aria-label="Maximize"></button>\n                                <button id="closeButton" class="smart-button smart-element smart-close-button" aria-label="Close"></button>\n                            </div>\n                        </div>\n                        <div class="smart-content">\n                            <content></content>\n                        </div>\n                        <div id="footer" class="smart-footer">\n                            <button id="confirmButton" class="smart-button smart-element smart-confirm-button">[[confirmLabel]]</button>\n                            <button id="cancelButton" class="smart-button smart-element smart-cancel-button">[[cancelLabel]]</button>\n                        </div>\n                    </div>\n                </div>';
            }
            _createElement() {
              const e2 = this;
              e2.setAttribute("role", "alertdialog"), e2.setAttribute("aria-describedby", e2.$.content.id);
            }
            _footerClickHandler(e2) {
              const t = this, a2 = e2.target;
              a2.closest(".smart-confirm-button") ? t.$.fireEvent("confirm") : a2.closest(".smart-cancel-button") && t.$.fireEvent("cancel");
            }
            _keyDownHandler(e2) {
              const t = this;
              if (delete t._changingFocus, t.disabled || (t.hasAttribute("dragged") || t.hasAttribute("resized")) && t._mouseManipulation) return;
              e2.stopPropagation();
              const a2 = "ArrowDown" === e2.key || "ArrowRight" === e2.key ? 10 : -10, i = t.enableShadowDOM && t._windowParent.element.getRootNode() ? t._windowParent.element.getRootNode().activeElement : document.activeElement;
              switch (e2.key) {
                case "ArrowUp":
                case "ArrowDown":
                case "ArrowLeft":
                case "ArrowRight": {
                  if (t.minimized || i !== t) return;
                  const n = e2.key.indexOf("Right") > -1 || e2.key.indexOf("Left") > -1;
                  if (e2.preventDefault(), !n && e2.altKey) return void ("ArrowUp" === e2.key ? t.maximize() : t.restore());
                  if (t.$.addClass("no-transition"), t.maximized) return;
                  if (e2.ctrlKey && "none" !== t.resizeMode) return t.hasAttribute("dragged") && t._cancelDragging(e2), t.hasAttribute("resized") || t.$.fireEvent("resizeStart", { position: { x: e2.pageX, y: e2.pageY } }), void t._resize(n ? "right" : "bottom", a2);
                  t.pinned || (t.hasAttribute("dragged") || (t.setAttribute("dragged", ""), t.$.fireEvent("dragStart", { left: e2.pageX, top: e2.pageY })), t._drag(a2, n ? "horizontal" : "vertical")), t.$.removeClass("no-transition");
                  break;
                }
                case "Escape":
                  t.headerButtons.indexOf("close") > -1 && t.close();
                  break;
                case "Tab":
                  t.opened && t.modal && (t._changingFocus = true);
                  break;
                case "Enter":
                case " ": {
                  let a3;
                  if (t.shadowRoot || t.isInShadowDOM ? (a3 = e2.composedPath()[0], t._buttonPressed = a3.getRootNode().host) : (a3 = e2.target.closest && e2.target.closest(".smart-button"), t._buttonPressed = a3), !a3) return;
                  t._isWindowButton(a3), delete t._buttonPressed;
                  break;
                }
              }
            }
          }), Smart("smart-alert-window", class extends Smart.DialogWindow {
            static get properties() {
              return { headerButtons: { value: [], type: "array" } };
            }
            _createElement() {
              const e2 = this;
              e2.setAttribute("role", "alertdialog"), e2.setAttribute("aria-describedby", e2.$.content.id);
            }
          }), Smart("smart-prompt-window", class extends Smart.DialogWindow {
            static get properties() {
              return { autoComplete: { allowedValues: ["none", "manual", "auto", "inline"], type: "string", value: "manual" }, confirmLabel: { value: "Ok", type: "string" }, cancelLabel: { value: "Cancel", type: "string" }, disableSnap: { value: true, readOnly: true, type: "boolean" }, displayMode: { value: "default", allowedValues: ["default", "escaped"], type: "string" }, headerButtons: { value: ["close"], type: "array" }, form: { value: "", type: "string" }, hint: { value: null, type: "any?" }, maxLength: { value: null, type: "number?" }, minLength: { value: 2, type: "number" }, messages: { extend: true, value: { en: { missingReference: "{{elementType}}: Missing reference to {{files}}." } }, type: "object" }, modal: { value: true, readOnly: true, type: "boolean", defaultReflectToAttribute: true }, name: { value: "", type: "string" }, placeholder: { value: "", type: "string" }, promptLabel: { value: "", type: "string?" }, required: { value: false, type: "boolean" }, requiredMessage: { value: "", type: "string" }, selectAllOnFocus: { value: false, type: "boolean" }, value: { value: "", type: "string" } };
            }
            template() {
              return '<div role="presentation">\n                    <div class="smart-content-container" id="container">\n                        <div id="headerSection" class="smart-header-section" role="heading" aria-level="1">\n                            <div id="header" class="smart-header">[[label]]</div>\n                            <div id="buttonsContainer" class="smart-buttons-container">\n                                <button id="closeButton" class="smart-button smart-element smart-close-button" aria-label="Close"></button>\n                            </div>\n                        </div>\n                        <div class="smart-content">\n                            <content></content>\n                            <smart-text-box id="textBox"\n                                animation="[[animation]]"\n                                auto-complete="[[autoComplete]]"\n                                max-length="[[maxLength]]"\n                                value="{{value}}"\n                                form="[[form]]"\n                                label="[[promptLabel]]"\n                                hint="[[hint]]"\n                                display-mode="[[displayMode]]"\n                                max-length="[[maxLength]]"\n                                placeholder="[[placeholder]]"\n                                required="[[required]]"\n                                required-message="[[requiredMessage]]"\n                                select-all-on-focus="[[selectAllOnFocus]]"\n                                theme="[[theme]]"\n                                right-to-left="[[rightToLeft]]">\n                            </smart-text-box>\n                        </div>\n                        <div id="footer" class="smart-footer">\n                            <button id="confirmButton" class="smart-button smart-element smart-confirm-button flat">[[confirmLabel]]</button>\n                            <button id="cancelButton" class="smart-button smart-element smart-cancel-button flat">[[cancelLabel]]</button>\n                        </div>\n                    </div>\n                </div>';
            }
            static get listeners() {
              return { "footer.click": "_footerClickHandler" };
            }
            static get requires() {
              return { "Smart.TextBox": "smart.textbox.js" };
            }
            _footerClickHandler(e2) {
              const t = this, a2 = e2.target;
              a2.closest(".smart-confirm-button") ? t.$.fireEvent("confirm", { value: t.$.textBox.value }) : a2.closest(".smart-cancel-button") && t.$.fireEvent("cancel", { value: t.$.textBox.value });
            }
            _keyDownHandler(e2) {
              const t = this;
              function a2() {
                t._dragDetails && (t._dragDetails.started = false), t.$.removeClass("no-transition");
              }
              if (delete t._changingFocus, t.disabled || t._dragDetails && t._dragDetails.started) return;
              e2.stopPropagation();
              const i = "ArrowDown" === e2.key || "ArrowRight" === e2.key ? 10 : -10, n = t.enableShadowDOM && t._windowParent.element.getRootNode() ? t._windowParent.element.getRootNode().activeElement : document.activeElement;
              switch (t.$.removeClass("no-transition"), e2.key) {
                case "ArrowUp":
                case "ArrowDown":
                  if (n !== t) return;
                  if (e2.preventDefault(), e2.altKey) return "ArrowUp" === e2.key ? t.maximize() : t.restore(), void a2();
                  if (t.$.addClass("no-transition"), e2.ctrlKey) return t._resize("bottom", i), void a2();
                  t._drag(i, "vertical");
                  break;
                case "ArrowLeft":
                case "ArrowRight":
                  if (n !== t) return;
                  if (e2.preventDefault(), t.$.addClass("no-transition"), e2.ctrlKey) return t._resize("right", i), void a2();
                  t._drag(i, "horizontal"), t.$.removeClass("no-transition");
                  break;
                case "Escape":
                  t.headerButtons.indexOf("close") > -1 && t.close();
                  break;
                case "Tab":
                  t.opened && t.modal && (t._changingFocus = true);
                  break;
                case "Enter":
                case " ": {
                  let a3;
                  if (t.shadowRoot || t.isInShadowDOM ? (a3 = e2.composedPath()[0], t._buttonPressed = a3.getRootNode().host) : (a3 = e2.target.closest && e2.target.closest(".smart-button"), t._buttonPressed = a3), !a3) return;
                  t._isWindowButton(a3), delete t._buttonPressed;
                  break;
                }
              }
              a2();
            }
          }), Smart("smart-multiline-prompt-window", class extends Smart.PromptWindow {
            static get properties() {
              return { autoCapitalize: { value: "none", allowedValues: ["none", "words", "characters"], type: "string" }, autoExpand: { value: false, type: "boolean" }, headerButtons: { value: ["close"], type: "array" }, horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, modal: { value: true, readOnly: true, type: "boolean", defaultReflectToAttribute: true }, selectionDirection: { value: "none", allowedValues: ["forward", "backward", "none"], type: "string" }, selectionEnd: { value: 0, reflectToAttribute: false, type: "number" }, selectionStart: { value: 0, reflectToAttribute: false, type: "number" }, spellCheck: { value: false, type: "boolean" }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, wrap: { value: "soft", allowedValues: ["hard", "soft", "off"], type: "string" } };
            }
            template() {
              return '<div role="presentation">\n                    <div class="smart-content-container" id="container">\n                        <div id="headerSection" class="smart-header-section" role="heading" aria-level="1">\n                            <div id="header" class="smart-header">[[label]]</div>\n                            <div id="buttonsContainer" class="smart-buttons-container">\n                                <button id="closeButton" class="smart-button smart-element smart-close-button" aria-label="Close"></button>\n                            </div>\n                        </div>\n                        <div class="smart-content">\n                            <content></content>\n                           <smart-multiline-text-box id="textBox"\n                                animation="[[animation]]"\n                                horizontal-scroll-bar-visibility= "[[horizontalScrollBarVisibility]]"\n                                vertical-scroll-bar-visibility= "[[verticalScrollBarVisibility]]"\n                                auto-capitalize="[[autoCapitalize]]"\n                                auto-expand = "[[autoExpand]]"\n                                selection-direction= "[[selectionDirection]]"\n                                selection-end= "[[selectionEnd]]"\n                                selection-start="[[selectionStart]]"\n                                spell-check= "[[spellCheck]]"\n                                wrap="[[wrap]]"\n                                max-length="[[maxLength]]"\n                                value="{{value}}"\n                                form="[[form]]"\n                                label="[[promptLabel]]"\n                                hint="[[hint]]"\n                                display-mode="[[displayMode]]"\n                                max-length="[[maxLength]]"\n                                placeholder="[[placeholder]]"\n                                required="[[required]]"\n                                required-message="[[requiredMessage]]"\n                                select-all-on-focus="[[selectAllOnFocus]]"\n                                theme="[[theme]]"\n                                right-to-left="[[rightToLeft]]">\n                           </smart-multiline-text-box>\n                        </div>\n                        <div id="footer" class="smart-footer">\n                            <button id="confirmButton" class="smart-button smart-element smart-confirm-button flat">[[confirmLabel]]</button>\n                            <button id="cancelButton" class="smart-button smart-element smart-cancel-button flat">[[cancelLabel]]</button>\n                        </div>\n                    </div>\n                </div>';
            }
            static get listeners() {
              return { "footer.click": "_footerClickHandler" };
            }
            static get requires() {
              return { "Smart.MultilineTextBox": "smart.multilinetextbox.js" };
            }
            _footerClickHandler(e2) {
              const t = this, a2 = e2.target;
              a2.closest(".smart-confirm-button") ? t.$.fireEvent("confirm", { value: t.$.textBox.value }) : a2.closest(".smart-cancel-button") && t.$.fireEvent("cancel", { value: t.$.textBox.value });
            }
          }), Smart("smart-progress-window", class extends Smart.Window {
            static get properties() {
              return { completeLabel: { value: "Continue", type: "string" }, disableSnap: { value: true, readOnly: true, type: "boolean" }, headerButtons: { value: ["close"], type: "array" }, indeterminate: { value: false, type: "boolean" }, inverted: { value: false, type: "boolean" }, formatFunction: { value: null, type: "function" }, max: { value: 100, type: "number" }, modal: { value: true, readOnly: true, type: "boolean", defaultReflectToAttribute: true }, min: { value: 0, type: "number" }, showProgressValue: { value: false, type: "boolean" }, value: { value: 0, type: "number?" } };
            }
            template() {
              return '<div role="presentation">\n                    <div class="smart-content-container" id="container">\n                        <div id="headerSection" class="smart-header-section" role="heading" aria-level="1">\n                            <div id="header" class="smart-header">[[label]]</div>\n                            <div id="buttonsContainer" class="smart-buttons-container">\n                                <button id="closeButton" class="smart-button smart-element smart-close-button" aria-label="Close"></button>\n                            </div>\n                        </div>\n                        <div class="smart-content" inner-h-t-m-l="[[innerHTML]]">\n                            <content></content>\n                        </div>\n                        <div id="footer" class="smart-footer">\n                            <smart-progress-bar id="progressBar"\n                                animation="[[animation]]"\n                                min="[[min]]"\n                                max="[[max]]"\n                                indeterminate="[[inditerminate]]"\n                                inverted="[[inverted]]"\n                                format-function="[[formatFunction]]"\n                                show-progress-value="[[showProgressValue]]"\n                                theme="[[theme]]"\n                                right-to-left="[[rightToLeft]]"\n                                value="{{value}}">\n                            </smart-progress-bar>\n                            <button id="completeButton" class="smart-button smart-element smart-complete-button smart-visibility-hidden">[[completeLabel]]</button>\n                        </div>\n                    </div>\n                </div>';
            }
            static get requires() {
              return { "Smart.ProgressBar": "smart.progressbar.js" };
            }
            propertyChangedHandler(e2, t, a2) {
              const i = this;
              switch (e2) {
                case "value":
                  i._handleCompletion();
                  break;
                default:
                  super.propertyChangedHandler(e2, t, a2);
              }
            }
            _createElement() {
              this.setAttribute("role", "dialog"), this._handleCompletion();
            }
            _handleCompletion() {
              const e2 = this;
              e2.$.completeButton && (e2.value >= e2.max ? (e2.$completeButton.removeClass("smart-visibility-hidden"), e2.$progressBar.addClass("smart-visibility-hidden")) : (e2.$completeButton.addClass("smart-visibility-hidden"), e2.$progressBar.removeClass("smart-visibility-hidden")));
            }
            _keyDownHandler(e2) {
              const t = this;
              function a2() {
                t._dragDetails && (t._dragDetails.started = false), t.$.removeClass("no-transition");
              }
              if (delete t._changingFocus, t.disabled || t._dragDetails && t._dragDetails.started) return;
              e2.stopPropagation();
              const i = "ArrowDown" === e2.key || "ArrowRight" === e2.key ? 10 : -10, n = t.enableShadowDOM && t._windowParent.element.getRootNode() ? t._windowParent.element.getRootNode().activeElement : document.activeElement;
              switch (t.$.removeClass("no-transition"), e2.key) {
                case "ArrowUp":
                case "ArrowDown":
                  if (n !== t) return;
                  if (e2.preventDefault(), e2.altKey) return "ArrowUp" === e2.key ? t.maximize() : t.restore(), void a2();
                  if (t.$.addClass("no-transition"), e2.ctrlKey) return t._resize("bottom", i), void a2();
                  t._drag(i, "vertical"), t.$.removeClass("no-transition");
                  break;
                case "ArrowLeft":
                case "ArrowRight":
                  if (n !== t) return;
                  if (e2.preventDefault(), t.$.addClass("no-transition"), e2.ctrlKey) return t._resize("right", i), void a2();
                  t._drag(i, "horizontal"), t.$.removeClass("no-transition");
                  break;
                case "Escape":
                  t.headerButtons.indexOf("close") > -1 && t.close();
                  break;
                case "Tab":
                  t.opened && t.modal && (t._changingFocus = true);
                  break;
                case "Enter":
                case " ": {
                  let a3;
                  if (t.shadowRoot || t.isInShadowDOM ? (a3 = e2.composedPath()[0], t._buttonPressed = a3.getRootNode().host) : (a3 = e2.target.closest && e2.target.closest(".smart-button"), t._buttonPressed = a3), !a3) return;
                  t._isWindowButton(a3), delete t._buttonPressed;
                  break;
                }
              }
              a2();
            }
          }), Smart("smart-tabs-window", class extends Smart.Window {
            static get properties() {
              return { disableSnap: { value: true, readOnly: true, type: "boolean" }, dropPosition: { value: ["all"], type: "array" }, addNewTab: { value: false, type: "boolean" }, allowToggle: { value: false, type: "boolean" }, autoHide: { value: false, type: "boolean" }, autoHideWindow: { value: null, type: "any" }, dataSource: { value: null, type: "array?", reflectToAttribute: false }, tabCloseButtonMode: { value: "default", allowedValues: ["default", "selected"], type: "string" }, tabCloseButtons: { value: false, type: "boolean" }, messages: { value: { en: { ambiguousIndexes: "smart-tabs: Initially set smart-tab-item indexes are ambiguous and are ignored in favour of the HTML structure.", detailsObjectRequired: 'smart-tabs: The method "insert" requires a details Object to be passed as a second argument.', invalidIndex: 'smart-tabs: "{{method}}" method accepts an index of type number.', referenceNodeNotChild: "smart-tabs: Passed {{argument}} is not part of this smart-tabs element.", tabItemRequired: 'smart-tabs: The method "{{method}}" requires a "smart-tab-item" element to be passed as an argument.' } }, type: "object", extend: true }, tabOverflow: { value: "auto", allowedValues: ["auto", "hidden", "scroll"], type: "string" }, tabReorder: { value: false, type: "boolean" }, tabResize: { value: false, type: "boolean" }, tabScrollButtonsPosition: { value: "both", allowedValues: ["near", "far", "both"], type: "string" }, selectedIndex: { value: null, type: "number?" }, selectionMode: { value: "click", allowedValues: ["click", "dblclick", "mouseenter", "none"], type: "string" }, collapsed: { value: false, type: "boolean" }, collapsible: { value: false, type: "boolean" }, locked: { value: false, type: "boolean" }, max: { value: "", type: "any" }, min: { value: "", type: "any" }, size: { value: "", type: "any" }, tabLayout: { value: "scroll", allowedValues: ["scroll", "dropdown", "wrap", "shrink"], type: "string", defaultReflectToAttribute: true }, tabPosition: { value: "top", allowedValues: ["top", "bottom", "left", "right", "hidden"], type: "string" }, tabTextOrientation: { value: "horizontal", allowedValues: ["horizontal", "vertical"], type: "string" }, layout: { value: null, type: "any" } };
            }
            static get listeners() {
              return { "tabsElement.blur": "_tabsFocusHandler", "tabsElement.change": "_tabsChangeHandler", "tabsElement.focus": "_tabsFocusHandler", "autoHideWindow.close": "_autoHideWindowCloseHandler", "autoHideWindow.open": "_autoHideWindowOpenHandler" };
            }
            template() {
              return '<div role="presentation">\n                    <div class="smart-content-container" id="container">\n                        <div id="headerSection" class="smart-header-section" role="heading" aria-level="1">\n                            <div id="header" class="smart-header">[[label]]</div>\n                            <div id="buttonsContainer" class="smart-buttons-container">\n                                <button id="minimizeButton" class="smart-button smart-element smart-minimize-button" aria-label="Minimize"></button>\n                                <button id="maximizeButton" class="smart-button smart-element smart-maximize-button" aria-label="Maximize"></button>\n                                <button id="closeButton" class="smart-button smart-element smart-close-button" aria-label="Close"></button>\n                            </div>\n                        </div>\n                        <div id="contentSection" class="smart-content">\n                           <smart-tabs id="tabsElement"\n                                animation="[[animation]]"\n                                add-new-tab="[[addNewTab]]"\n                                allow-toggle="[[allowToggle]]"\n                                close-button-mode="[[tabCloseButtonMode]]"\n                                close-buttons="[[tabCloseButtons]]"\n                                disabled="[[disabled]]"\n                                overflow="[[tabOverflow]]"\n                                reorder="[[tabReorder]]"\n                                resize="[[tabResize]]"\n                                scroll-buttons-position="[[tabScrollButtonsPosition]]"\n                                selected-index="{{selectedIndex}}"\n                                selection-mode="[[selectionMode]]"\n                                tab-layout="[[tabLayout]]"\n                                tab-position="[[tabPosition]]"\n                                tab-text-orientation="[[tabTextOrientation]]"\n                                theme="[[theme]]"\n                                right-to-left="[[rightToLeft]]">\n                                <content></content>\n                            </smart-tabs>\n                        </div>\n                        <div id="footer" class="smart-footer smart-hidden"></div>\n                    </div>\n                </div>';
            }
            static get requires() {
              return { "Smart.Tabs": "smart.tabs.js" };
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? (e2 instanceof Smart.TabItem || t.error(t.localize("tabItemRequired", { method: "removeChild" })), t.$.tabsElement.appendChild(e2)) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "appendChild", node: "node" }));
            }
            insert(e2, t) {
              this.$.tabsElement.insert(e2, t);
              const a2 = this.$.tabsElement._tabs[e2];
              a2 && (a2.draggable = void 0 === t.draggable || t.draggable, a2.floatable = void 0 === t.floatable || t.floatable);
            }
            insertBefore(e2, t) {
              this.$.tabsElement.insertBefore(e2, t);
            }
            removeAt(e2) {
              this.$.tabsElement.removeAt(e2);
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? (e2 instanceof Smart.TabItem || t.error(t.localize("tabItemRequired", { method: "removeChild" })), (t.shadowRoot || t).contains(e2) || t.error(t.localize("referenceNodeNotChild", { argument: "node" })), t.$.tabsElement.removeChild(e2)) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "removeChild", node: "node" }));
            }
            refreshTabHeader() {
              const e2 = this;
              e2.$.tabsElement && e2.$.tabsElement.isCompleted && e2.$.tabsElement.refreshTabHeader();
            }
            refreshTabs() {
              const e2 = this;
              e2.$.tabsElement && e2.$.tabsElement.isCompleted && e2.$.tabsElement._applyTabOverflow();
            }
            select(e2) {
              this.$.tabsElement.select(e2);
            }
            update(e2, t, a2) {
              this.$.tabsElement.update(e2, t, a2);
            }
            get items() {
              return this.isCompleted && this.$.tabsElement ? this.$.tabsElement._tabs : null;
            }
            get itemLabels() {
              return this.$ ? this.$.tabsElement._tabLabelContainers : null;
            }
            get siblings() {
              const e2 = this;
              let t = [];
              if (!e2.isCompleted) return t;
              const a2 = e2.closest("smart-splitter");
              if (!a2 || !a2.closest("smart-docking-layout")) return t;
              const i = a2._items;
              if (!i || !i.length) return t;
              for (let n = 0; n < i.length; n++) {
                const o = i[n];
                o !== e2.closest("smart-splitter-item") && o.querySelector("smart-tabs-window").closest("smart-splitter") === a2 && t.push(o.querySelector("smart-tabs-window"));
              }
              return t;
            }
            propertyChangedHandler(e2, t, a2) {
              const i = this;
              switch ("collapsed" !== e2 && super.propertyChangedHandler(e2, t, a2), e2) {
                case "theme":
                  "" !== t && (i.$.closeButton.classList.remove(t), i.$.collapseButton.classList.remove(t), i.$.maximizeButton.classList.remove(t), i.$.pinButton.classList.remove(t)), i._applyTheme(a2);
                  break;
                case "autoHideWindow":
                  i._handleAutoHideWindow();
                  break;
                case "autoHide":
                  a2 || (null !== i.$.tabsElement.selectedIndex && (i.$.tabsElement._tabs[i.$.tabsElement.selectedIndex]._autoHideWindowSize = void 0), i._autoHideWindow && i._autoHideWindow.close());
                  break;
                case "dataSource":
                  i.$.tabsElement.dataSource = a2;
                  break;
                case "layout":
                  i._handleLayoutProperty();
                  break;
                case "collapsible":
                case "collapsed":
                case "locked":
                case "max":
                case "min":
                case "size": {
                  const n = i.getRootNode(), o = (n && n.host ? n.host : i).closest("smart-docking-layout"), s = i.closest("smart-splitter-item");
                  if (!o) return void ("collapsed" === e2 && super.propertyChangedHandler(e2, t, a2));
                  s && (s[e2] = a2);
                  break;
                }
              }
            }
            _applyTheme(e2) {
              if ("" !== e2) {
                const t = this.$.buttonsContainer.children;
                for (let a2 = 0; a2 < t.length; a2++) t[a2].classList.add(e2);
              }
            }
            _autoHideWindowCloseHandler() {
              const e2 = this;
              e2.allowToggle && null !== e2.$.tabsElement.selectedIndex && e2.$.tabsElement.select(e2.$.tabsElement.selectedIndex), e2._autoHideWindow && e2._moveContent(e2._autoHideWindow.items[0], e2._autoHideWindow._tab);
            }
            _autoHideWindowOpenHandler() {
              const e2 = this;
              e2.$.tabsElement.selectedIndex && e2._handleAutoHide(e2.$.tabsElement.selectedIndex);
            }
            _createElement() {
              const e2 = this;
              e2.setAttribute("role", "dialog"), e2.$.tabsElement.$.tabHeaderControls && !e2.$.tabsElement.$.tabHeaderControls.innerHTML && e2.$.tabsElement.$tabHeaderControls.addClass("smart-hidden"), e2.$.tabsElement.dataSource = e2.dataSource, e2._applyTheme(e2.theme), e2._handleAutoHideWindow(), e2.autoHide && e2._handleAutoHide(e2.$.tabsElement.selectedIndex), e2.allowToggle || e2.selectedIndex || null === e2.$.tabsElement.selectedIndex || (e2.selectedIndex = e2.$.tabsElement.selectedIndex, e2.$.tabsElement.setAttribute("selected-index", e2.selectedIndex)), e2._handleLayoutProperty();
              const t = (e2.isInShadowDOM ? e2.getRootNode().host : e2 || e2).closest("smart-docking-layout"), a2 = e2.closest("smart-splitter-item");
              t && a2 && (a2.collapsible = e2.collapsible, a2.collapsed = e2.collapsed, a2.min = e2.min, a2.max = e2.max, a2.size = e2.size, a2.locked = e2.locked);
            }
            attached() {
              super.attached();
              const e2 = this;
              e2.classList.add("smart-window"), e2.shadowRoot && e2.$.root.classList.add("smart-window");
            }
            _handleLayoutProperty() {
              const e2 = this;
              let t = e2.closest("smart-docking-layout");
              if (Smart.DockingLayout) {
                if (!e2.ownerLayout && e2.getRootNode()) {
                  let a2 = e2.getRootNode().host;
                  for (; a2; ) {
                    if (!a2.closest) return;
                    if (a2.closest("smart-docking-layout")) {
                      t = a2.closest("smart-docking-layout");
                      break;
                    }
                    a2 = a2.getRootNode() ? a2.getRootNode().host : void 0;
                  }
                }
                t ? e2.layout = t : e2.layout instanceof Smart.DockingLayout || "string" == typeof e2.layout && (e2.layout = document.getElementById(e2.layout));
              }
            }
            _headerDblCickHandler(e2) {
              const t = this, a2 = t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              e2.ctrlKey || a2 !== t.$.headerSection && a2 !== t.$.header || t.$.maximizeButton && 0 === t.$.maximizeButton.offsetHeight || (t.maximized ? t.restore() : t.maximize());
            }
            _documentUpHandler(e2) {
              const t = this;
              let a2 = e2.originalEvent.target.closest ? e2.originalEvent.target.closest(".smart-window") : e2.originalEvent.target, i = a2 === t || a2 === t._autoHideWindow || t._isAutoHideWindowClicked, n = t.closest("smart-docking-layout");
              (t.shadowRoot || t.isInShadowDOM) && (a2 = e2.originalEvent.composedPath()[0], i = a2.getRootNode() === t.shadowRoot || a2.closest(".smart-window") === t || a2.closest(".smart-window") === t._autoHideWindow || t._isAutoHideWindowClicked), n = ((t.isInShadowDOM ? t.getRootNode().host : t) || t).closest("smart-docking-layout"), n && n.disabled ? delete t._isWindowContentClicked : (super._documentUpHandler(e2), delete t._isAutoHideWindowClicked, t.autoHide && t._autoHideWindow && (i && t._autoHideWindow.opened || (t.selectedIndex = null, t._autoHideWindow.parentElement && t._autoHideWindow.parentElement.closest(".smart-window") === t && t._autoHideWindow.close())));
            }
            _handleAutoHide(e2) {
              const t = this;
              if (!t.autoHide || null === e2) return;
              if (t._autoHideWindow || t._handleAutoHideWindow(true), !t._autoHideWindow) return;
              t._autoHideWindow._tabsWindow && t._autoHideWindow._tabsWindow !== t && (t._autoHideWindow._tabsWindow.selectedIndex = null);
              const a2 = t.$.tabsElement._tabs[e2];
              t._autoHideWindow._tab !== a2 && t._moveContent(t._autoHideWindow.items[0], t._autoHideWindow._tab), t._autoHideWindow.label = a2.label, t._autoHideWindow.draggable = a2.draggable, t._autoHideWindow.floatable = a2.floatable, t._autoHideWindow._tab = a2, t._moveContent(t._autoHideWindow._tab, t._autoHideWindow.items[0]), t._autoHideWindow.bringToFront(), t._setAutoHideWindowSize(e2), t._autoHideWindow.open(), t._autoHideWindow._tabsWindow = t, t._autoHideWindow.controlledBy && t._autoHideWindow.controlledBy.removeAttribute("aria-controls"), t._autoHideWindow.controlledBy = t.$.tabsElement._tabLabelContainers[e2], t._autoHideWindow.controlledBy.setAttribute("aria-controls", t._autoHideWindow.id);
            }
            _moveHandler(e2) {
              const t = this, a2 = t.closest("smart-docking-layout");
              a2 && a2.items.indexOf(t) > -1 || (Smart.Utilities.Core.isMobile && navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform) && t.layout instanceof Smart.DockingLayout && t.layout.hasAttribute("dragged") && e2.originalEvent.preventDefault(), super._moveHandler(e2));
            }
            _setAutoHideWindowSize(e2) {
              const t = this;
              if (!t._autoHideWindow) return;
              t._autoHideWindow.$.addClass("no-transition"), t._autoHideWindow.style.maxWidth = t._autoHideWindow.style.maxHeight = "";
              const a2 = t.$.tabsElement._tabs[e2], i = (t._autoHideWindow.isInShadowDOM ? t._autoHideWindow.getRootNode().host : t._autoHideWindow).closest("smart-docking-layout") || t._autoHideWindow.parentElement;
              let n, o;
              if (a2) {
                if ("top" === t.tabPosition || "bottom" === t.tabPosition) {
                  t._autoHideWindow.resizeMode = "top" === t.tabPosition ? "bottom" : "top", t._autoHideWindow.style.width = t.$.tabsElement.offsetWidth + "px", n = i.getBoundingClientRect(), o = t.$.tabsElement.getBoundingClientRect();
                  let e3 = a2._autoHideWindowSize && parseFloat(a2._autoHideWindowSize) || "";
                  Smart.DockingLayout && i instanceof Smart.DockingLayout && (e3 && (e3 = Math.min(i.$.itemsContainer.offsetHeight, e3) + "px"), t._autoHideWindow.style.maxHeight = i.$.itemsContainer.offsetHeight + "px"), t._autoHideWindow.style.height = e3, t._autoHideWindow.style.left = o.left - n.left + "px", t._autoHideWindow && ("top" === t.tabPosition ? t._autoHideWindow.style.top = o.top + -n.top + o.height + "px" : t._autoHideWindow.style.top = o.top - n.top - t._autoHideWindow.offsetHeight + "px");
                } else {
                  t._autoHideWindow.resizeMode = "left" === t.tabPosition ? "right" : "left", t._autoHideWindow.style.height = t.$.tabsElement.offsetHeight + "px";
                  let e3 = a2._autoHideWindowSize && parseFloat(a2._autoHideWindowSize) || "";
                  i instanceof Smart.DockingLayout && (e3 && (e3 = Math.min(i.$.itemsContainer.offsetWidth, e3) + "px"), t._autoHideWindow.style.maxWidth = i.$.itemsContainer.offsetWidth + "px"), t._autoHideWindow.style.width = e3, n = i.getBoundingClientRect(), o = t.$.tabsElement.getBoundingClientRect(), t._autoHideWindow.style.top = o.top - n.top + "px", "left" === t.tabPosition ? t._autoHideWindow.style.left = o.left - n.left + t.$.tabsElement.offsetWidth + "px" : t._autoHideWindow.style.left = o.left - n.left - t._autoHideWindow.offsetWidth + "px";
                }
                t._autoHideWindow._dragDetails && (t._autoHideWindow._dragDetails.maxWidth = void 0), t._autoHideWindow._setDragDetails("resize"), t._autoHideWindow._dragDetails.started = false, t._autoHideWindow.$.removeClass("no-transition");
              }
            }
            _handleAutoHideWindow(e2) {
              const t = this;
              if (t.autoHideWindow) {
                if (t._autoHideWindow && t._autoHideWindow.parentElement.removeChild(t._autoHideWindow), "string" == typeof t.autoHideWindow) return void (t._autoHideWindow = document.getElementById(t.autoHideWindow));
                if (t.autoHideWindow instanceof Smart.Window) return void (t._autoHideWindow = t.autoHideWindow);
              }
              if (!e2 || t._autoHideWindow || 2 === t.$.contentSection.children.length && t.$.contentSection.children[1] instanceof Smart.Window) return;
              const a2 = document.createElement("smart-window");
              a2.$ = Smart.Utilities.Extend(a2), a2.disableSnap = a2.pinned = true, a2.headerButtons = ["close"], t.$.contentSection.appendChild(a2), t._autoHideWindow = a2;
            }
            _moveContent(e2, t) {
              if (!e2 || !t) return;
              const a2 = [].slice.call(e2.$.content.childNodes);
              for (let e3 = 0; e3 < a2.length; e3++) t.appendChild(a2[e3]);
            }
            _tabsChangeHandler(e2) {
              const t = this;
              if (e2.target === t.$.tabsElement && t.autoHide) {
                if (t._autoHideWindow || t._handleAutoHideWindow(true), null !== e2.detail.oldIndex && t._autoHideWindow.opened && (t.$.tabsElement._tabs[e2.detail.oldIndex]._autoHideWindowSize = t._autoHideWindow.style["right" === t.$.tabsElement.tabPosition || "left" === t.$.tabsElement.tabPosition ? "width" : "height"]), !t.autoHide || null === e2.detail.index || void 0 === e2.detail.index) return t._autoHideWindow.setAttribute("active", ""), void t._autoHideWindow.close();
                t._handleAutoHide(e2.detail.index);
              }
            }
            _tabsFocusHandler(e2) {
              const t = this;
              "focus" === e2.type ? (t.bringToFront(), t.setAttribute("focus", "")) : t.removeAttribute("focus");
            }
          }), Smart("smart-wait-window", class extends Smart.ProgressWindow {
            static get properties() {
              return { headerButtons: { value: [], type: "array" }, disableSnap: { value: true, readOnly: true, type: "boolean" }, modal: { value: true, readOnly: true, type: "boolean", defaultReflectToAttribute: true }, pinned: { value: true, type: "boolean", readOnly: true } };
            }
            template() {
              return '<div role="presentation">\n                    <div class="smart-content-container" id="container">\n                        <div id="headerSection" class="smart-header-section" role="heading" aria-level="1">\n                            <div id="header" class="smart-header">[[label]]</div>\n                            <div id="buttonsContainer" class="smart-buttons-container">\n                                <button id="closeButton" class="smart-button smart-element smart-close-button" aria-label="Close"></button>\n                            </div>\n                        </div>\n                        <div class="smart-content">\n                            <content></content>\n                            <smart-progress-bar id="progressBar" animation="[[animation]]" indeterminate theme="[[theme]]" right-to-left="[[rightToLeft]]"></smart-progress-bar>\n                        </div>\n                        <div id="footer" class="smart-footer"></div>\n                    </div>\n                </div>';
            }
            _keyDownHandler(e2) {
              const t = this;
              function a2() {
                t._dragDetails && (t._dragDetails.started = false), t.$.removeClass("no-transition");
              }
              if (delete t._changingFocus, t.disabled || t._dragDetails && t._dragDetails.started) return;
              const i = t.shadowRoot || t._windowParent.element.getRootNode() ? t._windowParent.element.getRootNode().activeElement : document.activeElement;
              e2.stopPropagation();
              const n = "ArrowDown" === e2.key || "ArrowRight" === e2.key ? 10 : -10;
              switch (t.$.removeClass("no-transition"), e2.key) {
                case "ArrowUp":
                case "ArrowDown":
                  if (i !== t) return;
                  if (e2.preventDefault(), e2.altKey) return "ArrowUp" === e2.key ? t.maximize() : t.restore(), void a2();
                  if (t.$.addClass("no-transition"), e2.ctrlKey) return t._resize("bottom", n), void a2();
                  t._drag(n, "vertical");
                  break;
                case "ArrowLeft":
                case "ArrowRight":
                  if (i !== t) return;
                  if (e2.preventDefault(), t.$.addClass("no-transition"), e2.ctrlKey) return t._resize("right", n), void a2();
                  t._drag(n, "horizontal");
                  break;
                case "Tab":
                  t.opened && t.modal && (t._changingFocus = true);
                  break;
                case "Enter":
                case " ": {
                  let a3;
                  if (t.shadowRoot || t.isInShadowDOM ? (a3 = e2.composedPath()[0], t._buttonPressed = a3.getRootNode().host) : (a3 = e2.target.closest && e2.target.closest(".smart-button"), t._buttonPressed = a3), !a3) return;
                  t._isWindowButton(a3), delete t._buttonPressed;
                  break;
                }
              }
              a2();
            }
          });
        }
      )
      /******/
    };
    var __webpack_module_cache__ = {};
    function __webpack_require__(moduleId) {
      var cachedModule = __webpack_module_cache__[moduleId];
      if (cachedModule !== void 0) {
        return cachedModule.exports;
      }
      var module2 = __webpack_module_cache__[moduleId] = {
        /******/
        // no module.id needed
        /******/
        // no module.loaded needed
        /******/
        exports: {}
        /******/
      };
      __webpack_modules__[moduleId](module2, module2.exports, __webpack_require__);
      return module2.exports;
    }
    (() => {
      __webpack_require__.n = (module2) => {
        var getter = module2 && module2.__esModule ? (
          /******/
          () => module2["default"]
        ) : (
          /******/
          () => module2
        );
        __webpack_require__.d(getter, { a: getter });
        return getter;
      };
    })();
    (() => {
      __webpack_require__.d = (exports2, definition) => {
        for (var key in definition) {
          if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports2, key)) {
            Object.defineProperty(exports2, key, { enumerable: true, get: definition[key] });
          }
        }
      };
    })();
    (() => {
      __webpack_require__.o = (obj2, prop) => Object.prototype.hasOwnProperty.call(obj2, prop);
    })();
    (() => {
      __webpack_require__(2737);
      __webpack_require__(6321);
      __webpack_require__(2612);
      __webpack_require__(9135);
      __webpack_require__(5707);
      __webpack_require__(7650);
      __webpack_require__(1139);
      __webpack_require__(3911);
      __webpack_require__(1115);
      __webpack_require__(5839);
      __webpack_require__(8466);
      class smartWindow extends Smart.Component {
        get name() {
          return "smartWindow";
        }
      }
      class smartDialogWindow extends Smart.Component {
        get name() {
          return "smartDialogWindow";
        }
      }
      class smartAlertWindow extends Smart.Component {
        get name() {
          return "smartAlertWindow";
        }
      }
      class smartPromptWindow extends Smart.Component {
        get name() {
          return "smartPromptWindow";
        }
      }
      class smartMultiLinePromptWindow extends Smart.Component {
        get name() {
          return "smartMultiLinePromptWindow";
        }
      }
      class smartProgressWindow extends Smart.Component {
        get name() {
          return "smartProgressWindow";
        }
      }
      class smartTabsWindow extends Smart.Component {
        get name() {
          return "smartTabsWindow";
        }
      }
      class smartWaitWindow extends Smart.Component {
        get name() {
          return "smartWaitWindow";
        }
      }
    })();
  })();
  return smart_window;
}
requireSmart_window();
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __awaiter$2(thisArg, _arguments, P2, generator) {
  function adopt(value) {
    return value instanceof P2 ? value : new P2(function(resolve) {
      resolve(value);
    });
  }
  return new (P2 || (P2 = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e2) {
        reject(e2);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e2) {
        reject(e2);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, [])).next());
  });
}
class Window extends React.Component {
  constructor(props) {
    super(props);
    this.componentRef = React.createRef();
  }
  // Gets the id of the React component.
  get id() {
    if (!this._id) {
      this._id = "Window" + Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
    }
    return this._id;
  }
  /** Determines if 'Add New' Tab inside the Tabs element is visible. Applicable only to TabsWindow
  *	Property type: boolean
  */
  get addNewTab() {
    return this.nativeElement ? this.nativeElement.addNewTab : void 0;
  }
  set addNewTab(value) {
    if (this.nativeElement) {
      this.nativeElement.addNewTab = value;
    }
  }
  /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
  *	Property type: Animation
  */
  get animation() {
    return this.nativeElement ? this.nativeElement.animation : void 0;
  }
  set animation(value) {
    if (this.nativeElement) {
      this.nativeElement.animation = value;
    }
  }
  /** Determines whether and how the value should be automatically capitalized as it is entered/edited by the user. Applicable only to MultilinePromptWindow.
  *	Property type: WindowAutoCapitalize
  */
  get autoCapitalize() {
    return this.nativeElement ? this.nativeElement.autoCapitalize : void 0;
  }
  set autoCapitalize(value) {
    if (this.nativeElement) {
      this.nativeElement.autoCapitalize = value;
    }
  }
  /** Determines whether element will auto expand when the input overflows vertically. Applicable only to MultilinePromptWindow.
  *	Property type: boolean
  */
  get autoExpand() {
    return this.nativeElement ? this.nativeElement.autoExpand : void 0;
  }
  set autoExpand(value) {
    if (this.nativeElement) {
      this.nativeElement.autoExpand = value;
    }
  }
  /** Determines the label for the 'cancel' button inside the Prompt Window.
  *	Property type: string
  */
  get cancelLabel() {
    return this.nativeElement ? this.nativeElement.cancelLabel : void 0;
  }
  set cancelLabel(value) {
    if (this.nativeElement) {
      this.nativeElement.cancelLabel = value;
    }
  }
  /** Determines the label for the 'Complete' button insinde the Progress Window.
  *	Property type: string
  */
  get completeLabel() {
    return this.nativeElement ? this.nativeElement.completeLabel : void 0;
  }
  set completeLabel(value) {
    if (this.nativeElement) {
      this.nativeElement.completeLabel = value;
    }
  }
  /** Determines the label for the 'Confirm' button insinde the Prompt Window.
  *	Property type: string
  */
  get confirmLabel() {
    return this.nativeElement ? this.nativeElement.confirmLabel : void 0;
  }
  set confirmLabel(value) {
    if (this.nativeElement) {
      this.nativeElement.confirmLabel = value;
    }
  }
  /** Determines if the window is collapsed or not. When collapsed the only the header of the window is visible.
  *	Property type: boolean
  */
  get collapsed() {
    return this.nativeElement ? this.nativeElement.collapsed : void 0;
  }
  set collapsed(value) {
    if (this.nativeElement) {
      this.nativeElement.collapsed = value;
    }
  }
  /** When a modal window is opened, thid property determines if clicking on the mask closes the window or not.
  *	Property type: boolean
  */
  get closeOnMaskClick() {
    return this.nativeElement ? this.nativeElement.closeOnMaskClick : void 0;
  }
  set closeOnMaskClick(value) {
    if (this.nativeElement) {
      this.nativeElement.closeOnMaskClick = value;
    }
  }
  /** Determines the data source that will be loaded to the TabsWindow. Applicable only to TabsWindow.
  *	Property type: {label: string, content: string}[]
  */
  get dataSource() {
    return this.nativeElement ? this.nativeElement.dataSource : void 0;
  }
  set dataSource(value) {
    if (this.nativeElement) {
      this.nativeElement.dataSource = value;
    }
  }
  /** Enables or disables the window.
  *	Property type: boolean
  */
  get disabled() {
    return this.nativeElement ? this.nativeElement.disabled : void 0;
  }
  set disabled(value) {
    if (this.nativeElement) {
      this.nativeElement.disabled = value;
    }
  }
  /** Enables or disables the window snapping feature.
  *	Property type: boolean
  */
  get disableSnap() {
    return this.nativeElement ? this.nativeElement.disableSnap : void 0;
  }
  set disableSnap(value) {
    if (this.nativeElement) {
      this.nativeElement.disableSnap = value;
    }
  }
  /** Determines how the characters are displayed inside the input. Applicable to Prompt Window.
  *	Property type: WindowDisplayMode
  */
  get displayMode() {
    return this.nativeElement ? this.nativeElement.displayMode : void 0;
  }
  set displayMode(value) {
    if (this.nativeElement) {
      this.nativeElement.displayMode = value;
    }
  }
  /** Applicable to TabsWindow when docked inside a DockingLayout Custom Element.  Determines where the window(it's tab items as well) can be dropped inside the DockingLayout.  The property is an array that accepts multiple positions. Note: Positions with prefix 'layout-' are applied to the Tab item children of the TabsWidnow owner that is being dragged. The rest of the positions indicate the allowed drop position inside the hovered target(TabsWindow). Used only by jqxDockingLayout custom elements. Determines the possible drop position inside the DockingLayout. The following values are allowed.
  *	Property type: WindowDropPosition
  */
  get dropPosition() {
    return this.nativeElement ? this.nativeElement.dropPosition : void 0;
  }
  set dropPosition(value) {
    if (this.nativeElement) {
      this.nativeElement.dropPosition = value;
    }
  }
  /** A callback function defining the new format for the label of the Progress Bar. Applicable only to ProgressWindow.
  *	Property type: any
  */
  get formatFunction() {
    return this.nativeElement ? this.nativeElement.formatFunction : void 0;
  }
  set formatFunction(value) {
    if (this.nativeElement) {
      this.nativeElement.formatFunction = value;
    }
  }
  /** Determines the position of the footer of the window element.
  *	Property type: WindowFooterPosition
  */
  get footerPosition() {
    return this.nativeElement ? this.nativeElement.footerPosition : void 0;
  }
  set footerPosition(value) {
    if (this.nativeElement) {
      this.nativeElement.footerPosition = value;
    }
  }
  /** Determines the template for the Dialog section of the window. By default footerTemplate is null.
  *	Property type: any
  */
  get footerTemplate() {
    return this.nativeElement ? this.nativeElement.footerTemplate : void 0;
  }
  set footerTemplate(value) {
    if (this.nativeElement) {
      this.nativeElement.footerTemplate = value;
    }
  }
  /** Set's the buttons that will be visible in the header section.
  *	Property type: string[]
  */
  get headerButtons() {
    return this.nativeElement ? this.nativeElement.headerButtons : void 0;
  }
  set headerButtons(value) {
    if (this.nativeElement) {
      this.nativeElement.headerButtons = value;
    }
  }
  /** Determines the template for the Dialog section of the window. By default headerTemplate is null.
  *	Property type: any
  */
  get headerTemplate() {
    return this.nativeElement ? this.nativeElement.headerTemplate : void 0;
  }
  set headerTemplate(value) {
    if (this.nativeElement) {
      this.nativeElement.headerTemplate = value;
    }
  }
  /** Determines the position of the header of the window element.
  *	Property type: TabPosition
  */
  get headerPosition() {
    return this.nativeElement ? this.nativeElement.headerPosition : void 0;
  }
  set headerPosition(value) {
    if (this.nativeElement) {
      this.nativeElement.headerPosition = value;
    }
  }
  /** Sets additional helper text below the text box. The hint is visible only when the text box is focued. Applicable to Prompt Window.
  *	Property type: any
  */
  get hint() {
    return this.nativeElement ? this.nativeElement.hint : void 0;
  }
  set hint(value) {
    if (this.nativeElement) {
      this.nativeElement.hint = value;
    }
  }
  /** Sets the value of the Progress bar to indeterminate state(null) and starts the animation. Applicable only to ProgressWindow.
  *	Property type: boolean
  */
  get indeterminate() {
    return this.nativeElement ? this.nativeElement.indeterminate : void 0;
  }
  set indeterminate(value) {
    if (this.nativeElement) {
      this.nativeElement.indeterminate = value;
    }
  }
  /** Sets the filling direction of the Progress Bar. Applicable only to ProgressWindow.
  *	Property type: boolean
  */
  get inverted() {
    return this.nativeElement ? this.nativeElement.inverted : void 0;
  }
  set inverted(value) {
    if (this.nativeElement) {
      this.nativeElement.inverted = value;
    }
  }
  /** The label of the window that appears in the header area.
  *	Property type: string
  */
  get label() {
    return this.nativeElement ? this.nativeElement.label : void 0;
  }
  set label(value) {
    if (this.nativeElement) {
      this.nativeElement.label = value;
    }
  }
  /** When enabled the resizing operation happens live. By default it's not enabled and during resizing a highlighter around the edges of the window appears to outline  the current size of the element.
  *	Property type: boolean
  */
  get liveResize() {
    return this.nativeElement ? this.nativeElement.liveResize : void 0;
  }
  set liveResize(value) {
    if (this.nativeElement) {
      this.nativeElement.liveResize = value;
    }
  }
  /** Applicable only to TabsWindow when used with a DockingLayout custom element.Used only by jqxDockingLayout. Determines the owner jqxDockingLayout  that the window belongs to. When the tabsWindow has been removed from a DockingLayout element, the property is used to indicate that it belongs to that particular Dockinglayout. Accepts a string, representing the ID of a jqxDockingLayout on the page, or an instance of jqxDokcingLayout.
  *	Property type: any
  */
  get layout() {
    return this.nativeElement ? this.nativeElement.layout : void 0;
  }
  set layout(value) {
    if (this.nativeElement) {
      this.nativeElement.layout = value;
    }
  }
  /** Sets or gets the language. Used in conjunction with the property messages.
  *	Property type: string
  */
  get locale() {
    return this.nativeElement ? this.nativeElement.locale : void 0;
  }
  set locale(value) {
    if (this.nativeElement) {
      this.nativeElement.locale = value;
    }
  }
  /** Applicable only to TabsWindow when docked inside a DockingLayout Custom Element.Determines of the item can be resized or not.
  *	Property type: boolean
  */
  get locked() {
    return this.nativeElement ? this.nativeElement.locked : void 0;
  }
  set locked(value) {
    if (this.nativeElement) {
      this.nativeElement.locked = value;
    }
  }
  /** Callback, related to localization module.
  *	Property type: any
  */
  get localizeFormatFunction() {
    return this.nativeElement ? this.nativeElement.localizeFormatFunction : void 0;
  }
  set localizeFormatFunction(value) {
    if (this.nativeElement) {
      this.nativeElement.localizeFormatFunction = value;
    }
  }
  /** Determines if the window is maximized or not. When maximized the window covers the whole viewport.
  *	Property type: boolean
  */
  get maximized() {
    return this.nativeElement ? this.nativeElement.maximized : void 0;
  }
  set maximized(value) {
    if (this.nativeElement) {
      this.nativeElement.maximized = value;
    }
  }
  /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
  *	Property type: any
  */
  get messages() {
    return this.nativeElement ? this.nativeElement.messages : void 0;
  }
  set messages(value) {
    if (this.nativeElement) {
      this.nativeElement.messages = value;
    }
  }
  /** Determines if the window is modal or not. If true the user can only interact with the window and nothing else on the page.
  *	Property type: boolean
  */
  get modal() {
    return this.nativeElement ? this.nativeElement.modal : void 0;
  }
  set modal(value) {
    if (this.nativeElement) {
      this.nativeElement.modal = value;
    }
  }
  /** Applicable to TabsWindow when docked inside a DockingLayout Custom Element. Determines the max size of the item. Applicable to Progress Window by allowing the user to specify the maximum of the ProgressBar.
  *	Property type: string | number | null
  */
  get max() {
    return this.nativeElement ? this.nativeElement.max : void 0;
  }
  set max(value) {
    if (this.nativeElement) {
      this.nativeElement.max = value;
    }
  }
  /** Applicable to TabsWindow when docked inside DockingLayout Custom Element. Determines the min size of the item. Applicable to Progress Window by allowing the user to specify the minimu of the ProgressBar.
  *	Property type: string | number | null
  */
  get min() {
    return this.nativeElement ? this.nativeElement.min : void 0;
  }
  set min(value) {
    if (this.nativeElement) {
      this.nativeElement.min = value;
    }
  }
  /** Determines if the window is minimized or not. When minimized the window is docked at the bottom left corner of the viewport.
  *	Property type: boolean
  */
  get minimized() {
    return this.nativeElement ? this.nativeElement.minimized : void 0;
  }
  set minimized(value) {
    if (this.nativeElement) {
      this.nativeElement.minimized = value;
    }
  }
  /** Sets or gets the maximum number of characters that the user can enter. Applicable to Prompt/MultilinePrompt Window.
  *	Property type: number
  */
  get maxLength() {
    return this.nativeElement ? this.nativeElement.maxLength : void 0;
  }
  set maxLength(value) {
    if (this.nativeElement) {
      this.nativeElement.maxLength = value;
    }
  }
  /** Sets or gets the minimum number of characters that the user have to enter to trigger the auto complete functionality. Applicable to Prompt/MultilinePrompt Window.
  *	Property type: number
  */
  get minLength() {
    return this.nativeElement ? this.nativeElement.minLength : void 0;
  }
  set minLength(value) {
    if (this.nativeElement) {
      this.nativeElement.minLength = value;
    }
  }
  /** Determines if the window is visible or not.
  *	Property type: boolean
  */
  get opened() {
    return this.nativeElement ? this.nativeElement.opened : void 0;
  }
  set opened(value) {
    if (this.nativeElement) {
      this.nativeElement.opened = value;
    }
  }
  /** Determines if the window is pinned or not. Pinned window is a window that can't be dragged but can be resized.
  *	Property type: boolean
  */
  get pinned() {
    return this.nativeElement ? this.nativeElement.pinned : void 0;
  }
  set pinned(value) {
    if (this.nativeElement) {
      this.nativeElement.pinned = value;
    }
  }
  /** Determines the input's placeholder. Applicable to Prompt Window.
  *	Property type: string
  */
  get placeholder() {
    return this.nativeElement ? this.nativeElement.placeholder : void 0;
  }
  set placeholder(value) {
    if (this.nativeElement) {
      this.nativeElement.placeholder = value;
    }
  }
  /** Determines the label for the Input insinde the PromptWindow.
  *	Property type: string
  */
  get promptLabel() {
    return this.nativeElement ? this.nativeElement.promptLabel : void 0;
  }
  set promptLabel(value) {
    if (this.nativeElement) {
      this.nativeElement.promptLabel = value;
    }
  }
  /** If the element is readonly, users cannot interact with it.
  *	Property type: boolean
  */
  get readonly() {
    return this.nativeElement ? this.nativeElement.readonly : void 0;
  }
  set readonly(value) {
    if (this.nativeElement) {
      this.nativeElement.readonly = value;
    }
  }
  /** When applied a resize indicator is displayed in the bottom right corner of the window and resizing operation can be initiated only from its position.
  *	Property type: boolean
  */
  get resizeIndicator() {
    return this.nativeElement ? this.nativeElement.resizeIndicator : void 0;
  }
  set resizeIndicator(value) {
    if (this.nativeElement) {
      this.nativeElement.resizeIndicator = value;
    }
  }
  /** Determines the resizing mode of the window.  Several modes are available:   none - resizing is disabled.  vertical - vertical resizing is allowed.  horizontal - horizontal resizing is allowed. both - horizontal and vertical resizing is allowed. top - the window can only be resized from the top side. bottom - the window is resizable only from the bottom side. left - the window can be resized only from the left side. right - the window can be resized only from the right side.
  *	Property type: WindowResizeMode
  */
  get resizeMode() {
    return this.nativeElement ? this.nativeElement.resizeMode : void 0;
  }
  set resizeMode(value) {
    if (this.nativeElement) {
      this.nativeElement.resizeMode = value;
    }
  }
  /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
  *	Property type: boolean
  */
  get rightToLeft() {
    return this.nativeElement ? this.nativeElement.rightToLeft : void 0;
  }
  set rightToLeft(value) {
    if (this.nativeElement) {
      this.nativeElement.rightToLeft = value;
    }
  }
  /** Specifies that the user must fill the input before submitting a form with the text box.Applicable to Prompt Window.
  *	Property type: boolean
  */
  get required() {
    return this.nativeElement ? this.nativeElement.required : void 0;
  }
  set required(value) {
    if (this.nativeElement) {
      this.nativeElement.required = value;
    }
  }
  /** Specifies the message that will appear if required is set and no value is provided in the input. Applicable to Prompt Window.
  *	Property type: string
  */
  get requiredMessage() {
    return this.nativeElement ? this.nativeElement.requiredMessage : void 0;
  }
  set requiredMessage(value) {
    if (this.nativeElement) {
      this.nativeElement.requiredMessage = value;
    }
  }
  /** Determines whether the content of the input will be selected on focus or not. Applicable to Prompt Window.
  *	Property type: boolean
  */
  get selectAllOnFocus() {
    return this.nativeElement ? this.nativeElement.selectAllOnFocus : void 0;
  }
  set selectAllOnFocus(value) {
    if (this.nativeElement) {
      this.nativeElement.selectAllOnFocus = value;
    }
  }
  /** Sets or gets which tab is selected. Applicable only to TabsWindow.
  *	Property type: number | null
  */
  get selectedIndex() {
    return this.nativeElement ? this.nativeElement.selectedIndex : void 0;
  }
  set selectedIndex(value) {
    if (this.nativeElement) {
      this.nativeElement.selectedIndex = value;
    }
  }
  /** Determines the way the user can switch between tabs. Applicable only to TabsWindow.
  *	Property type: TabSelectionMode
  */
  get selectionMode() {
    return this.nativeElement ? this.nativeElement.selectionMode : void 0;
  }
  set selectionMode(value) {
    if (this.nativeElement) {
      this.nativeElement.selectionMode = value;
    }
  }
  /** Indicates the index of the last character in the current selection. Applicable only to MultilinePromptWindow.
  *	Property type: number
  */
  get selectionEnd() {
    return this.nativeElement ? this.nativeElement.selectionEnd : void 0;
  }
  set selectionEnd(value) {
    if (this.nativeElement) {
      this.nativeElement.selectionEnd = value;
    }
  }
  /** Indicates the index to the first character in the current selection. Applicable only to MultilinePromptWindow.
  *	Property type: number
  */
  get selectionStart() {
    return this.nativeElement ? this.nativeElement.selectionStart : void 0;
  }
  set selectionStart(value) {
    if (this.nativeElement) {
      this.nativeElement.selectionStart = value;
    }
  }
  /** Enables/Disabled the label for the Progress Bar. Applicable only to Progress Window.
  *	Property type: boolean
  */
  get showProgressValue() {
    return this.nativeElement ? this.nativeElement.showProgressValue : void 0;
  }
  set showProgressValue(value) {
    if (this.nativeElement) {
      this.nativeElement.showProgressValue = value;
    }
  }
  /** A getter that returns the siblings (that share the same parent) of a LayoutPanel item that is docked inside a DockingLayout. The siblings are also DockingLayout items ( LayoutPanels).Applicable only to TabsWindow when docked inside a DockingLayout.
  *	Property type: any
  */
  get siblings() {
    return this.nativeElement ? this.nativeElement.siblings : void 0;
  }
  set siblings(value) {
    if (this.nativeElement) {
      this.nativeElement.siblings = value;
    }
  }
  /** Applicable to TabsWindow when nested inside a DockingLayout Custom Element. Determines the size of the item.
  *	Property type: string
  */
  get size() {
    return this.nativeElement ? this.nativeElement.size : void 0;
  }
  set size(value) {
    if (this.nativeElement) {
      this.nativeElement.size = value;
    }
  }
  /** Specifies whether the element is to have its spelling and grammar checked or not. Applicable only to MultilinePromptWindow.
  *	Property type: boolean
  */
  get spellCheck() {
    return this.nativeElement ? this.nativeElement.spellCheck : void 0;
  }
  set spellCheck(value) {
    if (this.nativeElement) {
      this.nativeElement.spellCheck = value;
    }
  }
  /** Sets or gets whether close buttons are displayed inside the Tab Strip of the TabsWindow. Applicable only to TabsWindow.
  *	Property type: boolean
  */
  get tabCloseButtons() {
    return this.nativeElement ? this.nativeElement.tabCloseButtons : void 0;
  }
  set tabCloseButtons(value) {
    if (this.nativeElement) {
      this.nativeElement.tabCloseButtons = value;
    }
  }
  /** Determines if the close button is visible on select or always. Applicable only to TabsWindow.
  *	Property type: WindowTabCloseButtonMode
  */
  get tabCloseButtonMode() {
    return this.nativeElement ? this.nativeElement.tabCloseButtonMode : void 0;
  }
  set tabCloseButtonMode(value) {
    if (this.nativeElement) {
      this.nativeElement.tabCloseButtonMode = value;
    }
  }
  /** Sets or gets the Tabs scroll buttons behavior. Applicable only when tabLayout is 'scroll'. Applicable only to TabsWindow.
  *	Property type: Overflow
  */
  get tabOverflow() {
    return this.nativeElement ? this.nativeElement.tabOverflow : void 0;
  }
  set tabOverflow(value) {
    if (this.nativeElement) {
      this.nativeElement.tabOverflow = value;
    }
  }
  /** Detetmines Tab Strip is positioned of the TabsWindow. Applicable only to TabsWindow.
  *	Property type: TabPosition
  */
  get tabPosition() {
    return this.nativeElement ? this.nativeElement.tabPosition : void 0;
  }
  set tabPosition(value) {
    if (this.nativeElement) {
      this.nativeElement.tabPosition = value;
    }
  }
  /** Sets or gets the position of the scroll buttons inside the Tab header of the TabsWindow. Applicable only to TabsWindow.
  *	Property type: LayoutPosition
  */
  get tabScrollButtonsPosition() {
    return this.nativeElement ? this.nativeElement.tabScrollButtonsPosition : void 0;
  }
  set tabScrollButtonsPosition(value) {
    if (this.nativeElement) {
      this.nativeElement.tabScrollButtonsPosition = value;
    }
  }
  /** Sets or gets the orientation of the text in the tabs labels of the TabsWindow. Applicable only to TabsWindow.
  *	Property type: Orientation
  */
  get tabTextOrientation() {
    return this.nativeElement ? this.nativeElement.tabTextOrientation : void 0;
  }
  set tabTextOrientation(value) {
    if (this.nativeElement) {
      this.nativeElement.tabTextOrientation = value;
    }
  }
  /** Determines the theme. Theme defines the look of the element
  *	Property type: string
  */
  get theme() {
    return this.nativeElement ? this.nativeElement.theme : void 0;
  }
  set theme(value) {
    if (this.nativeElement) {
      this.nativeElement.theme = value;
    }
  }
  /** If is set to true, the element cannot be focused.
  *	Property type: boolean
  */
  get unfocusable() {
    return this.nativeElement ? this.nativeElement.unfocusable : void 0;
  }
  set unfocusable(value) {
    if (this.nativeElement) {
      this.nativeElement.unfocusable = value;
    }
  }
  /** Determines the value of the TextBox/ProgressBar inside the Dialog/Prompt/Progress Window
  *	Property type: string | number
  */
  get value() {
    return this.nativeElement ? this.nativeElement.value : void 0;
  }
  set value(value) {
    if (this.nativeElement) {
      this.nativeElement.value = value;
    }
  }
  /** Determines the actual parent of the element. The window can size and move only in the area of that element.
  *	Property type: any
  */
  get windowParent() {
    return this.nativeElement ? this.nativeElement.windowParent : void 0;
  }
  set windowParent(value) {
    if (this.nativeElement) {
      this.nativeElement.windowParent = value;
    }
  }
  /** Indicates how the input wraps text. Applicable only to MultilinePromptWindow.
  *	Property type: WindowWrap
  */
  get wrap() {
    return this.nativeElement ? this.nativeElement.wrap : void 0;
  }
  set wrap(value) {
    if (this.nativeElement) {
      this.nativeElement.wrap = value;
    }
  }
  // Gets the properties of the React component.
  get properties() {
    return ["addNewTab", "animation", "autoCapitalize", "autoExpand", "cancelLabel", "completeLabel", "confirmLabel", "collapsed", "closeOnMaskClick", "dataSource", "disabled", "disableSnap", "displayMode", "dropPosition", "formatFunction", "footerPosition", "footerTemplate", "headerButtons", "headerTemplate", "headerPosition", "hint", "indeterminate", "inverted", "label", "liveResize", "layout", "locale", "locked", "localizeFormatFunction", "maximized", "messages", "modal", "max", "min", "minimized", "maxLength", "minLength", "opened", "pinned", "placeholder", "promptLabel", "readonly", "resizeIndicator", "resizeMode", "rightToLeft", "required", "requiredMessage", "selectAllOnFocus", "selectedIndex", "selectionMode", "selectionEnd", "selectionStart", "showProgressValue", "siblings", "size", "spellCheck", "tabCloseButtons", "tabCloseButtonMode", "tabOverflow", "tabPosition", "tabScrollButtonsPosition", "tabTextOrientation", "theme", "unfocusable", "value", "windowParent", "wrap"];
  }
  // Gets the events of the React component.
  get eventListeners() {
    return ["onOpening", "onOpen", "onClosing", "onClose", "onCollapse", "onDragEnd", "onDragStart", "onExpand", "onMaximize", "onMinimize", "onResizeEnd", "onResizeStart", "onRestore", "onCreate", "onReady"];
  }
  /** Appends a tabitem to the end of the list of tab items inside element.
    * @param {Node} node. A TabItem element that should be added to the rest of the items as the last item.
    * @returns {Node}
  */
  appendChild(node2) {
    return __awaiter$2(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.appendChild(node2);
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Sets the window to the top level so the user can interact with it.
  */
  bringToFront() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.bringToFront();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.bringToFront();
      });
    }
  }
  /** Clears the content of the Window.
  */
  clear() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.clear();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.clear();
      });
    }
  }
  /** Closes the window.
  */
  close() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.close();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.close();
      });
    }
  }
  /** Collapses the window.
    * @returns {HTMLElement}
  */
  collapse() {
    return __awaiter$2(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.collapse();
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Makes sure a tab item is visible by scrolling to it. Applicable only to TabsWindow.
  * @param {number} index. The index of the tab to scroll to.
  */
  ensureVisible(index2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.ensureVisible(index2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.ensureVisible(index2);
      });
    }
  }
  /** Expands the window after being collapsed.
    * @returns {any[]}
  */
  expand() {
    return __awaiter$2(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.expand();
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Inserts a new tab and an associated content section. Applicable only to TabsWindow.
  * @param {number} index. The index to insert a new tab at.
  * @param {any} details. An Object with the fields "label", "labelSize", "content" and "group".
  */
  insert(index2, details) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.insert(index2, details);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.insert(index2, details);
      });
    }
  }
  /** Inserts the specified "smart-tab-item" node before the reference "smart-tab-item" node. Applicable only to TabsWindow.
    * @param {Node} newNode. The "jqx-tab-item" node to insert.
    * @param {Node | null} referenceNode?. The "jqx-tab-item" node before which newNode is inserted.
    * @returns {Node}
  */
  insertBefore(newNode, referenceNode) {
    return __awaiter$2(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.insertBefore(newNode, referenceNode);
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Removes a tab and its associated content section. Applicable only to TabsWindow.
  * @param {number} index. The index of the tab to remove.
  */
  removeAt(index2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.removeAt(index2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.removeAt(index2);
      });
    }
  }
  /** Removes a child "smart-tab-item" node. Applicable only to TabsWindow.
    * @param {Node} node. The "jqx-tab-item" node to remove.
    * @returns {Node}
  */
  removeChild(node2) {
    return __awaiter$2(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.removeChild(node2);
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Maximizes the window to fill the area.
  */
  maximize() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.maximize();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.maximize();
      });
    }
  }
  /** Minimizes the window.
  */
  minimize() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.minimize();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.minimize();
      });
    }
  }
  /** Opens the window
  */
  open() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.open();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.open();
      });
    }
  }
  /** Pins the window. Disables window dragging.
  */
  pin() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.pin();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.pin();
      });
    }
  }
  /** Restores the window to it's previous size before maximization/minimization.
  */
  restore() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.restore();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.restore();
      });
    }
  }
  /** Selects a tab.  Applicalbe only to TabsWindow elements.
  * @param {number} index. The index of the tab to select.
  */
  select(index2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.select(index2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.select(index2);
      });
    }
  }
  /** Unpins the window. Enables window dragging.
  */
  unpin() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.unpin();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.unpin();
      });
    }
  }
  /** Updates a tab and its associated content section.  Applicalbe only to TabsWindow elements.
  * @param {number} index. The index of the tab to update.
  * @param {string} label. The new label of the tab. The value can be the id of an HTMLTemplateElement
  * @param {string | HTMLElement} content. The new content of the tab.
  */
  update(index2, label, content2) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.update(index2, label, content2);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.update(index2, label, content2);
      });
    }
  }
  componentDidRender(initialize) {
    const that = this;
    const props = {};
    const events = {};
    let styles2 = null;
    for (let prop in that.props) {
      if (prop === "children") {
        continue;
      }
      if (prop === "style") {
        styles2 = that.props[prop];
        continue;
      }
      if (prop.startsWith("on") && that.properties.indexOf(prop) === -1) {
        events[prop] = that.props[prop];
        continue;
      }
      props[prop] = that.props[prop];
    }
    if (initialize) {
      that.nativeElement = this.componentRef.current;
    }
    for (let prop in props) {
      if (prop === "class") {
        const classNames = props[prop].trim().split(" ");
        for (let className in classNames) {
          if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
            that.nativeElement.classList.add(classNames[className]);
          }
        }
        continue;
      }
      if (props[prop] !== that.nativeElement[prop]) {
        const normalizeProp = (str) => {
          return str.replace(/-([a-z])/g, function(g2) {
            return g2[1].toUpperCase();
          });
        };
        if (prop === "hover" || prop === "active" || prop === "focus" || prop === "selected") {
          that.nativeElement.setAttribute(prop, "");
        }
        const normalizedProp = normalizeProp(prop);
        that.nativeElement[normalizedProp] = props[prop];
      }
    }
    for (let eventName in events) {
      that[eventName] = events[eventName];
      that.nativeElement[eventName.toLowerCase()] = events[eventName];
    }
    if (initialize) {
      if (that.onCreate) {
        that.onCreate();
      }
      that.nativeElement.whenRendered(() => {
        if (that.onReady) {
          that.onReady();
        }
      });
    }
    if (styles2) {
      for (let styleName in styles2) {
        that.nativeElement.style[styleName] = styles2[styleName];
      }
    }
  }
  componentDidMount() {
    this.componentDidRender(true);
  }
  componentDidUpdate() {
    this.componentDidRender(false);
  }
  componentWillUnmount() {
    const that = this;
    if (!that.nativeElement) {
      return;
    }
    that.nativeElement.whenRenderedCallbacks = [];
    for (let i = 0; i < that.eventListeners.length; i++) {
      const eventName = that.eventListeners[i];
      that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
    }
  }
  render() {
    return React.createElement("smart-window", { ref: this.componentRef }, this.props.children);
  }
}
function GetTableLayout(module2, objType, groupId, sectionId) {
  return smetaAxios.get("GetTableLayout", {
    prefix: module2,
    params: { GroupID: groupId, ObjType: objType, SectionID: sectionId },
    loadMask: true
  });
}
function handleParameters(module2, value, selectedRecordID, objref) {
  return smetaAxios.get(value.Token, {
    prefix: module2,
    params: {
      GroupId: selectedRecordID ? selectedRecordID : void 0,
      ObjRef: objref ? objref : void 0,
      NeedRefresh: value.Token === "HandleParams" ? "1" : void 0
    },
    loadMask: true
  });
}
function GetAddressUseKladr() {
  return smetaAxios.get("GetAddressUseKladr", { prefix: Prefixes.address, loadMask: true });
}
function handleTable$1(data) {
  let groupID, subRequest;
  if (data.selectionMode) {
    if (data.GroupID.match(/[0-9]+/)) {
      groupID = data.GroupID.match(/[0-9]+/)[0];
      subRequest = { Groups: data.GroupID, MultiSel: "1" };
    } else {
      subRequest = { MultiSel: "1" };
    }
  } else groupID = data.GroupID;
  return function handleRequest2(request) {
    return smetaAxios.post("HandleTable", subRequest ? { ...request, ...subRequest } : request, {
      prefix: data.Module,
      params: {
        ObjType: data.ObjType,
        SectionID: data.SectionID,
        GroupID: groupID,
        ID: data.selectedRecordID ? data.selectedRecordID : "0",
        OrgTypeCls: data.OrgTypeCls,
        Tag: data.Tag
      },
      loadMask: true
    });
  };
}
const PostHandleTable$2 = (module2, objType, groupId, sectionId, orgTypeCls, path) => {
  return smetaAxios.get("GetTableLayout", {
    prefix: module2,
    params: {
      ObjType: objType,
      SectionID: sectionId ? sectionId : getModalSectionID(),
      GroupID: groupId,
      Path: path,
      OrgTypeCls: orgTypeCls
    },
    loadMask: true
  });
};
function postHandleTableAccounts(module2, objType, sectionId) {
  return smetaAxios.get("GetTableLayout", {
    prefix: module2,
    params: { ObjType: objType, SectionID: sectionId },
    loadMask: true
  });
}
function handleTableAccounts(module2, objType, groupID, sectionID) {
  return function handleAcc(request) {
    return smetaAxios.post(
      "HandleAccounts",
      { ...request, first: "0" },
      { prefix: module2, params: { ObjType: objType, GroupID: groupID, SectionID: sectionID }, loadMask: true }
    );
  };
}
function GetDialogParamsForSearch(module2, ObjType2, ObjRef) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", module2).set("comand", "GetDialogParams").set("ObjType", ObjType2).set("ObjRef", ObjRef);
  return XMLrequest(params2);
}
function GetDocDialogParams(objType, objRef, onlyView = false) {
  return smetaAxios.get("GetDialogParams", {
    prefix: Prefixes.doc,
    params: { ObjType: objType, ObjRef: objRef, OnlyView: onlyView ? "1" : void 0 },
    loadMask: true
  });
}
function PostHandleTableDoc(module2, docCfgID, sectionID) {
  return smetaAxios.get("GetDocumentLayout", {
    prefix: module2,
    params: { DocCfgID: docCfgID, SectionID: sectionID, GridState: "1" },
    loadMask: true
  });
}
function handleTableDoc(module2, docCfgID, groupID, sectionID) {
  return (request) => {
    return smetaAxios.post("HandleDocument", request, {
      prefix: module2,
      params: { DocCfgID: docCfgID, SectionID: sectionID, ParentID: groupID },
      loadMask: true
    });
  };
}
function getObjText(module2, objType, objRef, flag) {
  return smetaAxios.get("GetObjectText", {
    prefix: module2,
    params: { Flag: flag, ObjType: objType, ObjRef: objRef },
    loadMask: true
  });
}
function setParamObjectText(module2, objType, objRef, value, flag = "-1") {
  return smetaAxios.get(module2 ? "SetObjectText" : "SetParamObjectText", {
    prefix: module2 || Prefixes.progs,
    params: {
      Flag: module2 ? flag : void 0,
      ObjType: objType || "0",
      ObjRef: objRef || "0",
      Text: value === void 0 ? "" : value
    },
    loadMask: true
  });
}
function getParamObjectText(module2, objType, objRef, flag = "-1", editVal) {
  return smetaAxios.get(module2 ? "GetObjectText" : "GetParamObjectText", {
    prefix: module2 || Prefixes.progs,
    params: {
      Flag: module2 ? flag : void 0,
      EditVal: module2 ? editVal : void 0,
      ObjType: objType || "0",
      ObjRef: objRef || "0"
    },
    loadMask: true
  });
}
function saveBookState(module2) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", module2).set("comand", "SaveBookState");
  return XMLrequest(params2);
}
function treeRequest(module2, objType, sectionId) {
  return smetaAxios.get("GetGroupTree", {
    prefix: module2,
    params: { ObjType: objType, SectionID: sectionId, Info: "0", UsedDate: "0", ObjRef: "0" },
    loadMask: true
  });
}
function getBookContextMenu(module2, objType, objRef, sectionId) {
  return smetaAxios.get("GetBookContextMenu", {
    prefix: module2,
    params: { ObjType: objType, ObjRef: objRef, SectionID: sectionId },
    loadMask: true
  });
}
function getColumnParams(id, docID, docCfgID) {
  return smetaAxios.get("GetColumnParams", {
    prefix: Prefixes.doc,
    params: { ID: id, DocID: docID, DocCfgID: docCfgID },
    loadMask: true
  });
}
function getSearchParams(groupId, module2) {
  return smetaAxios.get("GetSearchParams", { prefix: module2, params: { GroupID: groupId }, loadMask: true });
}
function initSearch(module2, path, index2, objType) {
  return smetaAxios.get("InitSearch", {
    prefix: module2,
    params: { Path: path, Index: index2, ObjType: objType, smart: "1" },
    loadMask: true
  });
}
function stopSearch(module2) {
  return smetaAxios.get("StopSearch", { prefix: module2, params: { smart: "1" }, loadMask: true });
}
function getParent(objRef) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "persons").set("comand", "GetObjectText").set("Flag", "3").set("ObjType", "2040").set("ObjRef", objRef);
  const json = XMLrequest(params2);
  return json;
}
function setTreeGroup(module2, objType, sectionId, parentId) {
  return smetaAxios.get("SetTreeGroup", {
    prefix: module2,
    params: { DocCfgID: objType, SectionID: sectionId, ParentID: parentId },
    loadMask: true
  });
}
function GetColumnDetails(docCfgID, parentID, path, fieldName, module2) {
  return smetaAxios.get("GetColumnDetails", {
    prefix: module2 ? module2 : Prefixes.doc,
    params: {
      Path: path ? path : void 0,
      FieldName: path ? fieldName : void 0,
      ID: path ? parentID : void 0,
      DocCfgID: !path && docCfgID ? docCfgID : void 0,
      ParentID: !path ? parentID : void 0
    },
    loadMask: true
  });
}
function EditColumnField(data) {
  return smetaAxios.get("EditColumnField", {
    prefix: data.Module,
    params: {
      DocCfgID: data.DocCfgID,
      SectionID: data.SectionID,
      ID: data.ID,
      DocID: data.DocID ? data.DocID : "0",
      MasterID: data.MasterID ? data.MasterID : "0",
      Reference: data.Reference ? data.Reference : "0",
      WSM: "1"
    },
    loadMask: true
  });
}
function HandleSamples(data) {
  return smetaAxios.post("HandleSamples", data, {
    prefix: Prefixes.progs,
    params: { SectionID: data.SectionID ? data.SectionID : void 0 },
    loadMask: true
  });
}
function ApplyFilter(data) {
  return smetaAxios.post("ApplyFilter", data, {
    prefix: data.Module,
    params: {
      Filter: data.Filter !== void 0 ? data.Filter : "",
      Parents: data.Parents ? data.Parents : "0",
      SectionID: data.SectionID ? data.SectionID : void 0
    },
    loadMask: true
  });
}
function GetColumnHintDocs(data) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "documents").set("comand", "GetColumnHint").set("ID", data.ID !== void 0 ? data.ID : "0").set("DocCfgID", data.DocCfgID).set("DocID", data.DocID !== void 0 ? data.DocID : "0").set("MasterID", data.MasterID !== void 0 ? data.MasterID : "0");
  const json = XMLrequest(params2, data);
  return json;
}
function SequenceGetParams(data) {
  return smetaAxios.get("SequenceGetParams", {
    prefix: Prefixes.seq,
    params: { Name: data.Name, GetNumMode: data.GetNumMode },
    loadMask: true
  });
}
function GetNextNumber(data) {
  return smetaAxios.get("GetNextNumber", {
    prefix: Prefixes.seq,
    params: {
      Name: data.Name,
      Range: data.Range,
      MaxNumber: data.MaxNumber !== void 0 && (data.Range === -4 || data.Range === 4) ? data.MaxNumber : void 0
    },
    loadMask: true
  });
}
async function GetSectionDocs(sectionId) {
  if (!sectionId || sectionId <= 100) return "0";
  const json = await smetaAxios.get("GetSectionDocs", {
    prefix: Prefixes.doc,
    params: { SectionID: sectionId, Simple: "1" },
    loadMask: true
  });
  return json.length ? json[0].DocCfgID : "0";
}
const getStaffSettings = (sectionId) => smetaAxios.get("GetStaffSettings", {
  prefix: Prefixes.staff,
  params: { SectionID: sectionId },
  loadMask: true
});
function ApplyTransFilter(sectionId) {
  return smetaAxios.get("ApplyTransFilter", {
    prefix: Prefixes.acc,
    params: { SectionID: sectionId },
    loadMask: true
  });
}
function getAccsParams() {
  return smetaAxios.get("GetTransFilterParams", {
    prefix: Prefixes.acc,
    params: { GroupID: "0", NeedRefresh: "1" },
    loadMask: true
  });
}
function getRendHistoryParams(objRef) {
  return smetaAxios.get("GetRendHistoryParams", {
    prefix: Prefixes.staff,
    params: { ObjType: ObjType.RendHistory, ObjRef: objRef },
    loadMask: true
  });
}
function getAmountDocTypes(renderingID, payType) {
  return smetaAxios.get("GetAmountDocTypes", {
    prefix: Prefixes.amount,
    params: { RenderingID: renderingID, PayType: payType },
    loadMask: true
  });
}
function getParamObjectValues(module2, objType, objRef) {
  return smetaAxios.get("GetObjectValues", {
    prefix: module2,
    params: { ObjType: objType, ObjRef: objRef },
    loadMask: true
  });
}
var classnames = { exports: {} };
/*!
	Copyright (c) 2018 Jed Watson.
	Licensed under the MIT License (MIT), see
	http://jedwatson.github.io/classnames
*/
var hasRequiredClassnames;
function requireClassnames() {
  if (hasRequiredClassnames) return classnames.exports;
  hasRequiredClassnames = 1;
  (function(module2) {
    (function() {
      var hasOwn2 = {}.hasOwnProperty;
      function classNames() {
        var classes = "";
        for (var i = 0; i < arguments.length; i++) {
          var arg = arguments[i];
          if (arg) {
            classes = appendClass(classes, parseValue(arg));
          }
        }
        return classes;
      }
      function parseValue(arg) {
        if (typeof arg === "string" || typeof arg === "number") {
          return arg;
        }
        if (typeof arg !== "object") {
          return "";
        }
        if (Array.isArray(arg)) {
          return classNames.apply(null, arg);
        }
        if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
          return arg.toString();
        }
        var classes = "";
        for (var key in arg) {
          if (hasOwn2.call(arg, key) && arg[key]) {
            classes = appendClass(classes, key);
          }
        }
        return classes;
      }
      function appendClass(value, newClass) {
        if (!newClass) {
          return value;
        }
        if (value) {
          return value + " " + newClass;
        }
        return value + newClass;
      }
      if (module2.exports) {
        classNames.default = classNames;
        module2.exports = classNames;
      } else {
        window.classNames = classNames;
      }
    })();
  })(classnames);
  return classnames.exports;
}
var classnamesExports = requireClassnames();
const cn = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
function LoadingMask(props) {
  const theme = useAtomValue(currentTheme);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      id: props.id,
      style: {
        position: "absolute",
        display: props.bool === void 0 ? "flex" : props.bool ? "none" : "flex",
        MozBoxAlign: "flex",
        alignItems: "center",
        MozBoxPack: "center",
        justifyContent: "center",
        inset: "0 0 0 0",
        backgroundColor: "rgb(250, 249, 245)",
        color: "rgb(255, 255, 255)",
        zIndex: "10",
        opacity: 1,
        transition: "opacity 350ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"
      },
      ref: props.ref,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { className: cn("circularProgress", { light: theme === "light" }) })
    },
    "LoadMaskСircle"
  );
}
const DialogBook$2 = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => DialogBook$1), true ? void 0 : void 0, import.meta.url));
const DialogClsBook = reactExports.lazy(() => __vitePreload(() => import("./DialogClsBook-Bom3EoDl.js"), true ? [] : void 0, import.meta.url));
const DialogPerson = reactExports.lazy(() => __vitePreload(() => import("./DialogPerson-B2tjg4Qp.js"), true ? [] : void 0, import.meta.url));
const DialogOrganizations$1 = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => DialogOrganisations), true ? void 0 : void 0, import.meta.url));
const TestTree = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => Tree$1), true ? void 0 : void 0, import.meta.url));
const DialogDepartments = reactExports.lazy(() => __vitePreload(() => import("./DialogDepartments-D20amGm6.js"), true ? [] : void 0, import.meta.url));
const DialogPeriod = reactExports.lazy(() => __vitePreload(() => import("./DialogPeriod-IyfcHyTP.js"), true ? [] : void 0, import.meta.url));
const DialogPeriodTime = reactExports.lazy(() => __vitePreload(() => import("./DialogPeriodTime-BTfU_-WT.js"), true ? [] : void 0, import.meta.url));
const DialogPeriodCurrentYear = reactExports.lazy(() => __vitePreload(() => import("./DialogPeriodCurrentYear-C0Shcw0n.js"), true ? [] : void 0, import.meta.url));
const DialogChildren = reactExports.lazy(() => __vitePreload(() => import("./DialogChildren-C8EYhJPt.js"), true ? [] : void 0, import.meta.url));
const DialogStartAndEndDate = reactExports.lazy(() => __vitePreload(() => import("./DialogStartAndEndDate-IteHdqr5.js"), true ? [] : void 0, import.meta.url));
const DialogOficialStructure = reactExports.lazy(() => __vitePreload(() => import("./DialogOficialStructure-CvZZAODg.js"), true ? [] : void 0, import.meta.url));
const DialogAcctools = reactExports.lazy(() => __vitePreload(() => import("./DialogAcctools-B-L-ZBRp.js"), true ? [] : void 0, import.meta.url));
const DialogAddress = reactExports.lazy(() => __vitePreload(() => import("./DialogAddress-CN21lwvZ.js"), true ? [] : void 0, import.meta.url));
const DialogDoc = reactExports.lazy(() => __vitePreload(() => import("./DialogDoc-BCKCegu0.js"), true ? [] : void 0, import.meta.url));
const DialogNFA = reactExports.lazy(() => __vitePreload(() => import("./DialogNFA-9n-PsP-P.js"), true ? [] : void 0, import.meta.url));
const DialogDocTabs = reactExports.lazy(() => __vitePreload(() => import("./DialogDocTabs-ExyRNCmU.js"), true ? __vite__mapDeps([0,1]) : void 0, import.meta.url));
const DialogMultiSection = reactExports.lazy(() => __vitePreload(() => import("./DialogMultiSection-R8CQrWj3.js"), true ? __vite__mapDeps([2,3]) : void 0, import.meta.url));
const DialogTabsForReports = reactExports.lazy(() => __vitePreload(() => import("./DialogTabsForReports-BTc98GHA.js"), true ? __vite__mapDeps([4,3]) : void 0, import.meta.url));
const DialogCalendar$2 = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => DialogCalendar$1), true ? void 0 : void 0, import.meta.url));
const DialogHtml$2 = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => DialogHtml$1), true ? void 0 : void 0, import.meta.url));
const DialogTypeOfWorkTime = reactExports.lazy(() => __vitePreload(() => import("./DialogTypeOfWorkTime-WqGwCLth.js"), true ? [] : void 0, import.meta.url));
const DialogPaytypes = reactExports.lazy(() => __vitePreload(() => import("./DialogPayTypes-C6mpikMx.js"), true ? [] : void 0, import.meta.url));
const DialogDistractions = reactExports.lazy(() => __vitePreload(() => import("./DialogDistractions-r5QbDcRD.js"), true ? [] : void 0, import.meta.url));
const DialogChartOfCalculations = reactExports.lazy(() => __vitePreload(() => import("./DialogChartOfCalculations-WTMwmnKG.js"), true ? [] : void 0, import.meta.url));
const getSuspenseForContent$1 = (content2) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: content2 });
};
const getDialogBook = (json, subData, smetaModalId) => {
  var _a2, _b, _c;
  const props = {
    RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
    ...subData.props,
    ObjType: ((_b = json == null ? void 0 : json.Params) == null ? void 0 : _b.ObjType) || subData.props.ObjType,
    KeyField: json.KeyField || json.FieldName || "ID",
    CLSID: json.CLSID,
    EditorMode: true,
    style: { height: 300, width: 400 },
    ObjRef: ((_c = subData.props.data) == null ? void 0 : _c.ObjRef) || subData.props.ObjRef,
    Module: json.Module || subData.props.Module,
    ID: subData.props.ObjRef
  };
  return getSuspenseForContent$1(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogBook$2, { props }));
};
const getDialogClsBook = (json, subData, smetaModalId) => {
  var _a2;
  const props = {
    RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
    ...subData.props,
    KeyField: json.KeyField || json.FieldName || "Code",
    CLSID: json.CLSID,
    EditorMode: true,
    style: { height: 300, width: 400 },
    ID: json.ID
  };
  return getSuspenseForContent$1(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogClsBook, { props }));
};
const getDialogPerson = (json, subData, smetaModalId) => {
  var _a2;
  const props = {
    RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
    ...subData.props,
    CLSID: json.CLSID,
    DlgType: json.DlgType,
    NodeID: json.NodeID
  };
  return getSuspenseForContent$1(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogPerson, { props }));
};
const getDialogOrganizations = (json, subData, smetaModalId) => {
  var _a2;
  const props = {
    RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
    ...subData.props,
    CLSID: json.CLSID,
    NodeID: json.NodeID,
    Title: json.title,
    ObjRef: json.ParentID || subData.props.ObjRef,
    Selector: json.Selector
  };
  return getSuspenseForContent$1(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogOrganizations$1, { props }));
};
const getDialogTree = (json, subData, smetaModalId) => {
  var _a2;
  const props = {
    RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
    ...subData.props,
    CLSID: json.CLSID,
    showButtons: true
  };
  return getSuspenseForContent$1(/* @__PURE__ */ jsxRuntimeExports.jsx(TestTree, { props }));
};
const getDialogDepartments = (json, subData, smetaModalId) => {
  var _a2;
  const props = {
    RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
    ...subData.props,
    CLSID: json.CLSID,
    ID: json.ID
  };
  return getSuspenseForContent$1(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogDepartments, { props }));
};
const getDialogPeriod = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogPeriod,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID,
          Info: json.Info
        }
      }
    )
  );
};
const getDialogPeriodTime = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogPeriodTime,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID
        }
      }
    )
  );
};
const getDialogPeriodCurrentYear = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogPeriodCurrentYear,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID
        }
      }
    )
  );
};
const getDialogChildren = (json, subData, smetaModalId) => {
  var _a2;
  const parentData = getParent(json.PersonID);
  const parent = (parentData == null ? void 0 : parentData.Text) || "";
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogChildren,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID,
          PersonID: json.PersonID,
          parent
        }
      }
    )
  );
};
const getDialogStartAndEndDate = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogStartAndEndDate,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID
        }
      }
    )
  );
};
const getDialogOficialStructure = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogOficialStructure,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID,
          NoFormServer: json.NoFormServer,
          ControlHeight: json.ControlHeight,
          NodeID: json.NodeID,
          ObjRef: json.ID
        },
        smetaModalId
      }
    )
  );
};
const getDialogAcctools = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogAcctools,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID
        }
      }
    )
  );
};
const getDialogAddress = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogAddress,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props
        }
      }
    )
  );
};
const getDialogDoc = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogDoc,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID,
          Title: json.title
        }
      }
    )
  );
};
const getDialogNFA = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogNFA,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID,
          NodeID: json.NodeID,
          Title: json.title,
          Module: "storobj"
        }
      }
    )
  );
};
const getDialogDocTabs = (json, subData, smetaModalId) => {
  var _a2;
  return json.SelectDocument ? getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogDocTabs,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          CLSID: json.CLSID,
          Title: json.title,
          SelectDocument: json.SelectDocument
        }
      }
    )
  ) : getDialogDoc(json, { ...subData, props: { PlaneView: "1", ...subData.props, detailsOpen: true } });
};
const getDialogMultiSection = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogMultiSection,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          json
        }
      }
    )
  );
};
const getDialogTabsForReports = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogTabsForReports,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          json
        }
      }
    )
  );
};
const getDialogCalendar = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogCalendar$2,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          json
        }
      }
    )
  );
};
const getDialogChartOfCalculations = (json, subData, smetaModalId) => {
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogChartOfCalculations,
      {
        props: {
          RequestID: json.Params ? json.Params.RequestID : void 0,
          ...subData.props,
          ...json
        },
        smetaModalId
      }
    )
  );
};
const getDialogHtml = (json, subData, smetaModalId) => {
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogHtml$2,
      {
        htmlInput: subData.props.content || "",
        RequestID: subData.props.RequestID,
        Buttons: subData.props.Buttons,
        Module: json.Module
      }
    )
  );
};
const getDialogTypesOfWorkTime = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogTypeOfWorkTime,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props,
          json
        },
        smetaModalId
      }
    )
  );
};
const getDialogPaytypes = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogPaytypes,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props
        },
        smetaModalId
      }
    )
  );
};
const getDialogDistractions = (json, subData, smetaModalId) => {
  var _a2;
  return getSuspenseForContent$1(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      DialogDistractions,
      {
        props: {
          RequestID: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID,
          ...subData.props
        },
        smetaModalId
      }
    )
  );
};
const getDialogDefault = (json, subData, smetaModalId) => {
  var _a2;
  if (json.CLSID) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: "Функционал в разработке" });
  }
  if (json.DlgType) {
    const dlgTypes = {
      tree: getDialogTree,
      complex: getDialogPerson
    };
    return ((_a2 = dlgTypes[json.DlgType]) == null ? void 0 : _a2.call(dlgTypes, json, subData, smetaModalId)) || /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: "Функционал в разработке" });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: "Функционал в разработке" });
};
function HandleTable({ json, subData, smetaModalId = "" }) {
  var _a2;
  let content2;
  content2 = {
    [ViewClass.TableRep]: getDialogBook,
    [ViewClass.ClsBook]: getDialogClsBook,
    [ViewClass.PersonBook]: getDialogPerson,
    [ViewClass.OrgBook]: getDialogOrganizations,
    [ViewClass.TreeView]: getDialogTree,
    [ViewClass.Departs]: getDialogDepartments,
    [ViewClass.CalcRange]: getDialogPeriod,
    [ViewClass.LongTime]: getDialogPeriodTime,
    [ViewClass.MonthRange]: getDialogPeriodCurrentYear,
    [ViewClass.ChildSel]: getDialogChildren,
    [ViewClass.DateRange]: getDialogStartAndEndDate,
    [ViewClass.SelApp]: getDialogOficialStructure,
    [ViewClass.AccCors]: getDialogAcctools,
    [ViewClass.Address]: getDialogAddress,
    [ViewClass.DocBook]: getDialogDoc,
    [ViewClass.StgBook]: getDialogNFA,
    [ViewClass.DocSite]: getDialogDocTabs,
    [ViewClass.MultiTab]: getDialogMultiSection,
    [ViewClass.HTMLView]: getDialogTabsForReports,
    [ViewClass.CellObj]: getDialogTabsForReports,
    [ViewClass.Calendar]: getDialogCalendar,
    [ViewClass.HTMLEdit]: getDialogHtml,
    [ViewClass.TimeCfg]: getDialogTypesOfWorkTime,
    [ViewClass.PayTypeSet]: getDialogPaytypes,
    [ViewClass.Absences]: getDialogDistractions,
    [ViewClass.Ranges]: getDialogChartOfCalculations
  };
  return ((_a2 = content2[json.CLSID]) == null ? void 0 : _a2.call(content2, json, subData, smetaModalId)) || getDialogDefault(json, subData, smetaModalId);
}
function ModalWindow(props) {
  const WindowsModal = reactExports.useRef(null);
  const [Result, setResult] = reactExports.useState("");
  const [element, setElement] = reactExports.useState();
  const contentBlockRef = reactExports.useRef(null);
  let style2 = props.style;
  let widthDoc, heightDoc;
  widthDoc = document.documentElement.clientWidth;
  heightDoc = document.documentElement.clientHeight;
  function ShowWindow(window2) {
    window2.style.visibility = "";
  }
  React.useEffect(() => {
    WindowsModal.current.componentRef.current.path = props.Path;
    resizeWindow(style2);
    setTimeout(ShowWindow, 200, WindowsModal.current.componentRef.current);
  }, [WindowsModal, style2]);
  reactExports.useEffect(() => {
    clientExports.createRoot(contentBlockRef.current).render(content2);
  }, []);
  reactExports.useEffect(() => {
    if (Result !== "") {
      if (Result.Form && Result.Form.Path && typeof props.setForm === "function") {
        const f2 = props.setForm();
        f2(Result);
      } else {
        props.onSelect({ target: { value: Result.Result } }, props.RequestID, props.setReturnValue, props.from);
        CloseModal(element);
      }
    }
  }, [Result]);
  function resizeWindow(style22) {
    let window2 = WindowsModal.current.componentRef.current;
    let blockWidth, blockHeight, left2, top2;
    if (style22) {
      if (style22.height) blockHeight = parseInt(style22.height, 10);
    }
    if (style22) {
      if (style22.width) blockWidth = parseInt(style22.width, 10);
    }
    if (!blockWidth) blockWidth = window2.getBoundingClientRect().width;
    if (!blockHeight) blockHeight = window2.getBoundingClientRect().height;
    if (blockWidth) {
      left2 = (widthDoc - blockWidth) / 2;
      top2 = (heightDoc - blockHeight) / 2;
    }
    if (left2 < 0 || top2 < 0) {
      window2.setAttribute("maximized", "");
      window2.style.width = "100%";
      window2.style.height = "90%";
    } else {
      window2.style.left = left2 + "px";
      window2.style.top = top2 + "px";
    }
  }
  let param = /* @__PURE__ */ new Map(), json;
  let content2, hiddenButton, title = props.Title;
  hiddenButton = props.hiddenButton;
  if (!props.children) {
    param.set("prefix", props.Module);
    param.set("comand", "GetDialogParams");
    if (props.ObjType) param.set("ObjType", props.ObjType);
    if (props.ObjRef) param.set("ObjRef", props.ObjRef);
    if (props.MultiSel) param.set("MultiSel", props.MultiSel);
    json = XMLrequest(param);
    if (json) {
      title = json.Title;
      switch (json.CLSID) {
        case "{5D1A1010-A394-43EC-A84B-AB401C1C2640}":
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          break;
        case "{37912C20-59B2-415F-8F59-DE7F85AABB00}":
          createCokies(json.CLSID + "_objref", props.ObjRef);
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          hiddenButton = true;
          break;
        case "{2AC0E428-23CD-49F6-AF96-3DB9D6B7AD0A}":
          style2.height = window.innerHeight * 0.7 + "px";
          style2.width = window.innerWidth * 0.7 + "px";
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          hiddenButton = true;
          break;
        case "{7FAC2B20-109D-4406-A757-61674277B71F}":
          style2.height = window.innerHeight * 0.6 + "px";
          style2.width = window.innerWidth * 0.65 + "px";
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          hiddenButton = true;
          break;
        case "{48C155C0-1336-11D6-9CF2-DB1D5BC3046D}":
          style2.height = window.innerHeight * 0.7 + "px";
          style2.width = window.innerWidth * 0.7 + "px";
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          hiddenButton = true;
          break;
        case "{AE5A67E0-EBEB-11D5-900D-000021E6A31F}":
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          hiddenButton = true;
          break;
        case "{295EA015-4573-4AD9-922A-A14CE0FD9C78}":
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          hiddenButton = true;
          break;
        default:
          content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json, subData: { props, SectionID: getModalSectionID() } });
          break;
      }
    }
  } else {
    content2 = props.children;
  }
  function CloseQuery(ev, el) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "forms");
    params2.set("comand", "CloseQuery");
    params2.set("Result", ev.target.value);
    params2.set("Path", props.Path);
    params2.set("WSM", 1);
    AxiosRequest(true, params2).then((json2) => {
      if (json2.Result) {
        if (ev.target.value !== "2") {
          props.onSelect({ target: { value: json2.Result } }, props.RequestID, props.setReturnValue, props.from);
          CloseModal(el);
        } else if (ev.target.value === "2") {
          props.onClose({ target: { value: json2.Result } }, props.RequestID, props.setReturnValue, props.from);
          CloseModal(el);
        }
      } else {
        tokenProcessingTest(json2, { func: setResult });
      }
    });
  }
  function CloseModal(el) {
    let background = el.parentElement;
    if (background.className === "background_ModalDialog") background.remove();
    else el.remove();
  }
  function handleWindowClick(ev) {
    let el = ev.target;
    while (el && el.tagName !== "SMART-WINDOW") {
      el = el.parentElement;
    }
    if (el) {
      if (ev.target.classList.contains("button_Modal_Select")) {
        if (props.onSelect) {
          setElement(el);
          if (props.Path) {
            CloseQuery(ev, el);
          } else {
            props.onSelect(ev, props.RequestID, props.setReturnValue, props.from);
          }
          if (!props.Path) {
            CloseModal(el);
          }
        }
        if (!props.Path && !props.onSelect) {
          CloseModal(el);
        }
      } else if (ev.target.classList.contains("button_Modal_Close") || ev.target.classList.contains("smart-close-button")) {
        if (props.onClose) {
          setElement(el);
          if (props.Path) {
            if (ev.target.classList.contains("smart-close-button")) {
              CloseQuery({ target: { value: "2" } }, el);
            } else {
              CloseQuery(ev, el);
            }
          } else {
            props.onClose({ target: { value: "2" } }, props.RequestID, props.setReturnValue, props.from);
            CloseModal(el);
          }
        }
        if (!props.Path) {
          CloseModal(el);
        }
      }
    }
  }
  function GridResize(ev) {
    setTimeout(() => {
      updateGridData(10, { last: true });
    });
  }
  function Closing(e2) {
    e2.preventDefault();
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Window,
    {
      ref: WindowsModal,
      dropPosition: "center",
      modal: true,
      style: {
        ...style2,
        minWidth: props.style.minWidth,
        minHeight: props.style.minHeight
      },
      opened: true,
      active: true,
      disableEscape: true,
      onClick: handleWindowClick,
      onResizeEnd: GridResize,
      resizeMode: props.resize === false ? "none" : "both",
      label: title,
      headerButtons: props.headerButtons ? props.headerButtons : ["close"],
      onClosing: Closing,
      onKeyDown: (ev) => {
        ev.stopPropagation();
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Box$1,
          {
            style: {
              width: "100%",
              height: hiddenButton ? "100%" : "calc(100% - 40px)",
              overflow: "auto"
            },
            ref: contentBlockRef
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", display: "flex" }, children: hiddenButton ? null : props.Buttons ? /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", style: { marginTop: "10px" }, children: getButtons(props.Buttons) }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { style: { marginLeft: "auto", marginTop: "10px" }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              style: { textTransform: "none" },
              value: "1",
              className: "button_Modal_Select",
              children: "Выбрать"
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              style: { textTransform: "none", marginLeft: 10 },
              value: "2",
              className: "button_Modal_Close",
              children: "Отмена"
            }
          )
        ] }) })
      ]
    }
  );
}
var SaveAs = {};
var hasRequiredSaveAs;
function requireSaveAs() {
  if (hasRequiredSaveAs) return SaveAs;
  hasRequiredSaveAs = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(SaveAs, "__esModule", {
    value: true
  });
  SaveAs.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  SaveAs.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M21 12.4V7l-4-4H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h7.4zM15 15c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3M6 6h9v4H6zm13.99 10.25 1.77 1.77L16.77 23H15v-1.77zm3.26.26-.85.85-1.77-1.77.85-.85c.2-.2.51-.2.71 0l1.06 1.06c.2.2.2.52 0 .71"
  }), "SaveAs");
  return SaveAs;
}
var SaveAsExports = /* @__PURE__ */ requireSaveAs();
const SaveAsIcon = /* @__PURE__ */ getDefaultExportFromCjs(SaveAsExports);
var FolderOpen = {};
var hasRequiredFolderOpen;
function requireFolderOpen() {
  if (hasRequiredFolderOpen) return FolderOpen;
  hasRequiredFolderOpen = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(FolderOpen, "__esModule", {
    value: true
  });
  FolderOpen.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  FolderOpen.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2m0 12H4V8h16z"
  }), "FolderOpen");
  return FolderOpen;
}
var FolderOpenExports = /* @__PURE__ */ requireFolderOpen();
const FolderOpenIcon = /* @__PURE__ */ getDefaultExportFromCjs(FolderOpenExports);
var FormatColorText = {};
var hasRequiredFormatColorText;
function requireFormatColorText() {
  if (hasRequiredFormatColorText) return FormatColorText;
  hasRequiredFormatColorText = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(FormatColorText, "__esModule", {
    value: true
  });
  FormatColorText.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  FormatColorText.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M2 20h20v4H2zm3.49-3h2.42l1.27-3.58h5.65L16.09 17h2.42L13.25 3h-2.5zm4.42-5.61 2.03-5.79h.12l2.03 5.79z"
  }), "FormatColorText");
  return FormatColorText;
}
var FormatColorTextExports = /* @__PURE__ */ requireFormatColorText();
const FormatColorTextIcon = /* @__PURE__ */ getDefaultExportFromCjs(FormatColorTextExports);
function TextAreaWithButtons({ props }) {
  const textArea = React.useRef();
  const fileStorage = React.useRef();
  function onSave(ev) {
    if (props.onEdit) {
      props.onEdit({
        ...props,
        requestId: props.RequestID,
        value: textArea.current.value
      });
    }
    ev.target.closest("SMART-WINDOW").parentElement.remove();
  }
  function readFile(object) {
    var file = object.files[0];
    var reader = new FileReader();
    reader.onload = function() {
      textArea.current.value = reader.result;
    };
    reader.readAsText(file);
  }
  function saveFile() {
    var text = textArea.current.value;
    const b2 = new Blob([text], { type: "text/plain" });
    const url = window.URL.createObjectURL(b2);
    let a2 = document.createElement("a");
    a2.setAttribute("href", url);
    a2.setAttribute("download", props.Title + ".txt");
    a2.type = "text/plain";
    a2.addEventListener("click", () => {
      setTimeout(() => window.URL.revokeObjectURL(url), 1e4);
    });
    a2.click();
    a2.remove();
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      "input",
      {
        onChange: () => {
          readFile(fileStorage.current);
        },
        style: { display: "none" },
        accept: ".txt, .json",
        ref: fileStorage,
        type: "file"
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { style: { height: "100%" }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "40px", width: "100%" }, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            style: {
              borderRadius: "5px",
              width: "100px",
              height: "30px",
              fontSize: "100%",
              border: "1px solid  rgba(25, 118, 210, 0.5)",
              color: "rgb(25, 118, 210)",
              marginRight: "5px"
            },
            onClick: onSave,
            children: "Сохранить"
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            disabled: true,
            style: {
              borderRight: "1px solid",
              width: "1px",
              height: "30px",
              borderRadius: "0"
            }
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            title: "Открыть текст из файла",
            style: {
              borderRadius: "0",
              width: "30px",
              height: "30px",
              fontSize: "100%",
              marginLeft: "15px"
            },
            onClick: () => {
              fileStorage.current.click();
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderOpenIcon, {})
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            title: "Сохранить текст в файл",
            style: {
              borderRadius: "0",
              width: "30px",
              height: "30px",
              fontSize: "100%"
            },
            onClick: saveFile,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(SaveAsIcon, {})
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            disabled: true,
            style: {
              borderRight: "1px solid",
              width: "1px",
              height: "30px",
              borderRadius: "0"
            }
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            style: {
              borderRadius: "0",
              width: "30px",
              height: "30px",
              fontSize: "100%",
              marginLeft: "15px"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormatColorTextIcon, {})
          }
        )
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        "textarea",
        {
          defaultValue: props.Value ? props.Value : "",
          ref: textArea,
          maxLength: props.maxLength,
          style: {
            height: "calc(100% - 50px)",
            width: "100%",
            outline: "0",
            resize: "none"
          }
        }
      )
    ] })
  ] });
}
var NotificationsOutlined = {};
var hasRequiredNotificationsOutlined;
function requireNotificationsOutlined() {
  if (hasRequiredNotificationsOutlined) return NotificationsOutlined;
  hasRequiredNotificationsOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(NotificationsOutlined, "__esModule", {
    value: true
  });
  NotificationsOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  NotificationsOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2m6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5z"
  }), "NotificationsOutlined");
  return NotificationsOutlined;
}
var NotificationsOutlinedExports = /* @__PURE__ */ requireNotificationsOutlined();
const NotificationsIcon = /* @__PURE__ */ getDefaultExportFromCjs(NotificationsOutlinedExports);
var Input$1 = {};
var hasRequiredInput;
function requireInput() {
  if (hasRequiredInput) return Input$1;
  hasRequiredInput = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Input$1, "__esModule", {
    value: true
  });
  Input$1.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Input$1.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2M11 16l4-4-4-4v3H1v2h10z"
  }), "Input");
  return Input$1;
}
var InputExports = /* @__PURE__ */ requireInput();
const InputIcon = /* @__PURE__ */ getDefaultExportFromCjs(InputExports);
function r(e2) {
  var t, f2, n = "";
  if ("string" == typeof e2 || "number" == typeof e2) n += e2;
  else if ("object" == typeof e2) if (Array.isArray(e2)) for (t = 0; t < e2.length; t++) e2[t] && (f2 = r(e2[t])) && (n && (n += " "), n += f2);
  else for (t in e2) e2[t] && (n && (n += " "), n += t);
  return n;
}
function clsx$1() {
  for (var e2, t, f2 = 0, n = ""; f2 < arguments.length; ) (e2 = arguments[f2++]) && (t = r(e2)) && (n && (n += " "), n += t);
  return n;
}
const u$1 = (t) => "number" == typeof t && !isNaN(t), d = (t) => "string" == typeof t, p = (t) => "function" == typeof t, m = (t) => d(t) || p(t) ? t : null, f$1 = (t) => reactExports.isValidElement(t) || d(t) || p(t) || u$1(t);
function g(t, e2, n) {
  void 0 === n && (n = 300);
  const { scrollHeight: o, style: s } = t;
  requestAnimationFrame(() => {
    s.minHeight = "initial", s.height = o + "px", s.transition = `all ${n}ms`, requestAnimationFrame(() => {
      s.height = "0", s.padding = "0", s.margin = "0", setTimeout(e2, n);
    });
  });
}
function h(e2) {
  let { enter: a2, exit: r2, appendPosition: i = false, collapse: l = true, collapseDuration: c = 300 } = e2;
  return function(e3) {
    let { children: u2, position: d2, preventExitTransition: p2, done: m2, nodeRef: f2, isIn: h2 } = e3;
    const y2 = i ? `${a2}--${d2}` : a2, v2 = i ? `${r2}--${d2}` : r2, T2 = reactExports.useRef(0);
    return reactExports.useLayoutEffect(() => {
      const t = f2.current, e4 = y2.split(" "), n = (o) => {
        o.target === f2.current && (t.dispatchEvent(new Event("d")), t.removeEventListener("animationend", n), t.removeEventListener("animationcancel", n), 0 === T2.current && "animationcancel" !== o.type && t.classList.remove(...e4));
      };
      t.classList.add(...e4), t.addEventListener("animationend", n), t.addEventListener("animationcancel", n);
    }, []), reactExports.useEffect(() => {
      const t = f2.current, e4 = () => {
        t.removeEventListener("animationend", e4), l ? g(t, m2, c) : m2();
      };
      h2 || (p2 ? e4() : (T2.current = 1, t.className += ` ${v2}`, t.addEventListener("animationend", e4)));
    }, [h2]), React.createElement(React.Fragment, null, u2);
  };
}
function y(t, e2) {
  return null != t ? { content: t.content, containerId: t.props.containerId, id: t.props.toastId, theme: t.props.theme, type: t.props.type, data: t.props.data || {}, isLoading: t.props.isLoading, icon: t.props.icon, status: e2 } : {};
}
const v = { list: /* @__PURE__ */ new Map(), emitQueue: /* @__PURE__ */ new Map(), on(t, e2) {
  return this.list.has(t) || this.list.set(t, []), this.list.get(t).push(e2), this;
}, off(t, e2) {
  if (e2) {
    const n = this.list.get(t).filter((t2) => t2 !== e2);
    return this.list.set(t, n), this;
  }
  return this.list.delete(t), this;
}, cancelEmit(t) {
  const e2 = this.emitQueue.get(t);
  return e2 && (e2.forEach(clearTimeout), this.emitQueue.delete(t)), this;
}, emit(t) {
  this.list.has(t) && this.list.get(t).forEach((e2) => {
    const n = setTimeout(() => {
      e2(...[].slice.call(arguments, 1));
    }, 0);
    this.emitQueue.has(t) || this.emitQueue.set(t, []), this.emitQueue.get(t).push(n);
  });
} }, T$1 = (e2) => {
  let { theme: n, type: o, ...s } = e2;
  return React.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: "colored" === n ? "currentColor" : `var(--toastify-icon-color-${o})`, ...s });
}, E$1 = { info: function(e2) {
  return React.createElement(T$1, { ...e2 }, React.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
}, warning: function(e2) {
  return React.createElement(T$1, { ...e2 }, React.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
}, success: function(e2) {
  return React.createElement(T$1, { ...e2 }, React.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
}, error: function(e2) {
  return React.createElement(T$1, { ...e2 }, React.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
}, spinner: function() {
  return React.createElement("div", { className: "Toastify__spinner" });
} };
function C(t) {
  const [, o] = reactExports.useReducer((t2) => t2 + 1, 0), [l, c] = reactExports.useState([]), g2 = reactExports.useRef(null), h2 = reactExports.useRef(/* @__PURE__ */ new Map()).current, T2 = (t2) => -1 !== l.indexOf(t2), C2 = reactExports.useRef({ toastKey: 1, displayedToast: 0, count: 0, queue: [], props: t, containerId: null, isToastActive: T2, getToast: (t2) => h2.get(t2) }).current;
  function b2(t2) {
    let { containerId: e2 } = t2;
    const { limit: n } = C2.props;
    !n || e2 && C2.containerId !== e2 || (C2.count -= C2.queue.length, C2.queue = []);
  }
  function I2(t2) {
    c((e2) => null == t2 ? [] : e2.filter((e3) => e3 !== t2));
  }
  function _2() {
    const { toastContent: t2, toastProps: e2, staleId: n } = C2.queue.shift();
    O2(t2, e2, n);
  }
  function L2(t2, n) {
    let { delay: s, staleId: r2, ...i } = n;
    if (!f$1(t2) || function(t3) {
      return !g2.current || C2.props.enableMultiContainer && t3.containerId !== C2.props.containerId || h2.has(t3.toastId) && null == t3.updateId;
    }(i)) return;
    const { toastId: l2, updateId: c2, data: T3 } = i, { props: b3 } = C2, L3 = () => I2(l2), N2 = null == c2;
    N2 && C2.count++;
    const M2 = { ...b3, style: b3.toastStyle, key: C2.toastKey++, ...Object.fromEntries(Object.entries(i).filter((t3) => {
      let [e2, n2] = t3;
      return null != n2;
    })), toastId: l2, updateId: c2, data: T3, closeToast: L3, isIn: false, className: m(i.className || b3.toastClassName), bodyClassName: m(i.bodyClassName || b3.bodyClassName), progressClassName: m(i.progressClassName || b3.progressClassName), autoClose: !i.isLoading && (R2 = i.autoClose, w = b3.autoClose, false === R2 || u$1(R2) && R2 > 0 ? R2 : w), deleteToast() {
      const t3 = y(h2.get(l2), "removed");
      h2.delete(l2), v.emit(4, t3);
      const e2 = C2.queue.length;
      if (C2.count = null == l2 ? C2.count - C2.displayedToast : C2.count - 1, C2.count < 0 && (C2.count = 0), e2 > 0) {
        const t4 = null == l2 ? C2.props.limit : 1;
        if (1 === e2 || 1 === t4) C2.displayedToast++, _2();
        else {
          const n2 = t4 > e2 ? e2 : t4;
          C2.displayedToast = n2;
          for (let t5 = 0; t5 < n2; t5++) _2();
        }
      } else o();
    } };
    var R2, w;
    M2.iconOut = function(t3) {
      let { theme: n2, type: o2, isLoading: s2, icon: r3 } = t3, i2 = null;
      const l3 = { theme: n2, type: o2 };
      return false === r3 || (p(r3) ? i2 = r3(l3) : reactExports.isValidElement(r3) ? i2 = reactExports.cloneElement(r3, l3) : d(r3) || u$1(r3) ? i2 = r3 : s2 ? i2 = E$1.spinner() : ((t4) => t4 in E$1)(o2) && (i2 = E$1[o2](l3))), i2;
    }(M2), p(i.onOpen) && (M2.onOpen = i.onOpen), p(i.onClose) && (M2.onClose = i.onClose), M2.closeButton = b3.closeButton, false === i.closeButton || f$1(i.closeButton) ? M2.closeButton = i.closeButton : true === i.closeButton && (M2.closeButton = !f$1(b3.closeButton) || b3.closeButton);
    let x = t2;
    reactExports.isValidElement(t2) && !d(t2.type) ? x = reactExports.cloneElement(t2, { closeToast: L3, toastProps: M2, data: T3 }) : p(t2) && (x = t2({ closeToast: L3, toastProps: M2, data: T3 })), b3.limit && b3.limit > 0 && C2.count > b3.limit && N2 ? C2.queue.push({ toastContent: x, toastProps: M2, staleId: r2 }) : u$1(s) ? setTimeout(() => {
      O2(x, M2, r2);
    }, s) : O2(x, M2, r2);
  }
  function O2(t2, e2, n) {
    const { toastId: o2 } = e2;
    n && h2.delete(n);
    const s = { content: t2, props: e2 };
    h2.set(o2, s), c((t3) => [...t3, o2].filter((t4) => t4 !== n)), v.emit(4, y(s, null == s.props.updateId ? "added" : "updated"));
  }
  return reactExports.useEffect(() => (C2.containerId = t.containerId, v.cancelEmit(3).on(0, L2).on(1, (t2) => g2.current && I2(t2)).on(5, b2).emit(2, C2), () => {
    h2.clear(), v.emit(3, C2);
  }), []), reactExports.useEffect(() => {
    C2.props = t, C2.isToastActive = T2, C2.displayedToast = l.length;
  }), { getToastToRender: function(e2) {
    const n = /* @__PURE__ */ new Map(), o2 = Array.from(h2.values());
    return t.newestOnTop && o2.reverse(), o2.forEach((t2) => {
      const { position: e3 } = t2.props;
      n.has(e3) || n.set(e3, []), n.get(e3).push(t2);
    }), Array.from(n, (t2) => e2(t2[0], t2[1]));
  }, containerRef: g2, isToastActive: T2 };
}
function b(t) {
  return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientX : t.clientX;
}
function I(t) {
  return t.targetTouches && t.targetTouches.length >= 1 ? t.targetTouches[0].clientY : t.clientY;
}
function _(t) {
  const [o, a2] = reactExports.useState(false), [r2, l] = reactExports.useState(false), c = reactExports.useRef(null), u2 = reactExports.useRef({ start: 0, x: 0, y: 0, delta: 0, removalDistance: 0, canCloseOnClick: true, canDrag: false, boundingRect: null, didMove: false }).current, d2 = reactExports.useRef(t), { autoClose: m2, pauseOnHover: f2, closeToast: g2, onClick: h2, closeOnClick: y2 } = t;
  function v2(e2) {
    if (t.draggable) {
      "touchstart" === e2.nativeEvent.type && e2.nativeEvent.preventDefault(), u2.didMove = false, document.addEventListener("mousemove", _2), document.addEventListener("mouseup", L2), document.addEventListener("touchmove", _2), document.addEventListener("touchend", L2);
      const n = c.current;
      u2.canCloseOnClick = true, u2.canDrag = true, u2.boundingRect = n.getBoundingClientRect(), n.style.transition = "", u2.x = b(e2.nativeEvent), u2.y = I(e2.nativeEvent), "x" === t.draggableDirection ? (u2.start = u2.x, u2.removalDistance = n.offsetWidth * (t.draggablePercent / 100)) : (u2.start = u2.y, u2.removalDistance = n.offsetHeight * (80 === t.draggablePercent ? 1.5 * t.draggablePercent : t.draggablePercent / 100));
    }
  }
  function T2(e2) {
    if (u2.boundingRect) {
      const { top: n, bottom: o2, left: s, right: a3 } = u2.boundingRect;
      "touchend" !== e2.nativeEvent.type && t.pauseOnHover && u2.x >= s && u2.x <= a3 && u2.y >= n && u2.y <= o2 ? C2() : E2();
    }
  }
  function E2() {
    a2(true);
  }
  function C2() {
    a2(false);
  }
  function _2(e2) {
    const n = c.current;
    u2.canDrag && n && (u2.didMove = true, o && C2(), u2.x = b(e2), u2.y = I(e2), u2.delta = "x" === t.draggableDirection ? u2.x - u2.start : u2.y - u2.start, u2.start !== u2.x && (u2.canCloseOnClick = false), n.style.transform = `translate${t.draggableDirection}(${u2.delta}px)`, n.style.opacity = "" + (1 - Math.abs(u2.delta / u2.removalDistance)));
  }
  function L2() {
    document.removeEventListener("mousemove", _2), document.removeEventListener("mouseup", L2), document.removeEventListener("touchmove", _2), document.removeEventListener("touchend", L2);
    const e2 = c.current;
    if (u2.canDrag && u2.didMove && e2) {
      if (u2.canDrag = false, Math.abs(u2.delta) > u2.removalDistance) return l(true), void t.closeToast();
      e2.style.transition = "transform 0.2s, opacity 0.2s", e2.style.transform = `translate${t.draggableDirection}(0)`, e2.style.opacity = "1";
    }
  }
  reactExports.useEffect(() => {
    d2.current = t;
  }), reactExports.useEffect(() => (c.current && c.current.addEventListener("d", E2, { once: true }), p(t.onOpen) && t.onOpen(reactExports.isValidElement(t.children) && t.children.props), () => {
    const t2 = d2.current;
    p(t2.onClose) && t2.onClose(reactExports.isValidElement(t2.children) && t2.children.props);
  }), []), reactExports.useEffect(() => (t.pauseOnFocusLoss && (document.hasFocus() || C2(), window.addEventListener("focus", E2), window.addEventListener("blur", C2)), () => {
    t.pauseOnFocusLoss && (window.removeEventListener("focus", E2), window.removeEventListener("blur", C2));
  }), [t.pauseOnFocusLoss]);
  const O2 = { onMouseDown: v2, onTouchStart: v2, onMouseUp: T2, onTouchEnd: T2 };
  return m2 && f2 && (O2.onMouseEnter = C2, O2.onMouseLeave = E2), y2 && (O2.onClick = (t2) => {
    h2 && h2(t2), u2.canCloseOnClick && g2();
  }), { playToast: E2, pauseToast: C2, isRunning: o, preventExitTransition: r2, toastRef: c, eventHandlers: O2 };
}
function L$1(e2) {
  let { closeToast: n, theme: o, ariaLabel: s = "close" } = e2;
  return React.createElement("button", { className: `Toastify__close-button Toastify__close-button--${o}`, type: "button", onClick: (t) => {
    t.stopPropagation(), n(t);
  }, "aria-label": s }, React.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, React.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
}
function O(e2) {
  let { delay: n, isRunning: o, closeToast: s, type: a2 = "default", hide: r2, className: i, style: l, controlledProgress: u2, progress: d2, rtl: m2, isIn: f2, theme: g2 } = e2;
  const h2 = r2 || u2 && 0 === d2, y2 = { ...l, animationDuration: `${n}ms`, animationPlayState: o ? "running" : "paused", opacity: h2 ? 0 : 1 };
  u2 && (y2.transform = `scaleX(${d2})`);
  const v2 = clsx$1("Toastify__progress-bar", u2 ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${g2}`, `Toastify__progress-bar--${a2}`, { "Toastify__progress-bar--rtl": m2 }), T2 = p(i) ? i({ rtl: m2, type: a2, defaultClassName: v2 }) : clsx$1(v2, i);
  return React.createElement("div", { role: "progressbar", "aria-hidden": h2 ? "true" : "false", "aria-label": "notification timer", className: T2, style: y2, [u2 && d2 >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: u2 && d2 < 1 ? null : () => {
    f2 && s();
  } });
}
const N = (n) => {
  const { isRunning: o, preventExitTransition: s, toastRef: r2, eventHandlers: i } = _(n), { closeButton: l, children: u2, autoClose: d2, onClick: m2, type: f2, hideProgressBar: g2, closeToast: h2, transition: y2, position: v2, className: T2, style: E2, bodyClassName: C2, bodyStyle: b2, progressClassName: I2, progressStyle: N2, updateId: M2, role: R2, progress: w, rtl: x, toastId: $, deleteToast: k2, isIn: P2, isLoading: B3, iconOut: D2, closeOnClick: A2, theme: z2 } = n, F2 = clsx$1("Toastify__toast", `Toastify__toast-theme--${z2}`, `Toastify__toast--${f2}`, { "Toastify__toast--rtl": x }, { "Toastify__toast--close-on-click": A2 }), H4 = p(T2) ? T2({ rtl: x, position: v2, type: f2, defaultClassName: F2 }) : clsx$1(F2, T2), S2 = !!w || !d2, q2 = { closeToast: h2, type: f2, theme: z2 };
  let Q2 = null;
  return false === l || (Q2 = p(l) ? l(q2) : reactExports.isValidElement(l) ? reactExports.cloneElement(l, q2) : L$1(q2)), React.createElement(y2, { isIn: P2, done: k2, position: v2, preventExitTransition: s, nodeRef: r2 }, React.createElement("div", { id: $, onClick: m2, className: H4, ...i, style: E2, ref: r2 }, React.createElement("div", { ...P2 && { role: R2 }, className: p(C2) ? C2({ type: f2 }) : clsx$1("Toastify__toast-body", C2), style: b2 }, null != D2 && React.createElement("div", { className: clsx$1("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !B3 }) }, D2), React.createElement("div", null, u2)), Q2, React.createElement(O, { ...M2 && !S2 ? { key: `pb-${M2}` } : {}, rtl: x, theme: z2, delay: d2, isRunning: o, isIn: P2, closeToast: h2, hide: g2, type: f2, style: N2, className: I2, controlledProgress: S2, progress: w || 0 })));
}, M = function(t, e2) {
  return void 0 === e2 && (e2 = false), { enter: `Toastify--animate Toastify__${t}-enter`, exit: `Toastify--animate Toastify__${t}-exit`, appendPosition: e2 };
}, R = h(M("bounce", true));
h(M("slide", true));
h(M("zoom"));
h(M("flip"));
const k = reactExports.forwardRef((e2, n) => {
  const { getToastToRender: o, containerRef: a2, isToastActive: r2 } = C(e2), { className: i, style: l, rtl: u2, containerId: d2 } = e2;
  function f2(t) {
    const e3 = clsx$1("Toastify__toast-container", `Toastify__toast-container--${t}`, { "Toastify__toast-container--rtl": u2 });
    return p(i) ? i({ position: t, rtl: u2, defaultClassName: e3 }) : clsx$1(e3, m(i));
  }
  return reactExports.useEffect(() => {
    n && (n.current = a2.current);
  }, []), React.createElement("div", { ref: a2, className: "Toastify", id: d2 }, o((e3, n2) => {
    const o2 = n2.length ? { ...l } : { ...l, pointerEvents: "none" };
    return React.createElement("div", { className: f2(e3), style: o2, key: `container-${e3}` }, n2.map((e4, o3) => {
      let { content: s, props: a3 } = e4;
      return React.createElement(N, { ...a3, isIn: r2(a3.toastId), style: { ...a3.style, "--nth": o3 + 1, "--len": n2.length }, key: `toast-${a3.key}` }, s);
    }));
  }));
});
k.displayName = "ToastContainer", k.defaultProps = { position: "top-right", transition: R, autoClose: 5e3, closeButton: L$1, pauseOnHover: true, pauseOnFocusLoss: true, closeOnClick: true, draggable: true, draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
let P, B = /* @__PURE__ */ new Map(), D = [], A$1 = 1;
function z$1() {
  return "" + A$1++;
}
function F$1(t) {
  return t && (d(t.toastId) || u$1(t.toastId)) ? t.toastId : z$1();
}
function H(t, e2) {
  return B.size > 0 ? v.emit(0, t, e2) : D.push({ content: t, options: e2 }), e2.toastId;
}
function S(t, e2) {
  return { ...e2, type: e2 && e2.type || t, toastId: F$1(e2) };
}
function q(t) {
  return (e2, n) => H(e2, S(t, n));
}
function Q(t, e2) {
  return H(t, S("default", e2));
}
Q.loading = (t, e2) => H(t, S("default", { isLoading: true, autoClose: false, closeOnClick: false, closeButton: false, draggable: false, ...e2 })), Q.promise = function(t, e2, n) {
  let o, { pending: s, error: a2, success: r2 } = e2;
  s && (o = d(s) ? Q.loading(s, n) : Q.loading(s.render, { ...n, ...s }));
  const i = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, l = (t2, e3, s2) => {
    if (null == e3) return void Q.dismiss(o);
    const a3 = { type: t2, ...i, ...n, data: s2 }, r3 = d(e3) ? { render: e3 } : e3;
    return o ? Q.update(o, { ...a3, ...r3 }) : Q(r3.render, { ...a3, ...r3 }), s2;
  }, c = p(t) ? t() : t;
  return c.then((t2) => l("success", r2, t2)).catch((t2) => l("error", a2, t2)), c;
}, Q.success = q("success"), Q.info = q("info"), Q.error = q("error"), Q.warning = q("warning"), Q.warn = Q.warning, Q.dark = (t, e2) => H(t, S("default", { theme: "dark", ...e2 })), Q.dismiss = (t) => {
  B.size > 0 ? v.emit(1, t) : D = D.filter((e2) => null != t && e2.options.toastId !== t);
}, Q.clearWaitingQueue = function(t) {
  return void 0 === t && (t = {}), v.emit(5, t);
}, Q.isActive = (t) => {
  let e2 = false;
  return B.forEach((n) => {
    n.isToastActive && n.isToastActive(t) && (e2 = true);
  }), e2;
}, Q.update = function(t, e2) {
  void 0 === e2 && (e2 = {}), setTimeout(() => {
    const n = function(t2, e3) {
      let { containerId: n2 } = e3;
      const o = B.get(n2 || P);
      return o && o.getToast(t2);
    }(t, e2);
    if (n) {
      const { props: o, content: s } = n, a2 = { delay: 100, ...o, ...e2, toastId: e2.toastId || t, updateId: z$1() };
      a2.toastId !== t && (a2.staleId = t);
      const r2 = a2.render || s;
      delete a2.render, H(r2, a2);
    }
  }, 0);
}, Q.done = (t) => {
  Q.update(t, { progress: 1 });
}, Q.onChange = (t) => (v.on(4, t), () => {
  v.off(4, t);
}), Q.POSITION = { TOP_LEFT: "top-left", TOP_RIGHT: "top-right", TOP_CENTER: "top-center", BOTTOM_LEFT: "bottom-left", BOTTOM_RIGHT: "bottom-right", BOTTOM_CENTER: "bottom-center" }, Q.TYPE = { INFO: "info", SUCCESS: "success", WARNING: "warning", ERROR: "error", DEFAULT: "default" }, v.on(2, (t) => {
  P = t.containerId || t, B.set(P, t), D.forEach((t2) => {
    v.emit(0, t2.content, t2.options);
  }), D = [];
}).on(3, (t) => {
  B.delete(t.containerId || t), 0 === B.size && v.off(0).off(1).off(5);
});
function useNotificationCenter(params2) {
  if (params2 === void 0) {
    params2 = {};
  }
  const sortFn = reactExports.useRef(params2.sort || defaultSort);
  const filterFn = reactExports.useRef(params2.filter || null);
  const [notifications, setNotifications] = reactExports.useState(() => {
    if (params2.data) {
      return filterFn.current ? params2.data.filter(filterFn.current).sort(sortFn.current) : [...params2.data].sort(sortFn.current);
    }
    return [];
  });
  const notificationsRef = reactExports.useRef(notifications);
  reactExports.useEffect(() => {
    notificationsRef.current = notifications;
  }, [notifications]);
  reactExports.useEffect(() => {
    return Q.onChange((toast) => {
      if (toast.status === "added" || toast.status === "updated") {
        const newItem = decorate(toast);
        if (filterFn.current && !filterFn.current(newItem)) return;
        setNotifications((prev2) => {
          let nextState = [];
          const updateIdx = prev2.findIndex((v2) => v2.id === newItem.id);
          if (updateIdx !== -1) {
            nextState = prev2.slice();
            Object.assign(nextState[updateIdx], newItem, {
              createdAt: Date.now()
            });
          } else if (prev2.length === 0) {
            nextState = [newItem];
          } else {
            nextState = [newItem, ...prev2];
          }
          return nextState.sort(sortFn.current);
        });
      }
    });
  }, []);
  const remove = (id) => {
    setNotifications((prev2) => prev2.filter(Array.isArray(id) ? (v2) => !id.includes(v2.id) : (v2) => v2.id !== id));
  };
  const clear = () => {
    setNotifications([]);
  };
  const markAllAsRead = function(read2) {
    if (read2 === void 0) {
      read2 = true;
    }
    setNotifications((prev2) => prev2.map((v2) => {
      v2.read = read2;
      return v2;
    }));
  };
  const markAsRead = function(id, read2) {
    if (read2 === void 0) {
      read2 = true;
    }
    let map = (v2) => {
      if (v2.id === id) v2.read = read2;
      return v2;
    };
    if (Array.isArray(id)) {
      map = (v2) => {
        if (id.includes(v2.id)) v2.read = read2;
        return v2;
      };
    }
    setNotifications((prev2) => prev2.map(map));
  };
  const find = (id) => {
    return Array.isArray(id) ? notificationsRef.current.filter((v2) => id.includes(v2.id)) : notificationsRef.current.find((v2) => v2.id === id);
  };
  const add = (item) => {
    if (notificationsRef.current.find((v2) => v2.id === item.id)) return null;
    const newItem = decorate(item);
    setNotifications((prev2) => [...prev2, newItem].sort(sortFn.current));
    return newItem.id;
  };
  const update = (id, item) => {
    const index2 = notificationsRef.current.findIndex((v2) => v2.id === id);
    if (index2 !== -1) {
      setNotifications((prev2) => {
        const nextState = [...prev2];
        Object.assign(nextState[index2], item, {
          createdAt: item.createdAt || Date.now()
        });
        return nextState.sort(sortFn.current);
      });
      return item.id;
    }
    return null;
  };
  const sort = (compareFn) => {
    sortFn.current = compareFn;
    setNotifications((prev2) => prev2.slice().sort(compareFn));
  };
  return {
    notifications,
    clear,
    markAllAsRead,
    markAsRead,
    add,
    update,
    remove,
    // @ts-ignore fixme: overloading issue
    find,
    sort,
    get unreadCount() {
      return notifications.reduce((prev2, cur) => !cur.read ? prev2 + 1 : prev2, 0);
    }
  };
}
function decorate(item) {
  if (item.id == null) item.id = Date.now().toString(36).substring(2, 9);
  if (!item.createdAt) item.createdAt = Date.now();
  if (item.read == null) item.read = false;
  return item;
}
function defaultSort(l, r2) {
  return r2.createdAt - l.createdAt;
}
var MarkChatRead = {};
var hasRequiredMarkChatRead;
function requireMarkChatRead() {
  if (hasRequiredMarkChatRead) return MarkChatRead;
  hasRequiredMarkChatRead = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(MarkChatRead, "__esModule", {
    value: true
  });
  MarkChatRead.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  MarkChatRead.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m17.34 20-3.54-3.54 1.41-1.41 2.12 2.12 4.24-4.24L23 14.34zM12 17c0-3.87 3.13-7 7-7 1.08 0 2.09.25 3 .68V4c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v18l4-4h6c0-.17.01-.33.03-.5-.02-.16-.03-.33-.03-.5"
  }), "MarkChatRead");
  return MarkChatRead;
}
var MarkChatReadExports = /* @__PURE__ */ requireMarkChatRead();
const MarkChatReadIcon = /* @__PURE__ */ getDefaultExportFromCjs(MarkChatReadExports);
var Check = {};
var hasRequiredCheck;
function requireCheck() {
  if (hasRequiredCheck) return Check;
  hasRequiredCheck = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Check, "__esModule", {
    value: true
  });
  Check.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Check.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
  }), "Check");
  return Check;
}
var CheckExports = /* @__PURE__ */ requireCheck();
const CheckIcon = /* @__PURE__ */ getDefaultExportFromCjs(CheckExports);
var Person = {};
var hasRequiredPerson;
function requirePerson() {
  if (hasRequiredPerson) return Person;
  hasRequiredPerson = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Person, "__esModule", {
    value: true
  });
  Person.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Person.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"
  }), "Person");
  return Person;
}
var PersonExports = /* @__PURE__ */ requirePerson();
const PersonIcon = /* @__PURE__ */ getDefaultExportFromCjs(PersonExports);
const IconMenuButton = ({ items, title, children }) => {
  const [anchorElUser, setAnchorElUser] = reactExports.useState(null);
  const hasIcon = items.some((item) => item.icon !== void 0 && !item.hidden);
  const handleOpenUserMenu = (event) => {
    setAnchorElUser(event.currentTarget);
  };
  const handleCloseUserMenu = () => {
    setAnchorElUser(null);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: handleOpenUserMenu, children }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Menu,
      {
        sx: { mt: "25px" },
        id: "menu-appbar",
        anchorEl: anchorElUser,
        anchorOrigin: {
          vertical: "top",
          horizontal: "right"
        },
        keepMounted: true,
        transformOrigin: {
          vertical: "top",
          horizontal: "right"
        },
        open: Boolean(anchorElUser),
        onClose: handleCloseUserMenu,
        children: items.map((item) => {
          if (item.label === "divider") {
            return /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}, item.label);
          }
          {
            return /* @__PURE__ */ jsxRuntimeExports.jsxs(
              MenuItem,
              {
                style: { display: item.hidden ? "none" : "flex" },
                onClick: () => {
                  handleCloseUserMenu();
                  item.onClick && item.onClick(item);
                },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemIcon, { style: { minWidth: hasIcon ? "36px" : "0px" }, children: [
                    item.icon || null,
                    " "
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { style: { paddingLeft: "0px" }, sx: { p: 0 }, children: item.label }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "text.secondary", children: item.shortCut })
                ]
              },
              item.label
            );
          }
        })
      }
    )
  ] });
};
var Visibility$1 = {};
var hasRequiredVisibility;
function requireVisibility() {
  if (hasRequiredVisibility) return Visibility$1;
  hasRequiredVisibility = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Visibility$1, "__esModule", {
    value: true
  });
  Visibility$1.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Visibility$1.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5M12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"
  }), "Visibility");
  return Visibility$1;
}
var VisibilityExports = /* @__PURE__ */ requireVisibility();
const Visibility = /* @__PURE__ */ getDefaultExportFromCjs(VisibilityExports);
var VisibilityOff$1 = {};
var hasRequiredVisibilityOff;
function requireVisibilityOff() {
  if (hasRequiredVisibilityOff) return VisibilityOff$1;
  hasRequiredVisibilityOff = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(VisibilityOff$1, "__esModule", {
    value: true
  });
  VisibilityOff$1.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  VisibilityOff$1.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7M2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2m4.31-.78 3.15 3.15.02-.16c0-1.66-1.34-3-3-3z"
  }), "VisibilityOff");
  return VisibilityOff$1;
}
var VisibilityOffExports = /* @__PURE__ */ requireVisibilityOff();
const VisibilityOff = /* @__PURE__ */ getDefaultExportFromCjs(VisibilityOffExports);
function ChangePassowrd(props) {
  const [currentPassowrd, setCurrentPassowrd] = reactExports.useState("");
  const [newPassword, setNewPassword] = reactExports.useState("");
  const [confirmNewPassword, setConfirmNewPassword] = reactExports.useState("");
  const [showPassword, setShowPassword] = reactExports.useState({
    currentPassowrd: false,
    NewPassword: false,
    ConfirmNewPassword: false
  });
  function handleSubmit(event) {
    event.preventDefault();
    const params2 = /* @__PURE__ */ new Map();
    const postdata = {
      Value: newPassword
    };
    if (props.where !== "signin")
      Object.assign(postdata, {
        Password: currentPassowrd,
        Check: "1"
      });
    params2.set("prefix", "project");
    params2.set("comand", "ChangePassword");
    AxiosRequest(true, params2, postdata).then((json) => {
      if (json.Result === "1") {
        if (props.onPasswordChange) {
          smetaModals.close(props.smetaModalId);
          return props.onPasswordChange(newPassword);
        }
        renderMessageBox({ dlgType: 2, buttons: 1, message: "Пароль изменен." });
      }
    });
  }
  const handleClickShowPassword = (event) => {
    setShowPassword({
      ...showPassword,
      [event.currentTarget.id]: !showPassword[event.currentTarget.id]
    });
  };
  const handleMouseDownPassword = (event) => {
    event.preventDefault();
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { component: "form", noValidate: true, onSubmit: handleSubmit, sx: { mt: 0.8, display: "flex" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "flex-start", spacing: 3, sx: { m: 0 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, style: { width: "300px" }, children: [
    props.where !== "signin" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { fullWidth: true, size: "small", variant: "standard", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { htmlFor: "standard-adornment-password", children: "Текущий пароль" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Input$2,
        {
          currentPassowrd: true,
          type: showPassword.currentPassowrd ? "text" : "password",
          name: "currentPassowrd",
          onChange: (e2) => {
            setCurrentPassowrd(e2.target.value);
          },
          endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              id: "currentPassowrd",
              onClick: handleClickShowPassword,
              onMouseDown: handleMouseDownPassword,
              children: showPassword.currentPassowrd ? /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Visibility, {})
            }
          ) })
        }
      )
    ] }) }) : null,
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { sx: { mt: 1 }, fullWidth: true, size: "small", variant: "standard", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { htmlFor: "standard-adornment-password", children: "Новый пароль" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Input$2,
        {
          newPassword: true,
          type: showPassword.NewPassword ? "text" : "password",
          onChange: (e2) => {
            setNewPassword(e2.target.value);
          },
          endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              id: "NewPassword",
              onClick: handleClickShowPassword,
              onMouseDown: handleMouseDownPassword,
              children: showPassword.NewPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Visibility, {})
            }
          ) })
        }
      )
    ] }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { sx: { mt: 1 }, fullWidth: true, size: "small", variant: "standard", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { htmlFor: "standard-adornment-password", children: "Подтверждение" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Input$2,
        {
          type: showPassword.ConfirmNewPassword ? "text" : "password",
          newPassword: true,
          name: "ConfirmNewPassword",
          onChange: (e2) => {
            setConfirmNewPassword(e2.target.value);
          },
          endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              id: "ConfirmNewPassword",
              onClick: handleClickShowPassword,
              onMouseDown: handleMouseDownPassword,
              children: showPassword.ConfirmNewPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Visibility, {})
            }
          ) })
        }
      )
    ] }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button$2,
      {
        style: {
          textTransform: "none",
          position: "absolute",
          bottom: "15px",
          right: "21px",
          width: "82px"
        },
        type: "submit",
        variant: "outlined",
        size: "small",
        disabled: confirmNewPassword === newPassword && newPassword !== "" ? false : true,
        children: "Изменить"
      }
    )
  ] }) }) });
}
function getListForThemeEditor() {
  return [
    { label: "Бежевая", id: 0 },
    { label: "Синяя", id: 1 }
  ];
}
const localizeThemeEn = {
  Бежевая: "light",
  Синяя: "blue"
};
const localizeThemeRu = {
  light: "Бежевая",
  blue: "Синяя"
};
function ThemeChange(props) {
  const [animation, setAnimations] = useAtom(animationsAtom);
  const [hideToastNotifications, setHideToastNotifications] = useAtom(hideToastNotificationsAtom);
  const [gridSelectedRecordColor, setGridSelectedRecordColorAtom] = useAtom(gridSelectedRecordColorAtom);
  const [theme, setTheme] = useAtom(currentTheme);
  const [themeVal, setThemeVal] = reactExports.useState(localizeThemeRu[theme]);
  function onEditTheme(data) {
    setThemeVal(data.value);
    data.setValue({ label: data.value, id: data.tag });
    setTheme(localizeThemeEn[data.value]);
    updateOptionsForUser({ theme: localizeThemeEn[data.value] });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "flex-start", sx: { m: 0, pl: 2 }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      FormControlLabel,
      {
        control: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Switch,
          {
            disabled: !isDeveloper(),
            checked: animation,
            onChange: (event) => {
              setAnimations(event.target.checked);
              updateOptionsForUser({ animations: event.target.checked });
            },
            inputProps: { "aria-label": "controlled" }
          }
        ),
        sx: { display: "none" },
        label: "Анимации",
        labelPlacement: "end"
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      FormControlLabel,
      {
        control: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Switch,
          {
            checked: hideToastNotifications,
            onChange: (event) => {
              setHideToastNotifications(event.target.checked);
              updateOptionsForUser({ hideToastNotifications: event.target.checked });
              if (event.target.checked) Q.dismiss();
            },
            inputProps: { "aria-label": "controlled" }
          }
        ),
        label: "Скрыть всплывающие уведомления",
        labelPlacement: "end"
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      FormControlLabel,
      {
        control: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Switch,
          {
            checked: gridSelectedRecordColor,
            onChange: (event) => {
              setGridSelectedRecordColorAtom(event.target.checked);
              updateOptionsForUser({ gridSelectedRecordColor: event.target.checked });
            },
            inputProps: { "aria-label": "controlled" }
          }
        ),
        label: "Выделять запись цветом в таблице",
        labelPlacement: "end"
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Grid$1,
      {
        style: {
          height: "27px",
          width: "250px",
          display: "none",
          alignItems: "center"
        },
        item: true,
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "50px" }, children: "Тема:" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "div",
            {
              style: {
                height: "27px",
                border: "1px solid #eeeeee"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                Editor,
                {
                  value: themeVal,
                  onEdit: onEditTheme,
                  editStyle: 65,
                  onDropDownList: getListForThemeEditor
                }
              )
            }
          )
        ]
      }
    )
  ] });
}
var ArrowDropDown = {};
var hasRequiredArrowDropDown;
function requireArrowDropDown() {
  if (hasRequiredArrowDropDown) return ArrowDropDown;
  hasRequiredArrowDropDown = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ArrowDropDown, "__esModule", {
    value: true
  });
  ArrowDropDown.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ArrowDropDown.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m7 10 5 5 5-5z"
  }), "ArrowDropDown");
  return ArrowDropDown;
}
var ArrowDropDownExports = /* @__PURE__ */ requireArrowDropDown();
const ArrowDropDownIcon = /* @__PURE__ */ getDefaultExportFromCjs(ArrowDropDownExports);
const SelectDrx = (props) => {
  let LastDrx = getLastLogin().split(",");
  const [drxconnect, setDrxServer] = reactExports.useState([]);
  const [value, setValue] = React.useState(LastDrx === void 0 ? "" : LastDrx[0]);
  const [inputValue, setInputValue] = React.useState("");
  const [loading, setLoad] = reactExports.useState(true);
  const [open, setOpen] = reactExports.useState(false);
  const wrapperRef = reactExports.useRef(null);
  useOutsideAlerter(wrapperRef);
  React.useEffect(() => {
    if (hasURLparam("configname")) {
      setValue(getURLparam("configname"));
      props.setBackInfo(getURLparam("configname"));
    }
  }, []);
  function useOutsideAlerter(ref2) {
    reactExports.useEffect(() => {
      function handleClickOutside(event) {
        if (ref2.current && !ref2.current.contains(event.target)) {
          if (event.target.id === "iconDRX" || event.target.id === "buttonDRX" || event.target.id === "drx") ;
          else {
            setOpen(false);
          }
        }
      }
      document.addEventListener("mousedown", handleClickOutside);
      return () => {
        document.removeEventListener("mousedown", handleClickOutside);
      };
    }, [ref2]);
  }
  const PopperMy2 = function(props2) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(Popper, { ...props2, placement: "bottom-start", onClick: ChangeOpen, ref: wrapperRef });
  };
  const ChangeOpen = () => {
    setOpen(!open);
  };
  const getDrx = () => {
    setOpen(!open);
    setLoad(true);
    if (!open) {
      const config2 = {
        prefix: Prefixes.default
      };
      smetaAxios.get("getConfigList", config2).then((res) => {
        setDrxServer(res);
        setLoad(false);
      });
    }
  };
  const OnKeyEnter = (e2) => {
    if (e2.keyCode === 13 && open === false) {
      props.KeyDown(e2);
    } else if (e2.keyCode === 40 && open === false) {
      getDrx();
    }
  };
  function MenuItems2(drxList) {
    let array = [];
    for (const value2 of Object.values(drxList)) {
      array.push(`${value2}`);
    }
    return array;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      open,
      freeSolo: true,
      selectOnFocus: true,
      disableClearable: true,
      PopperComponent: PopperMy2,
      loading,
      loadingText: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, {}),
      fullWidth: true,
      value,
      onChange: (event, newValue) => {
        setValue(newValue);
      },
      inputValue,
      onInputChange: (event, newInputValue) => {
        props.setBackInfo(newInputValue);
        setInputValue(newInputValue);
      },
      id: "drx",
      options: MenuItems2(drxconnect),
      onKeyDown: OnKeyEnter,
      renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
        TextField,
        {
          ...params2,
          label: "Конфигурация",
          InputProps: {
            ...params2.InputProps,
            endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: getDrx, id: "buttonDRX", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDropDownIcon, { id: "iconDRX" }) }) })
          }
        }
      )
    }
  ) });
};
const SelectUser = (props) => {
  let LastUser = getLastLogin().split(",");
  const [value, setValue] = React.useState(LastUser === void 0 ? "" : LastUser[1]);
  const [inputValue, setInputValue] = React.useState("");
  const [users, setUserList] = reactExports.useState([]);
  const [loading, setLoad] = reactExports.useState(true);
  const [open, setOpen] = reactExports.useState(false);
  const wrapperRef = reactExports.useRef(null);
  useOutsideAlerter(wrapperRef);
  function useOutsideAlerter(ref2) {
    reactExports.useEffect(() => {
      function handleClickOutside(event) {
        if (ref2.current && !ref2.current.contains(event.target)) {
          if (event.target.id === "iconUser" || event.target.id === "buttonUser" || event.target.id === "username") ;
          else {
            setOpen(false);
          }
        }
      }
      document.addEventListener("mousedown", handleClickOutside);
      return () => {
        document.removeEventListener("mousedown", handleClickOutside);
      };
    }, [ref2]);
  }
  const PopperMy2 = function(props2) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(Popper, { ...props2, placement: "bottom-start", onClick: ChangeOpen, ref: wrapperRef });
  };
  const ChangeOpen = () => {
    setOpen(!open);
  };
  const getUser = () => {
    setOpen(!open);
    setLoad(true);
    if (!open && props.drxInfo !== "") {
      let params2 = /* @__PURE__ */ new Map();
      params2.set("comand", "getuserlist");
      params2.set("ConfigName", encodeURIComponent(props.drxInfo));
      setLoad(false);
      setUserList(XMLrequest(params2));
    }
  };
  const OnKeyEnter = (e2) => {
    if (e2.keyCode === 13 && open === false) {
      props.KeyDown(e2);
    } else if (e2.keyCode === 40 && open === false) {
      getUser();
    }
  };
  function MenuItems2(userList) {
    let array = [];
    Object.values(userList).forEach((value2, index2) => {
      array.push({ label: value2, id: index2 });
    });
    return array;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, id: "userGrid", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      open,
      PopperComponent: PopperMy2,
      disableListWrap: true,
      selectOnFocus: true,
      freeSolo: true,
      fullWidth: true,
      loading,
      loadingText: props.drxInfo === "" ? "Необходимо выбрать конфигурацию" : /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, {}),
      value,
      disableClearable: true,
      onChange: (event, newValue) => {
        setValue(newValue);
      },
      inputValue,
      onInputChange: (event, newInputValue) => {
        props.setBackInfo(newInputValue);
        setInputValue(newInputValue);
      },
      id: "username",
      options: MenuItems2(users),
      renderOption: (props2, option) => {
        return /* @__PURE__ */ reactExports.createElement("li", { ...props2, key: `${option.label}-${option.id}` }, option.label);
      },
      getOptionLabel: (option) => {
        return option.label ? option.label : "";
      },
      isOptionEqualToValue: (option, value2) => {
        return option.id === value2.id || option.label === value2.label;
      },
      onKeyDown: OnKeyEnter,
      renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
        TextField,
        {
          ...params2,
          autoComplete: "username",
          helperText: props.selectedOrg && props.selectedOrg.text ? props.selectedOrg.text : "",
          name: "username",
          label: "Имя пользователя",
          style: { paddingRight: 0 },
          InputProps: {
            ...params2.InputProps,
            endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
              props.HasOrgs === "1" ? /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: props.selectOrg, id: "buttonUser", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MoreHorizIcon, { id: "iconUser" }) }) }) : null,
              /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: getUser, id: "buttonUser", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDropDownIcon, { id: "iconUser" }) }) })
            ] })
          }
        }
      )
    }
  ) });
};
const SelectWorkPlace = (props) => {
  const lastWorkPlace = getLastLogin().split(",");
  const [workplaces, setWorkPlaces] = reactExports.useState({});
  const [value, setValue] = reactExports.useState(lastWorkPlace === void 0 ? "" : lastWorkPlace[2]);
  const [inputValue, setInputValue] = reactExports.useState("");
  const [loading, setLoad] = reactExports.useState(true);
  const [open, setOpen] = reactExports.useState(false);
  const wrapperRef = reactExports.useRef(null);
  useOutsideAlerter(wrapperRef);
  function useOutsideAlerter(ref2) {
    reactExports.useEffect(() => {
      function handleClickOutside(event) {
        const target = event.target;
        if (ref2.current && !ref2.current.contains(target)) {
          if (target.id === "iconWP" || target.id === "buttonWP" || target.id === "WP") ;
          else {
            setOpen(false);
          }
        }
      }
      document.addEventListener("mousedown", handleClickOutside);
      return () => {
        document.removeEventListener("mousedown", handleClickOutside);
      };
    }, [ref2]);
  }
  const popperMy = (props2) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(Popper, { ...props2, placement: "bottom-start", onClick: changeOpen, ref: wrapperRef });
  };
  const changeOpen = () => {
    setOpen(!open);
  };
  const getWorkPlaces = async () => {
    setOpen(!open);
    setLoad(true);
    if (!open && props.userInfo !== "" && props.drxInfo !== "") {
      setWorkPlaces(
        await smetaAxios.get("getworkplacelist", {
          prefix: Prefixes.default,
          params: { ConfigName: encodeURIComponent(props.drxInfo), UserName: encodeURIComponent(props.userInfo) },
          loadMask: true
        })
      );
    }
    setLoad(false);
  };
  const onKeyEnter = (e2) => {
    if (e2.key === "Enter" && open === false) {
      props.KeyDown(e2);
    } else if (e2.key === "ArrowDown" && open === false) {
      getWorkPlaces();
    }
  };
  function menuItems(userList) {
    const array = [];
    for (const value2 of Object.values(userList)) {
      array.push(`${value2}`);
    }
    return array;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      open,
      PopperComponent: popperMy,
      loading,
      loadingText: props.userInfo === "" || props.drxInfo === "" ? "Необходимо выбрать пользователя" : /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, {}),
      freeSolo: true,
      fullWidth: true,
      disableClearable: true,
      value,
      onChange: (event, newValue) => {
        setValue(newValue);
      },
      inputValue,
      onInputChange: (event, newInputValue) => {
        props.setBackInfo(newInputValue);
        setInputValue(newInputValue);
      },
      id: "WP",
      options: menuItems(workplaces),
      onKeyDown: onKeyEnter,
      renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
        TextField,
        {
          autoComplete: "off",
          ...params2,
          label: "Рабочее место",
          InputProps: {
            ...params2.InputProps,
            endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: getWorkPlaces, id: "buttonWP", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDropDownIcon, { id: "iconWP" }) }) })
          }
        }
      )
    }
  ) });
};
const SelectDrxModal = (props) => {
  const [value, setValue] = React.useState("");
  const [inputValue, setInputValue] = React.useState("");
  function MenuItems2(drxList) {
    let array = [], name;
    for (const value2 of Object.values(drxList)) {
      name = value2;
      array.push(name["Name"]);
    }
    return array;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      selectOnFocus: true,
      fullWidth: true,
      value,
      onChange: (event, newValue) => {
        setValue(newValue);
      },
      inputValue,
      onInputChange: (event, newInputValue) => {
        props.setBackInfo(newInputValue);
        setInputValue(newInputValue);
      },
      id: "drx",
      options: MenuItems2(props.json),
      renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField, { ...params2, label: "Конфигурация" })
    }
  ) });
};
const SelectWorkPlaceModal = (props) => {
  const [value, setValue] = React.useState("");
  const [inputValue, setInputValue] = React.useState("");
  const [load, setLoad] = reactExports.useState(true);
  const [LastDrx, setLastDrx] = reactExports.useState("");
  reactExports.useEffect(() => {
    setLoad(true);
    if (props.drx === LastDrx) ;
    else {
      setValue("");
      setLastDrx(props.drx);
    }
  }, [props.drx]);
  const ClickField = () => {
    if (props.drx !== void 0) {
      setLoad(false);
    }
  };
  function MenuItems2(WPList) {
    let array = [], val;
    for (const value2 of Object.values(WPList)) {
      val = value2;
      if (val.Name === props.drx) {
        props.setServer(val.Server);
        return val.WorkPlace;
      }
    }
    return array;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      selectOnFocus: true,
      loadingText: "Выберите рабочее место",
      fullWidth: true,
      value,
      onChange: (event, newValue) => {
        setValue(newValue);
      },
      inputValue,
      onInputChange: (event, newInputValue) => {
        props.setBackInfo(newInputValue);
        setInputValue(newInputValue);
      },
      id: "workplace",
      options: MenuItems2(props.json),
      renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField, { onClick: ClickField, ...params2, label: "Рабочее место" })
    }
  ) });
};
function DialogContainer(props) {
  const [open, setOpen] = reactExports.useState(true);
  reactExports.useEffect(() => {
    setOpen(true);
  }, [props.contentText]);
  const handleClose = () => {
    setOpen(false);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Dialog,
    {
      open,
      onClose: handleClose,
      "aria-labelledby": "alert-dialog-title",
      "aria-describedby": "alert-dialog-description",
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { id: "alert-dialog-title", children: props.title }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContentText, { id: "alert-dialog-description", children: props.contentText }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogActions, {})
      ]
    }
  );
}
const Transition$1 = React.forwardRef(function Transition23(props, ref2) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Slide, { direction: "up", ref: ref2, ...props });
});
function PaperComponent$1(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Draggable, { cancel: '[class*="MuiDialogContent-root"]', children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { ...props }) });
}
function ModalSignIn(props) {
  const [open, setOpen] = reactExports.useState(true);
  const [drx, setDrx] = reactExports.useState();
  const [workplace, setWorkPlace] = reactExports.useState();
  const [IP, setIP] = reactExports.useState("");
  function CheckAnswerFromServer(answer) {
    const element = document.getElementById("renderSignIn");
    setOpen(false);
    const elementRoot = element.root || clientExports.createRoot(element);
    element.root = elementRoot;
    switch (answer) {
      case "ConfigName":
        elementRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogContainer, { title: "Ошибка", contentText: `Файл подключения ${drx} не найден.` }));
        break;
      case "UserName":
        elementRoot.render(
          /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContainer, { title: "Ошибка", contentText: `Пользователь в системе не зарегистрирован.` })
        );
        break;
      case "Password":
        elementRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogContainer, { title: "Ошибка", contentText: `Пароль неверный.` }));
        break;
    }
  }
  const Navigate = (jsonEnter) => {
    props.setSecret(jsonEnter);
    setOpen(false);
  };
  function handleEnter() {
    let params2 = /* @__PURE__ */ new Map();
    let json, postData;
    params2.set("comand", "enter");
    if (IP !== void 0 && IP !== "") {
      params2.set("IP", IP);
    }
    postData = {
      ConfigName: drx,
      Workplace: workplace,
      Username: props.secret,
      Password: props.keyFromSelect,
      Ticket: props.data["Pkcs7Auth-Result"].Ticket
    };
    json = XMLrequest(params2, postData);
    json["error"] !== void 0 ? CheckAnswerFromServer(json["error"]["Item"]) : Navigate(json);
  }
  function isEmptyReturn() {
    if (props.data["Pkcs7Auth-Result"].Result.length === 0) {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { id: "alert-dialog-title", children: "Параметры подключения" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { style: { paddingTop: "10px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            container: true,
            direction: "column",
            justifyContent: "space-around",
            alignItems: "stretch",
            spacing: 3,
            sx: { pt: 0 },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body1", children: "У вас нет назначенных конфигураций." }) })
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogActions, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", style: { textTransform: "none" }, onClick: handleClose, children: "Отмена" }) })
      ] });
    } else {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { id: "alert-dialog-title", children: "Параметры подключения" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { style: { paddingTop: "10px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid$1,
          {
            container: true,
            direction: "column",
            justifyContent: "space-around",
            alignItems: "stretch",
            spacing: 3,
            sx: { pt: 0 },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(SelectDrxModal, { json: props.data["Pkcs7Auth-Result"].Result, setBackInfo: setDrx }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                SelectWorkPlaceModal,
                {
                  json: props.data["Pkcs7Auth-Result"].Result,
                  drx,
                  setBackInfo: setWorkPlace,
                  setServer: setIP
                }
              )
            ]
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(DialogActions, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", style: { textTransform: "none" }, onClick: handleEnter, children: "Войти" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", style: { textTransform: "none" }, onClick: handleClose, children: "Отмена" })
        ] })
      ] });
    }
  }
  reactExports.useEffect(() => {
    setOpen(true);
  }, [props.data]);
  const handleClose = () => {
    setOpen(false);
  };
  if (Object.keys(props.data)[0] !== "Pkcs7Auth-Result") {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Dialog,
      {
        open,
        onClose: handleClose,
        "aria-labelledby": "alert-dialog-title",
        "aria-describedby": "alert-dialog-description",
        fullWidth: true,
        maxWidth: "xs",
        TransitionComponent: Transition$1,
        PaperComponent: PaperComponent$1,
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(DialogTitle, { id: "alert-dialog-title", children: "Ошибка" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DialogContent, { style: { paddingTop: "10px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              container: true,
              direction: "column",
              justifyContent: "space-around",
              alignItems: "stretch",
              spacing: 3,
              sx: { pt: 0 },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body1", children: props.data["Pkcs7Auth-Error"].Error }) })
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DialogActions, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", style: { textTransform: "none" }, onClick: handleClose, children: "Отмена" }) })
        ]
      }
    );
  } else {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      Dialog,
      {
        open,
        onClose: handleClose,
        "aria-labelledby": "alert-dialog-title",
        "aria-describedby": "alert-dialog-description",
        fullWidth: true,
        maxWidth: "xs",
        TransitionComponent: Transition$1,
        PaperComponent: PaperComponent$1,
        children: isEmptyReturn()
      }
    );
  }
}
function getUrlSearh() {
  let search = window.location.search;
  if (window.location.hash.includes("#/")) {
    const hash2 = window.location.hash.match(/\?.+/);
    if (hash2 !== null) search = hash2[0];
  }
  return search;
}
const parseInputData = (data) => {
  try {
    let groups = data;
    const index2 = groups.indexOf("");
    if (index2 !== -1) {
      groups.splice(index2, 1);
    }
    return groups.map((group) => {
      const [item1, item2, item3] = group.split(";");
      return { item1, item2, item3 };
    });
  } catch (error) {
    console.error("Error parsing input data:", error);
    return [];
  }
};
const ChooseCert = ({ data, onSelect, smetaModalId = "" }) => {
  const [selected, setSelected] = React.useState(0);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "flex-start", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { width: "100%", overflow: "auto", height: "428px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { children: parseInputData(data).map((data2, index2) => /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Grid$1,
      {
        style: {
          border: `${selected === index2 ? "3px" : "1px"} solid #ccc`,
          padding: "10px",
          margin: "10px",
          backgroundColor: selected === index2 ? "#e7e7e7" : ""
        },
        onClick: () => {
          setSelected(index2);
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Серийный номер" }),
            " ",
            data2.item1
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Тип" }),
            " ",
            data2.item2
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "Организация" }),
            " ",
            data2.item3
          ] })
        ]
      },
      index2
    )) }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "flex-end", style: { height: "30px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none" },
          value: "1",
          className: "button_Modal_Select",
          onClick: () => {
            const sn = data[selected].split(";")[0];
            onSelect(sn);
            smetaModals.close(smetaModalId);
          },
          children: "Выбрать"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none", marginLeft: 10 },
          value: "2",
          className: "button_Modal_Close",
          onClick: () => {
            smetaModals.close(smetaModalId);
          },
          children: "Отмена"
        }
      )
    ] }) })
  ] });
};
var lib = {};
var Scrollbars$1 = {};
var raf = { exports: {} };
var performanceNow$1 = { exports: {} };
var performanceNow = performanceNow$1.exports;
var hasRequiredPerformanceNow;
function requirePerformanceNow() {
  if (hasRequiredPerformanceNow) return performanceNow$1.exports;
  hasRequiredPerformanceNow = 1;
  (function() {
    var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
    if (typeof performance !== "undefined" && performance !== null && performance.now) {
      performanceNow$1.exports = function() {
        return performance.now();
      };
    } else if (typeof process !== "undefined" && process !== null && process.hrtime) {
      performanceNow$1.exports = function() {
        return (getNanoSeconds() - nodeLoadTime) / 1e6;
      };
      hrtime = process.hrtime;
      getNanoSeconds = function() {
        var hr;
        hr = hrtime();
        return hr[0] * 1e9 + hr[1];
      };
      moduleLoadTime = getNanoSeconds();
      upTime = process.uptime() * 1e9;
      nodeLoadTime = moduleLoadTime - upTime;
    } else if (Date.now) {
      performanceNow$1.exports = function() {
        return Date.now() - loadTime;
      };
      loadTime = Date.now();
    } else {
      performanceNow$1.exports = function() {
        return (/* @__PURE__ */ new Date()).getTime() - loadTime;
      };
      loadTime = (/* @__PURE__ */ new Date()).getTime();
    }
  }).call(performanceNow);
  return performanceNow$1.exports;
}
var hasRequiredRaf;
function requireRaf() {
  if (hasRequiredRaf) return raf.exports;
  hasRequiredRaf = 1;
  var now = requirePerformanceNow(), root = typeof window === "undefined" ? commonjsGlobal : window, vendors = ["moz", "webkit"], suffix = "AnimationFrame", raf$1 = root["request" + suffix], caf = root["cancel" + suffix] || root["cancelRequest" + suffix];
  for (var i = 0; !raf$1 && i < vendors.length; i++) {
    raf$1 = root[vendors[i] + "Request" + suffix];
    caf = root[vendors[i] + "Cancel" + suffix] || root[vendors[i] + "CancelRequest" + suffix];
  }
  if (!raf$1 || !caf) {
    var last = 0, id = 0, queue = [], frameDuration = 1e3 / 60;
    raf$1 = function(callback) {
      if (queue.length === 0) {
        var _now = now(), next2 = Math.max(0, frameDuration - (_now - last));
        last = next2 + _now;
        setTimeout(function() {
          var cp = queue.slice(0);
          queue.length = 0;
          for (var i2 = 0; i2 < cp.length; i2++) {
            if (!cp[i2].cancelled) {
              try {
                cp[i2].callback(last);
              } catch (e2) {
                setTimeout(function() {
                  throw e2;
                }, 0);
              }
            }
          }
        }, Math.round(next2));
      }
      queue.push({
        handle: ++id,
        callback,
        cancelled: false
      });
      return id;
    };
    caf = function(handle) {
      for (var i2 = 0; i2 < queue.length; i2++) {
        if (queue[i2].handle === handle) {
          queue[i2].cancelled = true;
        }
      }
    };
  }
  raf.exports = function(fn2) {
    return raf$1.call(root, fn2);
  };
  raf.exports.cancel = function() {
    caf.apply(root, arguments);
  };
  raf.exports.polyfill = function(object) {
    if (!object) {
      object = root;
    }
    object.requestAnimationFrame = raf$1;
    object.cancelAnimationFrame = caf;
  };
  return raf.exports;
}
var domCss = { exports: {} };
var prefixStyle;
var hasRequiredPrefixStyle;
function requirePrefixStyle() {
  if (hasRequiredPrefixStyle) return prefixStyle;
  hasRequiredPrefixStyle = 1;
  var div = null;
  var prefixes = ["Webkit", "Moz", "O", "ms"];
  prefixStyle = function prefixStyle2(prop) {
    if (!div) {
      div = document.createElement("div");
    }
    var style2 = div.style;
    if (prop in style2) {
      return prop;
    }
    var titleCase = prop.charAt(0).toUpperCase() + prop.slice(1);
    for (var i = prefixes.length; i >= 0; i--) {
      var name = prefixes[i] + titleCase;
      if (name in style2) {
        return name;
      }
    }
    return false;
  };
  return prefixStyle;
}
var toNoCase_1;
var hasRequiredToNoCase;
function requireToNoCase() {
  if (hasRequiredToNoCase) return toNoCase_1;
  hasRequiredToNoCase = 1;
  toNoCase_1 = toNoCase;
  var hasSpace = /\s/;
  var hasSeparator = /(_|-|\.|:)/;
  var hasCamel = /([a-z][A-Z]|[A-Z][a-z])/;
  function toNoCase(string) {
    if (hasSpace.test(string)) return string.toLowerCase();
    if (hasSeparator.test(string)) return (unseparate(string) || string).toLowerCase();
    if (hasCamel.test(string)) return uncamelize(string).toLowerCase();
    return string.toLowerCase();
  }
  var separatorSplitter = /[\W_]+(.|$)/g;
  function unseparate(string) {
    return string.replace(separatorSplitter, function(m2, next2) {
      return next2 ? " " + next2 : "";
    });
  }
  var camelSplitter = /(.)([A-Z]+)/g;
  function uncamelize(string) {
    return string.replace(camelSplitter, function(m2, previous, uppers) {
      return previous + " " + uppers.toLowerCase().split("").join(" ");
    });
  }
  return toNoCase_1;
}
var toSpaceCase_1;
var hasRequiredToSpaceCase;
function requireToSpaceCase() {
  if (hasRequiredToSpaceCase) return toSpaceCase_1;
  hasRequiredToSpaceCase = 1;
  var clean = requireToNoCase();
  toSpaceCase_1 = toSpaceCase;
  function toSpaceCase(string) {
    return clean(string).replace(/[\W_]+(.|$)/g, function(matches, match2) {
      return match2 ? " " + match2 : "";
    }).trim();
  }
  return toSpaceCase_1;
}
var toCamelCase_1;
var hasRequiredToCamelCase;
function requireToCamelCase() {
  if (hasRequiredToCamelCase) return toCamelCase_1;
  hasRequiredToCamelCase = 1;
  var space = requireToSpaceCase();
  toCamelCase_1 = toCamelCase2;
  function toCamelCase2(string) {
    return space(string).replace(/\s(\w)/g, function(matches, letter) {
      return letter.toUpperCase();
    });
  }
  return toCamelCase_1;
}
var addPxToStyle;
var hasRequiredAddPxToStyle;
function requireAddPxToStyle() {
  if (hasRequiredAddPxToStyle) return addPxToStyle;
  hasRequiredAddPxToStyle = 1;
  var IS_UNITLESS = {
    animationIterationCount: true,
    boxFlex: true,
    boxFlexGroup: true,
    boxOrdinalGroup: true,
    columnCount: true,
    flex: true,
    flexGrow: true,
    flexPositive: true,
    flexShrink: true,
    flexNegative: true,
    flexOrder: true,
    gridRow: true,
    gridColumn: true,
    fontWeight: true,
    lineClamp: true,
    lineHeight: true,
    opacity: true,
    order: true,
    orphans: true,
    tabSize: true,
    widows: true,
    zIndex: true,
    zoom: true,
    // SVG-related properties
    fillOpacity: true,
    stopOpacity: true,
    strokeDashoffset: true,
    strokeOpacity: true,
    strokeWidth: true
  };
  addPxToStyle = function(name, value) {
    if (typeof value === "number" && !IS_UNITLESS[name]) {
      return value + "px";
    } else {
      return value;
    }
  };
  return addPxToStyle;
}
var hasRequiredDomCss;
function requireDomCss() {
  if (hasRequiredDomCss) return domCss.exports;
  hasRequiredDomCss = 1;
  var prefix2 = requirePrefixStyle();
  var toCamelCase2 = requireToCamelCase();
  var cache2 = { "float": "cssFloat" };
  var addPxToStyle2 = requireAddPxToStyle();
  function style2(element, property, value) {
    var camel = cache2[property];
    if (typeof camel === "undefined") {
      camel = detect(property);
    }
    if (camel) {
      if (value === void 0) {
        return element.style[camel];
      }
      element.style[camel] = addPxToStyle2(camel, value);
    }
  }
  function each(element, properties2) {
    for (var k2 in properties2) {
      if (properties2.hasOwnProperty(k2)) {
        style2(element, k2, properties2[k2]);
      }
    }
  }
  function detect(cssProp) {
    var camel = toCamelCase2(cssProp);
    var result = prefix2(camel);
    cache2[camel] = cache2[cssProp] = cache2[result] = result;
    return result;
  }
  function set2() {
    if (arguments.length === 2) {
      if (typeof arguments[1] === "string") {
        arguments[0].style.cssText = arguments[1];
      } else {
        each(arguments[0], arguments[1]);
      }
    } else {
      style2(arguments[0], arguments[1], arguments[2]);
    }
  }
  domCss.exports = set2;
  domCss.exports.set = set2;
  domCss.exports.get = function(element, properties2) {
    if (Array.isArray(properties2)) {
      return properties2.reduce(function(obj2, prop) {
        obj2[prop] = style2(element, prop || "");
        return obj2;
      }, {});
    } else {
      return style2(element, properties2 || "");
    }
  };
  return domCss.exports;
}
var isString = {};
var hasRequiredIsString;
function requireIsString() {
  if (hasRequiredIsString) return isString;
  hasRequiredIsString = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    exports2["default"] = isString2;
    function isString2(maybe) {
      return typeof maybe === "string";
    }
  })(isString);
  return isString;
}
var getScrollbarWidth = {};
var hasRequiredGetScrollbarWidth;
function requireGetScrollbarWidth() {
  if (hasRequiredGetScrollbarWidth) return getScrollbarWidth;
  hasRequiredGetScrollbarWidth = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    exports2["default"] = getScrollbarWidth2;
    var _domCss = requireDomCss();
    var _domCss2 = _interopRequireDefault(_domCss);
    function _interopRequireDefault(obj2) {
      return obj2 && obj2.__esModule ? obj2 : { "default": obj2 };
    }
    var scrollbarWidth = false;
    function getScrollbarWidth2() {
      var cacheEnabled = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : true;
      if (cacheEnabled && scrollbarWidth !== false) return scrollbarWidth;
      if (typeof document !== "undefined") {
        var div = document.createElement("div");
        (0, _domCss2["default"])(div, {
          width: 100,
          height: 100,
          position: "absolute",
          top: -9999,
          overflow: "scroll",
          MsOverflowStyle: "scrollbar"
        });
        document.body.appendChild(div);
        scrollbarWidth = div.offsetWidth - div.clientWidth;
        document.body.removeChild(div);
      } else {
        scrollbarWidth = 0;
      }
      return scrollbarWidth || 0;
    }
  })(getScrollbarWidth);
  return getScrollbarWidth;
}
var returnFalse = {};
var hasRequiredReturnFalse;
function requireReturnFalse() {
  if (hasRequiredReturnFalse) return returnFalse;
  hasRequiredReturnFalse = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    exports2["default"] = returnFalse2;
    function returnFalse2() {
      return false;
    }
  })(returnFalse);
  return returnFalse;
}
var getInnerWidth = {};
var hasRequiredGetInnerWidth;
function requireGetInnerWidth() {
  if (hasRequiredGetInnerWidth) return getInnerWidth;
  hasRequiredGetInnerWidth = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    exports2["default"] = getInnerWidth2;
    function getInnerWidth2(el) {
      var clientWidth = el.clientWidth;
      var _getComputedStyle = getComputedStyle(el), paddingLeft2 = _getComputedStyle.paddingLeft, paddingRight2 = _getComputedStyle.paddingRight;
      return clientWidth - parseFloat(paddingLeft2) - parseFloat(paddingRight2);
    }
  })(getInnerWidth);
  return getInnerWidth;
}
var getInnerHeight = {};
var hasRequiredGetInnerHeight;
function requireGetInnerHeight() {
  if (hasRequiredGetInnerHeight) return getInnerHeight;
  hasRequiredGetInnerHeight = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    exports2["default"] = getInnerHeight2;
    function getInnerHeight2(el) {
      var clientHeight = el.clientHeight;
      var _getComputedStyle = getComputedStyle(el), paddingTop2 = _getComputedStyle.paddingTop, paddingBottom2 = _getComputedStyle.paddingBottom;
      return clientHeight - parseFloat(paddingTop2) - parseFloat(paddingBottom2);
    }
  })(getInnerHeight);
  return getInnerHeight;
}
var styles$5 = {};
var hasRequiredStyles;
function requireStyles() {
  if (hasRequiredStyles) return styles$5;
  hasRequiredStyles = 1;
  Object.defineProperty(styles$5, "__esModule", {
    value: true
  });
  styles$5.containerStyleDefault = {
    position: "relative",
    overflow: "hidden",
    width: "100%",
    height: "100%"
  };
  styles$5.containerStyleAutoHeight = {
    height: "auto"
  };
  styles$5.viewStyleDefault = {
    position: "absolute",
    top: 0,
    left: 0,
    right: 0,
    bottom: 0,
    overflow: "scroll",
    WebkitOverflowScrolling: "touch"
  };
  styles$5.viewStyleAutoHeight = {
    position: "relative",
    top: void 0,
    left: void 0,
    right: void 0,
    bottom: void 0
  };
  styles$5.viewStyleUniversalInitial = {
    overflow: "hidden",
    marginRight: 0,
    marginBottom: 0
  };
  styles$5.trackHorizontalStyleDefault = {
    position: "absolute",
    height: 6
  };
  styles$5.trackVerticalStyleDefault = {
    position: "absolute",
    width: 6
  };
  styles$5.thumbHorizontalStyleDefault = {
    position: "relative",
    display: "block",
    height: "100%"
  };
  styles$5.thumbVerticalStyleDefault = {
    position: "relative",
    display: "block",
    width: "100%"
  };
  styles$5.disableSelectStyle = {
    userSelect: "none"
  };
  styles$5.disableSelectStyleReset = {
    userSelect: ""
  };
  return styles$5;
}
var defaultRenderElements = {};
var hasRequiredDefaultRenderElements;
function requireDefaultRenderElements() {
  if (hasRequiredDefaultRenderElements) return defaultRenderElements;
  hasRequiredDefaultRenderElements = 1;
  Object.defineProperty(defaultRenderElements, "__esModule", {
    value: true
  });
  var _extends2 = Object.assign || function(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i];
      for (var key in source) {
        if (Object.prototype.hasOwnProperty.call(source, key)) {
          target[key] = source[key];
        }
      }
    }
    return target;
  };
  defaultRenderElements.renderViewDefault = renderViewDefault;
  defaultRenderElements.renderTrackHorizontalDefault = renderTrackHorizontalDefault;
  defaultRenderElements.renderTrackVerticalDefault = renderTrackVerticalDefault;
  defaultRenderElements.renderThumbHorizontalDefault = renderThumbHorizontalDefault;
  defaultRenderElements.renderThumbVerticalDefault = renderThumbVerticalDefault;
  var _react = requireReact();
  var _react2 = _interopRequireDefault(_react);
  function _interopRequireDefault(obj2) {
    return obj2 && obj2.__esModule ? obj2 : { "default": obj2 };
  }
  function _objectWithoutProperties(obj2, keys) {
    var target = {};
    for (var i in obj2) {
      if (keys.indexOf(i) >= 0) continue;
      if (!Object.prototype.hasOwnProperty.call(obj2, i)) continue;
      target[i] = obj2[i];
    }
    return target;
  }
  function renderViewDefault(props) {
    return _react2["default"].createElement("div", props);
  }
  function renderTrackHorizontalDefault(_ref) {
    var style2 = _ref.style, props = _objectWithoutProperties(_ref, ["style"]);
    var finalStyle = _extends2({}, style2, {
      right: 2,
      bottom: 2,
      left: 2,
      borderRadius: 3
    });
    return _react2["default"].createElement("div", _extends2({ style: finalStyle }, props));
  }
  function renderTrackVerticalDefault(_ref2) {
    var style2 = _ref2.style, props = _objectWithoutProperties(_ref2, ["style"]);
    var finalStyle = _extends2({}, style2, {
      right: 2,
      bottom: 2,
      top: 2,
      borderRadius: 3
    });
    return _react2["default"].createElement("div", _extends2({ style: finalStyle }, props));
  }
  function renderThumbHorizontalDefault(_ref3) {
    var style2 = _ref3.style, props = _objectWithoutProperties(_ref3, ["style"]);
    var finalStyle = _extends2({}, style2, {
      cursor: "pointer",
      borderRadius: "inherit",
      backgroundColor: "rgba(0,0,0,.2)"
    });
    return _react2["default"].createElement("div", _extends2({ style: finalStyle }, props));
  }
  function renderThumbVerticalDefault(_ref4) {
    var style2 = _ref4.style, props = _objectWithoutProperties(_ref4, ["style"]);
    var finalStyle = _extends2({}, style2, {
      cursor: "pointer",
      borderRadius: "inherit",
      backgroundColor: "rgba(0,0,0,.2)"
    });
    return _react2["default"].createElement("div", _extends2({ style: finalStyle }, props));
  }
  return defaultRenderElements;
}
var hasRequiredScrollbars;
function requireScrollbars() {
  if (hasRequiredScrollbars) return Scrollbars$1;
  hasRequiredScrollbars = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    var _extends2 = Object.assign || function(target) {
      for (var i = 1; i < arguments.length; i++) {
        var source = arguments[i];
        for (var key in source) {
          if (Object.prototype.hasOwnProperty.call(source, key)) {
            target[key] = source[key];
          }
        }
      }
      return target;
    };
    var _createClass = /* @__PURE__ */ function() {
      function defineProperties(target, props) {
        for (var i = 0; i < props.length; i++) {
          var descriptor = props[i];
          descriptor.enumerable = descriptor.enumerable || false;
          descriptor.configurable = true;
          if ("value" in descriptor) descriptor.writable = true;
          Object.defineProperty(target, descriptor.key, descriptor);
        }
      }
      return function(Constructor, protoProps, staticProps) {
        if (protoProps) defineProperties(Constructor.prototype, protoProps);
        if (staticProps) defineProperties(Constructor, staticProps);
        return Constructor;
      };
    }();
    var _raf2 = requireRaf();
    var _raf3 = _interopRequireDefault(_raf2);
    var _domCss = requireDomCss();
    var _domCss2 = _interopRequireDefault(_domCss);
    var _react = requireReact();
    var _propTypes = /* @__PURE__ */ requirePropTypes();
    var _propTypes2 = _interopRequireDefault(_propTypes);
    var _isString = requireIsString();
    var _isString2 = _interopRequireDefault(_isString);
    var _getScrollbarWidth = requireGetScrollbarWidth();
    var _getScrollbarWidth2 = _interopRequireDefault(_getScrollbarWidth);
    var _returnFalse = requireReturnFalse();
    var _returnFalse2 = _interopRequireDefault(_returnFalse);
    var _getInnerWidth = requireGetInnerWidth();
    var _getInnerWidth2 = _interopRequireDefault(_getInnerWidth);
    var _getInnerHeight = requireGetInnerHeight();
    var _getInnerHeight2 = _interopRequireDefault(_getInnerHeight);
    var _styles = requireStyles();
    var _defaultRenderElements = requireDefaultRenderElements();
    function _interopRequireDefault(obj2) {
      return obj2 && obj2.__esModule ? obj2 : { "default": obj2 };
    }
    function _objectWithoutProperties(obj2, keys) {
      var target = {};
      for (var i in obj2) {
        if (keys.indexOf(i) >= 0) continue;
        if (!Object.prototype.hasOwnProperty.call(obj2, i)) continue;
        target[i] = obj2[i];
      }
      return target;
    }
    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }
    function _possibleConstructorReturn(self2, call) {
      if (!self2) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }
      return call && (typeof call === "object" || typeof call === "function") ? call : self2;
    }
    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
      }
      subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } });
      if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
    }
    var Scrollbars2 = function(_Component) {
      _inherits(Scrollbars3, _Component);
      function Scrollbars3(props) {
        var _ref;
        _classCallCheck(this, Scrollbars3);
        for (var _len = arguments.length, rest = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
          rest[_key - 1] = arguments[_key];
        }
        var _this = _possibleConstructorReturn(this, (_ref = Scrollbars3.__proto__ || Object.getPrototypeOf(Scrollbars3)).call.apply(_ref, [this, props].concat(rest)));
        _this.getScrollLeft = _this.getScrollLeft.bind(_this);
        _this.getScrollTop = _this.getScrollTop.bind(_this);
        _this.getScrollWidth = _this.getScrollWidth.bind(_this);
        _this.getScrollHeight = _this.getScrollHeight.bind(_this);
        _this.getClientWidth = _this.getClientWidth.bind(_this);
        _this.getClientHeight = _this.getClientHeight.bind(_this);
        _this.getValues = _this.getValues.bind(_this);
        _this.getThumbHorizontalWidth = _this.getThumbHorizontalWidth.bind(_this);
        _this.getThumbVerticalHeight = _this.getThumbVerticalHeight.bind(_this);
        _this.getScrollLeftForOffset = _this.getScrollLeftForOffset.bind(_this);
        _this.getScrollTopForOffset = _this.getScrollTopForOffset.bind(_this);
        _this.scrollLeft = _this.scrollLeft.bind(_this);
        _this.scrollTop = _this.scrollTop.bind(_this);
        _this.scrollToLeft = _this.scrollToLeft.bind(_this);
        _this.scrollToTop = _this.scrollToTop.bind(_this);
        _this.scrollToRight = _this.scrollToRight.bind(_this);
        _this.scrollToBottom = _this.scrollToBottom.bind(_this);
        _this.handleTrackMouseEnter = _this.handleTrackMouseEnter.bind(_this);
        _this.handleTrackMouseLeave = _this.handleTrackMouseLeave.bind(_this);
        _this.handleHorizontalTrackMouseDown = _this.handleHorizontalTrackMouseDown.bind(_this);
        _this.handleVerticalTrackMouseDown = _this.handleVerticalTrackMouseDown.bind(_this);
        _this.handleHorizontalThumbMouseDown = _this.handleHorizontalThumbMouseDown.bind(_this);
        _this.handleVerticalThumbMouseDown = _this.handleVerticalThumbMouseDown.bind(_this);
        _this.handleWindowResize = _this.handleWindowResize.bind(_this);
        _this.handleScroll = _this.handleScroll.bind(_this);
        _this.handleDrag = _this.handleDrag.bind(_this);
        _this.handleDragEnd = _this.handleDragEnd.bind(_this);
        _this.state = {
          didMountUniversal: false
        };
        return _this;
      }
      _createClass(Scrollbars3, [{
        key: "componentDidMount",
        value: function componentDidMount() {
          this.addListeners();
          this.update();
          this.componentDidMountUniversal();
        }
      }, {
        key: "componentDidMountUniversal",
        value: function componentDidMountUniversal() {
          var universal = this.props.universal;
          if (!universal) return;
          this.setState({ didMountUniversal: true });
        }
      }, {
        key: "componentDidUpdate",
        value: function componentDidUpdate() {
          this.update();
        }
      }, {
        key: "componentWillUnmount",
        value: function componentWillUnmount() {
          this.removeListeners();
          (0, _raf2.cancel)(this.requestFrame);
          clearTimeout(this.hideTracksTimeout);
          clearInterval(this.detectScrollingInterval);
        }
      }, {
        key: "getScrollLeft",
        value: function getScrollLeft() {
          if (!this.view) return 0;
          return this.view.scrollLeft;
        }
      }, {
        key: "getScrollTop",
        value: function getScrollTop() {
          if (!this.view) return 0;
          return this.view.scrollTop;
        }
      }, {
        key: "getScrollWidth",
        value: function getScrollWidth() {
          if (!this.view) return 0;
          return this.view.scrollWidth;
        }
      }, {
        key: "getScrollHeight",
        value: function getScrollHeight() {
          if (!this.view) return 0;
          return this.view.scrollHeight;
        }
      }, {
        key: "getClientWidth",
        value: function getClientWidth() {
          if (!this.view) return 0;
          return this.view.clientWidth;
        }
      }, {
        key: "getClientHeight",
        value: function getClientHeight() {
          if (!this.view) return 0;
          return this.view.clientHeight;
        }
      }, {
        key: "getValues",
        value: function getValues2() {
          var _ref2 = this.view || {}, _ref2$scrollLeft = _ref2.scrollLeft, scrollLeft = _ref2$scrollLeft === void 0 ? 0 : _ref2$scrollLeft, _ref2$scrollTop = _ref2.scrollTop, scrollTop = _ref2$scrollTop === void 0 ? 0 : _ref2$scrollTop, _ref2$scrollWidth = _ref2.scrollWidth, scrollWidth = _ref2$scrollWidth === void 0 ? 0 : _ref2$scrollWidth, _ref2$scrollHeight = _ref2.scrollHeight, scrollHeight = _ref2$scrollHeight === void 0 ? 0 : _ref2$scrollHeight, _ref2$clientWidth = _ref2.clientWidth, clientWidth = _ref2$clientWidth === void 0 ? 0 : _ref2$clientWidth, _ref2$clientHeight = _ref2.clientHeight, clientHeight = _ref2$clientHeight === void 0 ? 0 : _ref2$clientHeight;
          return {
            left: scrollLeft / (scrollWidth - clientWidth) || 0,
            top: scrollTop / (scrollHeight - clientHeight) || 0,
            scrollLeft,
            scrollTop,
            scrollWidth,
            scrollHeight,
            clientWidth,
            clientHeight
          };
        }
      }, {
        key: "getThumbHorizontalWidth",
        value: function getThumbHorizontalWidth() {
          var _props = this.props, thumbSize = _props.thumbSize, thumbMinSize = _props.thumbMinSize;
          var _view = this.view, scrollWidth = _view.scrollWidth, clientWidth = _view.clientWidth;
          var trackWidth = (0, _getInnerWidth2["default"])(this.trackHorizontal);
          var width2 = Math.ceil(clientWidth / scrollWidth * trackWidth);
          if (trackWidth <= width2) return 0;
          if (thumbSize) return thumbSize;
          return Math.max(width2, thumbMinSize);
        }
      }, {
        key: "getThumbVerticalHeight",
        value: function getThumbVerticalHeight() {
          var _props2 = this.props, thumbSize = _props2.thumbSize, thumbMinSize = _props2.thumbMinSize;
          var _view2 = this.view, scrollHeight = _view2.scrollHeight, clientHeight = _view2.clientHeight;
          var trackHeight = (0, _getInnerHeight2["default"])(this.trackVertical);
          var height2 = Math.ceil(clientHeight / scrollHeight * trackHeight);
          if (trackHeight <= height2) return 0;
          if (thumbSize) return thumbSize;
          return Math.max(height2, thumbMinSize);
        }
      }, {
        key: "getScrollLeftForOffset",
        value: function getScrollLeftForOffset(offset2) {
          var _view3 = this.view, scrollWidth = _view3.scrollWidth, clientWidth = _view3.clientWidth;
          var trackWidth = (0, _getInnerWidth2["default"])(this.trackHorizontal);
          var thumbWidth = this.getThumbHorizontalWidth();
          return offset2 / (trackWidth - thumbWidth) * (scrollWidth - clientWidth);
        }
      }, {
        key: "getScrollTopForOffset",
        value: function getScrollTopForOffset(offset2) {
          var _view4 = this.view, scrollHeight = _view4.scrollHeight, clientHeight = _view4.clientHeight;
          var trackHeight = (0, _getInnerHeight2["default"])(this.trackVertical);
          var thumbHeight = this.getThumbVerticalHeight();
          return offset2 / (trackHeight - thumbHeight) * (scrollHeight - clientHeight);
        }
      }, {
        key: "scrollLeft",
        value: function scrollLeft() {
          var left2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
          if (!this.view) return;
          this.view.scrollLeft = left2;
        }
      }, {
        key: "scrollTop",
        value: function scrollTop() {
          var top2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
          if (!this.view) return;
          this.view.scrollTop = top2;
        }
      }, {
        key: "scrollToLeft",
        value: function scrollToLeft() {
          if (!this.view) return;
          this.view.scrollLeft = 0;
        }
      }, {
        key: "scrollToTop",
        value: function scrollToTop() {
          if (!this.view) return;
          this.view.scrollTop = 0;
        }
      }, {
        key: "scrollToRight",
        value: function scrollToRight() {
          if (!this.view) return;
          this.view.scrollLeft = this.view.scrollWidth;
        }
      }, {
        key: "scrollToBottom",
        value: function scrollToBottom() {
          if (!this.view) return;
          this.view.scrollTop = this.view.scrollHeight;
        }
      }, {
        key: "addListeners",
        value: function addListeners() {
          if (typeof document === "undefined" || !this.view) return;
          var view = this.view, trackHorizontal = this.trackHorizontal, trackVertical = this.trackVertical, thumbHorizontal = this.thumbHorizontal, thumbVertical = this.thumbVertical;
          view.addEventListener("scroll", this.handleScroll);
          if (!(0, _getScrollbarWidth2["default"])()) return;
          trackHorizontal.addEventListener("mouseenter", this.handleTrackMouseEnter);
          trackHorizontal.addEventListener("mouseleave", this.handleTrackMouseLeave);
          trackHorizontal.addEventListener("mousedown", this.handleHorizontalTrackMouseDown);
          trackVertical.addEventListener("mouseenter", this.handleTrackMouseEnter);
          trackVertical.addEventListener("mouseleave", this.handleTrackMouseLeave);
          trackVertical.addEventListener("mousedown", this.handleVerticalTrackMouseDown);
          thumbHorizontal.addEventListener("mousedown", this.handleHorizontalThumbMouseDown);
          thumbVertical.addEventListener("mousedown", this.handleVerticalThumbMouseDown);
          window.addEventListener("resize", this.handleWindowResize);
        }
      }, {
        key: "removeListeners",
        value: function removeListeners() {
          if (typeof document === "undefined" || !this.view) return;
          var view = this.view, trackHorizontal = this.trackHorizontal, trackVertical = this.trackVertical, thumbHorizontal = this.thumbHorizontal, thumbVertical = this.thumbVertical;
          view.removeEventListener("scroll", this.handleScroll);
          if (!(0, _getScrollbarWidth2["default"])()) return;
          trackHorizontal.removeEventListener("mouseenter", this.handleTrackMouseEnter);
          trackHorizontal.removeEventListener("mouseleave", this.handleTrackMouseLeave);
          trackHorizontal.removeEventListener("mousedown", this.handleHorizontalTrackMouseDown);
          trackVertical.removeEventListener("mouseenter", this.handleTrackMouseEnter);
          trackVertical.removeEventListener("mouseleave", this.handleTrackMouseLeave);
          trackVertical.removeEventListener("mousedown", this.handleVerticalTrackMouseDown);
          thumbHorizontal.removeEventListener("mousedown", this.handleHorizontalThumbMouseDown);
          thumbVertical.removeEventListener("mousedown", this.handleVerticalThumbMouseDown);
          window.removeEventListener("resize", this.handleWindowResize);
          this.teardownDragging();
        }
      }, {
        key: "handleScroll",
        value: function handleScroll(event) {
          var _this2 = this;
          var _props3 = this.props, onScroll = _props3.onScroll, onScrollFrame = _props3.onScrollFrame;
          if (onScroll) onScroll(event);
          this.update(function(values2) {
            var scrollLeft = values2.scrollLeft, scrollTop = values2.scrollTop;
            _this2.viewScrollLeft = scrollLeft;
            _this2.viewScrollTop = scrollTop;
            if (onScrollFrame) onScrollFrame(values2);
          });
          this.detectScrolling();
        }
      }, {
        key: "handleScrollStart",
        value: function handleScrollStart() {
          var onScrollStart = this.props.onScrollStart;
          if (onScrollStart) onScrollStart();
          this.handleScrollStartAutoHide();
        }
      }, {
        key: "handleScrollStartAutoHide",
        value: function handleScrollStartAutoHide() {
          var autoHide = this.props.autoHide;
          if (!autoHide) return;
          this.showTracks();
        }
      }, {
        key: "handleScrollStop",
        value: function handleScrollStop() {
          var onScrollStop = this.props.onScrollStop;
          if (onScrollStop) onScrollStop();
          this.handleScrollStopAutoHide();
        }
      }, {
        key: "handleScrollStopAutoHide",
        value: function handleScrollStopAutoHide() {
          var autoHide = this.props.autoHide;
          if (!autoHide) return;
          this.hideTracks();
        }
      }, {
        key: "handleWindowResize",
        value: function handleWindowResize() {
          (0, _getScrollbarWidth2["default"])(false);
          this.forceUpdate();
        }
      }, {
        key: "handleHorizontalTrackMouseDown",
        value: function handleHorizontalTrackMouseDown(event) {
          event.preventDefault();
          var target = event.target, clientX = event.clientX;
          var _target$getBoundingCl = target.getBoundingClientRect(), targetLeft = _target$getBoundingCl.left;
          var thumbWidth = this.getThumbHorizontalWidth();
          var offset2 = Math.abs(targetLeft - clientX) - thumbWidth / 2;
          this.view.scrollLeft = this.getScrollLeftForOffset(offset2);
        }
      }, {
        key: "handleVerticalTrackMouseDown",
        value: function handleVerticalTrackMouseDown(event) {
          event.preventDefault();
          var target = event.target, clientY = event.clientY;
          var _target$getBoundingCl2 = target.getBoundingClientRect(), targetTop = _target$getBoundingCl2.top;
          var thumbHeight = this.getThumbVerticalHeight();
          var offset2 = Math.abs(targetTop - clientY) - thumbHeight / 2;
          this.view.scrollTop = this.getScrollTopForOffset(offset2);
        }
      }, {
        key: "handleHorizontalThumbMouseDown",
        value: function handleHorizontalThumbMouseDown(event) {
          event.preventDefault();
          this.handleDragStart(event);
          var target = event.target, clientX = event.clientX;
          var offsetWidth = target.offsetWidth;
          var _target$getBoundingCl3 = target.getBoundingClientRect(), left2 = _target$getBoundingCl3.left;
          this.prevPageX = offsetWidth - (clientX - left2);
        }
      }, {
        key: "handleVerticalThumbMouseDown",
        value: function handleVerticalThumbMouseDown(event) {
          event.preventDefault();
          this.handleDragStart(event);
          var target = event.target, clientY = event.clientY;
          var offsetHeight = target.offsetHeight;
          var _target$getBoundingCl4 = target.getBoundingClientRect(), top2 = _target$getBoundingCl4.top;
          this.prevPageY = offsetHeight - (clientY - top2);
        }
      }, {
        key: "setupDragging",
        value: function setupDragging() {
          (0, _domCss2["default"])(document.body, _styles.disableSelectStyle);
          document.addEventListener("mousemove", this.handleDrag);
          document.addEventListener("mouseup", this.handleDragEnd);
          document.onselectstart = _returnFalse2["default"];
        }
      }, {
        key: "teardownDragging",
        value: function teardownDragging() {
          (0, _domCss2["default"])(document.body, _styles.disableSelectStyleReset);
          document.removeEventListener("mousemove", this.handleDrag);
          document.removeEventListener("mouseup", this.handleDragEnd);
          document.onselectstart = void 0;
        }
      }, {
        key: "handleDragStart",
        value: function handleDragStart(event) {
          this.dragging = true;
          event.stopImmediatePropagation();
          this.setupDragging();
        }
      }, {
        key: "handleDrag",
        value: function handleDrag(event) {
          if (this.prevPageX) {
            var clientX = event.clientX;
            var _trackHorizontal$getB = this.trackHorizontal.getBoundingClientRect(), trackLeft = _trackHorizontal$getB.left;
            var thumbWidth = this.getThumbHorizontalWidth();
            var clickPosition = thumbWidth - this.prevPageX;
            var offset2 = -trackLeft + clientX - clickPosition;
            this.view.scrollLeft = this.getScrollLeftForOffset(offset2);
          }
          if (this.prevPageY) {
            var clientY = event.clientY;
            var _trackVertical$getBou = this.trackVertical.getBoundingClientRect(), trackTop = _trackVertical$getBou.top;
            var thumbHeight = this.getThumbVerticalHeight();
            var _clickPosition = thumbHeight - this.prevPageY;
            var _offset = -trackTop + clientY - _clickPosition;
            this.view.scrollTop = this.getScrollTopForOffset(_offset);
          }
          return false;
        }
      }, {
        key: "handleDragEnd",
        value: function handleDragEnd() {
          this.dragging = false;
          this.prevPageX = this.prevPageY = 0;
          this.teardownDragging();
          this.handleDragEndAutoHide();
        }
      }, {
        key: "handleDragEndAutoHide",
        value: function handleDragEndAutoHide() {
          var autoHide = this.props.autoHide;
          if (!autoHide) return;
          this.hideTracks();
        }
      }, {
        key: "handleTrackMouseEnter",
        value: function handleTrackMouseEnter() {
          this.trackMouseOver = true;
          this.handleTrackMouseEnterAutoHide();
        }
      }, {
        key: "handleTrackMouseEnterAutoHide",
        value: function handleTrackMouseEnterAutoHide() {
          var autoHide = this.props.autoHide;
          if (!autoHide) return;
          this.showTracks();
        }
      }, {
        key: "handleTrackMouseLeave",
        value: function handleTrackMouseLeave() {
          this.trackMouseOver = false;
          this.handleTrackMouseLeaveAutoHide();
        }
      }, {
        key: "handleTrackMouseLeaveAutoHide",
        value: function handleTrackMouseLeaveAutoHide() {
          var autoHide = this.props.autoHide;
          if (!autoHide) return;
          this.hideTracks();
        }
      }, {
        key: "showTracks",
        value: function showTracks() {
          clearTimeout(this.hideTracksTimeout);
          (0, _domCss2["default"])(this.trackHorizontal, { opacity: 1 });
          (0, _domCss2["default"])(this.trackVertical, { opacity: 1 });
        }
      }, {
        key: "hideTracks",
        value: function hideTracks() {
          var _this3 = this;
          if (this.dragging) return;
          if (this.scrolling) return;
          if (this.trackMouseOver) return;
          var autoHideTimeout = this.props.autoHideTimeout;
          clearTimeout(this.hideTracksTimeout);
          this.hideTracksTimeout = setTimeout(function() {
            (0, _domCss2["default"])(_this3.trackHorizontal, { opacity: 0 });
            (0, _domCss2["default"])(_this3.trackVertical, { opacity: 0 });
          }, autoHideTimeout);
        }
      }, {
        key: "detectScrolling",
        value: function detectScrolling() {
          var _this4 = this;
          if (this.scrolling) return;
          this.scrolling = true;
          this.handleScrollStart();
          this.detectScrollingInterval = setInterval(function() {
            if (_this4.lastViewScrollLeft === _this4.viewScrollLeft && _this4.lastViewScrollTop === _this4.viewScrollTop) {
              clearInterval(_this4.detectScrollingInterval);
              _this4.scrolling = false;
              _this4.handleScrollStop();
            }
            _this4.lastViewScrollLeft = _this4.viewScrollLeft;
            _this4.lastViewScrollTop = _this4.viewScrollTop;
          }, 100);
        }
      }, {
        key: "raf",
        value: function raf2(callback) {
          var _this5 = this;
          if (this.requestFrame) _raf3["default"].cancel(this.requestFrame);
          this.requestFrame = (0, _raf3["default"])(function() {
            _this5.requestFrame = void 0;
            callback();
          });
        }
      }, {
        key: "update",
        value: function update(callback) {
          var _this6 = this;
          this.raf(function() {
            return _this6._update(callback);
          });
        }
      }, {
        key: "_update",
        value: function _update(callback) {
          var _props4 = this.props, onUpdate = _props4.onUpdate, hideTracksWhenNotNeeded = _props4.hideTracksWhenNotNeeded;
          var values2 = this.getValues();
          if ((0, _getScrollbarWidth2["default"])()) {
            var scrollLeft = values2.scrollLeft, clientWidth = values2.clientWidth, scrollWidth = values2.scrollWidth;
            var trackHorizontalWidth = (0, _getInnerWidth2["default"])(this.trackHorizontal);
            var thumbHorizontalWidth = this.getThumbHorizontalWidth();
            var thumbHorizontalX = scrollLeft / (scrollWidth - clientWidth) * (trackHorizontalWidth - thumbHorizontalWidth);
            var thumbHorizontalStyle = {
              width: thumbHorizontalWidth,
              transform: "translateX(" + thumbHorizontalX + "px)"
            };
            var scrollTop = values2.scrollTop, clientHeight = values2.clientHeight, scrollHeight = values2.scrollHeight;
            var trackVerticalHeight = (0, _getInnerHeight2["default"])(this.trackVertical);
            var thumbVerticalHeight = this.getThumbVerticalHeight();
            var thumbVerticalY = scrollTop / (scrollHeight - clientHeight) * (trackVerticalHeight - thumbVerticalHeight);
            var thumbVerticalStyle = {
              height: thumbVerticalHeight,
              transform: "translateY(" + thumbVerticalY + "px)"
            };
            if (hideTracksWhenNotNeeded) {
              var trackHorizontalStyle = {
                visibility: scrollWidth > clientWidth ? "visible" : "hidden"
              };
              var trackVerticalStyle = {
                visibility: scrollHeight > clientHeight ? "visible" : "hidden"
              };
              (0, _domCss2["default"])(this.trackHorizontal, trackHorizontalStyle);
              (0, _domCss2["default"])(this.trackVertical, trackVerticalStyle);
            }
            (0, _domCss2["default"])(this.thumbHorizontal, thumbHorizontalStyle);
            (0, _domCss2["default"])(this.thumbVertical, thumbVerticalStyle);
          }
          if (onUpdate) onUpdate(values2);
          if (typeof callback !== "function") return;
          callback(values2);
        }
      }, {
        key: "render",
        value: function render() {
          var _this7 = this;
          var scrollbarWidth = (0, _getScrollbarWidth2["default"])();
          var _props5 = this.props;
          _props5.onScroll;
          _props5.onScrollFrame;
          _props5.onScrollStart;
          _props5.onScrollStop;
          _props5.onUpdate;
          var renderView = _props5.renderView, renderTrackHorizontal = _props5.renderTrackHorizontal, renderTrackVertical = _props5.renderTrackVertical, renderThumbHorizontal = _props5.renderThumbHorizontal, renderThumbVertical = _props5.renderThumbVertical, tagName = _props5.tagName;
          _props5.hideTracksWhenNotNeeded;
          var autoHide = _props5.autoHide;
          _props5.autoHideTimeout;
          var autoHideDuration = _props5.autoHideDuration;
          _props5.thumbSize;
          _props5.thumbMinSize;
          var universal = _props5.universal, autoHeight = _props5.autoHeight, autoHeightMin = _props5.autoHeightMin, autoHeightMax = _props5.autoHeightMax, style2 = _props5.style, children = _props5.children, props = _objectWithoutProperties(_props5, ["onScroll", "onScrollFrame", "onScrollStart", "onScrollStop", "onUpdate", "renderView", "renderTrackHorizontal", "renderTrackVertical", "renderThumbHorizontal", "renderThumbVertical", "tagName", "hideTracksWhenNotNeeded", "autoHide", "autoHideTimeout", "autoHideDuration", "thumbSize", "thumbMinSize", "universal", "autoHeight", "autoHeightMin", "autoHeightMax", "style", "children"]);
          var didMountUniversal = this.state.didMountUniversal;
          var containerStyle = _extends2({}, _styles.containerStyleDefault, autoHeight && _extends2({}, _styles.containerStyleAutoHeight, {
            minHeight: autoHeightMin,
            maxHeight: autoHeightMax
          }), style2);
          var viewStyle = _extends2({}, _styles.viewStyleDefault, {
            // Hide scrollbars by setting a negative margin
            marginRight: scrollbarWidth ? -scrollbarWidth : 0,
            marginBottom: scrollbarWidth ? -scrollbarWidth : 0
          }, autoHeight && _extends2({}, _styles.viewStyleAutoHeight, {
            // Add scrollbarWidth to autoHeight in order to compensate negative margins
            minHeight: (0, _isString2["default"])(autoHeightMin) ? "calc(" + autoHeightMin + " + " + scrollbarWidth + "px)" : autoHeightMin + scrollbarWidth,
            maxHeight: (0, _isString2["default"])(autoHeightMax) ? "calc(" + autoHeightMax + " + " + scrollbarWidth + "px)" : autoHeightMax + scrollbarWidth
          }), autoHeight && universal && !didMountUniversal && {
            minHeight: autoHeightMin,
            maxHeight: autoHeightMax
          }, universal && !didMountUniversal && _styles.viewStyleUniversalInitial);
          var trackAutoHeightStyle = {
            transition: "opacity " + autoHideDuration + "ms",
            opacity: 0
          };
          var trackHorizontalStyle = _extends2({}, _styles.trackHorizontalStyleDefault, autoHide && trackAutoHeightStyle, (!scrollbarWidth || universal && !didMountUniversal) && {
            display: "none"
          });
          var trackVerticalStyle = _extends2({}, _styles.trackVerticalStyleDefault, autoHide && trackAutoHeightStyle, (!scrollbarWidth || universal && !didMountUniversal) && {
            display: "none"
          });
          return (0, _react.createElement)(tagName, _extends2({}, props, { style: containerStyle, ref: function ref2(_ref3) {
            _this7.container = _ref3;
          } }), [(0, _react.cloneElement)(renderView({ style: viewStyle }), { key: "view", ref: function ref2(_ref4) {
            _this7.view = _ref4;
          } }, children), (0, _react.cloneElement)(renderTrackHorizontal({ style: trackHorizontalStyle }), { key: "trackHorizontal", ref: function ref2(_ref5) {
            _this7.trackHorizontal = _ref5;
          } }, (0, _react.cloneElement)(renderThumbHorizontal({ style: _styles.thumbHorizontalStyleDefault }), { ref: function ref2(_ref6) {
            _this7.thumbHorizontal = _ref6;
          } })), (0, _react.cloneElement)(renderTrackVertical({ style: trackVerticalStyle }), { key: "trackVertical", ref: function ref2(_ref7) {
            _this7.trackVertical = _ref7;
          } }, (0, _react.cloneElement)(renderThumbVertical({ style: _styles.thumbVerticalStyleDefault }), { ref: function ref2(_ref8) {
            _this7.thumbVertical = _ref8;
          } }))]);
        }
      }]);
      return Scrollbars3;
    }(_react.Component);
    exports2["default"] = Scrollbars2;
    Scrollbars2.propTypes = {
      onScroll: _propTypes2["default"].func,
      onScrollFrame: _propTypes2["default"].func,
      onScrollStart: _propTypes2["default"].func,
      onScrollStop: _propTypes2["default"].func,
      onUpdate: _propTypes2["default"].func,
      renderView: _propTypes2["default"].func,
      renderTrackHorizontal: _propTypes2["default"].func,
      renderTrackVertical: _propTypes2["default"].func,
      renderThumbHorizontal: _propTypes2["default"].func,
      renderThumbVertical: _propTypes2["default"].func,
      tagName: _propTypes2["default"].string,
      thumbSize: _propTypes2["default"].number,
      thumbMinSize: _propTypes2["default"].number,
      hideTracksWhenNotNeeded: _propTypes2["default"].bool,
      autoHide: _propTypes2["default"].bool,
      autoHideTimeout: _propTypes2["default"].number,
      autoHideDuration: _propTypes2["default"].number,
      autoHeight: _propTypes2["default"].bool,
      autoHeightMin: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
      autoHeightMax: _propTypes2["default"].oneOfType([_propTypes2["default"].number, _propTypes2["default"].string]),
      universal: _propTypes2["default"].bool,
      style: _propTypes2["default"].object,
      children: _propTypes2["default"].node
    };
    Scrollbars2.defaultProps = {
      renderView: _defaultRenderElements.renderViewDefault,
      renderTrackHorizontal: _defaultRenderElements.renderTrackHorizontalDefault,
      renderTrackVertical: _defaultRenderElements.renderTrackVerticalDefault,
      renderThumbHorizontal: _defaultRenderElements.renderThumbHorizontalDefault,
      renderThumbVertical: _defaultRenderElements.renderThumbVerticalDefault,
      tagName: "div",
      thumbMinSize: 30,
      hideTracksWhenNotNeeded: false,
      autoHide: false,
      autoHideTimeout: 1e3,
      autoHideDuration: 200,
      autoHeight: false,
      autoHeightMin: 0,
      autoHeightMax: 200,
      universal: false
    };
  })(Scrollbars$1);
  return Scrollbars$1;
}
var hasRequiredLib;
function requireLib() {
  if (hasRequiredLib) return lib;
  hasRequiredLib = 1;
  (function(exports2) {
    Object.defineProperty(exports2, "__esModule", {
      value: true
    });
    exports2.Scrollbars = void 0;
    var _Scrollbars = requireScrollbars();
    var _Scrollbars2 = _interopRequireDefault(_Scrollbars);
    function _interopRequireDefault(obj2) {
      return obj2 && obj2.__esModule ? obj2 : { "default": obj2 };
    }
    exports2["default"] = _Scrollbars2["default"];
    exports2.Scrollbars = _Scrollbars2["default"];
  })(lib);
  return lib;
}
var libExports = requireLib();
const Scrollbars = /* @__PURE__ */ getDefaultExportFromCjs(libExports);
function FooterDataShow(id, data, idDataBlock) {
  const dataBlock = document.getElementById(idDataBlock ? idDataBlock : "footerDataShow");
  const BlockIsExisting = document.getElementById(id + "footerData");
  HideAllFooterData(id);
  if (dataBlock) {
    if (!BlockIsExisting) {
      const idDataBlock2 = document.createElement("div");
      idDataBlock2.style.display = "flex";
      idDataBlock2.style.flexFlow = "wrap";
      idDataBlock2.style.boxSizing = "border-box";
      idDataBlock2.style.alignItems = "center";
      idDataBlock2.style.justifyContent = "flex-start";
      idDataBlock2.className = "MuiGrid-root MuiGrid-container css-16a96b4";
      idDataBlock2.id = id + "footerData";
      dataBlock.appendChild(idDataBlock2);
      AddData(idDataBlock2, data);
    } else {
      AddData(BlockIsExisting, data);
    }
  }
}
function AddData(dataBlock, data) {
  dataBlock.innerHTML = "";
  dataBlock.style.display = "flex";
  let keys;
  for (const [key, value] of Object.entries(data)) {
    keys = key;
    const divBlock = document.createElement("div");
    divBlock.style.paddingLeft = "3px";
    divBlock.style.paddingRight = "3px";
    divBlock.style.fontSize = "75%";
    if (keys !== "0") {
      divBlock.style.borderLeftStyle = "solid";
      divBlock.style.borderLeftWidth = "1px";
    }
    divBlock.textContent = `${value ? value : ""}`;
    dataBlock.appendChild(divBlock);
  }
}
function HideAllFooterData(id) {
  const dataBlock = document.getElementById("footerDataShow");
  if (dataBlock) {
    let valueAny;
    for (const value of Object.values(dataBlock.children)) {
      valueAny = value;
      if (valueAny.id === id + "footerData") valueAny.style.display = "flex";
      else valueAny.style.display = "none";
    }
  }
}
function StickyFooter() {
  const [currentHeight, setCurrentHeight] = reactExports.useState(window.innerHeight - 190);
  const handleResize = () => {
    setCurrentHeight(window.innerHeight - 190);
  };
  reactExports.useEffect(() => {
    window.addEventListener("resize", handleResize, false);
  }, []);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Box$1,
    {
      sx: {
        display: "flex",
        flexDirection: "column",
        zIndex: "4"
      },
      id: "footer",
      style: {
        minHeight: "30px",
        height: "30px",
        overflow: "hidden",
        borderWidth: "0px 0px 1px 0px",
        borderStyle: "solid"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Box$1,
          {
            component: "footer",
            style: { height: "100%" },
            sx: {
              // py: 3,
              // px: 2,
              // mt: `${currentHeight}px`,
              overflow: "hidden",
              backgroundColor: (theme) => theme.palette.mode === "light" ? theme.palette.grey[200] : theme.palette.grey[800]
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", sx: { height: "100%" }, children: [
              " ",
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { id: "footerProgress", maxWidth: "xl" }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  id: "footerDataShow",
                  sx: { mt: 1 },
                  style: { height: "100%", paddingLeft: "17px" }
                }
              ) })
            ] })
          }
        )
      ]
    }
  );
}
var Help = {};
var hasRequiredHelp;
function requireHelp() {
  if (hasRequiredHelp) return Help;
  hasRequiredHelp = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Help, "__esModule", {
    value: true
  });
  Help.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Help.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 17h-2v-2h2zm2.07-7.75-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25"
  }), "Help");
  return Help;
}
var HelpExports = /* @__PURE__ */ requireHelp();
const HelpIcon = /* @__PURE__ */ getDefaultExportFromCjs(HelpExports);
var Quiz = {};
var hasRequiredQuiz;
function requireQuiz() {
  if (hasRequiredQuiz) return Quiz;
  hasRequiredQuiz = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Quiz, "__esModule", {
    value: true
  });
  Quiz.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Quiz.default = (0, _createSvgIcon.default)([/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M4 6H2v14c0 1.1.9 2 2 2h14v-2H4z"
  }, "0"), /* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2m-5.99 13c-.59 0-1.05-.47-1.05-1.05 0-.59.47-1.04 1.05-1.04.59 0 1.04.45 1.04 1.04-.01.58-.45 1.05-1.04 1.05m2.5-6.17c-.63.93-1.23 1.21-1.56 1.81-.13.24-.18.4-.18 1.18h-1.52c0-.41-.06-1.08.26-1.65.41-.73 1.18-1.16 1.63-1.8.48-.68.21-1.94-1.14-1.94-.88 0-1.32.67-1.5 1.23l-1.37-.57C11.51 5.96 12.52 5 13.99 5c1.23 0 2.08.56 2.51 1.26.37.61.58 1.73.01 2.57"
  }, "1")], "Quiz");
  return Quiz;
}
var QuizExports = /* @__PURE__ */ requireQuiz();
const QuizIcon = /* @__PURE__ */ getDefaultExportFromCjs(QuizExports);
function parseColumns(json, addInfo) {
  const inputColumns = (addInfo == null ? void 0 : addInfo.inputColumns) || { title: [] };
  if (!json.Columns || isEmptyObject(json.Columns) || json.Columns.State) {
    if (!inputColumns || inputColumns.title.length === 0) {
      return {
        title: []
      };
    }
    return {
      title: [...inputColumns == null ? void 0 : inputColumns.title]
    };
  }
  const widthMultiply = (addInfo == null ? void 0 : addInfo.widthMultiply) || 1;
  const filteredColumns = json.Columns.filter((value) => {
    if (value.FieldName) return true;
  });
  const jsonColumns = filteredColumns.map((value) => {
    const options = (addInfo == null ? void 0 : addInfo.docOpts) ? getDocOptions(value.Options || 0) : getParamColumnsOptions(value.Options || 0);
    const deep = value.Deep || value.Level && parseInt(value.Deep || value.Level) || 0;
    return {
      fieldName: value.FieldName,
      title: value.Title || value.Name,
      // у объекта GetDocumentLayout название поля приходит как Title, а у объекта GetTableLayout как Name
      width: value.Width && parseInt(value.Width) * widthMultiply || 100,
      // вложенность колонок
      level: deep,
      // скрытый
      hide: !deep && options.hidden || options.disabled,
      // скрытый только в таблице
      hideInGrid: options.hideInGrid || options.disabled,
      // скрытый в таблице и в списке
      hideInCard: options.hideInCard || options.disabled,
      tag: value.tag || 0,
      collapseRecord: value.FieldName === (addInfo == null ? void 0 : addInfo.collapsibleField),
      fieldInfo: {
        // опции колонки
        options,
        optionsInt: value.Options || 0,
        // данные для редактора
        DataType: value.DataType || "",
        EditStyle: value.EditStyle || "",
        Values: value.Values && getValues(Object.values(value.Values), Boolean(Number(value.EditStyle) & 32)) || [],
        details: value.Details || "",
        hardCodeReadOnlyForEditor: json.readonly || "",
        accDetails: value.DataType === "-1" && (value.FieldName === "D_Analitika" || value.FieldName === "C_Analitika"),
        editMask: value.EditMask || "",
        buttonImage: value.ButtonImage || "",
        FieldName: value.FieldName || "",
        columnID: value.ID || "",
        demandParams: value.DemandParams === "1",
        Module: value.Module || (addInfo == null ? void 0 : addInfo.Module) || "",
        Path: (addInfo == null ? void 0 : addInfo.Path) || "",
        // события для редактора
        onEdit: value.OnEdit || "",
        onDropDown: value.OnDropDown || "",
        onList: value.OnList || "",
        detailsByReq: value.DetailsByReq,
        onListCustom: value.OnListCustom,
        onEditButtonClick: value.OnEditButtonClick,
        onCloseUpList: value.OnCloseUpList || "",
        onGetEditStyle: value.OnGetEditStyle || "",
        // чекбокс
        checkField: value.CheckField || "",
        multiCheckSet: value.MultiCheckSet || "",
        customDefaultIcons: value.customDefaultIcons,
        // настройки для колонки таблицы
        onHint: value.OnHint || "",
        listCommand: value.ListCommand || "",
        titleAjust: value.TitleAjust || "0",
        textAjust: value.TextAjust || "0",
        collapseRecord: value.FieldName === (addInfo == null ? void 0 : addInfo.collapsibleField),
        squareColorField: value.squareColorField || "",
        type: value.Type || "",
        Image: value.Image || "",
        titleTextStyle: value.TitleTextStyle || "",
        textColor: value.TextColor || "",
        design: value.Design || "",
        titleBackColor: value.TitleBackColor && setColor(value.TitleBackColor),
        backColor: setColor(value.BackColor || "") || null,
        // другое
        Grid: addInfo == null ? void 0 : addInfo.grid
      }
    };
  });
  if ((inputColumns == null ? void 0 : inputColumns.title.length) === 0) {
    return {
      title: [...jsonColumns]
    };
  }
  return {
    title: [...inputColumns.title, ...jsonColumns]
  };
}
function getValues(arr, checklist) {
  return arr.map((item, index2) => {
    if (typeof item !== "object") {
      if (checklist) {
        return { label: item, id: `${Math.pow(2, index2)}` };
      }
      return { label: item, id: `${index2}` };
    }
    if (checklist) {
      return { label: item.text, id: `${Math.pow(2, index2)}` };
    }
    return { label: item.text, id: item.id };
  });
}
function getDocOptions(options) {
  return {
    markable: Boolean(Number(options) & DocColumnOption.Markable),
    sort: Boolean(Number(options) & DocColumnOption.Sortable),
    readOnly: Boolean(Number(options) & DocColumnOption.ReadOnly),
    notEditing: Boolean(Number(options) & DocColumnOption.NotEditing),
    verticalText: Boolean(Number(options) & DocColumnOption.VerticalText),
    shortObjName: Boolean(Number(options) & DocColumnOption.ShortObjName),
    fixed: Boolean(Number(options) & DocColumnOption.Fixed),
    redNegative: Boolean(Number(options) & DocColumnOption.RedNegative),
    hideInGrid: Boolean(Number(options) & DocColumnOption.HiddenInGrid),
    hideInCard: Boolean(Number(options) & DocColumnOption.HiddenInInsp),
    filterByField: Boolean(Number(options) & DocColumnOption.Filterable),
    link: Boolean(Number(options) & DocColumnOption.Reference),
    inParams: Boolean(Number(options) & DocColumnOption.InParams),
    group: Boolean(Number(options) & DocColumnOption.CanGroup),
    invisible: Boolean(Number(options) & DocColumnOption.Invisible),
    hidden: Boolean(Number(options) & DocColumnOption.Hidden)
  };
}
function getParamColumnsOptions(options) {
  return {
    disabled: Boolean(Number(options) & ParamSetOption.Disabled),
    config: Boolean(Number(options) & ParamSetOption.InConfig),
    maths: Boolean(Number(options) & ParamSetOption.Calculated),
    details: Boolean(Number(options) & ParamSetOption.Detalization),
    markable: Boolean(Number(options) & ParamSetOption.Markable),
    collapsed: Boolean(Number(options) & ParamSetOption.Collapsed),
    link: Boolean(Number(options) & ParamSetOption.Reference),
    redNegative: Boolean(Number(options) & ParamSetOption.RedNegative),
    forParams: Boolean(Number(options) & ParamSetOption.Inspector),
    forTable: Boolean(Number(options) & ParamSetOption.Grid),
    sort: Boolean(Number(options) & ParamSetOption.Sortable),
    filterByField: Boolean(Number(options) & ParamSetOption.Filterable),
    proto: Boolean(Number(options) & ParamSetOption.Override),
    hidden: Boolean(Number(options) & ParamSetOption.Hidden),
    period: Boolean(Number(options) & ParamSetOption.History),
    group: Boolean(Number(options) & ParamSetOption.CanGroup),
    fixed: Boolean(Number(options) & ParamSetOption.Fixed),
    notEditing: Boolean(Number(options) & ParamSetOption.NotEdit),
    hideInGrid: false,
    hideInCard: false
  };
}
async function booksGrid(grid, source, props, data) {
  let json = await PostHandleTable$2(props.Module, props.ObjType, void 0, props.SectionID);
  source.onHandleRequest = handleRequest$9(props);
  await source.open();
  if (json) {
    source.rights = getRightsData(json.Rights);
    if (json.ReadOnly === "1") grid.OnlyViewMode = true;
    let columns = {
      title: [
        {
          fieldName: "ID",
          title: "Ключ",
          width: 80,
          level: 0,
          hide: true,
          hideInGrid: true,
          hideInCard: true,
          options: getParamColumnsOptions(ParamSetOption.Hidden),
          fieldInfo: { ...defaultFieldInfo }
        }
      ]
    };
    grid.setColumns(parseColumns(json, { inputColumns: columns }));
  } else grid.defaultColumns = true;
  if (!props.ObjRef) await source.refresh();
  await grid.setSource(source);
  if (props.ObjRef) await grid.refreshSource(props.ObjRef);
  await grid.updateGridSize();
}
function handleRequest$9(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID ? props.SectionID : getModalSectionID());
    return AxiosRequest(true, params2, request);
  };
}
const beforeSaveState = ({ source, dcgid = "", secId = "" }) => {
  const stringState = createGridStateString$1(source.saveState());
  const details = source.details && source.details.activeDetails ? source.details.activeDetails : void 0;
  saveDocumentState(dcgid, secId, stringState, details);
};
const saveDocChanges = ({ docName, saveChanges }) => {
  return new Promise((resolve) => {
    const {
      save: { checked }
    } = checkDocsSettings();
    if (!checked) return resolve(true);
    renderMessageBox({
      dlgType: 3,
      message: `Сохранить изменения, сделанные в документах: ${docName}?`,
      buttons: 14,
      selectF: async (e2) => {
        const {
          target: { value }
        } = e2;
        if (value === "2") return resolve(false);
        if (value === "6") {
          await saveChanges();
        }
        return resolve(true);
      }
    });
  });
};
async function getImageHint$1(doccfgId, index2, docId) {
  let json;
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "documents").set("comand", "GetImageHint").set("DocCfgID", doccfgId).set("ImageIndex", index2).set("DocID", docId).set("smart", "1");
  json = await AxiosRequest(true, params2);
  return json.Text;
}
function saveDocumentState(doccfgId, id, state, activeDetails) {
  if (state) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents").set("comand", "SaveDocumentState").set("DocCfgID", doccfgId).set("SectionID", id).set("ActiveDetail", activeDetails ? activeDetails + 1 : 0);
    AxiosRequest(true, params2, { GridState: state });
  }
}
function createGridStateString$1(gridState) {
  if (gridState) {
    let FinalStr = "";
    let valueForString;
    for (const [key, value] of Object.entries(gridState)) {
      if (value) {
        if (typeof value === "object") {
          valueForString = `${key}=`;
          for (const [keyPoint, data] of Object.entries(value)) {
            if (keyPoint === "9") {
              valueForString += `${data}`;
            } else {
              valueForString += `${data}•`;
            }
          }
        } else {
          valueForString = `${key}=${value}`;
        }
        FinalStr += valueForString + "\r\n";
      }
    }
    return FinalStr;
  }
}
function parseGridState$1(gridState) {
  if (gridState) {
    let arr = gridState.split("\r\n");
    let obj2 = {};
    if (arr.length > 0) {
      let valueForObj;
      for (const value of Object.values(arr)) {
        if (value !== "") {
          const valueArr = value.split("=");
          if (valueArr[1] && valueArr[1].includes("•")) {
            valueForObj = Object.assign({}, valueArr[1].split("•"));
          } else {
            valueForObj = valueArr[1];
          }
          Object.assign(obj2, { [valueArr[0]]: valueForObj });
        }
      }
      return obj2;
    }
  }
}
var Add = {};
var hasRequiredAdd;
function requireAdd() {
  if (hasRequiredAdd) return Add;
  hasRequiredAdd = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Add, "__esModule", {
    value: true
  });
  Add.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Add.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6z"
  }), "Add");
  return Add;
}
var AddExports = /* @__PURE__ */ requireAdd();
const AddIcon = /* @__PURE__ */ getDefaultExportFromCjs(AddExports);
var Remove = {};
var hasRequiredRemove;
function requireRemove() {
  if (hasRequiredRemove) return Remove;
  hasRequiredRemove = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Remove, "__esModule", {
    value: true
  });
  Remove.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Remove.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 13H5v-2h14z"
  }), "Remove");
  return Remove;
}
var RemoveExports = /* @__PURE__ */ requireRemove();
const RemoveIcon = /* @__PURE__ */ getDefaultExportFromCjs(RemoveExports);
var FiberManualRecord = {};
var hasRequiredFiberManualRecord;
function requireFiberManualRecord() {
  if (hasRequiredFiberManualRecord) return FiberManualRecord;
  hasRequiredFiberManualRecord = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(FiberManualRecord, "__esModule", {
    value: true
  });
  FiberManualRecord.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  FiberManualRecord.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("circle", {
    cx: "12",
    cy: "12",
    r: "8"
  }), "FiberManualRecord");
  return FiberManualRecord;
}
var FiberManualRecordExports = /* @__PURE__ */ requireFiberManualRecord();
const FiberManualRecordIcon = /* @__PURE__ */ getDefaultExportFromCjs(FiberManualRecordExports);
async function CreateCollapsibleRecords(div, me, i, td) {
  const RecordLevel = await me.source.getRecordLevel();
  const RecordState = await me.source.getRecordState();
  const ClassfiresIcon = document.createElement("div");
  if (isCollapsibleRecord(RecordState)) {
    ClassfiresIcon.textContent = RecordState === 160 || RecordState === 161 ? "+" : "-";
    ClassfiresIcon.type = RecordState === 160 || RecordState === 161 ? "+" : "-";
    ClassfiresIcon.style.position = "relative";
    ClassfiresIcon.style.cursor = "pointer";
    ClassfiresIcon.style.marginLeft = "6px";
    ClassfiresIcon.style.marginTop = "1px";
    ClassfiresIcon.style.width = "0px";
    ClassfiresIcon.style.height = "0px";
    ClassfiresIcon.id = "ExpandIcon";
    ClassfiresIcon.setAttribute("recordindex", me.source.activeRecord);
    ClassfiresIcon.onclick = function(e2) {
      me.source.onRecordCollapsed(e2);
    };
  } else if (RecordLevel !== 0) {
    ClassfiresIcon.textContent = ".";
    ClassfiresIcon.type = ".";
    ClassfiresIcon.style.position = "relative";
    ClassfiresIcon.style.marginLeft = "6px";
    ClassfiresIcon.style.color = "red";
    ClassfiresIcon.style.fontWeight = "800";
  }
  div.style.marginLeft = "15px";
  if (ClassfiresIcon.textContent !== "") {
    td.appendChild(ClassfiresIcon);
    addIcons(ClassfiresIcon, me, RecordState);
  }
  return ClassfiresIcon.textContent === "" ? null : ClassfiresIcon;
}
function isCollapsibleRecord(RecordState) {
  switch (RecordState) {
    case 32:
      return true;
    case 160:
      return true;
    case 33:
      return true;
    case 161:
      return true;
    default:
      return false;
  }
}
function addIcons(container, me, state) {
  if (state === 160 || state === 161) {
    clientExports.createRoot(container).render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          style: {
            height: "20px",
            width: "20px",
            position: "absolute",
            marginLeft: "-6px",
            marginTop: "-1px"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(AddIcon, { style: { height: "15px", width: "15px" }, fontSize: "small" })
        }
      )
    );
  } else if (state === 32 || state === 33) {
    clientExports.createRoot(container).render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          style: {
            height: "20px",
            width: "20px",
            position: "absolute",
            marginLeft: "-6px",
            marginTop: "-1px"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(RemoveIcon, { style: { height: "15px", width: "15px" }, fontSize: "small" })
        }
      )
    );
  } else {
    clientExports.createRoot(container).render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          disabled: true,
          style: {
            height: "20px",
            width: "20px",
            position: "absolute",
            marginLeft: "-6px"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(FiberManualRecordIcon, { color: "error", style: { height: "5px", width: "5px" }, fontSize: "small" })
        }
      )
    );
  }
}
async function clsBookGrid(grid, source, props, data) {
  source.onHandleRequest = HandleRequest$3(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  await source.open();
  if (props.KeyField) {
    if (props.KeyField === "Code") source.setKeyFieldName(props.KeyField.toUpperCase());
    else source.setKeyFieldName(props.KeyField);
  }
  const keyFieldName = source.getKeyFieldName();
  if (!keyFieldName) source.setKeyFieldName("CODE");
  const codeField = source.fields[source.getFieldIndex("CODE")];
  let columns = {
    title: [
      {
        fieldName: "CODE",
        title: "Код",
        width: codeField ? codeField.displayWidth * 15 : 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "$CheckBoxx",
        title: "Множественный выбор",
        type: "3",
        width: 21,
        level: 0,
        hide: props.MultiSel ? false : true,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: "4",
          Image: 21,
          NoTitle: true
        }
      },
      {
        fieldName: "NAME",
        title: "Наименование",
        width: 300,
        level: 0,
        fieldInfo: { ...defaultFieldInfo }
      }
    ]
  };
  if (data.json) {
    source.rights = getRightsData(data.json.Rights);
    let state;
    if (data.json.State) {
      state = data.json.State;
    }
    if (data.json.Columns && data.json.Columns.State) {
      state = data.json.Columns.State;
    }
    if (state) {
      state = parseGridState$1(state);
      source.setGridState(state);
    }
    columns = parseColumns(data.json, { inputColumns: columns });
    grid.setColumns(columns);
  } else grid.setColumns(columns);
  grid.MultiCLsSelect = props.MultiSel ? true : false;
  const Selection = {};
  if (props.Selection) {
    const arrSelection = props.Selection.split(",");
    arrSelection.forEach((item) => {
      Selection[item.match(/\d+/)[0]] = item;
    });
  }
  grid.ClsSelection = Selection;
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
  }
  grid.setImageFields(["ID", "$CfgID"]);
  source.booksGetImage = (value, field) => {
    if (value < 0) return 3;
    if (field === "$CfgID" && value > 0 && source.getFieldTextSync("ID") > 0) return 2;
  };
  await grid.setSource(source);
  source.onRecordCollapsed = async function(event) {
    let RecordIndex;
    if (event.currentTarget !== void 0) {
      RecordIndex = event.currentTarget.getAttribute("recordindex");
    } else {
      RecordIndex = event;
    }
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "RecordCollapsed").set("SectionID", props.SectionID).set("ObjType", props.ObjType).set("RecordIndex", RecordIndex);
    await AxiosRequest(true, params2);
    await grid.refreshSource("!");
    if (data.setCountRecords) data.setCountRecords(source.recordCount);
    return;
  };
  if (props.ID) {
    await grid.refreshSource(props.ID);
  } else await grid.refreshSource();
  await grid.updateGridSize();
  if (data.setCountRecords) data.setCountRecords(source.recordCount);
  if (data.setSelectedRecord) {
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
}
function HandleRequest$3(props) {
  return function onHandleRequest(request, loadCursor, wsm, subParams) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID).set("CanChangeActual", "1");
    wsm && params2.set("WSM", "1");
    if (subParams) {
      const sParams = Object.entries(subParams);
      sParams.forEach(([key, value]) => {
        params2.set(key, value);
      });
    }
    return AxiosRequest(loadCursor !== void 0 ? loadCursor : true, params2, request);
  };
}
async function groupingOrg(grid, source, props, data) {
  source.onHandleRequest = HandleJoinedFunc(data.ObjType);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  grid.setColumns(data.Columns);
  source.onRecordCollapsed = async function(event) {
    let RecordIndex, RecordState = await source.getRecordState();
    if (event.currentTarget !== void 0) {
      RecordIndex = event.currentTarget.getAttribute("recordindex");
    } else {
      RecordIndex = await event;
    }
    await HandleJoinedFunc(data.ObjType)({
      command: "CollapseGroup",
      collapsed: RecordState & 128 ? void 0 : "1",
      recordindex: RecordIndex ? RecordIndex : void 0
    });
    await grid.refreshSource("!");
  };
  await source.open();
  await source.refresh();
  await grid.setSource(source);
  await grid.updateGridSize();
}
function HandleJoinedFunc(ObjType2) {
  return function HandleJoin(request) {
    let param = /* @__PURE__ */ new Map();
    param.set("prefix", "organizations").set("comand", "HandleJoined").set("ObjType", ObjType2);
    return AxiosRequest(false, param, request);
  };
}
var SearchOutlined = {};
var hasRequiredSearchOutlined;
function requireSearchOutlined() {
  if (hasRequiredSearchOutlined) return SearchOutlined;
  hasRequiredSearchOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(SearchOutlined, "__esModule", {
    value: true
  });
  SearchOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  SearchOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
  }), "SearchOutlined");
  return SearchOutlined;
}
var SearchOutlinedExports = /* @__PURE__ */ requireSearchOutlined();
const SearchOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(SearchOutlinedExports);
function memo(getDeps, fn2, opts) {
  let deps = opts.initialDeps ?? [];
  let result;
  function memoizedFunction() {
    var _a2, _b, _c, _d;
    let depTime;
    if (opts.key && ((_a2 = opts.debug) == null ? void 0 : _a2.call(opts))) depTime = Date.now();
    const newDeps = getDeps();
    const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index2) => deps[index2] !== dep);
    if (!depsChanged) {
      return result;
    }
    deps = newDeps;
    let resultTime;
    if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();
    result = fn2(...newDeps);
    if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {
      const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
      const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
      const resultFpsPercentage = resultEndTime / 16;
      const pad = (str, num) => {
        str = String(str);
        while (str.length < num) {
          str = " " + str;
        }
        return str;
      };
      console.info(
        `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
        `
            font-size: .6rem;
            font-weight: bold;
            color: hsl(${Math.max(
          0,
          Math.min(120 - 120 * resultFpsPercentage, 120)
        )}deg 100% 31%);`,
        opts == null ? void 0 : opts.key
      );
    }
    (_d = opts == null ? void 0 : opts.onChange) == null ? void 0 : _d.call(opts, result);
    return result;
  }
  memoizedFunction.updateDeps = (newDeps) => {
    deps = newDeps;
  };
  return memoizedFunction;
}
function notUndefined(value, msg) {
  if (value === void 0) {
    throw new Error(`Unexpected undefined${""}`);
  } else {
    return value;
  }
}
const approxEqual = (a2, b2) => Math.abs(a2 - b2) <= 1;
const debounce = (targetWindow, fn2, ms) => {
  let timeoutId;
  return function(...args) {
    targetWindow.clearTimeout(timeoutId);
    timeoutId = targetWindow.setTimeout(() => fn2.apply(this, args), ms);
  };
};
const getRect = (element) => {
  const { offsetWidth, offsetHeight } = element;
  return { width: offsetWidth, height: offsetHeight };
};
const defaultKeyExtractor = (index2) => index2;
const defaultRangeExtractor = (range2) => {
  const start2 = Math.max(range2.startIndex - range2.overscan, 0);
  const end2 = Math.min(range2.endIndex + range2.overscan, range2.count - 1);
  const arr = [];
  for (let i = start2; i <= end2; i++) {
    arr.push(i);
  }
  return arr;
};
const observeElementRect = (instance, cb) => {
  const element = instance.scrollElement;
  if (!element) {
    return;
  }
  const targetWindow = instance.targetWindow;
  if (!targetWindow) {
    return;
  }
  const handler = (rect) => {
    const { width: width2, height: height2 } = rect;
    cb({ width: Math.round(width2), height: Math.round(height2) });
  };
  handler(getRect(element));
  if (!targetWindow.ResizeObserver) {
    return () => {
    };
  }
  const observer = new targetWindow.ResizeObserver((entries) => {
    const run = () => {
      const entry = entries[0];
      if (entry == null ? void 0 : entry.borderBoxSize) {
        const box = entry.borderBoxSize[0];
        if (box) {
          handler({ width: box.inlineSize, height: box.blockSize });
          return;
        }
      }
      handler(getRect(element));
    };
    instance.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
  });
  observer.observe(element, { box: "border-box" });
  return () => {
    observer.unobserve(element);
  };
};
const addEventListenerOptions = {
  passive: true
};
const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
const observeElementOffset = (instance, cb) => {
  const element = instance.scrollElement;
  if (!element) {
    return;
  }
  const targetWindow = instance.targetWindow;
  if (!targetWindow) {
    return;
  }
  let offset2 = 0;
  const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce(
    targetWindow,
    () => {
      cb(offset2, false);
    },
    instance.options.isScrollingResetDelay
  );
  const createHandler = (isScrolling) => () => {
    const { horizontal, isRtl } = instance.options;
    offset2 = horizontal ? element["scrollLeft"] * (isRtl && -1 || 1) : element["scrollTop"];
    fallback();
    cb(offset2, isScrolling);
  };
  const handler = createHandler(true);
  const endHandler = createHandler(false);
  endHandler();
  element.addEventListener("scroll", handler, addEventListenerOptions);
  const registerScrollendEvent = instance.options.useScrollendEvent && supportsScrollend;
  if (registerScrollendEvent) {
    element.addEventListener("scrollend", endHandler, addEventListenerOptions);
  }
  return () => {
    element.removeEventListener("scroll", handler);
    if (registerScrollendEvent) {
      element.removeEventListener("scrollend", endHandler);
    }
  };
};
const measureElement = (element, entry, instance) => {
  if (entry == null ? void 0 : entry.borderBoxSize) {
    const box = entry.borderBoxSize[0];
    if (box) {
      const size = Math.round(
        box[instance.options.horizontal ? "inlineSize" : "blockSize"]
      );
      return size;
    }
  }
  return element[instance.options.horizontal ? "offsetWidth" : "offsetHeight"];
};
const elementScroll = (offset2, {
  adjustments = 0,
  behavior
}, instance) => {
  var _a2, _b;
  const toOffset = offset2 + adjustments;
  (_b = (_a2 = instance.scrollElement) == null ? void 0 : _a2.scrollTo) == null ? void 0 : _b.call(_a2, {
    [instance.options.horizontal ? "left" : "top"]: toOffset,
    behavior
  });
};
class Virtualizer {
  constructor(opts) {
    this.unsubs = [];
    this.scrollElement = null;
    this.targetWindow = null;
    this.isScrolling = false;
    this.scrollToIndexTimeoutId = null;
    this.measurementsCache = [];
    this.itemSizeCache = /* @__PURE__ */ new Map();
    this.pendingMeasuredCacheIndexes = [];
    this.scrollRect = null;
    this.scrollOffset = null;
    this.scrollDirection = null;
    this.scrollAdjustments = 0;
    this.elementsCache = /* @__PURE__ */ new Map();
    this.observer = /* @__PURE__ */ (() => {
      let _ro = null;
      const get2 = () => {
        if (_ro) {
          return _ro;
        }
        if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
          return null;
        }
        return _ro = new this.targetWindow.ResizeObserver((entries) => {
          entries.forEach((entry) => {
            const run = () => {
              this._measureElement(entry.target, entry);
            };
            this.options.useAnimationFrameWithResizeObserver ? requestAnimationFrame(run) : run();
          });
        });
      };
      return {
        disconnect: () => {
          var _a2;
          (_a2 = get2()) == null ? void 0 : _a2.disconnect();
          _ro = null;
        },
        observe: (target) => {
          var _a2;
          return (_a2 = get2()) == null ? void 0 : _a2.observe(target, { box: "border-box" });
        },
        unobserve: (target) => {
          var _a2;
          return (_a2 = get2()) == null ? void 0 : _a2.unobserve(target);
        }
      };
    })();
    this.range = null;
    this.setOptions = (opts2) => {
      Object.entries(opts2).forEach(([key, value]) => {
        if (typeof value === "undefined") delete opts2[key];
      });
      this.options = {
        debug: false,
        initialOffset: 0,
        overscan: 1,
        paddingStart: 0,
        paddingEnd: 0,
        scrollPaddingStart: 0,
        scrollPaddingEnd: 0,
        horizontal: false,
        getItemKey: defaultKeyExtractor,
        rangeExtractor: defaultRangeExtractor,
        onChange: () => {
        },
        measureElement,
        initialRect: { width: 0, height: 0 },
        scrollMargin: 0,
        gap: 0,
        indexAttribute: "data-index",
        initialMeasurementsCache: [],
        lanes: 1,
        isScrollingResetDelay: 150,
        enabled: true,
        isRtl: false,
        useScrollendEvent: false,
        useAnimationFrameWithResizeObserver: false,
        ...opts2
      };
    };
    this.notify = (sync) => {
      var _a2, _b;
      (_b = (_a2 = this.options).onChange) == null ? void 0 : _b.call(_a2, this, sync);
    };
    this.maybeNotify = memo(
      () => {
        this.calculateRange();
        return [
          this.isScrolling,
          this.range ? this.range.startIndex : null,
          this.range ? this.range.endIndex : null
        ];
      },
      (isScrolling) => {
        this.notify(isScrolling);
      },
      {
        key: false,
        debug: () => this.options.debug,
        initialDeps: [
          this.isScrolling,
          this.range ? this.range.startIndex : null,
          this.range ? this.range.endIndex : null
        ]
      }
    );
    this.cleanup = () => {
      this.unsubs.filter(Boolean).forEach((d2) => d2());
      this.unsubs = [];
      this.observer.disconnect();
      this.scrollElement = null;
      this.targetWindow = null;
    };
    this._didMount = () => {
      return () => {
        this.cleanup();
      };
    };
    this._willUpdate = () => {
      var _a2;
      const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
      if (this.scrollElement !== scrollElement) {
        this.cleanup();
        if (!scrollElement) {
          this.maybeNotify();
          return;
        }
        this.scrollElement = scrollElement;
        if (this.scrollElement && "ownerDocument" in this.scrollElement) {
          this.targetWindow = this.scrollElement.ownerDocument.defaultView;
        } else {
          this.targetWindow = ((_a2 = this.scrollElement) == null ? void 0 : _a2.window) ?? null;
        }
        this.elementsCache.forEach((cached) => {
          this.observer.observe(cached);
        });
        this._scrollToOffset(this.getScrollOffset(), {
          adjustments: void 0,
          behavior: void 0
        });
        this.unsubs.push(
          this.options.observeElementRect(this, (rect) => {
            this.scrollRect = rect;
            this.maybeNotify();
          })
        );
        this.unsubs.push(
          this.options.observeElementOffset(this, (offset2, isScrolling) => {
            this.scrollAdjustments = 0;
            this.scrollDirection = isScrolling ? this.getScrollOffset() < offset2 ? "forward" : "backward" : null;
            this.scrollOffset = offset2;
            this.isScrolling = isScrolling;
            this.maybeNotify();
          })
        );
      }
    };
    this.getSize = () => {
      if (!this.options.enabled) {
        this.scrollRect = null;
        return 0;
      }
      this.scrollRect = this.scrollRect ?? this.options.initialRect;
      return this.scrollRect[this.options.horizontal ? "width" : "height"];
    };
    this.getScrollOffset = () => {
      if (!this.options.enabled) {
        this.scrollOffset = null;
        return 0;
      }
      this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
      return this.scrollOffset;
    };
    this.getFurthestMeasurement = (measurements, index2) => {
      const furthestMeasurementsFound = /* @__PURE__ */ new Map();
      const furthestMeasurements = /* @__PURE__ */ new Map();
      for (let m2 = index2 - 1; m2 >= 0; m2--) {
        const measurement = measurements[m2];
        if (furthestMeasurementsFound.has(measurement.lane)) {
          continue;
        }
        const previousFurthestMeasurement = furthestMeasurements.get(
          measurement.lane
        );
        if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
          furthestMeasurements.set(measurement.lane, measurement);
        } else if (measurement.end < previousFurthestMeasurement.end) {
          furthestMeasurementsFound.set(measurement.lane, true);
        }
        if (furthestMeasurementsFound.size === this.options.lanes) {
          break;
        }
      }
      return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a2, b2) => {
        if (a2.end === b2.end) {
          return a2.index - b2.index;
        }
        return a2.end - b2.end;
      })[0] : void 0;
    };
    this.getMeasurementOptions = memo(
      () => [
        this.options.count,
        this.options.paddingStart,
        this.options.scrollMargin,
        this.options.getItemKey,
        this.options.enabled
      ],
      (count, paddingStart, scrollMargin, getItemKey, enabled) => {
        this.pendingMeasuredCacheIndexes = [];
        return {
          count,
          paddingStart,
          scrollMargin,
          getItemKey,
          enabled
        };
      },
      {
        key: false
      }
    );
    this.getMeasurements = memo(
      () => [this.getMeasurementOptions(), this.itemSizeCache],
      ({ count, paddingStart, scrollMargin, getItemKey, enabled }, itemSizeCache) => {
        if (!enabled) {
          this.measurementsCache = [];
          this.itemSizeCache.clear();
          return [];
        }
        if (this.measurementsCache.length === 0) {
          this.measurementsCache = this.options.initialMeasurementsCache;
          this.measurementsCache.forEach((item) => {
            this.itemSizeCache.set(item.key, item.size);
          });
        }
        const min2 = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
        this.pendingMeasuredCacheIndexes = [];
        const measurements = this.measurementsCache.slice(0, min2);
        for (let i = min2; i < count; i++) {
          const key = getItemKey(i);
          const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i);
          const start2 = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
          const measuredSize = itemSizeCache.get(key);
          const size = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
          const end2 = start2 + size;
          const lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes;
          measurements[i] = {
            index: i,
            start: start2,
            size,
            end: end2,
            key,
            lane
          };
        }
        this.measurementsCache = measurements;
        return measurements;
      },
      {
        key: false,
        debug: () => this.options.debug
      }
    );
    this.calculateRange = memo(
      () => [
        this.getMeasurements(),
        this.getSize(),
        this.getScrollOffset(),
        this.options.lanes
      ],
      (measurements, outerSize, scrollOffset, lanes) => {
        return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
          measurements,
          outerSize,
          scrollOffset,
          lanes
        }) : null;
      },
      {
        key: false,
        debug: () => this.options.debug
      }
    );
    this.getVirtualIndexes = memo(
      () => {
        let startIndex = null;
        let endIndex = null;
        const range2 = this.calculateRange();
        if (range2) {
          startIndex = range2.startIndex;
          endIndex = range2.endIndex;
        }
        this.maybeNotify.updateDeps([this.isScrolling, startIndex, endIndex]);
        return [
          this.options.rangeExtractor,
          this.options.overscan,
          this.options.count,
          startIndex,
          endIndex
        ];
      },
      (rangeExtractor, overscan, count, startIndex, endIndex) => {
        return startIndex === null || endIndex === null ? [] : rangeExtractor({
          startIndex,
          endIndex,
          overscan,
          count
        });
      },
      {
        key: false,
        debug: () => this.options.debug
      }
    );
    this.indexFromElement = (node2) => {
      const attributeName = this.options.indexAttribute;
      const indexStr = node2.getAttribute(attributeName);
      if (!indexStr) {
        console.warn(
          `Missing attribute name '${attributeName}={index}' on measured element.`
        );
        return -1;
      }
      return parseInt(indexStr, 10);
    };
    this._measureElement = (node2, entry) => {
      const index2 = this.indexFromElement(node2);
      const item = this.measurementsCache[index2];
      if (!item) {
        return;
      }
      const key = item.key;
      const prevNode = this.elementsCache.get(key);
      if (prevNode !== node2) {
        if (prevNode) {
          this.observer.unobserve(prevNode);
        }
        this.observer.observe(node2);
        this.elementsCache.set(key, node2);
      }
      if (node2.isConnected) {
        this.resizeItem(index2, this.options.measureElement(node2, entry, this));
      }
    };
    this.resizeItem = (index2, size) => {
      const item = this.measurementsCache[index2];
      if (!item) {
        return;
      }
      const itemSize = this.itemSizeCache.get(item.key) ?? item.size;
      const delta = size - itemSize;
      if (delta !== 0) {
        if (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item, delta, this) : item.start < this.getScrollOffset() + this.scrollAdjustments) {
          this._scrollToOffset(this.getScrollOffset(), {
            adjustments: this.scrollAdjustments += delta,
            behavior: void 0
          });
        }
        this.pendingMeasuredCacheIndexes.push(item.index);
        this.itemSizeCache = new Map(this.itemSizeCache.set(item.key, size));
        this.notify(false);
      }
    };
    this.measureElement = (node2) => {
      if (!node2) {
        this.elementsCache.forEach((cached, key) => {
          if (!cached.isConnected) {
            this.observer.unobserve(cached);
            this.elementsCache.delete(key);
          }
        });
        return;
      }
      this._measureElement(node2, void 0);
    };
    this.getVirtualItems = memo(
      () => [this.getVirtualIndexes(), this.getMeasurements()],
      (indexes, measurements) => {
        const virtualItems = [];
        for (let k2 = 0, len = indexes.length; k2 < len; k2++) {
          const i = indexes[k2];
          const measurement = measurements[i];
          virtualItems.push(measurement);
        }
        return virtualItems;
      },
      {
        key: false,
        debug: () => this.options.debug
      }
    );
    this.getVirtualItemForOffset = (offset2) => {
      const measurements = this.getMeasurements();
      if (measurements.length === 0) {
        return void 0;
      }
      return notUndefined(
        measurements[findNearestBinarySearch(
          0,
          measurements.length - 1,
          (index2) => notUndefined(measurements[index2]).start,
          offset2
        )]
      );
    };
    this.getOffsetForAlignment = (toOffset, align, itemSize = 0) => {
      const size = this.getSize();
      const scrollOffset = this.getScrollOffset();
      if (align === "auto") {
        align = toOffset >= scrollOffset + size ? "end" : "start";
      }
      if (align === "center") {
        toOffset += (itemSize - size) / 2;
      } else if (align === "end") {
        toOffset -= size;
      }
      const maxOffset = this.getTotalSize() - size;
      return Math.max(Math.min(maxOffset, toOffset), 0);
    };
    this.getOffsetForIndex = (index2, align = "auto") => {
      index2 = Math.max(0, Math.min(index2, this.options.count - 1));
      const item = this.measurementsCache[index2];
      if (!item) {
        return void 0;
      }
      const size = this.getSize();
      const scrollOffset = this.getScrollOffset();
      if (align === "auto") {
        if (item.end >= scrollOffset + size - this.options.scrollPaddingEnd) {
          align = "end";
        } else if (item.start <= scrollOffset + this.options.scrollPaddingStart) {
          align = "start";
        } else {
          return [scrollOffset, align];
        }
      }
      const toOffset = align === "end" ? item.end + this.options.scrollPaddingEnd : item.start - this.options.scrollPaddingStart;
      return [
        this.getOffsetForAlignment(toOffset, align, item.size),
        align
      ];
    };
    this.isDynamicMode = () => this.elementsCache.size > 0;
    this.cancelScrollToIndex = () => {
      if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {
        this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);
        this.scrollToIndexTimeoutId = null;
      }
    };
    this.scrollToOffset = (toOffset, { align = "start", behavior } = {}) => {
      this.cancelScrollToIndex();
      if (behavior === "smooth" && this.isDynamicMode()) {
        console.warn(
          "The `smooth` scroll behavior is not fully supported with dynamic size."
        );
      }
      this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {
        adjustments: void 0,
        behavior
      });
    };
    this.scrollToIndex = (index2, { align: initialAlign = "auto", behavior } = {}) => {
      index2 = Math.max(0, Math.min(index2, this.options.count - 1));
      this.cancelScrollToIndex();
      if (behavior === "smooth" && this.isDynamicMode()) {
        console.warn(
          "The `smooth` scroll behavior is not fully supported with dynamic size."
        );
      }
      const offsetAndAlign = this.getOffsetForIndex(index2, initialAlign);
      if (!offsetAndAlign) return;
      const [offset2, align] = offsetAndAlign;
      this._scrollToOffset(offset2, { adjustments: void 0, behavior });
      if (behavior !== "smooth" && this.isDynamicMode() && this.targetWindow) {
        this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
          this.scrollToIndexTimeoutId = null;
          const elementInDOM = this.elementsCache.has(
            this.options.getItemKey(index2)
          );
          if (elementInDOM) {
            const result = this.getOffsetForIndex(index2, align);
            if (!result) return;
            const [latestOffset] = result;
            const currentScrollOffset = this.getScrollOffset();
            if (!approxEqual(latestOffset, currentScrollOffset)) {
              this.scrollToIndex(index2, { align, behavior });
            }
          } else {
            this.scrollToIndex(index2, { align, behavior });
          }
        });
      }
    };
    this.scrollBy = (delta, { behavior } = {}) => {
      this.cancelScrollToIndex();
      if (behavior === "smooth" && this.isDynamicMode()) {
        console.warn(
          "The `smooth` scroll behavior is not fully supported with dynamic size."
        );
      }
      this._scrollToOffset(this.getScrollOffset() + delta, {
        adjustments: void 0,
        behavior
      });
    };
    this.getTotalSize = () => {
      var _a2;
      const measurements = this.getMeasurements();
      let end2;
      if (measurements.length === 0) {
        end2 = this.options.paddingStart;
      } else if (this.options.lanes === 1) {
        end2 = ((_a2 = measurements[measurements.length - 1]) == null ? void 0 : _a2.end) ?? 0;
      } else {
        const endByLane = Array(this.options.lanes).fill(null);
        let endIndex = measurements.length - 1;
        while (endIndex >= 0 && endByLane.some((val) => val === null)) {
          const item = measurements[endIndex];
          if (endByLane[item.lane] === null) {
            endByLane[item.lane] = item.end;
          }
          endIndex--;
        }
        end2 = Math.max(...endByLane.filter((val) => val !== null));
      }
      return Math.max(
        end2 - this.options.scrollMargin + this.options.paddingEnd,
        0
      );
    };
    this._scrollToOffset = (offset2, {
      adjustments,
      behavior
    }) => {
      this.options.scrollToFn(offset2, { behavior, adjustments }, this);
    };
    this.measure = () => {
      this.itemSizeCache = /* @__PURE__ */ new Map();
      this.notify(false);
    };
    this.setOptions(opts);
  }
}
const findNearestBinarySearch = (low, high, getCurrentValue, value) => {
  while (low <= high) {
    const middle = (low + high) / 2 | 0;
    const currentValue = getCurrentValue(middle);
    if (currentValue < value) {
      low = middle + 1;
    } else if (currentValue > value) {
      high = middle - 1;
    } else {
      return middle;
    }
  }
  if (low > 0) {
    return low - 1;
  } else {
    return 0;
  }
};
function calculateRange({
  measurements,
  outerSize,
  scrollOffset,
  lanes
}) {
  const lastIndex = measurements.length - 1;
  const getOffset2 = (index2) => measurements[index2].start;
  if (measurements.length <= lanes) {
    return {
      startIndex: 0,
      endIndex: lastIndex
    };
  }
  let startIndex = findNearestBinarySearch(
    0,
    lastIndex,
    getOffset2,
    scrollOffset
  );
  let endIndex = startIndex;
  if (lanes === 1) {
    while (endIndex < lastIndex && measurements[endIndex].end < scrollOffset + outerSize) {
      endIndex++;
    }
  } else if (lanes > 1) {
    const endPerLane = Array(lanes).fill(0);
    while (endIndex < lastIndex && endPerLane.some((pos) => pos < scrollOffset + outerSize)) {
      const item = measurements[endIndex];
      endPerLane[item.lane] = item.end;
      endIndex++;
    }
    const startPerLane = Array(lanes).fill(scrollOffset + outerSize);
    while (startIndex >= 0 && startPerLane.some((pos) => pos >= scrollOffset)) {
      const item = measurements[startIndex];
      startPerLane[item.lane] = item.start;
      startIndex--;
    }
    startIndex = Math.max(0, startIndex - startIndex % lanes);
    endIndex = Math.min(lastIndex, endIndex + (lanes - 1 - endIndex % lanes));
  }
  return { startIndex, endIndex };
}
const useIsomorphicLayoutEffect = typeof document !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
function useVirtualizerBase(options) {
  const rerender = reactExports.useReducer(() => ({}), {})[1];
  const resolvedOptions = {
    ...options,
    onChange: (instance2, sync) => {
      var _a2;
      if (sync) {
        reactDomExports.flushSync(rerender);
      } else {
        rerender();
      }
      (_a2 = options.onChange) == null ? void 0 : _a2.call(options, instance2, sync);
    }
  };
  const [instance] = reactExports.useState(
    () => new Virtualizer(resolvedOptions)
  );
  instance.setOptions(resolvedOptions);
  useIsomorphicLayoutEffect(() => {
    return instance._didMount();
  }, []);
  useIsomorphicLayoutEffect(() => {
    return instance._willUpdate();
  });
  return instance;
}
function useVirtualizer(options) {
  return useVirtualizerBase({
    observeElementRect,
    observeElementOffset,
    scrollToFn: elementScroll,
    ...options
  });
}
const VirtualListSmeta = "_VirtualListSmeta_oqtn3_1";
const VirtualListSmetaCointainer = "_VirtualListSmetaCointainer_oqtn3_11";
const listItem = "_listItem_oqtn3_21";
const listItemSelected = "_listItemSelected_oqtn3_51";
const listStyles = {
  VirtualListSmeta,
  VirtualListSmetaCointainer,
  listItem,
  listItemSelected
};
const VirtualList = ({
  items,
  selected,
  estimateSize = () => 20,
  onClick: onClick2,
  onDoubleClick,
  onKeyDown
}) => {
  const parentRef = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (!items.length) return;
    const index2 = items.findIndex((value) => value.id === (selected == null ? void 0 : selected.id) || value.text === (selected == null ? void 0 : selected.text));
    if (index2) rowVirtualizer.scrollToIndex(index2);
    setTimeout(() => {
      const indexToScroll = index2 === -1 ? 0 : index2;
      const elementToFocus = parentRef.current.querySelector(`[tabIndex="${indexToScroll}"]`);
      elementToFocus == null ? void 0 : elementToFocus.focus();
      elementToFocus == null ? void 0 : elementToFocus.click();
      console.log(elementToFocus);
    }, 250);
  }, [items]);
  const handleKeyDown2 = (e2, data) => {
    onKeyDown && onKeyDown(data, e2);
  };
  const handleOnClick = (e2, data) => {
    onClick2 && onClick2(data, e2);
  };
  const handleDbClick = (e2, data) => {
    onDoubleClick && onDoubleClick(data, e2);
  };
  const rowVirtualizer = useVirtualizer({
    count: items.length,
    getScrollElement: () => parentRef.current,
    estimateSize,
    overscan: 5
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      ref: parentRef,
      className: clsx$3(listStyles.VirtualListSmeta),
      style: {
        height: `inherit`,
        overflow: "auto"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          className: clsx$3(listStyles.VirtualListSmetaCointainer),
          style: {
            height: `${rowVirtualizer.getTotalSize()}px`
          },
          onKeyDown: (e2) => {
            var _a2;
            const index2 = (_a2 = e2 == null ? void 0 : e2.target) == null ? void 0 : _a2.tabIndex;
            if (index2 !== -1) handleKeyDown2(e2, items[index2]);
          },
          children: rowVirtualizer.getVirtualItems().map((virtualRow) => {
            const item = items[virtualRow.index];
            const { id, text, padding: padding2 } = item;
            const isSelected = (selected == null ? void 0 : selected.id) === id || (selected == null ? void 0 : selected.text) === text;
            return /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                className: clsx$3(listStyles.listItem, isSelected && listStyles.listItemSelected),
                style: { paddingLeft: padding2, transform: `translateY(${virtualRow.start}px)` },
                title: text,
                tabIndex: virtualRow.index,
                onClick: (e2) => {
                  handleOnClick(e2, item);
                },
                onDoubleClick: (e2) => {
                  handleDbClick(e2, item);
                },
                children: text
              },
              virtualRow.index
            );
          })
        }
      )
    }
  );
};
function DialogSetObjText(props) {
  const [sortRecords, setSortRecords] = React.useState([]);
  const [selected, setSelected] = React.useState({ id: null, text: null });
  const tableContainer = React.useRef(null);
  const records = React.useRef([]);
  const inputFilter = React.useRef();
  React.useEffect(() => {
    records.current = props.list;
    setSortRecords(records.current);
  }, []);
  async function onEdit(item) {
    if (props.onEdit && item) {
      let data = {};
      if (props.data) {
        data = { ...props.data };
      }
      props.onEdit({
        record: props.record,
        textchanged: "0",
        name: props.name,
        setValue: props.data ? props.data.setValue : void 0,
        setInputValue: props.data ? props.data.setInputValue : void 0,
        ...data,
        proof: false,
        value: item.text,
        tag: item.id,
        code: item.code,
        ...item,
        requestId: props.RequestID,
        CheckState: props.CheckState
      });
      smetaModals.close(props.smetaModalId);
      return;
    }
    if (props.RequestID) {
      await formEdit("1", props.func, { Name: "Index", Value: item.id }, props.RequestID, props.from);
    }
    smetaModals.close(props.smetaModalId);
  }
  const escapeRegExp2 = (string) => {
    return string.replaceAll(/[.*+?^${}()|[\]\\]/g, "\\$&");
  };
  function filter2(reg) {
    const regexp = new RegExp(escapeRegExp2(reg).toLowerCase());
    setSortRecords(
      records.current.filter((item) => {
        if (item.text) {
          if (item.text.toLowerCase().match(regexp)) return item;
        }
        return false;
      })
    );
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "column",
      justifyContent: "flex-start",
      alignItems: "flex-start",
      style: { height: "100%", width: "100%" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "100%", height: "calc(100% - 40px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            ref: tableContainer,
            style: {
              width: "100%",
              height: "100%",
              border: "1px solid #cccccc",
              overflow: "auto"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              MenuList,
              {
                tabIndex: "-1",
                style: {
                  height: "100%",
                  width: "100%",
                  outline: "none"
                },
                onKeyDown: (ev) => {
                  if (ev.code === "Enter") {
                    onEdit();
                  }
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  VirtualList,
                  {
                    items: sortRecords,
                    selected,
                    onKeyDown: (data, ev) => {
                      if (ev.key === "Enter") {
                        onEdit(data);
                      }
                    },
                    onDoubleClick: (data) => {
                      onEdit(data);
                    },
                    onClick: (data) => {
                      setSelected(data);
                    }
                  }
                )
              }
            )
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            style: {
              height: "40px",
              width: "100%",
              display: "flex",
              flexWrap: "nowrap"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  item: true,
                  style: {
                    margin: "8px",
                    width: "calc(100% - 182px)",
                    display: "flex",
                    flexWrap: "nowrap"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        onClick: () => {
                          filter2(inputFilter.current.value);
                        },
                        style: {
                          width: "27px",
                          height: "27px",
                          marginRight: "14px",
                          marginLeft: "5px",
                          display: "flex",
                          flexWrap: "nowrap"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(SearchOutlinedIcon, {})
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "input",
                      {
                        ref: inputFilter,
                        style: {
                          width: "calc(100% - 46px)",
                          outline: "0",
                          display: "flex",
                          flexWrap: "nowrap"
                        },
                        onKeyDown: (ev) => {
                          if (ev.key === "Enter") {
                            filter2(ev.target.value);
                          }
                        },
                        title: "Filter"
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, style: { width: "164px", display: "flex", flexWrap: "nowrap" }, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Button$2,
                  {
                    size: "small",
                    variant: "outlined",
                    style: { textTransform: "none", marginRight: "10px" },
                    value: "1",
                    className: "button_Modal_Select",
                    onClick: () => {
                      onEdit(selected);
                    },
                    children: "Выбрать"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Button$2,
                  {
                    size: "small",
                    variant: "outlined",
                    style: { textTransform: "none" },
                    value: "2",
                    className: "button_Modal_Close",
                    onClick: (ev) => {
                      smetaModals.close(props.smetaModalId);
                      if (props.onClose) {
                        props.onClose(ev);
                      }
                    },
                    children: "Отмена"
                  }
                )
              ] })
            ] })
          }
        )
      ]
    }
  );
}
var Settings = {};
var hasRequiredSettings;
function requireSettings() {
  if (hasRequiredSettings) return Settings;
  hasRequiredSettings = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Settings, "__esModule", {
    value: true
  });
  Settings.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Settings.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"
  }), "Settings");
  return Settings;
}
var SettingsExports = /* @__PURE__ */ requireSettings();
const SettingsIcon = /* @__PURE__ */ getDefaultExportFromCjs(SettingsExports);
var Cancel = {};
var hasRequiredCancel;
function requireCancel() {
  if (hasRequiredCancel) return Cancel;
  hasRequiredCancel = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Cancel, "__esModule", {
    value: true
  });
  Cancel.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Cancel.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"
  }), "Cancel");
  return Cancel;
}
var CancelExports = /* @__PURE__ */ requireCancel();
const CancelIcon = /* @__PURE__ */ getDefaultExportFromCjs(CancelExports);
var SaveAlt = {};
var hasRequiredSaveAlt;
function requireSaveAlt() {
  if (hasRequiredSaveAlt) return SaveAlt;
  hasRequiredSaveAlt = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(SaveAlt, "__esModule", {
    value: true
  });
  SaveAlt.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  SaveAlt.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7zm-6 .67 2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z"
  }), "SaveAlt");
  return SaveAlt;
}
var SaveAltExports = /* @__PURE__ */ requireSaveAlt();
const SaveAltIcon = /* @__PURE__ */ getDefaultExportFromCjs(SaveAltExports);
var VisibilityOffOutlined = {};
var hasRequiredVisibilityOffOutlined;
function requireVisibilityOffOutlined() {
  if (hasRequiredVisibilityOffOutlined) return VisibilityOffOutlined;
  hasRequiredVisibilityOffOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(VisibilityOffOutlined, "__esModule", {
    value: true
  });
  VisibilityOffOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  VisibilityOffOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 6c3.79 0 7.17 2.13 8.82 5.5-.59 1.22-1.42 2.27-2.41 3.12l1.41 1.41c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l1.65 1.65C10.66 6.09 11.32 6 12 6m-1.07 1.14L13 9.21c.57.25 1.03.71 1.28 1.28l2.07 2.07c.08-.34.14-.7.14-1.07C16.5 9.01 14.48 7 12 7c-.37 0-.72.05-1.07.14M2.01 3.87l2.68 2.68C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.98-.29 4.32-.82l3.42 3.42 1.41-1.41L3.42 2.45zm7.5 7.5 2.61 2.61c-.04.01-.08.02-.12.02-1.38 0-2.5-1.12-2.5-2.5 0-.05.01-.08.01-.13m-3.4-3.4 1.75 1.75c-.23.55-.36 1.15-.36 1.78 0 2.48 2.02 4.5 4.5 4.5.63 0 1.23-.13 1.77-.36l.98.98c-.88.24-1.8.38-2.75.38-3.79 0-7.17-2.13-8.82-5.5.7-1.43 1.72-2.61 2.93-3.53"
  }), "VisibilityOffOutlined");
  return VisibilityOffOutlined;
}
var VisibilityOffOutlinedExports = /* @__PURE__ */ requireVisibilityOffOutlined();
const VisibilityOffOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(VisibilityOffOutlinedExports);
var VisibilityOutlined = {};
var hasRequiredVisibilityOutlined;
function requireVisibilityOutlined() {
  if (hasRequiredVisibilityOutlined) return VisibilityOutlined;
  hasRequiredVisibilityOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(VisibilityOutlined, "__esModule", {
    value: true
  });
  VisibilityOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  VisibilityOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 6c3.79 0 7.17 2.13 8.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5C4.83 8.13 8.21 6 12 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 5c1.38 0 2.5 1.12 2.5 2.5S13.38 14 12 14s-2.5-1.12-2.5-2.5S10.62 9 12 9m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7"
  }), "VisibilityOutlined");
  return VisibilityOutlined;
}
var VisibilityOutlinedExports = /* @__PURE__ */ requireVisibilityOutlined();
const VisibilityOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(VisibilityOutlinedExports);
async function treeMenu(data) {
  const tree = data.event.target.querySelector("#tree") || data.event.target.closest("#tree");
  if (!tree) return;
  let item = tree.querySelector(".tree-item-selected");
  if (!item) item = tree.querySelector(".tree-item");
  let id = "0";
  let itemText = "";
  if (item) {
    id = item.id;
    itemText = tree.querySelector(`#text-tree-item_${id}`).innerText;
  }
  if (typeof data.props.onRightClick === "function") {
    data.event.preventDefault();
    data.clickMenu = await data.props.onRightClick(id);
    data.clickMenu = data.clickMenu ? data.clickMenu : {};
    if (data.clickMenu.arr && data.clickMenu.arr.length > 0 && data.clickMenu.arr[data.clickMenu.arr.length - 1].Caption !== "Divider") {
      data.clickMenu.arr.push({ Caption: "Divider" });
    }
  }
  const defaultMenu2 = [];
  const treeDefaultMenu = {
    add: {
      Caption: "Добавить раздел",
      value: "AddSection",
      item: item || tree,
      text: itemText,
      id
    },
    addSub: {
      Caption: "Добавить подраздел",
      value: "AddSubSection",
      item: item || tree,
      text: itemText,
      id
    },
    del: {
      Caption: `Удалить раздел ${itemText}`,
      value: "Delete",
      item,
      text: itemText,
      id,
      Disabled: !item || item.dataset.noDel === "1"
    },
    params: {
      Caption: `Параметры`,
      value: "Params"
    }
  };
  if (data.props.defaultMenu) {
    data.props.defaultMenu.forEach((selector) => {
      defaultMenu2.push(treeDefaultMenu[selector]);
    });
  }
  data.items.push(
    await data.CreateMenuItem({
      MenuData: data.AssignMenuItems("Field", data.clickMenu.arr || [], defaultMenu2)
    })
  );
}
async function paramsMenu(data) {
  if (data.event.target.tagName === "INPUT") return;
  let savedItems, currentSample;
  const endOptions = [];
  if (typeof data.props.onRightClick === "function") {
    data.event.preventDefault();
    const result = await data.props.onRightClick();
    savedItems = Object.values(result.json).map((item) => {
      return {
        Caption: `Шаблон ${typeof item === "object" ? item.text : item}`,
        value: "SelectSample",
        name: typeof item === "object" ? item.text : item
      };
    });
    currentSample = result.Sample;
    endOptions.push({
      Caption: "Фильтр параметров",
      value: "FilterParams",
      Image: result.filter && /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { fontSize: "small" })
    });
  }
  const options = [];
  if (savedItems.length) {
    options.push({
      Caption: "Сохраненные шаблоны",
      items: { ...savedItems }
    });
    if (currentSample) {
      options.push({
        Caption: `Удалить шаблон: ${currentSample}`,
        value: "DeleteSample",
        name: currentSample
      });
    }
  }
  data.items.push(
    await data.CreateMenuItem({
      MenuData: data.AssignMenuItems("Field", [], [...options, ...data.menuForGrid.Field, ...endOptions])
    })
  );
}
async function addressMenu(data) {
  const rec = data.event.target.closest("TR");
  if (!rec) {
    data.setContextMenu(null);
    return;
  }
  data.items.push(
    await data.CreateMenuItem({
      MenuData: data.AssignMenuItems(
        "Field",
        [],
        [
          {
            Caption: `Очистить значение для: ${rec.dataset.name}`,
            value: "ClearValues",
            rec
          }
        ]
      )
    })
  );
}
async function gridMenu(data) {
  data.gridRef.current = data.target.closest(".grid-panel");
  if (
    //ищем есть ли класс у элемента, если есть то это клик в грид
    data.ClassListForGridMain.includes(data.target.classList[0])
  ) {
    if (typeof data.props.onRightClick === "function") {
      data.event.preventDefault();
      data.clickMenu = await data.props.onRightClick({ grid: data.gridRef.current.grid });
      data.clickMenu = data.clickMenu ? data.clickMenu : {};
      if (data.clickMenu.arr && data.clickMenu.arr.length > 0 && data.clickMenu.arr[data.clickMenu.arr.length - 1].Caption !== "Divider") {
        if (!data.clickMenu.arr[0].ID) {
          data.clickMenu.arr[0].ID = "0";
        }
        data.clickMenu.arr.push({ Caption: "Divider" });
      }
    }
    data.buttonsArr = data.AssignMenuItems(
      "Table",
      data.clickMenu.arr ? data.clickMenu.arr : [],
      data.menuForGrid.Table
    );
    data.items.push(
      await data.CreateMenuItem({
        MenuData: [data.clickMenu.status, ...data.buttonsArr],
        State: data.clickMenu.state
      })
    );
  } else if (data.ClassListForGridHead.includes(data.target.classList[0]) || data.target.closest("grid-column")) {
    let fieldInfoElem, el = data.target;
    while (el) {
      fieldInfoElem = el.field;
      if (fieldInfoElem) break;
      el = el.parentElement;
    }
    data.buttonsArr = data.AssignMenuItems("Header", [], data.menuForGrid.Header);
    data.buttonsArr.unshift({
      Caption: `Скрыть столбец ${el.field.title}`,
      value: "HideColumn"
    });
    data.GetSortButtons(el.field.sortDirect, data.buttonsArr);
    data.items.push(
      await data.CreateMenuItem({
        MenuData: data.buttonsArr,
        addictionalInfo: {
          fieldName: el.field.fieldName,
          textcomponent: el
        }
      })
    );
  } else if (
    //клик в область группировки
    data.ClassListForGridGroup.includes(data.target.classList[0])
  ) {
    data.buttonsArr = data.AssignMenuItems("Grouping", [], data.menuForGrid.Grouping);
    data.items.push(await data.CreateMenuItem({ MenuData: data.buttonsArr }));
  } else {
    data.setContextMenu(null);
  }
}
async function clsbooksGrid(data) {
  data.gridRef.current = data.target.closest(".grid-panel");
  const grid = data.gridRef.current.grid;
  if (
    //ищем есть ли класс у элемента, если есть то это клик в грид
    data.ClassListForGridMain.includes(data.target.classList[0])
  ) {
    if (typeof data.props.onRightClick === "function") {
      data.clickMenu = await data.props.onRightClick();
      data.clickMenu = data.clickMenu ? data.clickMenu : {};
      if (data.clickMenu.arr && data.clickMenu.arr.length > 0 && data.clickMenu.arr[data.clickMenu.arr.length - 1].Caption !== "Divider") {
        if (!data.clickMenu.arr[0].ID) {
          data.clickMenu.arr[0].ID = "0";
        }
        data.clickMenu.arr.push({ Caption: "Divider" });
      }
    }
    let clsMenu = [];
    await setClsMenu(clsMenu, grid);
    data.buttonsArr = data.AssignMenuItems("Table", data.clickMenu.arr ? data.clickMenu.arr : [], [
      ...data.menuForGrid.Table,
      ...clsMenu
    ]);
    data.items.push(
      await data.CreateMenuItem({
        MenuData: [data.clickMenu.status, ...data.buttonsArr],
        State: data.clickMenu.state
      })
    );
  } else if (data.ClassListForGridHead.includes(data.target.classList[0]) || data.target.closest("grid-column")) {
    let fieldInfoElem, el = data.target;
    while (el) {
      fieldInfoElem = el.field;
      if (fieldInfoElem) break;
      el = el.parentElement;
    }
    data.buttonsArr = data.AssignMenuItems("Header", [], data.menuForGrid.Header);
    data.buttonsArr.unshift({
      Caption: `Скрыть столбец ${el.field.title}`,
      value: "HideColumn"
    });
    data.GetSortButtons(el.field.sortDirect, data.buttonsArr);
    data.items.push(
      await data.CreateMenuItem({
        MenuData: data.buttonsArr,
        addictionalInfo: {
          fieldName: el.field.fieldName,
          textcomponent: el
        }
      })
    );
  } else if (
    //клик в область группировки
    data.ClassListForGridGroup.includes(data.target.classList[0])
  ) {
    data.buttonsArr = data.AssignMenuItems("Grouping", [], data.menuForGrid.Grouping);
    data.items.push(await data.CreateMenuItem({ MenuData: data.buttonsArr }));
  } else {
    data.setContextMenu(null);
  }
}
async function setClsMenu(clsMenu, grid) {
  clsMenu.push({ Caption: "Divider" });
  const recordData = await grid.source.getRecordData();
  if (recordData.info.hidden) {
    clsMenu.push({
      Caption: "Открыть классификатор",
      value: "ShowCls",
      state: "0",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOutlinedIcon, {})
    });
  } else {
    clsMenu.push({
      Caption: "Скрыть классификатор",
      value: "HideCls",
      state: "1",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOffOutlinedIcon, {})
    });
  }
  clsMenu.push({
    Caption: "Показывать только используемые",
    Image: grid.source.actual ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) : void 0,
    value: "ShowActualCls",
    state: grid.source.actual
  });
  clsMenu.push({ Caption: "Divider" });
  let deleteDisabled;
  if (grid.source.getFieldTextSync("ID") < 0 || grid.source.getFieldTextSync("$CfgID")) {
    deleteDisabled = true;
  }
  clsMenu.push({
    Caption: "Удалить запись",
    value: "Delete",
    Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" }),
    Disabled: deleteDisabled
  });
  clsMenu.push({ Caption: "Divider" });
}
async function reportMenu(data) {
  data.clickMenu = await data.props.onRightClick();
  if (data.clickMenu.Items) {
    data.items.push(await data.CreateMenuItem({ MenuData: data.clickMenu.Items.items }));
  }
}
async function defaultMenu(data, items, CreateMenuItem) {
  if (data && data instanceof Array) {
    items.push(await CreateMenuItem({ MenuData: data }));
  }
}
async function popupMenu(data) {
  let namePopupMenu, el = data.target;
  while (el) {
    namePopupMenu = el.getAttribute("namePopupMenu");
    if (namePopupMenu) break;
    el = el.parentElement;
  }
  const popupMenu2 = data.props.onRightClick();
  if (popupMenu2 && namePopupMenu) {
    let fixedItems = [];
    data.loadPopupMenu(fixedItems, popupMenu2.get(namePopupMenu));
    data.items.push(await data.CreateMenuItem({ MenuData: fixedItems }));
  }
}
async function personPhotoMenu(data) {
  data.items.push(
    await data.CreateMenuItem({
      MenuData: data.AssignMenuItems("Field", [], [...data.menuForGrid.Field])
    })
  );
}
function GetDisable(ID2, json, bool) {
  if (isEmptyObject(json)) return bool;
  return json.reduce((acc, val) => {
    if (val.ID !== ID2) return acc;
    return acc = val.Disabled === "1";
  }, bool);
}
const gridsContext = [
  "grid",
  "clsbook",
  "accountsAnalitic",
  "accountsPlan",
  "personsChildren",
  "personsTable",
  "paytypes",
  "distractions",
  "schedule",
  "organizations",
  "NFA"
];
const GridMenuJson = {
  //grid
  Table: [
    // {
    //   Caption: "Копировать запись",
    //   Image: <ContentCopy fontSize="small" />,
    //   Disabled: true,
    // },
    // { доработка на след год
    //   Caption: "Вырезать запись",
    //   Image: <ContentCut fontSize="small" />,
    //   Disabled: true,
    // },
    // {
    //   Caption: "Вставить из буфера",
    //   Image: <ContentPaste fontSize="small" />,
    //   Disabled: true,
    // },
    // { Caption: "Divider" },
    {
      Caption: "Новая запись",
      value: "Insert",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
    },
    {
      Caption: "Удалить запись",
      value: "Delete",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
    },
    { Caption: "Divider" },
    {
      Caption: "Настройки...",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SettingsIcon, { fontSize: "small" }),
      value: "Settings"
    },
    { Caption: "Divider", value: "SettingsDivider" },
    { Caption: "Режим просмотра", value: "OnlyViewMode", ShortCutString: "Ctrl + B" }
    // { Caption: "Сохранять отметку", Disabled: true },
  ],
  Header: [
    { Caption: "Divider" },
    {
      Caption: "По возрастанию",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small" }),
      value: "Sort"
    },
    {
      Caption: "По убыванию",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small", style: { transform: "scale(1,-1)" } }),
      value: "Sort-"
    },
    {
      Caption: "Снять сортировку",
      value: "ClearSort"
    },
    { Caption: "Divider" },
    {
      Caption: "Группировать по этому полю",
      value: "GroupBy",
      Disabled: false
    },
    {
      Caption: "Снять группировку по этому полю",
      value: "GroupByTakeOff",
      Disabled: false
    },
    { Caption: "Область группировки", value: "GroupShow" },
    { Caption: "Расширенная группировка", Disabled: true },
    { Caption: "Поиск по столбцу", value: "searchByColumn" }
  ],
  Grouping: [
    { Caption: "Область группировки", value: "GroupShow" },
    { Caption: "Расширенная группировка", Disabled: true }
  ]
};
const ClassListForGridMain = ["grid-td", "grid-cell-inner", "grid-data"];
const ClassListForGridHead = [
  "column-header-text",
  "grid-column-title",
  "grid-column",
  "column-span",
  "grid-column-img"
];
const ClassListForGridGroup = ["grid-groups-text", "grid-groups"];
function ContextMenu(props) {
  const [contextMenu, setContextMenu] = reactExports.useState(null);
  const [open, setOpen] = reactExports.useState(false);
  const [contextMenuJSX, setContextMenuJSX] = reactExports.useState(null);
  const [AssMass, setAssMass] = reactExports.useState(/* @__PURE__ */ new Map());
  const [anchorElAss, setAnchorElAss] = reactExports.useState(/* @__PURE__ */ new Map());
  const parentNameRef = reactExports.useRef(null);
  const gridRef = reactExports.useRef(null);
  const ContextMenuBlockRef = reactExports.useRef(null);
  const sizeForMenu = {
    itemHeight: 28
  };
  reactExports.useEffect(() => {
    props.getContextMenuFunction && props.getContextMenuFunction(handleContextMenu);
  }, []);
  const handleContextMenu = async (event) => {
    if (!event) return;
    const target = event.target;
    if (target) getParentNameRef(target);
    let items = [], clickMenu = [], buttonsArr = [];
    if (event.stopPropagation) event.stopPropagation();
    let menuForGrid = props.Menu ? props.Menu : GridMenuJson;
    function getParentNameRef(target2) {
      try {
        if (target2.attributes.keyname !== void 0) {
          parentNameRef.current = target2.attributes.keyname.value;
        } else if (target2.firstChild.attributes !== void 0) {
          parentNameRef.current = target2.firstChild.attributes.keyname.value;
        } else if (target2.parentNode.attributes !== void 0) {
          parentNameRef.current = target2.parentNode.attributes.keyname.value;
        } else {
          parentNameRef.current = target2.textContent;
        }
      } catch {
        console.error("ContextMenu: Error in getParentNameRef");
        parentNameRef.current = "";
      }
    }
    function loadPopupMenu(out, json) {
      for (const value of Object.values(json)) {
        if (value && value.Type === "TMenuItem") {
          let outItem = [];
          loadPopupMenu(outItem, value);
          outItem.length > 0 ? out.push({
            Name: value.Name,
            Caption: value.Caption,
            hidden: value.Visible == 0 ? true : false,
            items: outItem
          }) : out.push({
            Name: value.Name,
            Caption: value.Caption,
            hidden: value.Visible == 0 ? true : false
          });
        }
      }
    }
    const data = {
      event,
      target,
      props,
      clickMenu,
      items,
      buttonsArr,
      menuForGrid,
      CreateMenuItem,
      AssignMenuItems,
      setContextMenu,
      gridRef,
      GetSortButtons,
      ClassListForGridMain,
      ClassListForGridHead,
      ClassListForGridGroup,
      loadPopupMenu
    };
    const getContextMenu = {
      grid: gridMenu,
      clsbook: clsbooksGrid,
      tree: treeMenu,
      params: paramsMenu,
      addressParams: addressMenu,
      reports: reportMenu,
      popupmenu: popupMenu,
      accountsPlan: gridMenu,
      accountsAnalitic: gridMenu,
      personsChildren: gridMenu,
      personsTable: gridMenu,
      paytypes: gridMenu,
      distractions: gridMenu,
      personsPhoto: personPhotoMenu,
      schedule: gridMenu,
      organizations: gridMenu,
      NFA: gridMenu
    };
    const createContextMenu = getContextMenu[props.for];
    createContextMenu && await createContextMenu(data) || await defaultMenu(props.data, items, CreateMenuItem);
    if (items.length > 0) setContextMenuJSX(items);
    if (props.for === "grid") ;
    if (!items.length) {
      return;
    }
    event.preventDefault();
    setOpen(true);
    setContextMenu(
      contextMenu === null ? {
        mouseX: event.clientX + 2,
        mouseY: event.clientY - 6
      } : null
    );
  };
  function AssignMenuItems(sectionItems, reqestItems, baseItems) {
    const sectItems = props.data ? props.data[sectionItems] ? props.data[sectionItems] : [] : [];
    return [...sectItems, ...reqestItems, ...baseItems];
  }
  const calcSumm = async ({ grid }) => {
    const multiSelect = grid.grid.getMultiSelect(), selectedField = grid.grid.getSelectedField();
    const arrOfValues = await Promise.all(
      multiSelect.map(async (val) => await grid.grid.getActiveSource().getFieldText(selectedField, val))
    );
    const summ = arrOfValues.reduce((acc, val) => {
      const replacedText = val.replaceAll(" ", "").replaceAll(",", ".");
      const numbersAsString = replacedText.match(/(\d+\.?\d*)/g);
      if (!numbersAsString) return acc;
      const [num] = numbersAsString;
      return acc + parseFloat(num);
    }, 0);
    if (summ === 0) return;
    const fieldTitle = grid.grid.getFieldInfo(selectedField).title;
    const formatedSumm = String(summ).replace(/\B(?=(\d{3})+(?!\d))/g, " ");
    outPutShow(`Сумма по полю "${fieldTitle}": ${formatedSumm}`);
  };
  async function GridContextMenuHandler(data) {
    if (gridsContext.includes(props.for)) {
      const comand = data.value;
      const grid = gridRef.current;
      switch (comand) {
        // HEADER
        case "GroupShow":
          grid.grid.setOptions(2);
          break;
        case "Sort-":
          data.textcomponent.field.sortDirect = "down";
          grid.grid.sortByRecord(data.textcomponent);
          break;
        case "Sort":
          data.textcomponent.field.sortDirect = "up";
          grid.grid.sortByRecord(data.textcomponent);
          break;
        case "ClearSort":
          grid.grid.sortByRecord(data.textcomponent, true, true);
          break;
        // GRID
        case "OnlyViewMode": {
          if (grid.grid.doccfgid) {
            handleClick(data);
          } else {
            grid.grid.ChangeViewMode();
          }
          break;
        }
        case "Insert":
          grid.grid.insertRecord(true);
          break;
        case "SaveRedactor":
          grid.grid.postExicstedEditRec(true);
          break;
        case "CancelRedactor":
          grid.grid.cancelRecord();
          break;
        case "AddGroup":
          grid.grid.insertRecord(true);
          break;
        case "AddGroupInner":
          grid.grid.insertRecord(true, void 0, { Child: "1" });
          break;
        case "Delete":
          grid.grid.deleteRecord().then(() => {
            grid.grid.refreshSource("!");
          });
          break;
        case "HideColumn":
          grid.grid.hideColumn(data.textcomponent.field);
          break;
        case "searchByColumn":
          setTimeout(() => {
            grid.grid.searchByColumn(void 0, data.textcomponent.field.el);
          }, 1);
          break;
        case "GroupBy": {
          grid.grid.groupByField(data.textcomponent.field);
          break;
        }
        case "GroupByTakeOff": {
          grid.grid.groupByField(data.textcomponent.field, true);
          break;
        }
        case "calc": {
          await calcSumm({ grid });
          break;
        }
        default:
          handleClick(data);
          break;
      }
    } else {
      if (props.for === "popupmenu") {
        handlePopupClick(data);
      } else {
        handleClick(data);
      }
    }
    setContextMenu(null);
    setOpen(false);
  }
  async function CreateMenuItem(json) {
    let items = [], availability, state, canGroupOrSort = props.canGroupOrSort ? props.canGroupOrSort : true;
    for (const [key, value] of Object.entries(json.MenuData)) {
      if (value) {
        if (value.ID) value.IDfix = value.ID;
        if (value.Caption === "Divider" || value.Caption === "-") {
          if (shouldShow(value, json.addictionalInfo)) {
            items.push(/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, {}, key));
          }
        } else {
          if (value.items) {
            let currentValue = value;
            if (currentValue.ImageIndex) {
              currentValue.Image = getIcons(currentValue.ImageIndex);
            }
            if (currentValue.ProgID) {
              currentValue.ID = currentValue.ProgID;
            }
            CreateMap(value);
            items.push(
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                NestedMenuItem,
                {
                  style: { paddingLeft: "26px", height: sizeForMenu.itemHeight, marginLeft: 2 },
                  leftIcon: currentValue.Image === void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { paddingLeft: "16px" } }) : ImgURL(currentValue.Image, {
                    height: "16px",
                    width: "16px",
                    marginLeft: -13,
                    marginTop: 3,
                    marginRight: 13
                  }),
                  label: currentValue.Caption,
                  parentMenuOpen: true,
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Grid$1,
                      {
                        item: true,
                        style: {
                          backgroundColor: "#e6e6e6",
                          position: "absolute",
                          height: "100%",
                          width: props.for === "popupmenu" ? "0px" : "46px",
                          top: "0px"
                        }
                      }
                    ),
                    await CreateMenuItem({
                      MenuData: currentValue.items,
                      addictionalInfo: json.addictionalInfo,
                      State: json.State
                    })
                  ]
                },
                key
              )
            );
          } else {
            let currentValue = value;
            currentValue = updateValue(currentValue, json.addictionalInfo);
            if (currentValue.ImageIndex) {
              currentValue.Image = getIcons(currentValue.ImageIndex);
            }
            if (currentValue.ProgID) {
              currentValue.ID = currentValue.ProgID;
            }
            if (currentValue.value && currentValue.value === "Insert" || currentValue.value === "Delete" || currentValue.value === "RecordCopy") {
              currentValue = await checkDisableByCanModify(currentValue);
              currentValue = await getSaveOrCancelVal(currentValue);
            }
            canGroupOrSort = shouldShow(currentValue, json.addictionalInfo);
            availability = currentValue.Disabled === "1" ? true : currentValue.Disabled || false;
            state = await json.State;
            availability = await state ? await GetDisable(currentValue.ID, state, availability) : availability;
            if (canGroupOrSort)
              items.push(
                /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  MenuItem,
                  {
                    onClick: () => {
                      GridContextMenuHandler({
                        ...json.addictionalInfo,
                        ...currentValue
                      });
                    },
                    style: { height: sizeForMenu.itemHeight, display: currentValue.hidden ? "none" : "" },
                    disabled: availability,
                    value: currentValue.value,
                    id: currentValue.ID === void 0 ? "" : currentValue.ID,
                    status: currentValue.Status === void 0 ? "" : currentValue.Status,
                    ...json.addictionalInfo,
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemIcon, { sx: { display: props.for === "popupmenu" ? "none" : "" }, children: [
                        currentValue.Image && currentValue.ID || currentValue.Status ? ImgURL(currentValue.Image, { width: "20px" }) : null,
                        currentValue.Image && !currentValue.ID && !currentValue.Status ? currentValue.Image : null
                      ] }),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        ListItemText$1,
                        {
                          inset: true,
                          style: { padding: 0 },
                          value: currentValue.value,
                          id: currentValue.ID === void 0 ? "" : currentValue.ID,
                          children: currentValue.Caption
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "body2", color: "text.secondary", children: currentValue.ShortCutString })
                    ]
                  },
                  key + "contextMenu"
                )
              );
          }
        }
      }
    }
    return items;
  }
  function getSaveOrCancelVal(currentValue) {
    let returnButton = currentValue;
    if (!gridRef.current) return returnButton;
    const grid = gridRef.current;
    const isEditMode = grid.grid.getActiveSource().isEditModeState();
    const isMultiSelect = grid.grid.getMultiSelect().length > 0;
    let isEditModeText = isEditMode === 1 && "редактирование";
    isEditModeText = isEditMode === 3 ? "вставку" : isEditModeText;
    switch (currentValue.value) {
      case "Insert": {
        if (isEditMode === 0 || isEditMode === 3) {
          returnButton = {
            Caption: `Сохранить ${isEditModeText}`,
            value: "SaveRedactor",
            Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SaveAltIcon, { fontSize: "small" }),
            Disabled: currentValue.Disable
          };
        }
        break;
      }
      case "Delete": {
        if (isEditMode === 0 || isEditMode === 3) {
          returnButton = {
            Caption: `Отменить ${isEditModeText}`,
            value: "CancelRedactor",
            Image: /* @__PURE__ */ jsxRuntimeExports.jsx(CancelIcon, { fontSize: "small" }),
            Disabled: currentValue.Disable
          };
        }
        break;
      }
      case "RecordCopy": {
        if (isMultiSelect) {
          returnButton = {
            Caption: `Создать копии документов`,
            value: "RecordCopy",
            Disabled: currentValue.Disable
          };
        }
        break;
      }
    }
    return returnButton;
  }
  function checkDisableByCanModify(currentValue) {
    let returnButton = currentValue;
    if (!gridRef.current) return returnButton;
    const grid = gridRef.current;
    let canModifyDelete = checkAvailabilityFromCanModify(2, grid.grid), canModifyInsert = checkAvailabilityFromCanModify(0, grid.grid);
    switch (currentValue.value) {
      case "Insert": {
        returnButton = {
          ...currentValue,
          Disabled: currentValue.Disabled ? currentValue.Disabled : canModifyInsert
        };
        break;
      }
      case "Delete": {
        returnButton = {
          ...currentValue,
          Disabled: currentValue.Disabled ? currentValue.Disabled : canModifyDelete
        };
        break;
      }
      case "RecordCopy": {
        returnButton = {
          ...currentValue,
          Disabled: currentValue.Disabled ? currentValue.Disabled : canModifyInsert
        };
        break;
      }
    }
    return returnButton;
  }
  function updateValue(currentValue, addictionalInfo) {
    if (gridRef.current && props.canGroupOrSort === void 0 && currentValue.value) {
      const grid = gridRef.current.grid;
      const comand = currentValue.value;
      switch (comand) {
        case "OnlyViewMode": {
          return {
            ...currentValue,
            Image: gridRef.current.grid.OnlyViewMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { fontSize: "small" }) : null
          };
        }
        case "calc": {
          const multiSelect = grid.getMultiSelect(), selectedField = grid.getSelectedField();
          const fieldTitle = grid.getFieldInfo(selectedField).title;
          if (multiSelect.length === 0) return { ...currentValue, hidden: true };
          if (multiSelect.length > 0)
            return {
              ...currentValue,
              Caption: `Сумма по полям "${fieldTitle}"`
            };
          break;
        }
        default:
          if (props.changeDataOfItem) {
            return {
              ...currentValue,
              ...props.changeDataOfItem(currentValue, addictionalInfo)
            };
          } else {
            return currentValue;
          }
      }
    } else {
      return currentValue;
    }
  }
  function shouldShow(currentValue, addictionalInfo) {
    if (gridRef.current && props.canGroupOrSort === void 0 && currentValue.value) {
      let canShow = true;
      if (addictionalInfo && addictionalInfo.textcomponent) {
        const field = addictionalInfo.textcomponent.field;
        if (currentValue.value.includes("GroupBy")) {
          let isFieldGrouped = false;
          canShow = gridRef.current.grid.canGroup(field);
          for (const val of gridRef.current.grid.getGroups()) {
            if (val.fieldName === field.fieldName) isFieldGrouped = true;
          }
          if (canShow) {
            switch (currentValue.value) {
              case "GroupBy":
                if (isFieldGrouped) canShow = false;
                break;
              case "GroupByTakeOff":
                if (!isFieldGrouped) canShow = false;
                else canShow = true;
                break;
            }
          }
        }
        if (currentValue.value.includes("Sort") && gridRef.current) canShow = gridRef.current.grid.canSort(field);
        if (currentValue.value === "HideColumn" && gridRef.current.grid.detailsInDetail) canShow = false;
      } else {
        switch (currentValue.value) {
          case "Details": {
            if (!props.Details) canShow = false;
            break;
          }
          case "PrintSelectedRecords": {
            if (gridRef.current.grid.getMultiSelect().length === 0) {
              canShow = false;
            }
            break;
          }
          case "Settings": {
            if (!gridRef.current.grid.doccfgid) {
              canShow = false;
            }
            break;
          }
          case "SettingsDivider": {
            if (!gridRef.current.grid.doccfgid) {
              canShow = false;
            }
            break;
          }
        }
      }
      return canShow;
    } else {
      return true;
    }
  }
  function CreateMap(List3) {
    for (const value of Object.values(List3)) {
      setAnchorElAss(anchorElAss.set(value.Caption, null));
      setAssMass(AssMass.set(value.Caption, false));
    }
  }
  function GetSortButtons(sortDirect, arr) {
    switch (sortDirect) {
      case "down":
        arr.splice(2, 1);
        break;
      case "up":
        arr.splice(3, 1);
        break;
      default:
        arr.splice(4, 1);
        break;
    }
  }
  const handlePopupClick = (event) => {
    if (props.onMenuItemClick) {
      props.onMenuItemClick(event, event.Name, null, null, parentNameRef.current);
    }
    setContextMenu(null);
  };
  const handleClick = (event) => {
    if (props.onMenuItemClick) {
      props.onMenuItemClick(event, gridRef.current);
    }
    setContextMenu(null);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    "div",
    {
      onContextMenu: handleContextMenu,
      style: { cursor: "context-menu", height: "100%", width: "100%", ...props.style },
      children: [
        props.children,
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Menu,
          {
            open: contextMenu !== null,
            onClose: () => {
              setContextMenu(null);
            },
            anchorReference: "anchorPosition",
            anchorPosition: contextMenu !== null ? { top: contextMenu.mouseY, left: contextMenu.mouseX } : void 0,
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  item: true,
                  style: {
                    backgroundColor: "#e6e6e6",
                    position: "absolute",
                    height: "100%",
                    width: props.for === "popupmenu" ? "0px" : "46px"
                  }
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  item: true,
                  onLoad: () => {
                    if (
                      //КОСТЫЛЬ ДЛЯ ФАЕРФОКСА todo
                      ContextMenuBlockRef.current && ContextMenuBlockRef.current.parentElement.parentElement.parentElement.clientHeight < ContextMenuBlockRef.current.scrollHeight
                    ) {
                      ContextMenuBlockRef.current.style.paddingRight = "15px";
                    }
                  },
                  ref: ContextMenuBlockRef,
                  children: contextMenuJSX
                }
              )
            ] })
          }
        )
      ]
    }
  );
}
const IconFolder = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABmJLR0QA/wD/AP+gvaeTAAAAmElEQVRIiWNgGAUDDRhhjP/zGbwYGBlmMjAwyGCo+s/QyJjI0ECOBUxIVmE3HCJX/38+eRYgfLCW5z+DpAQDAwsLOeYgwJ8/fxm+fGpkdHvVjGrBMZX/FBsOA79//2W0vsvCwIAcRNQynIGBgYGVlRnGZMKnjhpg1IJRC0YtQLXgCfWM/f8Y0wLGf2nIEhQanka5OaOAWgAAdiEh3MqSfL4AAAAASUVORK5CYII=";
const IconList = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABmJLR0QA/wD/AP+gvaeTAAACfElEQVRIib2VTUhUURTHf/fNjOPofGTWfOVMhhFUEgRhUabkYtZCm8gEjWzRokULlwUZSLswIlxE4iKiWgUVmYsgCJqNMKEwZUKMjOP4AY36Xlq+12IEpxnfvKcz9d8c7nmH87v3nvPOhf8ske/IZDK1QLMQosJ0EiHiTqcztm3g0tKSV1XVz0IIr1nYhjRFUfp8Pt8to0Br3rpVCOG91nOf1bVf5kiqRlvkuLjU2XZzZmZGDgQCd00DVVW1CyFQNY07jww3C0B6WWWgfxjx5AMdF8/2JxIJJRQKDejFS6ayFpGQJILnO3kXTfDs+UfhdrvvxePxK/8MCCAsFuouXObV+y+8fjMm/H7/YCwW694qNr+GBRqfh6kfhX6PHVrqNteSzUaoo4enQw9xOCqk1pbDgyMjIwuRSOTltoDzP2F6udC/stFTlVZwWEHVgKpKDnZdZfjxA0LBXbZwONwHjAKyaaCexMYP5aqArqO5X6oZTTYx+S1F08kDLmAv8N00sDkIpwKFfkvByNDfW+7CEGiRwGI6t7EMgROLEKyG2BykFf24Ez6od5cBeGR31uZ2ZCkyBKblbGMklyGzph9X74EaexmAFpGdDlYJ7EWKaXaCGAJrHVm730R9ygKcWICgE8bSkFzRjzsTLFfT1GbtuZBxMjMyHm0KuGyQkjfH2Vba58zO15KBqgYq8FuD1fUiccYsc0BvVdY2eExmNFBZ3sPtaMsTKvIqb1+M7jjp5PgUe04fMgX8CnD9RjuyXGSsGKgheIzGxjDpuWSKvPL+BfR4PJ+i0ehtn9/ZDo6Srjs1O73Y29s7BMzm+vVetRrAVQoQWAfmgJ1fVTn0B+QbqU31/zFJAAAAAElFTkSuQmCC";
const expandIcon = `
          <svg
            class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium css-i4bv87-MuiSvgIcon-root"
            focusable="false"
            aria-hidden="true"
            viewBox="0 0 24 24"
            data-testid="ExpandMoreIcon"
            style="height: 15px; width: 15px;"
          >
            <path d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"></path>
          </svg>
        `;
function createSingleItem(data) {
  const newItem = document.createElement("LI");
  newItem.style.borderLeft = "1px solid #eeeeee";
  newItem.style.marginLeft = "11px";
  newItem.id = `tree-item_${data.id}`;
  newItem.key = `tree-item_${data.id}`;
  newItem.selected = data.id === data.props.ObjRef || data.id === data.res.Current;
  newItem.dataset.noDel = data.item.noDel;
  newItem.dataset.noEdit = data.item.noEdit;
  return newItem;
}
function createGroupItem(data) {
  const newItemsGroup2 = document.createElement("LI");
  newItemsGroup2.style.borderLeft = "1px solid #eeeeee";
  newItemsGroup2.style.marginLeft = "11px";
  newItemsGroup2.id = `tree-group_${data.id}`;
  newItemsGroup2.key = `tree-group_${data.id}`;
  newItemsGroup2.selected = data.id === data.props.ObjRef || data.id === data.res.Current;
  newItemsGroup2.dataset.noDel = data.item.noDel;
  newItemsGroup2.dataset.noEdit = data.item.noEdit;
  return newItemsGroup2;
}
function createSingleItemContent(data) {
  const content2 = document.createElement("div");
  content2.id = data.id;
  content2.classList.add("tree-item");
  content2.style.paddingLeft = "23px";
  content2.tabIndex = 0;
  content2.dataset.noDel = data.item.noDel;
  content2.dataset.noEdit = data.item.noEdit;
  return content2;
}
function createGroupItemContent(data) {
  const content2 = document.createElement("div");
  content2.id = data.id;
  content2.classList.add("tree-item");
  content2.tabIndex = 0;
  content2.dataset.noDel = data.item.noDel;
  content2.dataset.noEdit = data.item.noEdit;
  return content2;
}
function createSingleItemContainer(data) {
  const ul = document.createElement("UL");
  if (data.items.length - 1 > data.index) ul.style.borderBottom = "1px solid #eeeeee";
  ul.style.listStyleType = "none";
  ul.style.paddingLeft = "12px";
  return ul;
}
function createGroupItemContainer(data) {
  const ul = document.createElement("UL");
  if (data.items.length - 1 > data.index) ul.style.borderBottom = "1px solid #eeeeee";
  ul.style.listStyleType = "none";
  ul.style.paddingLeft = "12px";
  ul.group = "true";
  ul.classList.add("tree-group");
  ul.expanded = data.item.items ? "true" : "false";
  return ul;
}
function createCheckbox(data) {
  const checbox = document.createElement("input");
  checbox.type = "checkbox";
  checbox.style.display = data.selectionMode.current || data.props.checkModeOnly ? "" : "none";
  checbox.classList.add("tree-item-checkbox");
  checbox.checked = data.selection.current.indexOf(data.id) !== -1 ? true : false;
  return checbox;
}
function createCheckboxMultiCheck(data) {
  const checbox = document.createElement("div");
  checbox.style.display = data.props.MultiCheckSet ? "" : "none";
  checbox.classList.add("tree-item-checkbox-mc");
  checbox.checkState = data.item.CheckState;
  checbox.id = `mc_${data.id}`;
  checbox.innerHTML = getMulticheckIconForTree(data.item.CheckState);
  return checbox;
}
function createExpandButton(data) {
  const expandButton = document.createElement("button");
  expandButton.classList.add("expandButton");
  expandButton.expanded = data.item.items ? "true" : "false";
  expandButton.style.transform = data.item.items ? "" : "rotate(-90deg)";
  expandButton.innerHTML = expandIcon;
  return expandButton;
}
function getIcon(data) {
  const json = getIcons(data.image);
  if (json) {
    return ImgURLSRC(json);
  }
}
function getInnerContent(data) {
  let src;
  if (data.image) {
    src = data.image;
  }
  data.values.current[data.id] = data.text;
  const innerText = document.createElement("div");
  innerText.innerText = data.text;
  innerText.title = data.text;
  innerText.id = `text-tree-item_${data.id}`;
  innerText.style.display = "grid";
  innerText.style.alignItems = "center";
  innerText.style.color = setColor$1(data.item.Color) || "";
  const img = document.createElement("img");
  if (src) {
    img.src = src;
    img.style.width = "21px";
  } else {
    img.src = data.group ? IconFolder : IconList;
  }
  img.style.marginRight = "5px";
  return [innerText, img];
}
function createFullItem(data) {
  const newItem = createSingleItem(data);
  const div = createSingleItemContent(data);
  if (newItem.selected) {
    div.classList.add("tree-item-selected");
  }
  let icon;
  if (data.image) {
    icon = getIcon(data);
  }
  const innerContent = getInnerContent({ ...data, text: data.text || "", group: false, image: icon });
  const checbox = createCheckbox(data);
  const multiCheckbox = createCheckboxMultiCheck(data);
  div.insertAdjacentElement("afterbegin", innerContent[0]);
  div.insertAdjacentElement("afterbegin", innerContent[1]);
  div.insertAdjacentElement("afterbegin", checbox);
  div.insertAdjacentElement("afterbegin", multiCheckbox);
  const ul = createSingleItemContainer(data);
  ul.appendChild(div);
  ul.appendChild(newItem);
  return ul;
}
function createFullGroupItem(data) {
  const newItemsGroup2 = createGroupItem(data);
  const div = createGroupItemContent(data);
  if (newItemsGroup2.selected) {
    div.classList.add("tree-item-selected");
  }
  let icon;
  if (data.image) {
    icon = getIcon(data);
  }
  const innerContent = getInnerContent({ ...data, text: data.text || "", group: true, image: icon });
  const checbox = createCheckbox(data);
  const multiCheckbox = createCheckboxMultiCheck(data);
  const expandButton = createExpandButton(data);
  div.insertAdjacentElement("afterbegin", innerContent[0]);
  div.insertAdjacentElement("afterbegin", innerContent[1]);
  div.insertAdjacentElement("afterbegin", checbox);
  div.insertAdjacentElement("afterbegin", multiCheckbox);
  div.insertAdjacentElement("afterbegin", expandButton);
  const ul = createGroupItemContainer(data);
  ul.appendChild(div);
  ul.appendChild(newItemsGroup2);
  return ul;
}
const ConfirmationIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%20width='48'%20height='48'%3e%3cpath%20fill='%232196f3'%20d='M44,24c0,11.044-8.956,20-20,20S4,35.044,4,24S12.956,4,24,4S44,12.956,44,24z'%20/%3e%3cpath%20fill='%23e3f2fd'%20d='M23.758%2031.145c-.727%200-1.328.234-1.797.711-.469.473-.703%201.074-.703%201.805%200%20.719.23%201.313.688%201.781.461.469%201.063.703%201.816.703.75%200%201.352-.234%201.813-.703.457-.469.688-1.063.688-1.781%200-.73-.234-1.332-.703-1.805C25.094%2031.387%2024.48%2031.145%2023.758%2031.145zM29.184%2014.586C27.969%2013.527%2026.266%2013%2024.07%2013c-2.176%200-3.895.559-5.152%201.672-1.191%201.055-1.824%202.504-1.902%204.328H17v1h4.5l.008-.703c.02-.824.262-1.473.723-1.941.457-.473%201.074-.707%201.84-.707%201.617%200%202.422.871%202.422%202.617%200%20.578-.152%201.129-.465%201.648-.309.52-.934%201.195-1.871%202.027-.938.828-1.582%201.672-1.934%202.527-.355.855-.531%202.086-.531%203.531h3.98l.063-1.023c.113-1.012.563-1.891%201.352-2.645l1.262-1.191c.98-.949%201.672-1.813%202.063-2.59.395-.781.594-1.609.594-2.484C31%2017.137%2030.395%2015.645%2029.184%2014.586z'%20/%3e%3c/svg%3e";
const ErrorIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2080%2080'%20width='48'%20height='48'%3e%3cpath%20fill='%23f78f8f'%20d='M40,77.5C19.322,77.5,2.5,60.678,2.5,40S19.322,2.5,40,2.5S77.5,19.322,77.5,40S60.678,77.5,40,77.5%20z'%20/%3e%3cpath%20fill='%23c74343'%20d='M40,3c20.402,0,37,16.598,37,37S60.402,77,40,77S3,60.402,3,40S19.598,3,40,3%20M40,2%20C19.013,2,2,19.013,2,40s17.013,38,38,38s38-17.013,38-38S60.987,2,40,2L40,2z'%20/%3e%3cpath%20fill='%23fff'%20d='M37%2020H43V60H37z'%20transform='rotate(-134.999%2040%2040)'%20/%3e%3cpath%20fill='%23fff'%20d='M37%2020H43V60H37z'%20transform='rotate(-45.001%2040%2040)'%20/%3e%3c/svg%3e";
const InformationIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20x='0px'%20y='0px'%20width='48'%20height='48'%20viewBox='0%200%2048%2048'%3e%3cpath%20fill='%232196f3'%20d='M44,24c0,11.045-8.955,20-20,20S4,35.045,4,24S12.955,4,24,4S44,12.955,44,24z'%3e%3c/path%3e%3cpath%20fill='%23fff'%20d='M22%2022h4v11h-4V22zM26.5%2016.5c0%201.379-1.121%202.5-2.5%202.5s-2.5-1.121-2.5-2.5S22.621%2014%2024%2014%2026.5%2015.121%2026.5%2016.5z'%3e%3c/path%3e%3c/svg%3e";
const WarningIcon = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2040%2040'%20width='48'%20height='48'%3e%3cpath%20fill='%23ffeea3'%20d='M3.209,35.5c-0.617,0-1.169-0.319-1.477-0.853c-0.309-0.534-0.309-1.172,0-1.706L18.523,3.858%20c0.308-0.534,0.86-0.853,1.477-0.853s1.169,0.319,1.477,0.853l16.791,29.083c0.309,0.534,0.309,1.171,0,1.706%20c-0.308,0.534-0.86,0.853-1.477,0.853H3.209z'%20/%3e%3cpath%20fill='%23ba9b48'%20d='M20,3.506c0.209,0,0.73,0.059,1.044,0.603l16.791,29.083c0.314,0.544,0.105,1.025,0,1.206%20C37.73,34.578,37.419,35,36.791,35H3.209c-0.628,0-0.94-0.422-1.044-0.603c-0.105-0.181-0.314-0.662,0-1.206L18.956,4.109%20C19.27,3.564,19.791,3.506,20,3.506%20M20,2.506c-0.743,0-1.486,0.368-1.91,1.103L1.299,32.691C0.45,34.162,1.511,36,3.209,36h33.582%20c1.698,0,2.759-1.838,1.91-3.309L21.91,3.609C21.486,2.873,20.743,2.506,20,2.506L20,2.506z'%20/%3e%3cpath%20fill='%2336404d'%20d='M20%2027.517999999999997A1.696%201.696%200%201%200%2020%2030.91%201.696%201.696%200%201%200%2020%2027.517999999999997zM18.643%2012.929H21.357V25.143H18.643z'%20/%3e%3c/svg%3e";
const icons = {
  [DlgType.Warning]: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: WarningIcon, alt: "Warning Icon" }),
  [DlgType.Error]: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: ErrorIcon, alt: "Error Icon" }),
  [DlgType.Information]: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: InformationIcon, alt: "Information Icon" }),
  [DlgType.Confirmation]: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: ConfirmationIcon, alt: "Confirmation Icon" })
};
const buttonConfig = [
  { condition: Button$1.Ok, label: "ОК", value: DlgRes.Ok },
  { condition: Button$1.Yes, label: "Да", value: DlgRes.Yes },
  { condition: Button$1.No, label: "Нет", value: DlgRes.No },
  { condition: Button$1.Abort, label: "Прервать", value: DlgRes.Abort },
  { condition: Button$1.Retry, label: "Повторить", value: DlgRes.Retry },
  { condition: Button$1.Ignore, label: "Пропустить", value: DlgRes.Ignore },
  { condition: Button$1.All, label: "Для всех", value: DlgRes.All },
  { condition: Button$1.NoToAll, label: "Нет для всех", value: DlgRes.NoToAll },
  { condition: Button$1.YesToAll, label: "Да для всех", value: DlgRes.YesToAll },
  { condition: Button$1.Cancel, label: "Отмена", value: DlgRes.Cancel }
];
function MessageBox(props) {
  const buttonBlockRef = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (buttonBlockRef.current) {
      const firstButton = buttonBlockRef.current.querySelector("button");
      if (firstButton) firstButton.focus();
    }
  }, []);
  function handleClickButton(ev) {
    var _a2;
    smetaModals.close(props.smetaModalId);
    (_a2 = props.onSelect) == null ? void 0 : _a2.call(props, ev, props.RequestID, props.setReturnValue, props.from);
  }
  const buttons = [];
  const buttonFlags = props.Buttons ? Number(props.Buttons) : Button$1.Ok;
  buttonConfig.forEach(({ condition, label, value }) => {
    if (buttonFlags & condition) {
      buttons.push(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Button$2,
          {
            size: "small",
            style: { textTransform: "none" },
            variant: "outlined",
            className: "button_message",
            value,
            "data-requestid": props.RequestID,
            onClick: handleClickButton,
            children: label
          }
        )
      );
    }
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { style: { width: "100%", display: "flex" }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "48px", display: "flex", alignItems: "flex-start" }, children: icons[props.DlgType] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Box$1,
        {
          style: {
            width: "calc(100% - 48px)",
            display: "flex",
            alignItems: "center",
            padding: "10px",
            whiteSpace: "break-spaces"
          },
          children: [
            " ",
            props.Message
          ]
        }
      )
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { display: "flex", justifyContent: "center" }, ref: buttonBlockRef, tabIndex: -1, children: buttons.map((btn, index2) => {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "max-content", padding: "5px" }, children: btn }, `message-box-btn_${index2}`);
    }) })
  ] });
}
var CheckBox = {};
var hasRequiredCheckBox;
function requireCheckBox() {
  if (hasRequiredCheckBox) return CheckBox;
  hasRequiredCheckBox = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(CheckBox, "__esModule", {
    value: true
  });
  CheckBox.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  CheckBox.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2m-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"
  }), "CheckBox");
  return CheckBox;
}
var CheckBoxExports = /* @__PURE__ */ requireCheckBox();
const CheckBoxIcon = /* @__PURE__ */ getDefaultExportFromCjs(CheckBoxExports);
var CheckBoxOutlineBlank = {};
var hasRequiredCheckBoxOutlineBlank;
function requireCheckBoxOutlineBlank() {
  if (hasRequiredCheckBoxOutlineBlank) return CheckBoxOutlineBlank;
  hasRequiredCheckBoxOutlineBlank = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(CheckBoxOutlineBlank, "__esModule", {
    value: true
  });
  CheckBoxOutlineBlank.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  CheckBoxOutlineBlank.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2"
  }), "CheckBoxOutlineBlank");
  return CheckBoxOutlineBlank;
}
var CheckBoxOutlineBlankExports = /* @__PURE__ */ requireCheckBoxOutlineBlank();
const CheckBoxOutlineBlankIcon = /* @__PURE__ */ getDefaultExportFromCjs(CheckBoxOutlineBlankExports);
function CheckBoxMultiCheck(props) {
  const theme = useAtomValue(currentTheme);
  const Unchecked = /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxOutlineBlankIcon, { checkicon: "true", className: clsx$3("fontColorStimate", { light: theme === "light" }) });
  const Checked = /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxIcon, { checkicon: "true", className: clsx$3("fontColorStimate", { light: theme === "light" }) });
  const LeftArrow = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAUUlEQVQokWNgGFZAkIGBoZ4cjYYMDAx3GBgYnpKqMY6BgeEbAwPDf1I0czMwMCyBaiIGH0PWPJ8Ejf8ZGBjOUGLzUar5GRmQHdowQHY8DwEAAEi9LqoZcEUOAAAAAElFTkSuQmCC"
    }
  );
  const UpArrow = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAd0lEQVQokeXPMQrCUAyA4c9ScHARPEgHL6UeSnDqTbxFi6cQHaQOvooEbH1Ip/4QAkl+kjARKxxTzuaEDnWuuE9iH7tfxQrXIN+wHRPXaILYxwWbz+EiyIeU21Bv8fB6581i4IpubC5uzmKOcjnQO2OJ+z8LvvIExvYZVSJjKmIAAAAASUVORK5CYII="
    }
  );
  const Horizontal = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAjElEQVQokd3RMQ4BQRyF8d8Wyw10duMmDqHZytlUShUNCQchQesGFDT/STayI7IdXzLVl5n3Xoa/YIAi44rwnVQ4YpbxTfjqXYxDbDDMXC6xwhmTVGWMPa7x+j1XLWovUWMKWzx7nF1KPuCGOR4fkkssMErJ7c3rLzZf0uY2NU6xu4smfJ2r1fuff4gXahUi5bfUpsIAAAAASUVORK5CYII="
    }
  );
  const Vertical = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAk0lEQVQokd3SSwrCMBRG4a9CXURBW9ck2GWK8wrSdbTiwIG70IFXEGzSjj2T8Cc5N0/SbHDGLjMnKQ544pYqsEqIFzwi39FFf5Z1rHhCEys3kQeUOblAG0WqkKvIbYwv4lueZOrMi/kTucDe75OUOJi57RIjjqi9b7uOPHo/WZYtruhD7iPXc+KHRX97bgddtJO8AC8rHItGG/0wAAAAAElFTkSuQmCC"
    }
  );
  const RightArrow = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAT0lEQVQokWNgGLagnoGBQZBczU8ZGBgeMjAwmJOr+T8DA8MPBgaGfGwKjkEVEIOXMDAwcCNrPkOC5v8MDAzzqWYzRX4mpJns0KYongchAABsAC7n0QjPxwAAAABJRU5ErkJggg=="
    }
  );
  const DownArrow = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAcklEQVQokWNgoAAw4pE7xsDAwMbAwPCTgYHBmlTN/wmpYyLkNHxgVDMDQw0DA8NdKEYGMLEqfIYJQBX9x4IfMDAwCBNyjT4DA8M3NI0/GBgYjAlphIEMNM3pxGqEgYVQjctJ1cjAwMDAzcDAMB9KUx8AALHdGmkOx7M9AAAAAElFTkSuQmCC"
    }
  );
  const Bullet = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABmJLR0QA/wD/AP+gvaeTAAAAWUlEQVQYlX2PUQqAMAxDo+dwnkiK59d5FJ0/KcRuNvBgH28hBfoU8psdwAWgkQrARtIjknOrPIWmyOnimkhOmbPRkuaPmrQd+sM4fHTMFuuNw7WpkzQL+eQFxVQu0d8mj+cAAAAASUVORK5CYII="
    }
  );
  const Required = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAANUlEQVQokWNgGCjAiMTmZGBgUCdCz00GBobv6IIGDAwM/4nABjANTOQ6eVTzkNJMtRRGXwAAhc8NauSW/JMAAAAASUVORK5CYII="
    }
  );
  const LeftArrowBlue2 = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      style: { transform: "rotate(180deg)" },
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAq0lEQVQokWNgGJ6AKWZrPUPUFkGscoQ0MzIxpjEzM15gjd1qTrJmKJD7x8BwkClmaz6KwQwMDAzMsduOMTD8tyTOnP9L/zKwpjMsdv/KAhVgI9IFDAwMjNHMDH9+/2VgSIQ6m/EX8Zr/L/3LwJIDdzY+wBy37SnD//9SDAwMP///Zyj/t8R7IkyOhUjrHjExMIT9XuJ9ElmQYGj///d/1t+//w1+L0bVOIQBAKmcMNWgTlTtAAAAAElFTkSuQmCC"
    }
  );
  const RightArrowRed2 = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAkUlEQVQokd2RsQlCQRBE3xwfcxuwhR+KjZgYmWgiWILVWIiJYHZnCYIlCKJwY+APRETXUCfc3Tezy8J/qsBqD/1XvfQJtjSzlAsMv4YBDANLmwLLx7oAirQ1jCJGSGvVOm/h1HTOvRAIYE+c0pVap6mLv4The/IiNJulY5acpfPzzU0oDA7Y4xZ24Q3h/Z9/VDeRPSpapGpugQAAAABJRU5ErkJggg=="
    }
  );
  const Unknown = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAwUlEQVQokeXRPQrCQBCG4XdUgoUI2gqCF/AIXkEFPUGy4A1MGW9gFQjZkDOIhaUeRPAOKcV1rQzxJ2IqC79y4Jn5YOA/kiTJQmvdBahVgVrrFdaurbVDgEYVKOBbmCmlDgBSFXqet73P89phGHbSNG2WwCUikyJ8wI7jpFdjNsUFBTh1XXf3vDivHUVRv1GvHwSOrXZ7nGWZ/67qWwwQx/GgJrIHDNAru/hSG0ApdboYM0LkbGH+CZYmCIKvX/ib3ACBFEg+iHRLAAAAAABJRU5ErkJggg=="
    }
  );
  const Reject = /* @__PURE__ */ jsxRuntimeExports.jsx(
    "img",
    {
      checkicon: "true",
      src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAABE0lEQVQokc2SO07DQBBA39hNEKk4QSokROhgnSaSlb0BV0BKEKfIGSBA+PUUSJwAKVKaYEhBFYkKOACV7TTYQ0FimWQpqGC6ndn3RjO78C9iGjZqCuKqKcg0bNTKOa8MZn7+GNud/qJAQWJrTjM/H5cFBVwZjF4FvRaknVhzod2vmoKkNugJdIDbSjh6mzNLHVIb9BQ9AK5W16JO+h4cFudm1JYuuRN2CCbAhgt0wjOBl7TME0Jd4bnajDaly8fiPc8BSmqDI4Q6yERgPRma/nwHP8LLM99vCXIC7CVDc+4SFGBig+PYGo2tuSxv25X/NvPsnceK3lTvHvYFtCyOW8GZiO76mbe9Mhi9LHX/7Q/7u/gEmuuBZpiHMdwAAAAASUVORK5CYII="
    }
  );
  function getCheckstate(multicheckSet) {
    if (!multicheckSet) return [0, 1];
    const result = [];
    let checkState = multicheckSet;
    let value;
    for (let i = 0; i < 14; i++) {
      if (checkState === 0) break;
      value = Math.pow(2, i);
      if (checkState & value) {
        checkState -= value;
        result.push(i);
      }
    }
    return result;
  }
  function getIcon2(checkstate, customIcons) {
    const icons2 = {
      0: Unchecked,
      1: Checked,
      2: LeftArrow,
      3: UpArrow,
      4: Horizontal,
      5: Vertical,
      6: RightArrow,
      7: DownArrow,
      8: Bullet,
      9: Required,
      10: LeftArrowBlue2,
      11: RightArrowRed2,
      12: Unknown,
      13: Reject
    };
    return customIcons && customIcons[checkstate] || icons2[checkstate];
  }
  function getNextState2(arr, state) {
    const length2 = arr.length;
    const index2 = arr.indexOf(Number(state));
    return index2 < length2 - 1 ? arr[index2 + 1] : arr[0];
  }
  const [icon, setIcon] = reactExports.useState(getIcon2(props.CheckState ? Number(props.CheckState) : 0, props.customDefaultIcons));
  const [checked, setChecked] = reactExports.useState(false);
  const [stateCheckBox, setStateCheckBox] = reactExports.useState();
  const checkStates = reactExports.useRef();
  const checkboxRef = reactExports.useRef();
  reactExports.useEffect(() => {
    checkboxRef.current.update = (data) => {
      checkStates.current = getCheckstate(data.MultiCheckSet);
      setStateCheckBox(data.CheckState ? Number(data.CheckState) : 0);
    };
  }, []);
  reactExports.useEffect(() => {
    setChecked(false);
    checkStates.current = getCheckstate(props.MultiCheckSet);
    setStateCheckBox(props.CheckState ? Number(props.CheckState) : 0);
  }, [props.CheckState]);
  reactExports.useEffect(() => {
    if (stateCheckBox !== void 0) {
      setIcon(getIcon2(stateCheckBox, props.customDefaultIcons));
    }
  }, [stateCheckBox]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "checkbox-multicheck", ref: checkboxRef, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Checkbox,
    {
      disabled: props.disabled,
      icon,
      checkedIcon: icon,
      checked,
      onChange: (ev) => {
        ev.stopPropagation();
        if (props.canModify && props.canModify() === false) {
          return;
        }
        let state = getNextState2(checkStates.current, stateCheckBox);
        setStateCheckBox(state);
        const record = ev.target.closest("TR");
        if (!props.onEdit) return;
        if (record) {
          record.dataset.checkstate = state;
          props.onEdit({
            record,
            fieldname: record.dataset.fieldname,
            groupid: record.dataset.groupid,
            current: record.dataset.current,
            CheckState: state,
            textchanged: "0",
            setStateCheckBox
          });
        } else {
          props.onEdit({
            name: props.parentProps ? props.parentProps.name : void 0,
            id: props.parentProps ? props.parentProps.id : void 0,
            CheckState: `${state}`
          });
        }
      },
      style: {
        width: "21px",
        height: "21px",
        display: props.display !== void 0 ? props.display : ""
      },
      sx: {
        "& .MuiSvgIcon-root": { fontSize: 18 }
      },
      type: "checkbox"
    }
  ) });
}
const mainDialogBlock$1 = "_mainDialogBlock_1j5ft_1";
const fullDialogSpaceContainer = "_fullDialogSpaceContainer_1j5ft_13";
const fullDialogFlexContainer$1 = "_fullDialogFlexContainer_1j5ft_21";
const dialogButtonsContainer = "_dialogButtonsContainer_1j5ft_31";
const dialogButton = "_dialogButton_1j5ft_31";
const dialogDayTypeContainer = "_dialogDayTypeContainer_1j5ft_51";
const dialogDayTypeItemContainer = "_dialogDayTypeItemContainer_1j5ft_59";
const dialogDayTypeDaysContainer = "_dialogDayTypeDaysContainer_1j5ft_73";
const dialogDayTypeTypesContainer = "_dialogDayTypeTypesContainer_1j5ft_89";
const dialogDayTypeStateContainer = "_dialogDayTypeStateContainer_1j5ft_105";
const dialogDayTypeCheckBoxContainer = "_dialogDayTypeCheckBoxContainer_1j5ft_123";
const dialogDayTypelabel = "_dialogDayTypelabel_1j5ft_133";
const dialogDayTypeTitleContainer = "_dialogDayTypeTitleContainer_1j5ft_141";
const dialogDayTypeTitle = "_dialogDayTypeTitle_1j5ft_141";
const dialogHeaderContainer = "_dialogHeaderContainer_1j5ft_163";
const dialogHeaderButton = "_dialogHeaderButton_1j5ft_177";
const dialogFutterInfo = "_dialogFutterInfo_1j5ft_187";
const checkBoxContainer = "_checkBoxContainer_1j5ft_207";
const dialogRef = "_dialogRef_1j5ft_219";
const dialogTreeParamsMainBlock = "_dialogTreeParamsMainBlock_1j5ft_235";
const dialogTreeParamsItem = "_dialogTreeParamsItem_1j5ft_241";
const dialogTreeParamsLabel = "_dialogTreeParamsLabel_1j5ft_259";
const dialogTreeParamsEditorDiv = "_dialogTreeParamsEditorDiv_1j5ft_265";
const dialogTreeParamsTitle = "_dialogTreeParamsTitle_1j5ft_285";
const dialogSelectFromListListContainer = "_dialogSelectFromListListContainer_1j5ft_301";
const dialogSelectFromListListLabel = "_dialogSelectFromListListLabel_1j5ft_311";
const dialogSelectFromListList = "_dialogSelectFromListList_1j5ft_301";
const dialogSelectFromListButtonsContainer = "_dialogSelectFromListButtonsContainer_1j5ft_329";
const styles$4 = {
  mainDialogBlock: mainDialogBlock$1,
  fullDialogSpaceContainer,
  fullDialogFlexContainer: fullDialogFlexContainer$1,
  dialogButtonsContainer,
  dialogButton,
  dialogDayTypeContainer,
  dialogDayTypeItemContainer,
  dialogDayTypeDaysContainer,
  dialogDayTypeTypesContainer,
  dialogDayTypeStateContainer,
  dialogDayTypeCheckBoxContainer,
  dialogDayTypelabel,
  dialogDayTypeTitleContainer,
  dialogDayTypeTitle,
  dialogHeaderContainer,
  dialogHeaderButton,
  dialogFutterInfo,
  checkBoxContainer,
  dialogRef,
  dialogTreeParamsMainBlock,
  dialogTreeParamsItem,
  dialogTreeParamsLabel,
  dialogTreeParamsEditorDiv,
  dialogTreeParamsTitle,
  dialogSelectFromListListContainer,
  dialogSelectFromListListLabel,
  dialogSelectFromListList,
  dialogSelectFromListButtonsContainer
};
function CheckBoxWithLabel({ label, onEdit, CheckState }) {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.checkBoxContainer, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { onEdit, CheckState }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.dialogDayTypelabel, children: label })
  ] });
}
const getDefaultFieldsGenNums = () => {
  return [
    {
      Name: "OrgTypeCls",
      Title: "CODE",
      Width: "7"
    },
    {
      Name: "OrgName",
      Title: "Учреждение",
      Width: "10"
    },
    {
      Name: "Value",
      Title: "След. номер",
      Width: "20"
    }
  ];
};
const getColumnsGenNums = () => {
  return {
    title: [
      {
        fieldName: "OrgTypeCls",
        title: "CODE",
        width: 50,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: "64"
        }
      },
      {
        fieldName: "OrgName",
        title: "Учреждение",
        width: 200,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: "64"
        }
      },
      {
        fieldName: "Value",
        title: "След. номер",
        width: 100,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: "8"
        }
      }
    ]
  };
};
function DialogSimpleLocalTable({ props, smetaModalId }) {
  const [mainGrid, setMainGrid] = reactExports.useState();
  const [selectedRecordId, setSelectedRecordId] = reactExports.useState("0");
  const gridPanel = reactExports.useRef(null);
  const records = reactExports.useRef((props == null ? void 0 : props.records) || []);
  reactExports.useEffect(() => {
    loadGrid();
  }, []);
  reactExports.useEffect(() => {
    records.current = (props == null ? void 0 : props.records) || [];
    mainGrid && mainGrid.grid.refreshSource("!");
  }, [props]);
  const loadGrid = async () => {
    const res = await GridLoader(gridPanel.current, props, {
      localGrid: true,
      refresh: false,
      Columns: props.columns,
      defaultFields: props.defaultFields,
      keyField: props.keyField,
      recordKeys: props.recordKeys,
      Rights: props.rights,
      getRecords: () => records.current,
      setSelectedRecord: setSelectedRecordId,
      getFieldText,
      onPostRecord: changeRecordData
    });
    setMainGrid(res);
  };
  const getFieldText = (request) => {
    var _a2;
    if (records.current.length) {
      const recVal = records.current[request.RecordIndex];
      return { Text: ((_a2 = recVal[request.FieldName]) == null ? void 0 : _a2.text) || recVal[request.FieldName] };
    }
    return { Text: "" };
  };
  const changeRecordData = (request, recordData) => {
    var _a2;
    const recVal = records.current[request.RecordIndex];
    const atributtes = request.RecordSet.Attributes;
    atributtes.forEach((field, index2) => {
      records.current[request.RecordIndex] = { ...recVal, [field]: recordData[index2].text };
    });
    (_a2 = props.setData) == null ? void 0 : _a2.call(props, records.current);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.mainDialogBlock), children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.fullDialogFlexContainer, styles$4.dialogDayTypeContainer), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gridPanel, style: { height: "100%", width: "100%", position: "relative" } }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogButtonsContainer), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button$2,
      {
        size: "small",
        variant: "outlined",
        value: "2",
        className: clsx$3(styles$4.dialogButton, "button_Modal_Close"),
        onClick: () => {
          smetaModals.close(smetaModalId);
        },
        children: "Закрыть"
      }
    ) })
  ] });
}
const getGroupParams = (data) => {
  const params2 = /* @__PURE__ */ new Map([
    ["prefix", data.module],
    ["comand", "GetGroupParams"],
    ["GroupID", data.groupID]
  ]);
  return AxiosRequest(true, params2);
};
const setGroupParams = (data) => {
  const params2 = /* @__PURE__ */ new Map([
    ["prefix", data.module],
    ["comand", "SetGroupParams"],
    ["GroupID", data.groupID],
    ["Code", data.code],
    ["Format", data.format],
    ["GenName", data.name],
    ["Preview", data.preview]
  ]);
  return AxiosRequest(true, params2);
};
function DialogTreeParams({ props, smetaModalId }) {
  const [data, setData] = reactExports.useState();
  const [code, setCode] = reactExports.useState("");
  const [format, setFormat] = reactExports.useState("");
  const [name, setName] = reactExports.useState("");
  const [preview, setPreview] = reactExports.useState("0");
  const result = reactExports.useRef({
    code: "",
    format: "",
    name: "",
    preview: "0"
  });
  const { Buttons: buttons } = props;
  reactExports.useEffect(() => {
    loadData();
  }, []);
  reactExports.useEffect(() => {
    setCode((data == null ? void 0 : data.Code) || "");
    setFormat((data == null ? void 0 : data.Format) || "");
    setName((data == null ? void 0 : data.Name) || "");
    setPreview((data == null ? void 0 : data.Preview) || "0");
    result.current = {
      code: (data == null ? void 0 : data.Code) || "",
      format: (data == null ? void 0 : data.Format) || "",
      name: (data == null ? void 0 : data.Name) || "",
      preview: (data == null ? void 0 : data.Preview) || "0"
    };
  }, [data]);
  const loadData = async () => {
    setData(
      await getGroupParams({
        module: props.Module,
        groupID: props.GroupID
      })
    );
  };
  const onEditCode = async (editData) => {
    setCode(editData.value);
    result.current.code = editData.value;
  };
  const onEditFormat = async (editData) => {
    setFormat(editData.value);
    result.current.format = editData.value;
  };
  const onEditName = async (editData) => {
    setName(editData.value);
    result.current.name = editData.value;
  };
  const onEditNameButtonClick = async () => {
    var _a2;
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogSimpleLocalTable,
        {
          props: {
            Buttons: 2,
            records: ((_a2 = data == null ? void 0 : data.GenName) == null ? void 0 : _a2.items) || [],
            columns: getColumnsGenNums(),
            defaultFields: getDefaultFieldsGenNums(),
            keyField: "CODE",
            recordKeys: ["OrgTypeCls", "OrgName", "Value"],
            rights: "2",
            setData: changeData
          }
        }
      ),
      { hiddenButton: true, Title: "Параметры группы" }
    );
  };
  const changeData = (newRecords) => {
    if (data == null ? void 0 : data.GenName) {
      data.GenName.items = newRecords;
      setData({ ...data });
    }
  };
  const onCheckPreview = async (editData) => {
    setPreview(editData.CheckState);
    result.current.preview = editData.CheckState;
  };
  const onSelect = async () => {
    setGroupParams({ module: props.Module, groupID: props.GroupID, ...result.current });
    smetaModals.close(smetaModalId);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.mainDialogBlock), children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.fullDialogFlexContainer, styles$4.dialogTreeParamsMainBlock), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsTitle), children: "Основные средства" }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.dialogTreeParamsItem), children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsLabel), children: "Код группы: " }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsEditorDiv), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { onEdit: onEditCode, value: code, editMask: data == null ? void 0 : data.Mask }) })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.dialogTreeParamsItem), children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsLabel), children: "Формат инв. номера: " }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsEditorDiv), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { onEdit: onEditFormat, value: format }) })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.dialogTreeParamsItem), children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsLabel), children: "Генератор номера: " }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsEditorDiv), children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { onEditButtonClick: onEditNameButtonClick, onEdit: onEditName, value: name, editStyle: 16 }) })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogTreeParamsItem), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        CheckBoxWithLabel,
        {
          onEdit: onCheckPreview,
          label: "Использовать для представления объектов из других групп",
          CheckState: preview
        }
      ) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.dialogButtonsContainer), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          onClick: onSelect,
          size: "small",
          variant: "outlined",
          className: clsx$3(
            styles$4.dialogButton,
            "button_Modal_Select",
            buttons && (Number(buttons) & 1) === 0 && "hidden"
          ),
          value: "1",
          children: "Установить"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          value: "2",
          className: clsx$3(styles$4.dialogButton, "button_Modal_Close"),
          onClick: () => {
            smetaModals.close(smetaModalId);
          },
          children: "Закрыть"
        }
      )
    ] })
  ] });
}
async function getTreeView(id, props) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", props.Module);
  params2.set("comand", "GetTreeViewMenu");
  params2.set("ID", id);
  params2.set("ObjType", props.ObjType ? props.ObjType : "0");
  params2.set("Info", props.Info ? props.Info : "0");
  params2.set("Internal", props.Internal ? props.Internal : "1");
  const json = await AxiosRequest(true, params2);
  const array = json && json.Items && json.Items.items || json && json.items || [];
  return {
    arr: array.map((item) => ({ ...item, Caption: item.Name }))
  };
}
async function ChangeTreeNodes(data, request) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", data.Module);
  params2.set("comand", "ChangeTreeNodes");
  params2.set("ObjType", data.ObjType);
  params2.set("Info", "0");
  if (data.id) params2.set("ID", data.id);
  if (data.parentID) params2.set("ParentID", data.parentID);
  params2.set("Text", data.text);
  params2.set("Command", data.comand);
  return AxiosRequest(true, params2, request);
}
async function createContextItem(data) {
  const id = data.parent === data.tree.current ? "0" : data.parent.id.split("_")[1];
  const json = await ChangeTreeNodes(
    {
      text: "Новый раздел",
      id: "0",
      parentID: id,
      ObjType: data.props.ObjType || "0",
      Module: data.props.Module
    },
    {
      ObjType: data.props.ObjType ? data.props.ObjType : "0",
      Text: "Новый раздел",
      Command: "Insert",
      ParentID: id
    }
  );
  const newItem = createFullItem({
    ...data.createData,
    id: json.ID,
    text: `Новый раздел`,
    image: json.Image
  });
  if (data.item === data.tree.current) {
    if (data.tree.current.children.length) {
      data.tree.current.lastChild.style.borderBottom = "1px solid rgb(238, 238, 238)";
    }
    data.tree.current.appendChild(newItem);
  } else {
    if (data.parent.children.length) {
      data.parent.lastChild.style.borderBottom = "1px solid rgb(238, 238, 238)";
    }
    data.parent.appendChild(newItem);
  }
  data.tree.current.changeSelected(newItem.querySelector(".tree-item"));
}
async function createContextGroup(data) {
  const json = await ChangeTreeNodes(
    {
      text: "Новый раздел",
      id: "0",
      comand: "Insert",
      parentID: data.id
    },
    {
      ObjType: data.props.ObjType ? data.props.ObjType : "0",
      Text: "Новый раздел",
      Command: "Insert",
      ParentID: data.id
    }
  );
  const newItem = createFullItem({
    ...data.createData,
    id: json.ID,
    text: `Новый раздел`,
    image: json.Image
  });
  if (data.item === data.tree.current) {
    if (data.parent.children.length) {
      data.parent.lastChild.style.borderBottom = "1px solid rgb(238, 238, 238)";
    }
    data.tree.current.appendChild(newItem);
    data.tree.current.changeSelected(newItem.querySelector(".tree-item"));
    return;
  }
  const ulEl = data.item.closest("UL");
  if (ulEl.classList.contains("tree-group")) {
    const container = ulEl.querySelector(`LI`);
    if (container.children.length) {
      container.lastChild.style.borderBottom = "1px solid rgb(238, 238, 238)";
    }
    container.appendChild(newItem);
  } else {
    const newItemsGroup2 = createFullGroupItem({
      ...data.createData,
      id: data.id,
      text: data.text
    });
    const newParent = data.parent.closest("LI") || data.tree.current;
    newParent.replaceChild(newItemsGroup2, data.item.parentElement);
    newParent.querySelector(`#tree-group_${data.id}`).appendChild(newItem);
  }
  data.tree.current.changeSelected(newItem.querySelector(".tree-item"));
}
async function deleteContextItem(data) {
  const id = data.parent === data.tree.current ? "0" : data.parent.id.split("_")[1];
  if (data.item.dataset.noDel) return;
  const json = await ChangeTreeNodes(
    {
      text: data.text,
      id: data.id,
      comand: "Delete",
      parentID: id
    },
    {
      ID: data.id,
      ObjType: data.props.ObjType ? data.props.ObjType : "0",
      Text: data.text,
      Command: "Delete",
      ParentID: id
    }
  );
  if (json.error) return;
  const ulEl = data.item.closest("UL");
  const expndBttn = ulEl.querySelector(".expandButton");
  if (expndBttn) expndBttn.click();
  setTimeout(() => {
    const liEl = ulEl.querySelector("LI");
    if (liEl && liEl.children.length) {
      smetaModals.open(
        /* @__PURE__ */ jsxRuntimeExports.jsx(MessageBox, { DlgType: 1, Message: "Раздел содержит вложенные подразделы, сначала удалите их." }),
        {
          style: getStyleWindow("MessageBox"),
          hiddenButton: true,
          blockMaximize: true,
          blockSaveLocation: true,
          blockResize: true,
          Title: TITLE_MESSAGE_MODAL_WINDOW[1]
        }
      );
      return;
    }
    const prevUl = ulEl.previousElementSibling;
    if (prevUl) {
      prevUl.style.borderBottom = "";
    }
    ulEl.remove();
    const selectedItem = prevUl && prevUl.querySelector(".tree-item") || data.tree.current.querySelector(".tree-item");
    if (!selectedItem) return;
    data.tree.current.changeSelected(selectedItem);
  });
}
const openModalParams = async (data) => {
  smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogTreeParams, { props: data }), { hiddenButton: true, Title: "Параметры группы" });
};
async function treeManipulationsById(data) {
  const item = data.tree.current.querySelector(".tree-item-selected") || data.tree.current.querySelector(".tree-item");
  let parent = item.closest("LI") || data.tree.current;
  const itemContainer = item.closest("UL");
  data.item = item;
  data.parent = parent;
  data.itemContainer = itemContainer;
  const programs = {
    0: () => {
    },
    1: () => {
    },
    2: () => {
    },
    4: () => {
    },
    8: () => {
    },
    16: () => {
    },
    32: () => {
    },
    456: (data2) => {
      moveIn(data2);
    },
    457: () => {
      moveUp(data);
    },
    458: () => {
      moveDown(data);
    },
    default: (data2) => {
      console.error("Не обработанное действие контекстного меню дерева");
      if (data2.NeedRefresh === "1") {
        data2.tree.current.refreshTree(data2.item.id);
      }
    }
  };
  const runProgram = programs[Number(data.ID)] || programs.default;
  const json = await HandleTreeMenu(data);
  if (json && json.Token) {
    tokenProcessingTest(json, {
      func: (result) => {
        runProgram({ ...data, result });
      },
      from: "tree"
    });
    return;
  }
  json && await runProgram({ ...data, ...json });
}
async function HandleTreeMenu(data) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", data.props.Module).set("comand", "HandleTreeMenu").set("ObjType", data.props.ObjType).set("Info", data.props.Info).set("Menu", data.ID).set("ID", data.item.id);
  if (data.WSM) params2.set("WSM", "1");
  return AxiosRequest(true, params2);
}
function moveUp(data) {
  const prevEl = data.itemContainer.previousElementSibling;
  if (prevEl) {
    data.parent.insertBefore(data.itemContainer, prevEl);
  }
}
function moveDown(data) {
  const nextEl = data.itemContainer.nextElementSibling;
  if (nextEl) {
    data.parent.insertBefore(nextEl, data.itemContainer);
  }
}
function moveIn(data) {
  if (data.result && data.result.NeedRefresh === "1") {
    data.tree.current.refreshTree(data.item.id);
  }
}
function getNextState(arr, state) {
  const length2 = arr.length;
  const index2 = arr.indexOf(Number(state));
  return index2 < length2 - 1 ? arr[index2 + 1] : arr[0];
}
async function fetchData(idItem, Current, props) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", props.Module).set("comand", "GetGroupTree");
  if (props.SectionID) params2.set("SectionID", props.SectionID);
  if (props.Info) params2.set("Info", props.Info);
  if (props.UsedDate) params2.set("UsedDate", props.UsedDate);
  if (props.ObjType) params2.set("ObjType", props.ObjType);
  if (Current || props.Current) params2.set("Current", Current ? Current : props.Current);
  if (props.ObjRef) params2.set("ObjRef", props.ObjRef);
  if (idItem) {
    params2.set("GroupID", idItem).set("Current", idItem);
  }
  if (!props.CLSID && props.Path) params2.set("Path", props.Path);
  return await AxiosRequest(true, params2).then((res) => {
    if (!res.Tree) return;
    return res;
  });
}
const Tree = ({ props }) => {
  const [GroupID, setGroupID] = React.useState();
  const [load, setLoad] = React.useState(true);
  const firstLoad = React.useRef(true);
  const treeContainer = React.useRef();
  const reqData = React.useRef({
    Module: props.Module,
    SectionID: props.SectionID,
    Info: props.Info,
    UsedDate: props.UsedDate,
    ObjType: props.ObjType,
    ObjRef: props.ObjRef,
    Path: props.Path,
    Current: props.Current,
    CLSID: props.CLSID
  });
  const values2 = React.useRef();
  const selection = React.useRef([]);
  const selectionMode = React.useRef(false);
  const tree = React.useRef();
  const treeJson = React.useRef({});
  const fulljson = React.useRef();
  const checkSet = React.useRef(props.CheckSet);
  React.useEffect(() => {
    tree.current.addGroupID = addGroupID;
    tree.current.selectGroupID = selectGroupID;
    tree.current.updateMultiCheckState = updateMultiCheckState;
    tree.current.changeSelected = handleChangeSelected;
    tree.current.refreshTree = refreshTree;
    if (props.saveState) ;
    if (props.Selection) {
      selection.current = props.Selection.split(",");
    }
    if (tree.current) {
      fetchData(void 0, void 0, reqData.current).then((res) => {
        if (!res) return;
        if (props.Current === void 0) {
          fetchData(void 0, res.Current, reqData.current).then(() => {
            tree.current.innerHTML = "";
            if (props.MultiSel && props.Selection || props.MultiSel && props.defaultMultiSel)
              selectionMode.current = true;
            addNewItems(res["Tree"]["items"], "tree", {
              Current: res.Current
            });
            !props.noExpandFirst && expandItem();
            setLoad(false);
          });
        } else {
          tree.current.innerHTML = "";
          if (props.MultiSel && props.Selection || props.MultiSel && props.defaultMultiSel)
            selectionMode.current = true;
          addNewItems(res["Tree"]["items"], "tree", { Current: res.Current });
          !props.noExpandFirst && expandItem();
          setLoad(false);
        }
        if (props.saveState) {
          fillRowObject({ id: "tree", items: res.Tree.items }, treeJson.current);
          fulljson.current = res;
        }
      });
      values2.current = {};
    }
  }, []);
  React.useEffect(() => {
    if (props.selectID && GroupID !== void 0) {
      if (selectionMode.current && typeof GroupID === "object") {
        props.selectID(GroupID.join(","));
      } else {
        props.selectID(GroupID);
      }
    }
  }, [GroupID]);
  React.useEffect(() => {
    if (props.setSelectionMode) {
      props.setSelectionMode(selectionMode.current);
    }
  }, [selectionMode.current]);
  React.useEffect(() => {
    if (tree.current) {
      tree.current.getCurrentInfo = getCurrentInfo;
      tree.current.getSelectData = getSelectData;
    }
  }, [tree.current]);
  function addNewItems(input, current, res) {
    if (!input || !tree.current) return;
    const items = input;
    if (!res.Current && items.length) {
      res.Current = items[0].id;
    }
    items.forEach((item, index2) => {
      const id = item.id ? item.id : item.ID;
      if (firstLoad.current && (res.Current === id || !res.Current)) {
        if (selectionMode.current && selection.current.length) {
          setGroupID([...selection.current]);
        } else setGroupID(id);
        firstLoad.current = false;
      }
      const text = item.text || item.Text;
      const image2 = item.image || item.Image;
      const data = {
        text,
        res,
        id,
        item,
        items,
        index: index2,
        image: image2,
        props,
        selection,
        selectionMode,
        values: values2
      };
      if (item.leaf) {
        const fullItem = createFullItem(data);
        if (current === "tree") {
          tree.current.appendChild(fullItem);
        } else {
          current.appendChild(fullItem);
        }
        if (id === props.ObjRef || id === res.Current) {
          if (selectionMode.current && selection.current.length) {
            setGroupID([...selection.current]);
          } else setGroupID(id);
        }
      } else {
        const fullGroupItem = createFullGroupItem(data);
        if (current === "tree") {
          tree.current.appendChild(fullGroupItem);
        } else {
          current.appendChild(fullGroupItem);
        }
        if (id === props.ObjRef || id === res.Current) {
          if (selectionMode.current && selection.current.length) {
            setGroupID([...selection.current]);
          } else setGroupID(id);
        }
        if (item.items) addNewItems(item.items, fullGroupItem.querySelector("LI"), res);
      }
    });
  }
  function fillRowObject(inputObj, resultObj) {
    if (inputObj.items) {
      for (let elem of inputObj.items) {
        fillRowObject(elem, resultObj);
      }
    }
    resultObj[inputObj.id] = inputObj;
  }
  async function addGroupID(id) {
    if (selectionMode.current) {
      let item = tree.current.querySelector(`#text-tree-item_${id}`);
      if (!item) {
        if (selection.current.indexOf(id) === -1) {
          selection.current.push(id);
          setGroupID([...selection.current]);
        }
        await refreshTree(id);
      }
      if (item) item = item.closest(".tree-item");
      if (!item) return;
      let checkbox = item.querySelector(`input[type="checkbox"]`);
      if (checkbox && !checkbox.checked) {
        checkbox.click();
      }
    }
  }
  async function selectGroupID(id) {
    if (!selectionMode.current) {
      let item = tree.current.querySelector(`#text-tree-item_${id}`);
      if (!item) await refreshTree(id);
      if (item) item = item.closest(".tree-item");
      if (!item) return false;
      item.click();
      return true;
    }
    return false;
  }
  function getSelectData() {
    let item = tree.current.querySelector(".tree-item-selected");
    let id = 0;
    let itemText = "";
    if (item) {
      id = item.id;
      itemText = tree.current.querySelector(`#text-tree-item_${id}`).innerText;
    }
    if (itemText && id) return { label: itemText, id };
    return {};
  }
  function getCurrentInfo() {
    let item = tree.current.querySelector(".tree-item-selected") || tree.current.querySelector(".tree-item");
    return {
      GroupID: item && item.id,
      item,
      title: item && item.querySelector(`#text-tree-item_${item.id}`).innerText,
      selectionMode: selectionMode.current,
      selection: selection.current
    };
  }
  async function getNewLeaf(current, id) {
    await fetchData(id.split("_")[1], void 0, reqData.current).then((res) => {
      addNewItems(res["Tree"]["items"], current, { Current: res.Current });
      if (props.saveState) {
        treeJson.current[res.Current]["items"] = res.Tree.items;
        fillRowObject({ id: "lastLeaf", items: res.Tree.items }, treeJson.current);
      }
    });
  }
  async function ContextMenuHandler(data) {
    const command = data.value;
    const parent = data.item && data.item.closest("LI") || tree.current;
    const item = data.item;
    const createData = {
      res: { Current: GroupID },
      item: {
        noDel: item && item.dataset.noDel,
        NoEdit: item && item.dataset.noEdit
      },
      items: [],
      index: 0,
      props,
      selection,
      selectionMode,
      values: values2
    };
    const properties2 = { ...data, parent, createData, props, tree };
    const commands = {
      AddSection: () => createContextItem(properties2),
      AddSubSection: () => createContextGroup(properties2),
      Delete: () => deleteContextItem(properties2),
      Params: () => {
        if (props.paramsCustomClick) {
          props.paramsCustomClick({ groupId: GroupID, module: props.Module });
        } else openModalParams({ GroupID, Module: props.Module });
      },
      default: () => {
        treeManipulationsById(properties2);
      }
    };
    const doCommand = commands[command] || commands.default;
    await doCommand();
  }
  function addItemsForChecking(input, current, res, arr) {
    if (!input || !tree.current) return;
    const items = input;
    items.forEach((item, index2) => {
      const id = item.id ? item.id : item.ID;
      const text = item.text ? item.text : item.Text;
      const image2 = item.image ? item.image : item.Image;
      const data = {
        text,
        res,
        id,
        item,
        items,
        index: index2,
        image: image2,
        props,
        selection,
        selectionMode,
        values: values2
      };
      if (item.leaf) {
        const ul = createFullItem(data);
        arr.push(ul);
        if (current === "tree") {
          tree.current.appendChild(ul);
        } else {
          current.appendChild(ul);
        }
      } else {
        const ul = createFullGroupItem(data);
        arr.push(ul);
        if (current === "tree") {
          tree.current.appendChild(ul);
        } else {
          current.appendChild(ul);
        }
        if (item.items) addItemsForChecking(item.items, newItemsGroup, res);
      }
    });
  }
  async function loadAllInnerGroups(parentGroup) {
    const li = parentGroup.querySelector("li");
    const children = li.children;
    if (children.length === 0) {
      const item = parentGroup.querySelector(".tree-item");
      const id = item.id;
      const res = await fetchData(id, GroupID, reqData.current);
      li.style.display = "none";
      const children2 = [];
      addItemsForChecking(res["Tree"]["items"], li, res, children2);
      for (let child of children2) {
        if (child.group) {
          await loadAllInnerGroups(child);
        }
      }
    } else {
      for (let child of children) {
        if (child.group) {
          await loadAllInnerGroups(child);
        }
      }
    }
    return "";
  }
  async function onCheckGroup(data) {
    await loadAllInnerGroups(data.parentElement);
    const items = data.parentElement.querySelectorAll(`ul`);
    checking(items, data);
  }
  async function checking(items, data) {
    items.forEach((item) => {
      const div = item.querySelector(".tree-item");
      const id = div.id;
      const checbox = div.querySelector(`input[type="checkbox"]`);
      checbox.checked = data.check;
      updateSelection(checbox.checked, id);
    });
    setGroupID([...selection.current]);
    setLoad(false);
  }
  function expandItem() {
    if (!tree.current) return;
    const selected = tree.current.querySelector(".tree-item-selected");
    if (selected) {
      const bttn = selected.querySelector(".expandButton");
      if (bttn) bttn.click();
    }
  }
  function changeSelected(item) {
    if (!item) return;
    const oldSelectedItem = tree.current.querySelector(".tree-item-selected");
    if (oldSelectedItem) {
      if (oldSelectedItem === item) return;
      oldSelectedItem.classList.remove("tree-item-selected");
    }
    item.classList.add("tree-item-selected");
  }
  async function refreshTree(id, subData = {}) {
    reqData.current = { ...reqData.current, ...subData };
    tree.current.innerHTML = "";
    const json = await fetchData(void 0, id, reqData.current);
    addNewItems(json["Tree"]["items"], "tree", { Current: json.Current });
    expandItem();
    setLoad(false);
    if (props.saveState) {
      fillRowObject({ id: "tree", items: json.Tree.items }, treeJson.current);
      fulljson.current = json;
    }
    values2.current = {};
  }
  function handleChangeSelected(item) {
    if (!item) return;
    changeSelected(item);
    setGroupID(item.id);
  }
  function updateSelection(checked, id) {
    if (checked) {
      selection.current.push(id);
    } else {
      selection.current = selection.current.filter((item) => item !== id);
    }
  }
  function updateStateEpxandButton(bttn, state) {
    bttn.expanded = state ? "true" : "false";
    bttn.style.transform = state ? "" : "rotate(-90deg)";
  }
  const onClickExpandButtn = (ev) => {
    const bttn = ev.target.closest(".expandButton");
    updateStateEpxandButton(bttn, bttn.expanded === "false");
    const el = ev.target.closest("ul");
    if (el.group === "true") {
      if (bttn.expanded === "true") {
        if (el.children[1].children.length === 0) {
          getNewLeaf(el.children[1], el.children[1].id);
        } else {
          el.children[1].style.display = "";
        }
        el.expanded = "true";
      } else {
        el.children[1].style.display = "none";
        el.expanded = "false";
      }
    }
  };
  function onClickCheckBox(ev) {
    const checbox = ev.target.tagName === "INPUT" && ev.target.type === "checkbox" ? ev.target : null;
    if (checbox) {
      const treeItem = checbox.closest(".tree-item");
      const id = treeItem.id;
      const ulGroup = checbox.closest("UL");
      updateSelection(checbox.checked, id);
      if (ulGroup && ulGroup.group) {
        onCheckGroup({ check: checbox.checked, parentElement: ulGroup });
        return;
      }
      setGroupID([...selection.current]);
    }
  }
  async function ChangeNodeState(Current, State) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", reqData.current.Module).set("comand", "ChangeNodeState");
    params2.set("Info", reqData.current.Info);
    params2.set("ObjType", reqData.current.ObjType);
    if (!reqData.current.CLSID && reqData.current.Path) params2.set("Path", reqData.current.Path);
    params2.set("Current", Current).set("State", State);
    return AxiosRequest(true, params2);
  }
  async function ReviewTreeNodes(data) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", reqData.current.Module).set("comand", "ReviewTreeNodes");
    if (data.Info) {
      params2.set("Info", data.Info);
    } else params2.set("Info", reqData.current.Info);
    params2.set("ObjType", reqData.current.ObjType);
    if (!reqData.current.CLSID && reqData.current.Path) params2.set("Path", reqData.current.Path);
    params2.set("Keys", data.Keys);
    return AxiosRequest(true, params2);
  }
  async function updateMultiCheckState(id, subData = {}) {
    const keys = [];
    const collection = tree.current.querySelectorAll(".tree-item-checkbox-mc");
    for (let checkbox of collection) {
      keys.push(checkbox.id.split("_")[1]);
    }
    reqData.current = { ...reqData.current, Info: id, Keys: keys.join(","), ...subData };
    const json = await ReviewTreeNodes({ Info: id, Keys: keys.join(",") });
    if (json && json.items && json.items.length) {
      json.items.forEach((item) => {
        const innerCheckBox = tree.current.querySelector(`div[id="mc_${item.ID}"]`);
        if (innerCheckBox) {
          innerCheckBox.checkState = item.CheckState;
          innerCheckBox.innerHTML = getMulticheckIconForTree(item.CheckState);
        }
      });
    }
  }
  function getKeysforReq(parentElement, resArr) {
    const children = parentElement.children;
    resArr.push(children[0].id);
    if (children[1].children.length) {
      for (let child of children[1].children) {
        getKeysforReq(child, resArr);
      }
    }
  }
  async function onClickCheckBoxMC(ev) {
    const checkbox = ev.target.closest(".tree-item-checkbox-mc");
    const parentElement = checkbox.closest("UL");
    if (checkbox) {
      let json;
      const nextState = getNextState(checkSet.current, checkbox.checkState);
      checkbox.checkState = nextState;
      checkbox.innerHTML = getMulticheckIconForTree(nextState);
      json = await ChangeNodeState(checkbox.id.split("_")[1], nextState);
      const keys = [];
      getKeysforReq(parentElement, keys);
      json = await ReviewTreeNodes({ Keys: keys.join(",") });
      if (json && json.items && json.items.length) {
        json.items.forEach((item) => {
          const innerCheckBox = parentElement.querySelector(`div[id="mc_${item.ID}"]`);
          if (innerCheckBox) {
            innerCheckBox.checkState = item.CheckState;
            innerCheckBox.innerHTML = getMulticheckIconForTree(item.CheckState);
          }
        });
      }
    }
  }
  async function onClickItem(ev) {
    if (ev.target.closest(".expandButton")) {
      onClickExpandButtn(ev);
      return;
    }
    if (ev.target.closest(".tree-item-checkbox")) {
      onClickCheckBox(ev);
      return;
    }
    if (ev.target.closest(".tree-item-checkbox-mc")) {
      await onClickCheckBoxMC(ev);
      return;
    }
    const item = ev.target.closest(".tree-item");
    if (!item) return;
    changeSelected(item);
    if (!selectionMode.current) {
      setGroupID(item.id);
    }
  }
  function onDoubleClick(ev) {
    if (ev.target.closest(".expandButton")) return;
    if (ev.target.closest(".tree-item-checkbox")) return;
    if (ev.target.closest(".tree-item-checkbox-mc")) return;
    const el = ev.target.closest("ul");
    const expandButton = el.querySelector(".expandButton");
    if (expandButton) expandButton.click();
  }
  function calcHeight() {
    let correction = 0;
    if (props.showButtons) correction += 33.5;
    if (props.MultiSel && !props.checkModeOnly) correction += 20;
    return `calc(100% - ${correction}px)`;
  }
  function onChangeSelectionMode(ev) {
    const checkboxes = tree.current.querySelectorAll(".tree-item-checkbox");
    if (!checkboxes) return;
    if (ev.target.checked) {
      selectionMode.current = true;
      checkboxes.forEach((item) => {
        item.style.display = "";
      });
      setGroupID([...selection.current]);
    } else {
      selectionMode.current = false;
      checkboxes.forEach((item) => {
        item.style.display = "none";
      });
      const itemSelected = tree.current.querySelector(".tree-item-selected");
      setGroupID(itemSelected.id);
    }
  }
  async function onSelect() {
    const selectedItem = tree.current.querySelector(".tree-item-selected");
    if (!selectedItem) return;
    if (props.onEdit && props.setValue && props.setInputValue) {
      let value = values2.current[selectedItem.id];
      props.onEdit({
        value,
        tag: selectedItem.id,
        name: props.Name,
        record: props.record,
        textchanged: "0",
        setValue: props.setValue,
        setInputValue: props.setInputValue,
        type: props.Module,
        requestId: props.RequestID,
        addInfo: props.addInfo,
        multiselect: selectionMode.current ? "1" : "0",
        selection: selectionMode.current ? selection.current.join(",") : void 0
      });
      return;
    }
    if (props.RequestID) {
      await formEdit(
        "1",
        props.func,
        {
          Name: "ObjRef",
          Value: selectedItem.id
        },
        props.RequestID,
        props.from
      );
      return;
    }
  }
  const onKeyDown = (ev) => {
    var _a2, _b;
    ev.preventDefault();
    const selected = (_a2 = treeContainer.current) == null ? void 0 : _a2.querySelector(".tree-item-selected");
    const ul = selected == null ? void 0 : selected.parentElement;
    const expanded = ul == null ? void 0 : ul.expanded;
    const keys = {
      ArrowRight: switchCollapse,
      ArrowLeft: switchCollapse,
      ArrowUp: selectPrev,
      ArrowDown: selectNext
    };
    (_b = keys[ev.code]) == null ? void 0 : _b.call(keys, selected, expanded, ul);
  };
  const switchCollapse = (selected) => {
    const button = selected.querySelector(".expandButton");
    button == null ? void 0 : button.click();
  };
  const selectNext = (selected, expanded, ul) => {
    var _a2;
    if (!ul) return;
    if (expanded === "true") {
      const li = ul.querySelector("LI");
      selectTreeItem(li == null ? void 0 : li.firstChild);
    } else {
      const next2 = ul.nextElementSibling;
      if (next2) {
        selectTreeItem(next2);
      } else {
        selectNext(selected, void 0, (_a2 = ul.closest("LI")) == null ? void 0 : _a2.parentElement);
      }
    }
  };
  const selectPrev = (selected, expanded, ul) => {
    var _a2;
    if (!ul) return;
    const prev2 = ul.previousElementSibling;
    if (prev2) {
      if (prev2.expanded === "true") {
        const li = prev2.querySelector("LI");
        selectTreeItem(li == null ? void 0 : li.lastChild);
        return;
      }
      selectTreeItem(prev2);
    } else {
      const group = (_a2 = ul.parentElement) == null ? void 0 : _a2.closest("UL");
      selectTreeItem(group);
    }
  };
  const selectTreeItem = (el) => {
    if (!el) return;
    const treeItem = el == null ? void 0 : el.querySelector(".tree-item");
    treeItem == null ? void 0 : treeItem.click();
    treeItem == null ? void 0 : treeItem.focus();
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { onKeyDown, ref: treeContainer, style: { height: "100%", width: "100%" }, children: [
    load && /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      "div",
      {
        style: {
          height: calcHeight()
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          ContextMenu,
          {
            for: "tree",
            onRightClick: (id) => getTreeView(id, props),
            defaultMenu: props.defaultMenu || ["add", "addSub", "del", "params"],
            onMenuItemClick: ContextMenuHandler,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                style: {
                  height: "100%",
                  overflow: "auto",
                  border: "1px solid #cccccc"
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(Scrollbars, { style: { height: "100%" }, autoHide: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  "ul",
                  {
                    id: "tree",
                    onClick: onClickItem,
                    onDoubleClick,
                    style: {
                      height: "fit-content",
                      width: "100%",
                      minWidth: "fit-content",
                      listStyleType: "none",
                      paddingLeft: "0px",
                      paddingTop: "5px",
                      margin: "0px",
                      outline: "0",
                      transition: "0.2s",
                      borderBottom: "1px solid rgb(238, 238, 238)"
                    },
                    ref: (ref2) => {
                      tree.current = ref2;
                      if (props.ref) props.ref.current = ref2;
                    }
                  }
                ) })
              }
            )
          }
        )
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Grid$1,
      {
        style: {
          height: "20px",
          display: props.MultiSel && !props.checkModeOnly ? "flex" : "none",
          alignItems: "center"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "input",
            {
              defaultChecked: props.MultiSel && props.Selection || props.MultiSel && props.defaultMultiSel || props.checkModeOnly,
              style: { display: "flex" },
              type: "checkbox",
              onChange: onChangeSelectionMode
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "div",
            {
              style: {
                width: "fit-content",
                paddingTop: "2px",
                whiteSpace: "nowrap"
              },
              children: "Множественный выбор"
            }
          )
        ]
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Grid$1,
      {
        container: true,
        direction: "row",
        justifyContent: "flex-end",
        alignItems: "center",
        style: {
          width: "100%",
          display: props.showButtons ? "" : "none",
          height: "30.5px",
          paddingTop: "3px"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              onClick: (ev) => {
                if (props.onSelect) {
                  props.onSelect(tree.current, props, selection.current.join(","));
                  return;
                }
                onSelect();
              },
              size: "small",
              variant: "outlined",
              style: {
                textTransform: "none",
                marginRight: "10px"
              },
              value: "1",
              className: "button_Modal_Select",
              children: "Выбрать"
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              style: { textTransform: "none" },
              value: "2",
              className: "button_Modal_Close",
              children: "Отмена"
            }
          )
        ]
      }
    )
  ] }) });
};
const Tree$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Tree
}, Symbol.toStringTag, { value: "Module" }));
function DialogCreateObj(props) {
  const [groupId, setGroupID] = reactExports.useState();
  const [nameObj, setNameObj] = reactExports.useState(props.inputNameObj || "");
  const inputEl = reactExports.useRef(null);
  reactExports.useEffect(() => {
    inputEl.current.focus();
  }, []);
  reactExports.useEffect(() => {
    window.addEventListener("keydown", handleKeyDown2);
    return () => {
      window.removeEventListener("keydown", handleKeyDown2);
    };
  }, [nameObj, groupId]);
  function handleKeyDown2(ev) {
    const target = ev.target;
    if (target instanceof Node && document.body.contains(target)) {
      if (ev.key === "Enter" && nameObj) onEdit();
    }
  }
  async function onEdit() {
    if (nameObj) {
      const res = await smetaAxios.get("CreateObject", {
        prefix: props.Module,
        params: { ObjType: props.ObjType, GroupID: groupId || "0", Name: nameObj },
        loadMask: true
      });
      if (props.onEdit) {
        const data = { ...props.data || {} };
        props.onEdit({
          record: props.record,
          textchanged: "0",
          name: props.name,
          setValue: props.data ? props.data.setValue : void 0,
          setInputValue: props.data ? props.data.setInputValue : void 0,
          ...data,
          proof: false,
          value: res.Text ? res.Text : nameObj,
          tag: res.ObjRef,
          requestId: props.RequestID,
          CheckState: props.CheckState || "0"
        });
      }
      smetaModals.close(props.smetaModalId);
      return;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { style: { width: "100%", height: "calc(100% - 40px)" }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, style: { margin: "8px", width: "calc(100% - 10px)" }, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { width: "46px" }, children: props.spanText === void 0 ? "Наименование объекта:" : props.spanText }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          TextField,
          {
            inputRef: inputEl,
            size: "small",
            id: "name-object",
            autoComplete: "off",
            variant: "outlined",
            value: nameObj,
            fullWidth: true,
            error: nameObj === "" ? true : false,
            helperText: nameObj === "" ? "Не указано наименование объекта" : "",
            onChange: (ev) => {
              setNameObj(ev.target.value);
            }
          }
        )
      ] }),
      props.groups ? /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "100%", height: nameObj === "" ? "68%" : "73%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Tree,
        {
          props: {
            CLSID: props.CLSID,
            multiCheck: false,
            ObjType: props.groups.ObjType,
            Module: props.groups.Module,
            ObjRef: props.groups.ObjRef ? props.groups.ObjRef : "0",
            UsedDate: "0",
            selectID: setGroupID
          }
        }
      ) }) : null
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { height: "10px", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none", marginRight: "10px" },
          value: "1",
          className: "button_Modal_Select",
          disabled: nameObj === "" ? true : false,
          onClick: onEdit,
          children: "Выбрать"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none" },
          value: "2",
          className: "button_Modal_Close",
          onClick: () => smetaModals.close(props.smetaModalId),
          children: "Отмена"
        }
      )
    ] }) })
  ] });
}
var Circle = {};
var hasRequiredCircle;
function requireCircle() {
  if (hasRequiredCircle) return Circle;
  hasRequiredCircle = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Circle, "__esModule", {
    value: true
  });
  Circle.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Circle.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2"
  }), "Circle");
  return Circle;
}
var CircleExports = /* @__PURE__ */ requireCircle();
const CircleIcon = /* @__PURE__ */ getDefaultExportFromCjs(CircleExports);
var History = {};
var hasRequiredHistory;
function requireHistory() {
  if (hasRequiredHistory) return History;
  hasRequiredHistory = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(History, "__esModule", {
    value: true
  });
  History.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  History.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9m-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8z"
  }), "History");
  return History;
}
var HistoryExports = /* @__PURE__ */ requireHistory();
const HistoryIcon = /* @__PURE__ */ getDefaultExportFromCjs(HistoryExports);
function DialogHistory(props) {
  const gridPanelRef = reactExports.useRef();
  const [mainGrid, setMainGrid] = reactExports.useState();
  const records = reactExports.useRef([]);
  const currentDay = reactExports.useRef();
  const valueList = reactExports.useRef([]);
  reactExports.useEffect(() => {
    getParamHistory().then((res) => {
      var _a2, _b;
      const result = [];
      if ((_b = (_a2 = res == null ? void 0 : res.Items) == null ? void 0 : _a2.items) == null ? void 0 : _b.length) {
        res.Items.items.forEach((item, index2) => {
          result.push(item);
          result[index2].UsedDate = item.UsedDate ? {
            text: getDateOfInt(result[index2].UsedDate),
            id: result[index2].UsedDate
          } : "";
          if (Number(props.EditStyle) === EditStyle.Check) {
            result[index2].CheckField = { text: "", id: item.ObjRef || "0" };
            result[index2].Text = "";
            result[index2].EditVal = "";
          }
        });
      }
      if (res.UsedDate) {
        currentDay.current = {
          text: getDateOfInt(res.UsedDate),
          id: res.UsedDate
        };
      } else {
        const strDate = getStrDateOfDateObj(/* @__PURE__ */ new Date());
        currentDay.current = { text: strDate, id: getIntOfStrDate(strDate) };
      }
      if (res.Values) {
        Object.values(res.Values).forEach((item) => {
          if (typeof item === "object") {
            valueList.current.push({ label: item.text, id: item.id });
          } else {
            valueList.current.push({ label: item });
          }
        });
      }
      records.current = result;
      mainGridLoader();
    });
  }, []);
  async function deleteRecord(request) {
    const deletedID = gridPanelRef.current.grid.source.getFieldTextSync("ID", request.RecordIndex);
    const deletedIndex = records.current.findIndex((record) => record.ID === deletedID);
    if (deletedIndex !== -1) records.current.splice(deletedIndex, 1);
    return {
      Command: "DeleteRecord",
      RecordIndex: records.current.length === 0 ? 0 : request.RecordIndex - 1,
      RecordCount: records.current.length,
      UpdatesPending: "1",
      RecordKey: {}
    };
  }
  function createRecord() {
    const index2 = records.current.length ? gridPanelRef.current.grid.source.activeRecord + 1 : 0;
    const newRecords = [...records.current];
    newRecords.splice(index2, 0, { UsedDate: currentDay.current });
    return {
      index: index2,
      records: newRecords,
      keys: ["UsedDate"],
      titleKey: "Text"
    };
  }
  async function checkFieldText(request) {
    const val = await getObjText(props.Module, props.DataType, request.ObjRef, "-1");
    return { Text: val.Text, ObjRef: request.ObjRef, EditVal: val.Text };
  }
  async function mainGridLoader() {
    const res = await GridLoader(gridPanelRef.current, props, {
      localGrid: true,
      refresh: false,
      Columns: getColumns(),
      defaultFields: getDefaultFields(),
      keyField: "ID",
      recordKeys: ["ID", "UsedDate", "ObjRef", "Text", "EditVal", "CheckField"],
      titleKey: "Text",
      getFieldText,
      checkFieldText,
      onPostRecord,
      createRecord,
      deleteRecord,
      getRecords: () => records.current,
      Rights: "-1"
    });
    setMainGrid(res);
  }
  function findFreeId(records2) {
    const ids = records2.map((record) => parseInt(record.ID, 10)).filter((id) => !isNaN(id));
    if (ids.length === 0) {
      return "1";
    }
    for (let i = 1; ; i++) {
      if (!ids.includes(i)) {
        return i.toString();
      }
    }
  }
  async function onPostRecord(request, requestData) {
    let attributeIndex = 0;
    if (request.NewRecord === "1") {
      records.current.splice(request.RecordIndex, 0, {
        ID: findFreeId(records.current),
        UsedDate: currentDay.current
      });
      if (requestData.length > 3) {
        attributeIndex = requestData.length - 1;
      } else attributeIndex = 1;
    }
    const modifiedField = request.RecordSet.Attributes[attributeIndex], modifiedData = requestData[attributeIndex];
    const record = records.current[request.RecordIndex];
    if (modifiedField === "UsedDate") {
      let newUsedDate = "";
      if (modifiedData.id)
        newUsedDate = {
          text: getDateOfInt(modifiedData.id),
          id: modifiedData.id
        };
      record.UsedDate = newUsedDate;
      return;
    }
    if (modifiedField === "CheckField") {
      record.CheckField = modifiedData;
      record.ObjRef = modifiedData ? "1" : "";
      return;
    }
    let newText = "", newObjRef = "", newEditVal = "", json;
    if (props.EditStyle == EditStyle.PickList && props.Module === void 0) {
      newText = modifiedData.text;
      newEditVal = modifiedData.text;
      newObjRef = modifiedData.id;
    } else if (props.EditStyle == EditStyle.Check) {
      newObjRef = modifiedData.id;
    } else if (modifiedData) {
      if (!modifiedData.id) {
        json = await setParamObjectText(props.Module, props.DataType, record.ObjRef, modifiedData.text);
        newText = json.Text;
        newObjRef = json.ObjRef;
        newEditVal = json.EditVal || newText;
      } else {
        newObjRef = modifiedData.id;
        newText = (await getObjText(props.Module, props.DataType, newObjRef, "-1")).Text;
        newEditVal = newText;
      }
    }
    record.ObjRef = newObjRef;
    record.Text = newText;
    record.EditVal = newEditVal;
  }
  async function textDropDownList() {
    if (props.Module) {
      const params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", props.Module).set("comand", "GetObjectValues").set("ObjType", props.DataType);
      let json = await AxiosRequest(true, params2);
      json = Object.values(json.Items);
      return json.map((item) => {
        return { label: item.text, id: item.id };
      });
    } else {
      return valueList.current;
    }
  }
  function getColumns() {
    return {
      title: [
        {
          fieldName: "UsedDate",
          title: "Дата",
          width: 100,
          fieldInfo: {
            ...defaultFieldInfo,
            DataType: DocFieldType.IntDate,
            EditStyle: EditStyle.Calendar
          }
        },
        {
          fieldName: "Text",
          title: "Значение",
          width: 200,
          fieldInfo: {
            ...defaultFieldInfo,
            onDropDownList: textDropDownList,
            DataType: props.DataType,
            EditStyle: props.EditStyle,
            options: getParamColumnsOptions(props.Options || 0),
            Module: props.Module,
            CheckField: "CheckField"
          }
        }
      ]
    };
  }
  function getDefaultFields() {
    return [
      {
        Name: "ID",
        Title: "ID",
        Width: "7"
      },
      {
        Name: "UsedDate",
        Title: "Дата",
        Width: "10"
      },
      {
        Name: "ObjRef",
        Title: "ObjRef",
        Width: "7"
      },
      {
        Name: "Text",
        Title: "Значение",
        Width: "20"
      },
      {
        Name: "EditVal",
        Title: "Наименование для редактора",
        Width: "30"
      },
      {
        Name: "CheckField",
        Title: "",
        Width: "30"
      }
    ];
  }
  function getFieldText(request) {
    var _a2;
    if (records.current.length) {
      let val = request.FieldName === "Text" ? "EditVal" : request.FieldName;
      if (gridPanelRef.current.grid.source.getState() === 3) {
        if (val === "EditVal") return { Text: "" };
        return { Text: currentDay.current.text };
      }
      const recVal = records.current[request.RecordIndex];
      return { Text: ((_a2 = recVal[val]) == null ? void 0 : _a2.text) || recVal[val] };
    }
    return { Text: "" };
  }
  function getParamHistory() {
    const params2 = props.paramsRequest;
    params2.set("comand", "GetParamHistory");
    return AxiosRequest(true, params2);
  }
  async function setParamHistory() {
    var _a2;
    const params2 = props.paramsRequest;
    params2.set("comand", "SetParamHistory");
    const data = [];
    records.current.forEach((element) => {
      const dataItem = {};
      if (element.UsedDate.id) dataItem.UsedDate = element.UsedDate.id;
      if (element.ObjRef) dataItem.ObjRef = element.ObjRef;
      data.push(dataItem);
    });
    const json = await AxiosRequest(true, params2, { Items: data });
    (_a2 = props.onSelect) == null ? void 0 : _a2.call(props, json);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", height: "calc(100% - 40px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        style: {
          width: "100%",
          height: "100%",
          border: "1px solid #cccccc",
          position: "relative",
          overflow: "hidden"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenu, { for: "grid", Menu: getDefaultMenu("history"), refs: { current: mainGrid }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: `rcgrid_panel`, ref: gridPanelRef, style: { width: "100%", height: "100%" } }) })
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { height: "35px", width: "100%", marginTop: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none", marginRight: "10px" },
          value: "1",
          className: "button_Modal_Select",
          onClick: () => {
            setParamHistory();
            smetaModals.close(props.smetaModalId);
          },
          children: "Выбрать"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none" },
          value: "2",
          className: "button_Modal_Close",
          onClick: () => {
            smetaModals.close(props.smetaModalId);
          },
          children: "Отмена"
        }
      )
    ] }) }) })
  ] });
}
const ConditionsValues = [
  "Равно",
  "Не равно",
  "Больше",
  "Меньше",
  "Больше или равно",
  "Меньше или равно",
  "Содержит",
  "Не содержит",
  "Начинается на",
  "Не начинается на",
  "Заполнено",
  "Не заполнено"
];
const ConditionsImage = [
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAOElEQVR4nGNgGAUjBMTOOPekY/PdB5Tg2BnnnsANBAnc//DvPyW4Y/PdB7Rz4eAHsaORMgqGGQAAYHJYqJ0Fh6EAAAAASUVORK5CYII=",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAnElEQVR4nGNgoAVw6zh21b39uAPVDPToOG7j3n78pWv7CadRQ8kDsTPOPenYfPcBDFesuPHcu/vkn9LlN14gi+PDsTPOPYEbCBK4/+Hff2S858bH/yETz/zffvUDijgu3LH57gOcLiTHpbHILhz8SSoWh5dJ8X4soUjBhvFFVAcxkUKKS2OJjRSqhCkxYIQb6t5+3AFUSFPNQGQAANS5mPhdbDaGAAAAAElFTkSuQmCC",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAACOklEQVR4nGNggALfnuOuDNQEmfOvvChbcf1cwsyLKfX1/5koNrBjy7379z/8+3/g1uefdetuXY6beb7Jvn4/B9kGZi+8cu/yi1//QYaC8OE7n/+ADE6adbHNvn4/D8kGerQeEk2bf2Vq66Y7N88+/v4PZvCZx9/+tWy4fStlzoXZzm0nhUk22L5+P0/anEsttWtuXT5698sfmMGXn//837fz4f3M+ZeX+XSckSPZ4ND6K2ypsy8WVqy8cXbvjY8/YAbfeP37/8wDT57kLLi6OXDCKR2SDQbFeNzs8zHFS68eX3fuzZd7UIPvvP37f/HxF6/yF1/dGznxnD3JBjP8/88YM+1scOHia0dWn3n14d57iMF33//9X7r8+mMGSkB4/2mH5FkXLmy5/O43yFBQkiPbsLAp57zyF1/dt+Tki7d33v39T5aBoHCMmX4uDhyOF95+gofju7//Fx17/iZt7uVdRBlkPPMMa/SMs7kFi6+eX3/h7XdYTN9+++f/vMNPX2XOv3w4eOo5K4IGeUzcxp4880Jl0dJrF/ff+vwTZtD1V7//z9z/+FH2witbwvvPahI2qP4EX/rcS621a25eOfHgGzxRX3z28/8EUKJecGW5d8sxaaK8lzrn4ryu7ffvgjTDDDrx4Ovfhg13rqXMudTn0nGGn4Gc0ub+h3//D935/Ktx/e2LSbPON/nUn+EiySAGJAN3XfvwrXLVzdNxMy/m29fvZyHLIBgIn3L2XOzUC+GgHEGRQdQGAM7VmHTK9LlYAAAAAElFTkSuQmCC",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAACN0lEQVR4nGNgoALw7TnuSrEh9fX/maKmn08oWnb9WMa8S8/JNsh45hnWhBkXikqWXb+w8/rH7/c//PvfseXefZINsq/fz5M062Jb3bpblw/f+fwHZBAIX37x63/2wiv3iDbIo/4EX9qciz2Vq25dO/Hg61+YQRef/fw/cfejexlzL61w6TwiRdAgr66TEpnzL09u2XD71vlnP8CGgPCph1//tm+5eyNp9qUp9v37BQgaFDThuGr2wiuL+3Y+eHz11S+4QQfvfPrVuP7OxaSZ55tCe49xEjQocOop04LF19bPPPDkxa23f+AG7br24Vv16lun4mdeyLOv389CdFiVLr/++O77v2BD7r3/93/1mVcfChdfOxIz7Wwww///jAykgo4t9+6DDNty+d3v5FkXLoT3n3Yg2RBsBt559/f/0hMvPxQvu3osdtoFHwZyQdrcy7sWHXv+BmQg2Nsf/v1fd+Htp+KlV4/HTD8XB8oZJBsaPPGUYfbCK1sm73704sYblIj5VbHi5qWYaefqPSZuYyfZYN/uE4rZC68u6d/58MGVl4ikc+Tu59+1a25eSZh5ocu1+wI3yQZ7tB4STZt/ZWrrpns3zz7+/g9m8OlH3/61b7l/I23upaluvceESDbYpeMMf8qcS30NG+5gZL+u7ffvps65OI+BHBBaf4UtZdalovKVN87uvfHxB8zgDnJKG2QAivH4mRdiC5dcObHu3JsvFBsIB///M8ZOvRAePuXsOeoYiAUAAHqKmASOZ56zAAAAAElFTkSuQmCC",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAABO0lEQVR4nGNgoBWIm3GhM2/R1S1RM86GG888w0qxgWlzLi24/+Hf/wO3Pv9s3XTvZvaCK1vDJ5zxqa//z0S2gTff/PkPMhSE77z7+3/jhbc/Gtbdvp698OoSv8knTUgy0Lf3rEranEuzq1ffOrX+/NuPIANhhoMsWn7q1eeaNbfOp8+7NM2j64wySYaHTj5rmTn/8rLqtbeubLn87vu99xCDQfjqq1//Fx17/qZy1Y0zKbMu9Xl1nZQg2mD7+v0s0RPPheQuurq5c+v92wdvf/4LMxiEzz/98X/qvidPkmdeqGMgFfjUn+EKm3wuJX/x1e19Ox/eP/nw2z+YwWlzLi0YGAPtqeXlUGpEii+1k00atRN2GrWzXhy1Cweqg/hpF2Z0bL77gBwcP+3CDAwDYWFIDsaasKnuQmoBAAOdBqNDTsZUAAAAAElFTkSuQmCC",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAABM0lEQVR4nGNgGCzAeOYZ1qgZZ8PzFl3dEjfjQifZBkVOPmuZOf/ysprVN65uufTux70P//6nzbm0gCRDfPqOGaXOuTSnZvWt8xsvvP16593f//c//APjm2/+EGegc/sppfjp53srVt44vvzkq/cgjTBDQAZuuPjuS926W5ezF1xdEjThnCpWQ9x6jwmlzb1UW7r82pHp+x6/uvz8J9wQED5w6/PP1k13bmbNv7wtfMIZH4b//xlxuih55oW6qfuePDn/9AeKIQdvf/7bufX+7dxFVzdHTzwXYl+/n4WocEqbc2kBzJBTj77/n7Tr0YuSZdf2x864kOFTf4aLKENoamAytb1M9UihSbKhacKmadajaeFANIifdmFGx+a7D8jB8dMuzMAwEDlhk4qxhiHVXUgtAACMswYJstw1TQAAAABJRU5ErkJggg==",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUEAYAAADdGcFOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAOTSURBVEiJ7ZVPTNNQHIDbrqulm8MO6OqmFhqRwGQ4hDDxwg7ExAgREhJC4kGjzBMhMSaY7LAICSf0sMMwmHAg7MABoka9+ecA8U9QGdkMJLAtYbNTOrZ1tG5d9zwQLiRmM0L0wHd938vve7/Lg6BDDvm3wMWKPT2PHy8s6PXnzhkMNP3wIUXpdEeOnD6dTIpiNsvza2sbG+m00+nx3LpVX+/zXb8+Pu7319UxjMGA4/39kcjW1vb23NzExI0bFsvbt8XORQqHzczMzKhUra0mk9H49OnFi7W15eUdHZubgpDNhsMEgWFqtUZz4YLZXFExO9vf/+iR33/qlMGg16vVXV2dnc3NJtPAgCxns4qCYcWGFR1YWakoDQ23b7e1WSw03dr6/PmHD5GI233v3pUrVVV9ffPzfv/GRlcXiqpUMCxJLGs0EsToaEVFaSmOs2wo9P17Os1xPM9xijI/v++BLGswEMTlyysr0Wgqtb7+8ePqKseNju6eT08PDNhsqZTPFwolEl4vy9K0RmO3YxiCAFBTk0iIoiyHQs+euVxNTaK474EaDY6jKE0Lwva2LK+vv3njctntP3/u9d69+/o1GnW7AYBhAGSZYShKq7VaBUGScrlg8E/Dig5UqVQqBCHJTEZRAOD533k74el0LLa1JUmfPp09yzAkSRA8LwiZzAEGQlA+D0GKgqIIAsM4XsiWJFkGIJlUFEXJ5yGI51OpbDYSObDATEaWc7kfP0pKMAxBTpz4vQkAADBcVqbVYpjVurN5CKqspCiCsFr32m1tLtfr14UfXDAwHI7HJcnvP3PGZCotNZsdjqmpQKC9fa83OOj1BgJ9fY2NLFtWVlf34sXiYjQaixmNJInjNttOEIru+jhOEDje21toPlpICAZjsURieDgYjMWOHm1vP3+eYXS64eGeHo/ny5dAAILUalGUJIuFYUhycDCXy+cBkOXPn4PBeHxkxG43mynK6bTZamuPH3e7a2omJ32+UEgUMxlFWV4uNL/on+TOHa83ELh6tbm5urq8fGwMQWAYhrVaCIJhAESRonS6khKSfPVqeZnjxsfv3+/urq4eGnI6Z2dXV+/era8/eZIkh4ZWVqLRZDIcfvKE4xKJlpbFRYejqUmW/zpwl2vXPJ6lJYqi6WPHMOzmTbUaRVEUw759i8dF8eXLyUmHo6Hh/fu99y5devBgYUGv39zUaDBMEAqFHXLI/8IvorKX56DZt8EAAAAASUVORK5CYII=",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUEAYAAADdGcFOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAQjSURBVEiJ7ZRfSFN9GMfP2Tk7np3NM8/mzv7Y1A6j0Go2KdrmjXVTVAYSQQgFgjkvyrwIOkHELgojwqBJFhTmRYsWGIUp7MZBNChnobhogrPRttRt5s7+uZ2dc94L8Q18kdX7Iu+N39vfw/f7+f2e5/cAwLa2tTU6c8Zu9/sRpFQd/PuGjx97vQrF/v1qtUZz7x5J4nhZmcGQTGazhUIiMTcXDqfT168PDFy4sG/f9HR7+8OHfn99fU2NWo2inZ2RyM+fmcyrV9+/x2KZjFyeSgFAMnnixJq7zbZZrqg0mMvlckGQ1VpVpdO9edPUVFdXWdnSEo+nUoVCKIRhCCIWS6UWy549KtXwcGfno0d+f3W1Wq1QiMWtradOHTxYVdXdvbS0spLNHjsmCIIAgqdPx2IVFQhy8WKp/JKAtbUc19DQ1dXcbDRqNFbr27cfP0YiDse1aydP7tzZ1vb+vd8fDre2wjAEgWAuR1E6HYb19qpUcjmKUtTIyMREOMwwuVyhwPMEYbGsrh461N4+OWmzHTjAsqXyS7aYotRqDDt+PBCIRhkmGJyYmJ1dWOjtXT9/9qy722xmGL3+xYtAwOlsbKQogrh0yeOZmVlcLBQAQCQSidJpt5umrdauLre7VOIfAkqlKArDGk0qlcmwbDDo8djthw+vrm6se/fu27dYrL8/ny8WOY6mSVIuLyurrCSI8nKJ5OXLP8P6pZIthiAIEokIIp/nOEFIJDaer8+oTAYAEHTnDssWizwfDJ4/f+SIwSAWJxKpVD4/P79lgADA8wDAcTAsEoEgiv4CW1sTyWQwqNc/fSoIPA8AHo9er1JJpVNTHMdxPA8AiQTDFAqRyJYB5vMsWyzGYhIJgohEO3a0tNjtPh+GMQyKMszz52tVTqfbTdNms8ulVMpkCGIyrb08ANTWkiSGmUwbfZub7fbx8V8X/teAodDyci7n91dXq1Qy2d69HCeVcpzHA4IgKAgPHrjdNG2xjI319DidX760tTU2UpRSWV8/Ojo5GY0uLup0BIGiZvMaEPz3zKMohqHo2bP/GXBmJhqNxx2OoaHx8bk5QbBad+9WKjGsvBzHMezr1/UFbjTW1BBET0+xyPOCwLKfP8/PLy/fvCkIAAAAJGk219VptQ6HzTY4OD199apKheMourRUKn/TX3z06K1bPp9Wm04zDMvevYvjBMHzNG0waLU4fvnyrl06nVz+6RMAgKAgZLMkieMSCUGMjPh84fD9+0+edHQYjf39Wu3w8OysRGIyUZRSSdOBQDSaTIZCr18vLKys9PWVAgQ3B7x92+u9cQOCYFgQhoZGR69caWoKhc6dGxiYmiJJjaaiAkE6OsRiGIZhBPnxY3k5mx0bGxy02RoaPnz4p19fn9erUMTjUimCpFK/u6i3ta3/W38BgVXOiz68N3kAAAAASUVORK5CYII=",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAACI0lEQVR4nGNgGNLAu/O4as7CK4+bN965D8JlK248iZxy2otsA9PmXpp65eWv//c//APju+///s9acGUt2QZWr7p5GmTQ0pMvX4EwiN284c41+/r9LCQb5t9/0mDZyRfvQIaULb+xr2z5jQMg9o6r739GTz4TSLKBGfMuz7vx+vf/y89//k+ZdakzadbFnkvPf/6/9/7f/5xFV9aRbGDdmlvnQS5aePz5W7/OU+runUfUFx17/gbs7Y23b4TWX2Ej2jDfvtPWq8+++gTSXL3m5jmYeO2aW2dBYjuvffgVNfl8KNEGZi64svzWmz//77z7+z9zweWlMPGMuZdWgMTuffj3P2fxlQ1EGVZf/5+pYf3tyyCXbL/64UfEpDPeMLngCWd8dlz98AMk17rp3k37+v0cBA0M6z/jvvnS228gTS2b7r5Kn3tpQeb8K7NBGMQGiYHk9tz4+CtiyrlIggZmL7iyFuQtWGLGhUHezl90dTNew4xnnmFt3njnOiHDYLh1893bob3HOHEaGD3xXMjOax9+ghTP2P/4ZfKsC6tS5lxcgYxBYiA5kJp9Nz/+jpt6Lg6ngbkLr24BJVyQ4spVN4/hUlex6sZxmCvzF13dglURKMY6tty7DVJ0482f/2lzL8/AZWDa3EuzQLkIpLZ9y707rt0XuDEUBfaeiihZfv1x97b7tytW3Xzo03/SEpeBIDmQGpDa0hU3Hgf0nyYc24MGAADCGcM5CAz6gwAAAABJRU5ErkJggg==",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUEAYAAADdGcFOAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAATkSURBVEiJ1ZVLTBNdFMdvh05nRtrODPTF07SlCoi6IAWMj7ChQFAQk7rA90JMDHtx140B1GhcsPCBAgtNTNhoVGwUMBGmpkgaqCSFFqSG8ihl6COF6Wu+xWTSpKYBPvlivv/mzj1zztzfveeeMwD8X2QwdHRQ1KNHBkNHh8VSXv63eXgJ+QcIgiAAPn9mWZZl2XfvONCGBrP59u2qqu/fUwNPn75712LR6dRqlUosHhpSKnEcw2Ix/n0wuLUVi8Hwr19ebyDQ2vryZVubXv/+/R8TGwydnRRVX19b29lJUcvLtbVdXWNjFRWpfjdu9PRMTXV32+0rK5EIy87Pb2wkEsnR5aLpeJxlb97s67PbBwb+LQ+UajCb29uPHfvwgWUBAODaNQBYViB48yYVVCaTSkWiiorMTAQRCgGgqJkZr9fr5UcIEggEAgBycnAcRUtKqqtNpuFhoTB1vV0Dbgfa0HDvnsVy8eKhQ4WFBKHV8v4229wcTdvtNpvLRdPT07xdr9fpZDKtNi9PJpNKz5zZM8B0oCzLsgA8eZKdLZEgCEmGQpub0SgANB0IRCJW69paKMQw4+PBIGc/cCA3VyoViUgSx1H00qU9B0wF1WgUiszMpaVnzz59cjoBMJsnJz2eQGBlhaYZ5vlzj2d9PRh8+tRm+/lzfd3n4xINgFIplSJIaanRaDL9+CES7TlgY+PDh1br8ePV1YcPq1Ry+eXL1dUaDQBDQ5OTKyv79jEMANEojg8O3rp14oTD4XR6PKHQwgIfX1mp08nlGg0MZ2dHIk1New6Yl0eSGNbWduTI/v0kKZGUlOTn4zgAJCkWI8jXr/wdravr6Bgd1eu9Xr9/a2t2Nh5PJFgWgKKi3FyJBIazs0lSJLpwYc8ATSaTiWUhSKnEcRQtK4NhoRCCAJidXV4OhRgmFotG4/H795N3VCCAoLdvPZ719XD42zenk/PjEs1VNYbxVY2ifww4PU0QExM1NeXlWi1JJqt2YsLlWlsLBAhCLBaJjEatVqWSSM6dk8mkUgSx2aLRRIJl79wZGZmaWloKh/m4ykqdTiZTq3Ny5HIcb27ebv1t+5JCQZII0tpaUpKfTxAYxttbWk6eVKvlcm525UpqnN3udm9sANDfPzIyN4dhCwurq6EQANyfB4YVCokERVtaOO9Xr9Ktn/YEy8sfPx4fh2GViiQxrLQ0IwOC+DTtRGVlhYUEAQBfTN3dg4MzMwC43RyoUkmSCFJcbDQ+eDA2ltx4qtKeYHExw0BQU5NeX1Qkk2k0vP3jR5vN41ldtVpnZ32+L1+4NpJIpPsO1zchqLS0oADHa2o4UIJobq6oKChQqx0Ot9vvNxo57/7+HQNmZREEil69qtPl5Egkyb61sLC6Gg67XD09168fPXr+fLr4VLW3v37tcFAUd6JVVVzqMzIIAsNguLU1HeBvKearKy8vKwtFDx7kGy3DxGKJBAA+XyjEMJOTOwXjRdPBIMNMTXEbTqZ+ednv39ysqjIYOjtHR0+d2haQJKVSsfjsWZ8vGIxEUHRggKLcbqezt3doaG7O7fZ4/P5wuK9vt4CLi4HA5uaLF729w8Pz8263w7G4GAg4nbm5WVliMU1DkEAAQck+ysft4tr/t6qr6+qiqMZG/l+PIAJBPK7T/W2u31Rf39VlseTn8/N/AMivUV4XOqXrAAAAAElFTkSuQmCC",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAACjElEQVR4nJ1U309SYRg+Xpf1J1R/Qtl9N7laa8w/IH6sAgMvuEouXVkrB5LREhFBzRtAb6hpBW6tQDwmHpBzkMMkiFCRg5sOOW1A62sPNRYV5PHd3g3O+33Ped/nfZ5DUW2i20ifU45F+tSO9WGk3MborjxaPktJCkI6VLboTYOHp52BnSL9WST83rd6LmdE4gzmBYObp5XWiOq/WJcfh0/3TbOLb+L7XzMH30m8UCXuVaFk8WdzSM+qUIoLVYLa2419UTvFLuJOSzD9DMcAJJavkHveFK9xxJ5fN4cudBujJ5A9JroLzwa9KZ7NVwhXqBL9C27tb1BCOtAZwILpckU7xc7LhoKdrSZBTTfNLiylyxWAotOmA+AMY6IzgOEFR+EaoNxulSxw+6LcxigbNYMrsQJe7ns3k+06+zOuDtCnHr76xONuv5unG9LANjEu+KEkhtrBWjeEGpkIbAvXjEtnKJWV0UEa2KbM9PG8VMAeE901Gy4eQlLysegd6rYjNsIXa2TEl81dGnh3UiqgbCjY+dSX3QKGxhkzU2p77An+WHzZnBT+fufR4s9uJYQauWVfH6YUNkaLkT3hvRI0d5yR58LFw1BGJAprpJeCN52BvAAHHGcpvc5fS/mwU6gvBQFvYvVwgJSx4ZAHL1NJ3L3rSvyUDQJGhzdhJ4hVirDZ3SqZZyHsqLy5OMn5YSPYCQdBdrvO6tbLlCsA1E1yvn8egtEBCjsNejeTmonYqMy8chFyQuI3OMOYAELqZ+Lhli9HAUZ/HT8QwQvInl0TSs/8X3LIubBQwjPUMCY6azdJI26MM4p+V4K2v98WIAfoFBlKi/VtYgHNnB0xIAPFKKPF5x+ihbUa0mgRPwCqNiSFxXi1TgAAAABJRU5ErkJggg==",
  "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAACXBIWXMAAAsTAAALEwEAmpwYAAACmklEQVR4nL1UWW8SURil/0B99Af44J/wxRgTNPGlIVUTGivUhaWJNr61JFqrtWqUYIoWSqFII5WtqVISXCLWEJaBYVhKh5kaBRsMS0IfBNOOORhG6GDEB/2SyWTuPXPu+ZZzRaL/FQM64pRynnJqnHT4hmsjO+HJZccd61GlhXIO6CInRRzXB5z0MXnm/Gw8eOzu2oGuRP0PoodHFpLvPfHyNlPZ5dhq58NUdzk3UdpWmZOB09rINf2bfD5d/M7JDeQHAZlUT4hvLedYurzDkV/q3PRLhhl9mvEOG0mbbJa0qy1J/9QKw8YLdQ4YX6rawCEghVKBMpABsBgqluQGcu7I/df79h569Hbg4NlH0SCR/9ZUvJqq1qFUoA5p4tRn4WJpUE8ofldbKIEikIGULu9wSnMy0Kop3wDUDGnKDORcL2R4Q2m8UOdcsVKt/yEh5oHoJhqAmnVLsxsZvpH+nZVNFo1SmSgXDx5zZCMAXrGmV3sla+2pralXWB930mH+hwl3LovFi6aEdS/Z4ExMovN/Kvwk+7w19CQubd+XG8gl7GFO+cWbHqZJKDOS9r8hQ1wyUrYm4TKd4Rc1TrqZsnoh5e8lzfa4ak37gNE4NkL8osJMuVBYDC0K3SsZ7HbP+5FBQy+bqOf8BrzpjpVqGAGMQi9kiGFjwkJtNWDFmkQbO/Frh+P6VJZkAEPacsCfyM7p4+ql8Ncy/hmxpN4KALAPbNRyAJQi/W5pQpk9XCwDO+nJ5STa4KEOUHvNvMlKA6ci/akXDItGYTQuGMjFUVvGN+3dZJEmMCAbmokdF6jD1YMrCKRQCm/CTmiU4PqqNK+vGtIUKGuFePLdfpkxsdZeM3gTdsIFi6G97qbXxxzZkGKeWupswD+OH52Oks1SsyyPAAAAAElFTkSuQmCC"
];
function ConditionButton(props) {
  const [value, setValue] = React.useState(Number(props.condition) - 1);
  const [items, setItems] = React.useState([]);
  const [anchorEl, setAnchorEl] = React.useState(null);
  const open = Boolean(anchorEl);
  const handleClick = (event) => {
    setItems(getItems(props.conditions));
    setAnchorEl(event.currentTarget);
  };
  const handleClose = () => {
    setAnchorEl(null);
  };
  const clickMenuItem = (ev) => {
    const item = ev.target.closest("li");
    if (item) {
      setValue(item.dataset.index);
      if (props.paramsBoxRef && props.paramsBoxRef.current) {
        const record = props.paramsBoxRef.current.querySelector(`#${props.recID}`);
        if (record) {
          record.dataset.condition = Number(item.dataset.index) + 1;
          if (props.onEdit) {
            props.onEdit({
              record,
              Condition: Number(item.dataset.index) + 1,
              textchanged: "0"
            });
          }
        }
      }
    }
    handleClose();
  };
  React.useEffect(() => {
  }, []);
  function getItems(conditions) {
    const result = [];
    for (let i = 0; Math.pow(2, i) < conditions; i++) {
      if (Math.pow(2, i) & conditions) {
        result.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem, { onClick: clickMenuItem, "data-index": i, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                style: {
                  display: "flex",
                  justifyContent: "center",
                  alignItems: "center"
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: ConditionsImage[i] })
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { paddingLeft: "5px" }, children: ConditionsValues[i] })
          ] }) }, `item-condition_${i}`)
        );
      }
    }
    return result;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        style: {
          height: "18px",
          width: "18px",
          display: props.visible ? "flex" : "none",
          fontSize: "100%",
          justifyContent: "center",
          alignItems: "center"
        },
        id: "basic-button",
        "aria-controls": open ? "basic-menu" : void 0,
        "aria-haspopup": "true",
        "aria-expanded": open ? "true" : void 0,
        onClick: handleClick,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: ConditionsImage[value] })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Menu,
      {
        id: "basic-menu",
        anchorEl,
        open,
        onClose: handleClose,
        MenuListProps: {
          "aria-labelledby": "basic-button"
        },
        children: items
      }
    )
  ] });
}
function DialogSaveSample({ props }) {
  const [value, setValue] = React.useState(props.value !== void 0 ? props.value : "");
  function onEdit(data) {
    setValue(data.value);
  }
  function onSelect() {
    HandleSamples({ Path: props.Path, Command: "save", Name: value });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      id: "mainElement",
      container: true,
      direction: "column",
      justifyContent: "flex-start",
      alignItems: "flex-start",
      style: { position: "relative", height: "100%" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            style: {
              height: "calc(100% - 42px)",
              width: "100%"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
              /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { style: { width: "135px" }, item: true, children: [
                "Название шаблона:",
                " "
              ] }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  style: {
                    width: "calc(100% - 135px)",
                    backgroundColor: "#FFFFFF",
                    border: "1px solid #eeeeee",
                    height: "27px"
                  },
                  item: true,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { value, onEdit })
                }
              )
            ] })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            container: true,
            item: true,
            direction: "row",
            justifyContent: "flex-end",
            alignItems: "center",
            style: {
              height: "42px",
              width: "100%"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "fit-content" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
              Grid$1,
              {
                container: true,
                item: true,
                direction: "row",
                justifyContent: "flex-end",
                alignItems: "center",
                style: { height: "100%", width: "100%" },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Button$2,
                    {
                      onClick: onSelect,
                      size: "small",
                      variant: "outlined",
                      style: {
                        textTransform: "none",
                        marginRight: "10px"
                      },
                      value: "1",
                      className: "button_Modal_Select",
                      children: "Сохранить"
                    }
                  ),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Button$2,
                    {
                      size: "small",
                      variant: "outlined",
                      style: { textTransform: "none" },
                      value: "2",
                      className: "button_Modal_Close",
                      children: "Закрыть"
                    }
                  )
                ]
              }
            ) })
          }
        )
      ]
    }
  ) });
}
const paramsTable = "_paramsTable_ps22k_1";
const paramsBox = "_paramsBox_ps22k_19";
const hiddenBlock = "_hiddenBlock_ps22k_31";
const paramsRecord = "_paramsRecord_ps22k_37";
const paramsName = "_paramsName_ps22k_53";
const paramsConditions = "_paramsConditions_ps22k_81";
const paramsHistoryButton = "_paramsHistoryButton_ps22k_95";
const paramsSplitter = "_paramsSplitter_ps22k_107";
const paramsValueConteiner = "_paramsValueConteiner_ps22k_121";
const paramsCheckContainer = "_paramsCheckContainer_ps22k_147";
const paramsValue = "_paramsValue_ps22k_121";
const paramsEditorContainer = "_paramsEditorContainer_ps22k_175";
const paramsExpandButton = "_paramsExpandButton_ps22k_185";
const paramsExpandButtonRotate = "_paramsExpandButtonRotate_ps22k_195";
const paramsMarkerButton = "_paramsMarkerButton_ps22k_201";
const paramsSubButton = "_paramsSubButton_ps22k_209";
const paramsLoadingMask = "_paramsLoadingMask_ps22k_223";
const paramsTitleScroll = "_paramsTitleScroll_ps22k_237";
const paramsTitleContainer = "_paramsTitleContainer_ps22k_249";
const paramsTitle = "_paramsTitle_ps22k_237";
const paramsFilter = "_paramsFilter_ps22k_275";
const paramsFilterLabel = "_paramsFilterLabel_ps22k_293";
const paramsFilterInput = "_paramsFilterInput_ps22k_299";
const paramsListHistoryButtons = "_paramsListHistoryButtons_ps22k_309";
const paramsListHistoryButton = "_paramsListHistoryButton_ps22k_309";
const flexContaner = "_flexContaner_ps22k_331";
const paramsButtonsContainer = "_paramsButtonsContainer_ps22k_349";
const sectionsStyles = {
  paramsTable,
  paramsBox,
  hiddenBlock,
  paramsRecord,
  paramsName,
  paramsConditions,
  paramsHistoryButton,
  paramsSplitter,
  paramsValueConteiner,
  paramsCheckContainer,
  paramsValue,
  paramsEditorContainer,
  paramsExpandButton,
  paramsExpandButtonRotate,
  paramsMarkerButton,
  paramsSubButton,
  paramsLoadingMask,
  paramsTitleScroll,
  paramsTitleContainer,
  paramsTitle,
  paramsFilter,
  paramsFilterLabel,
  paramsFilterInput,
  paramsListHistoryButtons,
  paramsListHistoryButton,
  flexContaner,
  paramsButtonsContainer
};
const FontStyle_Bold$1 = 1;
const FontStyle_Italic$1 = 2;
const FontStyle_Underline$1 = 4;
const FontStyle_StrikeOut$1 = 8;
const ParamSetOption_Disabled$1 = 1;
const ParamSetOption_Detalization = 8;
const ParamSetOption_Markable = 16;
const ParamSetOption_Collapsed$1 = 32;
const ParamSetOption_RedNegative$1 = 128;
const ParamSetOption_Hidden$1 = 8192;
const ParamSetOption_History$1 = 16384;
var resize$2 = {};
function onMouseDown$2(ev) {
  const record = ev.target.closest("TR");
  const table = record.parentElement;
  const el = record.querySelector(".td-name");
  const elements = table.querySelectorAll(".td-name");
  resize$2.resizeMode = true;
  resize$2.target = ev.target;
  resize$2.cells = elements;
  resize$2.cell = el;
}
function onMouseUp$2(ev, width2) {
  if (resize$2.size !== void 0) {
    if (resize$2.ctrlKey) {
      resize$2 = {};
      return;
    }
    width2.current = resize$2.size;
  }
  resize$2 = {};
}
function onMouseMove$2(ev) {
  if (resize$2.resizeMode) {
    const x = ev.clientX;
    const targetWidth = resize$2.target.clientWidth;
    const targetX = resize$2.target.getBoundingClientRect().x;
    if (ev.ctrlKey) {
      resize$2.ctrlKey = true;
      let size = x - targetWidth - targetX;
      size = resize$2.cell.clientWidth / resize$2.cell.parentElement.clientWidth * 100 + size / resize$2.cell.parentElement.clientWidth * 100;
      if (size < 30) size = 30;
      if (size > 70) size = 70;
      resize$2.cell.style.width = `${size}%`;
      return;
    }
    resize$2.cells.forEach((el) => {
      let size = x - targetWidth - targetX;
      if (el.style.clientWidth === 0) return;
      size = el.clientWidth / el.parentElement.clientWidth * 100 + size / el.parentElement.clientWidth * 100;
      if (size < 30) size = 30;
      if (size > 70) size = 70;
      resize$2.size = size || resize$2.size;
      el.style.width = `${resize$2.size}%`;
    });
  }
}
function getParams(module2, command, groupId, needRefresh, Path, SectionID, prm, reportID) {
  const params2 = {
    Path,
    GroupID: groupId,
    NeedRefresh: needRefresh,
    SectionID,
    prm,
    ReportID: reportID
  };
  const config2 = {
    prefix: module2,
    method: "GET",
    url: command,
    params: params2
  };
  return smetaAxios(config2);
}
function getPadding$2(items, item, index2) {
  let padding2 = 15;
  const level = item.Level ? item.Level : 0;
  if (items.length - 1 > index2 && level < items[index2 + 1].Level && checkNextItemsVisible(items, item, index2)) {
    padding2 -= 15;
  }
  if (item.Options & ParamSetOption_Markable) {
    padding2 -= 15;
  }
  if (item.Level) {
    padding2 += item.Level * 15;
  }
  return padding2;
}
async function getHistory(data) {
  const params2 = {
    Path: data.Path,
    History: data.history
  };
  const config2 = {
    prefix: Prefixes.progs,
    method: "GET",
    url: "GetParamDialog",
    params: params2
  };
  return smetaAxios(config2);
}
function getStyleName$1(item) {
  return {
    color: item.NameColor ? setColor(item.NameColor) : "",
    display: "flex",
    flex: "1 1 0",
    fontWeight: item.NameStyle & FontStyle_Bold$1 ? "bold" : "",
    fontStyle: item.NameStyle & FontStyle_Italic$1 ? "italic" : "",
    textDecoration: item.NameStyle & FontStyle_Underline$1 ? "underline" : item.NameStyle & FontStyle_StrikeOut$1 ? "line-through" : ""
  };
}
function getStyleColor$1(item) {
  if (item.TextColor !== void 0) {
    return setColor(item.TextColor);
  }
  return "";
}
function getStyleText$1(item) {
  const style2 = {};
  if (item.TextStyle !== void 0) {
    style2.fontWeight = item.TextStyle & FontStyle_Bold$1 ? "bold" : "";
    style2.fontStyle = item.TextStyle & FontStyle_Italic$1 ? "italic" : "";
    style2.textDecoration = item.TextStyle & FontStyle_Underline$1 ? "underline" : item.TextStyle & FontStyle_StrikeOut$1 ? "line-through" : "";
    style2.fontSize = "0.75rem";
  }
  return style2;
}
function checkNextItemsVisible(items, item, index2) {
  let result = false;
  const level = item.Level ? Number(item.Level) : 0;
  for (let i = index2 + 1; i < items.length; i++) {
    if (level + 1 !== Number(items[i].Level)) return result;
    if (items[i].Options & 1) {
      result = false;
    } else {
      return true;
    }
  }
  return result;
}
function Params({ smetaModalId = "", ...props }) {
  const [history, setHistory] = React.useState();
  const [paramsData, setParamData] = React.useState();
  const [paramsItems, setParamsItems] = React.useState();
  const [paramsJsx, setParamsJsx] = React.useState();
  const [paramsButtons, setParamsButtons] = React.useState([]);
  const [paramsButtonsJsx, setParamsButtonsJsx] = React.useState([]);
  const [title, setTitle] = React.useState("");
  const [filter2, setFilter] = React.useState(props.defaultFilter);
  const [loading, setLoading] = React.useState(false);
  const changes = reactExports.useRef({});
  const width2 = React.useRef(35);
  const [buttonBlockWidth, setbuttonBlockWidth] = React.useState(0);
  const editor = React.useRef();
  const [editionMap, setEditionMap] = React.useState();
  const [getEdition, setGetEdition] = React.useState();
  const mouseDown = React.useRef(null);
  const paramsBox2 = React.useRef();
  const needOpenEditor = React.useRef();
  React.useEffect(() => {
    if (props.data) {
      setParamData(props.data);
    }
    paramsBox2.current.update = (data) => {
      deleteEditor(editor);
      setParamData(data);
    };
    paramsBox2.current.focus = () => {
      if (editor.current && !editor.current.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
        const input = editor.current.querySelector("input[type=text]");
        if (input) {
          input.focus();
          const record = editor.current.closest("TR");
          if (record && record.dataset.editstyle & 64) return;
          input.select();
        }
      } else {
        const record = paramsBox2.current.querySelector("TR");
        if (record) record.click();
      }
    };
    setEditionMap(/* @__PURE__ */ new Map());
  }, []);
  React.useEffect(() => {
    if (props.data) {
      deleteEditor(editor);
      setParamData(props.data);
    }
  }, [props.data]);
  React.useEffect(() => {
    if (props.fixHistory && props.setFixHistory) {
      setHistory(props.fixHistory);
      props.setFixHistory(null);
    }
  }, [props.fixHistory]);
  React.useEffect(() => {
    if (props.currentPage !== void 0 && paramsData) {
      setParamsItems(
        paramsData.Items.filter((item) => {
          if (props.currentPage === 0) {
            return item.PageIndex === void 0 || Number(item.PageIndex) === 0;
          }
          return Number(item.PageIndex) === props.currentPage;
        })
      );
      const match2 = props.pageTitles[props.currentPage].Name.match(/[^\\]+$/);
      if (match2) {
        setTitle(match2[0]);
      }
    }
  }, [props.currentPage]);
  React.useEffect(() => {
    var _a2, _b;
    if (paramsData) {
      if (editor.current) {
        deleteEditor(editor.current);
      }
      if (props.currentPage !== void 0 && paramsData) {
        setParamsItems([
          ...paramsData.Items.filter((item) => {
            if (props.currentPage === 0) {
              return item.PageIndex === void 0 || Number(item.PageIndex) === 0;
            }
            return Number(item.PageIndex) === props.currentPage;
          })
        ]);
        const match2 = props.pageTitles[props.currentPage].Name.match(/[^\\]+$/);
        if (match2) {
          setTitle(match2[0]);
        }
      } else {
        setParamsItems([...paramsData.Items]);
        if (paramsData.Title) {
          const match2 = paramsData.Title.match(/[^\\]+$/);
          if (match2) {
            setTitle(match2[0]);
          }
        }
      }
      if (filter2 === void 0) {
        setFilter(paramsData.Filter ? true : false);
      }
      setHistory(paramsData.History);
      if ((_b = (_a2 = paramsData == null ? void 0 : paramsData.Buttons) == null ? void 0 : _a2.items) == null ? void 0 : _b.length) {
        const result = [];
        paramsData.Buttons.items.forEach((item, index2) => {
          item.Caption && item.Hidden !== "1" && result.push({ ...item, id: index2 });
        });
        setParamsButtons([...result]);
      }
      paramsBox2.current.dialogButtonClick = (id, ProgID, callBack) => {
        dialogButtonClick({ currentTarget: { id } }, paramsData.Path, ProgID, callBack);
      };
    }
  }, [paramsData]);
  React.useEffect(() => {
    if (paramsItems) {
      setParamsJsx(getJsxParams(paramsItems, width2));
    }
  }, [paramsItems]);
  reactExports.useEffect(() => {
    var _a2;
    if (paramsData == null ? void 0 : paramsData.SelectedIndex) {
      const tr = (_a2 = paramsBox2.current) == null ? void 0 : _a2.querySelector(`TR[param-index="${paramsData == null ? void 0 : paramsData.SelectedIndex}"]`);
      tr == null ? void 0 : tr.click();
    }
  }, [paramsJsx]);
  React.useEffect(() => {
    if (paramsButtons.length === 0) return;
    setParamsButtonsJsx(getParamsButtons(paramsButtons));
  }, [paramsButtons]);
  React.useEffect(() => {
    if (getEdition) {
      editionMap.set(getEdition.id, {
        setValue: getEdition.setValue,
        setInputValue: getEdition.setInputValue,
        value: getEdition.value,
        inputValue: getEdition.inputValue,
        setSelection: getEdition.setSelection
      });
    }
  }, [getEdition]);
  React.useLayoutEffect(() => {
    if (paramsJsx) {
      paramsBox2.current.querySelectorAll("#expandButtonParams").forEach((el) => {
        if ((Number(el.dataset.collapsed) & ParamSetOption_Collapsed$1) !== ParamSetOption_Collapsed$1) {
          el.closest("TR").dataset.collapsed = "1";
          expandRec({ target: el });
        }
      });
      if (needOpenEditor.current) {
        setTimeout(() => {
          if (editor.current) {
            needOpenEditor.current = editor.current.closest("TR");
            renderEditor({ target: needOpenEditor.current });
            needOpenEditor.current = void 0;
            return;
          }
          renderEditor({ target: needOpenEditor.current });
          needOpenEditor.current = void 0;
        }, 1);
      }
    }
  }, [paramsJsx]);
  function getExpandOrMarkButton(items, item, index2) {
    const level = item.Level ? item.Level : 0;
    if (items.length - 1 > index2 && level < items[index2 + 1].Level && checkNextItemsVisible(items, item, index2)) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          id: "expandButtonParams",
          "data-collapsed": item.Options,
          name: "expandButton",
          onClick: async (ev) => {
            const record = ev.target.closest("tr");
            await collapseReq(
              record.id.split("_")[1],
              props.Path ? props.Path : paramsData.Path,
              record.dataset.collapsed === "1" ? "0" : "1"
            );
            expandRec(ev);
          },
          className: clsx$3(
            sectionsStyles.paramsExpandButton,
            Number(item.Options) & ParamSetOption_Collapsed$1 && sectionsStyles.paramsExpandButtonRotate
          ),
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { style: { height: "15px", width: "15px" } })
        }
      );
    }
    if (Number(item.Options) & ParamSetOption_Markable) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          id: "markButtonParams",
          title: "Маркировать",
          "data-enabled": "false",
          onClick: async (ev) => {
            const bttn = ev.target.closest("#markButtonParams");
            const icon = bttn.querySelector("path");
            if (bttn.dataset.enabled === "true") {
              icon.style.color = "#cccccc";
              bttn.dataset.enabled = "false";
              bttn.title = "Маркировать";
            } else {
              icon.style.color = "#006cbf";
              bttn.dataset.enabled = "true";
              bttn.title = "Снять маркировку";
            }
            const record = ev.target.closest("tr");
            record.dataset.marked = bttn.dataset.enabled === "true" ? "1" : "0";
            await getSetParamRequest2("marker")({
              Path: props.Path ? props.Path : paramsData.Path,
              ID: record.id.split("_")[1],
              GroupID: paramsData.GroupID,
              Marked: record.dataset.marked
            });
          },
          className: clsx$3(sectionsStyles.paramsMarkerButton),
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircleIcon, { style: { height: "5px", width: "5px", color: "#cccccc" } })
        }
      );
    }
  }
  async function collapseReq(id, Path, collapsed) {
    const params2 = {
      Path,
      ID: id,
      Collapsed: collapsed
    };
    const config2 = {
      prefix: Prefixes.progs,
      method: "GET",
      url: "ParamCollapsed",
      params: params2
    };
    return smetaAxios(config2);
  }
  function expandRec(ev) {
    let button = ev.target.closest("BUTTON");
    let record = ev.target.closest("TR");
    const tdName = record.querySelector(".td-name");
    let level = record.dataset.level;
    let nextRec = record.nextElementSibling;
    const condition = record.dataset.collapsed === "1";
    while (nextRec && nextRec.dataset.level > level) {
      const nextButton = nextRec.querySelector("button[name=expandButton]");
      if (nextButton && nextRec.dataset.collapsed === "0") {
        nextRec.dataset.collapsed = "1";
        nextButton.classList.add(clsx$3(sectionsStyles.paramsExpandButtonRotate));
      }
      if (condition) {
        nextRec.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
        const td = nextRec.querySelector(".td-name");
        if (td && tdName) td.style.width = tdName.style.width;
      } else {
        nextRec.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      }
      if (nextRec.dataset.level !== `${Number(level) + 1}` || Number(nextRec.dataset.options) & ParamSetOption_Disabled$1) {
        nextRec.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      }
      nextRec = nextRec.nextElementSibling;
    }
    if (condition) button.classList.remove(clsx$3(sectionsStyles.paramsExpandButtonRotate));
    else button.classList.add(clsx$3(sectionsStyles.paramsExpandButtonRotate));
    record.dataset.collapsed = condition ? "0" : "1";
  }
  function onCloseSelection(data) {
    const editval = data.record.dataset.editval !== void 0 ? data.record.dataset.editval : data.record.dataset.value !== void 0 ? data.record.dataset.value : "";
    const value = data.record.dataset.value !== void 0 ? data.record.dataset.value : data.record.dataset.editval !== void 0 ? data.record.dataset.editval : "";
    data.setValue({
      label: editval,
      id: data.record.dataset.objref !== void 0 ? data.record.dataset.objref : ""
    });
    data.setInputValue(editval);
    data.record.querySelector('[textvalue="true"]').innerText = value;
  }
  function getSetParamRequest2(selector) {
    const requests = {
      marker: (data) => {
        const params2 = {
          Path: data.Path,
          ID: data.ID,
          GroupID: data.GroupID || "0",
          Marked: data.Marked
        };
        const config2 = {
          prefix: Prefixes.progs,
          method: "GET",
          url: "SetParamProperty",
          params: params2
        };
        return smetaAxios(config2);
      },
      custom: (data) => {
        return props.onSetParam(data);
      },
      customList: (data) => {
        return props.onEditList(data);
      },
      default: (data) => {
        const params2 = {
          Path: data.Path,
          ID: data.ID,
          GroupID: data.GroupID || "0",
          ObjRef: data.ObjRef || "0",
          CheckState: data.CheckState,
          Value: data.Value,
          Condition: data.Condition,
          Selection: (data.MultiSelect || data.Selection) && data.Selection,
          ListIndex: data.ListIndex || void 0,
          TextChanged: data.TextChanged,
          WSM: "1"
        };
        const config2 = {
          prefix: Prefixes.progs,
          method: "GET",
          url: "SetParamProperty",
          params: params2,
          loadMask: false
        };
        return smetaAxios(config2);
      }
    };
    return selector && requests[selector] ? requests[selector] : requests.default;
  }
  const getSelector = (data) => {
    if (data.listClick && props.onEditList) {
      return "customList";
    }
    if (props.onSetParam) {
      return "custom";
    }
    return "default";
  };
  async function onEdit(data) {
    var _a2, _b;
    needOpenEditor.current = data.record;
    const textValueDiv = data.record.querySelector('[textvalue="true"]');
    if (data.value === void 0) data.value = data.record.dataset.value;
    if (data.tag === void 0) data.tag = data.record.dataset.objref;
    if (data.CheckState === void 0) {
      data.CheckState = data.record.dataset.checkstate;
    }
    if (data.Condition === void 0) {
      data.Condition = data.record.dataset.condition;
    }
    mouseDown.current = false;
    if (data.value !== void 0) textValueDiv.innerText = data.value;
    setLoading(true);
    const res = await getSetParamRequest2(getSelector(data))({
      Path: props.Path ? props.Path : paramsData.Path,
      ID: data.record.id.split("_")[1],
      GroupID: paramsData.GroupID,
      ObjRef: data.tag,
      Value: data.value,
      Condition: data.Condition,
      CheckState: data.CheckState,
      MultiSelect: data.multiselect,
      Selection: data.selection,
      ListIndex: data.listindex,
      TextChanged: data.textchanged !== void 0 ? data.textchanged : "1",
      Module: data.record.dataset.module,
      ObjType: data.record.dataset.datatype
    });
    setLoading(false);
    (_a2 = props.onEditParams) == null ? void 0 : _a2.call(props, res, data);
    settingValues(res, data);
    changes.current[data.record.dataset.fieldname || data.record.dataset.shortname] = {
      ...data.record.dataset,
      tag: data.tag,
      value: data.value
    };
    (_b = props == null ? void 0 : props.setChanges) == null ? void 0 : _b.call(props, { ...changes.current });
  }
  function settingValues(res, data) {
    if (res) {
      if (res.Token) {
        tokenProcessingTest(res, {
          func: (val) => {
            settingValues(val, data);
          }
        });
        return;
      }
      if (res.Selection && res.Selection.length && !data.noSelection) {
        if (res.Selection.length === 1) {
          onEdit({
            ...data,
            value: res.Selection[0].text,
            tag: res.Selection[0].id,
            noSelection: true
          });
          return;
        }
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogSetObjText,
            {
              list: res.Selection,
              onEdit,
              record: data.record,
              CheckState: data.CheckState,
              onClose: () => onCloseSelection(data),
              func: (res2) => {
                needRefreshParams(res2);
              }
            }
          ),
          {
            Title: "Выберите элемент из списка",
            style: getStyleWindow(),
            hiddenButton: true,
            blockMaximize: true,
            onClose: () => onCloseSelection(data)
          }
        );
        return;
      }
      if (res.CreateNew) {
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogCreateObj,
            {
              onEdit,
              inputNameObj: res.CreateNew.Text,
              spanText: res.CreateNew.Label,
              CLSID: res.CreateNew.CLSID,
              ObjType: data.datatype,
              Module: data.type,
              groups: res.CreateNew.Groups,
              record: data.record,
              CheckState: data.CheckState
            }
          ),
          {
            Title: "Создать новый объект",
            style: getStyleWindow(`${res.CreateNew.CLSID}${res.CreateNew.Groups ? "Group" : ""}`),
            hiddenButton: true,
            blockMaximize: true,
            blockSaveLocation: true
          }
        );
        return;
      }
      if (!res.Values) return;
      res.Values.forEach((item) => {
        const rec = data.record;
        const textValueDiv = rec.querySelector('[textvalue="true"]');
        let inpValue = item.EditVal ? item.EditVal : item.Value !== void 0 ? item.Value : "";
        let txtFldValue = item.Value !== void 0 ? item.Value : item.EditVal !== void 0 ? item.EditVal : "";
        const index2 = rec.id.split("_")[2];
        const paramitem = paramsData.Items[index2];
        paramitem.EditVal = inpValue;
        paramitem.Value = item.Value ? item.Value : "";
        paramitem.ObjRef = item.ObjRef ? item.ObjRef : "0";
        if (item.CheckState) {
          paramitem.CheckState = item.CheckState;
        }
        paramitem.Selection = item.Selection;
        rec.dataset.editval = inpValue;
        rec.dataset.value = item.Value ? item.Value : "";
        rec.dataset.objref = item.ObjRef ? item.ObjRef : "0";
        if (item.CheckState !== void 0) {
          if (data.setStateCheckBox) data.setStateCheckBox(item.CheckState);
          rec.dataset.checkstate = item.CheckState;
        }
        textValueDiv.innerText = txtFldValue;
        textValueDiv.style.color = textValueDiv.innerText < 0 && rec.dataset.options & ParamSetOption_RedNegative$1 ? "red" : getStyleColor$1(item);
        rec.dataset.selection = item.Selection;
        if (editor.current) {
          const edition = editionMap.get(rec.id);
          if (edition) {
            if (data.fixVal) {
              inpValue = data.fixVal(inpValue);
            }
            edition.setValue({
              label: inpValue,
              id: item.ObjRef ? item.ObjRef : "0"
            });
            edition.setInputValue(inpValue);
            if (item.Selection !== void 0) {
              edition.setSelection(item.Selection);
            } else {
              edition.setSelection("");
            }
          }
        }
      });
      setParamData({ ...paramsData });
      needRefreshParams(res);
    }
  }
  async function needRefreshParams(res) {
    if (res.NeedRefresh === "1" && !props.notRefresh) {
      if (props.getRefreshParams) {
        const json = await props.getRefreshParams(props, paramsData);
        deleteEditor(editor);
        setParamData(json);
        return;
      }
      if (props.Module === "documents") {
        const params2 = {
          DocCfgID: props.id,
          SectionID: props.SectionID,
          GridState: "1"
        };
        const config2 = {
          prefix: Prefixes.doc,
          method: "GET",
          url: "GetDocumentLayout",
          params: params2
        };
        smetaAxios(config2).then((res2) => {
          deleteEditor(editor);
          setParamData(res2.Params);
        });
        return;
      }
      setLoading(true);
      getParams(
        props.Module,
        props.reqCommand,
        props.GroupID,
        "1",
        paramsData.Path,
        props.SectionID,
        props.prm,
        props.reportID
      ).then((res2) => {
        deleteEditor(editor);
        setParamData(res2);
        setLoading(false);
      });
    }
  }
  async function onEditButtonClick(data) {
    if (data.subData.props.editParam !== void 0) {
      const params2 = {
        ID: data.subData.props.record.id.split("_")[1],
        Path: props.Path || paramsData.Path,
        WSM: "1"
      };
      const config2 = {
        prefix: Prefixes.progs,
        method: "GET",
        url: "EditParamProperty",
        params: params2
      };
      const json = await smetaAxios(config2);
      (json == null ? void 0 : json.Token) && tokenProcessingTest(json, {
        ...data.subData,
        func: (res) => {
          needRefreshParams(res);
        }
      });
      return;
    }
    if (data.json) {
      tokenProcessingTest(data.json, data.subData);
      return;
    }
    if (data.datatype <= 12 && data.datatype > 0) {
      CreateBackgroundForModal(
        /* @__PURE__ */ jsxRuntimeExports.jsx(ModalWindow, { Title: data.subData.props.record.dataset.name, style: getStyleWindow(), hiddenButton: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          TextAreaWithButtons,
          {
            props: {
              ...data.subData.props,
              setValue: data.setValue,
              setInputValue: data.setInputValue,
              Title: data.subData.props.record.dataset.name
            }
          }
        ) })
      );
      return;
    }
  }
  async function onDropDownList(data, checklist) {
    let json;
    if (props.onDropDownList) {
      json = await props.onDropDownList({ module: data.record.dataset.module, datatype: data.record.dataset.datatype });
    } else {
      const params2 = {
        Path: props.Path || paramsData.Path,
        ID: data.record.id.split("_")[1]
      };
      const config2 = {
        prefix: Prefixes.progs,
        method: "GET",
        url: "GetParamValues",
        params: params2
      };
      json = await smetaAxios(config2);
    }
    if (json && json.Items) {
      return getEditorListFormat(json.Items, { checklist });
    }
  }
  function renderEditor(ev) {
    if (!ev.target || props.noEdit) return;
    const record = ev.target.closest("TR");
    if (!record) return;
    if (!record.querySelector('div[editor="true"]').classList.contains(clsx$3(sectionsStyles.hiddenBlock))) return;
    record.style.backgroundColor = "whitesmoke";
    const editorDiv = record.querySelector('[editor="true"]');
    const textValueDiv = record.querySelector('[textvalue="true"]');
    if (editor.current && editor.current !== editorDiv) {
      deleteEditor(editor.current);
    }
    const editRoot = editorDiv.root || clientExports.createRoot(editorDiv);
    editorDiv.root = editRoot;
    editorDiv.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
    textValueDiv.classList.add(clsx$3(sectionsStyles.hiddenBlock));
    editRoot.render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Editor,
        {
          placeholder: " ",
          styleInput: getStyleText$1({ TextStyle: record.dataset.textstyle }),
          disabled: record.dataset.locked === "1" ? true : false,
          groupid: record.dataset.groupid,
          current: record.dataset.current,
          fieldname: record.dataset.fieldname,
          name: record.dataset.name,
          type: record.dataset.module,
          record,
          objref: record.dataset.objref,
          value: record.dataset.editval,
          datatype: record.dataset.datatype,
          editStyle: record.dataset.editstyle,
          checkstate: record.dataset.checkstate,
          onEdit,
          onEditButtonClick,
          onDropDownList,
          getEdition: setGetEdition,
          editParam: record.dataset.onedit,
          multisel: record.dataset.options & ParamSetOption_Detalization,
          selection: record.dataset.selection,
          editMask: record.dataset.editmask,
          func: settingValues
        }
      )
    );
    editor.current = editorDiv;
    setTimeout(() => {
      const input = editorDiv.querySelector("input[type=text]");
      if (input) {
        input.focus();
        if (record.dataset.editstyle & 64) return;
        input.select();
      } else {
        const textArea = editorDiv.querySelector("textarea");
        if (!textArea) return;
        textArea.focus();
        if (record.dataset.editstyle & 64) return;
        textArea.select();
      }
    });
  }
  function deleteEditor(editor2) {
    if (!(editor2 == null ? void 0 : editor2.classList)) return;
    if (!editor2.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
      const record = editor2.closest("TR");
      record.style.backgroundColor = "";
      const textValueDiv = record.querySelector('[textvalue="true"]');
      editor2.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      textValueDiv.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
    }
  }
  function onKeyArrow(ev) {
    let record;
    switch (ev.key) {
      case "ArrowDown":
        record = ev.target.closest("TR").nextElementSibling;
        if (record) {
          if (record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
            while (record !== null) {
              record = record.nextElementSibling;
              if (record && !record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
                renderEditor({ target: record });
                break;
              }
            }
          } else {
            renderEditor({ target: record });
          }
        }
        break;
      case "ArrowUp":
        record = ev.target.closest("TR").previousElementSibling;
        if (record) {
          if (record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
            while (record !== null) {
              record = record.previousElementSibling;
              if (record && !record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
                renderEditor({ target: record });
                break;
              }
            }
          } else {
            renderEditor({ target: record });
          }
        }
        break;
    }
  }
  function getButtonColWidth(options, other) {
    let res = 0;
    if (options & ParamSetOption_History$1) {
      res += 20;
    }
    if (other) {
      res += other.Conditions ? 20 : 0;
    }
    return res;
  }
  const historyButtonClick = (item, index2) => {
    const paramsRequest = /* @__PURE__ */ new Map();
    paramsRequest.set("prefix", "programs").set("Path", props.Path ? props.Path : paramsData.Path).set("ID", item.ID);
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogHistory,
        {
          paramsRequest,
          Module: item.Module,
          EditStyle: item.EditStyle,
          DataType: item.DataType,
          Options: item.Options,
          Values: item.Values,
          onSelect: (json) => {
            settingValues(
              { Values: [json.CheckState === void 0 ? { ...json, CheckState: "0" } : json] },
              {
                record: paramsBox2.current.querySelector(`#param_${item.ID}_${index2}`)
              }
            );
          }
        }
      ),
      {
        Title: item.Name,
        style: getStyleWindow(),
        hiddenButton: true,
        blockMaximize: true,
        blockSaveLocation: true
      }
    );
  };
  function getJsxParams(items, width22) {
    let colWidth;
    const returnArr = items.map((item, index2) => {
      const expandButton = getExpandOrMarkButton(items, item, index2);
      const editStyle = item.EditStyle & 4 ? item.EditStyle - 4 : item.EditStyle;
      colWidth = getButtonColWidth(item.Options, {
        Conditions: item.Conditions
      });
      if (buttonBlockWidth < colWidth) {
        setbuttonBlockWidth(colWidth);
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
        "tr",
        {
          id: `param_${item.ID}_${index2}`,
          "param-index": item.ID,
          "data-datatype": item.DataType,
          "data-editstyle": editStyle,
          "data-fieldname": item.FieldName,
          "data-name": item.Name,
          "data-mapid": item.MapID,
          "data-module": item.Module,
          "data-options": item.Options,
          "data-orderno": item.OrderNo,
          "data-shortname": item.ShortName,
          "data-level": item.Level ? item.Level : 0,
          "data-parentid": item.ParentID,
          "data-collapsed": (Number(item.Options) & ParamSetOption_Collapsed$1) === 32 ? "1" : "0",
          "data-value": item.Value,
          "data-editval": item.EditVal !== void 0 ? item.EditVal : item.Value,
          "data-objref": item.ObjRef,
          "data-groupid": paramsData.GroupID,
          "data-current": item.Current,
          "data-checkstate": item.CheckState,
          "data-marked": "0",
          "data-locked": item.Locked,
          "data-onedit": item.OnEdit,
          "data-condition": item.Condition !== void 0 ? item.Condition : item.Conditions ? "1" : void 0,
          "data-textstyle": item.TextStyle,
          "data-selection": item.Selection,
          "data-editmask": item.EditMask,
          onClick: (ev) => {
            renderEditor(ev);
          },
          onKeyDown: (ev) => {
            onKeyArrow(ev);
          },
          onMouseEnter: (ev) => {
            if (mouseDown) {
              if (mouseDown.current) renderEditor(ev);
            }
          },
          className: clsx$3(
            sectionsStyles.paramsRecord,
            (item.Level && item.Level !== "0" || Number(item.Options) & ParamSetOption_Disabled$1 || Number(item.Options) & ParamSetOption_Hidden$1) && sectionsStyles.hiddenBlock
          ),
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(
              "td",
              {
                id: `name_${item.ID}`,
                title: item.Name,
                className: clsx$3(sectionsStyles.paramsName, "td-name"),
                style: {
                  paddingLeft: getPadding$2(items, item, index2),
                  width: `${width22.current}%`
                },
                children: [
                  expandButton,
                  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: getStyleName$1(item), children: item.Name }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs(
                    "div",
                    {
                      className: clsx$3(sectionsStyles.paramsConditions),
                      style: {
                        width: getButtonColWidth(item.Options, {
                          Conditions: item.Conditions
                        })
                      },
                      children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          IconButton,
                          {
                            onClick: () => historyButtonClick(item, index2),
                            className: clsx$3(
                              sectionsStyles.paramsHistoryButton,
                              (item.Options & ParamSetOption_History$1) === 0 && sectionsStyles.hiddenBlock
                            ),
                            children: /* @__PURE__ */ jsxRuntimeExports.jsx(HistoryIcon, { style: { height: "15px", width: "15px" } })
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          ConditionButton,
                          {
                            visible: item.Conditions ? true : false,
                            conditions: item.Conditions,
                            condition: item.Condition ? item.Condition : "1",
                            onEdit,
                            recID: `param_${item.ID}_${index2}`,
                            paramsBoxRef: paramsBox2
                          }
                        )
                      ]
                    }
                  )
                ]
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx("td", { onMouseDown: onMouseDown$2, className: clsx$3(sectionsStyles.paramsSplitter), id: "splitter-ID", children: /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}) }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { id: `value_${item.ID}`, className: sectionsStyles.paramsValueConteiner, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(
                    sectionsStyles.paramsCheckContainer,
                    (item.EditStyle & 4) === 0 && sectionsStyles.hiddenBlock
                  ),
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { onEdit, MultiCheckSet: item.MultiCheckSet, CheckState: item.CheckState })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(sectionsStyles.paramsValue),
                  style: {
                    color: item.Value < 0 && item.Options & ParamSetOption_RedNegative$1 ? "red" : getStyleColor$1(item),
                    ...getStyleText$1(item)
                  },
                  textvalue: "true",
                  children: item.Value
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(sectionsStyles.paramsEditorContainer, sectionsStyles.hiddenBlock),
                  editor: "true"
                }
              )
            ] })
          ]
        },
        `param-key_${item.ID}_${index2}`
      );
    });
    return returnArr;
  }
  async function historyClick(num) {
    const json = await getHistory({
      Path: props.Path ? props.Path : paramsData.Path,
      history: num
    });
    if (json) {
      setParamsJsx(null);
      deleteEditor(editor);
      setParamData({ ...json });
    }
  }
  async function ContextMenuHandler(data) {
    const comand = data.value;
    let json;
    switch (comand) {
      case "SelectSample":
        deleteEditor(editor);
        json = await HandleSamples({
          Path: props.Path ? props.Path : paramsData.Path,
          Command: "load",
          Name: data.name
        });
        deleteEditor(editor);
        setParamsJsx(null);
        setParamData(json);
        break;
      case "DeleteSample":
        json = await HandleSamples({
          Path: props.Path ? props.Path : paramsData.Path,
          Command: "drop",
          Name: data.name
        });
        if (json.Result === "1") {
          paramsData.Sample = void 0;
          deleteEditor(editor);
          setParamsJsx(null);
          setParamData({ ...paramsData });
        }
        break;
      case "SaveSample":
        CreateBackgroundForModal(
          /* @__PURE__ */ jsxRuntimeExports.jsx(ModalWindow, { Title: "Сохранение шаблона параметров", style: getStyleWindow("Sample"), hiddenButton: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogSaveSample,
            {
              props: {
                Path: props.Path ? props.Path : paramsData.Path,
                value: paramsData.Sample
              }
            }
          ) })
        );
        break;
      case "ClearValues":
        json = await HandleSamples({
          Path: props.Path ? props.Path : paramsData.Path,
          Command: "reset",
          SectionID: props.SectionID
        });
        deleteEditor(editor);
        setParamsJsx(null);
        setParamData({ ...json });
        break;
      case "FilterParams":
        setFilter(!filter2);
        break;
    }
  }
  async function onMenuClick() {
    const params2 = {};
    const config2 = {
      prefix: Prefixes.progs,
      method: "POST",
      url: "HandleSamples",
      params: params2,
      data: {
        Path: props.Path || paramsData.Path,
        Command: "list"
      }
    };
    const json = await smetaAxios(config2);
    return { json, Sample: paramsData.Sample, filter: filter2 };
  }
  async function filterOnEdit(data) {
    let json = await HandleSamples({
      Path: props.Path ? props.Path : paramsData.Path,
      Command: "filter",
      Name: data.value
    });
    setParamsJsx(null);
    setParamData({ ...json });
  }
  const dialogButtonClick = async (ev, Path, ProgID, callBack) => {
    const id = ev.currentTarget.id;
    const params2 = {
      Path,
      ProgID: ProgID || "0",
      ID: Number(id) + 1,
      WSM: "1"
    };
    const config2 = {
      prefix: Prefixes.progs,
      method: "POST",
      url: "DialogButtonClick",
      params: params2
    };
    let json = await smetaAxios(config2);
    if (json == null ? void 0 : json.Token) {
      tokenProcessingTest(json, {
        func: (res) => {
          needRefreshParams(res);
        }
      });
    } else {
      if (id === "-1") {
        smetaModals.close(smetaModalId);
        await callBack();
        return;
      }
      needRefreshParams(json);
    }
  };
  const getParamsButtons = (buttons) => {
    return buttons.map((item, index2) => {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          onClick: (ev) => dialogButtonClick(ev, paramsData.Path),
          id: item.id,
          variant: "outlined",
          className: clsx$3(sectionsStyles.paramsSubButton),
          style: {
            width: "120px"
          },
          children: item == null ? void 0 : item.Caption
        },
        `paramsButton-${index2}`
      );
    });
  };
  return (
    // при клике вне контейнера параметров редактор скроется
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      ContextMenu,
      {
        for: "params",
        Menu: getDefaultMenu("HandleParams", {
          NoClearState: props.NoClearState ? true : false,
          NoSaveSample: props.NoSaveSample ? true : false
        }),
        onRightClick: onMenuClick,
        onMenuItemClick: ContextMenuHandler,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          ClickAwayListener,
          {
            onClickAway: (ev) => {
              mouseDown.current = false;
              resize$2 = {};
              if (!editor.current || editor.current.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
                return;
              }
              if (ev.target.closest("[checklist]") || ev.target.closest("[calendar]") || ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") !== paramsBox2.current.closest(".background_ModalDialog") || ev.target.closest("LI") || ev.target.classList.contains("MuiBackdrop-root") || ev.target.closest("#applyButton")) {
                return;
              }
              if (editor.current) {
                editor.current.closest("TR").style.backgroundColor = "";
                deleteEditor(editor.current);
              }
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
              "div",
              {
                id: "paramsBox",
                ref: paramsBox2,
                onMouseDown: (ev) => {
                  mouseDown.current = true;
                },
                onMouseUp: () => {
                  mouseDown.current = false;
                },
                className: clsx$3(sectionsStyles.paramsBox),
                children: [
                  loading && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: sectionsStyles.paramsLoadingMask, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Scrollbars,
                    {
                      autoHide: true,
                      className: clsx$3(sectionsStyles.paramsTitleScroll, props.NoTitle && sectionsStyles.hiddenBlock),
                      children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.paramsTitleContainer, props.NoTitle && sectionsStyles.hiddenBlock), children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.paramsTitle), children: title }) })
                    }
                  ),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(sectionsStyles.paramsFilter, !filter2 && sectionsStyles.hiddenBlock), children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.paramsFilterLabel), children: "Фильтр:" }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.paramsFilterInput), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Editor,
                      {
                        value: paramsData && paramsData.Filter ? paramsData.Filter : "",
                        onEdit: filterOnEdit,
                        placeholder: ""
                      }
                    ) })
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", flexDirection: "row", flex: "1 1 auto" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Scrollbars, { autoHide: true, children: paramsJsx ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        onMouseMove: onMouseMove$2,
                        onMouseUp: (ev) => onMouseUp$2(ev, width2),
                        className: clsx$3(sectionsStyles.paramsTable),
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: paramsJsx })
                      }
                    ) : /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) }),
                    paramsJsx && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.paramsButtonsContainer), children: (paramsButtonsJsx == null ? void 0 : paramsButtonsJsx.length) > 0 && paramsButtonsJsx })
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(sectionsStyles.paramsListHistoryButtons, !history && sectionsStyles.hiddenBlock), children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        disabled: history === "2",
                        onClick: () => {
                          historyClick(-1);
                        },
                        className: clsx$3(sectionsStyles.paramsListHistoryButton),
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowLeftIcon, {})
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.flexContaner) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        disabled: history === "1",
                        onClick: () => {
                          historyClick(1);
                        },
                        className: clsx$3(sectionsStyles.paramsListHistoryButton),
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowRightIcon, {})
                      }
                    )
                  ] })
                ]
              }
            )
          }
        )
      }
    )
  );
}
const Params$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Params
}, Symbol.toStringTag, { value: "Module" }));
async function getData(props) {
  const json = await getSearchParams(props.GroupId, props.Module);
  if (json.Items[0].JSONType === "ParamItems") {
    json.Items.shift();
  }
  json.Items.forEach((item) => {
    item = { ...item, EditStyle: "16" };
  });
  return { ...json };
}
function onClick(ev, records, returnRes) {
  returnRes(records[Number(ev.target.parentElement.firstChild.textContent) - 1].ObjRef);
}
function setTableRecords(records = [], returnF) {
  if (records.length === 0) return;
  const result = records.map((rec, index2) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(
      "tr",
      {
        onMouseEnter,
        onMouseLeave,
        onClick: (ev) => {
          onClick(ev, records, returnF);
        },
        style: { cursor: "pointer", height: "20px" },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("td", { hidden: true, children: index2 + 1 }, `rec_id_${rec.Index}_${index2}`),
          /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: rec.Name }, `rec_name_${rec.Name}`)
        ]
      },
      `rec_id_${rec.Index}_${index2}`
    );
  });
  return result;
}
function onMouseEnter(ev) {
  ev.target.style.backgroundColor = "#eeeeee";
}
function onMouseLeave(ev) {
  ev.target.style.backgroundColor = "";
}
function Search$1(props) {
  const [Index, setIndex] = React.useState();
  const records = React.useRef([]);
  const [contenTable, setContentTable] = React.useState(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
  const [data, setData] = React.useState();
  const iterator2 = React.useRef(0);
  const countLoadingRecords = React.useRef(50);
  const indexMemory = React.useRef(null);
  const tableRef = React.useRef();
  React.useEffect(() => {
    getData(props).then((res) => {
      setData(res);
    });
  }, [props]);
  React.useLayoutEffect(() => {
    if (Index !== void 0) {
      const iSearch = async () => {
        const json = await initSearch(props.Module, data.Path, Index, props.ObjType);
        if (json.Index === void 0) {
          iterator2.current = 0;
          setIndex(void 0);
          await stopSearch(props.Module);
          return;
        }
        if (iterator2.current < countLoadingRecords.current) {
          setIndex(json.Index);
          records.current.push({
            Index: json.Index,
            ObjRef: json.ObjRef,
            Name: json.Name
          });
          iterator2.current = iterator2.current + 1;
        } else {
          iterator2.current = 0;
          indexMemory.current = json.Index;
        }
        if (indexMemory.current !== null) {
          countLoadingRecords.current = 3;
        } else {
          countLoadingRecords.current = 20;
        }
        setContentTable(setTableRecords(records.current, props.return));
      };
      iSearch();
    }
  }, [Index]);
  function onScroll(ev) {
    if (Index !== void 0) {
      const el = ev.target.getBoundingClientRect().bottom;
      const table = tableRef.current.getBoundingClientRect().bottom;
      if (table < el + 100) {
        setIndex(indexMemory.current);
      }
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "row",
      justifyContent: "flex-start",
      alignItems: "flex-start",
      style: { height: "100%", width: "100%", border: "2px solid #cccccc" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          "div",
          {
            style: {
              width: "calc(60%)",
              height: "inherit",
              position: "relative"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              Params,
              {
                Module: props.Module,
                GroupID: props.GroupId,
                reqCommand: "GetSearchParams",
                SectionID: props.ObjType,
                id: props.ObjType,
                data,
                NoHistory: true,
                NoTitle: true
              }
            )
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, style: { height: "100%", width: "40%" }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "div",
            {
              style: {
                border: "1px solid #cccccc",
                borderTop: "0px",
                borderRight: "0px",
                borderLeft: "2px solid #cccccc",
                height: "25px",
                width: "100%"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                "button",
                {
                  style: {
                    border: "0px",
                    height: "100%",
                    width: "100%",
                    whiteSpace: "nowrap",
                    cursor: "pointer"
                  },
                  onClick: () => {
                    setContentTable(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
                    records.current = [];
                    setIndex("0");
                    indexMemory.current = null;
                  },
                  children: "Найти"
                }
              )
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Box$1,
            {
              onScroll,
              id: "search_Box",
              style: {
                height: "calc(100% - 25px)",
                overflowY: "auto",
                display: "flex",
                flexDirection: "column",
                borderLeft: "2px solid #cccccc"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                Box$1,
                {
                  style: {
                    width: "100%"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    "table",
                    {
                      id: "table_Search",
                      ref: tableRef,
                      border: "1",
                      bordercolor: "#cccccc",
                      width: "100%",
                      cols: "1",
                      "table-layout": "auto",
                      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                        "tbody",
                        {
                          style: {
                            fontSize: "90%",
                            textAlign: "start"
                          },
                          children: contenTable
                        }
                      )
                    }
                  )
                }
              )
            }
          )
        ] })
      ]
    }
  ) });
}
var Search = {};
var hasRequiredSearch;
function requireSearch() {
  if (hasRequiredSearch) return Search;
  hasRequiredSearch = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Search, "__esModule", {
    value: true
  });
  Search.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Search.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14"
  }), "Search");
  return Search;
}
var SearchExports = /* @__PURE__ */ requireSearch();
const SearchIcon = /* @__PURE__ */ getDefaultExportFromCjs(SearchExports);
var Update = {};
var hasRequiredUpdate;
function requireUpdate() {
  if (hasRequiredUpdate) return Update;
  hasRequiredUpdate = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Update, "__esModule", {
    value: true
  });
  Update.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Update.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79s7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58s9.14-3.47 12.65 0L21 3zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8z"
  }), "Update");
  return Update;
}
var UpdateExports = /* @__PURE__ */ requireUpdate();
const UpdateIcon = /* @__PURE__ */ getDefaultExportFromCjs(UpdateExports);
function getColumnOrg() {
  return {
    title: [
      {
        fieldName: "OrgName",
        title: "Название организации",
        level: 0,
        width: 200,
        collapseRecord: true,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "None",
        title: "-//-",
        level: 0,
        width: 40,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: "4",
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "INN",
        title: "ИНН",
        level: 0,
        width: 120,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "KPP",
        title: "КПП",
        level: 0,
        width: 120,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "GroupName",
        title: "Группа",
        level: 0,
        width: 200,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "ContragentIdent",
        title: "Идентификатор контрагента",
        level: 0,
        width: 200,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      }
    ]
  };
}
function getColumnBank() {
  return {
    title: [
      {
        fieldName: "OrgName",
        title: "Название Банка",
        level: 0,
        width: 200,
        collapseRecord: true,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "None",
        title: "-//-",
        level: 0,
        width: 40,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: "4",
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "BIK",
        title: "ИНН",
        level: 0,
        width: 120,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "COR",
        title: "КПП",
        level: 0,
        width: 120,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      }
    ]
  };
}
function getColumnAccount() {
  return {
    title: [
      {
        fieldName: "AccName",
        title: "Название Счета",
        collapseRecord: true,
        level: 0,
        width: 200,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "None",
        title: "-//-",
        level: 0,
        width: 40,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: "4",
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "BankName",
        title: "Банк",
        level: 0,
        width: 120,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      },
      {
        fieldName: "GroupName",
        title: "Группа",
        level: 0,
        width: 120,
        fieldInfo: {
          ...defaultFieldInfo,
          options: getParamColumnsOptions(ParamSetOption.Disabled)
        }
      }
    ]
  };
}
function getCheckBoxes(props, hookCheckBox) {
  switch (props.module) {
    case "Объединить организации":
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { marginLeft: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "input",
            {
              id: "checkBox_orgGroup",
              type: "checkbox",
              onChange: () => {
                hookCheckBox.Org.setGroup(!hookCheckBox.Org.Group);
              }
            }
          ),
          "В текущей группе"
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Org.setName(!hookCheckBox.Org.Name);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_orgName", type: "checkbox" }),
              "ИМЯ"
            ] })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Org.setINN(!hookCheckBox.Org.INN);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_orgINN", type: "checkbox" }),
              "ИНН"
            ] })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Org.setKPP(!hookCheckBox.Org.KPP);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_orgKPP", type: "checkbox" }),
              "КПП"
            ] })
          }
        )
      ] });
    case "Объединить банки":
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Bank.setName(!hookCheckBox.Bank.Name);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_bankName", type: "checkbox" }),
              "ИМЯ"
            ] })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Bank.setBIK(!hookCheckBox.Bank.BIK);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_bankBIK", type: "checkbox", defaultChecked: hookCheckBox.Bank.BIK, disabled: true }),
              "БИК"
            ] })
          }
        )
      ] });
    case "Объединить Счета":
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Account.setGroup(!hookCheckBox.Account.Group);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_accountGroup", type: "checkbox" }),
              "В текущей группе"
            ] })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Account.setOneGroup(!hookCheckBox.Account.oneGroup);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_oneOrgGroup", type: "checkbox" }),
              "В пределах одной организации"
            ] })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            onChange: () => {
              hookCheckBox.Account.setNumber(!hookCheckBox.Account.Number);
            },
            style: { marginLeft: "5px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs("label", { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("input", { id: "checkBox_number20", type: "checkbox" }),
              "Только 20-ти значные числа"
            ] })
          }
        )
      ] });
  }
}
function HandleGrouping(props) {
  const [orgGroup, setOrgGroup] = React.useState(false);
  const [orgName, setOrgName] = React.useState(false);
  const [orgINN, setOrgINN] = React.useState(false);
  const [orgKPP, setOrgKPP] = React.useState(false);
  const [bankName, setBankName] = React.useState(false);
  const [bankBIK, setBankBIK] = React.useState(true);
  const [accountGroup, setAccountGroup] = React.useState(false);
  const [oneOrgGroup, setOneOrgGroup] = React.useState(false);
  const [number20, setNumber20] = React.useState(false);
  const [maxStep, setMaxStep] = React.useState(1e3);
  const [step, setStep] = React.useState(1);
  const [isRun, setIsRun] = React.useState(false);
  const [joinSwitch, setJoinSwitch] = React.useState(true);
  const [requestID, setRequestId] = React.useState("");
  const gridPanel = React.useRef();
  const [mainGrid, setMainGrid] = React.useState(void 0);
  const [data, setData] = React.useState();
  const [columns, setColumns] = React.useState();
  function hookCheckBox() {
    return {
      Org: {
        Group: orgGroup,
        Name: orgName,
        INN: orgINN,
        KPP: orgKPP,
        setGroup: setOrgGroup,
        setName: setOrgName,
        setINN: setOrgINN,
        setKPP: setOrgKPP
      },
      Bank: {
        Name: bankName,
        BIK: bankBIK,
        setName: setBankName,
        setBIK: setBankBIK
      },
      Account: {
        Group: accountGroup,
        OneGroup: oneOrgGroup,
        Number: number20,
        setGroup: setAccountGroup,
        setOneGroup: setOneOrgGroup,
        setNumber: setNumber20
      }
    };
  }
  const content2 = getCheckBoxes(props, hookCheckBox());
  function getColumn() {
    switch (props.module) {
      case "Объединить организации":
        setData({ ObjType: "2310" });
        return getColumnOrg();
      case "Объединить банки":
        setData({ ObjType: "2330" });
        return getColumnBank();
      case "Объединить Счета":
        setData({ ObjType: "2320" });
        return getColumnAccount();
    }
  }
  function setMainGridLoader(data2) {
    setMainGrid(
      GridLoader(
        gridPanel.current,
        {
          Module: "organizations_group"
        },
        { ...data2, Columns: columns }
      )
    );
  }
  async function firstMainLoad() {
    let grid;
    let source;
    if (gridPanel.current !== null) {
      gridPanel.current.innerHTML = "";
      gridPanel.current.grid = new createGrid(gridPanel.current);
      grid = gridPanel.current.grid;
      source = new createRecordSource();
      grid.setColumns(columns);
      await grid.setSource(source);
      setMainGrid({ grid, source });
    }
  }
  function updateGridSize() {
    mainGrid.grid.updateGridSize();
  }
  React.useEffect(() => {
    setColumns(getColumn());
  }, []);
  React.useEffect(() => {
    if (!mainGrid && columns) {
      firstMainLoad();
    } else if (columns) {
      setMainGridLoader(data);
    }
  }, [columns]);
  React.useEffect(() => {
    if (mainGrid) updateGridSize();
  }, [mainGrid]);
  function findDuplicatesReq() {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "organizations").set("comand", "FindDuplicates");
    switch (props.module) {
      case "Объединить организации":
        params2.set("ObjType", "2310").set("INN", orgINN ? "1" : "0").set("KPP", orgKPP ? "1" : "0").set("Name", orgName ? "1" : "0");
        if (orgGroup) {
          params2.set("Group", "2310").set("SectionID", "100");
        }
        params2.set("WSM", "1");
        return AxiosRequest(true, params2);
      case "Объединить банки":
        params2.set("ObjType", "2330").set("bik", "1").set("name", bankName ? "1" : "0").set("WSM", "1");
        return AxiosRequest(true, params2);
      case "Объединить Счета":
        params2.set("ObjType", "2320").set("OnlyOrg", oneOrgGroup ? "1" : "0").set("Only20", number20 ? "1" : "0").set("WSM", "1");
        if (accountGroup) {
          params2.set("Group", "2310").set("SectionID", "100");
        }
        return AxiosRequest(true, params2);
    }
  }
  function joinDuplicates() {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "organizations").set("comand", "JoinDuplicates").set("ObjType", data.ObjType).set("WSM", "1");
    return AxiosRequest(true, params2);
  }
  async function onClickSearch() {
    const json = await findDuplicatesReq();
    tokenProcessingTest(json);
    setMainGridLoader(data);
    setJoinSwitch(false);
    setIsRun(false);
    setStep(1);
    updateGridSize();
  }
  function checkJoinJson(json) {
    if (isEmptyObject(json)) return false;
    if (!json.Params) return false;
    if (!json.Params.MaxNumber) return false;
    if (!json.Params.Value) return false;
    return true;
  }
  async function onClickJoin() {
    const json = await joinDuplicates();
    if (json && json.Token) {
      tokenProcessingTest(json);
      mainGrid.grid.refreshSource();
    }
    if (checkJoinJson(json)) {
      setMaxStep(json.Params.MaxNumber);
      setStep(json.Params.Value);
      setIsRun(!isRun);
      setJoinSwitch(!joinSwitch);
      setRequestId(json.Params.RequestID);
      updateGridSize();
    }
  }
  async function resumeRequest2(RequestID) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "project");
    params2.set("comand", "ResumeRequest");
    params2.set("RequestID", RequestID);
    params2.set("WSM", "1");
    await AxiosRequest(false, params2).then((json) => {
      if (checkJoinJson(json)) {
        setStep(json.Params.Value);
      }
    }).catch((err) => {
    });
  }
  const normalize = (value, max2) => {
    return (value - 1) * 100 / (max2 - 1);
  };
  React.useEffect(() => {
    setTimeout(() => {
      if (isRun) {
        if (step < maxStep) {
          resumeRequest2(requestID);
        } else {
          mainGrid.grid.refreshSource();
          setIsRun(!isRun);
          setStep(1);
        }
      }
    }, 1);
  }, [isRun, step]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "row",
      justifyContent: "flex-start",
      alignItems: "flex-start",
      style: { height: "100%", width: "100%" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            id: "rcgrid_panel",
            ref: gridPanel,
            item: true,
            style: {
              height: "calc(100% - 40px - 58px - 21px)",
              width: "100%",
              border: "1px solid #C8B58F",
              position: "relative"
            }
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            item: true,
            style: {
              height: "58px",
              width: "100%",
              border: "1px solid #C8B58F"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                container: true,
                direction: "row",
                justifyContent: "flex-start",
                alignItems: "center",
                style: {
                  height: "100%",
                  width: "100%"
                },
                children: content2
              }
            )
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "flex-end", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              sx: { m: 1 },
              style: {
                border: "3px solid #eeeeee",
                height: "20px",
                width: "calc(100% - 266px)",
                borderRadius: "3px",
                display: isRun ? "" : "none"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                LinearProgress,
                {
                  color: "success",
                  style: { height: "100%" },
                  variant: "determinate",
                  value: normalize(step, maxStep)
                }
              )
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, style: { height: "40px", width: "fit-content" }, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                size: "small",
                variant: "outlined",
                style: {
                  textTransform: "none",
                  marginTop: "5px",
                  marginRight: "5px"
                },
                value: "-1",
                onClick: onClickSearch,
                children: "Найти"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                size: "small",
                variant: "outlined",
                style: {
                  textTransform: "none",
                  marginTop: "5px",
                  marginRight: "5px"
                },
                value: "-1",
                onClick: onClickJoin,
                disabled: joinSwitch,
                children: "Объединить"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                size: "small",
                variant: "outlined",
                style: {
                  textTransform: "none",
                  marginTop: "5px",
                  marginRight: "5px"
                },
                value: "-1",
                className: "button_Modal_Close",
                children: "Закрыть"
              }
            )
          ] })
        ] })
      ]
    }
  ) });
}
var ViewComfyOutlined = {};
var hasRequiredViewComfyOutlined;
function requireViewComfyOutlined() {
  if (hasRequiredViewComfyOutlined) return ViewComfyOutlined;
  hasRequiredViewComfyOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ViewComfyOutlined, "__esModule", {
    value: true
  });
  ViewComfyOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ViewComfyOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M2 4v16h20V4zm2 2h16v5H4zm0 12v-5h4v5zm6 0v-5h10v5z"
  }), "ViewComfyOutlined");
  return ViewComfyOutlined;
}
var ViewComfyOutlinedExports = /* @__PURE__ */ requireViewComfyOutlined();
const ViewComfyOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ViewComfyOutlinedExports);
var SpaceDashboardOutlined = {};
var hasRequiredSpaceDashboardOutlined;
function requireSpaceDashboardOutlined() {
  if (hasRequiredSpaceDashboardOutlined) return SpaceDashboardOutlined;
  hasRequiredSpaceDashboardOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(SpaceDashboardOutlined, "__esModule", {
    value: true
  });
  SpaceDashboardOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  SpaceDashboardOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2M5 19V5h6v14zm14 0h-6v-7h6zm0-9h-6V5h6z"
  }), "SpaceDashboardOutlined");
  return SpaceDashboardOutlined;
}
var SpaceDashboardOutlinedExports = /* @__PURE__ */ requireSpaceDashboardOutlined();
const SpaceDashboardOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(SpaceDashboardOutlinedExports);
var VerticalAlignCenterOutlined = {};
var hasRequiredVerticalAlignCenterOutlined;
function requireVerticalAlignCenterOutlined() {
  if (hasRequiredVerticalAlignCenterOutlined) return VerticalAlignCenterOutlined;
  hasRequiredVerticalAlignCenterOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(VerticalAlignCenterOutlined, "__esModule", {
    value: true
  });
  VerticalAlignCenterOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  VerticalAlignCenterOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M8 19h3v4h2v-4h3l-4-4zm8-14h-3V1h-2v4H8l4 4zM4 11v2h16v-2z"
  }), "VerticalAlignCenterOutlined");
  return VerticalAlignCenterOutlined;
}
var VerticalAlignCenterOutlinedExports = /* @__PURE__ */ requireVerticalAlignCenterOutlined();
const VerticalAlignCenterOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(VerticalAlignCenterOutlinedExports);
var AccountBoxOutlined = {};
var hasRequiredAccountBoxOutlined;
function requireAccountBoxOutlined() {
  if (hasRequiredAccountBoxOutlined) return AccountBoxOutlined;
  hasRequiredAccountBoxOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(AccountBoxOutlined, "__esModule", {
    value: true
  });
  AccountBoxOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  AccountBoxOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 16H7v-.24C8.42 17.62 10.16 17 12 17s3.58.62 5 1.76zm2-1.14C17.2 16.09 14.73 15 12 15s-5.2 1.09-7 2.86V5h14zM12 13c1.93 0 3.5-1.57 3.5-3.5S13.93 6 12 6 8.5 7.57 8.5 9.5 10.07 13 12 13m0-5c.83 0 1.5.67 1.5 1.5S12.83 11 12 11s-1.5-.67-1.5-1.5S11.17 8 12 8"
  }), "AccountBoxOutlined");
  return AccountBoxOutlined;
}
var AccountBoxOutlinedExports = /* @__PURE__ */ requireAccountBoxOutlined();
const AccountBoxOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(AccountBoxOutlinedExports);
var FilterAltOutlined = {};
var hasRequiredFilterAltOutlined;
function requireFilterAltOutlined() {
  if (hasRequiredFilterAltOutlined) return FilterAltOutlined;
  hasRequiredFilterAltOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(FilterAltOutlined, "__esModule", {
    value: true
  });
  FilterAltOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  FilterAltOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M7 6h10l-5.01 6.3zm-2.75-.39C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"
  }), "FilterAltOutlined");
  return FilterAltOutlined;
}
var FilterAltOutlinedExports = /* @__PURE__ */ requireFilterAltOutlined();
const FilterAltOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(FilterAltOutlinedExports);
var FilterAltOffOutlined = {};
var hasRequiredFilterAltOffOutlined;
function requireFilterAltOffOutlined() {
  if (hasRequiredFilterAltOffOutlined) return FilterAltOffOutlined;
  hasRequiredFilterAltOffOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(FilterAltOffOutlined, "__esModule", {
    value: true
  });
  FilterAltOffOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  FilterAltOffOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m16.95 6-3.57 4.55 1.43 1.43c1.03-1.31 4.98-6.37 4.98-6.37C20.3 4.95 19.83 4 19 4H6.83l2 2zM2.81 2.81 1.39 4.22 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78 1.41-1.41z"
  }), "FilterAltOffOutlined");
  return FilterAltOffOutlined;
}
var FilterAltOffOutlinedExports = /* @__PURE__ */ requireFilterAltOffOutlined();
const FilterAltOffOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(FilterAltOffOutlinedExports);
var KeyboardArrowDown = {};
var hasRequiredKeyboardArrowDown;
function requireKeyboardArrowDown() {
  if (hasRequiredKeyboardArrowDown) return KeyboardArrowDown;
  hasRequiredKeyboardArrowDown = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardArrowDown, "__esModule", {
    value: true
  });
  KeyboardArrowDown.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardArrowDown.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"
  }), "KeyboardArrowDown");
  return KeyboardArrowDown;
}
var KeyboardArrowDownExports = /* @__PURE__ */ requireKeyboardArrowDown();
const KeyboardArrowDownIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardArrowDownExports);
const SplitterItem = reactExports.forwardRef((props, ref2) => {
  const animationsOn = smetaStore.get(animationsAtom);
  const [isMounted, setIsMounted] = reactExports.useState(false);
  reactExports.useEffect(() => {
    setIsMounted(true);
  }, []);
  const styles2 = { height: "100%" };
  if (props.oneChild) {
    styles2.width = "100%";
  } else {
    styles2.width = props.orientation === "horizontal" ? "100%" : "";
    styles2.display = "flex";
  }
  if (!props.primary) {
    styles2.flex = "0 0 auto";
    styles2.zIndex = 4;
    if (animationsOn && isMounted) {
      styles2.transition = props.orientation === "vertical" ? `width ${props.transitionDuration}ms` : `height ${props.transitionDuration}ms`;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "splitter-item", style: styles2, ref: ref2, children: props.children });
});
SplitterItem.displayName = "SplitterItemLocal";
function SplitterLocal(props) {
  const theme = smetaStore.get(currentTheme);
  const splitterRef = reactExports.useRef(null);
  const separatorRef = reactExports.useRef(null);
  const mutableElementRef = reactExports.useRef(null);
  const splitterFeedbackRef = reactExports.useRef(null);
  const splitterBackgroundFeedbackRef = reactExports.useRef(null);
  const collapsedRef = reactExports.useRef();
  const transitionDuration = props.transitionDuration !== void 0 ? props.transitionDuration : 500;
  const confinesFeedback = [0, 0];
  const containerSize = reactExports.useRef({ width: 0, height: 0 });
  reactExports.useEffect(() => {
    const children2 = React.Children.toArray(props.children);
    if (children2.filter((item) => item).length > 1 && splitterRef.current.getAttribute("size") === "100%") {
      const size = props.sizeSecondary ?? "25%";
      splitterRef.current.setAttribute("size", size);
      const currentSize = props.orientation === "vertical" ? mutableElementRef.current.style.width : mutableElementRef.current.style.height;
      if (!currentSize || currentSize === "100%") setSize(size);
    }
  }, [props.children]);
  reactExports.useEffect(() => {
    var _a2, _b;
    if (collapsedRef.current && props.hideSplitterCollapsed) {
      (_a2 = separatorRef.current) == null ? void 0 : _a2.setAttribute("hidden", "");
    } else (_b = separatorRef.current) == null ? void 0 : _b.removeAttribute("hidden");
  }, [props.hideSplitterCollapsed]);
  reactExports.useEffect(() => {
    const splitterParentElement = splitterRef.current.parentElement;
    splitterRef.current.resize = handleResize;
    containerSize.current = {
      width: splitterParentElement.offsetWidth,
      height: splitterParentElement.offsetHeight
    };
    let size = "100%";
    if (mutableElementRef.current) {
      splitterRef.current.collapse = collapse;
      splitterRef.current.expand = expand;
      const children2 = React.Children.toArray(props.children);
      size = children2.filter((item) => item).length === 1 ? "100%" : props.sizeSecondary ?? "25%";
    }
    splitterRef.current.setAttribute("size", size);
  }, []);
  reactExports.useEffect(() => {
    const children2 = React.Children.toArray(props.children);
    if (mutableElementRef.current && children2.filter((item) => item).length > 1) {
      if (props.collapsed !== void 0) {
        if (props.collapsed) {
          collapse(false);
        } else expand(false);
      } else {
        if (props.defaultCollapsed) {
          collapse(false);
        } else expand(false);
      }
    }
  }, [props.collapsed]);
  reactExports.useEffect(() => {
    if (mutableElementRef.current && separatorRef.current) {
      if (props.blockResize === true) {
        separatorRef.current.setAttribute("block-resize", "");
      } else separatorRef.current.removeAttribute("block-resize");
    }
  }, [props.blockResize]);
  function handleResize() {
    var _a2;
    if (!props.preventResize) {
      const splitterParentElement = splitterRef.current.parentElement;
      const currentWidth = splitterParentElement.offsetWidth;
      const currentHeight = splitterParentElement.offsetHeight;
      if (containerSize.current.width !== currentWidth || containerSize.current.height !== currentHeight) {
        const currentSize = ((_a2 = splitterRef.current) == null ? void 0 : _a2.getAttribute("size")) || "";
        if (currentSize.endsWith("px")) {
          if (props.orientation === "vertical") {
            const changeRatio = currentWidth / containerSize.current.width;
            const newWidth = Math.round(parseFloat(currentSize) * changeRatio) + "px";
            splitterRef.current.setAttribute("size", newWidth);
            if (!separatorRef.current.hasAttribute("item-collapsed")) setSize(newWidth);
          } else {
            const changeRatio = currentHeight / containerSize.current.height;
            const newHeight = Math.round(parseFloat(currentSize) * changeRatio) + "px";
            splitterRef.current.setAttribute("size", newHeight);
            if (!separatorRef.current.hasAttribute("item-collapsed")) setSize(newHeight);
          }
        }
        containerSize.current = { width: currentWidth, height: currentHeight };
        if (props.onResizeEnd) {
          if (smetaStore.get(animationsAtom)) {
            setTimeout(() => {
              props.onResizeEnd(splitterRef.current);
            }, transitionDuration + 1);
          } else {
            props.onResizeEnd(splitterRef.current);
          }
        }
      }
    }
  }
  const getPositionFeedback = (current) => {
    const minimum = confinesFeedback[0];
    const maximum = confinesFeedback[1];
    if (current <= minimum) {
      splitterFeedbackRef.current.classList.add("limit-reached");
      return minimum;
    }
    if (current >= maximum) {
      splitterFeedbackRef.current.classList.add("limit-reached");
      return maximum;
    }
    splitterFeedbackRef.current.classList.remove("limit-reached");
    return current;
  };
  const moveSplitterFeedback = (event) => {
    const splitterRect = splitterRef.current.getBoundingClientRect();
    if (props.orientation === "vertical") {
      splitterFeedbackRef.current.style.left = getPositionFeedback(event.clientX - splitterRect.x) + "px";
    } else {
      splitterFeedbackRef.current.style.top = getPositionFeedback(event.clientY + splitterRef.current.offsetTop - splitterRect.y) + "px";
    }
  };
  const handleTouchMove = (event) => {
    moveSplitterFeedback(event.changedTouches[0]);
  };
  function setSize(size) {
    if (props.orientation === "vertical") {
      mutableElementRef.current.style.width = size;
    } else mutableElementRef.current.style.height = size;
  }
  const endResize = () => {
    let currentSize;
    if (props.primaryIndex === 1) {
      currentSize = props.orientation === "vertical" ? splitterFeedbackRef.current.offsetLeft - splitterRef.current.offsetLeft : splitterFeedbackRef.current.offsetTop - splitterRef.current.offsetTop;
    } else {
      currentSize = props.orientation === "vertical" ? splitterRef.current.offsetWidth - splitterFeedbackRef.current.offsetLeft - separatorRef.current.offsetWidth + splitterRef.current.offsetLeft : splitterRef.current.offsetHeight - splitterFeedbackRef.current.offsetTop - separatorRef.current.offsetHeight + splitterRef.current.offsetTop;
    }
    currentSize = Math.max(currentSize, 0);
    if (!props.minSize && !props.maxSize && currentSize > 0 && splitterFeedbackRef.current.classList.contains("limit-reached")) {
      setSize("calc(100% - 10px)");
      splitterRef.current.setAttribute("size", "calc(100% - 10px)");
    } else {
      setSize(currentSize + "px");
      splitterRef.current.setAttribute("size", currentSize + "px");
    }
    splitterRef.current.toggleAttribute("dragged");
    splitterBackgroundFeedbackRef.current.remove();
    splitterFeedbackRef.current.remove();
    document.removeEventListener("mousemove", moveSplitterFeedback);
    document.removeEventListener("touchmove", handleTouchMove);
    document.removeEventListener("mouseup", endResize);
    document.removeEventListener("touchend", endResize);
    splitterFeedbackRef.current = null;
    if (props.onResizeEnd) {
      if (smetaStore.get(animationsAtom)) {
        setTimeout(() => {
          props.onResizeEnd(splitterRef.current);
        }, transitionDuration + 1);
      } else {
        props.onResizeEnd(splitterRef.current);
      }
    }
  };
  function collapse(needToDo) {
    separatorRef.current.setAttribute("item-collapsed", "");
    setSize("0px");
    collapsedRef.current = true;
    if (props.hideSplitterCollapsed) separatorRef.current.setAttribute("hidden", "");
    if (props.onCollapse && needToDo) {
      if (smetaStore.get(animationsAtom)) {
        setTimeout(() => {
          props.onCollapse(splitterRef.current);
        }, transitionDuration + 1);
      } else props.onCollapse(splitterRef.current);
    }
  }
  function expand(needToDo) {
    separatorRef.current.removeAttribute("item-collapsed");
    separatorRef.current.removeAttribute("hidden");
    setSize(splitterRef.current.getAttribute("size"));
    collapsedRef.current = false;
    if (props.onExpand && needToDo) {
      if (smetaStore.get(animationsAtom)) {
        setTimeout(() => {
          props.onExpand(splitterRef.current);
        }, transitionDuration + 1);
      } else props.onExpand(splitterRef.current);
    }
  }
  const handleSplitterMouseDown = (event) => {
    var _a2, _b;
    if (event.type === "mousedown" && event.button !== 0) return;
    const target = event.target;
    if (target.classList.contains("separator-splitter")) {
      if (!separatorRef.current.hasAttribute("item-collapsed")) {
        let minSize, maxSize;
        const separatorPreviousElement = separatorRef.current.previousElementSibling, separatorNextElement = separatorRef.current.nextElementSibling;
        if (props.orientation === "vertical") {
          minSize = separatorPreviousElement.offsetLeft;
          maxSize = separatorNextElement.offsetLeft + separatorNextElement.offsetWidth - separatorRef.current.offsetWidth;
        } else {
          minSize = separatorPreviousElement.offsetTop;
          maxSize = separatorNextElement.offsetTop + separatorNextElement.offsetHeight - separatorRef.current.offsetHeight;
        }
        if (props.minSize) {
          if (minSize < props.minSize)
            if (props.primaryIndex === 1) {
              minSize = props.minSize;
            } else maxSize -= props.minSize;
        }
        if (props.maxSize) {
          if (maxSize > props.maxSize)
            if (props.primaryIndex === 1) {
              maxSize = props.maxSize;
            } else minSize = maxSize - props.maxSize + (props.minSize || 0);
        }
        confinesFeedback[0] = minSize;
        confinesFeedback[1] = maxSize;
        splitterBackgroundFeedbackRef.current = document.createElement("div");
        splitterBackgroundFeedbackRef.current.className = "splitter-background-feedback";
        splitterBackgroundFeedbackRef.current.style.cursor = props.orientation === "vertical" ? "ew-resize" : "ns-resize";
        splitterFeedbackRef.current = document.createElement("div");
        splitterFeedbackRef.current.className = "splitter-feedback";
        splitterFeedbackRef.current.style.left = separatorRef.current.offsetLeft + "px";
        splitterFeedbackRef.current.style.top = separatorRef.current.offsetTop + "px";
        splitterFeedbackRef.current.style.width = separatorRef.current.offsetWidth + "px";
        splitterFeedbackRef.current.style.height = separatorRef.current.offsetHeight + "px";
        splitterRef.current.appendChild(splitterFeedbackRef.current);
        document.body.appendChild(splitterBackgroundFeedbackRef.current);
        splitterRef.current.toggleAttribute("dragged");
        document.addEventListener("mousemove", moveSplitterFeedback);
        document.addEventListener("touchmove", handleTouchMove);
        document.addEventListener("mouseup", endResize);
        document.addEventListener("touchend", endResize);
      }
    } else {
      if (props.collapsed !== void 0) {
        if (props.collapsed) {
          (_a2 = props.onExpand) == null ? void 0 : _a2.call(props, splitterRef.current);
        } else (_b = props.onCollapse) == null ? void 0 : _b.call(props, splitterRef.current);
      } else {
        if (collapsedRef.current) {
          expand(true);
        } else collapse(true);
      }
    }
    event.preventDefault();
  };
  const splitterElements = [];
  const children = React.Children.toArray(props.children);
  const primaryElement = props.primaryIndex === 1 ? 1 : 0;
  for (let i = 0; i < children.length; i++) {
    splitterElements.push(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        SplitterItem,
        {
          orientation: props.orientation,
          primary: i === primaryElement,
          ref: i === primaryElement ? null : mutableElementRef,
          transitionDuration,
          oneChild: children.length > 1 ? false : true,
          children: children[i]
        }
      )
    );
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    "div",
    {
      className: clsx$3("splitter", props.orientation === "vertical" ? "vertical-splitter" : "horizontal-splitter"),
      ref: (el) => {
        splitterRef.current = el;
        if (props.splitterRef) props.splitterRef.current = el;
      },
      id: props.id,
      style: props.style,
      "data-smetaresizer": "",
      children: [
        splitterElements[0],
        splitterElements.length > 1 && /* @__PURE__ */ jsxRuntimeExports.jsxs(
          "div",
          {
            role: "separator",
            className: clsx$3("separator-splitter", { light: theme === "light" }),
            primaryelement: primaryElement,
            ref: separatorRef,
            onMouseDown: handleSplitterMouseDown,
            onTouchStart: handleSplitterMouseDown,
            style: props.hideSplitter ? { height: 0, width: 0, visibility: "hidden", display: "none" } : {},
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  color: "inherit",
                  size: "small",
                  className: "collapse-button",
                  "far-button": "",
                  style: { visibility: props.hideButtons ? "hidden" : void 0 },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowDownIcon, { fontSize: "inherit" })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  color: "inherit",
                  size: "small",
                  className: "collapse-button",
                  "near-button": "",
                  style: { visibility: props.hideButtons ? "hidden" : void 0 },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowDownIcon, { fontSize: "inherit" })
                }
              )
            ]
          }
        ),
        splitterElements.length > 1 && splitterElements[1]
      ]
    }
  );
}
function FilterComponent({ props }) {
  const [filter2, setFilter] = React.useState("");
  const [parents, setParents] = React.useState("1");
  function onEditFilter(data) {
    if (props.onEdit) {
      props.onEdit({ filter: data.value, parents });
    }
    setFilter(data.value);
  }
  function onCheckFilter(data) {
    if (props.onEdit) {
      props.onEdit({ filter: filter2, parents: data.CheckState });
    }
    setParents(data.CheckState);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        item: true,
        style: {
          height: "27px",
          width: "90px",
          paddingTop: "3px",
          paddingLeft: "5px",
          marginRight: "5px"
        },
        children: "Фильтр:"
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        item: true,
        style: {
          height: "27px",
          width: "calc(100% - 400px)",
          border: "1px solid #C8B58F",
          borderRadius: "3px",
          padding: "3px",
          backgroundColor: "#ffffff"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { onEdit: onEditFilter })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        item: true,
        style: {
          height: "27px",
          width: "30px",
          paddingTop: "3px",
          paddingLeft: "5px"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { CheckState: "1", onEdit: onCheckFilter })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        item: true,
        style: {
          height: "27px",
          width: "250px",
          paddingTop: "3px",
          paddingLeft: "5px"
        },
        children: "Показывать родительские узлы"
      }
    )
  ] });
}
function ContentOrganization({ props, data, buttons }) {
  const [colapsedDetail, setColapsedDetail] = React.useState(true);
  const [colapsedTree, setColapsedTree] = React.useState(false);
  const [colapsedUsers, setColapsedUsers] = React.useState(true);
  const [timerUpdateGrid, setTimerUpdateGrid] = React.useState();
  const [filterSwitch, setFilterSwitch] = React.useState(false);
  const [anchorEl, setAnchorEl] = React.useState(null);
  const open = Boolean(anchorEl);
  const handleClick = (event) => {
    setAnchorEl(event.currentTarget);
  };
  const handleClose = (value) => {
    handleGrouping(value);
    setAnchorEl(null);
  };
  React.useEffect(() => {
    refreshGrid2();
    if (data.getCollapsed) {
      data.getCollapsed({
        detail: colapsedDetail,
        tree: colapsedTree,
        users: colapsedUsers
      });
    }
  }, [colapsedDetail, colapsedTree, colapsedUsers]);
  function handleGrouping(module2) {
    CreateBackgroundForModal(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        ModalWindow,
        {
          Title: module2,
          style: {
            minWidth: `${window.innerWidth * 0.4}px`,
            minHeight: `${window.innerHeight * 0.4}px`,
            height: `${window.innerHeight * 0.4}px`,
            width: `${window.innerWidth * 0.4}px`
          },
          hiddenButton: true,
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(HandleGrouping, { id: "grouping_grid", module: module2 })
        }
      )
    );
  }
  function colapseDetail() {
    setColapsedDetail(!colapsedDetail);
    refreshGrid2();
  }
  function colapseTree() {
    setColapsedTree(!colapsedTree);
    refreshGrid2();
  }
  function colapseUsers() {
    setColapsedUsers(!colapsedUsers);
    refreshGrid2();
  }
  const selectTab = (num) => {
    if (data.tabsPanel.current) data.tabsPanel.current.select(num);
  };
  function searchActive() {
    if (colapsedDetail) {
      selectTab(buttons.search);
      setColapsedDetail(false);
      return;
    }
    if (data.tabsPanel.current.selectedIndex === buttons.search) {
      setColapsedDetail(true);
      return;
    }
    selectTab(buttons.search);
  }
  function refreshGrid2() {
    if (smetaStore.get(animationsAtom)) {
      clearTimeout(timerUpdateGrid);
      setTimerUpdateGrid(
        setTimeout(() => {
          updateGridData(0);
        }, 251)
      );
    } else updateGridData(0);
  }
  const styleButton = {
    margin: "2px 2px 2px 2px",
    width: "30px",
    height: "30px"
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      id: "mainElement",
      container: true,
      direction: "column",
      justifyContent: "flex-start",
      alignItems: "stretch",
      style: { position: "relative", height: "100%" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid$1,
          {
            item: true,
            style: {
              border: "1px solid #C8B58F",
              height: "35px"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  style: buttons.users !== void 0 ? styleButton : { display: "none" },
                  onClick: colapseUsers,
                  title: "Пользователи",
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(AccountBoxOutlinedIcon, { style: { fontSize: "large" } })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  style: buttons.tree !== void 0 ? styleButton : { display: "none" },
                  title: "Каталог",
                  onClick: colapseTree,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(SpaceDashboardOutlinedIcon, { style: { transform: "rotate(+180deg)", fontSize: "large" } })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  title: "Детали",
                  disabled: !data.tabs || data.tabs.length === 0,
                  style: buttons.detail !== void 0 ? styleButton : { display: "none" },
                  onClick: colapseDetail,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ViewComfyOutlinedIcon, { style: { fontSize: "large" } })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  style: buttons.filter !== void 0 ? styleButton : { display: "none" },
                  title: "Фильтр",
                  onClick: () => {
                    setFilterSwitch(!filterSwitch);
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltOutlinedIcon, { style: { fontSize: "large" } })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  style: buttons.deleteFilter !== void 0 ? styleButton : { display: "none" },
                  title: "Снять фильтр",
                  onClick: (ev) => {
                    data.onDeleteFilter(ev);
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltOffOutlinedIcon, { style: { fontSize: "large" } })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  title: "Поиск",
                  style: buttons.search !== void 0 ? styleButton : { display: "none" },
                  onClick: searchActive,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(SearchIcon, { style: { fontSize: "large" } })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  title: "Объединить..",
                  id: "basic-button",
                  "aria-controls": open ? "basic-menu" : void 0,
                  "aria-haspopup": "true",
                  "aria-expanded": open ? "true" : void 0,
                  onClick: handleClick,
                  size: "small",
                  style: buttons.grouping ? styleButton : { display: "none" },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(VerticalAlignCenterOutlinedIcon, { style: { transform: "rotate(+90deg)", fontSize: "large" } })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Menu,
                {
                  id: "basic-menu",
                  anchorEl,
                  open,
                  onClose: () => {
                    setAnchorEl(null);
                  },
                  MenuListProps: {
                    "aria-labelledby": "basic-button"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      MenuItem,
                      {
                        id: `Org_${props.CLSID}`,
                        onClick: () => {
                          handleClose("Объединить организации");
                        },
                        children: "Объединить организации"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      MenuItem,
                      {
                        id: `Bank_${props.CLSID}`,
                        onClick: () => {
                          handleClose("Объединить банки");
                        },
                        children: "Объединить банки"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      MenuItem,
                      {
                        id: `Accounts_${props.CLSID}`,
                        onClick: () => {
                          handleClose("Объединить Счета");
                        },
                        children: "Объединить Счета"
                      }
                    )
                  ]
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { title: "Обновить Таблицы", style: { display: "none" }, onClick: refreshGrid2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(UpdateIcon, {}) })
            ]
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid$1,
          {
            container: true,
            item: true,
            direction: "row",
            justifyContent: "flex-start",
            alignItems: "stretch",
            style: {
              height: props.hiddenFutter ? `calc(${props.height ? props.height : "100%"} - 35px)` : `calc(${props.height ? props.height : "100%"} - 35px - 42px - ${data.docFooter ? "21px" : "0px"})`,
              width: "100%"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                SplitterLocal,
                {
                  onResizeEnd: () => refreshGrid2(),
                  onCollapse: () => {
                    refreshGrid2();
                  },
                  onExpand: () => {
                    refreshGrid2();
                  },
                  orientation: "vertical",
                  style: { width: "100%", height: "100%" },
                  primaryIndex: buttons.tree ? 1 : 0,
                  collapsed: colapsedTree,
                  transitionDuration: 250,
                  sizeSecondary: "30%",
                  hideButtons: true,
                  children: [
                    buttons.tree ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: "org_splitter_item_1", style: { height: "100%" }, children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Grid$1,
                        {
                          item: true,
                          style: {
                            border: "1px solid #C8B58F",
                            borderTop: "0px",
                            height: "calc(100% - 25px)",
                            width: "100%"
                          },
                          children: data.tree
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        "div",
                        {
                          style: {
                            border: "1px solid #C8B58F",
                            borderTop: "0px",
                            height: "25px",
                            width: "100%",
                            overflow: "hidden"
                          },
                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            IconButton,
                            {
                              style: data.getMainOrganization ? {
                                border: "0px",
                                borderRadius: "0",
                                backgroundColor: "#f9f9f9",
                                fontSize: "100%",
                                height: "100%",
                                width: "100%",
                                whiteSpace: "nowrap",
                                cursor: "pointer"
                              } : { display: "none" },
                              onClick: data.getMainOrganization,
                              children: "Основная организация"
                            }
                          )
                        }
                      )
                    ] }) : null,
                    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "100%" }, children: [
                      data.nfa ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
                        Grid$1,
                        {
                          container: true,
                          direction: "row",
                          justifyContent: "flex-start",
                          alignItems: "center",
                          style: {
                            height: "39px",
                            background: "linear-gradient(to top, #cecece, 20%, rgb(250, 249, 245))"
                          },
                          children: [
                            /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Grid$1,
                              {
                                item: true,
                                style: {
                                  height: "27px",
                                  width: "90px",
                                  paddingTop: "3px",
                                  paddingLeft: "5px",
                                  marginRight: "5px"
                                },
                                children: "Учреждение:"
                              }
                            ),
                            /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Grid$1,
                              {
                                item: true,
                                style: {
                                  height: "27px",
                                  width: "calc(100% - 100px)",
                                  border: "1px solid #C8B58F",
                                  borderRadius: "3px",
                                  padding: "3px",
                                  backgroundColor: "#ffffff"
                                },
                                children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { ...data.editorProps })
                              }
                            )
                          ]
                        }
                      ) : null,
                      buttons.filter ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Grid$1,
                        {
                          container: true,
                          direction: "row",
                          justifyContent: "flex-start",
                          alignItems: "center",
                          style: {
                            height: "39px",
                            background: "linear-gradient(to top, #cecece, 20%, rgb(250, 249, 245))",
                            display: filterSwitch ? "" : "none"
                          },
                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(FilterComponent, { props: data.filterProps })
                        }
                      ) : null,
                      /* @__PURE__ */ jsxRuntimeExports.jsxs(
                        SplitterLocal,
                        {
                          onResizeEnd: () => refreshGrid2(),
                          onCollapse: () => {
                            refreshGrid2();
                          },
                          onExpand: () => {
                            refreshGrid2();
                          },
                          orientation: "horizontal",
                          style: {
                            width: "100%",
                            height: data.nfa || filterSwitch ? "calc(100% - 39px)" : "100%"
                          },
                          primaryIndex: 0,
                          collapsed: colapsedDetail,
                          defaultCollapsed: colapsedDetail,
                          transitionDuration: 250,
                          sizeSecondary: "30%",
                          hideButtons: true,
                          children: [
                            /* @__PURE__ */ jsxRuntimeExports.jsx(
                              "div",
                              {
                                style: {
                                  height: "100%"
                                },
                                children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                                  SplitterLocal,
                                  {
                                    onResizeEnd: () => refreshGrid2(),
                                    onCollapse: () => {
                                      refreshGrid2();
                                    },
                                    onExpand: () => {
                                      refreshGrid2();
                                    },
                                    orientation: "vertical",
                                    style: {
                                      width: "100%",
                                      height: "100%"
                                    },
                                    primaryIndex: 0,
                                    collapsed: colapsedUsers,
                                    transitionDuration: 250,
                                    sizeSecondary: "30%",
                                    hideButtons: true,
                                    children: [
                                      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                        ContextMenu,
                                        {
                                          for: data.mainMenuSelector,
                                          Menu: getDefaultMenu(data.mainMenuSelector),
                                          changeDataOfItem: data.changeDataOfItem,
                                          onRightClick: async () => {
                                            const json = await data.mainMenuRequest(
                                              props.Module,
                                              data.objType,
                                              data.selectedRecordID,
                                              props.SectionID
                                            );
                                            if (json && json.Items && json.Items.items) {
                                              return { arr: json.Items.items };
                                            }
                                          },
                                          onMenuItemClick: data.ContextMenuHandler,
                                          refs: { current: data.mainGrid },
                                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                            Grid$1,
                                            {
                                              item: true,
                                              id: `rcgrid_panel`,
                                              ref: data.gridPanel,
                                              style: {
                                                height: "100%",
                                                width: "100%",
                                                position: "relative"
                                              }
                                            }
                                          )
                                        }
                                      ) }),
                                      buttons.users ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                                        Grid$1,
                                        {
                                          container: true,
                                          direction: "column",
                                          justifyContent: "flex-start",
                                          alignItems: "center",
                                          style: {
                                            backgroundColor: "#ececec",
                                            height: "100%"
                                          },
                                          children: [
                                            /* @__PURE__ */ jsxRuntimeExports.jsx(
                                              Grid$1,
                                              {
                                                style: {
                                                  width: "100%",
                                                  height: "27px",
                                                  justifyContent: "center",
                                                  alignItems: "center",
                                                  display: "flex",
                                                  overflow: "hidden"
                                                },
                                                children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Пользователи" })
                                              }
                                            ),
                                            /* @__PURE__ */ jsxRuntimeExports.jsx(
                                              Grid$1,
                                              {
                                                style: {
                                                  width: "100%",
                                                  height: "calc(100% - 32px)",
                                                  backgroundColor: "#ffffff",
                                                  paddingTop: "5px"
                                                },
                                                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                                  Grid$1,
                                                  {
                                                    container: true,
                                                    direction: "column",
                                                    justifyContent: "flex-start",
                                                    alignItems: "flex-start",
                                                    style: { height: "100%" },
                                                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                                      Box$1,
                                                      {
                                                        style: {
                                                          overflow: "auto",
                                                          height: "100%",
                                                          width: "100%"
                                                        },
                                                        children: data.users
                                                      }
                                                    )
                                                  }
                                                )
                                              }
                                            )
                                          ]
                                        }
                                      ) }) : null
                                    ]
                                  }
                                )
                              }
                            ),
                            buttons.detail ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Tabs,
                              {
                                enableMouseWheelAction: true,
                                onChange: (ev) => {
                                  if (data.updateTab && ev.detail) {
                                    data.updateTab(ev.detail.index, data.tabs);
                                  }
                                },
                                ref: data.tabsPanel,
                                id: `tabs_organizations`,
                                scrollMode: "paging",
                                animation: "none",
                                tabPosition: "bottom",
                                style: {
                                  position: "relative",
                                  border: "1px solid #C8B58F",
                                  height: "100%",
                                  width: "100%"
                                },
                                children: data.tabs
                              }
                            ) }) : null
                          ]
                        }
                      )
                    ] })
                  ]
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  container: true,
                  item: true,
                  direction: "row",
                  justifyContent: "flex-end",
                  alignItems: "center",
                  style: {
                    height: "42px",
                    width: "100%",
                    border: "1px solid #C8B58F",
                    display: props.hiddenFutter ? "none" : ""
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Grid$1,
                      {
                        item: true,
                        style: {
                          margin: "8px",
                          width: props.hiddenButton ? "calc(100% - 89px)" : "calc(100% - 188px)"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { style: { width: "92px" }, children: [
                          "Количество записей: ",
                          data.countRecords
                        ] })
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "fit-content" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { marginRight: "10px", width: "75px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Button$2,
                        {
                          onClick: (ev) => {
                            data.onSelect();
                          },
                          size: "small",
                          variant: "outlined",
                          style: {
                            textTransform: "none",
                            display: props.hiddenButton ? "none" : props.Buttons && (props.Button & 1) === 0 ? "none" : ""
                          },
                          value: "1",
                          className: "button_Modal_Select",
                          children: "Выбрать"
                        }
                      ) }),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { marginRight: "10px", width: "65px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Button$2,
                        {
                          size: "small",
                          variant: "outlined",
                          style: { textTransform: "none" },
                          value: "2",
                          className: "button_Modal_Close",
                          children: "Отмена"
                        }
                      ) })
                    ] }) })
                  ]
                }
              ),
              data.docFooter ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  item: true,
                  id: `footerData_${props.SectionID}`,
                  className: "css-11vzlf0-MuiGrid-root",
                  ref: data.buttonsRef,
                  style: {
                    width: "100%",
                    paddingLeft: "15px",
                    border: "1px solid #C8B58F",
                    borderTop: "0px",
                    height: "21px"
                  }
                }
              ) : null
            ]
          }
        )
      ]
    }
  ) });
}
var match$2 = { exports: {} };
var match$1 = match$2.exports;
var hasRequiredMatch;
function requireMatch() {
  if (hasRequiredMatch) return match$2.exports;
  hasRequiredMatch = 1;
  (function(module2, exports2) {
    !function(e2, t) {
      module2.exports = t();
    }(match$1, () => {
      return e2 = { 772: (e3, t2, o) => {
        const r2 = o(826).remove, i = /[.*+?^${}()|[\]\\]/g, n = /[a-z0-9_]/i, u2 = /\s+/;
        e3.exports = function(e4, t3, o2) {
          var s, a2;
          a2 = { insideWords: false, findAllOccurrences: false, requireMatchAll: false }, s = (s = o2) || {}, Object.keys(s).forEach((e5) => {
            a2[e5] = !!s[e5];
          }), o2 = a2;
          const c = Array.from(e4).map((e5) => r2(e5));
          let l = c.join("");
          return (t3 = r2(t3)).trim().split(u2).filter((e5) => e5.length > 0).reduce((e5, t4) => {
            const r3 = t4.length, u3 = !o2.insideWords && n.test(t4[0]) ? "\\b" : "", s2 = new RegExp(u3 + t4.replace(i, "\\$&"), "i");
            let a3, A2;
            if (a3 = s2.exec(l), o2.requireMatchAll && null === a3) return l = "", [];
            for (; a3; ) {
              A2 = a3.index;
              const t5 = r3 - c.slice(A2, A2 + r3).join("").length, i2 = A2 - c.slice(0, A2).join("").length, n2 = [A2 + i2, A2 + r3 + i2 + t5];
              if (n2[0] !== n2[1] && e5.push(n2), l = l.slice(0, A2) + new Array(r3 + 1).join(" ") + l.slice(A2 + r3), !o2.findAllOccurrences) break;
              a3 = s2.exec(l);
            }
            return e5;
          }, []).sort((e5, t4) => e5[0] - t4[0]);
        };
      }, 826: (e3) => {
        var t2 = { À: "A", Á: "A", Â: "A", Ã: "A", Ä: "A", Å: "A", Ấ: "A", Ắ: "A", Ẳ: "A", Ẵ: "A", Ặ: "A", Æ: "AE", Ầ: "A", Ằ: "A", Ȃ: "A", Ç: "C", Ḉ: "C", È: "E", É: "E", Ê: "E", Ë: "E", Ế: "E", Ḗ: "E", Ề: "E", Ḕ: "E", Ḝ: "E", Ȇ: "E", Ì: "I", Í: "I", Î: "I", Ï: "I", Ḯ: "I", Ȋ: "I", Ð: "D", Ñ: "N", Ò: "O", Ó: "O", Ô: "O", Õ: "O", Ö: "O", Ø: "O", Ố: "O", Ṍ: "O", Ṓ: "O", Ȏ: "O", Ù: "U", Ú: "U", Û: "U", Ü: "U", Ý: "Y", à: "a", á: "a", â: "a", ã: "a", ä: "a", å: "a", ấ: "a", ắ: "a", ẳ: "a", ẵ: "a", ặ: "a", æ: "ae", ầ: "a", ằ: "a", ȃ: "a", ç: "c", ḉ: "c", è: "e", é: "e", ê: "e", ë: "e", ế: "e", ḗ: "e", ề: "e", ḕ: "e", ḝ: "e", ȇ: "e", ì: "i", í: "i", î: "i", ï: "i", ḯ: "i", ȋ: "i", ð: "d", ñ: "n", ò: "o", ó: "o", ô: "o", õ: "o", ö: "o", ø: "o", ố: "o", ṍ: "o", ṓ: "o", ȏ: "o", ù: "u", ú: "u", û: "u", ü: "u", ý: "y", ÿ: "y", Ā: "A", ā: "a", Ă: "A", ă: "a", Ą: "A", ą: "a", Ć: "C", ć: "c", Ĉ: "C", ĉ: "c", Ċ: "C", ċ: "c", Č: "C", č: "c", C̆: "C", c̆: "c", Ď: "D", ď: "d", Đ: "D", đ: "d", Ē: "E", ē: "e", Ĕ: "E", ĕ: "e", Ė: "E", ė: "e", Ę: "E", ę: "e", Ě: "E", ě: "e", Ĝ: "G", Ǵ: "G", ĝ: "g", ǵ: "g", Ğ: "G", ğ: "g", Ġ: "G", ġ: "g", Ģ: "G", ģ: "g", Ĥ: "H", ĥ: "h", Ħ: "H", ħ: "h", Ḫ: "H", ḫ: "h", Ĩ: "I", ĩ: "i", Ī: "I", ī: "i", Ĭ: "I", ĭ: "i", Į: "I", į: "i", İ: "I", ı: "i", Ĳ: "IJ", ĳ: "ij", Ĵ: "J", ĵ: "j", Ķ: "K", ķ: "k", Ḱ: "K", ḱ: "k", K̆: "K", k̆: "k", Ĺ: "L", ĺ: "l", Ļ: "L", ļ: "l", Ľ: "L", ľ: "l", Ŀ: "L", ŀ: "l", Ł: "l", ł: "l", Ḿ: "M", ḿ: "m", M̆: "M", m̆: "m", Ń: "N", ń: "n", Ņ: "N", ņ: "n", Ň: "N", ň: "n", ŉ: "n", N̆: "N", n̆: "n", Ō: "O", ō: "o", Ŏ: "O", ŏ: "o", Ő: "O", ő: "o", Œ: "OE", œ: "oe", P̆: "P", p̆: "p", Ŕ: "R", ŕ: "r", Ŗ: "R", ŗ: "r", Ř: "R", ř: "r", R̆: "R", r̆: "r", Ȓ: "R", ȓ: "r", Ś: "S", ś: "s", Ŝ: "S", ŝ: "s", Ş: "S", Ș: "S", ș: "s", ş: "s", Š: "S", š: "s", Ţ: "T", ţ: "t", ț: "t", Ț: "T", Ť: "T", ť: "t", Ŧ: "T", ŧ: "t", T̆: "T", t̆: "t", Ũ: "U", ũ: "u", Ū: "U", ū: "u", Ŭ: "U", ŭ: "u", Ů: "U", ů: "u", Ű: "U", ű: "u", Ų: "U", ų: "u", Ȗ: "U", ȗ: "u", V̆: "V", v̆: "v", Ŵ: "W", ŵ: "w", Ẃ: "W", ẃ: "w", X̆: "X", x̆: "x", Ŷ: "Y", ŷ: "y", Ÿ: "Y", Y̆: "Y", y̆: "y", Ź: "Z", ź: "z", Ż: "Z", ż: "z", Ž: "Z", ž: "z", ſ: "s", ƒ: "f", Ơ: "O", ơ: "o", Ư: "U", ư: "u", Ǎ: "A", ǎ: "a", Ǐ: "I", ǐ: "i", Ǒ: "O", ǒ: "o", Ǔ: "U", ǔ: "u", Ǖ: "U", ǖ: "u", Ǘ: "U", ǘ: "u", Ǚ: "U", ǚ: "u", Ǜ: "U", ǜ: "u", Ứ: "U", ứ: "u", Ṹ: "U", ṹ: "u", Ǻ: "A", ǻ: "a", Ǽ: "AE", ǽ: "ae", Ǿ: "O", ǿ: "o", Þ: "TH", þ: "th", Ṕ: "P", ṕ: "p", Ṥ: "S", ṥ: "s", X́: "X", x́: "x", Ѓ: "Г", ѓ: "г", Ќ: "К", ќ: "к", A̋: "A", a̋: "a", E̋: "E", e̋: "e", I̋: "I", i̋: "i", Ǹ: "N", ǹ: "n", Ồ: "O", ồ: "o", Ṑ: "O", ṑ: "o", Ừ: "U", ừ: "u", Ẁ: "W", ẁ: "w", Ỳ: "Y", ỳ: "y", Ȁ: "A", ȁ: "a", Ȅ: "E", ȅ: "e", Ȉ: "I", ȉ: "i", Ȍ: "O", ȍ: "o", Ȑ: "R", ȑ: "r", Ȕ: "U", ȕ: "u", B̌: "B", b̌: "b", Č̣: "C", č̣: "c", Ê̌: "E", ê̌: "e", F̌: "F", f̌: "f", Ǧ: "G", ǧ: "g", Ȟ: "H", ȟ: "h", J̌: "J", ǰ: "j", Ǩ: "K", ǩ: "k", M̌: "M", m̌: "m", P̌: "P", p̌: "p", Q̌: "Q", q̌: "q", Ř̩: "R", ř̩: "r", Ṧ: "S", ṧ: "s", V̌: "V", v̌: "v", W̌: "W", w̌: "w", X̌: "X", x̌: "x", Y̌: "Y", y̌: "y", A̧: "A", a̧: "a", B̧: "B", b̧: "b", Ḑ: "D", ḑ: "d", Ȩ: "E", ȩ: "e", Ɛ̧: "E", ɛ̧: "e", Ḩ: "H", ḩ: "h", I̧: "I", i̧: "i", Ɨ̧: "I", ɨ̧: "i", M̧: "M", m̧: "m", O̧: "O", o̧: "o", Q̧: "Q", q̧: "q", U̧: "U", u̧: "u", X̧: "X", x̧: "x", Z̧: "Z", z̧: "z" }, o = Object.keys(t2).join("|"), r2 = new RegExp(o, "g"), i = new RegExp(o, ""), n = function(e4) {
          return e4.replace(r2, function(e5) {
            return t2[e5];
          });
        };
        e3.exports = n, e3.exports.has = function(e4) {
          return !!e4.match(i);
        }, e3.exports.remove = n;
      } }, t = {}, function o(r2) {
        var i = t[r2];
        if (void 0 !== i) return i.exports;
        var n = t[r2] = { exports: {} };
        return e2[r2](n, n.exports, o), n.exports;
      }(772);
      var e2, t;
    });
  })(match$2);
  return match$2.exports;
}
var matchExports = requireMatch();
const match = /* @__PURE__ */ getDefaultExportFromCjs(matchExports);
var parse$3 = { exports: {} };
var parse$2 = parse$3.exports;
var hasRequiredParse;
function requireParse() {
  if (hasRequiredParse) return parse$3.exports;
  hasRequiredParse = 1;
  (function(module2, exports2) {
    !function(t, e2) {
      module2.exports = e2();
    }(parse$2, () => {
      return t = { 705: (t2) => {
        t2.exports = function(t3, e3) {
          const h2 = [];
          return 0 === e3.length ? h2.push({ text: t3, highlight: false }) : e3[0][0] > 0 && h2.push({ text: t3.slice(0, e3[0][0]), highlight: false }), e3.forEach((i, o) => {
            const s = i[0], r2 = i[1];
            h2.push({ text: t3.slice(s, r2), highlight: true }), o === e3.length - 1 ? r2 < t3.length && h2.push({ text: t3.slice(r2, t3.length), highlight: false }) : r2 < e3[o + 1][0] && h2.push({ text: t3.slice(r2, e3[o + 1][0]), highlight: false });
          }), h2;
        };
      } }, e2 = {}, function h2(i) {
        var o = e2[i];
        if (void 0 !== o) return o.exports;
        var s = e2[i] = { exports: {} };
        return t[i](s, s.exports, h2), s.exports;
      }(705);
      var t, e2;
    });
  })(parse$3);
  return parse$3.exports;
}
var parseExports = requireParse();
const parse$1 = /* @__PURE__ */ getDefaultExportFromCjs(parseExports);
function EditorAdress(props) {
  const [lazylist, setLazylist] = reactExports.useState([]);
  const [value, setValue] = reactExports.useState({
    text: props.text === void 0 ? "" : props.text
  });
  const [inputValue, setInputValue] = reactExports.useState("");
  const [load, setLoad] = reactExports.useState(false);
  const [caption, setCaption] = reactExports.useState("");
  const [timer2, setTimer] = reactExports.useState(null);
  const [noOptionsText, setNoOptionsText] = reactExports.useState(props.noOptionsText || "Введите адрес для поиска");
  reactExports.useEffect(() => {
    setValue({ text: props.text === void 0 ? "" : props.text });
  }, [props.text]);
  reactExports.useEffect(() => {
    if (props.setCaption && caption) props.setCaption(caption);
  }, [caption]);
  async function getLazyList(text) {
    if (text.length > 3 && text !== value.text && load === false && text !== props.text) {
      setLazylist([]);
      setLoad(true);
      let params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", "kladr");
      params2.set("comand", "LazyList");
      params2.set("Text", text);
      params2.set("smart", "1");
      params2.set("dv", props.division ? props.division : "0");
      params2.set("WSM", "1");
      const json = await AxiosRequest(true, params2);
      let arr = [];
      if (!isEmptyObject(json.Items)) {
        for (const value2 of Object.values(json.Items)) {
          arr.push(value2);
        }
      }
      setLoad(false);
      setLazylist(arr);
      setNoOptionsText("Ничего не найдено");
    }
  }
  function assignAddress(id) {
    if (id && id.text !== void 0) {
      if (props.confirmation !== void 0) {
        props.confirmation(props.confirmationText, assign2(id), setInputValue, value.text);
      } else {
        assign2(id)();
      }
    }
  }
  function assign2(id) {
    return () => {
      if (props.confirmation !== void 0) setInputValue(id.text);
      const params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", "kladr");
      params2.set("comand", "AssignAddress");
      params2.set("ObjRef", props.ObjRef ? props.ObjRef : "0");
      params2.set("Key", id.id);
      params2.set("dv", props.division ? props.division : "0");
      AxiosRequest(true, params2).then(async (response) => {
        if (id.id === 0 || !isEmptyObject(response)) {
          if (!props.ObjRef) await setAddress(response.ID);
          setValue({ text: id.text });
          setCaption(response.Caption);
          if (props.ClickForm) {
            props.ClickForm(void 0, props.keyName, void 0, response.Current);
          }
          if (props.setData) {
            props.setData(
              getParamsObject(
                response,
                props.paramsData.GroupID,
                props.paramsData.address,
                props.paramsData.parentModule
              )
            );
          }
        } else {
          setInputValue(value.text);
          console.error("Empty response AssignAddress");
        }
      });
    };
  }
  async function setAddress(id) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "SetAddress").set("Type", "0").set("ID", id).set("GroupID", props.GroupID);
    return AxiosRequest(true, params2);
  }
  const popperMy = function(props2) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(Popper, { ...props2, style: { width: "fit-content", zIndex: "100000" } });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: props.ReadOnly ? null : props.tooltipTitle || null, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Autocomplete,
    {
      className: "text-field__input",
      selectOnFocus: true,
      autoHighlight: true,
      disabled: props.disabled || props.ReadOnly,
      freeSolo: props.onlySelectValue ? lazylist.length ? true : false : true,
      id: props.keyName,
      filterOptions: (options) => options,
      size: "small",
      disableListWrap: true,
      handleHomeEndKeys: true,
      style: { border: "none" },
      sx: {
        display: "inline-block",
        width: "100%"
        // height:"100%"
      },
      value,
      onChange: (event, newValue) => {
        assignAddress(newValue);
      },
      inputValue,
      onInputChange: (event, newInputValue) => {
        if (newInputValue.length < 3) setNoOptionsText("Введите адрес для поиска");
        if (!(event && event["_reactName"] === "onClick" && props.confirmation !== void 0)) {
          setInputValue(newInputValue);
          if (event !== null && event["_reactName"] === "onChange") {
            clearTimeout(timer2);
            const newTimer = setTimeout(() => {
              if (newInputValue === "" && props.ClickForm) {
                assignAddress({ text: "", id: 0 });
              } else {
                if (/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(newInputValue)) {
                  getLazyList(newInputValue);
                } else getLazyList(AutoTextTranslate(newInputValue));
              }
            }, 600);
            setTimer(newTimer);
          }
        }
      },
      noOptionsText,
      onClose: () => {
        if (props.onlySelectValue) {
          setInputValue(value.text);
          setNoOptionsText("Введите адрес для поиска");
        }
      },
      options: lazylist,
      loading: props.onlySelectValue && load,
      loadingText: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { size: 20 }),
      getOptionLabel: (option) => option.text || "",
      PopperComponent: props.defaultPopper ? void 0 : popperMy,
      renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: params2.InputProps.ref, style: { position: "relative" }, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          "input",
          {
            placeholder: props.placeholder,
            className: "text-field__input",
            type: "text",
            style: props.style,
            ...params2.inputProps
          }
        ),
        !props.onlySelectValue && load ? /* @__PURE__ */ jsxRuntimeExports.jsx(
          CircularProgress,
          {
            color: "primary",
            size: 20,
            style: {
              top: "6px",
              right: "10px",
              position: "absolute"
            }
          }
        ) : null
      ] }),
      renderOption: (props2, option, { inputValue: inputValue2 }) => {
        const text = option.text;
        const matches = match(text, inputValue2);
        const parts = parse$1(text, matches);
        return /* @__PURE__ */ reactExports.createElement("li", { ...props2, key: `${props2.key}_${props2.id}` }, /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: parts.map((part, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
          "span",
          {
            style: {
              fontWeight: part.highlight ? 700 : 400
            },
            children: part.text
          },
          index2
        )) }));
      }
    }
  ) });
}
var ArrowDropDownCircleOutlined = {};
var hasRequiredArrowDropDownCircleOutlined;
function requireArrowDropDownCircleOutlined() {
  if (hasRequiredArrowDropDownCircleOutlined) return ArrowDropDownCircleOutlined;
  hasRequiredArrowDropDownCircleOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ArrowDropDownCircleOutlined, "__esModule", {
    value: true
  });
  ArrowDropDownCircleOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ArrowDropDownCircleOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12 4c4.41 0 8 3.59 8 8s-3.59 8-8 8-8-3.59-8-8 3.59-8 8-8m0-2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 13-4-4h8z"
  }), "ArrowDropDownCircleOutlined");
  return ArrowDropDownCircleOutlined;
}
var ArrowDropDownCircleOutlinedExports = /* @__PURE__ */ requireArrowDropDownCircleOutlined();
const ArrowDropDownCircleOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ArrowDropDownCircleOutlinedExports);
var resize$1 = {};
function onMouseDown$1(ev) {
  const record = ev.target.closest("TR");
  const table = record.parentElement;
  const el = record.querySelector(".td-name");
  const elements = table.querySelectorAll(".td-name");
  resize$1.resizeMode = true;
  resize$1.target = ev.target;
  resize$1.cells = elements;
  resize$1.cell = el;
}
function onMouseUp$1(ev, setWidth) {
  if (resize$1.size !== void 0) {
    if (resize$1.ctrlKey) {
      resize$1 = {};
      return;
    }
    setWidth(resize$1.size);
    resize$1 = {};
  }
}
function onMouseMove$1(ev) {
  if (resize$1.resizeMode) {
    const x = ev.clientX;
    const targetWidth = resize$1.target.clientWidth;
    const targetX = resize$1.target.getBoundingClientRect().x;
    if (ev.ctrlKey) {
      resize$1.ctrlKey = true;
      let size = x - targetWidth - targetX;
      size = resize$1.cell.clientWidth / resize$1.cell.parentElement.clientWidth * 100 + size / resize$1.cell.parentElement.clientWidth * 100;
      if (size < 30) size = 30;
      if (size > 70) size = 70;
      resize$1.size = size;
      resize$1.cell.style.width = `${size}%`;
      return;
    }
    resize$1.cells.forEach((el) => {
      let size = x - targetWidth - targetX;
      if (el.style.clientWidth === 0) return;
      size = el.clientWidth / el.parentElement.clientWidth * 100 + size / el.parentElement.clientWidth * 100;
      if (size < 30) size = 30;
      if (size > 70) size = 70;
      resize$1.size = size;
      el.style.width = `${size}%`;
    });
  }
}
function getPadding$1(items, item, index2) {
  let padding2 = 15;
  const level = item.Level ? item.Level : 0;
  if (items.length - 1 > index2 && level < items[index2 + 1].Level) {
    padding2 -= 15;
  }
  if (item.Level) {
    padding2 += item.Level * 15;
  }
  return padding2;
}
function getHeight$1(module2) {
  switch (module2) {
    case "organizations":
      return 207;
    case "address":
      return 472.5;
    case "persons":
      return 207;
    default:
      return 34;
  }
}
function getAddressConditionValue(Name, ID2) {
  const params2 = {
    Name,
    ID: ID2,
    Type: "1"
  };
  const config2 = {
    prefix: Prefixes.address,
    method: "GET",
    url: "GetParamValues",
    params: params2
  };
  return smetaAxios(config2);
}
function AddressParams(props) {
  const [paramsData, setParamData] = React.useState();
  const [useKladr, setUseKladr] = React.useState();
  const [addressCaption, setAddressCaption] = React.useState();
  const [paramsItems, setParamsItems] = React.useState();
  const [paramsJsx, setParamsJsx] = React.useState();
  const [width2, setWidth] = React.useState(35);
  const editor = React.useRef();
  const [editionMap, setEditionMap] = React.useState();
  const [getEdition, setGetEdition] = React.useState();
  const mouseDown = React.useRef(null);
  const paramsBox2 = React.useRef();
  const [division, setDivision] = React.useState("0");
  const [isRussia, setIsRussia] = React.useState();
  const [list, setList] = React.useState();
  const [anchorElList, setAnchorElList] = React.useState(null);
  const openList = Boolean(anchorElList);
  const handleClickList = (event) => {
    setAnchorElList(event.currentTarget);
  };
  const handleCloseList = () => {
    setAnchorElList(null);
  };
  React.useEffect(() => {
    if (props.data) {
      updateParams(props.data);
    }
    paramsBox2.current.update = (data) => {
      updateParams(data);
    };
    setEditionMap(/* @__PURE__ */ new Map());
    setList(/* @__PURE__ */ jsxRuntimeExports.jsx(MenuItem, { disabled: true, children: "Нет опций" }));
  }, []);
  React.useEffect(() => {
    setUseKladr(props.useKladr);
  }, [props.useKladr]);
  React.useEffect(() => {
    if (props.data) {
      updateParams(props.data);
    }
  }, [props.data]);
  React.useEffect(() => {
    var _a2;
    if (paramsData) {
      if (editor.current) {
        deleteEditor(editor.current);
      }
      setParamsItems([...paramsData.Items]);
      setDivision(paramsData.division || "0");
      setIsRussia(
        ((_a2 = paramsData.Items[0]) == null ? void 0 : _a2.Value) === void 0 || paramsData.Items[0].Value === "" || paramsData.Items[0].Value.toLowerCase().substring(0, 5) === "росси"
      );
      if (props.setObjRef && paramsData.ID) props.setObjRef(paramsData.ID);
    }
  }, [paramsData]);
  React.useEffect(() => {
    if (paramsItems) {
      setParamsJsx(getJsxParams(paramsItems));
    }
  }, [paramsItems, division, isRussia]);
  React.useEffect(() => {
    if (getEdition) {
      editionMap.set(getEdition.key, {
        setValue: getEdition.setValue,
        setInputValue: getEdition.setInputValue,
        value: getEdition.value,
        inputValue: getEdition.inputValue
      });
    }
  }, [getEdition]);
  React.useLayoutEffect(() => {
    if (paramsJsx) {
      paramsBox2.current.querySelectorAll("#expandButtonParams").forEach((el) => {
        if ((Number(el.dataset.collapsed) & ParamSetOption.Collapsed) !== ParamSetOption.Collapsed) {
          el.closest("TR").dataset.collapsed = "1";
          expandRec({ target: el });
        }
      });
    }
  }, [paramsJsx]);
  function updateParams(data) {
    setEditionMap(/* @__PURE__ */ new Map());
    setAddressCaption(data.Caption);
    setParamData(data);
  }
  function getExpandButton(items, item, index2) {
    const level = item.Level ? item.Level : 0;
    if (items.length - 1 > index2 && level < items[index2 + 1].Level) {
      let collapsed = item.Options;
      if (division === "0" & item.FieldName === "Settlement") {
        item.Options ? collapsed += ParamSetOption.Collapsed : collapsed = ParamSetOption.Collapsed;
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          id: "expandButtonParams",
          "data-collapsed": collapsed,
          name: "expandButton",
          onClick: (ev) => {
            console.log("ok");
            expandRec(ev);
          },
          className: clsx$3(
            sectionsStyles.paramsExpandButton,
            Number(collapsed) & ParamSetOption.Collapsed && sectionsStyles.paramsExpandButtonRotate
          ),
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { style: { height: "15px", width: "15px" } })
        }
      );
    }
  }
  function expandRec(ev) {
    let button = ev.target.closest("BUTTON");
    let record = ev.target.closest("TR");
    const tdName = record.querySelector(".td-name");
    let level = record.dataset.level;
    let nextRec = record.nextElementSibling;
    const condition = record.dataset.collapsed === "1";
    while (nextRec && nextRec.dataset.level > level) {
      const nextButton = nextRec.querySelector("button[name=expandButton]");
      if (nextButton && nextRec.dataset.collapsed === "0") {
        nextRec.dataset.collapsed = "1";
        nextButton.classList.add(clsx$3.sectionsStyles.paramsExpandButtonRotate);
      }
      if (condition) {
        nextRec.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
        const td = nextRec.querySelector(".td-name");
        if (td && tdName) td.style.width = tdName.style.width;
      } else {
        nextRec.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      }
      if (nextRec.dataset.level !== `${Number(level) + 1}` || Number(nextRec.dataset.options) & ParamSetOption.Disabled) {
        nextRec.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      }
      nextRec = nextRec.nextElementSibling;
    }
    if (condition) button.classList.remove(clsx$3(sectionsStyles.paramsExpandButtonRotate));
    else button.classList.add(clsx$3(sectionsStyles.paramsExpandButtonRotate));
    record.dataset.collapsed = condition ? "0" : "1";
  }
  async function kladrEdit(json) {
    const keys = Object.keys(json);
    let res;
    for (const objectKey of keys) {
      if (json[objectKey] !== null && (typeof json[objectKey] !== "object" || isEmptyObject(json[objectKey]))) {
        continue;
      }
      switch (objectKey) {
        case "Classificator":
          res = await SetParamRequest({
            IsShort: "0",
            IsCode: "0",
            fieldname: objectKey,
            value: json[objectKey].Классификатор,
            current: paramsData.ID,
            clear: "1"
          });
          settingValues(res, { fieldname: objectKey });
          break;
        case "GUID":
          if (!json.Identifier) {
            res = await SetParamRequest({
              IsShort: "0",
              IsCode: "0",
              fieldname: "Identifier",
              value: json[objectKey].Идентификатор,
              current: paramsData.ID,
              clear: "1"
            });
          }
          settingValues(res, { fieldname: objectKey });
          break;
        case "Identifier":
          res = await SetParamRequest({
            IsShort: "0",
            IsCode: "0",
            fieldname: objectKey,
            value: json[objectKey]["ФИАС (ГАР)"],
            current: paramsData.ID,
            clear: "1"
          });
          settingValues(res, { fieldname: objectKey });
          changeDivision(division, false);
          break;
        case "PostIndex":
          res = await SetParamRequest({
            IsShort: "0",
            IsCode: "0",
            fieldname: objectKey,
            value: json[objectKey]["Почтовый индекс"],
            current: paramsData.ID,
            clear: "1"
          });
          settingValues(res, { fieldname: objectKey });
          break;
        case "OKTD":
          if (json[objectKey]["ОКАТО"]) {
            res = await SetParamRequest({
              IsShort: "0",
              IsCode: "0",
              fieldname: objectKey,
              value: json[objectKey]["ОКАТО"],
              current: paramsData.ID,
              clear: "1"
            });
          }
          settingValues(res, { fieldname: objectKey });
          break;
        default:
          for (const [key, value] of Object.entries(json[objectKey])) {
            switch (key) {
              case "Сокращение":
                if (objectKey === "House") {
                  res = await setFieldsNames({
                    fieldname: objectKey,
                    value,
                    current: paramsData.ID
                  });
                  break;
                }
                res = await SetParamRequest({
                  IsShort: "1",
                  IsCode: "0",
                  fieldname: objectKey,
                  value,
                  current: paramsData.ID,
                  clear: "1"
                });
                settingValues(res, { fieldname: objectKey, IsShort: true });
                break;
              case "Код":
                res = await SetParamRequest({
                  IsShort: "0",
                  IsCode: "1",
                  fieldname: objectKey,
                  value,
                  current: paramsData.ID,
                  clear: "1"
                });
                settingValues(res, { fieldname: objectKey, IsCode: true });
                break;
              default:
                res = await SetParamRequest({
                  IsShort: "0",
                  IsCode: "0",
                  fieldname: objectKey,
                  value,
                  current: paramsData.ID,
                  clear: "1"
                });
                if (objectKey === "House") {
                  setTextValues(res);
                  break;
                }
                settingValues(res, { fieldname: objectKey });
                break;
            }
          }
          break;
      }
    }
  }
  function setTextValues(res) {
    let rec, textValueDiv, edition;
    rec = paramsBox2.current.querySelector("#param_House");
    textValueDiv = rec.querySelector('[textvalue="true"]');
    edition = editionMap.get(rec.dataset.key);
    rec.dataset.value = res.Value !== void 0 ? res.Value : "";
    textValueDiv.innerText = res.Value !== void 0 ? res.Value : "";
    if (edition) {
      edition.setValue({
        label: res.Value !== void 0 ? res.Value : ""
      });
      edition.setInputValue(res.Value !== void 0 ? res.Value : "");
    }
    if (!res.content) return;
    res.content.split(",").forEach((item) => {
      if (item.match(/[A-z]+=[0-9]*/)) {
        const value = item.split("=")[1];
        rec = rec.nextElementSibling;
        textValueDiv = rec.querySelector('[textvalue="true"]');
        edition = editionMap.get(rec.dataset.key);
        rec.dataset.value = value !== void 0 ? value : "";
        textValueDiv.innerText = value !== void 0 ? value : "";
        if (edition) {
          edition.setValue({
            label: value !== void 0 ? value : ""
          });
          edition.setInputValue(value !== void 0 ? value : "");
        }
      } else {
        clearValue(item);
      }
    });
  }
  async function setFieldsNames(data) {
    let res = await SetParamRequest({
      IsShort: "0",
      IsCode: "0",
      ...data,
      tag: "0",
      type: "1",
      clear: "1"
    });
    let rec, fieldValueDiv;
    rec = paramsBox2.current.querySelector("#param_House");
    rec.dataset.name = res.Value ? res.Value : "";
    fieldValueDiv = rec.querySelector('[fieldvalue="true"]');
    fieldValueDiv.innerText = res.Value !== void 0 ? res.Value : "";
    if (res.content) {
      res.content.split(",").forEach((item) => {
        const value = item.split("=")[1];
        rec = rec.nextElementSibling;
        rec.dataset.name = value !== void 0 ? value : "";
        fieldValueDiv = rec.querySelector('[fieldvalue="true"]');
        fieldValueDiv.innerText = value !== void 0 ? value : "";
      });
    }
    return res;
  }
  async function SetParamRequest(data) {
    let params2 = {
      Name: data.fieldname,
      ID: data.tag || "-1",
      GroupID: paramsData.GroupID,
      Current: paramsData.ID || "0",
      clear: data.clear || kladrLevelByFieldname(data.fieldname) > 0 ? "0" : void 0,
      dv: data.fieldname !== "dv" ? division : void 0,
      IsShort: data.IsShort,
      IsCode: data.IsCode,
      Type: data.type,
      Value: data.CheckState !== void 0 ? data.CheckState ? "1" : "0" : data.value
    };
    let config2 = {
      prefix: Prefixes.address,
      method: "GET",
      url: "SetParamProperty",
      params: params2
    };
    const json = await smetaAxios(config2);
    if (!paramsData.ID && json.Current) {
      params2 = {
        Type: paramsData.Type || "0",
        ID: json.Current,
        GroupID: paramsData.GroupID
      };
      config2 = {
        prefix: props.Module,
        method: "GET",
        url: "SetAddress",
        params: params2
      };
      await smetaAxios(config2);
      setParamData({ ...paramsData, ID: json.Current });
    }
    return json;
  }
  async function onEditList(data) {
    const params2 = {
      ObjRef: data.current,
      Key: data.tag,
      dv: division,
      Field: data.fieldname
    };
    const config2 = {
      prefix: Prefixes.kladr,
      method: "GET",
      url: "AssignAddress",
      params: params2
    };
    const json = await smetaAxios(config2);
    setParamData(getParamsObject(json, paramsData.GroupID, paramsData.address, paramsData.parentModule));
    if (json) {
      setAddressCaption(json.Caption);
    }
  }
  async function onEdit(data) {
    if (data.kladr) {
      await kladrEdit(data.json);
      return;
    }
    const json = await SetParamRequest(data);
    settingValues(json, data);
  }
  function settingValues(res, data) {
    if (res) {
      if (res.Token) {
        tokenProcessingTest(res, {
          func: (val) => {
            settingValues(val, data);
          }
        });
        return;
      }
      if (res.Caption) {
        setAddressCaption(res.Caption);
      }
      if (res.content) {
        res.content.split(",").forEach((item) => {
          if (item.match(/[A-z]+=[0-9]*/)) {
            return;
          }
          clearValue(item);
        });
      }
      let rec = paramsBox2.current.querySelector(`#param_${data.fieldname}`);
      if (data.IsShort) {
        rec = rec.nextElementSibling;
        if (rec.dataset.fieldname !== "ShortName") return;
      }
      if (data.IsCode) {
        rec = rec.nextElementSibling;
        if (rec.dataset.fieldname !== "Code") rec = rec.nextElementSibling;
        if (rec.dataset.fieldname !== "Code") return;
      }
      if (!rec) return;
      const textValueDiv = rec.querySelector('[textvalue="true"]');
      const index2 = rec.dataset.arrayindex;
      const paramitem = paramsData.Items[index2];
      if (data.CheckState !== void 0) {
        paramitem.CheckState = res.Value;
      } else {
        paramitem.Value = res.Value ? res.Value : "";
        paramitem.ObjRef = res.ID ? res.ID : "0";
      }
      setParamData({ ...paramsData });
      if (data.CheckState !== void 0) {
        if (data.setStateCheckBox) data.setStateCheckBox(Number(res.Value) & 1);
        rec.dataset.checkstate = res.Value;
        textValueDiv.innerText = "";
      } else {
        rec.dataset.value = res.Value ? res.Value : "";
        rec.dataset.objref = res.ID ? res.ID : "0";
        textValueDiv.innerText = res.Value ? res.Value : "";
        if (editor.current) {
          const edition = editionMap.get(rec.dataset.key);
          if (edition) {
            edition.setValue({
              label: res.Value ? res.Value : "",
              id: res.ID ? res.ID : "0"
            });
            edition.setInputValue(res.Value ? res.Value : "");
          }
        }
      }
      if (rec.dataset.fieldname === "Country") {
        setIsRussia(rec.dataset.value === "" || rec.dataset.value.toLowerCase().substring(0, 5) === "росси");
      }
    }
  }
  function clearValue(name, rec = paramsBox2.current.querySelector(`#param_${name}`)) {
    if (!rec) return;
    let short, code;
    short = rec.nextElementSibling;
    if (short && (short.dataset.fieldname === "ShortName" || short.dataset.fieldname === "Code")) {
      clearValue("", short);
    }
    if (short) {
      code = short.nextElementSibling;
      if (code && code.dataset.fieldname === "Code") {
        clearValue("", code);
      }
    }
    const textValueDiv = rec.querySelector('[textvalue="true"]');
    const edition = editionMap.get(rec.dataset.key);
    rec.dataset.value = "";
    rec.dataset.objref = "0";
    textValueDiv.innerText = "";
    if (edition) {
      edition.setValue({
        label: "",
        id: "0"
      });
      edition.setInputValue("");
    }
  }
  function onEditButtonClick(data) {
    if (!(data.datatype === "5005") && !(paramsData.Type === "2") && useKladr && isRussia) {
      const json = AddressEditKladrObj(
        data.subData.props.Current ? data.subData.props.Current : "0",
        data.subData.props.ObjType,
        data.subData.props.FieldName
      );
      tokenProcessingTest(json, data.subData);
      return;
    }
    if (data.json) tokenProcessingTest(data.json, data.subData);
  }
  async function onDropDownList(data, checklist) {
    const params2 = {
      Name: data.record.id.split("_")[1],
      IsShort: "0",
      ID: data.current
    };
    const config2 = {
      prefix: Prefixes.address,
      method: "GET",
      url: "GetParamValues",
      params: params2
    };
    const json = await smetaAxios(config2);
    if (json && json.Items) {
      return json.Items.map((item, index2) => {
        if (typeof item !== "object") {
          if (checklist) return { label: item, id: `${Math.pow(2, index2)}` };
          return { label: item, id: `${index2}` };
        }
        return { label: item.text, id: item.id };
      });
    }
  }
  function renderEditor(ev) {
    const record = ev.target.closest("TR");
    if (!record.querySelector('div[editor="true"]').classList.contains(clsx$3(sectionsStyles.hiddenBlock))) return;
    record.style.backgroundColor = "whitesmoke";
    const editorDiv = record.querySelector('[editor="true"]');
    const textValueDiv = record.querySelector('[textvalue="true"]');
    if (editor.current && editor.current !== editorDiv) {
      deleteEditor(editor.current);
    }
    const editRoot = editorDiv.root || clientExports.createRoot(editorDiv);
    editorDiv.root = editRoot;
    editorDiv.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
    textValueDiv.classList.add(clsx$3(sectionsStyles.hiddenBlock));
    editRoot.render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Editor,
        {
          placeholder: " ",
          groupid: record.dataset.groupid,
          current: record.dataset.current,
          fieldname: record.dataset.fieldname,
          rusname: record.dataset.rusname,
          type: record.dataset.module,
          record,
          objref: record.dataset.objref,
          value: record.dataset.value,
          datatype: record.dataset.datatype,
          editStyle: record.dataset.editstyle,
          checkstate: record.dataset.checkstate,
          onEdit,
          onEditList,
          onEditButtonClick,
          onDropDownList,
          getEdition: setGetEdition,
          editParam: record.dataset.onedit,
          disabled: false
        }
      )
    );
    editor.current = editorDiv;
    const input = editorDiv.querySelector("input[type=text]");
    if (input) {
      input.focus();
      if (record.dataset.editstyle & 64) return;
      input.select();
    }
  }
  function deleteEditor(editor2) {
    if (!(editor2 == null ? void 0 : editor2.classList)) return;
    if (!editor2.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
      const record = editor2.closest("TR");
      record.style.backgroundColor = "";
      const textValueDiv = record.querySelector('[textvalue="true"]');
      editor2.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      textValueDiv.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
    }
  }
  function onKeyArrow(ev) {
    let record;
    switch (ev.key) {
      case "ArrowDown":
        record = ev.target.closest("TR").nextElementSibling;
        if (record) {
          if (record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
            while (record !== null) {
              record = record.nextElementSibling;
              if (record && !record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
                renderEditor({ target: record });
                break;
              }
            }
          } else {
            renderEditor({ target: record });
          }
        }
        break;
      case "ArrowUp":
        record = ev.target.closest("TR").previousElementSibling;
        if (record) {
          if (record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
            while (record !== null) {
              record = record.previousElementSibling;
              if (record && !record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
                renderEditor({ target: record });
                break;
              }
            }
          } else {
            renderEditor({ target: record });
          }
        }
        break;
    }
  }
  function getButtonColWidth(houseType) {
    let res = 0;
    if (houseType) {
      res += 20;
    }
    return res;
  }
  function getJsxParams(items) {
    const returnArr = items.map((item, index2) => {
      let editStyle = item.EditStyle;
      if (item.EditStyle & 4) {
        editStyle -= 4;
      }
      if (item.HouseType && (!useKladr || !isRussia || paramsData.Type === "2")) {
        editStyle = 0;
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
        "tr",
        {
          id: `param_${item.FieldName}`,
          "data-key": `param-key_${item.FieldName}-${item.ID}`,
          "data-fieldname": item.FieldName,
          "data-level": item.Level ? item.Level : 0,
          "data-collapsed": (Number(item.Options) & ParamSetOption.Collapsed) === ParamSetOption.Collapsed || division === "0" & item.FieldName === "Settlement" ? "1" : "0",
          "data-module": item.Module,
          "data-name": item.Name,
          "data-value": item.Value,
          "data-objref": item.ObjRef,
          "data-datatype": item.DataType,
          "data-groupid": paramsData.GroupID,
          "data-current": item.Current,
          "data-checkstate": item.CheckState,
          "data-editstyle": editStyle,
          "data-conditions": item.Conditions,
          "data-nokldr": item.NoKldr,
          "data-arrayindex": item.ID,
          onMouseEnter: (ev) => {
            if (mouseDown) {
              if (mouseDown.current) renderEditor(ev);
            }
          },
          onClick: (ev) => {
            renderEditor(ev);
          },
          onKeyDown: (ev) => {
            onKeyArrow(ev);
          },
          className: clsx$3(
            sectionsStyles.paramsRecord,
            (item.Level && item.Level !== "0" || Number(item.Options) & ParamSetOption.Disabled || Number(item.Options) & ParamSetOption.Hidden || division === "0" & item.FieldName === "Settlement" || props.Module === "persons" & item.FieldName === "Options") && sectionsStyles.hiddenBlock
          ),
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(
              "td",
              {
                id: `name_${item.FieldName}`,
                title: item.Name,
                className: clsx$3(sectionsStyles.paramsName, "td-name"),
                style: {
                  paddingLeft: getPadding$1(items, item, index2),
                  width: `${width2}%`
                },
                children: [
                  getExpandButton(items, item, index2),
                  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: clsx$3(sectionsStyles.flexContaner), fieldvalue: "true", children: item.Name }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    "div",
                    {
                      className: clsx$3(sectionsStyles.paramsConditions),
                      style: {
                        width: getButtonColWidth(item.HouseType)
                      },
                      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                        IconButton,
                        {
                          id: "adress-type",
                          "aria-controls": openList ? "basic-menu" : void 0,
                          "aria-haspopup": "true",
                          "aria-expanded": openList ? "true" : void 0,
                          onClick: (ev) => {
                            getList(item);
                            handleClickList(ev);
                          },
                          className: clsx$3(sectionsStyles.paramsHistoryButton, !item.HouseType && sectionsStyles.hiddenBlock),
                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowDropDownCircleOutlinedIcon, { fontSize: "small" })
                        }
                      )
                    }
                  )
                ]
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx("td", { onMouseDown: onMouseDown$1, className: clsx$3(sectionsStyles.paramsSplitter), id: "splitter-ID", children: /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}) }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { id: `value_${item.FieldName}`, className: sectionsStyles.paramsValueConteiner, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(
                    sectionsStyles.paramsCheckContainer,
                    (item.EditStyle & 4) === 0 && sectionsStyles.hiddenBlock
                  ),
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { onEdit, CheckState: item.CheckState & 1 })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.paramsValue), textvalue: "true", children: item.Value }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(sectionsStyles.paramsEditorContainer, sectionsStyles.hiddenBlock),
                  editor: "true"
                }
              )
            ] })
          ]
        },
        `param-key_${item.FieldName}-${item.ID}`
      );
    });
    return returnArr;
  }
  async function getList(item) {
    const json = await getAddressConditionValue(item.FieldName, paramsData.ID);
    const result = [];
    if (json && json.Items) {
      json.Items.forEach((value, index2) => {
        result.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            MenuItem,
            {
              onClick: () => {
                onClickMenuItem(index2, item.FieldName, value);
              },
              disabled: props.useKladr && !item.NoKldr && isRussia && !(paramsData.Type === "2"),
              sx: { height: "27px", borderBottom: "1px solid #cccccc" },
              value: index2,
              children: value
            },
            `menu_item_${index2}`
          )
        );
      });
      if (result.length) {
        setList(result);
      }
    }
  }
  async function onClickMenuItem(tag, name, value) {
    const rec = paramsBox2.current.querySelector(`#param_${name}`);
    const fieldname = rec.querySelector('[fieldvalue="true"]');
    const json = await SetParamRequest({
      type: "1",
      tag,
      fieldname: name
    });
    if (json.Caption) setAddressCaption(json.Caption);
    rec.dataset.name = value !== void 0 ? value : "";
    fieldname.innerText = value !== void 0 ? value : "";
    handleCloseList();
  }
  function kladrLevelByFieldname(fieldname) {
    switch (fieldname) {
      case "Country":
        return KLADRLevel.Country;
      case "Region":
        return KLADRLevel.Region;
      case "District":
        return KLADRLevel.District;
      case "Community":
        return KLADRLevel.Village;
      case "City":
        return KLADRLevel.City;
      case "Street":
        return KLADRLevel.Street;
      case "House":
      case "BulkNo":
      case "BuildNo":
        return KLADRLevel.House;
      case "PlanStruct":
        return KLADRLevel.PlanStruct;
      case "Settlement":
        return KLADRLevel.Settlement;
      default:
        return 0;
    }
  }
  async function ContextMenuHandler(data) {
    const comand = data.value;
    switch (comand) {
      case "ClearValues":
        let record = data.rec;
        if (isRussia && useKladr && !(paramsData.Type === "2")) {
          while (record.dataset.fieldname === "ShortName" || record.dataset.fieldname === "Code") {
            record = record.previousSibling;
          }
        }
        clearValue("", record);
        const json = await SetParamRequest({
          fieldname: record.dataset.fieldname,
          current: record.dataset.current,
          tag: "-1"
        });
        const identifier2 = paramsBox2.current.querySelector("#param_Identifier").dataset.value;
        if (identifier2 && isRussia && useKladr && !(paramsData.Type === "2")) {
          const params2 = {
            ObjRef: paramsData.ID,
            Code: identifier2,
            dv: division,
            Level: kladrLevelByFieldname(record.dataset.fieldname)
          };
          const config2 = {
            prefix: Prefixes.kladr,
            method: "GET",
            url: "ClearLevel",
            params: params2
          };
          const response = await smetaAxios(config2);
          if (!isEmptyObject(response)) {
            setParamData(getParamsObject(response, paramsData.GroupID, response.Caption, paramsData.parentModule));
            return;
          }
        }
        if (json.content) {
          json.content.split(",").forEach((item) => {
            if (item.match(/[A-z]+=[0-9]*/)) {
              return;
            }
            clearValue(item);
          });
        }
        setAddressCaption(json.Caption);
        break;
    }
  }
  async function changeDivision(dv, setDv = true) {
    const identifier2 = paramsBox2.current.querySelector("#param_Identifier").dataset.value;
    if (identifier2 && useKladr && !(paramsData.Type === "2")) {
      if (paramsBox2.current.querySelector("#param_District").dataset.value && !paramsBox2.current.querySelector("#param_City").dataset.value && !paramsBox2.current.querySelector("#param_Community").dataset.value) {
        renderMessageBox({
          dlgType: 1,
          buttons: 1,
          message: 'Для изменения типа деления необходимо установить значение в поле "Город" или "Населенный пункт"!'
        });
        return;
      }
      const params2 = {
        ObjRef: paramsData.ID,
        Code: identifier2,
        dv,
        ClearOnlyKladr: "1"
      };
      const config2 = {
        prefix: Prefixes.kladr,
        method: "GET",
        url: "ChangeDivision",
        params: params2
      };
      const response = await smetaAxios(config2);
      if (!isEmptyObject(response)) {
        setParamData(getParamsObject(response, paramsData.GroupID, response.Caption, paramsData.parentModule));
      }
    }
    if (setDv) {
      const record = paramsBox2.current.querySelector("#param_Settlement");
      const nextRec = record.nextElementSibling;
      const condition = record.dataset.collapsed === "1";
      await onEdit({
        fieldname: "dv",
        value: dv,
        clear: "0"
      });
      setDivision(dv);
      if (dv === "0") {
        record.classList.add(clsx$3(sectionsStyles.hiddenBlock));
        if (!condition) nextRec.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      } else {
        record.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
        if (!condition) nextRec.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
      }
    }
  }
  return (
    // при клике вне контейнера параметров редактор скроется
    /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenu, { for: "addressParams", Menu: getDefaultMenu("addressParams"), onMenuItemClick: ContextMenuHandler, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      ClickAwayListener,
      {
        onClickAway: (ev) => {
          mouseDown.current = false;
          resize$1 = {};
          if (ev.target.closest("[checklist]") || ev.target.closest("[calendar]") || ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") !== paramsBox2.current.closest(".background_ModalDialog") || ev.target.closest("LI") || ev.target.classList.contains("MuiBackdrop-root")) {
            return;
          }
          if (editor.current) {
            editor.current.closest("TR").style.backgroundColor = "";
            deleteEditor(editor.current);
          }
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Box$2,
          {
            id: "paramsBox",
            ref: paramsBox2,
            onMouseDown: (ev) => {
              mouseDown.current = true;
            },
            onMouseUp: () => {
              mouseDown.current = false;
            },
            className: clsx$3(sectionsStyles.paramsBox),
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Scrollbars, { autoHide: true, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Box$2,
                {
                  style: {
                    // overflowY: "auto",
                    height: "76px",
                    width: "100%",
                    paddingTop: "1px",
                    position: "sticky",
                    top: "0px",
                    backgroundColor: "#ffffff",
                    zIndex: "1"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      Box$2,
                      {
                        style: {
                          paddingLeft: "1px",
                          display: "flex",
                          alignItems: "center"
                        },
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "1rem" }, children: "Деление:" }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            FormControl,
                            {
                              style: {
                                marginLeft: "10px"
                              },
                              children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                                RadioGroup,
                                {
                                  row: true,
                                  sx: { height: "38px", overflow: "auto" },
                                  value: division,
                                  onChange: (ev) => changeDivision(ev.target.value),
                                  children: [
                                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                                      FormControlLabel,
                                      {
                                        value: "0",
                                        control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }),
                                        label: "Административно-территориальное"
                                      }
                                    ),
                                    /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: "1", control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Муниципальное" })
                                  ]
                                }
                              )
                            }
                          )
                        ]
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$2, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      EditorAdress,
                      {
                        height: getHeight$1(props.Module),
                        setData: updateParams,
                        paramsData,
                        defaultPopper: true,
                        text: addressCaption,
                        ObjRef: paramsData ? paramsData.ID : void 0,
                        GroupID: paramsData ? paramsData.GroupID : void 0,
                        Module: paramsData ? paramsData.parentModule : void 0,
                        onEdit,
                        confirmation: createConfirmation,
                        confirmationText: "Установить выбранный Адрес?",
                        disabled: !props.useKladr || !isRussia || paramsData.Type === "2",
                        style: {
                          backgroundColor: "#ffffff",
                          border: "2px solid #999999",
                          height: "34px",
                          width: "calc(100% - 1px)",
                          textTransform: "none"
                        },
                        division
                      }
                    ) })
                  ]
                }
              ),
              paramsJsx ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
                "div",
                {
                  onMouseMove: onMouseMove$1,
                  onMouseUp: (ev) => onMouseUp$1(ev, setWidth),
                  className: clsx$3(sectionsStyles.paramsTable),
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: paramsJsx }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Menu,
                      {
                        id: "adress-type",
                        anchorEl: anchorElList,
                        open: openList,
                        onClose: handleCloseList,
                        MenuListProps: {
                          "aria-labelledby": "adress-type"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                          Grid$1,
                          {
                            container: true,
                            direction: "row",
                            justifyContent: "flex-start",
                            alignItems: "flex-start",
                            style: {
                              backgroundColor: "#eeeeee",
                              borderTop: "1px solid #eeeeee"
                            },
                            children: [
                              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { width: "40px" } }),
                              /* @__PURE__ */ jsxRuntimeExports.jsx(
                                Grid$1,
                                {
                                  style: {
                                    minWidth: "200px",
                                    width: "fit-content",
                                    backgroundColor: "#ffffff"
                                  },
                                  children: list
                                }
                              )
                            ]
                          }
                        )
                      }
                    )
                  ]
                }
              ) : /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {})
            ] })
          }
        )
      }
    ) })
  );
}
function AcoountsTableForTabs({ props }) {
  const [mainGrid, setMainGrid] = React.useState();
  const gridPanel = React.useRef();
  const accBox = React.useRef();
  React.useEffect(() => {
    GridLoader(gridPanel.current, props, {
      sub: true,
      GroupID: props.selectedRecordID,
      ObjType: props.detailItem.ObjType ? props.detailItem.ObjType : props.detailItem.Params.ObjType,
      setSelectedRecord: props.setAccSelectedRecordID
    }).then((res) => {
      setMainGrid(res);
    });
    props.subGridPanelRef.current = gridPanel.current;
  }, []);
  React.useEffect(() => {
    if (mainGrid) {
      accBox.current.refreshMainGrid = refreshMainGrid;
    }
  }, [mainGrid]);
  async function refreshMainGrid(data) {
    mainGrid.source.onHandleRequest = handleTableAccounts(props.Module, data.ObjType, data.GroupID, props.SectionID);
    await mainGrid.source.first();
    await mainGrid.source.refresh();
    await mainGrid.grid.setSource(mainGrid.source);
    props.setAccSelectedRecordID(mainGrid.source.getFieldTextSync("ID"));
    await mainGrid.grid.updateGridSize();
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: accBox, id: "accBox", style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      id: `rcgrid_panel`,
      ref: gridPanel,
      style: {
        height: "100%",
        width: "100%",
        position: "relative"
      }
    }
  ) });
}
function AddressForTabs({ props }) {
  const [data, setData] = React.useState();
  React.useEffect(() => {
    if (props.onRequest) {
      props.onRequest(props).then((res) => {
        setData(getParamsObject(res, props.selectedRecordID, res.Caption, props.Module));
      });
    } else {
      setData(getParamsObject(props.data, props.selectedRecordID, props.data.Caption, props.Module));
    }
  }, []);
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%" }, children: data ? /* @__PURE__ */ jsxRuntimeExports.jsx(AddressParams, { Module: props.Module, data, Token: "HandleAddress", useKladr: props.kladr }) : /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) });
}
function ClsBookTableForTabs({ props }) {
  const [mainGrid, setMainGrid] = React.useState();
  const gridPanel = React.useRef();
  const clsBookBox = React.useRef();
  React.useEffect(() => {
    PostHandleTable$2("clsbook", props.detailItem.DocCfgID, void 0, props.SectionID).then((res) => {
      return GridLoader(
        gridPanel.current,
        { ...props, ObjType: props.detailItem.DocCfgID },
        {
          json: res,
          GroupID: props.selectedRecordID,
          ObjType: props.detailItem.DocCfgID
        }
      );
    }).then((res) => {
      setMainGrid(res);
    });
  }, []);
  React.useEffect(() => {
    if (mainGrid) {
      clsBookBox.current.refreshMainGrid = refreshMainGrid;
    }
  }, [mainGrid]);
  async function refreshMainGrid(data) {
    const json = await PostHandleTable$2("clsbook", props.detailItem.DocCfgID, void 0, props.SectionID);
    clsBookGrid(
      mainGrid.grid,
      mainGrid.source,
      { ...props, ObjType: props.detailItem.DocCfgID },
      {
        json,
        GroupID: props.selectedRecordID,
        ObjType: props.detailItem.DocCfgID
      }
    );
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: clsBookBox, id: "clsBookBox", style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      id: `rcgrid_panel`,
      ref: gridPanel,
      style: {
        height: "100%",
        width: "100%",
        position: "relative"
      }
    }
  ) });
}
var PrintRounded = {};
var hasRequiredPrintRounded;
function requirePrintRounded() {
  if (hasRequiredPrintRounded) return PrintRounded;
  hasRequiredPrintRounded = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(PrintRounded, "__esModule", {
    value: true
  });
  PrintRounded.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  PrintRounded.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 8H5c-1.66 0-3 1.34-3 3v4c0 1.1.9 2 2 2h2v2c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2v-2h2c1.1 0 2-.9 2-2v-4c0-1.66-1.34-3-3-3m-4 11H9c-.55 0-1-.45-1-1v-4h8v4c0 .55-.45 1-1 1m4-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1m-2-9H7c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1"
  }), "PrintRounded");
  return PrintRounded;
}
var PrintRoundedExports = /* @__PURE__ */ requirePrintRounded();
const PrintRoundedIcon = /* @__PURE__ */ getDefaultExportFromCjs(PrintRoundedExports);
var SaveOutlined = {};
var hasRequiredSaveOutlined;
function requireSaveOutlined() {
  if (hasRequiredSaveOutlined) return SaveOutlined;
  hasRequiredSaveOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(SaveOutlined, "__esModule", {
    value: true
  });
  SaveOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  SaveOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm2 16H5V5h11.17L19 7.83zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3M6 6h9v4H6z"
  }), "SaveOutlined");
  return SaveOutlined;
}
var SaveOutlinedExports = /* @__PURE__ */ requireSaveOutlined();
const SaveOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(SaveOutlinedExports);
function SaveAsButton(props) {
  const [anchorElButton, setAnchorElButton] = React.useState(null);
  async function getRequestByID(id) {
    if (!props.ViewIdent) return;
    const viewIdent = props.ViewIdent.split(".");
    switch (id) {
      case 1:
        await CellDocToExcel({
          ViewIdent: viewIdent.length > 1 ? viewIdent[1] : viewIdent[0],
          Table: "0",
          mimeType: "application/vnd.ms-excel",
          Format: ".xls"
        });
        break;
      case 2:
        await CellDocToExcel({
          ViewIdent: viewIdent.length > 1 ? viewIdent[1] : viewIdent[0],
          Version: "pdf",
          mimeType: "application/pdf",
          Format: ".pdf"
        });
        break;
      case 3:
        await CellDocToExcel({
          ViewIdent: viewIdent.length > 1 ? viewIdent[1] : viewIdent[0],
          Version: "2007",
          Table: "0",
          mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
          Format: ".xlsx"
        });
        break;
      case 4:
        await CellDocToExcel({
          ViewIdent: viewIdent.length > 1 ? viewIdent[1] : viewIdent[0],
          Table: "0",
          mimeType: "application/vnd.ms-excel",
          Format: ".xls"
        });
        break;
      case 5:
        await CellDocToExcel({
          ViewIdent: viewIdent.length > 1 ? viewIdent[1] : viewIdent[0],
          Version: "2007",
          Table: "0",
          mimeType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
          Format: ".xlsx"
        });
        break;
    }
  }
  async function CellDocToExcel(data) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.reportModule || "cellobj").set("comand", "CellDocToExcel").set("ViewIdent", data.ViewIdent).set("Version", data.Version).set("Table", data.Table).set("WSM", "1");
    const json = await AxiosRequest(true, params2);
    tokenProcessingTest(json, {
      func: (res) => {
        if (res.Result === "1") {
          downloadReport2({ ...res, ...data });
        }
      },
      from: "saveReport"
    });
  }
  function downloadReport2(data) {
    let a2 = document.createElement("a");
    a2.href = "data:" + data.mimeType + ";base64," + data.RCDATA;
    a2.download = `${data.Title}${data.Format}`;
    a2.click();
  }
  function onClickMenuItem(index2) {
    getRequestByID(index2);
    setAnchorElButton(null);
  }
  function getMenuList() {
    const result = [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuItem,
        {
          onClick: () => {
            onClickMenuItem(1);
          },
          children: `Сохранить как Файл в формате MS Excel(.xls)`
        },
        "save_1"
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuItem,
        {
          onClick: () => {
            onClickMenuItem(2);
          },
          children: `Сохранить как Файл в формате PDF(.pdf)`
        },
        "save_2"
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuItem,
        {
          onClick: () => {
            onClickMenuItem(3);
          },
          children: `Сохранить как Файл в формате MS Excel 2007(.xlsx)`
        },
        "save_3"
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuItem,
        {
          onClick: () => {
            onClickMenuItem(4);
          },
          children: `Сохранить как Табличная часть в формате Excel(.xls)`
        },
        "save_4"
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuItem,
        {
          onClick: () => {
            onClickMenuItem(5);
          },
          children: `Сохранить как Табличная часть в формате Excel 2007(.xlsx)`
        },
        "save_5"
      )
    ];
    return result;
  }
  function handleCloseAnchorEl() {
    setAnchorElButton(null);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { width: "35px", ...props.style }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Сохранить как", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        disabled: !props.ViewIdent,
        onClick: (ev) => {
          setAnchorElButton(ev.target);
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(SaveOutlinedIcon, {})
      }
    ) }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Menu, { anchorEl: anchorElButton, open: Boolean(anchorElButton), onClose: handleCloseAnchorEl, children: getMenuList() })
  ] });
}
const pinned = "" + new URL("pinned-DqB04NPa.png", import.meta.url).href;
const unpinned = "" + new URL("unpinned-Cvp1iEXu.png", import.meta.url).href;
const SmetaIcon = ({
  src,
  alt,
  className,
  style: style2
}) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src, alt, className, style: { ...style2 } });
};
const PinnedIcon = () => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaIcon, { src: pinned, alt: "pinned", className: "pinned-icon", style: { height: "20px" } });
};
const UnPinnedIcon = () => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaIcon, { src: unpinned, alt: "unpinned", className: "unpinned-icon", style: { height: "20px" } });
};
const SmetaTabItem = ({ children, style: style2 }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      style: {
        width: "100%",
        height: "100%",
        padding: "0px",
        display: "inline-block",
        boxSizing: "border-box",
        ...style2
      },
      children
    }
  );
};
var Close$1 = {};
var hasRequiredClose;
function requireClose() {
  if (hasRequiredClose) return Close$1;
  hasRequiredClose = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Close$1, "__esModule", {
    value: true
  });
  Close$1.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Close$1.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
  }), "Close");
  return Close$1;
}
var CloseExports = /* @__PURE__ */ requireClose();
const CloseIcon = /* @__PURE__ */ getDefaultExportFromCjs(CloseExports);
const SmetaTabs = ({
  children,
  position: position2 = "top",
  onTabPin,
  onTabClose,
  onTabIndexChange,
  onTabReClick,
  tabIndex,
  id,
  style: style2,
  additionalСontextMenuData,
  additionalOnMenuItemClick
}) => {
  const [activeTab, setActiveTab] = reactExports.useState(0);
  const [visitedTabs, setVisitedTabs] = reactExports.useState(/* @__PURE__ */ new Set([0]));
  const tabsRef = reactExports.useRef();
  const tabRefs = reactExports.useRef([]);
  const reactChildren = React.Children.toArray(children).filter((el) => !el.props.hidden);
  const updateActiveTab = (index2) => {
    setActiveTab(index2);
    setVisitedTabs((prev2) => new Set(prev2).add(index2));
  };
  reactExports.useEffect(() => {
    if (tabIndex !== void 0) updateActiveTab(tabIndex || 0);
    if (tabsRef.current) tabsRef.current.getSelectedContent = () => tabRefs.current[tabIndex];
  }, [tabIndex]);
  const handleTabChange = async (index2, actualIndex, propsData) => {
    updateActiveTab(index2);
    if (tabRefs.current[index2]) {
      setTimeout(async () => await (onTabIndexChange == null ? void 0 : onTabIndexChange(index2, tabRefs.current[index2], propsData, actualIndex)), 0);
    }
  };
  const getNewTabIndexAfterClose = (index2) => {
    if (activeTab === index2) {
      return Math.max(0, activeTab - 1);
    }
    return activeTab;
  };
  const handleTabClose = async (index2, data) => {
    const newIndex = getNewTabIndexAfterClose(index2);
    const newTabData = reactChildren[newIndex].props.data;
    updateActiveTab(newIndex);
    if (onTabClose) {
      await onTabClose({ oldIndex: index2, newIndex }, { oldData: data, newData: newTabData });
    }
  };
  const renderTabs = () => {
    let actualIndex = -1;
    let contextMenuData = reactChildren.map((child, index2) => ({
      //формирование данных для контекстного меню
      Caption: child.props.label,
      value: "select",
      index: index2,
      Image: activeTab === index2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) : void 0
    }));
    if (additionalСontextMenuData) {
      contextMenuData.push({ Caption: "Divider" });
      contextMenuData = contextMenuData.concat(additionalСontextMenuData);
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      ContextMenu,
      {
        style: { height: `${position2 === "hidden" ? 0 : 30}px` },
        onMenuItemClick: (data) => {
          if (data.value === "select") {
            handleTabChange(data.index, actualIndex);
          } else additionalOnMenuItemClick == null ? void 0 : additionalOnMenuItemClick(data);
        },
        data: contextMenuData,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Tabs$1,
          {
            value: activeTab,
            onChange: (event, newValue) => {
              const childProps = reactChildren[newValue].props;
              handleTabChange(newValue, actualIndex, childProps.data);
            },
            "aria-label": "Smeta Tabs",
            variant: "scrollable",
            scrollButtons: "auto",
            TabIndicatorProps: { style: { backgroundColor: "#dcd8cc" } },
            sx: {
              minHeight: "30px",
              height: "30px",
              display: position2 === "hidden" ? "none" : "flex",
              "& .MuiTabs-scrollButtons": {
                backgroundColor: "#dcd8cc"
              },
              "& .MuiTab-root": {
                minHeight: "30px",
                height: "30px",
                padding: "4px 4px",
                alignItems: "center",
                textTransform: "none",
                "&:hover": {
                  backgroundColor: "#f5f5f5"
                },
                "&.Mui-selected": {
                  backgroundColor: "#e0e0e0",
                  fontWeight: "bold"
                }
              }
            },
            children: reactChildren.map((child, index2) => {
              const childProps = child.props;
              const canPin = childProps.pinned !== void 0;
              if (childProps.hidden) {
                return null;
              }
              actualIndex++;
              return /* @__PURE__ */ jsxRuntimeExports.jsx(
                Tab,
                {
                  title: childProps.title || childProps.label || "",
                  onClick: () => {
                    if (activeTab === index2 && onTabReClick) onTabReClick(index2, childProps.title || childProps.label);
                  },
                  label: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
                    canPin && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: () => onTabPin == null ? void 0 : onTabPin(!!childProps.pinned, index2, childProps.data), size: "small", children: childProps.pinned ? /* @__PURE__ */ jsxRuntimeExports.jsx(PinnedIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(UnPinnedIcon, {}) }),
                    childProps.label,
                    childProps.closable && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: () => handleTabClose(index2, childProps.data), size: "small", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIcon, { fontSize: "small" }) })
                  ] }),
                  iconPosition: "end"
                },
                index2
              );
            })
          }
        )
      }
    );
  };
  const renderContent = () => {
    return reactChildren.map((child, index2) => {
      const childElement = child;
      if (childElement.props.hidden) {
        return null;
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          className: "SmetaTab-" + (id || "") + (activeTab === index2 && "-selected"),
          ref: (el) => tabRefs.current[index2] = el,
          style: {
            display: activeTab === index2 ? "block" : "none",
            boxSizing: "border-box",
            height: "100%",
            padding: 0,
            position: "relative"
          },
          children: visitedTabs.has(index2) && child.props.children
        },
        index2
      );
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Box$1,
    {
      ref: tabsRef,
      "selected-index": tabIndex,
      id: id || "",
      style: { display: "flex", flexDirection: position2 === "top" ? "column" : "column-reverse", ...style2 },
      children: [
        renderTabs(),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%", flex: "1 1 auto", minHeight: 0 }, children: renderContent() })
      ]
    }
  );
};
const dialogReportContainer = "_dialogReportContainer_1frp8_1";
const sectionToolsContainer = "_sectionToolsContainer_1frp8_13";
const fullSizeContainer = "_fullSizeContainer_1frp8_25";
const dialogReportContent = "_dialogReportContent_1frp8_33";
const styles$3 = {
  dialogReportContainer,
  sectionToolsContainer,
  fullSizeContainer,
  dialogReportContent
};
function TabsForReports$1(props) {
  const contextMenuFunc = reactExports.useRef(null);
  const selectedViewIdentRef = reactExports.useRef("");
  const [tabsData, setTabsData] = reactExports.useState();
  const [tabIndex, setTabIndex] = reactExports.useState(0);
  const reportDataModule = reactExports.useRef("cellobj");
  const pageChangedReq = async (viewIdent) => {
    const params2 = reptabsParams(viewIdent, "PageChanged");
    const pageChangedResponse = await AxiosRequest(false, params2);
    return pageChangedResponse;
  };
  const onPageChanged = async (index2 = 0, viewIdent, reportModule) => {
    var _a2;
    setTabIndex(isNaN(index2) ? 0 : index2);
    selectedViewIdentRef.current = viewIdent;
    const pageChangedResponse = await pageChangedReq(viewIdent);
    if (pageChangedResponse.NeedRefresh === "1" && props.onTabIndexChange) {
      await props.onTabIndexChange(void 0, true);
    }
    if (props.onViewIdentChange) {
      await props.onViewIdentChange(viewIdent);
    }
    (_a2 = props.onReportModuleChange) == null ? void 0 : _a2.call(props, reportModule);
  };
  reactExports.useEffect(() => {
    var _a2;
    try {
      if (!isEmptyObject(props.reportData)) {
        const reports2 = props.reportData;
        reportDataModule.current = reports2.Module || "cellobj";
        let reportViewIdent = "";
        const commonViewIdent = reports2.ViewIdent;
        const selectedReportTabIndex = Math.max(0, Number(reports2.TabIndex ?? 0));
        selectedViewIdentRef.current = commonViewIdent;
        if (reports2.Items) {
          reportViewIdent = reports2.Items[selectedReportTabIndex].ViewIdent;
          selectedViewIdentRef.current += `.${reportViewIdent}`;
          checkReportContent(reports2, reports2.Items[selectedReportTabIndex]);
        }
        onPageChanged(selectedReportTabIndex, selectedViewIdentRef.current, reportDataModule.current);
        if (!isNaN(selectedReportTabIndex)) setTabIndex(Number(selectedReportTabIndex));
        setTabsData(reports2);
      } else {
        reportDataModule.current = "cellobj";
        (_a2 = props.onReportModuleChange) == null ? void 0 : _a2.call(props, reportDataModule.current);
      }
    } catch (err) {
      console.log(err);
    }
  }, [props.reportData]);
  const checkReportContent = async (reports2, reportsItem) => {
    if (!(reportsItem == null ? void 0 : reportsItem.content) && reports2.TabIndex === "-1") {
      const items = reports2.Items ? [...reports2.Items] : [];
      let tabs = { ...reports2, Items: items };
      const pageContent = await getPageContetReq(selectedViewIdentRef.current);
      tabs = updateArrayOfItems(pageContent, 0, tabs);
      setTabsData(tabs);
    }
  };
  const reptabsParams = (viewIdent, comand) => {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "reptabs");
    params2.set("comand", comand);
    params2.set("ViewIdent", viewIdent);
    return params2;
  };
  const updateArrayOfItems = (content2, index2, tabs = tabsData) => {
    if (tabs && tabs.Items && tabs.hasOwnProperty("Items")) {
      const items = tabs.Items.map((item, i) => {
        if (i === index2) return { ...item, ...content2 };
        return item;
      });
      return { ...tabs, Items: items, CLSID: tabs.CLSID || "" };
    } else {
      return { ...tabs || {}, ...content2, CLSID: (tabs == null ? void 0 : tabs.CLSID) || "", ViewIdent: (tabs == null ? void 0 : tabs.ViewIdent) || "" };
    }
  };
  const closeTabPageReq = async (viewIdent) => {
    const params2 = reptabsParams(viewIdent, "CloseTabPage");
    await AxiosRequest(true, params2);
  };
  const getPageContetReq = async (viewIdent) => {
    const params2 = reptabsParams(viewIdent, "GetPageContent");
    params2.set("HTML", 0);
    const pageContent = await AxiosRequest(false, params2);
    return pageContent;
  };
  const onTabClose = async (indices, data) => {
    var _a2;
    await closeTabPageReq(data.oldData.viewIdent);
    const items = tabsData && tabsData.Items ? [...tabsData.Items] : [];
    items.splice(indices.oldIndex, 1);
    let tabs = { ...tabsData, Items: items };
    await onPageChanged(indices.newIndex, data.newData.viewIdent, data.newData.reportModule);
    if (!((_a2 = items[indices.newIndex]) == null ? void 0 : _a2.content)) {
      const pageContent = await getPageContetReq(data.newData.viewIdent);
      tabs = updateArrayOfItems(pageContent, indices.newIndex, tabs);
    }
    setTabsData(tabs);
  };
  const onTabPin = async (pinned2, index2, data) => {
    const params2 = reptabsParams(data.viewIdent, "FixupTabPage");
    params2.set("Fixed", !pinned2 ? "1" : "0");
    await AxiosRequest(true, params2);
    const newTabsData = updateArrayOfItems({ Fixed: !pinned2 ? "1" : "0" }, index2);
    setTabsData(newTabsData);
  };
  const singleTab = (tab, index2) => {
    const viewIdent = tabsData ? tabsData.ViewIdent + "." + tab.ViewIdent : tab.ViewIdent;
    const content2 = getTabContet(tab, viewIdent);
    const canPin = Number(tab.Buttons) & 2 ? true : false;
    const pinned2 = tab.Fixed === "1";
    const reportModule = tab.Module || "cellobj";
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      SmetaTabItem,
      {
        pinned: canPin ? pinned2 : void 0,
        closable: Number(tab.Buttons) & 1 ? true : false,
        label: tab.Title,
        data: { viewIdent, reportModule },
        title: tab.Notes,
        children: content2
      },
      index2
    );
  };
  const renderTabs = () => {
    if (!tabsData) return null;
    if (tabsData.content || tabsData.RCDATA) return singleTab(tabsData, 0);
    if (!tabsData.Items) return;
    return tabsData.Items.map((tab, index2) => singleTab(tab, index2));
  };
  const onFrameLoad = (e2, viewIdent) => {
    const iframe = e2.target;
    clickInFrame(viewIdent, iframe, { ID: props.ID, linkRef: true, changeText: true });
    iframe.contentDocument.oncontextmenu = function(e22) {
      e22.preventDefault();
      const rect = iframe.getBoundingClientRect();
      contextMenuFunc.current({
        clientX: e22.clientX + rect.x,
        clientY: e22.clientY + rect.y,
        preventDefault: function() {
          e22.preventDefault();
        }
      });
    };
  };
  const createSimpleIframe = (html2 = "", viewIdent) => {
    const fixedHtml = String(html2).replaceAll("overflow: hidden;", "").replaceAll('onClick="ClickCells(event)"', "");
    const iframe = /* @__PURE__ */ jsxRuntimeExports.jsx("iframe", { className: "iframeStimateCustom", srcDoc: fixedHtml, onLoad: (e2) => onFrameLoad(e2, viewIdent) });
    return iframe;
  };
  function getTabContet(form, viewIdent) {
    const iframeContentHandlers = {
      [ViewClass.HTMLView]: createSimpleIframe,
      // простой отчёт
      [ViewClass.PDFView]: createPdfIframe
      // PDF
    };
    const handler = iframeContentHandlers[form.CLSID] || createSimpleIframe;
    return handler(form.content || form.RCDATA, viewIdent);
  }
  const onTabIndexChange = async (index2, tabContent, dataAboutTab) => {
    await onPageChanged(index2, dataAboutTab.viewIdent, dataAboutTab.reportModule);
    if (!tabContent.firstChild.srcDoc) {
      const pageContent = await getPageContetReq(dataAboutTab.viewIdent);
      if (!isEmptyObject(pageContent)) {
        const newTabsData = updateArrayOfItems(pageContent, index2);
        setTabsData(newTabsData);
      }
    }
  };
  function getTabPosition() {
    if (!isEmptyObject(props.reportData)) {
      if (props.reportData.Items) {
        return "bottom";
      } else {
        return "hidden";
      }
    } else {
      return "hidden";
    }
  }
  function contextMenuData() {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", reportDataModule.current);
    params2.set("comand", "GetDocumentMenu");
    params2.set("CLSID", ViewClass.CellObj);
    return AxiosRequest(true, params2);
  }
  function execMenuHandler(data) {
    const params2 = /* @__PURE__ */ new Map();
    const viewIdent = selectedViewIdentRef.current.split(".");
    params2.set("prefix", reportDataModule.current);
    params2.set("comand", "ExecMenuHandler");
    params2.set("ProgID", data.ID);
    params2.set("ViewIdent", viewIdent.length > 1 ? viewIdent[1] : viewIdent[0]);
    params2.set("WSM", "1");
    AxiosRequest(true, params2).then((res) => {
      tokenProcessingTest(res);
    });
  }
  async function additionalOnMenuItemClick(data) {
    var _a2;
    const tab = (_a2 = tabsData == null ? void 0 : tabsData.Items) == null ? void 0 : _a2[tabIndex];
    if (!tab) return;
    const items = [...tabsData.Items];
    if (data.value === "openInNewWindow") {
      let viewIdent = tabsData.ViewIdent + "." + tab.ViewIdent;
      const content2 = getTabContet(tab, viewIdent);
      const contentModalWindow = /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.dialogReportContainer, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$3.sectionToolsContainer, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Печать", arrow: true, enterDelay: 600, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              onClick: (ev) => {
                var _a3;
                (_a3 = ev.target.closest(".contentModal").querySelector("iframe").contentWindow) == null ? void 0 : _a3.print();
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(PrintRoundedIcon, {})
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(SaveAsButton, { reportModule: tab.Module, ViewIdent: viewIdent })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.dialogReportContent, children: content2 })
      ] });
      const newIndex = Math.max(0, tabIndex - 1);
      await smetaAxios.get("UnpinTabPage", {
        prefix: Prefixes.repTabs,
        params: { ViewIdent: selectedViewIdentRef.current },
        loadMask: true
      });
      items.splice(tabIndex, 1);
      let tabs = { ...tabsData, Items: items };
      if (items.length) {
        const newData = items[newIndex];
        viewIdent = tabsData.ViewIdent + "." + newData.ViewIdent;
        await onPageChanged(newIndex, viewIdent, newData.Module);
        if (!newData.content) {
          const pageContent = await getPageContetReq(viewIdent);
          tabs = updateArrayOfItems(pageContent, newIndex, tabs);
        }
      }
      setTabsData(tabs);
      setTabIndex(newIndex);
      smetaModals.open(contentModalWindow, {
        Title: tab.Title,
        hiddenButton: true,
        disableBlockBackground: true
      });
    } else {
      for (let index2 = 0; index2 < items.length; index2++) {
        const value = items[index2];
        if (index2 !== tabIndex) await closeTabPageReq(`${tabsData.ViewIdent}.${value.ViewIdent}`);
      }
      setTabsData({ ...tabsData, Items: [tab] });
      setTabIndex(0);
    }
  }
  const additionalСontextMenuData = [
    { Caption: "Открыть в отдельном окне", value: "openInNewWindow" },
    {
      Caption: "Закрыть другие вкладки",
      value: "closeOtherTabs",
      Disabled: (tabsData == null ? void 0 : tabsData.Items) === void 0 || tabsData.Items.length <= 1
    }
  ];
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$3.fullSizeContainer, children: props.reportData.NoContextMenu ? /* @__PURE__ */ jsxRuntimeExports.jsx(
    SmetaTabs,
    {
      position: getTabPosition(),
      onTabPin,
      onTabClose,
      onTabIndexChange,
      tabIndex,
      style: { height: "100%" },
      id: `ReportsTabs${props.groupId}`,
      additionalСontextMenuData,
      additionalOnMenuItemClick,
      children: renderTabs()
    }
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
    ContextMenu,
    {
      for: "reports",
      onRightClick: contextMenuData,
      getContextMenuFunction: (func) => {
        contextMenuFunc.current = func;
      },
      onMenuItemClick: execMenuHandler,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        SmetaTabs,
        {
          position: getTabPosition(),
          onTabPin,
          onTabClose,
          onTabIndexChange,
          tabIndex,
          style: { height: "100%" },
          id: `ReportsTabs${props.groupId}`,
          additionalСontextMenuData,
          additionalOnMenuItemClick,
          children: renderTabs()
        }
      )
    }
  ) });
}
const TabsForReports$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: TabsForReports$1
}, Symbol.toStringTag, { value: "Module" }));
var utf8$1 = {};
/*! https://mths.be/utf8js v3.0.0 by @mathias */
var hasRequiredUtf8;
function requireUtf8() {
  if (hasRequiredUtf8) return utf8$1;
  hasRequiredUtf8 = 1;
  (function(exports2) {
    (function(root) {
      var stringFromCharCode = String.fromCharCode;
      function ucs2decode(string) {
        var output = [];
        var counter = 0;
        var length2 = string.length;
        var value;
        var extra;
        while (counter < length2) {
          value = string.charCodeAt(counter++);
          if (value >= 55296 && value <= 56319 && counter < length2) {
            extra = string.charCodeAt(counter++);
            if ((extra & 64512) == 56320) {
              output.push(((value & 1023) << 10) + (extra & 1023) + 65536);
            } else {
              output.push(value);
              counter--;
            }
          } else {
            output.push(value);
          }
        }
        return output;
      }
      function ucs2encode(array) {
        var length2 = array.length;
        var index2 = -1;
        var value;
        var output = "";
        while (++index2 < length2) {
          value = array[index2];
          if (value > 65535) {
            value -= 65536;
            output += stringFromCharCode(value >>> 10 & 1023 | 55296);
            value = 56320 | value & 1023;
          }
          output += stringFromCharCode(value);
        }
        return output;
      }
      function checkScalarValue(codePoint) {
        if (codePoint >= 55296 && codePoint <= 57343) {
          throw Error(
            "Lone surrogate U+" + codePoint.toString(16).toUpperCase() + " is not a scalar value"
          );
        }
      }
      function createByte(codePoint, shift) {
        return stringFromCharCode(codePoint >> shift & 63 | 128);
      }
      function encodeCodePoint(codePoint) {
        if ((codePoint & 4294967168) == 0) {
          return stringFromCharCode(codePoint);
        }
        var symbol = "";
        if ((codePoint & 4294965248) == 0) {
          symbol = stringFromCharCode(codePoint >> 6 & 31 | 192);
        } else if ((codePoint & 4294901760) == 0) {
          checkScalarValue(codePoint);
          symbol = stringFromCharCode(codePoint >> 12 & 15 | 224);
          symbol += createByte(codePoint, 6);
        } else if ((codePoint & 4292870144) == 0) {
          symbol = stringFromCharCode(codePoint >> 18 & 7 | 240);
          symbol += createByte(codePoint, 12);
          symbol += createByte(codePoint, 6);
        }
        symbol += stringFromCharCode(codePoint & 63 | 128);
        return symbol;
      }
      function utf8encode(string) {
        var codePoints = ucs2decode(string);
        var length2 = codePoints.length;
        var index2 = -1;
        var codePoint;
        var byteString = "";
        while (++index2 < length2) {
          codePoint = codePoints[index2];
          byteString += encodeCodePoint(codePoint);
        }
        return byteString;
      }
      function readContinuationByte() {
        if (byteIndex >= byteCount) {
          throw Error("Invalid byte index");
        }
        var continuationByte = byteArray[byteIndex] & 255;
        byteIndex++;
        if ((continuationByte & 192) == 128) {
          return continuationByte & 63;
        }
        throw Error("Invalid continuation byte");
      }
      function decodeSymbol() {
        var byte1;
        var byte2;
        var byte3;
        var byte4;
        var codePoint;
        if (byteIndex > byteCount) {
          throw Error("Invalid byte index");
        }
        if (byteIndex == byteCount) {
          return false;
        }
        byte1 = byteArray[byteIndex] & 255;
        byteIndex++;
        if ((byte1 & 128) == 0) {
          return byte1;
        }
        if ((byte1 & 224) == 192) {
          byte2 = readContinuationByte();
          codePoint = (byte1 & 31) << 6 | byte2;
          if (codePoint >= 128) {
            return codePoint;
          } else {
            throw Error("Invalid continuation byte");
          }
        }
        if ((byte1 & 240) == 224) {
          byte2 = readContinuationByte();
          byte3 = readContinuationByte();
          codePoint = (byte1 & 15) << 12 | byte2 << 6 | byte3;
          if (codePoint >= 2048) {
            checkScalarValue(codePoint);
            return codePoint;
          } else {
            throw Error("Invalid continuation byte");
          }
        }
        if ((byte1 & 248) == 240) {
          byte2 = readContinuationByte();
          byte3 = readContinuationByte();
          byte4 = readContinuationByte();
          codePoint = (byte1 & 7) << 18 | byte2 << 12 | byte3 << 6 | byte4;
          if (codePoint >= 65536 && codePoint <= 1114111) {
            return codePoint;
          }
        }
        throw Error("Invalid UTF-8 detected");
      }
      var byteArray;
      var byteCount;
      var byteIndex;
      function utf8decode(byteString) {
        byteArray = ucs2decode(byteString);
        byteCount = byteArray.length;
        byteIndex = 0;
        var codePoints = [];
        var tmp;
        while ((tmp = decodeSymbol()) !== false) {
          codePoints.push(tmp);
        }
        return ucs2encode(codePoints);
      }
      root.version = "3.0.0";
      root.encode = utf8encode;
      root.decode = utf8decode;
    })(exports2);
  })(utf8$1);
  return utf8$1;
}
var utf8Exports = requireUtf8();
const utf8 = /* @__PURE__ */ getDefaultExportFromCjs(utf8Exports);
var joditReact = { exports: {} };
/*! For license information please see jodit-react.js.LICENSE.txt */
var hasRequiredJoditReact;
function requireJoditReact() {
  if (hasRequiredJoditReact) return joditReact.exports;
  hasRequiredJoditReact = 1;
  (function(module2, exports2) {
    !function(t, e2) {
      module2.exports = e2(requireReact());
    }(self, (t) => (() => {
      var e2 = { 922: (t2) => {
        t2.exports = function(t3) {
          var e3 = [];
          return e3.toString = function() {
            return this.map(function(e4) {
              var i2 = "", o2 = void 0 !== e4[5];
              return e4[4] && (i2 += "@supports (".concat(e4[4], ") {")), e4[2] && (i2 += "@media ".concat(e4[2], " {")), o2 && (i2 += "@layer".concat(e4[5].length > 0 ? " ".concat(e4[5]) : "", " {")), i2 += t3(e4), o2 && (i2 += "}"), e4[2] && (i2 += "}"), e4[4] && (i2 += "}"), i2;
            }).join("");
          }, e3.i = function(t4, i2, o2, n2, r2) {
            "string" == typeof t4 && (t4 = [[null, t4, void 0]]);
            var s = {};
            if (o2) for (var a2 = 0; a2 < this.length; a2++) {
              var l = this[a2][0];
              null != l && (s[l] = true);
            }
            for (var c = 0; c < t4.length; c++) {
              var d2 = [].concat(t4[c]);
              o2 && s[d2[0]] || (void 0 !== r2 && (void 0 === d2[5] || (d2[1] = "@layer".concat(d2[5].length > 0 ? " ".concat(d2[5]) : "", " {").concat(d2[1], "}")), d2[5] = r2), i2 && (d2[2] ? (d2[1] = "@media ".concat(d2[2], " {").concat(d2[1], "}"), d2[2] = i2) : d2[2] = i2), n2 && (d2[4] ? (d2[1] = "@supports (".concat(d2[4], ") {").concat(d2[1], "}"), d2[4] = n2) : d2[4] = "".concat(n2)), e3.push(d2));
            }
          }, e3;
        };
      }, 155: (t2) => {
        t2.exports = function(t3, e3) {
          return e3 || (e3 = {}), t3 ? (t3 = String(t3.__esModule ? t3.default : t3), /^['"].*['"]$/.test(t3) && (t3 = t3.slice(1, -1)), e3.hash && (t3 += e3.hash), /["'() \t\n]|(%20)/.test(t3) || e3.needQuotes ? '"'.concat(t3.replace(/"/g, '\\"').replace(/\n/g, "\\n"), '"') : t3) : t3;
        };
      }, 499: (t2) => {
        t2.exports = function(t3) {
          return t3[1];
        };
      }, 714: (t2) => {
        t2.exports = function() {
          var t3 = { 26318: function(t4, e4, i3) {
            function o3(t5) {
              return o3 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t6) {
                return typeof t6;
              } : function(t6) {
                return t6 && "function" == typeof Symbol && t6.constructor === Symbol && t6 !== Symbol.prototype ? "symbol" : typeof t6;
              }, o3(t5);
            }
            function n2(t5, e5, i4) {
              var n3 = i4.value;
              if ("function" != typeof n3) throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(o3(n3)));
              var r3 = false;
              return { configurable: true, get: function() {
                if (r3 || this === t5.prototype || this.hasOwnProperty(e5) || "function" != typeof n3) return n3;
                var i5 = n3.bind(this);
                return r3 = true, Object.defineProperty(this, e5, { configurable: true, get: function() {
                  return i5;
                }, set: function(t6) {
                  n3 = t6, delete this[e5];
                } }), r3 = false, i5;
              }, set: function(t6) {
                n3 = t6;
              } };
            }
            function r2(t5) {
              var e5;
              return "undefined" != typeof Reflect && "function" == typeof Reflect.ownKeys ? e5 = Reflect.ownKeys(t5.prototype) : (e5 = Object.getOwnPropertyNames(t5.prototype), "function" == typeof Object.getOwnPropertySymbols && (e5 = e5.concat(Object.getOwnPropertySymbols(t5.prototype)))), e5.forEach(function(e6) {
                if ("constructor" !== e6) {
                  var i4 = Object.getOwnPropertyDescriptor(t5.prototype, e6);
                  "function" == typeof i4.value && Object.defineProperty(t5.prototype, e6, n2(t5, e6, i4));
                }
              }), t5;
            }
            function s() {
              return 1 === arguments.length ? r2.apply(void 0, arguments) : n2.apply(void 0, arguments);
            }
            i3.d(e4, { Ay: function() {
              return s;
            } });
          }, 36115: function(t4, e4, i3) {
            i3.d(e4, { T: function() {
              return n2;
            } });
            var o3 = i3(17352);
            class n2 {
              constructor() {
                this.cache = true, this.defaultTimeout = 100, this.namespace = "", this.safeMode = false, this.width = "auto", this.height = "auto", this.safePluginsList = ["about", "enter", "backspace", "size", "bold", "hotkeys"], this.license = "", this.preset = "custom", this.presets = { inline: { inline: true, toolbar: false, toolbarInline: true, toolbarInlineForSelection: true, showXPathInStatusbar: false, showCharsCounter: false, showWordsCounter: false, showPlaceholder: false } }, this.ownerDocument = "undefined" != typeof document ? document : null, this.ownerWindow = "undefined" != typeof window ? window : null, this.shadowRoot = null, this.zIndex = 0, this.readonly = false, this.disabled = false, this.activeButtonsInReadOnly = ["source", "fullsize", "print", "about", "dots", "selectall"], this.allowCommandsInReadOnly = ["selectall", "preview", "print"], this.toolbarButtonSize = "middle", this.allowTabNavigation = false, this.inline = false, this.theme = "default", this.saveModeInStorage = false, this.editorClassName = false, this.className = false, this.style = false, this.containerStyle = false, this.styleValues = {}, this.triggerChangeEvent = true, this.direction = "", this.language = "auto", this.debugLanguage = false, this.i18n = false, this.tabIndex = -1, this.toolbar = true, this.statusbar = true, this.showTooltip = true, this.showTooltipDelay = 200, this.useNativeTooltip = false, this.defaultActionOnPaste = o3.INSERT_AS_HTML, this.enter = o3.PARAGRAPH, this.iframe = false, this.editHTMLDocumentMode = false, this.enterBlock = "br" !== this.enter ? this.enter : o3.PARAGRAPH, this.defaultMode = o3.MODE_WYSIWYG, this.useSplitMode = false, this.colors = { greyscale: ["#000000", "#434343", "#666666", "#999999", "#B7B7B7", "#CCCCCC", "#D9D9D9", "#EFEFEF", "#F3F3F3", "#FFFFFF"], palette: ["#980000", "#FF0000", "#FF9900", "#FFFF00", "#00F0F0", "#00FFFF", "#4A86E8", "#0000FF", "#9900FF", "#FF00FF"], full: ["#E6B8AF", "#F4CCCC", "#FCE5CD", "#FFF2CC", "#D9EAD3", "#D0E0E3", "#C9DAF8", "#CFE2F3", "#D9D2E9", "#EAD1DC", "#DD7E6B", "#EA9999", "#F9CB9C", "#FFE599", "#B6D7A8", "#A2C4C9", "#A4C2F4", "#9FC5E8", "#B4A7D6", "#D5A6BD", "#CC4125", "#E06666", "#F6B26B", "#FFD966", "#93C47D", "#76A5AF", "#6D9EEB", "#6FA8DC", "#8E7CC3", "#C27BA0", "#A61C00", "#CC0000", "#E69138", "#F1C232", "#6AA84F", "#45818E", "#3C78D8", "#3D85C6", "#674EA7", "#A64D79", "#85200C", "#990000", "#B45F06", "#BF9000", "#38761D", "#134F5C", "#1155CC", "#0B5394", "#351C75", "#733554", "#5B0F00", "#660000", "#783F04", "#7F6000", "#274E13", "#0C343D", "#1C4587", "#073763", "#20124D", "#4C1130"] }, this.colorPickerDefaultTab = "background", this.imageDefaultWidth = 300, this.removeButtons = [], this.disablePlugins = [], this.extraPlugins = [], this.extraButtons = [], this.extraIcons = {}, this.createAttributes = { table: { style: "border-collapse:collapse;width: 100%;" } }, this.sizeLG = 900, this.sizeMD = 700, this.sizeSM = 400, this.buttons = [{ group: "font-style", buttons: [] }, { group: "list", buttons: [] }, { group: "font", buttons: [] }, "---", { group: "script", buttons: [] }, { group: "media", buttons: [] }, "\n", { group: "state", buttons: [] }, { group: "clipboard", buttons: [] }, { group: "insert", buttons: [] }, { group: "indent", buttons: [] }, { group: "color", buttons: [] }, { group: "form", buttons: [] }, "---", { group: "history", buttons: [] }, { group: "search", buttons: [] }, { group: "source", buttons: [] }, { group: "other", buttons: [] }, { group: "info", buttons: [] }], this.events = {}, this.textIcons = false, this.showBrowserColorPicker = true;
              }
              static get defaultOptions() {
                return n2.__defaultOptions || (n2.__defaultOptions = new n2()), n2.__defaultOptions;
              }
            }
            n2.prototype.controls = {};
          }, 86302: function(t4, e4, i3) {
            i3.d(e4, { j: function() {
              return p2;
            } });
            var o3 = i3(17352), n2 = i3(59146), r2 = i3(99951), s = i3(69052), a2 = i3(2461), l = i3(25376), c = i3(92039), d2 = i3(98253), u2 = i3(35642), h2 = (i3(28712), i3(21567));
            class p2 {
              constructor() {
                var t5, e5, i4, o4, n3;
                this.timers = /* @__PURE__ */ new Map(), this.__callbacks = /* @__PURE__ */ new Map(), this.__queueMicrotaskNative = null !== (t5 = null === queueMicrotask || void 0 === queueMicrotask ? void 0 : queueMicrotask.bind(window)) && void 0 !== t5 ? t5 : Promise.resolve().then.bind(Promise.resolve()), this.promisesRejections = /* @__PURE__ */ new Set(), this.requestsIdle = /* @__PURE__ */ new Set(), this.requestsRaf = /* @__PURE__ */ new Set(), this.requestIdleCallbackNative = null !== (i4 = null === (e5 = window.requestIdleCallback) || void 0 === e5 ? void 0 : e5.bind(window)) && void 0 !== i4 ? i4 : (t6, e6) => {
                  var i5;
                  const o5 = Date.now();
                  return this.setTimeout(() => {
                    t6({ didTimeout: false, timeRemaining: () => Math.max(0, 50 - (Date.now() - o5)) });
                  }, null !== (i5 = null == e6 ? void 0 : e6.timeout) && void 0 !== i5 ? i5 : 1);
                }, this.__cancelIdleCallbackNative = null !== (n3 = null === (o4 = window.cancelIdleCallback) || void 0 === o4 ? void 0 : o4.bind(window)) && void 0 !== n3 ? n3 : (t6) => {
                  this.clearTimeout(t6);
                }, this.isDestructed = false;
              }
              delay(t5) {
                return this.promise((e5) => this.setTimeout(e5, t5));
              }
              setTimeout(t5, e5, ...i4) {
                if (this.isDestructed) return 0;
                let o4 = {};
                (0, u2.R)(e5) && (e5 = 0), (0, a2.E)(e5) || (o4 = e5, e5 = o4.timeout || 0), o4.label && this.clearLabel(o4.label);
                const r3 = (0, n2.w)(t5, e5, ...i4), s2 = o4.label || r3;
                return this.timers.set(s2, r3), this.__callbacks.set(s2, t5), r3;
              }
              updateTimeout(t5, e5) {
                if (!t5 || !this.timers.has(t5)) return null;
                const i4 = this.__callbacks.get(t5);
                return this.setTimeout(i4, { label: t5, timeout: e5 });
              }
              clearLabel(t5) {
                t5 && this.timers.has(t5) && ((0, n2.D)(this.timers.get(t5)), this.timers.delete(t5), this.__callbacks.delete(t5));
              }
              clearTimeout(t5) {
                if ((0, d2.K)(t5)) return this.clearLabel(t5);
                (0, n2.D)(t5), this.timers.delete(t5), this.__callbacks.delete(t5);
              }
              debounce(t5, e5, i4 = false) {
                let o4 = 0, a3 = false;
                const d3 = [], u3 = (...e6) => {
                  if (!a3) {
                    o4 = 0;
                    const i5 = t5(...e6);
                    if (a3 = true, d3.length) {
                      const t6 = () => {
                        d3.forEach((t7) => t7()), d3.length = 0;
                      };
                      (0, c.y)(i5) ? i5.finally(t6) : t6();
                    }
                  }
                }, h3 = (...r3) => {
                  a3 = false, e5 ? (!o4 && i4 && u3(...r3), (0, n2.D)(o4), o4 = this.setTimeout(() => u3(...r3), (0, s.T)(e5) ? e5() : e5), this.timers.set(t5, o4)) : u3(...r3);
                };
                return (0, l.Q)(e5) && e5.promisify ? (...t6) => {
                  const e6 = this.promise((t7) => {
                    d3.push(t7);
                  }).catch((t7) => {
                    if ((0, r2.z)(t7)) return null;
                    throw t7;
                  });
                  return h3(...t6), e6;
                } : h3;
              }
              microDebounce(t5, e5 = false) {
                let i4, o4 = false, n3 = true;
                return (...r3) => {
                  i4 = r3, o4 ? n3 = true : (n3 = true, e5 && (n3 = false, t5(...i4)), o4 = true, this.__queueMicrotaskNative(() => {
                    o4 = false, this.isDestructed || n3 && t5(...i4);
                  }));
                };
              }
              throttle(t5, e5, i4 = false) {
                let o4, n3, r3, a3 = null;
                return (...i5) => {
                  o4 = true, r3 = i5, e5 ? a3 || (n3 = () => {
                    o4 ? (t5(...r3), o4 = false, a3 = this.setTimeout(n3, (0, s.T)(e5) ? e5() : e5), this.timers.set(n3, a3)) : a3 = null;
                  }, n3()) : t5(...r3);
                };
              }
              promise(t5) {
                let e5 = () => {
                };
                const i4 = new Promise((i5, o4) => {
                  e5 = () => o4((0, h2.h)("Abort async")), this.promisesRejections.add(e5), t5(i5, o4);
                });
                return i4.finally || "undefined" == typeof process || o3.IS_ES_NEXT || (i4.finally = (t6) => (i4.then(t6).catch(t6), i4)), i4.finally(() => {
                  this.promisesRejections.delete(e5);
                }).catch(() => null), i4.rejectCallback = e5, i4;
              }
              promiseState(t5) {
                if (t5.status) return t5.status;
                if (!Promise.race) return new Promise((e6) => {
                  t5.then((t6) => (e6("fulfilled"), t6), (t6) => {
                    throw e6("rejected"), t6;
                  }), this.setTimeout(() => {
                    e6("pending");
                  }, 100);
                });
                const e5 = {};
                return Promise.race([t5, e5]).then((t6) => t6 === e5 ? "pending" : "fulfilled", () => "rejected");
              }
              requestIdleCallback(t5, e5) {
                const i4 = this.requestIdleCallbackNative(t5, e5);
                return this.requestsIdle.add(i4), i4;
              }
              requestIdlePromise(t5) {
                return this.promise((e5) => {
                  const i4 = this.requestIdleCallback(() => e5(i4), t5);
                });
              }
              cancelIdleCallback(t5) {
                return this.requestsIdle.delete(t5), this.__cancelIdleCallbackNative(t5);
              }
              requestAnimationFrame(t5) {
                const e5 = requestAnimationFrame(t5);
                return this.requestsRaf.add(e5), e5;
              }
              cancelAnimationFrame(t5) {
                this.requestsRaf.delete(t5), cancelAnimationFrame(t5);
              }
              clear() {
                this.requestsIdle.forEach((t5) => this.cancelIdleCallback(t5)), this.requestsRaf.forEach((t5) => this.cancelAnimationFrame(t5)), this.timers.forEach((t5) => (0, n2.D)(this.timers.get(t5))), this.timers.clear(), this.promisesRejections.forEach((t5) => t5()), this.promisesRejections.clear();
              }
              destruct() {
                this.clear(), this.isDestructed = true;
              }
            }
          }, 64890: function(t4, e4, i3) {
            i3.d(e4, { j: function() {
              return o3.j;
            } });
            var o3 = i3(86302);
          }, 37474: function(t4, e4, i3) {
            i3.d(e4, { u: function() {
              return l;
            } });
            var o3 = i3(64890), n2 = i3(64567), r2 = i3(56298), s = i3(65147);
            const a2 = /* @__PURE__ */ new Map();
            class l {
              get componentName() {
                return this.__componentName || (this.__componentName = "jodit-" + (0, s.kebabCase)(((0, s.isFunction)(this.className) ? this.className() : "") || (0, s.getClassName)(this))), this.__componentName;
              }
              getFullElName(t5, e5, i4) {
                const o4 = [this.componentName];
                return t5 && (t5 = t5.replace(/[^a-z0-9-]/gi, "-"), o4.push(`__${t5}`)), e5 && (o4.push("_", e5), o4.push("_", (0, s.isVoid)(i4) ? "true" : i4.toString())), o4.join("");
              }
              get ownerDocument() {
                return this.ow.document;
              }
              get od() {
                return this.ownerDocument;
              }
              get ow() {
                return this.ownerWindow;
              }
              get(t5, e5) {
                return (0, s.get)(t5, e5 || this);
              }
              get isReady() {
                return this.componentStatus === n2.f.ready;
              }
              get isDestructed() {
                return this.componentStatus === n2.f.destructed;
              }
              get isInDestruct() {
                return n2.f.beforeDestruct === this.componentStatus || n2.f.destructed === this.componentStatus;
              }
              bindDestruct(t5) {
                return t5.hookStatus(n2.f.beforeDestruct, () => !this.isInDestruct && this.destruct()), this;
              }
              constructor() {
                this.async = new o3.j(), this.ownerWindow = window, this.__componentStatus = n2.f.beforeInit, this.uid = "jodit-uid-" + (0, r2.w9)();
              }
              destruct() {
                this.setStatus(n2.f.destructed), this.async && (this.async.destruct(), this.async = void 0), a2.get(this) && a2.delete(this), this.ownerWindow = void 0;
              }
              get componentStatus() {
                return this.__componentStatus;
              }
              set componentStatus(t5) {
                this.setStatus(t5);
              }
              setStatus(t5) {
                return this.setStatusComponent(t5, this);
              }
              setStatusComponent(t5, e5) {
                if (t5 === this.__componentStatus) return;
                e5 === this && (this.__componentStatus = t5);
                const i4 = Object.getPrototypeOf(this);
                i4 && (0, s.isFunction)(i4.setStatusComponent) && i4.setStatusComponent(t5, e5);
                const o4 = a2.get(this), n3 = null == o4 ? void 0 : o4[t5];
                n3 && n3.length && n3.forEach((t6) => t6(e5));
              }
              hookStatus(t5, e5) {
                let i4 = a2.get(this);
                i4 || (i4 = {}, a2.set(this, i4)), i4[t5] || (i4[t5] = []), i4[t5].push(e5);
              }
              static isInstanceOf(t5, e5) {
                return t5 instanceof e5;
              }
            }
            l.STATUSES = n2.f;
          }, 77753: function(t4, e4, i3) {
            i3.d(e4, { f: function() {
              return n2.f;
            }, uA: function() {
              return o3.u;
            }, vG: function() {
              return r2.v;
            } });
            var o3 = i3(37474), n2 = i3(64567), r2 = i3(7982);
          }, 64567: function(t4, e4, i3) {
            i3.d(e4, { f: function() {
              return o3;
            } });
            const o3 = { beforeInit: "beforeInit", ready: "ready", beforeDestruct: "beforeDestruct", destructed: "destructed" };
          }, 7982: function(t4, e4, i3) {
            i3.d(e4, { v: function() {
              return n2;
            } });
            var o3 = i3(37474);
            class n2 extends o3.u {
              get j() {
                return this.jodit;
              }
              get defaultTimeout() {
                return this.j.defaultTimeout;
              }
              i18n(t5, ...e5) {
                return this.j.i18n(t5, ...e5);
              }
              setParentView(t5) {
                return this.jodit = t5, t5.components.add(this), this;
              }
              constructor(t5) {
                super(), this.setParentView(t5);
              }
              destruct() {
                return this.j.components.delete(this), super.destruct();
              }
            }
          }, 17352: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { ACCURACY: function() {
              return J;
            }, APP_VERSION: function() {
              return o3;
            }, BASE_PATH: function() {
              return at;
            }, BR: function() {
              return F2;
            }, CLIPBOARD_ID: function() {
              return dt;
            }, COMMAND_KEYS: function() {
              return H4;
            }, EMULATE_DBLCLICK_TIMEOUT: function() {
              return Q2;
            }, ES: function() {
              return n2;
            }, FAT_MODE: function() {
              return c;
            }, HOMEPAGE: function() {
              return d2;
            }, INSEPARABLE_TAGS: function() {
              return C2;
            }, INSERT_AS_HTML: function() {
              return tt;
            }, INSERT_AS_TEXT: function() {
              return it;
            }, INSERT_CLEAR_HTML: function() {
              return et;
            }, INSERT_ONLY_TEXT: function() {
              return ot;
            }, INVISIBLE_SPACE: function() {
              return p2;
            }, INVISIBLE_SPACE_REG_EXP: function() {
              return g2;
            }, INVISIBLE_SPACE_REG_EXP_END: function() {
              return m2;
            }, INVISIBLE_SPACE_REG_EXP_START: function() {
              return b2;
            }, IS_BLOCK: function() {
              return w;
            }, IS_ES_MODERN: function() {
              return r2;
            }, IS_ES_NEXT: function() {
              return s;
            }, IS_IE: function() {
              return Y;
            }, IS_INLINE: function() {
              return y2;
            }, IS_MAC: function() {
              return rt;
            }, IS_PROD: function() {
              return a2;
            }, IS_TEST: function() {
              return l;
            }, KEY_ALIASES: function() {
              return st;
            }, KEY_ALT: function() {
              return L2;
            }, KEY_BACKSPACE: function() {
              return T2;
            }, KEY_DELETE: function() {
              return D2;
            }, KEY_DOWN: function() {
              return N2;
            }, KEY_ENTER: function() {
              return I2;
            }, KEY_ESC: function() {
              return A2;
            }, KEY_F3: function() {
              return q2;
            }, KEY_LEFT: function() {
              return M2;
            }, KEY_META: function() {
              return z2;
            }, KEY_RIGHT: function() {
              return R2;
            }, KEY_SPACE: function() {
              return B3;
            }, KEY_TAB: function() {
              return E2;
            }, KEY_UP: function() {
              return P2;
            }, LIST_TAGS: function() {
              return j;
            }, MARKER_CLASS: function() {
              return Z2;
            }, MODE_SOURCE: function() {
              return U2;
            }, MODE_SPLIT: function() {
              return $;
            }, MODE_WYSIWYG: function() {
              return W;
            }, NBSP_SPACE: function() {
              return f2;
            }, NEARBY: function() {
              return O2;
            }, NO_EMPTY_TAGS: function() {
              return S2;
            }, PARAGRAPH: function() {
              return V2;
            }, PASSIVE_EVENTS: function() {
              return ht;
            }, SAFE_COUNT_CHANGE_CALL: function() {
              return nt;
            }, SET_TEST: function() {
              return u2;
            }, SOURCE_CONSUMER: function() {
              return ut;
            }, SPACE_REG_EXP: function() {
              return _2;
            }, SPACE_REG_EXP_END: function() {
              return x;
            }, SPACE_REG_EXP_START: function() {
              return v2;
            }, TEMP_ATTR: function() {
              return lt;
            }, TEXT_HTML: function() {
              return G;
            }, TEXT_PLAIN: function() {
              return K;
            }, TEXT_RTF: function() {
              return X;
            }, TOKENS: function() {
              return h2;
            }, lang: function() {
              return ct;
            } });
            const o3 = "4.2.10", n2 = "es2018", r2 = true, s = false, a2 = true;
            let l = false;
            const c = true, d2 = "https://xdsoft.net/jodit/", u2 = () => l = true, h2 = {}, p2 = "\uFEFF", f2 = " ", g2 = () => /[\uFEFF]/g, m2 = () => /[\uFEFF]+$/g, b2 = () => /^[\uFEFF]+/g, _2 = () => /[\s\n\t\r\uFEFF\u200b]+/g, v2 = () => /^[\s\n\t\r\uFEFF\u200b]+/g, x = () => /[\s\n\t\r\uFEFF\u200b]+$/g, w = /^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i, y2 = /^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i, j = /* @__PURE__ */ new Set(["ul", "ol"]), k2 = ["img", "video", "svg", "iframe", "script", "input", "textarea", "link", "jodit", "jodit-media"], C2 = /* @__PURE__ */ new Set([...k2, "br", "hr"]), S2 = new Set(k2), z2 = "Meta", T2 = "Backspace", E2 = "Tab", I2 = "Enter", A2 = "Escape", L2 = "Alt", M2 = "ArrowLeft", P2 = "ArrowUp", R2 = "ArrowRight", N2 = "ArrowDown", B3 = "Space", D2 = "Delete", q2 = "F3", O2 = 5, J = 10, H4 = [z2, T2, D2, P2, N2, R2, M2, I2, A2, q2, E2], F2 = "br", V2 = "p", W = 1, U2 = 2, $ = 3, Y = "undefined" != typeof navigator && (-1 !== navigator.userAgent.indexOf("MSIE") || /rv:11.0/i.test(navigator.userAgent)), K = Y ? "text" : "text/plain", G = Y ? "html" : "text/html", X = Y ? "rtf" : "text/rtf", Z2 = "jodit-selection_marker", Q2 = 300, tt = "insert_as_html", et = "insert_clear_html", it = "insert_as_text", ot = "insert_only_text", nt = 10, rt = "undefined" != typeof window && /Mac|iPod|iPhone|iPad/.test(window.navigator.platform), st = { add: "+", break: "pause", cmd: "meta", command: "meta", ctl: "control", ctrl: "control", del: "delete", down: "arrowdown", esc: "escape", ins: "insert", left: "arrowleft", mod: rt ? "meta" : "control", opt: "alt", option: "alt", return: "enter", right: "arrowright", space: " ", spacebar: " ", up: "arrowup", win: "meta", windows: "meta" }, at = (() => {
              if ("undefined" == typeof document) return "";
              const t5 = document.currentScript, e5 = (t6) => {
                const e6 = t6.split("/");
                return /\.js/.test(e6[e6.length - 1]) ? e6.slice(0, e6.length - 1).join("/") + "/" : t6;
              };
              if (t5) return e5(t5.src);
              const i4 = document.querySelectorAll("script[src]");
              return i4 && i4.length ? e5(i4[i4.length - 1].src) : window.location.href;
            })(), lt = "data-jodit-temp", ct = {}, dt = "clipboard", ut = "source-consumer", ht = /* @__PURE__ */ new Set(["touchstart", "touchend", "scroll", "mousewheel", "mousemove", "touchmove"]);
          }, 92852: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return s;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(65147);
            i3(28712);
            class s {
              get doc() {
                return (0, r2.isFunction)(this.document) ? this.document() : this.document;
              }
              constructor(t5, e5) {
                this.document = t5, this.createAttributes = e5;
              }
              element(t5, e5, i4) {
                const o4 = this.doc.createElement(t5.toLowerCase());
                return this.applyCreateAttributes(o4), e5 && ((0, r2.isPlainObject)(e5) ? (0, r2.attr)(o4, e5) : i4 = e5), i4 && (0, r2.asArray)(i4).forEach((t6) => o4.appendChild((0, r2.isString)(t6) ? this.fromHTML(t6) : t6)), o4;
              }
              div(t5, e5, i4) {
                const o4 = this.element("div", e5, i4);
                return t5 && (o4.className = t5), o4;
              }
              sandbox() {
                var t5;
                const e5 = this.element("iframe", { sandbox: "allow-same-origin" });
                this.doc.body.appendChild(e5);
                const i4 = null === (t5 = e5.contentWindow) || void 0 === t5 ? void 0 : t5.document;
                if (!i4) throw Error("Iframe error");
                return i4.open(), i4.write("<!DOCTYPE html><html><head></head><body></body></html>"), i4.close(), [i4.body, e5];
              }
              span(t5, e5, i4) {
                const o4 = this.element("span", e5, i4);
                return t5 && (o4.className = t5), o4;
              }
              a(t5, e5, i4) {
                const o4 = this.element("a", e5, i4);
                return t5 && (o4.className = t5), o4;
              }
              text(t5) {
                return this.doc.createTextNode(t5);
              }
              fake() {
                return this.text(o3.INVISIBLE_SPACE);
              }
              fragment() {
                return this.doc.createDocumentFragment();
              }
              fromHTML(t5, e5) {
                const i4 = this.div();
                i4.innerHTML = t5.toString();
                const o4 = i4.firstChild === i4.lastChild && i4.firstChild ? i4.firstChild : i4;
                if (n2.J.safeRemove(o4), e5) {
                  const t6 = (0, r2.refs)(o4);
                  Object.keys(e5).forEach((i5) => {
                    const o5 = t6[i5];
                    o5 && false === e5[i5] && n2.J.hide(o5);
                  });
                }
                return o4;
              }
              applyCreateAttributes(t5) {
                if (this.createAttributes) {
                  const e5 = this.createAttributes;
                  if (e5 && e5[t5.tagName.toLowerCase()]) {
                    const i4 = e5[t5.tagName.toLowerCase()];
                    (0, r2.isFunction)(i4) ? i4(t5) : (0, r2.isPlainObject)(i4) && (0, r2.attr)(t5, i4);
                  }
                }
              }
            }
          }, 40594: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return o3.X;
            } });
            var o3 = i3(92852);
          }, 11961: function(t4, e4, i3) {
            i3.d(e4, { d: function() {
              return o3.Ay;
            } });
            var o3 = i3(26318);
          }, 87875: function(t4, e4, i3) {
            i3.d(e4, { OK: function() {
              return c;
            }, PO: function() {
              return a2;
            }, PP: function() {
              return l;
            } });
            var o3 = i3(64567), n2 = i3(55186), r2 = i3(9823), s = i3(76166);
            function a2(t5, e5) {
              const i4 = Object.getOwnPropertyDescriptor(t5, e5);
              return !i4 || (0, r2.Tn)(i4.get) ? null : i4.value;
            }
            function l(t5, e5, i4) {
              const o4 = i4.get;
              if (!o4) throw (0, s.z3)("Getter property descriptor expected");
              i4.get = function() {
                const t6 = o4.call(this);
                return t6 && true === t6.noCache || Object.defineProperty(this, e5, { configurable: i4.configurable, enumerable: i4.enumerable, writable: false, value: t6 }), t6;
              };
            }
            function c(t5, e5, i4) {
              const a3 = i4.value;
              if (!(0, r2.Tn)(a3)) throw (0, s.z3)("Handler must be a Function");
              let l2 = true;
              const c2 = /* @__PURE__ */ new WeakMap();
              i4.value = function(...t6) {
                var e6;
                if (l2 && c2.has(this.constructor)) return null === (e6 = c2.get(this.constructor)) || void 0 === e6 ? void 0 : e6.cloneNode(true);
                const i5 = a3.apply(this, t6);
                return l2 && n2.J.isElement(i5) && c2.set(this.constructor, i5), l2 ? i5.cloneNode(true) : i5;
              }, t5.hookStatus(o3.f.ready, (t6) => {
                const e6 = (0, r2.hH)(t6) ? t6 : t6.jodit;
                l2 = Boolean(e6.options.cache);
              });
            }
          }, 24767: function(t4, e4, i3) {
            function o3(t5) {
              class e5 extends t5 {
                constructor(...t6) {
                  super(...t6), this.constructor === e5 && (this instanceof e5 || Object.setPrototypeOf(this, e5.prototype), this.setStatus("ready"));
                }
              }
              return e5;
            }
            i3.d(e4, { s: function() {
              return o3;
            } });
          }, 37075: function(t4, e4, i3) {
            i3.d(e4, { n: function() {
              return a2;
            }, s: function() {
              return s;
            } });
            var o3 = i3(77753), n2 = i3(9823), r2 = (i3(28712), i3(50156));
            function s(t5, e5 = false, i4 = "debounce") {
              return (s2, a3) => {
                const l = s2[a3];
                if (!(0, n2.Tn)(l)) throw (0, r2.z3)("Handler must be a Function");
                return s2.hookStatus(o3.f.ready, (o4) => {
                  const { async: r3 } = o4, s3 = (0, n2.Tn)(t5) ? t5(o4) : t5, l2 = (0, n2.Et)(s3) || (0, n2.Qd)(s3) ? s3 : o4.defaultTimeout;
                  Object.defineProperty(o4, a3, { configurable: true, value: r3[i4](o4[a3].bind(o4), l2, e5) });
                }), { configurable: true, get() {
                  return l.bind(this);
                } };
              };
            }
            function a2(t5, e5 = false) {
              return s(t5, e5, "throttle");
            }
          }, 1963: function(t4, e4, i3) {
            i3.d(e4, { C: function() {
              return n2;
            } });
            var o3 = i3(69052);
            function n2(...t5) {
              return (e5) => {
                const i4 = e5.prototype;
                for (let e6 = 0; t5.length > e6; e6++) {
                  const n3 = t5[e6], r2 = Object.getOwnPropertyNames(n3.prototype);
                  for (let t6 = 0; r2.length > t6; t6++) {
                    const e7 = r2[t6], s = Object.getOwnPropertyDescriptor(n3.prototype, e7);
                    null != s && (0, o3.T)(s.value) && !(0, o3.T)(i4[e7]) && Object.defineProperty(i4, e7, { enumerable: true, configurable: true, writable: true, value: function(...t7) {
                      return s.value.call(this, ...t7);
                    } });
                  }
                }
              };
            }
          }, 71151: function(t4, e4, i3) {
            i3.d(e4, { A: function() {
              return r2;
            } });
            var o3 = i3(69052), n2 = i3(50156);
            function r2(t5) {
              return (e5, i4) => {
                if (!(0, o3.T)(e5[i4])) throw (0, n2.z3)("Handler must be a Function");
                e5.hookStatus(t5, (t6) => {
                  t6[i4].call(t6);
                });
              };
            }
          }, 86285: function(t4, e4, i3) {
            i3.d(e4, { N: function() {
              return s;
            } });
            var o3 = i3(77753), n2 = i3(69052), r2 = i3(50156);
            function s() {
              return (t5, e5) => {
                if (!(0, n2.T)(t5[e5])) throw (0, r2.z3)("Handler must be a Function");
                t5.hookStatus(o3.f.ready, (t6) => {
                  const { async: i4 } = t6, o4 = t6[e5];
                  t6[e5] = (...e6) => i4.requestIdleCallback(o4.bind(t6, ...e6));
                });
              };
            }
          }, 22664: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { autobind: function() {
              return o3.d;
            }, cache: function() {
              return n2.PP;
            }, cacheHTML: function() {
              return n2.OK;
            }, cached: function() {
              return n2.PO;
            }, component: function() {
              return r2.s;
            }, debounce: function() {
              return s.s;
            }, derive: function() {
              return a2.C;
            }, getPropertyDescriptor: function() {
              return p2.N;
            }, hook: function() {
              return l.A;
            }, idle: function() {
              return c.N;
            }, nonenumerable: function() {
              return d2.m;
            }, persistent: function() {
              return u2.y;
            }, throttle: function() {
              return s.n;
            }, wait: function() {
              return h2.u;
            }, watch: function() {
              return p2.w;
            } });
            var o3 = i3(11961), n2 = i3(87875), r2 = i3(24767), s = i3(37075), a2 = i3(1963), l = i3(71151), c = i3(86285), d2 = i3(48791), u2 = i3(33087), h2 = i3(48647), p2 = i3(66927);
          }, 48791: function(t4, e4, i3) {
            i3.d(e4, { m: function() {
              return o3;
            } });
            const o3 = (t5, e5) => {
              false !== (Object.getOwnPropertyDescriptor(t5, e5) || {}).enumerable && Object.defineProperty(t5, e5, { enumerable: false, set(t6) {
                Object.defineProperty(this, e5, { enumerable: false, writable: true, value: t6 });
              } });
            };
          }, 33087: function(t4, e4, i3) {
            i3.d(e4, { y: function() {
              return r2;
            } });
            var o3 = i3(64567), n2 = i3(12041);
            function r2(t5, e5) {
              t5.hookStatus(o3.f.ready, (t6) => {
                const i4 = (0, n2.h)(t6) ? t6 : t6.jodit, o4 = `${i4.options.namespace}${t6.componentName}_prop_${e5}`, r3 = t6[e5];
                Object.defineProperty(t6, e5, { get() {
                  var t7;
                  return null !== (t7 = i4.storage.get(o4)) && void 0 !== t7 ? t7 : r3;
                }, set(t7) {
                  i4.storage.set(o4, t7);
                } });
              });
            }
          }, 48647: function(t4, e4, i3) {
            i3.d(e4, { u: function() {
              return s;
            } });
            var o3 = i3(64567), n2 = i3(69052), r2 = i3(50156);
            function s(t5) {
              return (e5, i4) => {
                if (!(0, n2.T)(e5[i4])) throw (0, r2.z3)("Handler must be a Function");
                e5.hookStatus(o3.f.ready, (e6) => {
                  const { async: o4 } = e6, n3 = e6[i4];
                  let r3 = 0;
                  Object.defineProperty(e6, i4, { configurable: true, value: function i5(...s2) {
                    o4.clearTimeout(r3), t5(e6) ? n3.apply(e6, s2) : r3 = o4.setTimeout(() => i5(...s2), 10);
                  } });
                });
              };
            }
          }, 66927: function(t4, e4, i3) {
            i3.d(e4, { N: function() {
              return d2;
            }, w: function() {
              return u2;
            } });
            var o3 = i3(64567), n2 = i3(32332), r2 = i3(42589), s = i3(69052), a2 = i3(25376), l = i3(12041), c = i3(50156);
            function d2(t5, e5) {
              let i4;
              do {
                i4 = Object.getOwnPropertyDescriptor(t5, e5), t5 = Object.getPrototypeOf(t5);
              } while (!i4 && t5);
              return i4;
            }
            function u2(t5, e5) {
              return (i4, u3) => {
                var h2;
                if (!(0, s.T)(i4[u3])) throw (0, c.z3)("Handler must be a Function");
                const p2 = null === (h2 = null == e5 ? void 0 : e5.immediately) || void 0 === h2 || h2, f2 = null == e5 ? void 0 : e5.context, g2 = (e6) => {
                  const o4 = (0, l.h)(e6) ? e6 : e6.jodit;
                  let c2 = (t6, ...i5) => {
                    if (!e6.isInDestruct) return e6[u3](t6, ...i5);
                  };
                  p2 || (c2 = e6.async.microDebounce(c2, true)), (0, r2.u)(t5).forEach((t6) => {
                    if (/:/.test(t6)) {
                      const [i5, n3] = t6.split(":");
                      let r4 = f2;
                      return i5.length && (r4 = e6.get(i5)), (0, s.T)(r4) && (r4 = r4(e6)), o4.events.on(r4 || e6, n3, c2), r4 || o4.events.on(n3, c2), void e6.hookStatus("beforeDestruct", () => {
                        o4.events.off(r4 || e6, n3, c2).off(n3, c2);
                      });
                    }
                    const r3 = t6.split("."), [l2] = r3, u4 = r3.slice(1);
                    let h3 = e6[l2];
                    (0, a2.Q)(h3) && (0, n2.s)(h3).on(`change.${u4.join(".")}`, c2);
                    const p3 = d2(i4, l2);
                    Object.defineProperty(e6, l2, { configurable: true, set(t7) {
                      const i5 = h3;
                      i5 !== t7 && (h3 = t7, p3 && p3.set && p3.set.call(e6, t7), (0, a2.Q)(h3) && (h3 = (0, n2.s)(h3), h3.on(`change.${u4.join(".")}`, c2)), c2(l2, i5, h3));
                    }, get: () => p3 && p3.get ? p3.get.call(e6) : h3 });
                  });
                };
                (0, s.T)(i4.hookStatus) ? i4.hookStatus(o3.f.ready, g2) : g2(i4);
              };
            }
          }, 55186: function(t4, e4, i3) {
            i3.d(e4, { J: function() {
              return l;
            } });
            var o3 = i3(17352), n2 = i3(42448), r2 = i3(9823), s = i3(59101), a2 = i3(97369);
            class l {
              constructor() {
                throw new Error("Dom is static module");
              }
              static detach(t5) {
                for (; t5 && t5.firstChild; ) t5.removeChild(t5.firstChild);
              }
              static wrapInline(t5, e5, i4) {
                let o4, n3 = t5, s2 = t5;
                i4.s.save();
                let a3 = false;
                do {
                  a3 = false, o4 = n3.previousSibling, o4 && !l.isBlock(o4) && (a3 = true, n3 = o4);
                } while (a3);
                do {
                  a3 = false, o4 = s2.nextSibling, o4 && !l.isBlock(o4) && (a3 = true, s2 = o4);
                } while (a3);
                const c = (0, r2.Kg)(e5) ? i4.createInside.element(e5) : e5;
                n3.parentNode && n3.parentNode.insertBefore(c, n3);
                let d2 = n3;
                for (; d2 && (d2 = n3.nextSibling, c.appendChild(n3), n3 !== s2 && d2); ) n3 = d2;
                return i4.s.restore(), c;
              }
              static wrap(t5, e5, i4) {
                const o4 = (0, r2.Kg)(e5) ? i4.element(e5) : e5;
                if (l.isNode(t5)) {
                  if (!t5.parentNode) throw (0, a2.error)("Element should be in DOM");
                  t5.parentNode.insertBefore(o4, t5), o4.appendChild(t5);
                } else {
                  const e6 = t5.extractContents();
                  t5.insertNode(o4), o4.appendChild(e6);
                }
                return o4;
              }
              static unwrap(t5) {
                const e5 = t5.parentNode;
                if (e5) {
                  for (; t5.firstChild; ) e5.insertBefore(t5.firstChild, t5);
                  l.safeRemove(t5);
                }
              }
              static between(t5, e5, i4) {
                let o4 = t5;
                for (; o4 && o4 !== e5 && (t5 === o4 || !i4(o4)); ) {
                  let t6 = o4.firstChild || o4.nextSibling;
                  if (!t6) {
                    for (; o4 && !o4.nextSibling; ) o4 = o4.parentNode;
                    t6 = null == o4 ? void 0 : o4.nextSibling;
                  }
                  o4 = t6;
                }
              }
              static replace(t5, e5, i4, o4 = false, s2 = false) {
                (0, r2.AH)(e5) && (e5 = i4.fromHTML(e5));
                const a3 = (0, r2.Kg)(e5) ? i4.element(e5) : e5;
                if (!s2) for (; t5.firstChild; ) a3.appendChild(t5.firstChild);
                return o4 && l.isElement(t5) && l.isElement(a3) && (0, n2.$)(t5.attributes).forEach((t6) => {
                  a3.setAttribute(t6.name, t6.value);
                }), t5.parentNode && t5.parentNode.replaceChild(a3, t5), a3;
              }
              static isEmptyTextNode(t5) {
                return l.isText(t5) && (!t5.nodeValue || 0 === t5.nodeValue.replace(o3.INVISIBLE_SPACE_REG_EXP(), "").trim().length);
              }
              static isEmptyContent(t5) {
                return l.each(t5, (t6) => l.isEmptyTextNode(t6));
              }
              static isContentEditable(t5, e5) {
                return l.isNode(t5) && !l.closest(t5, (t6) => l.isElement(t6) && "false" === t6.getAttribute("contenteditable"), e5);
              }
              static isEmpty(t5, e5 = o3.NO_EMPTY_TAGS) {
                if (!t5) return true;
                let i4;
                i4 = (0, r2.Tn)(e5) ? e5 : (t6) => e5.has(t6.nodeName.toLowerCase());
                const n3 = (t6) => null == t6.nodeValue || 0 === (0, s.Bq)(t6.nodeValue).length;
                return l.isText(t5) ? n3(t5) : !(l.isElement(t5) && i4(t5)) && l.each(t5, (t6) => {
                  if (l.isText(t6) && !n3(t6) || l.isElement(t6) && i4(t6)) return false;
                });
              }
              static isNode(t5) {
                return Boolean(t5 && (0, r2.Kg)(t5.nodeName) && "number" == typeof t5.nodeType && t5.childNodes && (0, r2.Tn)(t5.appendChild));
              }
              static isCell(t5) {
                return l.isNode(t5) && ("TD" === t5.nodeName || "TH" === t5.nodeName);
              }
              static isList(t5) {
                return l.isTag(t5, o3.LIST_TAGS);
              }
              static isLeaf(t5) {
                return l.isTag(t5, "li");
              }
              static isImage(t5) {
                return l.isNode(t5) && /^(img|svg|picture|canvas)$/i.test(t5.nodeName);
              }
              static isBlock(t5) {
                return !(0, r2.Rd)(t5) && "object" == typeof t5 && l.isNode(t5) && o3.IS_BLOCK.test(t5.nodeName);
              }
              static isText(t5) {
                return Boolean(t5 && t5.nodeType === Node.TEXT_NODE);
              }
              static isComment(t5) {
                return Boolean(t5 && t5.nodeType === Node.COMMENT_NODE);
              }
              static isElement(t5) {
                var e5;
                if (!l.isNode(t5)) return false;
                const i4 = null === (e5 = t5.ownerDocument) || void 0 === e5 ? void 0 : e5.defaultView;
                return Boolean(i4 && t5.nodeType === Node.ELEMENT_NODE);
              }
              static isFragment(t5) {
                var e5;
                if (!l.isNode(t5)) return false;
                const i4 = null === (e5 = t5.ownerDocument) || void 0 === e5 ? void 0 : e5.defaultView;
                return Boolean(i4 && t5.nodeType === Node.DOCUMENT_FRAGMENT_NODE);
              }
              static isHTMLElement(t5) {
                var e5;
                if (!l.isNode(t5)) return false;
                const i4 = null === (e5 = t5.ownerDocument) || void 0 === e5 ? void 0 : e5.defaultView;
                return Boolean(i4 && t5 instanceof i4.HTMLElement);
              }
              static isInlineBlock(t5) {
                return l.isElement(t5) && !/^(BR|HR)$/i.test(t5.tagName) && -1 !== ["inline", "inline-block"].indexOf((0, a2.css)(t5, "display").toString());
              }
              static canSplitBlock(t5) {
                return !(0, r2.Rd)(t5) && l.isHTMLElement(t5) && l.isBlock(t5) && !/^(TD|TH|CAPTION|FORM)$/.test(t5.nodeName) && void 0 !== t5.style && !/^(fixed|absolute)/i.test(t5.style.position);
              }
              static last(t5, e5) {
                let i4 = null == t5 ? void 0 : t5.lastChild;
                if (!i4) return null;
                do {
                  if (e5(i4)) return i4;
                  let o4 = i4.lastChild;
                  if (o4 || (o4 = i4.previousSibling), !o4 && i4.parentNode !== t5) {
                    do {
                      i4 = i4.parentNode;
                    } while (i4 && !(null == i4 ? void 0 : i4.previousSibling) && i4.parentNode !== t5);
                    o4 = null == i4 ? void 0 : i4.previousSibling;
                  }
                  i4 = o4;
                } while (i4);
                return null;
              }
              static prev(t5, e5, i4, o4 = true) {
                return l.find(t5, e5, i4, false, o4);
              }
              static next(t5, e5, i4, o4 = true) {
                return l.find(t5, e5, i4, true, o4);
              }
              static prevWithClass(t5, e5) {
                return l.prev(t5, (t6) => l.isElement(t6) && t6.classList.contains(e5), t5.parentNode);
              }
              static nextWithClass(t5, e5) {
                return l.next(t5, (t6) => l.isElement(t6) && t6.classList.contains(e5), t5.parentNode);
              }
              static find(t5, e5, i4, o4 = true, n3 = true) {
                const r3 = this.nextGen(t5, i4, o4, n3);
                let s2 = r3.next();
                for (; !s2.done; ) {
                  if (e5(s2.value)) return s2.value;
                  s2 = r3.next();
                }
                return null;
              }
              static *nextGen(t5, e5, i4 = true, o4 = true) {
                const n3 = [];
                let r3 = t5;
                do {
                  let e6 = i4 ? r3.nextSibling : r3.previousSibling;
                  for (; e6; ) n3.unshift(e6), e6 = i4 ? e6.nextSibling : e6.previousSibling;
                  yield* this.runInStack(t5, n3, i4, o4), r3 = r3.parentNode;
                } while (r3 && r3 !== e5);
                return null;
              }
              static each(t5, e5, i4 = true) {
                const o4 = this.eachGen(t5, i4);
                let n3 = o4.next();
                for (; !n3.done; ) {
                  if (false === e5(n3.value)) return false;
                  n3 = o4.next();
                }
                return true;
              }
              static eachGen(t5, e5 = true) {
                return this.runInStack(t5, [t5], e5);
              }
              static *runInStack(t5, e5, i4, o4 = true) {
                for (; e5.length; ) {
                  const n3 = e5.pop();
                  if (o4) {
                    let t6 = i4 ? n3.lastChild : n3.firstChild;
                    for (; t6; ) e5.push(t6), t6 = i4 ? t6.previousSibling : t6.nextSibling;
                  }
                  t5 !== n3 && (yield n3);
                }
              }
              static findWithCurrent(t5, e5, i4, o4 = "nextSibling", n3 = "firstChild") {
                let r3 = t5;
                do {
                  if (e5(r3)) return r3 || null;
                  if (n3 && r3 && r3[n3]) {
                    const t6 = l.findWithCurrent(r3[n3], e5, r3, o4, n3);
                    if (t6) return t6;
                  }
                  for (; r3 && !r3[o4] && r3 !== i4; ) r3 = r3.parentNode;
                  r3 && r3[o4] && r3 !== i4 && (r3 = r3[o4]);
                } while (r3 && r3 !== i4);
                return null;
              }
              static findSibling(t5, e5 = true, i4 = (t6) => !l.isEmptyTextNode(t6)) {
                let o4 = l.sibling(t5, e5);
                for (; o4 && !i4(o4); ) o4 = l.sibling(o4, e5);
                return o4 && i4(o4) ? o4 : null;
              }
              static findNotEmptySibling(t5, e5) {
                return l.findSibling(t5, e5, (t6) => {
                  var e6;
                  return !l.isEmptyTextNode(t6) && Boolean(!l.isText(t6) || (null === (e6 = t6.nodeValue) || void 0 === e6 ? void 0 : e6.length) && (0, s.Bq)(t6.nodeValue));
                });
              }
              static findNotEmptyNeighbor(t5, e5, i4) {
                return (0, a2.call)(e5 ? l.prev : l.next, t5, (t6) => Boolean(t6 && (!(l.isText(t6) || l.isComment(t6)) || (0, s.Bq)((null == t6 ? void 0 : t6.nodeValue) || "").length)), i4);
              }
              static sibling(t5, e5) {
                return e5 ? t5.previousSibling : t5.nextSibling;
              }
              static up(t5, e5, i4, o4 = false) {
                let n3 = t5;
                if (!n3) return null;
                do {
                  if (e5(n3)) return n3;
                  if (n3 === i4 || !n3.parentNode) break;
                  n3 = n3.parentNode;
                } while (n3 && n3 !== i4);
                return n3 === i4 && o4 && e5(n3) ? n3 : null;
              }
              static closest(t5, e5, i4) {
                let o4;
                const n3 = (t6) => t6.toLowerCase();
                if ((0, r2.Tn)(e5)) o4 = e5;
                else if ((0, r2.cy)(e5) || (0, r2.vM)(e5)) {
                  const t6 = (0, r2.vM)(e5) ? e5 : new Set(e5.map(n3));
                  o4 = (e6) => Boolean(e6 && t6.has(n3(e6.nodeName)));
                } else o4 = (t6) => Boolean(t6 && n3(e5) === n3(t6.nodeName));
                return l.up(t5, o4, i4);
              }
              static furthest(t5, e5, i4) {
                let o4 = null, n3 = null == t5 ? void 0 : t5.parentElement;
                for (; n3 && n3 !== i4; ) e5(n3) && (o4 = n3), n3 = null == n3 ? void 0 : n3.parentElement;
                return o4;
              }
              static appendChildFirst(t5, e5) {
                const i4 = t5.firstChild;
                i4 ? i4 !== e5 && t5.insertBefore(e5, i4) : t5.appendChild(e5);
              }
              static after(t5, e5) {
                const { parentNode: i4 } = t5;
                i4 && (i4.lastChild === t5 ? i4.appendChild(e5) : i4.insertBefore(e5, t5.nextSibling));
              }
              static before(t5, e5) {
                const { parentNode: i4 } = t5;
                i4 && i4.insertBefore(e5, t5);
              }
              static prepend(t5, e5) {
                t5.insertBefore(e5, t5.firstChild);
              }
              static append(t5, e5) {
                (0, r2.cy)(e5) ? e5.forEach((e6) => {
                  this.append(t5, e6);
                }) : t5.appendChild(e5);
              }
              static moveContent(t5, e5, i4 = false, o4 = () => true) {
                const r3 = (t5.ownerDocument || document).createDocumentFragment();
                (0, n2.$)(t5.childNodes).filter((t6) => !!o4(t6) || (l.safeRemove(t6), false)).forEach((t6) => {
                  r3.appendChild(t6);
                }), i4 && e5.firstChild ? e5.insertBefore(r3, e5.firstChild) : e5.appendChild(r3);
              }
              static isOrContains(t5, e5, i4 = false) {
                return t5 === e5 ? !i4 : Boolean(e5 && t5 && this.up(e5, (e6) => e6 === t5, t5, true));
              }
              static safeRemove(...t5) {
                t5.forEach((t6) => l.isNode(t6) && t6.parentNode && t6.parentNode.removeChild(t6));
              }
              static safeInsertNode(t5, e5) {
                t5.collapsed || t5.deleteContents();
                const i4 = l.isFragment(e5) ? e5.lastChild : e5;
                t5.startContainer === t5.endContainer && t5.collapsed && l.isTag(t5.startContainer, o3.INSEPARABLE_TAGS) ? l.after(t5.startContainer, e5) : (t5.insertNode(e5), i4 && t5.setStartBefore(i4)), t5.collapse(true), [e5.nextSibling, e5.previousSibling].forEach((t6) => l.isText(t6) && !t6.nodeValue && l.safeRemove(t6));
              }
              static hide(t5) {
                t5 && ((0, a2.dataBind)(t5, "__old_display", t5.style.display), t5.style.display = "none");
              }
              static show(t5) {
                if (!t5) return;
                const e5 = (0, a2.dataBind)(t5, "__old_display");
                "none" === t5.style.display && (t5.style.display = e5 || "");
              }
              static isTag(t5, e5) {
                if (!this.isElement(t5)) return false;
                const i4 = t5.tagName.toLowerCase(), o4 = t5.tagName.toUpperCase();
                if (e5 instanceof Set) return e5.has(i4) || e5.has(o4);
                if (Array.isArray(e5)) throw new TypeError("Dom.isTag does not support array");
                return i4 === e5 || o4 === e5;
              }
              static markTemporary(t5, e5) {
                return e5 && (0, a2.attr)(t5, e5), (0, a2.attr)(t5, o3.TEMP_ATTR, true), t5;
              }
              static isTemporary(t5) {
                return !!l.isElement(t5) && ((0, r2.rg)(t5) || "true" === (0, a2.attr)(t5, o3.TEMP_ATTR));
              }
              static replaceTemporaryFromString(t5) {
                return t5.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi, "$2");
              }
              static temporaryList(t5) {
                return (0, a2.$$)(`[${o3.TEMP_ATTR}]`, t5);
              }
            }
          }, 71842: function(t4, e4, i3) {
            i3.d(e4, { J: function() {
              return o3.J;
            }, p: function() {
              return n2.p;
            } });
            var o3 = i3(55186), n2 = i3(8453);
          }, 8453: function(t4, e4, i3) {
            i3.d(e4, { p: function() {
              return a2;
            } });
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(55186), s = i3(43431);
            class a2 extends s.h {
              setWork(t5) {
                return this.isWorked && this.break(), this.workNodes = r2.J.eachGen(t5, !this.options.reverse), this.isFinished = false, this.startIdleRequest(), this;
              }
              constructor(t5, e5 = {}) {
                super(), this.async = t5, this.options = e5, this.workNodes = null, this.hadAffect = false, this.isWorked = false, this.isFinished = false, this.idleId = 0;
              }
              startIdleRequest() {
                var t5;
                this.idleId = this.async.requestIdleCallback(this.workPerform, { timeout: null !== (t5 = this.options.timeout) && void 0 !== t5 ? t5 : 10 });
              }
              break(t5) {
                this.isWorked && (this.stop(), this.emit("break", t5));
              }
              end() {
                this.isWorked && (this.stop(), this.emit("end", this.hadAffect), this.hadAffect = false);
              }
              stop() {
                this.isWorked = false, this.isFinished = true, this.workNodes = null, this.async.cancelIdleCallback(this.idleId);
              }
              destruct() {
                super.destruct(), this.stop();
              }
              workPerform(t5) {
                var e5;
                if (this.workNodes) {
                  this.isWorked = true;
                  let i4 = 0;
                  const o4 = null !== (e5 = this.options.timeoutChunkSize) && void 0 !== e5 ? e5 : 50;
                  for (; !this.isFinished && (t5.timeRemaining() > 0 || t5.didTimeout && o4 >= i4); ) {
                    const t6 = this.workNodes.next();
                    if (i4 += 1, this.visitNode(t6.value) && (this.hadAffect = true), t6.done) return void this.end();
                  }
                } else this.end();
                this.isFinished || this.startIdleRequest();
              }
              visitNode(t5) {
                var e5;
                return !(!t5 || void 0 !== this.options.whatToShow && t5.nodeType !== this.options.whatToShow) && null !== (e5 = this.emit("visit", t5)) && void 0 !== e5 && e5;
              }
            }
            (0, o3.Cg)([n2.autobind], a2.prototype, "workPerform", null);
          }, 50658: function(t4, e4, i3) {
            i3.d(e4, { b: function() {
              return d2;
            } });
            var o3 = i3(17352), n2 = i3(42589), r2 = i3(37923), s = i3(69052), a2 = i3(98253), l = i3(50156), c = i3(10004);
            class d2 {
              mute(t5) {
                return this.__mutedEvents.add(null != t5 ? t5 : "*"), this;
              }
              isMuted(t5) {
                return !(!t5 || !this.__mutedEvents.has(t5)) || this.__mutedEvents.has("*");
              }
              unmute(t5) {
                return this.__mutedEvents.delete(null != t5 ? t5 : "*"), this;
              }
              __eachEvent(t5, e5) {
                (0, n2.u)(t5).map((t6) => t6.trim()).forEach((t6) => {
                  const i4 = t6.split(".");
                  e5.call(this, i4[0], i4[1] || c.X);
                });
              }
              __getStore(t5) {
                if (!t5) throw (0, l.z3)("Need subject");
                if (void 0 === t5[this.__key]) {
                  const e5 = new c.d();
                  Object.defineProperty(t5, this.__key, { enumerable: false, configurable: true, writable: true, value: e5 });
                }
                return t5[this.__key];
              }
              __removeStoreFromSubject(t5) {
                void 0 !== t5[this.__key] && Object.defineProperty(t5, this.__key, { enumerable: false, configurable: true, writable: true, value: void 0 });
              }
              __triggerNativeEvent(t5, e5) {
                const i4 = this.__doc.createEvent("HTMLEvents");
                (0, a2.K)(e5) ? i4.initEvent(e5, true, true) : (i4.initEvent(e5.type, e5.bubbles, e5.cancelable), ["screenX", "screenY", "clientX", "clientY", "target", "srcElement", "currentTarget", "timeStamp", "which", "keyCode"].forEach((t6) => {
                  Object.defineProperty(i4, t6, { value: e5[t6], enumerable: true });
                }), Object.defineProperty(i4, "originalEvent", { value: e5, enumerable: true })), t5.dispatchEvent(i4);
              }
              get current() {
                return this.currents[this.currents.length - 1];
              }
              on(t5, e5, i4, n3) {
                let c2, d3, h2, p2;
                if ((0, a2.K)(t5) || (0, a2.B)(t5) ? (c2 = this, d3 = t5, h2 = e5, p2 = i4) : (c2 = t5, d3 = e5, h2 = i4, p2 = n3), !(0, a2.K)(d3) && !(0, a2.B)(d3) || 0 === d3.length) throw (0, l.z3)("Need events names");
                if (!(0, s.T)(h2)) throw (0, l.z3)("Need event handler");
                if ((0, r2.c)(c2)) return c2.forEach((t6) => {
                  this.on(t6, d3, h2, p2);
                }), this;
                const f2 = c2, g2 = this.__getStore(f2), m2 = this;
                let b2 = function(t6, ...e6) {
                  if (!m2.isMuted(t6)) return h2 && h2.call(this, ...e6);
                };
                return u2(f2) && (b2 = function(t6) {
                  if (!m2.isMuted(t6.type)) return m2.__prepareEvent(t6), h2 && false === h2.call(this, t6) ? (t6.preventDefault(), t6.stopImmediatePropagation(), false) : void 0;
                }), this.__eachEvent(d3, (t6, e6) => {
                  var i5, n4;
                  if (0 === t6.length) throw (0, l.z3)("Need event name");
                  if (false === g2.indexOf(t6, e6, h2) && (g2.set(t6, e6, { event: t6, originalCallback: h2, syntheticCallback: b2 }, null == p2 ? void 0 : p2.top), u2(f2))) {
                    const e7 = o3.PASSIVE_EVENTS.has(t6) ? { passive: true, capture: null !== (i5 = null == p2 ? void 0 : p2.capture) && void 0 !== i5 && i5 } : null !== (n4 = null == p2 ? void 0 : p2.capture) && void 0 !== n4 && n4;
                    b2.options = e7, f2.addEventListener(t6, b2, e7), this.__memoryDOMSubjectToHandler(f2, b2);
                  }
                }), this;
              }
              __memoryDOMSubjectToHandler(t5, e5) {
                const i4 = this.__domEventsMap.get(t5) || /* @__PURE__ */ new Set();
                i4.add(e5), this.__domEventsMap.set(t5, i4);
              }
              __unmemoryDOMSubjectToHandler(t5, e5) {
                const i4 = this.__domEventsMap, o4 = i4.get(t5) || /* @__PURE__ */ new Set();
                o4.delete(e5), o4.size ? i4.set(t5, o4) : i4.delete(t5);
              }
              one(t5, e5, i4, o4) {
                let n3, r3, s2, l2;
                (0, a2.K)(t5) || (0, a2.B)(t5) ? (n3 = this, r3 = t5, s2 = e5, l2 = i4) : (n3 = t5, r3 = e5, s2 = i4, l2 = o4);
                const c2 = (...t6) => (this.off(n3, r3, c2), s2(...t6));
                return this.on(n3, r3, c2, l2), this;
              }
              off(t5, e5, i4) {
                let o4, n3, l2;
                if ((0, a2.K)(t5) || (0, a2.B)(t5) ? (o4 = this, n3 = t5, l2 = e5) : (o4 = t5, n3 = e5, l2 = i4), (0, r2.c)(o4)) return o4.forEach((t6) => {
                  this.off(t6, n3, l2);
                }), this;
                const d3 = o4, h2 = this.__getStore(d3);
                if (!(0, a2.K)(n3) && !(0, a2.B)(n3) || 0 === n3.length) return h2.namespaces().forEach((t6) => {
                  this.off(d3, "." + t6);
                }), this.__removeStoreFromSubject(d3), this;
                const p2 = (t6) => {
                  var e6;
                  u2(d3) && (d3.removeEventListener(t6.event, t6.syntheticCallback, null !== (e6 = t6.syntheticCallback.options) && void 0 !== e6 && e6), this.__unmemoryDOMSubjectToHandler(d3, t6.syntheticCallback));
                }, f2 = (t6, e6) => {
                  if ("" === t6) return void h2.events(e6).forEach((t7) => {
                    "" !== t7 && f2(t7, e6);
                  });
                  const i5 = h2.get(t6, e6);
                  if (i5 && i5.length) if ((0, s.T)(l2)) {
                    const o5 = h2.indexOf(t6, e6, l2);
                    false !== o5 && (p2(i5[o5]), i5.splice(o5, 1), i5.length || h2.clearEvents(e6, t6));
                  } else i5.forEach(p2), i5.length = 0, h2.clearEvents(e6, t6);
                };
                return this.__eachEvent(n3, (t6, e6) => {
                  e6 === c.X ? h2.namespaces().forEach((e7) => {
                    f2(t6, e7);
                  }) : f2(t6, e6);
                }), h2.isEmpty() && this.__removeStoreFromSubject(d3), this;
              }
              stopPropagation(t5, e5) {
                const i4 = (0, a2.K)(t5) ? this : t5, o4 = (0, a2.K)(t5) ? t5 : e5;
                if ("string" != typeof o4) throw (0, l.z3)("Need event names");
                const n3 = this.__getStore(i4);
                this.__eachEvent(o4, (t6, e6) => {
                  const o5 = n3.get(t6, e6);
                  o5 && this.__stopped.push(o5), e6 === c.X && n3.namespaces(true).forEach((e7) => this.stopPropagation(i4, t6 + "." + e7));
                });
              }
              __removeStop(t5) {
                if (t5) {
                  const e5 = this.__stopped.indexOf(t5);
                  -1 !== e5 && this.__stopped.splice(0, e5 + 1);
                }
              }
              __isStopped(t5) {
                return void 0 !== t5 && -1 !== this.__stopped.indexOf(t5);
              }
              fire(t5, e5, ...i4) {
                let o4, n3;
                const r3 = (0, a2.K)(t5) ? this : t5, s2 = (0, a2.K)(t5) ? t5 : e5, d3 = (0, a2.K)(t5) ? [e5, ...i4] : i4;
                if (!u2(r3) && !(0, a2.K)(s2)) throw (0, l.z3)("Need events names");
                const h2 = this.__getStore(r3);
                return !(0, a2.K)(s2) && u2(r3) ? this.__triggerNativeEvent(r3, e5) : this.__eachEvent(s2, (t6, e6) => {
                  if (u2(r3)) this.__triggerNativeEvent(r3, t6);
                  else {
                    const i5 = h2.get(t6, e6);
                    if (i5) try {
                      [...i5].every((e7) => !this.__isStopped(i5) && (this.currents.push(t6), n3 = e7.syntheticCallback.call(r3, t6, ...d3), this.currents.pop(), void 0 !== n3 && (o4 = n3), true));
                    } finally {
                      this.__removeStop(i5);
                    }
                    e6 !== c.X || u2(r3) || h2.namespaces().filter((t7) => t7 !== e6).forEach((e7) => {
                      const i6 = this.fire.apply(this, [r3, t6 + "." + e7, ...d3]);
                      void 0 !== i6 && (o4 = i6);
                    });
                  }
                }), o4;
              }
              constructor(t5) {
                this.__domEventsMap = /* @__PURE__ */ new Map(), this.__mutedEvents = /* @__PURE__ */ new Set(), this.__key = "__JoditEventEmitterNamespaces", this.__doc = document, this.__prepareEvent = (t6) => {
                  t6.cancelBubble || (t6.composed && (0, s.T)(t6.composedPath) && t6.composedPath()[0] && Object.defineProperty(t6, "target", { value: t6.composedPath()[0], configurable: true, enumerable: true }), t6.type.match(/^touch/) && t6.changedTouches && t6.changedTouches.length && ["clientX", "clientY", "pageX", "pageY"].forEach((e5) => {
                    Object.defineProperty(t6, e5, { value: t6.changedTouches[0][e5], configurable: true, enumerable: true });
                  }), t6.originalEvent || (t6.originalEvent = t6), "paste" === t6.type && void 0 === t6.clipboardData && this.__doc.defaultView.clipboardData && Object.defineProperty(t6, "clipboardData", { get: () => this.__doc.defaultView.clipboardData, configurable: true, enumerable: true }));
                }, this.currents = [], this.__stopped = [], this.__isDestructed = false, t5 && (this.__doc = t5), this.__key += (/* @__PURE__ */ new Date()).getTime();
              }
              destruct() {
                this.__isDestructed || (this.__isDestructed = true, this.__domEventsMap.forEach((t5, e5) => {
                  this.off(e5);
                }), this.__domEventsMap.clear(), this.__mutedEvents.clear(), this.currents.length = 0, this.__stopped.length = 0, this.off(this), this.__getStore(this).clear(), this.__removeStoreFromSubject(this));
              }
            }
            function u2(t5) {
              return (0, s.T)(t5.addEventListener);
            }
          }, 43431: function(t4, e4, i3) {
            i3.d(e4, { h: function() {
              return o3;
            } });
            class o3 {
              constructor() {
                this.__map = /* @__PURE__ */ new Map();
              }
              on(t5, e5) {
                var i4;
                return this.__map.has(t5) || this.__map.set(t5, /* @__PURE__ */ new Set()), null === (i4 = this.__map.get(t5)) || void 0 === i4 || i4.add(e5), this;
              }
              off(t5, e5) {
                var i4;
                return this.__map.has(t5) && (null === (i4 = this.__map.get(t5)) || void 0 === i4 || i4.delete(e5)), this;
              }
              destruct() {
                this.__map.clear();
              }
              emit(t5, ...e5) {
                var i4;
                let o4;
                return this.__map.has(t5) && (null === (i4 = this.__map.get(t5)) || void 0 === i4 || i4.forEach((t6) => {
                  o4 = t6(...e5);
                })), o4;
              }
            }
          }, 50025: function(t4, e4, i3) {
            i3.d(e4, { Xr: function() {
              return s.X;
            }, bk: function() {
              return o3.b;
            }, d$: function() {
              return s.d;
            }, h5: function() {
              return n2.h;
            }, sH: function() {
              return r2.s;
            } });
            var o3 = i3(50658), n2 = i3(43431), r2 = i3(32332), s = i3(10004);
          }, 32332: function(t4, e4, i3) {
            i3.d(e4, { s: function() {
              return c;
            } });
            var o3 = i3(66927), n2 = i3(37923), r2 = i3(69810), s = i3(25376);
            const a2 = Symbol("observable-object");
            function l(t5) {
              return void 0 !== t5[a2];
            }
            function c(t5) {
              if (l(t5)) return t5;
              const e5 = {}, i4 = {}, c2 = (e6, o4) => (0, n2.c)(e6) ? (e6.map((t6) => c2(t6, o4)), t5) : (i4[e6] || (i4[e6] = []), i4[e6].push(o4), t5), d2 = (o4, ...r3) => {
                if ((0, n2.c)(o4)) o4.map((t6) => d2(t6, ...r3));
                else try {
                  !e5[o4] && i4[o4] && (e5[o4] = true, i4[o4].forEach((e6) => e6.call(t5, ...r3)));
                } finally {
                  e5[o4] = false;
                }
              }, u2 = (e6, i5 = []) => {
                const n3 = {};
                l(e6) || (Object.defineProperty(e6, a2, { enumerable: false, value: true }), Object.keys(e6).forEach((a3) => {
                  const l2 = a3, c3 = i5.concat(l2).filter((t6) => t6.length);
                  n3[l2] = e6[l2];
                  const h2 = (0, o3.N)(e6, l2);
                  Object.defineProperty(e6, l2, { set: (e7) => {
                    const i6 = n3[l2];
                    if (!(0, r2.P)(n3[l2], e7)) {
                      d2(["beforeChange", `beforeChange.${c3.join(".")}`], l2, e7), (0, s.Q)(e7) && u2(e7, c3), h2 && h2.set ? h2.set.call(t5, e7) : n3[l2] = e7;
                      const o4 = [];
                      d2(["change", ...c3.reduce((t6, e8) => (o4.push(e8), t6.push(`change.${o4.join(".")}`), t6), [])], c3.join("."), i6, (null == e7 ? void 0 : e7.valueOf) ? e7.valueOf() : e7);
                    }
                  }, get: () => h2 && h2.get ? h2.get.call(t5) : n3[l2], enumerable: true, configurable: true }), (0, s.Q)(n3[l2]) && u2(n3[l2], c3);
                }), Object.defineProperty(t5, "on", { value: c2 }));
              };
              return u2(t5), t5;
            }
          }, 10004: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return n2;
            }, d: function() {
              return r2;
            } });
            var o3 = i3(42448);
            i3(28712);
            const n2 = "JoditEventDefaultNamespace";
            class r2 {
              constructor() {
                this.__store = /* @__PURE__ */ new Map();
              }
              get(t5, e5) {
                if (this.__store.has(e5)) return this.__store.get(e5)[t5];
              }
              indexOf(t5, e5, i4) {
                const o4 = this.get(t5, e5);
                if (o4) {
                  for (let t6 = 0; o4.length > t6; t6 += 1) if (o4[t6].originalCallback === i4) return t6;
                }
                return false;
              }
              namespaces(t5 = false) {
                const e5 = (0, o3.$)(this.__store.keys());
                return t5 ? e5.filter((t6) => t6 !== n2) : e5;
              }
              events(t5) {
                const e5 = this.__store.get(t5);
                return e5 ? Object.keys(e5) : [];
              }
              set(t5, e5, i4, o4 = false) {
                let n3 = this.__store.get(e5);
                n3 || (n3 = {}, this.__store.set(e5, n3)), void 0 === n3[t5] && (n3[t5] = []), o4 ? n3[t5].unshift(i4) : n3[t5].push(i4);
              }
              clear() {
                this.__store.clear();
              }
              clearEvents(t5, e5) {
                const i4 = this.__store.get(t5);
                i4 && i4[e5] && (delete i4[e5], Object.keys(i4).length || this.__store.delete(t5));
              }
              isEmpty() {
                return 0 === this.__store.size;
              }
            }
          }, 56298: function(t4, e4, i3) {
            i3.d(e4, { JW: function() {
              return _2;
            }, My: function() {
              return x;
            }, RR: function() {
              return w;
            }, VF: function() {
              return h2;
            }, av: function() {
              return b2;
            }, fg: function() {
              return m2;
            }, w9: function() {
              return g2;
            } });
            var o3 = i3(83044), n2 = i3(98253), r2 = i3(12041), s = i3(449), a2 = i3(75766), l = i3(77402), c = i3(17352), d2 = i3(71842), u2 = i3(50025);
            const h2 = {};
            let p2 = 1;
            const f2 = /* @__PURE__ */ new Set();
            function g2() {
              function t5() {
                return p2 += 10 * (Math.random() + 1), Math.round(p2).toString(16);
              }
              let e5 = t5();
              for (; f2.has(e5); ) e5 = t5();
              return f2.add(e5), e5;
            }
            const m2 = new l.$(), b2 = {}, _2 = (t5) => {
              Object.keys(t5).forEach((e5) => {
                c.lang[e5] ? Object.assign(c.lang[e5], t5[e5]) : c.lang[e5] = t5[e5];
              });
            }, v2 = /* @__PURE__ */ new WeakMap();
            function x(t5, e5, i4 = "div", l2 = false) {
              const c2 = (0, n2.K)(e5) ? e5 : e5 ? (0, a2.u)(e5.prototype) : "jodit-utils", u3 = v2.get(t5) || {}, h3 = c2 + i4, p3 = (0, r2.h)(t5) ? t5 : t5.j;
              if (!u3[h3]) {
                let e6 = p3.c, n3 = (0, o3.y)(t5) && t5.o.shadowRoot ? t5.o.shadowRoot : t5.od.body;
                if (l2 && (0, o3.y)(t5) && t5.od !== t5.ed) {
                  e6 = t5.createInside;
                  const r4 = "style" === i4 ? t5.ed.head : t5.ed.body;
                  n3 = (0, o3.y)(t5) && t5.o.shadowRoot ? t5.o.shadowRoot : r4;
                }
                const r3 = e6.element(i4, { className: `jodit jodit-${(0, s.k)(c2)}-container jodit-box` });
                r3.classList.add(`jodit_theme_${p3.o.theme || "default"}`), n3.appendChild(r3), u3[h3] = r3, t5.hookStatus("beforeDestruct", () => {
                  d2.J.safeRemove(r3), delete u3[h3], Object.keys(u3).length && v2.delete(t5);
                }), v2.set(t5, u3);
              }
              return u3[h3].classList.remove("jodit_theme_default", "jodit_theme_dark"), u3[h3].classList.add(`jodit_theme_${p3.o.theme || "default"}`), u3[h3];
            }
            const w = new u2.bk();
          }, 82317: function(t4, e4, i3) {
            i3.d(e4, { _: function() {
              return n2;
            } });
            var o3 = i3(37923);
            const n2 = (t5) => (0, o3.c)(t5) ? t5 : [t5];
          }, 32709: function(t4, e4, i3) {
            i3.d(e4, { $r: function() {
              return r2.$;
            }, _j: function() {
              return o3._;
            }, uM: function() {
              return n2.u;
            } });
            var o3 = i3(82317), n2 = i3(42589), r2 = i3(42448);
          }, 42589: function(t4, e4, i3) {
            function o3(t5) {
              return Array.isArray(t5) ? t5 : t5.split(/[,\s]+/);
            }
            i3.d(e4, { u: function() {
              return o3;
            } });
          }, 42448: function(t4, e4, i3) {
            i3.d(e4, { $: function() {
              return r2;
            } });
            var o3 = i3(34796), n2 = i3(44210);
            const r2 = function(...t5) {
              var e5;
              return ((0, o3.a)(Array.from) ? Array.from : null !== (e5 = (0, n2.c)("Array.from")) && void 0 !== e5 ? e5 : Array.from).apply(Array, t5);
            };
          }, 89044: function(t4, e4, i3) {
            i3.d(e4, { D: function() {
              return o3.D;
            }, w: function() {
              return o3.w;
            } });
            var o3 = i3(59146);
          }, 59146: function(t4, e4, i3) {
            function o3(t5, e5, ...i4) {
              return e5 ? window.setTimeout(t5, e5, ...i4) : (t5.call(null, ...i4), 0);
            }
            function n2(t5) {
              window.clearTimeout(t5);
            }
            i3.d(e4, { D: function() {
              return n2;
            }, w: function() {
              return o3;
            } });
          }, 78479: function(t4, e4, i3) {
            function o3() {
              let t5 = true;
              try {
                const e5 = document.createElement("input");
                e5.type = "color", e5.value = "!", t5 = "color" === e5.type && "!" !== e5.value;
              } catch (e5) {
                t5 = false;
              }
              return t5;
            }
            i3.d(e4, { k: function() {
              return o3;
            } });
          }, 9823: function(t4, e4, i3) {
            i3.d(e4, { AH: function() {
              return c.A;
            }, Bo: function() {
              return y2.B;
            }, CE: function() {
              return d2.C;
            }, E6: function() {
              return h2.E;
            }, Et: function() {
              return b2.E;
            }, Gp: function() {
              return u2.n4;
            }, Kg: function() {
              return y2.K;
            }, Lm: function() {
              return s.L;
            }, Mj: function() {
              return f2.M;
            }, P5: function() {
              return a2.P;
            }, Qd: function() {
              return v2.Q;
            }, Rd: function() {
              return S2.R;
            }, Tn: function() {
              return l.T;
            }, a3: function() {
              return m2.a;
            }, cy: function() {
              return r2.c;
            }, hH: function() {
              return C2.h;
            }, kC: function() {
              return o3.k;
            }, kO: function() {
              return u2.kO;
            }, kf: function() {
              return _2.k;
            }, l6: function() {
              return z2.l;
            }, mv: function() {
              return j.m;
            }, n4: function() {
              return a2.n;
            }, pV: function() {
              return u2.pV;
            }, rg: function() {
              return g2.r;
            }, uV: function() {
              return k2.u;
            }, vM: function() {
              return w.v;
            }, y0: function() {
              return p2.y;
            }, yL: function() {
              return x.y;
            }, zf: function() {
              return n2.z;
            } });
            var o3 = i3(78479), n2 = i3(99951), r2 = i3(37923), s = i3(9810), a2 = i3(69810), l = i3(69052), c = i3(53701), d2 = i3(21811), u2 = i3(10058), h2 = i3(3947), p2 = i3(83044), f2 = i3(82201), g2 = i3(71274), m2 = i3(34796), b2 = i3(2461), _2 = i3(12461), v2 = i3(25376), x = i3(92039), w = i3(53470), y2 = i3(98253), j = i3(6939), k2 = i3(59082), C2 = i3(12041), S2 = i3(35642), z2 = i3(76776);
          }, 99951: function(t4, e4, i3) {
            function o3(t5) {
              return Boolean(t5) && t5 instanceof DOMException && "AbortError" === t5.name;
            }
            i3.d(e4, { z: function() {
              return o3;
            } });
          }, 37923: function(t4, e4, i3) {
            function o3(t5) {
              return Array.isArray(t5);
            }
            i3.d(e4, { c: function() {
              return o3;
            } });
          }, 9810: function(t4, e4, i3) {
            function o3(t5) {
              return "boolean" == typeof t5;
            }
            i3.d(e4, { L: function() {
              return o3;
            } });
          }, 69810: function(t4, e4, i3) {
            i3.d(e4, { P: function() {
              return r2;
            }, n: function() {
              return n2;
            } });
            var o3 = i3(28616);
            function n2(t5, e5) {
              return t5 === e5 || (0, o3.A)(t5) === (0, o3.A)(e5);
            }
            function r2(t5, e5) {
              return t5 === e5;
            }
          }, 69052: function(t4, e4, i3) {
            function o3(t5) {
              return "function" == typeof t5;
            }
            i3.d(e4, { T: function() {
              return o3;
            } });
          }, 21811: function(t4, e4, i3) {
            function o3(t5) {
              return -1 !== t5.search(/<meta.*?Microsoft Excel\s[\d].*?>/) || -1 !== t5.search(/<meta.*?Microsoft Word\s[\d].*?>/) || -1 !== t5.search(/style="[^"]*mso-/) && -1 !== t5.search(/<font/);
            }
            i3.d(e4, { C: function() {
              return o3;
            } });
          }, 53701: function(t4, e4, i3) {
            i3.d(e4, { A: function() {
              return n2;
            } });
            var o3 = i3(98253);
            const n2 = (t5) => (0, o3.K)(t5) && /<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(t5.replace(/[\r\n]/g, ""));
          }, 10058: function(t4, e4, i3) {
            i3.d(e4, { kO: function() {
              return l;
            }, n4: function() {
              return s;
            }, pV: function() {
              return a2;
            } });
            var o3 = i3(55186), n2 = i3(69052), r2 = i3(35642);
            function s(t5) {
              return !(0, r2.R)(t5) && (0, n2.T)(t5.init);
            }
            function a2(t5) {
              return !(0, r2.R)(t5) && (0, n2.T)(t5.destruct);
            }
            function l(t5) {
              return !(0, r2.R)(t5) && o3.J.isElement(t5.container);
            }
          }, 3947: function(t4, e4, i3) {
            i3.d(e4, { E: function() {
              return r2;
            } });
            var o3 = i3(12461), n2 = i3(98253);
            function r2(t5) {
              return (0, n2.K)(t5) && (0, o3.k)(t5) && (t5 = parseFloat(t5)), "number" == typeof t5 && Number.isFinite(t5) && !(t5 % 1);
            }
          }, 83044: function(t4, e4, i3) {
            i3.d(e4, { y: function() {
              return n2;
            } });
            var o3 = i3(69052);
            function n2(t5) {
              return Boolean(t5 && t5 instanceof Object && (0, o3.T)(t5.constructor) && ("undefined" != typeof Jodit && t5 instanceof Jodit || t5.isJodit));
            }
          }, 82201: function(t4, e4, i3) {
            i3.d(e4, { M: function() {
              return n2;
            } });
            var o3 = i3(98253);
            const n2 = (t5) => (0, o3.K)(t5) && 23 === t5.length && /^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(t5);
          }, 71274: function(t4, e4, i3) {
            i3.d(e4, { r: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(55186);
            function r2(t5) {
              return n2.J.isNode(t5) && n2.J.isTag(t5, "span") && t5.hasAttribute("data-" + o3.MARKER_CLASS);
            }
          }, 34796: function(t4, e4, i3) {
            function o3(t5) {
              return Boolean(t5) && "function" === (typeof t5).toLowerCase() && (t5 === Function.prototype || /^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(String(t5)));
            }
            i3.d(e4, { a: function() {
              return o3;
            } });
          }, 2461: function(t4, e4, i3) {
            function o3(t5) {
              return "number" == typeof t5 && !isNaN(t5) && isFinite(t5);
            }
            i3.d(e4, { E: function() {
              return o3;
            } });
          }, 12461: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return n2;
            } });
            var o3 = i3(98253);
            function n2(t5) {
              if ((0, o3.K)(t5)) {
                if (!t5.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/)) return false;
                t5 = parseFloat(t5);
              }
              return "number" == typeof t5 && !isNaN(t5) && isFinite(t5);
            }
          }, 25376: function(t4, e4, i3) {
            i3.d(e4, { Q: function() {
              return n2;
            } });
            var o3 = i3(76776);
            function n2(t5) {
              return !(!t5 || "object" != typeof t5 || t5.nodeType || (0, o3.l)(t5) || t5.constructor && !{}.hasOwnProperty.call(t5.constructor.prototype, "isPrototypeOf"));
            }
          }, 92039: function(t4, e4, i3) {
            function o3(t5) {
              return t5 && "function" == typeof t5.then;
            }
            i3.d(e4, { y: function() {
              return o3;
            } });
          }, 53470: function(t4, e4, i3) {
            i3.d(e4, { v: function() {
              return n2;
            } });
            var o3 = i3(69052);
            function n2(t5) {
              return Boolean(t5) && (0, o3.T)(t5.has) && (0, o3.T)(t5.add) && (0, o3.T)(t5.delete);
            }
          }, 98253: function(t4, e4, i3) {
            i3.d(e4, { B: function() {
              return r2;
            }, K: function() {
              return n2;
            } });
            var o3 = i3(37923);
            function n2(t5) {
              return "string" == typeof t5;
            }
            function r2(t5) {
              return (0, o3.c)(t5) && n2(t5[0]);
            }
          }, 6939: function(t4, e4, i3) {
            function o3(t5) {
              if (t5.includes(" ")) return false;
              if ("undefined" != typeof URL) try {
                const e6 = new URL(t5);
                return ["https:", "http:", "ftp:", "file:", "rtmp:"].includes(e6.protocol);
              } catch (t6) {
                return false;
              }
              const e5 = document.createElement("a");
              return e5.href = t5, Boolean(e5.hostname);
            }
            i3.d(e4, { m: function() {
              return o3;
            } });
          }, 59082: function(t4, e4, i3) {
            function o3(t5) {
              return !!t5.length && !/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(t5) && t5.trim().length > 0;
            }
            i3.d(e4, { u: function() {
              return o3;
            } });
          }, 12041: function(t4, e4, i3) {
            i3.d(e4, { h: function() {
              return n2;
            } });
            var o3 = i3(69052);
            function n2(t5) {
              return Boolean(t5 && t5 instanceof Object && (0, o3.T)(t5.constructor) && t5.isView);
            }
          }, 35642: function(t4, e4, i3) {
            function o3(t5) {
              return null == t5;
            }
            i3.d(e4, { R: function() {
              return o3;
            } });
          }, 76776: function(t4, e4, i3) {
            function o3(t5) {
              return null != t5 && t5 === t5.window;
            }
            i3.d(e4, { l: function() {
              return o3;
            } });
          }, 96768: function(t4, e4, i3) {
            i3.d(e4, { s: function() {
              return o3;
            } });
            const o3 = (t5) => {
              if ("rgba(0, 0, 0, 0)" === t5 || "" === t5) return false;
              if (!t5) return "#000000";
              if ("#" === t5.substr(0, 1)) return t5;
              const e5 = /([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(t5) || /([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(t5);
              if (!e5) return "#000000";
              const i4 = parseInt(e5[2], 10), o4 = parseInt(e5[3], 10);
              let n2 = (parseInt(e5[4], 10) | o4 << 8 | i4 << 16).toString(16).toUpperCase();
              for (; 6 > n2.length; ) n2 = "0" + n2;
              return e5[1] + "#" + n2;
            };
          }, 93495: function(t4, e4, i3) {
            i3.d(e4, { s: function() {
              return o3.s;
            } });
            var o3 = i3(96768);
          }, 56176: function(t4, e4, i3) {
            i3.d(e4, { Z: function() {
              return l;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(59101), s = i3(58720);
            function a2(t5) {
              return t5.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi, "").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi, "").replace(/border[a-z-]*:[\s]*[^;]+;/gi, "").replace(/([0-9.]+)(pt|cm)/gi, (t6, e5, i4) => {
                switch (i4.toLowerCase()) {
                  case "pt":
                    return (1.328 * parseFloat(e5)).toFixed(0) + "px";
                  case "cm":
                    return (0.02645833 * parseFloat(e5)).toFixed(0) + "px";
                }
                return t6;
              });
            }
            function l(t5) {
              if (-1 === t5.indexOf("<html ")) return t5;
              t5 = (t5 = t5.substring(t5.indexOf("<html "), t5.length)).substring(0, t5.lastIndexOf("</html>") + 7);
              const e5 = document.createElement("iframe");
              e5.style.display = "none", document.body.appendChild(e5);
              let i4 = "", l2 = [];
              try {
                const c = e5.contentDocument || (e5.contentWindow ? e5.contentWindow.document : null);
                if (c) {
                  c.open(), c.write(t5), c.close();
                  try {
                    for (let t6 = 0; c.styleSheets.length > t6; t6 += 1) {
                      const e6 = c.styleSheets[t6].cssRules;
                      for (let t7 = 0; e6.length > t7; t7 += 1) "" !== e6[t7].selectorText && (l2 = (0, s.$$)(e6[t7].selectorText, c.body), l2.forEach((i5) => {
                        i5.style.cssText = a2(e6[t7].style.cssText + ";" + i5.style.cssText);
                      }));
                    }
                  } catch (t6) {
                    if (!o3.IS_PROD) throw t6;
                  }
                  n2.J.each(c.body, (t6) => {
                    if (n2.J.isElement(t6)) {
                      const e6 = t6, i5 = e6.getAttribute("style");
                      i5 && (e6.style.cssText = a2(i5)), e6.hasAttribute("style") && !e6.getAttribute("style") && e6.removeAttribute("style");
                    }
                  }), i4 = c.firstChild ? (0, r2.Bq)(c.body.innerHTML) : "";
                }
              } catch (t6) {
              } finally {
                n2.J.safeRemove(e5);
              }
              return i4 && (t5 = i4), (0, r2.Bq)(t5.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, "").replace(/<!--[^>]*>/g, ""));
            }
          }, 94450: function(t4, e4, i3) {
            i3.d(e4, { w: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(42448), r2 = i3(59101);
            function s(t5) {
              -1 !== t5.indexOf("<html ") && (t5 = (t5 = t5.substring(t5.indexOf("<html "), t5.length)).substring(0, t5.lastIndexOf("</html>") + 7));
              let e5 = "";
              try {
                const i4 = document.createElement("div");
                i4.innerHTML = t5;
                const r3 = [];
                i4.firstChild && o3.J.each(i4, (t6) => {
                  if (t6) switch (t6.nodeType) {
                    case Node.ELEMENT_NODE:
                      switch (t6.nodeName) {
                        case "STYLE":
                        case "LINK":
                        case "META":
                          r3.push(t6);
                          break;
                        case "W:SDT":
                        case "W:SDTPR":
                        case "FONT":
                          o3.J.unwrap(t6);
                          break;
                        default:
                          (0, n2.$)(t6.attributes).forEach((e6) => {
                            -1 === ["src", "href", "rel", "content"].indexOf(e6.name.toLowerCase()) && t6.removeAttribute(e6.name);
                          });
                      }
                      break;
                    case Node.TEXT_NODE:
                      break;
                    default:
                      r3.push(t6);
                  }
                }), o3.J.safeRemove.apply(null, r3), e5 = i4.innerHTML;
              } catch (t6) {
              }
              return e5 && (t5 = e5), (t5 = t5.split(/(\n)/).filter(r2.Bq).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, "").replace(/<!--[^>]*>/g, "");
            }
          }, 4960: function(t4, e4, i3) {
            function o3(t5) {
              const e5 = document.createElement("div");
              return e5.textContent = t5, e5.innerHTML;
            }
            i3.d(e4, { G: function() {
              return o3;
            } });
          }, 16113: function(t4, e4, i3) {
            i3.d(e4, { Gq: function() {
              return r2.G;
            }, HA: function() {
              return s.H;
            }, Kq: function() {
              return l.K;
            }, ZM: function() {
              return o3.Z;
            }, t_: function() {
              return a2.t;
            }, vn: function() {
              return a2.v;
            }, wE: function() {
              return n2.w;
            } });
            var o3 = i3(56176), n2 = i3(94450), r2 = i3(4960), s = i3(10025), a2 = i3(26328), l = i3(61793);
          }, 10025: function(t4, e4, i3) {
            function o3(t5) {
              return t5.replace(/\r\n|\r|\n/g, "<br/>");
            }
            i3.d(e4, { H: function() {
              return o3;
            } });
          }, 26328: function(t4, e4, i3) {
            i3.d(e4, { t: function() {
              return r2;
            }, v: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(97369);
            function r2(t5, e5) {
              (o3.J.isElement(t5) || o3.J.isFragment(t5)) && (e5.removeOnError && (s(t5), (0, n2.$$)("[onerror]", t5).forEach((t6) => s(t6, e5))), e5.safeJavaScriptLink && (s(t5), (0, n2.$$)('a[href^="javascript"]', t5).forEach((t6) => s(t6, e5))));
            }
            function s(t5, { safeJavaScriptLink: e5, removeOnError: i4 } = { safeJavaScriptLink: true, removeOnError: true }) {
              if (!o3.J.isElement(t5)) return false;
              let r3 = false;
              i4 && t5.hasAttribute("onerror") && ((0, n2.attr)(t5, "onerror", null), r3 = true);
              const s2 = t5.getAttribute("href");
              return e5 && s2 && 0 === s2.trim().indexOf("javascript") && ((0, n2.attr)(t5, "href", location.protocol + "//" + s2), r3 = true), r3;
            }
          }, 61793: function(t4, e4, i3) {
            i3.d(e4, { K: function() {
              return d2;
            } });
            var o3 = i3(55186), n2 = i3(98253), r2 = i3(59101), s = i3(97369);
            const a2 = /* @__PURE__ */ new Set(["div", "p", "br", "h1", "h2", "h3", "h4", "h5", "h6", "hr"]), l = /* @__PURE__ */ new Set(["script", "style"]), c = /* @__PURE__ */ new Set(["br", "hr", "input"]);
            function d2(t5, e5 = document, i4 = null) {
              const u2 = e5.createElement("div");
              return (0, n2.K)(t5) ? u2.innerHTML = t5 : u2.appendChild(t5), (0, s.$$)("*", u2).forEach((t6) => {
                const n3 = t6.parentNode;
                if (!n3) return;
                if (i4 && o3.J.isTag(t6, i4)) {
                  const n4 = t6.nodeName.toLowerCase(), r4 = o3.J.isTag(t6, c) ? `%%%jodit-single-${n4}%%%` : `%%%jodit-${n4}%%%${d2(t6.innerHTML, e5, i4)}%%%/jodit-${n4}%%%`;
                  return o3.J.before(t6, e5.createTextNode(r4)), void o3.J.safeRemove(t6);
                }
                if (o3.J.isTag(t6, l)) return void o3.J.safeRemove(t6);
                if (!o3.J.isTag(t6, a2)) return;
                const r3 = t6.nextSibling;
                o3.J.isText(r3) && /^\s/.test(r3.nodeValue || "") || r3 && n3.insertBefore(e5.createTextNode(" "), r3);
              }), (0, r2.Bq)(u2.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g, (t6, e6, i5, o4) => `<${e6 ? "/" : ""}${o4}>`);
            }
          }, 65147: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { CamelCaseToKebabCase: function() {
              return d2.N;
            }, NUMBER_FIELDS_REG: function() {
              return l.b$;
            }, applyStyles: function() {
              return a2.ZM;
            }, asArray: function() {
              return o3._j;
            }, camelCase: function() {
              return d2.xQ;
            }, cleanFromWord: function() {
              return a2.wE;
            }, clearTimeout: function() {
              return n2.D;
            }, colorToHex: function() {
              return s.s;
            }, fuzzySearchIndex: function() {
              return d2.Hp;
            }, getContentWidth: function() {
              return c.y6;
            }, getScrollParent: function() {
              return c.mH;
            }, hasBrowserColorPicker: function() {
              return r2.kC;
            }, hasContainer: function() {
              return r2.kO;
            }, htmlspecialchars: function() {
              return a2.Gq;
            }, i18n: function() {
              return d2.Ru;
            }, innerWidth: function() {
              return c.xM;
            }, isAbortError: function() {
              return r2.zf;
            }, isArray: function() {
              return r2.cy;
            }, isBoolean: function() {
              return r2.Lm;
            }, isDestructable: function() {
              return r2.pV;
            }, isEqual: function() {
              return r2.n4;
            }, isFastEqual: function() {
              return r2.P5;
            }, isFunction: function() {
              return r2.Tn;
            }, isHTML: function() {
              return r2.AH;
            }, isHtmlFromWord: function() {
              return r2.CE;
            }, isInitable: function() {
              return r2.Gp;
            }, isInt: function() {
              return r2.E6;
            }, isJoditObject: function() {
              return r2.y0;
            }, isLicense: function() {
              return r2.Mj;
            }, isMarker: function() {
              return r2.rg;
            }, isNativeFunction: function() {
              return r2.a3;
            }, isNumber: function() {
              return r2.Et;
            }, isNumeric: function() {
              return r2.kf;
            }, isPlainObject: function() {
              return r2.Qd;
            }, isPromise: function() {
              return r2.yL;
            }, isSet: function() {
              return r2.vM;
            }, isString: function() {
              return r2.Kg;
            }, isStringArray: function() {
              return r2.Bo;
            }, isURL: function() {
              return r2.mv;
            }, isValidName: function() {
              return r2.uV;
            }, isViewObject: function() {
              return r2.hH;
            }, isVoid: function() {
              return r2.Rd;
            }, isWindow: function() {
              return r2.l6;
            }, kebabCase: function() {
              return d2.kW;
            }, nl2br: function() {
              return a2.HA;
            }, normalizeColor: function() {
              return l.$2;
            }, normalizeCssNumericValue: function() {
              return l.n8;
            }, normalizeCssValue: function() {
              return l.iy;
            }, normalizeKeyAliases: function() {
              return l.jB;
            }, normalizeLicense: function() {
              return l.f;
            }, normalizePath: function() {
              return l.Fd;
            }, normalizeRelativePath: function() {
              return l.Vd;
            }, normalizeSize: function() {
              return l.rn;
            }, normalizeUrl: function() {
              return l.l2;
            }, offset: function() {
              return c.cY;
            }, position: function() {
              return c.G1;
            }, safeHTML: function() {
              return a2.t_;
            }, sanitizeHTMLElement: function() {
              return a2.vn;
            }, setTimeout: function() {
              return n2.w;
            }, size: function() {
              return c.Ej;
            }, splitArray: function() {
              return o3.uM;
            }, sprintf: function() {
              return d2.nv;
            }, stringify: function() {
              return d2.As;
            }, stripTags: function() {
              return a2.Kq;
            }, toArray: function() {
              return o3.$r;
            }, trim: function() {
              return d2.Bq;
            }, trimChars: function() {
              return d2.Gd;
            }, trimInv: function() {
              return d2.gj;
            }, ucfirst: function() {
              return d2.Z2;
            } });
            var o3 = i3(32709), n2 = i3(89044), r2 = i3(9823), s = i3(93495), a2 = i3(16113), l = i3(65499), c = i3(34125), d2 = i3(6589), u2 = i3(97369), h2 = {};
            for (var p2 in u2) 0 > ["default", "asArray", "splitArray", "toArray", "clearTimeout", "setTimeout", "hasBrowserColorPicker", "hasContainer", "isAbortError", "isArray", "isBoolean", "isDestructable", "isEqual", "isFastEqual", "isFunction", "isHTML", "isHtmlFromWord", "isInitable", "isInt", "isJoditObject", "isLicense", "isMarker", "isNativeFunction", "isNumber", "isNumeric", "isPlainObject", "isPromise", "isSet", "isString", "isStringArray", "isURL", "isValidName", "isViewObject", "isVoid", "isWindow", "colorToHex", "applyStyles", "cleanFromWord", "htmlspecialchars", "nl2br", "safeHTML", "sanitizeHTMLElement", "stripTags", "NUMBER_FIELDS_REG", "normalizeColor", "normalizeCssNumericValue", "normalizeCssValue", "normalizeKeyAliases", "normalizeLicense", "normalizePath", "normalizeRelativePath", "normalizeSize", "normalizeUrl", "getContentWidth", "getScrollParent", "innerWidth", "offset", "position", "size", "CamelCaseToKebabCase", "camelCase", "fuzzySearchIndex", "i18n", "kebabCase", "sprintf", "stringify", "trim", "trimChars", "trimInv", "ucfirst"].indexOf(p2) && (h2[p2] = (function(t5) {
              return u2[t5];
            }).bind(0, p2));
            i3.d(e4, h2);
          }, 65499: function(t4, e4, i3) {
            i3.d(e4, { $2: function() {
              return o3.$;
            }, Fd: function() {
              return a2.F;
            }, Vd: function() {
              return l.V;
            }, b$: function() {
              return n2.b$;
            }, f: function() {
              return s.f;
            }, iy: function() {
              return n2.iy;
            }, jB: function() {
              return r2.j;
            }, l2: function() {
              return d2.l;
            }, n8: function() {
              return n2.n8;
            }, rn: function() {
              return c.r;
            } });
            var o3 = i3(73446), n2 = i3(59678), r2 = i3(74995), s = i3(31138), a2 = i3(92998), l = i3(13265), c = i3(7920), d2 = i3(39344);
          }, 73446: function(t4, e4, i3) {
            i3.d(e4, { $: function() {
              return r2;
            } });
            var o3 = i3(96768), n2 = i3(59101);
            const r2 = (t5) => {
              const e5 = ["#"];
              let i4 = (0, o3.s)(t5);
              if (!i4) return false;
              if (i4 = (0, n2.Bq)(i4.toUpperCase()), i4 = i4.substring(1), 3 === i4.length) {
                for (let t6 = 0; 3 > t6; t6 += 1) e5.push(i4[t6]), e5.push(i4[t6]);
                return e5.join("");
              }
              return i4.length > 6 && (i4 = i4.slice(0, 6)), "#" + i4;
            };
          }, 59678: function(t4, e4, i3) {
            i3.d(e4, { b$: function() {
              return a2;
            }, iy: function() {
              return c;
            }, n8: function() {
              return l;
            } });
            var o3 = i3(12461), n2 = i3(35642), r2 = i3(96768), s = i3(449);
            const a2 = /^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;
            function l(t5, e5) {
              return !(0, n2.R)(e5) && a2.test(t5) && (0, o3.k)(e5.toString()) ? parseInt(e5.toString(), 10) + "px" : e5;
            }
            function c(t5, e5) {
              if ("font-weight" === (0, s.k)(t5)) {
                switch (e5.toString().toLowerCase()) {
                  case "700":
                  case "bold":
                    return 700;
                  case "400":
                  case "normal":
                    return 400;
                  case "900":
                  case "heavy":
                    return 900;
                }
                return (0, o3.k)(e5) ? Number(e5) : e5;
              }
              return /color/i.test(t5) && /^rgb/i.test(e5.toString()) && (0, r2.s)(e5.toString()) || e5;
            }
          }, 74995: function(t4, e4, i3) {
            i3.d(e4, { j: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(59101);
            function r2(t5) {
              const e5 = {}, i4 = { meta: 1, ctrl: 2, control: 2, alt: 3, shift: 4 };
              return t5.replace(/\+\+/g, "+add").split(/[\s]*\+[\s]*/).map((t6) => (0, n2.Bq)(t6.toLowerCase())).map((t6) => o3.KEY_ALIASES[t6] || t6).sort((t6, e6) => i4[t6] && !i4[e6] ? -1 : !i4[t6] && i4[e6] ? 1 : i4[t6] && i4[e6] ? i4[t6] - i4[e6] : t6 > e6 ? 1 : -1).filter((t6) => !e5[t6] && "" !== t6 && (e5[t6] = true)).join("+");
            }
          }, 31138: function(t4, e4, i3) {
            i3.d(e4, { f: function() {
              return o3;
            } });
            const o3 = (t5, e5 = 8) => {
              const i4 = [];
              for (; t5.length; ) i4.push(t5.substr(0, e5)), t5 = t5.substr(e5);
              return i4[1] = i4[1].replace(/./g, "*"), i4[2] = i4[2].replace(/./g, "*"), i4.join("-");
            };
          }, 92998: function(t4, e4, i3) {
            i3.d(e4, { F: function() {
              return n2;
            } });
            var o3 = i3(59101);
            const n2 = (...t5) => t5.filter((t6) => (0, o3.Bq)(t6).length).map((e5, i4) => (e5 = e5.replace(/([^:])[\\/]+/g, "$1/"), i4 && (e5 = e5.replace(/^\//, "")), i4 !== t5.length - 1 && (e5 = e5.replace(/\/$/, "")), e5)).join("/");
          }, 13265: function(t4, e4, i3) {
            i3.d(e4, { V: function() {
              return o3;
            } });
            const o3 = (t5) => t5.split("/").reduce((t6, e5) => {
              switch (e5) {
                case "":
                case ".":
                  break;
                case "..":
                  t6.pop();
                  break;
                default:
                  t6.push(e5);
              }
              return t6;
            }, []).join("/") + (t5.endsWith("/") ? "/" : "");
          }, 7920: function(t4, e4, i3) {
            i3.d(e4, { r: function() {
              return o3;
            } });
            const o3 = (t5, e5) => /^[0-9]+$/.test(t5.toString()) ? t5 + e5 : t5.toString();
          }, 39344: function(t4, e4, i3) {
            i3.d(e4, { l: function() {
              return o3;
            } });
            const o3 = (...t5) => t5.filter((t6) => t6.length).map((t6) => t6.replace(/\/$/, "")).join("/").replace(/([^:])[\\/]+/g, "$1/");
          }, 73780: function(t4, e4, i3) {
            i3.d(e4, { y: function() {
              return o3;
            } });
            const o3 = (t5, e5) => {
              const i4 = (t6) => parseInt(t6, 10), o4 = e5.getComputedStyle(t5);
              return t5.offsetWidth - i4(o4.getPropertyValue("padding-left") || "0") - i4(o4.getPropertyValue("padding-right") || "0");
            };
          }, 98228: function(t4, e4, i3) {
            i3.d(e4, { m: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(97369);
            function r2(t5) {
              if (!t5) return null;
              const e5 = o3.J.isHTMLElement(t5), i4 = e5 && (0, n2.css)(t5, "overflowY");
              return e5 && "visible" !== i4 && "hidden" !== i4 && t5.scrollHeight >= t5.clientHeight ? t5 : r2(t5.parentNode) || document.scrollingElement || document.body;
            }
          }, 34125: function(t4, e4, i3) {
            i3.d(e4, { Ej: function() {
              return s.E;
            }, G1: function() {
              return l.G;
            }, cY: function() {
              return a2.c;
            }, mH: function() {
              return n2.m;
            }, xM: function() {
              return r2.x;
            }, y6: function() {
              return o3.y;
            } });
            var o3 = i3(73780), n2 = i3(98228), r2 = i3(49744), s = i3(95350), a2 = i3(91594), l = i3(27594);
          }, 49744: function(t4, e4, i3) {
            i3.d(e4, { x: function() {
              return o3;
            } });
            const o3 = (t5, e5) => {
              const i4 = e5.getComputedStyle(t5);
              let o4 = t5.clientWidth;
              return o4 -= parseFloat(i4.paddingLeft || "0") + parseFloat(i4.paddingRight || "0"), o4;
            };
          }, 95350: function(t4, e4, i3) {
            i3.d(e4, { E: function() {
              return n2;
            } });
            var o3 = i3(9823);
            function n2(t5) {
              return (0, o3.Kg)(t5) || (0, o3.cy)(t5) ? t5.length : (0, o3.Qd)(t5) ? Object.keys(t5).length : 0;
            }
          }, 91594: function(t4, e4, i3) {
            i3.d(e4, { c: function() {
              return o3;
            } });
            const o3 = (t5, e5, i4, n2 = false) => {
              let r2;
              try {
                r2 = t5.getBoundingClientRect();
              } catch (t6) {
                r2 = { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 };
              }
              const s = i4.body, a2 = i4.documentElement || { clientTop: 0, clientLeft: 0, scrollTop: 0, scrollLeft: 0 }, l = i4.defaultView || i4.parentWindow, c = l.pageYOffset || a2.scrollTop || s.scrollTop, d2 = l.pageXOffset || a2.scrollLeft || s.scrollLeft, u2 = a2.clientTop || s.clientTop || 0, h2 = a2.clientLeft || s.clientLeft || 0;
              let p2, f2;
              const g2 = e5.iframe;
              if (!n2 && e5 && e5.options && e5.o.iframe && g2) {
                const { top: t6, left: i5 } = o3(g2, e5, e5.od, true);
                p2 = r2.top + t6, f2 = r2.left + i5;
              } else p2 = r2.top + c - u2, f2 = r2.left + d2 - h2;
              return { top: Math.round(p2), left: Math.round(f2), width: r2.width, height: r2.height };
            };
          }, 27594: function(t4, e4, i3) {
            i3.d(e4, { G: function() {
              return n2;
            } });
            var o3 = i3(83044);
            function n2(t5, e5, i4 = false) {
              var r2, s;
              const a2 = t5.getBoundingClientRect();
              let l = a2.left, c = a2.top;
              if ((0, o3.y)(e5) && e5.iframe && e5.ed.body.contains(t5) && !i4) {
                const { left: t6, top: i5 } = n2(e5.iframe, e5, true);
                l += t6, c += i5;
              }
              return { left: Math.round(l), top: Math.round(c), width: Math.round(null !== (r2 = t5.offsetWidth) && void 0 !== r2 ? r2 : a2.width), height: Math.round(null !== (s = t5.offsetHeight) && void 0 !== s ? s : a2.height) };
            }
          }, 83260: function(t4, e4, i3) {
            i3.d(e4, { x: function() {
              return o3;
            } });
            const o3 = (t5) => t5.replace(/([-_])(.)/g, (t6, e5, i4) => i4.toUpperCase());
          }, 67975: function(t4, e4, i3) {
            i3.d(e4, { H: function() {
              return n2;
            } });
            var o3 = i3(17352);
            function n2(t5, e5, i4 = 0, n3 = 1) {
              let r2 = 0, s = 0, a2 = -1, l = 0, c = 0;
              for (s = i4; t5.length > r2 && e5.length > s; ) t5[r2].toLowerCase() === e5[s].toLowerCase() ? (r2++, l++, c = 0, -1 === a2 && (a2 = s)) : r2 > 0 && (n3 > c || e5[s] === o3.INVISIBLE_SPACE ? (c++, l++) : (r2 = 0, a2 = -1, l = 0, c = 0, s--)), s++;
              return r2 === t5.length ? [a2, l] : [-1, 0];
            }
          }, 91093: function(t4, e4, i3) {
            i3.d(e4, { R: function() {
              return c;
            }, n: function() {
              return l;
            } });
            var o3 = i3(17352), n2 = i3(98253), r2 = i3(10467), s = i3(97369), a2 = i3(36115);
            const l = (t5, e5) => {
              if (!e5 || !e5.length) return t5;
              const i4 = /%([sd])/g;
              let o4 = i4.exec(t5), n3 = t5, r3 = 0;
              for (; o4 && void 0 !== e5[r3]; ) n3 = n3.replace(o4[0], e5[r3].toString()), r3 += 1, o4 = i4.exec(t5);
              return n3;
            };
            function c(t5, e5, i4) {
              if (!(0, n2.K)(t5)) throw (0, s.error)("i18n: Need string in first argument");
              if (!t5.length) return t5;
              const c2 = Boolean(null == i4 ? void 0 : i4.debugLanguage);
              let d2 = {};
              const u2 = (t6) => e5 && e5.length ? l(t6, e5) : t6, h2 = (0, s.defaultLanguage)(a2.T.defaultOptions.language, a2.T.defaultOptions.language), p2 = (0, s.defaultLanguage)(null == i4 ? void 0 : i4.language, h2), f2 = (e6) => {
                if (!e6) return;
                if ((0, n2.K)(e6[t5])) return u2(e6[t5]);
                const i5 = t5.toLowerCase();
                if ((0, n2.K)(e6[i5])) return u2(e6[i5]);
                const o4 = (0, r2.Z)(t5);
                return (0, n2.K)(e6[o4]) ? u2(e6[o4]) : void 0;
              };
              void 0 !== o3.lang[p2] ? d2 = o3.lang[p2] : c2 || (d2 = void 0 !== o3.lang[h2] ? o3.lang[h2] : o3.lang.en);
              const g2 = null == i4 ? void 0 : i4.i18n;
              if (g2 && g2[p2]) {
                const t6 = f2(g2[p2]);
                if (t6) return t6;
              }
              return f2(d2) || (!c2 && o3.lang.en && (0, n2.K)(o3.lang.en[t5]) && o3.lang.en[t5] ? u2(o3.lang.en[t5]) : c2 ? "{" + t5 + "}" : u2(t5));
            }
          }, 6589: function(t4, e4, i3) {
            i3.d(e4, { As: function() {
              return a2.A;
            }, Bq: function() {
              return l.Bq;
            }, Gd: function() {
              return l.Gd;
            }, Hp: function() {
              return n2.H;
            }, N: function() {
              return s.N;
            }, Ru: function() {
              return r2.R;
            }, Z2: function() {
              return c.Z;
            }, gj: function() {
              return l.gj;
            }, kW: function() {
              return s.k;
            }, nv: function() {
              return r2.n;
            }, xQ: function() {
              return o3.x;
            } });
            var o3 = i3(83260), n2 = i3(67975), r2 = i3(91093), s = i3(449), a2 = i3(28616), l = i3(59101), c = i3(10467);
          }, 449: function(t4, e4, i3) {
            i3.d(e4, { N: function() {
              return n2;
            }, k: function() {
              return o3;
            } });
            const o3 = (t5) => t5.replace(/([A-Z])([A-Z])([a-z])/g, "$1-$2$3").replace(/([a-z])([A-Z])/g, "$1-$2").replace(/[\s_]+/g, "-").toLowerCase(), n2 = (t5) => t5.replace(/([A-Z])([A-Z])([a-z])/g, "$1-$2$3").replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
          }, 28616: function(t4, e4, i3) {
            function o3(t5, e5 = {}) {
              if ("object" != typeof t5) return String(t5);
              const i4 = new Set(e5.excludeKeys), o4 = /* @__PURE__ */ new WeakMap();
              return JSON.stringify(t5, (t6, e6) => {
                if (!i4.has(t6)) {
                  if ("object" == typeof e6 && null != e6) {
                    if (o4.get(e6)) return "[refObject]";
                    o4.set(e6, true);
                  }
                  return e6;
                }
              }, e5.prettify);
            }
            i3.d(e4, { A: function() {
              return o3;
            } });
          }, 59101: function(t4, e4, i3) {
            i3.d(e4, { Bq: function() {
              return n2;
            }, Gd: function() {
              return r2;
            }, gj: function() {
              return s;
            } });
            var o3 = i3(17352);
            function n2(t5) {
              return t5.replace((0, o3.SPACE_REG_EXP_END)(), "").replace((0, o3.SPACE_REG_EXP_START)(), "");
            }
            function r2(t5, e5) {
              return t5.replace(RegExp(`[${e5}]+$`), "").replace(RegExp(`^[${e5}]+`), "");
            }
            function s(t5) {
              return t5.replace((0, o3.INVISIBLE_SPACE_REG_EXP_END)(), "").replace((0, o3.INVISIBLE_SPACE_REG_EXP_START)(), "");
            }
          }, 10467: function(t4, e4, i3) {
            function o3(t5) {
              return t5.length ? t5[0].toUpperCase() + t5.substring(1) : "";
            }
            i3.d(e4, { Z: function() {
              return o3;
            } });
          }, 40080: function(t4, e4, i3) {
            i3.d(e4, { Mr: function() {
              return r2;
            }, Op: function() {
              return a2;
            }, Xm: function() {
              return s;
            } });
            var o3 = i3(71842), n2 = i3(38322);
            function r2(t5, e5) {
              e5 && "normal" !== e5 ? "center" !== e5 ? ((0, n2.A)(t5, "float", e5), (0, n2.a)(t5)) : (0, n2.A)(t5, { float: "", display: "block", marginLeft: "auto", marginRight: "auto" }) : ((0, n2.A)(t5, "float") && -1 !== ["right", "left"].indexOf((0, n2.A)(t5, "float").toString().toLowerCase()) && (0, n2.A)(t5, "float", ""), (0, n2.a)(t5));
            }
            function s(t5) {
              o3.J.each(t5, (t6) => {
                o3.J.isHTMLElement(t6) && t6.style.textAlign && (t6.style.textAlign = "", t6.style.cssText.trim().length || t6.removeAttribute("style"));
              });
            }
            function a2(t5, e5) {
              if (o3.J.isNode(e5) && o3.J.isElement(e5)) switch (s(e5), t5.toLowerCase()) {
                case "justifyfull":
                  e5.style.textAlign = "justify";
                  break;
                case "justifyright":
                  e5.style.textAlign = "right";
                  break;
                case "justifyleft":
                  e5.style.textAlign = "left";
                  break;
                case "justifycenter":
                  e5.style.textAlign = "center";
              }
            }
          }, 27301: function(t4, e4, i3) {
            i3.d(e4, { Qt: function() {
              return c;
            }, S5: function() {
              return l;
            }, w4: function() {
              return a2;
            }, x_: function() {
              return d2;
            } });
            var o3 = i3(98253), n2 = i3(60346);
            const r2 = /* @__PURE__ */ new Map(), s = (t5) => async (e5, i4) => {
              if (r2.has(i4)) return r2.get(i4);
              const o4 = t5(e5, i4);
              return r2.set(i4, o4), o4;
            }, a2 = s((t5, e5) => t5.async.promise((i4, o4) => {
              if (t5.isInDestruct) return o4();
              const r3 = t5.c.element("script", { type: "text/javascript", async: true, src: (0, n2.X)(e5) });
              t5.od.body.appendChild(r3), t5.e.on(r3, "error", o4).on(r3, "load", i4);
            })), l = s((t5, e5) => t5.async.promise((i4, o4) => {
              if (t5.isInDestruct) return o4();
              const r3 = t5.c.element("link");
              r3.rel = "stylesheet", r3.media = "all", r3.crossOrigin = "anonymous", !t5.isInDestruct && t5.e.on(r3, "load", () => i4(r3)).on(r3, "error", o4), r3.href = (0, n2.X)(e5), t5.o.shadowRoot ? t5.o.shadowRoot.appendChild(r3) : t5.od.body.appendChild(r3);
            }));
            function c(t5, e5, i4 = 0) {
              return (0, o3.K)(e5[i4]) ? a2(t5, e5[i4]).then(() => c(t5, e5, i4 + 1)) : Promise.resolve();
            }
            function d2(t5, e5, i4 = 0) {
              return (0, o3.K)(e5[i4]) ? l(t5, e5[i4]).then(() => d2(t5, e5, i4 + 1)) : Promise.resolve();
            }
          }, 26150: function(t4, e4, i3) {
            i3.d(e4, { C: function() {
              return s;
            } });
            var o3 = i3(9823), n2 = i3(449), r2 = i3(38322);
            function s(t5, e5, i4) {
              if (!t5 || !(0, o3.Tn)(t5.getAttribute)) return null;
              if (!(0, o3.Kg)(e5)) return Object.keys(e5).forEach((i5) => {
                const n3 = e5[i5];
                (0, o3.Qd)(n3) && "style" === i5 ? (0, r2.A)(t5, n3) : ("className" === i5 && (i5 = "class"), s(t5, i5, n3));
              }), null;
              let a2 = (0, n2.N)(e5);
              if (/^-/.test(a2)) {
                const e6 = s(t5, `data${a2}`);
                if (e6) return e6;
                a2 = a2.substr(1);
              }
              if (void 0 !== i4) {
                if (null != i4) {
                  let e6 = i4.toString();
                  return "IMG" !== t5.nodeName || "width" !== a2 && "height" !== a2 || (e6 = e6.replace("px", "")), t5.setAttribute(a2, e6), e6;
                }
                t5.hasAttribute(a2) && t5.removeAttribute(a2);
              }
              return t5.getAttribute(a2);
            }
          }, 65717: function(t4, e4, i3) {
            i3.d(e4, { T: function() {
              return o3;
            } });
            const o3 = (t5) => {
              const e5 = navigator.userAgent.toLowerCase(), i4 = /(firefox)[\s/]([\w.]+)/.exec(e5) || /(chrome)[\s/]([\w.]+)/.exec(e5) || /(webkit)[\s/]([\w.]+)/.exec(e5) || /(opera)(?:.*version)[\s/]([\w.]+)/.exec(e5) || /(msie)[\s]([\w.]+)/.exec(e5) || /(trident)\/([\w.]+)/.exec(e5) || 0 > e5.indexOf("compatible") || [];
              return "version" === t5 ? i4[2] : "webkit" === t5 ? "chrome" === i4[1] || "webkit" === i4[1] : "ff" === t5 ? "firefox" === i4[1] : "msie" === t5 ? "trident" === i4[1] || "msie" === i4[1] : i4[1] === t5;
            };
          }, 76104: function(t4, e4, i3) {
            i3.d(e4, { Z: function() {
              return n2;
            } });
            var o3 = i3(25376);
            const n2 = (t5, e5) => {
              const i4 = [], r2 = encodeURIComponent;
              for (const s in t5) if (Object.prototype.hasOwnProperty.call(t5, s)) {
                const a2 = e5 ? e5 + "[" + s + "]" : s, l = t5[s];
                i4.push((0, o3.Q)(l) ? n2(l, a2) : r2(a2) + "=" + r2(l));
              }
              return i4.join("&");
            };
          }, 60346: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return o3;
            } });
            const o3 = (t5) => ("file:" === window.location.protocol && /^\/\//.test(t5) && (t5 = "https:" + t5), t5);
          }, 86248: function(t4, e4, i3) {
            i3.d(e4, { V: function() {
              return u2;
            }, t: function() {
              return d2;
            } });
            var o3 = i3(37923), n2 = i3(25376), r2 = i3(98253), s = i3(35642), a2 = i3(49429), l = i3(84976), c = i3(36115);
            function d2(t5, e5, i4 = 0) {
              if (Object.getPrototypeOf(t5) !== Object.prototype) return t5;
              const l2 = c.T.defaultOptions;
              if ((0, r2.K)(t5.preset)) {
                if (void 0 !== l2.presets[t5.preset]) {
                  const e6 = l2.presets[t5.preset];
                  Object.keys(e6).forEach((i5) => {
                    (0, s.R)(t5[i5]) && (t5[i5] = e6[i5]);
                  });
                }
                delete t5.preset;
              }
              const u3 = {};
              return Object.keys(t5).forEach((r3) => {
                const s2 = t5[r3], l3 = e5 ? e5[r3] : null;
                u3[r3] = (0, n2.Q)(s2) && (0, n2.Q)(l3) && !(0, a2.mA)(s2) ? d2(s2, l3, i4 + 1) : 0 !== i4 && (0, o3.c)(s2) && !(0, a2.mA)(s2) && (0, o3.c)(l3) ? [...s2, ...l3.slice(s2.length)] : s2;
              }), Object.setPrototypeOf(u3, e5), u3;
            }
            function u2(t5) {
              return (0, l.HP)(t5, false).reduce((e5, i4) => (e5[i4] = t5[i4], e5), {});
            }
          }, 82807: function(t4, e4, i3) {
            i3.d(e4, { m: function() {
              return r2;
            } });
            var o3 = i3(6939), n2 = i3(70807);
            const r2 = (t5, e5 = 400, i4 = 345) => {
              if (!(0, o3.m)(t5)) return t5;
              const r3 = document.createElement("a"), s = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
              r3.href = t5, e5 || (e5 = 400), i4 || (i4 = 345);
              const a2 = r3.protocol || "";
              switch (r3.hostname) {
                case "www.vimeo.com":
                case "vimeo.com":
                  return s.test(t5) ? t5.replace(s, '<iframe width="' + e5 + '" height="' + i4 + '" src="' + a2 + '//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>') : t5;
                case "youtube.com":
                case "www.youtube.com":
                case "youtu.be":
                case "www.youtu.be": {
                  const o4 = r3.search ? (0, n2.m)(r3.search) : { v: r3.pathname.substr(1) };
                  return o4.v ? '<iframe width="' + e5 + '" height="' + i4 + '" src="' + a2 + "//www.youtube.com/embed/" + o4.v + '" frameborder="0" allowfullscreen></iframe>' : t5;
                }
              }
              return t5;
            };
          }, 38322: function(t4, e4, i3) {
            i3.d(e4, { A: function() {
              return l;
            }, a: function() {
              return c;
            } });
            var o3 = i3(9810), n2 = i3(25376), r2 = i3(59678), s = i3(83260), a2 = i3(449);
            function l(t5, e5, i4, c2 = false) {
              if ((0, o3.L)(i4) && (c2 = i4, i4 = void 0), (0, n2.Q)(e5) || void 0 !== i4) {
                const o4 = (t6, e6, i5) => {
                  void 0 === (i5 = (0, r2.n8)(e6, i5)) || null != i5 && l(t6, e6, true) === (0, r2.iy)(e6, i5) || (t6.style[e6] = i5);
                };
                if ((0, n2.Q)(e5)) {
                  const i5 = Object.keys(e5);
                  for (let n3 = 0; i5.length > n3; n3 += 1) o4(t5, (0, s.x)(i5[n3]), e5[i5[n3]]);
                } else o4(t5, (0, s.x)(e5), i4);
                return "";
              }
              const d2 = (0, a2.k)(e5), u2 = t5.ownerDocument || document, h2 = !!u2 && (u2.defaultView || u2.parentWindow), p2 = t5.style[e5];
              let f2 = "";
              return void 0 !== p2 && "" !== p2 ? f2 = p2 : h2 && !c2 && (f2 = h2.getComputedStyle(t5).getPropertyValue(d2)), r2.b$.test(e5) && /^[-+]?[0-9.]+px$/.test(f2.toString()) && (f2 = parseInt(f2.toString(), 10)), (0, r2.iy)(e5, f2);
            }
            const c = (t5) => {
              "block" === l(t5, "display") && l(t5, "display", "");
              const { style: e5 } = t5;
              "auto" === e5.marginLeft && "auto" === e5.marginRight && (e5.marginLeft = "", e5.marginRight = "");
            };
          }, 34446: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return o3;
            } });
            const o3 = (t5) => {
              if ("undefined" != typeof navigator && -1 !== navigator.userAgent.indexOf("Mac OS X")) {
                if (t5.metaKey && !t5.altKey) return true;
              } else if (t5.ctrlKey && !t5.altKey) return true;
              return false;
            };
          }, 72197: function(t4, e4, i3) {
            i3.d(e4, { m: function() {
              return r2;
            } });
            var o3 = i3(12041);
            const n2 = /* @__PURE__ */ new WeakMap(), r2 = (t5, e5, i4) => {
              let r3 = n2.get(t5);
              if (!r3) {
                r3 = {}, n2.set(t5, r3);
                let e6 = null;
                (0, o3.h)(t5.j) && (e6 = t5.j.e), (0, o3.h)(t5) && (e6 = t5.e), e6 && e6.on("beforeDestruct", () => {
                  n2.delete(t5);
                });
              }
              return void 0 === i4 ? r3[e5] : (r3[e5] = i4, i4);
            };
          }, 17527: function(t4, e4, i3) {
            i3.d(e4, { e: function() {
              return n2;
            } });
            var o3 = i3(98253);
            const n2 = (t5, e5 = "en") => "auto" !== t5 && (0, o3.K)(t5) ? t5 : document.documentElement && document.documentElement.lang ? document.documentElement.lang : navigator.language ? navigator.language.substring(0, 2) : e5;
          }, 76166: function(t4, e4, i3) {
            i3.d(e4, { FI: function() {
              return r2;
            }, fF: function() {
              return s;
            }, z3: function() {
              return n2;
            } });
            var o3 = i3(20222);
            function n2(t5) {
              return new TypeError(t5);
            }
            function r2(t5) {
              return new o3.Rc(t5);
            }
            function s(t5) {
              return new o3.ZW(t5);
            }
          }, 21567: function(t4, e4, i3) {
            function o3(t5 = "Aborted") {
              return new DOMException(t5, "AbortError");
            }
            i3.d(e4, { h: function() {
              return o3;
            }, r: function() {
              return n2;
            } });
            const n2 = i3(99951).z;
          }, 30495: function(t4, e4, i3) {
            i3.d(e4, { R: function() {
              return o3;
            } });
            class o3 extends Error {
              constructor(t5) {
                super(t5), Object.setPrototypeOf(this, o3.prototype);
              }
            }
          }, 20222: function(t4, e4, i3) {
            i3.d(e4, { Rc: function() {
              return n2.R;
            }, ZW: function() {
              return r2.Z;
            }, h2: function() {
              return o3.h;
            }, rV: function() {
              return o3.r;
            } });
            var o3 = i3(21567), n2 = i3(30495), r2 = i3(34899);
          }, 34899: function(t4, e4, i3) {
            i3.d(e4, { Z: function() {
              return o3;
            } });
            class o3 extends TypeError {
              constructor(t5) {
                super(t5), Object.setPrototypeOf(this, o3.prototype);
              }
            }
          }, 50156: function(t4, e4, i3) {
            i3.d(e4, { FI: function() {
              return o3.FI;
            }, Rc: function() {
              return n2.Rc;
            }, ZW: function() {
              return n2.ZW;
            }, fF: function() {
              return o3.fF;
            }, h2: function() {
              return n2.h2;
            }, rV: function() {
              return n2.rV;
            }, z3: function() {
              return o3.z3;
            } });
            var o3 = i3(76166), n2 = i3(20222);
          }, 49429: function(t4, e4, i3) {
            i3.d(e4, { Hp: function() {
              return r2;
            }, mA: function() {
              return n2;
            }, y6: function() {
              return s;
            } });
            var o3 = i3(28616);
            function n2(t5) {
              return t5 && t5.isAtom;
            }
            function r2(t5) {
              return Object.defineProperty(t5, "isAtom", { enumerable: false, value: true, configurable: false }), t5;
            }
            function s(t5) {
              return JSON.parse((0, o3.A)(t5));
            }
          }, 75766: function(t4, e4, i3) {
            i3.d(e4, { M: function() {
              return n2;
            }, u: function() {
              return r2;
            } });
            var o3 = i3(69052);
            const n2 = /* @__PURE__ */ new Map(), r2 = (t5) => {
              var e5;
              if ((0, o3.T)(t5.className)) return t5.className();
              const i4 = (null === (e5 = t5.constructor) || void 0 === e5 ? void 0 : e5.originalConstructor) || t5.constructor;
              if (n2.has(i4)) return n2.get(i4);
              if (i4.name) return i4.name;
              const r3 = new RegExp(/^\s*function\s*(\S*)\s*\(/), s = i4.toString().match(r3);
              return s ? s[1] : "";
            };
          }, 16841: function(t4, e4, i3) {
            i3.d(e4, { J: function() {
              return r2;
            } });
            var o3 = i3(98253), n2 = i3(35642);
            function r2(t5, e5) {
              if (!(0, o3.K)(t5) || !t5.length) return null;
              const i4 = t5.split(".");
              let r3 = e5;
              try {
                for (const t6 of i4) {
                  if ((0, n2.R)(r3[t6])) return null;
                  r3 = r3[t6];
                }
              } catch (t6) {
                return null;
              }
              return (0, n2.R)(r3) ? null : r3;
            }
          }, 99898: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return o3;
            } });
            const o3 = (t5) => {
              if (/^[0-9.]+$/.test(t5.toString())) return parseFloat(t5);
              const e5 = t5.substr(-2, 2).toUpperCase(), i4 = ["KB", "MB", "GB", "TB"], o4 = parseFloat(t5.substr(0, t5.length - 2));
              return -1 !== i4.indexOf(e5) ? o4 * Math.pow(1024, i4.indexOf(e5) + 1) : parseInt(t5, 10);
            };
          }, 97369: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { $$: function() {
              return T2.$$;
            }, ConfigFlatten: function() {
              return h2.V;
            }, ConfigProto: function() {
              return h2.t;
            }, ConnectionError: function() {
              return _2.Rc;
            }, LimitedStack: function() {
              return I2.d;
            }, OptionsError: function() {
              return _2.ZW;
            }, abort: function() {
              return _2.h2;
            }, alignElement: function() {
              return o3.Op;
            }, appendScriptAsync: function() {
              return n2.w4;
            }, appendStyleAsync: function() {
              return n2.S5;
            }, attr: function() {
              return l.C;
            }, browser: function() {
              return c.T;
            }, buildQuery: function() {
              return d2.Z;
            }, call: function() {
              return A2.T1;
            }, callPromise: function() {
              return A2.o_;
            }, clearAlign: function() {
              return o3.Xm;
            }, clearCenterAlign: function() {
              return f2.a;
            }, cns: function() {
              return j.f;
            }, completeUrl: function() {
              return u2.X;
            }, connection: function() {
              return _2.FI;
            }, convertMediaUrlToVideoEmbed: function() {
              return p2.m;
            }, css: function() {
              return f2.A;
            }, cssPath: function() {
              return T2.bE;
            }, ctrlKey: function() {
              return g2.X;
            }, dataBind: function() {
              return m2.m;
            }, defaultLanguage: function() {
              return b2.e;
            }, error: function() {
              return _2.z3;
            }, fastClone: function() {
              return v2.y6;
            }, get: function() {
              return x.J;
            }, getClassName: function() {
              return w.u;
            }, getDataTransfer: function() {
              return A2.my;
            }, getXPathByElement: function() {
              return T2.fz;
            }, hAlignElement: function() {
              return o3.Mr;
            }, humanSizeToBytes: function() {
              return y2.z;
            }, inView: function() {
              return z2.l;
            }, isAbort: function() {
              return _2.rV;
            }, isAtom: function() {
              return v2.mA;
            }, keepNames: function() {
              return w.M;
            }, keys: function() {
              return A2.HP;
            }, loadImage: function() {
              return A2.yt;
            }, loadNext: function() {
              return n2.Qt;
            }, loadNextStyle: function() {
              return n2.x_;
            }, markAsAtomic: function() {
              return v2.Hp;
            }, markDeprecated: function() {
              return j.B;
            }, markOwner: function() {
              return A2.b_;
            }, memorizeExec: function() {
              return A2.qN;
            }, options: function() {
              return _2.fF;
            }, parseQuery: function() {
              return k2.m;
            }, previewBox: function() {
              return C2.u;
            }, refs: function() {
              return T2.DY;
            }, reset: function() {
              return S2.c;
            }, resolveElement: function() {
              return T2.tI;
            }, scrollIntoViewIfNeeded: function() {
              return z2.$;
            }, set: function() {
              return E2.h;
            } });
            var o3 = i3(40080), n2 = i3(27301), r2 = i3(28712), s = {};
            for (var a2 in r2) 0 > ["default", "alignElement", "clearAlign", "hAlignElement", "appendScriptAsync", "appendStyleAsync", "loadNext", "loadNextStyle"].indexOf(a2) && (s[a2] = (function(t5) {
              return r2[t5];
            }).bind(0, a2));
            i3.d(e4, s);
            var l = i3(26150), c = i3(65717), d2 = i3(76104), u2 = i3(60346), h2 = i3(86248), p2 = i3(82807), f2 = i3(38322), g2 = i3(34446), m2 = i3(72197), b2 = i3(17527), _2 = i3(50156), v2 = i3(49429), x = i3(16841), w = i3(75766), y2 = i3(99898), j = i3(67400), k2 = i3(70807), C2 = i3(98434), S2 = i3(44210), z2 = i3(641), T2 = i3(58720), E2 = i3(40677), I2 = i3(70069), A2 = i3(84976);
          }, 67400: function(t4, e4, i3) {
            i3.d(e4, { B: function() {
              return n2;
            }, f: function() {
              return o3;
            } });
            const o3 = console;
            function n2(t5, e5 = [""], i4 = null) {
              return (...n3) => (o3.warn(`Method "${e5[0]}" deprecated.` + (e5[1] ? ` Use "${e5[1]}" instead` : "")), t5.call(i4, ...n3));
            }
          }, 70807: function(t4, e4, i3) {
            i3.d(e4, { m: function() {
              return o3;
            } });
            const o3 = (t5) => {
              const e5 = {}, i4 = t5.substring(1).split("&");
              for (let t6 = 0; i4.length > t6; t6 += 1) {
                const o4 = i4[t6].split("=");
                e5[decodeURIComponent(o4[0])] = decodeURIComponent(o4[1] || "");
              }
              return e5;
            };
          }, 98434: function(t4, e4, i3) {
            i3.d(e4, { u: function() {
              return l;
            } });
            var o3 = i3(55186), n2 = i3(98253), r2 = i3(26150), s = i3(38322), a2 = i3(58720);
            function l(t5, e5, i4 = "px", l2 = null) {
              const c = [], d2 = function(t6, e6) {
                const i5 = [];
                try {
                  (0, a2.$$)("img", t6.editor).forEach((n3) => {
                    const s2 = [(0, r2.C)(n3, "width"), (0, r2.C)(n3, "height"), n3.src];
                    (0, r2.C)(n3, { width: n3.offsetWidth + e6, height: n3.offsetHeight + e6 });
                    const a3 = t6.createInside.a();
                    t6.ed.body.appendChild(a3), a3.href = n3.src, n3.src = a3.href, o3.J.safeRemove(a3), i5.push(() => {
                      var t7;
                      n3.src = null !== (t7 = s2[2]) && void 0 !== t7 ? t7 : "", (0, r2.C)(n3, { width: s2[0] || null, height: s2[1] || null });
                    });
                  });
                } catch (t7) {
                  throw i5.forEach((t8) => t8()), i5.length = 0, t7;
                }
                return i5;
              }(t5, i4);
              try {
                const a3 = t5.e.fire("beforePreviewBox", e5, i4);
                if (null != a3) return a3;
                let d3 = t5.c.div("jodit__preview-box jodit-context");
                l2 && l2.appendChild(d3), (0, s.A)(d3, { position: "relative", padding: 16 });
                const u2 = t5.value || `<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${t5.i18n("Empty")}</div>`;
                if (t5.iframe) {
                  const e6 = t5.create.element("iframe");
                  (0, s.A)(e6, { minWidth: 800, minHeight: 600, border: 0 }), d3.appendChild(e6);
                  const i5 = e6.contentWindow;
                  if (i5 && (t5.e.fire("generateDocumentStructure.iframe", i5.document, t5), d3 = i5.document.body, "function" == typeof ResizeObserver)) {
                    let o4 = false;
                    const n3 = i5.document.body, r3 = new ResizeObserver(t5.async.debounce(() => {
                      r3.unobserve(n3), e6.style.height = `${n3.offsetHeight + 20}px`, t5.async.requestAnimationFrame(() => {
                        !o4 && r3.observe(n3);
                      });
                    }, 100)), s2 = () => {
                      o4 = true, r3.unobserve(n3), r3.disconnect(), t5.e.off("beforeDestruct", s2);
                    };
                    c.push(s2), t5.e.on("beforeDestruct", s2);
                  }
                } else (0, s.A)(d3, { minWidth: 1024, minHeight: 600, border: 0 });
                const h2 = (e6, i5) => {
                  const s2 = (0, n2.K)(i5) ? t5.c.div() : i5;
                  (0, n2.K)(i5) && (s2.innerHTML = i5);
                  for (let t6 = 0; s2.childNodes.length > t6; t6 += 1) {
                    const i6 = s2.childNodes[t6];
                    if (o3.J.isElement(i6)) {
                      const t7 = e6.ownerDocument.createElement(i6.nodeName);
                      for (let e7 = 0; i6.attributes.length > e7; e7 += 1) (0, r2.C)(t7, i6.attributes[e7].nodeName, i6.attributes[e7].nodeValue);
                      0 === i6.childNodes.length || o3.J.isTag(i6, "table") ? "SCRIPT" === i6.nodeName ? i6.textContent && (t7.textContent = i6.textContent) : i6.innerHTML && (t7.innerHTML = i6.innerHTML) : h2(t7, i6);
                      try {
                        e6.appendChild(t7);
                      } catch (t8) {
                      }
                    } else try {
                      e6.appendChild(i6.cloneNode(true));
                    } catch (t7) {
                    }
                  }
                };
                return h2(d3, u2), t5.e.fire("afterPreviewBox", d3), [d3, () => {
                  c.forEach((t6) => t6());
                }];
              } finally {
                d2.forEach((t6) => t6());
              }
            }
          }, 44210: function(t4, e4, i3) {
            i3.d(e4, { c: function() {
              return a2;
            } });
            var o3 = i3(17352), n2 = i3(69052), r2 = i3(16841);
            const s = {};
            function a2(t5) {
              var e5, i4;
              if (!(t5 in s)) {
                const i5 = document.createElement("iframe");
                try {
                  if (i5.src = "about:blank", document.body.appendChild(i5), !i5.contentWindow) return null;
                  const e6 = (0, r2.J)(t5, i5.contentWindow), o4 = (0, r2.J)(t5.split(".").slice(0, -1).join("."), i5.contentWindow);
                  (0, n2.T)(e6) && (s[t5] = e6.bind(o4));
                } catch (t6) {
                  if (!o3.IS_PROD) throw t6;
                } finally {
                  null === (e5 = i5.parentNode) || void 0 === e5 || e5.removeChild(i5);
                }
              }
              return null !== (i4 = s[t5]) && void 0 !== i4 ? i4 : null;
            }
          }, 641: function(t4, e4, i3) {
            i3.d(e4, { $: function() {
              return r2;
            }, l: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4) {
              let o4 = t5.getBoundingClientRect(), n3 = t5;
              const r3 = o4.top, s = o4.height;
              for (; n3 && n3 !== e5 && n3.parentNode; ) {
                if (n3 = n3.parentNode, o4 = n3.getBoundingClientRect(), r3 > o4.bottom) return false;
                if (o4.top >= r3 + s) return false;
              }
              return (i4.documentElement && i4.documentElement.clientHeight || 0) >= r3;
            }
            function r2(t5, e5, i4) {
              o3.J.isHTMLElement(t5) && !n2(t5, e5, i4) && (e5.clientHeight !== e5.scrollHeight && (e5.scrollTop = t5.offsetTop), n2(t5, e5, i4) || t5.scrollIntoView());
            }
          }, 58720: function(t4, e4, i3) {
            i3.d(e4, { $$: function() {
              return u2;
            }, DY: function() {
              return p2;
            }, bE: function() {
              return f2;
            }, fz: function() {
              return h2;
            }, tI: function() {
              return g2;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(42448), s = i3(98253), a2 = i3(83260), l = i3(97369);
            let c = 1;
            const d2 = () => (c++, c);
            function u2(t5, e5) {
              let i4;
              if (o3.IS_ES_NEXT || !/:scope/.test(t5) || !o3.IS_IE || e5 && e5.nodeType === Node.DOCUMENT_NODE) i4 = e5.querySelectorAll(t5);
              else {
                const o4 = e5.id, n3 = o4 || "_selector_id_" + String(Math.random()).slice(2) + d2();
                t5 = t5.replace(/:scope/g, "#" + n3), !o4 && e5.setAttribute("id", n3), i4 = e5.parentNode.querySelectorAll(t5), o4 || e5.removeAttribute("id");
              }
              return [].slice.call(i4);
            }
            const h2 = (t5, e5) => {
              if (!t5 || t5.nodeType !== Node.ELEMENT_NODE) return "";
              if (!t5.parentNode || e5 === t5) return "";
              if (t5.id) return "//*[@id='" + t5.id + "']";
              const i4 = [].filter.call(t5.parentNode.childNodes, (e6) => e6.nodeName === t5.nodeName);
              return h2(t5.parentNode, e5) + "/" + t5.nodeName.toLowerCase() + (i4.length > 1 ? "[" + ((0, r2.$)(i4).indexOf(t5) + 1) + "]" : "");
            }, p2 = (t5) => ("container" in t5 && (t5 = t5.container), u2("[ref],[data-ref]", t5).reduce((t6, e5) => {
              const i4 = (0, l.attr)(e5, "-ref");
              return i4 && (0, s.K)(i4) && (t6[(0, a2.x)(i4)] = e5, t6[i4] = e5), t6;
            }, {})), f2 = (t5) => {
              if (!n2.J.isElement(t5)) return null;
              const e5 = [];
              let i4 = t5;
              for (; i4 && i4.nodeType === Node.ELEMENT_NODE; ) {
                let t6 = i4.nodeName.toLowerCase();
                if (i4.id) {
                  t6 += "#" + i4.id, e5.unshift(t6);
                  break;
                }
                {
                  let e6 = i4, o4 = 1;
                  do {
                    e6 = e6.previousElementSibling, e6 && e6.nodeName.toLowerCase() === t6 && o4++;
                  } while (e6);
                  t6 += ":nth-of-type(" + o4 + ")";
                }
                e5.unshift(t6), i4 = i4.parentNode;
              }
              return e5.join(" > ");
            };
            function g2(t5, e5) {
              let i4 = t5;
              if ((0, s.K)(t5)) try {
                i4 = e5.querySelector(t5);
              } catch (e6) {
                throw (0, l.error)('String "' + t5 + '" should be valid HTML selector');
              }
              if (!i4 || "object" != typeof i4 || !n2.J.isElement(i4) || !i4.cloneNode) throw (0, l.error)('Element "' + t5 + '" should be string or HTMLElement instance');
              return i4;
            }
          }, 40677: function(t4, e4, i3) {
            i3.d(e4, { h: function() {
              return a2;
            } });
            var o3 = i3(37923), n2 = i3(12461), r2 = i3(25376), s = i3(98253);
            function a2(t5, e5, i4) {
              if (!(0, s.K)(t5) || !t5.length) return;
              const a3 = t5.split(".");
              let l = i4, c = a3[0];
              for (let t6 = 0; a3.length - 1 > t6; t6 += 1) c = a3[t6], (0, o3.c)(l[c]) || (0, r2.Q)(l[c]) || (l[c] = (0, n2.k)(a3[t6 + 1]) ? [] : {}), l = l[c];
              l && (l[a3[a3.length - 1]] = e5);
            }
          }, 70069: function(t4, e4, i3) {
            i3.d(e4, { d: function() {
              return o3;
            } });
            class o3 {
              constructor(t5) {
                this.limit = t5, this.stack = [];
              }
              push(t5) {
                return this.stack.push(t5), this.stack.length > this.limit && this.stack.shift(), this;
              }
              pop() {
                return this.stack.pop();
              }
              find(t5) {
                return this.stack.find(t5);
              }
            }
          }, 84976: function(t4, e4, i3) {
            i3.d(e4, { HP: function() {
              return u2;
            }, T1: function() {
              return a2;
            }, b_: function() {
              return l;
            }, my: function() {
              return p2;
            }, o_: function() {
              return c;
            }, qN: function() {
              return h2;
            }, yt: function() {
              return d2;
            } });
            var o3 = i3(92039), n2 = i3(35642), r2 = i3(26150), s = i3(72197);
            function a2(t5, ...e5) {
              return t5(...e5);
            }
            function l(t5, e5) {
              (0, r2.C)(e5, "data-editor_id", t5.id), !e5.component && Object.defineProperty(e5, "jodit", { value: t5 });
            }
            function c(t5, e5) {
              return (0, o3.y)(t5) ? t5.then((t6) => t6, () => null).finally(e5) : null == e5 ? void 0 : e5();
            }
            const d2 = (t5, e5) => e5.async.promise((i4, o4) => {
              const n3 = new Image(), r3 = () => {
                e5.e.off(n3), null == o4 || o4();
              }, s2 = () => {
                e5.e.off(n3), i4(n3);
              };
              e5.e.one(n3, "load", s2).one(n3, "error", r3).one(n3, "abort", r3), n3.src = t5, n3.complete && s2();
            }), u2 = (t5, e5 = true) => {
              if (e5) return Object.keys(t5);
              const i4 = [];
              for (const e6 in t5) i4.push(e6);
              return i4;
            }, h2 = (t5, e5, { control: i4 }, o4) => {
              var r3;
              const a3 = `button${i4.command}`;
              let l2 = null !== (r3 = i4.args && i4.args[0]) && void 0 !== r3 ? r3 : (0, s.m)(t5, a3);
              if ((0, n2.R)(l2)) return false;
              (0, s.m)(t5, a3, l2), o4 && (l2 = o4(l2)), t5.execCommand(i4.command, false, null != l2 ? l2 : void 0);
            }, p2 = (t5) => {
              if (t5.clipboardData) return t5.clipboardData;
              try {
                return t5.dataTransfer || new DataTransfer();
              } catch (t6) {
                return null;
              }
            };
          }, 58269: function(t4, e4, i3) {
            i3.d(e4, { T: function() {
              return a2;
            } });
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(9823), s = i3(32291);
            function a2(t5, e5, i4, a3, l, c) {
              if ((0, r2.Gp)(a3)) try {
                a3.init(t5);
              } catch (t6) {
                if (!o3.IS_PROD) throw t6;
              }
              l.set(e5, a3), c.delete(e5), a3.hasStyle && (0, s.M)(t5, e5).catch((t6) => {
              }), a3.styles && ((0, n2.My)(t5, e5, "style").innerHTML = a3.styles);
            }
          }, 32291: function(t4, e4, i3) {
            i3.d(e4, { M: function() {
              return l;
            }, o: function() {
              return d2;
            } });
            var o3 = i3(17352), n2 = i3(449), r2 = i3(27301), s = i3(96134);
            const a2 = /* @__PURE__ */ new Set();
            async function l(t5, e5) {
              const i4 = c(t5, e5, false);
              if (!a2.has(i4)) return a2.add(i4), (0, r2.S5)(t5, i4);
            }
            function c(t5, e5, i4) {
              return e5 = (0, n2.k)(e5), t5.basePath + "plugins/" + e5 + "/" + e5 + "." + (i4 ? "js" : "css");
            }
            function d2(t5, e5, i4, n3) {
              try {
                const o4 = i4.filter((e6) => !t5.has((0, s.P)(e6.name)));
                o4.length && function(t6, e6, i5) {
                  e6.map((e7) => {
                    const o5 = e7.url || c(t6, e7.name, true);
                    return (0, r2.w4)(t6, o5).then(i5).catch(() => null);
                  });
                }(e5, o4, n3);
              } catch (t6) {
                if (!o3.IS_PROD) throw t6;
              }
            }
          }, 58157: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(69052);
            function r2(t5, e5) {
              try {
                try {
                  return (0, n2.T)(e5) ? new e5(t5) : e5;
                } catch (i4) {
                  if ((0, n2.T)(e5) && !e5.prototype) return e5(t5);
                }
              } catch (t6) {
                if (!o3.IS_PROD) throw t6;
              }
              return null;
            }
          }, 96134: function(t4, e4, i3) {
            i3.d(e4, { P: function() {
              return n2;
            } });
            var o3 = i3(449);
            function n2(t5) {
              return (0, o3.k)(t5).toLowerCase();
            }
          }, 71005: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return o3.k;
            } });
            var o3 = i3(29866);
            i3(77402);
          }, 77402: function(t4, e4, i3) {
            i3.d(e4, { $: function() {
              return d2;
            } }), i3(17352);
            var o3 = i3(56298), n2 = i3(32709), r2 = i3(9823), s = i3(58269), a2 = i3(32291), l = i3(58157), c = i3(96134);
            class d2 {
              constructor() {
                this.__items = /* @__PURE__ */ new Map();
              }
              add(t5, e5) {
                this.__items.set((0, c.P)(t5), e5), o3.RR.fire(`plugin:${t5}:ready`);
              }
              get(t5) {
                return this.__items.get((0, c.P)(t5));
              }
              remove(t5) {
                this.__items.delete((0, c.P)(t5));
              }
              __getFullPluginsList(t5) {
                const e5 = [];
                return this.__items.forEach((i4, o4) => {
                  t5 && !t5.has(o4) || e5.push([o4, i4]);
                }), e5;
              }
              __init(t5) {
                const { extraList: e5, disableList: i4, filter: o4 } = function(t6) {
                  return { extraList: t6.o.extraPlugins.map((t7) => (0, r2.Kg)(t7) ? { name: t7 } : t7), disableList: new Set((0, n2.uM)(t6.o.disablePlugins).map(c.P)), filter: t6.o.safeMode ? new Set(t6.o.safePluginsList) : null };
                }(t5), d3 = /* @__PURE__ */ new Map(), u2 = {}, h2 = /* @__PURE__ */ new Set();
                t5.__plugins = u2;
                const p2 = () => {
                  if (t5.isInDestruct) return;
                  let e6 = false;
                  this.__getFullPluginsList(o4).forEach(([o5, n3]) => {
                    if (i4.has(o5) || d3.has(o5)) return;
                    const a3 = null == n3 ? void 0 : n3.requires;
                    if (a3 && (0, r2.cy)(a3) && a3.length) {
                      if (a3.some((t6) => i4.has(t6))) return;
                      if (!a3.every((t6) => d3.has(t6))) return void h2.add(o5);
                    }
                    e6 = true;
                    const c2 = (0, l.k)(t5, n3);
                    if (!c2) return d3.set(o5, null), void h2.delete(o5);
                    (0, s.T)(t5, o5, n3, c2, d3, h2), u2[o5] = c2;
                  }), e6 && (t5.e.fire("updatePlugins"), p2());
                };
                e5 && e5.length && (0, a2.o)(this.__items, t5, e5, p2), p2(), function(t6, e6) {
                  t6.e.on("beforeDestruct", () => {
                    Object.keys(e6).forEach((i5) => {
                      const o5 = e6[i5];
                      (0, r2.pV)(o5) && o5.destruct(t6), delete e6[i5];
                    }), delete t6.__plugins;
                  });
                }(t5, u2);
              }
              wait(t5) {
                return new Promise((e5) => {
                  if (this.get(t5)) return e5();
                  const i4 = () => {
                    e5(), o3.RR.off(`plugin:${t5}:ready`, i4);
                  };
                  o3.RR.on(`plugin:${t5}:ready`, i4);
                });
              }
            }
          }, 29866: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return a2;
            } });
            var o3 = i3(31635), n2 = i3(77753), r2 = i3(22664), s = i3(83044);
            class a2 extends n2.vG {
              className() {
                return "Plugin";
              }
              constructor(t5) {
                super(t5), this.buttons = [], this.hasStyle = false, this.__inited = false, t5.e.on("afterPluginSystemInit", this.__afterPluginSystemInit).on("afterInit", this.__afterInit).on("beforeDestruct", this.__beforeDestruct);
              }
              __afterPluginSystemInit() {
                const { j: t5, buttons: e5 } = this;
                e5 && (0, s.y)(t5) && e5.forEach((e6) => {
                  t5.registerButton(e6);
                });
              }
              __afterInit() {
                this.__inited = true, this.setStatus(n2.f.ready), this.afterInit(this.jodit);
              }
              init(t5) {
                this.jodit.isReady && (this.afterInit(this.jodit), this.__afterPluginSystemInit(), this.jodit.e.fire("rebuildToolbar"));
              }
              __beforeDestruct() {
                var t5;
                if (this.isInDestruct) return;
                const { j: e5 } = this;
                if (e5.e.off("afterPluginSystemInit", this.__afterPluginSystemInit).off("afterInit", this.__afterInit).off("beforeDestruct", this.destruct), this.setStatus(n2.f.beforeDestruct), !this.__inited) return super.destruct();
                (0, s.y)(e5) && (null === (t5 = this.buttons) || void 0 === t5 || t5.forEach((t6) => {
                  null == e5 || e5.unregisterButton(t6);
                })), this.beforeDestruct(this.j), super.destruct();
              }
            }
            a2.requires = [], (0, o3.Cg)([r2.autobind], a2.prototype, "__afterPluginSystemInit", null), (0, o3.Cg)([r2.autobind], a2.prototype, "__afterInit", null), (0, o3.Cg)([r2.autobind], a2.prototype, "__beforeDestruct", null);
          }, 49853: function(t4, e4, i3) {
            i3.d(e4, { d: function() {
              return d2;
            } });
            var o3 = i3(31635), n2 = i3(64890), r2 = i3(26318), s = i3(65147), a2 = i3(50156), l = (i3(27337), i3(91672)), c = i3(36115);
            class d2 {
              className() {
                return "Ajax";
              }
              constructor(t5, e5 = c.T.prototype.defaultAjaxOptions) {
                this.__async = new n2.j(), this.__isFulfilled = false, this.__activated = false, this.__isDestructed = false, this.options = (0, s.ConfigProto)(t5 || {}, e5), this.xhr = this.o.xhr ? this.o.xhr() : new XMLHttpRequest();
              }
              __buildParams(t5, e5) {
                return (0, s.isPlainObject)(t5) && this.options.contentType && this.options.contentType.includes("application/json") ? JSON.stringify(t5) : (0, s.isFunction)(this.o.queryBuild) ? this.o.queryBuild.call(this, t5, e5) : (0, s.isString)(t5) || t5 instanceof window.FormData || "object" == typeof t5 && null != t5 && (0, s.isFunction)(t5.append) ? t5 : (0, s.buildQuery)(t5);
              }
              get o() {
                return this.options;
              }
              abort() {
                if (this.__isFulfilled) return this;
                try {
                  this.__isFulfilled = true, this.xhr.abort();
                } catch (t5) {
                }
                return this;
              }
              send() {
                this.__activated = true;
                const { xhr: t5, o: e5 } = this, i4 = this.prepareRequest();
                return this.__async.promise(async (o4, n3) => {
                  var r3;
                  const c2 = () => {
                    this.__isFulfilled = true, n3(a2.FI("Connection error"));
                  }, d3 = () => {
                    this.__isFulfilled = true, o4(new l.Y(i4, t5.status, t5.statusText, t5.responseType ? t5.response : t5.responseText));
                  };
                  t5.onload = d3, t5.onabort = () => {
                    this.__isFulfilled = true, n3(a2.h2("Abort connection"));
                  }, t5.onerror = c2, t5.ontimeout = c2, e5.responseType && (t5.responseType = e5.responseType), t5.onprogress = (t6) => {
                    var e6, i5;
                    let o5 = 0;
                    t6.lengthComputable && (o5 = t6.loaded / t6.total * 100), null === (i5 = (e6 = this.options).onProgress) || void 0 === i5 || i5.call(e6, o5);
                  }, t5.onreadystatechange = () => {
                    var i5, o5;
                    null === (o5 = (i5 = this.options).onProgress) || void 0 === o5 || o5.call(i5, 10), t5.readyState === XMLHttpRequest.DONE && (e5.successStatuses.includes(t5.status) ? d3() : t5.statusText && (this.__isFulfilled = true, n3(a2.FI(t5.statusText))));
                  }, t5.withCredentials = null !== (r3 = e5.withCredentials) && void 0 !== r3 && r3;
                  const { url: u2, data: h2, method: p2 } = i4;
                  t5.open(p2, u2, true), e5.contentType && t5.setRequestHeader && t5.setRequestHeader("Content-type", e5.contentType);
                  let { headers: f2 } = e5;
                  (0, s.isFunction)(f2) && (f2 = await f2.call(this)), f2 && t5.setRequestHeader && Object.keys(f2).forEach((e6) => {
                    t5.setRequestHeader(e6, f2[e6]);
                  }), this.__async.setTimeout(() => {
                    t5.send(h2 ? this.__buildParams(h2) : void 0);
                  }, 0);
                });
              }
              prepareRequest() {
                if (!this.o.url) throw a2.z3("Need URL for AJAX request");
                let t5 = this.o.url;
                const e5 = this.o.data, i4 = (this.o.method || "get").toLowerCase();
                if ("get" === i4 && e5 && (0, s.isPlainObject)(e5)) {
                  const i5 = t5.indexOf("?");
                  if (-1 !== i5) {
                    const o5 = (0, s.parseQuery)(t5);
                    t5 = t5.substring(0, i5) + "?" + (0, s.buildQuery)({ ...o5, ...e5 });
                  } else t5 += "?" + (0, s.buildQuery)(this.o.data);
                }
                const o4 = { url: t5, method: i4, data: e5 };
                return d2.log.splice(100), d2.log.push(o4), o4;
              }
              destruct() {
                this.__isDestructed || (this.__isDestructed = true, this.__activated && !this.__isFulfilled && (this.abort(), this.__isFulfilled = true), this.__async.destruct());
              }
            }
            d2.log = [], (0, o3.Cg)([r2.Ay], d2.prototype, "destruct", null);
          }, 27337: function(t4, e4, i3) {
            i3(36115).T.prototype.defaultAjaxOptions = { successStatuses: [200, 201, 202], method: "GET", url: "", data: null, contentType: "application/x-www-form-urlencoded; charset=UTF-8", headers: { "X-REQUESTED-WITH": "XMLHttpRequest" }, withCredentials: false, xhr: () => new XMLHttpRequest() };
          }, 53883: function(t4, e4, i3) {
            i3.d(e4, { Y: function() {
              return n2.Y;
            }, d: function() {
              return o3.d;
            } });
            var o3 = i3(49853), n2 = i3(91672);
          }, 91672: function(t4, e4, i3) {
            i3.d(e4, { Y: function() {
              return o3;
            } });
            class o3 {
              get url() {
                return this.request.url;
              }
              constructor(t5, e5, i4, o4) {
                this.request = t5, this.status = e5, this.statusText = i4, this.body = o4;
              }
              async json() {
                return JSON.parse(this.body);
              }
              text() {
                return Promise.resolve(this.body);
              }
              async blob() {
                return this.body;
              }
            }
          }, 46602: function(t4, e4, i3) {
            i3.d(e4, { W: function() {
              return o3.W;
            } });
            var o3 = i3(5298);
            i3(83541);
          }, 5298: function(t4, e4, i3) {
            i3.d(e4, { W: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(55186);
            function r2(t5, e5, i4) {
              let r3 = n2.J.findSibling(e5, i4), s = n2.J.findSibling(e5, !i4);
              for (; n2.J.isElement(r3) && !n2.J.isTag(r3, o3.INSEPARABLE_TAGS) && n2.J.isContentEditable(r3, t5.editor) && (!s || !n2.J.closest(e5, n2.J.isElement, t5.editor)); ) i4 || !r3.firstChild ? r3.appendChild(e5) : n2.J.before(r3.firstChild, e5), r3 = n2.J.sibling(e5, i4), s = n2.J.sibling(e5, !i4);
            }
          }, 83541: function(t4, e4, i3) {
            i3.d(e4, { G: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4) {
              let n3 = t5;
              for (; n3 && n3 !== i4; ) {
                if (o3.J.findSibling(n3, e5)) return;
                if (o3.J.isBlock(n3.parentElement)) break;
                n3 = n3.parentElement, n3 && n3 !== i4 && (e5 ? o3.J.before(n3, t5) : o3.J.after(n3, t5));
              }
            }
          }, 87332: function(t4, e4, i3) {
            i3.d(e4, { Ag: function() {
              return n2.Ag;
            }, DI: function() {
              return n2.DI;
            }, LN: function() {
              return o3.L;
            }, OJ: function() {
              return n2.OJ;
            }, Zk: function() {
              return n2.Zk;
            }, dj: function() {
              return n2.dj;
            }, xk: function() {
              return n2.xk;
            } });
            var o3 = i3(84602), n2 = i3(8757);
          }, 84602: function(t4, e4, i3) {
            i3.d(e4, { L: function() {
              return u2;
            } });
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(65147), l = i3(9823), c = (i3(28712), i3(83541)), d2 = i3(8757);
            class u2 {
              constructor(t5) {
                this.jodit = t5, t5.e.on("removeMarkers", () => {
                  this.removeMarkers();
                });
              }
              get j() {
                return this.jodit;
              }
              errorNode(t5) {
                if (!s.J.isNode(t5)) throw (0, a2.error)("Parameter node must be instance of Node");
              }
              get area() {
                return this.j.editor;
              }
              get win() {
                return this.j.ew;
              }
              get doc() {
                return this.j.ed;
              }
              get sel() {
                return this.j.o.shadowRoot && (0, l.Tn)(this.j.o.shadowRoot.getSelection) ? this.j.o.shadowRoot.getSelection() : this.win.getSelection();
              }
              get range() {
                const t5 = this.sel;
                return t5 && t5.rangeCount ? t5.getRangeAt(0) : this.createRange();
              }
              get isInsideArea() {
                const { sel: t5 } = this, e5 = (null == t5 ? void 0 : t5.rangeCount) ? t5.getRangeAt(0) : null;
                return !(!e5 || !s.J.isOrContains(this.area, e5.startContainer));
              }
              createRange(t5 = false) {
                const e5 = this.doc.createRange();
                return t5 && this.selectRange(e5), e5;
              }
              remove() {
                const t5 = this.sel, e5 = this.current();
                if (t5 && e5) for (let e6 = 0; t5.rangeCount > e6; e6 += 1) t5.getRangeAt(e6).deleteContents(), t5.getRangeAt(e6).collapse(true);
              }
              clear() {
                var t5, e5;
                (null === (t5 = this.sel) || void 0 === t5 ? void 0 : t5.rangeCount) && (null === (e5 = this.sel) || void 0 === e5 || e5.removeAllRanges());
              }
              removeNode(t5) {
                if (!s.J.isOrContains(this.j.editor, t5, true)) throw (0, a2.error)("Selection.removeNode can remove only editor's children");
                s.J.safeRemove(t5), this.j.e.fire("afterRemoveNode", t5);
              }
              insertCursorAtPoint(t5, e5) {
                this.removeMarkers();
                try {
                  const i4 = this.createRange();
                  return (() => {
                    if (this.doc.caretPositionFromPoint) {
                      const o4 = this.doc.caretPositionFromPoint(t5, e5);
                      if (o4) return void i4.setStart(o4.offsetNode, o4.offset);
                    }
                    if (this.doc.caretRangeFromPoint) {
                      const o4 = this.doc.caretRangeFromPoint(t5, e5);
                      i4.setStart(o4.startContainer, o4.startOffset);
                    }
                  })(), i4.collapse(true), this.selectRange(i4), true;
                } catch (t6) {
                }
                return false;
              }
              get hasMarkers() {
                return Boolean(this.markers.length);
              }
              get markers() {
                return (0, a2.$$)("span[data-" + n2.MARKER_CLASS + "]", this.area);
              }
              removeMarkers() {
                s.J.safeRemove.apply(null, this.markers);
              }
              marker(t5 = false, e5) {
                let i4 = null;
                e5 && (i4 = e5.cloneRange(), i4.collapse(t5));
                const o4 = this.j.createInside.span();
                return o4.id = n2.MARKER_CLASS + "_" + Number(/* @__PURE__ */ new Date()) + "_" + String(Math.random()).slice(2), o4.style.lineHeight = "0", o4.style.display = "none", s.J.markTemporary(o4), (0, a2.attr)(o4, "data-" + n2.MARKER_CLASS, t5 ? "start" : "end"), o4.appendChild(this.j.createInside.text(n2.INVISIBLE_SPACE)), i4 && s.J.isOrContains(this.area, t5 ? i4.startContainer : i4.endContainer) && i4.insertNode(o4), o4;
              }
              restore() {
                let t5 = false;
                const e5 = (t6) => `span[data-${n2.MARKER_CLASS}=${t6 ? "start" : "end"}]`, i4 = this.area.querySelector(e5(true)), o4 = this.area.querySelector(e5(false));
                if (i4) {
                  if (t5 = this.createRange(), o4) t5.setStartAfter(i4), s.J.safeRemove(i4), t5.setEndBefore(o4), s.J.safeRemove(o4);
                  else {
                    const e6 = i4.previousSibling;
                    s.J.isText(e6) ? t5.setStart(e6, e6.nodeValue ? e6.nodeValue.length : 0) : t5.setStartBefore(i4), s.J.safeRemove(i4), t5.collapse(true);
                  }
                  t5 && this.selectRange(t5);
                }
              }
              fakes() {
                const t5 = this.sel;
                if (!t5 || !t5.rangeCount) return [];
                const e5 = t5.getRangeAt(0), i4 = e5.cloneRange();
                i4.collapse(true);
                const o4 = this.j.createInside.fake();
                s.J.safeInsertNode(i4, o4), e5.setStartBefore(o4);
                const n3 = [o4];
                if (!e5.collapsed) {
                  const t6 = e5.cloneRange();
                  t6.collapse(false);
                  const i5 = this.j.createInside.fake();
                  s.J.safeInsertNode(t6, i5), e5.setEndAfter(i5), n3.push(i5);
                }
                return this.selectRange(e5), n3;
              }
              restoreFakes(t5) {
                var e5, i4, o4, n3;
                const r3 = t5.filter((t6) => t6.isConnected);
                if (!r3.length) return;
                const [a3, l2] = r3, c2 = this.createRange();
                c2.setStartAfter(a3), l2 && c2.setEndBefore(l2), this.selectRange(c2), (null === (e5 = a3.parentNode) || void 0 === e5 ? void 0 : e5.firstChild) !== (null === (i4 = a3.parentNode) || void 0 === i4 ? void 0 : i4.lastChild) && s.J.safeRemove(a3), (null === (o4 = null == l2 ? void 0 : l2.parentNode) || void 0 === o4 ? void 0 : o4.firstChild) !== (null === (n3 = null == l2 ? void 0 : l2.parentNode) || void 0 === n3 ? void 0 : n3.lastChild) && s.J.safeRemove(l2);
              }
              save(t5 = false) {
                if (this.hasMarkers) return [];
                const e5 = this.sel;
                if (!e5 || !e5.rangeCount) return [];
                const i4 = [], o4 = e5.rangeCount, n3 = [];
                for (let t6 = 0; o4 > t6; t6 += 1) if (n3[t6] = e5.getRangeAt(t6), n3[t6].collapsed) {
                  const e6 = this.marker(true, n3[t6]);
                  i4[t6] = { startId: e6.id, collapsed: true, startMarker: e6.outerHTML };
                } else {
                  const e6 = this.marker(true, n3[t6]), o5 = this.marker(false, n3[t6]);
                  i4[t6] = { startId: e6.id, endId: o5.id, collapsed: false, startMarker: e6.outerHTML, endMarker: o5.outerHTML };
                }
                if (!t5) {
                  e5.removeAllRanges();
                  for (let r3 = o4 - 1; r3 >= 0; --r3) {
                    const o5 = this.doc.getElementById(i4[r3].startId);
                    if (o5) {
                      if (i4[r3].collapsed) n3[r3].setStartAfter(o5), n3[r3].collapse(true);
                      else if (n3[r3].setStartBefore(o5), i4[r3].endId) {
                        const t6 = this.doc.getElementById(i4[r3].endId);
                        t6 && n3[r3].setEndAfter(t6);
                      }
                      try {
                        e5.addRange(n3[r3].cloneRange());
                      } catch (t6) {
                      }
                    }
                  }
                }
                return i4;
              }
              focus(t5 = { preventScroll: true }) {
                var e5, i4;
                if (!this.isFocused()) {
                  const o4 = (0, a2.getScrollParent)(this.j.container), n3 = null == o4 ? void 0 : o4.scrollTop;
                  this.j.iframe && "complete" === this.doc.readyState && this.j.iframe.focus(t5), this.win.focus(), this.area.focus(t5), n3 && (null == o4 ? void 0 : o4.scrollTo) && o4.scrollTo(0, n3);
                  const r3 = this.sel, l2 = (null == r3 ? void 0 : r3.rangeCount) ? null == r3 ? void 0 : r3.getRangeAt(0) : null;
                  if (!l2 || !s.J.isOrContains(this.area, l2.startContainer)) {
                    const t6 = this.createRange();
                    t6.setStart(this.area, 0), t6.collapse(true), this.selectRange(t6, false);
                  }
                  return this.j.editorIsActive || null === (i4 = null === (e5 = this.j) || void 0 === e5 ? void 0 : e5.events) || void 0 === i4 || i4.fire("focus"), true;
                }
                return false;
              }
              isCollapsed() {
                const t5 = this.sel;
                for (let e5 = 0; t5 && t5.rangeCount > e5; e5 += 1) if (!t5.getRangeAt(e5).collapsed) return false;
                return true;
              }
              isFocused() {
                return this.doc.hasFocus && this.doc.hasFocus() && this.area === this.doc.activeElement;
              }
              current(t5 = true) {
                if (this.j.getRealMode() === n2.MODE_WYSIWYG) {
                  const e5 = this.sel;
                  if (!e5 || 0 === e5.rangeCount) return null;
                  const i4 = e5.getRangeAt(0);
                  let o4 = i4.startContainer, n3 = false;
                  const r3 = (t6) => n3 ? t6.lastChild : t6.firstChild;
                  if (s.J.isTag(o4, "br") && e5.isCollapsed) return o4;
                  if (!s.J.isText(o4)) {
                    if (o4 = i4.startContainer.childNodes[i4.startOffset], o4 || (o4 = i4.startContainer.childNodes[i4.startOffset - 1], n3 = true), o4 && e5.isCollapsed && !s.J.isText(o4)) {
                      if (!n3 && s.J.isText(o4.previousSibling)) o4 = o4.previousSibling;
                      else if (t5) {
                        let t6 = r3(o4);
                        for (; t6; ) {
                          if (t6 && s.J.isText(t6)) {
                            o4 = t6;
                            break;
                          }
                          t6 = r3(t6);
                        }
                      }
                    }
                    if (o4 && !e5.isCollapsed && !s.J.isText(o4)) {
                      let t6 = o4, e6 = o4;
                      do {
                        t6 = t6.firstChild, e6 = e6.lastChild;
                      } while (t6 && e6 && !s.J.isText(t6));
                      t6 === e6 && t6 && s.J.isText(t6) && (o4 = t6);
                    }
                  }
                  if (o4 && s.J.isOrContains(this.area, o4)) return o4;
                }
                return null;
              }
              insertNode(t5, e5 = true, i4 = true) {
                this.errorNode(t5);
                const o4 = s.J.isFragment(t5) ? t5.lastChild : t5;
                this.j.e.fire("safeHTML", t5), !this.isFocused() && this.j.isEditorMode() && (this.focus(), this.restore());
                const n3 = this.sel;
                this.j.history.snapshot.transaction(() => {
                  if (this.isCollapsed() || this.j.execCommand("Delete"), this.j.e.fire("beforeInsertNode", t5), n3 && n3.rangeCount) {
                    const e6 = n3.getRangeAt(0);
                    s.J.isOrContains(this.area, e6.commonAncestorContainer) ? s.J.safeInsertNode(e6, t5) : this.area.appendChild(t5);
                  } else this.area.appendChild(t5);
                  const i5 = (t6) => {
                    if (s.J.isBlock(t6)) {
                      const e6 = t6.lastChild;
                      if (e6) return i5(e6);
                    }
                    this.setCursorAfter(t6);
                  };
                  e5 && (s.J.isFragment(t5) ? o4 && i5(o4) : i5(t5)), this.j.o.scrollToPastedContent && (0, a2.scrollIntoViewIfNeeded)(null != o4 ? o4 : t5, this.j.editor, this.doc);
                }), i4 && this.j.events && this.j.__imdSynchronizeValues(), this.j.events && this.j.e.fire("afterInsertNode", s.J.isFragment(t5) ? o4 : t5);
              }
              insertHTML(t5, e5 = true) {
                if ("" === t5) return;
                const i4 = this.j.createInside.div(), o4 = this.j.createInside.fragment();
                let n3;
                if (!this.isFocused() && this.j.isEditorMode() && (this.focus(), this.restore()), s.J.isNode(t5) ? i4.appendChild(t5) : i4.innerHTML = t5.toString(), (this.j.isEditorMode() || false !== this.j.e.fire("insertHTML", i4.innerHTML)) && (n3 = i4.lastChild, n3)) {
                  for (; i4.firstChild; ) n3 = i4.firstChild, o4.appendChild(i4.firstChild);
                  this.insertNode(o4, e5, false), this.j.__imdSynchronizeValues();
                }
              }
              insertImage(t5, e5 = null, i4 = null) {
                const o4 = (0, l.Kg)(t5) ? this.j.createInside.element("img") : t5;
                if ((0, l.Kg)(t5) && o4.setAttribute("src", t5), null != i4) {
                  let t6 = i4.toString();
                  t6 && "auto" !== t6 && 0 > String(t6).indexOf("px") && 0 > String(t6).indexOf("%") && (t6 += "px"), (0, a2.call)(this.j.o.resizer.forImageChangeAttributes ? a2.attr : a2.css, o4, "width", t6);
                }
                e5 && "object" == typeof e5 && (0, a2.css)(o4, e5);
                const n3 = () => {
                  (o4.offsetHeight > o4.naturalHeight || o4.offsetWidth > o4.naturalWidth) && (o4.style.width = "", o4.style.height = ""), o4.removeEventListener("load", n3);
                };
                this.j.e.on(o4, "load", n3), o4.complete && n3(), this.insertNode(o4), this.j.e.fire("afterInsertImage", o4);
              }
              eachSelection(t5) {
                var e5;
                const i4 = this.sel;
                if (i4 && i4.rangeCount) {
                  const o4 = i4.getRangeAt(0);
                  let r3 = o4.commonAncestorContainer;
                  s.J.isHTMLElement(r3) || (r3 = r3.parentElement);
                  const c2 = [], d3 = o4.startOffset, u3 = r3.childNodes.length;
                  let h2 = o4.startContainer === this.area ? r3.childNodes[u3 > d3 ? d3 : u3 - 1] : o4.startContainer, p2 = o4.endContainer === this.area ? r3.childNodes[o4.endOffset - 1] : o4.endContainer;
                  s.J.isText(h2) && h2 === o4.startContainer && o4.startOffset === (null === (e5 = h2.nodeValue) || void 0 === e5 ? void 0 : e5.length) && h2.nextSibling && (h2 = h2.nextSibling), s.J.isText(p2) && p2 === o4.endContainer && 0 === o4.endOffset && p2.previousSibling && (p2 = p2.previousSibling);
                  const f2 = (t6) => {
                    !t6 || t6 === r3 || s.J.isEmptyTextNode(t6) || (0, l.rg)(t6) || c2.push(t6);
                  };
                  f2(h2), h2 !== p2 && s.J.isOrContains(r3, h2, true) && s.J.find(h2, (t6) => (f2(t6), t6 === p2 || t6 && t6.contains && t6.contains(p2)), r3, true, false);
                  const g2 = (e6) => {
                    if (s.J.isOrContains(this.j.editor, e6, true)) {
                      if (e6.nodeName.match(/^(UL|OL)$/)) return (0, a2.toArray)(e6.childNodes).forEach(g2);
                      if (s.J.isTag(e6, "li")) if (e6.firstChild) e6 = e6.firstChild;
                      else {
                        const t6 = this.j.createInside.text(n2.INVISIBLE_SPACE);
                        e6.appendChild(t6), e6 = t6;
                      }
                      t5(e6);
                    }
                  };
                  0 === c2.length && s.J.isEmptyTextNode(h2) && c2.push(h2), 0 === c2.length && h2.firstChild && c2.push(h2.firstChild), c2.forEach(g2);
                }
              }
              cursorInTheEdge(t5, e5, i4 = null) {
                var o4, r3;
                const l2 = !t5, c2 = null === (o4 = this.sel) || void 0 === o4 ? void 0 : o4.getRangeAt(0);
                if (null != i4 || (i4 = this.current(false)), !c2 || !i4 || !s.J.isOrContains(e5, i4, true)) return null;
                const d3 = t5 ? c2.startContainer : c2.endContainer, u3 = t5 ? c2.startOffset : c2.endOffset, h2 = (t6) => Boolean(t6 && !s.J.isTag(t6, "br") && !s.J.isEmptyTextNode(t6) && !s.J.isTemporary(t6) && !(s.J.isElement(t6) && true === this.j.e.fire("isInvisibleForCursor", t6)));
                if (s.J.isText(d3)) {
                  const e6 = (null === (r3 = d3.nodeValue) || void 0 === r3 ? void 0 : r3.length) ? d3.nodeValue : "";
                  if (l2 && e6.replace((0, n2.INVISIBLE_SPACE_REG_EXP_END)(), "").length > u3) return false;
                  const i5 = (0, n2.INVISIBLE_SPACE_REG_EXP_START)().exec(e6);
                  if (t5 && (i5 && u3 > i5[0].length || !i5 && u3 > 0)) return false;
                } else {
                  const t6 = (0, a2.toArray)(d3.childNodes);
                  if (l2) {
                    if (t6.slice(u3).some(h2)) return false;
                  } else if (t6.slice(0, u3).some(h2)) return false;
                }
                let p2 = i4;
                for (; p2 && p2 !== e5; ) {
                  const e6 = s.J.sibling(p2, t5);
                  if (e6) {
                    if (p2 = e6, p2 && h2(p2)) return false;
                  } else p2 = p2.parentNode;
                }
                return true;
              }
              cursorOnTheLeft(t5, e5) {
                return this.cursorInTheEdge(true, t5, e5);
              }
              cursorOnTheRight(t5, e5) {
                return this.cursorInTheEdge(false, t5, e5);
              }
              setCursorAfter(t5) {
                return this.setCursorNearWith(t5, false);
              }
              setCursorBefore(t5) {
                return this.setCursorNearWith(t5, true);
              }
              setCursorNearWith(t5, e5) {
                var i4, o4;
                if (this.errorNode(t5), !s.J.up(t5, (t6) => t6 === this.area || t6 && t6.parentNode === this.area, this.area)) throw (0, a2.error)("Node element must be in editor");
                const n3 = this.createRange();
                let r3 = null;
                return s.J.isText(t5) ? e5 ? n3.setStart(t5, 0) : n3.setEnd(t5, null !== (o4 = null === (i4 = t5.nodeValue) || void 0 === i4 ? void 0 : i4.length) && void 0 !== o4 ? o4 : 0) : (r3 = this.j.createInside.fake(), e5 ? n3.setStartBefore(t5) : n3.setEndAfter(t5), n3.collapse(e5), s.J.safeInsertNode(n3, r3), n3.selectNode(r3)), n3.collapse(e5), this.selectRange(n3), r3;
              }
              setCursorIn(t5, e5 = false) {
                if (this.errorNode(t5), !s.J.up(t5, (t6) => t6 === this.area || t6 && t6.parentNode === this.area, this.area)) throw (0, a2.error)("Node element must be in editor");
                const i4 = this.createRange();
                let o4 = t5, r3 = t5;
                do {
                  if (s.J.isText(o4) || s.J.isTag(o4, n2.INSEPARABLE_TAGS)) break;
                  r3 = o4, o4 = e5 ? o4.firstChild : o4.lastChild;
                } while (o4);
                if (!o4) {
                  const t6 = this.j.createInside.text(n2.INVISIBLE_SPACE);
                  s.J.isTag(r3, n2.INSEPARABLE_TAGS) ? o4 = r3 : (r3.appendChild(t6), r3 = t6);
                }
                const l2 = o4 || r3;
                return s.J.isTag(l2, n2.INSEPARABLE_TAGS) ? (e5 || s.J.isTag(l2, "br") ? i4.setStartBefore(l2) : i4.setEndAfter(l2), i4.collapse(e5)) : (i4.selectNodeContents(l2), i4.collapse(e5)), this.selectRange(i4), r3;
              }
              selectRange(t5, e5 = true) {
                const i4 = this.sel;
                return e5 && !this.isFocused() && this.focus(), i4 && (i4.removeAllRanges(), i4.addRange(t5)), this.j.e.fire("changeSelection"), this;
              }
              select(t5, e5 = false) {
                if (this.errorNode(t5), !s.J.up(t5, (t6) => t6 === this.area || t6 && t6.parentNode === this.area, this.area)) throw (0, a2.error)("Node element must be in editor");
                const i4 = this.createRange();
                return i4[e5 ? "selectNodeContents" : "selectNode"](t5), this.selectRange(i4);
              }
              get html() {
                const t5 = this.sel;
                if (t5 && t5.rangeCount > 0) {
                  const e5 = t5.getRangeAt(0).cloneContents(), i4 = this.j.createInside.div();
                  return i4.appendChild(e5), i4.innerHTML;
                }
                return "";
              }
              *wrapInTagGen(t5) {
                if (this.isCollapsed()) {
                  const e6 = this.jodit.createInside.element("font", n2.INVISIBLE_SPACE);
                  return this.insertNode(e6, false, false), t5 && t5[0] && e6.appendChild(t5[0]), yield e6, void s.J.unwrap(e6);
                }
                (0, a2.$$)("*[style*=font-size]", this.area).forEach((t6) => {
                  (0, a2.attr)(t6, "data-font-size", t6.style.fontSize.toString()), t6.style.removeProperty("font-size");
                }), this.j.nativeExecCommand("fontsize", false, "7"), (0, a2.$$)("*[data-font-size]", this.area).forEach((t6) => {
                  const e6 = (0, a2.attr)(t6, "data-font-size");
                  e6 && (t6.style.fontSize = e6, (0, a2.attr)(t6, "data-font-size", null));
                });
                const e5 = (0, a2.$$)('font[size="7"]', this.area);
                for (const t6 of e5) {
                  const { firstChild: e6, lastChild: i4 } = t6;
                  e6 && e6 === i4 && (0, l.rg)(e6) || (e6 && (0, l.rg)(e6) && s.J.before(t6, e6), i4 && (0, l.rg)(i4) && s.J.after(t6, i4), yield t6), s.J.unwrap(t6);
                }
              }
              wrapInTag(t5) {
                const e5 = [];
                for (const i4 of this.wrapInTagGen()) try {
                  if (i4.firstChild && i4.firstChild === i4.lastChild && (0, l.rg)(i4.firstChild)) continue;
                  (0, l.Tn)(t5) ? t5(i4) : e5.push(s.J.replace(i4, t5, this.j.createInside));
                } finally {
                  const t6 = i4.parentNode;
                  t6 && (s.J.unwrap(i4), s.J.isEmpty(t6) && s.J.unwrap(t6));
                }
                return e5;
              }
              commitStyle(t5) {
                new d2.xk(t5).apply(this.j);
              }
              splitSelection(t5, e5) {
                if (!this.isCollapsed()) return null;
                const i4 = this.createRange(), o4 = this.range;
                i4.setStartBefore(t5);
                const r3 = this.cursorOnTheRight(t5, e5), a3 = this.cursorOnTheLeft(t5, e5), l2 = this.j.createInside.element("br"), c2 = this.j.createInside.fake(), d3 = c2.cloneNode();
                try {
                  if (r3 || a3) {
                    e5 ? s.J.before(e5, l2) : s.J.safeInsertNode(o4, l2);
                    const t6 = (t7, e6) => {
                      let i5 = e6(t7);
                      for (; i5; ) {
                        const t8 = e6(i5);
                        if (!i5 || !s.J.isTag(i5, "br") && !s.J.isEmptyTextNode(i5)) break;
                        s.J.safeRemove(i5), i5 = t8;
                      }
                    };
                    t6(l2, (t7) => t7.nextSibling), t6(l2, (t7) => t7.previousSibling), s.J.after(l2, d3), s.J.before(l2, c2), r3 ? (i4.setEndBefore(l2), o4.setEndBefore(l2)) : (i4.setEndAfter(l2), o4.setEndAfter(l2));
                  } else i4.setEnd(o4.startContainer, o4.startOffset);
                  const u3 = i4.extractContents(), h2 = (t6) => s.J.each(t6, (t7) => s.J.isEmptyTextNode(t7) && s.J.safeRemove(t7));
                  try {
                    if (h2(u3), h2(t5), t5.parentNode.insertBefore(u3, t5), !e5 && r3 && (null == l2 ? void 0 : l2.parentNode)) {
                      const t6 = this.createRange();
                      t6.setStartBefore(l2), this.selectRange(t6);
                    }
                  } catch (t6) {
                    if (!n2.IS_PROD) throw t6;
                  }
                  const p2 = (t6) => {
                    var e6, i5, o5;
                    (null === (e6 = null == t6 ? void 0 : t6.parentNode) || void 0 === e6 ? void 0 : e6.firstChild) === (null === (i5 = null == t6 ? void 0 : t6.parentNode) || void 0 === i5 ? void 0 : i5.lastChild) && (null === (o5 = null == t6 ? void 0 : t6.parentNode) || void 0 === o5 || o5.appendChild(l2.cloneNode()));
                  };
                  p2(c2), p2(d3);
                } finally {
                  s.J.safeRemove(c2), s.J.safeRemove(d3);
                }
                return t5.previousElementSibling;
              }
              expandSelection() {
                if (this.isCollapsed()) return this;
                const { range: t5 } = this, e5 = t5.cloneRange();
                if (!s.J.isOrContains(this.j.editor, t5.commonAncestorContainer, true)) return this;
                const i4 = (e6) => {
                  const i5 = this.j.createInside.fake(), o5 = t5.cloneRange();
                  return o5.collapse(e6), s.J.safeInsertNode(o5, i5), (0, c.G)(i5, e6, this.j.editor), i5;
                }, o4 = i4(true), n3 = i4(false);
                e5.setStartAfter(o4), e5.setEndBefore(n3);
                const r3 = s.J.findSibling(o4, false), l2 = s.J.findSibling(n3, true);
                if (r3 !== l2) {
                  const t6 = s.J.isElement(r3) && s.J.isOrContains(r3, n3), i5 = !t6 && s.J.isElement(l2) && s.J.isOrContains(l2, o4);
                  if (t6 || i5) {
                    let i6 = t6 ? r3 : l2, a3 = i6;
                    for (; s.J.isElement(i6); ) i6 = t6 ? i6.firstElementChild : i6.lastElementChild, i6 && s.J.isOrContains(i6, t6 ? n3 : o4) && (a3 = i6);
                    t6 ? e5.setStart(a3, 0) : e5.setEnd(a3, a3.childNodes.length);
                  }
                }
                if (this.selectRange(e5), s.J.safeRemove(o4, n3), this.isCollapsed()) throw (0, a2.error)("Selection is collapsed");
                return this;
              }
            }
            (0, o3.Cg)([r2.autobind], u2.prototype, "createRange", null), (0, o3.Cg)([r2.autobind], u2.prototype, "focus", null), (0, o3.Cg)([r2.autobind], u2.prototype, "setCursorAfter", null), (0, o3.Cg)([r2.autobind], u2.prototype, "setCursorBefore", null), (0, o3.Cg)([r2.autobind], u2.prototype, "setCursorIn", null);
          }, 20384: function(t4, e4, i3) {
            i3.d(e4, { y: function() {
              return a2;
            } });
            var o3 = i3(55186), n2 = i3(71274), r2 = i3(59101), s = i3(84976);
            function a2(t5, e5, i4) {
              const o4 = i4.s.createRange(), r3 = (0, n2.r)(e5.previousSibling) ? e5.previousSibling : e5;
              o4.setStartBefore(t5), o4.setEndBefore(r3), l(t5, o4, true);
              const s2 = (0, n2.r)(e5.nextSibling) ? e5.nextSibling : e5;
              o4.setStartAfter(s2), o4.setEndAfter(t5), l(t5, o4, false);
            }
            function l(t5, e5, i4) {
              const n3 = e5.extractContents();
              n3.textContent && (0, r2.Bq)(n3.textContent).length || !n3.firstChild || o3.J.unwrap(n3.firstChild), t5.parentNode && (0, s.T1)(i4 ? o3.J.before : o3.J.after, t5, n3);
            }
          }, 10466: function(t4, e4, i3) {
            i3.d(e4, { E: function() {
              return o3;
            } }), i3(17352), i3(28712);
            class o3 {
              setState(t5) {
                this.__previewsStates.add(t5), this.__state = t5;
              }
              getState() {
                return this.__state;
              }
              disableSilent() {
                this.silent = false;
              }
              constructor(t5, e5) {
                this.transitions = e5, this.silent = true, this.__previewsStates = /* @__PURE__ */ new Set(), this.setState(t5);
              }
              dispatch(t5, e5) {
                const i4 = this.transitions[this.getState()][t5];
                if (i4) {
                  const t6 = i4.call(this, e5);
                  return this.setState(t6.next), t6;
                }
                throw new Error(`invalid action: ${this.getState()}.${t5.toString()}`);
              }
            }
          }, 75220: function(t4, e4, i3) {
            i3.d(e4, { G: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(38046), r2 = i3(95274);
            function s(t5, e5) {
              let { firstChild: i4 } = e5;
              for (; i4 && !(0, n2._)(i4); ) if (i4 = i4.nextSibling, !i4) return null;
              return i4 && !o3.J.next(i4, n2._, e5) && (0, r2.sz)(t5, i4, false) ? i4 : null;
            }
          }, 52052: function(t4, e4, i3) {
            i3.d(e4, { A: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(38046), r2 = i3(95274);
            function s(t5, e5, i4) {
              const { parentNode: a2 } = e5;
              return a2 === i4 || !o3.J.isHTMLElement(a2) || o3.J.next(e5, n2._, a2) || o3.J.prev(e5, n2._, a2) ? null : t5.isElementCommit && t5.elementIsBlock && !o3.J.isBlock(a2) ? s(t5, a2, i4) : !(0, r2.sz)(t5, a2, false) || o3.J.isBlock(a2) && !t5.elementIsBlock ? t5.isElementCommit && !o3.J.isBlock(a2) ? s(t5, a2, i4) : null : a2;
            }
          }, 70592: function(t4, e4, i3) {
            i3.d(e4, { Y: function() {
              return l;
            }, g: function() {
              return a2;
            } });
            var o3 = i3(55186), n2 = i3(35642), r2 = i3(59678), s = (i3(28712), i3(38322));
            function a2(t5, e5) {
              return Boolean(!o3.J.isTag(t5, "font") && o3.J.isHTMLElement(t5) && Object.keys(e5).every((i4) => {
                const o4 = (0, s.A)(t5, i4, true);
                return "" === o4 && ("" === e5[i4] || null == e5[i4]) || !(0, n2.R)(o4) && "" !== o4 && !(0, n2.R)(e5[i4]) && (0, r2.iy)(i4, e5[i4]).toString().toLowerCase() === o4.toString().toLowerCase();
              }));
            }
            function l(t5, e5) {
              return Boolean(!o3.J.isTag(t5, "font") && o3.J.isHTMLElement(t5) && Object.keys(e5).every((e6) => "" !== (0, s.A)(t5, e6, true)));
            }
            document.createElement("div").style.color = "red", document.createElement("div").style.color = "red";
          }, 97621: function(t4, e4, i3) {
            i3.d(e4, { $s: function() {
              return c.$s;
            }, AS: function() {
              return s.A;
            }, Dd: function() {
              return l.D;
            }, EF: function() {
              return n2.E;
            }, G6: function() {
              return r2.G;
            }, LV: function() {
              return p2.L;
            }, M6: function() {
              return l.M;
            }, Yx: function() {
              return u2.Y;
            }, iu: function() {
              return a2.i;
            }, ks: function() {
              return d2.k;
            }, tm: function() {
              return h2.t;
            }, yP: function() {
              return o3.y;
            } });
            var o3 = i3(20384), n2 = i3(10466), r2 = i3(75220), s = i3(52052), a2 = (i3(70592), i3(78777)), l = (i3(38046), i3(13676)), c = i3(95274), d2 = i3(90325), u2 = (i3(61001), i3(38271)), h2 = i3(86500), p2 = i3(3101);
            i3(80394);
          }, 78777: function(t4, e4, i3) {
            i3.d(e4, { i: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5) {
              return Boolean(o3.J.closest(t5, ["style", "script"], e5));
            }
          }, 38046: function(t4, e4, i3) {
            i3.d(e4, { _: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(71274);
            function r2(t5) {
              return Boolean(t5 && !o3.J.isEmptyTextNode(t5) && !o3.J.isTemporary(t5) && !(0, n2.r)(t5));
            }
          }, 13676: function(t4, e4, i3) {
            i3.d(e4, { D: function() {
              return a2;
            }, M: function() {
              return s;
            } });
            var o3 = i3(95350), n2 = i3(97369), r2 = (i3(28712), i3(70592));
            function s(t5, e5) {
              return !t5.attributes.length && !(0, o3.E)(e5) || !(0, o3.E)(e5) || Object.keys(e5).every((i4) => "class" === i4 || "className" === i4 ? t5.classList.contains(e5[i4]) : "style" === i4 ? (0, r2.g)(t5, e5[i4]) : (0, n2.attr)(t5, i4) === e5[i4]);
            }
            function a2(t5, e5) {
              return t5.attributes.length === e5.attributes.length && Array.from(t5.attributes).every((t6) => e5.hasAttribute(t6.name) && e5.getAttribute(t6.name) === t6.value);
            }
          }, 95274: function(t4, e4, i3) {
            i3.d(e4, { $s: function() {
              return a2;
            }, Wv: function() {
              return l;
            }, sz: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(70592), r2 = i3(38046);
            function s(t5, e5, i4, s2 = true) {
              var a3;
              if (!e5 || !(0, r2._)(e5)) return false;
              const { element: l2, elementIsDefault: c, options: d2 } = t5;
              if (o3.J.isList(e5) && t5.elementIsList) return true;
              const u2 = o3.J.isTag(e5, l2);
              return !(!u2 || c && i4) || !(!Boolean((null === (a3 = d2.attributes) || void 0 === a3 ? void 0 : a3.style) && (s2 ? (0, n2.g)(e5, d2.attributes.style) : (0, n2.Y)(e5, d2.attributes.style))) || t5.elementIsList) || !u2 && !i4 && c && o3.J.isInlineBlock(e5);
            }
            function a2(t5, e5, i4) {
              return o3.J.closest(e5, (e6) => s(t5, e6, true, false), i4);
            }
            function l(t5, e5) {
              var i4, o4;
              const { element: s2, options: a3 } = t5;
              if (!e5 || !(0, r2._)(e5)) return false;
              const l2 = e5.nodeName.toLowerCase() === s2, c = Boolean((null === (i4 = a3.attributes) || void 0 === i4 ? void 0 : i4.style) && (0, n2.Y)(e5, null === (o4 = a3.attributes) || void 0 === o4 ? void 0 : o4.style));
              return l2 && c;
            }
          }, 90325: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return l;
            } });
            var o3 = i3(55186), n2 = (i3(28712), i3(20384)), r2 = i3(38271), s = i3(8757), a2 = i3(61001);
            function l(t5, e5, i4, o4) {
              if (!e5) return o4;
              const n3 = e5.parentElement;
              if (!n3) return o4;
              const l2 = i4.e.fire(`${s.ar}BeforeToggleList`, o4, t5, n3);
              if (void 0 !== l2) return l2;
              const d2 = i4.e.fire.bind(i4.e, `${s.ar}AfterToggleList`);
              if (o4 !== s.OJ) {
                const l3 = (0, r2.Y)(t5, e5.parentElement, i4, s.DI, true) === s.PL;
                if (o4 === s.dj || l3 || n3.tagName.toLowerCase() !== t5.element) {
                  const o5 = c(s.dj, n3, e5, i4, t5), r3 = (0, a2.z)(t5, o5, i4);
                  return d2(s.dj, r3, t5), s.dj;
                }
              }
              const u2 = c(s.OJ, n3, e5, i4, t5);
              return d2(s.OJ, u2, t5), s.OJ;
            }
            function c(t5, e5, i4, r3, a3) {
              return r3.e.fire(`${s.ar}BeforeUnwrapList`, t5, e5, a3) || ((0, n2.y)(e5, i4, r3), o3.J.unwrap(i4.parentElement), o3.J.replace(i4, r3.o.enter, r3.createInside));
            }
          }, 61001: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return s;
            } });
            var o3 = i3(71842), n2 = i3(97621), r2 = i3(8757);
            function s(t5, e5, i4) {
              const s2 = i4.e.fire(`${r2.ar}BeforeWrapList`, r2.dj, e5, t5), a2 = null != s2 ? s2 : o3.J.replace(e5, "li", i4.createInside), l = a2.previousElementSibling, c = a2.nextElementSibling;
              let d2 = o3.J.isTag(l, t5.element) ? l : null;
              return null != d2 || (d2 = o3.J.isTag(c, t5.element) ? c : null), o3.J.isList(d2) && (0, n2.M6)(d2, t5.options.attributes) || (d2 = i4.createInside.element(t5.element), (0, n2.Yx)(t5, d2, i4, r2.DI), o3.J.before(a2, d2)), l === d2 ? o3.J.append(d2, a2) : o3.J.prepend(d2, a2), o3.J.isTag(d2.nextElementSibling, t5.element) && (0, n2.Dd)(d2, d2.nextElementSibling) && (o3.J.append(d2, Array.from(d2.nextElementSibling.childNodes)), o3.J.safeRemove(d2.nextElementSibling)), i4.e.fire(`${r2.ar}AfterWrapList`, r2.Zk, d2, t5), d2;
            }
          }, 38271: function(t4, e4, i3) {
            i3.d(e4, { Y: function() {
              return p2;
            } });
            var o3 = i3(55186), n2 = i3(56298), r2 = (i3(9823), i3(59678)), s = i3(95350), a2 = i3(449), l = i3(97369), c = i3(38322), d2 = i3(72197), u2 = i3(8757);
            const h2 = "toggleAttributes";
            function p2(t5, e5, i4, p3, g2 = false) {
              if (!g2 && t5.isApplied(e5, h2)) return p3;
              !g2 && t5.setApplied(e5, h2);
              const { attributes: m2 } = t5.options;
              return m2 && (0, s.E)(m2) > 0 && Object.keys(m2).forEach((s2) => {
                const h3 = m2[s2];
                switch (s2) {
                  case "style":
                    p3 = function(t6, e6, i5, s3, l2, h4) {
                      return Object.keys(i5).forEach((p4) => {
                        const g3 = s3.style.getPropertyValue((0, a2.k)(p4)), m3 = i5[p4];
                        if ("" !== g3 || null != m3) {
                          if (function(t7, e7, i6) {
                            const r3 = t7.create.element(e7.tagName.toLowerCase());
                            r3.style.cssText = e7.style.cssText;
                            const s4 = function(t8) {
                              var e8;
                              if (void 0 !== (0, d2.m)(t8, "shadowRoot")) return (0, d2.m)(t8, "shadowRoot");
                              const i7 = (0, n2.My)(t8), o4 = document.createElement("iframe");
                              (0, c.A)(o4, { width: 0, height: 0, position: "absolute", border: 0 }), o4.src = "about:blank", i7.appendChild(o4);
                              const r4 = null === (e8 = o4.contentWindow) || void 0 === e8 ? void 0 : e8.document, s5 = r4 ? r4.body : t8.od.body;
                              return (0, d2.m)(t8, "shadowRoot", s5), s5;
                            }(t7);
                            s4.appendChild(r3);
                            const a3 = (0, c.A)(r3, i6);
                            return o3.J.safeRemove(r3), a3;
                          }(e6, s3, p4) === (0, r2.iy)(p4, m3)) {
                            if (!g3) return;
                            return !l2 && (0, c.A)(s3, p4, null), void (h4 = f2(t6, s3, h4 = u2.Ag));
                          }
                          h4 = u2.PL, l2 || ((0, c.A)(s3, p4, m3), h4 = f2(t6, s3, h4));
                        }
                      }), h4;
                    }(t5, i4, h3, e5, g2, p3);
                    break;
                  case "className":
                  case "class":
                    p3 = function(t6, e6, i5, o4, n3) {
                      const r3 = t6.e.fire.bind(t6.e, `${u2.ar}AfterToggleAttribute`);
                      return i5.classList.contains(e6.toString()) ? (o4 = u2.Ag, n3 || (i5.classList.remove(e6), 0 === i5.classList.length && ((0, l.attr)(i5, "class", null), r3(o4, i5, "class", null)))) : (o4 = u2.PL, n3 || (i5.classList.add(e6), r3(o4, i5, "class", e6))), o4;
                    }(i4, h3, e5, p3, g2);
                    break;
                  default:
                    p3 = function(t6, e6, i5, o4, n3, r3) {
                      const s3 = t6.e.fire.bind(t6.e, `${u2.ar}AfterToggleAttribute`);
                      return (0, l.attr)(i5, o4) === e6 ? (!n3 && (0, l.attr)(i5, o4, null), r3 = u2.Ag, !n3 && s3(r3, i5, o4, e6), r3) : (r3 = u2.PL, n3 || ((0, l.attr)(i5, o4, e6), s3(r3, i5, o4, e6)), r3);
                    }(i4, h3, e5, s2, g2, p3);
                }
              }), p3;
            }
            function f2(t5, e5, i4) {
              return (0, l.attr)(e5, "style") || ((0, l.attr)(e5, "style", null), e5.tagName.toLowerCase() === t5.defaultTag && (o3.J.unwrap(e5), i4 = u2.OJ)), i4;
            }
          }, 86500: function(t4, e4, i3) {
            i3.d(e4, { t: function() {
              return a2;
            } });
            var o3 = i3(55186), n2 = i3(97369), r2 = i3(70592), s = i3(95274);
            function a2(t5, e5) {
              var i4;
              const a3 = [], l = [];
              let c;
              const d2 = null === (i4 = t5.options.attributes) || void 0 === i4 ? void 0 : i4.style;
              if (e5.firstChild) {
                const i5 = o3.J.eachGen(e5);
                let u2 = i5.next();
                for (; !u2.done; ) {
                  const e6 = u2.value;
                  !(0, s.sz)(t5, e6, true) || d2 && !(0, r2.Y)(e6, d2) ? d2 && (0, s.Wv)(t5, e6) ? (void 0 === c && (c = false), l.push(() => {
                    (0, n2.css)(e6, Object.keys(d2).reduce((t6, e7) => (t6[e7] = null, t6), {})), (0, n2.attr)(e6, "style") || (0, n2.attr)(e6, "style", null), (0, n2.attr)(e6, "style") || e6.nodeName.toLowerCase() !== t5.element || a3.push(e6);
                  })) : o3.J.isEmptyTextNode(e6) || void 0 === c && (c = false) : (void 0 === c && (c = true), a3.push(e6)), u2 = i5.next();
                }
              }
              return l.forEach((t6) => t6()), a3.forEach(o3.J.unwrap), Boolean(c);
            }
          }, 80394: function(t4, e4, i3) {
            i3.d(e4, { Y: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(71274);
            function r2(t5, e5, i4) {
              const r3 = i4.editor, s = i4.createInside, a2 = (t6, e6 = "previousSibling") => {
                let s2 = t6, a3 = t6;
                for (; a3 && !(0, n2.r)(a3) && !o3.J.isTag(a3, i4.o.enter) && (s2 = a3, a3 = a3[e6] ? a3[e6] : a3.parentNode && !o3.J.isBlock(a3.parentNode) && a3.parentNode !== r3 ? a3.parentNode : null, !o3.J.isBlock(a3)); ) ;
                return s2;
              }, l = a2(e5), c = a2(e5, "nextSibling"), d2 = i4.s.createRange();
              d2.setStartBefore(l), d2.setEndAfter(c);
              const u2 = d2.extractContents(), h2 = s.element(t5.element);
              return h2.appendChild(u2), o3.J.safeInsertNode(d2, h2), t5.elementIsBlock && o3.J.isEmpty(h2) && !o3.J.isTag(h2.firstElementChild, "br") && h2.appendChild(s.element("br")), h2;
            }
          }, 3101: function(t4, e4, i3) {
            i3.d(e4, { L: function() {
              return a2;
            } });
            var o3 = i3(71842), n2 = i3(26150), r2 = i3(61001), s = i3(80394);
            function a2(t5, e5, i4) {
              const a3 = function(t6, e6, i5) {
                return t6.elementIsBlock ? o3.J.up(e6, (t7) => o3.J.isBlock(t7) && !o3.J.isTag(t7, l), i5.editor) || (0, s.Y)(t6, e6, i5) : ((0, n2.C)(e6, "size", null), e6);
              }(t5, e5, i4);
              return t5.elementIsList ? (0, r2.z)(t5, a3, i4) : o3.J.replace(a3, t5.element, i4.createInside, true);
            }
            const l = /* @__PURE__ */ new Set(["td", "th", "tr", "tbody", "table", "li", "ul", "ol"]);
          }, 10494: function(t4, e4, i3) {
            i3.d(e4, { O: function() {
              return s;
            } });
            var o3 = i3(97621), n2 = i3(8757), r2 = i3(37649);
            function s(t5, e5) {
              var i4;
              const { s: s2, editor: a2 } = t5;
              null === (i4 = a2.firstChild) || void 0 === i4 || i4.normalize();
              const l = s2.fakes(), c = t5.s.wrapInTagGen(l);
              let d2 = c.next();
              if (d2.done) return;
              let u2 = { collapsed: s2.isCollapsed(), mode: n2.DI, element: d2.value, next: r2.x.START, jodit: t5, style: e5 };
              for (; d2 && !d2.done; ) {
                const t6 = new o3.EF(r2.x.START, r2.g);
                for (u2.element = d2.value; t6.getState() !== r2.x.END; ) u2 = t6.dispatch("exec", u2);
                d2 = c.next();
              }
              s2.restoreFakes(l);
            }
          }, 8757: function(t4, e4, i3) {
            i3.d(e4, { Ag: function() {
              return c;
            }, DI: function() {
              return d2;
            }, OJ: function() {
              return a2;
            }, PL: function() {
              return l;
            }, Zk: function() {
              return s;
            }, ar: function() {
              return h2;
            }, dj: function() {
              return u2;
            }, xk: function() {
              return p2;
            } });
            var o3 = i3(17352), n2 = i3(83260), r2 = i3(10494);
            const s = "wrap", a2 = "unwrap", l = "change", c = "unset", d2 = "initial", u2 = "replace", h2 = "commitStyle";
            class p2 {
              isApplied(t5, e5) {
                const i4 = this.__applyMap.get(t5);
                return !!i4 && i4[e5];
              }
              setApplied(t5, e5) {
                var i4;
                const o4 = null !== (i4 = this.__applyMap.get(t5)) && void 0 !== i4 ? i4 : {};
                o4[e5] = true, this.__applyMap.set(t5, o4);
              }
              get elementIsList() {
                return Boolean(this.options.element && o3.LIST_TAGS.has(this.options.element));
              }
              get element() {
                return this.options.element || this.defaultTag;
              }
              get elementIsBlock() {
                return Boolean(this.options.element && o3.IS_BLOCK.test(this.options.element));
              }
              get isElementCommit() {
                return Boolean(this.options.element && this.options.element !== this.options.defaultTag);
              }
              get defaultTag() {
                return this.options.defaultTag ? this.options.defaultTag : this.elementIsBlock ? "p" : "span";
              }
              get elementIsDefault() {
                return this.element === this.defaultTag;
              }
              constructor(t5) {
                this.options = t5, this.__applyMap = /* @__PURE__ */ new WeakMap();
              }
              apply(t5) {
                const { hooks: e5 } = this.options;
                try {
                  e5 && Object.keys(e5).forEach((i4) => {
                    t5.e.on((0, n2.x)(h2 + "_" + i4), e5[i4]);
                  }), (0, r2.O)(t5, this);
                } finally {
                  e5 && Object.keys(e5).forEach((i4) => {
                    t5.e.off((0, n2.x)(h2 + "_" + i4), e5[i4]);
                  }), this.__applyMap = /* @__PURE__ */ new WeakMap();
                }
                t5.synchronizeValues(), t5.e.fire("afterCommitStyle", this);
              }
            }
          }, 37649: function(t4, e4, i3) {
            i3.d(e4, { g: function() {
              return l;
            }, x: function() {
              return a2;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = (i3(28712), i3(87332)), s = i3(97621);
            const a2 = { START: "START", ELEMENT: "ELEMENT", UNWRAP: "UNWRAP", UNWRAP_CHILDREN: "UNWRAP_CHILDREN", CHANGE: "CHANGE", REPLACE_DEFAULT: "REPLACE_DEFAULT", LIST: "LIST", TOGGLE_LIST: "TOGGLE_LIST", WRAP: "WRAP", EXTRACT: "EXTRACT", END: "END" }, l = { [a2.START]: { exec(t5) {
              const { element: e5, jodit: i4, style: o4, mode: l2, collapsed: c } = t5;
              if ((0, s.iu)(e5, i4.editor) || !c && n2.J.isEmptyContent(e5)) return { ...t5, next: a2.END };
              const d2 = (0, s.AS)(o4, e5, i4.editor) || (0, s.G6)(o4, e5);
              if (d2) return { ...t5, next: a2.ELEMENT, element: d2 };
              const u2 = (0, s.$s)(o4, e5, i4.editor);
              return o4.elementIsList && n2.J.isList(u2) ? { ...t5, next: a2.LIST } : u2 ? { ...t5, next: a2.EXTRACT } : { ...t5, next: l2 !== r2.OJ ? a2.UNWRAP_CHILDREN : a2.END };
            } }, [a2.LIST]: { exec(t5) {
              const { element: e5, jodit: i4, mode: s2 } = t5;
              if (s2 !== r2.DI && s2 !== r2.OJ && s2 !== r2.dj) return { ...t5, next: a2.END };
              const l2 = n2.J.closest(e5, "li", i4.editor);
              return l2 && n2.J.closest(e5, o3.LIST_TAGS, i4.editor) ? { ...t5, element: l2, next: a2.TOGGLE_LIST } : { ...t5, next: a2.END };
            } }, [a2.TOGGLE_LIST]: { exec: (t5) => ({ ...t5, mode: (0, s.ks)(t5.style, t5.element, t5.jodit, t5.mode), next: a2.END }) }, [a2.EXTRACT]: { exec(t5) {
              const { element: e5, jodit: i4, style: o4 } = t5, n3 = (0, s.$s)(o4, e5, i4.editor);
              return o4.elementIsBlock || (0, s.yP)(n3, e5, i4), { ...t5, element: n3, next: a2.ELEMENT };
            } }, [a2.UNWRAP_CHILDREN]: { exec(t5) {
              const { element: e5, style: i4 } = t5;
              return (0, s.tm)(i4, e5) ? { ...t5, mode: r2.OJ, next: a2.END } : { ...t5, next: a2.WRAP };
            } }, [a2.WRAP]: { exec(t5) {
              const { element: e5, jodit: i4, style: o4 } = t5, n3 = (0, s.LV)(o4, e5, i4);
              return { ...t5, next: o4.elementIsList ? a2.END : a2.CHANGE, mode: r2.Zk, element: n3 };
            } }, [a2.ELEMENT]: { exec(t5) {
              const { style: e5, element: i4, jodit: o4 } = t5;
              return (0, s.Yx)(e5, i4, o4, r2.DI, true) !== r2.DI ? { ...t5, next: a2.CHANGE } : n2.J.isTag(i4, e5.element) ? { ...t5, next: a2.UNWRAP } : { ...t5, next: a2.END };
            } }, [a2.CHANGE]: { exec(t5) {
              const { style: e5, element: i4, jodit: o4, mode: l2 } = t5, c = (0, s.Yx)(e5, i4, o4, t5.mode);
              return l2 !== r2.Zk && c === r2.Ag && !i4.attributes.length && n2.J.isTag(i4, e5.element) ? { ...t5, next: a2.UNWRAP } : { ...t5, mode: c, next: a2.END };
            } }, [a2.UNWRAP]: { exec: (t5) => t5.element.attributes.length && n2.J.isTag(t5.element, t5.style.element) ? { ...t5, next: a2.REPLACE_DEFAULT } : (n2.J.unwrap(t5.element), { ...t5, mode: r2.OJ, next: a2.END }) }, [a2.REPLACE_DEFAULT]: { exec: (t5) => (n2.J.replace(t5.element, t5.style.defaultTag, t5.jodit.createInside, true), { ...t5, mode: r2.dj, next: a2.END }) }, [a2.END]: { exec: (t5) => t5 } };
          }, 17800: function(t4, e4, i3) {
            i3.d(e4, { I: function() {
              return o3;
            }, O: function() {
              return n2;
            } });
            const o3 = /* @__PURE__ */ (() => {
              let t5;
              return () => (void 0 === t5 && (t5 = (() => {
                const t6 = "___Jodit___" + Math.random().toString();
                try {
                  localStorage.setItem(t6, "1");
                  const e5 = "1" === localStorage.getItem(t6);
                  return localStorage.removeItem(t6), e5;
                } catch (t7) {
                }
                return false;
              })()), t5);
            })();
            class n2 {
              set(t5, e5) {
                try {
                  const i4 = localStorage.getItem(this.rootKey), o4 = i4 ? JSON.parse(i4) : {};
                  o4[t5] = e5, localStorage.setItem(this.rootKey, JSON.stringify(o4));
                } catch (t6) {
                }
                return this;
              }
              delete(t5) {
                try {
                  localStorage.removeItem(this.rootKey);
                } catch (t6) {
                }
                return this;
              }
              get(t5) {
                try {
                  const e5 = localStorage.getItem(this.rootKey), i4 = e5 ? JSON.parse(e5) : {};
                  return void 0 !== i4[t5] ? i4[t5] : null;
                } catch (t6) {
                }
              }
              exists(t5) {
                return null != this.get(t5);
              }
              constructor(t5) {
                this.rootKey = t5;
              }
              clear() {
                try {
                  localStorage.removeItem(this.rootKey);
                } catch (t5) {
                }
                return this;
              }
            }
          }, 2788: function(t4, e4, i3) {
            i3.d(e4, { M: function() {
              return o3;
            } });
            class o3 {
              constructor() {
                this.data = /* @__PURE__ */ new Map();
              }
              set(t5, e5) {
                return this.data.set(t5, e5), this;
              }
              delete(t5) {
                return this.data.delete(t5), this;
              }
              get(t5) {
                return this.data.get(t5);
              }
              exists(t5) {
                return this.data.has(t5);
              }
              clear() {
                return this.data.clear(), this;
              }
            }
          }, 63915: function(t4, e4, i3) {
            i3.d(e4, { wc: function() {
              return o3.w;
            } }), i3(17800);
            var o3 = i3(24834);
          }, 24834: function(t4, e4, i3) {
            i3.d(e4, { w: function() {
              return a2;
            } });
            var o3 = i3(83260), n2 = i3(17800), r2 = i3(2788);
            const s = "Jodit_";
            class a2 {
              set(t5, e5) {
                return this.provider.set((0, o3.x)(this.prefix + t5), e5), this;
              }
              delete(t5) {
                return this.provider.delete((0, o3.x)(this.prefix + t5)), this;
              }
              get(t5) {
                return this.provider.get((0, o3.x)(this.prefix + t5));
              }
              exists(t5) {
                return this.provider.exists((0, o3.x)(this.prefix + t5));
              }
              clear() {
                return this.provider.clear(), this;
              }
              constructor(t5, e5) {
                this.provider = t5, this.prefix = s, e5 && (this.prefix += e5);
              }
              static makeStorage(t5 = false, e5) {
                let i4;
                return t5 && (0, n2.I)() && (i4 = new n2.O(s + e5)), i4 || (i4 = new r2.M()), new a2(i4, e5);
              }
            }
          }, 58597: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return s;
            } });
            var o3 = i3(9823), n2 = i3(84976), r2 = i3(34256);
            class s {
              dlg(t5) {
                const e5 = new r2.lG({ language: this.o.language, shadowRoot: this.o.shadowRoot, ownerWindow: this.o.ownerWindow, defaultTimeout: this.o.defaultTimeout, theme: this.o.theme, globalFullSize: this.o.globalFullSize, ...t5 });
                return (0, n2.b_)(this, e5.container), e5.parent = this, e5.bindDestruct(this);
              }
              confirm(t5, e5, i4) {
                return t5 = a2(t5, this), e5 = a2(e5, this), r2.pT.call(this.dlg({ closeOnClickOverlay: true }), t5, e5, i4);
              }
              prompt(t5, e5, i4, o4, n3) {
                return t5 = a2(t5, this), e5 = a2(e5, this), o4 = a2(o4, this), r2.XG.call(this.dlg({ closeOnClickOverlay: true }), t5, e5, i4, o4, n3);
              }
              alert(t5, e5, i4, o4) {
                return t5 = a2(t5, this), e5 = a2(e5, this), r2.Fc.call(this.dlg({ closeOnClickOverlay: true }), t5, e5, i4, o4);
              }
            }
            function a2(t5, e5) {
              return (0, o3.Kg)(t5) && !(0, o3.AH)(t5) && (t5 = e5.i18n(t5)), t5;
            }
          }, 87906: function(t4, e4, i3) {
            i3.d(e4, { O: function() {
              return n2;
            } });
            var o3 = i3(42448);
            class n2 {
              getElm(t5) {
                return this.container.querySelector(`.${this.getFullElName(t5)}`);
              }
              getElms(t5) {
                return (0, o3.$)(this.container.querySelectorAll(`.${this.getFullElName(t5)}`));
              }
            }
          }, 75758: function(t4, e4, i3) {
            i3.d(e4, { K: function() {
              return n2;
            } });
            var o3 = i3(35642);
            class n2 {
              afterSetMod(t5, e5) {
              }
              setMod(t5, e5, i4) {
                t5 = t5.toLowerCase();
                const n3 = this.mods[t5];
                if (n3 === e5) return this;
                const r2 = `${this.componentName}_${t5}_`, s = (i4 || this.container).classList;
                return null != n3 && s.remove(`${r2}${n3.toString().toLowerCase()}`), !(0, o3.R)(e5) && "" !== e5 && s.add(`${r2}${e5.toString().toLowerCase()}`), this.mods[t5] = e5, this.afterSetMod(t5, e5), this;
              }
              getMod(t5) {
                var e5;
                return null !== (e5 = this.mods[t5]) && void 0 !== e5 ? e5 : null;
              }
            }
          }, 92032: function(t4, e4, i3) {
            i3.d(e4, { $n: function() {
              return g2;
            }, lD: function() {
              return f2;
            }, ue: function() {
              return p2;
            } });
            var o3 = i3(31635), n2 = i3(64567), r2 = i3(22664), s = i3(55186), a2 = i3(69052), l = i3(98253), c = i3(97369), d2 = i3(29780), u2 = i3(94070), h2 = i3(931);
            const p2 = () => ({ size: "middle", type: "button", name: "", value: "", variant: "initial", disabled: false, activated: false, icon: { name: "empty", fill: "", iconURL: "" }, tooltip: "", text: "", tabIndex: void 0 });
            let f2 = class extends d2.D {
              className() {
                return "UIButton";
              }
              setState(t5) {
                return Object.assign(this.state, t5), this;
              }
              get text() {
                return this.getElm("text");
              }
              get icon() {
                return this.getElm("icon");
              }
              onChangeSize() {
                this.setMod("size", this.state.size);
              }
              onChangeType() {
                (0, c.attr)(this.container, "type", this.state.type);
              }
              updateSize() {
                const t5 = this.closest(u2.z);
                t5 && (this.state.size = t5.buttonSize);
              }
              onChangeStatus() {
                this.setMod("variant", this.state.variant);
              }
              onChangeText() {
                this.text.textContent = this.jodit.i18n(this.state.text);
              }
              onChangeTextSetMode() {
                this.setMod("text-icons", Boolean(this.state.text.trim().length));
              }
              onChangeDisabled() {
                (0, c.attr)(this.container, "disabled", this.state.disabled || null);
              }
              onChangeActivated() {
                (0, c.attr)(this.container, "aria-pressed", this.state.activated);
              }
              onChangeName() {
                this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`), this.name = this.state.name, (0, c.attr)(this.container, "data-ref", this.state.name), (0, c.attr)(this.container, "ref", this.state.name);
              }
              onChangeTooltip() {
                this.get("j.o.useNativeTooltip") && (0, c.attr)(this.container, "title", this.state.tooltip), (0, c.attr)(this.container, "aria-label", this.state.tooltip);
              }
              onChangeTabIndex() {
                (0, c.attr)(this.container, "tabindex", this.state.tabIndex);
              }
              onChangeIcon() {
                const t5 = this.get("j.o.textIcons");
                if (true === t5 || (0, a2.T)(t5) && t5(this.state.name)) return;
                s.J.detach(this.icon);
                const e5 = h2.I.makeIcon(this.j, this.state.icon);
                e5 && this.icon.appendChild(e5);
              }
              focus() {
                this.container.focus();
              }
              isFocused() {
                const { activeElement: t5 } = this.od;
                return Boolean(t5 && s.J.isOrContains(this.container, t5));
              }
              createContainer() {
                const t5 = this.componentName, e5 = this.j.c.element("button", { class: t5, type: "button", role: "button", ariaPressed: false }), i4 = this.j.c.span(t5 + "__icon"), o4 = this.j.c.span(t5 + "__text");
                return e5.appendChild(i4), e5.appendChild(o4), e5;
              }
              constructor(t5, e5) {
                super(t5), this.isButton = true, this.state = p2(), this.actionHandlers = [], this.button = this.container, this.updateSize(), this.onChangeSize(), this.onChangeStatus(), e5 && this.hookStatus(n2.f.ready, () => {
                  this.setState(e5);
                });
              }
              destruct() {
                return this.j.e.off(this.container), super.destruct();
              }
              onAction(t5) {
                return this.actionHandlers.push(t5), this;
              }
              __onActionFire(t5) {
                t5.buffer = { actionTrigger: this }, this.actionHandlers.forEach((e5) => e5.call(this, t5));
              }
            };
            function g2(t5, e5, i4, o4) {
              const n3 = new f2(t5);
              return n3.state.tabIndex = t5.o.allowTabNavigation ? 0 : -1, (0, l.K)(e5) ? (n3.state.icon.name = e5, n3.state.name = e5, o4 && (n3.state.variant = o4), i4 && (n3.state.text = i4)) : n3.setState(e5), n3;
            }
            (0, o3.Cg)([r2.cache], f2.prototype, "text", null), (0, o3.Cg)([r2.cache], f2.prototype, "icon", null), (0, o3.Cg)([(0, r2.watch)("state.size", { immediately: false })], f2.prototype, "onChangeSize", null), (0, o3.Cg)([(0, r2.watch)("state.type", { immediately: false })], f2.prototype, "onChangeType", null), (0, o3.Cg)([(0, r2.watch)("parentElement")], f2.prototype, "updateSize", null), (0, o3.Cg)([(0, r2.watch)("state.variant", { immediately: false })], f2.prototype, "onChangeStatus", null), (0, o3.Cg)([(0, r2.watch)("state.text", { immediately: false })], f2.prototype, "onChangeText", null), (0, o3.Cg)([(0, r2.watch)("state.text", { immediately: false })], f2.prototype, "onChangeTextSetMode", null), (0, o3.Cg)([(0, r2.watch)("state.disabled")], f2.prototype, "onChangeDisabled", null), (0, o3.Cg)([(0, r2.watch)("state.activated")], f2.prototype, "onChangeActivated", null), (0, o3.Cg)([(0, r2.watch)("state.name", { immediately: false })], f2.prototype, "onChangeName", null), (0, o3.Cg)([(0, r2.watch)("state.tooltip", { immediately: false })], f2.prototype, "onChangeTooltip", null), (0, o3.Cg)([(0, r2.watch)("state.tabIndex", { immediately: false })], f2.prototype, "onChangeTabIndex", null), (0, o3.Cg)([(0, r2.watch)("state.icon", { immediately: false })], f2.prototype, "onChangeIcon", null), (0, o3.Cg)([r2.cacheHTML], f2.prototype, "createContainer", null), (0, o3.Cg)([(0, r2.watch)("button:click")], f2.prototype, "__onActionFire", null), f2 = (0, o3.Cg)([r2.component], f2);
          }, 31202: function(t4, e4, i3) {
            i3.d(e4, { s: function() {
              return a2;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = (i3(28712), i3(92032)), s = i3(6455);
            let a2 = class extends s.U {
              className() {
                return "UIButtonGroup";
              }
              render(t5) {
                return `<div>
			<div class="&__label">~${t5.label}~</div>
			<div class="&__options"></div>
		</div>`;
              }
              appendChildToContainer(t5) {
                this.getElm("options").appendChild(t5);
              }
              constructor(t5, e5 = { radio: true }) {
                var i4, o4;
                super(t5, null === (i4 = e5.options) || void 0 === i4 ? void 0 : i4.map((e6) => {
                  const i5 = new r2.lD(t5, { text: e6.text, value: e6.value, variant: "primary" });
                  return i5.onAction(() => {
                    this.select(e6.value);
                  }), i5;
                }), e5), this.options = e5, this.select(null !== (o4 = e5.value) && void 0 !== o4 ? o4 : 0);
              }
              select(t5) {
                var e5, i4;
                this.elements.forEach((e6, i5) => {
                  i5 === t5 || e6.state.value === t5 ? e6.state.activated = true : this.options.radio && (e6.state.activated = false);
                });
                const o4 = this.elements.filter((t6) => t6.state.activated).map((t6) => ({ text: t6.state.text, value: t6.state.value }));
                this.jodit.e.fire(this, "select", o4), null === (i4 = (e5 = this.options).onChange) || void 0 === i4 || i4.call(e5, o4);
              }
            };
            a2 = (0, o3.Cg)([n2.s], a2);
          }, 35265: function(t4, e4, i3) {
            i3.d(e4, { $n: function() {
              return o3.$n;
            }, SB: function() {
              return r2.S;
            }, lD: function() {
              return o3.lD;
            }, ss: function() {
              return n2.s;
            }, ue: function() {
              return o3.ue;
            } });
            var o3 = i3(92032), n2 = i3(31202), r2 = i3(36434);
          }, 36434: function(t4, e4, i3) {
            i3.d(e4, { S: function() {
              return h2;
            } });
            var o3, n2 = i3(31635), r2 = i3(77753), s = i3(22664), a2 = i3(71842), l = i3(56298), c = i3(27594), d2 = i3(97369), u2 = i3(29780);
            let h2 = o3 = class extends u2.D {
              className() {
                return "UITooltip";
              }
              render() {
                return '<div><div class="&__content"></div></div>';
              }
              constructor(t5) {
                super(t5), this.__isOpened = false, this.__listenClose = false, this.__currentTarget = null, this.__delayShowTimeout = 0, this.__hideTimeout = 0, t5.o.textIcons || !t5.o.showTooltip || t5.o.useNativeTooltip || t5.hookStatus(r2.f.ready, () => {
                  (0, l.My)(this.j, o3).appendChild(this.container), t5.e.on(t5.container, "mouseenter.tooltip", this.__onMouseEnter, { capture: true });
                });
              }
              __addListenersOnClose() {
                if (this.__listenClose) return;
                this.__listenClose = true;
                const t5 = this.j;
                t5.e.on(t5.ow, "scroll.tooltip", this.__hide).on(t5.ow, "joditCloseDialog", this.__hide).on(t5.container, "mouseleave.tooltip", this.__hide).on(["escape.tooltip", "change.tooltip", "changePlace.tooltip", "afterOpenPopup.tooltip", "hidePopup.tooltip", "closeAllPopups.tooltip"], this.__hide).on(t5.container, "mouseleave", this.__onMouseLeave, { capture: true });
              }
              __removeListenersOnClose() {
                if (!this.__listenClose) return;
                this.__listenClose = false;
                const t5 = this.j;
                t5.e.off(t5.ow, "scroll.tooltip", this.__hide).off(["escape.tooltip", "change.tooltip", "changePlace.tooltip", "afterOpenPopup.tooltip", "hidePopup.tooltip", "closeAllPopups.tooltip"], this.__hide).off(t5.container, "mouseleave.tooltip", this.__onMouseLeave);
              }
              __onMouseLeave(t5) {
                this.__currentTarget === t5.target && (this.__hideDelay(), this.__currentTarget = null);
              }
              __onMouseEnter(t5) {
                if (!a2.J.isHTMLElement(t5.target)) return;
                const e5 = (0, d2.attr)(t5.target, "aria-label");
                if (!e5) return;
                if (Boolean((0, d2.attr)(t5.target, "disabled"))) return;
                if (!t5.target.className.includes("jodit")) return;
                this.__currentTarget = t5.target;
                const i4 = (0, c.G)(t5.target);
                this.__addListenersOnClose(), this.__delayOpen(() => ({ x: i4.left + i4.width / 2, y: i4.top + i4.height }), e5);
              }
              __delayOpen(t5, e5) {
                const i4 = this.j.o.showTooltipDelay || this.j.defaultTimeout;
                this.j.async.clearTimeout(this.__hideTimeout), this.j.async.clearTimeout(this.__delayShowTimeout), this.__delayShowTimeout = this.j.async.setTimeout(() => this.__open(t5, e5), { timeout: i4, label: "tooltip" });
              }
              __open(t5, e5) {
                this.setMod("visible", true), this.getElm("content").innerHTML = e5, this.__isOpened = true, this.__setPosition(t5);
              }
              __setPosition(t5) {
                const e5 = t5();
                (0, d2.css)(this.container, { left: e5.x, top: e5.y });
              }
              __hide() {
                this.j.async.clearTimeout(this.__delayShowTimeout), this.j.async.clearTimeout(this.__hideTimeout), this.__removeListenersOnClose(), this.__isOpened && (this.__isOpened = false, this.setMod("visible", false), (0, d2.css)(this.container, { left: -5e3 }));
              }
              __hideDelay() {
                this.__isOpened && (this.j.async.clearTimeout(this.__delayShowTimeout), this.__hideTimeout = this.async.setTimeout(this.__hide, this.j.defaultTimeout));
              }
              destruct() {
                this.j.e.off(this.j.container, "mouseenter", this.__onMouseEnter), this.__hide(), super.destruct();
              }
            };
            (0, n2.Cg)([s.autobind], h2.prototype, "__onMouseLeave", null), (0, n2.Cg)([s.autobind], h2.prototype, "__onMouseEnter", null), (0, n2.Cg)([s.autobind], h2.prototype, "__hide", null), (0, n2.Cg)([s.autobind], h2.prototype, "__hideDelay", null), h2 = o3 = (0, n2.Cg)([s.component], h2);
          }, 29780: function(t4, e4, i3) {
            i3.d(e4, { D: function() {
              return h2;
            } });
            var o3, n2 = i3(31635), r2 = i3(77753), s = i3(1963), a2 = i3(55186), l = i3(98253), c = i3(87906), d2 = i3(75758), u2 = i3(931);
            let h2 = o3 = class extends r2.vG {
              get parentElement() {
                return this.__parentElement;
              }
              set parentElement(t5) {
                this.__parentElement = t5, t5 && t5.hookStatus("beforeDestruct", () => this.destruct()), this.updateParentElement(this);
              }
              bubble(t5) {
                let e5 = this.parentElement;
                for (; e5; ) t5(e5), e5 = e5.parentElement;
                return this;
              }
              updateParentElement(t5) {
                var e5;
                return null === (e5 = this.__parentElement) || void 0 === e5 || e5.updateParentElement(t5), this;
              }
              get(t5, e5) {
                return super.get(t5, e5) || this.getElm(t5);
              }
              closest(t5) {
                const e5 = "object" == typeof t5 ? (e6) => e6 === t5 : (e6) => r2.uA.isInstanceOf(e6, t5);
                let i4 = this.__parentElement;
                for (; i4; ) {
                  if (e5(i4)) return i4;
                  i4 = !i4.parentElement && i4.container.parentElement ? o3.closestElement(i4.container.parentElement, o3) : i4.parentElement;
                }
                return null;
              }
              static closestElement(t5, e5) {
                const i4 = a2.J.up(t5, (t6) => {
                  if (t6) {
                    const { component: i5 } = t6;
                    return i5 && r2.uA.isInstanceOf(i5, e5);
                  }
                  return false;
                });
                return i4 ? null == i4 ? void 0 : i4.component : null;
              }
              update() {
              }
              appendTo(t5) {
                return t5.appendChild(this.container), this;
              }
              clearName(t5) {
                return t5.replace(/[^a-zA-Z0-9]/g, "_");
              }
              render(t5) {
                return this.j.c.div(this.componentName);
              }
              createContainer(t5) {
                const e5 = this.render(t5);
                if ((0, l.K)(e5)) {
                  const t6 = this.parseTemplate(e5);
                  return t6.classList.add(this.componentName), t6;
                }
                return e5;
              }
              parseTemplate(t5) {
                return this.j.c.fromHTML(t5.replace(/\*([^*]+?)\*/g, (t6, e5) => u2.I.get(e5) || "").replace(/&_/g, this.componentName + "_").replace(/~([^~]+?)~/g, (t6, e5) => this.i18n(e5)));
              }
              constructor(t5, e5) {
                super(t5), this.name = "", this.__parentElement = null, this.mods = {}, this.container = this.createContainer(e5), Object.defineProperty(this.container, "component", { value: this, configurable: true });
              }
              destruct() {
                return a2.J.safeRemove(this.container), this.parentElement = null, super.destruct();
              }
            };
            h2 = o3 = (0, n2.Cg)([(0, s.C)(d2.K, c.O)], h2);
          }, 68752: function(t4, e4, i3) {
            i3.d(e4, { Y: function() {
              return a2;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(97369), s = i3(6455);
            let a2 = class extends s.U {
              className() {
                return "UIBlock";
              }
              constructor(t5, e5, i4 = { align: "left" }) {
                super(t5, e5), this.options = i4, this.setMod("align", this.options.align || "left"), this.setMod("width", this.options.width || ""), this.options.mod && this.setMod(this.options.mod, true), this.options.className && this.container.classList.add(this.options.className), (0, r2.attr)(this.container, "data-ref", i4.ref), (0, r2.attr)(this.container, "ref", i4.ref);
              }
            };
            a2 = (0, o3.Cg)([n2.s], a2);
          }, 28709: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return d2;
            } });
            var o3 = i3(31635), n2 = i3(37474), r2 = i3(24767), s = i3(97369), a2 = i3(69198), l = i3(1540), c = i3(6455);
            let d2 = class extends c.U {
              className() {
                return "UIForm";
              }
              submit() {
                this.j.e.fire(this.container, "submit");
              }
              validate() {
                const t5 = this.allChildren.filter((t6) => n2.u.isInstanceOf(t6, a2.t));
                for (const e6 of t5) if (!e6.validate()) return false;
                const e5 = this.allChildren.filter((t6) => n2.u.isInstanceOf(t6, l.$));
                for (const t6 of e5) if (!t6.validate()) return false;
                return true;
              }
              onSubmit(t5) {
                return this.j.e.on(this.container, "submit", () => {
                  const e5 = this.allChildren.filter((t6) => n2.u.isInstanceOf(t6, a2.t));
                  return !!this.validate() && (t5(e5.reduce((t6, e6) => (t6[e6.state.name] = e6.value, t6), {})), false);
                }), this;
              }
              createContainer() {
                const t5 = this.j.c.element("form");
                return t5.classList.add(this.componentName), (0, s.attr)(t5, "dir", this.j.o.direction || "auto"), t5;
              }
              constructor(...t5) {
                var e5, i4;
                super(...t5), (null === (e5 = this.options) || void 0 === e5 ? void 0 : e5.className) && this.container.classList.add(null === (i4 = this.options) || void 0 === i4 ? void 0 : i4.className);
              }
            };
            d2 = (0, o3.Cg)([r2.s], d2);
          }, 20703: function(t4, e4, i3) {
            i3.d(e4, { $6: function() {
              return r2.$6;
            }, F0: function() {
              return r2.F0;
            }, XV: function() {
              return n2.X;
            }, Yh: function() {
              return o3.Y;
            }, cY: function() {
              return r2.cY;
            }, nE: function() {
              return r2.nE;
            }, tS: function() {
              return r2.tS;
            } });
            var o3 = i3(68752), n2 = i3(28709), r2 = i3(47165);
          }, 5454: function(t4, e4, i3) {
            i3.d(e4, { F: function() {
              return l;
            } });
            var o3, n2 = i3(31635), r2 = i3(22664), s = i3(24767), a2 = i3(69198);
            let l = o3 = class extends a2.t {
              className() {
                return "UITextArea";
              }
              createNativeInput(t5) {
                return this.j.create.element("textarea");
              }
              constructor(t5, e5) {
                super(t5, e5), this.state = { ...o3.defaultState }, Object.assign(this.state, e5), false === this.state.resizable && (this.nativeInput.style.resize = "none");
              }
              onChangeStateSize() {
                const { size: t5, resizable: e5 } = this.state;
                this.nativeInput.style.resize = e5 ? "auto" : "none", this.nativeInput.rows = null != t5 ? t5 : 5;
              }
            };
            l.defaultState = { ...a2.t.defaultState, size: 5, resizable: true }, (0, n2.Cg)([(0, r2.watch)(["state.size", "state.resizable"])], l.prototype, "onChangeStateSize", null), l = o3 = (0, n2.Cg)([s.s], l);
          }, 3006: function(t4, e4, i3) {
            i3.d(e4, { c: function() {
              return l;
            } });
            var o3, n2 = i3(31635), r2 = i3(22664), s = i3(55186), a2 = i3(69198);
            let l = o3 = class extends a2.t {
              className() {
                return "UICheckbox";
              }
              render() {
                return this.j.c.element("label", { className: this.componentName });
              }
              constructor(t5, e5) {
                super(t5, { ...e5, type: "checkbox" }), this.state = { ...o3.defaultState }, Object.assign(this.state, e5);
              }
              onChangeChecked() {
                this.value = this.state.checked.toString(), this.nativeInput.checked = this.state.checked, this.setMod("checked", this.state.checked);
              }
              onChangeNativeCheckBox() {
                this.state.checked = this.nativeInput.checked;
              }
              onChangeSwitch() {
                this.setMod("switch", this.state.switch);
                let t5 = this.getElm("switch-slider");
                this.state.switch ? (t5 || (t5 = this.j.c.div(this.getFullElName("switch-slider"))), s.J.after(this.nativeInput, t5)) : s.J.safeRemove(t5);
              }
            };
            l.defaultState = { ...a2.t.defaultState, checked: false, switch: false }, (0, n2.Cg)([(0, r2.watch)("state.checked"), (0, r2.hook)("ready")], l.prototype, "onChangeChecked", null), (0, n2.Cg)([(0, r2.watch)("nativeInput:change")], l.prototype, "onChangeNativeCheckBox", null), (0, n2.Cg)([(0, r2.watch)("state.switch"), (0, r2.hook)("ready")], l.prototype, "onChangeSwitch", null), l = o3 = (0, n2.Cg)([r2.component], l);
          }, 47964: function(t4, e4, i3) {
            i3.d(e4, { n: function() {
              return a2;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(92032), s = i3(69198);
            let a2 = class extends s.t {
              className() {
                return "UIFileInput";
              }
              createContainer(t5) {
                this.button = new r2.lD(this.j, { icon: { name: "plus" } });
                const { container: e5 } = this.button;
                this.nativeInput || (this.nativeInput = this.createNativeInput(t5));
                const { nativeInput: i4 } = this;
                return i4.classList.add(this.getFullElName("input")), e5.classList.add(this.componentName), e5.appendChild(i4), e5;
              }
              createNativeInput(t5) {
                return this.j.create.fromHTML(`<input
			type="file"
			accept="${t5.onlyImages ? "image/*" : "*"}"
			tabindex="-1"
			dir="auto"
			multiple=""
		/>`);
              }
              constructor(t5, e5) {
                super(t5, { type: "file", ...e5 }), this.state = { ...s.t.defaultState, type: "file", onlyImages: true };
              }
            };
            a2 = (0, o3.Cg)([n2.s], a2);
          }, 47165: function(t4, e4, i3) {
            i3.d(e4, { $6: function() {
              return a2.$;
            }, F0: function() {
              return o3.F;
            }, cY: function() {
              return n2.c;
            }, nE: function() {
              return r2.n;
            }, tS: function() {
              return s.t;
            } });
            var o3 = i3(5454), n2 = i3(3006), r2 = i3(47964), s = i3(69198), a2 = i3(1540);
          }, 69198: function(t4, e4, i3) {
            i3.d(e4, { t: function() {
              return h2;
            } });
            var o3, n2 = i3(31635), r2 = i3(22664), s = i3(55186), a2 = i3(42448), l = i3(97369), c = i3(29780), d2 = i3(84103), u2 = i3(931);
            let h2 = o3 = class extends c.D {
              className() {
                return "UIInput";
              }
              onChangeClear() {
                this.state.clearButton ? s.J.after(this.nativeInput, this.clearButton) : s.J.safeRemove(this.clearButton);
              }
              onChangeClassName(t5, e5) {
                e5 && this.container.classList.remove(e5), this.state.className && this.container.classList.add(this.state.className);
              }
              onChangeState() {
                this.name = this.state.name;
                const t5 = this.nativeInput, { name: e5, icon: i4, type: o4, ref: n3, required: r3, placeholder: a3, autocomplete: c2, label: d3 } = this.state;
                (0, l.attr)(t5, "name", e5), (0, l.attr)(t5, "type", o4), (0, l.attr)(t5, "data-ref", n3 || e5), (0, l.attr)(t5, "ref", n3 || e5), (0, l.attr)(t5, "required", r3 || null), (0, l.attr)(t5, "autocomplete", c2 ? null : "off"), (0, l.attr)(t5, "placeholder", a3 ? this.j.i18n(a3) : ""), i4 && u2.I.exists(i4) ? (s.J.before(t5, this.icon), this.icon.innerHTML = u2.I.get(i4)) : s.J.safeRemove(this.icon), d3 ? (s.J.before(this.wrapper, this.label), this.label.innerText = this.j.i18n(d3)) : s.J.safeRemove(this.label), this.updateValidators();
              }
              updateValidators() {
                var t5;
                this.validators.clear(), this.state.required && this.validators.add(d2.O.required), null === (t5 = this.state.validators) || void 0 === t5 || t5.forEach((t6) => {
                  const e5 = d2.O[t6];
                  e5 && this.validators.add(e5);
                });
              }
              set error(t5) {
                this.setMod("has-error", Boolean(t5)), t5 ? (this.__errorBox.innerText = this.j.i18n(t5, this.j.i18n(this.state.label || "")), this.container.appendChild(this.__errorBox)) : s.J.safeRemove(this.__errorBox);
              }
              get value() {
                return this.nativeInput.value;
              }
              set value(t5) {
                this.value !== t5 && (this.nativeInput.value = t5, this.onChangeValue());
              }
              onChangeStateValue() {
                const t5 = this.state.value.toString();
                t5 !== this.value && (this.value = t5);
              }
              onChangeValue() {
                var t5, e5;
                const { value: i4 } = this;
                this.state.value !== i4 && (this.state.value = i4, this.j.e.fire(this, "change", i4), null === (e5 = (t5 = this.state).onChange) || void 0 === e5 || e5.call(t5, i4));
              }
              validate() {
                return this.error = "", (0, a2.$)(this.validators).every((t5) => t5(this));
              }
              createContainer(t5) {
                const e5 = super.createContainer();
                this.wrapper = this.j.c.div(this.getFullElName("wrapper")), this.nativeInput || (this.nativeInput = this.createNativeInput());
                const { nativeInput: i4 } = this;
                return i4.classList.add(this.getFullElName("input")), this.wrapper.appendChild(i4), e5.appendChild(this.wrapper), (0, l.attr)(i4, "dir", this.j.o.direction || "auto"), e5;
              }
              createNativeInput(t5) {
                return this.j.create.element("input");
              }
              constructor(t5, e5) {
                super(t5, e5), this.label = this.j.c.span(this.getFullElName("label")), this.icon = this.j.c.span(this.getFullElName("icon")), this.clearButton = this.j.c.span(this.getFullElName("clear"), u2.I.get("cancel")), this.state = { ...o3.defaultState }, this.__errorBox = this.j.c.span(this.getFullElName("error")), this.validators = /* @__PURE__ */ new Set([]), void 0 !== (null == e5 ? void 0 : e5.value) && (e5.value = e5.value.toString()), Object.assign(this.state, e5), void 0 !== this.state.clearButton && (this.j.e.on(this.clearButton, "click", (t6) => {
                  t6.preventDefault(), this.nativeInput.value = "", this.j.e.fire(this.nativeInput, "input"), this.focus();
                }).on(this.nativeInput, "input", () => {
                  this.state.clearButton = Boolean(this.value.length);
                }), this.state.clearButton = Boolean(this.value.length)), this.j.e.on(this.nativeInput, "focus blur", () => {
                  this.onChangeFocus();
                }).on(this.nativeInput, "input change", this.onChangeValue), this.onChangeState(), this.onChangeClassName(), this.onChangeStateValue();
              }
              focus() {
                this.nativeInput.focus();
              }
              get isFocused() {
                return this.nativeInput === this.j.od.activeElement;
              }
              onChangeFocus() {
                this.setMod("focused", this.isFocused);
              }
            };
            h2.defaultState = { className: "", autocomplete: true, name: "", value: "", icon: "", label: "", ref: "", type: "text", placeholder: "", required: false, validators: [] }, (0, n2.Cg)([(0, r2.watch)("state.clearButton")], h2.prototype, "onChangeClear", null), (0, n2.Cg)([(0, r2.watch)("state.className")], h2.prototype, "onChangeClassName", null), (0, n2.Cg)([(0, r2.watch)(["state.name", "state.type", "state.label", "state.placeholder", "state.autocomplete", "state.icon"], { immediately: false }), (0, r2.debounce)()], h2.prototype, "onChangeState", null), (0, n2.Cg)([(0, r2.watch)("state.value")], h2.prototype, "onChangeStateValue", null), (0, n2.Cg)([r2.autobind], h2.prototype, "onChangeValue", null), h2 = o3 = (0, n2.Cg)([r2.component], h2);
          }, 1540: function(t4, e4, i3) {
            i3.d(e4, { $: function() {
              return c;
            } });
            var o3, n2 = i3(31635), r2 = i3(24767), s = i3(26150), a2 = i3(69198), l = i3(84103);
            let c = o3 = class extends a2.t {
              className() {
                return "UISelect";
              }
              createContainer(t5) {
                var e5;
                const i4 = super.createContainer(t5), { j: o4 } = this, { nativeInput: n3 } = this, r3 = () => o4.create.element("option");
                if (void 0 !== t5.placeholder) {
                  const e6 = r3();
                  e6.value = "", e6.text = o4.i18n(t5.placeholder), n3.add(e6);
                }
                return null === (e5 = t5.options) || void 0 === e5 || e5.forEach((t6) => {
                  const e6 = r3();
                  e6.value = t6.value.toString(), e6.text = o4.i18n(t6.text), n3.add(e6);
                }), t5.size && t5.size > 0 && (0, s.C)(n3, "size", t5.size), t5.multiple && (0, s.C)(n3, "multiple", ""), i4;
              }
              createNativeInput() {
                return this.j.create.element("select");
              }
              updateValidators() {
                super.updateValidators(), this.state.required && (this.validators.delete(l.O.required), this.validators.add(l.U.m));
              }
              constructor(t5, e5) {
                super(t5, e5), this.state = { ...o3.defaultState }, Object.assign(this.state, e5);
              }
            };
            c.defaultState = { ...a2.t.defaultState, options: [], size: 1, multiple: false }, c = o3 = (0, n2.Cg)([r2.s], c);
          }, 84103: function(t4, e4, i3) {
            i3.d(e4, { O: function() {
              return o3;
            }, U: function() {
              return n2;
            } });
            var o3 = i3(51271), n2 = i3(36795);
          }, 51271: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { required: function() {
              return r2;
            }, url: function() {
              return s;
            } });
            var o3 = i3(6939), n2 = i3(59101);
            const r2 = function(t5) {
              return !!(0, n2.Bq)(t5.value).length || (t5.error = "Please fill out this field", false);
            }, s = function(t5) {
              return !!(0, o3.m)((0, n2.Bq)(t5.value)) || (t5.error = "Please enter a web address", false);
            };
          }, 36795: function(t4, e4, i3) {
            i3.d(e4, { m: function() {
              return n2;
            } });
            var o3 = i3(59101);
            const n2 = function(t5) {
              return !!(0, o3.Bq)(t5.value).length || (t5.error = "Please fill out this field", false);
            };
          }, 6455: function(t4, e4, i3) {
            i3.d(e4, { U: function() {
              return d2;
            } });
            var o3, n2 = i3(31635), r2 = i3(37474), s = i3(22664), a2 = i3(55186), l = i3(65147), c = (i3(28712), i3(29780));
            let d2 = o3 = class extends c.D {
              className() {
                return "UIGroup";
              }
              get allChildren() {
                const t5 = [], e5 = [...this.elements];
                for (; e5.length; ) {
                  const i4 = e5.shift();
                  (0, l.isArray)(i4) ? e5.push(...i4) : r2.u.isInstanceOf(i4, o3) ? e5.push(...i4.elements) : i4 && t5.push(i4);
                }
                return t5;
              }
              update() {
                this.elements.forEach((t5) => t5.update()), this.setMod("size", this.buttonSize);
              }
              append(t5, e5) {
                return (0, l.isArray)(t5) ? (t5.forEach((t6) => this.append(t6, e5)), this) : (this.elements.push(t5), t5.name && t5.container.classList.add(this.getFullElName(t5.name)), e5 ? this.getElm(e5).appendChild(t5.container) : this.appendChildToContainer(t5.container), t5.parentElement = this, this);
              }
              afterSetMod(t5, e5) {
                this.syncMod && this.elements.forEach((i4) => i4.setMod(t5, e5));
              }
              appendChildToContainer(t5) {
                this.container.appendChild(t5);
              }
              remove(t5) {
                const e5 = this.elements.indexOf(t5);
                return -1 !== e5 && (this.elements.splice(e5, 1), a2.J.safeRemove(t5.container), t5.parentElement = null), this;
              }
              clear() {
                return this.elements.forEach((t5) => t5.destruct()), this.elements.length = 0, this;
              }
              constructor(t5, e5, i4) {
                super(t5, i4), this.options = i4, this.syncMod = false, this.elements = [], this.buttonSize = "middle", null == e5 || e5.forEach((t6) => t6 && this.append(t6)), (null == i4 ? void 0 : i4.name) && (this.name = i4.name);
              }
              destruct() {
                return this.clear(), super.destruct();
              }
            };
            (0, n2.Cg)([(0, s.watch)("buttonSize")], d2.prototype, "update", null), d2 = o3 = (0, n2.Cg)([s.component], d2);
          }, 29012: function(t4, e4, i3) {
            i3.d(e4, { CP: function() {
              return r2.C;
            }, Ue: function() {
              return o3.U;
            }, bk: function() {
              return s.b;
            }, z4: function() {
              return n2.z;
            } });
            var o3 = i3(6455), n2 = i3(94070), r2 = i3(86283), s = i3(13642);
          }, 94070: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return f2;
            } });
            var o3 = i3(31635), n2 = i3(37474), r2 = i3(22664), s = i3(42589), a2 = i3(92032), l = i3(6455), c = i3(86283), d2 = i3(13642), u2 = i3(39611), h2 = i3(57023), p2 = i3(37424);
            let f2 = class extends l.U {
              className() {
                return "UIList";
              }
              __onChangeMode() {
                this.setMod("mode", this.mode);
              }
              constructor(t5) {
                super(t5), this.mode = "horizontal", this.removeButtons = [];
              }
              makeGroup() {
                return new l.U(this.jodit);
              }
              get buttons() {
                return this.allChildren.filter((t5) => n2.u.isInstanceOf(t5, a2.lD));
              }
              getButtonsNames() {
                return this.buttons.map((t5) => t5 instanceof a2.lD && t5.state.name || "").filter((t5) => "" !== t5);
              }
              setRemoveButtons(t5) {
                return this.removeButtons = t5 || [], this;
              }
              build(t5, e5 = null) {
                t5 = (0, s.u)(t5), this.clear();
                let i4, o4 = false, n3 = this.makeGroup();
                this.append(n3), n3.setMod("line", true);
                const r3 = (t6) => {
                  let r4 = null;
                  switch (t6.name) {
                    case "\n":
                      n3 = this.makeGroup(), n3.setMod("line", true), i4 = this.makeGroup(), n3.append(i4), this.append(n3);
                      break;
                    case "|":
                      o4 || (o4 = true, r4 = new c.C(this.j));
                      break;
                    case "---": {
                      i4.setMod("before-spacer", true);
                      const t7 = new d2.b(this.j);
                      n3.append(t7), i4 = this.makeGroup(), n3.append(i4), o4 = false;
                      break;
                    }
                    default:
                      o4 = false, r4 = "select" === t6.component ? this.makeSelect(t6, e5) : this.makeButton(t6, e5);
                  }
                  r4 && (i4 || (i4 = this.makeGroup(), n3.append(i4)), i4.append(r4));
                }, a3 = (t6) => {
                  var e6;
                  return !this.removeButtons.includes(t6.name) && (!t6.isVisible || (null === (e6 = t6.isVisible) || void 0 === e6 ? void 0 : e6.call(t6, this.j, t6)));
                };
                return t5.forEach((t6) => {
                  if ((0, u2.i)(t6)) {
                    const e6 = t6.buttons.filter((t7) => t7);
                    e6.length && (i4 = this.makeGroup(), i4.setMod("separated", true).setMod("group", t6.group), n3.append(i4), (0, p2.Q)(e6, this.j.o.controls).filter(a3).forEach(r3));
                  } else {
                    i4 || (i4 = this.makeGroup(), n3.append(i4));
                    const e6 = (0, h2.U)(t6, this.j.o.controls);
                    a3(e6) && r3(e6);
                  }
                }), this.update(), this;
              }
              makeSelect(t5, e5) {
                throw new Error("Not implemented behaviour");
              }
              makeButton(t5, e5) {
                return new a2.lD(this.j, { name: t5.name });
              }
            };
            (0, o3.Cg)([(0, r2.watch)("mode"), (0, r2.hook)("ready")], f2.prototype, "__onChangeMode", null), f2 = (0, o3.Cg)([r2.component], f2);
          }, 86283: function(t4, e4, i3) {
            i3.d(e4, { C: function() {
              return s;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(29780);
            let s = class extends r2.D {
              className() {
                return "UISeparator";
              }
            };
            s = (0, o3.Cg)([n2.s], s);
          }, 13642: function(t4, e4, i3) {
            i3.d(e4, { b: function() {
              return s;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(29780);
            let s = class extends r2.D {
              className() {
                return "UISpacer";
              }
            };
            s = (0, o3.Cg)([n2.s], s);
          }, 39611: function(t4, e4, i3) {
            i3.d(e4, { V: function() {
              return r2;
            }, i: function() {
              return n2;
            } });
            var o3 = i3(37923);
            const n2 = (t5) => (0, o3.c)(t5.buttons);
            function r2(t5, e5) {
              const i4 = e5.getRegisteredButtonGroups();
              return new Set(t5.reduce((t6, e6) => {
                var o4;
                return n2(e6) ? t6 = t6.concat([...e6.buttons, ...null !== (o4 = i4[e6.group]) && void 0 !== o4 ? o4 : []]) : t6.push(e6), t6;
              }, []));
            }
          }, 57023: function(t4, e4, i3) {
            i3.d(e4, { U: function() {
              return r2;
            }, x: function() {
              return s;
            } });
            var o3 = i3(65147), n2 = i3(36115);
            function r2(t5, e5) {
              let i4;
              return e5 || (e5 = n2.T.defaultOptions.controls), (0, o3.isString)(t5) ? i4 = s(t5, e5) || { name: t5, command: t5, tooltip: t5 } : (i4 = { name: "empty", ...(0, o3.ConfigFlatten)(t5) }, void 0 !== e5[i4.name] && (i4 = { ...(0, o3.ConfigFlatten)(e5[i4.name]), ...(0, o3.ConfigFlatten)(i4) })), i4;
            }
            function s(t5, e5) {
              var i4;
              let [n3, r3] = t5.split(/\./), s2 = e5;
              null != r3 ? void 0 !== e5[n3] && (s2 = e5[n3]) : r3 = n3;
              const a2 = null === (i4 = s2[r3]) || void 0 === i4 ? void 0 : i4.list;
              return s2[r3] ? { name: r3, ...(0, o3.ConfigFlatten)(s2[r3]), list: (0, o3.isArray)(a2) ? a2.reduce((t6, e6) => (t6[e6] = e6, t6), {}) : a2 } : void 0;
            }
          }, 37424: function(t4, e4, i3) {
            i3.d(e4, { Q: function() {
              return a2;
            } });
            var o3 = i3(37923), n2 = i3(97369), r2 = i3(57023), s = i3(36115);
            function a2(t5, e5) {
              return ((0, o3.c)(t5) ? t5 : (0, n2.keys)(t5, false).map((e6) => (0, n2.ConfigProto)({ name: e6 }, t5[e6] || {}))).map((t6) => (0, r2.U)(t6, e5 || s.T.defaultOptions.controls));
            }
          }, 931: function(t4, e4, i3) {
            i3.d(e4, { I: function() {
              return r2;
            } }), i3(17352);
            var o3 = i3(65147), n2 = i3(38322);
            class r2 {
              static getIcon(t5) {
                return /<svg/i.test(t5) ? t5 : r2.icons[t5] || r2.icons[t5.replace(/-/g, "_")] || r2.icons[t5.replace(/_/g, "-")] || r2.icons[(0, o3.camelCase)(t5)] || r2.icons[(0, o3.kebabCase)(t5)] || r2.icons[t5.toLowerCase()];
              }
              static exists(t5) {
                return void 0 !== this.getIcon(t5);
              }
              static get(t5, e5 = "<span></span>") {
                return this.getIcon(t5) || e5;
              }
              static set(t5, e5) {
                return this.icons[t5.replace("_", "-")] = e5, this;
              }
              static makeIcon(t5, e5) {
                var i4, o4, s, a2;
                if (!e5) return;
                let l;
                const { name: c, iconURL: d2, fill: u2 } = e5, h2 = c.replace(/[^a-zA-Z0-9]/g, "_");
                let p2;
                /<svg/.test(c) || (p2 = null === (o4 = (i4 = t5.o).getIcon) || void 0 === o4 ? void 0 : o4.call(i4, c, h2));
                const f2 = `${c}${d2}${u2}${null != p2 ? p2 : ""}`;
                if (t5.o.cache && this.__cache.has(f2)) return null === (s = this.__cache.get(f2)) || void 0 === s ? void 0 : s.cloneNode(true);
                if (d2) l = t5.c.span(), (0, n2.A)(l, "backgroundImage", "url(" + d2.replace("{basePath}", (null == t5 ? void 0 : t5.basePath) || "") + ")");
                else {
                  const e6 = p2 || r2.get(c, "") || (null === (a2 = t5.o.extraIcons) || void 0 === a2 ? void 0 : a2[c]);
                  e6 && (l = t5.c.fromHTML(e6.trim()), /^<svg/i.test(c) || l.classList.add("jodit-icon_" + h2));
                }
                return l && (l.classList.add("jodit-icon"), l.style.fill = u2, t5.o.cache && this.__cache.set(f2, l.cloneNode(true))), l;
              }
            }
            r2.icons = {}, r2.__cache = /* @__PURE__ */ new Map();
          }, 53048: function(t4, e4, i3) {
            i3.d(e4, { $6: function() {
              return r2.$6;
            }, $n: function() {
              return o3.$n;
            }, CP: function() {
              return s.CP;
            }, D$: function() {
              return n2.D;
            }, F0: function() {
              return r2.F0;
            }, In: function() {
              return a2.I;
            }, SB: function() {
              return o3.SB;
            }, Ue: function() {
              return s.Ue;
            }, XV: function() {
              return r2.XV;
            }, Yh: function() {
              return r2.Yh;
            }, bk: function() {
              return s.bk;
            }, cY: function() {
              return r2.cY;
            }, lD: function() {
              return o3.lD;
            }, nE: function() {
              return r2.nE;
            }, ss: function() {
              return o3.ss;
            }, tS: function() {
              return r2.tS;
            }, ue: function() {
              return o3.ue;
            }, z2: function() {
              return c.z;
            }, z4: function() {
              return s.z4;
            }, zD: function() {
              return l.z;
            } });
            var o3 = i3(35265), n2 = i3(29780), r2 = i3(20703), s = i3(29012), a2 = i3(931), l = i3(96369), c = i3(92227);
          }, 96369: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return o3.z;
            } });
            var o3 = i3(80071);
          }, 80071: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return h2;
            } });
            var o3 = i3(31635), n2 = i3(37474), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = (i3(28712), i3(29780)), d2 = i3(6455);
            const u2 = ["escape", "cut", "delete", "backSpaceAfterDelete", "beforeCommandDelete"];
            class h2 extends d2.U {
              className() {
                return "Popup";
              }
              appendChildToContainer(t5) {
                this.getElm("content").appendChild(t5);
              }
              updateParentElement(t5) {
                return t5 !== this && n2.u.isInstanceOf(t5, h2) && (this.__childrenPopups.forEach((e5) => {
                  !t5.closest(e5) && e5.isOpened && e5.close();
                }), this.__childrenPopups.has(t5) || this.j.e.on(t5, "beforeClose", () => {
                  this.__childrenPopups.delete(t5);
                }), this.__childrenPopups.add(t5)), super.updateParentElement(t5);
              }
              setContent(t5) {
                if (this.allChildren.length) throw new Error("Remove children");
                if (n2.u.isInstanceOf(t5, c.D)) this.append(t5);
                else {
                  const e5 = (0, l.isString)(t5) ? this.j.c.fromHTML(t5) : t5;
                  this.appendChildToContainer(e5);
                }
                return this.updatePosition(), this;
              }
              open(t5, e5 = false, i4) {
                if ((0, l.markOwner)(this.jodit, this.container), this.container.classList.add(`jodit_theme_${this.jodit.o.theme}`), this.__calculateZIndex(), this.isOpened = true, this.__addGlobalListeners(), this.__targetBound = e5 ? this.getKeepBound(t5) : t5, i4) i4.appendChild(this.container);
                else {
                  const t6 = (0, a2.My)(this.jodit, h2);
                  i4 !== this.container.parentElement && t6.appendChild(this.container);
                }
                return this.updatePosition(), this.j.e.fire(this, "afterOpen"), this.j.e.fire("afterOpenPopup", this), this;
              }
              __calculateZIndex() {
                if (this.container.style.zIndex) return;
                const t5 = (t6) => {
                  const e6 = t6.container.style.zIndex || t6.o.zIndex;
                  return !!e6 && (this.setZIndex(1 + parseInt(e6.toString(), 10)), true);
                }, { j: e5 } = this;
                if (t5(e5)) return;
                let i4 = this.parentElement;
                for (; i4; ) {
                  if (t5(i4.j)) return;
                  if (i4.container.style.zIndex) return void this.setZIndex(1 + parseInt(i4.container.style.zIndex.toString(), 10));
                  if (!i4.parentElement && i4.container.parentElement) {
                    const t6 = c.D.closestElement(i4.container.parentElement, c.D);
                    if (t6) {
                      i4 = t6;
                      continue;
                    }
                  }
                  i4 = i4.parentElement;
                }
              }
              getKeepBound(t5) {
                const e5 = t5(), i4 = this.od.elementFromPoint(e5.left, e5.top);
                if (!i4) return t5;
                const o4 = s.J.isHTMLElement(i4) ? i4 : i4.parentElement, n3 = (0, l.position)(o4, this.j);
                return () => {
                  const e6 = t5(), i5 = (0, l.position)(o4, this.j);
                  return { ...e6, top: e6.top + (i5.top - n3.top), left: e6.left + (i5.left - n3.left) };
                };
              }
              updatePosition() {
                if (!this.isOpened) return this;
                const [t5, e5] = this.__calculatePosition(this.__targetBound(), this.viewBound(), (0, l.position)(this.container, this.j));
                return this.setMod("strategy", e5), (0, l.css)(this.container, { left: t5.left, top: t5.top }), this.__childrenPopups.forEach((t6) => t6.updatePosition()), this;
              }
              __throttleUpdatePosition() {
                this.updatePosition();
              }
              __calculatePosition(t5, e5, i4, o4 = this.strategy) {
                const n3 = { left: t5.left, right: t5.left - (i4.width - t5.width) }, r3 = { bottom: t5.top + t5.height, top: t5.top - i4.height }, s2 = Object.keys(n3).reduce((t6, e6) => t6.concat(Object.keys(r3).map((t7) => `${e6}${(0, l.ucfirst)(t7)}`)), []), a3 = (t6) => {
                  const [e6, o5] = (0, l.kebabCase)(t6).split("-");
                  return { left: n3[e6], top: r3[o5], width: i4.width, height: i4.height };
                }, c2 = (t6) => {
                  let e6 = null;
                  return e6 = h2.boxInView(a3(o4), t6) ? o4 : s2.find((e7) => {
                    if (h2.boxInView(a3(e7), t6)) return e7;
                  }) || null, e6;
                };
                let d3 = c2((0, l.position)(this.j.container, this.j));
                return d3 && h2.boxInView(a3(d3), e5) || (d3 = c2(e5) || d3 || o4), [a3(d3), d3];
              }
              static boxInView(t5, e5) {
                return !(-2 > t5.top - e5.top || -2 > t5.left - e5.left || -2 > e5.top + e5.height - (t5.top + t5.height) || -2 > e5.left + e5.width - (t5.left + t5.width));
              }
              close() {
                return this.isOpened ? (this.isOpened = false, this.__childrenPopups.forEach((t5) => t5.close()), this.j.e.fire(this, "beforeClose"), this.j.e.fire("beforePopupClose", this), this.__removeGlobalListeners(), s.J.safeRemove(this.container), this) : this;
              }
              __closeOnOutsideClick(t5) {
                this.isOpened && !this.isOwnClick(t5) && this.close();
              }
              isOwnClick(t5) {
                if (!t5.target) return false;
                const e5 = c.D.closestElement(t5.target, h2);
                return Boolean(e5 && (this === e5 || e5.closest(this)));
              }
              __addGlobalListeners() {
                const t5 = this.__throttleUpdatePosition, e5 = this.ow;
                a2.RR.on("closeAllPopups", this.close), this.smart && this.j.e.on(u2, this.close).on("mousedown touchstart", this.__closeOnOutsideClick).on(e5, "mousedown touchstart", this.__closeOnOutsideClick), this.j.e.on("closeAllPopups", this.close).on("resize", t5).on(this.container, "scroll mousewheel", t5).on(e5, "scroll", t5).on(e5, "resize", t5), s.J.up(this.j.container, (e6) => {
                  e6 && this.j.e.on(e6, "scroll mousewheel", t5);
                });
              }
              __removeGlobalListeners() {
                const t5 = this.__throttleUpdatePosition, e5 = this.ow;
                a2.RR.off("closeAllPopups", this.close), this.smart && this.j.e.off(u2, this.close).off("mousedown touchstart", this.__closeOnOutsideClick).off(e5, "mousedown touchstart", this.__closeOnOutsideClick), this.j.e.off("closeAllPopups", this.close).off("resize", t5).off(this.container, "scroll mousewheel", t5).off(e5, "scroll", t5).off(e5, "resize", t5), this.j.container.isConnected && s.J.up(this.j.container, (e6) => {
                  e6 && this.j.e.off(e6, "scroll mousewheel", t5);
                });
              }
              setZIndex(t5) {
                this.container.style.zIndex = t5.toString();
              }
              constructor(t5, e5 = true) {
                super(t5), this.smart = e5, this.isOpened = false, this.strategy = "leftBottom", this.viewBound = () => ({ left: 0, top: 0, width: this.ow.innerWidth, height: this.ow.innerHeight }), this.__childrenPopups = /* @__PURE__ */ new Set(), (0, l.attr)(this.container, "role", "popup");
              }
              render() {
                return '<div>\n			<div class="&__content"></div>\n		</div>';
              }
              destruct() {
                return this.close(), super.destruct();
              }
            }
            (0, o3.Cg)([r2.autobind], h2.prototype, "updatePosition", null), (0, o3.Cg)([(0, r2.throttle)(10), r2.autobind], h2.prototype, "__throttleUpdatePosition", null), (0, o3.Cg)([r2.autobind], h2.prototype, "close", null), (0, o3.Cg)([r2.autobind], h2.prototype, "__closeOnOutsideClick", null);
          }, 92227: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(29780);
            class r2 extends n2.D {
              className() {
                return "ProgressBar";
              }
              render() {
                return "<div><div></div></div>";
              }
              show() {
                return (this.j.workplace || this.j.container).appendChild(this.container), this;
              }
              hide() {
                return o3.J.safeRemove(this.container), this;
              }
              progress(t5) {
                return this.container.style.width = t5.toFixed(2) + "%", this;
              }
              destruct() {
                return this.hide(), super.destruct();
              }
            }
          }, 14961: function(t4, e4, i3) {
            i3.d(e4, { T: function() {
              return f2;
            } });
            var o3 = i3(31635), n2 = i3(64567), r2 = i3(26318), s = i3(66927), a2 = i3(55186), l = i3(32709), c = i3(98253), d2 = i3(58720), u2 = i3(39611), h2 = i3(77782), p2 = i3(8809);
            class f2 extends h2.S {
              get toolbarContainer() {
                return this.o.fullsize || !(0, c.K)(this.o.toolbar) && !a2.J.isHTMLElement(this.o.toolbar) ? (this.o.toolbar && a2.J.appendChildFirst(this.container, this.__defaultToolbarContainer), this.__defaultToolbarContainer) : (0, d2.tI)(this.o.toolbar, this.o.shadowRoot || this.od);
              }
              setPanel(t5) {
                this.o.toolbar = t5, this.buildToolbar();
              }
              buildToolbar() {
                var t5;
                if (!this.o.toolbar) return;
                const e5 = this.o.buttons ? (0, l.uM)(this.o.buttons) : [];
                null === (t5 = this.toolbar) || void 0 === t5 || t5.setRemoveButtons(this.o.removeButtons).build(e5.concat(this.o.extraButtons || [])).appendTo(this.toolbarContainer);
              }
              getRegisteredButtonGroups() {
                return this.groupToButtons;
              }
              registerButton(t5) {
                var e5;
                this.registeredButtons.add(t5);
                const i4 = null !== (e5 = t5.group) && void 0 !== e5 ? e5 : "other";
                return this.groupToButtons[i4] || (this.groupToButtons[i4] = []), null != t5.position ? this.groupToButtons[i4][t5.position] = t5.name : this.groupToButtons[i4].push(t5.name), this;
              }
              unregisterButton(t5) {
                var e5;
                this.registeredButtons.delete(t5);
                const i4 = null !== (e5 = t5.group) && void 0 !== e5 ? e5 : "other", o4 = this.groupToButtons[i4];
                if (o4) {
                  const e6 = o4.indexOf(t5.name);
                  -1 !== e6 && o4.splice(e6, 1), 0 === o4.length && delete this.groupToButtons[i4];
                }
                return this;
              }
              beforeToolbarBuild(t5) {
                if (Object.keys(this.groupToButtons).length) return t5.map((t6) => (0, u2.i)(t6) && t6.group && this.groupToButtons[t6.group] ? { group: t6.group, buttons: [...t6.buttons, ...this.groupToButtons[t6.group]] } : t6);
              }
              constructor(t5, e5 = false) {
                super(t5, e5), this.toolbar = (0, p2.$K)(this), this.__defaultToolbarContainer = this.c.div("jodit-toolbar__box"), this.registeredButtons = /* @__PURE__ */ new Set(), this.groupToButtons = {}, this.isJodit = false, this.isJodit = e5, this.e.on("beforeToolbarBuild", this.beforeToolbarBuild);
              }
              destruct() {
                this.isDestructed || (this.setStatus(n2.f.beforeDestruct), this.e.off("beforeToolbarBuild", this.beforeToolbarBuild), this.toolbar.destruct(), this.toolbar = void 0, super.destruct());
              }
            }
            (0, o3.Cg)([(0, s.w)(":rebuildToolbar")], f2.prototype, "buildToolbar", null), (0, o3.Cg)([r2.Ay], f2.prototype, "beforeToolbarBuild", null);
          }, 77782: function(t4, e4, i3) {
            i3.d(e4, { S: function() {
              return y2;
            } });
            var o3, n2 = i3(31635), r2 = i3(77753), s = i3(37474), a2 = i3(64567), l = i3(17352), c = i3(92852), d2 = i3(87875), u2 = i3(1963), h2 = i3(71151), p2 = i3(71842), f2 = i3(50025), g2 = i3(56298), m2 = i3(65147), b2 = i3(24834), _2 = i3(87906), v2 = i3(75758), x = i3(92227), w = i3(91902);
            let y2 = o3 = class extends s.u {
              get basePath() {
                return this.o.basePath ? this.o.basePath : l.BASE_PATH;
              }
              get defaultTimeout() {
                return (0, m2.isVoid)(this.o.defaultTimeout) ? 100 : this.o.defaultTimeout;
              }
              get buffer() {
                return b2.w.makeStorage();
              }
              get message() {
                return this.getMessageModule(this.container);
              }
              getMessageModule(t5) {
                return new w.N(this, t5);
              }
              get storage() {
                return b2.w.makeStorage(true, this.id);
              }
              get c() {
                return this.create;
              }
              get container() {
                return this.__container;
              }
              set container(t5) {
                this.__container = t5;
              }
              get e() {
                return this.events;
              }
              get progressbar() {
                return new x.z(this);
              }
              get options() {
                return this.__options;
              }
              set options(t5) {
                this.__options = t5;
              }
              get o() {
                return this.options;
              }
              i18n(t5, ...e5) {
                return (0, m2.i18n)(t5, e5, this.options);
              }
              toggleFullSize(t5) {
                void 0 === t5 && (t5 = !this.__isFullSize), t5 !== this.__isFullSize && (this.__isFullSize = t5, this.e.fire("toggleFullSize", t5));
              }
              get isLocked() {
                return "" !== this.__whoLocked;
              }
              lock(t5 = "any") {
                return !this.isLocked && (this.__whoLocked = t5, true);
              }
              unlock() {
                return !!this.isLocked && (this.__whoLocked = "", true);
              }
              get isFullSize() {
                return this.__isFullSize;
              }
              getVersion() {
                return o3.version;
              }
              static getVersion() {
                return o3.version;
              }
              initOptions(t5) {
                this.options = (0, m2.ConfigProto)(t5 || {}, (0, m2.ConfigProto)(this.options || {}, o3.defaultOptions));
              }
              initOwners() {
                var t5;
                this.ownerWindow = null !== (t5 = this.o.ownerWindow) && void 0 !== t5 ? t5 : window;
              }
              attachEvents(t5) {
                if (!t5) return;
                const e5 = null == t5 ? void 0 : t5.events;
                e5 && Object.keys(e5).forEach((t6) => this.e.on(t6, e5[t6]));
              }
              constructor(t5, e5 = false) {
                super(), this.isJodit = e5, this.isView = true, this.parent = null, this.mods = {}, this.components = /* @__PURE__ */ new Set(), this.OPTIONS = o3.defaultOptions, this.__isFullSize = false, this.__whoLocked = "", this.isLockedNotBy = (t6) => this.isLocked && this.__whoLocked !== t6, this.__modulesInstances = /* @__PURE__ */ new Map(), this.id = (/* @__PURE__ */ new Date()).getTime().toString(), this.initOptions(t5), this.initOwners(), this.events = new f2.bk(this.od), this.create = new c.X(this.od), this.container = this.c.div(`jodit ${this.componentName}`);
              }
              getInstance(t5, e5) {
                const i4 = (0, m2.isFunction)(t5) ? t5.prototype.className() : t5, o4 = this.e.fire((0, m2.camelCase)("getInstance_" + i4), e5);
                if (o4) return o4;
                const n3 = (0, m2.isFunction)(t5) ? t5 : g2.av[i4], s2 = this.__modulesInstances;
                if (!(0, m2.isFunction)(n3)) throw (0, m2.error)("Need real module name");
                if (!s2.has(i4)) {
                  const t6 = n3.prototype instanceof r2.vG ? new n3(this, e5) : new n3(e5);
                  this.components.add(t6), s2.set(i4, t6);
                }
                return s2.get(i4);
              }
              addDisclaimer(t5) {
                this.container.appendChild(t5);
              }
              beforeDestruct() {
                this.e.fire(a2.f.beforeDestruct, this), this.components.forEach((t5) => {
                  (0, m2.isDestructable)(t5) && !t5.isInDestruct && t5.destruct();
                }), this.components.clear();
              }
              destruct() {
                this.isDestructed || (this.progressbar.destruct(), this.message.destruct(), this.events && (this.events.destruct(), this.events = void 0), this.buffer && this.buffer.clear(), p2.J.safeRemove(this.container), super.destruct());
              }
            };
            y2.ES = l.ES, y2.version = l.APP_VERSION, y2.esNext = l.IS_ES_NEXT, y2.esModern = l.IS_ES_MODERN, (0, n2.Cg)([d2.PP], y2.prototype, "buffer", null), (0, n2.Cg)([d2.PP], y2.prototype, "message", null), (0, n2.Cg)([d2.PP], y2.prototype, "storage", null), (0, n2.Cg)([d2.PP], y2.prototype, "c", null), (0, n2.Cg)([d2.PP], y2.prototype, "e", null), (0, n2.Cg)([d2.PP], y2.prototype, "progressbar", null), (0, n2.Cg)([(0, h2.A)(a2.f.beforeDestruct)], y2.prototype, "beforeDestruct", null), y2 = o3 = (0, n2.Cg)([(0, u2.C)(v2.K, _2.O)], y2), y2.defaultOptions = { extraButtons: [], cache: true, textIcons: false, namespace: "", removeButtons: [], zIndex: 100002, defaultTimeout: 100, fullsize: false, showTooltip: true, useNativeTooltip: false, buttons: [], globalFullSize: true, language: "auto" };
          }, 46173: function(t4, e4, i3) {
            i3.d(e4, { x: function() {
              return g2;
            } });
            var o3, n2 = i3(31635), r2 = i3(17352), s = i3(22664), a2 = i3(56298), l = i3(65147), c = i3(53883), d2 = i3(58597), u2 = i3(37435), h2 = i3(36115);
            const p2 = "data-jodit-default-style-display", f2 = "data-jodit-default-classes";
            let g2 = o3 = class extends u2.ViewWithToolbar {
              className() {
                return "Jodit";
              }
              waitForReady() {
                return this.isReady ? Promise.resolve(this) : this.async.promise((t5) => {
                  this.hookStatus("ready", () => t5(this));
                });
              }
              static get ready() {
                return new Promise((t5) => {
                  a2.RR.on("oditready", t5);
                });
              }
              get text() {
                if (this.editor) return this.editor.innerText || "";
                const t5 = this.createInside.div();
                return t5.innerHTML = this.getElementValue(), t5.innerText || "";
              }
              get defaultTimeout() {
                return (0, l.isNumber)(this.o.defaultTimeout) ? this.o.defaultTimeout : h2.T.defaultOptions.defaultTimeout;
              }
              static atom(t5) {
                return (0, l.markAsAtomic)(t5);
              }
              static make(t5, e5) {
                return new this(t5, e5);
              }
              static isJoditAssigned(t5) {
                return t5 && (0, l.isJoditObject)(t5.component) && !t5.component.isInDestruct;
              }
              static get defaultOptions() {
                return h2.T.defaultOptions;
              }
              get createInside() {
                return new u2.Create(() => this.ed, this.o.createAttributes);
              }
              __setPlaceField(t5, e5) {
                this.currentPlace || (this.currentPlace = {}, this.places = [this.currentPlace]), this.currentPlace[t5] = e5;
              }
              get element() {
                return this.currentPlace.element;
              }
              get editor() {
                return this.currentPlace.editor;
              }
              set editor(t5) {
                this.__setPlaceField("editor", t5);
              }
              get container() {
                return this.currentPlace.container;
              }
              set container(t5) {
                this.__setPlaceField("container", t5);
              }
              get workplace() {
                return this.currentPlace.workplace;
              }
              get message() {
                return this.getMessageModule(this.workplace);
              }
              get statusbar() {
                return this.currentPlace.statusbar;
              }
              get iframe() {
                return this.currentPlace.iframe;
              }
              set iframe(t5) {
                this.__setPlaceField("iframe", t5);
              }
              get history() {
                return this.currentPlace.history;
              }
              get editorWindow() {
                return this.currentPlace.editorWindow;
              }
              set editorWindow(t5) {
                this.__setPlaceField("editorWindow", t5);
              }
              get ew() {
                return this.editorWindow;
              }
              get editorDocument() {
                return this.currentPlace.editorWindow.document;
              }
              get ed() {
                return this.editorDocument;
              }
              get options() {
                return this.currentPlace.options;
              }
              set options(t5) {
                this.__setPlaceField("options", t5);
              }
              get s() {
                return this.selection;
              }
              get uploader() {
                return this.getInstance("Uploader", this.o.uploader);
              }
              get filebrowser() {
                const t5 = this, e5 = (0, l.ConfigProto)({ defaultTimeout: t5.defaultTimeout, uploader: t5.o.uploader, language: t5.o.language, license: t5.o.license, theme: t5.o.theme, shadowRoot: t5.o.shadowRoot, defaultCallback(e6) {
                  e6.files && e6.files.length && e6.files.forEach((i4, o4) => {
                    const n3 = e6.baseurl + i4;
                    e6.isImages && e6.isImages[o4] ? t5.s.insertImage(n3, null, t5.o.imageDefaultWidth) : t5.s.insertNode(t5.createInside.fromHTML(`<a href='${n3}' title='${n3}'>${n3}</a>`));
                  });
                } }, this.o.filebrowser);
                return t5.getInstance("FileBrowser", e5);
              }
              get mode() {
                return this.__mode;
              }
              set mode(t5) {
                this.setMode(t5);
              }
              getNativeEditorValue() {
                const t5 = this.e.fire("beforeGetNativeEditorValue");
                return (0, l.isString)(t5) ? t5 : this.editor ? this.editor.innerHTML : this.getElementValue();
              }
              setNativeEditorValue(t5) {
                const e5 = { value: t5 };
                this.e.fire("beforeSetNativeEditorValue", e5) || this.editor && (this.editor.innerHTML = e5.value);
              }
              get value() {
                return this.getEditorValue();
              }
              set value(t5) {
                this.setEditorValue(t5), this.history.__processChanges();
              }
              synchronizeValues() {
                this.__imdSynchronizeValues();
              }
              __imdSynchronizeValues() {
                this.setEditorValue();
              }
              getEditorValue(t5 = true, e5) {
                let i4;
                if (i4 = this.e.fire("beforeGetValueFromEditor", e5), void 0 !== i4) return i4;
                i4 = this.getNativeEditorValue().replace(r2.INVISIBLE_SPACE_REG_EXP(), ""), t5 && (i4 = i4.replace(/<span[^>]+id="jodit-selection_marker_[^>]+><\/span>/g, "")), "<br>" === i4 && (i4 = "");
                const o4 = { value: i4 };
                return this.e.fire("afterGetValueFromEditor", o4, e5), o4.value;
              }
              setEditorValue(t5) {
                const e5 = this.e.fire("beforeSetValueToEditor", t5);
                if (false === e5) return;
                if ((0, l.isString)(e5) && (t5 = e5), !this.editor) return void (void 0 !== t5 && this.__setElementValue(t5));
                if (!(0, l.isString)(t5) && !(0, l.isVoid)(t5)) throw (0, l.error)("value must be string");
                (0, l.isVoid)(t5) || this.getNativeEditorValue() === t5 || this.setNativeEditorValue(t5), this.e.fire("postProcessSetEditorValue");
                const i4 = this.getElementValue(), o4 = this.getEditorValue();
                if (!this.__isSilentChange && i4 !== o4 && r2.SAFE_COUNT_CHANGE_CALL > this.__callChangeCount) {
                  this.__setElementValue(o4), this.__callChangeCount += 1;
                  try {
                    this.history.__upTick(), this.e.fire("change", o4, i4), this.e.fire(this.history, "change", o4, i4);
                  } finally {
                    this.__callChangeCount = 0;
                  }
                }
              }
              updateElementValue() {
                this.__setElementValue(this.getEditorValue());
              }
              getElementValue() {
                return void 0 !== this.element.value ? this.element.value : this.element.innerHTML;
              }
              __setElementValue(t5) {
                if (!(0, l.isString)(t5)) throw (0, l.error)("value must be string");
                if (this.element !== this.container && t5 !== this.getElementValue()) {
                  const e5 = { value: t5 }, i4 = this.e.fire("beforeSetElementValue", e5);
                  (0, l.callPromise)(i4, () => {
                    void 0 !== this.element.value ? this.element.value = e5.value : this.element.innerHTML = e5.value, this.e.fire("afterSetElementValue", e5);
                  });
                }
              }
              registerCommand(t5, e5, i4) {
                const o4 = t5.toLowerCase();
                let n3 = this.commands.get(o4);
                if (void 0 === n3 && (n3 = [], this.commands.set(o4, n3)), n3.push(e5), !(0, l.isFunction)(e5)) {
                  const n4 = this.o.commandToHotkeys[o4] || this.o.commandToHotkeys[t5] || e5.hotkeys;
                  n4 && this.registerHotkeyToCommand(n4, o4, null == i4 ? void 0 : i4.stopPropagation);
                }
                return this;
              }
              registerHotkeyToCommand(t5, e5, i4 = true) {
                const o4 = (0, l.asArray)(t5).map(l.normalizeKeyAliases).map((t6) => t6 + ".hotkey").join(" ");
                this.e.off(o4).on(o4, (t6, o5) => (o5 && (o5.shouldStop = null == i4 || i4), this.execCommand(e5)));
              }
              execCommand(t5, e5, i4, ...o4) {
                if (this.s.isFocused() || this.s.focus(), this.o.readonly && !this.o.allowCommandsInReadOnly.includes(t5)) return;
                let n3;
                if (t5 = t5.toLowerCase(), n3 = this.e.fire(`beforeCommand${(0, l.ucfirst)(t5)}`, e5, i4, ...o4), false !== n3 && (n3 = this.e.fire("beforeCommand", t5, e5, i4, ...o4)), false !== n3 && (n3 = this.__execCustomCommands(t5, e5, i4, ...o4)), false !== n3) {
                  this.s.focus();
                  try {
                    n3 = this.nativeExecCommand(t5, e5, i4);
                  } catch (t6) {
                    if (!r2.IS_PROD) throw t6;
                  }
                }
                return this.e.fire("afterCommand", t5, e5, i4), this.__imdSynchronizeValues(), n3;
              }
              nativeExecCommand(t5, e5, i4) {
                this.__isSilentChange = true;
                try {
                  return this.ed.execCommand(t5, e5, i4);
                } finally {
                  this.__isSilentChange = false;
                }
              }
              __execCustomCommands(t5, e5, i4, ...o4) {
                t5 = t5.toLowerCase();
                const n3 = this.commands.get(t5);
                if (void 0 !== n3) {
                  let r3;
                  return n3.forEach((n4) => {
                    let s2;
                    s2 = (0, l.isFunction)(n4) ? n4 : n4.exec;
                    const a3 = s2.call(this, t5, e5, i4, ...o4);
                    void 0 !== a3 && (r3 = a3);
                  }), r3;
                }
              }
              lock(t5 = "any") {
                return !!super.lock(t5) && (this.__selectionLocked = this.s.save(), this.s.clear(), this.editor.classList.add("jodit_lock"), this.e.fire("lock", true), true);
              }
              unlock() {
                return !!super.unlock() && (this.editor.classList.remove("jodit_lock"), this.__selectionLocked && this.s.restore(), this.e.fire("lock", false), true);
              }
              getMode() {
                return this.mode;
              }
              isEditorMode() {
                return this.getRealMode() === r2.MODE_WYSIWYG;
              }
              getRealMode() {
                if (this.getMode() !== r2.MODE_SPLIT) return this.getMode();
                const t5 = this.od.activeElement;
                return t5 && (t5 === this.iframe || u2.Dom.isOrContains(this.editor, t5) || u2.Dom.isOrContains(this.toolbar.container, t5)) ? r2.MODE_WYSIWYG : r2.MODE_SOURCE;
              }
              setMode(t5) {
                const e5 = this.getMode(), i4 = { mode: parseInt(t5.toString(), 10) }, o4 = ["jodit-wysiwyg_mode", "jodit-source__mode", "jodit_split_mode"];
                false !== this.e.fire("beforeSetMode", i4) && (this.__mode = [r2.MODE_SOURCE, r2.MODE_WYSIWYG, r2.MODE_SPLIT].includes(i4.mode) ? i4.mode : r2.MODE_WYSIWYG, this.o.saveModeInStorage && this.storage.set("jodit_default_mode", this.mode), o4.forEach((t6) => {
                  this.container.classList.remove(t6);
                }), this.container.classList.add(o4[this.mode - 1]), e5 !== this.getMode() && this.e.fire("afterSetMode"));
              }
              toggleMode() {
                let t5 = this.getMode();
                [r2.MODE_SOURCE, r2.MODE_WYSIWYG, this.o.useSplitMode ? r2.MODE_SPLIT : 9].includes(t5 + 1) ? t5 += 1 : t5 = r2.MODE_WYSIWYG, this.setMode(t5);
              }
              setDisabled(t5) {
                this.o.disabled = t5;
                const e5 = this.__wasReadOnly;
                this.setReadOnly(t5 || e5), this.__wasReadOnly = e5, this.editor && (this.editor.setAttribute("aria-disabled", t5.toString()), this.container.classList.toggle("jodit_disabled", t5), this.e.fire("disabled", t5));
              }
              getDisabled() {
                return this.o.disabled;
              }
              setReadOnly(t5) {
                this.__wasReadOnly !== t5 && (this.__wasReadOnly = t5, this.o.readonly = t5, t5 ? this.editor && this.editor.removeAttribute("contenteditable") : this.editor && this.editor.setAttribute("contenteditable", "true"), this.e && this.e.fire("readonly", t5));
              }
              getReadOnly() {
                return this.o.readonly;
              }
              focus() {
                this.getMode() !== r2.MODE_SOURCE && this.s.focus();
              }
              get isFocused() {
                return this.s.isFocused();
              }
              beforeInitHook() {
              }
              afterInitHook() {
              }
              initOptions(t5) {
                this.options = (0, l.ConfigProto)(t5 || {}, h2.T.defaultOptions);
              }
              initOwners() {
                this.editorWindow = this.o.ownerWindow, this.ownerWindow = this.o.ownerWindow;
              }
              constructor(t5, e5) {
                super(e5, true), this.isJodit = true, this.commands = /* @__PURE__ */ new Map(), this.__selectionLocked = null, this.__wasReadOnly = false, this.editorIsActive = false, this.__mode = r2.MODE_WYSIWYG, this.__callChangeCount = 0, this.__isSilentChange = false, this.__elementToPlace = /* @__PURE__ */ new Map();
                try {
                  const e6 = (0, l.resolveElement)(t5, this.o.shadowRoot || this.od);
                  if (o3.isJoditAssigned(e6)) return e6.component;
                } catch (t6) {
                  throw this.destruct(), t6;
                }
                this.setStatus(u2.STATUSES.beforeInit), this.id = (0, l.attr)((0, l.resolveElement)(t5, this.o.shadowRoot || this.od), "id") || (/* @__PURE__ */ new Date()).getTime().toString(), a2.VF[this.id] = this, this.attachEvents(e5), this.e.on(this.ow, "resize", () => {
                  this.e && this.e.fire("resize");
                }), this.e.on("prepareWYSIWYGEditor", this.__prepareWYSIWYGEditor), this.selection = new u2.Selection(this);
                const i4 = this.beforeInitHook();
                (0, l.callPromise)(i4, () => {
                  if (this.isInDestruct) return;
                  this.e.fire("beforeInit", this), a2.fg.__init(this), this.e.fire("afterPluginSystemInit", this), this.e.on("changePlace", () => {
                    this.setReadOnly(this.o.readonly), this.setDisabled(this.o.disabled);
                  }), this.places.length = 0;
                  const i5 = this.addPlace(t5, e5);
                  a2.VF[this.id] = this, (0, l.callPromise)(i5, () => {
                    this.isInDestruct || (this.e && this.e.fire("afterInit", this), (0, l.callPromise)(this.afterInitHook()), this.setStatus(u2.STATUSES.ready), this.e.fire("afterConstructor", this));
                  });
                });
              }
              addPlace(t5, e5) {
                const i4 = (0, l.resolveElement)(t5, this.o.shadowRoot || this.od);
                this.attachEvents(e5), i4.attributes && (0, l.toArray)(i4.attributes).forEach((t6) => {
                  const i5 = t6.name;
                  let o5 = t6.value;
                  void 0 === h2.T.defaultOptions[i5] || e5 && void 0 !== e5[i5] || (-1 !== ["readonly", "disabled"].indexOf(i5) && (o5 = "" === o5 || "true" === o5), /^[0-9]+(\.)?([0-9]+)?$/.test(o5.toString()) && (o5 = Number(o5)), this.options[i5] = o5);
                });
                let o4 = this.c.div("jodit-container");
                o4.classList.add("jodit"), o4.classList.add("jodit-container"), o4.classList.add(`jodit_theme_${this.o.theme || "default"}`), m2(this.o.className, o4), this.o.containerStyle && (0, l.css)(o4, this.o.containerStyle);
                const { styleValues: n3 } = this.o;
                Object.keys(n3).forEach((t6) => {
                  const e6 = (0, l.kebabCase)(t6);
                  o4.style.setProperty(`--jd-${e6}`, n3[t6]);
                }), o4.setAttribute("contenteditable", "false");
                let r3 = null;
                this.o.inline && (-1 === ["TEXTAREA", "INPUT"].indexOf(i4.nodeName) && (o4 = i4, i4.setAttribute(f2, i4.className.toString()), r3 = o4.innerHTML, o4.innerHTML = ""), o4.classList.add("jodit_inline"), o4.classList.add("jodit-container")), i4 !== o4 && (i4.style.display && i4.setAttribute(p2, i4.style.display), i4.style.display = "none");
                const s2 = this.c.div("jodit-workplace", { contenteditable: false });
                o4.appendChild(s2), i4.parentNode && i4 !== o4 && i4.parentNode.insertBefore(o4, i4), Object.defineProperty(i4, "component", { enumerable: false, configurable: true, value: this });
                const a3 = this.c.div("jodit-wysiwyg", { contenteditable: true, "aria-disabled": false, tabindex: this.o.tabIndex });
                s2.appendChild(a3);
                const c2 = { editor: a3, element: i4, container: o4, workplace: s2, statusbar: new u2.StatusBar(this, o4), options: this.isReady ? (0, l.ConfigProto)(e5 || {}, h2.T.defaultOptions) : this.options, history: new u2.History(this), editorWindow: this.ow };
                this.__elementToPlace.set(a3, c2), this.setCurrentPlace(c2), this.places.push(c2), this.setNativeEditorValue(this.getElementValue());
                const d3 = this.__initEditor(r3), g3 = this.options;
                return (0, l.callPromise)(d3, () => {
                  g3.enableDragAndDropFileToEditor && g3.uploader && (g3.uploader.url || g3.uploader.insertImageAsBase64URI) && this.uploader.bind(this.editor), this.__elementToPlace.get(this.editor) || this.__elementToPlace.set(this.editor, c2), this.e.fire("afterAddPlace", c2);
                });
              }
              addDisclaimer(t5) {
                this.workplace.appendChild(t5);
              }
              setCurrentPlace(t5) {
                this.currentPlace !== t5 && (this.isEditorMode() || this.setMode(r2.MODE_WYSIWYG), this.currentPlace = t5, this.buildToolbar(), this.isReady && this.e.fire("changePlace", t5));
              }
              __initEditor(t5) {
                const e5 = this.__createEditor();
                return (0, l.callPromise)(e5, () => {
                  if (this.isInDestruct) return;
                  if (this.element !== this.container) {
                    const t6 = this.getElementValue();
                    t6 !== this.getEditorValue() && this.setEditorValue(t6);
                  } else null != t5 && this.setEditorValue(t5);
                  let e6 = this.o.defaultMode;
                  if (this.o.saveModeInStorage) {
                    const t6 = this.storage.get("jodit_default_mode");
                    "string" == typeof t6 && (e6 = parseInt(t6, 10));
                  }
                  this.setMode(e6), this.o.readonly && (this.__wasReadOnly = false, this.setReadOnly(true)), this.o.disabled && this.setDisabled(true);
                  try {
                    this.ed.execCommand("defaultParagraphSeparator", false, this.o.enter.toLowerCase());
                  } catch (t6) {
                  }
                });
              }
              __createEditor() {
                const t5 = this.editor, e5 = this.e.fire("createEditor", this);
                return (0, l.callPromise)(e5, () => {
                  if (!this.isInDestruct) {
                    if ((false === e5 || (0, l.isPromise)(e5)) && u2.Dom.safeRemove(t5), m2(this.o.editorClassName, this.editor), this.o.style && (0, l.css)(this.editor, this.o.style), this.e.on("synchro", () => {
                      this.setEditorValue();
                    }).on("focus", () => {
                      this.editorIsActive = true;
                    }).on("blur", () => this.editorIsActive = false), this.__prepareWYSIWYGEditor(), this.o.direction) {
                      const t6 = "rtl" === this.o.direction.toLowerCase() ? "rtl" : "ltr";
                      this.container.style.direction = t6, this.container.setAttribute("dir", t6), this.toolbar.setDirection(t6);
                    }
                    this.o.triggerChangeEvent && this.e.on("change", this.async.debounce(() => {
                      this.e && this.e.fire(this.element, "change");
                    }, this.defaultTimeout));
                  }
                });
              }
              __prepareWYSIWYGEditor() {
                const { editor: t5 } = this;
                if (this.o.direction) {
                  const t6 = "rtl" === this.o.direction.toLowerCase() ? "rtl" : "ltr";
                  this.editor.style.direction = t6, this.editor.setAttribute("dir", t6);
                }
                this.e.on(t5, "mousedown touchstart focus", () => {
                  const e5 = this.__elementToPlace.get(t5);
                  e5 && this.setCurrentPlace(e5);
                }).on(t5, "compositionend", this.synchronizeValues).on(t5, "selectionchange selectionstart keydown keyup input keypress dblclick mousedown mouseup click copy cut dragstart drop dragover paste resize touchstart touchend focus blur", (t6) => {
                  if (!this.o.readonly && !this.__isSilentChange && !(t6 instanceof this.ew.KeyboardEvent && t6.isComposing) && this.e && this.e.fire) {
                    if (false === this.e.fire(t6.type, t6)) return false;
                    this.synchronizeValues();
                  }
                });
              }
              fetch(t5, e5) {
                const i4 = new c.d({ url: t5, ...e5 }, this.o.defaultAjaxOptions), o4 = () => {
                  this.e.off("beforeDestruct", o4), this.progressbar.progress(100).hide(), i4.destruct();
                };
                this.e.one("beforeDestruct", o4), this.progressbar.show().progress(30);
                const n3 = i4.send();
                return n3.finally(o4).catch(() => null), n3;
              }
              destruct() {
                if (this.isInDestruct) return;
                this.setStatus(u2.STATUSES.beforeDestruct), this.__elementToPlace.clear(), this.storage.clear(), this.buffer.clear(), this.commands.clear(), this.__selectionLocked = null, this.e.off(this.ow, "resize"), this.e.off(this.ow), this.e.off(this.od), this.e.off(this.od.body);
                const t5 = this.editor ? this.getEditorValue() : "";
                this.places.forEach(({ container: e5, workplace: i4, statusbar: o4, element: n3, iframe: r3, editor: s2, history: a3 }) => {
                  if (n3) {
                    if (n3 !== e5) if (n3.hasAttribute(p2)) {
                      const t6 = (0, l.attr)(n3, p2);
                      t6 && (n3.style.display = t6, n3.removeAttribute(p2));
                    } else n3.style.display = "";
                    else n3.hasAttribute(f2) && (n3.className = (0, l.attr)(n3, f2) || "", n3.removeAttribute(f2));
                    n3.hasAttribute("style") && !(0, l.attr)(n3, "style") && n3.removeAttribute("style"), o4.destruct(), this.e.off(e5), this.e.off(n3), this.e.off(s2), u2.Dom.safeRemove(i4), u2.Dom.safeRemove(s2), e5 !== n3 && u2.Dom.safeRemove(e5), Object.defineProperty(n3, "component", { enumerable: false, configurable: true, value: null }), u2.Dom.safeRemove(r3), e5 === n3 && (n3.innerHTML = t5), a3.destruct();
                  }
                }), this.places.length = 0, this.currentPlace = {}, delete a2.VF[this.id], super.destruct();
              }
            };
            function m2(t5, e5) {
              t5 && t5.split(/\s+/).forEach((t6) => e5.classList.add(t6));
            }
            g2.fatMode = r2.FAT_MODE, g2.plugins = a2.fg, g2.modules = a2.av, g2.ns = a2.av, g2.decorators = {}, g2.constants = r2, g2.instances = a2.VF, g2.lang = r2.lang, g2.core = { Plugin: u2.Plugin }, (0, n2.Cg)([s.cache], g2.prototype, "createInside", null), (0, n2.Cg)([s.cache], g2.prototype, "message", null), (0, n2.Cg)([s.cache], g2.prototype, "s", null), (0, n2.Cg)([s.cache], g2.prototype, "uploader", null), (0, n2.Cg)([s.cache], g2.prototype, "filebrowser", null), (0, n2.Cg)([(0, s.throttle)()], g2.prototype, "synchronizeValues", null), (0, n2.Cg)([(0, s.watch)(":internalChange")], g2.prototype, "updateElementValue", null), (0, n2.Cg)([s.autobind], g2.prototype, "__prepareWYSIWYGEditor", null), g2 = o3 = (0, n2.Cg)([(0, s.derive)(d2.z)], g2);
          }, 74470: function(t4, e4, i3) {
            var o3 = i3(37923), n2 = i3(57741), r2 = i3(56014), s = i3(95461), a2 = i3(63837), l = i3(39386), c = i3(62327), d2 = i3(25090), u2 = i3(53113), h2 = i3(81321), p2 = i3(4679), f2 = i3(31927), g2 = i3(21195), m2 = i3(53414), b2 = i3(11012), _2 = i3(87061), v2 = i3(3268), x = i3(97834), w = i3(86433), y2 = i3(28359), j = i3(68368), k2 = i3(25182), C2 = i3(44906);
            let S2 = {};
            S2 = { ar: n2, cs_cz: r2, de: s, en: a2, es: l, fi: c, fr: d2, he: u2, hu: h2, id: p2, it: f2, ja: g2, ko: b2, mn: _2, nl: v2, pl: x, pt_br: w, ru: y2, tr: j, zh_cn: k2, zh_tw: C2 };
            const z2 = (t5) => t5 ? t5.default || t5 : {}, T2 = {};
            (0, o3.c)(z2(m2)) && z2(m2).forEach((t5, e5) => {
              T2[e5] = t5;
            }), Object.keys(S2).forEach((t5) => {
              const e5 = z2(S2[t5]);
              (0, o3.c)(e5) ? (S2[t5] = {}, e5.forEach((e6, i4) => {
                S2[t5][T2[i4]] = e6;
              })) : S2[t5] = e5;
            }), e4.A = S2;
          }, 34248: function(t4, e4, i3) {
            i3.d(e4, { t: function() {
              return l;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(37923), s = i3(92032), a2 = i3(80071);
            let l = class extends a2.z {
              className() {
                return "ContextMenu";
              }
              show(t5, e5, i4) {
                const o4 = this;
                o4.clear(), (0, r2.c)(i4) && (i4.forEach((t6) => {
                  if (!t6) return;
                  const e6 = (0, s.$n)(this.jodit, t6.icon || "empty", t6.title);
                  this.jodit && e6.setParentView(this.jodit), e6.setMod("context", "menu"), e6.onAction((e7) => {
                    var i5;
                    return null === (i5 = t6.exec) || void 0 === i5 || i5.call(o4, e7), o4.clear(), o4.close(), false;
                  }), this.append(e6);
                }), this.open(() => ({ left: t5, top: e5, width: 0, height: 0 }), true));
              }
            };
            l = (0, o3.Cg)([n2.s], l);
          }, 5854: function(t4, e4, i3) {
            i3.d(e4, { F: function() {
              return l;
            } });
            var o3 = i3(55186), n2 = i3(82317), r2 = i3(69052), s = i3(92032), a2 = i3(58006);
            function l(t5, e5, i4, l2 = "jodit-dialog_alert") {
              (0, r2.T)(e5) && (i4 = e5, e5 = void 0);
              const c = this instanceof a2.l ? this : new a2.l({ closeOnClickOverlay: true }), d2 = c.c.div(l2), u2 = (0, s.$n)(c, "ok", "Ok");
              return (0, n2._)(t5).forEach((t6) => {
                d2.appendChild(o3.J.isNode(t6) ? t6 : c.c.fromHTML(t6));
              }), u2.onAction(() => {
                i4 && (0, r2.T)(i4) && false === i4(c) || c.close();
              }), c.setFooter([u2]), c.open(d2, e5 || "&nbsp;", true, true), u2.focus(), c;
            }
          }, 23132: function(t4, e4, i3) {
            i3.d(e4, { p: function() {
              return s;
            } });
            var o3 = i3(69052), n2 = i3(92032), r2 = i3(58006);
            function s(t5, e5, i4) {
              const s2 = this instanceof r2.l ? this : new r2.l({ closeOnClickOverlay: true }), a2 = s2.c.fromHTML('<form class="jodit-dialog_prompt"></form>'), l = s2.c.element("label");
              (0, o3.T)(e5) && (i4 = e5, e5 = void 0), l.appendChild(s2.c.fromHTML(t5)), a2.appendChild(l);
              const c = (t6) => () => {
                i4 && false === i4(t6) || s2.close();
              }, d2 = (0, n2.$n)(s2, "cancel", "Cancel"), u2 = (0, n2.$n)(s2, "ok", "Yes");
              return d2.onAction(c(false)), u2.onAction(c(true)), s2.e.on(a2, "submit", () => (c(true)(), false)), s2.setFooter([u2, d2]), s2.open(a2, e5 || "&nbsp;", true, true), u2.focus(), s2;
            }
          }, 58006: function(t4, e4, i3) {
            i3.d(e4, { l: function() {
              return b2;
            } });
            var o3, n2 = i3(31635), r2 = i3(77753), s = i3(17352), a2 = i3(22664), l = i3(55186), c = i3(56298), d2 = i3(32709), u2 = i3(9823), h2 = i3(97369), p2 = (i3(28712), i3(53048)), f2 = i3(77782), g2 = i3(14961), m2 = i3(36115);
            m2.T.prototype.dialog = { namespace: "", extraButtons: [], resizable: true, draggable: true, buttons: ["dialog.close"], removeButtons: [], toolbarButtonSize: "middle", zIndex: "inherit" }, m2.T.prototype.controls.dialog = { close: { icon: "cancel", exec: (t5) => {
              t5.close();
            } } };
            let b2 = o3 = class extends g2.T {
              className() {
                return "Dialog";
              }
              get destination() {
                var t5;
                return null !== (t5 = this.o.shadowRoot) && void 0 !== t5 ? t5 : this.od.body;
              }
              setElements(t5, e5) {
                const i4 = [];
                (0, d2._j)(e5).forEach((e6) => {
                  if ((0, u2.cy)(e6)) {
                    const o5 = this.c.div(this.getFullElName("column"));
                    return i4.push(o5), t5.appendChild(o5), this.setElements(o5, e6);
                  }
                  let o4;
                  o4 = (0, u2.Kg)(e6) ? this.c.fromHTML(e6) : (0, u2.kO)(e6) ? e6.container : e6, i4.push(o4), o4.parentNode !== t5 && t5.appendChild(o4);
                }), (0, d2.$r)(t5.childNodes).forEach((e6) => {
                  -1 === i4.indexOf(e6) && t5.removeChild(e6);
                });
              }
              onMouseUp() {
                (this.draggable || this.resizable) && (this.removeGlobalResizeListeners(), this.draggable = false, this.resizable = false, this.unlockSelect(), this.e && (this.removeGlobalResizeListeners(), this.e.fire(this, "endResize endMove")));
              }
              onHeaderMouseDown(t5) {
                const e5 = t5.target;
                !this.o.draggable || e5 && e5.nodeName.match(/^(INPUT|SELECT)$/) || (this.draggable = true, this.startX = t5.clientX, this.startY = t5.clientY, this.startPoint.x = (0, h2.css)(this.dialog, "left"), this.startPoint.y = (0, h2.css)(this.dialog, "top"), this.setMaxZIndex(), t5.cancelable && t5.preventDefault(), this.lockSelect(), this.addGlobalResizeListeners(), this.e && (this.e.fire(this, "startMove"), this.e.fire("closeAllPopups")));
              }
              onMouseMove(t5) {
                this.draggable && this.o.draggable && (this.setPosition(this.startPoint.x + t5.clientX - this.startX, this.startPoint.y + t5.clientY - this.startY), this.e && this.e.fire(this, "move", t5.clientX - this.startX, t5.clientY - this.startY), t5.stopImmediatePropagation()), this.resizable && this.o.resizable && (this.setSize(this.startPoint.w + t5.clientX - this.startX, this.startPoint.h + t5.clientY - this.startY), this.e && this.e.fire(this, "resizeDialog", t5.clientX - this.startX, t5.clientY - this.startY));
              }
              onEsc(t5) {
                if (this.o.closeOnEsc && this.isOpened && t5.key === s.KEY_ESC && true !== this.getMod("static")) {
                  const e5 = this.getMaxZIndexDialog();
                  e5 ? e5.close() : this.close(), t5.stopImmediatePropagation();
                }
              }
              onResizerMouseDown(t5) {
                this.resizable = true, this.startX = t5.clientX, this.startY = t5.clientY, this.startPoint.w = this.dialog.offsetWidth, this.startPoint.h = this.dialog.offsetHeight, this.lockSelect(), this.addGlobalResizeListeners(), this.e && this.e.fire(this, "startResize");
              }
              addGlobalResizeListeners() {
                const t5 = this;
                t5.e.on(t5.ow, "pointermove touchmove", t5.onMouseMove).on(t5.ow, "pointerup touchend", t5.onMouseUp);
              }
              removeGlobalResizeListeners() {
                const t5 = this;
                t5.e.off(t5.ow, "mousemove pointermove", t5.onMouseMove).off(t5.ow, "mouseup pointerup", t5.onMouseUp);
              }
              setSize(t5, e5) {
                return null == t5 && (t5 = this.dialog.offsetWidth), null == e5 && (e5 = this.dialog.offsetHeight), (0, h2.css)(this.dialog, { width: t5, height: e5 }), this;
              }
              calcAutoSize() {
                return this.setSize("auto", "auto"), this.setSize(), this;
              }
              setPosition(t5, e5) {
                let i4 = this.ow.innerWidth / 2 - this.dialog.offsetWidth / 2, o4 = this.ow.innerHeight / 2 - this.dialog.offsetHeight / 2;
                return 0 > i4 && (i4 = 0), 0 > o4 && (o4 = 0), void 0 !== t5 && void 0 !== e5 && (this.offsetX = t5, this.offsetY = e5, this.moved = Math.abs(t5 - i4) > 100 || Math.abs(e5 - o4) > 100), this.dialog.style.left = (t5 || i4) + "px", this.dialog.style.top = (e5 || o4) + "px", this;
              }
              setHeader(t5) {
                return this.setElements(this.dialogbox_header, t5), this;
              }
              setContent(t5) {
                return this.setElements(this.dialogbox_content, t5), this;
              }
              setFooter(t5) {
                return this.setElements(this.dialogbox_footer, t5), this.setMod("footer", Boolean(t5)), this;
              }
              getZIndex() {
                return parseInt((0, h2.css)(this.container, "zIndex"), 10) || 0;
              }
              getMaxZIndexDialog() {
                let t5, e5, i4 = 0, o4 = this;
                return (0, h2.$$)(".jodit-dialog", this.destination).forEach((n3) => {
                  t5 = n3.component, e5 = parseInt((0, h2.css)(n3, "zIndex"), 10), t5.isOpened && !isNaN(e5) && e5 > i4 && (o4 = t5, i4 = e5);
                }), o4;
              }
              setMaxZIndex() {
                if (this.getMod("static")) return;
                let t5 = 20000004, e5 = 0;
                (0, h2.$$)(".jodit-dialog", this.destination).forEach((i4) => {
                  e5 = parseInt((0, h2.css)(i4, "zIndex"), 10), t5 = Math.max(isNaN(e5) ? 0 : e5, t5);
                }), this.container.style.zIndex = (t5 + 1).toString();
              }
              toggleFullSize(t5) {
                (0, u2.Rd)(t5) && (t5 = !this.getMod("fullsize")), this.setMod("fullsize", t5), super.toggleFullSize(t5);
              }
              open(t5, e5, i4, o4) {
                if (c.RR.fire("closeAllPopups hideHelpers"), false === this.e.fire(this, "beforeOpen")) return this;
                (0, u2.Lm)(t5) && (i4 = t5), (0, u2.Lm)(e5) && (o4 = e5), this.destroyAfterClose = true === i4;
                const n3 = (0, u2.Lm)(t5) ? void 0 : t5, r3 = (0, u2.Lm)(e5) ? void 0 : e5;
                return void 0 !== r3 && this.setHeader(r3), n3 && this.setContent(n3), this.setMod("active", true), this.isOpened = true, this.setModal(o4), this.destination.appendChild(this.container), true !== this.getMod("static") ? (this.setPosition(this.offsetX, this.offsetY), this.setMaxZIndex()) : this.container.style.removeProperty("z-index"), this.o.fullsize && this.toggleFullSize(true), this.e.fire("afterOpen", this), this;
              }
              setModal(t5) {
                return this.isModal = Boolean(t5), this.setMod("modal", this.isModal), this;
              }
              close() {
                if (this.isDestructed || !this.isOpened || true === this.getMod("static")) return this;
                const { e: t5 } = this;
                return false === t5.fire(this, "beforeClose") || false === t5.fire("beforeClose", this) || (this.setMod("active", false), this.isOpened = false, this.isFullSize && this.toggleFullSize(false), l.J.safeRemove(this.container), this.removeGlobalResizeListeners(), t5.fire(this, "afterClose"), t5.fire(this.ow, "joditCloseDialog"), this.destroyAfterClose && this.destruct()), this;
              }
              constructor(t5 = {}) {
                super(t5), this.destroyAfterClose = false, this.moved = false, this.resizable = false, this.draggable = false, this.startX = 0, this.startY = 0, this.startPoint = { x: 0, y: 0, w: 0, h: 0 }, this.lockSelect = () => {
                  this.setMod("moved", true);
                }, this.unlockSelect = () => {
                  this.setMod("moved", false);
                }, this.onResize = () => {
                  this.options && this.o.resizable && !this.moved && this.isOpened && !this.offsetX && !this.offsetY && this.setPosition();
                }, this.isModal = false, this.isOpened = false;
                const e5 = this;
                e5.options = (0, h2.ConfigProto)(t5, (0, h2.ConfigProto)(m2.T.prototype.dialog, o3.defaultOptions)), l.J.safeRemove(e5.container);
                const i4 = this.getFullElName.bind(this);
                e5.container = this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
				<div class="${i4("overlay")}"></div>
				<div class="${this.getFullElName("panel")}">
					<div class="${i4("header")}">
						<div class="${i4("header-title")}"></div>
						<div class="${i4("header-toolbar")}"></div>
					</div>
					<div class="${i4("content")}"></div>
					<div class="${i4("footer")}"></div>
					<div class="${i4("resizer")}">${p2.In.get("resize_handler")}</div>
				</div>
			</div>`), this.o.zIndex && (this.container.style.zIndex = this.o.zIndex.toString()), (0, h2.attr)(e5.container, "role", "dialog"), Object.defineProperty(e5.container, "component", { value: this }), e5.setMod("theme", e5.o.theme || "default").setMod("resizable", Boolean(e5.o.resizable));
                const n3 = e5.getElm("panel"), r3 = e5.getElm("resizer"), s2 = e5.getElm("header-title"), a3 = e5.getElm("content"), d3 = e5.getElm("footer"), f3 = e5.getElm("header-toolbar");
                this.dialog = n3, this.resizer = r3, this.dialogbox_header = s2, this.dialogbox_content = a3, this.dialogbox_footer = d3, this.dialogbox_toolbar = f3, (0, h2.css)(e5.dialog, { maxWidth: e5.options.maxWidth, minHeight: e5.options.minHeight, minWidth: e5.options.minWidth });
                const g3 = e5.getElm("header");
                g3 && e5.e.on(g3, "pointerdown touchstart", e5.onHeaderMouseDown), e5.e.on(e5.resizer, "mousedown touchstart", e5.onResizerMouseDown);
                const b3 = c.fg.get("fullsize");
                if ((0, u2.Tn)(b3) && b3(e5), this.e.on(e5.container, "close_dialog", e5.close).on(this.ow, "keydown", this.onEsc).on(this.ow, "resize", this.onResize), this.o.closeOnClickOverlay) {
                  const t6 = e5.getElm("overlay");
                  this.e.on(t6, "click", e5.close);
                }
              }
              buildToolbar() {
                this.o.buttons && this.toolbar.build((0, d2.uM)(this.o.buttons)).setMod("mode", "header").appendTo(this.dialogbox_toolbar);
              }
              destruct() {
                this.isInDestruct || (this.setStatus(r2.f.beforeDestruct), this.isOpened && this.close(), this.events && (this.removeGlobalResizeListeners(), this.events.off(this.container, "close_dialog", self.close).off(this.ow, "keydown", this.onEsc).off(this.ow, "resize", this.onResize)), super.destruct());
              }
            };
            (0, n2.Cg)([a2.autobind], b2.prototype, "onMouseUp", null), (0, n2.Cg)([a2.autobind], b2.prototype, "onHeaderMouseDown", null), (0, n2.Cg)([a2.autobind], b2.prototype, "onMouseMove", null), (0, n2.Cg)([a2.autobind], b2.prototype, "onEsc", null), (0, n2.Cg)([a2.autobind], b2.prototype, "onResizerMouseDown", null), (0, n2.Cg)([a2.autobind], b2.prototype, "close", null), (0, n2.Cg)([(0, a2.hook)("ready")], b2.prototype, "buildToolbar", null), b2 = o3 = (0, n2.Cg)([a2.component], b2), b2.defaultOptions = { ...f2.S.defaultOptions, closeOnClickOverlay: false, closeOnEsc: true };
          }, 34256: function(t4, e4, i3) {
            i3.d(e4, { Fc: function() {
              return o3.F;
            }, XG: function() {
              return s.X;
            }, lG: function() {
              return r2.l;
            }, pT: function() {
              return n2.p;
            } });
            var o3 = i3(5854), n2 = i3(23132), r2 = i3(58006), s = i3(91560);
          }, 91560: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return a2;
            } });
            var o3 = i3(69052), n2 = i3(26150), r2 = i3(92032), s = i3(58006);
            function a2(t5, e5, i4, a3, l) {
              const c = this instanceof s.l ? this : new s.l({ closeOnClickOverlay: true }), d2 = (0, r2.$n)(c, "cancel", "Cancel"), u2 = (0, r2.$n)(c, "ok", "Ok"), h2 = c.c.element("form", { class: "jodit-dialog_prompt" }), p2 = c.c.element("input", { autofocus: true, class: "jodit-input" }), f2 = c.c.element("label");
              (0, o3.T)(e5) && (i4 = e5, e5 = void 0), a3 && (0, n2.C)(p2, "placeholder", a3), f2.appendChild(c.c.text(t5)), h2.appendChild(f2), h2.appendChild(p2), d2.onAction(c.close);
              const g2 = () => {
                i4 && (0, o3.T)(i4) && false === i4(p2.value) || c.close();
              };
              return u2.onAction(g2), c.e.on(h2, "submit", () => (g2(), false)), c.setFooter([u2, d2]), c.open(h2, e5 || "&nbsp;", true, true), p2.focus(), void 0 !== l && l.length && (p2.value = l, p2.select()), c;
            }
          }, 49931: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(97369), r2 = i3(931), s = i3(77112), a2 = i3(83797), l = i3(97324), c = i3(31859), d2 = i3(62994), u2 = i3(53804);
            const h2 = "jodit-file-browser-preview", p2 = (t5 = "next", e5 = "right") => `<div class="${h2}__navigation ${h2}__navigation_arrow_${t5}">` + r2.I.get("angle-" + e5) + "</a>";
            e4.A = (t5) => {
              if (!t5.o.contextMenu) return () => {
              };
              const e5 = (0, a2.V)(t5);
              return (i4) => {
                const r3 = (0, d2.Gq)(i4.target, t5.container);
                if (!r3) return;
                let a3 = r3;
                const f2 = t5.options, g2 = (t6) => (0, n2.attr)(a3, t6) || "";
                return t5.async.setTimeout(() => {
                  const m2 = (0, d2.PZ)(r3, (0, s.a)(t5));
                  m2 && (t5.state.activeElements = [m2], e5.show(i4.clientX, i4.clientY, [!("1" === g2("data-is-file") || !f2.editImage || !t5.dataProvider.canI("ImageResize") && !t5.dataProvider.canI("ImageCrop")) && { icon: "pencil", title: "Edit", exec: () => u2.B.call(t5, g2("href"), g2("data-name"), g2("data-path"), g2("data-source")) }, !!t5.dataProvider.canI("FileRename") && { icon: "italic", title: "Rename", exec: () => {
                    t5.e.fire("fileRename.filebrowser", g2("data-name"), g2("data-path"), g2("data-source"));
                  } }, !!t5.dataProvider.canI("FileRemove") && { icon: "bin", title: "Delete", exec: async () => {
                    try {
                      await (0, l.W)(t5, g2("data-name"), g2("data-source"));
                    } catch (e6) {
                      return t5.status(e6);
                    }
                    return t5.state.activeElements = [], (0, c.r)(t5).catch(t5.status);
                  } }, !!f2.preview && { icon: "eye", title: "Preview", exec: () => {
                    const e6 = t5.dlg({ buttons: ["fullsize", "dialog.close"] }), i5 = t5.c.div(h2, '<div class="jodit-icon_loader"></div>'), r4 = t5.c.div(h2 + "__box"), s2 = t5.c.fromHTML(p2()), l2 = t5.c.fromHTML(p2("prev", "left")), c2 = (n3) => {
                      const c3 = t5.c.element("img");
                      c3.setAttribute("src", n3);
                      const d3 = () => {
                        var n4;
                        t5.isInDestruct || (t5.e.off(c3, "load"), o3.J.detach(i5), f2.showPreviewNavigation && (o3.J.prevWithClass(a3, t5.files.getFullElName("item")) && i5.appendChild(l2), o3.J.nextWithClass(a3, t5.files.getFullElName("item")) && i5.appendChild(s2)), i5.appendChild(r4), r4.appendChild(c3), e6.setPosition(), null === (n4 = null == t5 ? void 0 : t5.events) || void 0 === n4 || n4.fire("previewOpenedAndLoaded"));
                      };
                      t5.e.on(c3, "load", d3), c3.complete && d3();
                    };
                    t5.e.on([s2, l2], "click", function() {
                      if (a3 = this === s2 ? o3.J.nextWithClass(a3, t5.files.getFullElName("item")) : o3.J.prevWithClass(a3, t5.files.getFullElName("item")), !a3) throw (0, n2.error)("Need element");
                      o3.J.detach(i5), o3.J.detach(r4), i5.innerHTML = '<div class="jodit-icon_loader"></div>', c2(g2("href"));
                    }), t5.e.on("beforeDestruct", () => {
                      e6.destruct();
                    }), e6.container.classList.add(h2 + "__dialog"), e6.setContent(i5), e6.setPosition(), e6.open(), c2(g2("href")), t5.events.on("beforeDestruct", () => {
                      e6.destruct();
                    }).fire("previewOpened");
                  } }, { icon: "upload", title: "Download", exec: () => {
                    const e6 = g2("href");
                    e6 && t5.ow.open(e6);
                  } }]));
                }, t5.defaultTimeout), t5.e.on("beforeClose", () => {
                  e5.close();
                }).on("beforeDestruct", () => e5.destruct()), i4.stopPropagation(), i4.preventDefault(), false;
              };
            };
          }, 77112: function(t4, e4, i3) {
            i3.d(e4, { a: function() {
              return n2;
            } });
            const o3 = /* @__PURE__ */ new WeakMap(), n2 = (t5) => {
              let e5 = o3.get(t5);
              return e5 || (e5 = {}, o3.set(t5, e5)), e5;
            };
          }, 11133: function(t4, e4, i3) {
            i3.d(e4, { u: function() {
              return n2;
            } });
            var o3 = i3(65147);
            class n2 {
              constructor(t5) {
                this.data = t5, Object.keys(t5).forEach((e5) => {
                  this[e5] = t5[e5];
                });
              }
              static create(t5) {
                return t5 instanceof n2 ? t5 : new n2(t5);
              }
              get path() {
                return (0, o3.normalizePath)(this.data.source.path ? this.data.source.path + "/" : "/");
              }
              get imageURL() {
                const t5 = this.time || (/* @__PURE__ */ new Date()).getTime().toString(), { thumbIsAbsolute: e5, source: i4, thumb: n3, file: r2 } = this.data, s = n3 || r2;
                return e5 && s ? s : (0, o3.normalizeUrl)(i4.baseurl, i4.path, s || "") + "?_tmst=" + encodeURIComponent(t5);
              }
              get fileURL() {
                let { name: t5 } = this.data;
                const { file: e5, fileIsAbsolute: i4, source: n3 } = this.data;
                return void 0 !== e5 && (t5 = e5), i4 && t5 ? t5 : (0, o3.normalizeUrl)(n3.baseurl, n3.path, t5 || "");
              }
              get time() {
                const { changed: t5 } = this.data;
                return t5 && ("number" == typeof t5 ? new Date(t5).toLocaleString() : t5) || "";
              }
              get uniqueHashKey() {
                const t5 = this.data;
                let e5 = [t5.sourceName, t5.name, t5.file, this.time, t5.thumb].join("_");
                return e5 = e5.toLowerCase().replace(/[^0-9a-z\-.]/g, "-"), e5;
              }
              toJSON() {
                return this.data;
              }
            }
          }, 70265: function(t4, e4, i3) {
            i3(27337);
            var o3 = i3(9823), n2 = i3(99898), r2 = i3(47964), s = i3(36115);
            s.T.prototype.filebrowser = { namespace: "", cache: true, extraButtons: [], filter: (t5, e5) => (e5 = e5.toLowerCase(), (0, o3.Kg)(t5) ? -1 !== t5.toLowerCase().indexOf(e5) : (0, o3.Kg)(t5.name) ? -1 !== t5.name.toLowerCase().indexOf(e5) : !(0, o3.Kg)(t5.file) || -1 !== t5.file.toLowerCase().indexOf(e5)), sortBy: "changed-desc", sort(t5, e5, i4) {
              const [r3, s2] = i4.toLowerCase().split("-"), a2 = "asc" === s2, l = (t6, e6) => e6 > t6 ? a2 ? -1 : 1 : t6 > e6 ? a2 ? 1 : -1 : 0;
              if ((0, o3.Kg)(t5)) return l(t5.toLowerCase(), e5.toLowerCase());
              if (void 0 === t5[r3] || "name" === r3) return (0, o3.Kg)(t5.name) ? l(t5.name.toLowerCase(), e5.name.toLowerCase()) : (0, o3.Kg)(t5.file) ? l(t5.file.toLowerCase(), e5.file.toLowerCase()) : 0;
              switch (r3) {
                case "changed": {
                  const i5 = new Date(t5.changed).getTime(), o4 = new Date(e5.changed).getTime();
                  return a2 ? i5 - o4 : o4 - i5;
                }
                case "size": {
                  const i5 = (0, n2.z)(t5.size), o4 = (0, n2.z)(e5.size);
                  return a2 ? i5 - o4 : o4 - i5;
                }
              }
              return 0;
            }, editImage: true, preview: true, showPreviewNavigation: true, showSelectButtonInPreview: true, contextMenu: true, howLongShowMsg: 3e3, createNewFolder: true, deleteFolder: true, renameFolder: true, moveFolder: true, moveFile: true, permissionsPresets: { allowFileDownload: void 0, allowFileMove: void 0, allowFileRemove: void 0, allowFileRename: void 0, allowFileUpload: void 0, allowFileUploadRemote: void 0, allowFiles: void 0, allowFolderCreate: void 0, allowFolderMove: void 0, allowFolderRemove: void 0, allowFolderRename: void 0, allowFolderTree: void 0, allowFolders: void 0, allowGeneratePdf: void 0, allowImageCrop: void 0, allowImageResize: void 0 }, showFoldersPanel: true, storeLastOpenedFolder: true, width: 859, height: 400, buttons: ["filebrowser.upload", "filebrowser.remove", "filebrowser.update", "filebrowser.select", "filebrowser.edit", "|", "filebrowser.tiles", "filebrowser.list", "|", "filebrowser.filter", "|", "filebrowser.sort"], removeButtons: [], fullsize: false, showTooltip: true, view: null, isSuccess: (t5) => t5.success, getMessage: (t5) => void 0 !== t5.data.messages && (0, o3.cy)(t5.data.messages) ? t5.data.messages.join(" ") : "", showFileName: true, showFileSize: true, showFileChangeTime: true, saveStateInStorage: { storeLastOpenedFolder: true, storeView: true, storeSortBy: true }, pixelOffsetLoadNewChunk: 200, getThumbTemplate(t5, e5, i4) {
              const o4 = this.options, n3 = this.files.getFullElName("item"), r3 = o4.showFileName, s2 = o4.showFileSize && t5.size, a2 = o4.showFileChangeTime && t5.time;
              let l = "";
              return void 0 !== t5.file && (l = t5.file), `<a
			data-jodit-file-browser-item="true"
			data-is-file="${t5.isImage ? 0 : 1}"
			draggable="true"
			class="${n3}"
			href="${t5.fileURL}"
			data-source="${i4}"
			data-path="${t5.path}"
			data-name="${l}"
			title="${l}"
			data-url="${t5.fileURL}">
				<img
					data-is-file="${t5.isImage ? 0 : 1}"
					data-src="${t5.fileURL}"
					src="${t5.imageURL}"
					alt="${l}"
					loading="lazy"
				/>
				${r3 || s2 || a2 ? `<div class="${n3}-info">${r3 ? `<span class="${n3}-info-filename">${l}</span>` : ""}${s2 ? `<span class="${n3}-info-filesize">${t5.size}</span>` : ""}${a2 ? `<span class="${n3}-info-filechanged">${a2}</span>` : ""}</div>` : ""}
			</a>`;
            }, ajax: { ...s.T.prototype.defaultAjaxOptions, url: "", data: {}, cache: true, contentType: "application/x-www-form-urlencoded; charset=UTF-8", method: "POST", processData: true, headers: {}, prepareData: (t5) => t5, process: (t5) => t5 }, create: { data: { action: "folderCreate" } }, getLocalFileByUrl: { data: { action: "getLocalFileByUrl" } }, resize: { data: { action: "imageResize" } }, crop: { data: { action: "imageCrop" } }, fileMove: { data: { action: "fileMove" } }, folderMove: { data: { action: "folderMove" } }, fileRename: { data: { action: "fileRename" } }, folderRename: { data: { action: "folderRename" } }, fileRemove: { data: { action: "fileRemove" } }, folderRemove: { data: { action: "folderRemove" } }, items: { data: { action: "files" } }, folder: { data: { action: "folders" } }, permissions: { data: { action: "permissions" } } }, s.T.prototype.controls.filebrowser = { upload: { icon: "plus", isInput: true, isDisabled: (t5) => !t5.dataProvider.canI("FileUpload"), getContent: (t5) => {
              const e5 = new r2.n(t5, { onlyImages: t5.state.onlyImages });
              return t5.e.fire("bindUploader.filebrowser", e5.container), e5.container;
            } }, remove: { icon: "bin", isDisabled: (t5) => !t5.state.activeElements.length || !t5.dataProvider.canI("FileRemove"), exec: (t5) => {
              t5.e.fire("fileRemove.filebrowser");
            } }, update: { exec: (t5) => {
              t5.e.fire("update.filebrowser");
            } }, select: { icon: "check", isDisabled: (t5) => !t5.state.activeElements.length, exec: (t5) => {
              t5.e.fire("select.filebrowser");
            } }, edit: { icon: "pencil", isDisabled: (t5) => {
              const e5 = t5.state.activeElements;
              return 1 !== e5.length || !e5[0].isImage || !(t5.dataProvider.canI("ImageCrop") || t5.dataProvider.canI("ImageResize"));
            }, exec: (t5) => {
              t5.e.fire("edit.filebrowser");
            } }, tiles: { icon: "th", isActive: (t5) => "tiles" === t5.state.view, exec: (t5) => {
              t5.e.fire("view.filebrowser", "tiles");
            } }, list: { icon: "th-list", isActive: (t5) => "list" === t5.state.view, exec: (t5) => {
              t5.e.fire("view.filebrowser", "list");
            } }, filter: { isInput: true, getContent: (t5, e5) => {
              const i4 = e5.container.querySelector(".jodit-input");
              if (i4) return i4;
              const o4 = t5.c.element("input", { class: "jodit-input", placeholder: t5.i18n("Filter") });
              return o4.value = t5.state.filterWord, t5.e.on(o4, "keydown mousedown", t5.async.debounce(() => {
                t5.e.fire("filter.filebrowser", o4.value);
              }, t5.defaultTimeout)), o4;
            } }, sort: { isInput: true, getContent: (t5) => {
              const e5 = t5.c.fromHTML(`<select class="jodit-input jodit-select"><option value="changed-asc">${t5.i18n("Sort by changed")} (⬆)</option><option value="changed-desc">${t5.i18n("Sort by changed")} (⬇)</option><option value="name-asc">${t5.i18n("Sort by name")} (⬆)</option><option value="name-desc">${t5.i18n("Sort by name")} (⬇)</option><option value="size-asc">${t5.i18n("Sort by size")} (⬆)</option><option value="size-desc">${t5.i18n("Sort by size")} (⬇)</option></select>`);
              return e5.value = t5.state.sortBy, t5.e.on("sort.filebrowser", (t6) => {
                e5.value !== t6 && (e5.value = t6);
              }).on(e5, "change", () => {
                t5.e.fire("sort.filebrowser", e5.value);
              }), e5;
            } } };
          }, 75889: function(t4, e4, i3) {
            i3.d(e4, { o: function() {
              return c;
            } });
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(65147), a2 = i3(53883), l = i3(11133);
            const c = "default", d2 = /* @__PURE__ */ new Set(["allowFiles", "allowFileMove", "allowFileUpload", "allowFileUploadRemote", "allowFileRemove", "allowFileRename", "allowFolders", "allowFolderMove", "allowFolderCreate", "allowFolderRemove", "allowFolderRename", "allowImageResize", "allowImageCrop"]);
            let u2 = class {
              constructor(t5, e5) {
                this.parent = t5, this.options = e5, this.__currentPermissions = null, this.__ajaxInstances = /* @__PURE__ */ new Map(), this.progressHandler = (t6) => {
                };
              }
              get o() {
                return this.options;
              }
              get(t5) {
                const e5 = this.__ajaxInstances;
                if (e5.has(t5)) {
                  const i5 = e5.get(t5);
                  null == i5 || i5.abort(), e5.delete(t5);
                }
                const i4 = (0, s.ConfigProto)(void 0 !== this.options[t5] ? this.options[t5] : {}, (0, s.ConfigProto)({ onProgress: this.progressHandler }, this.o.ajax));
                i4.prepareData && (i4.data = i4.prepareData.call(this, i4.data));
                const o4 = new a2.d(i4);
                e5.set(t5, o4);
                const n3 = o4.send();
                return n3.finally(() => {
                  o4.destruct(), e5.delete(t5), this.progressHandler(100);
                }).catch(() => null), n3.then((t6) => t6.json()).then((t6) => {
                  if (t6 && !this.isSuccess(t6)) throw new Error(this.getMessage(t6));
                  return t6;
                });
              }
              onProgress(t5) {
                this.progressHandler = t5;
              }
              async permissions(t5, e5) {
                return this.o.permissions ? (this.o.permissions.data.path = t5, this.o.permissions.data.source = e5, this.o.permissions.url ? this.get("permissions").then((t6) => {
                  if (this.parent.isInDestruct) throw (0, s.abort)();
                  let e6 = this.o.permissions.process;
                  if (e6 || (e6 = this.o.ajax.process), e6) {
                    const i4 = e6.call(self, t6);
                    i4.data.permissions && (this.parent.events.fire(this, "changePermissions", this.__currentPermissions, i4.data.permissions), this.__currentPermissions = i4.data.permissions);
                  }
                  return this.__currentPermissions;
                }) : null) : null;
              }
              canI(t5) {
                const e5 = "allow" + t5;
                if (!n2.IS_PROD && !d2.has(e5)) throw (0, s.error)("Wrong action " + t5);
                const i4 = this.o.permissionsPresets[e5];
                return void 0 !== i4 ? i4 : null == this.__currentPermissions || void 0 === this.__currentPermissions[e5] || this.__currentPermissions[e5];
              }
              __items(t5, e5, i4, o4) {
                const n3 = this.options;
                return n3.items ? (n3.items.data.path = t5, n3.items.data.source = e5, n3.items.data.mods = i4, this.get("items").then((t6) => {
                  let e6 = this.o.items.process;
                  return e6 || (e6 = this.o.ajax.process), e6 && (t6 = e6.call(self, t6)), o4(t6);
                })) : Promise.reject(Error("Set Items api options"));
              }
              items(t5, e5, i4 = {}) {
                return this.__items(t5, e5, i4, (t6) => this.generateItemsList(t6.data.sources, i4));
              }
              itemsEx(t5, e5, i4 = {}) {
                return this.__items(t5, e5, i4, (t6) => {
                  return { items: this.generateItemsList(t6.data.sources, i4), loadedTotal: (e6 = t6.data.sources, e6.reduce((t7, e7) => t7 + e7.files.length, 0)) };
                  var e6;
                });
              }
              generateItemsList(t5, e5 = {}) {
                const i4 = [], o4 = (t6) => {
                  var i5;
                  return !(null === (i5 = e5.filterWord) || void 0 === i5 ? void 0 : i5.length) || void 0 === this.o.filter || this.o.filter(t6, e5.filterWord);
                };
                return t5.forEach((t6) => {
                  if (t6.files && t6.files.length) {
                    const { sort: n3 } = this.o;
                    (0, s.isFunction)(n3) && e5.sortBy && t6.files.sort((t7, i5) => n3(t7, i5, e5.sortBy)), t6.files.forEach((n4) => {
                      o4(n4) && ((t7) => "folder" === t7.type || !e5.onlyImages || void 0 === t7.isImage || t7.isImage)(n4) && i4.push(l.u.create({ ...n4, sourceName: t6.name, source: t6 }));
                    });
                  }
                }), i4;
              }
              async tree(t5, e5) {
                return t5 = (0, s.normalizeRelativePath)(t5), this.o.folder ? (await this.permissions(t5, e5), this.o.folder.data.path = t5, this.o.folder.data.source = e5, this.get("folder").then((t6) => {
                  let e6 = this.o.folder.process;
                  return e6 || (e6 = this.o.ajax.process), e6 && (t6 = e6.call(self, t6)), t6.data.sources;
                })) : Promise.reject(Error("Set Folder Api options"));
              }
              getPathByUrl(t5) {
                return (0, s.set)("options.getLocalFileByUrl.data.url", t5, this), this.get("getLocalFileByUrl").then((t6) => {
                  if (this.isSuccess(t6)) return t6.data;
                  throw (0, s.error)(this.getMessage(t6));
                });
              }
              createFolder(t5, e5, i4) {
                const { create: o4 } = this.o;
                if (!o4) throw (0, s.error)("Set Create api options");
                return o4.data.source = i4, o4.data.path = e5, o4.data.name = t5, this.get("create").then((t6) => {
                  if (this.isSuccess(t6)) return true;
                  throw (0, s.error)(this.getMessage(t6));
                });
              }
              move(t5, e5, i4, o4) {
                const n3 = o4 ? "fileMove" : "folderMove", r3 = this.options[n3];
                if (!r3) throw (0, s.error)("Set Move api options");
                return r3.data.from = t5, r3.data.path = e5, r3.data.source = i4, this.get(n3).then((t6) => {
                  if (this.isSuccess(t6)) return true;
                  throw (0, s.error)(this.getMessage(t6));
                });
              }
              remove(t5, e5, i4, o4) {
                const n3 = this.o[t5];
                if (!n3) throw (0, s.error)(`Set "${t5}" api options`);
                return n3.data.path = e5, n3.data.name = i4, n3.data.source = o4, this.get(t5).then((t6) => (n3.process && (t6 = n3.process.call(this, t6)), this.getMessage(t6)));
              }
              fileRemove(t5, e5, i4) {
                return this.remove("fileRemove", t5, e5, i4);
              }
              folderRemove(t5, e5, i4) {
                return this.remove("folderRemove", t5, e5, i4);
              }
              rename(t5, e5, i4, o4, n3) {
                const r3 = this.o[t5];
                if (!r3) throw (0, s.error)(`Set "${t5}" api options`);
                return r3.data.path = e5, r3.data.name = i4, r3.data.newname = o4, r3.data.source = n3, this.get(t5).then((t6) => (r3.process && (t6 = r3.process.call(self, t6)), this.getMessage(t6)));
              }
              folderRename(t5, e5, i4, o4) {
                return this.rename("folderRename", t5, e5, i4, o4);
              }
              fileRename(t5, e5, i4, o4) {
                return this.rename("fileRename", t5, e5, i4, o4);
              }
              changeImage(t5, e5, i4, o4, n3, r3) {
                this.o[t5] || (this.o[t5] = { data: {} });
                const s2 = this.o[t5];
                return void 0 === s2.data && (s2.data = { action: t5 }), s2.data.newname = n3 || o4, r3 && (s2.data.box = r3), s2.data.path = e5, s2.data.name = o4, s2.data.source = i4, this.get(t5).then(() => true);
              }
              crop(t5, e5, i4, o4, n3) {
                return this.changeImage("crop", t5, e5, i4, o4, n3);
              }
              resize(t5, e5, i4, o4, n3) {
                return this.changeImage("resize", t5, e5, i4, o4, n3);
              }
              getMessage(t5) {
                return this.options.getMessage(t5);
              }
              isSuccess(t5) {
                return this.options.isSuccess(t5);
              }
              destruct() {
                this.__ajaxInstances.forEach((t5) => t5.destruct()), this.__ajaxInstances.clear();
              }
            };
            u2 = (0, o3.Cg)([r2.autobind], u2), e4.A = u2;
          }, 83797: function(t4, e4, i3) {
            i3.d(e4, { S: function() {
              return r2;
            }, V: function() {
              return s;
            } });
            var o3 = i3(34248), n2 = i3(75889);
            function r2(t5, e5) {
              return new n2.A(t5, e5);
            }
            function s(t5) {
              return new o3.t(t5);
            }
          }, 97324: function(t4, e4, i3) {
            function o3(t5, e5, i4) {
              return t5.dataProvider.fileRemove(t5.state.currentPath, e5, i4).then((i5) => {
                t5.status(i5 || t5.i18n('File "%s" was deleted', e5), true);
              }).catch(t5.status);
            }
            i3.d(e4, { W: function() {
              return o3;
            } });
          }, 9979: function(t4, e4, i3) {
            function o3(t5) {
              return t5.files.setMod("active", true), t5.files.setMod("loading", true), t5.dataProvider.items(t5.state.currentPath, t5.state.currentSource, { sortBy: t5.state.sortBy, onlyImages: t5.state.onlyImages, filterWord: t5.state.filterWord }).then((e5) => {
                e5 && (t5.state.elements = e5, t5.state.activeElements = []);
              }).catch(t5.status).finally(() => t5.files.setMod("loading", false));
            }
            i3.d(e4, { f: function() {
              return o3;
            } });
          }, 31859: function(t4, e4, i3) {
            i3.d(e4, { r: function() {
              return r2;
            } });
            var o3 = i3(71842), n2 = i3(9979);
            async function r2(t5) {
              t5.tree.setMod("active", true), o3.J.detach(t5.tree.container);
              const e5 = (0, n2.f)(t5);
              if (t5.o.showFoldersPanel) {
                t5.tree.setMod("loading", true);
                const i4 = t5.dataProvider.tree(t5.state.currentPath, t5.state.currentSource).then((e6) => {
                  t5.state.sources = e6;
                }).catch(t5.status).finally(() => t5.tree.setMod("loading", false));
                return Promise.all([i4, e5]);
              }
              return t5.tree.setMod("active", false), e5;
            }
          }, 140: function(t4, e4, i3) {
            i3.d(e4, { V: function() {
              return y2;
            } });
            var o3 = i3(31635), n2 = i3(77753), r2 = i3(17352), s = i3(22664), a2 = i3(66927), l = i3(50025), c = i3(65147), d2 = i3(63915), u2 = i3(58597), h2 = i3(14961), p2 = (i3(70265), i3(9979)), f2 = i3(31859), g2 = i3(62994), m2 = i3(18043), b2 = i3(80004), _2 = i3(75889), v2 = i3(83797), x = i3(10274), w = i3(36115);
            let y2 = class extends h2.T {
              className() {
                return "FileBrowser";
              }
              get dataProvider() {
                return (0, v2.S)(this, this.options);
              }
              onSelect(t5) {
                return () => {
                  if (this.state.activeElements.length) {
                    const e5 = [], i4 = [];
                    this.state.activeElements.forEach((t6) => {
                      const o5 = t6.fileURL;
                      o5 && (e5.push(o5), i4.push(t6.isImage || false));
                    }), this.close();
                    const o4 = { baseurl: "", files: e5, isImages: i4 };
                    (0, c.isFunction)(t5) && t5(o4), this.close();
                  }
                  return false;
                };
              }
              get _dialog() {
                var t5;
                const e5 = this.dlg({ minWidth: Math.min(700, screen.width), minHeight: 300, buttons: null !== (t5 = this.o.headerButtons) && void 0 !== t5 ? t5 : ["fullsize", "dialog.close"] });
                return ["beforeClose", "afterClose", "beforeOpen"].forEach((t6) => e5.events.on(e5, t6, () => this.e.fire(t6))), e5.setSize(this.o.width, this.o.height), e5;
              }
              get storage() {
                return d2.wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
              }
              get isOpened() {
                return this._dialog.isOpened && "none" !== this.browser.style.display;
              }
              status(t5, e5) {
                t5 && !(0, c.isAbortError)(t5) && ((0, c.isString)(t5) || (t5 = t5.message), (0, c.isString)(t5) && (0, c.trim)(t5).length && this.message.message(t5, e5 ? "success" : "error", this.o.howLongShowMsg));
              }
              open(t5 = this.o.defaultCallback, e5 = false) {
                return this.state.onlyImages = e5, this.async.promise((e6, i4) => {
                  var o4;
                  if (!this.o.items || !this.o.items.url) throw (0, c.error)("Need set options.filebrowser.ajax.url");
                  let n3 = 0;
                  this.e.off(this.files.container, "dblclick").on(this.files.container, "dblclick", this.onSelect(t5)).on(this.files.container, "touchstart", () => {
                    const e7 = (/* @__PURE__ */ new Date()).getTime();
                    r2.EMULATE_DBLCLICK_TIMEOUT > e7 - n3 && this.onSelect(t5)(), n3 = e7;
                  }).off("select.filebrowser").on("select.filebrowser", this.onSelect(t5));
                  const s2 = this.c.div();
                  null === (o4 = this.toolbar) || void 0 === o4 || o4.appendTo(s2), this.__updateToolbarButtons(), this._dialog.open(this.browser, s2), this.e.fire("sort.filebrowser", this.state.sortBy), (0, f2.r)(this).then(e6, i4).finally(() => {
                    var t6;
                    this.isInDestruct || null === (t6 = null == this ? void 0 : this.e) || void 0 === t6 || t6.fire("fileBrowserReady.filebrowser");
                  });
                }).catch((t6) => {
                  if (!(0, c.isAbortError)(t6) && !r2.IS_PROD) throw t6;
                });
              }
              __getButtons() {
                var t5;
                return (null !== (t5 = this.o.buttons) && void 0 !== t5 ? t5 : []).filter((t6) => {
                  if (!(0, c.isString)(t6)) return true;
                  switch (t6) {
                    case "filebrowser.upload":
                      return this.dataProvider.canI("FileUpload");
                    case "filebrowser.edit":
                      return this.dataProvider.canI("ImageResize") || this.dataProvider.canI("ImageCrop");
                    case "filebrowser.remove":
                      return this.dataProvider.canI("FileRemove");
                  }
                  return true;
                });
              }
              initUploader(t5) {
                var e5;
                const i4 = this, o4 = null === (e5 = null == t5 ? void 0 : t5.options) || void 0 === e5 ? void 0 : e5.uploader, n3 = (0, c.ConfigProto)(o4 || {}, w.T.defaultOptions.uploader), r3 = () => (0, p2.f)(this);
                i4.uploader = i4.getInstance("Uploader", n3), i4.uploader.setPath(i4.state.currentPath).setSource(i4.state.currentSource).bind(i4.browser, r3, i4.errorHandler), this.state.on(["change.currentPath", "change.currentSource"], () => {
                  this.uploader.setPath(this.state.currentPath).setSource(this.state.currentSource);
                }), i4.e.on("bindUploader.filebrowser", (t6) => {
                  i4.uploader.bind(t6, r3, i4.errorHandler);
                });
              }
              constructor(t5) {
                super(t5), this.browser = this.c.div(this.componentName), this.status_line = this.c.div(this.getFullElName("status")), this.tree = new x.V(this), this.files = new x.Q(this), this.state = (0, l.sH)({ currentPath: "", currentSource: _2.o, currentBaseUrl: "", activeElements: [], elements: [], sources: [], view: "tiles", sortBy: "changed-desc", filterWord: "", onlyImages: false }), this.errorHandler = (t6) => {
                  (0, c.isAbortError)(t6) || (t6 instanceof Error ? this.status(this.i18n(t6.message)) : this.status(this.dataProvider.getMessage(t6)));
                }, this.close = () => {
                  this._dialog.close();
                }, this.__prevButtons = [], this.attachEvents(t5);
                const e5 = this;
                e5.options = (0, c.ConfigProto)(t5 || {}, w.T.defaultOptions.filebrowser), e5.browser.component = this, e5.container = e5.browser, e5.o.showFoldersPanel && e5.browser.appendChild(e5.tree.container), e5.browser.appendChild(e5.files.container), e5.browser.appendChild(e5.status_line), m2.c.call(e5), g2.nW.call(e5), b2.r.call(e5), ["getLocalFileByUrl", "crop", "resize", "create", "fileMove", "folderMove", "fileRename", "folderRename", "fileRemove", "folderRemove", "folder", "items", "permissions"].forEach((t6) => {
                  null != this.options[t6] && (this.options[t6] = (0, c.ConfigProto)(this.options[t6], this.o.ajax));
                });
                const { storeView: i4, storeSortBy: o4, storeLastOpenedFolder: r3 } = this.o.saveStateInStorage || { storeLastOpenedFolder: false, storeView: false, storeSortBy: false }, s2 = i4 && this.storage.get("view");
                e5.state.view = s2 && null == this.o.view ? "list" === s2 ? "list" : "tiles" : "list" === e5.o.view ? "list" : "tiles", e5.files.setMod("view", e5.state.view);
                const a3 = o4 && e5.storage.get("sortBy");
                if (a3) {
                  const t6 = a3.split("-");
                  e5.state.sortBy = ["changed", "name", "size"].includes(t6[0]) ? a3 : "changed-desc";
                } else e5.state.sortBy = e5.o.sortBy || "changed-desc";
                if (r3) {
                  const t6 = e5.storage.get("currentPath"), i5 = e5.storage.get("currentSource");
                  e5.state.currentPath = null != t6 ? t6 : "", e5.state.currentSource = null != i5 ? i5 : "";
                }
                e5.initUploader(e5), e5.setStatus(n2.f.ready);
              }
              destruct() {
                this.isInDestruct || (super.destruct(), this._dialog.destruct(), this.events && this.e.off(".filebrowser"), this.uploader && this.uploader.destruct());
              }
              __updateToolbarButtons() {
                var t5;
                const e5 = this.__getButtons();
                (function(t6, e6) {
                  if (t6.length !== e6.length) return false;
                  for (let i4 = 0; t6.length > i4; i4++) if (t6[i4] !== e6[i4]) return false;
                  return true;
                })(this.__prevButtons, e5) || (this.__prevButtons = e5, null === (t5 = this.toolbar) || void 0 === t5 || t5.build(e5));
              }
            };
            (0, o3.Cg)([s.cache], y2.prototype, "dataProvider", null), (0, o3.Cg)([s.cache], y2.prototype, "_dialog", null), (0, o3.Cg)([s.cache], y2.prototype, "storage", null), (0, o3.Cg)([s.autobind], y2.prototype, "status", null), (0, o3.Cg)([s.autobind], y2.prototype, "open", null), (0, o3.Cg)([(0, a2.w)("dataProvider:changePermissions")], y2.prototype, "__updateToolbarButtons", null), y2 = (0, o3.Cg)([(0, s.derive)(u2.z)], y2);
          }, 19627: function(t4, e4, i3) {
            i3.d(e4, { V: function() {
              return o3.V;
            } });
            var o3 = i3(140);
          }, 62994: function(t4, e4, i3) {
            i3.d(e4, { Gq: function() {
              return l;
            }, PZ: function() {
              return c;
            }, nW: function() {
              return d2;
            } });
            var o3 = i3(71842), n2 = i3(65147), r2 = i3(49931), s = i3(77112), a2 = i3(31859);
            const l = (t5, e5, i4 = "a") => o3.J.closest(t5, (t6) => o3.J.isTag(t6, i4), e5), c = (t5, e5) => {
              const { key: i4 } = t5.dataset, { item: o4 } = e5[i4 || ""];
              return o4;
            };
            function d2() {
              let t5 = false;
              const e5 = (0, s.a)(this), i4 = this;
              i4.e.on(i4.tree.container, "dragstart", (e6) => {
                const o4 = l(e6.target, i4.container);
                o4 && i4.o.moveFolder && (t5 = o4);
              }).on(i4.tree.container, "drop", (e6) => {
                if ((i4.o.moveFile || i4.o.moveFolder) && t5) {
                  let o4 = (0, n2.attr)(t5, "-path") || "";
                  if (!i4.o.moveFolder && t5.classList.contains(this.tree.getFullElName("item"))) return false;
                  if (t5.classList.contains(this.files.getFullElName("item")) && (o4 += (0, n2.attr)(t5, "-name"), !i4.o.moveFile)) return false;
                  const r3 = l(e6.target, i4.container);
                  if (!r3) return;
                  i4.dataProvider.move(o4, (0, n2.attr)(r3, "-path") || "", (0, n2.attr)(r3, "-source") || "", t5.classList.contains(this.files.getFullElName("item"))).then(() => (0, a2.r)(this)).catch(i4.status), t5 = false;
                }
              }).on(i4.files.container, "contextmenu", (0, r2.A)(i4)).on(i4.files.container, "click", (t6) => {
                (0, n2.ctrlKey)(t6) || (this.state.activeElements = []);
              }).on(i4.files.container, "click", (t6) => {
                const o4 = l(t6.target, i4.container);
                if (!o4) return;
                const r3 = c(o4, e5);
                return r3 ? (i4.state.activeElements = (0, n2.ctrlKey)(t6) ? [...i4.state.activeElements, r3] : [r3], t6.stopPropagation(), false) : void 0;
              }).on(i4.files.container, "dragstart", (e6) => {
                if (i4.o.moveFile) {
                  const o4 = l(e6.target, i4.container);
                  if (!o4) return;
                  t5 = o4;
                }
              }).on(i4.container, "drop", (t6) => t6.preventDefault());
            }
          }, 18043: function(t4, e4, i3) {
            i3.d(e4, { c: function() {
              return d2;
            } });
            var o3 = i3(65147), n2 = i3(9823), r2 = i3(75889), s = i3(97324), a2 = i3(9979), l = i3(31859), c = i3(53804);
            function d2() {
              const t5 = this.state, e5 = this.dataProvider, i4 = this;
              i4.e.on("view.filebrowser", (e6) => {
                e6 !== t5.view && (t5.view = e6);
              }).on("sort.filebrowser", (e6) => {
                e6 !== t5.sortBy && (t5.sortBy = e6, (0, a2.f)(i4));
              }).on("filter.filebrowser", (e6) => {
                e6 !== t5.filterWord && (t5.filterWord = e6, (0, a2.f)(i4));
              }).on("openFolder.filebrowser", (t6) => {
                let e6;
                e6 = ".." === t6.name ? t6.path.split("/").filter((t7) => t7.length).slice(0, -1).join("/") : (0, o3.normalizePath)(t6.path, t6.name), i4.state.currentPath = e6, i4.state.currentSource = "." === t6.name ? r2.o : t6.source;
              }).on("removeFolder.filebrowser", (t6) => {
                i4.confirm("Are you sure?", "Delete", (o4) => {
                  o4 && e5.folderRemove(t6.path, t6.name, t6.source).then((t7) => (i4.status(t7, true), (0, l.r)(i4))).catch(i4.status);
                });
              }).on("renameFolder.filebrowser", (t6) => {
                i4.prompt("Enter new name", "Rename", (o4) => {
                  if (!(0, n2.uV)(o4)) return i4.status(i4.i18n("Enter new name")), false;
                  e5.folderRename(t6.path, t6.name, o4, t6.source).then((t7) => (i4.state.activeElements = [], i4.status(t7, true), (0, l.r)(i4))).catch(i4.status);
                }, "type name", t6.name);
              }).on("addFolder.filebrowser", (t6) => {
                i4.prompt("Enter Directory name", "Create directory", (o4) => {
                  e5.createFolder(o4, t6.path, t6.source).then(() => (0, l.r)(i4)).catch(i4.status);
                }, "type name");
              }).on("fileRemove.filebrowser", () => {
                i4.state.activeElements.length && i4.confirm("Are you sure?", "", (t6) => {
                  if (t6) {
                    const t7 = [];
                    i4.state.activeElements.forEach((e6) => {
                      t7.push((0, s.W)(i4, e6.file || e6.name || "", e6.sourceName));
                    }), i4.state.activeElements = [], Promise.all(t7).then(() => (0, l.r)(i4).catch(i4.status), i4.status);
                  }
                });
              }).on("edit.filebrowser", () => {
                if (1 === i4.state.activeElements.length) {
                  const [t6] = this.state.activeElements;
                  c.B.call(i4, t6.fileURL, t6.file || "", t6.path, t6.sourceName);
                }
              }).on("fileRename.filebrowser", (t6, o4, r3) => {
                1 === i4.state.activeElements.length && i4.prompt("Enter new name", "Rename", (s2) => {
                  if (!(0, n2.uV)(s2)) return i4.status(i4.i18n("Enter new name")), false;
                  e5.fileRename(o4, t6, s2, r3).then((t7) => {
                    i4.state.activeElements = [], i4.status(t7, true), (0, a2.f)(i4);
                  }).catch(i4.status);
                }, "type name", t6);
              }).on("update.filebrowser", () => {
                (0, l.r)(this).then(this.status, this.status);
              });
            }
          }, 80004: function(t4, e4, i3) {
            i3.d(e4, { r: function() {
              return c;
            } });
            var o3 = i3(71842), n2 = i3(65499), r2 = i3(92032), s = i3(77112), a2 = i3(31859);
            const l = "default";
            function c() {
              const t5 = (0, s.a)(this), { state: e5, files: i4, create: c2, options: d2 } = this, u2 = (e6) => {
                const i5 = e6.uniqueHashKey;
                if (t5[i5]) return t5[i5].elm;
                const o4 = c2.fromHTML(d2.getThumbTemplate.call(this, e6, e6.source, e6.sourceName.toString()));
                return o4.dataset.key = i5, t5[i5] = { item: e6, elm: o4 }, t5[i5].elm;
              };
              e5.on(["change.currentPath", "change.currentSource"], this.async.debounce(() => {
                this.o.saveStateInStorage && this.o.saveStateInStorage.storeLastOpenedFolder && this.storage.set("currentPath", this.state.currentPath).set("currentSource", this.state.currentSource), (0, a2.r)(this).catch(this.status);
              }, this.defaultTimeout)).on("beforeChange.activeElements", () => {
                e5.activeElements.forEach((e6) => {
                  const o4 = e6.uniqueHashKey, { elm: n3 } = t5[o4];
                  n3 && n3.classList.remove(i4.getFullElName("item", "active", true));
                });
              }).on("change.activeElements", () => {
                this.e.fire("changeSelection"), e5.activeElements.forEach((e6) => {
                  const o4 = e6.uniqueHashKey, { elm: n3 } = t5[o4];
                  n3 && n3.classList.add(i4.getFullElName("item", "active", true));
                });
              }).on("change.view", () => {
                i4.setMod("view", e5.view), this.o.saveStateInStorage && this.o.saveStateInStorage.storeView && this.storage.set("view", e5.view);
              }).on("change.sortBy", () => {
                this.o.saveStateInStorage && this.o.saveStateInStorage.storeSortBy && this.storage.set("sortBy", e5.sortBy);
              }).on("change.elements", this.async.debounce(() => {
                o3.J.detach(i4.container), e5.elements.length ? e5.elements.forEach((t6) => {
                  this.files.container.appendChild(u2(t6));
                }) : i4.container.appendChild(c2.div(this.componentName + "_no-files_true", this.i18n("There are no files")));
              }, this.defaultTimeout)).on("change.sources", this.async.debounce(() => {
                o3.J.detach(this.tree.container), e5.sources.forEach((t6) => {
                  const e6 = t6.name;
                  if (e6 && e6 !== l && this.tree.container.appendChild(c2.div(this.tree.getFullElName("source-title"), e6)), t6.folders.forEach((i5) => {
                    const o4 = c2.a(this.tree.getFullElName("item"), { draggable: "draggable", href: "#", "data-path": (0, n2.Fd)(t6.path, i5 + "/"), "data-name": i5, "data-source": e6, "data-source-path": t6.path }, c2.span(this.tree.getFullElName("item-title"), i5)), s2 = (o5) => (r3) => {
                      this.e.fire(`${o5}.filebrowser`, { name: i5, path: (0, n2.Fd)(t6.path + "/"), source: e6 }), r3.stopPropagation(), r3.preventDefault();
                    };
                    if (this.e.on(o4, "click", s2("openFolder")), this.tree.container.appendChild(o4), ".." !== i5 && "." !== i5) {
                      if (d2.renameFolder && this.dataProvider.canI("FolderRename")) {
                        const t7 = (0, r2.$n)(this, { icon: { name: "pencil" }, name: "rename", tooltip: "Rename", size: "tiny" });
                        t7.onAction(s2("renameFolder")), o4.appendChild(t7.container);
                      }
                      if (d2.deleteFolder && this.dataProvider.canI("FolderRemove")) {
                        const t7 = (0, r2.$n)(this, { icon: { name: "cancel" }, name: "remove", tooltip: "Delete", size: "tiny" });
                        t7.onAction(s2("removeFolder")), o4.appendChild(t7.container);
                      }
                    }
                  }), d2.createNewFolder && this.dataProvider.canI("FolderCreate")) {
                    const i5 = (0, r2.$n)(this, "plus", "Add folder", "secondary");
                    i5.onAction(() => {
                      this.e.fire("addFolder", { path: (0, n2.Fd)(t6.path + "/"), source: e6 });
                    }), this.tree.append(i5);
                  }
                });
              }, this.defaultTimeout));
            }
          }, 96025: function(t4, e4, i3) {
            i3.d(e4, { Q: function() {
              return n2;
            } });
            var o3 = i3(53048);
            class n2 extends o3.Ue {
              className() {
                return "FileBrowserFiles";
              }
            }
          }, 10274: function(t4, e4, i3) {
            i3.d(e4, { Q: function() {
              return o3.Q;
            }, V: function() {
              return n2.V;
            } });
            var o3 = i3(96025), n2 = i3(73307);
          }, 73307: function(t4, e4, i3) {
            i3.d(e4, { V: function() {
              return n2;
            } });
            var o3 = i3(53048);
            class n2 extends o3.Ue {
              className() {
                return "FileBrowserTree";
              }
            }
          }, 84345: function(t4, e4, i3) {
            i3.d(e4, { u: function() {
              return o3;
            } });
            class o3 {
              undo() {
                this.history.snapshot.restore(this.oldValue);
              }
              redo() {
                this.history.snapshot.restore(this.newValue);
              }
              constructor(t5, e5, i4, o4) {
                this.oldValue = t5, this.newValue = e5, this.history = i4, this.tick = o4;
              }
            }
          }, 69996: function(t4, e4, i3) {
            i3.d(e4, { B: function() {
              return c;
            } });
            var o3 = i3(31635), n2 = i3(77753), r2 = i3(22664), s = i3(84345), a2 = i3(58770), l = i3(66180);
            i3(36115).T.prototype.history = { enable: true, maxHistoryLength: 1 / 0, timeout: 1e3 };
            class c extends n2.vG {
              className() {
                return "History";
              }
              redo() {
                this.__stack.redo() && (this.startValue = this.snapshot.make(), this.fireChangeStack());
              }
              canRedo() {
                return this.__stack.canRedo();
              }
              undo() {
                this.__stack.undo() && (this.startValue = this.snapshot.make(), this.fireChangeStack());
              }
              canUndo() {
                return this.__stack.canUndo();
              }
              clear() {
                this.startValue = this.snapshot.make(), this.__stack.clear(), this.fireChangeStack();
              }
              get length() {
                return this.__stack.length;
              }
              get startValue() {
                return this.__startValue;
              }
              set startValue(t5) {
                this.__startValue = t5;
              }
              constructor(t5, e5 = new l.B(t5.o.history.maxHistoryLength), i4 = new a2.F(t5)) {
                super(t5), this.updateTick = 0, this.__stack = e5, this.snapshot = i4, t5.o.history.enable && t5.e.on("afterAddPlace.history", () => {
                  this.isInDestruct || (this.startValue = this.snapshot.make(), t5.events.on("internalChange internalUpdate", () => {
                    this.startValue = this.snapshot.make();
                  }).on(t5.editor, ["changeSelection", "selectionstart", "selectionchange", "mousedown", "mouseup", "keydown", "keyup"].map((t6) => t6 + ".history").join(" "), () => {
                    this.startValue.html === this.j.getNativeEditorValue() && (this.startValue = this.snapshot.make());
                  }).on(this, "change.history", this.onChange));
                });
              }
              __upTick() {
                this.updateTick += 1;
              }
              onChange() {
                this.__processChanges();
              }
              __processChanges() {
                !this.snapshot.isBlocked && this.j.o.history.enable && this.updateStack();
              }
              updateStack(t5 = false) {
                const e5 = this.snapshot.make();
                if (!a2.F.equal(e5, this.startValue)) {
                  const i4 = new s.u(this.startValue, e5, this, this.updateTick);
                  if (t5) {
                    const t6 = this.__stack.current();
                    t6 && this.updateTick === t6.tick && this.__stack.replace(i4);
                  } else this.__stack.push(i4);
                  this.startValue = e5, this.fireChangeStack();
                }
              }
              fireChangeStack() {
                var t5;
                this.j && !this.j.isInDestruct && (null === (t5 = this.j.events) || void 0 === t5 || t5.fire("changeStack"));
              }
              destruct() {
                this.isInDestruct || (this.j.events && this.j.e.off(".history"), this.snapshot.destruct(), super.destruct());
              }
            }
            (0, o3.Cg)([(0, r2.debounce)()], c.prototype, "onChange", null);
          }, 58770: function(t4, e4, i3) {
            i3.d(e4, { F: function() {
              return s;
            } });
            var o3 = i3(77753), n2 = i3(17352), r2 = i3(71842);
            class s extends o3.vG {
              constructor() {
                super(...arguments), this.__isBlocked = false;
              }
              className() {
                return "Snapshot";
              }
              static equal(t5, e5) {
                return t5.html === e5.html && JSON.stringify(t5.range) === JSON.stringify(e5.range);
              }
              static countNodesBeforeInParent(t5) {
                if (!t5.parentNode) return 0;
                const e5 = t5.parentNode.childNodes;
                let i4 = 0, o4 = null;
                for (let n3 = 0; e5.length > n3; n3 += 1) {
                  if (!o4 || this.isIgnoredNode(e5[n3]) || r2.J.isText(o4) && r2.J.isText(e5[n3]) || (i4 += 1), e5[n3] === t5) return i4;
                  o4 = e5[n3];
                }
                return 0;
              }
              static strokeOffset(t5, e5) {
                for (; r2.J.isText(t5); ) r2.J.isText(t5 = t5.previousSibling) && t5.nodeValue && (e5 += t5.nodeValue.length);
                return e5;
              }
              calcHierarchyLadder(t5) {
                const e5 = [];
                if (!t5 || !t5.parentNode || !r2.J.isOrContains(this.j.editor, t5)) return [];
                for (; t5 && t5 !== this.j.editor; ) t5 && !s.isIgnoredNode(t5) && e5.push(s.countNodesBeforeInParent(t5)), t5 = t5.parentNode;
                return e5.reverse();
              }
              getElementByLadder(t5) {
                let e5, i4 = this.j.editor;
                for (e5 = 0; i4 && t5.length > e5; e5 += 1) i4 = i4.childNodes[t5[e5]];
                return i4;
              }
              get isBlocked() {
                return this.__isBlocked;
              }
              __block(t5) {
                this.__isBlocked = t5;
              }
              transaction(t5) {
                this.__block(true);
                try {
                  t5();
                } catch (t6) {
                  if (!n2.IS_PROD) throw t6;
                }
                this.__block(false);
              }
              make() {
                const t5 = { html: "", range: { startContainer: [], startOffset: 0, endContainer: [], endOffset: 0 } };
                t5.html = this.removeJoditSelection(this.j.editor);
                const e5 = this.j.s.sel;
                if (e5 && e5.rangeCount) {
                  const i4 = e5.getRangeAt(0), o4 = this.calcHierarchyLadder(i4.startContainer), n3 = this.calcHierarchyLadder(i4.endContainer);
                  let r3 = s.strokeOffset(i4.startContainer, i4.startOffset), a2 = s.strokeOffset(i4.endContainer, i4.endOffset);
                  o4.length || i4.startContainer === this.j.editor || (r3 = 0), n3.length || i4.endContainer === this.j.editor || (a2 = 0), t5.range = { startContainer: o4, startOffset: r3, endContainer: n3, endOffset: a2 };
                }
                return t5;
              }
              restore(t5) {
                this.transaction(() => {
                  const e5 = this.storeScrollState();
                  this.j.getNativeEditorValue() !== t5.html && (this.j.value = t5.html), this.restoreOnlySelection(t5), this.restoreScrollState(e5);
                });
              }
              storeScrollState() {
                return [this.j.ow.scrollY, this.j.editor.scrollTop];
              }
              restoreScrollState(t5) {
                const { j: e5 } = this, { ow: i4 } = e5;
                i4.scrollTo(i4.scrollX, t5[0]), e5.editor.scrollTop = t5[1];
              }
              restoreOnlySelection(t5) {
                try {
                  if (t5.range) {
                    const e5 = this.j.ed.createRange();
                    e5.setStart(this.getElementByLadder(t5.range.startContainer), t5.range.startOffset), e5.setEnd(this.getElementByLadder(t5.range.endContainer), t5.range.endOffset), this.j.s.selectRange(e5);
                  }
                } catch (t6) {
                  this.j.editor.lastChild && this.j.s.setCursorAfter(this.j.editor.lastChild);
                }
              }
              destruct() {
                this.__block(false), super.destruct();
              }
              static isIgnoredNode(t5) {
                return r2.J.isText(t5) && !t5.nodeValue || r2.J.isTemporary(t5);
              }
              removeJoditSelection(t5) {
                const e5 = t5.cloneNode(true);
                return e5.querySelectorAll(`[${n2.TEMP_ATTR}]`).forEach(r2.J.unwrap), e5.innerHTML;
              }
            }
          }, 66180: function(t4, e4, i3) {
            i3.d(e4, { B: function() {
              return o3;
            } });
            class o3 {
              constructor(t5) {
                this.size = t5, this.commands = [], this.stackPosition = -1;
              }
              get length() {
                return this.commands.length;
              }
              clearRedo() {
                this.commands.length = this.stackPosition + 1;
              }
              clear() {
                this.commands.length = 0, this.stackPosition = -1;
              }
              push(t5) {
                this.clearRedo(), this.commands.push(t5), this.stackPosition += 1, this.commands.length > this.size && (this.commands.shift(), this.stackPosition -= 1);
              }
              replace(t5) {
                this.commands[this.stackPosition] = t5;
              }
              current() {
                return this.commands[this.stackPosition];
              }
              undo() {
                return !!this.canUndo() && (this.commands[this.stackPosition] && this.commands[this.stackPosition].undo(), this.stackPosition -= 1, true);
              }
              redo() {
                return !!this.canRedo() && (this.stackPosition += 1, this.commands[this.stackPosition] && this.commands[this.stackPosition].redo(), true);
              }
              canUndo() {
                return this.stackPosition >= 0;
              }
              canRedo() {
                return this.commands.length - 1 > this.stackPosition;
              }
            }
          }, 93027: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(928), r2 = i3.n(n2), s = i3(31230), a2 = i3.n(s);
            i3(36115).T.prototype.imageeditor = { min_width: 20, min_height: 20, closeAfterSave: false, width: "85%", height: "85%", crop: true, resize: true, resizeUseRatio: true, resizeMinWidth: 20, resizeMinHeight: 20, cropUseRatio: true, cropDefaultWidth: "70%", cropDefaultHeight: "70%" }, o3.I.set("crop", r2()).set("resize", a2());
          }, 53804: function(t4, e4, i3) {
            i3.d(e4, { B: function() {
              return m2;
            }, n: function() {
              return g2;
            } });
            var o3, n2 = i3(31635), r2 = i3(77753), s = i3(22664), a2 = i3(71842), l = i3(65147), c = i3(35265), d2 = (i3(93027), i3(24863)), u2 = i3(36115);
            const h2 = "jodit-image-editor", p2 = "resize", f2 = "crop";
            let g2 = o3 = class extends r2.vG {
              className() {
                return "ImageEditor";
              }
              get o() {
                return this.options;
              }
              hide() {
                this._dialog.close();
              }
              open(t5, e5) {
                return this.j.async.promise((i4) => {
                  const o4 = (/* @__PURE__ */ new Date()).getTime();
                  this.image = this.j.c.element("img"), (0, l.$$)("img,.jodit-icon_loader", this.resize_box).forEach(a2.J.safeRemove), (0, l.$$)("img,.jodit-icon_loader", this.crop_box).forEach(a2.J.safeRemove), (0, l.css)(this.cropHandler, "background", "transparent"), this.onSave = e5, this.resize_box.appendChild(this.j.c.element("i", { class: "jodit-icon_loader" })), this.crop_box.appendChild(this.j.c.element("i", { class: "jodit-icon_loader" })), /\?/.test(t5) ? t5 += "&_tst=" + o4 : t5 += "?_tst=" + o4, this.image.setAttribute("src", t5), this._dialog.open();
                  const { widthInput: n3, heightInput: r3 } = (0, l.refs)(this.editor), s2 = () => {
                    this.isDestructed || (this.image.removeEventListener("load", s2), this.naturalWidth = this.image.naturalWidth, this.naturalHeight = this.image.naturalHeight, n3.value = this.naturalWidth.toString(), r3.value = this.naturalHeight.toString(), this.ratio = this.naturalWidth / this.naturalHeight, this.resize_box.appendChild(this.image), this.cropImage = this.image.cloneNode(true), this.crop_box.appendChild(this.cropImage), a2.J.safeRemove.apply(null, (0, l.$$)(".jodit-icon_loader", this.editor)), this.activeTab === f2 && this.showCrop(), this.j.e.fire(this.resizeHandler, "updatesize"), this.j.e.fire(this.cropHandler, "updatesize"), this._dialog.setPosition(), this.j.e.fire("afterImageEditor"), i4(this._dialog));
                  };
                  this.image.addEventListener("load", s2), this.image.complete && s2();
                });
              }
              onTitleModeClick(t5) {
                const e5 = this, i4 = t5.target, o4 = null == i4 ? void 0 : i4.parentElement;
                if (!o4) return;
                (0, l.$$)(`.${h2}__slider,.${h2}__area`, e5.editor).forEach((t6) => t6.classList.remove(`${h2}_active`)), o4.classList.add(`${h2}_active`), this.activeTab = (0, l.attr)(o4, "-area") || p2;
                const n3 = e5.editor.querySelector(`.${h2}__area.${h2}__area_` + e5.activeTab);
                n3 && n3.classList.add(`${h2}_active`), e5.activeTab === f2 && e5.showCrop();
              }
              onChangeSizeInput(t5) {
                const e5 = this, i4 = t5.target, { widthInput: o4, heightInput: n3 } = (0, l.refs)(this.editor), r3 = "widthInput" === (0, l.attr)(i4, "data-ref"), s2 = parseInt(i4.value, 10), a3 = r3 ? e5.o.min_height : e5.o.min_width;
                let c2;
                s2 > (r3 ? e5.o.min_width : e5.o.min_height) && ((0, l.css)(e5.image, r3 ? "width" : "height", s2), e5.resizeUseRatio && (c2 = r3 ? Math.round(s2 / e5.ratio) : Math.round(s2 * e5.ratio), c2 > a3 && ((0, l.css)(e5.image, r3 ? "height" : "width", c2), r3 ? n3.value = c2.toString() : o4.value = c2.toString()))), this.j.e.fire(e5.resizeHandler, "updatesize");
              }
              onResizeHandleMouseDown(t5) {
                const e5 = this;
                e5.target = t5.target, t5.preventDefault(), t5.stopImmediatePropagation(), e5.clicked = true, e5.start_x = t5.clientX, e5.start_y = t5.clientY, e5.activeTab === f2 ? (e5.top_x = (0, l.css)(e5.cropHandler, "left"), e5.top_y = (0, l.css)(e5.cropHandler, "top"), e5.width = e5.cropHandler.offsetWidth, e5.height = e5.cropHandler.offsetHeight) : (e5.width = e5.image.offsetWidth, e5.height = e5.image.offsetHeight), e5.j.e.on(this.j.ow, "mousemove", this.onGlobalMouseMove).one(this.j.ow, "mouseup", this.onGlobalMouseUp);
              }
              onGlobalMouseUp(t5) {
                this.clicked && (this.clicked = false, t5.stopImmediatePropagation(), this.j.e.off(this.j.ow, "mousemove", this.onGlobalMouseMove));
              }
              onGlobalMouseMove(t5) {
                const e5 = this;
                if (!e5.clicked) return;
                const { widthInput: i4, heightInput: o4 } = (0, l.refs)(this.editor);
                e5.diff_x = t5.clientX - e5.start_x, e5.diff_y = t5.clientY - e5.start_y, e5.activeTab === p2 && e5.resizeUseRatio || e5.activeTab === f2 && e5.cropUseRatio ? e5.diff_x ? (e5.new_w = e5.width + e5.diff_x, e5.new_h = Math.round(e5.new_w / e5.ratio)) : (e5.new_h = e5.height + e5.diff_y, e5.new_w = Math.round(e5.new_h * e5.ratio)) : (e5.new_w = e5.width + e5.diff_x, e5.new_h = e5.height + e5.diff_y), e5.activeTab === p2 ? (e5.new_w > e5.o.resizeMinWidth && ((0, l.css)(e5.image, "width", e5.new_w + "px"), i4.value = e5.new_w.toString()), e5.new_h > e5.o.resizeMinHeight && ((0, l.css)(e5.image, "height", e5.new_h + "px"), o4.value = e5.new_h.toString()), this.j.e.fire(e5.resizeHandler, "updatesize")) : (e5.target !== e5.cropHandler ? (e5.top_x + e5.new_w > e5.cropImage.offsetWidth && (e5.new_w = e5.cropImage.offsetWidth - e5.top_x), e5.top_y + e5.new_h > e5.cropImage.offsetHeight && (e5.new_h = e5.cropImage.offsetHeight - e5.top_y), (0, l.css)(e5.cropHandler, { width: e5.new_w, height: e5.new_h })) : (e5.top_x + e5.diff_x + e5.cropHandler.offsetWidth > e5.cropImage.offsetWidth && (e5.diff_x = e5.cropImage.offsetWidth - e5.top_x - e5.cropHandler.offsetWidth), (0, l.css)(e5.cropHandler, "left", e5.top_x + e5.diff_x), e5.top_y + e5.diff_y + e5.cropHandler.offsetHeight > e5.cropImage.offsetHeight && (e5.diff_y = e5.cropImage.offsetHeight - e5.top_y - e5.cropHandler.offsetHeight), (0, l.css)(e5.cropHandler, "top", e5.top_y + e5.diff_y)), this.j.e.fire(e5.cropHandler, "updatesize"));
              }
              constructor(t5) {
                super(t5), this.resizeUseRatio = true, this.cropUseRatio = true, this.clicked = false, this.start_x = 0, this.start_y = 0, this.top_x = 0, this.top_y = 0, this.width = 0, this.height = 0, this.activeTab = p2, this.naturalWidth = 0, this.naturalHeight = 0, this.ratio = 0, this.new_h = 0, this.new_w = 0, this.diff_x = 0, this.diff_y = 0, this.cropBox = { x: 0, y: 0, w: 0, h: 0 }, this.resizeBox = { w: 0, h: 0 }, this.calcCropBox = () => {
                  const t6 = this.crop_box.parentNode, e6 = 0.8 * t6.offsetWidth, i5 = 0.8 * t6.offsetHeight;
                  let o4 = e6, n4 = i5;
                  const { naturalWidth: r3, naturalHeight: s2 } = this;
                  e6 > r3 && i5 > s2 ? (o4 = r3, n4 = s2) : this.ratio > e6 / i5 ? (o4 = e6, n4 = s2 * (e6 / r3)) : (o4 = r3 * (i5 / s2), n4 = i5), (0, l.css)(this.crop_box, { width: o4, height: n4 });
                }, this.showCrop = () => {
                  if (!this.cropImage) return;
                  this.calcCropBox();
                  const t6 = this.cropImage.offsetWidth || this.image.offsetWidth || this.image.naturalWidth;
                  this.new_w = o3.calcValueByPercent(t6, this.o.cropDefaultWidth);
                  const e6 = this.cropImage.offsetHeight || this.image.offsetHeight || this.image.naturalHeight;
                  this.new_h = this.cropUseRatio ? this.new_w / this.ratio : o3.calcValueByPercent(e6, this.o.cropDefaultHeight), (0, l.css)(this.cropHandler, { backgroundImage: "url(" + (0, l.attr)(this.cropImage, "src") + ")", width: this.new_w, height: this.new_h, left: t6 / 2 - this.new_w / 2, top: e6 / 2 - this.new_h / 2 }), this.j.e.fire(this.cropHandler, "updatesize");
                }, this.updateCropBox = () => {
                  if (!this.cropImage) return;
                  const t6 = this.cropImage.offsetWidth / this.naturalWidth, e6 = this.cropImage.offsetHeight / this.naturalHeight;
                  this.cropBox.x = (0, l.css)(this.cropHandler, "left") / t6, this.cropBox.y = (0, l.css)(this.cropHandler, "top") / e6, this.cropBox.w = this.cropHandler.offsetWidth / t6, this.cropBox.h = this.cropHandler.offsetHeight / e6, this.sizes.textContent = this.cropBox.w.toFixed(0) + "x" + this.cropBox.h.toFixed(0);
                }, this.updateResizeBox = () => {
                  this.resizeBox.w = this.image.offsetWidth || this.naturalWidth, this.resizeBox.h = this.image.offsetHeight || this.naturalHeight;
                }, this.setHandlers = () => {
                  const t6 = this, { widthInput: e6, heightInput: i5 } = (0, l.refs)(this.editor);
                  t6.j.e.on([t6.editor.querySelector(".jodit_bottomright"), t6.cropHandler], `mousedown.${h2}`, this.onResizeHandleMouseDown).on(this.j.ow, `resize.${h2}`, () => {
                    this.j.e.fire(t6.resizeHandler, "updatesize"), t6.showCrop(), this.j.e.fire(t6.cropHandler, "updatesize");
                  }), t6.j.e.on((0, l.toArray)(this.editor.querySelectorAll(`.${h2}__slider-title`)), "click", this.onTitleModeClick).on([e6, i5], "input", this.onChangeSizeInput);
                  const { keepAspectRatioResize: o4, keepAspectRatioCrop: n4 } = (0, l.refs)(this.editor);
                  o4 && o4.addEventListener("change", () => {
                    this.resizeUseRatio = o4.checked;
                  }), n4 && n4.addEventListener("change", () => {
                    this.cropUseRatio = n4.checked;
                  }), t6.j.e.on(t6.resizeHandler, "updatesize", () => {
                    (0, l.css)(t6.resizeHandler, { top: 0, left: 0, width: t6.image.offsetWidth || t6.naturalWidth, height: t6.image.offsetHeight || t6.naturalHeight }), this.updateResizeBox();
                  }).on(t6.cropHandler, "updatesize", () => {
                    if (!t6.cropImage) return;
                    let e7 = (0, l.css)(t6.cropHandler, "left"), i6 = (0, l.css)(t6.cropHandler, "top"), o5 = t6.cropHandler.offsetWidth, n5 = t6.cropHandler.offsetHeight;
                    0 > e7 && (e7 = 0), 0 > i6 && (i6 = 0), e7 + o5 > t6.cropImage.offsetWidth && (o5 = t6.cropImage.offsetWidth - e7, t6.cropUseRatio && (n5 = o5 / t6.ratio)), i6 + n5 > t6.cropImage.offsetHeight && (n5 = t6.cropImage.offsetHeight - i6, t6.cropUseRatio && (o5 = n5 * t6.ratio)), (0, l.css)(t6.cropHandler, { width: o5, height: n5, left: e7, top: i6, backgroundPosition: -e7 - 1 + "px " + (-i6 - 1) + "px", backgroundSize: t6.cropImage.offsetWidth + "px " + t6.cropImage.offsetHeight + "px" }), t6.updateCropBox();
                  }), Object.values(t6.buttons).forEach((o5) => {
                    o5.onAction(() => {
                      const n5 = { action: t6.activeTab, box: t6.activeTab === p2 ? t6.resizeBox : t6.cropBox };
                      switch (o5) {
                        case t6.buttons.saveas:
                          t6.j.prompt("Enter new name", "Save in new file", (e7) => {
                            if (!(0, l.trim)(e7)) return t6.j.alert("The name should not be empty"), false;
                            t6.onSave(e7, n5, t6.hide, (e8) => {
                              t6.j.alert(e8.message);
                            });
                          });
                          break;
                        case t6.buttons.save:
                          t6.onSave(void 0, n5, t6.hide, (e7) => {
                            t6.j.alert(e7.message);
                          });
                          break;
                        case t6.buttons.reset:
                          t6.activeTab === p2 ? ((0, l.css)(t6.image, { width: null, height: null }), e6.value = t6.naturalWidth.toString(), i5.value = t6.naturalHeight.toString(), t6.j.e.fire(t6.resizeHandler, "updatesize")) : t6.showCrop();
                      }
                    });
                  });
                }, this.options = t5 && t5.o && t5.o.imageeditor ? t5.o.imageeditor : u2.T.defaultOptions.imageeditor;
                const e5 = this.options;
                this.resizeUseRatio = e5.resizeUseRatio, this.cropUseRatio = e5.cropUseRatio, this.buttons = { reset: (0, c.$n)(this.j, "update", "Reset"), save: (0, c.$n)(this.j, "save", "Save"), saveas: (0, c.$n)(this.j, "save", "Save as ...") }, this.activeTab = e5.resize ? p2 : f2, this.editor = (0, d2.Z)(this.j, this.options);
                const { resizeBox: i4, cropBox: n3 } = (0, l.refs)(this.editor);
                this.resize_box = i4, this.crop_box = n3, this.sizes = this.editor.querySelector(`.${h2}__area.${h2}__area_crop .jodit-image-editor__sizes`), this.resizeHandler = this.editor.querySelector(`.${h2}__resizer`), this.cropHandler = this.editor.querySelector(`.${h2}__croper`), this._dialog = this.j.dlg({ buttons: ["fullsize", "dialog.close"] }), this._dialog.setContent(this.editor), this._dialog.setSize(this.o.width, this.o.height), this._dialog.setHeader([this.buttons.reset, this.buttons.save, this.buttons.saveas]), this.setHandlers();
              }
              destruct() {
                this.isDestructed || (this._dialog && !this._dialog.isInDestruct && this._dialog.destruct(), a2.J.safeRemove(this.editor), this.j.e && this.j.e.off(this.j.ow, "mousemove", this.onGlobalMouseMove).off(this.j.ow, "mouseup", this.onGlobalMouseUp).off(this.ow, `.${h2}`).off(`.${h2}`), super.destruct());
              }
            };
            function m2(t5, e5, i4, o4, n3, r3) {
              return this.getInstance("ImageEditor", this.o).open(t5, (t6, s2, a3, c2) => (0, l.call)("resize" === s2.action ? this.dataProvider.resize : this.dataProvider.crop, i4, o4, e5, t6, s2.box).then((t7) => {
                t7 && (a3(), n3 && n3());
              }).catch((t7) => {
                c2(t7), r3 && r3(t7);
              }));
            }
            g2.calcValueByPercent = (t5, e5) => {
              const i4 = e5.toString(), o4 = parseFloat(t5.toString());
              let n3;
              return n3 = /^[-+]?[0-9]+(px)?$/.exec(i4), n3 ? parseInt(i4, 10) : (n3 = /^([-+]?[0-9.]+)%$/.exec(i4), n3 ? Math.round(o4 * (parseFloat(n3[1]) / 100)) : o4 || 0);
            }, (0, n2.Cg)([s.autobind], g2.prototype, "hide", null), (0, n2.Cg)([s.autobind], g2.prototype, "open", null), (0, n2.Cg)([s.autobind], g2.prototype, "onTitleModeClick", null), (0, n2.Cg)([(0, s.debounce)(), s.autobind], g2.prototype, "onChangeSizeInput", null), (0, n2.Cg)([s.autobind], g2.prototype, "onResizeHandleMouseDown", null), (0, n2.Cg)([s.autobind], g2.prototype, "onGlobalMouseUp", null), (0, n2.Cg)([(0, s.throttle)(10)], g2.prototype, "onGlobalMouseMove", null), g2 = o3 = (0, n2.Cg)([s.component], g2);
          }, 24863: function(t4, e4, i3) {
            i3.d(e4, { Z: function() {
              return a2;
            } });
            var o3 = i3(53048);
            const n2 = "jodit-image-editor", r2 = o3.In.get.bind(o3.In), s = (t5, e5 = "jodti-image-editor_active") => t5 ? e5 : "", a2 = (t5, e5) => {
              const i4 = t5.i18n.bind(t5), o4 = (t6, e6, o5 = true) => `<div class="jodit-form__group">
			<label class="jodit-switcher-wrapper">
				<span class='jodit-switcher'>
					<input ${s(o5, "checked")} data-ref="${e6}" type="checkbox"/>
					<span class="jodit-switcher__slider"></span>
				</span>
				<span>${i4(t6)}</span>
			</label>
	</div>`;
              return t5.create.fromHTML(`<form class="${n2} jodit-properties">
		<div class="jodit-grid jodit-grid_xs-column">
			<div class="jodit_col-lg-3-4 jodit_col-sm-5-5">
			${e5.resize ? `<div class="${n2}__area ${n2}__area_resize ${n2}_active">
							<div data-ref="resizeBox" class="${n2}__box"></div>
							<div class="${n2}__resizer">
								<i class="jodit_bottomright"></i>
							</div>
						</div>` : ""}
			${e5.crop ? `<div class="${n2}__area ${n2}__area_crop ${s(!e5.resize)}">
							<div data-ref="cropBox" class="${n2}__box">
								<div class="${n2}__croper">
									<i class="jodit_bottomright"></i>
									<i class="${n2}__sizes"></i>
								</div>
							</div>
						</div>` : ""}
			</div>
			<div class="jodit_col-lg-1-4 jodit_col-sm-5-5">
			${e5.resize ? `<div data-area="resize" class="${n2}__slider ${n2}_active">
							<div class="${n2}__slider-title">
								${r2("resize")}
								${i4("Resize")}
							</div>
							<div class="${n2}__slider-content">
								<div class="jodit-form__group">
									<label>
										${i4("Width")}
									</label>
									<input type="number" data-ref="widthInput" class="jodit-input"/>
								</div>
								<div class="jodit-form__group">
									<label>
										${i4("Height")}
									</label>
									<input type="number" data-ref="heightInput" class="jodit-input"/>
								</div>
								${o4("Keep Aspect Ratio", "keepAspectRatioResize")}
							</div>
						</div>` : ""}
			${e5.crop ? `<div data-area="crop" class="${n2}__slider ${s(!e5.resize)}'">
							<div class="${n2}__slider-title">
								${r2("crop")}
								${i4("Crop")}
							</div>
							<div class="${n2}__slider-content">
								${o4("Keep Aspect Ratio", "keepAspectRatioCrop")}
							</div>
						</div>` : ""}
			</div>
		</div>
	</form>`);
            };
          }, 37435: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { Ajax: function() {
              return p2.d;
            }, Alert: function() {
              return s.Fc;
            }, Async: function() {
              return l.j;
            }, Button: function() {
              return f2.$n;
            }, CommitStyle: function() {
              return T2.xk;
            }, Component: function() {
              return o3.uA;
            }, Confirm: function() {
              return s.pT;
            }, ContextMenu: function() {
              return r2.t;
            }, Create: function() {
              return c.X;
            }, Dialog: function() {
              return s.lG;
            }, Dom: function() {
              return d2.J;
            }, EventEmitter: function() {
              return u2.bk;
            }, EventHandlersStore: function() {
              return u2.d$;
            }, Eventify: function() {
              return u2.h5;
            }, FileBrowser: function() {
              return a2.V;
            }, Helpers: function() {
              return n2;
            }, History: function() {
              return b2.B;
            }, Icon: function() {
              return f2.In;
            }, ImageEditor: function() {
              return v2.n;
            }, LazyWalker: function() {
              return d2.p;
            }, Plugin: function() {
              return h2.k;
            }, PluginSystem: function() {
              return z2.$;
            }, Popup: function() {
              return f2.zD;
            }, ProgressBar: function() {
              return f2.z2;
            }, Prompt: function() {
              return s.XG;
            }, Response: function() {
              return p2.Y;
            }, STATUSES: function() {
              return o3.f;
            }, Selection: function() {
              return T2.LN;
            }, Snapshot: function() {
              return _2.F;
            }, StatusBar: function() {
              return w.e;
            }, Table: function() {
              return y2.X;
            }, ToolbarButton: function() {
              return j.IB;
            }, ToolbarCollection: function() {
              return k2.Q;
            }, ToolbarContent: function() {
              return j.P1;
            }, ToolbarEditorCollection: function() {
              return C2.b;
            }, ToolbarSelect: function() {
              return j.q4;
            }, UIBlock: function() {
              return f2.Yh;
            }, UIButton: function() {
              return f2.lD;
            }, UIButtonGroup: function() {
              return f2.ss;
            }, UIButtonState: function() {
              return f2.ue;
            }, UICheckbox: function() {
              return f2.cY;
            }, UIElement: function() {
              return f2.D$;
            }, UIFileInput: function() {
              return f2.nE;
            }, UIForm: function() {
              return f2.XV;
            }, UIGroup: function() {
              return f2.Ue;
            }, UIInput: function() {
              return f2.tS;
            }, UIList: function() {
              return f2.z4;
            }, UIMessages: function() {
              return x.N;
            }, UISelect: function() {
              return f2.$6;
            }, UISeparator: function() {
              return f2.CP;
            }, UISpacer: function() {
              return f2.bk;
            }, UITextArea: function() {
              return f2.F0;
            }, UITooltip: function() {
              return f2.SB;
            }, Uploader: function() {
              return S2.d;
            }, View: function() {
              return g2.S;
            }, ViewComponent: function() {
              return o3.vG;
            }, ViewWithToolbar: function() {
              return m2.T;
            }, defaultNameSpace: function() {
              return u2.Xr;
            }, observable: function() {
              return u2.sH;
            } });
            var o3 = i3(77753), n2 = i3(65147), r2 = i3(34248), s = i3(34256), a2 = i3(19627), l = i3(64890), c = i3(40594), d2 = i3(71842), u2 = i3(50025), h2 = i3(71005), p2 = i3(53883), f2 = i3(53048), g2 = i3(77782), m2 = i3(14961), b2 = i3(69996), _2 = i3(58770), v2 = i3(53804), x = i3(91902), w = i3(62870), y2 = i3(11648), j = i3(5832), k2 = i3(97394), C2 = i3(90428), S2 = i3(26538), z2 = i3(77402), T2 = i3(87332);
          }, 91479: function(t4, e4, i3) {
            i3.d(e4, { C: function() {
              return s;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(53048);
            let s = class extends r2.D$ {
              className() {
                return "UIMessage";
              }
              constructor(t5, e5) {
                super(t5), this.setMod("active", true), this.setMod("variant", e5.variant), this.container.textContent = e5.text;
              }
            };
            s = (0, o3.Cg)([n2.s], s);
          }, 91902: function(t4, e4, i3) {
            i3.d(e4, { N: function() {
              return l;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(38322), s = i3(6455), a2 = i3(91479);
            let l = class extends s.U {
              className() {
                return "UIMessages";
              }
              constructor(t5, e5, i4 = { defaultTimeout: 3e3, defaultOffset: 5 }) {
                super(t5), this.__box = e5, this.options = i4, this.__messages = /* @__PURE__ */ new Set();
              }
              info(t5, e5) {
                this.__message(t5, "info", e5);
              }
              success(t5, e5) {
                this.__message(t5, "success", e5);
              }
              error(t5, e5) {
                this.__message(t5, "error", e5);
              }
              message(t5, e5, i4) {
                this.__message(t5, e5, i4);
              }
              __message(t5, e5 = "info", i4) {
                const o4 = t5 + ":" + e5;
                if (this.__messages.has(o4)) return void this.async.updateTimeout(o4, i4 || this.options.defaultTimeout);
                if (!this.__box) throw new Error("Container is not defined: " + o4);
                this.__box.appendChild(this.container);
                const n3 = new a2.C(this.j, { text: t5, variant: e5 });
                this.append(n3), this.__calcOffsets(), this.__messages.add(o4);
                const r3 = this.__getRemoveCallback(n3, o4);
                this.j.e.on(n3.container, "pointerdown", r3), this.async.setTimeout(r3, { label: o4, timeout: i4 || this.options.defaultTimeout });
              }
              __getRemoveCallback(t5, e5) {
                const i4 = (o4) => {
                  o4 && o4.preventDefault(), t5.isInDestruct || (this.async.clearTimeout(e5), this.j.e.off(t5.container, "pointerdown", i4), this.__messages.delete(e5), t5.setMod("active", false), this.async.setTimeout(() => {
                    this.remove(t5), t5.destruct(), this.__calcOffsets();
                  }, 300));
                };
                return i4;
              }
              __calcOffsets() {
                let t5 = 5;
                this.elements.forEach((e5) => {
                  (0, r2.A)(e5.container, "bottom", t5 + "px"), t5 += e5.container.offsetHeight + this.options.defaultOffset;
                });
              }
            };
            l = (0, o3.Cg)([n2.s], l);
          }, 62870: function(t4, e4, i3) {
            i3.d(e4, { e: function() {
              return c;
            } });
            var o3 = i3(31635), n2 = i3(77753), r2 = i3(22664), s = i3(55186), a2 = i3(87906), l = i3(75758);
            let c = class extends n2.vG {
              className() {
                return "StatusBar";
              }
              hide() {
                this.container.classList.add("jodit_hidden");
              }
              show() {
                this.container.classList.remove("jodit_hidden");
              }
              get isShown() {
                return !this.container.classList.contains("jodit_hidden");
              }
              getHeight() {
                var t5, e5;
                return null !== (e5 = null === (t5 = this.container) || void 0 === t5 ? void 0 : t5.offsetHeight) && void 0 !== e5 ? e5 : 0;
              }
              findEmpty(t5 = false) {
                const e5 = this.getElms(t5 ? "item-right" : "item");
                for (let t6 = 0; e5.length > t6; t6 += 1) if (!e5[t6].innerHTML.trim().length) return e5[t6];
              }
              append(t5, e5 = false) {
                var i4;
                const o4 = this.findEmpty(e5) || this.j.c.div(this.getFullElName("item"));
                e5 && o4.classList.add(this.getFullElName("item-right")), o4.appendChild(t5), null === (i4 = this.container) || void 0 === i4 || i4.appendChild(o4), this.j.o.statusbar && this.show(), this.j.e.fire("resize");
              }
              constructor(t5, e5) {
                super(t5), this.target = e5, this.mods = {}, this.container = t5.c.div("jodit-status-bar"), e5.appendChild(this.container), this.hide();
              }
              destruct() {
                this.isInDestruct || (this.setStatus(n2.f.beforeDestruct), s.J.safeRemove(this.container), super.destruct());
              }
            };
            c = (0, o3.Cg)([r2.component, (0, r2.derive)(l.K, a2.O)], c);
          }, 11648: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return u2;
            } });
            var o3 = i3(31635), n2 = i3(77753), r2 = i3(17352), s = i3(22664), a2 = i3(71842), l = i3(56298), c = i3(65147);
            const d2 = /* @__PURE__ */ new WeakMap();
            class u2 extends n2.vG {
              constructor() {
                super(...arguments), this.selected = /* @__PURE__ */ new Set();
              }
              className() {
                return "Table";
              }
              __recalculateStyles() {
                const t5 = (0, l.My)(this.j, u2, "style", true), e5 = [];
                this.selected.forEach((t6) => {
                  const i4 = (0, c.cssPath)(t6);
                  i4 && e5.push(i4);
                }), t5.innerHTML = e5.length ? e5.join(",") + `{${this.jodit.options.table.selectionCellStyle}}` : "";
              }
              addSelection(t5) {
                this.selected.add(t5), this.__recalculateStyles();
                const e5 = a2.J.closest(t5, "table", this.j.editor);
                if (e5) {
                  const i4 = u2.__selectedByTable.get(e5) || /* @__PURE__ */ new Set();
                  i4.add(t5), u2.__selectedByTable.set(e5, i4);
                }
              }
              removeSelection(t5) {
                this.selected.delete(t5), this.__recalculateStyles();
                const e5 = a2.J.closest(t5, "table", this.j.editor);
                if (e5) {
                  const i4 = u2.__selectedByTable.get(e5);
                  i4 && (i4.delete(t5), i4.size || u2.__selectedByTable.delete(e5));
                }
              }
              getAllSelectedCells() {
                return (0, c.toArray)(this.selected);
              }
              static __getSelectedCellsByTable(t5) {
                const e5 = u2.__selectedByTable.get(t5);
                return e5 ? (0, c.toArray)(e5) : [];
              }
              destruct() {
                return this.selected.clear(), super.destruct();
              }
              static __getRowsCount(t5) {
                return t5.rows.length;
              }
              getRowsCount(t5) {
                return u2.__getRowsCount(t5);
              }
              static __getColumnsCount(t5) {
                return u2.__formalMatrix(t5).reduce((t6, e5) => Math.max(t6, e5.length), 0);
              }
              getColumnsCount(t5) {
                return u2.__getColumnsCount(t5);
              }
              static __formalMatrix(t5, e5) {
                const i4 = [[]], o4 = (0, c.toArray)(t5.rows), n3 = (t6, o5) => {
                  void 0 === i4[o5] && (i4[o5] = []);
                  const n4 = t6.colSpan, r3 = t6.rowSpan;
                  let s2, a3, l2 = 0;
                  for (; i4[o5][l2]; ) l2 += 1;
                  for (a3 = 0; r3 > a3; a3 += 1) for (s2 = 0; n4 > s2; s2 += 1) {
                    if (void 0 === i4[o5 + a3] && (i4[o5 + a3] = []), e5 && false === e5(t6, o5 + a3, l2 + s2, n4, r3)) return false;
                    i4[o5 + a3][l2 + s2] = t6;
                  }
                };
                for (let t6 = 0; o4.length > t6; t6 += 1) {
                  const e6 = (0, c.toArray)(o4[t6].cells);
                  for (let o5 = 0; e6.length > o5; o5 += 1) if (false === n3(e6[o5], t6)) return i4;
                }
                return i4;
              }
              formalMatrix(t5, e5) {
                return u2.__formalMatrix(t5, e5);
              }
              static __formalCoordinate(t5, e5, i4 = false) {
                let o4 = 0, n3 = 0, r3 = 1, s2 = 1;
                return u2.__formalMatrix(t5, (t6, a3, l2, c2, d3) => {
                  if (e5 === t6) return o4 = a3, n3 = l2, r3 = c2 || 1, s2 = d3 || 1, i4 && (n3 += (c2 || 1) - 1, o4 += (d3 || 1) - 1), false;
                }), [o4, n3, r3, s2];
              }
              formalCoordinate(t5, e5, i4 = false) {
                return u2.__formalCoordinate(t5, e5, i4);
              }
              static __appendRow(t5, e5, i4, o4) {
                var n3;
                let r3;
                if (e5) r3 = e5.cloneNode(true), (0, c.$$)("td,th", e5).forEach((t6) => {
                  const e6 = (0, c.attr)(t6, "rowspan");
                  if (e6 && parseInt(e6, 10) > 1) {
                    const i5 = parseInt(e6, 10) - 1;
                    (0, c.attr)(t6, "rowspan", i5 > 1 ? i5 : null);
                  }
                }), (0, c.$$)("td,th", r3).forEach((t6) => {
                  t6.innerHTML = "";
                });
                else {
                  const e6 = u2.__getColumnsCount(t5);
                  r3 = o4.element("tr");
                  for (let t6 = 0; e6 > t6; t6 += 1) r3.appendChild(o4.element("td"));
                }
                i4 && e5 && e5.nextSibling ? e5.parentNode && e5.parentNode.insertBefore(r3, e5.nextSibling) : !i4 && e5 ? e5.parentNode && e5.parentNode.insertBefore(r3, e5) : ((null === (n3 = t5.getElementsByTagName("tbody")) || void 0 === n3 ? void 0 : n3[0]) || t5).appendChild(r3);
              }
              appendRow(t5, e5, i4) {
                return u2.__appendRow(t5, e5, i4, this.j.createInside);
              }
              static __removeRow(t5, e5) {
                const i4 = u2.__formalMatrix(t5);
                let o4;
                const n3 = t5.rows[e5];
                i4[e5].forEach((r3, s2) => {
                  if (o4 = false, 0 > e5 - 1 || i4[e5 - 1][s2] !== r3) if (i4[e5 + 1] && i4[e5 + 1][s2] === r3) {
                    if (r3.parentNode === n3 && r3.parentNode.nextSibling) {
                      o4 = true;
                      let n4 = s2 + 1;
                      for (; i4[e5 + 1][n4] === r3; ) n4 += 1;
                      const l2 = a2.J.next(r3.parentNode, (t6) => a2.J.isTag(t6, "tr"), t5);
                      l2 && (i4[e5 + 1][n4] ? l2.insertBefore(r3, i4[e5 + 1][n4]) : l2.appendChild(r3));
                    }
                  } else a2.J.safeRemove(r3);
                  else o4 = true;
                  if (o4 && (r3.parentNode === n3 || r3 !== i4[e5][s2 - 1])) {
                    const t6 = r3.rowSpan;
                    (0, c.attr)(r3, "rowspan", t6 - 1 > 1 ? t6 - 1 : null);
                  }
                }), a2.J.safeRemove(n3);
              }
              removeRow(t5, e5) {
                return u2.__removeRow(t5, e5);
              }
              static __appendColumn(t5, e5, i4, o4) {
                const n3 = u2.__formalMatrix(t5);
                let r3;
                for ((void 0 === e5 || 0 > e5) && (e5 = u2.__getColumnsCount(t5) - 1), r3 = 0; n3.length > r3; r3 += 1) {
                  const t6 = o4.element("td"), s2 = n3[r3][e5];
                  let l2 = false;
                  i4 ? (n3[r3] && s2 && e5 + 1 >= n3[r3].length || s2 !== n3[r3][e5 + 1]) && (s2.nextSibling ? a2.J.before(s2.nextSibling, t6) : s2.parentNode && s2.parentNode.appendChild(t6), l2 = true) : (0 > e5 - 1 || n3[r3][e5] !== n3[r3][e5 - 1] && n3[r3][e5].parentNode) && (a2.J.before(n3[r3][e5], t6), l2 = true), l2 || (0, c.attr)(n3[r3][e5], "colspan", parseInt((0, c.attr)(n3[r3][e5], "colspan") || "1", 10) + 1);
                }
              }
              appendColumn(t5, e5, i4) {
                return u2.__appendColumn(t5, e5, i4, this.j.createInside);
              }
              static __removeColumn(t5, e5) {
                const i4 = u2.__formalMatrix(t5);
                let o4;
                i4.forEach((t6, n3) => {
                  const r3 = t6[e5];
                  if (o4 = false, 0 > e5 - 1 || i4[n3][e5 - 1] !== r3 ? t6.length > e5 + 1 && i4[n3][e5 + 1] === r3 ? o4 = true : a2.J.safeRemove(r3) : o4 = true, o4 && (0 > n3 - 1 || r3 !== i4[n3 - 1][e5])) {
                    const t7 = r3.colSpan;
                    (0, c.attr)(r3, "colspan", t7 - 1 > 1 ? (t7 - 1).toString() : null);
                  }
                });
              }
              removeColumn(t5, e5) {
                return u2.__removeColumn(t5, e5);
              }
              static __getSelectedBound(t5, e5) {
                const i4 = [[1 / 0, 1 / 0], [0, 0]], o4 = u2.__formalMatrix(t5);
                let n3, r3, s2;
                for (n3 = 0; o4.length > n3; n3 += 1) for (r3 = 0; o4[n3] && o4[n3].length > r3; r3 += 1) e5.includes(o4[n3][r3]) && (i4[0][0] = Math.min(n3, i4[0][0]), i4[0][1] = Math.min(r3, i4[0][1]), i4[1][0] = Math.max(n3, i4[1][0]), i4[1][1] = Math.max(r3, i4[1][1]));
                for (n3 = i4[0][0]; i4[1][0] >= n3; n3 += 1) for (s2 = 1, r3 = i4[0][1]; i4[1][1] >= r3; r3 += 1) {
                  for (; o4[n3] && o4[n3][r3 - s2] && o4[n3][r3] === o4[n3][r3 - s2]; ) i4[0][1] = Math.min(r3 - s2, i4[0][1]), i4[1][1] = Math.max(r3 - s2, i4[1][1]), s2 += 1;
                  for (s2 = 1; o4[n3] && o4[n3][r3 + s2] && o4[n3][r3] === o4[n3][r3 + s2]; ) i4[0][1] = Math.min(r3 + s2, i4[0][1]), i4[1][1] = Math.max(r3 + s2, i4[1][1]), s2 += 1;
                  for (s2 = 1; o4[n3 - s2] && o4[n3][r3] === o4[n3 - s2][r3]; ) i4[0][0] = Math.min(n3 - s2, i4[0][0]), i4[1][0] = Math.max(n3 - s2, i4[1][0]), s2 += 1;
                  for (s2 = 1; o4[n3 + s2] && o4[n3][r3] === o4[n3 + s2][r3]; ) i4[0][0] = Math.min(n3 + s2, i4[0][0]), i4[1][0] = Math.max(n3 + s2, i4[1][0]), s2 += 1;
                }
                return i4;
              }
              getSelectedBound(t5, e5) {
                return u2.__getSelectedBound(t5, e5);
              }
              static __normalizeTable(t5) {
                let e5, i4, o4, n3;
                const r3 = [], s2 = u2.__formalMatrix(t5);
                for (i4 = 0; s2[0].length > i4; i4 += 1) {
                  for (o4 = 1e6, n3 = false, e5 = 0; s2.length > e5; e5 += 1) if (void 0 !== s2[e5][i4]) {
                    if (2 > s2[e5][i4].colSpan) {
                      n3 = true;
                      break;
                    }
                    o4 = Math.min(o4, s2[e5][i4].colSpan);
                  }
                  if (!n3) for (e5 = 0; s2.length > e5; e5 += 1) void 0 !== s2[e5][i4] && u2.__mark(s2[e5][i4], "colspan", s2[e5][i4].colSpan - o4 + 1, r3);
                }
                for (e5 = 0; s2.length > e5; e5 += 1) {
                  for (o4 = 1e6, n3 = false, i4 = 0; s2[e5].length > i4; i4 += 1) if (void 0 !== s2[e5][i4]) {
                    if (2 > s2[e5][i4].rowSpan) {
                      n3 = true;
                      break;
                    }
                    o4 = Math.min(o4, s2[e5][i4].rowSpan);
                  }
                  if (!n3) for (i4 = 0; s2[e5].length > i4; i4 += 1) void 0 !== s2[e5][i4] && u2.__mark(s2[e5][i4], "rowspan", s2[e5][i4].rowSpan - o4 + 1, r3);
                }
                for (e5 = 0; s2.length > e5; e5 += 1) for (i4 = 0; s2[e5].length > i4; i4 += 1) void 0 !== s2[e5][i4] && (s2[e5][i4].hasAttribute("rowspan") && 1 === s2[e5][i4].rowSpan && (0, c.attr)(s2[e5][i4], "rowspan", null), s2[e5][i4].hasAttribute("colspan") && 1 === s2[e5][i4].colSpan && (0, c.attr)(s2[e5][i4], "colspan", null), s2[e5][i4].hasAttribute("class") && !(0, c.attr)(s2[e5][i4], "class") && (0, c.attr)(s2[e5][i4], "class", null));
                u2.__unmark(r3);
              }
              normalizeTable(t5) {
                return u2.__normalizeTable(t5);
              }
              static __mergeSelected(t5, e5) {
                const i4 = [], o4 = u2.__getSelectedBound(t5, u2.__getSelectedCellsByTable(t5));
                let n3, s2 = 0, l2 = null, d3 = 0, p2 = 0, f2 = 0;
                const g2 = /* @__PURE__ */ new Set(), m2 = [];
                o4 && (o4[0][0] - o4[1][0] || o4[0][1] - o4[1][1]) && (u2.__formalMatrix(t5, (t6, r3, a3, b2, _2) => {
                  if (!(o4[0][0] > r3 || r3 > o4[1][0] || o4[0][1] > a3 || a3 > o4[1][1])) {
                    if (n3 = t6, g2.has(n3)) return;
                    g2.add(n3), r3 === o4[0][0] && n3.style.width && (s2 += n3.offsetWidth), "" !== (0, c.trim)(t6.innerHTML.replace(/<br(\/)?>/g, "")) && i4.push(t6.innerHTML), b2 > 1 && (p2 += b2 - 1), _2 > 1 && (f2 += _2 - 1), l2 ? (u2.__mark(n3, "remove", 1, m2), h2(e5).removeSelection(n3)) : (l2 = t6, d3 = a3);
                  }
                }), p2 = o4[1][1] - o4[0][1] + 1, f2 = o4[1][0] - o4[0][0] + 1, l2 && (p2 > 1 && u2.__mark(l2, "colspan", p2, m2), f2 > 1 && u2.__mark(l2, "rowspan", f2, m2), s2 && (u2.__mark(l2, "width", (s2 / t5.offsetWidth * 100).toFixed(r2.ACCURACY) + "%", m2), d3 && u2.__setColumnWidthByDelta(t5, d3, 0, true, m2)), l2.innerHTML = i4.join("<br/>"), h2(e5).addSelection(l2), g2.delete(l2), u2.__unmark(m2), u2.__normalizeTable(t5), (0, c.toArray)(t5.rows).forEach((t6, e6) => {
                  t6.cells.length || a2.J.safeRemove(t6);
                })));
              }
              mergeSelected(t5) {
                return u2.__mergeSelected(t5, this.j);
              }
              static __splitHorizontal(t5, e5) {
                let i4, o4, n3, r3, s2;
                const l2 = [];
                u2.__getSelectedCellsByTable(t5).forEach((c2) => {
                  o4 = e5.createInside.element("td"), o4.appendChild(e5.createInside.element("br")), n3 = e5.createInside.element("tr"), i4 = u2.__formalCoordinate(t5, c2), 2 > c2.rowSpan ? (u2.__formalMatrix(t5, (t6, e6, o5) => {
                    i4[0] === e6 && i4[1] !== o5 && t6 !== c2 && u2.__mark(t6, "rowspan", t6.rowSpan + 1, l2);
                  }), a2.J.after(a2.J.closest(c2, "tr", t5), n3), n3.appendChild(o4)) : (u2.__mark(c2, "rowspan", c2.rowSpan - 1, l2), u2.__formalMatrix(t5, (e6, o5, n4) => {
                    o5 > i4[0] && i4[0] + c2.rowSpan > o5 && i4[1] > n4 && e6.parentNode.rowIndex === o5 && (s2 = e6), o5 > i4[0] && e6 === c2 && (r3 = t5.rows[o5]);
                  }), s2 ? a2.J.after(s2, o4) : r3.insertBefore(o4, r3.firstChild)), c2.colSpan > 1 && u2.__mark(o4, "colspan", c2.colSpan, l2), u2.__unmark(l2), h2(e5).removeSelection(c2);
                }), this.__normalizeTable(t5);
              }
              splitHorizontal(t5) {
                return u2.__splitHorizontal(t5, this.j);
              }
              static __splitVertical(t5, e5) {
                let i4, o4, n3;
                const s2 = [];
                u2.__getSelectedCellsByTable(t5).forEach((l2) => {
                  i4 = u2.__formalCoordinate(t5, l2), 2 > l2.colSpan ? u2.__formalMatrix(t5, (t6, e6, o5) => {
                    i4[1] === o5 && i4[0] !== e6 && t6 !== l2 && u2.__mark(t6, "colspan", t6.colSpan + 1, s2);
                  }) : u2.__mark(l2, "colspan", l2.colSpan - 1, s2), o4 = e5.createInside.element("td"), o4.appendChild(e5.createInside.element("br")), l2.rowSpan > 1 && u2.__mark(o4, "rowspan", l2.rowSpan, s2);
                  const c2 = l2.offsetWidth;
                  a2.J.after(l2, o4), n3 = c2 / t5.offsetWidth / 2, u2.__mark(l2, "width", (100 * n3).toFixed(r2.ACCURACY) + "%", s2), u2.__mark(o4, "width", (100 * n3).toFixed(r2.ACCURACY) + "%", s2), u2.__unmark(s2), h2(e5).removeSelection(l2);
                }), u2.__normalizeTable(t5);
              }
              splitVertical(t5) {
                return u2.__splitVertical(t5, this.j);
              }
              static __setColumnWidthByDelta(t5, e5, i4, o4, n3) {
                const s2 = u2.__formalMatrix(t5);
                let a3 = 0;
                for (let o5 = 0; s2.length > o5; o5 += 1) {
                  const l2 = s2[o5][e5];
                  if (1 >= l2.colSpan || 1 >= s2.length) {
                    u2.__mark(l2, "width", ((l2.offsetWidth + i4) / t5.offsetWidth * 100).toFixed(r2.ACCURACY) + "%", n3), a3 = o5;
                    break;
                  }
                }
                for (let t6 = a3 + 1; s2.length > t6; t6 += 1) u2.__mark(s2[t6][e5], "width", null, n3);
                o4 || u2.__unmark(n3);
              }
              setColumnWidthByDelta(t5, e5, i4, o4, n3) {
                return u2.__setColumnWidthByDelta(t5, e5, i4, o4, n3);
              }
              static __mark(t5, e5, i4, o4) {
                var n3;
                o4.push(t5);
                const r3 = null !== (n3 = d2.get(t5)) && void 0 !== n3 ? n3 : {};
                r3[e5] = void 0 === i4 ? 1 : i4, d2.set(t5, r3);
              }
              static __unmark(t5) {
                t5.forEach((t6) => {
                  const e5 = d2.get(t6);
                  e5 && (Object.keys(e5).forEach((i4) => {
                    const o4 = e5[i4];
                    switch (i4) {
                      case "remove":
                        a2.J.safeRemove(t6);
                        break;
                      case "rowspan":
                        (0, c.attr)(t6, "rowspan", (0, c.isNumber)(o4) && o4 > 1 ? o4 : null);
                        break;
                      case "colspan":
                        (0, c.attr)(t6, "colspan", (0, c.isNumber)(o4) && o4 > 1 ? o4 : null);
                        break;
                      case "width":
                        null == o4 ? (t6.style.removeProperty("width"), (0, c.attr)(t6, "style") || (0, c.attr)(t6, "style", null)) : t6.style.width = o4.toString();
                    }
                    delete e5[i4];
                  }), d2.delete(t6));
                });
              }
            }
            u2.__selectedByTable = /* @__PURE__ */ new WeakMap(), (0, o3.Cg)([(0, s.debounce)()], u2.prototype, "__recalculateStyles", null);
            const h2 = (t5) => t5.getInstance("Table", t5.o);
          }, 3258: function(t4, e4, i3) {
            i3.d(e4, { I: function() {
              return f2;
            } });
            var o3 = i3(31635), n2 = i3(64567), r2 = i3(22664), s = i3(71842), a2 = i3(65147), l = i3(35265), c = i3(57023), d2 = i3(931), u2 = i3(80071), h2 = i3(97394), p2 = i3(8809);
            let f2 = class extends l.lD {
              className() {
                return "ToolbarButton";
              }
              get toolbar() {
                return this.closest(h2.Q);
              }
              update() {
                var t5, e5;
                const { control: i4, state: o4 } = this, n3 = this.closest(h2.Q);
                if (!n3) return;
                const r3 = null === (t5 = i4.value) || void 0 === t5 ? void 0 : t5.call(i4, n3.jodit, this);
                void 0 !== r3 && (o4.value = r3), o4.disabled = this.__calculateDisabledStatus(n3), o4.activated = this.__calculateActivatedStatus(n3), null === (e5 = i4.update) || void 0 === e5 || e5.call(i4, n3.jodit, this);
              }
              __calculateActivatedStatus(t5) {
                var e5, i4;
                return !((0, a2.isJoditObject)(this.j) && !this.j.editorIsActive) && (!!(null === (i4 = (e5 = this.control).isActive) || void 0 === i4 ? void 0 : i4.call(e5, this.j, this)) || Boolean(t5 && t5.shouldBeActive(this)));
              }
              __calculateDisabledStatus(t5) {
                var e5, i4;
                return !!this.j.o.disabled || !(!this.j.o.readonly || this.j.o.activeButtonsInReadOnly && this.j.o.activeButtonsInReadOnly.includes(this.control.name)) || !!(null === (i4 = (e5 = this.control).isDisabled) || void 0 === i4 ? void 0 : i4.call(e5, this.j, this)) || Boolean(t5 && t5.shouldBeDisabled(this));
              }
              onChangeActivated() {
                (0, a2.attr)(this.button, "aria-pressed", this.state.activated), super.onChangeActivated();
              }
              onChangeText() {
                (0, a2.isFunction)(this.control.template) ? this.text.innerHTML = this.control.template(this.j, this.control.name, this.j.i18n(this.state.text)) : super.onChangeText(), this.setMod("text-icons", Boolean(this.text.innerText.trim().length));
              }
              onChangeTabIndex() {
                (0, a2.attr)(this.button, "tabindex", this.state.tabIndex);
              }
              createContainer() {
                const t5 = this.componentName, e5 = this.j.c.span(t5), i4 = super.createContainer();
                (0, a2.attr)(e5, "role", "listitem"), i4.classList.remove(t5), i4.classList.add(t5 + "__button"), Object.defineProperty(i4, "component", { value: this }), e5.appendChild(i4);
                const o4 = this.j.c.fromHTML(`<span role="trigger" class="${t5}__trigger">${d2.I.get("chevron")}</span>`);
                return i4.appendChild(o4), e5;
              }
              focus() {
                var t5;
                null === (t5 = this.container.querySelector("button")) || void 0 === t5 || t5.focus();
              }
              onChangeHasTrigger() {
                this.state.hasTrigger ? this.container.appendChild(this.trigger) : s.J.safeRemove(this.trigger), this.setMod("with-trigger", this.state.hasTrigger || null);
              }
              onChangeDisabled() {
                const t5 = this.state.disabled ? "disabled" : null;
                (0, a2.attr)(this.trigger, "disabled", t5), (0, a2.attr)(this.button, "disabled", t5), (0, a2.attr)(this.container, "disabled", t5);
              }
              constructor(t5, e5, i4 = null) {
                super(t5), this.control = e5, this.target = i4, this.state = { ...(0, l.ue)(), theme: "toolbar", currentValue: "", hasTrigger: false }, this.openedPopup = null;
                const o4 = this.getElm("button");
                this.button = o4, Object.defineProperty(o4, "component", { value: this, configurable: true });
                const r3 = this.getElm("trigger");
                this.trigger = r3, r3.remove(), t5.e.on([this.button, this.trigger], "mousedown", (t6) => t6.preventDefault()), this.onAction(this.onClick), this.hookStatus(n2.f.ready, () => {
                  this.__initFromControl(), this.update();
                }), e5.mods && Object.keys(e5.mods).forEach((t6) => {
                  e5.mods && this.setMod(t6, e5.mods[t6]);
                });
              }
              __initFromControl() {
                var t5;
                const { control: e5, state: i4 } = this;
                this.updateSize(), i4.name = e5.name;
                const { textIcons: o4 } = this.j.o;
                if (true === o4 || (0, a2.isFunction)(o4) && o4(e5.name) || e5.template) i4.icon = (0, l.ue)().icon, i4.text = e5.text || e5.name;
                else {
                  if (e5.iconURL) i4.icon.iconURL = e5.iconURL;
                  else {
                    const o5 = e5.icon || e5.name;
                    i4.icon.name = d2.I.exists(o5) || (null === (t5 = this.j.o.extraIcons) || void 0 === t5 ? void 0 : t5[o5]) ? o5 : "";
                  }
                  e5.iconURL || i4.icon.name || (i4.text = e5.text || e5.name);
                }
                e5.tooltip && (i4.tooltip = this.j.i18n((0, a2.isFunction)(e5.tooltip) ? e5.tooltip(this.j, e5, this) : e5.tooltip)), i4.hasTrigger = Boolean(e5.list || e5.popup && e5.exec);
              }
              onTriggerClick(t5) {
                var e5, i4, o4;
                if (this.openedPopup) return void this.__closePopup();
                const { control: n3 } = this;
                if (t5.buffer = { actionTrigger: this }, n3.list) return this.__openControlList(n3);
                if ((0, a2.isFunction)(n3.popup)) {
                  const t6 = this.openPopup();
                  if (t6.parentElement = this, false !== this.j.e.fire((0, a2.camelCase)(`before-${n3.name}-open-popup`), this.target, n3, t6)) {
                    const r3 = null !== (o4 = null !== (i4 = null === (e5 = this.toolbar) || void 0 === e5 ? void 0 : e5.getTarget(this)) && void 0 !== i4 ? i4 : this.target) && void 0 !== o4 ? o4 : null, s2 = n3.popup(this.j, r3, this.__closePopup, this);
                    s2 && t6.setContent((0, a2.isString)(s2) ? this.j.c.fromHTML(s2) : s2).open(() => (0, a2.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : void 0);
                  }
                  this.j.e.fire((0, a2.camelCase)(`after-${n3.name}-open-popup`), t6.container);
                }
              }
              __openControlList(t5) {
                var e5;
                const i4 = null !== (e5 = this.jodit.options.controls) && void 0 !== e5 ? e5 : {}, o4 = (t6) => (0, c.x)(t6, i4), n3 = t5.list, r3 = this.openPopup(), s2 = (0, p2.$K)(this.j);
                r3.parentElement = this, s2.parentElement = r3, s2.mode = "vertical";
                const l2 = (e6, i5) => {
                  if ((0, a2.isString)(i5) && o4(i5)) return { name: i5.toString(), ...o4(i5) };
                  if ((0, a2.isString)(e6) && o4(e6)) return { name: e6.toString(), ...o4(e6), ..."object" == typeof i5 ? i5 : {} };
                  ((t6) => (0, a2.isPlainObject)(t6) && "title" in t6 && "value" in t6)(e6) && (i5 = e6.value, e6 = e6.title);
                  const { childTemplate: n4 } = t5, r4 = { name: e6.toString(), template: n4 && ((t6, e7, i6) => n4(t6, e7, i6, this)), exec: t5.childExec ? (e7, i6, o5) => {
                    var n5;
                    return null === (n5 = t5.childExec) || void 0 === n5 ? void 0 : n5.call(t5, e7, i6, { ...o5, parentControl: t5 });
                  } : t5.exec, data: t5.data, command: t5.command, isActive: t5.isChildActive, value: t5.value, isDisabled: t5.isChildDisabled, mode: t5.mode, args: [...t5.args ? t5.args : [], e6, i5] };
                  return (0, a2.isString)(i5) && (r4.text = i5), r4;
                };
                s2.build((0, a2.isArray)(n3) ? n3.map(l2) : (0, a2.keys)(n3, false).map((t6) => l2(t6, n3[t6])), this.target), r3.setContent(s2).open(() => (0, a2.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : void 0), this.state.activated = true;
              }
              onOutsideClick(t5) {
                this.openedPopup && (t5 && s.J.isNode(t5.target) && (s.J.isOrContains(this.container, t5.target) || this.openedPopup.isOwnClick(t5)) || this.__closePopup());
              }
              openPopup() {
                return this.__closePopup(), this.openedPopup = new u2.z(this.j, false), this.j.e.on(this.ow, "mousedown touchstart", this.onOutsideClick).on("escape closeAllPopups", this.onOutsideClick), this.openedPopup;
              }
              __closePopup() {
                this.openedPopup && (this.j.e.off(this.ow, "mousedown touchstart", this.onOutsideClick).off("escape closeAllPopups", this.onOutsideClick), this.state.activated = false, this.openedPopup.close(), this.openedPopup.destruct(), this.openedPopup = null);
              }
              onClick(t5) {
                var e5, i4, o4, n3, r3, s2, l2;
                const { control: c2 } = this;
                if ((0, a2.isFunction)(c2.exec)) {
                  const a3 = null !== (o4 = null !== (i4 = null === (e5 = this.toolbar) || void 0 === e5 ? void 0 : e5.getTarget(this)) && void 0 !== i4 ? i4 : this.target) && void 0 !== o4 ? o4 : null, d3 = c2.exec(this.j, a3, { control: c2, originalEvent: t5, button: this });
                  if (false !== d3 && true !== d3 && (null === (r3 = null === (n3 = this.j) || void 0 === n3 ? void 0 : n3.e) || void 0 === r3 || r3.fire("synchro"), this.parentElement && this.parentElement.update(), null === (l2 = null === (s2 = this.j) || void 0 === s2 ? void 0 : s2.e) || void 0 === l2 || l2.fire("closeAllPopups afterExec")), false !== d3) return;
                }
                return c2.list ? this.__openControlList(c2) : (0, a2.isFunction)(c2.popup) ? this.onTriggerClick(t5) : void ((c2.command || c2.name) && ((0, a2.call)((0, a2.isJoditObject)(this.j) ? this.j.execCommand.bind(this.j) : this.j.od.execCommand.bind(this.j.od), c2.command || c2.name, false, c2.args && c2.args[0]), this.j.e.fire("closeAllPopups")));
              }
              destruct() {
                return this.__closePopup(), super.destruct();
              }
            };
            (0, o3.Cg)([r2.cacheHTML], f2.prototype, "createContainer", null), (0, o3.Cg)([(0, r2.watch)("state.hasTrigger", { immediately: false })], f2.prototype, "onChangeHasTrigger", null), (0, o3.Cg)([(0, r2.watch)("trigger:click")], f2.prototype, "onTriggerClick", null), (0, o3.Cg)([r2.autobind], f2.prototype, "onOutsideClick", null), (0, o3.Cg)([r2.autobind], f2.prototype, "__closePopup", null), f2 = (0, o3.Cg)([r2.component], f2);
          }, 49405: function(t4, e4, i3) {
            i3.d(e4, { P: function() {
              return l;
            } });
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(71842), s = i3(65147), a2 = i3(35265);
            let l = class extends a2.lD {
              className() {
                return "ToolbarContent";
              }
              update() {
                const t5 = this.control.getContent(this.j, this);
                ((0, s.isString)(t5) || t5.parentNode !== this.container) && (r2.J.detach(this.container), this.container.appendChild((0, s.isString)(t5) ? this.j.create.fromHTML(t5) : t5)), super.update();
              }
              createContainer() {
                return this.j.c.span(this.componentName);
              }
              constructor(t5, e5, i4 = null) {
                super(t5), this.control = e5, this.target = i4, this.container.classList.add(`${this.componentName}_${this.clearName(e5.name)}`), (0, s.attr)(this.container, "role", "content");
              }
            };
            l = (0, o3.Cg)([n2.component], l);
          }, 5832: function(t4, e4, i3) {
            i3.d(e4, { IB: function() {
              return o3.I;
            }, P1: function() {
              return n2.P;
            }, q4: function() {
              return r2.q;
            } });
            var o3 = i3(3258), n2 = i3(49405), r2 = i3(48053);
          }, 48053: function(t4, e4, i3) {
            i3.d(e4, { q: function() {
              return a2;
            } });
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(98253), s = i3(3258);
            let a2 = class extends s.I {
              className() {
                return "ToolbarSelect";
              }
              update() {
                var t5, e5, i4;
                super.update(), this.state.icon.name = "";
                const { list: o4, data: n3 } = this.control;
                if (o4) {
                  let s2 = this.state.value || (n3 && (0, r2.K)(n3.currentValue) ? n3.currentValue : void 0);
                  s2 || (s2 = Object.keys(o4)[0]);
                  const a3 = (o4[s2.toString()] || s2).toString();
                  this.state.text = null !== (i4 = null === (e5 = (t5 = this.control).textTemplate) || void 0 === e5 ? void 0 : e5.call(t5, this.jodit, a3)) && void 0 !== i4 ? i4 : a3;
                }
              }
            };
            a2 = (0, o3.Cg)([n2.component], a2);
          }, 97394: function(t4, e4, i3) {
            i3.d(e4, { Q: function() {
              return l;
            } });
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(76166), s = i3(53048), a2 = i3(8809);
            let l = class extends s.z4 {
              className() {
                return "ToolbarCollection";
              }
              get firstButton() {
                const [t5] = this.buttons;
                return t5 || null;
              }
              makeButton(t5, e5 = null) {
                return (0, a2.BJ)(this.j, t5, e5);
              }
              makeSelect(t5, e5 = null) {
                return (0, a2.RR)(this.j, t5, e5);
              }
              shouldBeActive(t5) {
              }
              shouldBeDisabled(t5) {
              }
              getTarget(t5) {
                return t5.target || null;
              }
              __immediateUpdate() {
                this.isDestructed || this.j.isLocked || (super.update(), this.j.e.fire("afterUpdateToolbar", this));
              }
              update() {
                this.__immediateUpdate();
              }
              setDirection(t5) {
                this.container.style.direction = t5, this.container.setAttribute("dir", t5);
              }
              constructor(t5) {
                super(t5), this.__listenEvents = "updatePlugins updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur", this.__tooltip = new s.SB(this.jodit);
              }
              __initEvents() {
                this.j.e.on(this.__listenEvents, this.update).on("afterSetMode focus", this.__immediateUpdate);
              }
              hide() {
                this.container.remove();
              }
              show() {
                this.appendTo(this.j.toolbarContainer);
              }
              showInline(t5) {
                throw (0, r2.z3)("The method is not implemented for this class.");
              }
              build(t5, e5 = null) {
                const i4 = this.j.e.fire("beforeToolbarBuild", t5);
                return i4 && (t5 = i4), super.build(t5, e5), this;
              }
              destruct() {
                var t5;
                this.isDestructed || (null === (t5 = this.__tooltip) || void 0 === t5 || t5.destruct(), this.__tooltip = null, this.j.e.off(this.__listenEvents, this.update).off("afterSetMode focus", this.__immediateUpdate), super.destruct());
              }
            };
            (0, o3.Cg)([n2.autobind], l.prototype, "__immediateUpdate", null), (0, o3.Cg)([(0, n2.debounce)()], l.prototype, "update", null), (0, o3.Cg)([(0, n2.hook)("ready")], l.prototype, "__initEvents", null), l = (0, o3.Cg)([n2.component], l);
          }, 90428: function(t4, e4, i3) {
            i3.d(e4, { b: function() {
              return c;
            } });
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(71842), a2 = i3(65147), l = i3(97394);
            let c = class extends l.Q {
              className() {
                return "ToolbarEditorCollection";
              }
              shouldBeDisabled(t5) {
                const e5 = super.shouldBeDisabled(t5);
                if (void 0 !== e5) return e5;
                const i4 = void 0 === t5.control.mode ? n2.MODE_WYSIWYG : t5.control.mode;
                return !(i4 === n2.MODE_SPLIT || i4 === this.j.getRealMode());
              }
              shouldBeActive(t5) {
                const e5 = super.shouldBeActive(t5);
                if (void 0 !== e5) return e5;
                const i4 = this.j.selection ? this.j.s.current() : null;
                if (!i4) return false;
                let o4;
                if (t5.control.tags) {
                  const e6 = t5.control.tags;
                  if (o4 = i4, s.J.up(o4, (t6) => {
                    if (t6 && -1 !== e6.indexOf(t6.nodeName.toLowerCase())) return true;
                  }, this.j.editor)) return true;
                }
                if (t5.control.css) {
                  const e6 = t5.control.css;
                  if (o4 = i4, s.J.up(o4, (t6) => {
                    if (t6 && !s.J.isText(t6) && !s.J.isComment(t6)) return this.checkActiveStatus(e6, t6);
                  }, this.j.editor)) return true;
                }
                return false;
              }
              getTarget(t5) {
                return t5.target || this.j.s.current() || null;
              }
              constructor(t5) {
                super(t5), this.checkActiveStatus = (t6, e5) => {
                  let i4 = 0, o4 = 0;
                  return Object.keys(t6).forEach((n3) => {
                    const r3 = t6[n3];
                    (0, a2.isFunction)(r3) ? r3(this.j, (0, a2.css)(e5, n3).toString()) && (i4 += 1) : -1 !== r3.indexOf((0, a2.css)(e5, n3).toString()) && (i4 += 1), o4 += 1;
                  }), o4 === i4;
                }, this.prependInvisibleInput(this.container);
              }
              prependInvisibleInput(t5) {
                const e5 = this.j.create.element("input", { tabIndex: -1, disabled: true, style: "width: 0; height:0; position: absolute; visibility: hidden;" });
                s.J.appendChildFirst(t5, e5);
              }
              showInline(t5) {
                this.jodit.e.fire("showInlineToolbar", t5);
              }
              hide() {
                this.jodit.e.fire("hidePopup"), super.hide(), this.jodit.e.fire("toggleToolbar");
              }
              show() {
                super.show(), this.jodit.e.fire("toggleToolbar");
              }
            };
            c = (0, o3.Cg)([r2.component], c);
          }, 8809: function(t4, e4, i3) {
            i3.d(e4, { $K: function() {
              return c;
            }, BJ: function() {
              return d2;
            }, RR: function() {
              return u2;
            } });
            var o3 = i3(65147), n2 = i3(3258), r2 = i3(49405), s = i3(48053), a2 = i3(97394), l = i3(90428);
            function c(t5, e5) {
              const i4 = (0, o3.isJoditObject)(t5) ? new l.b(t5) : new a2.Q(t5);
              return t5.o.textIcons && i4.container.classList.add("jodit_text_icons"), e5 && (i4.parentElement = e5), t5.o.toolbarButtonSize && (i4.buttonSize = t5.o.toolbarButtonSize), i4;
            }
            function d2(t5, e5, i4 = null) {
              if ((0, o3.isFunction)(e5.getContent)) return new r2.P(t5, e5, i4);
              const s2 = new n2.I(t5, e5, i4);
              return s2.state.tabIndex = t5.o.allowTabNavigation ? 0 : -1, s2;
            }
            function u2(t5, e5, i4 = null) {
              return new s.q(t5, e5, i4);
            }
          }, 77334: function(t4, e4, i3) {
            var o3 = i3(37923), n2 = i3(83044), r2 = i3(36115);
            r2.T.prototype.enableDragAndDropFileToEditor = true, r2.T.prototype.uploader = { url: "", insertImageAsBase64URI: false, imagesExtensions: ["jpg", "png", "jpeg", "gif"], headers: null, data: null, filesVariableName: (t5) => `files[${t5}]`, withCredentials: false, pathVariableName: "path", format: "json", method: "POST", prepareData: (t5) => t5, isSuccess: (t5) => t5.success, getMessage: (t5) => void 0 !== t5.data.messages && (0, o3.c)(t5.data.messages) ? t5.data.messages.join(" ") : "", processFileName: (t5, e5, i4) => [t5, e5, i4], process: (t5) => t5.data, error(t5) {
              this.j.message.error(t5.message, 4e3);
            }, getDisplayName: (t5, e5) => t5 + e5, defaultHandlerSuccess(t5) {
              const e5 = this.j || this;
              (0, n2.y)(e5) && t5.files && t5.files.length && t5.files.forEach((i4, o4) => {
                const [n3, r3] = t5.isImages && t5.isImages[o4] ? ["img", "src"] : ["a", "href"], s = e5.createInside.element(n3);
                s.setAttribute(r3, t5.baseurl + i4), "a" === n3 && (s.textContent = e5.o.uploader.getDisplayName.call(this, t5.baseurl, i4)), "img" === n3 ? e5.s.insertImage(s, null, e5.o.imageDefaultWidth) : e5.s.insertNode(s);
              });
            }, defaultHandlerError(t5) {
              this.j.message.error(t5.message);
            }, contentType(t5) {
              return (void 0 === this.ow.FormData || "string" == typeof t5) && "application/x-www-form-urlencoded; charset=UTF-8";
            } };
          }, 89929: function(t4, e4, i3) {
            i3.d(e4, { $: function() {
              return n2;
            } });
            var o3 = i3(65147);
            function n2(t5, e5) {
              if ((0, o3.isFunction)(t5.o.buildData)) return t5.o.buildData.call(t5, e5);
              const i4 = t5.ow.FormData;
              if (void 0 !== i4) {
                if (e5 instanceof i4) return e5;
                if ((0, o3.isString)(e5)) return e5;
                const t6 = new i4(), n3 = e5;
                return Object.keys(n3).forEach((e6) => {
                  t6.append(e6, n3[e6]);
                }), t6;
              }
              return e5;
            }
          }, 51923: function(t4, e4, i3) {
            function o3(t5) {
              const e5 = atob(t5.split(",")[1]), i4 = t5.split(",")[0].split(":")[1].split(";")[0], o4 = new ArrayBuffer(e5.length), n2 = new Uint8Array(o4);
              for (let t6 = 0; e5.length > t6; t6 += 1) n2[t6] = e5.charCodeAt(t6);
              return new Blob([n2], { type: i4 });
            }
            i3.d(e4, { z: function() {
              return o3;
            } });
          }, 74340: function(t4, e4, i3) {
            i3.d(e4, { $j: function() {
              return r2.$;
            }, Pb: function() {
              return l;
            }, YQ: function() {
              return a2;
            }, _9: function() {
              return s._;
            }, dT: function() {
              return n2.d;
            }, tN: function() {
              return r2.t;
            }, zM: function() {
              return o3.z;
            } }), i3(89929);
            var o3 = i3(51923), n2 = i3(84759), r2 = i3(27912), s = i3(74714);
            function a2(t5) {
              return Boolean(t5 && t5.files && t5.files.length > 0);
            }
            function l(t5) {
              return Boolean(t5 && t5.items && t5.items.length > 0);
            }
          }, 84759: function(t4, e4, i3) {
            i3.d(e4, { d: function() {
              return l;
            } });
            var o3 = i3(17352), n2 = i3(71842), r2 = i3(56298), s = i3(65147), a2 = i3(74340);
            function l(t5, e5, i4, l2, c) {
              if (e5 && (!e5.types.length || e5.types[0] !== o3.TEXT_PLAIN)) {
                const e6 = t5.j.c.div("", { tabindex: -1, style: "left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;", contenteditable: true });
                (0, r2.My)(t5.j, t5.constructor).appendChild(e6);
                const o4 = (0, s.isJoditObject)(t5.j) ? t5.j.s.save() : null, d2 = () => o4 && (0, s.isJoditObject)(t5.j) && t5.j.s.restore();
                e6.focus(), t5.j.async.setTimeout(() => {
                  const o5 = e6.firstChild;
                  if (n2.J.safeRemove(e6), o5 && o5.hasAttribute("src")) {
                    const e7 = (0, s.attr)(o5, "src") || "";
                    d2(), (0, a2._9)(t5, [(0, a2.zM)(e7)], i4, l2).finally(c);
                  }
                }, t5.j.defaultTimeout);
              }
            }
          }, 74714: function(t4, e4, i3) {
            i3.d(e4, { _: function() {
              return r2;
            } });
            var o3 = i3(65147), n2 = i3(27912);
            function r2(t5, e5, i4, r3, s) {
              if (!e5) return Promise.reject((0, o3.error)("Need files"));
              const { o: a2 } = t5;
              let l = (0, o3.toArray)(e5);
              if (!l.length) return Promise.reject((0, o3.error)("Need files"));
              const c = [];
              if (a2.insertImageAsBase64URI) {
                let e6, n3;
                for (n3 = 0; l.length > n3; n3 += 1) if (e6 = l[n3], e6 && e6.type) {
                  const r4 = e6.type.match(/\/([a-z0-9]+)/i), s2 = r4[1] ? r4[1].toLowerCase() : "";
                  if (a2.imagesExtensions.includes(s2)) {
                    const r5 = new FileReader();
                    c.push(t5.j.async.promise((n4, s3) => {
                      r5.onerror = s3, r5.onloadend = () => {
                        const e7 = { baseurl: "", files: [r5.result], isImages: [true] };
                        ((0, o3.isFunction)(i4) ? i4 : a2.defaultHandlerSuccess).call(t5, e7), n4(e7);
                      }, r5.readAsDataURL(e6);
                    })), l[n3] = null;
                  }
                }
              }
              if (l = l.filter((t6) => t6), l.length) {
                const e6 = new FormData();
                let d2;
                e6.append(a2.pathVariableName, t5.path), e6.append("source", t5.source);
                for (let i5 = 0; l.length > i5; i5 += 1) if (d2 = l[i5], d2) {
                  const o4 = /\.[\d\w]+$/.test(d2.name), n3 = d2.type.match(/\/([a-z0-9]+)/i), r4 = n3 && n3[1] ? n3[1].toLowerCase() : "";
                  let s2 = l[i5].name || Math.random().toString().replace(".", "");
                  if (!o4 && r4) {
                    let t6 = r4;
                    ["jpeg", "jpg"].includes(t6) && (t6 = "jpeg|jpg"), new RegExp(".(" + t6 + ")$", "i").test(s2) || (s2 += "." + r4);
                  }
                  const [c2, u2, h2] = a2.processFileName.call(t5, a2.filesVariableName(i5), l[i5], s2);
                  e6.append(c2, u2, h2);
                }
                s && s(e6), a2.data && (0, o3.isPlainObject)(a2.data) && Object.keys(a2.data).forEach((t6) => {
                  e6.append(t6, a2.data[t6]);
                }), a2.prepareData.call(t5, e6), c.push((0, n2.t)(t5, e6).then((e7) => a2.isSuccess.call(t5, e7) ? (((0, o3.isFunction)(i4) ? i4 : a2.defaultHandlerSuccess).call(t5, a2.process.call(t5, e7)), e7) : (((0, o3.isFunction)(r3) ? r3 : a2.defaultHandlerError).call(t5, (0, o3.error)(a2.getMessage.call(t5, e7))), e7)).then(() => {
                  t5.j.events && t5.j.e.fire("filesWereUploaded");
                }));
              }
              return Promise.all(c);
            }
          }, 27912: function(t4, e4, i3) {
            i3.d(e4, { $: function() {
              return s;
            }, t: function() {
              return a2;
            } });
            var o3 = i3(65147), n2 = i3(53883), r2 = i3(89929);
            const s = /* @__PURE__ */ new WeakMap();
            function a2(t5, e5) {
              const i4 = (0, r2.$)(t5, e5), a3 = (e6) => {
                const i5 = new n2.d({ xhr: () => {
                  const e7 = new XMLHttpRequest();
                  return void 0 !== t5.j.ow.FormData && e7.upload ? (t5.j.progressbar.show().progress(10), e7.upload.addEventListener("progress", (e8) => {
                    if (e8.lengthComputable) {
                      let i6 = e8.loaded / e8.total;
                      i6 *= 100, t5.j.progressbar.show().progress(i6), 100 > i6 || t5.j.progressbar.hide();
                    }
                  }, false)) : t5.j.progressbar.hide(), e7;
                }, method: t5.o.method || "POST", data: e6, url: (0, o3.isFunction)(t5.o.url) ? t5.o.url(e6) : t5.o.url, headers: t5.o.headers, queryBuild: t5.o.queryBuild, contentType: t5.o.contentType.call(t5, e6), withCredentials: t5.o.withCredentials || false });
                let r3 = s.get(t5);
                return r3 || (r3 = /* @__PURE__ */ new Set(), s.set(t5, r3)), r3.add(i5), t5.j.e.one("beforeDestruct", i5.destruct), i5.send().then((t6) => t6.json()).catch((t6) => ({ success: false, data: { messages: [t6] } })).finally(() => {
                  i5.destruct(), null == r3 || r3.delete(i5);
                });
              };
              return (0, o3.isPromise)(i4) ? i4.then(a3).catch((e6) => {
                t5.o.error.call(t5, e6);
              }) : a3(i4);
            }
          }, 26538: function(t4, e4, i3) {
            i3.d(e4, { d: function() {
              return l;
            } });
            var o3 = i3(77753), n2 = i3(17352), r2 = i3(65147), s = i3(74340), a2 = (i3(77334), i3(36115));
            class l extends o3.vG {
              get j() {
                return this.jodit;
              }
              className() {
                return "Uploader";
              }
              get o() {
                return this.options;
              }
              setPath(t5) {
                return this.path = t5, this;
              }
              setSource(t5) {
                return this.source = t5, this;
              }
              bind(t5, e5, i4) {
                const o4 = () => {
                  t5.classList.remove("jodit_drag_hover");
                }, r3 = this, a3 = (t6) => {
                  let a4, l2, c;
                  const d2 = t6.clipboardData, u2 = (t7) => {
                    l2 && (t7.append("extension", c), t7.append("mimetype", l2.type));
                  };
                  if (!n2.IS_IE && (0, s.YQ)(d2)) return (0, s._9)(r3, d2.files, e5, i4).finally(o4), false;
                  if (n2.IS_IE && !n2.IS_ES_NEXT) return (0, s.dT)(r3, d2, e5, i4, o4);
                  if ((0, s.Pb)(d2)) {
                    const { items: n3 } = d2;
                    for (a4 = 0; n3.length > a4; a4 += 1) if ("file" === n3[a4].kind && "image/png" === n3[a4].type) {
                      if (l2 = n3[a4].getAsFile(), l2) {
                        const t7 = l2.type.match(/\/([a-z0-9]+)/i);
                        c = t7[1] ? t7[1].toLowerCase() : "", (0, s._9)(r3, [l2], e5, i4, u2).finally(o4);
                      }
                      t6.preventDefault();
                      break;
                    }
                  }
                };
                r3.j && r3.j.editor !== t5 ? r3.j.e.on(t5, "paste", a3) : r3.j.e.on("beforePaste", a3), this.attachEvents(t5, e5, i4, o4);
              }
              attachEvents(t5, e5, i4, o4) {
                const n3 = this;
                n3.j.e.on(t5, "dragend dragover dragenter dragleave drop", (t6) => {
                  t6.preventDefault();
                }).on(t5, "dragover", (e6) => {
                  ((0, s.YQ)(e6.dataTransfer) || (0, s.Pb)(e6.dataTransfer)) && (t5.classList.add("jodit_drag_hover"), e6.preventDefault());
                }).on(t5, "dragend dragleave", (e6) => {
                  t5.classList.remove("jodit_drag_hover"), (0, s.YQ)(e6.dataTransfer) && e6.preventDefault();
                }).on(t5, "drop", (r4) => {
                  t5.classList.remove("jodit_drag_hover"), (0, s.YQ)(r4.dataTransfer) && (r4.preventDefault(), r4.stopImmediatePropagation(), (0, s._9)(n3, r4.dataTransfer.files, e5, i4).finally(o4));
                });
                const r3 = t5.querySelector("input[type=file]");
                r3 && n3.j.e.on(r3, "change", () => {
                  (0, s._9)(n3, r3.files, e5, i4).then(() => {
                    r3.value = "", /safari/i.test(navigator.userAgent) || (r3.type = "", r3.type = "file");
                  }).finally(o4);
                });
              }
              uploadRemoteImage(t5, e5, i4) {
                const o4 = this, { o: n3 } = o4, a3 = (0, r2.isFunction)(i4) ? i4 : n3.defaultHandlerError;
                (0, s.tN)(o4, { action: "fileUploadRemote", url: t5 }).then((t6) => {
                  n3.isSuccess.call(o4, t6) ? ((0, r2.isFunction)(e5) ? e5 : n3.defaultHandlerSuccess).call(o4, n3.process.call(o4, t6)) : a3.call(o4, (0, r2.error)(n3.getMessage.call(o4, t6)));
                }).catch((t6) => a3.call(o4, t6));
              }
              constructor(t5, e5) {
                super(t5), this.path = "", this.source = "default", this.options = (0, r2.ConfigProto)(e5 || {}, (0, r2.ConfigProto)(a2.T.defaultOptions.uploader, (0, r2.isJoditObject)(t5) ? t5.o.uploader : {}));
              }
              destruct() {
                this.setStatus(o3.f.beforeDestruct);
                const t5 = s.$j.get(this);
                t5 && (t5.forEach((t6) => {
                  try {
                    t6.destruct();
                  } catch (t7) {
                  }
                }), t5.clear()), super.destruct();
              }
            }
          }, 19633: function(t4, e4, i3) {
            i3.d(e4, { K: function() {
              return a2;
            } });
            var o3 = i3(71842), n2 = i3(65147), r2 = i3(53048), s = i3(54522);
            r2.In.set("palette", i3.n(s)());
            const a2 = (t5, e5, i4) => {
              const s2 = "jodit-color-picker", a3 = (0, n2.normalizeColor)(i4), l = t5.c.div(s2), c = t5.o.textIcons ? `<span>${t5.i18n("palette")}</span>` : r2.In.get("palette"), d2 = (t6) => {
                const e6 = [];
                return (0, n2.isPlainObject)(t6) ? Object.keys(t6).forEach((i5) => {
                  e6.push(`<div class="${s2}__group ${s2}__group-${i5}">`), e6.push(d2(t6[i5])), e6.push("</div>");
                }) : (0, n2.isArray)(t6) && t6.forEach((t7) => {
                  e6.push(`<span class='${s2}__color-item ${a3 === t7 ? s2 + "__color-item_active_true" : ""}' title="${t7}" style="background-color:${t7}" data-color="${t7}"></span>`);
                }), e6.join("");
              };
              l.appendChild(t5.c.fromHTML(`<div class="${s2}__groups">${d2(t5.o.colors)}</div>`)), l.appendChild(t5.c.fromHTML(`<div data-ref="extra" class="${s2}__extra"></div>`));
              const { extra: u2 } = (0, n2.refs)(l);
              return t5.o.showBrowserColorPicker && (0, n2.hasBrowserColorPicker)() && (u2.appendChild(t5.c.fromHTML(`<div class="${s2}__native">${c}<input type="color" value="#ffffff"/></div>`)), t5.e.on(l, "change", (t6) => {
                t6.stopPropagation();
                const i5 = t6.target;
                if (!i5 || !i5.tagName || !o3.J.isTag(i5, "input")) return;
                const r3 = i5.value || "";
                (0, n2.isFunction)(e5) && e5(r3), t6.preventDefault();
              })), t5.e.on(l, "mousedown touchend", (i5) => {
                i5.stopPropagation(), i5.preventDefault();
                let r3 = i5.target;
                if (r3 && r3.tagName && !o3.J.isTag(r3, "svg") && !o3.J.isTag(r3, "path") || !r3.parentNode || (r3 = o3.J.closest(r3.parentNode, "span", t5.editor)), !o3.J.isTag(r3, "span") || !r3.classList.contains(s2 + "__color-item")) return;
                const a4 = (0, n2.attr)(r3, "-color") || "";
                e5 && (0, n2.isFunction)(e5) && e5(a4);
              }), t5.e.fire("afterGenerateColorPicker", l, u2, e5, a3), l;
            };
          }, 10067: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return a2;
            } });
            var o3 = i3(55186), n2 = i3(65147), r2 = i3(53048), s = i3(4909);
            const a2 = (t5, e5, i4, a3, c = true) => {
              let d2;
              const u2 = [];
              if (e5.upload && t5.o.uploader && (t5.o.uploader.url || t5.o.uploader.insertImageAsBase64URI)) {
                const i5 = t5.c.fromHTML(`<div class="jodit-drag-and-drop__file-box"><strong>${t5.i18n(c ? "Drop image" : "Drop file")}</strong><span><br>${t5.i18n("or click")}</span><input type="file" accept="${c ? "image/*" : "*"}" tabindex="-1" dir="auto" multiple=""/></div>`);
                t5.uploader.bind(i5, (i6) => {
                  const o4 = (0, n2.isFunction)(e5.upload) ? e5.upload : t5.o.uploader.defaultHandlerSuccess;
                  (0, n2.isFunction)(o4) && o4.call(t5, i6), t5.e.fire("closeAllPopups");
                }, (e6) => {
                  t5.message.error(e6.message), t5.e.fire("closeAllPopups");
                }), u2.push({ icon: "upload", name: "Upload", content: i5 });
              }
              if (e5.filebrowser && (t5.o.filebrowser.ajax.url || t5.o.filebrowser.items.url) && u2.push({ icon: "folder", name: "Browse", content: () => {
                a3 && a3(), e5.filebrowser && t5.filebrowser.open(e5.filebrowser, c);
              } }), e5.url) {
                const s2 = new r2.lD(t5, { type: "submit", variant: "primary", text: "Insert" }), a4 = new r2.XV(t5, [new r2.tS(t5, { required: true, label: "URL", name: "url", type: "text", placeholder: "https://" }), new r2.tS(t5, { name: "text", label: "Alternative text" }), new r2.Yh(t5, [s2])]);
                d2 = null, !i4 || o3.J.isText(i4) || o3.J.isComment(i4) || !o3.J.isTag(i4, "img") && !(0, n2.$$)("img", i4).length || (d2 = "IMG" === i4.tagName ? i4 : (0, n2.$$)("img", i4)[0], l(a4.container, "input[name=url]", (0, n2.attr)(d2, "src")), l(a4.container, "input[name=text]", (0, n2.attr)(d2, "alt")), s2.state.text = "Update"), i4 && o3.J.isTag(i4, "a") && (l(a4.container, "input[name=url]", (0, n2.attr)(i4, "href")), l(a4.container, "input[name=text]", (0, n2.attr)(i4, "title")), s2.state.text = "Update"), a4.onSubmit((i5) => {
                  (0, n2.isFunction)(e5.url) && e5.url.call(t5, i5.url, i5.text);
                }), u2.push({ icon: "link", name: "URL", content: a4.container });
              }
              return (0, s.Z)(t5, u2);
            };
            function l(t5, e5, i4) {
              const o4 = t5.querySelector(e5);
              return o4 ? (i4 && (o4.value = i4), o4.value) : "";
            }
          }, 16116: function(t4, e4, i3) {
            i3.d(e4, { Kn: function() {
              return o3.K;
            }, Zg: function() {
              return r2.Z;
            }, kG: function() {
              return n2.k;
            } });
            var o3 = i3(19633), n2 = i3(10067), r2 = i3(4909);
          }, 4909: function(t4, e4, i3) {
            i3.d(e4, { Z: function() {
              return l;
            } });
            var o3 = i3(77753), n2 = i3(55186), r2 = i3(65147), s = i3(69052), a2 = i3(53048);
            const l = (t5, e5, i4) => {
              const l2 = t5.c.div("jodit-tabs"), c = t5.c.div("jodit-tabs__wrapper"), d2 = t5.c.div("jodit-tabs__buttons"), u2 = {}, h2 = [];
              let p2 = "", f2 = 0;
              l2.appendChild(d2), l2.appendChild(c);
              const g2 = (t6) => {
                u2[t6] && (h2.forEach((t7) => {
                  t7.state.variant = "initial", t7.state.activated = false;
                }), (0, r2.$$)(".jodit-tab", c).forEach((t7) => {
                  t7.classList.remove("jodit-tab_active");
                }), u2[t6].button.state.variant = "outline", u2[t6].button.state.activated = true, u2[t6].tab.classList.add("jodit-tab_active"));
              };
              if (e5.forEach(({ icon: r3, name: l3, content: m2 }) => {
                const b2 = t5.c.div("jodit-tab"), _2 = (0, a2.$n)(t5, r3 || l3, l3);
                t5.e.on(_2.container, "mousedown", (t6) => t6.preventDefault()), p2 || (p2 = l3), d2.appendChild(_2.container), h2.push(_2), _2.container.classList.add("jodit-tabs__button", "jodit-tabs__button_columns_" + e5.length), (0, s.T)(m2) ? b2.appendChild(t5.c.div("jodit-tab_empty")) : b2.appendChild(o3.uA.isInstanceOf(m2, a2.D$) ? m2.container : m2), c.appendChild(b2), _2.onAction(() => (g2(l3), (0, s.T)(m2) && !n2.J.isElement(m2) && m2.call(t5), i4 && (i4.activeTab = l3), false)), u2[l3] = { button: _2, tab: b2 }, f2 += 1;
              }), !f2) return l2;
              if ((0, r2.$$)("a", d2).forEach((t6) => {
                t6.style.width = (100 / f2).toFixed(10) + "%";
              }), g2(i4 && i4.activeTab && u2[i4.activeTab] ? i4.activeTab : p2), i4) {
                let t6 = i4.activeTab;
                Object.defineProperty(i4, "activeTab", { configurable: true, enumerable: false, get: () => t6, set(e6) {
                  t6 = e6, g2(e6);
                } });
              }
              return l2;
            };
          }, 14221: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(65147), s = i3(931), a2 = i3(17995), l = i3.n(a2);
            i3(36115).T.prototype.controls.about = { exec: (t5) => {
              const e5 = t5.dlg({ closeOnClickOverlay: true }), i4 = t5.i18n.bind(t5);
              e5.setMod("theme", t5.o.theme).setHeader(i4("About Jodit")).setContent(`<div class="jodit-about">
					<div>${i4("Jodit Editor")} v.${t5.getVersion()}</div>
					<div>${i4("License: %s", (0, r2.isLicense)(t5.o.license) ? (0, r2.normalizeLicense)(t5.o.license) : "MIT")}</div>
					<div>
						<a href="${o3.HOMEPAGE}" target="_blank">${o3.HOMEPAGE}</a>
					</div>
					<div>
						<a href="https://xdsoft.net/jodit/docs/" target="_blank">${i4("Jodit User's Guide")}</a>
						${i4("contains detailed help for using")}
					</div>
					<div>${i4("Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.")}</div>
				</div>`), (0, r2.css)(e5.dialog, { minHeight: 200, minWidth: 420 }), e5.open(true, true);
            }, tooltip: "About Jodit", mode: o3.MODE_SOURCE + o3.MODE_WYSIWYG }, n2.fg.add("about", function(t5) {
              t5.registerButton({ name: "about", group: "info" });
            }), s.I.set("about", l());
          }, 55989: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(56298), s = i3(65147), a2 = i3(37435);
            i3(84018);
            const l = "addnewline";
            class c extends a2.Plugin {
              constructor() {
                super(...arguments), this.__line = this.j.c.fromHTML(`<div role="button" tabindex="-1" title="${this.j.i18n("Break")}" class="jodit-add-new-line"><span>${a2.Icon.get("enter")}</span></div>`), this.__isMatchedTag = (t5) => Boolean(t5 && this.j.o.addNewLineTagsTriggers.includes(t5.nodeName.toLowerCase())), this.__isBeforeContent = false, this.__lineInFocus = false, this.__isShown = false, this.__hideForce = () => {
                  this.__isShown && (this.__isShown = false, this.j.async.clearTimeout(this.__timeout), this.__lineInFocus = false, a2.Dom.safeRemove(this.__line), this.__line.style.setProperty("--jd-anl-handle-offset", "0"));
                }, this.__canGetFocus = (t5) => null != t5 && a2.Dom.isBlock(t5) && !/^(img|table|iframe|hr)$/i.test(t5.nodeName), this.__onClickLine = (t5) => {
                  const e5 = this.j, i4 = e5.createInside.element(e5.o.enter);
                  this.__isBeforeContent && this.__current && this.__current.parentNode ? this.__current === e5.editor ? a2.Dom.prepend(e5.editor, i4) : this.__current.parentNode.insertBefore(i4, this.__current) : e5.editor.appendChild(i4), e5.s.setCursorIn(i4), (0, s.scrollIntoViewIfNeeded)(i4, e5.editor, e5.ed), e5.synchronizeValues(), this.__hideForce(), t5.preventDefault();
                };
              }
              __show() {
                this.j.o.readonly || this.j.isLocked || (this.j.async.clearTimeout(this.__timeout), this.__isShown || (this.__isShown = true, this.j.container.appendChild(this.__line), this.__line.style.width = this.j.container.clientWidth + "px"));
              }
              onLock(t5) {
                t5 && this.__isShown && this.__hideForce();
              }
              __hide() {
                this.__isShown && !this.__lineInFocus && (this.__timeout = this.j.async.setTimeout(this.__hideForce, { timeout: 500, label: "add-new-line-hide" }));
              }
              afterInit(t5) {
                t5.o.addNewLine && (t5.e.on(this.__line, "mousemove", (t6) => {
                  t6.stopPropagation();
                }).on(this.__line, "mousedown touchstart", this.__onClickLine).on("change", this.__hideForce).on(this.__line, "mouseenter", () => {
                  this.j.async.clearTimeout(this.__timeout), this.__lineInFocus = true;
                }).on(this.__line, "mouseleave", () => {
                  this.__lineInFocus = false;
                }).on("changePlace", this.__addEventListeners.bind(this)), this.__addEventListeners());
              }
              __addEventListeners() {
                const t5 = this.j;
                t5.e.off(t5.editor, "." + l).off(t5.container, "." + l).on([t5.ow, t5.ew, t5.editor], "scroll." + l, this.__hideForce).on(t5.editor, "click." + l, this.__hide).on(t5.container, "mouseleave." + l, this.__hide).on(t5.editor, "mousemove." + l, this.__onMouseMove);
              }
              onDblClickEditor(t5) {
                const e5 = this.j;
                if (!e5.o.readonly && e5.o.addNewLineOnDBLClick && t5.target === e5.editor && e5.s.isCollapsed()) {
                  const i4 = (0, s.offset)(e5.editor, e5, e5.ed), o4 = t5.pageY - e5.ew.scrollX, n3 = e5.createInside.element(e5.o.enter);
                  Math.abs(o4 - i4.top) < Math.abs(o4 - (i4.height + i4.top)) && e5.editor.firstChild ? e5.editor.insertBefore(n3, e5.editor.firstChild) : e5.editor.appendChild(n3), e5.s.setCursorIn(n3), e5.synchronizeValues(), this.__hideForce(), t5.preventDefault();
                }
              }
              __onMouseMove(t5) {
                const e5 = this.j;
                let i4 = e5.ed.elementFromPoint(t5.clientX, t5.clientY);
                if (!a2.Dom.isHTMLElement(i4) || !a2.Dom.isOrContains(e5.editor, i4)) return;
                if (e5.editor === i4 || this.__isMatchedTag(i4) || (i4 = a2.Dom.closest(i4, this.__isMatchedTag, e5.editor)), !i4) return void this.__hide();
                if (this.__isMatchedTag(i4)) {
                  const t6 = a2.Dom.up(i4, a2.Dom.isBlock, e5.editor);
                  t6 && t6 !== e5.editor && (i4 = t6);
                }
                const o4 = (0, s.position)(i4, this.j);
                let n3 = false, { clientY: r3, clientX: l2 } = t5;
                if (this.j.iframe) {
                  const { top: t6, left: e6 } = (0, s.position)(this.j.iframe, this.j, true);
                  r3 += t6, l2 += e6;
                }
                const c2 = this.j.o.addNewLineDeltaShow;
                Math.abs(r3 - o4.top) > c2 ? Math.abs(r3 - (o4.top + o4.height)) > c2 || (n3 = o4.top + o4.height, this.__isBeforeContent = false) : (n3 = o4.top, this.__isBeforeContent = true);
                const d2 = e5.editor === i4;
                false !== n3 && (d2 && !this.__isBeforeContent || !d2 && !(0, s.call)(this.__isBeforeContent ? a2.Dom.prev : a2.Dom.next, i4, this.__canGetFocus, e5.editor)) ? (this.__line.style.top = n3 + "px", this.__current = i4, this.__show(), this.__line.style.setProperty("--jd-anl-handle-offset", l2 - o4.left - 10 + "px")) : (this.__current = false, this.__hide());
              }
              beforeDestruct() {
                this.j.async.clearTimeout(this.__timeout), this.j.e.off(this.__line).off("changePlace", this.__addEventListeners), a2.Dom.safeRemove(this.__line), this.j.e.off([this.j.ow, this.j.ew, this.j.editor], "." + l).off(this.j.container, "." + l);
              }
            }
            (0, o3.Cg)([(0, n2.watch)(":lock")], c.prototype, "onLock", null), (0, o3.Cg)([n2.autobind], c.prototype, "__hide", null), (0, o3.Cg)([(0, n2.watch)(":dblclick")], c.prototype, "onDblClickEditor", null), (0, o3.Cg)([(0, n2.throttle)((t5) => t5.defaultTimeout)], c.prototype, "__onMouseMove", null), r2.fg.add("addNewLine", c);
          }, 84018: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(86634), r2 = i3.n(n2), s = i3(36115);
            s.T.prototype.addNewLine = true, s.T.prototype.addNewLineOnDBLClick = true, s.T.prototype.addNewLineTagsTriggers = ["table", "iframe", "img", "hr", "pre", "jodit"], s.T.prototype.addNewLineDeltaShow = 20, o3.I.set("enter", r2());
          }, 64241: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(87875), r2 = i3(66927), s = i3(56298), a2 = i3(99951), l = i3(29866), c = (i3(66888), i3(20785)), d2 = i3(81026);
            class u2 extends l.k {
              get __dialog() {
                return this.jodit.dlg({ buttons: ["fullsize", "dialog.close"], closeOnClickOverlay: true, closeOnEsc: true, resizable: false, draggable: true, minHeight: 160 });
              }
              get __container() {
                const { jodit: t5, __dialog: e5 } = this;
                return new c.b(t5, { onInsertAfter(i4) {
                  t5.s.focus(), t5.s.setCursorAfter(t5.s.current()), t5.s.insertHTML(i4), e5.close();
                }, onInsert(i4) {
                  t5.s.focus(), t5.s.insertHTML(i4), e5.close();
                } });
              }
              constructor(t5) {
                super(t5), this.buttons = [{ name: "ai-commands", group: "insert" }, { name: "ai-assistant", group: "insert" }], (0, s.JW)(d2);
              }
              afterInit() {
              }
              onGenerateAiAssistantForm(t5) {
                this.__dialog.open(this.__container, "AI Assistant"), this.__container.setPrompt(t5);
              }
              onInvokeAiAssistant(t5) {
                const { jodit: e5 } = this;
                e5.s.focus();
                const i4 = e5.s.html;
                e5.async.promise(async (o4, n3) => {
                  try {
                    o4(await e5.o.aiAssistant.aiAssistantCallback(t5, i4));
                  } catch (t6) {
                    n3(t6);
                  }
                }).then((t6) => {
                  e5.e.fire("ai-assistant-response", t6);
                }).catch((t6) => {
                  (0, a2.z)(t6) || (e5.message.error(t6.message), e5.e.fire("ai-assistant-error", t6.message));
                });
              }
              beforeDestruct(t5) {
                var e5, i4;
                null === (e5 = (0, n2.PO)(this, "__container")) || void 0 === e5 || e5.destruct(), null === (i4 = (0, n2.PO)(this, "__dialog")) || void 0 === i4 || i4.destruct();
              }
            }
            (0, o3.Cg)([n2.PP], u2.prototype, "__dialog", null), (0, o3.Cg)([n2.PP], u2.prototype, "__container", null), (0, o3.Cg)([(0, r2.w)(":generateAiAssistantForm.ai-assistant")], u2.prototype, "onGenerateAiAssistantForm", null), (0, o3.Cg)([(0, r2.w)(":invokeAiAssistant")], u2.prototype, "onInvokeAiAssistant", null), s.fg.add("ai-assistant", u2);
          }, 66888: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(91115), r2 = i3.n(n2), s = i3(1916), a2 = i3.n(s), l = i3(36115);
            l.T.prototype.aiAssistant = { aiCommonPrefixPrompt: "", aiCommonSuffixPrompt: "", aiImproveWritingPrompt: "It needs to be refined for better clarity, coherence, and overall quality. Please enhance the writing style while keeping the original meaning and language intact.", aiMakeShorterPrompt: "Please condense this content to make it more concise, while preserving the key messages, language and information.", aiMakeLongerPrompt: "Expand on this content to provide more detail, depth, and richness, without diverging from the original message and language.", aiSimplifyLanguagePrompt: "The language used here needs to be simplified for easier understanding, without altering the core information and the original language.", aiSummarizePrompt: "Provide a brief summary of this content, capturing the essential points in a concise manner. Preserve the original language and meaning.", aiContinuePrompt: "Continue the narrative or discussion from this content seamlessly, maintaining the same language, tone and style.", aiChangeToneProfessionalPrompt: "Adjust the tone to be professional, suitable for a formal business or academic setting, while retaining the original message and language.", aiChangeToneFriendlyPrompt: "It needs to be rewritten in a friendly tone while maintaining the original message and language. Please modify this content to be warm, approachable, and engaging.", aiChangeToneFormalPrompt: "Transform this content to have a formal tone, appropriate for official or serious contexts, without changing the main points and language.", aiChangeToneCasualPrompt: "Revise this content to have a casual, relaxed tone, making it feel more personal and less formal, without changing the original meaning and language.", aiChangeToneDirectPrompt: "Make the tone more direct, with straightforward language and a clear, assertive approach, without changing the original meaning and language.", aiChangeToneConfidentPrompt: "Infuse this content with a confident tone, showcasing assurance and decisiveness, without changing the original meaning and language.", aiChangeStyleBusinessPrompt: "Rewrite this content with a business-oriented style, focusing on clarity, efficiency, and professionalism, without changing the original meaning and language.", aiChangeStyleLegalPrompt: "Adapt this content to a legal style, incorporating appropriate terminology and formality typical of legal documents, without changing the original meaning and language.", aiChangeStyleJournalismPrompt: "Convert this content into a journalistic style, emphasizing factual accuracy, objectivity, and informative reporting, without changing the original meaning and language.", aiChangeStylePoeticPrompt: "Recreate this content with a poetic style, using expressive language, rhythm, and imagery to convey the message, without changing the original meaning and language.", aiTranslateToSpanishPrompt: "Translate this content into Spanish, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToFrenchPrompt: "Translate this content into French, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToGermanPrompt: "Translate this content into German, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToItalianPrompt: "Translate this content into Italian, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToPortuguesePrompt: "Translate this content into Portuguese, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToEnglishPrompt: "Translate this content into English, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToChinesePrompt: "Translate this content into Chinese, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToJapanesePrompt: "Translate this content into Japanese, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToKoreanPrompt: "Translate this content into Korean, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToRussianPrompt: "Translate this content into Russian, ensuring the translation is accurate and maintains the original meaning.", aiTranslateToArabicPrompt: "Translate this content into Arabic, ensuring the translation is accurate and maintains the original meaning." }, o3.I.set("ai-assistant", a2()), o3.I.set("ai-commands", r2()), l.T.prototype.controls["ai-commands"] = { isDisabled: (t5) => !t5.o.aiAssistant.aiAssistantCallback, tooltip: "AI Commands", list: { aiImproveWritingPrompt: "Improve writing", aiMakeShorterPrompt: "Make shorter", aiMakeLongerPrompt: "Make longer", aiSimplifyLanguagePrompt: "Simplify language", aiSummarizePrompt: "Summarize", aiContinuePrompt: "Continue", aiChangeToneProfessionalPrompt: "Change tone to professional", aiChangeToneFriendlyPrompt: "Change tone to friendly", aiChangeToneFormalPrompt: "Change tone to formal", aiChangeToneCasualPrompt: "Change tone to casual", aiChangeToneDirectPrompt: "Change tone to direct", aiChangeToneConfidentPrompt: "Change tone to confident", aiChangeStyleBusinessPrompt: "Change style to business", aiChangeStyleLegalPrompt: "Change style to legal", aiChangeStyleJournalismPrompt: "Change style of journalism", aiChangeStylePoeticPrompt: "Change style to poetic", aiTranslateToSpanishPrompt: "Translate to Spanish", aiTranslateToFrenchPrompt: "Translate to French", aiTranslateToGermanPrompt: "Translate to German", aiTranslateToItalianPrompt: "Translate to Italian", aiTranslateToPortuguesePrompt: "Translate to Portuguese", aiTranslateToEnglishPrompt: "Translate to English", aiTranslateToChinesePrompt: "Translate to Chinese", aiTranslateToJapanesePrompt: "Translate to Japanese", aiTranslateToKoreanPrompt: "Translate to Korean", aiTranslateToRussianPrompt: "Translate to Russian", aiTranslateToArabicPrompt: "Translate to Arabic" }, exec: (t5, e5, { control: i4 }) => {
              t5.e.fire("generateAiAssistantForm.ai-assistant", i4.name);
            } }, l.T.prototype.controls["ai-assistant"] = { isDisabled: (t5) => !t5.o.aiAssistant.aiAssistantCallback, hotkeys: ["ctrl+a+i", "cmd+a+i"], tooltip: "AI Assistant", exec: (t5, e5, i4) => {
              t5.e.fire("generateAiAssistantForm.ai-assistant");
            } };
          }, 82585: function(t4) {
            t4.exports = { aiAssistant: "AI Assistant", aiCommands: "AI Commands", "AI Assistant": "AI Assistant", Prompt: "Prompt", "Ask AI to improve generated text": "Ask AI to improve generated text", Submit: "Submit" };
          }, 68942: function(t4) {
            t4.exports = { aiAssistant: "Asistente de IA", aiCommands: "Comandos de IA", "AI Assistant": "Asistente de IA", "AI Commands": "Comandos de IA", "Improve writing": "Mejorar escritura", "Make shorter": "Hacer más corto", "Make longer": "Hacer más largo", "Simplify language": "Simplificar lenguaje", Summarize: "Resumir", Continue: "Continuar", Prompt: "Solicitud", Insert: "Insertar", "Insert After": "Insertar después", "Try Again": "Intentar de nuevo", "Ask AI to improve generated text": "Pida a la IA que mejore el texto generado", "Change tone to professional": "Cambiar tono a profesional", "Change tone to friendly": "Cambiar tono a amigable", "Change tone to formal": "Cambiar tono a formal", "Change tone to casual": "Cambiar tono a casual", "Change tone to direct": "Cambiar tono a directo", "Change tone to confident": "Cambiar tono a confiado", "Change tone to business": "Cambiar tono a empresarial", "Change style to legal": "Cambiar estilo a legal", "Change style to journalism": "Cambiar estilo a periodístico", "Change style to poetic": "Cambiar estilo a poético", "Translate to Spanish": "Traducir al español", "Translate to French": "Traducir al francés", "Translate to German": "Traducir al alemán", "Translate to Italian": "Traducir al italiano", "Translate to Portuguese": "Traducir al portugués", "Translate to English": "Traducir al inglés", "Translate to Chinese": "Traducir al chino", "Translate to Japanese": "Traducid al japonés", "Translate to Korean": "Traducir al coreano", "Translate to Russian": "Traducir al ruso", "Translate to Arabic": "Traducir al árabe", Submit: "Enviar" };
          }, 81026: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { en: function() {
              return o3;
            }, es: function() {
              return n2;
            } });
            var o3 = i3(82585), n2 = i3(68942);
          }, 20785: function(t4, e4, i3) {
            i3.d(e4, { b: function() {
              return d2;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(66927), s = i3(55186), a2 = i3(98253), l = i3(53048), c = i3(29780);
            let d2 = class extends c.D {
              className() {
                return "UIAiAssistant";
              }
              constructor(t5, { onInsert: e5, onInsertAfter: i4 }) {
                super(t5), this.__aiResult = "", this.__error = this.getElm("error"), this.__body = this.getElm("body"), this.__buttons = this.getElm("buttons"), this.__results = this.getElm("results"), this.__spinner = this.getElm("spinner"), this.__insertButton = (0, l.$n)(t5, "", "Insert", "primary").onAction(() => e5(this.__aiResult)), this.__insertAfterButton = (0, l.$n)(t5, "", "Insert After", "initial").onAction(() => i4(this.__aiResult));
                const o4 = () => {
                  this.__formAiAssistant.validate() && (this.__formAiAssistant.submit(), this.__toggleInsertButton(true), this.__toggleSubmitButton(true));
                };
                this.__submitButton = (0, l.$n)(t5, "ai-assistant", "").onAction(o4), this.__tryAgainButton = (0, l.$n)(t5, "update", "", "initial").onAction(o4), this.promptInput = new l.F0(t5, { name: "prompt", required: true, label: "Prompt", placeholder: "Ask AI to improve generated text", className: this.getFullElName("prompt-row-input") });
                const n3 = new l.Yh(t5, [this.__insertButton, this.__insertAfterButton, this.__tryAgainButton], { className: this.getFullElName("prompt-row") });
                this.__formAiAssistant = new l.XV(t5, [new l.Yh(t5, [this.promptInput, this.__submitButton], { className: this.getFullElName("prompt-row") })]).onSubmit((e6) => {
                  this.__error.textContent = "", this.setMod("loading", true), t5.e.fire("invokeAiAssistant", e6.prompt);
                  const i5 = this.getFullElName("", "hide", "true");
                  this.__results.classList.remove(i5), this.__buttons.classList.remove(i5), s.J.detach(this.__results), this.__results.appendChild(this.__spinner), this.__insertButton.focus();
                }), this.__buttons.appendChild(n3.container), this.__body.appendChild(this.__formAiAssistant.container), this.onChangePromptValue();
              }
              render() {
                return '<div>\n				<div class="&__container">\n						<div class="&__error"></div>\n						<div class="&__body"></div>\n						<div class="&__buttons &_hide_true"></div>\n						<div class="&__results &_hide_true">\n								<div class="&__spinner"></div>\n						</div>\n				</div>\n		</div>';
              }
              setPrompt(t5) {
                if (t5) {
                  const { jodit: e5 } = this, i4 = e5.o.aiAssistant[t5], { aiCommonPrefixPrompt: o4, aiCommonSuffixPrompt: n3 } = e5.o.aiAssistant;
                  this.promptInput.value = [o4, (0, a2.K)(i4) ? i4 : "", n3].filter(Boolean).join(" "), this.__toggleInsertButton(true), this.promptInput.value && (this.__formAiAssistant.submit(), this.__toggleSubmitButton(true));
                }
                this.promptInput.focus();
              }
              onAiAssistentResponse(t5) {
                this.setMod("loading", false), s.J.detach(this.__results), this.__aiResult = t5, this.__results.appendChild(this.jodit.c.fromHTML(t5)), this.__toggleSubmitButton(false), this.__toggleInsertButton(false);
              }
              onAiAssistentError(t5) {
                this.__aiResult = "", this.setMod("loading", false), this.__error.textContent = t5, s.J.detach(this.__results), this.__toggleSubmitButton(false);
                const e5 = this.getFullElName("", "hide", "true");
                this.__results.classList.add(e5), this.__toggleInsertButton(true);
              }
              onChangePromptValue() {
                this.__toggleSubmitButton(!this.promptInput.value);
              }
              __toggleSubmitButton(t5) {
                this.__submitButton.state.disabled = t5, this.__tryAgainButton.state.disabled = t5;
              }
              __toggleInsertButton(t5) {
                this.__insertButton.state.disabled = t5, this.__insertAfterButton.state.disabled = t5;
              }
            };
            (0, o3.Cg)([(0, r2.w)(":ai-assistant-response")], d2.prototype, "onAiAssistentResponse", null), (0, o3.Cg)([(0, r2.w)(":ai-assistant-error")], d2.prototype, "onAiAssistentError", null), (0, o3.Cg)([(0, r2.w)("promptInput:change")], d2.prototype, "onChangePromptValue", null), d2 = (0, o3.Cg)([n2.s], d2);
          }, 13917: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(71842), r2 = i3(56298), s = i3(69052), a2 = i3(71005), l = i3(46602), c = (i3(81982), i3(90084)), d2 = i3(89832);
            class u2 extends a2.k {
              afterInit(t5) {
                t5.registerCommand("deleteButton", { exec: () => this.onDelete(false), hotkeys: t5.o.delete.hotkeys.delete }, { stopPropagation: false }).registerCommand("backspaceButton", { exec: () => this.onDelete(true), hotkeys: t5.o.delete.hotkeys.backspace }, { stopPropagation: false }).registerCommand("deleteWordButton", { exec: () => this.onDelete(false, "word"), hotkeys: t5.o.delete.hotkeys.deleteWord }).registerCommand("backspaceWordButton", { exec: () => this.onDelete(true, "word"), hotkeys: t5.o.delete.hotkeys.backspaceWord }).registerCommand("deleteSentenceButton", { exec: () => this.onDelete(false, "sentence"), hotkeys: t5.o.delete.hotkeys.deleteSentence }).registerCommand("backspaceSentenceButton", { exec: () => this.onDelete(true, "sentence"), hotkeys: t5.o.delete.hotkeys.backspaceSentence });
              }
              beforeDestruct(t5) {
                t5.e.off("afterCommand.delete");
              }
              onDelete(t5, e5 = "char") {
                const i4 = this.j, r3 = i4.selection;
                if (r3.isFocused() || r3.focus(), (0, c.L)(i4)) return false;
                const a3 = r3.range, u3 = i4.createInside.text(o3.INVISIBLE_SPACE);
                try {
                  if (n2.J.safeInsertNode(a3, u3), !n2.J.isOrContains(i4.editor, u3)) return;
                  if (i4.e.fire("backSpaceBeforeCases", t5, u3)) return false;
                  if ((0, l.W)(i4, u3, t5), d2.C.some((o4) => {
                    if ((0, s.T)(o4) && o4(i4, u3, t5, e5)) return true;
                  })) return false;
                } catch (t6) {
                  throw t6;
                } finally {
                  i4.e.fire("backSpaceAfterDelete", t5, u3), this.safeRemoveEmptyNode(u3);
                }
                return false;
              }
              safeRemoveEmptyNode(t5) {
                var e5, i4;
                const { range: o4 } = this.j.s;
                o4.startContainer === t5 && (t5.previousSibling ? n2.J.isText(t5.previousSibling) ? o4.setStart(t5.previousSibling, null !== (i4 = null === (e5 = t5.previousSibling.nodeValue) || void 0 === e5 ? void 0 : e5.length) && void 0 !== i4 ? i4 : 0) : o4.setStartAfter(t5.previousSibling) : t5.nextSibling && (n2.J.isText(t5.nextSibling) ? o4.setStart(t5.nextSibling, 0) : o4.setStartBefore(t5.nextSibling)), o4.collapse(true), this.j.s.selectRange(o4)), n2.J.safeRemove(t5);
              }
            }
            u2.requires = ["hotkeys"], r2.fg.add("backspace", u2);
          }, 43327: function(t4, e4, i3) {
            i3.d(e4, { E: function() {
              return s;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(81779);
            function s(t5, e5, i4) {
              let r3 = e5, s2 = r3;
              for (; r3 && !n2.J.findNotEmptySibling(r3, i4) && r3.parentElement !== t5.editor; ) r3 = r3.parentElement, s2 = r3;
              if (n2.J.isElement(s2) && n2.J.isContentEditable(s2, t5.editor)) {
                const r4 = n2.J.findNotEmptySibling(s2, i4);
                if (r4 && (function(t6, e6, i5, r5) {
                  const s3 = n2.J.isTag(i5, o3.LIST_TAGS), l = n2.J.isTag(e6, o3.LIST_TAGS), c = (t7, e7) => e7 ? t7.firstElementChild : t7.lastElementChild;
                  return l ? (i5 = t6.createInside.element(t6.o.enterBlock), n2.J.before(e6, i5), a2(t6, c(e6, r5), i5, r5)) : !(!i5 || !s3 || l) && a2(t6, e6, c(i5, !r5), r5);
                }(t5, s2, r4, i4) || a2(t5, s2, r4, i4))) return t5.s.setCursorBefore(e5), true;
              }
              return false;
            }
            function a2(t5, e5, i4, o4) {
              if (e5 && n2.J.isElement(i4)) {
                n2.J.moveContent(e5, i4, !o4, (0, r2.g)(t5));
                let s2 = e5;
                for (; s2 && s2 !== t5.editor && n2.J.isEmpty(s2); ) {
                  const t6 = s2.parentElement;
                  n2.J.safeRemove(s2), s2 = t6;
                }
                return true;
              }
              return false;
            }
          }, 72874: function(t4, e4, i3) {
            i3.d(e4, { a: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(84976), r2 = i3(81779);
            function s(t5, e5, i4) {
              const s2 = o3.J.findSibling(e5, i4), a2 = o3.J.findSibling(e5, !i4);
              if (!o3.J.closest(e5, o3.J.isElement, t5.editor) && o3.J.isList(s2) && o3.J.isList(a2) && o3.J.isTag(s2.lastElementChild, "li") && o3.J.isTag(a2.firstElementChild, "li")) {
                const { setCursorBefore: l, setCursorAfter: c } = t5.s, d2 = s2.lastElementChild;
                return (0, n2.T1)(i4 ? o3.J.prepend : o3.J.append, a2.firstElementChild, e5), o3.J.moveContent(a2, s2, !i4, (0, r2.g)(t5)), o3.J.safeRemove(a2), (0, n2.T1)(i4 ? o3.J.append : o3.J.prepend, d2, e5), (0, n2.T1)(i4 ? l : c, e5), true;
              }
              return false;
            }
          }, 90084: function(t4, e4, i3) {
            function o3(t5) {
              return !t5.s.isCollapsed() && (t5.execCommand("Delete"), true);
            }
            i3.d(e4, { L: function() {
              return o3;
            } });
          }, 81486: function(t4, e4, i3) {
            i3.d(e4, { H: function() {
              return a2;
            } });
            var o3 = i3(17352), n2 = i3(71842), r2 = i3(65147), s = i3(81779);
            function a2(t5, e5, i4, l) {
              var c, d2, u2;
              const h2 = i4 ? -1 : 1, p2 = n2.J.sibling(e5, !i4);
              let f2, g2 = n2.J.sibling(e5, i4), m2 = null, b2 = false;
              const _2 = (e6) => {
                let o4 = n2.J.sibling(e6, i4);
                return !o4 && e6.parentNode && e6.parentNode !== t5.editor && (o4 = (0, s.s)(e6, !i4, t5.editor, true)), o4;
              };
              for (g2 || (g2 = _2(e5)); g2 && (n2.J.isText(g2) || n2.J.isInlineBlock(g2)); ) {
                for (; n2.J.isInlineBlock(g2); ) g2 = i4 ? null == g2 ? void 0 : g2.lastChild : null == g2 ? void 0 : g2.firstChild;
                if (!g2) break;
                if (null === (c = g2.nodeValue) || void 0 === c ? void 0 : c.length) {
                  let t6 = (0, r2.toArray)(g2.nodeValue);
                  const e6 = t6.length;
                  let s3 = i4 ? e6 - 1 : 0;
                  if (t6[s3] === o3.INVISIBLE_SPACE) for (; t6[s3] === o3.INVISIBLE_SPACE; ) s3 += h2;
                  if (f2 = t6[s3], t6[s3 + h2] === o3.INVISIBLE_SPACE) {
                    for (s3 += h2; t6[s3] === o3.INVISIBLE_SPACE; ) s3 += h2;
                    s3 += i4 ? 1 : -1;
                  }
                  if (t6 = i4 && 0 > s3 ? [] : t6.slice(i4 ? 0 : s3 + 1, i4 ? s3 : e6), !p2 || !n2.J.isText(p2) || (i4 ? /^ / : / $/).test(null !== (d2 = p2.nodeValue) && void 0 !== d2 ? d2 : "") || !(0, r2.trimInv)(p2.nodeValue || "").length) for (let e7 = i4 ? t6.length - 1 : 0; (i4 ? e7 >= 0 : t6.length > e7) && " " === t6[e7]; e7 += i4 ? -1 : 1) t6[e7] = o3.NBSP_SPACE;
                  g2.nodeValue = t6.join("");
                }
                if ((null === (u2 = g2.nodeValue) || void 0 === u2 ? void 0 : u2.length) || (m2 = g2), !(0, r2.isVoid)(f2) && f2 !== o3.INVISIBLE_SPACE) {
                  b2 = true, (0, r2.call)(i4 ? n2.J.after : n2.J.before, g2, e5), ("sentence" === l || "word" === l && " " !== f2 && f2 !== o3.NBSP_SPACE) && a2(t5, e5, i4, l);
                  break;
                }
                const s2 = _2(g2);
                m2 && (n2.J.safeRemove(m2), m2 = null), g2 = s2;
              }
              return m2 && (n2.J.safeRemove(m2), m2 = null), b2 && (function(t6, e6) {
                let i5 = t6.parentElement;
                for (; i5 && n2.J.isInlineBlock(i5) && n2.J.isTag(i5, "a"); ) {
                  const e7 = i5.parentElement;
                  n2.J.isEmpty(i5) && (n2.J.after(i5, t6), n2.J.safeRemove(i5)), i5 = e7;
                }
              }(e5), function(t6, e6) {
                e6.parentElement !== t6.editor && n2.J.isBlock(e6.parentElement) && n2.J.each(e6.parentElement, n2.J.isEmptyTextNode) && n2.J.after(e6, t6.createInside.element("br"));
              }(t5, e5), t5.s.setCursorBefore(e5), n2.J.isTag(e5.previousSibling, "br") && !n2.J.findNotEmptySibling(e5, false) && n2.J.after(e5, t5.createInside.element("br"))), b2;
            }
          }, 29822: function(t4, e4, i3) {
            i3.d(e4, { V: function() {
              return s;
            } });
            var o3 = i3(71842), n2 = i3(65147), r2 = i3(46602);
            function s(t5, e5, i4) {
              let s2 = o3.J.findSibling(e5, i4);
              return !s2 && e5.parentElement && e5.parentElement !== t5.editor && (s2 = o3.J.findSibling(e5.parentElement, i4)), !(!o3.J.isElement(s2) || o3.J.isContentEditable(s2, t5.editor) || ((0, n2.call)(i4 ? o3.J.before : o3.J.after, s2, e5), o3.J.safeRemove(s2), (0, r2.W)(t5, e5, i4), (0, n2.call)(i4 ? t5.s.setCursorBefore : t5.s.setCursorAfter, e5), 0));
            }
          }, 59988: function(t4, e4, i3) {
            i3.d(e4, { _: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4) {
              const n3 = o3.J.closest(e5, o3.J.isElement, t5.editor);
              if (!n3) return false;
              const r2 = o3.J.findNotEmptySibling(n3, i4);
              return !(!r2 || !o3.J.isEmpty(r2) || (o3.J.safeRemove(r2), t5.s.setCursorBefore(e5), 0));
            }
          }, 42898: function(t4, e4, i3) {
            i3.d(e4, { C: function() {
              return s;
            } });
            var o3 = i3(17352), n2 = i3(71842), r2 = i3(72874);
            function s(t5, e5, i4) {
              let s2 = false;
              const { setCursorBefore: a2, setCursorIn: l } = t5.s;
              let c = n2.J.closest(e5, n2.J.isElement, t5.editor);
              if (!c || !n2.J.isEmpty(c)) return false;
              const d2 = n2.J.findNotEmptyNeighbor(e5, i4, t5.editor);
              do {
                if (!c || !n2.J.isEmpty(c) || n2.J.isCell(c)) break;
                {
                  n2.J.after(c, e5);
                  const i5 = n2.J.closest(c, (t6) => n2.J.isElement(t6) && t6 !== c, t5.editor);
                  n2.J.safeRemove(c), s2 = true, c = i5;
                }
              } while (c);
              return !(!s2 || !(0, r2.a)(t5, e5, i4)) || (!d2 || n2.J.isText(d2) || n2.J.isTag(d2, o3.INSEPARABLE_TAGS) ? a2(e5) : l(d2, !i4), s2);
            }
          }, 84323: function(t4, e4, i3) {
            i3.d(e4, { f: function() {
              return s;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(42898);
            function s(t5, e5, i4) {
              const s2 = n2.J.findSibling(e5, i4);
              return !(!n2.J.isElement(s2) || !n2.J.isTag(s2, o3.INSEPARABLE_TAGS) && !n2.J.isEmpty(s2) || (n2.J.safeRemove(s2), n2.J.isTag(s2, "br") && !n2.J.findNotEmptySibling(e5, false) && n2.J.after(e5, t5.createInside.element("br")), t5.s.setCursorBefore(e5), n2.J.isTag(s2, "br") && (0, r2.C)(t5, e5, i4), 0));
            }
          }, 94766: function(t4, e4, i3) {
            i3.d(e4, { R: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5) {
              return !!o3.J.isCell(e5.parentElement);
            }
          }, 89708: function(t4, e4, i3) {
            i3.d(e4, { B: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(97369);
            function r2(t5, e5, i4) {
              var r3;
              const s = o3.J.closest(e5, o3.J.isElement, t5.editor), { s: a2 } = t5;
              if (o3.J.isLeaf(s) && (null === (r3 = null == s ? void 0 : s.parentElement) || void 0 === r3 ? void 0 : r3[i4 ? "firstElementChild" : "lastElementChild"]) === s && a2.cursorInTheEdge(i4, s)) {
                const r4 = s.parentElement, l = t5.createInside.element(t5.o.enterBlock);
                return (0, n2.call)(i4 ? o3.J.before : o3.J.after, r4, l), o3.J.moveContent(s, l), o3.J.safeRemove(s), o3.J.isEmpty(r4) && o3.J.safeRemove(r4), (0, n2.call)(i4 ? a2.setCursorBefore : a2.setCursorAfter, e5), true;
              }
              return false;
            }
          }, 89832: function(t4, e4, i3) {
            i3.d(e4, { C: function() {
              return h2;
            } });
            var o3 = i3(43327), n2 = i3(72874), r2 = i3(81486), s = i3(29822), a2 = i3(59988), l = i3(42898), c = i3(84323), d2 = i3(94766), u2 = i3(89708);
            const h2 = [c.f, s.V, r2.H, d2.R, l.C, a2._, n2.a, o3.E, u2.B];
          }, 81982: function(t4, e4, i3) {
            i3(36115).T.prototype.delete = { hotkeys: { delete: ["delete", "cmd+backspace"], deleteWord: ["ctrl+delete", "cmd+alt+backspace", "ctrl+alt+backspace"], deleteSentence: ["ctrl+shift+delete", "cmd+shift+delete"], backspace: ["backspace"], backspaceWord: ["ctrl+backspace"], backspaceSentence: ["ctrl+shift+backspace", "cmd+shift+backspace"] } };
          }, 81779: function(t4, e4, i3) {
            i3.d(e4, { g: function() {
              return r2;
            }, s: function() {
              return n2;
            } });
            var o3 = i3(71842);
            function n2(t5, e5, i4, n3 = false) {
              const r3 = (t6) => e5 ? t6.firstChild : t6.lastChild;
              let s = o3.J.findNotEmptyNeighbor(t5, !e5, i4);
              if (n3 && o3.J.isElement(s) && !o3.J.isInlineBlock(s)) return null;
              if (s) do {
                if (!r3(s)) return s;
                s = r3(s);
              } while (s);
              return null;
            }
            function r2(t5) {
              return (e5) => true !== t5.e.fire("backSpaceIsMovedIgnore", e5);
            }
          }, 49289: function(t4, e4, i3) {
            var o3 = i3(56298), n2 = i3(65147), r2 = i3(931), s = (i3(73124), i3(52450)), a2 = i3.n(s), l = i3(41111), c = i3.n(l), d2 = i3(49972), u2 = i3.n(d2), h2 = i3(45062), p2 = i3.n(h2), f2 = i3(18605), g2 = i3.n(f2), m2 = i3(83389), b2 = i3.n(m2), _2 = i3(36115);
            o3.fg.add("bold", function(t5) {
              const e5 = (e6) => {
                const i4 = _2.T.defaultOptions.controls[e6], o4 = { ...i4.css };
                let r3;
                return Object.keys(o4).forEach((t6) => {
                  r3 || (r3 = {}), r3[t6] = (0, n2.isArray)(o4[t6]) ? o4[t6][0] : o4[t6];
                }), t5.s.commitStyle({ element: i4.tags ? i4.tags[0] : void 0 }), t5.synchronizeValues(), false;
              };
              ["bold", "italic", "underline", "strikethrough"].forEach((e6) => {
                t5.registerButton({ name: e6, group: "font-style" });
              }), ["superscript", "subscript"].forEach((e6) => {
                t5.registerButton({ name: e6, group: "script" });
              }), t5.registerCommand("bold", { exec: e5, hotkeys: ["ctrl+b", "cmd+b"] }).registerCommand("italic", { exec: e5, hotkeys: ["ctrl+i", "cmd+i"] }).registerCommand("underline", { exec: e5, hotkeys: ["ctrl+u", "cmd+u"] }).registerCommand("strikethrough", { exec: e5 }).registerCommand("subscript", { exec: e5 }).registerCommand("superscript", { exec: e5 });
            }), r2.I.set("bold", a2()).set("italic", c()).set("strikethrough", u2()).set("subscript", p2()).set("superscript", g2()).set("underline", b2());
          }, 73124: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.controls.subscript = { tags: ["sub"], tooltip: "subscript" }, o3.T.prototype.controls.superscript = { tags: ["sup"], tooltip: "superscript" }, o3.T.prototype.controls.bold = { tagRegExp: /^(strong|b)$/i, tags: ["strong", "b"], css: { "font-weight": ["bold", "700"] }, tooltip: "Bold" }, o3.T.prototype.controls.italic = { tagRegExp: /^(em|i)$/i, tags: ["em", "i"], css: { "font-style": "italic" }, tooltip: "Italic" }, o3.T.prototype.controls.underline = { tagRegExp: /^(u)$/i, tags: ["u"], css: { "text-decoration-line": "underline" }, tooltip: "Underline" }, o3.T.prototype.controls.strikethrough = { tagRegExp: /^(s)$/i, tags: ["s"], css: { "text-decoration-line": "line-through" }, tooltip: "Strike through" };
          }, 98341: function(t4, e4, i3) {
            var o3 = i3(55186), n2 = i3(56298), r2 = i3(84976), s = i3(71005), a2 = i3(931), l = i3(93267), c = i3.n(l);
            i3(36115).T.prototype.controls.classSpan = { command: "applyClassName", exec: r2.qN, list: ["enabled", "disabled", "activated", "text-left", "text-center", "text-right", "warning", "error"], isChildActive: (t5, e5) => {
              const i4 = t5.s.current();
              if (i4) {
                const n3 = o3.J.closest(i4, o3.J.isElement, t5.editor) || t5.editor;
                return Boolean(e5.control.args && n3.classList.contains(e5.control.args[0].toString()));
              }
              return false;
            }, isActive: (t5, e5) => {
              const i4 = t5.s.current();
              if (i4) {
                const n3 = o3.J.closest(i4, o3.J.isElement, t5.editor) || t5.editor;
                let r3 = false;
                return e5.control.list && Object.keys(e5.control.list).forEach((t6) => {
                  n3.classList.contains(t6) && (r3 = true);
                }), Boolean(n3 && n3 !== t5.editor && void 0 !== e5.control.list && r3);
              }
              return false;
            }, childTemplate: (t5, e5, i4) => `<span class="${e5}">${t5.i18n(i4)}</span>`, tooltip: "Insert className" }, n2.fg.add("classSpan", class extends s.k {
              constructor() {
                super(...arguments), this.buttons = [{ name: "classSpan", group: "script" }];
              }
              afterInit(t5) {
                t5.registerCommand("applyClassName", (e5, i4, o4) => (t5.s.commitStyle({ attributes: { class: o4 } }), false));
              }
              beforeDestruct() {
              }
            }), a2.I.set("class-span", c());
          }, 38101: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(55186), s = i3(8453), a2 = i3(56298), l = i3(26328), c = i3(29866), d2 = (i3(74646), i3(15396));
            class u2 extends c.k {
              constructor() {
                super(...arguments), this.buttons = [{ name: "eraser", group: "font-style" }], this.currentSelectionNode = null, this.walker = new s.p(this.j.async, { timeout: this.j.o.cleanHTML.timeout });
              }
              afterInit(t5) {
              }
              get isEditMode() {
                return !(this.j.isInDestruct || !this.j.isEditorMode() || this.j.getReadOnly());
              }
              onChangeCleanHTML() {
                if (!this.isEditMode) return;
                const t5 = this.j;
                this.walker.setWork(t5.editor), this.currentSelectionNode = t5.s.current();
              }
              startWalker() {
                const { jodit: t5 } = this, e5 = (0, d2.Zd)(this.j.o.cleanHTML.allowTags), i4 = (0, d2.Zd)(this.j.o.cleanHTML.denyTags);
                this.walker.on("visit", (o4) => (0, d2.eZ)(t5, o4, e5, i4, this.currentSelectionNode)).on("end", (t6) => {
                  this.j.e.fire(t6 ? "internalChange finishedCleanHTMLWorker" : "finishedCleanHTMLWorker");
                });
              }
              beforeCommand(t5) {
                if ("removeformat" === t5.toLowerCase()) return this.j.s.isCollapsed() ? (0, d2.w5)(this.j) : (0, d2.hk)(this.j), false;
              }
              onBeforeSetNativeEditorValue(t5) {
                const [e5, i4] = this.j.o.cleanHTML.useIframeSandbox ? this.j.createInside.sandbox() : [this.j.createInside.div()];
                return e5.innerHTML = t5.value, this.onSafeHTML(e5), t5.value = e5.innerHTML, (0, l.t)(e5, { safeJavaScriptLink: true, removeOnError: true }), r2.J.safeRemove(i4), false;
              }
              onSafeHTML(t5) {
                (0, l.t)(t5, this.j.o.cleanHTML);
              }
              beforeDestruct() {
                this.walker.destruct();
              }
            }
            (0, o3.Cg)([(0, n2.watch)([":change", ":afterSetMode", ":afterInit", ":mousedown", ":keydown"])], u2.prototype, "onChangeCleanHTML", null), (0, o3.Cg)([(0, n2.hook)("ready")], u2.prototype, "startWalker", null), (0, o3.Cg)([(0, n2.watch)(":beforeCommand")], u2.prototype, "beforeCommand", null), (0, o3.Cg)([(0, n2.watch)(":beforeSetNativeEditorValue")], u2.prototype, "onBeforeSetNativeEditorValue", null), (0, o3.Cg)([(0, n2.watch)(":safeHTML")], u2.prototype, "onSafeHTML", null), a2.fg.add("cleanHtml", u2);
          }, 74646: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(71948), r2 = i3.n(n2), s = i3(36115);
            s.T.prototype.cleanHTML = { timeout: 300, removeEmptyElements: true, fillEmptyParagraph: true, replaceNBSP: true, replaceOldTags: { i: "em", b: "strong" }, allowTags: false, denyTags: "script", useIframeSandbox: false, removeOnError: true, safeJavaScriptLink: true, disableCleanFilter: null }, s.T.prototype.controls.eraser = { command: "removeFormat", tooltip: "Clear Formatting" }, o3.I.set("eraser", r2());
          }, 60549: function(t4, e4, i3) {
            i3.d(e4, { Z: function() {
              return r2;
            } });
            var o3 = i3(98253), n2 = i3(59101);
            function r2(t5) {
              const e5 = /([^[]*)\[([^\]]+)]/, i4 = /[\s]*,[\s]*/, r3 = /^(.*)[\s]*=[\s]*(.*)$/, s = {};
              return (0, o3.K)(t5) ? (t5.split(i4).map((t6) => {
                t6 = (0, n2.Bq)(t6);
                const o4 = e5.exec(t6), a2 = {}, l = (t7) => {
                  t7 = (0, n2.Bq)(t7);
                  const e6 = r3.exec(t7);
                  e6 ? a2[e6[1]] = e6[2] : a2[t7] = true;
                };
                if (o4) {
                  const t7 = o4[2].split(i4);
                  o4[1] && (t7.forEach(l), s[o4[1].toUpperCase()] = a2);
                } else s[t6.toUpperCase()] = true;
              }), s) : !!t5 && (Object.keys(t5).forEach((e6) => {
                s[e6.toUpperCase()] = t5[e6];
              }), s);
            }
          }, 15396: function(t4, e4, i3) {
            i3.d(e4, { Zd: function() {
              return o3.Z;
            }, eZ: function() {
              return s.e;
            }, hk: function() {
              return r2.h;
            }, w5: function() {
              return n2.w;
            } });
            var o3 = i3(60549), n2 = i3(30526), r2 = i3(20646), s = i3(52306);
          }, 30526: function(t4, e4, i3) {
            i3.d(e4, { D: function() {
              return s;
            }, w: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(55186);
            function r2(t5, e5) {
              const { s: i4 } = t5;
              let o4 = e5;
              if (!o4) {
                o4 = t5.createInside.fake();
                const { range: e6 } = i4;
                n2.J.safeInsertNode(e6, o4), e6.collapse();
              }
              const r3 = n2.J.furthest(o4, s, t5.editor);
              if (r3) if (i4.cursorOnTheLeft(r3)) n2.J.before(r3, o4);
              else if (i4.cursorOnTheRight(r3)) n2.J.after(r3, o4);
              else {
                const t6 = i4.splitSelection(r3);
                t6 && n2.J.after(t6, o4);
              }
              e5 || (i4.setCursorBefore(o4), n2.J.safeRemove(o4));
            }
            function s(t5) {
              return n2.J.isInlineBlock(t5) && !n2.J.isTag(t5, o3.INSEPARABLE_TAGS);
            }
          }, 20646: function(t4, e4, i3) {
            i3.d(e4, { h: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(97369), r2 = i3(30526);
            function s(t5) {
              const { s: e5, editor: i4, createInside: s2 } = t5, { range: a2 } = e5, l = a2.cloneRange(), c = a2.cloneRange(), d2 = s2.fake(), u2 = s2.fake();
              l.collapse(true), c.collapse(false), o3.J.safeInsertNode(l, d2), o3.J.safeInsertNode(c, u2), a2.setStartBefore(d2), a2.collapse(true), e5.selectRange(a2), (0, r2.w)(t5, d2), a2.setEndAfter(u2), a2.collapse(false), e5.selectRange(a2), (0, r2.w)(t5, u2);
              const h2 = [];
              o3.J.between(d2, u2, (t6) => {
                (0, r2.D)(t6) && !o3.J.isTag(t6, "a") && h2.push(t6), o3.J.isElement(t6) && (0, n2.attr)(t6, "style") && (0, n2.attr)(t6, "style", null);
              }), h2.forEach((t6) => o3.J.unwrap(t6));
              const p2 = (t6, e6) => {
                if (!o3.J.findNotEmptySibling(t6, e6)) {
                  const o4 = t6.parentNode;
                  if (o4 && o4 !== i4 && (0, n2.attr)(o4, "style")) return (0, n2.attr)(o4, "style", null), p2(o4, e6), true;
                }
              };
              p2(d2, true) && p2(u2, false), a2.setStartAfter(d2), a2.setEndBefore(u2), e5.selectRange(a2), o3.J.safeRemove(d2), o3.J.safeRemove(u2);
            }
          }, 5232: function(t4, e4, i3) {
            i3.d(e4, { f: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4, n3) {
              if (n3 && o3.J.isElement(e5) && true !== n3[e5.nodeName]) {
                const t6 = e5.attributes;
                if (t6 && t6.length) {
                  const o4 = [];
                  for (let i5 = 0; t6.length > i5; i5 += 1) {
                    const r2 = n3[e5.nodeName][t6[i5].name];
                    (!r2 || true !== r2 && r2 !== t6[i5].value) && o4.push(t6[i5].name);
                  }
                  o4.length && (i4 = true), o4.forEach((t7) => {
                    e5.removeAttribute(t7);
                  });
                }
              }
              return i4;
            }
          }, 63443: function(t4, e4, i3) {
            i3.d(e4, { f: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(55186);
            function r2(t5, e5, i4) {
              if (t5.o.cleanHTML.fillEmptyParagraph && n2.J.isBlock(e5) && n2.J.isEmpty(e5, o3.INSEPARABLE_TAGS)) {
                const i5 = t5.createInside.element("br");
                return e5.appendChild(i5), true;
              }
              return i4;
            }
          }, 3593: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { allowAttributes: function() {
              return o3.f;
            }, fillEmptyParagraph: function() {
              return n2.f;
            }, removeEmptyTextNode: function() {
              return r2.r;
            }, removeInvTextNodes: function() {
              return s.u;
            }, replaceOldTags: function() {
              return a2.H;
            }, sanitizeAttributes: function() {
              return l.L;
            }, tryRemoveNode: function() {
              return c.k;
            } });
            var o3 = i3(5232), n2 = i3(63443), r2 = i3(926), s = i3(67431), a2 = i3(81199), l = i3(32782), c = i3(32014);
          }, 926: function(t4, e4, i3) {
            i3.d(e4, { r: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4, n3, r2, s) {
              return o3.J.isText(e5) && !e5.nodeValue ? (e5 === s && t5.s.isCollapsed() && t5.s.setCursorAfter(e5), o3.J.safeRemove(e5), true) : i4;
            }
          }, 67431: function(t4, e4, i3) {
            i3.d(e4, { u: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(55186);
            function r2(t5, e5, i4, r3, s, a2) {
              if (a2 === e5 || !n2.J.isText(e5) || null == e5.nodeValue) return i4;
              if (!(0, o3.INVISIBLE_SPACE_REG_EXP)().test(e5.nodeValue)) return i4;
              const l = n2.J.furthest(a2, n2.J.isBlock, t5.editor);
              return !l || n2.J.isOrContains(l, e5) ? i4 : (e5.nodeValue = e5.nodeValue.replace((0, o3.INVISIBLE_SPACE_REG_EXP)(), ""), e5 === a2 && t5.s.isCollapsed() && t5.s.setCursorAfter(e5), e5.nodeValue || n2.J.safeRemove(e5), true);
            }
          }, 81199: function(t4, e4, i3) {
            i3.d(e4, { H: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4) {
              const n3 = function(t6, e6, i5) {
                if (!i5 || !o3.J.isHTMLElement(e6)) return e6;
                const n4 = i5[e6.nodeName.toLowerCase()] || i5[e6.nodeName];
                return n4 ? o3.J.replace(e6, n4, t6.createInside, true, false) : e6;
              }(t5, e5, t5.o.cleanHTML.replaceOldTags);
              return e5 !== n3 ? (e5 = n3, true) : i4;
            }
          }, 32782: function(t4, e4, i3) {
            i3.d(e4, { L: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(65147);
            function r2(t5, e5, i4) {
              return !(!o3.J.isElement(e5) || !(0, n2.sanitizeHTMLElement)(e5, { safeJavaScriptLink: t5.options.cleanHTML.safeJavaScriptLink, removeOnError: t5.options.cleanHTML.removeOnError })) || i4;
            }
          }, 32014: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return s;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(59101);
            function s(t5, e5, i4, s2, a2, l) {
              return function(t6, e6, i5, s3, a3) {
                return !(n2.J.isText(e6) || !(s3 && !s3[e6.nodeName] || a3 && a3[e6.nodeName])) || t6.o.cleanHTML.removeEmptyElements && n2.J.isElement(e6) && null != e6.nodeName.match(o3.IS_INLINE) && !n2.J.isTemporary(e6) && 0 === (0, r2.Bq)(e6.innerHTML).length && (null == i5 || !n2.J.isOrContains(e6, i5));
              }(t5, e5, l, s2, a2) ? (n2.J.safeRemove(e5), true) : i4;
            }
          }, 52306: function(t4, e4, i3) {
            i3.d(e4, { e: function() {
              return r2;
            } }), i3(17352);
            var o3 = i3(3593);
            const n2 = Object.keys(o3);
            function r2(t5, e5, i4, r3, s) {
              let a2 = false;
              const l = t5.o.cleanHTML.disableCleanFilter;
              for (const c of n2) if (!(l && l.has(c) || (a2 = (0, o3[c])(t5, e5, a2, i4, r3, s), e5.isConnected))) return true;
              return a2;
            }
          }, 24593: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(65147);
            i3(51329), n2.fg.add("clipboard", class {
              constructor() {
                this.buttons = [{ name: "cut", group: "clipboard" }, { name: "copy", group: "clipboard" }, { name: "paste", group: "clipboard" }, { name: "selectall", group: "clipboard" }];
              }
              init(t5) {
                var e5;
                null === (e5 = this.buttons) || void 0 === e5 || e5.forEach((e6) => t5.registerButton(e6)), t5.e.off(`copy.${o3.CLIPBOARD_ID} cut.${o3.CLIPBOARD_ID}`).on(`copy.${o3.CLIPBOARD_ID} cut.${o3.CLIPBOARD_ID}`, (e6) => {
                  var i4;
                  const n3 = t5.s.html, s = (0, r2.getDataTransfer)(e6) || (0, r2.getDataTransfer)(t5.ew) || (0, r2.getDataTransfer)(e6.originalEvent);
                  s && (s.setData(o3.TEXT_PLAIN, (0, r2.stripTags)(n3)), s.setData(o3.TEXT_HTML, n3)), t5.buffer.set(o3.CLIPBOARD_ID, n3), t5.e.fire("pasteStack", { html: n3, action: t5.o.defaultActionOnPaste || o3.INSERT_AS_HTML }), "cut" === e6.type && (t5.s.remove(), t5.s.focus()), e6.preventDefault(), null === (i4 = null == t5 ? void 0 : t5.events) || void 0 === i4 || i4.fire("afterCopy", n3);
                });
              }
              destruct(t5) {
                var e5, i4;
                null === (e5 = null == t5 ? void 0 : t5.buffer) || void 0 === e5 || e5.set(o3.CLIPBOARD_ID, ""), null === (i4 = null == t5 ? void 0 : t5.events) || void 0 === i4 || i4.off("." + o3.CLIPBOARD_ID);
              }
            });
          }, 51329: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(51457), r2 = i3.n(n2), s = i3(23602), a2 = i3.n(s), l = i3(86899), c = i3.n(l), d2 = i3(95320), u2 = i3.n(d2), h2 = i3(36115);
            h2.T.prototype.controls.cut = { command: "cut", isDisabled: (t5) => t5.s.isCollapsed(), tooltip: "Cut selection" }, h2.T.prototype.controls.copy = { command: "copy", isDisabled: (t5) => t5.s.isCollapsed(), tooltip: "Copy selection" }, h2.T.prototype.controls.selectall = { icon: "select-all", command: "selectall", tooltip: "Select all" }, o3.I.set("copy", r2()).set("cut", a2()).set("paste", c()).set("select-all", u2());
          }, 36293: function(t4, e4, i3) {
            var o3 = i3(56298), n2 = i3(65147);
            i3(39626), o3.fg.add("color", function(t5) {
              t5.registerButton({ name: "brush", group: "color" });
              const e5 = (e6, i4, o4) => {
                const r2 = (0, n2.normalizeColor)(o4);
                switch (e6) {
                  case "background":
                    t5.s.commitStyle({ attributes: { style: { backgroundColor: r2 || "" } } });
                    break;
                  case "forecolor":
                    t5.s.commitStyle({ attributes: { style: { color: r2 || "" } } });
                }
                return t5.synchronizeValues(), false;
              };
              t5.registerCommand("forecolor", e5).registerCommand("background", e5);
            });
          }, 39626: function(t4, e4, i3) {
            var o3 = i3(55186), n2 = i3(65147), r2 = i3(931), s = i3(16116), a2 = i3(45674), l = i3.n(a2), c = i3(36115);
            r2.I.set("brush", l()), c.T.prototype.controls.brushCell = { isVisible: (t5) => !t5.o.disablePlugins.includes("color"), icon: "brush", popup: (t5, e5, i4) => {
              if (!(0, n2.isJoditObject)(t5)) return;
              const o4 = t5.getInstance("Table", t5.o).getAllSelectedCells();
              if (!o4.length) return false;
              const r3 = (e6) => (0, s.Kn)(t5, (r4) => {
                o4.forEach((t6) => {
                  (0, n2.css)(t6, e6, r4);
                }), t5.lock(), t5.synchronizeValues(), i4(), t5.unlock();
              }, (0, n2.css)(o4[0], e6));
              return (0, s.Zg)(t5, [{ name: "Background", content: r3("background-color") }, { name: "Text", content: r3("color") }, { name: "Border", content: r3("border-color") }]);
            }, tooltip: "Background" }, c.T.prototype.controls.brush = { isVisible: (t5) => !t5.o.disablePlugins.includes("color"), update(t5, e5) {
              const i4 = (0, n2.dataBind)(e5, "color"), r3 = (i5, o4) => {
                o4 && o4 !== (0, n2.css)(t5.editor, i5).toString() && (e5.state.icon.fill = o4);
              };
              if (i4) {
                const t6 = (0, n2.dataBind)(e5, "color");
                return void r3("color" === t6 ? t6 : "background-color", i4);
              }
              const s2 = t5.s.current();
              if (s2 && !e5.state.disabled) {
                const e6 = o3.J.closest(s2, o3.J.isElement, t5.editor) || t5.editor;
                r3("color", (0, n2.css)(e6, "color").toString()), r3("background-color", (0, n2.css)(e6, "background-color").toString());
              }
              e5.state.icon.fill = "", e5.state.activated = false;
            }, popup: (t5, e5, i4, r3) => {
              let a3 = "", l2 = "", c2 = [], d2 = null;
              return e5 && e5 !== t5.editor && o3.J.isNode(e5) && (o3.J.isElement(e5) && t5.s.isCollapsed() && !o3.J.isTag(e5, /* @__PURE__ */ new Set(["br", "hr"])) && (d2 = e5), o3.J.up(e5, (t6) => {
                if (o3.J.isHTMLElement(t6)) {
                  const e6 = (0, n2.css)(t6, "color", true), i5 = (0, n2.css)(t6, "background-color", true);
                  if (e6) return a3 = e6.toString(), true;
                  if (i5) return l2 = i5.toString(), true;
                }
              }, t5.editor)), c2 = [{ name: "Background", content: (0, s.Kn)(t5, (e6) => {
                d2 ? d2.style.backgroundColor = e6 : t5.execCommand("background", false, e6), (0, n2.dataBind)(r3, "color", e6), (0, n2.dataBind)(r3, "color-mode", "background"), i4();
              }, l2) }, { name: "Text", content: (0, s.Kn)(t5, (e6) => {
                d2 ? d2.style.color = e6 : t5.execCommand("forecolor", false, e6), (0, n2.dataBind)(r3, "color", e6), (0, n2.dataBind)(r3, "color-mode", "color"), i4();
              }, a3) }], "background" !== t5.o.colorPickerDefaultTab && (c2 = c2.reverse()), (0, s.Zg)(t5, c2, d2);
            }, exec(t5, e5, { button: i4 }) {
              const r3 = (0, n2.dataBind)(i4, "color-mode"), s2 = (0, n2.dataBind)(i4, "color");
              if (!r3) return false;
              if (e5 && e5 !== t5.editor && o3.J.isNode(e5) && o3.J.isElement(e5)) switch (r3) {
                case "color":
                  e5.style.color = s2;
                  break;
                case "background":
                  e5.style.backgroundColor = s2;
              }
              else t5.execCommand("background" === r3 ? r3 : "forecolor", false, s2);
            }, tooltip: "Fill color or set the text color" };
          }, 38373: function(t4, e4, i3) {
            var o3 = i3(55186), n2 = i3(56298), r2 = i3(38322), s = i3(931), a2 = i3(3843), l = i3.n(a2), c = i3(94628), d2 = i3(36115);
            const u2 = "copy-format", h2 = ["fontWeight", "fontStyle", "fontSize", "color", "margin", "padding", "borderWidth", "borderStyle", "borderColor", "borderRadius", "backgroundColor", "textDecorationLine", "fontFamily"], p2 = (t5, e5, i4, o4) => {
              let n3 = (0, r2.A)(i4, e5);
              return n3 === o4[e5] && (n3 = i4.parentNode && i4 !== t5.editor && i4.parentNode !== t5.editor ? p2(t5, e5, i4.parentNode, o4) : void 0), n3;
            };
            d2.T.prototype.controls.copyformat = { exec: (t5, e5, { button: i4 }) => {
              if (e5) {
                if (t5.buffer.exists(u2)) t5.buffer.delete(u2), t5.e.off(t5.editor, "mouseup." + u2);
                else {
                  const i5 = {}, n3 = o3.J.up(e5, (t6) => t6 && !o3.J.isText(t6), t5.editor) || t5.editor, s2 = t5.createInside.span();
                  t5.editor.appendChild(s2), h2.forEach((t6) => {
                    i5[t6] = (0, r2.A)(s2, t6);
                  }), s2 !== t5.editor && o3.J.safeRemove(s2);
                  const a3 = ((t6, e6, i6) => {
                    const o4 = {};
                    return e6 && h2.forEach((n4) => {
                      o4[n4] = p2(t6, n4, e6, i6), n4.match(/border(Style|Color)/) && !o4.borderWidth && (o4[n4] = void 0);
                    }), o4;
                  })(t5, n3, i5), l2 = () => {
                    t5.buffer.delete(u2);
                    const e6 = t5.s.current();
                    e6 && (o3.J.isTag(e6, "img") ? (0, r2.A)(e6, a3) : t5.s.commitStyle({ attributes: { style: a3 } })), t5.e.off(t5.editor, "mouseup." + u2);
                  };
                  t5.e.on(t5.editor, "mouseup." + u2, l2), t5.buffer.set(u2, true);
                }
                i4.update();
              }
            }, isActive: (t5) => t5.buffer.exists(u2), tooltip: "Paint format" }, n2.fg.add("copyformat", function(t5) {
              t5.registerButton({ name: "copyformat", group: "clipboard" }), (0, n2.JW)(c);
            }), s.I.set("copyformat", l());
          }, 60843: function(t4) {
            t4.exports = { "copy-format": "نسخ التنسيق" };
          }, 66504: function(t4) {
            t4.exports = { "copy-format": "Kopírovat formát" };
          }, 11095: function(t4) {
            t4.exports = { "copy-format": "Format kopierenт" };
          }, 57032: function(t4) {
            t4.exports = { "copy-format": "Copiar formato" };
          }, 83997: function(t4) {
            t4.exports = { "copy-format": "کپی کردن قالب" };
          }, 49717: function(t4) {
            t4.exports = { "copy-format": "Kopioi muotoilu" };
          }, 32164: function(t4) {
            t4.exports = { "copy-format": "Format de copie" };
          }, 25459: function(t4) {
            t4.exports = { "copy-format": "העתק עיצוב" };
          }, 11395: function(t4) {
            t4.exports = { "copy-format": "Formátum másolás" };
          }, 76073: function(t4) {
            t4.exports = { "copy-format": "salin format" };
          }, 94628: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { ar: function() {
              return n2.a;
            }, cs_cz: function() {
              return s.a;
            }, de: function() {
              return l.a;
            }, es: function() {
              return d2.a;
            }, fa: function() {
              return h2.a;
            }, fi: function() {
              return f2.a;
            }, fr: function() {
              return m2.a;
            }, he: function() {
              return _2.a;
            }, hu: function() {
              return x.a;
            }, id: function() {
              return y2.a;
            }, it: function() {
              return k2.a;
            }, ja: function() {
              return S2.a;
            }, ko: function() {
              return T2.a;
            }, mn: function() {
              return I2.a;
            }, nl: function() {
              return L2.a;
            }, pl: function() {
              return P2.a;
            }, pt_br: function() {
              return N2.a;
            }, ru: function() {
              return D2.a;
            }, tr: function() {
              return O2.a;
            }, zh_cn: function() {
              return H4.a;
            }, zh_tw: function() {
              return V2.a;
            } });
            var o3 = i3(60843), n2 = i3.n(o3), r2 = i3(66504), s = i3.n(r2), a2 = i3(11095), l = i3.n(a2), c = i3(57032), d2 = i3.n(c), u2 = i3(83997), h2 = i3.n(u2), p2 = i3(49717), f2 = i3.n(p2), g2 = i3(32164), m2 = i3.n(g2), b2 = i3(25459), _2 = i3.n(b2), v2 = i3(11395), x = i3.n(v2), w = i3(76073), y2 = i3.n(w), j = i3(90393), k2 = i3.n(j), C2 = i3(99457), S2 = i3.n(C2), z2 = i3(55142), T2 = i3.n(z2), E2 = i3(27835), I2 = i3.n(E2), A2 = i3(51170), L2 = i3.n(A2), M2 = i3(63884), P2 = i3.n(M2), R2 = i3(64139), N2 = i3.n(R2), B3 = i3(98229), D2 = i3.n(B3), q2 = i3(5878), O2 = i3.n(q2), J = i3(87444), H4 = i3.n(J), F2 = i3(60580), V2 = i3.n(F2);
          }, 90393: function(t4) {
            t4.exports = { "copy-format": "Copia il formato" };
          }, 99457: function(t4) {
            t4.exports = { "copy-format": "copyformat" };
          }, 55142: function(t4) {
            t4.exports = { "copy-format": "복사 형식" };
          }, 27835: function(t4) {
            t4.exports = { "copy-format": "Формат хуулах" };
          }, 51170: function(t4) {
            t4.exports = { "copy-format": "opmaak kopiëren" };
          }, 63884: function(t4) {
            t4.exports = { "copy-format": "format kopii" };
          }, 64139: function(t4) {
            t4.exports = { "copy-format": "Copiar formato" };
          }, 98229: function(t4) {
            t4.exports = { "copy-format": "Копировать формат" };
          }, 5878: function(t4) {
            t4.exports = { "copy-format": "Kopyalama Biçimi" };
          }, 87444: function(t4) {
            t4.exports = { "copy-format": "复制格式" };
          }, 60580: function(t4) {
            t4.exports = { "copy-format": "複製格式" };
          }, 5929: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(56298), r2 = i3(65147), s = i3(59101), a2 = i3(71005);
            class l extends a2.k {
              afterInit(t5) {
                t5.e.on("afterCommand.delete", (t6) => {
                  "delete" === t6 && this.__afterDeleteCommand();
                }), t5.registerCommand("delete", { exec: this.__onDeleteCommand.bind(this) }, { stopPropagation: false });
              }
              beforeDestruct(t5) {
                t5.e.off("afterCommand.delete");
              }
              __afterDeleteCommand() {
                const t5 = this.j, e5 = t5.s.current();
                if (e5 && o3.J.isTag(e5.firstChild, "br") && t5.s.removeNode(e5.firstChild), !((0, s.Bq)(t5.editor.textContent || "") || t5.editor.querySelector("img,table,jodit,iframe,hr") || e5 && o3.J.closest(e5, "table", t5.editor))) {
                  t5.editor.innerHTML = "";
                  const e6 = t5.s.setCursorIn(t5.editor);
                  t5.s.removeNode(e6);
                }
              }
              __onDeleteCommand() {
                const { jodit: t5 } = this;
                if (t5.s.isCollapsed()) return;
                t5.s.expandSelection();
                const e5 = t5.s.range;
                e5.deleteContents();
                const i4 = t5.createInside.fake();
                e5.insertNode(i4);
                const n3 = o3.J.findSibling(i4, true), r3 = o3.J.findSibling(i4, false);
                return this.__moveContentInLeftSibling(i4, n3, r3), e5.setStartBefore(i4), e5.collapse(true), this.__moveCursorInEditableSibling(t5, n3, i4, e5), this.__addBrInEmptyBlock(i4, r3, e5), o3.J.safeRemove(i4), t5.s.selectRange(e5), false;
              }
              __moveContentInLeftSibling(t5, e5, i4) {
                e5 = this.__defineRightLeftBox(e5), !o3.J.isList(i4) && !o3.J.isTag(i4, "table") && o3.J.isBlock(i4) && o3.J.isBlock(e5) && (o3.J.append(e5, t5), o3.J.moveContent(i4, e5), o3.J.safeRemove(i4)), o3.J.isList(i4) && o3.J.isLeaf(i4.firstElementChild) && o3.J.isEmpty(i4.firstElementChild) && o3.J.safeRemove(i4.firstElementChild);
              }
              __defineRightLeftBox(t5) {
                if (!o3.J.isList(t5)) return t5;
                let e5 = t5.lastElementChild;
                return o3.J.isLeaf(e5) || (e5 = this.j.createInside.element("li"), o3.J.append(t5, e5)), e5;
              }
              __addBrInEmptyBlock(t5, e5, i4) {
                const n3 = this.j;
                if (t5.isConnected && o3.J.isBlock(t5.parentNode) && !t5.nextSibling && !t5.previousSibling) {
                  const e6 = n3.createInside.element("br");
                  o3.J.after(t5, e6), i4.setStartBefore(e6), i4.collapse(true);
                }
                if (o3.J.isTag(e5, "table")) {
                  const t6 = (0, r2.$$)("td,th", e5).shift();
                  o3.J.isCell(t6) && o3.J.isEmpty(t6) && o3.J.append(t6, n3.createInside.element("br"));
                }
              }
              __moveCursorInEditableSibling(t5, e5, i4, n3) {
                var r3;
                if (!e5 || !o3.J.isText(e5)) {
                  const e6 = null !== (r3 = o3.J.closest(i4, o3.J.isBlock, t5.editor)) && void 0 !== r3 ? r3 : t5.editor, s2 = o3.J.prev(i4, o3.J.isText, e6);
                  s2 && (n3.setStartAfter(s2), n3.collapse(true), o3.J.safeRemove(i4));
                }
              }
            }
            l.requires = ["backspace"], n2.fg.add("deleteCommand", l);
          }, 96900: function(t4, e4, i3) {
            i3(36115).T.prototype.draggableTags = ["img", "jodit-media", "jodit"];
          }, 27509: function(t4, e4, i3) {
            var o3, n2 = i3(31635), r2 = i3(22664), s = i3(71842), a2 = i3(56298), l = i3(65147), c = i3(71005);
            i3(96900), function(t5) {
              t5[t5.IDLE = 0] = "IDLE", t5[t5.WAIT_DRAGGING = 1] = "WAIT_DRAGGING", t5[t5.DRAGGING = 2] = "DRAGGING";
            }(o3 || (o3 = {}));
            class d2 extends c.k {
              constructor() {
                super(...arguments), this.dragList = [], this.draggable = null, this.isCopyMode = false, this.diffStep = 10, this.startX = 0, this.startY = 0, this.state = o3.IDLE;
              }
              afterInit() {
                this.dragList = this.j.o.draggableTags ? (0, l.splitArray)(this.j.o.draggableTags).filter(Boolean).map((t5) => t5.toLowerCase()) : [], this.dragList.length && this.j.e.on("mousedown dragstart", this.onDragStart);
              }
              onDragStart(t5) {
                if ("dragstart" === t5.type && this.draggable) return false;
                if (this.state > o3.IDLE) return;
                const e5 = t5.target;
                if (!this.dragList.length || !e5) return;
                const i4 = (t6) => Boolean(t6 && this.dragList.includes(t6.nodeName.toLowerCase()));
                let n3 = s.J.furthest(e5, i4, this.j.editor) || (i4(e5) ? e5 : null);
                n3 && (s.J.isTag(n3.parentElement, "a") && n3.parentElement.firstChild === n3 && n3.parentElement.lastChild === n3 && (n3 = n3.parentElement), this.startX = t5.clientX, this.startY = t5.clientY, this.isCopyMode = (0, l.ctrlKey)(t5), this.draggable = n3.cloneNode(true), (0, l.dataBind)(this.draggable, "target", n3), this.state = o3.WAIT_DRAGGING, this.addDragListeners());
              }
              onDrag(t5) {
                var e5, i4;
                if (!this.draggable || this.state === o3.IDLE) return;
                const n3 = t5.clientY;
                if (this.state !== o3.WAIT_DRAGGING || Math.sqrt(Math.pow(t5.clientX - this.startX, 2) + Math.pow(n3 - this.startY, 2)) >= this.diffStep) {
                  if (this.state === o3.WAIT_DRAGGING && (this.j.lock("drag-and-drop-element"), this.state = o3.DRAGGING), this.j.e.fire("hidePopup hideResizer"), !this.draggable.parentNode) {
                    const o4 = (0, l.dataBind)(this.draggable, "target");
                    (0, l.css)(this.draggable, { zIndex: 1e13, pointerEvents: "none", pointer: "drag", position: "fixed", opacity: 0.7, display: "inline-block", left: t5.clientX, top: t5.clientY, width: null !== (e5 = null == o4 ? void 0 : o4.offsetWidth) && void 0 !== e5 ? e5 : 100, height: null !== (i4 = null == o4 ? void 0 : o4.offsetHeight) && void 0 !== i4 ? i4 : 100 }), (0, a2.My)(this.j, d2).appendChild(this.draggable);
                  }
                  (0, l.css)(this.draggable, { left: t5.clientX, top: t5.clientY }), this.j.s.insertCursorAtPoint(t5.clientX, t5.clientY);
                }
              }
              onDragEnd() {
                this.isInDestruct || (this.removeDragListeners(), this.j.unlock(), this.state = o3.IDLE, this.draggable && (s.J.safeRemove(this.draggable), this.draggable = null));
              }
              onDrop() {
                if (!this.draggable || o3.DRAGGING > this.state) return void this.onDragEnd();
                let t5 = (0, l.dataBind)(this.draggable, "target");
                this.onDragEnd(), this.isCopyMode && (t5 = t5.cloneNode(true));
                const { parentElement: e5 } = t5;
                this.j.s.insertNode(t5, true, false), e5 && s.J.isEmpty(e5) && !s.J.isCell(e5) && s.J.safeRemove(e5), s.J.isTag(t5, "img") && this.j.e && this.j.e.fire("afterInsertImage", t5), this.j.e.fire("synchro");
              }
              addDragListeners() {
                this.j.e.on(this.j.editor, "mousemove", this.onDrag).on("mouseup", this.onDrop).on([this.j.ew, this.ow], "mouseup", this.onDragEnd);
              }
              removeDragListeners() {
                this.j.e.off(this.j.editor, "mousemove", this.onDrag).off("mouseup", this.onDrop).off([this.j.ew, this.ow], "mouseup", this.onDragEnd);
              }
              beforeDestruct() {
                this.onDragEnd(), this.j.e.off("mousedown dragstart", this.onDragStart), this.removeDragListeners();
              }
            }
            (0, n2.Cg)([r2.autobind], d2.prototype, "onDragStart", null), (0, n2.Cg)([(0, r2.throttle)((t5) => t5.defaultTimeout / 10)], d2.prototype, "onDrag", null), (0, n2.Cg)([r2.autobind], d2.prototype, "onDragEnd", null), (0, n2.Cg)([r2.autobind], d2.prototype, "onDrop", null), a2.fg.add("dragAndDropElement", d2);
          }, 64565: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = i3(71005), d2 = i3(10274);
            class u2 extends c.k {
              constructor() {
                super(...arguments), this.isFragmentFromEditor = false, this.isCopyMode = false, this.startDragPoint = { x: 0, y: 0 }, this.draggable = null, this.bufferRange = null, this.getText = (t5) => {
                  const e5 = (0, l.getDataTransfer)(t5);
                  return e5 ? e5.getData(n2.TEXT_HTML) || e5.getData(n2.TEXT_PLAIN) : null;
                };
              }
              afterInit() {
                this.j.e.on([window, this.j.ed, this.j.editor], "dragstart.DragAndDrop", this.onDragStart);
              }
              onDragStart(t5) {
                let e5 = t5.target;
                if (this.onDragEnd(), this.isFragmentFromEditor = s.J.isOrContains(this.j.editor, e5, true), this.isCopyMode = !this.isFragmentFromEditor || (0, l.ctrlKey)(t5), this.isFragmentFromEditor) {
                  const t6 = this.j.s.sel, e6 = t6 && t6.rangeCount ? t6.getRangeAt(0) : null;
                  e6 && (this.bufferRange = e6.cloneRange());
                } else this.bufferRange = null;
                this.startDragPoint.x = t5.clientX, this.startDragPoint.y = t5.clientY, function(t6) {
                  return s.J.isElement(t6) && t6.classList.contains(d2.Q.prototype.getFullElName("item"));
                }(e5) && (e5 = e5.querySelector("img")), s.J.isTag(e5, "img") && (this.draggable = e5.cloneNode(true), (0, l.dataBind)(this.draggable, "target", e5)), this.addDragListeners();
              }
              addDragListeners() {
                this.j.e.on("dragover", this.onDrag).on("drop.DragAndDrop", this.onDrop).on(window, "dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop", this.onDragEnd);
              }
              removeDragListeners() {
                this.j.e.off("dragover", this.onDrag).off("drop.DragAndDrop", this.onDrop).off(window, "dragend.DragAndDrop drop.DragAndDrop mouseup.DragAndDrop", this.onDragEnd);
              }
              onDrag(t5) {
                this.draggable && (this.j.e.fire("hidePopup"), this.j.s.insertCursorAtPoint(t5.clientX, t5.clientY), t5.preventDefault(), t5.stopPropagation());
              }
              onDragEnd() {
                this.draggable && (s.J.safeRemove(this.draggable), this.draggable = null), this.isCopyMode = false, this.removeDragListeners();
              }
              onDrop(t5) {
                if (!t5.dataTransfer || !t5.dataTransfer.files || !t5.dataTransfer.files.length) {
                  if (!this.isFragmentFromEditor && !this.draggable) return this.j.e.fire("paste", t5), t5.preventDefault(), t5.stopPropagation(), false;
                  const e5 = this.j.s.sel, i4 = this.bufferRange || (e5 && e5.rangeCount ? e5.getRangeAt(0) : null);
                  let o4 = null;
                  if (!this.draggable && i4) o4 = this.isCopyMode ? i4.cloneContents() : i4.extractContents();
                  else if (this.draggable) if (this.isCopyMode) {
                    const [t6, e6] = "1" === (0, l.attr)(this.draggable, "-is-file") ? ["a", "href"] : ["img", "src"];
                    o4 = this.j.createInside.element(t6), o4.setAttribute(e6, (0, l.attr)(this.draggable, "data-src") || (0, l.attr)(this.draggable, "src") || ""), "a" === t6 && (o4.textContent = (0, l.attr)(o4, e6) || "");
                  } else o4 = (0, l.dataBind)(this.draggable, "target");
                  else this.getText(t5) && (o4 = this.j.createInside.fromHTML(this.getText(t5)));
                  e5 && e5.removeAllRanges(), this.j.s.insertCursorAtPoint(t5.clientX, t5.clientY), o4 && (this.j.s.insertNode(o4, false, false), i4 && o4.firstChild && o4.lastChild && (i4.setStartBefore(o4.firstChild), i4.setEndAfter(o4.lastChild), this.j.s.selectRange(i4), this.j.e.fire("synchro")), s.J.isTag(o4, "img") && this.j.events && this.j.e.fire("afterInsertImage", o4)), t5.preventDefault(), t5.stopPropagation();
                }
                this.isFragmentFromEditor = false, this.removeDragListeners();
              }
              beforeDestruct() {
                this.onDragEnd(), this.j.e.off(window, ".DragAndDrop").off(".DragAndDrop").off([window, this.j.ed, this.j.editor], "dragstart.DragAndDrop", this.onDragStart);
              }
            }
            (0, o3.Cg)([r2.autobind], u2.prototype, "onDragStart", null), (0, o3.Cg)([(0, r2.throttle)((t5) => t5.defaultTimeout / 10)], u2.prototype, "onDrag", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onDragEnd", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onDrop", null), a2.fg.add("dragAndDrop", u2);
          }, 69122: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { removeExtraBr: function() {
              return o3.z;
            } });
            var o3 = i3(72984);
          }, 72984: function(t4, e4, i3) {
            i3.d(e4, { z: function() {
              return r2;
            } });
            var o3 = i3(55186);
            const n2 = /* @__PURE__ */ new Set(["table", "pre", "blockquote", "code"]);
            function r2(t5, e5) {
              if (!t5.o.dtd.removeExtraBr || o3.J.isTag(e5, "br")) return;
              const i4 = o3.J.furthest(e5, o3.J.isBlock, t5.editor);
              if (i4 && !o3.J.isTag(i4, n2)) {
                const i5 = o3.J.isTag(e5, "br") ? e5 : o3.J.findNotEmptySibling(e5, false);
                if (!o3.J.isTag(i5, "br")) return;
                t5.s.setCursorBefore(i5), o3.J.safeRemove(i5);
              }
            }
          }, 30958: function(t4, e4, i3) {
            i3.d(e4, { o: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5) {
              if (o3.J.isFragment(e5) && (e5 = e5.firstChild), t5.o.dtd.checkBlockNesting && o3.J.isBlock(e5)) {
                const e6 = o3.J.furthest(t5.s.current(), o3.J.isBlock, t5.editor);
                e6 && !t5.o.dtd.blockLimits[e6.tagName.toLowerCase()] && (t5.s.setCursorAfter(e6), o3.J.isEmpty(e6) && o3.J.safeRemove(e6));
              }
            }
          }, 28313: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { checkBlockNesting: function() {
              return o3.o;
            } });
            var o3 = i3(30958);
          }, 43655: function(t4, e4, i3) {
            i3(36115).T.prototype.dtd = { removeExtraBr: true, checkBlockNesting: true, blockLimits: { article: 1, aside: 1, audio: 1, body: 1, caption: 1, details: 1, dir: 1, div: 1, dl: 1, fieldset: 1, figcaption: 1, figure: 1, footer: 1, form: 1, header: 1, hgroup: 1, main: 1, menu: 1, nav: 1, ol: 1, section: 1, table: 1, td: 1, th: 1, tr: 1, ul: 1, video: 1 } };
          }, 61589: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(66927), r2 = i3(56298), s = i3(71005), a2 = (i3(43655), i3(69122)), l = i3(28313);
            class c extends s.k {
              afterInit(t5) {
              }
              beforeDestruct(t5) {
              }
              __onBeforeInsertNode(t5) {
                Object.keys(l).forEach((e5) => {
                  l[e5](this.j, t5);
                });
              }
              __onAfterInsertNode(t5) {
                Object.keys(a2).forEach((e5) => {
                  a2[e5](this.j, t5);
                });
              }
            }
            (0, o3.Cg)([(0, n2.w)(":beforeInsertNode")], c.prototype, "__onBeforeInsertNode", null), (0, o3.Cg)([(0, n2.w)(":afterInsertNode")], c.prototype, "__onAfterInsertNode", null), r2.fg.add("dtd", c);
          }, 13405: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(9810), c = i3(29866), d2 = i3(81781);
            class u2 extends c.k {
              afterInit(t5) {
                const e5 = t5.o.enter.toLowerCase(), i4 = e5 === n2.BR.toLowerCase();
                t5.o.enterBlock || (t5.o.enterBlock = i4 ? n2.PARAGRAPH : e5), t5.registerCommand("enter", (t6, e6, i5 = {}) => this.onEnter(i5));
              }
              onEnterKeyDown(t5) {
                if (t5.key === n2.KEY_ENTER) {
                  const e5 = this.j, i4 = e5.e.fire("beforeEnter", t5);
                  return void 0 !== i4 ? i4 : (e5.s.isCollapsed() || e5.execCommand("Delete"), e5.s.focus(), this.onEnter(t5), e5.e.fire("afterEnter", t5), e5.synchronizeValues(), false);
                }
              }
              onEnter(t5) {
                const { jodit: e5 } = this, i4 = e5.createInside.fake();
                try {
                  s.J.safeInsertNode(e5.s.range, i4), (0, d2.Mt)(e5, i4, ["a"]);
                  let o4 = (0, d2.Dk)(i4, e5);
                  const n3 = s.J.isLeaf(o4);
                  if ((!n3 || (null == t5 ? void 0 : t5.shiftKey)) && (0, d2.lN)(i4, e5, null == t5 ? void 0 : t5.shiftKey)) return false;
                  if (o4 || (0, d2.tX)(i4, e5) || (o4 = (0, d2.C1)(i4, e5)), !o4) return (0, d2.yh)(i4, e5, n3 ? "li" : e5.o.enter), false;
                  if (!(0, d2.bD)(i4, e5, o4)) return false;
                  if (n3 && this.__isEmptyListLeaf(o4)) return (0, d2.cf)(i4, e5, o4), false;
                  (0, d2.HS)(i4, e5, o4);
                } finally {
                  i4.isConnected && e5.s.setCursorBefore(i4), s.J.safeRemove(i4);
                }
              }
              __isEmptyListLeaf(t5) {
                const e5 = this.j.e.fire("enterIsEmptyListLeaf", t5);
                return (0, l.L)(e5) ? e5 : s.J.isEmpty(t5);
              }
              beforeDestruct(t5) {
                t5.e.off("keydown.enter");
              }
            }
            (0, o3.Cg)([(0, r2.watch)(":keydown.enter")], u2.prototype, "onEnterKeyDown", null), a2.fg.add("enter", u2);
          }, 6110: function(t4, e4, i3) {
            i3.d(e4, { l: function() {
              return s;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(641);
            function s(t5, e5, i4) {
              const s2 = Boolean(n2.J.closest(t5, ["pre", "blockquote"], e5.editor));
              if (e5.o.enter.toLowerCase() === o3.BR.toLowerCase() || i4 && !s2 || !i4 && s2) {
                if (s2 && function(t6) {
                  const e6 = a2(a2(t6));
                  return !!e6 && (n2.J.safeRemove(a2(t6)), n2.J.safeRemove(e6), true);
                }(t5)) return false;
                const i5 = e5.createInside.element("br");
                if (n2.J.before(t5, i5), !n2.J.findNotEmptySibling(i5, false)) {
                  const e6 = i5.cloneNode();
                  n2.J.after(i5, e6), n2.J.before(e6, t5);
                }
                return (0, r2.$)(i5, e5.editor, e5.ed), true;
              }
              return false;
            }
            function a2(t5) {
              if (!t5) return false;
              const e5 = n2.J.findSibling(t5, true);
              return !(!e5 || !n2.J.isTag(e5, "br")) && e5;
            }
          }, 47317: function(t4, e4, i3) {
            i3.d(e4, { b: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4) {
              return !!o3.J.canSplitBlock(i4) || (o3.J.before(t5, e5.createInside.element("br")), false);
            }
          }, 36291: function(t4, e4, i3) {
            i3.d(e4, { D: function() {
              return r2;
            } });
            var o3 = i3(17352), n2 = i3(55186);
            function r2(t5, e5, i4 = o3.IS_BLOCK) {
              let s = t5;
              const a2 = e5.editor;
              do {
                if (!s || s === a2) break;
                if (i4.test(s.nodeName)) return n2.J.isLeaf(s) ? s : r2(s.parentNode, e5, /^li$/i) || s;
                s = s.parentNode;
              } while (s && s !== a2);
              return null;
            }
          }, 64107: function(t4, e4, i3) {
            i3.d(e4, { t: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5) {
              return Boolean(o3.J.prev(t5, (t6) => o3.J.isBlock(t6) || o3.J.isImage(t6), e5.editor));
            }
          }, 81781: function(t4, e4, i3) {
            i3.d(e4, { C1: function() {
              return u2.C;
            }, Dk: function() {
              return r2.D;
            }, HS: function() {
              return d2.H;
            }, Mt: function() {
              return l.M;
            }, bD: function() {
              return n2.b;
            }, cf: function() {
              return c.c;
            }, lN: function() {
              return o3.l;
            }, tX: function() {
              return s.t;
            }, yh: function() {
              return a2.y;
            } });
            var o3 = i3(6110), n2 = i3(47317), r2 = i3(36291), s = i3(64107), a2 = i3(41159), l = i3(63634), c = i3(30687), d2 = i3(70214), u2 = i3(62453);
          }, 41159: function(t4, e4, i3) {
            i3.d(e4, { y: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(641);
            function r2(t5, e5, i4, r3) {
              const s = "br" === i4.toLowerCase(), { createInside: a2 } = e5, l = a2.element(i4), c = a2.element("br");
              return s || l.appendChild(c), r3 && r3.cssText && l.setAttribute("style", r3.cssText), o3.J.after(t5, l), o3.J.before(s ? l : c, t5), (0, n2.$)(l, e5.editor, e5.ed), l;
            }
          }, 63634: function(t4, e4, i3) {
            i3.d(e4, { M: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5, i4) {
              const { s: n3 } = t5, r2 = o3.J.closest(e5, i4, t5.editor);
              r2 && (n3.cursorOnTheRight(r2, e5) ? o3.J.after(r2, e5) : n3.cursorOnTheLeft(r2, e5) && o3.J.before(r2, e5));
            }
          }, 30687: function(t4, e4, i3) {
            i3.d(e4, { c: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(58720), r2 = i3(41159);
            function s(t5, e5, i4) {
              const s2 = o3.J.closest(i4, ["ol", "ul"], e5.editor);
              if (!s2) return;
              const a2 = s2.parentElement, l = o3.J.isLeaf(a2), c = l ? a2 : s2, d2 = e5.s.createRange();
              d2.setStartAfter(i4), d2.setEndAfter(s2);
              const u2 = d2.extractContents();
              o3.J.after(c, t5), o3.J.safeRemove(i4), (0, n2.$$)("li", s2).length || o3.J.safeRemove(s2);
              const h2 = (0, r2.y)(t5, e5, l ? "li" : e5.o.enter);
              u2.querySelector("li") && (l ? h2.appendChild(u2) : o3.J.after(h2, u2));
            }
          }, 70214: function(t4, e4, i3) {
            i3.d(e4, { H: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(641), r2 = i3(41159);
            function s(t5, e5, i4) {
              const s2 = e5.s, { enter: a2 } = e5.o, l = a2.toLowerCase(), c = o3.J.isLeaf(i4), d2 = i4.tagName.toLowerCase() === l || c, u2 = s2.cursorOnTheRight(i4, t5), h2 = s2.cursorOnTheLeft(i4, t5);
              if (!d2 && (u2 || h2)) return u2 ? o3.J.after(i4, t5) : o3.J.before(i4, t5), (0, r2.y)(t5, e5, l), void (h2 && !u2 && o3.J.prepend(i4, t5));
              const p2 = s2.splitSelection(i4, t5);
              (0, n2.$)(p2, e5.editor, e5.ed);
            }
          }, 62453: function(t4, e4, i3) {
            i3.d(e4, { C: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5) {
              let i4 = t5;
              o3.J.up(i4, (t6) => {
                t6 && t6.hasChildNodes() && t6 !== e5.editor && (i4 = t6);
              }, e5.editor);
              const n3 = o3.J.wrapInline(i4, e5.o.enter, e5);
              if (o3.J.isEmpty(n3)) {
                const i5 = e5.createInside.element("br");
                n3.appendChild(i5), o3.J.before(i5, t5);
              }
              return n3;
            }
          }, 67335: function(t4, e4, i3) {
            var o3 = i3(55186), n2 = i3(56298), r2 = i3(16116);
            i3(36115).T.prototype.controls.file = { popup: (t5, e5, i4) => {
              const n3 = (e6, i5 = "") => {
                t5.s.insertNode(t5.createInside.fromHTML(`<a href="${e6}" title="${i5}">${i5 || e6}</a>`));
              };
              let s = null;
              return e5 && (o3.J.isTag(e5, "a") || o3.J.closest(e5, "a", t5.editor)) && (s = o3.J.isTag(e5, "a") ? e5 : o3.J.closest(e5, "a", t5.editor)), (0, r2.kG)(t5, { filebrowser: (t6) => {
                t6.files && t6.files.forEach((e6) => n3(t6.baseurl + e6)), i4();
              }, upload: true, url: (t6, e6) => {
                s ? (s.setAttribute("href", t6), s.setAttribute("title", e6)) : n3(t6, e6), i4();
              } }, s, i4, false);
            }, tags: ["a"], tooltip: "Insert file" }, n2.fg.add("file", function(t5) {
              t5.registerButton({ name: "file", group: "media" });
            });
          }, 92553: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(56298), r2 = i3(36115);
            r2.T.prototype.autofocus = false, r2.T.prototype.cursorAfterAutofocus = "end", r2.T.prototype.saveSelectionOnBlur = true, n2.fg.add("focus", function(t5) {
              t5.o.saveSelectionOnBlur && t5.e.on("blur", () => {
                t5.isEditorMode() && t5.s.save(true);
              }).on("focus", () => {
                t5.s.restore();
              });
              const e5 = () => {
                if (t5.s.focus(), "end" === t5.o.cursorAfterAutofocus) {
                  const e6 = o3.J.last(t5.editor, (t6) => o3.J.isText(t6));
                  e6 && t5.s.setCursorIn(e6, false);
                }
              };
              t5.e.on("afterInit", () => {
                t5.o.autofocus && (t5.defaultTimeout ? t5.async.setTimeout(e5, 300) : e5());
              }), t5.e.on("afterInit afterAddPlace", () => {
                t5.e.off(t5.editor, "mousedown.autofocus").on(t5.editor, "mousedown.autofocus", (e6) => {
                  t5.isEditorMode() && e6.target && o3.J.isBlock(e6.target) && !e6.target.childNodes.length && (t5.editor === e6.target ? t5.s.focus() : t5.s.setCursorIn(e6.target));
                });
              });
            });
          }, 67986: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(59101), r2 = i3(38322), s = i3(931), a2 = i3(48842), l = i3.n(a2), c = i3(25501), d2 = i3.n(c), u2 = i3(36115);
            u2.T.prototype.defaultFontSizePoints = "px", s.I.set("font", l()).set("fontsize", d2()), u2.T.prototype.controls.fontsize = { command: "fontsize", data: { cssRule: "font-size", normalise: (t5, e5) => /pt$/i.test(t5) && "pt" === e5.o.defaultFontSizePoints ? t5.replace(/pt$/i, "") : t5 }, list: [8, 9, 10, 11, 12, 14, 16, 18, 24, 30, 32, 34, 36, 48, 60, 72, 96], textTemplate: (t5, e5) => e5 + t5.o.defaultFontSizePoints, childTemplate: (t5, e5, i4) => `${i4}${t5.o.defaultFontSizePoints}`, tooltip: "Font size", value: (t5, e5) => {
              var i4;
              const n3 = t5.s.current();
              if (!n3) return;
              const s2 = o3.J.closest(n3, o3.J.isElement, t5.editor);
              if (!s2) return;
              const a3 = (null === (i4 = e5.control.data) || void 0 === i4 ? void 0 : i4.cssRule) || "font-size";
              return (0, r2.A)(s2, a3).toString();
            }, isChildActive: (t5, e5) => {
              var i4, o4;
              const n3 = e5.state.value, r3 = null !== (o4 = null === (i4 = e5.control.data) || void 0 === i4 ? void 0 : i4.normalize) && void 0 !== o4 ? o4 : (t6) => t6;
              return Boolean(n3 && e5.control.args && r3(e5.control.args[0].toString()) === r3(n3.toString()));
            }, isActive: (t5, e5) => {
              var i4, o4;
              const n3 = e5.state.value;
              if (!n3) return false;
              const r3 = null !== (o4 = null === (i4 = e5.control.data) || void 0 === i4 ? void 0 : i4.normalize) && void 0 !== o4 ? o4 : (t6) => t6;
              let s2 = e5.control.data.cacheListSet;
              if (!s2) {
                const t6 = Object.keys(e5.control.list).map(r3);
                s2 = new Set(t6), e5.control.data.cacheListSet = s2;
              }
              return s2.has(r3(n3.toString()));
            } }, u2.T.prototype.controls.font = { ...u2.T.prototype.controls.fontsize, command: "fontname", textTemplate: (t5, e5) => {
              const [i4] = e5.split(",");
              return (0, n2.Gd)(i4, `"'`);
            }, list: { "": "Default", "Arial, Helvetica, sans-serif": "Arial", "'Courier New', Courier, monospace": "Courier New", "Georgia, Palatino, serif": "Georgia", "'Lucida Sans Unicode', 'Lucida Grande', sans-serif": "Lucida Sans Unicode", "Tahoma, Geneva, sans-serif": "Tahoma", "'Times New Roman', Times, serif": "Times New Roman", "'Trebuchet MS', Helvetica, sans-serif": "Trebuchet MS", "Helvetica, sans-serif": "Helvetica", "Impact, Charcoal, sans-serif": "Impact", "Verdana, Geneva, sans-serif": "Verdana" }, childTemplate: (t5, e5, i4) => {
              let o4 = false;
              try {
                o4 = -1 === e5.indexOf("dings") && document.fonts.check(`16px ${e5}`, i4);
              } catch (t6) {
              }
              return `<span data-style="${e5}" style="${o4 ? `font-family: ${e5}!important;` : ""}">${i4}</span>`;
            }, data: { cssRule: "font-family", normalize: (t5) => t5.toLowerCase().replace(/['"]+/g, "").replace(/[^a-z0-9-]+/g, ",") }, tooltip: "Font family" };
          }, 73077: function(t4, e4, i3) {
            var o3 = i3(56298), n2 = i3(65147);
            i3(67986), o3.fg.add("font", function(t5) {
              t5.registerButton({ name: "font", group: "font" }).registerButton({ name: "fontsize", group: "font" });
              const e5 = (e6, i4, o4) => {
                switch (e6) {
                  case "fontsize":
                    t5.s.commitStyle({ attributes: { style: { fontSize: (0, n2.normalizeSize)(o4, t5.o.defaultFontSizePoints) } } });
                    break;
                  case "fontname":
                    t5.s.commitStyle({ attributes: { style: { fontFamily: o4 } } });
                }
                return t5.synchronizeValues(), false;
              };
              t5.registerCommand("fontsize", e5).registerCommand("fontname", e5);
            });
          }, 71576: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(931), r2 = i3(29348), s = i3.n(r2), a2 = i3(36115);
            n2.I.set("paragraph", s()), a2.T.prototype.controls.paragraph = { command: "formatBlock", value(t5, e5) {
              var i4, n3;
              const r3 = e5.control, s2 = t5.s.current(), a3 = o3.J.closest(s2, o3.J.isBlock, t5.editor);
              return null !== (i4 = null == a3 ? void 0 : a3.nodeName.toLowerCase()) && void 0 !== i4 ? i4 : null === (n3 = r3.data) || void 0 === n3 ? void 0 : n3.currentValue;
            }, update(t5, e5) {
              const i4 = e5.control;
              if (!t5.s.current()) return false;
              const o4 = e5.state.value, n3 = i4.list;
              return n3 && n3[o4.toString()] && t5.o.textIcons && (e5.state.text = n3[o4.toString()].toString()), false;
            }, data: { currentValue: "p" }, list: { p: "Paragraph", h1: "Heading 1", h2: "Heading 2", h3: "Heading 3", h4: "Heading 4", blockquote: "Quote", pre: "Code" }, isChildActive: (t5, e5) => {
              var i4, o4;
              return Boolean(e5.state.value === (null === (o4 = null === (i4 = e5.control) || void 0 === i4 ? void 0 : i4.args) || void 0 === o4 ? void 0 : o4[0]));
            }, isActive: (t5, e5) => {
              var i4;
              return e5.state.value !== t5.o.enter && Boolean(null === (i4 = e5.control.list) || void 0 === i4 ? void 0 : i4[e5.state.value]);
            }, childTemplate: (t5, e5, i4) => `<${e5} style="margin:0;padding:0"><span>${t5.i18n(i4)}</span></${e5}>`, tooltip: "Insert format block" };
          }, 88429: function(t4, e4, i3) {
            var o3 = i3(56298);
            i3(71576), o3.fg.add("formatBlock", function(t5) {
              t5.registerButton({ name: "paragraph", group: "font" }), t5.registerCommand("formatblock", (e5, i4, o4) => (t5.s.commitStyle({ element: o4 }), t5.synchronizeValues(), false));
            });
          }, 70061: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(931), r2 = i3(24772), s = i3.n(r2), a2 = i3(66547), l = i3.n(a2), c = i3(36115);
            c.T.prototype.fullsize = false, c.T.prototype.globalFullSize = true, n2.I.set("fullsize", s()).set("shrink", l()), c.T.prototype.controls.fullsize = { exec: (t5) => {
              t5.toggleFullSize();
            }, update(t5, e5) {
              const i4 = t5.isFullSize ? "shrink" : "fullsize";
              e5.state.activated = t5.isFullSize, t5.o.textIcons ? e5.state.text = i4 : e5.state.icon.name = i4;
            }, tooltip: "Open in fullsize", mode: o3.MODE_SOURCE + o3.MODE_WYSIWYG };
          }, 9443: function(t4, e4, i3) {
            var o3 = i3(56298), n2 = i3(83044), r2 = i3(38322);
            i3(70061);
            const s = /* @__PURE__ */ new Set();
            o3.fg.add("fullsize", function(t5) {
              t5.registerButton({ name: "fullsize" });
              let e5 = false, i4 = 0, o4 = 0, a2 = false;
              const l = () => {
                const { container: n3, events: s2 } = t5;
                s2 && (e5 ? (i4 = (0, r2.A)(n3, "height", true), o4 = (0, r2.A)(n3, "width", true), (0, r2.A)(n3, { height: t5.ow.innerHeight, width: t5.ow.innerWidth }), a2 = true) : a2 && (0, r2.A)(n3, { height: i4 || "auto", width: o4 || "auto" }));
              }, c = (i5) => {
                var o5;
                const { container: a3, events: c2 } = t5;
                if (a3) {
                  if (void 0 === i5 && (i5 = !a3.classList.contains("jodit_fullsize")), t5.setMod("fullsize", i5), t5.o.fullsize = i5, e5 = i5, a3.classList.toggle("jodit_fullsize", i5), t5.toolbar && ((0, n2.y)(t5) && (null === (o5 = t5.toolbarContainer) || void 0 === o5 || o5.appendChild(t5.toolbar.container)), (0, r2.A)(t5.toolbar.container, "width", "auto")), i5 ? s.add(a3) : s.delete(a3), t5.o.globalFullSize && (1 === s.size && i5 || 0 === s.size && !i5)) {
                    let t6 = a3.parentNode;
                    for (; t6 && t6.nodeType !== Node.DOCUMENT_NODE && t6.nodeType !== Node.DOCUMENT_FRAGMENT_NODE; ) t6.classList.toggle("jodit_fullsize-box_true", i5), t6 = t6.parentNode;
                    l();
                  }
                  c2.fire("afterResize");
                }
              };
              t5.o.globalFullSize && t5.e.on(t5.ow, "resize", l), t5.e.on("afterInit afterOpen", () => {
                var e6;
                t5.toggleFullSize(null === (e6 = null == t5 ? void 0 : t5.options) || void 0 === e6 ? void 0 : e6.fullsize);
              }).on("toggleFullSize", c).on("beforeDestruct", () => {
                e5 && c(false);
              }).on("beforeDestruct", () => {
                t5.events && t5.e.off(t5.ow, "resize", l);
              });
            });
          }, 81522: function(t4, e4, i3) {
            i3(36115).T.prototype.commandToHotkeys = { removeFormat: ["ctrl+shift+m", "cmd+shift+m"], insertOrderedList: ["ctrl+shift+7", "cmd+shift+7"], insertUnorderedList: ["ctrl+shift+8, cmd+shift+8"], selectall: ["ctrl+a", "cmd+a"] };
          }, 30405: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(65147), s = i3(71005);
            i3(81522), n2.fg.add("hotkeys", class extends s.k {
              constructor() {
                super(...arguments), this.onKeyPress = (t5) => {
                  const e5 = this.specialKeys[t5.which], i4 = (t5.key || String.fromCharCode(t5.which)).toLowerCase(), o4 = [e5 || i4];
                  return ["alt", "ctrl", "shift", "meta"].forEach((i5) => {
                    t5[i5 + "Key"] && e5 !== i5 && o4.push(i5);
                  }), (0, r2.normalizeKeyAliases)(o4.join("+"));
                }, this.specialKeys = { 8: "backspace", 9: "tab", 10: "return", 13: "return", 16: "shift", 17: "ctrl", 18: "alt", 19: "pause", 20: "capslock", 27: "esc", 32: "space", 33: "pageup", 34: "pagedown", 35: "end", 36: "home", 37: "left", 38: "up", 39: "right", 40: "down", 45: "insert", 46: "del", 59: ";", 61: "=", 91: "meta", 96: "0", 97: "1", 98: "2", 99: "3", 100: "4", 101: "5", 102: "6", 103: "7", 104: "8", 105: "9", 106: "*", 107: "+", 109: "-", 110: ".", 111: "/", 112: "f1", 113: "f2", 114: "f3", 115: "f4", 116: "f5", 117: "f6", 118: "f7", 119: "f8", 120: "f9", 121: "f10", 122: "f11", 123: "f12", 144: "numlock", 145: "scroll", 173: "-", 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", 221: "]", 222: "'" };
              }
              afterInit(t5) {
                (0, r2.keys)(t5.o.commandToHotkeys, false).forEach((e6) => {
                  const i4 = t5.o.commandToHotkeys[e6];
                  i4 && ((0, r2.isArray)(i4) || (0, r2.isString)(i4)) && t5.registerHotkeyToCommand(i4, e6);
                });
                let e5 = false;
                t5.e.off(".hotkeys").on([t5.ow, t5.ew], "keydown.hotkeys", (t6) => {
                  if (t6.key === o3.KEY_ESC) return this.j.e.fire("escape", t6);
                }).on("keydown.hotkeys", (i4) => {
                  const o4 = this.onKeyPress(i4), n3 = { shouldStop: true };
                  if (false === this.j.e.fire(o4 + ".hotkey", i4.type, n3)) {
                    if (n3.shouldStop) return e5 = true, t5.e.stopPropagation("keydown"), false;
                    i4.preventDefault();
                  }
                }, { top: true }).on("keyup.hotkeys", () => {
                  if (e5) return e5 = false, t5.e.stopPropagation("keyup"), false;
                }, { top: true });
              }
              beforeDestruct(t5) {
                t5.events && t5.e.off(".hotkeys");
              }
            });
          }, 89651: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(56298), r2 = i3(931), s = i3(89097), a2 = i3.n(s), l = i3(36115);
            r2.I.set("hr", a2()), l.T.prototype.controls.hr = { command: "insertHorizontalRule", tags: ["hr"], tooltip: "Insert Horizontal Line" }, n2.fg.add("hr", function(t5) {
              t5.registerButton({ name: "hr", group: "insert" }), t5.registerCommand("insertHorizontalRule", () => {
                const e5 = t5.createInside.element("hr");
                t5.s.insertNode(e5, false, false);
                const i4 = o3.J.closest(e5.parentElement, o3.J.isBlock, t5.editor);
                i4 && o3.J.isEmpty(i4) && i4 !== t5.editor && (o3.J.after(i4, e5), o3.J.safeRemove(i4));
                let n3 = o3.J.next(e5, o3.J.isBlock, t5.editor, false);
                return n3 || (n3 = t5.createInside.element(t5.o.enter), o3.J.after(e5, n3)), t5.s.setCursorIn(n3), false;
              });
            });
          }, 99689: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.iframeBaseUrl = "", o3.T.prototype.iframeTitle = "Jodit Editor", o3.T.prototype.iframeDoctype = "<!DOCTYPE html>", o3.T.prototype.iframeDefaultSrc = "about:blank", o3.T.prototype.iframeStyle = 'html{margin:0;padding:0;min-height: 100%;}body{box-sizing:border-box;font-size:13px;line-height:1.6;padding:10px;margin:0;background:transparent;color:#000;position:relative;z-index:2;user-select:auto;margin:0px;overflow:auto;outline:none;}table{width:100%;border:none;border-collapse:collapse;empty-cells: show;max-width: 100%;}th,td{padding: 2px 5px;border:1px solid #ccc;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}p{margin-top:0;}.jodit_editor .jodit_iframe_wrapper{display: block;clear: both;user-select: none;position: relative;}.jodit_editor .jodit_iframe_wrapper:after {position:absolute;content:"";z-index:1;top:0;left:0;right: 0;bottom: 0;cursor: pointer;display: block;background: rgba(0, 0, 0, 0);} .jodit_disabled{user-select: none;-o-user-select: none;-moz-user-select: none;-khtml-user-select: none;-webkit-user-select: none;-ms-user-select: none}', o3.T.prototype.iframeCSSLinks = [];
          }, 26495: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(65147);
            i3(99689), n2.fg.add("iframe", function(t5) {
              const e5 = t5.options;
              t5.e.on("afterSetMode", () => {
                t5.isEditorMode() && t5.s.focus();
              }).on("generateDocumentStructure.iframe", (t6, i4) => {
                const o4 = t6 || i4.iframe.contentWindow.document;
                if (o4.open(), o4.write(e5.iframeDoctype + `<html dir="${e5.direction}" class="jodit" lang="${(0, r2.defaultLanguage)(e5.language)}"><head><title>${e5.iframeTitle}</title>` + (e5.iframeBaseUrl ? `<base href="${e5.iframeBaseUrl}"/>` : "") + '</head><body class="jodit-wysiwyg"></body></html>'), o4.close(), e5.iframeCSSLinks && e5.iframeCSSLinks.forEach((t7) => {
                  const e6 = o4.createElement("link");
                  e6.setAttribute("rel", "stylesheet"), e6.setAttribute("href", t7), o4.head && o4.head.appendChild(e6);
                }), e5.iframeStyle) {
                  const t7 = o4.createElement("style");
                  t7.innerHTML = e5.iframeStyle, o4.head && o4.head.appendChild(t7);
                }
              }).on("createEditor", () => {
                if (!e5.iframe) return;
                const i4 = t5.c.element("iframe");
                i4.style.display = "block", i4.src = "about:blank", i4.className = "jodit-wysiwyg_iframe", i4.setAttribute("allowtransparency", "true"), i4.setAttribute("tabindex", e5.tabIndex.toString()), i4.setAttribute("frameborder", "0"), t5.workplace.appendChild(i4), t5.iframe = i4;
                const n3 = t5.e.fire("generateDocumentStructure.iframe", null, t5);
                return (0, r2.callPromise)(n3, () => {
                  if (!t5.iframe) return false;
                  const i5 = t5.iframe.contentWindow.document;
                  t5.editorWindow = t5.iframe.contentWindow;
                  const n4 = () => {
                    (0, r2.attr)(i5.body, "contenteditable", t5.getMode() !== o3.MODE_SOURCE && !t5.getReadOnly() || null);
                  }, s = (t6) => {
                    const e6 = /<body.*<\/body>/im, i6 = "{%%BODY%%}", o4 = e6.exec(t6);
                    return o4 && (t6 = t6.replace(e6, i6).replace(/<span([^>]*?)>(.*?)<\/span>/gim, "").replace(/&lt;span([^&]*?)&gt;(.*?)&lt;\/span&gt;/gim, "").replace(i6, o4[0].replace(/(<body[^>]+?)min-height["'\s]*:[\s"']*[0-9]+(px|%)/im, "$1").replace(/(<body[^>]+?)([\s]*["'])?contenteditable["'\s]*=[\s"']*true["']?/im, "$1").replace(/<(style|script|span)[^>]+jodit[^>]+>.*?<\/\1>/g, "")).replace(/(class\s*=\s*)(['"])([^"']*)(jodit-wysiwyg|jodit)([^"']*\2)/g, "$1$2$3$5").replace(/(<[^<]+?)\sclass="[\s]*"/gim, "$1").replace(/(<[^<]+?)\sstyle="[\s;]*"/gim, "$1").replace(/(<[^<]+?)\sdir="[\s]*"/gim, "$1")), t6;
                  };
                  if (e5.editHTMLDocumentMode) {
                    const e6 = t5.element.tagName;
                    if ("TEXTAREA" !== e6 && "INPUT" !== e6) throw (0, r2.error)("If enable `editHTMLDocumentMode` - source element should be INPUT or TEXTAREA");
                    t5.e.on("beforeGetNativeEditorValue", () => s(t5.o.iframeDoctype + i5.documentElement.outerHTML)).on("beforeSetNativeEditorValue", ({ value: e7 }) => !t5.isLocked && (/<(html|body)/i.test(e7) ? s(i5.documentElement.outerHTML) !== s(e7) && (i5.open(), i5.write(t5.o.iframeDoctype + s(e7)), i5.close(), t5.editor = i5.body, t5.e.fire("safeHTML", t5.editor), n4(), t5.e.fire("prepareWYSIWYGEditor"), t5.e.stopPropagation("beforeSetNativeEditorValue")) : i5.body.innerHTML = e7, true), { top: true });
                  }
                  if (t5.editor = i5.body, t5.e.on("afterSetMode afterInit afterAddPlace", n4), "auto" === e5.height) {
                    i5.documentElement && (i5.documentElement.style.overflowY = "hidden");
                    const o4 = t5.async.throttle((...i6) => {
                      t5.async.requestAnimationFrame(() => {
                        if (t5.editor && t5.iframe && "auto" === e5.height) {
                          const e6 = t5.ew.getComputedStyle(t5.editor), i7 = parseInt(e6.marginTop || "0", 10) + parseInt(e6.marginBottom || "0", 10);
                          (0, r2.css)(t5.iframe, "height", t5.editor.offsetHeight + i7);
                        }
                      });
                    }, t5.defaultTimeout / 2);
                    if (t5.e.on("change afterInit afterSetMode resize", o4).on([t5.iframe, t5.ew, i5.documentElement], "load", o4).on(i5, "readystatechange DOMContentLoaded", o4), "function" == typeof ResizeObserver) {
                      const e6 = new ResizeObserver(o4);
                      e6.observe(i5.body), t5.e.on("beforeDestruct", () => {
                        e6.disconnect();
                      });
                    }
                  }
                  return i5.documentElement && t5.e.on(i5.documentElement, "mousedown touchend", () => {
                    t5.s.isFocused() || (t5.s.focus(), t5.editor === i5.body && t5.s.setCursorIn(i5.body));
                  }).on(t5.ew, "mousedown touchstart keydown keyup touchend click mouseup mousemove scroll", (e6) => {
                    var i6;
                    null === (i6 = t5.events) || void 0 === i6 || i6.fire(t5.ow, e6);
                  }), false;
                });
              });
            });
          }, 67915: function(t4, e4, i3) {
            i3(36115).T.prototype.imageProcessor = { replaceDataURIToBlobIdInView: true };
          }, 92097: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(56298), a2 = i3(65147), l = i3(71005);
            i3(67915);
            const c = "__jodit_imageprocessor_binded", d2 = c + "blob-id";
            class u2 extends l.k {
              afterInit(t5) {
              }
              beforeDestruct(t5) {
                const e5 = t5.buffer.get(d2);
                if (e5) {
                  const i4 = Object.keys(e5);
                  for (const t6 of i4) URL.revokeObjectURL(t6);
                  t5.buffer.delete(d2);
                }
              }
              onAfterGetValueFromEditor(t5, e5) {
                if (e5 !== n2.SOURCE_CONSUMER) return this.onBeforeSetElementValue(t5);
              }
              onBeforeSetElementValue(t5) {
                const { jodit: e5 } = this;
                if (!e5.o.imageProcessor.replaceDataURIToBlobIdInView) return;
                const i4 = e5.buffer.get(d2);
                if (i4) {
                  const e6 = Object.keys(i4);
                  for (const o4 of e6) for (; t5.value.includes(o4); ) t5.value = t5.value.replace(o4, i4[o4]);
                }
              }
              async afterChange(t5) {
                const { jodit: e5 } = this;
                e5.editor && (0, a2.$$)("img", e5.editor).forEach((t6) => {
                  (0, a2.dataBind)(t6, c) || ((0, a2.dataBind)(t6, c, true), t6.complete || e5.e.on(t6, "load", function i4() {
                    var o4;
                    !e5.isInDestruct && (null === (o4 = e5.e) || void 0 === o4 || o4.fire("resize")), e5.e.off(t6, "load", i4);
                  }), t6.src && /^data:/.test(t6.src) && function(t7, e6) {
                    if (!t7.o.imageProcessor.replaceDataURIToBlobIdInView) return;
                    if ("undefined" == typeof ArrayBuffer || "undefined" == typeof URL) return;
                    const i4 = e6.src, o4 = function(t8) {
                      const e7 = atob(t8.split(",")[1]), i5 = t8.split(",")[0].split(":")[1].split(";")[0], o5 = new ArrayBuffer(e7.length), n4 = new Uint8Array(o5);
                      for (let t9 = 0; e7.length > t9; t9++) n4[t9] = e7.charCodeAt(t9);
                      return new Blob([o5], { type: i5 });
                    }(i4);
                    e6.src = URL.createObjectURL(o4), t7.e.fire("internalUpdate");
                    const { buffer: n3 } = t7, r3 = n3.get(d2) || {};
                    r3[e6.src] = i4, t7.buffer.set(d2, r3);
                  }(e5, t6), e5.e.on(t6, "mousedown touchstart", () => {
                    e5.s.select(t6);
                  }));
                });
              }
            }
            (0, o3.Cg)([(0, r2.watch)(":afterGetValueFromEditor")], u2.prototype, "onAfterGetValueFromEditor", null), (0, o3.Cg)([(0, r2.watch)(":beforeSetElementValue")], u2.prototype, "onBeforeSetElementValue", null), (0, o3.Cg)([(0, r2.watch)([":change", ":afterInit", ":changePlace"]), (0, r2.debounce)()], u2.prototype, "afterChange", null), s.fg.add("imageProcessor", u2);
          }, 24654: function(t4, e4, i3) {
            i3(36115).T.prototype.image = { dialogWidth: 600, openOnDblClick: true, editSrc: true, useImageEditor: true, editTitle: true, editAlt: true, editLink: true, editSize: true, editBorderRadius: true, editMargins: true, editClass: true, availableClasses: [], editStyle: true, editId: true, editAlign: true, showPreview: true, selectImageAfterClose: true };
          }, 19085: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(55186), s = i3(56298), a2 = i3(65147), l = i3(29866), c = i3(35265), d2 = (i3(24654), i3(31970)), u2 = i3(80778), h2 = i3(33733), p2 = i3(5549), f2 = i3(30393);
            class g2 extends l.k {
              constructor() {
                super(...arguments), this.state = { image: new Image(), sourceImage: new Image(), get ratio() {
                  const { naturalWidth: t5, naturalHeight: e5 } = this.image;
                  return t5 / e5 || 1;
                }, sizeIsLocked: true, marginIsLocked: true, values: { style: "", imageSrc: "", borderRadius: 0, imageTitle: "", imageAlt: "", imageLink: "", imageLinkOpenInNewTab: false, imageWidth: 0, imageHeight: 0, marginTop: 0, marginRight: 0, marginBottom: 0, marginLeft: 0, classes: "", id: "", align: "" } }, this.activeTabState = { activeTab: "Image" };
              }
              get form() {
                return new d2.l(this.j, this.state, this.activeTabState, { openImageEditor: () => (0, u2.v)(this.j, this.state), openImagePopup: (t5) => (0, h2.q)(this.j, this.dialog, this.state, t5) });
              }
              get dialog() {
                const { j: t5 } = this, e5 = t5.dlg({ minWidth: Math.min(400, screen.width), minHeight: 590, buttons: ["fullsize", "dialog.close"] }), i4 = this.__buttons;
                return i4.check.onAction(() => {
                  (0, f2.j)(t5, this.state, this.state.sourceImage), t5.synchronizeValues(), e5.close();
                }), i4.remove.onAction(() => {
                  t5.s.removeNode(this.state.sourceImage), e5.close();
                }), i4.cancel.onAction(() => {
                  e5.close();
                }), e5.setHeader(t5.i18n("Image properties")), e5.setContent(this.form), e5.setFooter([[i4.cancel, i4.remove], i4.check]), t5.e.on(e5, "afterClose", () => {
                  this.state.image.parentNode && t5.o.image.selectImageAfterClose && t5.s.select(this.state.sourceImage);
                }), e5.setSize(t5.o.image.dialogWidth), (0, a2.markOwner)(t5, e5.container), e5;
              }
              get __buttons() {
                const { j: t5 } = this;
                return { check: (0, c.$n)(t5, "ok", "Apply", "primary"), remove: (0, c.$n)(t5, "bin", "Delete"), cancel: (0, c.$n)(t5, "cancel", "Cancel") };
              }
              open() {
                return this.activeTabState.activeTab = "Image", this.__lock(), this.dialog.open().setModal(true).setPosition(), this.async.promise((t5, e5) => (0, p2.U)(this.j, this.state).then(t5, e5)).catch((t5) => {
                  (0, a2.isAbortError)(t5) || this.dialog.message.error(t5.message);
                }).finally(() => this.__unlock()), false;
              }
              __lock() {
                this.dialog.lock(), this.form.setMod("lock", true), Object.values(this.__buttons).forEach((t5) => t5.state.disabled = true);
              }
              __unlock() {
                this.dialog.unlock(), this.form.setMod("lock", false), Object.values(this.__buttons).forEach((t5) => t5.state.disabled = false);
              }
              afterInit(t5) {
                const e5 = this;
                t5.e.on("afterConstructor changePlace", () => {
                  t5.e.off(t5.editor, ".imageproperties").on(t5.editor, "dblclick.imageproperties", (i4) => {
                    const o4 = i4.target;
                    if (r2.J.isTag(o4, "img")) if (t5.o.image.openOnDblClick) {
                      if (false === this.j.e.fire("openOnDblClick", o4)) return;
                      e5.state.sourceImage = o4, e5.state.image = o4.cloneNode(true), t5.o.readonly || (i4.stopImmediatePropagation(), i4.preventDefault(), e5.open());
                    } else i4.stopImmediatePropagation(), t5.s.select(o4);
                  });
                }).on("openImageProperties.imageproperties", (t6) => {
                  e5.state.sourceImage = t6, this.state.image = t6.cloneNode(true), this.open();
                });
              }
              async onStateValuesImageSrcChange() {
                const { image: t5, values: e5 } = this.state;
                if (t5.src) try {
                  if (this.__lock(), await t5.decode(), this.state.sizeIsLocked && (0, a2.isNumeric)(e5.imageWidth)) {
                    const t6 = parseFloat(e5.imageWidth.toString());
                    e5.imageHeight = Math.round(t6 / this.state.ratio);
                  }
                  this.j.e.fire("updateImageProperties.imageproperties", t5);
                } catch (t6) {
                  this.j.alert(t6.message);
                } finally {
                  this.__unlock();
                }
              }
              beforeDestruct(t5) {
                var e5, i4, o4;
                Object.values(null !== (e5 = (0, n2.cached)(this, "__buttons")) && void 0 !== e5 ? e5 : {}).forEach((t6) => t6.destruct()), null === (i4 = (0, n2.cached)(this, "dialog")) || void 0 === i4 || i4.destruct(), null === (o4 = (0, n2.cached)(this, "form")) || void 0 === o4 || o4.destruct(), t5.e.off(t5.editor, ".imageproperties").off(".imageproperties");
              }
            }
            (0, o3.Cg)([n2.cache], g2.prototype, "form", null), (0, o3.Cg)([n2.cache], g2.prototype, "dialog", null), (0, o3.Cg)([n2.cache], g2.prototype, "__buttons", null), (0, o3.Cg)([(0, n2.watch)("state.image")], g2.prototype, "onStateValuesImageSrcChange", null), s.fg.add("imageProperties", g2);
          }, 74260: function(t4, e4, i3) {
            i3.d(e4, { g: function() {
              return n2;
            } });
            var o3 = i3(38322);
            function n2(t5, e5) {
              e5.align = t5.style.cssFloat && -1 !== ["left", "right"].indexOf(t5.style.cssFloat.toLowerCase()) ? (0, o3.A)(t5, "float") : "block" === (0, o3.A)(t5, "display") && "auto" === t5.style.marginLeft && "auto" === t5.style.marginRight ? "center" : "";
            }
          }, 5549: function(t4, e4, i3) {
            i3.d(e4, { U: function() {
              return l;
            } });
            var o3 = i3(26150), n2 = i3(74260), r2 = i3(33201), s = i3(85079), a2 = i3(17880);
            async function l(t5, e5) {
              const { sourceImage: i4, values: l2 } = e5;
              return (0, n2.g)(i4, l2), l2.borderRadius = parseInt(i4.style.borderRadius || "0", 10) || 0, l2.id = (0, o3.C)(i4, "id") || "", l2.imageTitle = (0, o3.C)(i4, "title") || "", l2.imageAlt = (0, o3.C)(i4, "alt") || "", l2.style = (0, o3.C)(i4, "style") || "", l2.classes = ((0, o3.C)(i4, "class") || "").replace(/jodit_focused_image[\s]*/, ""), (0, s.E)(i4, l2, e5), (0, r2.X)(e5, t5, l2), l2.imageSrc = (0, o3.C)(i4, "src") || "", (0, a2.P)(i4, l2, e5);
            }
          }, 33201: function(t4, e4, i3) {
            i3.d(e4, { X: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(26150);
            function r2(t5, e5, i4) {
              const r3 = o3.J.closest(t5.sourceImage, "a", e5.editor);
              r3 ? (i4.imageLink = (0, n2.C)(r3, "href") || "", i4.imageLinkOpenInNewTab = "_blank" === (0, n2.C)(r3, "target")) : (i4.imageLink = "", i4.imageLinkOpenInNewTab = false);
            }
          }, 85079: function(t4, e4, i3) {
            i3.d(e4, { E: function() {
              return n2;
            } });
            var o3 = i3(449);
            function n2(t5, e5, i4) {
              let n3 = true, r2 = false;
              ["marginTop", "marginRight", "marginBottom", "marginLeft"].forEach((i5) => {
                let s = t5.style.getPropertyValue((0, o3.k)(i5));
                if (!s) return r2 = true, void (e5[i5] = 0);
                /^[0-9]+(px)?$/.test(s) && (s = parseInt(s, 10)), e5[i5] = s, (r2 && e5[i5] || n3 && "marginTop" !== i5 && e5[i5] !== e5.marginTop) && (n3 = false);
              }), i4.marginIsLocked = n3;
            }
          }, 17880: function(t4, e4, i3) {
            i3.d(e4, { P: function() {
              return a2;
            } });
            var o3 = i3(12461), n2 = i3(26150), r2 = i3(38322), s = i3(9645);
            async function a2(t5, e5, i4) {
              await t5.decode();
              const a3 = (0, r2.A)(t5, "width", true) || (0, n2.C)(t5, "width") || false, l = (0, r2.A)(t5, "height", true) || (0, n2.C)(t5, "height") || false;
              e5.imageWidth = false !== a3 ? (0, s.G)(a3) : t5.offsetWidth || t5.naturalWidth, e5.imageHeight = (0, o3.k)(e5.imageWidth) ? false !== l ? (0, s.G)(l) : t5.offsetHeight || t5.naturalHeight : l || "";
              const { imageWidth: c, imageHeight: d2 } = e5, u2 = parseFloat(c.toString());
              if (!(0, o3.k)(c) || !(0, o3.k)(d2)) return void (i4.sizeIsLocked = false);
              if (false === l) return e5.imageHeight = Math.round(u2 / i4.ratio), void (i4.sizeIsLocked = true);
              const h2 = parseFloat(d2.toString());
              i4.sizeIsLocked = 1 > Math.abs(u2 - h2 * i4.ratio);
            }
          }, 31970: function(t4, e4, i3) {
            i3.d(e4, { l: function() {
              return h2;
            } });
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(24767), s = i3(65147), a2 = i3(6455), l = i3(931), c = i3(16116), d2 = i3(33403), u2 = i3(46681);
            let h2 = class extends a2.U {
              className() {
                return "UIImagePropertiesForm";
              }
              appendChildToContainer() {
              }
              getElm(t5) {
                const e5 = super.getElm(t5);
                if (e5) return e5;
                for (const e6 of this.elements) {
                  const i4 = e6.getElm(t5);
                  if (i4) return i4;
                }
                return null;
              }
              constructor(t5, e5, i4, o4) {
                super(t5), this.state = e5, this.handlers = o4, this.__mainTab = new d2.k(this.jodit, this.state, this.handlers), this.__positionTab = new u2._(this.jodit, this.state, this.handlers), this.getElm("tabsBox").appendChild((0, c.Zg)(t5, [{ name: "Image", content: this.__mainTab }, { name: "Advanced", content: this.__positionTab }], i4)), this.setMod("lock-size", this.state.sizeIsLocked), this.append(this.__mainTab).append(this.__positionTab);
              }
              render() {
                return `<form>
		<div class="jodit-grid jodit-grid_xs-column">
			<div class="jodit_col-lg-2-5 jodit_col-xs-5-5">
				<div class="&__view-box">
					<div class="&__imageView">
						<img class="&__imageViewSrc" src="" alt=""/>
					</div>
					<div class="jodit-form__group &__imageSizes">
						<input type="text" class="jodit-input &__imageWidth"/>
						<a class="&__lockSize">${l.I.get("lock")}</a>
						<input type="text" class="&__imageHeight jodit-input"/>
					</div>
				</div>
			</div>
			<div class="jodit_col-lg-3-5 jodit_col-xs-5-5 &__tabsBox"></div>
		</div>
	</form>`;
              }
              onChangeSizeIsLocked() {
                const t5 = this.getElm("lockSize"), e5 = this.getElm("imageWidth");
                t5.innerHTML = l.I.get(this.state.sizeIsLocked ? "lock" : "unlock"), this.setMod("lock-size", this.state.sizeIsLocked), this.j.e.fire(e5, "change");
              }
              onLockSizeClick() {
                this.state.sizeIsLocked = !this.state.sizeIsLocked;
              }
              onStateValuesSizeChange() {
                const t5 = this.getElm("imageWidth"), e5 = this.getElm("imageHeight");
                t5 !== this.j.od.activeElement && (t5.value = this.state.values.imageWidth.toString()), e5 !== this.j.od.activeElement && (e5.value = this.state.values.imageHeight.toString());
              }
              onImageWidthChange(t5) {
                const e5 = this.getElm("imageWidth"), i4 = this.getElm("imageHeight");
                if (!this.state.sizeIsLocked || !(0, s.isNumeric)(e5.value) || !(0, s.isNumeric)(i4.value)) return this.state.values.imageWidth = e5.value, void (this.state.values.imageHeight = i4.value);
                const o4 = parseFloat(e5.value), n3 = parseFloat(i4.value);
                t5.target === e5 ? (this.state.values.imageWidth = o4, this.state.values.imageHeight = Math.round(o4 / this.state.ratio)) : (this.state.values.imageWidth = Math.round(n3 * this.state.ratio), this.state.values.imageHeight = n3);
              }
              onStateValuesImageSrcChange() {
                const { imageSrc: t5 } = this.state.values;
                if (!t5) return;
                const e5 = this.getElm("imageViewSrc");
                (0, s.attr)(e5, "src", t5);
                const i4 = new Image();
                i4.src = t5, this.state.image = i4;
              }
              hideFieldByOptions() {
                const t5 = this.j.o.image;
                [["editSize", "imageSizes"], ["showPreview", "imageView"]].forEach(([e5, i4]) => {
                  const o4 = this.getElm(i4);
                  (0, s.css)(o4, "display", t5[e5] ? null : "none");
                });
              }
            };
            (0, o3.Cg)([(0, n2.hook)("ready"), (0, n2.watch)("state.sizeIsLocked")], h2.prototype, "onChangeSizeIsLocked", null), (0, o3.Cg)([(0, n2.watch)("lockSize:click")], h2.prototype, "onLockSizeClick", null), (0, o3.Cg)([(0, n2.hook)("ready"), (0, n2.watch)(["state.values.imageWidth", "state.values.imageHeight"])], h2.prototype, "onStateValuesSizeChange", null), (0, o3.Cg)([(0, n2.watch)(["imageWidth:change", "imageHeight:change", "imageWidth:keydown", "imageHeight:keydown", "imageWidth:mousedown", "imageHeight:mousedown", "imageWidth:paste", "imageHeight:paste"]), (0, n2.debounce)()], h2.prototype, "onImageWidthChange", null), (0, o3.Cg)([(0, n2.hook)("ready"), (0, n2.watch)("state.values.imageSrc")], h2.prototype, "onStateValuesImageSrcChange", null), (0, o3.Cg)([(0, n2.hook)("ready")], h2.prototype, "hideFieldByOptions", null), h2 = (0, o3.Cg)([r2.s], h2);
          }, 33403: function(t4, e4, i3) {
            i3.d(e4, { k: function() {
              return c;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(71151), s = i3(66927), a2 = i3(65147), l = i3(6455);
            let c = class extends l.U {
              className() {
                return "UIImageMainTab";
              }
              appendChildToContainer() {
              }
              constructor(t5, e5, i4) {
                super(t5), this.state = e5, this.handlers = i4;
              }
              render() {
                return '<div class="jodit-form__group &__editSrc">\n			<label>~Src~</label>\n			<div class="jodit-input_group">\n				<input class="jodit-input &__imageSrc" type="text"/>\n				<div class="jodit-input_group-buttons &__fixImage">\n						<a class="jodit-button &__changeImage">*image*</a>\n						<a class="jodit-button &__editImage">*crop*</a>\n				</div>\n			</div>\n		</div>\n		<div class="jodit-form__group &__editTitle">\n			<label>~Title~</label>\n			<input type="text" class="jodit-input &__imageTitle"/>\n		</div>\n		<div class="jodit-form__group &__editAlt">\n			<label>~Alternative~</label>\n			<input type="text" class="jodit-input &__imageAlt"/>\n		</div>\n		<div class="jodit-form__group &__editLink">\n			<label>~Link~</label>\n			<input type="text" class="jodit-input &__imageLink"/>\n		</div>\n		<div class="jodit-form__group &__editLinkTarget">\n			<label class="jodit_vertical_middle">\n				<input type="checkbox" class="jodit-checkbox &__imageLinkOpenInNewTab"/>\n				<span>~Open link in new tab~</span>\n			</label>\n		</div>';
              }
              async onStateImageSrcChange() {
                this.getElm("imageSrc").value = this.state.values.imageSrc;
              }
              onImageSrcChange() {
                this.state.values.imageSrc = this.getElm("imageSrc").value;
              }
              onEditImageClick(t5) {
                this.handlers.openImageEditor(), t5.stopPropagation();
              }
              onChangeImageClick(t5) {
                this.handlers.openImagePopup(this.getElm("changeImage")), t5.stopPropagation();
              }
              onStateTitleChange() {
                this.getElm("imageTitle").value = this.state.values.imageTitle;
              }
              onTitleChange() {
                this.state.values.imageTitle = this.getElm("imageTitle").value;
              }
              onStateAltChange() {
                this.getElm("imageAlt").value = this.state.values.imageAlt;
              }
              onAltChange() {
                this.state.values.imageAlt = this.getElm("imageAlt").value;
              }
              onStateImageLinkChange() {
                this.getElm("imageLink").value = this.state.values.imageLink;
              }
              onImageLinkChange() {
                this.state.values.imageLink = this.getElm("imageLink").value;
              }
              onStateImageLinkOpenInNewTabChange() {
                this.getElm("imageLinkOpenInNewTab").checked = this.state.values.imageLinkOpenInNewTab;
              }
              onImageLinkOpenInNewTabChange() {
                this.state.values.imageLinkOpenInNewTab = this.getElm("imageLinkOpenInNewTab").checked;
              }
              hideFieldByOptions() {
                const t5 = this.j.o, e5 = t5.image;
                [["editSrc", "editSrc"], ["editTitle", "editTitle"], ["editAlt", "editAlt"], ["editLink", "editLink"], ["editLink", "editLinkTarget"], ["useImageEditor", "editImage"]].forEach(([t6, i5]) => {
                  const o5 = this.getElm(i5);
                  (0, a2.css)(o5, "display", e5[t6] ? null : "none");
                });
                const i4 = this.getElm("changeImage"), o4 = Boolean(t5.filebrowser.ajax.url || t5.uploader.url);
                (0, a2.css)(i4, "display", o4 ? null : "none");
                const n3 = this.getElm("editImage"), r3 = Boolean(t5.filebrowser.ajax.url) && e5.useImageEditor;
                (0, a2.css)(n3, "display", r3 ? null : "none");
                const s2 = this.getElm("fixImage");
                (0, a2.css)(s2, "display", o4 || r3 ? null : "none");
              }
            };
            (0, o3.Cg)([(0, s.w)("state.values.imageSrc")], c.prototype, "onStateImageSrcChange", null), (0, o3.Cg)([(0, s.w)("imageSrc:change")], c.prototype, "onImageSrcChange", null), (0, o3.Cg)([(0, s.w)("editImage:click")], c.prototype, "onEditImageClick", null), (0, o3.Cg)([(0, s.w)("changeImage:click")], c.prototype, "onChangeImageClick", null), (0, o3.Cg)([(0, s.w)("state.values.imageTitle")], c.prototype, "onStateTitleChange", null), (0, o3.Cg)([(0, s.w)("imageTitle:change")], c.prototype, "onTitleChange", null), (0, o3.Cg)([(0, s.w)("state.values.imageAlt")], c.prototype, "onStateAltChange", null), (0, o3.Cg)([(0, s.w)("imageAlt:change")], c.prototype, "onAltChange", null), (0, o3.Cg)([(0, s.w)("state.values.imageLink")], c.prototype, "onStateImageLinkChange", null), (0, o3.Cg)([(0, s.w)("imageLink:change")], c.prototype, "onImageLinkChange", null), (0, o3.Cg)([(0, s.w)("state.values.imageLinkOpenInNewTab")], c.prototype, "onStateImageLinkOpenInNewTabChange", null), (0, o3.Cg)([(0, s.w)("imageLinkOpenInNewTab:change")], c.prototype, "onImageLinkOpenInNewTabChange", null), (0, o3.Cg)([(0, r2.A)("ready")], c.prototype, "hideFieldByOptions", null), c = (0, o3.Cg)([n2.s], c);
          }, 46681: function(t4, e4, i3) {
            i3.d(e4, { _: function() {
              return p2;
            } });
            var o3 = i3(31635), n2 = i3(24767), r2 = i3(71151), s = i3(66927), a2 = i3(65147), l = i3(98253), c = i3(26150), d2 = i3(29780), u2 = i3(931), h2 = i3(9645);
            let p2 = class extends d2.D {
              className() {
                return "UIImagePositionTab";
              }
              constructor(t5, e5, i4) {
                super(t5, { availableClasses: t5.o.image.availableClasses }), this.state = e5, this.handlers = i4;
              }
              render({ availableClasses: t5 }) {
                return `<div class="jodit-form__group &__editMargins">
			<label>~Margins~</label>
			<div class="jodit-grid jodit_vertical_middle">
				<input class="jodit_col-lg-1-5 jodit-input &__marginTop" type="text" placeholder="~top~"/>
				<a style="text-align: center;" class="jodit-properties__lock jodit_col-lg-1-5 &__lockMargin">*lock*</a>
				<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginRight" type="text" placeholder="~right~"/>
				<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginBottom" type="text" placeholder="~bottom~"/>
				<input disabled="disabled" class="jodit_col-lg-1-5 jodit-input &__marginLeft" type="text" placeholder="~left~"/>
			</div>
		</div>
		<div class="jodit-form__group &__editAlign">
			<label>~Align~</label>
			<select class="jodit-select &__align">
				<option value="">~--Not Set--~</option>
				<option value="left">~Left~</option>
				<option value="center">~Center~</option>
				<option value="right">~Right~</option>
			</select>
		</div>
		<div class="jodit-form__group &__editStyle">
			<label>~Styles~</label>
			<input type="text" class="jodit-input &__style"/>
		</div>
		<div class="jodit-form__group &__editClass">
			<label>~Classes~</label>
			${(() => {
                  const e5 = [];
                  return t5 && t5.length > 0 ? (e5.push('<select class="jodit-input jodit-select &__classes">'), t5.forEach((t6) => {
                    (0, l.K)(t6) ? e5.push(`<option value="${t6}">${t6}</option>`) : e5.push(`<option value="${t6[0]}">${t6[1]}</option>`);
                  }), e5.push("</select>")) : e5.push('<input type="text" class="jodit-input &__classes"/>'), e5.join("");
                })()}
		</div>
		<div class="jodit-form__group &__editId">
			<label>Id</label>
			<input type="text" class="jodit-input &__id"/>
		</div>
		<div
			class="jodit-form__group &__editBorderRadius"
		>
			<label>~Border radius~</label>
			<input type="number" class="jodit-input &__borderRadius"/>
		</div>`;
              }
              onStateAlignChange() {
                this.getElm("align").value = this.state.values.align;
              }
              onChangeAlign() {
                const t5 = this.getElm("align");
                this.state.values.align = t5.value;
              }
              onStateValuesBorderRadiusChange() {
                this.getElm("borderRadius").value = this.state.values.borderRadius.toString();
              }
              onChangeBorderRadius() {
                const t5 = this.getElm("borderRadius");
                this.state.values.borderRadius = parseFloat(t5.value);
              }
              onStateValuesIdChange() {
                this.getElm("id").value = this.state.values.id;
              }
              onChangeId() {
                const t5 = this.getElm("id");
                this.state.values.id = t5.value;
              }
              onStateValuesStyleChange() {
                this.getElm("style").value = this.state.values.style;
              }
              onChangeStyle() {
                const t5 = this.getElm("style");
                this.state.values.style = t5.value;
              }
              onStateValuesClassesChange() {
                this.getElm("classes").value = this.state.values.classes;
              }
              onChangClasses() {
                const t5 = this.getElm("classes");
                this.state.values.classes = t5.value;
              }
              onLockMarginClick(t5) {
                this.state.marginIsLocked = !this.state.marginIsLocked, t5.preventDefault();
              }
              onChangeMarginIsLocked() {
                const t5 = this.getElm("marginBottom"), e5 = this.getElm("marginRight"), i4 = this.getElm("marginLeft"), o4 = this.getElm("lockMargin");
                if ([e5, t5, i4].forEach((t6) => {
                  (0, c.C)(t6, "disabled", this.state.marginIsLocked || null);
                }), o4.innerHTML = u2.I.get(this.state.marginIsLocked ? "lock" : "unlock"), this.state.marginIsLocked) {
                  const t6 = this.state.values.marginTop;
                  this.state.values.marginRight = t6, this.state.values.marginBottom = t6, this.state.values.marginLeft = t6;
                }
              }
              onStateValuesMarginChange() {
                const t5 = this.getElm("marginTop"), e5 = this.getElm("marginRight"), i4 = this.getElm("marginBottom"), o4 = this.getElm("marginLeft");
                t5.value = this.state.values.marginTop.toString(), e5.value = this.state.values.marginRight.toString(), i4.value = this.state.values.marginBottom.toString(), o4.value = this.state.values.marginLeft.toString();
              }
              onChangeMargin() {
                const t5 = this.getElm("marginTop"), e5 = this.getElm("marginRight"), i4 = this.getElm("marginBottom"), o4 = this.getElm("marginLeft");
                this.state.values.marginTop = (0, h2.G)(t5.value), this.state.marginIsLocked ? (this.state.values.marginRight = this.state.values.marginTop, this.state.values.marginBottom = this.state.values.marginTop, this.state.values.marginLeft = this.state.values.marginTop) : (this.state.values.marginRight = (0, h2.G)(e5.value), this.state.values.marginBottom = (0, h2.G)(i4.value), this.state.values.marginLeft = (0, h2.G)(o4.value));
              }
              hideFieldByOptions() {
                const t5 = this.j.o.image;
                [["editMargins", "editMargins"], ["editAlign", "editAlign"], ["editStyle", "editStyle"], ["editClass", "editClass"], ["editId", "editId"], ["editBorderRadius", "editBorderRadius"]].forEach(([e5, i4]) => {
                  const o4 = this.getElm(i4);
                  (0, a2.css)(o4, "display", t5[e5] ? null : "none");
                });
              }
            };
            (0, o3.Cg)([(0, r2.A)("ready"), (0, s.w)("state.values.align")], p2.prototype, "onStateAlignChange", null), (0, o3.Cg)([(0, s.w)("align:change")], p2.prototype, "onChangeAlign", null), (0, o3.Cg)([(0, r2.A)("ready"), (0, s.w)("state.values.borderRadius")], p2.prototype, "onStateValuesBorderRadiusChange", null), (0, o3.Cg)([(0, s.w)("borderRadius:change")], p2.prototype, "onChangeBorderRadius", null), (0, o3.Cg)([(0, r2.A)("ready"), (0, s.w)("state.values.id")], p2.prototype, "onStateValuesIdChange", null), (0, o3.Cg)([(0, s.w)("id:change")], p2.prototype, "onChangeId", null), (0, o3.Cg)([(0, r2.A)("ready"), (0, s.w)("state.values.style")], p2.prototype, "onStateValuesStyleChange", null), (0, o3.Cg)([(0, s.w)("style:change")], p2.prototype, "onChangeStyle", null), (0, o3.Cg)([(0, r2.A)("ready"), (0, s.w)("state.values.classes")], p2.prototype, "onStateValuesClassesChange", null), (0, o3.Cg)([(0, s.w)("classes:change")], p2.prototype, "onChangClasses", null), (0, o3.Cg)([(0, s.w)("lockMargin:click")], p2.prototype, "onLockMarginClick", null), (0, o3.Cg)([(0, r2.A)("ready"), (0, s.w)("state.marginIsLocked")], p2.prototype, "onChangeMarginIsLocked", null), (0, o3.Cg)([(0, r2.A)("ready"), (0, s.w)(["state.values.marginTop", "state.values.marginRight", "state.values.marginBottom", "state.values.marginLeft"])], p2.prototype, "onStateValuesMarginChange", null), (0, o3.Cg)([(0, s.w)(["marginTop:change", "marginRight:change", "marginBottom:change", "marginLeft:change"])], p2.prototype, "onChangeMargin", null), (0, o3.Cg)([(0, r2.A)("ready")], p2.prototype, "hideFieldByOptions", null), p2 = (0, o3.Cg)([n2.s], p2);
          }, 80778: function(t4, e4, i3) {
            i3.d(e4, { v: function() {
              return s;
            } });
            var o3 = i3(98253), n2 = i3(26150), r2 = i3(53804);
            function s(t5, e5) {
              const i4 = (0, n2.C)(e5.image, "src") || "", s2 = t5.c.element("a"), a2 = () => {
                s2.host === location.host || t5.confirm("You can only edit your own images. Download this image on the host?", (i5) => {
                  i5 && t5.uploader && t5.uploader.uploadRemoteImage(s2.href.toString(), (i6) => {
                    t5.alert("The image has been successfully uploaded to the host!", () => {
                      (0, o3.K)(i6.newfilename) && (e5.values.imageSrc = i6.baseurl + i6.newfilename);
                    });
                  }, (e6) => {
                    t5.alert("There was an error loading %s", e6.message);
                  });
                });
              };
              s2.href = i4, t5.filebrowser.dataProvider.getPathByUrl(s2.href.toString()).then((o4) => {
                r2.B.call(t5.filebrowser, s2.href, o4.name, o4.path, o4.source, () => {
                  const t6 = (/* @__PURE__ */ new Date()).getTime();
                  e5.values.imageSrc = i4 + (-1 !== i4.indexOf("?") ? "" : "?") + "&_tmp=" + t6.toString();
                }, (e6) => {
                  t5.alert(e6.message);
                });
              }).catch((e6) => {
                t5.alert(e6.message, a2);
              });
            }
          }, 33733: function(t4, e4, i3) {
            i3.d(e4, { q: function() {
              return a2;
            } });
            var o3 = i3(37923), n2 = i3(27594), r2 = i3(80071), s = i3(10067);
            function a2(t5, e5, i4, a3) {
              const l = new r2.z(e5), c = () => {
                l.close(), l.destruct();
              };
              l.setContent((0, s.k)(t5, { upload: (t6) => {
                t6.files && t6.files.length && (i4.values.imageSrc = t6.baseurl + t6.files[0]), c();
              }, filebrowser: async (t6) => {
                t6 && (0, o3.c)(t6.files) && t6.files.length && (i4.values.imageSrc = t6.files[0], c());
              } }, i4.image, c)).open(() => (0, n2.G)(a3));
            }
          }, 9645: function(t4, e4, i3) {
            i3.d(e4, { G: function() {
              return r2;
            }, n: function() {
              return s;
            } });
            var o3 = i3(2461), n2 = i3(59101);
            const r2 = (t5) => /^[-+]?[0-9.]+(px)?$/.test(t5.toString()) ? parseFloat(t5.toString()) : t5, s = (t5) => (0, o3.E)(t5) ? t5 ? t5 + "px" : t5.toString() : (t5 = (0, n2.Bq)(t5), /^[0-9]+$/.test(t5) ? t5 + "px" : t5);
          }, 30393: function(t4, e4, i3) {
            i3.d(e4, { j: function() {
              return l;
            } });
            var o3 = i3(55186), n2 = i3(97369), r2 = i3(88269), s = i3(78139), a2 = i3(58972);
            function l(t5, e5, i4) {
              const { style: l2, imageSrc: c, borderRadius: d2, imageTitle: u2, imageAlt: h2, imageLink: p2, imageWidth: f2, imageHeight: g2, marginTop: m2, marginRight: b2, marginBottom: _2, marginLeft: v2, imageLinkOpenInNewTab: x, align: w, classes: y2, id: j } = e5.values, k2 = t5.o;
              k2.image.editStyle && (0, n2.attr)(i4, "style", l2 || null), c ? ((0, n2.attr)(i4, "src", c), i4.style.borderRadius = d2 ? d2 + "px" : "", (0, n2.attr)(i4, "title", u2 || null), (0, n2.attr)(i4, "alt", h2 || null), (0, r2.j)(t5, i4, p2, x), (0, a2.q)(i4, f2, g2, e5.sizeIsLocked), t5.o.image.editMargins && (0, s.N)(t5, m2, b2, _2, v2, i4, e5.marginIsLocked), k2.image.editClass && (0, n2.attr)(i4, "class", y2 || null), k2.image.editId && (0, n2.attr)(i4, "id", j || null), k2.image.editAlign && (0, n2.hAlignElement)(i4, w)) : o3.J.safeRemove(i4);
            }
          }, 88269: function(t4, e4, i3) {
            i3.d(e4, { j: function() {
              return r2;
            } });
            var o3 = i3(55186), n2 = i3(26150);
            function r2(t5, e5, i4, r3) {
              let s = o3.J.closest(e5, "a", t5.editor);
              i4 ? (s || (s = o3.J.wrap(e5, "a", t5.createInside)), (0, n2.C)(s, "href", i4), (0, n2.C)(s, "target", r3 ? "_blank" : null)) : s && s.parentNode && s.parentNode.replaceChild(e5, s);
            }
          }, 78139: function(t4, e4, i3) {
            i3.d(e4, { N: function() {
              return r2;
            } });
            var o3 = i3(38322), n2 = i3(9645);
            function r2(t5, e5, i4, r3, s, a2, l) {
              const c = [e5, i4, r3, s], d2 = (t6, e6) => {
                const i5 = (0, o3.A)(a2, t6), r4 = (0, n2.n)(e6);
                i5.toString() !== r4.toString() && (0, o3.A)(a2, t6, r4);
              };
              if (l) d2("margin", e5);
              else {
                const t6 = ["margin-top", "margin-right", "margin-bottom", "margin-left"];
                c.forEach((e6, i5) => {
                  d2(t6[i5], e6);
                });
              }
            }
          }, 58972: function(t4, e4, i3) {
            i3.d(e4, { q: function() {
              return a2;
            } });
            var o3 = i3(12461), n2 = i3(26150), r2 = i3(38322), s = i3(9645);
            function a2(t5, e5, i4, a3) {
              if (e5 !== t5.offsetWidth || i4 !== t5.offsetHeight) {
                const l = e5 ? (0, s.n)(e5) : null;
                let c = i4 ? (0, s.n)(i4) : null;
                (0, r2.A)(t5, { width: l, height: l && a3 ? null : c }), (0, n2.C)(t5, "width", l && (0, o3.k)(e5) && (0, n2.C)(t5, "width") ? l : null), (0, n2.C)(t5, "width") && !a3 || (c = null), (0, n2.C)(t5, "height", c);
              }
            }
          }, 49777: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(56298), r2 = i3(65147), s = i3(931), a2 = i3(16116), l = i3(64831), c = i3.n(l), d2 = i3(36115);
            s.I.set("image", c()), d2.T.prototype.controls.image = { popup: (t5, e5, i4) => {
              let n3 = null;
              return e5 && !o3.J.isText(e5) && o3.J.isHTMLElement(e5) && (o3.J.isTag(e5, "img") || (0, r2.$$)("img", e5).length) && (n3 = o3.J.isTag(e5, "img") ? e5 : (0, r2.$$)("img", e5)[0]), t5.s.save(), (0, a2.kG)(t5, { filebrowser: (e6) => {
                t5.s.restore(), e6.files && e6.files.forEach((i5) => t5.s.insertImage(e6.baseurl + i5, null, t5.o.imageDefaultWidth)), i4();
              }, upload: true, url: async (e6, o4) => {
                t5.s.restore(), /^[a-z\d_-]+(\.[a-z\d_-]+)+/i.test(e6) && (e6 = "//" + e6);
                const r3 = n3 || t5.createInside.element("img");
                r3.setAttribute("src", e6), r3.setAttribute("alt", o4), n3 || await t5.s.insertImage(r3, null, t5.o.imageDefaultWidth), i4();
              } }, n3, i4);
            }, tags: ["img"], tooltip: "Insert Image" }, n2.fg.add("image", function(t5) {
              t5.registerButton({ name: "image", group: "media" });
            });
          }, 97767: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(931), r2 = i3(67176), s = i3.n(r2), a2 = i3(14017), l = i3.n(a2), c = i3(3392), d2 = i3(36115);
            n2.I.set("indent", s()).set("outdent", l()), d2.T.prototype.controls.indent = { tooltip: "Increase Indent" }, d2.T.prototype.controls.outdent = { isDisabled: (t5) => {
              const e5 = t5.s.current();
              if (e5) {
                const i4 = o3.J.closest(e5, o3.J.isBlock, t5.editor);
                if (i4) {
                  const e6 = (0, c.i)(t5.o.direction, i4);
                  return !i4.style[e6] || 0 >= parseInt(i4.style[e6], 10);
                }
              }
              return true;
            }, tooltip: "Decrease Indent" }, d2.T.prototype.indentMargin = 10;
          }, 3392: function(t4, e4, i3) {
            i3.d(e4, { i: function() {
              return n2;
            } });
            var o3 = i3(55186);
            const n2 = (t5, e5) => `${o3.J.isCell(e5) ? "padding" : "margin"}${"rtl" === t5 ? "Right" : "Left"}`;
          }, 46079: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(71842), r2 = i3(56298), s = i3(65147), a2 = (i3(97767), i3(3392));
            r2.fg.add("indent", function(t5) {
              t5.registerButton({ name: "indent", group: "indent" }).registerButton({ name: "outdent", group: "indent" });
              const e5 = (e6) => {
                const i4 = [];
                return t5.s.eachSelection((r3) => {
                  t5.s.save();
                  let l = !!r3 && n2.J.up(r3, n2.J.isBlock, t5.editor);
                  const { enter: c } = t5.o;
                  if (!l && r3 && (l = n2.J.wrapInline(r3, c !== o3.BR ? c : o3.PARAGRAPH, t5)), !l) return t5.s.restore(), false;
                  const d2 = i4.includes(l);
                  if (l && !d2) {
                    const o4 = (0, a2.i)(t5.o.direction, l);
                    i4.push(l);
                    let n3 = l.style[o4] ? parseInt(l.style[o4], 10) : 0;
                    n3 += t5.o.indentMargin * ("outdent" === e6 ? -1 : 1), l.style[o4] = n3 > 0 ? n3 + "px" : "", (0, s.attr)(l, "style") || (0, s.attr)(l, "style", null);
                  }
                  t5.s.restore();
                }), t5.synchronizeValues(), false;
              };
              t5.registerCommand("indent", { exec: e5, hotkeys: ["ctrl+]", "cmd+]"] }), t5.registerCommand("outdent", { exec: e5, hotkeys: ["ctrl+[", "cmd+["] });
            });
          }, 88222: function(t4, e4, i3) {
            i3(14221), i3(55989), i3(13917), i3(5929), i3(49289), i3(98341), i3(38101), i3(24593), i3(36293), i3(38373), i3(64565), i3(27509), i3(13405), i3(67335), i3(92553), i3(73077), i3(88429), i3(9443), i3(30405), i3(89651), i3(26495), i3(49777), i3(92097), i3(19085), i3(46079), i3(3459), i3(99573), i3(92225), i3(9117), i3(83105), i3(47791), i3(26421), i3(76967), i3(1239), i3(13861), i3(36969), i3(56701), i3(225), i3(81089), i3(44921), i3(78757), i3(60189), i3(39147), i3(76693), i3(6857), i3(17343), i3(35523), i3(46939), i3(69077), i3(93669), i3(97179), i3(65199), i3(1677), i3(35541), i3(64241), i3(59965), i3(76385), i3(2533), i3(38309), i3(14367), i3(61589), i3(36133), i3(37873);
          }, 15776: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(97836), r2 = i3(82558), s = i3(6295), a2 = i3(26396), l = i3(58540), c = i3(36115), d2 = i3(38681), u2 = i3.n(d2), h2 = i3(64637), p2 = i3.n(h2), f2 = i3(94190), g2 = i3.n(f2), m2 = i3(51957), b2 = i3.n(m2), _2 = i3(71940), v2 = i3.n(_2), x = i3(43218), w = i3.n(x), y2 = i3(48007), j = i3.n(y2);
            c.T.prototype.toolbarInline = true, c.T.prototype.toolbarInlineForSelection = false, c.T.prototype.toolbarInlineDisableFor = [], c.T.prototype.toolbarInlineDisabledButtons = ["source"], o3.I.set("addcolumn", u2()).set("addrow", p2()).set("merge", g2()).set("th", w()).set("splitg", b2()).set("splitv", v2()).set("th-list", j()), c.T.prototype.popup = { a: n2.A, img: a2.A, cells: r2.A, toolbar: l.A, jodit: s.A, iframe: s.A, "jodit-media": s.A, selection: ["bold", "underline", "italic", "ul", "ol", "\n", "outdent", "indent", "fontsize", "brush", "cut", "\n", "paragraph", "link", "align", "dots"] };
          }, 97836: function(t4, e4, i3) {
            var o3 = i3(26150);
            e4.A = [{ name: "eye", tooltip: "Open link", exec: (t5, e5) => {
              const i4 = (0, o3.C)(e5, "href");
              e5 && i4 && t5.ow.open(i4);
            } }, { name: "link", tooltip: "Edit link", icon: "pencil" }, "unlink", "brush", "file"];
          }, 82558: function(t4, e4, i3) {
            var o3 = i3(9823), n2 = i3(38322);
            const r2 = (t5) => t5.args && (0, o3.Kg)(t5.args[0]) ? t5.args[0].toLowerCase() : "";
            e4.A = ["brushCell", { name: "valign", list: ["Top", "Middle", "Bottom", "Normal"], childTemplate: (t5, e5, i4) => i4, exec: (t5, e5, { control: i4 }) => {
              const o4 = r2(i4);
              t5.getInstance("Table", t5.o).getAllSelectedCells().forEach((t6) => {
                (0, n2.A)(t6, "vertical-align", "normal" === o4 ? "" : o4);
              });
            }, tooltip: "Vertical align" }, { name: "splitv", list: { tablesplitv: "Split vertical", tablesplitg: "Split horizontal" }, tooltip: "Split" }, { name: "align", icon: "left" }, "\n", { name: "merge", command: "tablemerge", tooltip: "Merge" }, { name: "addcolumn", list: { tableaddcolumnbefore: "Insert column before", tableaddcolumnafter: "Insert column after" }, exec: (t5, e5, { control: i4 }) => {
              if (!(0, o3.y0)(t5)) return;
              const n3 = r2(i4);
              t5.execCommand(n3, false, e5);
            }, tooltip: "Add column" }, { name: "addrow", list: { tableaddrowbefore: "Insert row above", tableaddrowafter: "Insert row below" }, exec: (t5, e5, { control: i4 }) => {
              if (!(0, o3.y0)(t5)) return;
              const n3 = r2(i4);
              t5.execCommand(n3, false, e5);
            }, tooltip: "Add row" }, { name: "delete", icon: "bin", list: { tablebin: "Delete table", tablebinrow: "Delete row", tablebincolumn: "Delete column", tableempty: "Empty cell" }, exec: (t5, e5, { control: i4 }) => {
              if (!(0, o3.y0)(t5)) return;
              const n3 = r2(i4);
              t5.execCommand(n3, false, e5), t5.e.fire("hidePopup");
            }, tooltip: "Delete" }];
          }, 6295: function(t4, e4, i3) {
            var o3 = i3(26396);
            e4.A = [{ name: "bin", tooltip: "Delete", exec: (t5, e5) => {
              e5 && t5.s.removeNode(e5);
            } }, o3.M];
          }, 26396: function(t4, e4, i3) {
            i3.d(e4, { M: function() {
              return a2;
            } });
            var o3 = i3(71842), n2 = i3(98253), r2 = i3(40080), s = i3(38322);
            const a2 = { name: "left", childTemplate: (t5, e5, i4) => i4, list: ["Left", "Right", "Center", "Normal"], exec: (t5, e5, { control: i4 }) => {
              if (!o3.J.isTag(e5, /* @__PURE__ */ new Set(["img", "jodit", "jodit-media"]))) return;
              const s2 = i4.args && (0, n2.K)(i4.args[0]) ? i4.args[0].toLowerCase() : "";
              if (!s2) return false;
              (0, r2.Mr)(e5, s2), o3.J.isTag(e5, /* @__PURE__ */ new Set(["jodit", "jodit-media"])) && e5.firstElementChild && (0, r2.Mr)(e5.firstElementChild, s2), t5.synchronizeValues(), t5.e.fire("recalcPositionPopup");
            }, tooltip: "Horizontal align" };
            e4.A = [{ name: "delete", icon: "bin", tooltip: "Delete", exec: (t5, e5) => {
              e5 && t5.s.removeNode(e5);
            } }, { name: "pencil", exec(t5, e5) {
              "img" === e5.tagName.toLowerCase() && t5.e.fire("openImageProperties", e5);
            }, tooltip: "Edit" }, { name: "valign", list: ["Top", "Middle", "Bottom", "Normal"], tooltip: "Vertical align", exec: (t5, e5, { control: i4 }) => {
              if (!o3.J.isTag(e5, "img")) return;
              const r3 = i4.args && (0, n2.K)(i4.args[0]) ? i4.args[0].toLowerCase() : "";
              if (!r3) return false;
              (0, s.A)(e5, "vertical-align", "normal" === r3 ? "" : r3), t5.e.fire("recalcPositionPopup");
            } }, a2];
          }, 58540: function(t4, e4) {
            e4.A = ["bold", "italic", "|", "ul", "ol", "eraser", "|", "fontsize", "brush", "paragraph", "---", "image", "table", "\n", "link", "|", "align", "|", "undo", "redo", "|", "copyformat", "fullsize", "---", "dots"];
          }, 3459: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(71842), s = i3(56298), a2 = i3(65147), l = i3(71005), c = i3(53048), d2 = i3(96369), u2 = i3(8809);
            i3(15776);
            class h2 extends l.k {
              constructor() {
                super(...arguments), this.type = null, this.snapRange = null, this.elmsList = (0, a2.keys)(this.j.o.popup, false).filter((t5) => !this.isExcludedTarget(t5));
              }
              get popup() {
                return new d2.z(this.jodit, false);
              }
              get toolbar() {
                return (0, u2.$K)(this.jodit, this.popup);
              }
              onClick(t5) {
                const e5 = this.elmsList, i4 = r2.J.isTag(t5, "img") ? t5 : r2.J.closest(t5, e5, this.j.editor);
                if (i4 && this.canShowPopupForType(i4.nodeName.toLowerCase())) return this.showPopup(() => (0, a2.position)(i4, this.j), i4.nodeName.toLowerCase(), i4), false;
              }
              showPopup(t5, e5, i4) {
                if (e5 = e5.toLowerCase(), !this.canShowPopupForType(e5)) return false;
                if (this.type !== e5 || i4 !== this.previousTarget) {
                  this.previousTarget = i4;
                  const t6 = this.j.o.popup[e5];
                  let o4;
                  o4 = (0, a2.isFunction)(t6) ? t6(this.j, i4, this.popup.close) : t6, (0, a2.isArray)(o4) && (this.toolbar.build(o4, i4), this.toolbar.buttonSize = this.j.o.toolbarButtonSize, o4 = this.toolbar.container), this.popup.setContent(o4), this.type = e5;
                }
                return this.popup.open(t5), true;
              }
              hidePopup(t5) {
                !this.popup.isOpened || (0, a2.isString)(t5) && t5 !== this.type || this.popup.close();
              }
              onOutsideClick() {
                this.popup.close();
              }
              canShowPopupForType(t5) {
                const e5 = this.j.o.popup[t5.toLowerCase()];
                return !(this.j.o.readonly || !this.j.o.toolbarInline || !e5 || this.isExcludedTarget(t5));
              }
              isExcludedTarget(t5) {
                return (0, a2.splitArray)(this.j.o.toolbarInlineDisableFor).map((t6) => t6.toLowerCase()).includes(t5.toLowerCase());
              }
              afterInit(t5) {
                this.j.e.on("getDiffButtons.mobile", (e5) => {
                  if (this.toolbar === e5) {
                    const e6 = this.toolbar.getButtonsNames();
                    return (0, a2.toArray)(t5.registeredButtons).filter((t6) => !this.j.o.toolbarInlineDisabledButtons.includes(t6.name)).filter((t6) => {
                      const i4 = (0, a2.isString)(t6) ? t6 : t6.name;
                      return i4 && "|" !== i4 && "\n" !== i4 && !e6.includes(i4);
                    });
                  }
                }).on("hidePopup", this.hidePopup).on("showInlineToolbar", this.showInlineToolbar).on("showPopup", (t6, e5, i4) => {
                  this.showPopup(e5, i4 || ((0, a2.isString)(t6) ? t6 : t6.nodeName), (0, a2.isString)(t6) ? void 0 : t6);
                }).on("mousedown keydown", this.onSelectionStart).on("change", () => {
                  this.popup.isOpened && this.previousTarget && !this.previousTarget.parentNode && (this.hidePopup(), this.previousTarget = void 0);
                }).on([this.j.ew, this.j.ow], "mouseup keyup", this.onSelectionEnd), this.addListenersForElements();
              }
              onSelectionStart() {
                this.snapRange = this.j.s.range.cloneRange();
              }
              onSelectionEnd(t5) {
                if (t5 && t5.target && c.D$.closestElement(t5.target, d2.z)) return;
                const { snapRange: e5 } = this, { range: i4 } = this.j.s;
                e5 && !i4.collapsed && i4.startContainer === e5.startContainer && i4.startOffset === e5.startOffset && i4.endContainer === e5.endContainer && i4.endOffset === e5.endOffset || this.onSelectionChange();
              }
              onSelectionChange() {
                if (!this.j.o.toolbarInlineForSelection) return;
                const t5 = "selection", e5 = this.j.s.sel, i4 = this.j.s.range;
                (null == e5 ? void 0 : e5.isCollapsed) || this.isSelectedTarget(i4) || this.tableModule.getAllSelectedCells().length ? this.type === t5 && this.popup.isOpened && this.hidePopup() : this.j.s.current() && this.showPopup(() => i4.getBoundingClientRect(), t5);
              }
              isSelectedTarget(t5) {
                const e5 = t5.startContainer;
                return r2.J.isElement(e5) && e5 === t5.endContainer && r2.J.isTag(e5.childNodes[t5.startOffset], new Set((0, a2.keys)(this.j.o.popup, false))) && t5.startOffset === t5.endOffset - 1;
              }
              get tableModule() {
                return this.j.getInstance("Table", this.j.o);
              }
              beforeDestruct(t5) {
                t5.e.off("showPopup").off([this.j.ew, this.j.ow], "mouseup keyup", this.onSelectionEnd), this.removeListenersForElements();
              }
              _eventsList() {
                const t5 = this.elmsList;
                return t5.map((t6) => (0, a2.camelCase)(`click_${t6}`)).concat(t5.map((t6) => (0, a2.camelCase)(`touchstart_${t6}`))).join(" ");
              }
              addListenersForElements() {
                this.j.e.on(this._eventsList(), this.onClick);
              }
              removeListenersForElements() {
                this.j.e.off(this._eventsList(), this.onClick);
              }
              showInlineToolbar(t5) {
                this.showPopup(() => {
                  if (t5) return t5;
                  const { range: e5 } = this.j.s;
                  return e5.getBoundingClientRect();
                }, "toolbar");
              }
            }
            h2.requires = ["select"], (0, o3.Cg)([n2.cache], h2.prototype, "popup", null), (0, o3.Cg)([n2.cache], h2.prototype, "toolbar", null), (0, o3.Cg)([n2.autobind], h2.prototype, "onClick", null), (0, o3.Cg)([(0, n2.wait)((t5) => !t5.j.isLocked)], h2.prototype, "showPopup", null), (0, o3.Cg)([(0, n2.watch)([":clickEditor", ":beforeCommandDelete", ":backSpaceAfterDelete"]), n2.autobind], h2.prototype, "hidePopup", null), (0, o3.Cg)([(0, n2.watch)(":outsideClick")], h2.prototype, "onOutsideClick", null), (0, o3.Cg)([n2.autobind], h2.prototype, "onSelectionStart", null), (0, o3.Cg)([n2.autobind], h2.prototype, "onSelectionEnd", null), (0, o3.Cg)([(0, n2.debounce)((t5) => t5.defaultTimeout)], h2.prototype, "onSelectionChange", null), (0, o3.Cg)([n2.autobind], h2.prototype, "showInlineToolbar", null), s.fg.add("inlinePopup", h2);
          }, 99573: function(t4, e4, i3) {
            var o3 = i3(55186), n2 = i3(56298), r2 = i3(40080), s = i3(38322), a2 = i3(931), l = i3(80515), c = i3.n(l), d2 = i3(36115);
            a2.I.set("justify", c()), d2.T.prototype.controls.align = { name: "left", tooltip: "Align", update(t5, e5) {
              const i4 = e5.control, n3 = t5.s.current();
              if (n3) {
                const r3 = o3.J.closest(n3, o3.J.isBlock, t5.editor) || t5.editor;
                let a3 = (0, s.A)(r3, "text-align").toString();
                i4.defaultValue && -1 !== i4.defaultValue.indexOf(a3) && (a3 = "left"), i4.data && i4.data.currentValue !== a3 && i4.list && i4.list[a3] && (t5.o.textIcons || "select" === i4.component ? e5.state.text = a3 : e5.state.icon.name = a3, i4.data.currentValue = a3);
              }
            }, isActive: (t5, e5) => {
              const i4 = t5.s.current();
              if (!i4 || !e5.control.defaultValue) return false;
              const n3 = o3.J.closest(i4, o3.J.isBlock, t5.editor) || t5.editor;
              return -1 === e5.control.defaultValue.indexOf((0, s.A)(n3, "text-align").toString());
            }, defaultValue: ["left", "start", "inherit"], data: { currentValue: "left" }, list: ["center", "left", "right", "justify"] }, d2.T.prototype.controls.center = { command: "justifyCenter", css: { "text-align": "center" }, tooltip: "Align Center" }, d2.T.prototype.controls.justify = { command: "justifyFull", css: { "text-align": "justify" }, tooltip: "Align Justify" }, d2.T.prototype.controls.left = { command: "justifyLeft", css: { "text-align": "left" }, tooltip: "Align Left" }, d2.T.prototype.controls.right = { command: "justifyRight", css: { "text-align": "right" }, tooltip: "Align Right" }, n2.fg.add("justify", function(t5) {
              t5.registerButton({ name: "align", group: "indent" });
              const e5 = (e6) => (t5.s.focus(), t5.s.eachSelection((i4) => {
                if (!i4) return;
                let n3 = o3.J.up(i4, o3.J.isBlock, t5.editor);
                n3 || (n3 = o3.J.wrapInline(i4, t5.o.enterBlock, t5)), (0, r2.Op)(e6, n3);
              }), false);
              t5.registerCommand("justifyfull", e5), t5.registerCommand("justifyright", e5), t5.registerCommand("justifyleft", e5), t5.registerCommand("justifycenter", e5);
            });
          }, 92225: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(71005);
            class c extends l.k {
              afterInit(t5) {
              }
              beforeDestruct(t5) {
              }
              onKeyDownArrow(t5) {
                var e5;
                if (t5.key !== n2.KEY_RIGHT || !this.j.selection.isCollapsed()) return;
                const { endContainer: i4, endOffset: o4 } = this.j.selection.range;
                if (s.J.isText(i4) && (null === (e5 = i4.nodeValue) || void 0 === e5 ? void 0 : e5.length) === o4) {
                  const { parentNode: t6 } = i4;
                  s.J.isInlineBlock(t6) && !s.J.findNotEmptyNeighbor(t6, false, this.j.editor) && s.J.after(t6, this.j.createInside.text(n2.NBSP_SPACE));
                }
              }
            }
            (0, o3.Cg)([(0, r2.watch)(":keydown")], c.prototype, "onKeyDownArrow", null), a2.fg.add("keyArrowOutside", c);
          }, 87238: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.limitWords = false, o3.T.prototype.limitChars = false, o3.T.prototype.limitHTML = false;
          }, 9117: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(56298), a2 = i3(71005);
            i3(87238);
            class l extends a2.k {
              afterInit(t5) {
                const { limitWords: e5, limitChars: i4 } = t5.o;
                if (t5 && (e5 || i4)) {
                  let e6 = null;
                  t5.e.off(".limit").on("beforePaste.limit", () => {
                    e6 = t5.history.snapshot.make();
                  }).on("keydown.limit keyup.limit beforeEnter.limit", this.checkPreventKeyPressOrPaste).on("change.limit", this.checkPreventChanging).on("afterPaste.limit", () => {
                    if (this.__shouldDenyInput(true) && e6) return t5.history.snapshot.restore(e6), t5.e.fire("denyPaste.limit"), false;
                  });
                }
              }
              shouldPreventInsertHTML(t5) {
                return (!t5 || !(n2.COMMAND_KEYS.includes(t5.key) || t5.ctrlKey || t5.metaKey)) && this.__shouldDenyInput(false);
              }
              __shouldDenyInput(t5) {
                const { jodit: e5 } = this, { limitWords: i4, limitChars: o4 } = e5.o, n3 = this.__splitWords(e5.o.limitHTML ? e5.value : e5.text);
                if (i4 && c(n3.length, i4, t5)) return e5.e.fire("denyWords.limit limit.limit"), true;
                const r3 = Boolean(o4 && c(n3.join("").length, o4, t5));
                return r3 && e5.e.fire("denyChars.limit limit.limit"), r3;
              }
              checkPreventKeyPressOrPaste(t5) {
                if (this.shouldPreventInsertHTML(t5)) return false;
              }
              checkPreventChanging(t5, e5) {
                const { jodit: i4 } = this;
                this.__shouldDenyInput(true) && (i4.value = e5);
              }
              __splitWords(t5) {
                return t5.replace((0, n2.INVISIBLE_SPACE_REG_EXP)(), "").split((0, n2.SPACE_REG_EXP)()).filter((t6) => t6.length);
              }
              beforeDestruct(t5) {
                t5.e.off(".limit");
              }
            }
            function c(t5, e5, i4) {
              return i4 ? t5 > e5 : t5 >= e5;
            }
            (0, o3.Cg)([r2.autobind], l.prototype, "checkPreventKeyPressOrPaste", null), (0, o3.Cg)([r2.autobind], l.prototype, "checkPreventChanging", null), s.fg.add("limit", l);
          }, 26725: function(t4, e4, i3) {
            var o3 = i3(65147), n2 = i3(931), r2 = i3(223), s = i3.n(r2), a2 = i3(36115);
            a2.T.prototype.defaultLineHeight = null, n2.I.set("line-height", s()), a2.T.prototype.controls.lineHeight = { command: "applyLineHeight", tags: ["ol"], tooltip: "Line height", list: [1, 1.1, 1.2, 1.3, 1.4, 1.5, 2], exec: (t5, e5, { control: i4 }) => (0, o3.memorizeExec)(t5, e5, { control: i4 }, (t6) => t6) };
          }, 14100: function(t4) {
            t4.exports = { "Line height": "ارتفاع الخط" };
          }, 10229: function(t4) {
            t4.exports = { "Line height": "Výška čáry" };
          }, 10572: function(t4) {
            t4.exports = { "Line height": "Zeilenhöhe" };
          }, 27671: function(t4) {
            t4.exports = { "Line height": "Altura de la línea" };
          }, 30382: function(t4) {
            t4.exports = { "Line height": "ارتفاع خط" };
          }, 14950: function(t4) {
            t4.exports = { "Line height": "Rivin korkeus" };
          }, 85051: function(t4) {
            t4.exports = { "Line height": "Hauteur de ligne" };
          }, 2928: function(t4) {
            t4.exports = { "Line height": "גובה שורה" };
          }, 29920: function(t4) {
            t4.exports = { "Line height": "Vonal magassága" };
          }, 65226: function(t4) {
            t4.exports = { "Line height": "Tinggi baris" };
          }, 39053: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { ar: function() {
              return o3;
            }, cs_cz: function() {
              return n2;
            }, de: function() {
              return r2;
            }, es: function() {
              return s;
            }, fa: function() {
              return a2;
            }, fi: function() {
              return l;
            }, fr: function() {
              return c;
            }, he: function() {
              return d2;
            }, hu: function() {
              return u2;
            }, id: function() {
              return h2;
            }, it: function() {
              return p2;
            }, ja: function() {
              return f2;
            }, ko: function() {
              return g2;
            }, mn: function() {
              return m2;
            }, nl: function() {
              return b2;
            }, pl: function() {
              return _2;
            }, pt_br: function() {
              return v2;
            }, ru: function() {
              return x;
            }, tr: function() {
              return w;
            }, zh_cn: function() {
              return y2;
            }, zh_tw: function() {
              return j;
            } });
            var o3 = i3(14100), n2 = i3(10229), r2 = i3(10572), s = i3(27671), a2 = i3(30382), l = i3(14950), c = i3(85051), d2 = i3(2928), u2 = i3(29920), h2 = i3(65226), p2 = i3(51162), f2 = i3(4410), g2 = i3(84777), m2 = i3(25884), b2 = i3(46433), _2 = i3(42055), v2 = i3(70846), x = i3(15966), w = i3(41145), y2 = i3(76877), j = i3(83289);
          }, 51162: function(t4) {
            t4.exports = { "Line height": "Altezza linea" };
          }, 4410: function(t4) {
            t4.exports = { "Line height": "ラインの高さ" };
          }, 84777: function(t4) {
            t4.exports = { "Line height": "선 높이" };
          }, 25884: function(t4) {
            t4.exports = { "Line height": "Зураасны өндөр" };
          }, 46433: function(t4) {
            t4.exports = { "Line height": "Lijnhoogte" };
          }, 42055: function(t4) {
            t4.exports = { "Line height": "Wysokość linii" };
          }, 70846: function(t4) {
            t4.exports = { "Line height": "Altura da linha" };
          }, 15966: function(t4) {
            t4.exports = { "Line height": "Высота линии" };
          }, 41145: function(t4) {
            t4.exports = { "Line height": "Çizgi yüksekliği" };
          }, 76877: function(t4) {
            t4.exports = { "Line height": "线高" };
          }, 83289: function(t4) {
            t4.exports = { "Line height": "行高" };
          }, 83105: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(55186), s = i3(56298), a2 = i3(65147), l = i3(71005), c = (i3(26725), i3(39053));
            class d2 extends l.k {
              constructor(t5) {
                super(t5), this.buttons = [{ name: "lineHeight", group: "font" }], (0, s.JW)(c);
              }
              afterInit(t5) {
                (0, a2.css)(t5.editor, { lineHeight: t5.o.defaultLineHeight }), t5.registerCommand("applyLineHeight", this.applyLineHeight);
              }
              applyLineHeight(t5, e5, i4) {
                const { s: o4, createInside: n3, editor: s2, o: l2 } = this.j;
                let c2;
                o4.isFocused() || o4.focus(), o4.save();
                const d3 = (t6) => {
                  let e6 = r2.J.closest(t6, r2.J.isBlock, s2);
                  e6 || (e6 = r2.J.wrap(t6, l2.enter, n3));
                  const o5 = (0, a2.css)(e6, "lineHeight");
                  void 0 === c2 && (c2 = o5.toString() !== i4.toString()), (0, a2.css)(e6, "lineHeight", c2 ? i4 : null);
                };
                try {
                  if (o4.isCollapsed()) {
                    const t6 = n3.fake();
                    o4.insertNode(t6, false, false), d3(t6), r2.J.safeRemove(t6);
                  } else o4.eachSelection(d3);
                } finally {
                  o4.restore();
                }
              }
              beforeDestruct(t5) {
                (0, a2.css)(t5.editor, { lineHeight: null });
              }
            }
            (0, o3.Cg)([n2.autobind], d2.prototype, "applyLineHeight", null), s.fg.add("lineHeight", d2);
          }, 64953: function(t4, e4, i3) {
            var o3 = i3(55186), n2 = i3(931), r2 = i3(95032), s = i3.n(r2), a2 = i3(73533), l = i3.n(a2), c = i3(21329), d2 = i3(36115);
            d2.T.prototype.link = { formTemplate: c.B, followOnDblClick: false, processVideoLink: true, processPastedLink: true, noFollowCheckbox: true, openInNewTabCheckbox: true, modeClassName: "input", selectMultipleClassName: true, selectSizeClassName: 3, selectOptionsClassName: [], hotkeys: ["ctrl+k", "cmd+k"] }, n2.I.set("link", s()).set("unlink", l()), d2.T.prototype.controls.unlink = { exec: (t5, e5) => {
              const i4 = o3.J.closest(e5, "a", t5.editor);
              i4 && o3.J.unwrap(i4), t5.synchronizeValues(), t5.e.fire("hidePopup");
            }, tooltip: "Unlink" }, d2.T.prototype.controls.link = { isActive: (t5) => {
              const e5 = t5.s.current();
              return Boolean(e5 && o3.J.closest(e5, "a", t5.editor));
            }, popup: (t5, e5, i4) => t5.e.fire("generateLinkForm.link", e5, i4), tags: ["a"], tooltip: "Insert link" };
          }, 47791: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(71842), s = i3(56298), a2 = i3(65147), l = i3(71005);
            i3(64953);
            class c extends l.k {
              constructor() {
                super(...arguments), this.buttons = [{ name: "link", group: "insert" }];
              }
              afterInit(t5) {
                t5.o.link.followOnDblClick && t5.e.on("dblclick.link", this.onDblClickOnLink), t5.o.link.processPastedLink && t5.e.on("processPaste.link", this.onProcessPasteLink), t5.e.on("generateLinkForm.link", this.__generateForm), t5.registerCommand("openLinkDialog", { exec: () => {
                  const e5 = t5.dlg({ resizable: false }), i4 = this.__generateForm(t5.s.current(), () => {
                    e5.close();
                  });
                  i4.container.classList.add("jodit-dialog_alert"), e5.setContent(i4), e5.open(), t5.async.requestIdleCallback(() => {
                    const { url_input: t6 } = (0, a2.refs)(i4.container);
                    null == t6 || t6.focus();
                  });
                }, hotkeys: t5.o.link.hotkeys });
              }
              onDblClickOnLink(t5) {
                if (!r2.J.isTag(t5.target, "a")) return;
                const e5 = (0, a2.attr)(t5.target, "href");
                e5 && (location.href = e5, t5.preventDefault());
              }
              onProcessPasteLink(t5, e5) {
                const { jodit: i4 } = this;
                if ((0, a2.isURL)(e5) && i4.o.link.processPastedLink) {
                  if (i4.e.stopPropagation("processPaste"), i4.o.link.processVideoLink) {
                    const t6 = (0, a2.convertMediaUrlToVideoEmbed)(e5);
                    if (t6 !== e5) return i4.createInside.fromHTML(t6);
                  }
                  if (i4.s.isCollapsed()) {
                    const t6 = i4.createInside.element("a");
                    return t6.setAttribute("href", e5), t6.textContent = e5, i4.e.fire("applyLink", i4, t6, null), t6;
                  }
                  return i4.s.commitStyle({ element: "a", attributes: { href: e5 } }), true;
                }
              }
              __generateForm(t5, e5) {
                const { jodit: i4 } = this, o4 = i4.i18n.bind(i4), { openInNewTabCheckbox: n3, noFollowCheckbox: s2, formTemplate: l2, formClassName: c2, modeClassName: d2 } = i4.o.link, u2 = l2(i4), h2 = (0, a2.isString)(u2) ? i4.c.fromHTML(u2, { target_checkbox_box: n3, nofollow_checkbox_box: s2 }) : u2, p2 = r2.J.isElement(h2) ? h2 : h2.container, f2 = (0, a2.refs)(p2), { insert: g2, unlink: m2, content_input_box: b2 } = f2, { target_checkbox: _2, nofollow_checkbox: v2, url_input: x } = f2, w = r2.J.isImage(t5);
                let { content_input: y2 } = f2;
                const { className_input: j } = f2, { className_select: k2 } = f2;
                let C2;
                y2 || (y2 = i4.c.element("input", { type: "hidden", ref: "content_input" })), c2 && p2.classList.add(c2), w && r2.J.hide(b2);
                const S2 = () => C2 ? C2.innerText : (0, a2.stripTags)(i4.s.range.cloneContents(), i4.ed);
                if (C2 = !(!t5 || !r2.J.closest(t5, "a", i4.editor)) && r2.J.closest(t5, "a", i4.editor), !w && t5 && (y2.value = S2()), C2) {
                  if (x.value = (0, a2.attr)(C2, "href") || "", d2) switch (d2) {
                    case "input":
                      j && (j.value = (0, a2.attr)(C2, "class") || "");
                      break;
                    case "select":
                      if (k2) {
                        for (let t6 = 0; k2.selectedOptions.length > t6; t6++) {
                          const e6 = k2.options.item(t6);
                          e6 && (e6.selected = false);
                        }
                        ((0, a2.attr)(C2, "class") || "").split(" ").forEach((t6) => {
                          if (t6) for (let e6 = 0; k2.options.length > e6; e6++) {
                            const i5 = k2.options.item(e6);
                            (null == i5 ? void 0 : i5.value) && i5.value === t6 && (i5.selected = true);
                          }
                        });
                      }
                  }
                  n3 && _2 && (_2.checked = "_blank" === (0, a2.attr)(C2, "target")), s2 && v2 && (v2.checked = "nofollow" === (0, a2.attr)(C2, "rel")), g2.textContent = o4("Update");
                } else r2.J.hide(m2);
                i4.editor.normalize();
                const z2 = i4.history.snapshot.make();
                m2 && i4.e.on(m2, "click", (t6) => {
                  i4.s.restore(), i4.history.snapshot.restore(z2), C2 && r2.J.unwrap(C2), i4.synchronizeValues(), e5(), t6.preventDefault();
                });
                const T2 = () => {
                  if (!x.value.trim().length) return x.focus(), x.classList.add("jodit_error"), false;
                  let t6;
                  i4.s.restore(), i4.s.removeMarkers(), i4.editor.normalize(), i4.history.snapshot.restore(z2);
                  const o5 = S2() !== y2.value.trim(), l3 = i4.createInside;
                  if (C2) t6 = [C2];
                  else {
                    if (i4.s.isCollapsed()) {
                      const e6 = l3.element("a");
                      i4.s.insertNode(e6, false, false), t6 = [e6];
                    } else {
                      const e6 = i4.s.current();
                      t6 = r2.J.isTag(e6, "img") ? [r2.J.wrap(e6, "a", l3)] : i4.s.wrapInTag("a");
                    }
                    t6.forEach((t7) => i4.s.select(t7));
                  }
                  return t6.forEach((t7) => {
                    var e6;
                    if ((0, a2.attr)(t7, "href", x.value), d2 && (null != j ? j : k2)) {
                      if ("input" === d2) "" === j.value && t7.hasAttribute("class") && (0, a2.attr)(t7, "class", null), "" !== j.value && (0, a2.attr)(t7, "class", j.value);
                      else if ("select" === d2) {
                        t7.hasAttribute("class") && (0, a2.attr)(t7, "class", null);
                        for (let i5 = 0; k2.selectedOptions.length > i5; i5++) {
                          const o6 = null === (e6 = k2.selectedOptions.item(i5)) || void 0 === e6 ? void 0 : e6.value;
                          o6 && t7.classList.add(o6);
                        }
                      }
                    }
                    if (!w) {
                      let e7 = t7.textContent;
                      y2.value.trim().length ? o5 && (e7 = y2.value) : e7 = x.value, e7 !== t7.textContent && (t7.textContent = e7);
                    }
                    n3 && _2 && (0, a2.attr)(t7, "target", _2.checked ? "_blank" : null), s2 && v2 && (0, a2.attr)(t7, "rel", v2.checked ? "nofollow" : null), i4.e.fire("applyLink", i4, t7, h2);
                  }), i4.synchronizeValues(), e5(), false;
                };
                return r2.J.isElement(h2) ? i4.e.on(h2, "submit", (t6) => (t6.preventDefault(), t6.stopImmediatePropagation(), T2(), false)) : h2.onSubmit(T2), h2;
              }
              beforeDestruct(t5) {
                t5.e.off("generateLinkForm.link", this.__generateForm).off("dblclick.link", this.onDblClickOnLink).off("processPaste.link", this.onProcessPasteLink);
              }
            }
            (0, o3.Cg)([n2.autobind], c.prototype, "onDblClickOnLink", null), (0, o3.Cg)([n2.autobind], c.prototype, "onProcessPasteLink", null), (0, o3.Cg)([n2.autobind], c.prototype, "__generateForm", null), s.fg.add("link", c);
          }, 21329: function(t4, e4, i3) {
            i3.d(e4, { B: function() {
              return r2;
            } });
            var o3 = i3(35265), n2 = i3(20703);
            const r2 = (t5) => {
              const { openInNewTabCheckbox: e5, noFollowCheckbox: i4, modeClassName: r3, selectSizeClassName: s, selectMultipleClassName: a2, selectOptionsClassName: l } = t5.o.link;
              return new n2.XV(t5, [new n2.Yh(t5, [new n2.tS(t5, { name: "url", type: "text", ref: "url_input", label: "URL", placeholder: "http://", required: true })]), new n2.Yh(t5, [new n2.tS(t5, { name: "content", ref: "content_input", label: "Text" })], { ref: "content_input_box" }), r3 ? new n2.Yh(t5, ["input" === r3 ? new n2.tS(t5, { name: "className", ref: "className_input", label: "Class name" }) : "select" === r3 ? new n2.$6(t5, { name: "className", ref: "className_select", label: "Class name", size: s, multiple: a2, options: l }) : null]) : null, e5 ? new n2.cY(t5, { name: "target", ref: "target_checkbox", label: "Open in new tab" }) : null, i4 ? new n2.cY(t5, { name: "nofollow", ref: "nofollow_checkbox", label: "No follow" }) : null, new n2.Yh(t5, [new o3.lD(t5, { name: "unlink", variant: "default", text: "Unlink" }), new o3.lD(t5, { name: "insert", type: "submit", variant: "primary", text: "Insert" })], { align: "full" })]);
            };
          }, 24103: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.mediaFakeTag = "jodit-media", o3.T.prototype.mediaInFakeBlock = true, o3.T.prototype.mediaBlocks = ["video", "audio"];
          }, 26421: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(97369);
            i3(24103), n2.fg.add("media", function(t5) {
              const e5 = "jodit_fake_wrapper", { mediaFakeTag: i4, mediaBlocks: n3, mediaInFakeBlock: s } = t5.options;
              s && t5.e.on("afterGetValueFromEditor", (t6) => {
                const o4 = new RegExp(`<${i4}[^>]+data-${e5}[^>]+>([^]+?)</${i4}>`, "ig");
                o4.test(t6.value) && (t6.value = t6.value.replace(o4, "$1"));
              }).on("change afterInit afterSetMode changePlace", t5.async.debounce(() => {
                t5.isDestructed || t5.getMode() === o3.MODE_SOURCE || (0, r2.$$)(n3.join(","), t5.editor).forEach((o4) => {
                  (0, r2.dataBind)(o4, e5) || ((0, r2.dataBind)(o4, e5, true), ((o5) => {
                    if (o5.parentNode && (0, r2.attr)(o5.parentNode, "data-jodit_iframe_wrapper")) o5 = o5.parentNode;
                    else {
                      const n4 = t5.createInside.element(i4, { "data-jodit-temp": 1, contenteditable: false, draggable: true, [`data-${e5}`]: 1 });
                      (0, r2.attr)(n4, "style", (0, r2.attr)(o5, "style")), n4.style.display = "inline-block" === o5.style.display ? "inline-block" : "block", n4.style.width = o5.offsetWidth + "px", n4.style.height = o5.offsetHeight + "px", o5.parentNode && o5.parentNode.insertBefore(n4, o5), n4.appendChild(o5), o5 = n4;
                    }
                    t5.e.off(o5, "mousedown.select touchstart.select").on(o5, "mousedown.select touchstart.select", () => {
                      t5.s.setCursorAfter(o5);
                    });
                  })(o4));
                });
              }, t5.defaultTimeout));
            });
          }, 88011: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(65147), r2 = i3(97394), s = i3(8809), a2 = i3(36115);
            a2.T.prototype.mobileTapTimeout = 300, a2.T.prototype.toolbarAdaptive = true, a2.T.prototype.buttonsMD = [{ group: "font-style", buttons: [] }, { group: "list", buttons: [] }, { group: "font", buttons: [] }, "---", { group: "media", buttons: [] }, "\n", { group: "state", buttons: [] }, { group: "insert", buttons: [] }, { group: "indent", buttons: [] }, { group: "color", buttons: [] }, "---", { group: "history", buttons: [] }, { group: "other", buttons: [] }, "|", "dots"], a2.T.prototype.buttonsSM = [{ group: "font-style", buttons: [] }, { group: "list", buttons: [] }, "---", { group: "font", buttons: [] }, "\n", { group: "state", buttons: [] }, { group: "indent", buttons: [] }, { group: "color", buttons: [] }, "---", { group: "history", buttons: [] }, "|", "dots"], a2.T.prototype.buttonsXS = [{ group: "font-style", buttons: [] }, { group: "list", buttons: [] }, "---", { group: "font", buttons: [] }, { group: "color", buttons: [] }, "---", "dots"], a2.T.prototype.controls.dots = { mode: o3.MODE_SOURCE + o3.MODE_WYSIWYG, popup: (t5, e5, i4, o4) => {
              let a3 = o4.control.data;
              return void 0 === a3 && (a3 = { toolbar: (0, s.$K)(t5), rebuild: () => {
                var e6, i5;
                if (o4) {
                  const s2 = t5.e.fire("getDiffButtons.mobile", o4.closest(r2.Q));
                  if (s2 && a3) {
                    a3.toolbar.build((0, n2.splitArray)(s2));
                    const o5 = (null === (i5 = null === (e6 = t5.toolbar) || void 0 === e6 ? void 0 : e6.firstButton) || void 0 === i5 ? void 0 : i5.container.offsetWidth) || 36;
                    a3.toolbar.container.style.width = 3 * (o5 + 4) + "px";
                  }
                }
              } }, o4.control.data = a3), a3.rebuild(), a3.toolbar;
            }, tooltip: "Show all" };
          }, 76967: function(t4, e4, i3) {
            var o3 = i3(56298), n2 = i3(65147), r2 = i3(39611);
            i3(88011), o3.fg.add("mobile", function(t5) {
              let e5 = 0, i4 = (0, n2.splitArray)(t5.o.buttons);
              t5.o.mobileTapTimeout && t5.e.on("touchend", (i5) => {
                if (i5.changedTouches && i5.changedTouches.length) {
                  const o4 = (/* @__PURE__ */ new Date()).getTime(), n3 = o4 - e5;
                  n3 > t5.o.mobileTapTimeout && (e5 = o4, 1.5 * t5.o.mobileTapTimeout > n3 && t5.s.insertCursorAtPoint(i5.clientX, i5.clientY));
                }
              }), t5.e.on("getDiffButtons.mobile", (e6) => {
                if (e6 === t5.toolbar) {
                  const e7 = (0, r2.V)((0, n2.splitArray)(t5.o.buttons), t5), o4 = (0, r2.V)(i4, t5);
                  return (0, n2.toArray)(e7).reduce((t6, e8) => (o4.has(e8) || t6.push(e8), t6), []);
                }
              }), t5.o.toolbarAdaptive && t5.e.on("resize afterInit recalcAdaptive changePlace afterAddPlace", () => {
                var e6, o4;
                if (!t5.o.toolbar) return;
                const r3 = (null !== (e6 = t5.container.parentElement) && void 0 !== e6 ? e6 : t5.container).offsetWidth, s = (0, n2.splitArray)(t5.isFullSize || r3 >= t5.o.sizeLG ? t5.o.buttons : t5.o.sizeMD > r3 ? t5.o.sizeSM > r3 ? t5.o.buttonsXS : t5.o.buttonsSM : t5.o.buttonsMD);
                s.toString() !== i4.toString() && (i4 = s, t5.e.fire("closeAllPopups"), null === (o4 = t5.toolbar) || void 0 === o4 || o4.setRemoveButtons(t5.o.removeButtons).build(i4.concat(t5.o.extraButtons)));
              }).on(t5.ow, "load resize", () => t5.e.fire("recalcAdaptive"));
            });
          }, 20797: function(t4, e4, i3) {
            var o3 = i3(72197), n2 = i3(931), r2 = i3(40037), s = i3.n(r2), a2 = i3(83207), l = i3.n(a2), c = i3(36115);
            const d2 = (t5, e5, { control: i4 }) => {
              var n3;
              const r3 = `button${i4.command}`, s2 = null !== (n3 = i4.args && i4.args[0]) && void 0 !== n3 ? n3 : (0, o3.m)(t5, r3);
              (0, o3.m)(t5, r3, s2), t5.execCommand(i4.command, false, "default" === s2 ? null : s2);
            };
            n2.I.set("ol", s()).set("ul", l()), c.T.prototype.controls.ul = { command: "insertUnorderedList", tags: ["ul"], tooltip: "Insert Unordered List", list: { default: "Default", circle: "Circle", disc: "Dot", square: "Quadrate" }, exec: d2 }, c.T.prototype.controls.ol = { command: "insertOrderedList", tags: ["ol"], tooltip: "Insert Ordered List", list: { default: "Default", "lower-alpha": "Lower Alpha", "lower-greek": "Lower Greek", "lower-roman": "Lower Roman", "upper-alpha": "Upper Alpha", "upper-roman": "Upper Roman" }, exec: d2 };
          }, 1239: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(56298), s = i3(71005);
            i3(20797);
            class a2 extends s.k {
              constructor() {
                super(...arguments), this.buttons = [{ name: "ul", group: "list" }, { name: "ol", group: "list" }];
              }
              afterInit(t5) {
                t5.registerCommand("insertUnorderedList", this.onCommand).registerCommand("insertOrderedList", this.onCommand);
              }
              onCommand(t5, e5, i4) {
                return this.jodit.s.commitStyle({ element: "insertunorderedlist" === t5 ? "ul" : "ol", attributes: { style: { listStyleType: null != i4 ? i4 : null } } }), this.jodit.synchronizeValues(), false;
              }
              beforeDestruct(t5) {
              }
            }
            (0, o3.Cg)([n2.autobind], a2.prototype, "onCommand", null), r2.fg.add("orderedList", a2);
          }, 93324: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(36115);
            n2.T.prototype.askBeforePasteFromWord = true, n2.T.prototype.processPasteFromWord = true, n2.T.prototype.defaultActionOnPasteFromWord = null, n2.T.prototype.pasteFromWordActionList = [{ value: o3.INSERT_AS_HTML, text: "Keep" }, { value: o3.INSERT_AS_TEXT, text: "Clean" }, { value: o3.INSERT_ONLY_TEXT, text: "Insert only Text" }];
          }, 36969: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(56298), a2 = i3(65147), l = i3(71005), c = (i3(93324), i3(90823));
            class d2 extends l.k {
              afterInit(t5) {
              }
              beforeDestruct(t5) {
              }
              processWordHTML(t5, e5, i4) {
                const { j: o4 } = this, { processPasteFromWord: n3, askBeforePasteFromWord: r3, defaultActionOnPasteFromWord: s2, defaultActionOnPaste: l2, pasteFromWordActionList: d3 } = o4.o;
                return !(!n3 || !(0, a2.isHtmlFromWord)(e5) || (r3 ? (0, c.PU)(o4, "The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?", "Word Paste Detected", (o5) => {
                  this.insertFromWordByType(t5, e5, o5, i4);
                }, d3) : this.insertFromWordByType(t5, e5, s2 || l2, i4), 0));
              }
              insertFromWordByType(t5, e5, i4, o4) {
                var r3;
                switch (i4) {
                  case n2.INSERT_AS_HTML: {
                    e5 = (0, a2.applyStyles)(e5);
                    const t6 = null === (r3 = this.j.events) || void 0 === r3 ? void 0 : r3.fire("beautifyHTML", e5);
                    (0, a2.isString)(t6) && (e5 = t6);
                    break;
                  }
                  case n2.INSERT_AS_TEXT:
                    e5 = (0, a2.cleanFromWord)(e5);
                    break;
                  case n2.INSERT_ONLY_TEXT:
                    e5 = (0, a2.stripTags)((0, a2.cleanFromWord)(e5));
                }
                (0, c.sX)(t5, this.j, e5);
              }
            }
            d2.requires = ["paste"], (0, o3.Cg)([(0, r2.watch)(":processHTML")], d2.prototype, "processWordHTML", null), s.fg.add("pasteFromWord", d2);
          }, 56701: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(56298), s = i3(65147), a2 = i3(29866), l = i3(92032);
            r2.fg.add("pasteStorage", class extends a2.k {
              constructor() {
                super(...arguments), this.currentIndex = 0, this.list = [], this.container = null, this.listBox = null, this.previewBox = null, this.dialog = null, this.paste = () => {
                  if (this.j.s.focus(), this.j.s.insertHTML(this.list[this.currentIndex]), 0 !== this.currentIndex) {
                    const t5 = this.list[0];
                    this.list[0] = this.list[this.currentIndex], this.list[this.currentIndex] = t5;
                  }
                  this.dialog && this.dialog.close(), this.j.synchronizeValues(), this.j.e.fire("afterPaste");
                }, this.onKeyDown = (t5) => {
                  let e5 = this.currentIndex;
                  -1 !== [o3.KEY_UP, o3.KEY_DOWN, o3.KEY_ENTER].indexOf(t5.key) && (t5.key === o3.KEY_UP && (0 === e5 ? e5 = this.list.length - 1 : e5 -= 1), t5.key === o3.KEY_DOWN && (e5 === this.list.length - 1 ? e5 = 0 : e5 += 1), t5.key !== o3.KEY_ENTER ? (e5 !== this.currentIndex && this.selectIndex(e5), t5.stopImmediatePropagation(), t5.preventDefault()) : this.paste());
                }, this.selectIndex = (t5) => {
                  this.listBox && (0, s.toArray)(this.listBox.childNodes).forEach((e5, i4) => {
                    e5.classList.remove("jodit_active"), t5 === i4 && this.previewBox && (e5.classList.add("jodit_active"), this.previewBox.innerHTML = this.list[t5], e5.focus());
                  }), this.currentIndex = t5;
                }, this.showDialog = () => {
                  2 > this.list.length || (this.dialog || this.createDialog(), this.listBox && (this.listBox.innerHTML = ""), this.previewBox && (this.previewBox.innerHTML = ""), this.list.forEach((t5, e5) => {
                    const i4 = this.j.c.element("a");
                    i4.textContent = e5 + 1 + ". " + t5.replace((0, o3.SPACE_REG_EXP)(), ""), this.j.e.on(i4, "keydown", this.onKeyDown), (0, s.attr)(i4, "href", "#"), (0, s.attr)(i4, "data-index", e5.toString()), (0, s.attr)(i4, "tab-index", "-1"), this.listBox && this.listBox.appendChild(i4);
                  }), this.dialog && this.dialog.open(), this.j.async.setTimeout(() => {
                    this.selectIndex(0);
                  }, 100));
                };
              }
              createDialog() {
                this.dialog = this.j.dlg();
                const t5 = (0, l.$n)(this.j, "paste", "Paste", "primary");
                t5.onAction(this.paste);
                const e5 = (0, l.$n)(this.j, "", "Cancel");
                e5.onAction(this.dialog.close), this.container = this.j.c.div(), this.container.classList.add("jodit-paste-storage"), this.listBox = this.j.c.div(), this.previewBox = this.j.c.div(), this.container.appendChild(this.listBox), this.container.appendChild(this.previewBox), this.dialog.setHeader(this.j.i18n("Choose Content to Paste")), this.dialog.setContent(this.container), this.dialog.setFooter([t5, e5]), this.j.e.on(this.listBox, "click dblclick", (t6) => {
                  const e6 = t6.target;
                  return n2.J.isTag(e6, "a") && e6.hasAttribute("data-index") && this.selectIndex(parseInt((0, s.attr)(e6, "-index") || "0", 10)), "dblclick" === t6.type && this.paste(), false;
                });
              }
              afterInit() {
                this.j.e.off("afterCopy.paste-storage").on("pasteStorageList.paste-storage", () => this.list.length).on("afterCopy.paste-storage", (t5) => {
                  -1 !== this.list.indexOf(t5) && this.list.splice(this.list.indexOf(t5), 1), this.list.unshift(t5), this.list.length > 5 && (this.list.length = 5);
                }), this.j.registerCommand("showPasteStorage", { exec: this.showDialog, hotkeys: ["ctrl+shift+v", "cmd+shift+v"] });
              }
              beforeDestruct() {
                this.dialog && this.dialog.destruct(), this.j.e.off(".paste-storage"), n2.J.safeRemove(this.previewBox), n2.J.safeRemove(this.listBox), n2.J.safeRemove(this.container), this.container = null, this.listBox = null, this.previewBox = null, this.dialog = null, this.list = [];
              }
            });
          }, 70674: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(90823), r2 = i3(36115);
            r2.T.prototype.askBeforePasteHTML = true, r2.T.prototype.processPasteHTML = true, r2.T.prototype.scrollToPastedContent = true, r2.T.prototype.pasteExcludeStripTags = ["br", "hr"], r2.T.prototype.pasteHTMLActionList = [{ value: o3.INSERT_AS_HTML, text: "Keep" }, { value: o3.INSERT_AS_TEXT, text: "Insert as Text" }, { value: o3.INSERT_ONLY_TEXT, text: "Insert only Text" }], r2.T.prototype.memorizeChoiceWhenPasteFragment = false, r2.T.prototype.nl2brInPlainText = true;
            const s = "pasteStorage";
            r2.T.prototype.controls.paste = { tooltip: "Paste from clipboard", async exec(t5, e5, { control: i4 }) {
              if (i4.name === s) return void t5.execCommand("showPasteStorage");
              t5.s.focus();
              let r3 = "", a2 = true;
              if (navigator.clipboard) {
                try {
                  const t6 = await navigator.clipboard.read();
                  if (t6 && t6.length) {
                    const e6 = await t6[0].getType(o3.TEXT_PLAIN);
                    r3 = await new Response(e6).text();
                  }
                  a2 = false;
                } catch (t6) {
                }
                if (a2) try {
                  r3 = await navigator.clipboard.readText(), a2 = false;
                } catch (t6) {
                }
              }
              a2 && (r3 = t5.buffer.get(o3.CLIPBOARD_ID) || "", a2 = 0 === r3.length);
              const l = t5.value;
              a2 ? (t5.ed.execCommand("paste"), a2 = l === t5.value, !a2 && t5.e.fire("afterPaste")) : r3.length ? ((0, n2.sX)(null, t5, r3), t5.e.fire("afterPaste")) : a2 && t5.alert("Your browser doesn't support direct access to the clipboard.", () => {
                t5.s.focus();
              });
            }, list: { [s]: "Paste Storage" }, isChildDisabled: (t5) => 2 > t5.e.fire("pasteStorageList") };
          }, 90823: function(t4, e4, i3) {
            i3.d(e4, { DI: function() {
              return l;
            }, PU: function() {
              return c;
            }, sX: function() {
              return a2;
            } });
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(9823), s = i3(92032);
            function a2(t5, e5, i4) {
              if (e5.isInDestruct) return;
              (function(t6) {
                return Boolean(t6 && "drop" === t6.type);
              })(t5) && e5.s.insertCursorAtPoint(t5.clientX, t5.clientY);
              const o4 = e5.e.fire("beforePasteInsert", i4);
              !(0, r2.Rd)(o4) && ((0, r2.Kg)(o4) || (0, r2.Et)(o4) || n2.J.isNode(o4)) && (i4 = o4), (0, r2.Kg)(i4) && (i4 = function(t6) {
                const e6 = (t6 = t6.replace(/<meta[^>]+?>/g, "")).search(/<!--StartFragment-->/i);
                -1 !== e6 && (t6 = t6.substring(e6 + 20));
                const i5 = t6.search(/<!--EndFragment-->/i);
                return -1 !== i5 && (t6 = t6.substring(0, i5)), t6;
              }(i4)), e5.s.insertHTML(i4);
            }
            function l(t5) {
              const e5 = t5.types;
              let i4 = "";
              if ((0, r2.cy)(e5) || "[object DOMStringList]" === {}.toString.call(e5)) for (let t6 = 0; e5.length > t6; t6 += 1) i4 += e5[t6] + ";";
              else i4 = (e5 || o3.TEXT_PLAIN).toString() + ";";
              return i4;
            }
            function c(t5, e5, i4, o4, n3) {
              if (false === t5.e.fire("beforeOpenPasteDialog", e5, i4, o4, n3)) return;
              const r3 = t5.confirm(`<div style="word-break: normal; white-space: normal">${t5.i18n(e5)}</div>`, t5.i18n(i4)), a3 = n3.map(({ text: e6, value: i5 }) => (0, s.$n)(t5, { text: e6, name: e6.toLowerCase(), tabIndex: 0 }).onAction(() => {
                r3.close(), o4(i5);
              }));
              r3.e.one(r3, "afterClose", () => {
                t5.s.isFocused() || t5.s.focus();
              });
              const l2 = (0, s.$n)(t5, { text: "Cancel", tabIndex: 0 }).onAction(() => {
                r3.close();
              });
              return r3.setFooter([...a3, l2]), a3[0].focus(), a3[0].state.variant = "primary", t5.e.fire("afterOpenPasteDialog", r3, e5, i4, o4, n3), r3;
            }
          }, 13861: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = i3(29866), d2 = (i3(70674), i3(90823));
            class u2 extends c.k {
              constructor() {
                super(...arguments), this.pasteStack = new l.LimitedStack(20), this._isDialogOpened = false;
              }
              afterInit(t5) {
                t5.e.on("paste.paste", this.onPaste).on("pasteStack.paste", (t6) => this.pasteStack.push(t6)), t5.o.nl2brInPlainText && this.j.e.on("processPaste.paste", this.onProcessPasteReplaceNl2Br);
              }
              beforeDestruct(t5) {
                t5.e.off("paste.paste", this.onPaste).off("processPaste.paste", this.onProcessPasteReplaceNl2Br).off(".paste");
              }
              onPaste(t5) {
                try {
                  if (false === this.customPasteProcess(t5) || false === this.j.e.fire("beforePaste", t5)) return t5.preventDefault(), false;
                  this.defaultPasteProcess(t5);
                } finally {
                  this.j.e.fire("afterPaste", t5);
                }
              }
              customPasteProcess(t5) {
                if (!this.j.o.processPasteHTML) return;
                const e5 = (0, l.getDataTransfer)(t5), i4 = [null == e5 ? void 0 : e5.getData(n2.TEXT_PLAIN), null == e5 ? void 0 : e5.getData(n2.TEXT_HTML), null == e5 ? void 0 : e5.getData(n2.TEXT_RTF)];
                for (const e6 of i4) if ((0, l.isHTML)(e6) && (this.j.e.fire("processHTML", t5, e6, { plain: i4[0], html: i4[1], rtf: i4[2] }) || this.processHTML(t5, e6))) return false;
              }
              defaultPasteProcess(t5) {
                const e5 = (0, l.getDataTransfer)(t5);
                let i4 = (null == e5 ? void 0 : e5.getData(n2.TEXT_HTML)) || (null == e5 ? void 0 : e5.getData(n2.TEXT_PLAIN));
                if (e5 && i4 && "" !== (0, l.trim)(i4)) {
                  const o4 = this.j.e.fire("processPaste", t5, i4, (0, d2.DI)(e5));
                  void 0 !== o4 && (i4 = o4), ((0, l.isString)(i4) || s.J.isNode(i4)) && this.__insertByType(t5, i4, this.j.o.defaultActionOnPaste), t5.preventDefault(), t5.stopPropagation();
                }
              }
              processHTML(t5, e5) {
                if (!this.j.o.askBeforePasteHTML) return false;
                if (this.j.o.memorizeChoiceWhenPasteFragment) {
                  const i5 = this.pasteStack.find((t6) => t6.html === e5);
                  if (i5) return this.__insertByType(t5, e5, i5.action || this.j.o.defaultActionOnPaste), true;
                }
                if (this._isDialogOpened) return true;
                const i4 = (0, d2.PU)(this.j, "Your code is similar to HTML. Keep as HTML?", "Paste as HTML", (i5) => {
                  this._isDialogOpened = false, this.__insertByType(t5, e5, i5);
                }, this.j.o.pasteHTMLActionList);
                return i4 && (this._isDialogOpened = true, i4.e.on("beforeClose", () => {
                  this._isDialogOpened = false;
                })), true;
              }
              __insertByType(t5, e5, i4) {
                if (this.pasteStack.push({ html: e5, action: i4 }), (0, l.isString)(e5)) switch (this.j.buffer.set(n2.CLIPBOARD_ID, e5), i4) {
                  case n2.INSERT_CLEAR_HTML:
                    e5 = (0, l.cleanFromWord)(e5);
                    break;
                  case n2.INSERT_ONLY_TEXT:
                    e5 = (0, l.stripTags)(e5, this.j.ed, new Set(this.j.o.pasteExcludeStripTags));
                    break;
                  case n2.INSERT_AS_TEXT:
                    e5 = (0, l.htmlspecialchars)(e5);
                }
                (0, d2.sX)(t5, this.j, e5);
              }
              onProcessPasteReplaceNl2Br(t5, e5, i4) {
                if (i4 === n2.TEXT_PLAIN + ";" && !(0, l.isHTML)(e5)) return (0, l.nl2br)(e5);
              }
            }
            (0, o3.Cg)([r2.autobind], u2.prototype, "onPaste", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onProcessPasteReplaceNl2Br", null), a2.fg.add("paste", u2);
          }, 50248: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.showPlaceholder = true, o3.T.prototype.placeholder = "Type something", o3.T.prototype.useInputsPlaceholder = true;
          }, 225: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(71274), c = i3(26150), d2 = i3(38322), u2 = i3(29866);
            i3(50248);
            class h2 extends u2.k {
              constructor() {
                super(...arguments), this.addNativeListeners = () => {
                  this.j.e.off(this.j.editor, "input.placeholder keydown.placeholder").on(this.j.editor, "input.placeholder keydown.placeholder", this.toggle);
                }, this.addEvents = () => {
                  const t5 = this.j;
                  t5.o.useInputsPlaceholder && t5.element.hasAttribute("placeholder") && (this.placeholderElm.innerHTML = (0, c.C)(t5.element, "placeholder") || ""), t5.e.fire("placeholder", this.placeholderElm.innerHTML), t5.e.off(".placeholder").on("changePlace.placeholder", this.addNativeListeners).on("change.placeholder focus.placeholder keyup.placeholder mouseup.placeholder keydown.placeholder mousedown.placeholder afterSetMode.placeholder changePlace.placeholder", this.toggle).on(window, "load", this.toggle), this.addNativeListeners(), this.toggle();
                };
              }
              afterInit(t5) {
                t5.o.showPlaceholder && (this.placeholderElm = t5.c.fromHTML(`<span data-ref="placeholder" style="display: none;" class="jodit-placeholder">${t5.i18n(t5.o.placeholder)}</span>`), "rtl" === t5.o.direction && (this.placeholderElm.style.right = "0px", this.placeholderElm.style.direction = "rtl"), t5.e.on("readonly", (t6) => {
                  t6 ? this.hide() : this.toggle();
                }).on("changePlace", this.addEvents), this.addEvents());
              }
              show() {
                const t5 = this.j;
                if (t5.o.readonly) return;
                let e5 = 0, i4 = 0;
                const o4 = t5.s.current(), n3 = o4 && s.J.closest(o4, s.J.isBlock, t5.editor) || t5.editor, r3 = t5.ew.getComputedStyle(n3), a3 = t5.ew.getComputedStyle(t5.editor);
                t5.workplace.appendChild(this.placeholderElm);
                const { firstChild: c2 } = t5.editor;
                if (s.J.isElement(c2) && !(0, l.r)(c2)) {
                  const o5 = t5.ew.getComputedStyle(c2);
                  e5 = parseInt(o5.getPropertyValue("margin-top"), 10), i4 = parseInt(o5.getPropertyValue("margin-left"), 10), this.placeholderElm.style.fontSize = parseInt(o5.getPropertyValue("font-size"), 10) + "px", this.placeholderElm.style.lineHeight = o5.getPropertyValue("line-height");
                } else this.placeholderElm.style.fontSize = parseInt(r3.getPropertyValue("font-size"), 10) + "px", this.placeholderElm.style.lineHeight = r3.getPropertyValue("line-height");
                (0, d2.A)(this.placeholderElm, { display: "block", textAlign: r3.getPropertyValue("text-align"), paddingTop: parseInt(a3.paddingTop, 10) + "px", paddingLeft: parseInt(a3.paddingLeft, 10) + "px", paddingRight: parseInt(a3.paddingRight, 10) + "px", marginTop: Math.max(parseInt(r3.getPropertyValue("margin-top"), 10), e5), marginLeft: Math.max(parseInt(r3.getPropertyValue("margin-left"), 10), i4) });
              }
              hide() {
                s.J.safeRemove(this.placeholderElm);
              }
              toggle() {
                const t5 = this.j;
                t5.editor && !t5.isInDestruct && (t5.getRealMode() === n2.MODE_WYSIWYG && function(t6) {
                  var e5;
                  if (!t6.firstChild) return true;
                  const i4 = t6.firstChild;
                  if (n2.INSEPARABLE_TAGS.has(null === (e5 = i4.nodeName) || void 0 === e5 ? void 0 : e5.toLowerCase()) || /^(TABLE)$/i.test(i4.nodeName)) return false;
                  const o4 = s.J.next(i4, (t7) => t7 && !s.J.isEmptyTextNode(t7), t6);
                  return s.J.isText(i4) && !o4 ? s.J.isEmptyTextNode(i4) : !o4 && s.J.each(i4, (t7) => !(s.J.isLeaf(t7) || s.J.isList(t7)) && (s.J.isEmpty(t7) || s.J.isTag(t7, "br")));
                }(t5.editor) ? this.show() : this.hide());
              }
              beforeDestruct(t5) {
                this.hide(), t5.e.off(".placeholder").off(window, "load", this.toggle);
              }
            }
            (0, o3.Cg)([(0, r2.debounce)((t5) => t5.defaultTimeout / 10, true)], h2.prototype, "toggle", null), a2.fg.add("placeholder", h2);
          }, 81089: function(t4, e4, i3) {
            i3(56298).fg.add("poweredByJodit", function(t5) {
              const { o: e5 } = t5;
              e5.hidePoweredByJodit || e5.inline || !(e5.showCharsCounter || e5.showWordsCounter || e5.showXPathInStatusbar) || t5.hookStatus("ready", () => {
                t5.statusbar.append(t5.create.fromHTML('<a\n						tabindex="-1"\n						style="text-transform: uppercase"\n						class="jodit-status-bar-link"\n						target="_blank"\n						href="https://xdsoft.net/jodit/">\n							Powered by Jodit\n						</a>'), true);
              });
            });
          }, 44921: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(98434);
            i3(36115).T.prototype.controls.preview = { icon: "eye", command: "preview", mode: o3.MODE_SOURCE + o3.MODE_WYSIWYG, tooltip: "Preview" }, n2.fg.add("preview", function(t5) {
              t5.registerButton({ name: "preview" }), t5.registerCommand("preview", (e5, i4, o4) => {
                const n3 = t5.dlg();
                n3.setSize(1024, 600).open("", t5.i18n("Preview")).setModal(true);
                const [, s] = (0, r2.u)(t5, o4, "px", n3.getElm("content"));
                n3.e.on(n3, "afterClose", s);
              });
            });
          }, 11131: function(t4, e4, i3) {
            i3.d(e4, { Y: function() {
              return n2;
            } });
            var o3 = i3(42448);
            function n2(t5) {
              const e5 = (t6, e6 = t6.ownerDocument.styleSheets) => (0, o3.$)(e6).map((t7) => {
                try {
                  return (0, o3.$)(t7.cssRules);
                } catch (t8) {
                }
                return [];
              }).flat().filter((e7) => {
                try {
                  return Boolean(e7 && t6.matches(e7.selectorText));
                } catch (t7) {
                }
                return false;
              });
              class i4 {
                constructor(i5, o4, n3) {
                  this.css = {};
                  const r2 = n3 || {}, s = (e6) => {
                    const i6 = e6.selectorText.split(",").map((t6) => t6.trim()).sort().join(",");
                    false === Boolean(this.css[i6]) && (this.css[i6] = {});
                    const o5 = e6.style.cssText.split(/;(?![A-Za-z0-9])/);
                    for (let e7 = 0; o5.length > e7; e7++) {
                      if (!o5[e7]) continue;
                      const n4 = o5[e7].split(":");
                      n4[0] = n4[0].trim(), n4[1] = n4[1].trim(), this.css[i6][n4[0]] = n4[1].replace(/var\(([^)]+)\)/g, (e8, i7) => {
                        const [o6, n5] = i7.split(",");
                        return (t5.ew.getComputedStyle(t5.editor).getPropertyValue(o6.trim()) || n5 || e8).trim();
                      });
                    }
                  };
                  (() => {
                    const n4 = i5.innerHeight, a2 = o4.createTreeWalker(t5.editor, NodeFilter.SHOW_ELEMENT, () => NodeFilter.FILTER_ACCEPT);
                    for (; a2.nextNode(); ) {
                      const t6 = a2.currentNode;
                      if (n4 > t6.getBoundingClientRect().top || r2.scanFullPage) {
                        const i6 = e5(t6);
                        if (i6) for (let t7 = 0; i6.length > t7; t7++) s(i6[t7]);
                      }
                    }
                  })();
                }
                generateCSS() {
                  let t6 = "";
                  for (const e6 in this.css) if (!/:not\(/.test(e6)) {
                    t6 += e6 + " { ";
                    for (const i5 in this.css[e6]) t6 += i5 + ": " + this.css[e6][i5] + "; ";
                    t6 += "}\n";
                  }
                  return t6;
                }
              }
              try {
                return new i4(t5.ew, t5.ed, { scanFullPage: true }).generateCSS();
              } catch (t6) {
              }
              return "";
            }
          }, 78757: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(71842), r2 = i3(56298), s = i3(17527), a2 = i3(98434), l = i3(931), c = i3(11131), d2 = i3(59827), u2 = i3.n(d2), h2 = i3(36115);
            l.I.set("print", u2()), h2.T.prototype.controls.print = { exec: (t5) => {
              const e5 = t5.create.element("iframe");
              Object.assign(e5.style, { position: "fixed", right: 0, bottom: 0, width: 0, height: 0, border: 0 }), (0, r2.My)(t5, h2.T).appendChild(e5);
              const i4 = () => {
                t5.e.off(t5.ow, "mousemove", i4), n2.J.safeRemove(e5);
              }, o4 = e5.contentWindow;
              if (o4) {
                t5.e.on(o4, "onbeforeunload onafterprint", i4).on(t5.ow, "mousemove", i4), t5.o.iframe ? (t5.e.fire("generateDocumentStructure.iframe", o4.document, t5), o4.document.body.innerHTML = t5.value) : (o4.document.write('<!doctype html><html lang="' + (0, s.e)(t5.o.language) + '"><head><title></title></head><style>' + (0, c.Y)(t5) + "</style><body></body></html>"), o4.document.close(), (0, a2.u)(t5, void 0, "px", o4.document.body));
                const e6 = o4.document.createElement("style");
                e6.innerHTML = "@media print {\n					body {\n							-webkit-print-color-adjust: exact;\n					}\n			}", o4.document.head.appendChild(e6), o4.focus(), o4.print();
              }
            }, mode: o3.MODE_SOURCE + o3.MODE_WYSIWYG, tooltip: "Print" }, r2.fg.add("print", function(t5) {
              t5.registerButton({ name: "print" });
            });
          }, 60189: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(56298), r2 = i3(29866), s = i3(931), a2 = i3(34045), l = i3.n(a2), c = i3(39199), d2 = i3.n(c), u2 = i3(36115);
            s.I.set("redo", l()).set("undo", d2()), u2.T.prototype.controls.redo = { mode: o3.MODE_SPLIT, isDisabled: (t5) => !t5.history.canRedo(), tooltip: "Redo" }, u2.T.prototype.controls.undo = { mode: o3.MODE_SPLIT, isDisabled: (t5) => !t5.history.canUndo(), tooltip: "Undo" }, n2.fg.add("redoUndo", class extends r2.k {
              constructor() {
                super(...arguments), this.buttons = [{ name: "undo", group: "history" }, { name: "redo", group: "history" }];
              }
              beforeDestruct() {
              }
              afterInit(t5) {
                const e5 = (e6) => (t5.history[e6](), false);
                t5.registerCommand("redo", { exec: e5, hotkeys: ["ctrl+y", "ctrl+shift+z", "cmd+y", "cmd+shift+z"] }), t5.registerCommand("undo", { exec: e5, hotkeys: ["ctrl+z", "cmd+z"] });
              }
            });
          }, 36001: function(t4, e4, i3) {
            i3(36115).T.prototype.tableAllowCellResize = true;
          }, 39147: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = i3(37435);
            i3(36001);
            const d2 = "table_processor_observer-resize";
            class u2 extends c.Plugin {
              constructor() {
                super(...arguments), this.selectMode = false, this.resizeDelta = 0, this.createResizeHandle = () => {
                  this.resizeHandler || (this.resizeHandler = this.j.c.div("jodit-table-resizer"), this.j.e.on(this.resizeHandler, "mousedown.table touchstart.table", this.onHandleMouseDown).on(this.resizeHandler, "mouseenter.table", () => {
                    this.j.async.clearTimeout(this.hideTimeout);
                  }));
                }, this.hideTimeout = 0, this.drag = false, this.minX = 0, this.maxX = 0, this.startX = 0;
              }
              get module() {
                return this.j.getInstance("Table", this.j.o);
              }
              get isRTL() {
                return "rtl" === this.j.o.direction;
              }
              showResizeHandle() {
                this.j.async.clearTimeout(this.hideTimeout), this.j.workplace.appendChild(this.resizeHandler);
              }
              hideResizeHandle() {
                this.hideTimeout = this.j.async.setTimeout(() => {
                  s.J.safeRemove(this.resizeHandler);
                }, { timeout: this.j.defaultTimeout, label: "hideResizer" });
              }
              onHandleMouseDown(t5) {
                if (this.j.isLocked) return;
                this.drag = true, this.j.e.on(this.j.ow, "mouseup.resize-cells touchend.resize-cells", this.onMouseUp).on(this.j.ew, "mousemove.table touchmove.table", this.onMouseMove), this.startX = t5.clientX, this.j.lock(d2), this.resizeHandler.classList.add("jodit-table-resizer_moved");
                let e5, i4 = this.workTable.getBoundingClientRect();
                if (this.minX = 0, this.maxX = 1e6, null != this.wholeTable) i4 = this.workTable.parentNode.getBoundingClientRect(), this.minX = i4.left, this.maxX = this.minX + i4.width;
                else {
                  const t6 = this.module.formalCoordinate(this.workTable, this.workCell, true);
                  this.module.formalMatrix(this.workTable, (i5, o4, r3) => {
                    t6[1] === r3 && (e5 = i5.getBoundingClientRect(), this.minX = Math.max(e5.left + n2.NEARBY / 2, this.minX)), t6[1] + (this.isRTL ? -1 : 1) === r3 && (e5 = i5.getBoundingClientRect(), this.maxX = Math.min(e5.left + e5.width - n2.NEARBY / 2, this.maxX));
                  });
                }
                return false;
              }
              onMouseMove(t5) {
                if (!this.drag) return;
                this.j.e.fire("closeAllPopups");
                let e5 = t5.clientX;
                const i4 = (0, l.offset)(this.resizeHandler.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
                this.minX > e5 && (e5 = this.minX), e5 > this.maxX && (e5 = this.maxX), this.resizeDelta = e5 - this.startX + (this.j.o.iframe ? i4.left : 0), this.resizeHandler.style.left = e5 - (this.j.o.iframe ? 0 : i4.left) + "px";
                const o4 = this.j.s.sel;
                o4 && o4.removeAllRanges();
              }
              onMouseUp(t5) {
                (this.selectMode || this.drag) && (this.selectMode = false, this.j.unlock()), this.resizeHandler && this.drag && (this.drag = false, this.j.e.off(this.j.ew, "mousemove.table touchmove.table", this.onMouseMove), this.resizeHandler.classList.remove("jodit-table-resizer_moved"), this.startX !== t5.clientX && (null == this.wholeTable ? this.resizeColumns() : this.resizeTable()), this.j.synchronizeValues(), this.j.s.focus());
              }
              resizeColumns() {
                const t5 = this.resizeDelta, e5 = [], i4 = this.module;
                i4.setColumnWidthByDelta(this.workTable, i4.formalCoordinate(this.workTable, this.workCell, true)[1], t5, true, e5);
                const o4 = (0, l.call)(this.isRTL ? s.J.prev : s.J.next, this.workCell, s.J.isCell, this.workCell.parentNode);
                i4.setColumnWidthByDelta(this.workTable, i4.formalCoordinate(this.workTable, o4)[1], -t5, false, e5);
              }
              resizeTable() {
                const t5 = this.resizeDelta * (this.isRTL ? -1 : 1), e5 = this.workTable.offsetWidth, i4 = (0, l.getContentWidth)(this.workTable.parentNode, this.j.ew), o4 = !this.wholeTable;
                if (this.isRTL ? !o4 : o4) this.workTable.style.width = (e5 + t5) / i4 * 100 + "%";
                else {
                  const o5 = this.isRTL ? "marginRight" : "marginLeft", n3 = parseInt(this.j.ew.getComputedStyle(this.workTable)[o5] || "0", 10);
                  this.workTable.style.width = (e5 - t5) / i4 * 100 + "%", this.workTable.style[o5] = (n3 + t5) / i4 * 100 + "%";
                }
              }
              setWorkCell(t5, e5 = null) {
                this.wholeTable = e5, this.workCell = t5, this.workTable = s.J.up(t5, (t6) => s.J.isTag(t6, "table"), this.j.editor);
              }
              calcHandlePosition(t5, e5, i4 = 0, o4 = 0) {
                const r3 = (0, l.offset)(e5, this.j, this.j.ed);
                if (i4 > n2.NEARBY && r3.width - n2.NEARBY > i4) return void this.hideResizeHandle();
                const a3 = (0, l.offset)(this.j.workplace, this.j, this.j.od, true), c2 = (0, l.offset)(t5, this.j, this.j.ed);
                if (this.resizeHandler.style.left = (i4 > n2.NEARBY ? r3.left + r3.width : r3.left) - a3.left + o4 + "px", Object.assign(this.resizeHandler.style, { height: c2.height + "px", top: c2.top - a3.top + "px" }), this.showResizeHandle(), i4 > n2.NEARBY) {
                  const t6 = (0, l.call)(this.isRTL ? s.J.prev : s.J.next, e5, s.J.isCell, e5.parentNode);
                  this.setWorkCell(e5, !!t6 && null);
                } else {
                  const t6 = (0, l.call)(this.isRTL ? s.J.next : s.J.prev, e5, s.J.isCell, e5.parentNode);
                  this.setWorkCell(t6 || e5, !t6 || null);
                }
              }
              afterInit(t5) {
                t5.o.tableAllowCellResize && t5.e.off(this.j.ow, ".resize-cells").off(".resize-cells").on("change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells", () => {
                  (0, l.$$)("table", t5.editor).forEach(this.observe);
                }).on(this.j.ow, "scroll.resize-cells", () => {
                  if (!this.drag) return;
                  const e5 = s.J.up(this.workCell, (t6) => s.J.isTag(t6, "table"), t5.editor);
                  if (e5) {
                    const t6 = e5.getBoundingClientRect();
                    this.resizeHandler.style.top = t6.top + "px";
                  }
                }).on("beforeSetMode.resize-cells", () => {
                  const e5 = this.module;
                  e5.getAllSelectedCells().forEach((i4) => {
                    e5.removeSelection(i4), e5.normalizeTable(s.J.closest(i4, "table", t5.editor));
                  });
                });
              }
              observe(t5) {
                (0, l.dataBind)(t5, d2) || ((0, l.dataBind)(t5, d2, true), this.j.e.on(t5, "mouseleave.resize-cells", (t6) => {
                  this.resizeHandler && this.resizeHandler !== t6.relatedTarget && this.hideResizeHandle();
                }).on(t5, "mousemove.resize-cells touchmove.resize-cells", this.j.async.throttle((e5) => {
                  if (this.j.isLocked) return;
                  const i4 = s.J.up(e5.target, s.J.isCell, t5);
                  i4 && this.calcHandlePosition(t5, i4, e5.offsetX);
                }, { timeout: this.j.defaultTimeout })), this.createResizeHandle());
              }
              beforeDestruct(t5) {
                t5.events && (t5.e.off(this.j.ow, ".resize-cells"), t5.e.off(".resize-cells"));
              }
            }
            (0, o3.Cg)([r2.autobind], u2.prototype, "onHandleMouseDown", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onMouseMove", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onMouseUp", null), (0, o3.Cg)([r2.autobind], u2.prototype, "observe", null), a2.fg.add("resizeCells", u2);
          }, 57362: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.allowResizeX = false, o3.T.prototype.allowResizeY = true;
          }, 76693: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(71842), s = i3(56298), a2 = i3(71005), l = i3(53048);
            i3(57362);
            let c = class extends a2.k {
              constructor() {
                super(...arguments), this.isResized = false, this.start = { x: 0, y: 0, w: 0, h: 0 }, this.handle = this.j.c.div("jodit-editor__resize", l.In.get("resize_handler"));
              }
              afterInit(t5) {
                const { height: e5, width: i4, allowResizeX: o4 } = t5.o;
                let { allowResizeY: n3 } = t5.o;
                "auto" === e5 && "auto" !== i4 && (n3 = false), "auto" === e5 && "auto" === i4 || !o4 && !n3 || (t5.statusbar.setMod("resize-handle", true), t5.e.on("toggleFullSize.resizeHandler", () => {
                  this.handle.style.display = t5.isFullSize ? "none" : "block";
                }).on(this.handle, "mousedown touchstart", this.onHandleResizeStart).on(t5.ow, "mouseup touchend", this.onHandleResizeEnd), t5.container.appendChild(this.handle));
              }
              onHandleResizeStart(t5) {
                this.isResized = true, this.start.x = t5.clientX, this.start.y = t5.clientY, this.start.w = this.j.container.offsetWidth, this.start.h = this.j.container.offsetHeight, this.j.lock(), this.j.e.on(this.j.ow, "mousemove touchmove", this.onHandleResize), t5.preventDefault();
              }
              onHandleResize(t5) {
                this.isResized && (this.j.o.allowResizeY && this.j.e.fire("setHeight", this.start.h + t5.clientY - this.start.y), this.j.o.allowResizeX && this.j.e.fire("setWidth", this.start.w + t5.clientX - this.start.x), this.j.e.fire("resize"));
              }
              onHandleResizeEnd() {
                this.isResized && (this.isResized = false, this.j.e.off(this.j.ow, "mousemove touchmove", this.onHandleResize), this.j.unlock());
              }
              beforeDestruct() {
                r2.J.safeRemove(this.handle), this.j.e.off(this.j.ow, "mouseup touchsend", this.onHandleResizeEnd);
              }
            };
            c.requires = ["size"], c = (0, o3.Cg)([n2.autobind], c), s.fg.add("resizeHandler", c);
          }, 69505: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.allowResizeTags = /* @__PURE__ */ new Set(["img", "iframe", "table", "jodit"]), o3.T.prototype.resizer = { showSize: true, hideSizeTimeout: 1e3, forImageChangeAttributes: true, min_width: 10, min_height: 10, useAspectRatio: /* @__PURE__ */ new Set(["img"]) };
          }, 6857: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = i3(29866);
            i3(69505);
            const d2 = "__jodit-resizer_binded";
            class u2 extends c.k {
              constructor() {
                super(...arguments), this.LOCK_KEY = "resizer", this.element = null, this.isResizeMode = false, this.isShown = false, this.startX = 0, this.startY = 0, this.width = 0, this.height = 0, this.ratio = 0, this.rect = this.j.c.fromHTML(`<div title="${this.j.i18n("Press Alt for custom resizing")}" class="jodit-resizer">
				<div class="jodit-resizer__top-left"></div>
				<div class="jodit-resizer__top-right"></div>
				<div class="jodit-resizer__bottom-right"></div>
				<div class="jodit-resizer__bottom-left"></div>
				<span>100x100</span>
			</div>`), this.sizeViewer = this.rect.getElementsByTagName("span")[0], this.pointerX = 0, this.pointerY = 0, this.isAltMode = false, this.onClickElement = (t5) => {
                  this.isResizeMode || this.element === t5 && this.isShown || (this.element = t5, this.show(), s.J.isTag(this.element, "img") && !this.element.complete && this.j.e.one(this.element, "load", this.updateSize));
                }, this.updateSize = () => {
                  if (!this.isInDestruct && this.isShown && this.element && this.rect) {
                    const t5 = this.getWorkplacePosition(), e5 = (0, l.offset)(this.element, this.j, this.j.ed), i4 = parseInt(this.rect.style.left || "0", 10), o4 = parseInt(this.rect.style.top || "0", 10), n3 = e5.top - t5.top, r3 = e5.left - t5.left;
                    o4 === n3 && i4 === r3 && this.rect.offsetWidth === this.element.offsetWidth && this.rect.offsetHeight === this.element.offsetHeight || ((0, l.css)(this.rect, { top: n3, left: r3, width: this.element.offsetWidth, height: this.element.offsetHeight }), this.j.events && (this.j.e.fire(this.element, "changesize"), isNaN(i4) || this.j.e.fire("resize")));
                  }
                }, this.hideSizeViewer = () => {
                  this.sizeViewer.style.opacity = "0";
                };
              }
              afterInit(t5) {
                (0, l.$$)("div", this.rect).forEach((e5) => {
                  t5.e.on(e5, "mousedown.resizer touchstart.resizer", this.onStartResizing.bind(this, e5));
                }), a2.RR.on("hideHelpers", this.hide), t5.e.on("readonly", (t6) => {
                  t6 && this.hide();
                }).on("afterInit changePlace", this.addEventListeners.bind(this)).on("afterGetValueFromEditor.resizer", (t6) => {
                  const e5 = /<jodit[^>]+data-jodit_iframe_wrapper[^>]+>(.*?<iframe[^>]*>.*?<\/iframe>.*?)<\/jodit>/gi;
                  e5.test(t6.value) && (t6.value = t6.value.replace(e5, "$1"));
                }), this.addEventListeners(), this.__onChangeEditor();
              }
              onEditorClick(t5) {
                let e5 = t5.target;
                const { editor: i4, options: { allowResizeTags: o4 } } = this.j;
                for (; e5 && e5 !== i4; ) {
                  if (s.J.isTag(e5, o4)) return this.__bind(e5), void this.onClickElement(e5);
                  e5 = e5.parentNode;
                }
              }
              addEventListeners() {
                const t5 = this.j;
                t5.e.off(t5.editor, ".resizer").off(t5.ow, ".resizer").on(t5.editor, "keydown.resizer", (t6) => {
                  this.isShown && t6.key === n2.KEY_DELETE && this.element && !s.J.isTag(this.element, "table") && this.onDelete(t6);
                }).on(t5.ow, "resize.resizer", this.updateSize).on("resize.resizer", this.updateSize).on([t5.ow, t5.editor], "scroll.resizer", () => {
                  this.isShown && !this.isResizeMode && this.hide();
                }).on(t5.ow, "keydown.resizer", this.onKeyDown).on(t5.ow, "keyup.resizer", this.onKeyUp).on(t5.ow, "mouseup.resizer touchend.resizer", this.onClickOutside);
              }
              onStartResizing(t5, e5) {
                if (!this.element || !this.element.parentNode) return this.hide(), false;
                this.handle = t5, e5.cancelable && e5.preventDefault(), e5.stopImmediatePropagation(), this.width = this.element.offsetWidth, this.height = this.element.offsetHeight, this.ratio = this.width / this.height, this.isResizeMode = true, this.startX = e5.clientX, this.startY = e5.clientY, this.pointerX = e5.clientX, this.pointerY = e5.clientY;
                const { j: i4 } = this;
                i4.e.fire("hidePopup"), i4.lock(this.LOCK_KEY), i4.e.on(i4.ow, "mousemove.resizer touchmove.resizer", this.onResize);
              }
              onEndResizing() {
                const { j: t5 } = this;
                t5.unlock(), this.isResizeMode = false, this.isAltMode = false, t5.synchronizeValues(), t5.e.off(t5.ow, "mousemove.resizer touchmove.resizer", this.onResize);
              }
              onResize(t5) {
                if (this.isResizeMode) {
                  if (!this.element) return;
                  let e5, i4;
                  if (this.pointerX = t5.clientX, this.pointerY = t5.clientY, this.j.options.iframe) {
                    const o5 = this.getWorkplacePosition();
                    e5 = t5.clientX + o5.left - this.startX, i4 = t5.clientY + o5.top - this.startY;
                  } else e5 = this.pointerX - this.startX, i4 = this.pointerY - this.startY;
                  const o4 = this.handle.className;
                  let n3 = 0, r3 = 0;
                  const a3 = this.j.o.resizer.useAspectRatio;
                  !this.isAltMode && (true === a3 || a3 && s.J.isTag(this.element, a3)) ? (e5 ? (n3 = this.width + (o4.match(/left/) ? -1 : 1) * e5, r3 = Math.round(n3 / this.ratio)) : (r3 = this.height + (o4.match(/top/) ? -1 : 1) * i4, n3 = Math.round(r3 * this.ratio)), n3 > (0, l.innerWidth)(this.j.editor, this.j.ow) && (n3 = (0, l.innerWidth)(this.j.editor, this.j.ow), r3 = Math.round(n3 / this.ratio))) : (n3 = this.width + (o4.match(/left/) ? -1 : 1) * e5, r3 = this.height + (o4.match(/top/) ? -1 : 1) * i4), n3 > this.j.o.resizer.min_width && this.applySize(this.element, "width", this.rect.parentNode.offsetWidth > n3 ? n3 : "100%"), r3 > this.j.o.resizer.min_height && this.applySize(this.element, "height", r3), this.updateSize(), this.showSizeViewer(this.element.offsetWidth, this.element.offsetHeight), t5.stopImmediatePropagation();
                }
              }
              onKeyDown(t5) {
                this.isAltMode = t5.key === n2.KEY_ALT, !this.isAltMode && this.isResizeMode && this.onEndResizing();
              }
              onKeyUp() {
                this.isAltMode && this.isResizeMode && this.element && (this.width = this.element.offsetWidth, this.height = this.element.offsetHeight, this.ratio = this.width / this.height, this.startX = this.pointerX, this.startY = this.pointerY), this.isAltMode = false;
              }
              onClickOutside(t5) {
                if (this.isShown) {
                  if (!this.isResizeMode) return this.hide();
                  t5.stopImmediatePropagation(), this.onEndResizing();
                }
              }
              getWorkplacePosition() {
                return (0, l.offset)(this.rect.parentNode || this.j.od.documentElement, this.j, this.j.od, true);
              }
              applySize(t5, e5, i4) {
                const o4 = s.J.isImage(t5) && this.j.o.resizer.forImageChangeAttributes;
                o4 && (0, l.attr)(t5, e5, i4), o4 && !t5.style[e5] || (0, l.css)(t5, e5, i4);
              }
              onDelete(t5) {
                this.element && ("JODIT" !== this.element.tagName ? this.j.s.select(this.element) : (s.J.safeRemove(this.element), this.hide(), t5.preventDefault()));
              }
              __onChangeEditor() {
                this.isShown && (this.element && this.element.parentNode ? this.updateSize() : this.hide()), (0, l.$$)("iframe", this.j.editor).forEach(this.__bind);
              }
              __bind(t5) {
                if (!s.J.isHTMLElement(t5) || !this.j.o.allowResizeTags.has(t5.tagName.toLowerCase()) || (0, l.dataBind)(t5, d2)) return;
                let e5;
                if ((0, l.dataBind)(t5, d2, true), s.J.isTag(t5, "iframe")) {
                  const i4 = t5;
                  s.J.isHTMLElement(t5.parentNode) && (0, l.attr)(t5.parentNode, "-jodit_iframe_wrapper") ? t5 = t5.parentNode : (e5 = this.j.createInside.element("jodit", { "data-jodit-temp": 1, contenteditable: false, draggable: true, "data-jodit_iframe_wrapper": 1 }), (0, l.attr)(e5, "style", (0, l.attr)(t5, "style")), (0, l.css)(e5, { display: "inline-block" === t5.style.display ? "inline-block" : "block", width: t5.offsetWidth, height: t5.offsetHeight }), t5.parentNode && t5.parentNode.insertBefore(e5, t5), e5.appendChild(t5), this.j.e.on(e5, "click", () => {
                    (0, l.attr)(e5, "data-jodit-wrapper_active", true);
                  }), t5 = e5), this.j.e.off(t5, "mousedown.select touchstart.select").on(t5, "mousedown.select touchstart.select", () => {
                    this.j.s.select(t5);
                  }).off(t5, "changesize").on(t5, "changesize", () => {
                    i4.setAttribute("width", t5.offsetWidth + "px"), i4.setAttribute("height", t5.offsetHeight + "px");
                  });
                }
                this.j.e.on(t5, "dragstart", this.hide), !n2.IS_ES_NEXT && n2.IS_IE && this.j.e.on(t5, "mousedown", (e6) => {
                  s.J.isTag(t5, "img") && e6.preventDefault();
                });
              }
              showSizeViewer(t5, e5) {
                this.j.o.resizer.showSize && (this.sizeViewer.offsetWidth > t5 || this.sizeViewer.offsetHeight > e5 ? this.hideSizeViewer() : (this.sizeViewer.style.opacity = "1", this.sizeViewer.textContent = `${t5} x ${e5}`, this.j.async.setTimeout(this.hideSizeViewer, { timeout: this.j.o.resizer.hideSizeTimeout, label: "hideSizeViewer" })));
              }
              show() {
                this.j.o.readonly || this.isShown || (this.isShown = true, this.rect.parentNode || ((0, l.markOwner)(this.j, this.rect), this.j.workplace.appendChild(this.rect)), this.j.isFullSize && (this.rect.style.zIndex = (0, l.css)(this.j.container, "zIndex").toString()), this.updateSize());
              }
              hide() {
                this.isResizeMode || (this.isResizeMode = false, this.isShown = false, this.element = null, s.J.safeRemove(this.rect), (0, l.$$)("[data-jodit-wrapper_active='true']", this.j.editor).forEach((t5) => (0, l.attr)(t5, "data-jodit-wrapper_active", false)));
              }
              beforeDestruct(t5) {
                this.hide(), a2.RR.off("hideHelpers", this.hide), t5.e.off(this.j.ow, ".resizer").off(".resizer");
              }
            }
            (0, o3.Cg)([(0, r2.watch)(":click")], u2.prototype, "onEditorClick", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onStartResizing", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onEndResizing", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onResize", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onKeyDown", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onKeyUp", null), (0, o3.Cg)([r2.autobind], u2.prototype, "onClickOutside", null), (0, o3.Cg)([(0, r2.watch)(":change")], u2.prototype, "__onChangeEditor", null), (0, o3.Cg)([r2.autobind], u2.prototype, "__bind", null), (0, o3.Cg)([r2.autobind, (0, r2.watch)(":hideResizer")], u2.prototype, "hide", null), a2.fg.add("resizer", u2);
          }, 78593: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(21917), r2 = i3.n(n2), s = i3(36115);
            s.T.prototype.useSearch = true, s.T.prototype.search = { lazyIdleTimeout: 0, useCustomHighlightAPI: void 0 !== window.Highlight }, o3.I.set("search", r2()), s.T.prototype.controls.find = { tooltip: "Find", icon: "search", exec(t5, e5, { control: i4 }) {
              switch (i4.args && i4.args[0]) {
                case "findPrevious":
                  t5.e.fire("searchPrevious");
                  break;
                case "findNext":
                  t5.e.fire("searchNext");
                  break;
                case "replace":
                  t5.execCommand("openReplaceDialog");
                  break;
                default:
                  t5.execCommand("openSearchDialog");
              }
            }, list: { search: "Find", findNext: "Find Next", findPrevious: "Find Previous", replace: "Replace" }, childTemplate: (t5, e5, i4) => i4 };
          }, 89568: function(t4, e4, i3) {
            i3.d(e4, { IJ: function() {
              return l;
            }, Tz: function() {
              return c;
            }, _B: function() {
              return s;
            }, zy: function() {
              return a2;
            } });
            var o3 = i3(55186), n2 = i3(58720);
            const r2 = "jd-tmp-selection";
            function s(t5, e5, i4, n3, s2) {
              if (null == e5.startContainer.nodeValue || null == e5.endContainer.nodeValue) return;
              if (t5.o.search.useCustomHighlightAPI && void 0 !== window.Highlight) {
                const o4 = [e5, ...i4].map((e6) => {
                  const i5 = t5.selection.createRange();
                  return i5.setStart(e6.startContainer, e6.startOffset), i5.setEnd(e6.endContainer, e6.endOffset), i5;
                }), n4 = new Highlight(...o4);
                return CSS.highlights.clear(), CSS.highlights.set("jodit-search-result", n4), void (i4.length = 0);
              }
              const a3 = n3.element("span", { [r2]: true });
              o3.J.markTemporary(a3);
              const l2 = e5.startContainer.nodeValue;
              let c2 = 0;
              if (0 !== e5.startOffset) {
                const t6 = n3.text(l2.substring(0, e5.startOffset));
                e5.startContainer.nodeValue = l2.substring(e5.startOffset), o3.J.before(e5.startContainer, t6), e5.startContainer === e5.endContainer && (c2 = e5.startOffset, e5.endOffset -= c2), e5.startOffset = 0;
              }
              const d2 = e5.endContainer.nodeValue;
              if (e5.endOffset !== d2.length) {
                const t6 = n3.text(d2.substring(e5.endOffset));
                e5.endContainer.nodeValue = d2.substring(0, e5.endOffset), o3.J.after(e5.endContainer, t6);
                for (const o4 of i4) {
                  if (o4.startContainer !== e5.endContainer) break;
                  o4.startContainer = t6, o4.startOffset = o4.startOffset - e5.endOffset - c2, o4.endContainer === e5.endContainer && (o4.endContainer = t6, o4.endOffset = o4.endOffset - e5.endOffset - c2);
                }
                e5.endOffset = e5.endContainer.nodeValue.length;
              }
              let u2 = e5.startContainer;
              do {
                if (!u2) break;
                if (!o3.J.isText(u2) || o3.J.isElement(h2 = u2.parentNode) && h2.hasAttribute(r2) || o3.J.wrap(u2, a3.cloneNode(), n3), u2 === e5.endContainer) break;
                let t6 = u2.firstChild || u2.nextSibling;
                if (!t6) {
                  for (; u2 && !u2.nextSibling && u2 !== s2; ) u2 = u2.parentNode;
                  t6 = null == u2 ? void 0 : u2.nextSibling;
                }
                u2 = t6;
              } while (u2 && u2 !== s2);
              var h2;
            }
            function a2(t5) {
              return (0, n2.$$)(`[${r2}]`, t5);
            }
            function l(t5) {
              a2(t5).forEach((t6) => o3.J.unwrap(t6));
            }
            function c(t5) {
              return t5.replace(RegExp(`<span[^>]+${r2}[^>]+>(.*?)</span>`, "g"), "$1");
            }
          }, 78817: function(t4, e4, i3) {
            i3.d(e4, { IJ: function() {
              return o3.IJ;
            }, QN: function() {
              return n2.Q;
            }, Tz: function() {
              return o3.Tz;
            }, _B: function() {
              return o3._B;
            }, zy: function() {
              return o3.zy;
            } });
            var o3 = i3(89568), n2 = i3(30621);
          }, 30621: function(t4, e4, i3) {
            i3.d(e4, { Q: function() {
              return n2;
            } });
            var o3 = i3(67975);
            class n2 {
              constructor(t5 = o3.H) {
                this.searchIndex = t5, this.queue = [], this.value = "";
              }
              add(t5) {
                var e5;
                const i4 = (null !== (e5 = t5.nodeValue) && void 0 !== e5 ? e5 : "").toLowerCase();
                if (!i4.length) return;
                const o4 = this.value.length;
                this.queue.push({ startIndex: o4, endIndex: o4 + i4.length, node: t5 }), this.value += i4;
              }
              ranges(t5, e5 = 0) {
                const i4 = [];
                let o4 = e5, n3 = 0, r2 = 0;
                do {
                  if ([o4, n3] = this.searchIndex(t5, this.value, o4), -1 !== o4) {
                    let t6, e6, s = 0, a2 = 0;
                    for (let i5 = r2; this.queue.length > i5; i5 += 1) if (!t6 && this.queue[i5].endIndex > o4 && (t6 = this.queue[i5].node, s = o4 - this.queue[i5].startIndex), t6 && this.queue[i5].endIndex >= o4 + n3) {
                      e6 = this.queue[i5].node, a2 = o4 + n3 - this.queue[i5].startIndex, r2 = i5;
                      break;
                    }
                    t6 && e6 && i4.push({ startContainer: t6, startOffset: s, endContainer: e6, endOffset: a2 }), o4 += n3;
                  }
                } while (-1 !== o4);
                return 0 === i4.length ? null : i4;
              }
            }
          }, 17343: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = (i3(17352), i3(22664)), r2 = i3(71842), s = i3(56298), a2 = i3(65147), l = i3(71005), c = (i3(78593), i3(78817)), d2 = i3(63064);
            class u2 extends l.k {
              constructor() {
                super(...arguments), this.buttons = [{ name: "find", group: "search" }], this.previousQuery = "", this.drawPromise = null, this.walker = null, this.walkerCount = null, this.cache = {}, this.wrapFrameRequest = 0;
              }
              get ui() {
                return new d2.F(this.j);
              }
              async updateCounters() {
                this.ui.isOpened && (this.ui.count = await this.calcCounts(this.ui.query));
              }
              onPressReplaceButton() {
                this.findAndReplace(this.ui.query), this.updateCounters();
              }
              tryScrollToElement(t5) {
                let e5 = r2.J.closest(t5, r2.J.isElement, this.j.editor);
                e5 || (e5 = r2.J.prev(t5, r2.J.isElement, this.j.editor)), e5 && e5 !== this.j.editor && (0, a2.scrollIntoViewIfNeeded)(e5, this.j.editor, this.j.ed);
              }
              async calcCounts(t5) {
                return (await this.findQueryBounds(t5, "walkerCount")).length;
              }
              async findQueryBounds(t5, e5) {
                let i4 = this[e5];
                return i4 && i4.break(), i4 = new r2.p(this.j.async, { timeout: this.j.o.search.lazyIdleTimeout }), this[e5] = i4, this.find(i4, t5).catch((t6) => []);
              }
              async findAndReplace(t5) {
                const e5 = await this.findQueryBounds(t5, "walker");
                if (!e5.length) return false;
                let i4 = this.findCurrentIndexInRanges(e5, this.j.s.range);
                -1 === i4 && (i4 = 0);
                const o4 = e5[i4];
                if (o4) {
                  try {
                    const e6 = this.j.ed.createRange();
                    e6.setStart(o4.startContainer, o4.startOffset), e6.setEnd(o4.endContainer, o4.endOffset), e6.deleteContents();
                    const n3 = this.j.createInside.text(this.ui.replace);
                    r2.J.safeInsertNode(e6, n3), (0, c.IJ)(this.j.editor), this.j.s.setCursorAfter(n3), this.tryScrollToElement(n3), this.cache = {}, this.ui.currentIndex = i4, await this.findAndSelect(t5, true).catch((t6) => null);
                  } finally {
                    this.j.synchronizeValues();
                  }
                  return this.j.e.fire("afterFindAndReplace"), true;
                }
                return false;
              }
              async findAndSelect(t5, e5) {
                var i4;
                const o4 = await this.findQueryBounds(t5, "walker");
                if (!o4.length) return false;
                this.previousQuery === t5 && (0, c.zy)(this.j.editor).length || (null === (i4 = this.drawPromise) || void 0 === i4 || i4.rejectCallback(), this.j.async.cancelAnimationFrame(this.wrapFrameRequest), (0, c.IJ)(this.j.editor), this.drawPromise = this.__drawSelectionRanges(o4)), this.previousQuery = t5;
                let n3 = this.ui.currentIndex - 1;
                n3 = -1 === n3 ? 0 : e5 ? n3 === o4.length - 1 ? 0 : n3 + 1 : 0 === n3 ? o4.length - 1 : n3 - 1, this.ui.currentIndex = n3 + 1;
                const r3 = o4[n3];
                if (r3) {
                  const e6 = this.j.ed.createRange();
                  try {
                    e6.setStart(r3.startContainer, r3.startOffset), e6.setEnd(r3.endContainer, r3.endOffset), this.j.s.selectRange(e6);
                  } catch (t6) {
                  }
                  return this.tryScrollToElement(r3.startContainer), await this.updateCounters(), await this.drawPromise, this.j.e.fire("afterFindAndSelect"), true;
                }
                return false;
              }
              findCurrentIndexInRanges(t5, e5) {
                return t5.findIndex((t6) => t6.startContainer === e5.startContainer && t6.startOffset === e5.startOffset && t6.endContainer === e5.startContainer && t6.endOffset === e5.endOffset);
              }
              async isValidCache(t5) {
                return (await t5).every((t6) => {
                  var e5, i4, o4, n3;
                  return t6.startContainer.isConnected && t6.startOffset <= (null !== (i4 = null === (e5 = t6.startContainer.nodeValue) || void 0 === e5 ? void 0 : e5.length) && void 0 !== i4 ? i4 : 0) && t6.endContainer.isConnected && t6.endOffset <= (null !== (n3 = null === (o4 = t6.endContainer.nodeValue) || void 0 === o4 ? void 0 : o4.length) && void 0 !== n3 ? n3 : 0);
                });
              }
              async find(t5, e5) {
                if (!e5.length) return [];
                const i4 = this.cache[e5];
                return i4 && await this.isValidCache(i4) ? i4 : (this.cache[e5] = this.j.async.promise((i5) => {
                  const o4 = new c.QN(this.j.o.search.fuzzySearch);
                  t5.on("break", () => {
                    i5([]);
                  }).on("visit", (t6) => (r2.J.isText(t6) && o4.add(t6), false)).on("end", () => {
                    var t6;
                    i5(null !== (t6 = o4.ranges(e5)) && void 0 !== t6 ? t6 : []);
                  }).setWork(this.j.editor);
                }), this.cache[e5]);
              }
              __drawSelectionRanges(t5) {
                const { async: e5, createInside: i4, editor: o4 } = this.j;
                e5.cancelAnimationFrame(this.wrapFrameRequest);
                const n3 = [...t5];
                let r3, s2 = 0;
                return e5.promise((t6) => {
                  const a3 = () => {
                    do {
                      r3 = n3.shift(), r3 && (0, c._B)(this.j, r3, n3, i4, o4), s2 += 1;
                    } while (r3 && 5 >= s2);
                    n3.length ? this.wrapFrameRequest = e5.requestAnimationFrame(a3) : t6();
                  };
                  a3();
                });
              }
              onAfterGetValueFromEditor(t5) {
                t5.value = (0, c.Tz)(t5.value);
              }
              afterInit(t5) {
                if (t5.o.useSearch) {
                  const e5 = this;
                  t5.e.on("beforeSetMode.search", () => {
                    this.ui.close();
                  }).on(this.ui, "afterClose", () => {
                    (0, c.IJ)(t5.editor), this.ui.currentIndex = 0, this.ui.count = 0, this.cache = {};
                  }).on("click", () => {
                    this.ui.currentIndex = 0, (0, c.IJ)(t5.editor);
                  }).on("change.search", () => {
                    this.cache = {};
                  }).on("keydown.search mousedown.search", t5.async.debounce(() => {
                    this.ui.selInfo && (t5.s.removeMarkers(), this.ui.selInfo = null), this.ui.isOpened && this.updateCounters();
                  }, t5.defaultTimeout)).on("searchNext.search searchPrevious.search", () => (this.ui.isOpened || this.ui.open(), e5.findAndSelect(e5.ui.query, "searchNext" === t5.e.current).catch((t6) => {
                  }))).on("search.search", (t6, i4 = true) => (this.ui.currentIndex = 0, e5.findAndSelect(t6 || "", i4).catch((t7) => {
                  }))), t5.registerCommand("search", { exec: (t6, i4, o4 = true) => (i4 && e5.findAndSelect(i4, o4).catch((t7) => {
                  }), false) }).registerCommand("openSearchDialog", { exec: (t6, i4) => (e5.ui.open(i4), false), hotkeys: ["ctrl+f", "cmd+f"] }).registerCommand("openReplaceDialog", { exec: (i4, o4, n3) => (t5.o.readonly || e5.ui.open(o4, n3, true), false), hotkeys: ["ctrl+h", "cmd+h"] });
                }
              }
              beforeDestruct(t5) {
                this.ui.destruct(), t5.e.off(".search");
              }
            }
            (0, o3.Cg)([n2.cache], u2.prototype, "ui", null), (0, o3.Cg)([(0, n2.watch)("ui:needUpdateCounters")], u2.prototype, "updateCounters", null), (0, o3.Cg)([(0, n2.watch)("ui:pressReplaceButton")], u2.prototype, "onPressReplaceButton", null), (0, o3.Cg)([n2.autobind], u2.prototype, "findQueryBounds", null), (0, o3.Cg)([n2.autobind], u2.prototype, "findAndReplace", null), (0, o3.Cg)([n2.autobind], u2.prototype, "findAndSelect", null), (0, o3.Cg)([n2.autobind], u2.prototype, "find", null), (0, o3.Cg)([(0, n2.watch)(":afterGetValueFromEditor")], u2.prototype, "onAfterGetValueFromEditor", null), s.fg.add("search", u2);
          }, 63064: function(t4, e4, i3) {
            i3.d(e4, { F: function() {
              return c;
            } });
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(71842), a2 = i3(65147), l = i3(53048);
            let c = class extends l.D$ {
              className() {
                return "UISearch";
              }
              render() {
                return `<div>
			<div class="&__box">
				<div class="&__inputs">
					<input data-ref="query" tabindex="0" placeholder="~Search for~" type="text"/>
					<input data-ref="replace" tabindex="0" placeholder="~Replace with~" type="text"/>
				</div>
				<div class="&__counts">
					<span data-ref="counter-box">
						<span data-ref="current">0</span><span>/</span><span data-ref="count">0</span>
					</span>
				</div>
				<div class="&__buttons">
					<button data-ref="next" tabindex="0" type="button">${l.In.get("angle-down")}</button>
					<button data-ref="prev" tabindex="0" type="button">${l.In.get("angle-up")}</button>
					<button data-ref="cancel" tabindex="0" type="button">${l.In.get("cancel")}</button>
					<button data-ref="replace-btn" tabindex="0" type="button" class="jodit-ui-button">~Replace~</button>
				</div>
			</div>
		</div>`;
              }
              get currentIndex() {
                return this._currentIndex;
              }
              set currentIndex(t5) {
                this._currentIndex = t5, this.currentBox.innerText = t5.toString();
              }
              set count(t5) {
                this.countBox.innerText = t5.toString();
              }
              get query() {
                return this.queryInput.value;
              }
              get replace() {
                return this.replaceInput.value;
              }
              constructor(t5) {
                super(t5), this.selInfo = null, this._currentIndex = 0, this.isOpened = false;
                const { query: e5, replace: i4, cancel: o4, next: r3, prev: s2, replaceBtn: l2, current: c2, count: d2 } = (0, a2.refs)(this.container);
                this.queryInput = e5, this.replaceInput = i4, this.closeButton = o4, this.replaceButton = l2, this.currentBox = c2, this.countBox = d2, t5.e.on(this.closeButton, "pointerdown", () => (this.close(), false)).on(this.queryInput, "input", () => {
                  this.currentIndex = 0;
                }).on(this.queryInput, "pointerdown", () => {
                  t5.s.isFocused() && (t5.s.removeMarkers(), this.selInfo = t5.s.save());
                }).on(this.replaceButton, "pointerdown", () => (t5.e.fire(this, "pressReplaceButton"), false)).on(r3, "pointerdown", () => (t5.e.fire("searchNext"), false)).on(s2, "pointerdown", () => (t5.e.fire("searchPrevious"), false)).on(this.queryInput, "input", () => {
                  this.setMod("empty-query", !(0, a2.trim)(this.queryInput.value).length);
                }).on(this.queryInput, "keydown", this.j.async.debounce((e6) => {
                  e6.key === n2.KEY_ENTER ? (e6.preventDefault(), e6.stopImmediatePropagation(), t5.e.fire("searchNext") && this.close()) : t5.e.fire(this, "needUpdateCounters");
                }, this.j.defaultTimeout));
              }
              onEditorKeyDown(t5) {
                if (!this.isOpened) return;
                const { j: e5 } = this;
                if (e5.getRealMode() === n2.MODE_WYSIWYG) switch (t5.key) {
                  case n2.KEY_ESC:
                    this.close();
                    break;
                  case n2.KEY_F3:
                    this.queryInput.value && (e5.e.fire(t5.shiftKey ? "searchPrevious" : "searchNext"), t5.preventDefault());
                }
              }
              open(t5, e5, i4 = false) {
                this.isOpened || (this.j.workplace.appendChild(this.container), this.isOpened = true), this.calcSticky(this.j.e.fire("getStickyState.sticky") || false), this.j.e.fire("hidePopup"), this.setMod("replace", i4);
                const o4 = null != t5 ? t5 : (this.j.s.sel || "").toString();
                o4 && (this.queryInput.value = o4), e5 && (this.replaceInput.value = e5), this.setMod("empty-query", !o4.length), this.j.e.fire(this, "needUpdateCounters"), o4 ? this.queryInput.select() : this.queryInput.focus();
              }
              close() {
                this.isOpened && (this.j.s.restore(), s.J.safeRemove(this.container), this.isOpened = false, this.j.e.fire(this, "afterClose"));
              }
              calcSticky(t5) {
                if (this.isOpened) if (this.setMod("sticky", t5), t5) {
                  const t6 = (0, a2.position)(this.j.toolbarContainer);
                  (0, a2.css)(this.container, { top: t6.top + t6.height, left: t6.left + t6.width });
                } else (0, a2.css)(this.container, { top: null, left: null });
              }
            };
            (0, o3.Cg)([(0, r2.watch)([":keydown", "queryInput:keydown"])], c.prototype, "onEditorKeyDown", null), (0, o3.Cg)([r2.autobind], c.prototype, "open", null), (0, o3.Cg)([r2.autobind], c.prototype, "close", null), (0, o3.Cg)([(0, r2.watch)(":toggleSticky")], c.prototype, "calcSticky", null), c = (0, o3.Cg)([r2.component], c);
          }, 29581: function(t4, e4, i3) {
            i3(36115).T.prototype.tableAllowCellSelection = true;
          }, 46939: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = i3(71005), d2 = i3(11648);
            i3(29581);
            const u2 = "table_processor_observer", h2 = "onMoveTableSelectCell";
            class p2 extends c.k {
              constructor() {
                super(...arguments), this.__selectedCell = null, this.__isSelectionMode = false;
              }
              get __tableModule() {
                return this.j.getInstance(d2.X, this.j.o);
              }
              afterInit(t5) {
                t5.o.tableAllowCellSelection && t5.e.on("keydown.select-cells", (t6) => {
                  t6.key === n2.KEY_TAB && this.unselectCells();
                }).on("beforeCommand.select-cells", this.onExecCommand).on("afterCommand.select-cells", this.onAfterCommand).on(["clickEditor", "mousedownTd", "mousedownTh", "touchstartTd", "touchstartTh"].map((t6) => t6 + ".select-cells").join(" "), this.onStartSelection).on("clickTr clickTbody", () => {
                  var t6;
                  const e5 = this.__tableModule.getAllSelectedCells().length;
                  if (e5) return e5 > 1 && (null === (t6 = this.j.s.sel) || void 0 === t6 || t6.removeAllRanges()), false;
                });
              }
              onStartSelection(t5) {
                if (this.j.o.readonly) return;
                if (this.unselectCells(), t5 === this.j.editor) return;
                const e5 = s.J.closest(t5, "table", this.j.editor);
                return t5 && e5 ? (t5.firstChild || t5.appendChild(this.j.createInside.element("br")), this.__isSelectionMode = true, this.__selectedCell = t5, this.__tableModule.addSelection(t5), this.j.e.on(e5, "mousemove.select-cells touchmove.select-cells", this.j.async.throttle(this.__onMove.bind(this, e5), { label: h2, timeout: this.j.defaultTimeout / 2 })).on(e5, "mouseup.select-cells touchend.select-cells", this.__onStopSelection.bind(this, e5)), false) : void 0;
              }
              onOutsideClick() {
                this.__selectedCell = null, this.__onRemoveSelection();
              }
              onChange() {
                this.j.isLocked || this.__isSelectionMode || this.__onRemoveSelection();
              }
              __onMove(t5, e5) {
                var i4;
                if (this.j.o.readonly && !this.j.isLocked) return;
                if (this.j.isLockedNotBy(u2)) return;
                const o4 = this.j.ed.elementFromPoint(e5.clientX, e5.clientY);
                if (!o4) return;
                const n3 = s.J.closest(o4, ["td", "th"], t5);
                if (!n3 || !this.__selectedCell) return;
                n3 !== this.__selectedCell && this.j.lock(u2), this.unselectCells();
                const r3 = this.__tableModule.getSelectedBound(t5, [n3, this.__selectedCell]), a3 = this.__tableModule.formalMatrix(t5);
                for (let t6 = r3[0][0]; r3[1][0] >= t6; t6 += 1) for (let e6 = r3[0][1]; r3[1][1] >= e6; e6 += 1) this.__tableModule.addSelection(a3[t6][e6]);
                this.__tableModule.getAllSelectedCells().length > 1 && (null === (i4 = this.j.s.sel) || void 0 === i4 || i4.removeAllRanges()), this.j.e.fire("hidePopup"), e5.stopPropagation(), (() => {
                  const t6 = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0">&nbsp;</div>');
                  n3.appendChild(t6), this.j.async.setTimeout(() => {
                    var e6;
                    null === (e6 = t6.parentNode) || void 0 === e6 || e6.removeChild(t6);
                  }, this.j.defaultTimeout / 5);
                })();
              }
              __onRemoveSelection(t5) {
                var e5;
                if (!(null === (e5 = null == t5 ? void 0 : t5.buffer) || void 0 === e5 ? void 0 : e5.actionTrigger) && !this.__selectedCell && this.__tableModule.getAllSelectedCells().length) return this.j.unlock(), this.unselectCells(), void this.j.e.fire("hidePopup", "cells");
                this.__isSelectionMode = false, this.__selectedCell = null;
              }
              __onStopSelection(t5, e5) {
                if (!this.__selectedCell) return;
                this.__isSelectionMode = false, this.j.unlock();
                const i4 = this.j.ed.elementFromPoint(e5.clientX, e5.clientY);
                if (!i4) return;
                const o4 = s.J.closest(i4, ["td", "th"], t5);
                if (!o4) return;
                const n3 = s.J.closest(o4, "table", t5);
                if (n3 && n3 !== t5) return;
                const r3 = this.__tableModule.getSelectedBound(t5, [o4, this.__selectedCell]), a3 = this.__tableModule.formalMatrix(t5), c2 = a3[r3[1][0]][r3[1][1]], d3 = a3[r3[0][0]][r3[0][1]];
                this.j.e.fire("showPopup", t5, () => {
                  const t6 = (0, l.position)(d3, this.j), e6 = (0, l.position)(c2, this.j);
                  return { left: t6.left, top: t6.top, width: e6.left - t6.left + e6.width, height: e6.top - t6.top + e6.height };
                }, "cells"), (0, l.$$)("table", this.j.editor).forEach((t6) => {
                  this.j.e.off(t6, "mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells");
                }), this.j.async.clearTimeout(h2);
              }
              unselectCells(t5) {
                const e5 = this.__tableModule, i4 = e5.getAllSelectedCells();
                i4.length && i4.forEach((i5) => {
                  t5 && t5 === i5 || e5.removeSelection(i5);
                });
              }
              onExecCommand(t5) {
                if (/table(splitv|splitg|merge|empty|bin|binrow|bincolumn|addcolumn|addrow)/.test(t5)) {
                  t5 = t5.replace("table", "");
                  const e5 = this.__tableModule.getAllSelectedCells();
                  if (e5.length) {
                    const [i4] = e5;
                    if (!i4) return;
                    const o4 = s.J.closest(i4, "table", this.j.editor);
                    if (!o4) return;
                    switch (t5) {
                      case "splitv":
                        this.__tableModule.splitVertical(o4);
                        break;
                      case "splitg":
                        this.__tableModule.splitHorizontal(o4);
                        break;
                      case "merge":
                        this.__tableModule.mergeSelected(o4);
                        break;
                      case "empty":
                        e5.forEach((t6) => s.J.detach(t6));
                        break;
                      case "bin":
                        s.J.safeRemove(o4);
                        break;
                      case "binrow":
                        new Set(e5.map((t6) => t6.parentNode)).forEach((t6) => {
                          this.__tableModule.removeRow(o4, t6.rowIndex);
                        });
                        break;
                      case "bincolumn":
                        {
                          const t6 = /* @__PURE__ */ new Set();
                          e5.reduce((e6, i5) => (t6.has(i5.cellIndex) || (e6.push(i5), t6.add(i5.cellIndex)), e6), []).forEach((t7) => {
                            this.__tableModule.removeColumn(o4, t7.cellIndex);
                          });
                        }
                        break;
                      case "addcolumnafter":
                      case "addcolumnbefore":
                        this.__tableModule.appendColumn(o4, i4.cellIndex, "addcolumnafter" === t5);
                        break;
                      case "addrowafter":
                      case "addrowbefore":
                        this.__tableModule.appendRow(o4, i4.parentNode, "addrowafter" === t5);
                    }
                  }
                  return false;
                }
              }
              onAfterCommand(t5) {
                /^justify/.test(t5) && this.__tableModule.getAllSelectedCells().forEach((e5) => (0, l.alignElement)(t5, e5));
              }
              beforeDestruct(t5) {
                this.__onRemoveSelection(), t5.e.off(".select-cells");
              }
            }
            p2.requires = ["select"], (0, o3.Cg)([r2.autobind], p2.prototype, "onStartSelection", null), (0, o3.Cg)([(0, r2.watch)(":outsideClick")], p2.prototype, "onOutsideClick", null), (0, o3.Cg)([(0, r2.watch)(":change")], p2.prototype, "onChange", null), (0, o3.Cg)([r2.autobind], p2.prototype, "__onRemoveSelection", null), (0, o3.Cg)([r2.autobind], p2.prototype, "__onStopSelection", null), (0, o3.Cg)([r2.autobind], p2.prototype, "onExecCommand", null), (0, o3.Cg)([r2.autobind], p2.prototype, "onAfterCommand", null), a2.fg.add("selectCells", p2);
          }, 41133: function(t4, e4, i3) {
            i3(36115).T.prototype.select = { normalizeSelectionBeforeCutAndCopy: false, normalizeTripleClick: true };
          }, 35523: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(55186), s = i3(56298), a2 = i3(83260), l = i3(71005), c = i3(53048);
            i3(41133);
            class d2 extends l.k {
              constructor() {
                super(...arguments), this.proxyEventsList = ["click", "mousedown", "touchstart", "mouseup", "touchend"];
              }
              afterInit(t5) {
                this.proxyEventsList.forEach((e5) => {
                  t5.e.on(e5 + ".select", this.onStartSelection);
                });
              }
              beforeDestruct(t5) {
                this.proxyEventsList.forEach((e5) => {
                  t5.e.on(e5 + ".select", this.onStartSelection);
                });
              }
              onStartSelection(t5) {
                const { j: e5 } = this;
                let i4, o4 = t5.target;
                for (; void 0 === i4 && o4 && o4 !== e5.editor; ) i4 = e5.e.fire((0, a2.x)(t5.type + "_" + o4.nodeName.toLowerCase()), o4, t5), o4 = o4.parentElement;
                "click" === t5.type && void 0 === i4 && o4 === e5.editor && e5.e.fire(t5.type + "Editor", o4, t5);
              }
              onOutsideClick(t5) {
                const e5 = t5.target;
                r2.J.up(e5, (t6) => t6 === this.j.editor) || c.D$.closestElement(e5, c.zD) || this.j.e.fire("outsideClick", t5);
              }
              beforeCommandCut() {
                const { s: t5 } = this.j;
                if (!t5.isCollapsed()) {
                  const e5 = t5.current();
                  e5 && r2.J.isOrContains(this.j.editor, e5) && this.onCopyNormalizeSelectionBound();
                }
              }
              beforeCommandSelectAll() {
                const { s: t5 } = this.j;
                return t5.focus(), t5.select(this.j.editor, true), t5.expandSelection(), false;
              }
              onTripleClickNormalizeSelection(t5) {
                if (3 !== t5.detail || !this.j.o.select.normalizeTripleClick) return;
                const { s: e5 } = this.j, { startContainer: i4, startOffset: o4 } = e5.range;
                0 === o4 && r2.J.isText(i4) && e5.select(r2.J.closest(i4, r2.J.isBlock, this.j.editor) || i4, true);
              }
              onCopyNormalizeSelectionBound(t5) {
                const { s: e5, editor: i4, o: o4 } = this.j;
                o4.select.normalizeSelectionBeforeCutAndCopy && !e5.isCollapsed() && (!t5 || t5.isTrusted && r2.J.isNode(t5.target) && r2.J.isOrContains(i4, t5.target)) && this.jodit.s.expandSelection();
              }
            }
            (0, o3.Cg)([n2.autobind], d2.prototype, "onStartSelection", null), (0, o3.Cg)([(0, n2.watch)("ow:click")], d2.prototype, "onOutsideClick", null), (0, o3.Cg)([(0, n2.watch)([":beforeCommandCut"])], d2.prototype, "beforeCommandCut", null), (0, o3.Cg)([(0, n2.watch)([":beforeCommandSelectall"])], d2.prototype, "beforeCommandSelectAll", null), (0, o3.Cg)([(0, n2.watch)([":click"])], d2.prototype, "onTripleClickNormalizeSelection", null), (0, o3.Cg)([(0, n2.watch)([":copy", ":cut"])], d2.prototype, "onCopyNormalizeSelectionBound", null), s.fg.add("select", d2);
          }, 78134: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.minWidth = 200, o3.T.prototype.maxWidth = "100%", o3.T.prototype.minHeight = 200, o3.T.prototype.maxHeight = "auto", o3.T.prototype.saveHeightInStorage = false;
          }, 69077: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(56298), s = i3(2461), a2 = i3(38322), l = i3(29866);
            i3(78134);
            let c = class extends l.k {
              constructor() {
                super(...arguments), this.__resizeWorkspaces = this.j.async.debounce(this.__resizeWorkspaceImd, this.j.defaultTimeout, true);
              }
              afterInit(t5) {
                t5.e.on("setHeight.size", this.__setHeight).on("setWidth.size", this.__setWidth).on("afterInit.size changePlace.size", this.__initialize, { top: true }).on(t5.ow, "load.size", this.__resizeWorkspaces).on("afterInit.size resize.size afterUpdateToolbar.size scroll.size afterResize.size", this.__resizeWorkspaces).on("toggleFullSize.size toggleToolbar.size", this.__resizeWorkspaceImd), this.__initialize();
              }
              __initialize() {
                const { j: t5 } = this;
                if (t5.o.inline) return;
                let { height: e5 } = t5.o;
                if (t5.o.saveHeightInStorage && "auto" !== e5) {
                  const i4 = t5.storage.get("height");
                  i4 && (e5 = i4);
                }
                (0, a2.A)(t5.editor, { minHeight: "100%" }), (0, a2.A)(t5.container, { minHeight: t5.o.minHeight, maxHeight: t5.o.maxHeight, minWidth: t5.o.minWidth, maxWidth: t5.o.maxWidth }), t5.isFullSize || (this.__setHeight(e5), this.__setWidth(t5.o.width));
              }
              __setHeight(t5) {
                if ((0, s.E)(t5)) {
                  const { minHeight: e5, maxHeight: i4 } = this.j.o;
                  (0, s.E)(e5) && e5 > t5 && (t5 = e5), (0, s.E)(i4) && t5 > i4 && (t5 = i4);
                }
                (0, a2.A)(this.j.container, "height", t5), this.j.o.saveHeightInStorage && this.j.storage.set("height", t5), this.__resizeWorkspaceImd();
              }
              __setWidth(t5) {
                if ((0, s.E)(t5)) {
                  const { minWidth: e5, maxWidth: i4 } = this.j.o;
                  (0, s.E)(e5) && e5 > t5 && (t5 = e5), (0, s.E)(i4) && t5 > i4 && (t5 = i4);
                }
                (0, a2.A)(this.j.container, "width", t5), this.__resizeWorkspaceImd();
              }
              __getNotWorkHeight() {
                var t5, e5;
                return ((null === (t5 = this.j.toolbarContainer) || void 0 === t5 ? void 0 : t5.offsetHeight) || 0) + ((null === (e5 = this.j.statusbar) || void 0 === e5 ? void 0 : e5.getHeight()) || 0) + 2;
              }
              __resizeWorkspaceImd() {
                if (!this.j || this.j.isDestructed || !this.j.o || this.j.o.inline) return;
                if (!this.j.container || !this.j.container.parentNode) return;
                const t5 = ((0, a2.A)(this.j.container, "minHeight") || 0) - this.__getNotWorkHeight();
                if ((0, s.E)(t5) && t5 > 0 && ([this.j.workplace, this.j.iframe, this.j.editor].map((e5) => {
                  e5 && (0, a2.A)(e5, "minHeight", t5);
                }), this.j.e.fire("setMinHeight", t5)), (0, s.E)(this.j.o.maxHeight)) {
                  const t6 = this.j.o.maxHeight - this.__getNotWorkHeight();
                  [this.j.workplace, this.j.iframe, this.j.editor].map((e5) => {
                    e5 && (0, a2.A)(e5, "maxHeight", t6);
                  }), this.j.e.fire("setMaxHeight", t6);
                }
                this.j.container && (0, a2.A)(this.j.workplace, "height", "auto" !== this.j.o.height || this.j.isFullSize ? this.j.container.offsetHeight - this.__getNotWorkHeight() : "auto");
              }
              beforeDestruct(t5) {
                t5.e.off(t5.ow, "load.size", this.__resizeWorkspaces).off(".size");
              }
            };
            (0, o3.Cg)([(0, n2.throttle)()], c.prototype, "__initialize", null), (0, o3.Cg)([n2.autobind], c.prototype, "__resizeWorkspaceImd", null), c = (0, o3.Cg)([n2.autobind], c), r2.fg.add("size", c);
          }, 90722: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(931), r2 = i3(9103), s = i3.n(r2), a2 = i3(36115);
            a2.T.prototype.beautifyHTML = !o3.IS_IE, a2.T.prototype.sourceEditor = "ace", a2.T.prototype.sourceEditorNativeOptions = { showGutter: true, theme: "ace/theme/idle_fingers", mode: "ace/mode/html", wrap: true, highlightActiveLine: true }, a2.T.prototype.sourceEditorCDNUrlsJS = ["https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.2/ace.js"], a2.T.prototype.beautifyHTMLCDNUrlsJS = ["https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify.min.js", "https://cdnjs.cloudflare.com/ajax/libs/js-beautify/1.14.4/beautify-html.min.js"], n2.I.set("source", s()), a2.T.prototype.controls.source = { mode: o3.MODE_SPLIT, exec: (t5) => {
              t5.toggleMode();
            }, isActive: (t5) => t5.getRealMode() === o3.MODE_SOURCE, tooltip: "Change mode" };
          }, 5533: function(t4, e4, i3) {
            i3.d(e4, { p: function() {
              return s;
            } });
            var o3 = i3(17352), n2 = i3(65147), r2 = i3(53380);
            class s extends r2.F {
              constructor() {
                super(...arguments), this.className = "jodit_ace_editor", this.proxyOnBlur = (t5) => {
                  this.j.e.fire("blur", t5);
                }, this.proxyOnFocus = (t5) => {
                  this.j.e.fire("focus", t5);
                }, this.proxyOnMouseDown = (t5) => {
                  this.j.e.fire("mousedown", t5);
                };
              }
              aceExists() {
                return void 0 !== this.j.ow.ace;
              }
              getLastColumnIndex(t5) {
                return this.instance.session.getLine(t5).length;
              }
              getLastColumnIndices() {
                const t5 = this.instance.session.getLength(), e5 = [];
                let i4 = 0;
                for (let o4 = 0; t5 > o4; o4++) i4 += this.getLastColumnIndex(o4), o4 > 0 && (i4 += 1), e5[o4] = i4;
                return e5;
              }
              getRowColumnIndices(t5) {
                const e5 = this.getLastColumnIndices();
                if (e5[0] >= t5) return { row: 0, column: t5 };
                let i4 = 1;
                for (let o4 = 1; e5.length > o4; o4++) t5 > e5[o4] && (i4 = o4 + 1);
                return { row: i4, column: t5 - e5[i4 - 1] - 1 };
              }
              setSelectionRangeIndices(t5, e5) {
                const i4 = this.getRowColumnIndices(t5), o4 = this.getRowColumnIndices(e5);
                this.instance.getSelection().setSelectionRange({ start: i4, end: o4 });
              }
              getIndexByRowColumn(t5, e5) {
                return this.getLastColumnIndices()[t5] - this.getLastColumnIndex(t5) + e5;
              }
              init(t5) {
                const e5 = () => {
                  if (void 0 !== this.instance || !this.aceExists()) return;
                  const e6 = this.j.c.div("jodit-source__mirror-fake");
                  this.container.appendChild(e6), this.instance = t5.ow.ace.edit(e6), this.instance.setTheme(t5.o.sourceEditorNativeOptions.theme), this.instance.renderer.setShowGutter(t5.o.sourceEditorNativeOptions.showGutter), this.instance.getSession().setMode(t5.o.sourceEditorNativeOptions.mode), this.instance.setHighlightActiveLine(t5.o.sourceEditorNativeOptions.highlightActiveLine), this.instance.getSession().setUseWrapMode(true), this.instance.setOption("indentedSoftWrap", false), this.instance.setOption("wrap", t5.o.sourceEditorNativeOptions.wrap), this.instance.getSession().setUseWorker(false), this.instance.$blockScrolling = 1 / 0, this.instance.on("change", this.toWYSIWYG), this.instance.on("focus", this.proxyOnFocus), this.instance.on("mousedown", this.proxyOnMouseDown), this.instance.on("blur", this.proxyOnBlur), t5.getRealMode() !== o3.MODE_WYSIWYG && this.setValue(this.getValue());
                  const i4 = this.j.async.debounce(() => {
                    t5.isInDestruct || (this.instance.setOption("maxLines", "auto" !== t5.o.height ? t5.workplace.offsetHeight / this.instance.renderer.lineHeight : 1 / 0), this.instance.resize());
                  }, 2 * this.j.defaultTimeout);
                  t5.e.on("afterResize afterSetMode", i4), i4(), this.onReady();
                };
                t5.e.on("afterSetMode", () => {
                  t5.getRealMode() !== o3.MODE_SOURCE && t5.getMode() !== o3.MODE_SPLIT || (this.fromWYSIWYG(), e5());
                }), e5(), this.aceExists() || (0, n2.loadNext)(t5, t5.o.sourceEditorCDNUrlsJS).then(() => {
                  t5.isInDestruct || e5();
                }).catch(() => null);
              }
              destruct() {
                var t5, e5;
                this.instance.off("change", this.toWYSIWYG), this.instance.off("focus", this.proxyOnFocus), this.instance.off("mousedown", this.proxyOnMouseDown), this.instance.destroy(), null === (e5 = null === (t5 = this.j) || void 0 === t5 ? void 0 : t5.events) || void 0 === e5 || e5.off("aceInited.source");
              }
              setValue(t5) {
                if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
                  const e5 = this.j.e.fire("beautifyHTML", t5);
                  (0, n2.isString)(e5) && (t5 = e5);
                }
                this.instance.setValue(t5), this.instance.clearSelection();
              }
              getValue() {
                return this.instance.getValue();
              }
              setReadOnly(t5) {
                this.instance.setReadOnly(t5);
              }
              get isFocused() {
                return this.instance.isFocused();
              }
              focus() {
                this.instance.focus();
              }
              blur() {
                this.instance.blur();
              }
              getSelectionStart() {
                const t5 = this.instance.selection.getRange();
                return this.getIndexByRowColumn(t5.start.row, t5.start.column);
              }
              getSelectionEnd() {
                const t5 = this.instance.selection.getRange();
                return this.getIndexByRowColumn(t5.end.row, t5.end.column);
              }
              selectAll() {
                this.instance.selection.selectAll();
              }
              insertRaw(t5) {
                const e5 = this.instance.selection.getCursor(), i4 = this.instance.session.insert(e5, t5);
                this.instance.selection.setRange({ start: e5, end: i4 }, false);
              }
              setSelectionRange(t5, e5) {
                this.setSelectionRangeIndices(t5, e5);
              }
              setPlaceHolder(t5) {
              }
              replaceUndoManager() {
                const { history: t5 } = this.jodit;
                this.instance.commands.addCommand({ name: "Undo", bindKey: { win: "Ctrl-Z", mac: "Command-Z" }, exec: () => {
                  t5.undo();
                } }), this.instance.commands.addCommand({ name: "Redo", bindKey: { win: "Ctrl-Shift-Z", mac: "Command-Shift-Z" }, exec: () => {
                  t5.redo();
                } });
              }
            }
          }, 55265: function(t4, e4, i3) {
            i3.d(e4, { S: function() {
              return s;
            } });
            var o3 = i3(55186), n2 = i3(38322), r2 = i3(53380);
            class s extends r2.F {
              constructor() {
                super(...arguments), this.autosize = this.j.async.debounce(() => {
                  this.instance.style.height = "auto", this.instance.style.height = this.instance.scrollHeight + "px";
                }, this.j.defaultTimeout);
              }
              init(t5) {
                this.instance = t5.c.element("textarea", { class: "jodit-source__mirror" }), this.container.appendChild(this.instance), t5.e.on(this.instance, "mousedown keydown touchstart input", t5.async.debounce(this.toWYSIWYG, t5.defaultTimeout)).on("setMinHeight.source", (t6) => {
                  (0, n2.A)(this.instance, "minHeight", t6);
                }).on(this.instance, "change keydown mousedown touchstart input", this.autosize).on("afterSetMode.source", this.autosize).on(this.instance, "mousedown focus", (e5) => {
                  t5.e.fire(e5.type, e5);
                }), this.autosize(), this.onReady();
              }
              destruct() {
                o3.J.safeRemove(this.instance);
              }
              getValue() {
                return this.instance.value;
              }
              setValue(t5) {
                this.instance.value = t5;
              }
              insertRaw(t5) {
                const e5 = this.getValue();
                if (0 > this.getSelectionStart()) this.setValue(e5 + t5);
                else {
                  const i4 = this.getSelectionStart(), o4 = this.getSelectionEnd();
                  this.setValue(e5.substring(0, i4) + t5 + e5.substring(o4, e5.length));
                }
              }
              getSelectionStart() {
                return this.instance.selectionStart;
              }
              getSelectionEnd() {
                return this.instance.selectionEnd;
              }
              setSelectionRange(t5, e5 = t5) {
                this.instance.setSelectionRange(t5, e5);
              }
              get isFocused() {
                return this.instance === this.j.od.activeElement;
              }
              focus() {
                this.instance.focus();
              }
              blur() {
                this.instance.blur();
              }
              setPlaceHolder(t5) {
                this.instance.setAttribute("placeholder", t5);
              }
              setReadOnly(t5) {
                t5 ? this.instance.setAttribute("readonly", "true") : this.instance.removeAttribute("readonly");
              }
              selectAll() {
                this.instance.select();
              }
              replaceUndoManager() {
                const { history: t5 } = this.jodit;
                this.j.e.on(this.instance, "keydown", (e5) => {
                  if ((e5.ctrlKey || e5.metaKey) && "z" === e5.key) return e5.shiftKey ? t5.redo() : t5.undo(), this.setSelectionRange(this.getValue().length), false;
                });
              }
            }
          }, 76134: function(t4, e4, i3) {
            i3.d(e4, { S: function() {
              return n2.S;
            }, p: function() {
              return o3.p;
            } });
            var o3 = i3(5533), n2 = i3(55265);
          }, 1992: function(t4, e4, i3) {
            i3.d(e4, { b: function() {
              return r2;
            } });
            var o3 = i3(65147), n2 = i3(76134);
            function r2(t5, e5, i4, r3, s) {
              let a2;
              if ((0, o3.isFunction)(t5)) a2 = t5(e5);
              else switch (t5) {
                case "ace":
                  if (!e5.o.shadowRoot) {
                    a2 = new n2.p(e5, i4, r3, s);
                    break;
                  }
                default:
                  a2 = new n2.S(e5, i4, r3, s);
              }
              return a2.init(e5), a2.onReadyAlways(() => {
                a2.setReadOnly(e5.o.readonly);
              }), a2;
            }
          }, 53380: function(t4, e4, i3) {
            i3.d(e4, { F: function() {
              return o3;
            } });
            class o3 {
              constructor(t5, e5, i4, o4) {
                this.jodit = t5, this.container = e5, this.toWYSIWYG = i4, this.fromWYSIWYG = o4, this.className = "", this.isReady = false;
              }
              get j() {
                return this.jodit;
              }
              onReady() {
                this.replaceUndoManager(), this.isReady = true, this.j.e.fire(this, "ready");
              }
              onReadyAlways(t5) {
                var e5;
                this.isReady ? t5() : null === (e5 = this.j.events) || void 0 === e5 || e5.on(this, "ready", t5);
              }
            }
          }, 93669: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = i3(71005), d2 = (i3(90722), i3(1992));
            class u2 extends c.k {
              constructor() {
                super(...arguments), this.buttons = [{ name: "source", group: "source" }], this.__lock = false, this.__oldMirrorValue = "", this.tempMarkerStart = "{start-jodit-selection}", this.tempMarkerStartReg = /{start-jodit-selection}/g, this.tempMarkerEnd = "{end-jodit-selection}", this.tempMarkerEndReg = /{end-jodit-selection}/g, this.getSelectionStart = () => {
                  var t5, e5;
                  return null !== (e5 = null === (t5 = this.sourceEditor) || void 0 === t5 ? void 0 : t5.getSelectionStart()) && void 0 !== e5 ? e5 : 0;
                }, this.getSelectionEnd = () => {
                  var t5, e5;
                  return null !== (e5 = null === (t5 = this.sourceEditor) || void 0 === t5 ? void 0 : t5.getSelectionEnd()) && void 0 !== e5 ? e5 : 0;
                };
              }
              onInsertHTML(t5) {
                var e5;
                if (!this.j.o.readonly && !this.j.isEditorMode()) return null === (e5 = this.sourceEditor) || void 0 === e5 || e5.insertRaw(t5), this.toWYSIWYG(), false;
              }
              fromWYSIWYG(t5 = false) {
                if (!this.__lock || true === t5) {
                  this.__lock = true;
                  const t6 = this.j.getEditorValue(false, n2.SOURCE_CONSUMER);
                  t6 !== this.getMirrorValue() && this.setMirrorValue(t6), this.__lock = false;
                }
              }
              toWYSIWYG() {
                if (this.__lock) return;
                const t5 = this.getMirrorValue();
                t5 !== this.__oldMirrorValue && (this.__lock = true, this.j.value = t5, this.__lock = false, this.__oldMirrorValue = t5);
              }
              getNormalPosition(t5, e5) {
                for (e5 = e5.replace(/<(script|style|iframe)[^>]*>[^]*?<\/\1>/im, (t6) => {
                  let e6 = "";
                  for (let i5 = 0; t6.length > i5; i5 += 1) e6 += n2.INVISIBLE_SPACE;
                  return e6;
                }); t5 > 0 && e5[t5] === n2.INVISIBLE_SPACE; ) t5--;
                let i4 = t5;
                for (; i4 > 0; ) {
                  if (i4--, "<" === e5[i4] && void 0 !== e5[i4 + 1] && e5[i4 + 1].match(/[\w/]+/i)) return i4;
                  if (">" === e5[i4]) return t5;
                }
                return t5;
              }
              clnInv(t5) {
                return t5.replace(n2.INVISIBLE_SPACE_REG_EXP(), "");
              }
              onSelectAll(t5) {
                var e5;
                if ("selectall" === t5.toLowerCase() && this.j.getRealMode() === n2.MODE_SOURCE) return null === (e5 = this.sourceEditor) || void 0 === e5 || e5.selectAll(), false;
              }
              getMirrorValue() {
                var t5;
                return (null === (t5 = this.sourceEditor) || void 0 === t5 ? void 0 : t5.getValue()) || "";
              }
              setMirrorValue(t5) {
                var e5;
                null === (e5 = this.sourceEditor) || void 0 === e5 || e5.setValue(t5);
              }
              setFocusToMirror() {
                var t5;
                null === (t5 = this.sourceEditor) || void 0 === t5 || t5.focus();
              }
              saveSelection() {
                if (this.j.getRealMode() === n2.MODE_WYSIWYG) this.j.s.save(), this.j.synchronizeValues(), this.fromWYSIWYG(true);
                else {
                  if (this.j.o.editHTMLDocumentMode) return;
                  const t5 = this.getMirrorValue();
                  if (this.getSelectionStart() === this.getSelectionEnd()) {
                    const e5 = this.j.s.marker(true), i4 = this.getNormalPosition(this.getSelectionStart(), this.getMirrorValue());
                    this.setMirrorValue(t5.substring(0, i4) + this.clnInv(e5.outerHTML) + t5.substring(i4));
                  } else {
                    const e5 = this.j.s.marker(true), i4 = this.j.s.marker(false), o4 = this.getNormalPosition(this.getSelectionStart(), t5), n3 = this.getNormalPosition(this.getSelectionEnd(), t5);
                    this.setMirrorValue(t5.slice(0, o4) + this.clnInv(e5.outerHTML) + t5.slice(o4, n3) + this.clnInv(i4.outerHTML) + t5.slice(n3));
                  }
                  this.toWYSIWYG();
                }
              }
              removeSelection() {
                if (this.j.getRealMode() === n2.MODE_WYSIWYG) return this.__lock = true, this.j.s.restore(), void (this.__lock = false);
                let t5 = this.getMirrorValue(), e5 = 0, i4 = 0;
                try {
                  if (t5 = t5.replace(/<span[^>]+data-jodit-selection_marker=(["'])start\1[^>]*>[<>]*?<\/span>/gim, this.tempMarkerStart).replace(/<span[^>]+data-jodit-selection_marker=(["'])end\1[^>]*>[<>]*?<\/span>/gim, this.tempMarkerEnd), !this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
                    const e6 = this.j.e.fire("beautifyHTML", t5);
                    (0, l.isString)(e6) && (t5 = e6);
                  }
                  if (e5 = t5.indexOf(this.tempMarkerStart), i4 = e5, t5 = t5.replace(this.tempMarkerStartReg, ""), -1 !== e5) {
                    const e6 = t5.indexOf(this.tempMarkerEnd);
                    -1 !== e6 && (i4 = e6);
                  }
                  t5 = t5.replace(this.tempMarkerEndReg, "");
                } finally {
                  t5 = t5.replace(this.tempMarkerEndReg, "").replace(this.tempMarkerStartReg, "");
                }
                this.setMirrorValue(t5), this.setMirrorSelectionRange(e5, i4), this.toWYSIWYG(), this.setFocusToMirror();
              }
              setMirrorSelectionRange(t5, e5) {
                var i4;
                null === (i4 = this.sourceEditor) || void 0 === i4 || i4.setSelectionRange(t5, e5);
              }
              onReadonlyReact() {
                var t5;
                null === (t5 = this.sourceEditor) || void 0 === t5 || t5.setReadOnly(this.j.o.readonly);
              }
              afterInit(t5) {
                if (this.mirrorContainer = t5.c.div("jodit-source"), t5.workplace.appendChild(this.mirrorContainer), t5.e.on("afterAddPlace changePlace afterInit", () => {
                  t5.workplace.appendChild(this.mirrorContainer);
                }), this.sourceEditor = (0, d2.b)("area", t5, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG), t5.e.on(t5.ow, "keydown", (t6) => {
                  var e5;
                  t6.key === n2.KEY_ESC && (null === (e5 = this.sourceEditor) || void 0 === e5 ? void 0 : e5.isFocused) && this.sourceEditor.blur();
                }), this.onReadonlyReact(), t5.e.on("placeholder.source", (t6) => {
                  var e5;
                  null === (e5 = this.sourceEditor) || void 0 === e5 || e5.setPlaceHolder(t6);
                }).on("change.source", this.syncValueFromWYSIWYG).on("beautifyHTML", (t6) => t6), t5.o.beautifyHTML) {
                  const e5 = () => {
                    var e6;
                    if (t5.isInDestruct) return false;
                    const i4 = t5.ow.html_beautify;
                    return !(!i4 || t5.isInDestruct || (null === (e6 = t5.events) || void 0 === e6 || e6.off("beautifyHTML").on("beautifyHTML", (t6) => i4(t6)), 0));
                  };
                  e5() || (0, l.loadNext)(t5, t5.o.beautifyHTMLCDNUrlsJS).then(e5, () => null);
                }
                this.syncValueFromWYSIWYG(true), this.initSourceEditor(t5);
              }
              syncValueFromWYSIWYG(t5 = false) {
                const e5 = this.j;
                e5.getMode() !== n2.MODE_SPLIT && e5.getMode() !== n2.MODE_SOURCE || this.fromWYSIWYG(t5);
              }
              initSourceEditor(t5) {
                var e5;
                if ("area" !== t5.o.sourceEditor) {
                  const e6 = (0, d2.b)(t5.o.sourceEditor, t5, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
                  e6.onReadyAlways(() => {
                    var i4, o4;
                    null === (i4 = this.sourceEditor) || void 0 === i4 || i4.destruct(), this.sourceEditor = e6, this.syncValueFromWYSIWYG(true), null === (o4 = t5.events) || void 0 === o4 || o4.fire("sourceEditorReady", t5);
                  });
                } else null === (e5 = this.sourceEditor) || void 0 === e5 || e5.onReadyAlways(() => {
                  var e6;
                  this.syncValueFromWYSIWYG(true), null === (e6 = t5.events) || void 0 === e6 || e6.fire("sourceEditorReady", t5);
                });
              }
              beforeDestruct() {
                this.sourceEditor && (this.sourceEditor.destruct(), delete this.sourceEditor), s.J.safeRemove(this.mirrorContainer);
              }
            }
            (0, o3.Cg)([(0, r2.watch)(":insertHTML.source")], u2.prototype, "onInsertHTML", null), (0, o3.Cg)([r2.autobind], u2.prototype, "fromWYSIWYG", null), (0, o3.Cg)([r2.autobind], u2.prototype, "toWYSIWYG", null), (0, o3.Cg)([r2.autobind], u2.prototype, "getNormalPosition", null), (0, o3.Cg)([(0, r2.watch)(":beforeCommand.source")], u2.prototype, "onSelectAll", null), (0, o3.Cg)([(0, r2.watch)(":beforeSetMode.source")], u2.prototype, "saveSelection", null), (0, o3.Cg)([(0, r2.watch)(":afterSetMode.source")], u2.prototype, "removeSelection", null), (0, o3.Cg)([r2.autobind], u2.prototype, "setMirrorSelectionRange", null), (0, o3.Cg)([(0, r2.watch)(":readonly.source")], u2.prototype, "onReadonlyReact", null), (0, o3.Cg)([r2.autobind], u2.prototype, "syncValueFromWYSIWYG", null), a2.fg.add("source", u2);
          }, 71096: function(t4, e4, i3) {
            var o3 = i3(9810), n2 = i3(72197), r2 = i3(931), s = i3(71722), a2 = i3(93676), l = i3(22227), c = i3.n(l), d2 = i3(36115);
            d2.T.prototype.speechRecognize = { api: s.o, sound: true, continuous: true, interimResults: true, commands: { "newline|enter": "enter", "delete|remove word|delete word": "backspaceWordButton", comma: "inserthtml::,", underline: "inserthtml::_", hyphen: "inserthtml::-", space: "inserthtml:: ", question: "inserthtml::?", dot: "inserthtml::.", "quote|quotes|open quote": "inserthtml::'", "header|header h1": "formatblock::h1", "select all": "selectall" } }, r2.I.set("speech-recognize", c()), d2.T.prototype.controls.speechRecognize = { isActive(t5, e5) {
              const i4 = (0, n2.m)(t5, "speech");
              return Boolean(null == i4 ? void 0 : i4.isEnabled);
            }, isDisabled: (t5) => !t5.o.speechRecognize.api, exec(t5, e5, { button: i4, control: r3 }) {
              const { api: s2, lang: l2, continuous: c2, interimResults: d3, sound: u2 } = t5.o.speechRecognize;
              if (!s2) return void t5.alert("Speech recognize API unsupported in your browser");
              let h2 = (0, n2.m)(t5, "speech");
              if (!h2) {
                const e6 = new s2();
                h2 = new a2.g(t5.async, e6), h2.lang = l2, h2.continuous = c2, h2.interimResults = d3, h2.sound = u2, (0, n2.m)(t5, "speech", h2), h2.on("pulse", (t6) => {
                  i4.setMod("pulse", t6);
                }), h2.on("result", (e7) => t5.e.fire("speechRecognizeResult", e7)), h2.on("progress", (e7) => t5.e.fire("speechRecognizeProgressResult", e7)), i4.hookStatus("beforeDestruct", () => {
                  h2.destruct();
                });
              }
              if (r3.args) {
                const t6 = r3.args[0];
                if ((0, o3.L)(h2[t6])) return h2[t6] = !h2[t6], void (h2.isEnabled && h2.restart());
              }
              h2.toggle(), i4.state.activated = h2.isEnabled;
            }, name: "speechRecognize", command: "toggleSpeechRecognize", tooltip: "Speech Recognize", list: { sound: "Sound", interimResults: "Interim Results" }, childTemplate(t5, e5, i4) {
              var o4;
              const r3 = (0, n2.m)(t5, "speech");
              return `<span class='jodit-speech-recognize__list-item'><input ${(null !== (o4 = null == r3 ? void 0 : r3[e5]) && void 0 !== o4 ? o4 : t5.o.speechRecognize[e5]) ? "checked" : ""} class='jodit-checkbox' type='checkbox'>&nbsp;${i4}</span>`;
            }, mods: { stroke: false } };
          }, 81629: function(t4, e4, i3) {
            i3.d(e4, { N: function() {
              return o3;
            }, Z: function() {
              return n2;
            } });
            const o3 = 440, n2 = 940;
          }, 71722: function(t4, e4, i3) {
            i3.d(e4, { o: function() {
              return o3;
            } });
            const o3 = window.SpeechRecognition || window.webkitSpeechRecognition;
          }, 50834: function(t4, e4, i3) {
            function o3(t5, e5) {
              const [i4, o4] = e5.split("::");
              t5.execCommand(i4, null, o4);
            }
            i3.d(e4, { F: function() {
              return o3;
            } });
          }, 93676: function(t4, e4, i3) {
            i3.d(e4, { g: function() {
              return c;
            } });
            var o3, n2 = i3(31635), r2 = i3(22664), s = i3(43431), a2 = i3(95473), l = i3(81629);
            let c = o3 = class extends s.h {
              set lang(t5) {
                this._lang = t5, this._api.lang = t5;
              }
              get lang() {
                return this._lang;
              }
              set continuous(t5) {
                this._continuous = t5, this._api.continuous = t5;
              }
              get continuous() {
                return this._continuous;
              }
              set interimResults(t5) {
                this._interimResults = t5, this._api.interimResults = t5;
              }
              get interimResults() {
                return this._interimResults;
              }
              constructor(t5, e5) {
                super(), this.async = t5, this._continuous = false, this._interimResults = false, this.sound = true, this._isEnabled = false, this._restartTimeout = 0, this._onSpeechStart = (t6) => {
                  this._isEnabled && (this.async.clearTimeout(this._restartTimeout), this._restartTimeout = this.async.setTimeout(() => {
                    this.restart(), this.emit("pulse", false), this._makeSound(l.Z);
                  }, 5e3), this.emit("pulse", true));
                }, this._progressTimeout = 0, this._api = e5, o3._instances.add(this);
              }
              destruct() {
                this.stop(), o3._instances.delete(this), super.destruct();
              }
              get isEnabled() {
                return this._isEnabled;
              }
              start() {
                this._isEnabled || (this._isEnabled = true, o3._instances.forEach((t5) => {
                  t5 !== this && t5.stop();
                }), this._api.start(), this.__on("speechstart", this._onSpeechStart).__on("error", this._onError).__on("result", this._onResult));
              }
              stop() {
                if (this._isEnabled) {
                  try {
                    this._api.abort(), this._api.stop();
                  } catch (t5) {
                  }
                  this.__off("speechstart", this._onSpeechStart).__off("error", this._onError).__off("result", this._onResult), this.async.clearTimeout(this._restartTimeout), this._isEnabled = false, this.emit("pulse", false);
                }
              }
              toggle() {
                this._isEnabled ? this.stop() : this.start();
              }
              restart() {
                this.stop(), this.start();
              }
              __on(t5, e5) {
                return this._api.addEventListener(t5, e5), this;
              }
              __off(t5, e5) {
                return this._api.removeEventListener(t5, e5), this;
              }
              _onResult(t5) {
                if (!this._isEnabled) return;
                this.async.clearTimeout(this._progressTimeout);
                const e5 = t5.results.item(t5.resultIndex), { transcript: i4 } = e5.item(0), o4 = () => {
                  try {
                    this.async.clearTimeout(this._restartTimeout), this.emit("result", i4);
                  } catch (t6) {
                  }
                  this.restart(), this.emit("pulse", false), this._makeSound(l.N);
                };
                if (false === e5.isFinal) return this.emit("progress", i4), void (this._progressTimeout = this.async.setTimeout(o4, 500));
                o4();
              }
              _onError() {
                this._isEnabled && (this._makeSound(l.Z), this.emit("pulse", false), this.restart());
              }
              _makeSound(t5) {
                this.sound && (0, a2.s)({ frequency: t5 });
              }
            };
            c._instances = /* @__PURE__ */ new Set(), c = o3 = (0, n2.Cg)([r2.autobind], c);
          }, 95473: function(t4, e4, i3) {
            i3.d(e4, { s: function() {
              return n2;
            } });
            var o3 = i3(81629);
            function n2({ sec: t5 = 0.1, frequency: e5 = o3.N, gain: i4 = 0.1, type: n3 = "sine" } = {}) {
              if (void 0 === window.AudioContext && void 0 === window.webkitAudioContext) return;
              const r2 = new (window.AudioContext || window.webkitAudioContext)(), s = r2.createGain(), a2 = r2.createOscillator();
              a2.type = n3, a2.frequency.value = e5, a2.connect(s), s.connect(r2.destination), a2.start(), a2.stop(r2.currentTime + t5), s.gain.value = i4;
            }
          }, 61593: function(t4) {
            t4.exports = { newline: "الخط الجديد", delete: "حذف", space: "الفضاء", "Speech Recognize": "التعرف على الكلام", Sound: "الصوت", "Interim Results": "النتائج المؤقتة" };
          }, 64458: function(t4) {
            t4.exports = { newline: "řádek", delete: "odstranit", space: "prostora", "Speech Recognize": "Rozpoznání Řeči", Sound: "Zvuk", "Interim Results": "Průběžné Výsledky" };
          }, 89601: function(t4) {
            t4.exports = { newline: "Zeilenumbruch", delete: "löschen", space: "Raum", "Speech Recognize": "Sprache Erkennen", Sound: "Sound", "Interim Results": "Zwischenergebnis" };
          }, 87710: function(t4) {
            t4.exports = { newline: "nueva línea", delete: "eliminar", space: "espacio", "Speech Recognize": "Reconocimiento de Voz", Sound: "Sonido", "Interim Results": "Resultados Provisionales" };
          }, 15603: function(t4) {
            t4.exports = { newline: "خط جدید", delete: "حذف", space: "فضا", "Speech Recognize": "گفتار را تشخیص دهید", Sound: "صدا", "Interim Results": "نتایج موقت" };
          }, 84059: function(t4) {
            t4.exports = { "Speech Recognize": "Puheentunnistus", newline: "uusi rivi", delete: "poistaa", space: "tilaa", Sound: "Ääni", "Interim Results": "Välitulokset" };
          }, 13958: function(t4) {
            t4.exports = { newline: "nouvelle ligne", delete: "supprimer", space: "espace", "Speech Recognize": "Reconnaissance Vocale", Sound: "Son", "Interim Results": "Résultats Intermédiaires" };
          }, 18717: function(t4) {
            t4.exports = { newline: "חדשות", delete: "מחק", space: "שטח", "Speech Recognize": "דיבור מזהה", Sound: "קול", "Interim Results": "תוצאות ביניים" };
          }, 14765: function(t4) {
            t4.exports = { newline: "újsor", delete: "törlés", space: "tér", "Speech Recognize": "A Beszéd Felismeri", Sound: "Hang", "Interim Results": "Időközi Eredmények" };
          }, 77995: function(t4) {
            t4.exports = { newline: "newline", delete: "Hapus", space: "ruang", "Speech Recognize": "Pidato Mengenali", Sound: "Suara", "Interim Results": "Hasil Sementara" };
          }, 25202: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { ar: function() {
              return o3;
            }, cs_cz: function() {
              return n2;
            }, de: function() {
              return r2;
            }, es: function() {
              return s;
            }, fa: function() {
              return a2;
            }, fi: function() {
              return l;
            }, fr: function() {
              return c;
            }, he: function() {
              return d2;
            }, hu: function() {
              return u2;
            }, id: function() {
              return h2;
            }, it: function() {
              return p2;
            }, ja: function() {
              return f2;
            }, ko: function() {
              return g2;
            }, mn: function() {
              return m2;
            }, nl: function() {
              return b2;
            }, pl: function() {
              return _2;
            }, pt_br: function() {
              return v2;
            }, ru: function() {
              return x;
            }, tr: function() {
              return w;
            }, zh_cn: function() {
              return y2;
            }, zh_tw: function() {
              return j;
            } });
            var o3 = i3(61593), n2 = i3(64458), r2 = i3(89601), s = i3(87710), a2 = i3(15603), l = i3(84059), c = i3(13958), d2 = i3(18717), u2 = i3(14765), h2 = i3(77995), p2 = i3(92315), f2 = i3(54711), g2 = i3(68632), m2 = i3(76769), b2 = i3(3424), _2 = i3(85454), v2 = i3(64149), x = i3(16491), w = i3(48948), y2 = i3(84370), j = i3(56646);
          }, 92315: function(t4) {
            t4.exports = { newline: "nuova riga", delete: "eliminare", space: "spazio", "Speech Recognize": "Discorso Riconoscere", Sound: "Suono", "Interim Results": "Risultati intermedi" };
          }, 54711: function(t4) {
            t4.exports = { newline: "改行", delete: "削除", space: "スペース", "Speech Recognize": "音声認識", Sound: "音", "Interim Results": "中間結果" };
          }, 68632: function(t4) {
            t4.exports = { newline: "줄 바꿈", delete: "삭제", space: "공간", "Speech Recognize": "음성 인식", Sound: "소리", "Interim Results": "중간 결과" };
          }, 76769: function(t4) {
            t4.exports = { newline: "Шинэ мөр", delete: "Устгах", space: "Зай", "Speech Recognize": "Дуу хоолой таних", Sound: "Дуу", "Interim Results": "Түр зуурын үр дүн" };
          }, 3424: function(t4) {
            t4.exports = { newline: "regel", delete: "verwijderen", space: "ruimte", "Speech Recognize": "Spraak Herkennen", Sound: "Geluid", "Interim Results": "Tussentijdse Resultaten" };
          }, 85454: function(t4) {
            t4.exports = { newline: "newline", delete: "usunąć", space: "przestrzeń", "Speech Recognize": "Rozpoznawanie Mowy", Sound: "Dźwięk", "Interim Results": "Wyniki Okresowe" };
          }, 64149: function(t4) {
            t4.exports = { newline: "linha", delete: "excluir", space: "espaco", "Speech Recognize": "Discurso Reconhecer", Sound: "Som", "Interim Results": "Resultados Provisórios" };
          }, 16491: function(t4) {
            t4.exports = { newline: "новая строка|перенос|энтер", delete: "удалить", space: "пробел", "Speech Recognize": "Распознавание речи", Sound: "Звук", "Interim Results": "Промежуточные результаты" };
          }, 48948: function(t4) {
            t4.exports = { newline: "yeni satır", delete: "silmek", space: "uzay", "Speech Recognize": "Konuşma Tanıma", Sound: "Ses", "Interim Results": "Ara Sonuçlar" };
          }, 84370: function(t4) {
            t4.exports = { newline: "新行", delete: "删除", space: "空间", "Speech Recognize": "言语识别", Sound: "声音", "Interim Results": "中期业绩" };
          }, 56646: function(t4) {
            t4.exports = { newline: "換行", delete: "刪除", space: "空白", "Speech Recognize": "語音辨識", Sound: "聲音", "Interim Results": "階段性辨識結果" };
          }, 37873: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(37075), r2 = i3(66927), s = i3(55186), a2 = i3(56298), l = i3(84976), c = i3(71005), d2 = (i3(71096), i3(46173)), u2 = i3(50834), h2 = i3(25202);
            class p2 extends c.k {
              constructor(t5) {
                super(t5), this._commandToWord = {}, t5.o.speechRecognize.api && t5.registerButton({ group: "state", name: "speechRecognize" });
              }
              afterInit(t5) {
                const { commands: e5 } = t5.o.speechRecognize;
                e5 && ((0, a2.JW)(h2), (0, l.HP)(e5, false).forEach((i4) => {
                  i4.split("|").forEach((o4) => {
                    o4 = o4.trim().toLowerCase(), this._commandToWord[o4] = e5[i4];
                    const n3 = t5.i18n(o4);
                    n3 !== o4 && n3.split("|").forEach((t6) => {
                      this._commandToWord[t6.trim().toLowerCase()] = e5[i4].trim();
                    });
                  });
                }));
              }
              beforeDestruct(t5) {
              }
              onSpeechRecognizeProgressResult(t5) {
                this.messagePopup || (this.messagePopup = this.j.create.div("jodit-speech-recognize__popup")), this.j.workplace.appendChild(this.messagePopup), this.j.async.setTimeout(() => {
                  s.J.safeRemove(this.messagePopup);
                }, { label: "onSpeechRecognizeProgressResult", timeout: 1e3 }), this.messagePopup.innerText = t5 + "|";
              }
              onSpeechRecognizeResult(t5) {
                const { j: e5 } = this, { s: i4 } = e5;
                if (s.J.safeRemove(this.messagePopup), !this._checkCommand(t5)) {
                  const { range: o4 } = i4, n3 = i4.current();
                  if (i4.isCollapsed() && s.J.isText(n3) && s.J.isOrContains(e5.editor, n3) && n3.nodeValue) {
                    const r3 = n3.nodeValue;
                    n3.nodeValue = r3 + (/[\u00A0 ]\uFEFF*$/.test(r3) ? "" : " ") + t5, o4.setStartAfter(n3), i4.selectRange(o4), e5.synchronizeValues();
                  } else i4.insertHTML(t5);
                }
              }
              _checkCommand(t5) {
                return t5 = t5.toLowerCase().replace(/\./g, ""), !!this._commandToWord[t5] && ((0, u2.F)(this.j, this._commandToWord[t5]), true);
              }
            }
            (0, o3.Cg)([(0, r2.w)(":speechRecognizeProgressResult"), (0, n2.s)()], p2.prototype, "onSpeechRecognizeProgressResult", null), (0, o3.Cg)([(0, r2.w)(":speechRecognizeResult")], p2.prototype, "onSpeechRecognizeResult", null), d2.x.plugins.add("speech-recognize", p2);
          }, 78703: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(49989), r2 = i3.n(n2), s = i3(36115);
            s.T.prototype.spellcheck = false, o3.I.set("spellcheck", r2()), s.T.prototype.controls.spellcheck = { isActive: (t5) => t5.o.spellcheck, icon: r2(), name: "spellcheck", command: "toggleSpellcheck", tooltip: "Spellcheck" };
          }, 82602: function(t4) {
            t4.exports = { Spellcheck: "التدقيق الإملائي" };
          }, 24575: function(t4) {
            t4.exports = { Spellcheck: "Kontrola pravopisu" };
          }, 37414: function(t4) {
            t4.exports = { Spellcheck: "Rechtschreibprüfung" };
          }, 82333: function(t4) {
            t4.exports = { Spellcheck: "Corrección ortográfica" };
          }, 80124: function(t4) {
            t4.exports = { Spellcheck: "غلطیابی املایی" };
          }, 96516: function(t4) {
            t4.exports = { Spellcheck: "Oikeinkirjoituksen tarkistus" };
          }, 30965: function(t4) {
            t4.exports = { Spellcheck: "Vérification Orthographique" };
          }, 80194: function(t4) {
            t4.exports = { Spellcheck: "בדיקת איות" };
          }, 49458: function(t4) {
            t4.exports = { Spellcheck: "Helyesírás-ellenőrzés" };
          }, 8916: function(t4) {
            t4.exports = { Spellcheck: "Spellchecking" };
          }, 11995: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { ar: function() {
              return o3;
            }, cs_cz: function() {
              return n2;
            }, de: function() {
              return r2;
            }, es: function() {
              return s;
            }, fa: function() {
              return a2;
            }, fi: function() {
              return l;
            }, fr: function() {
              return c;
            }, he: function() {
              return d2;
            }, hu: function() {
              return u2;
            }, id: function() {
              return h2;
            }, it: function() {
              return p2;
            }, ja: function() {
              return f2;
            }, ko: function() {
              return g2;
            }, mn: function() {
              return m2;
            }, nl: function() {
              return b2;
            }, pl: function() {
              return _2;
            }, pt_br: function() {
              return v2;
            }, ru: function() {
              return x;
            }, tr: function() {
              return w;
            }, zh_cn: function() {
              return y2;
            }, zh_tw: function() {
              return j;
            } });
            var o3 = i3(82602), n2 = i3(24575), r2 = i3(37414), s = i3(82333), a2 = i3(80124), l = i3(96516), c = i3(30965), d2 = i3(80194), u2 = i3(49458), h2 = i3(8916), p2 = i3(43268), f2 = i3(11968), g2 = i3(12715), m2 = i3(45698), b2 = i3(40119), _2 = i3(92657), v2 = i3(68648), x = i3(70420), w = i3(98439), y2 = i3(55835), j = i3(34747);
          }, 43268: function(t4) {
            t4.exports = { Spellcheck: "Controllo ortografico" };
          }, 11968: function(t4) {
            t4.exports = { Spellcheck: "スペルチェック" };
          }, 12715: function(t4) {
            t4.exports = { Spellcheck: "맞춤법 검사" };
          }, 45698: function(t4) {
            t4.exports = { Spellcheck: "Дүрмийн алдаа шалгах" };
          }, 40119: function(t4) {
            t4.exports = { Spellcheck: "Spellingcontrole" };
          }, 92657: function(t4) {
            t4.exports = { Spellcheck: "Sprawdzanie pisowni" };
          }, 68648: function(t4) {
            t4.exports = { Spellcheck: "Verificação ortográfica" };
          }, 70420: function(t4) {
            t4.exports = { Spellcheck: "Проверка орфографии" };
          }, 98439: function(t4) {
            t4.exports = { Spellcheck: "Yazım denetimi" };
          }, 55835: function(t4) {
            t4.exports = { Spellcheck: "拼写检查" };
          }, 34747: function(t4) {
            t4.exports = { Spellcheck: "拼字檢查" };
          }, 97179: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(56298), s = i3(26150), a2 = i3(71005), l = (i3(78703), i3(11995));
            class c extends a2.k {
              constructor(t5) {
                super(t5), this.buttons = [{ group: "state", name: "spellcheck" }], (0, r2.JW)(l);
              }
              afterInit(t5) {
                t5.e.on("afterInit afterAddPlace prepareWYSIWYGEditor", this.toggleSpellcheck), this.toggleSpellcheck(), t5.registerCommand("toggleSpellcheck", () => {
                  this.jodit.o.spellcheck = !this.jodit.o.spellcheck, this.toggleSpellcheck(), this.j.e.fire("updateToolbar");
                });
              }
              toggleSpellcheck() {
                (0, s.C)(this.jodit.editor, "spellcheck", this.jodit.o.spellcheck);
              }
              beforeDestruct(t5) {
              }
            }
            (0, o3.Cg)([n2.autobind], c.prototype, "toggleSpellcheck", null), r2.fg.add("spellcheck", c);
          }, 27195: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.showCharsCounter = true, o3.T.prototype.countHTMLChars = false, o3.T.prototype.showWordsCounter = true;
          }, 65199: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(56298), s = i3(29866);
            i3(27195), r2.fg.add("stat", class extends s.k {
              constructor() {
                super(...arguments), this.charCounter = null, this.wordCounter = null, this.reInit = () => {
                  this.j.o.showCharsCounter && this.charCounter && this.j.statusbar.append(this.charCounter, true), this.j.o.showWordsCounter && this.wordCounter && this.j.statusbar.append(this.wordCounter, true), this.j.e.off("change keyup", this.calc).on("change keyup", this.calc), this.calc();
                }, this.calc = this.j.async.throttle(() => {
                  const t5 = this.j.text;
                  if (this.j.o.showCharsCounter && this.charCounter) {
                    const e5 = this.j.o.countHTMLChars ? this.j.value : t5.replace((0, o3.SPACE_REG_EXP)(), "");
                    this.charCounter.textContent = this.j.i18n("Chars: %d", e5.length);
                  }
                  this.j.o.showWordsCounter && this.wordCounter && (this.wordCounter.textContent = this.j.i18n("Words: %d", t5.replace((0, o3.INVISIBLE_SPACE_REG_EXP)(), "").split((0, o3.SPACE_REG_EXP)()).filter((t6) => t6.length).length));
                }, this.j.defaultTimeout);
              }
              afterInit() {
                this.charCounter = this.j.c.span(), this.wordCounter = this.j.c.span(), this.j.e.on("afterInit changePlace afterAddPlace", this.reInit), this.reInit();
              }
              beforeDestruct() {
                n2.J.safeRemove(this.charCounter), n2.J.safeRemove(this.wordCounter), this.j.e.off("afterInit changePlace afterAddPlace", this.reInit), this.charCounter = null, this.wordCounter = null;
              }
            });
          }, 63400: function(t4, e4, i3) {
            var o3 = i3(36115);
            o3.T.prototype.toolbarSticky = true, o3.T.prototype.toolbarDisableStickyForMobile = true, o3.T.prototype.toolbarStickyOffset = 0;
          }, 1677: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(55186), a2 = i3(56298), l = i3(65147), c = i3(29866);
            i3(63400);
            const d2 = !n2.IS_ES_NEXT && n2.IS_IE;
            class u2 extends c.k {
              constructor() {
                super(...arguments), this.__isToolbarStuck = false, this.__createDummy = (t5) => {
                  this.__dummyBox = this.j.c.div(), this.__dummyBox.classList.add("jodit_sticky-dummy_toolbar"), this.j.container.insertBefore(this.__dummyBox, t5);
                }, this.addSticky = (t5) => {
                  this.__isToolbarStuck || (d2 && !this.__dummyBox && this.__createDummy(t5), this.j.container.classList.add("jodit_sticky"), this.__isToolbarStuck = true), (0, l.css)(t5, { top: this.j.o.toolbarStickyOffset || null, width: this.j.container.offsetWidth - 2 }), this.__dummyBox && (0, l.css)(this.__dummyBox, { height: t5.offsetHeight });
                }, this.removeSticky = (t5) => {
                  this.__isToolbarStuck && ((0, l.css)(t5, { width: "", top: "" }), this.j.container.classList.remove("jodit_sticky"), this.__isToolbarStuck = false);
                };
              }
              afterInit(t5) {
                t5.e.on(t5.ow, "scroll.sticky wheel.sticky mousewheel.sticky resize.sticky", this.__onScroll).on("getStickyState.sticky", () => this.__isToolbarStuck);
              }
              __onScroll() {
                const { jodit: t5 } = this;
                if (!t5.o.toolbarSticky || !t5.o.toolbar) return;
                const e5 = t5.ow.pageYOffset || t5.od.documentElement && t5.od.documentElement.scrollTop || 0, i4 = (0, l.offset)(t5.container, t5, t5.od, true), o4 = t5.getMode() === n2.MODE_WYSIWYG && e5 + t5.o.toolbarStickyOffset > i4.top && i4.top + i4.height > e5 + t5.o.toolbarStickyOffset && !(t5.o.toolbarDisableStickyForMobile && this.__isMobile());
                if (this.__isToolbarStuck === o4) return;
                const r3 = t5.toolbarContainer;
                r3 && (o4 ? this.addSticky(r3) : this.removeSticky(r3)), t5.e.fire("toggleSticky", o4);
              }
              __isMobile() {
                const { j: t5 } = this;
                return t5 && t5.options && t5.container && t5.options.sizeSM >= t5.container.offsetWidth;
              }
              beforeDestruct(t5) {
                s.J.safeRemove(this.__dummyBox), t5.e.off(t5.ow, "scroll.sticky wheel.sticky mousewheel.sticky resize.sticky", this.__onScroll).off(".sticky");
              }
            }
            (0, o3.Cg)([(0, r2.throttle)()], u2.prototype, "__onScroll", null), a2.fg.add("sticky", u2);
          }, 61964: function(t4, e4, i3) {
            var o3 = i3(931), n2 = i3(81875), r2 = i3.n(n2), s = i3(36115);
            s.T.prototype.usePopupForSpecialCharacters = false, s.T.prototype.specialCharacters = ["!", "&quot;", "#", "$", "%", "&amp;", "'", "(", ")", "*", "+", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ":", ";", "&lt;", "=", "&gt;", "?", "@", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "[", "]", "^", "_", "`", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "{", "|", "}", "~", "&euro;", "&lsquo;", "&rsquo;", "&ldquo;", "&rdquo;", "&ndash;", "&mdash;", "&iexcl;", "&cent;", "&pound;", "&curren;", "&yen;", "&brvbar;", "&sect;", "&uml;", "&copy;", "&ordf;", "&laquo;", "&raquo;", "&not;", "&reg;", "&macr;", "&deg;", "&sup2;", "&sup3;", "&acute;", "&micro;", "&para;", "&middot;", "&cedil;", "&sup1;", "&ordm;", "&frac14;", "&frac12;", "&frac34;", "&iquest;", "&Agrave;", "&Aacute;", "&Acirc;", "&Atilde;", "&Auml;", "&Aring;", "&AElig;", "&Ccedil;", "&Egrave;", "&Eacute;", "&Ecirc;", "&Euml;", "&Igrave;", "&Iacute;", "&Icirc;", "&Iuml;", "&ETH;", "&Ntilde;", "&Ograve;", "&Oacute;", "&Ocirc;", "&Otilde;", "&Ouml;", "&times;", "&Oslash;", "&Ugrave;", "&Uacute;", "&Ucirc;", "&Uuml;", "&Yacute;", "&THORN;", "&szlig;", "&agrave;", "&aacute;", "&acirc;", "&atilde;", "&auml;", "&aring;", "&aelig;", "&ccedil;", "&egrave;", "&eacute;", "&ecirc;", "&euml;", "&igrave;", "&iacute;", "&icirc;", "&iuml;", "&eth;", "&ntilde;", "&ograve;", "&oacute;", "&ocirc;", "&otilde;", "&ouml;", "&divide;", "&oslash;", "&ugrave;", "&uacute;", "&ucirc;", "&uuml;", "&yacute;", "&thorn;", "&yuml;", "&OElig;", "&oelig;", "&#372;", "&#374", "&#373", "&#375;", "&sbquo;", "&#8219;", "&bdquo;", "&hellip;", "&trade;", "&#9658;", "&bull;", "&rarr;", "&rArr;", "&hArr;", "&diams;", "&asymp;"], o3.I.set("symbols", r2()), s.T.prototype.controls.symbols = { hotkeys: ["ctrl+shift+i", "cmd+shift+i"], tooltip: "Insert Special Character", popup: (t5, e5, i4) => {
              const o4 = t5.e.fire("generateSpecialCharactersTable.symbols");
              if (o4) {
                if (t5.o.usePopupForSpecialCharacters) {
                  const e6 = t5.c.div();
                  return e6.classList.add("jodit-symbols"), e6.appendChild(o4), t5.e.on(o4, "close_dialog", i4), e6;
                }
                {
                  t5.alert(o4, "Select Special Character", void 0, "jodit-symbols").bindDestruct(t5);
                  const e6 = o4.querySelector("a");
                  e6 && e6.focus();
                }
              }
            } };
          }, 37605: function(t4) {
            t4.exports = { symbols: "رمز" };
          }, 4726: function(t4) {
            t4.exports = { symbols: "symbol" };
          }, 68349: function(t4) {
            t4.exports = { symbols: "Symbol" };
          }, 88146: function(t4) {
            t4.exports = { symbols: "Símbolo" };
          }, 11799: function(t4) {
            t4.exports = { symbols: "سمبل" };
          }, 1311: function(t4) {
            t4.exports = { symbols: "Symbolit" };
          }, 96282: function(t4) {
            t4.exports = { symbols: "caractère" };
          }, 87809: function(t4) {
            t4.exports = { symbols: "תו מיוחד" };
          }, 60817: function(t4) {
            t4.exports = { symbols: "Szimbólum" };
          }, 48207: function(t4) {
            t4.exports = { symbols: "simbol" };
          }, 84182: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { ar: function() {
              return o3;
            }, cs_cz: function() {
              return n2;
            }, de: function() {
              return r2;
            }, es: function() {
              return s;
            }, fa: function() {
              return a2;
            }, fi: function() {
              return l;
            }, fr: function() {
              return c;
            }, he: function() {
              return d2;
            }, hu: function() {
              return u2;
            }, id: function() {
              return h2;
            }, it: function() {
              return p2;
            }, ja: function() {
              return f2;
            }, ko: function() {
              return g2;
            }, mn: function() {
              return m2;
            }, nl: function() {
              return b2;
            }, pl: function() {
              return _2;
            }, pt_br: function() {
              return v2;
            }, ru: function() {
              return x;
            }, tr: function() {
              return w;
            }, zh_cn: function() {
              return y2;
            }, zh_tw: function() {
              return j;
            } });
            var o3 = i3(37605), n2 = i3(4726), r2 = i3(68349), s = i3(88146), a2 = i3(11799), l = i3(1311), c = i3(96282), d2 = i3(87809), u2 = i3(60817), h2 = i3(48207), p2 = i3(1663), f2 = i3(37107), g2 = i3(73948), m2 = i3(12333), b2 = i3(82556), _2 = i3(56114), v2 = i3(47321), x = i3(9407), w = i3(98376), y2 = i3(47238), j = i3(72386);
          }, 1663: function(t4) {
            t4.exports = { symbols: "Simbolo" };
          }, 37107: function(t4) {
            t4.exports = { symbols: "symbol" };
          }, 73948: function(t4) {
            t4.exports = { symbols: "기호" };
          }, 12333: function(t4) {
            t4.exports = { symbols: "тэмдэгт" };
          }, 82556: function(t4) {
            t4.exports = { symbols: "symbool" };
          }, 56114: function(t4) {
            t4.exports = { symbols: "symbol" };
          }, 47321: function(t4) {
            t4.exports = { symbols: "Símbolo" };
          }, 9407: function(t4) {
            t4.exports = { symbols: "символ" };
          }, 98376: function(t4) {
            t4.exports = { symbols: "Sembol" };
          }, 47238: function(t4) {
            t4.exports = { symbols: "符号" };
          }, 72386: function(t4) {
            t4.exports = { symbols: "符號" };
          }, 35541: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(56298), s = i3(97369), a2 = i3(29866), l = (i3(61964), i3(84182));
            r2.fg.add("symbols", class extends a2.k {
              constructor(t5) {
                super(t5), this.buttons = [{ name: "symbols", group: "insert" }], this.countInRow = 17, (0, r2.JW)(l);
              }
              afterInit(t5) {
                t5.e.on("generateSpecialCharactersTable.symbols", () => {
                  const e5 = t5.c.fromHTML('<div class="jodit-symbols__container">\n						<div class="jodit-symbols__container_table">\n							<table class="jodit-symbols__table"><tbody></tbody></table>\n						</div>\n						<div class="jodit-symbols__container_preview">\n							<div class="jodit-symbols__preview"></div>\n						</div>\n					</div>'), i4 = e5.querySelector(".jodit-symbols__preview"), r3 = e5.querySelector("table").tBodies[0], a3 = [];
                  for (let e6 = 0; t5.o.specialCharacters.length > e6; ) {
                    const i5 = t5.c.element("tr");
                    for (let o4 = 0; this.countInRow > o4 && t5.o.specialCharacters.length > e6; o4 += 1, e6 += 1) {
                      const n3 = t5.c.element("td"), r4 = t5.c.fromHTML(`<a
									data-index="${e6}"
									data-index-j="${o4}"
									role="option"
									tabindex="-1"
							>${t5.o.specialCharacters[e6]}</a>`);
                      a3.push(r4), n3.appendChild(r4), i5.appendChild(n3);
                    }
                    r3.appendChild(i5);
                  }
                  const l2 = this;
                  return t5.e.on(a3, "focus", function() {
                    i4.innerHTML = this.innerHTML;
                  }).on(a3, "mousedown", function(e6) {
                    n2.J.isTag(this, "a") && (t5.s.focus(), t5.s.insertHTML(this.innerHTML), t5.e.fire(this, "close_dialog"), e6 && e6.preventDefault(), e6 && e6.stopImmediatePropagation());
                  }).on(a3, "mouseenter", function() {
                    n2.J.isTag(this, "a") && this.focus();
                  }).on(a3, "keydown", (e6) => {
                    const i5 = e6.target;
                    if (n2.J.isTag(i5, "a")) {
                      const n3 = parseInt((0, s.attr)(i5, "-index") || "0", 10), r4 = parseInt((0, s.attr)(i5, "data-index-j") || "0", 10);
                      let c;
                      switch (e6.key) {
                        case o3.KEY_UP:
                        case o3.KEY_DOWN:
                          c = e6.key === o3.KEY_UP ? n3 - l2.countInRow : n3 + l2.countInRow, void 0 === a3[c] && (c = e6.key === o3.KEY_UP ? Math.floor(a3.length / l2.countInRow) * l2.countInRow + r4 : r4, c > a3.length - 1 && (c -= l2.countInRow)), a3[c] && a3[c].focus();
                          break;
                        case o3.KEY_RIGHT:
                        case o3.KEY_LEFT:
                          c = e6.key === o3.KEY_LEFT ? n3 - 1 : n3 + 1, void 0 === a3[c] && (c = e6.key === o3.KEY_LEFT ? a3.length - 1 : 0), a3[c] && a3[c].focus();
                          break;
                        case o3.KEY_ENTER:
                          t5.e.fire(i5, "mousedown"), e6.stopImmediatePropagation(), e6.preventDefault();
                      }
                    }
                  }), e5;
                });
              }
              beforeDestruct(t5) {
                t5.e.off("generateSpecialCharactersTable.symbols");
              }
            });
          }, 48840: function(t4, e4, i3) {
            i3.d(e4, { O: function() {
              return o3.O;
            } });
            var o3 = i3(86572);
          }, 86572: function(t4, e4, i3) {
            i3.d(e4, { O: function() {
              return n2;
            } });
            var o3 = i3(55186);
            function n2(t5, e5 = false) {
              if (!t5.o.tab.tabInsideLiInsertNewList) return false;
              const [i4, n3] = function(t6) {
                const e6 = t6.createInside.fake(), i5 = t6.createInside.fake(), o4 = t6.s.range.cloneRange();
                o4.collapse(true), o4.insertNode(e6);
                const n4 = t6.s.range.cloneRange();
                return n4.collapse(false), n4.insertNode(i5), [e6, i5];
              }(t5);
              try {
                const n4 = function(t6, e6, i5) {
                  const n5 = o3.J.closest(e6, "li", t6.editor);
                  return !!n5 && !(!i5 && !o3.J.isLeaf(n5.previousElementSibling)) && !(i5 && !o3.J.closest(n5, "li", t6.editor)) && n5;
                }(t5, i4, e5);
                if (!n4) return false;
                if (!function(t6, e6, i5) {
                  const n5 = o3.J.closest(i5, "li", e6.editor);
                  return !(!n5 || n5 !== t6 && !t6.contains(n5));
                }(n4, t5, i4)) return false;
                const r2 = o3.J.closest(n4, ["ol", "ul"], t5.editor);
                return !(!r2 || e5 && !o3.J.closest(r2, "li", t5.editor) || (e5 ? function(t6, e6, i5) {
                  const n5 = o3.J.closest(e6, "li", t6.editor), r3 = Array.from(e6.children).filter((t7) => o3.J.isLeaf(t7));
                  o3.J.after(n5, i5);
                  const s = r3.indexOf(i5);
                  if (0 !== s && 1 !== r3.length || o3.J.safeRemove(e6), s !== r3.length - 1) {
                    const t7 = e6.cloneNode();
                    o3.J.append(i5, t7);
                    for (let e7 = s + 1; r3.length > e7; e7 += 1) o3.J.append(t7, r3[e7]);
                  }
                }(t5, r2, n4) : function(t6, e6, i5) {
                  const n5 = i5.previousElementSibling, r3 = n5.lastElementChild, s = o3.J.isTag(r3, e6.tagName) ? r3 : t6.createInside.element(e6.tagName, Array.from(e6.attributes).reduce((t7, e7) => (t7[e7.name] = e7.value, t7), {}));
                  s.appendChild(i5), r3 !== s && n5.appendChild(s);
                }(t5, r2, n4), 0));
              } finally {
                const e6 = t5.s.createRange();
                e6.setStartAfter(i4), e6.setEndBefore(n3), t5.s.selectRange(e6), o3.J.safeRemove(i4), o3.J.safeRemove(n3);
              }
              return false;
            }
            i3(28712);
          }, 50974: function(t4, e4, i3) {
            i3(36115).T.prototype.tab = { tabInsideLiInsertNewList: true };
          }, 59965: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(17352), r2 = i3(22664), s = i3(56298), a2 = i3(71005), l = (i3(50974), i3(48840));
            class c extends a2.k {
              afterInit(t5) {
              }
              __onTab(t5) {
                if (t5.key === n2.KEY_TAB && this.__onShift(t5.shiftKey)) return false;
              }
              __onCommand(t5) {
                if (("indent" === t5 || "outdent" === t5) && this.__onShift("outdent" === t5)) return false;
              }
              __onShift(t5) {
                const e5 = (0, l.O)(this.j, t5);
                return e5 && this.j.e.fire("afterTab", t5), e5;
              }
              beforeDestruct(t5) {
              }
            }
            (0, o3.Cg)([(0, r2.watch)(":keydown.tab")], c.prototype, "__onTab", null), (0, o3.Cg)([(0, r2.watch)(":beforeCommand.tab")], c.prototype, "__onCommand", null), s.fg.add("tab", c);
          }, 2533: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(55186), r2 = i3(56298), s = i3(65147), a2 = i3(11648);
            const l = /* @__PURE__ */ new Set([o3.KEY_TAB, o3.KEY_LEFT, o3.KEY_RIGHT, o3.KEY_UP, o3.KEY_DOWN]);
            r2.fg.add("tableKeyboardNavigation", function(t5) {
              t5.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation", (e5) => {
                const { key: i4 } = e5;
                if (!l.has(i4)) return;
                const r3 = t5.s.current();
                if (!r3) return;
                const c = n2.J.up(r3, n2.J.isCell, t5.editor);
                if (!c) return;
                const { range: d2 } = t5.s;
                if (i4 !== o3.KEY_TAB && r3 !== c) {
                  const t6 = i4 === o3.KEY_RIGHT || i4 === o3.KEY_DOWN, e6 = (0, s.call)(t6 ? n2.J.next : n2.J.prev, r3, (t7) => i4 === o3.KEY_UP || i4 === o3.KEY_DOWN ? n2.J.isTag(t7, "br") : Boolean(t7), c);
                  if (!t6 && (e6 || i4 !== o3.KEY_UP && n2.J.isText(r3) && 0 !== d2.startOffset) || t6 && (e6 || i4 !== o3.KEY_DOWN && n2.J.isText(r3) && r3.nodeValue && d2.startOffset !== r3.nodeValue.length)) return;
                }
                const u2 = t5.getInstance(a2.X, t5.o), h2 = n2.J.closest(c, "table", t5.editor);
                let p2 = null;
                const f2 = i4 === o3.KEY_LEFT || e5.shiftKey, g2 = () => (0, s.call)(f2 ? n2.J.prev : n2.J.next, c, n2.J.isCell, h2);
                switch (i4) {
                  case o3.KEY_TAB:
                  case o3.KEY_LEFT:
                    p2 = g2(), p2 || (u2.appendRow(h2, !!f2 && h2.querySelector("tr"), !f2), p2 = g2());
                    break;
                  case o3.KEY_UP:
                  case o3.KEY_DOWN: {
                    const t6 = u2.formalMatrix(h2), [e6, n3] = u2.formalCoordinate(h2, c);
                    i4 === o3.KEY_UP ? void 0 !== t6[e6 - 1] && (p2 = t6[e6 - 1][n3]) : void 0 !== t6[e6 + 1] && (p2 = t6[e6 + 1][n3]);
                  }
                }
                if (p2) {
                  if (t5.e.fire("hidePopup hideResizer"), p2.firstChild) i4 === o3.KEY_TAB ? t5.s.select(p2, true) : t5.s.setCursorIn(p2, i4 === o3.KEY_RIGHT || i4 === o3.KEY_DOWN);
                  else {
                    const e6 = t5.createInside.element("br");
                    p2.appendChild(e6), t5.s.setCursorBefore(e6);
                  }
                  return t5.synchronizeValues(), false;
                }
              });
            });
          }, 94291: function(t4, e4, i3) {
            var o3 = i3(71842), n2 = i3(65147), r2 = i3(97369), s = i3(931), a2 = i3(67447), l = i3.n(a2), c = i3(36115);
            c.T.prototype.table = { selectionCellStyle: "border: 1px double #1e88e5 !important;", useExtraClassesOptions: false }, s.I.set("table", l()), c.T.prototype.controls.table = { data: { cols: 10, rows: 10, classList: { "table table-bordered": "Bootstrap Bordered", "table table-striped": "Bootstrap Striped", "table table-dark": "Bootstrap Dark" } }, popup: (t5, e5, i4, s2) => {
              const a3 = s2.control, l2 = a3.data && a3.data.rows ? a3.data.rows : 10, c2 = a3.data && a3.data.cols ? a3.data.cols : 10, d2 = t5.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">' + (() => {
                if (!t5.o.table.useExtraClassesOptions) return "";
                const e6 = [];
                if (a3.data) {
                  const t6 = a3.data.classList;
                  Object.keys(t6).forEach((i5) => {
                    e6.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${i5}" type="checkbox"/>${t6[i5]}</label>`);
                  });
                }
                return e6.join("");
              })() + '</div></div><label class="jodit-form__center"><span>1</span> &times; <span>1</span></label></form>'), u2 = d2.querySelectorAll("span")[0], h2 = d2.querySelectorAll("span")[1], p2 = d2.querySelector(".jodit-form__container"), f2 = d2.querySelector(".jodit-form__options"), g2 = [], m2 = l2 * c2;
              for (let e6 = 0; m2 > e6; e6 += 1) g2[e6] || g2.push(t5.c.element("span", { dataIndex: e6 }));
              if (t5.e.on(p2, "mousemove", (t6, e6) => {
                const i5 = t6.target;
                if (!o3.J.isTag(i5, "span")) return;
                const n3 = void 0 === e6 || isNaN(e6) ? parseInt((0, r2.attr)(i5, "-index") || "0", 10) : e6 || 0, s3 = Math.ceil((n3 + 1) / c2), a4 = n3 % c2 + 1;
                for (let t7 = 0; g2.length > t7; t7 += 1) g2[t7].className = t7 % c2 + 1 > a4 || s3 < Math.ceil((t7 + 1) / c2) ? "" : "jodit_hovered";
                h2.textContent = a4.toString(), u2.textContent = s3.toString();
              }).on(p2, "touchstart mousedown", (e6) => {
                const s3 = e6.target;
                if (e6.preventDefault(), e6.stopImmediatePropagation(), !o3.J.isTag(s3, "span")) return;
                const a4 = parseInt((0, r2.attr)(s3, "-index") || "0", 10), l3 = Math.ceil((a4 + 1) / c2), d3 = a4 % c2 + 1, u3 = t5.createInside, h3 = u3.element("tbody"), p3 = u3.element("table");
                p3.appendChild(h3);
                let g3, m3, b2 = null;
                for (let t6 = 1; l3 >= t6; t6 += 1) {
                  g3 = u3.element("tr");
                  for (let t7 = 1; d3 >= t7; t7 += 1) m3 = u3.element("td"), b2 || (b2 = m3), (0, n2.css)(m3, "width", (100 / d3).toFixed(4) + "%"), m3.appendChild(u3.element("br")), g3.appendChild(u3.text("\n")), g3.appendChild(u3.text("	")), g3.appendChild(m3);
                  h3.appendChild(u3.text("\n")), h3.appendChild(g3);
                }
                (0, n2.$$)("input[type=checkbox]:checked", f2).forEach((t6) => {
                  t6.value.split(/[\s]+/).forEach((t7) => {
                    p3.classList.add(t7);
                  });
                }), t5.editor.firstChild && t5.s.insertNode(u3.text("\n"), false, false), t5.s.insertNode(p3, false), b2 && (t5.s.setCursorIn(b2), (0, n2.scrollIntoViewIfNeeded)(b2, t5.editor, t5.ed)), i4();
              }), s2 && s2.parentElement) {
                for (let e6 = 0; l2 > e6; e6 += 1) {
                  const i5 = t5.c.div();
                  for (let t6 = 0; c2 > t6; t6 += 1) i5.appendChild(g2[e6 * c2 + t6]);
                  p2.appendChild(i5);
                }
                g2[0] && (g2[0].className = "hovered");
              }
              return d2;
            }, tooltip: "Insert table" };
          }, 76385: function(t4, e4, i3) {
            var o3 = i3(56298);
            i3(94291), o3.fg.add("table", function(t5) {
              t5.registerButton({ name: "table", group: "insert" });
            });
          }, 31686: function(t4, e4, i3) {
            var o3 = i3(65147), n2 = i3(35265), r2 = i3(20703), s = i3(931), a2 = i3(16116), l = i3(36339), c = i3.n(l), d2 = i3(36115);
            s.I.set("video", c()), d2.T.prototype.controls.video = { popup: (t5, e5, i4) => {
              const s2 = new r2.XV(t5, [new r2.Yh(t5, [new r2.tS(t5, { name: "url", required: true, label: "URL", placeholder: "https://", validators: ["url"] })]), new r2.Yh(t5, [(0, n2.$n)(t5, "", "Insert", "primary").onAction(() => s2.submit())])]), l2 = new r2.XV(t5, [new r2.Yh(t5, [new r2.F0(t5, { name: "code", required: true, label: "Embed code" })]), new r2.Yh(t5, [(0, n2.$n)(t5, "", "Insert", "primary").onAction(() => l2.submit())])]), c2 = [], d3 = (e6) => {
                t5.s.restore(), t5.s.insertHTML(e6), i4();
              };
              return t5.s.save(), c2.push({ icon: "link", name: "Link", content: s2.container }, { icon: "source", name: "Code", content: l2.container }), s2.onSubmit((t6) => {
                d3((0, o3.convertMediaUrlToVideoEmbed)(t6.url));
              }), l2.onSubmit((t6) => {
                d3(t6.code);
              }), (0, a2.Zg)(t5, c2);
            }, tags: ["iframe"], tooltip: "Insert youtube/vimeo video" };
          }, 38309: function(t4, e4, i3) {
            var o3 = i3(56298);
            i3(31686), o3.fg.add("video", function(t5) {
              t5.registerButton({ name: "video", group: "media" });
            });
          }, 2805: function(t4, e4, i3) {
            i3(36115).T.prototype.wrapNodes = { exclude: /* @__PURE__ */ new Set(["hr", "style", "br"]), emptyBlockAfterInit: true };
          }, 14367: function(t4, e4, i3) {
            var o3 = i3(31635), n2 = i3(22664), r2 = i3(71842), s = i3(56298), a2 = i3(98253), l = i3(71005);
            i3(2805);
            class c extends l.k {
              constructor() {
                super(...arguments), this.isSuitableStart = (t5) => {
                  var e5;
                  return r2.J.isText(t5) && (0, a2.K)(t5.nodeValue) && (/[^\s]/.test(t5.nodeValue) || (null === (e5 = t5.parentNode) || void 0 === e5 ? void 0 : e5.firstChild) === t5 && this.isSuitable(t5.nextSibling)) || this.isNotWrapped(t5) && !r2.J.isTemporary(t5);
                }, this.isSuitable = (t5) => r2.J.isText(t5) || this.isNotWrapped(t5), this.isNotWrapped = (t5) => r2.J.isElement(t5) && !(r2.J.isBlock(t5) || r2.J.isTag(t5, this.j.o.wrapNodes.exclude));
              }
              afterInit(t5) {
                "br" !== t5.o.enter.toLowerCase() && t5.e.on("drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn", this.preprocessInput, { top: true }).on("afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn", this.postProcessSetEditorValue);
              }
              beforeDestruct(t5) {
                t5.e.off(".wtn");
              }
              postProcessSetEditorValue() {
                const { jodit: t5 } = this;
                if (!t5.isEditorMode()) return;
                let e5 = t5.editor.firstChild, i4 = false;
                for (; e5; ) {
                  if (e5 = d2(e5, t5), this.isSuitableStart(e5)) {
                    i4 || t5.s.save(), i4 = true;
                    const o4 = t5.createInside.element(t5.o.enter);
                    for (r2.J.before(e5, o4); e5 && this.isSuitable(e5); ) {
                      const t6 = e5.nextSibling;
                      o4.appendChild(e5), e5 = t6;
                    }
                    o4.normalize(), e5 = o4;
                  }
                  e5 = e5 && e5.nextSibling;
                }
                i4 && (t5.s.restore(), "afterInit" === t5.e.current && t5.e.fire("internalChange"));
              }
              preprocessInput() {
                const { jodit: t5 } = this, e5 = "afterInit" === t5.e.current;
                if (!t5.isEditorMode() || t5.editor.firstChild || !t5.o.wrapNodes.emptyBlockAfterInit && e5) return;
                const i4 = t5.createInside.element(t5.o.enter), o4 = t5.createInside.element("br");
                r2.J.append(i4, o4), r2.J.append(t5.editor, i4), t5.s.isFocused() && t5.s.setCursorBefore(o4), t5.e.fire("internalChange");
              }
            }
            function d2(t5, e5) {
              let i4 = t5, o4 = t5;
              do {
                if (!r2.J.isElement(o4) || !r2.J.isLeaf(o4) || r2.J.isList(o4.parentElement)) break;
                {
                  const t6 = r2.J.findNotEmptySibling(o4, false);
                  r2.J.isTag(i4, "ul") ? i4.appendChild(o4) : i4 = r2.J.wrap(o4, "ul", e5.createInside), o4 = t6;
                }
              } while (o4);
              return i4;
            }
            (0, o3.Cg)([n2.autobind], c.prototype, "postProcessSetEditorValue", null), (0, o3.Cg)([n2.autobind], c.prototype, "preprocessInput", null), s.fg.add("wrapNodes", c);
          }, 88850: function(t4, e4, i3) {
            i3(36115).T.prototype.showXPathInStatusbar = true;
          }, 36133: function(t4, e4, i3) {
            var o3 = i3(17352), n2 = i3(71842), r2 = i3(56298), s = i3(65147), a2 = i3(71005), l = i3(34248), c = i3(8809);
            i3(88850), r2.fg.add("xpath", class extends a2.k {
              constructor() {
                super(...arguments), this.onContext = (t5, e5) => (this.menu || (this.menu = new l.t(this.j)), this.menu.show(e5.clientX, e5.clientY, [{ icon: "bin", title: t5 === this.j.editor ? "Clear" : "Remove", exec: () => {
                  t5 !== this.j.editor ? n2.J.safeRemove(t5) : this.j.value = "", this.j.synchronizeValues();
                } }, { icon: "select-all", title: "Select", exec: () => {
                  this.j.s.select(t5);
                } }]), false), this.onSelectPath = (t5, e5) => {
                  this.j.s.focus();
                  const i4 = (0, s.attr)(e5.target, "-path") || "/";
                  if ("/" === i4) return this.j.execCommand("selectall"), false;
                  try {
                    const t6 = this.j.ed.evaluate(i4, this.j.editor, null, XPathResult.ANY_TYPE, null).iterateNext();
                    if (t6) return this.j.s.select(t6), false;
                  } catch (t6) {
                  }
                  return this.j.s.select(t5), false;
                }, this.tpl = (t5, e5, i4, o4) => {
                  const n3 = this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${e5}" title="${o4}" tabindex="-1"'>${(0, s.trim)(i4)}</a></span>`), r3 = n3.firstChild;
                  return this.j.e.on(r3, "click", this.onSelectPath.bind(this, t5)).on(r3, "contextmenu", this.onContext.bind(this, t5)), n3;
                }, this.removeSelectAll = () => {
                  this.selectAllButton && (this.selectAllButton.destruct(), delete this.selectAllButton);
                }, this.appendSelectAll = () => {
                  this.removeSelectAll(), this.selectAllButton = (0, c.BJ)(this.j, { name: "selectall", ...this.j.o.controls.selectall }), this.selectAllButton.state.size = "tiny", this.container && this.container.insertBefore(this.selectAllButton.container, this.container.firstChild);
                }, this.calcPathImd = () => {
                  if (this.isDestructed) return;
                  const t5 = this.j.s.current();
                  if (this.container && (this.container.innerHTML = o3.INVISIBLE_SPACE), t5) {
                    let e5, i4, o4;
                    n2.J.up(t5, (t6) => {
                      !t6 || this.j.editor === t6 || n2.J.isText(t6) || n2.J.isComment(t6) || (e5 = t6.nodeName.toLowerCase(), i4 = (0, s.getXPathByElement)(t6, this.j.editor).replace(/^\//, ""), o4 = this.tpl(t6, i4, e5, this.j.i18n("Select %s", e5)), this.container && this.container.insertBefore(o4, this.container.firstChild));
                    }, this.j.editor);
                  }
                  this.appendSelectAll();
                }, this.calcPath = this.j.async.debounce(this.calcPathImd, 2 * this.j.defaultTimeout);
              }
              afterInit() {
                this.j.o.showXPathInStatusbar && (this.container = this.j.c.div("jodit-xpath"), this.j.e.off(".xpath").on("mouseup.xpath change.xpath keydown.xpath changeSelection.xpath", this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath", () => {
                  this.j.o.showXPathInStatusbar && this.container && (this.j.statusbar.append(this.container), this.j.getRealMode() === o3.MODE_WYSIWYG ? this.calcPath() : (this.container && (this.container.innerHTML = o3.INVISIBLE_SPACE), this.appendSelectAll()));
                }), this.calcPath());
              }
              beforeDestruct() {
                this.j && this.j.events && this.j.e.off(".xpath"), this.removeSelectAll(), this.menu && this.menu.destruct(), n2.J.safeRemove(this.container), delete this.menu, delete this.container;
              }
            });
          }, 79721: function(t4, e4, i3) {
            i3.r(e4), i3.d(e4, { angle_down: function() {
              return n2.a;
            }, angle_left: function() {
              return s.a;
            }, angle_right: function() {
              return l.a;
            }, angle_up: function() {
              return d2.a;
            }, bin: function() {
              return h2.a;
            }, cancel: function() {
              return f2.a;
            }, center: function() {
              return m2.a;
            }, check: function() {
              return _2.a;
            }, chevron: function() {
              return x.a;
            }, dots: function() {
              return y2.a;
            }, eye: function() {
              return k2.a;
            }, file: function() {
              return S2.a;
            }, folder: function() {
              return T2.a;
            }, info_circle: function() {
              return I2.a;
            }, left: function() {
              return L2.a;
            }, lock: function() {
              return P2.a;
            }, ok: function() {
              return N2.a;
            }, pencil: function() {
              return D2.a;
            }, plus: function() {
              return O2.a;
            }, resize_handler: function() {
              return H4.a;
            }, right: function() {
              return V2.a;
            }, save: function() {
              return U2.a;
            }, settings: function() {
              return Y.a;
            }, unlock: function() {
              return G.a;
            }, update: function() {
              return Z2.a;
            }, upload: function() {
              return tt.a;
            }, valign: function() {
              return it.a;
            } });
            var o3 = i3(88497), n2 = i3.n(o3), r2 = i3(91882), s = i3.n(r2), a2 = i3(14305), l = i3.n(a2), c = i3(58446), d2 = i3.n(c), u2 = i3(39858), h2 = i3.n(u2), p2 = i3(70881), f2 = i3.n(p2), g2 = i3(60636), m2 = i3.n(g2), b2 = i3(32013), _2 = i3.n(b2), v2 = i3(45512), x = i3.n(v2), w = i3(80347), y2 = i3.n(w), j = i3(95134), k2 = i3.n(j), C2 = i3(70697), S2 = i3.n(C2), z2 = i3(49983), T2 = i3.n(z2), E2 = i3(98964), I2 = i3.n(E2), A2 = i3(8136), L2 = i3.n(A2), M2 = i3(94806), P2 = i3.n(M2), R2 = i3(31365), N2 = i3.n(R2), B3 = i3(44636), D2 = i3.n(B3), q2 = i3(36327), O2 = i3.n(q2), J = i3(53328), H4 = i3.n(J), F2 = i3(98711), V2 = i3.n(F2), W = i3(53808), U2 = i3.n(W), $ = i3(20784), Y = i3.n($), K = i3(70999), G = i3.n(K), X = i3(45244), Z2 = i3.n(X), Q2 = i3(99876), tt = i3.n(Q2), et = i3(14006), it = i3.n(et);
          }, 57741: function(t4) {
            t4.exports.default = ["إبدأ في الكتابة...", "حول جوديت", "محرر جوديت", "دليل مستخدم جوديت", "يحتوي على مساعدة مفصلة للاستخدام", "للحصول على معلومات حول الترخيص، يرجى الذهاب لموقعنا:", "شراء النسخة الكاملة", "حقوق الطبع والنشر © XDSoft.net - Chupurnov Valeriy. كل الحقوق محفوظة.", "مِرْساة", "فتح في نافذة جديدة", "فتح المحرر في الحجم الكامل", "مسح التنسيق", "ملء اللون أو تعيين لون النص", "إعادة", "تراجع", "عريض", "مائل", "إدراج قائمة غير مرتبة", "إدراج قائمة مرتبة", "محاذاة للوسط", "محاذاة مثبتة", "محاذاة لليسار", "محاذاة لليمين", "إدراج خط أفقي", "إدراج صورة", "ادخال الملف", "إدراج فيديو يوتيوب/فيميو ", "إدراج رابط", "حجم الخط", "نوع الخط", "إدراج كتلة تنسيق", "عادي", "عنوان 1", "عنوان 2", "عنوان 3", "عنوان 4", "إقتباس", "كود", "إدراج", "إدراج جدول", "تقليل المسافة البادئة", "زيادة المسافة البادئة", "تحديد أحرف خاصة", "إدراج حرف خاص", "تنسيق الرسم", "تغيير الوضع", "هوامش", "أعلى", "يمين", "أسفل", "يسار", "الأنماط", "الطبقات", "محاذاة", "اليمين", "الوسط", "اليسار", "--غير مضبوط--", "Src", "العنوان", "العنوان البديل", "الرابط", "افتح الرابط في نافذة جديدة", "الصورة", "ملف", "متقدم", "خصائص الصورة", "إلغاء", "حسنا", "متصفح الملفات", "حدث خطأ في تحميل القائمة ", "حدث خطأ في تحميل المجلدات", "هل أنت واثق؟", "أدخل اسم المجلد", "إنشاء مجلد", "أكتب إسم", "إسقاط صورة", "إسقاط الملف", "أو أنقر", "النص البديل", "رفع", "تصفح", "الخلفية", "نص", "أعلى", "الوسط", "الأسفل", "إدراج عمود قبل", "إدراج عمود بعد", "إدراج صف أعلى", "إدراج صف أسفل", "حذف الجدول", "حذف الصف", "حذف العمود", "خلية فارغة", "%d حرف", "%d كلام", "اضرب من خلال", "أكد", "حرف فوقي", "مخطوطة", "قطع الاختيار", "اختر الكل", "استراحة", "البحث عن", "استبدل ب", "محل", "معجون", "اختر محتوى للصق", "مصدر", "بالخط العريض", "مائل", "شغل", "صلة", "إلغاء", "كرر", "طاولة", "صورة", "نظيف", "فقرة", "حجم الخط", "فيديو", "الخط", "حول المحرر", "طباعة", "أكد", "شطب", "المسافة البادئة", "نتوء", "ملء الشاشة", "الحجم التقليدي", "الخط", "قائمة", "قائمة مرقمة", "قطع", "اختر الكل", "قانون", "فتح الرابط", "تعديل الرابط", "سمة Nofollow", "إزالة الرابط", "تحديث", "لتحرير", "مراجعة", "URL", "تحرير", "محاذاة أفقية", "فلتر", "عن طريق التغيير", "بالاسم", "حسب الحجم", "إضافة مجلد", "إعادة", "احتفظ", "حفظ باسم", "تغيير الحجم", "حجم القطع", "عرض", "ارتفاع", "حافظ على النسب", "أن", "لا", "حذف", "تميز", "تميز %s", "محاذاة عمودية", "انشق، مزق", "اذهب", "أضف العمود", "اضف سطر", "رخصة %s", "حذف", "انقسام عمودي", "تقسيم أفقي", "الحدود", "يشبه الكود الخاص بك HTML. تبقي كما HTML؟", "الصق ك HTML", "احتفظ", "إدراج كنص", "إدراج النص فقط", "يمكنك فقط تحرير صورك الخاصة. تحميل هذه الصورة على المضيف؟", "تم تحميل الصورة بنجاح على الخادم!", "لوحة", "لا توجد ملفات في هذا الدليل.", "إعادة تسمية", "أدخل اسم جديد", "معاينة", "تحميل", "لصق من الحافظة", "متصفحك لا يدعم إمكانية الوصول المباشر إلى الحافظة.", "نسخ التحديد", "نسخ", "دائرة نصف قطرها الحدود", "عرض كل", "تطبيق", "يرجى ملء هذا المجال", "يرجى إدخال عنوان ويب", "الافتراضي", "دائرة", "نقطة", "المربعة", "البحث", "تجد السابقة", "تجد التالي", "للصق المحتوى قادم من Microsoft Word/Excel الوثيقة. هل تريد أن تبقي شكل أو تنظيفه ؟ ", "كلمة لصق الكشف عن", "نظيفة", "أدخل اسم الفصل", "اضغط البديل لتغيير حجم مخصص"];
          }, 56014: function(t4) {
            t4.exports.default = ["Napiš něco", "O Jodit", "Editor Jodit", "Jodit Uživatelská příručka", "obsahuje detailní nápovědu", "Pro informace o licenci, prosím, přejděte na naši stránku:", "Koupit plnou verzi", "Copyright © XDSoft.net - Chupurnov Valeriy. Všechna práva vyhrazena.", "Anchor", "Otevřít v nové záložce", "Otevřít v celoobrazovkovém režimu", "Vyčistit formátování", "Barva výplně a písma", "Vpřed", "Zpět", "Tučné", "Kurzíva", "Odrážky", "Číslovaný seznam", "Zarovnat na střed", "Zarovnat do bloku", "Zarovnat vlevo", "Zarovnat vpravo", "Vložit horizontální linku", "Vložit obrázek", "Vložit soubor", "Vložit video (YT/Vimeo)", "Vložit odkaz", "Velikost písma", "Typ písma", "Formátovat blok", "Normální text", "Nadpis 1", "Nadpis 2", "Nadpis 3", "Nadpis 4", "Citát", "Kód", "Vložit", "Vložit tabulku", "Zmenšit odsazení", "Zvětšit odsazení", "Vybrat speciální symbol", "Vložit speciální symbol", "Použít formát", "Změnit mód", "Okraje", "horní", "pravý", "spodní", "levý", "Styly", "Třídy", "Zarovnání", "Vpravo", "Na střed", "Vlevo", "--nenastaveno--", "src", "Titulek", "Alternativní text (alt)", "Link", "Otevřít link v nové záložce", "Obrázek", "soubor", "Rozšířené", "Vlastnosti obrázku", "Zpět", "Ok", "Prohlížeč souborů", "Chyba při načítání seznamu souborů", "Chyba při načítání složek", "Jste si jistý(á)?", "Název složky", "Vytvořit složku", "název", "Přetáhněte sem obrázek", "Přetáhněte sem soubor", "nebo klikněte", "Alternativní text", "Nahrát", "Server", "Pozadí", "Text", "Nahoru", "Na střed", "Dolu", "Vložit sloupec před", "Vložit sloupec za", "Vložit řádek nad", "Vložit řádek pod", "Vymazat tabulku", "Vymazat řádku", "Vymazat sloupec", "Vyčistit buňku", "Znaky: %d", "Slova: %d", "Přeškrtnuto", "Podtrženo", "Horní index", "Dolní index", "Vyjmout označené", "Označit vše", "Zalomení", "Najdi", "Nahradit za", "Vyměňte", "Vložit", "Vyber obsah pro vložení", "HTML", "tučně", "kurzíva", "štětec", "odkaz", "zpět", "vpřed", "tabulka", "obrázek", "guma", "odstavec", "velikost písma", "video", "písmo", "о editoru", "tisk", "podtrženo", "přeškrtnuto", "zvětšit odsazení", "zmenšit odsazení", "celoobrazovkový režim", "smrsknout", "Linka", "Odrážka", "Číslovaný seznam", "Vyjmout", "Označit vše", "Kód", "Otevřít odkaz", "Upravit odkaz", "Atribut no-follow", "Odstranit odkaz", "Aktualizovat", "Chcete-li upravit", "Zobrazit", "URL", "Editovat", "Horizontální zarovnání", "Filtr", "Dle poslední změny", "Dle názvu", "Dle velikosti", "Přidat složku", "Reset", "Uložit", "Uložit jako...", "Změnit rozměr", "Ořezat", "Šířka", "Výška", "Ponechat poměr", "Ano", "Ne", "Vyjmout", "Označit", "Označit %s", "Vertikální zarovnání", "Rozdělit", "Spojit", "Přidat sloupec", "Přidat řádek", "Licence: %s", "Vymazat", "Rozdělit vertikálně", "Rozdělit horizontálně", "Okraj", "Váš text se podobá HTML. Vložit ho jako HTML?", "Vložit jako HTML", "Ponechat originál", "Vložit jako TEXT", "Vložit pouze TEXT", "Můžete upravovat pouze své obrázky. Načíst obrázek?", "Obrázek byl úspěšně nahrán!", "paleta", "V tomto adresáři nejsou žádné soubory.", "přejmenovat", "Zadejte nový název", "náhled", "Stažení", "Vložit ze schránky", "Váš prohlížeč nepodporuje přímý přístup do schránky.", "Kopírovat výběr", "kopírování", "Border radius", "Zobrazit všechny", "Platí", "Prosím, vyplňte toto pole", "Prosím, zadejte webovou adresu", "Výchozí", "Kruh", "Dot", "Quadrate", "Najít", "Najít Předchozí", "Najít Další", "Obsah, který vkládáte, je pravděpodobně z Microsoft Word / Excel. Chcete ponechat formát nebo vložit pouze text?", "Detekován fragment z Wordu nebo Excelu", "Vyčistit", "Vložte název třídy", "Stiskněte Alt pro vlastní změnu velikosti"];
          }, 95461: function(t4) {
            t4.exports.default = ["Bitte geben Sie einen Text ein", "Über Jodit", "Jodit Editor", "Das Jodit Benutzerhandbuch", "beinhaltet ausführliche Informationen wie Sie den Editor verwenden können.", "Für Informationen zur Lizenz, besuchen Sie bitte unsere Web-Präsenz:", "Vollversion kaufen", "Copyright © XDSoft.net - Chupurnov Valeriy. Alle Rechte vorbehalten.", "Anker", "In neuer Registerkarte öffnen", "Editor in voller Größe öffnen", "Formatierung löschen", "Füllfarbe oder Textfarbe ändern", "Wiederholen", "Rückgängig machen", "Fett", "Kursiv", "Unsortierte Liste einfügen", "Nummerierte Liste einfügen", "Mittig ausrichten", "Blocksatz", "Links ausrichten", "Rechts ausrichten", "Horizontale Linie einfügen", "Bild einfügen", "Datei einfügen", "Youtube/vimeo Video einfügen", "Link einfügen", "Schriftgröße", "Schriftfamilie", "Formatblock einfügen", "Normal", "Überschrift 1", "Überschrift 2", "Überschrift 3", "Überschrift 4", "Zitat", "Code", "Einfügen", "Tabelle einfügen", "Einzug verkleinern", "Einzug vergrößern", "Sonderzeichen auswählen", "Sonderzeichen einfügen", "Format kopieren", "Änderungsmodus", "Ränder", "Oben", "Rechts", "Unten", "Links", "CSS Stil", "CSS Klassen", "Ausrichtung", "Rechts", "Zentriert", "Links", "Keine", "Pfad", "Titel", "Alternativer Text", "Link", "Link in neuem Tab öffnen", "Bild", "Datei", "Fortgeschritten", "Bildeigenschaften", "Abbrechen", "OK", "Dateibrowser", "Fehler beim Laden der Liste", "Fehler beim Laden der Ordner", "Sind Sie sicher?", "Geben Sie den Verzeichnisnamen ein", "Verzeichnis erstellen", "Typname", "Bild hier hinziehen", "Datei löschen", "oder hier klicken", "Alternativtext", "Hochladen", "Auswählen", "Hintergrund", "Text", "Oben", "Mittig", "Unten", "Spalte davor einfügen", "Spalte danach einfügen", "Zeile oberhalb einfügen", "Zeile unterhalb einfügen", "Tabelle löschen", "Zeile löschen", "Spalte löschen", "Zelle leeren", "Zeichen: %d", "Wörter: %d", "Durchstreichen", "Unterstreichen", "Hochstellen", "Tiefstellen", "Auswahl ausschneiden", "Alles markieren", "Pause", "Suche nach", "Ersetzen durch", "Ersetzen", "Einfügen", "Wählen Sie den Inhalt zum Einfügen aus", "HTML", "Fett gedruckt", "Kursiv", "Bürste", "Verknüpfung", "Rückgängig machen", "Wiederholen", "Tabelle", "Bild", "Radiergummi", "Absatz", "Schriftgröße", "Video", "Schriftart", "Über", "Drucken", "Unterstreichen", "Durchstreichen", "Einzug", "Herausstellen", "Vollgröße", "Schrumpfen", "die Linie", "Liste von", "Nummerierte Liste", "Schneiden", "Wählen Sie Alle aus", "Code einbetten", "Link öffnen", "Link bearbeiten", "Nofollow-Attribut", "Link entfernen", "Aktualisieren", "Bearbeiten", "Ansehen", "URL", "Bearbeiten", "Horizontale Ausrichtung", "Filter", "Sortieren nach geändert", "Nach Name sortieren", "Nach Größe sortiert", "Ordner hinzufügen", "Wiederherstellen", "Speichern", "Speichern als", "Größe ändern", "Größe anpassen", "Breite", "Höhe", "Seitenverhältnis beibehalten", "Ja", "Nein", "Entfernen", "Markieren", "Markieren: %s", "Vertikale Ausrichtung", "Unterteilen", "Vereinen", "Spalte hinzufügen", "Zeile hinzufügen", null, "Löschen", "Vertikal unterteilen", "Horizontal unterteilen", "Rand", "Ihr Text ähnelt HTML-Code. Als HTML beibehalten?", "Als HTML einfügen?", "Original speichern", "Als Text einfügen", "Nur Text einfügen", "Sie können nur Ihre eigenen Bilder bearbeiten. Dieses Bild auf den Host herunterladen?", "Das Bild wurde erfolgreich auf den Server hochgeladen!", "Palette", "In diesem Verzeichnis befinden sich keine Dateien.", "Umbenennen", "Geben Sie einen neuen Namen ein", "Vorschau", "Herunterladen", "Aus Zwischenablage einfügen", "Ihr Browser unterstützt keinen direkten Zugriff auf die Zwischenablage.", "Auswahl kopieren", "Kopieren", "Radius für abgerundete Ecken", "Alle anzeigen", "Anwenden", "Bitte füllen Sie dieses Feld aus", "Bitte geben Sie eine Web-Adresse ein", "Standard", "Kreis", "Punkte", "Quadrate", "Suchen", "Suche vorherige", "Weitersuchen", "Der Inhalt, den Sie einfügen, stammt aus einem Microsoft Word / Excel-Dokument. Möchten Sie das Format erhalten oder bereinigen?", "In Word formatierter Text erkannt", "Säubern", "className (CSS) einfügen", "Drücken Sie Alt für benutzerdefinierte Größenanpassung"];
          }, 63837: function(t4) {
            t4.exports.default = { "Type something": "Start writing...", pencil: "Edit", Quadrate: "Square" };
          }, 39386: function(t4) {
            t4.exports.default = ["Escriba algo...", "Acerca de Jodit", "Jodit Editor", "Guía de usuario Jodit", "contiene ayuda detallada para el uso.", "Para información sobre la licencia, por favor visite nuestro sitio:", "Compre la versión completa", "Copyright © XDSoft.net - Chupurnov Valeriy. Todos los derechos reservados.", "Anclar", "Abrir en nueva pestaña", "Abrir editor en pantalla completa", "Limpiar formato", "Color de relleno o de letra", "Rehacer", "Deshacer", "Negrita", "Cursiva", "Insertar lista no ordenada", "Insertar lista ordenada", "Alinear Centrado", "Alinear Justificado", "Alinear Izquierda", "Alinear Derecha", "Insertar línea horizontal", "Insertar imagen", "Insertar archivo", "Insertar video de Youtube/vimeo", "Insertar vínculo", "Tamaño de letra", "Familia de letra", "Insertar bloque", "Normal", "Encabezado 1", "Encabezado 2", "Encabezado 3", "Encabezado 4", "Cita", "Código", "Insertar", "Insertar tabla", "Disminuir sangría", "Aumentar sangría", "Seleccionar caracter especial", "Insertar caracter especial", "Copiar formato", "Cambiar modo", "Márgenes", "arriba", "derecha", "abajo", "izquierda", "Estilos CSS", "Clases CSS", "Alinear", "Derecha", "Centrado", "Izquierda", "--No Establecido--", "Fuente", "Título", "Texto Alternativo", "Vínculo", "Abrir vínculo en nueva pestaña", "Imagen", "Archivo", "Avanzado", "Propiedades de imagen", "Cancelar", "Aceptar", "Buscar archivo", "Error al cargar la lista", "Error al cargar las carpetas", "¿Está seguro?", "Entre nombre de carpeta", "Crear carpeta", "Entre el nombre", "Soltar imagen", "Soltar archivo", "o click", "Texto alternativo", "Subir", "Buscar", "Fondo", "Texto", "Arriba", "Centro", "Abajo", "Insertar columna antes", "Interar columna después", "Insertar fila arriba", "Insertar fila debajo", "Borrar tabla", "Borrar fila", "Borrar columna", "Vaciar celda", "Caracteres: %d", "Palabras: %d", "Tachado", "Subrayado", "superíndice", "subíndice", "Cortar selección", "Seleccionar todo", "Pausa", "Buscar", "Reemplazar con", "Reemplazar", "Pegar", "Seleccionar contenido para pegar", "HTML", "negrita", "cursiva", "Brocha", "Vínculo", "deshacer", "rehacer", "Tabla", "Imagen", "Borrar", "Párrafo", "Tamaño de letra", "Video", "Letra", "Acerca de", "Imprimir", "subrayar", "tachar", "sangría", "quitar sangría", "Tamaño completo", "encoger", "línea horizontal", "lista sin ordenar", "lista ordenada", "Cortar", "Seleccionar todo", "Incluir código", "Abrir vínculo", "Editar vínculo", "No seguir", "Desvincular", "Actualizar", "Para editar", "Ver", "URL", "Editar", "Alineación horizontal", "Filtrar", "Ordenar por fecha modificación", "Ordenar por nombre", "Ordenar por tamaño", "Agregar carpeta", "Resetear", "Guardar", "Guardar como...", "Redimensionar", "Recortar", "Ancho", "Alto", "Mantener relación de aspecto", "Si", "No", "Quitar", "Seleccionar", "Seleccionar: %s", "Alineación vertical", "Dividir", "Mezclar", "Agregar columna", "Agregar fila", null, "Borrar", "Dividir vertical", "Dividir horizontal", "Borde", "El código es similar a HTML. ¿Mantener como HTML?", "Pegar como HTML?", "Mantener", "Insertar como texto", "Insertar solo texto", "Solo puedes editar tus propias imágenes. ¿Descargar esta imagen en el servidor?", "¡La imagen se ha subido correctamente al servidor!", "paleta", "No hay archivos en este directorio.", "renombrar", "Ingresa un nuevo nombre", "avance", "Descargar", "Pegar desde el portapapeles", "Su navegador no soporta el acceso directo en el portapapeles.", "Selección de copia", "copia", "Radio frontera", "Mostrar todos los", "Aplicar", "Por favor, rellene este campo", "Por favor, introduzca una dirección web", "Predeterminado", "Círculo", "Punto", "Cuadro", "Encontrar", "Buscar Anterior", "Buscar Siguiente", "El contenido pegado proviene de un documento de Microsoft Word/Excel. ¿Desea mantener el formato o limpiarlo?", "Pegado desde Word detectado", "Limpiar", "Insertar nombre de clase", "Presione Alt para cambiar el tamaño personalizado"];
          }, 62327: function(t4) {
            t4.exports.default = ["Kirjoita jotain...", "Tietoja Jodit:ista", "Jodit Editor", "Jodit käyttäjän ohje", "sisältää tarkempaa tietoa käyttämiseen", "Tietoa lisensoinnista, vieraile verkkosivuillamme:", "Osta täysi versio", "Copyright © XDSoft.net - Chupurnov Valeriy. Kaikki oikeudet pidätetään.", "Ankkuri", "Avaa uudessa välilehdessä", "Avaa täysikokoisena", "Poista muotoilu", "Täytä värillä tai aseta tekstin väri", "Tee uudelleen", "Peruuta", "Lihavoitu", "Kursiivi", "Lisää järjestämätön lista", "Lisää järjestetty lista", "Asemoi keskelle", "Asemoi tasavälein", "Asemoi vasemmalle", "Asemoi oikealle", "Lisää vaakasuuntainen viiva", "Lisää kuva", "Lisää tiedosto", "Lisää Youtube-/vimeo- video", "Lisää linkki", "Kirjasimen koko", "Kirjasimen nimi", "Lisää muotoilualue", "Normaali", "Otsikko 1", "Otsikko 2", "Otsikko 3", "Otsikko 4", "Lainaus", "Koodi", "Lisää", "Lisää taulukko", "Pienennä sisennystä", "Lisää sisennystä", "Valitse erikoismerkki", "Lisää erikoismerkki", "Maalaa muotoilu", "Vaihda tilaa", "Marginaalit", "ylös", "oikealle", "alas", "vasemmalle", "CSS-tyylit", "CSS-luokat", "Asemointi", "Oikea", "Keskellä", "Vasen", "--Ei asetettu--", "Fuente", "Otsikko", "Vaihtoehtoinen teksti", "Linkki", "Avaa uudessa välilehdessä", "Kuva", "Tiedosto", "Avanzado", "Kuvan ominaisuudet", "Peruuta", "Ok", "Tiedostoselain", "Virhe listan latauksessa", "Virhe kansioiden latauksessa", "Oletko varma?", "Syötä hakemiston nimi", "Luo hakemisto", "Syötä nimi", "Pudota kuva", "Pudota tiedosto", "tai klikkaa", "Vaihtoehtoinen teksti", "Lataa", "Selaa", "Tausta", "Teksti", "Ylös", "Keskelle", "Alas", "Lisää sarake ennen", "Lisää sarake jälkeen", "Lisää rivi ylös", "Lisää rivi alle", "Poista taulukko", "Poista rivi", "Poista sarake", "Tyhjennä solu", "Merkit: %d", "Sanat: %d", "Yliviivaus", "Alleviivaus", "yläviite", "alaviite", "Leikkaa valinta", "Valitse kaikki", "Vaihto", "Etsi arvoa", "Korvaa arvolla", "Korvaa", "Liitä", "Valitse liitettävä sisältö", "HTML", "lihavoitu", "kursiivi", "sivellin", "linkki", "peruuta", "tee uudelleen", "taulukko", "kuva", "pyyhekumi", "kappale", "tekstin koko", "video", "kirjasin", "tietoja", "tulosta", "alleviivaa", "yliviivaa", "sisennä", "pienennä sisennystä", "täysikokoinen", "pienennä", "vaakaviiva", "järjestetty lista", "järjestämätön lista", "leikkaa", "valitse kaikki", "Sisällytä koodi", "Avaa linkki", "Muokkaa linkkiä", "Älä seuraa", "Pura linkki", "Päivitä", "Muokkaa", "Ver", "URL", "Muokkaa", "Vaaka-asemointi", "Suodatin", "Järjestä muuttuneilla", "Järjestä nimellä", "Järjestä koolla", "Lisää kansio", "Nollaa", "Tallenna", "Tallenna nimellä ...", "Muuta kokoa", "Rajaa", "Leveys", "Korkeus", "Säilytä kuvasuhde", "Kyllä", "Ei", "Poista", "Valitse", "Valitse: %s", "Pystyasemointi", "Jaa", "Yhdistä", "Lisää sarake", "Lisää rivi", null, "Poista", "Jaa pystysuuntaisesti", "Jaa vaakasuuntaisesti", "Reuna", "Koodi on HTML:n tapaista. Säilytetäänkö HTML?", "Liitä HTML:nä?", "Säilytä", "Lisää tekstinä", "Lisää vain teksti", "Voit muokata vain omia kuvia. Lataa tämä kuva palvelimelle?", "Kuva on onnistuneesti ladattu palvelimelle!", "paletti", "Tiedostoja ei ole", "Nimeä uudelleen", "Syötä uusi nimi", "esikatselu", "Lataa", "Liitä leikepöydältä", "Selaimesi ei tue suoraa pääsyä leikepöydälle.", "Kopioi valinta", "kopioi", "Reunan pyöristys", "Näytä kaikki", "Käytä", "Täytä tämä kenttä", "Annan web-osoite", "Oletus", "Ympyrä", "Piste", "Neliö", "Hae", "Hae edellinen", "Hae seuraava", "Liitetty sisältö tulee Microsoft Word-/Excel- tiedostosta. Haluatko säilyttää muotoilun vai poistaa sen?", "Word liittäminen havaittu", "Tyhjennä", "Lisää luokkanimi", "Paina Alt muokattuun koon muuttamiseen"];
          }, 25090: function(t4) {
            t4.exports.default = ["Ecrivez ici", "A propos de Jodit", "Editeur Jodit", "Guide de l'utilisateur", "Aide détaillée à l'utilisation", "Consulter la licence sur notre site web:", "Acheter la version complète", "Copyright © XDSoft.net - Chupurnov Valeriy. Tous droits réservés.", "Ancre", "Ouvrir dans un nouvel onglet", "Ouvrir l'éditeur en pleine page", "Supprimer le formattage", "Modifier la couleur du fond ou du texte", "Refaire", "Défaire", "Gras", "Italique", "Liste non ordonnée", "Liste ordonnée", "Centrer", "Justifier", "Aligner à gauche ", "Aligner à droite", "Insérer une ligne horizontale", "Insérer une image", "Insérer un fichier", "Insérer une vidéo", "Insérer un lien", "Taille des caractères", "Famille des caractères", "Bloc formatté", "Normal", "Titre 1", "Titre 2", "Titre 3", "Titre 4", "Citation", "Code", "Insérer", "Insérer un tableau", "Diminuer le retrait", "Retrait plus", "Sélectionnez un caractère spécial", "Insérer un caractère spécial", "Cloner le format", "Mode wysiwyg <-> code html", "Marges", "haut", "droite", "Bas", "gauche", "Styles", "Classes", "Alignement", "Droite", "Centre", "Gauche", "--Non disponible--", "Source", "Titre", "Alternative", "Lien", "Ouvrir le lien dans un nouvel onglet", "Image", "fichier", "Avancé", "Propriétés de l'image", "Annuler", "OK", "Explorateur de fichiers", "Erreur de liste de chargement", "Erreur de dossier de chargement", "Etes-vous sûrs ?", "Entrer le nom de dossier", "Créer un dossier", "type de fichier", "Coller une image", "Déposer un fichier", "ou cliquer", "Texte de remplacemement", "Charger", "Chercher", "Arrière-plan", "Texte", "Haut", "Milieu", "Bas", "Insérer une colonne avant", "Insérer une colonne après", "Insérer une ligne au dessus", "Insérer une ligne en dessous", "Supprimer le tableau", "Supprimer la ligne", "Supprimer la colonne", "Vider la cellule", "Symboles: %d", "Mots: %d", "Barrer", "Souligner", "exposant", "indice", "Couper la sélection", "Tout sélectionner", "Pause", "Rechercher", "Remplacer par", "Remplacer", "Coller", "Choisissez le contenu à coller", "la source", "gras", "italique", "pinceau", "lien", "annuler", "refaire", "tableau", "image", "gomme", "clause", "taille de police", "Video", "police", "à propos de l'éditeur", "impression", "souligné", "barré", "indentation", "retrait", "taille réelle", "taille conventionnelle", "la ligne", "Liste", "Liste numérotée", "Couper", "Sélectionner tout", null, "Ouvrir le lien", "Modifier le lien", "Attribut Nofollow", "Supprimer le lien", "Mettre à jour", "Pour éditer", "Voir", "URL", null, "Alignement horizontal", "Filtre", "Trier par modification", "Trier par nom", "Trier par taille", "Créer le dossier", "Restaurer", "Sauvegarder", "Enregistrer sous", "Changer la taille", "Taille de garniture", "Largeur", "Hauteur", "Garder les proportions", "Oui", "Non", "Supprimer", "Mettre en évidence", "Mettre en évidence: %s", "Alignement vertical", "Split", "aller", "Ajouter une colonne", "Ajouter une rangée", null, "Effacer", "Split vertical", "Split horizontal", "Bordure", "Votre texte que vous essayez de coller est similaire au HTML. Collez-le en HTML?", "Coller en HTML?", "Sauvegarder l'original", "Coller en tant que texte", "Coller le texte seulement", "Vous ne pouvez éditer que vos propres images. Téléchargez cette image sur l'hôte?", "L'image a été téléchargée avec succès sur le serveur!", "Palette", "Il n'y a aucun fichier dans ce répertoire.", "renommer", "Entrez un nouveau nom", "Aperçu", "Télécharger", "Coller à partir du presse-papiers", "Votre navigateur ne prend pas en charge l'accès direct au presse-papiers.", "Copier la sélection", "copie", "Rayon des bordures", "Afficher tous", "Appliquer", "Veuillez remplir ce champ", "Veuillez entrer une adresse web", "Par défaut", "Cercle", "Point", "Quadratique", "Trouver", "Précédent", "Suivant", "Le contenu que vous insérez provient d'un document Microsoft Word / Excel. Voulez-vous enregistrer le format ou l'effacer?", "C'est peut-être un fragment de Word ou Excel", "Nettoyer", "Insérer un nom de classe", "Appuyez sur Alt pour un redimensionnement personnalisé"];
          }, 53113: function(t4) {
            t4.exports.default = ["הקלד משהו...", "About Jodit", "Jodit Editor", "Jodit User's Guide", "contains detailed help for using.", "For information about the license, please go to our website:", "Buy full version", "Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.", "מקום עיגון", "פתח בכרטיסיה חדשה", "פתח את העורך בחלון חדש", "נקה עיצוב", "שנה צבע טקסט או רקע", "בצע שוב", "בטל", "מודגש", "נטוי", "הכנס רשימת תבליטים", "הכנס רשימה ממוספרת", "מרכז", "ישר ", "ישר לשמאל", "ישר לימין", "הכנס קו אופקי", "הכנס תמונה", "הכנס קובץ", "הכנס סרטון וידאו מYouTube/Vimeo", "הכנס קישור", "גודל גופן", "גופן", "מעוצב מראש", "רגיל", "כותרת 1", "כותרת 2", "כותרת 3", "כותרת 4", "ציטוט", "קוד", "הכנס", "הכנס טבלה", "הקטן כניסה", "הגדל כניסה", "בחר תו מיוחד", "הכנס תו מיוחד", "העתק עיצוב", "החלף מצב", "ריווח", "עליון", "ימין", "תחתון", "שמאל", "עיצוב CSS", "מחלקת CSS", "יישור", "ימין", "מרכז", "שמאל", "--לא נקבע--", "מקור", "כותרת", "כיתוב חלופי", "קישור", "פתח בכרטיסיה חדשה", "תמונה", "קובץ", "מתקדם", "מאפייני תמונה", "ביטול", "אישור", "סייר הקבצים", "שגיאה  בזמן טעינת רשימה", "שגיאה בזמן טעינת תקיות", "האם אתה בטוח?", "הכנס שם תקיה", "צור תקיה", "סוג הקובץ", "הסר תמונה", "הסר קובץ", "או לחץ", "כיתוב חלופי", "העלה", "סייר", "רקע", "טקסט", "עליון", "מרכז", "תחתון", "הכנס עמודה לפני", "הכנס עמודה אחרי", "הכנס שורה מעל", "הכנס שורה מתחת", "מחק טבלה", "מחק שורה", "מחק עמודה", "רוקן תא", "תווים: %d", "מילים: %d", "קו חוצה", "קו תחתון", "superscript", "subscript", "גזור בחירה", "בחר הכל", "שבירת שורה", "חפש", "החלף ב", "להחליף", "הדבק", "בחר תוכן להדבקה", "HTML", "מודגש", "נטוי", "מברשת", "קישור", "בטל", "בצע שוב", "טבלה", "תמונה", "מחק", "פסקה", "גודל גופן", "וידאו", "גופן", "עלינו", "הדפס", "קו תחתון", "קו חוצה", "הגדל כניסה", "הקטן כניסה", "גודל מלא", "כווץ", "קו אופקי", "רשימת תבליטים", "רשימה ממוספרת", "חתוך", "בחר הכל", "הוסף קוד", "פתח קישור", "ערוך קישור", "ללא מעקב", "בטל קישור", "עדכן", "כדי לערוך", "הצג", "כתובת", "ערוך", "יישור אופקי", "סנן", "מין לפי שינוי", "מיין לפי שם", "מיין לפי גודל", "הוסף תקייה", "אפס", "שמור", "שמור בשם...", "שנה גודל", "חתוך", "רוחב", "גובה", "שמור יחס", "כן", "לא", "הסר", "בחר", "נבחר: %s", "יישור אנכי", "פיצול", "מזג", "הוסף עמודה", "הוסף שורה", null, "מחק", "פיצול אנכי", "פיצול אופקי", "מסגרת", "הקוד דומה לHTML, האם להשאיר כHTML", "הדבק כHTML", "השאר", "הכנס כטקסט", "הכנס טקסט בלבד", "רק קבצים המשוייכים שלך ניתנים לעריכה. האם להוריד את הקובץ?", "התמונה עלתה בהצלחה!", "לוח", "אין קבצים בספריה זו.", "הונגרית", "הזן שם חדש", "תצוגה מקדימה", "הורד", "להדביק מהלוח", "הדפדפן שלך לא תומך גישה ישירה ללוח.", "העתק בחירה", "העתק", "רדיוס הגבול", "הצג את כל", "החל", "נא למלא שדה זה", "אנא הזן כתובת אינטרנט", "ברירת המחדל", "מעגל", "נקודה", "הריבוע הזה", "למצוא", "מצא את הקודם", "חפש את הבא", "התוכן המודבק מגיע ממסמך וורד/אקסל. האם ברצונך להשאיר את העיצוב או לנקותו", 'זוהתה הדבקה מ"וורד"', "נקה", "הכנס את שם הכיתה", "לחץ על אלט לשינוי גודל מותאם אישית"];
          }, 81321: function(t4) {
            t4.exports.default = ["Írjon be valamit", "Joditról", "Jodit Editor", "Jodit útmutató", "további segítséget tartalmaz", "További licence információkért látogassa meg a weboldalunkat:", "Teljes verzió megvásárlása", "Copyright © XDSoft.net - Chupurnov Valeriy. Minden jog fenntartva.", "Horgony", "Megnyitás új lapon", "Megnyitás teljes méretben", "Formázás törlése", "Háttér/szöveg szín", "Újra", "Visszavon", "Félkövér", "Dőlt", "Pontozott lista", "Számozott lista", "Középre zárt", "Sorkizárt", "Balra zárt", "Jobbra zárt", "Vízszintes vonal beszúrása", "Kép beszúrás", "Fájl beszúrás", "Youtube videó beszúrása", "Link beszúrás", "Betűméret", "Betűtípus", "Formázott blokk beszúrása", "Normál", "Fejléc 1", "Fejléc 2", "Fejléc 3", "Fejléc 4", "Idézet", "Kód", "Beszúr", "Táblázat beszúrása", "Behúzás csökkentése", "Behúzás növelése", "Speciális karakter kiválasztása", "Speciális karakter beszúrása", "Kép formázása", "Nézet váltása", "Szegélyek", "felső", "jobb", "alsó", "bal", "CSS stílusok", "CSS osztályok", "Igazítás", "Jobbra", "Középre", "Balra", "Nincs", "Forrás", "Cím", "Helyettesítő szöveg", "Link", "Link megnyitása új lapon", "Kép", "Fájl", "Haladó", "Kép tulajdonságai", "Mégsem", "OK", "Fájl tallózó", "Hiba a lista betöltése közben", "Hiba a mappák betöltése közben", "Biztosan ezt szeretné?", "Írjon be egy mappanevet", "Mappa létrehozása", "írjon be bevet", "Húzza ide a képet", "Húzza ide a fájlt", "vagy kattintson", "Helyettesítő szöveg", "Feltölt", "Tallóz", "Háttér", "Szöveg", "Fent", "Középen", "Lent", "Oszlop beszúrás elé", "Oszlop beszúrás utána", "Sor beszúrás fölé", "Sor beszúrás alá", "Táblázat törlése", "Sor törlése", "Oszlop törlése", "Cella tartalmának törlése", "Karakterek száma: %d", "Szavak száma: %d", "Áthúzott", "Aláhúzott", "Felső index", "Alsó index", "Kivágás", "Összes kijelölése", "Szünet", "Keresés", "Csere erre", "Cserélje ki", "Beillesztés", "Válasszon tartalmat a beillesztéshez", "HTML", "Félkövér", "Dőlt", "Ecset", "Link", "Visszavon", "Újra", "Táblázat", "Kép", "Törlés", "Paragráfus", "Betűméret", "Videó", "Betű", "Rólunk", "Nyomtat", "Aláhúzott", "Áthúzott", "Behúzás", "Aussenseiter", "Teljes méret", "Összenyom", "Egyenes vonal", "Lista", "Számozott lista", "Kivág", "Összes kijelölése", "Beágyazott kód", "Link megnyitása", "Link szerkesztése", "Nincs követés", "Link leválasztása", "Frissít", "Szerkesztés", "felülvizsgálat", "URL", "Szerkeszt", "Vízszintes igazítás", "Szűrő", "Rendezés módosítás szerint", "Rendezés név szerint", "Rendezés méret szerint", "Mappa hozzáadás", "Visszaállít", "Mentés", "Mentés másként...", "Átméretezés", "Kivág", "Szélesség", "Magasság", "Képarány megtartása", "Igen", "Nem", "Eltávolít", "Kijelöl", "Kijelöl: %s", "Függőleges igazítás", "Felosztás", "Összevonás", "Oszlop hozzáadás", "Sor hozzáadás", null, "Törlés", "Függőleges felosztás", "Vízszintes felosztás", "Szegély", "A beillesztett szöveg HTML-nek tűnik. Megtartsuk HTML-ként?", "Beszúrás HTML-ként", "Megtartás", "Beszúrás szövegként", "Csak szöveg beillesztése", "Csak a saját képeit tudja szerkeszteni. Letölti ezt a képet?", "Kép sikeresen feltöltve!", "Palette", "Er zijn geen bestanden in deze map.", "átnevezés", "Adja meg az új nevet", "előnézet", "Letöltés", "Illessze be a vágólap", "A böngésző nem támogatja a közvetlen hozzáférést biztosít a vágólapra.", "Másolás kiválasztása", "másolás", "Határ sugár", "Összes", "Alkalmazni", "Kérjük, töltse ki ezt a mezőt,", "Kérjük, írja be a webcímet", "Alapértelmezett", "Kör", "Pont", "Quadrate", "Találni", "Megtalálja Előző", "Következő Keresése", "A beillesztett tartalom Microsoft Word/Excel dokumentumból származik. Meg szeretné tartani a formátumát?", "Word-ből másolt szöveg", "Elvetés", "Helyezze be az osztály nevét", "Nyomja meg az Alt egyéni átméretezés"];
          }, 4679: function(t4) {
            t4.exports.default = ["Ketik sesuatu", "Tentang Jodit", "Editor Jodit", "Panduan Pengguna Jodit", "mencakup detail bantuan penggunaan", "Untuk informasi tentang lisensi, silakan kunjungi website:", "Beli versi lengkap", "Hak Cipta © XDSoft.net - Chupurnov Valeriy. Hak cipta dilindungi undang-undang.", "Tautan", "Buka di tab baru", "Buka editor dalam ukuran penuh", "Hapus Pemformatan", "Isi warna atau atur warna teks", "Ulangi", "Batalkan", "Tebal", "Miring", "Sisipkan Daftar Tidak Berurut", "Sisipkan Daftar Berurut", "Tengah", "Penuh", "Kiri", "Kanan", "Sisipkan Garis Horizontal", "Sisipkan Gambar", "Sisipkan Berkas", "Sisipkan video youtube/vimeo", "Sisipkan tautan", "Ukuran font", "Keluarga font", "Sisipkan blok format", "Normal", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Kutip", "Kode", "Sisipkan", "Sisipkan tabel", "Kurangi Indentasi", "Tambah Indentasi", "Pilih Karakter Spesial", "Sisipkan Karakter Spesial", "Formar warna", "Ubah mode", "Batas", "atas", "kanan", "bawah", "kiri", "Gaya", "Class", "Rata", "Kanan", "Tengah", "Kiri", "--Tidak diset--", "Src", "Judul", "Teks alternatif", "Tautan", "Buka tautan di tab baru", "Gambar", "berkas", "Lanjutan", "Properti gambar", "Batal", "Ya", "Penjelajah Berkas", "Error ketika memuat list", "Error ketika memuat folder", "Apakah Anda yakin?", "Masukkan nama Direktori", "Buat direktori", "ketik nama", "Letakkan gambar", "Letakkan berkas", "atau klik", "Teks alternatif", "Unggah", "Jelajahi", "Latar Belakang", "Teks", "Atas", "Tengah", "Bawah", "Sisipkan kolom sebelumnya", "Sisipkan kolom setelahnya", "Sisipkan baris di atasnya", "Sisipkan baris di bawahnya", "Hapus tabel", "Hapus baris", "Hapus kolom", "Kosongkan cell", "Karakter: %d", "Kata: %d", "Coret", "Garis Bawah", "Superskrip", "Subskrip", "Potong pilihan", "Pilih semua", "Berhenti", "Mencari", "Ganti dengan", "Mengganti", "Paste", "Pilih konten untuk dipaste", "sumber", "tebal", "miring", "sikat", "tautan", "batalkan", "ulangi", "tabel", "gambar", "penghapus", "paragraf", "ukuran font", "video", "font", "tentang", "cetak", "garis bawah", "coret", "menjorok ke dalam", "menjorok ke luar", "ukuran penuh", "menyusut", "hr", "ul", "ol", "potong", "Pilih semua", "Kode embed", "Buka tautan", "Edit tautan", "No follow", "Hapus tautan", "Perbarui", "pensil", "Mata", "URL", "Edit", "Perataan horizontal", "Filter", "Urutkan berdasarkan perubahan", "Urutkan berdasarkan nama", "Urutkan berdasarkan ukuran", "Tambah folder", "Reset", "Simpan", "Simpan sebagai...", "Ubah ukuran", "Crop", "Lebar", "Tinggi", "Jaga aspek rasio", "Ya", "Tidak", "Copot", "Pilih", "Pilih %s", "Rata vertikal", "Bagi", "Gabungkan", "Tambah kolom", "tambah baris", "Lisensi: %s", "Hapus", "Bagi secara vertikal", "Bagi secara horizontal", "Bingkai", "Kode Anda cenderung ke HTML. Biarkan sebagai HTML?", "Paste sebagai HTML", "Jaga", "Sisipkan sebagai teks", "Sisipkan hanya teks", "Anda hanya dapat mengedit gambar Anda sendiri. Unduh gambar ini di host?", "Gambar telah sukses diunggah ke host!", "palet", "Tidak ada berkas", "ganti nama", "Masukkan nama baru", "pratinjau", "Unduh", "Paste dari clipboard", "Browser anda tidak mendukung akses langsung ke clipboard.", "Copy seleksi", "copy", "Border radius", "Tampilkan semua", "Menerapkan", "Silahkan mengisi kolom ini", "Silahkan masukkan alamat web", "Default", "Lingkaran", "Dot", "Kuadrat", "Menemukan", "Menemukan Sebelumnya", "Menemukan Berikutnya", "Konten dipaste dari dokumen Microsoft Word/Excel. Apakah Anda ingin tetap menjaga format atau membersihkannya?", "Terdeteksi paste dari Word", "Bersih", "Masukkan nama kelas", "Tekan Alt untuk mengubah ukuran kustom"];
          }, 31927: function(t4) {
            t4.exports.default = ["Scrivi qualcosa...", "A proposito di Jodit", "Jodit Editor", "Guida utente di Jodit", "contiene una guida dettagliata per l'uso.", "Per informazioni sulla licenza, si prega di visitare il nostro sito web:", "Acquista la versione completa", "Copyright © XDSoft.net - Chupurnov Valeriy. Tutti i diritti riservati.", "Link", "Apri in una nuova scheda", "Apri l'editor a schermo intero", "Pulisci Formattazione", "Colore di sfondo o del testo", "Ripristina", "Annulla", "Grassetto", "Corsivo", "Inserisci lista non ordinata", "Inserisci lista ordinata", "Allinea al centro", "Allineamento Giustificato", "Allinea a Sinistra", "Allinea a Destra", "Inserisci una linea orizzontale", "Inserisci immagine", "Inserisci un file", "Inserisci video Youtube/Vimeo", "Inserisci link", "Dimensione carattere", "Tipo di font", "Inserisci blocco", "Normale", "Intestazione 1", "Intestazione 2", "Intestazione 3", "Intestazione 4", "Citazione", "Codice", "Inserisci", "Inserisci tabella", "Riduci il rientro", "Aumenta il rientro", "Seleziona un carattere speciale", "Inserisci un carattere speciale", "Copia formato", "Cambia modalita'", "Margini", "su", "destra", "giù", "sinistra", "Stili CSS", "Classi CSS", "Allinea", "Destra", "Centro", "Sinistra", "--Non Impostato--", "Fonte", "Titolo", "Testo Alternativo", "Link", "Apri il link in una nuova scheda", "Immagine", "Archivio", "Avanzato", "Proprietà dell'immagine", "Annulla", "Accetta", "Cerca file", "Errore durante il caricamento dell'elenco", "Errore durante il caricamento delle cartelle", "Sei sicuro?", "Inserisci il nome della cartella", "Crea cartella", "Digita il nome", "Cancella immagine", "Cancella file", "o clicca", "Testo alternativo", "Carica", "Sfoglia", "Sfondo", "Testo", "Su", "Centro", "Sotto", "Inserisci la colonna prima", "Inserisci la colonna dopo", "Inserisci la riga sopra", "Inserisci la riga sotto", "Elimina tabella", "Elimina riga", "Elimina colonna", "Cella vuota", "Caratteri: %d", "Parole: %d", "Barrato", "Sottolineato", "indice", "pedice", "Taglia selezione", "Seleziona tutto", "Pausa", "Cerca per", "Sostituisci con", "Sostituisci", "Incolla", "Seleziona il contenuto da incollare", "risorsa", "Grassetto", "Corsivo", "Pennello", "Link", "Annulla", "Ripristina", "Tabella", "Immagine", "Gomma", "Paragrafo", "Dimensione del carattere", "Video", "Font", "Approposito di", "Stampa", "Sottolineato", "Barrato", "aumenta rientro", "riduci rientro", "espandi", "comprimi", "linea orizzontale", "lista non ordinata", "lista ordinata", "Taglia", "Seleziona tutto", "Includi codice", "Apri link", "Modifica link", "Non seguire", "Rimuovi link", "Aggiorna", "Per modificare", "Recensione", " URL", "Modifica", "Allineamento orizzontale", "Filtro", "Ordina per data di modifica", "Ordina per nome", "Ordina per dimensione", "Aggiungi cartella", "Reset", "Salva", "Salva con nome...", "Ridimensiona", "Ritaglia", "Larghezza", "Altezza", "Mantieni le proporzioni", "Si", "No", "Rimuovi", "Seleziona", "Seleziona: %s", "Allineamento verticala", "Dividi", "Fondi", "Aggiungi colonna", "Aggiungi riga", null, "Cancella", "Dividi verticalmente", "Dividi orizzontale", "Bordo", "Il codice è simile all'HTML. Mantieni come HTML?", "Incolla come HTML", "Mantieni", "Inserisci come testo", "Inserisci solo il testo", "Puoi modificare solo le tue immagini. Vuoi scaricare questa immagine dal server?", "L'immagine è stata caricata correttamente sul server!", "tavolozza", "Non ci sono file in questa directory.", "Rinomina", "Inserisci un nuovo nome", "anteprima", "Scarica", "Incolla dagli appunti", "Il tuo browser non supporta l'accesso diretto agli appunti.", "Copia selezione", "copia", "Border radius", "Mostra tutti", "Applica", "Si prega di compilare questo campo", "Si prega di inserire un indirizzo web", "Default", "Cerchio", "Punto", "Quadrato", "Trova", "Trova Precedente", "Trova Successivo", "Il contenuto incollato proviene da un documento Microsoft Word / Excel. Vuoi mantenere il formato o pulirlo?", "Incolla testo da Word rilevato", "Pulisci", "Inserisci il nome della classe", "Premere Alt per il ridimensionamento personalizzato"];
          }, 21195: function(t4) {
            t4.exports.default = ["なにかタイプしてください", "Joditについて", "Jodit Editor", "Jodit ユーザーズ・ガイド", "詳しい使い方", "ライセンス詳細についてはJodit Webサイトを確認ください：", "フルバージョンを購入", "Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.", "Anchor", "新しいタブで開く", "エディターのサイズ（フル/ノーマル）", "書式をクリア", "テキストの色", "やり直し", "元に戻す", "太字", "斜体", "箇条書き", "番号付きリスト", "中央揃え", "両端揃え", "左揃え", "右揃え", "区切り線を挿入", "画像を挿入", "ファイルを挿入", "Youtube/Vimeo 動画", "リンクを挿入", "フォントサイズ", "フォント", "テキストのスタイル", "指定なし", "タイトル1", "タイトル2", "タイトル3", "タイトル4", "引用", "コード", "挿入", "表を挿入", "インデント減", "インデント増", "特殊文字を選択", "特殊文字を挿入", "書式を貼付け", "編集モード切替え", "マージン", "上", "右", "下", "左", "スタイル", "クラス", "配置", "右寄せ", "中央寄せ", "左寄せ", "指定なし", "ソース", "タイトル", "代替テキスト", "リンク", "新しいタブで開く", "画像", "ファイル", "高度な設定", "画像のプロパティー", "キャンセル", "確定", "File Browser", "Error on load list", "Error on load folders", "Are you sure?", "Enter Directory name", "Create directory", "type name", "ここに画像をドロップ", "ここにファイルをドロップ", "or クリック", "代替テキスト", "アップロード", "ブラウズ", "背景", "文字", "上", "中央", "下", "左に列を挿入", "右に列を挿入", "上に行を挿入", "下に行を挿入", "表を削除", "行を削除", "列を削除", "セルを空にする", "文字数: %d", "単語数: %d", "取り消し線", "下線", "上付き文字", "下付き文字", "切り取り", "すべて選択", "Pause", "検索", "置換", "交換", "貼付け", "選択した内容を貼付け", "source", "bold", "italic", "brush", "link", "undo", "redo", "table", "image", "eraser", "paragraph", "fontsize", "video", "font", "about", "print", "underline", "strikethrough", "indent", "outdent", "fullsize", "shrink", "分割線", "箇条書き", "番号付きリスト", "切り取り", "すべて選択", "埋め込みコード", "リンクを開く", "リンクを編集", "No follow", "リンク解除", "更新", "鉛筆", "サイトを確認", "URL", "編集", "水平方向の配置", "Filter", "Sort by changed", "Sort by name", "Sort by size", "Add folder", "リセット", "保存", "Save as ...", "リサイズ", "Crop", "幅", "高さ", "縦横比を保持", "はい", "いいえ", "移除", "選択", "選択: %s", "垂直方向の配置", "分割", "セルの結合", "列を追加", "行を追加", null, "削除", "セルの分割（垂直方向）", "セルの分割（水平方向）", "境界線", "HTMLコードを保持しますか？", "HTMLで貼付け", "HTMLを保持", "HTMLをテキストにする", "テキストだけ", "You can only edit your own images. Download this image on the host?", "The image has been successfully uploaded to the host!", "パレット", "There are no files", "Rename", "Enter new name", "プレビュー", "ダウンロード", "貼り付け", "お使いのブラウザはクリップボードを使用できません", "コピー", "copy", "角の丸み", "全て表示", "適用", "まだこの分野", "を入力してくださいウェブアドレス", "デフォルト", "白丸", "黒丸", "四角", "見", "探前", "由来", "The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?", "Word Paste Detected", "Clean", "クラス名を挿入", "カスタムサイズ変更のためのAltキーを押します"];
          }, 53414: function(t4) {
            t4.exports.default = ["Type something", "About Jodit", "Jodit Editor", "Jodit User's Guide", "contains detailed help for using", "For information about the license, please go to our website:", "Buy full version", "Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.", "Anchor", "Open in new tab", "Open in fullsize", "Clear Formatting", "Fill color or set the text color", "Redo", "Undo", "Bold", "Italic", "Insert Unordered List", "Insert Ordered List", "Align Center", "Align Justify", "Align Left", "Align Right", "Insert Horizontal Line", "Insert Image", "Insert file", "Insert youtube/vimeo video", "Insert link", "Font size", "Font family", "Insert format block", "Normal", "Heading 1", "Heading 2", "Heading 3", "Heading 4", "Quote", "Code", "Insert", "Insert table", "Decrease Indent", "Increase Indent", "Select Special Character", "Insert Special Character", "Paint format", "Change mode", "Margins", "top", "right", "bottom", "left", "Styles", "Classes", "Align", "Right", "Center", "Left", "--Not Set--", "Src", "Title", "Alternative", "Link", "Open link in new tab", "Image", "file", "Advanced", "Image properties", "Cancel", "Ok", "File Browser", "Error on load list", "Error on load folders", "Are you sure?", "Enter Directory name", "Create directory", "type name", "Drop image", "Drop file", "or click", "Alternative text", "Upload", "Browse", "Background", "Text", "Top", "Middle", "Bottom", "Insert column before", "Insert column after", "Insert row above", "Insert row below", "Delete table", "Delete row", "Delete column", "Empty cell", "Chars: %d", "Words: %d", "Strike through", "Underline", "superscript", "subscript", "Cut selection", "Select all", "Break", "Search for", "Replace with", "Replace", "Paste", "Choose Content to Paste", "source", "bold", "italic", "brush", "link", "undo", "redo", "table", "image", "eraser", "paragraph", "fontsize", "video", "font", "about", "print", "underline", "strikethrough", "indent", "outdent", "fullsize", "shrink", "hr", "ul", "ol", "cut", "selectall", "Embed code", "Open link", "Edit link", "No follow", "Unlink", "Update", "pencil", "Eye", " URL", "Edit", "Horizontal align", "Filter", "Sort by changed", "Sort by name", "Sort by size", "Add folder", "Reset", "Save", "Save as ...", "Resize", "Crop", "Width", "Height", "Keep Aspect Ratio", "Yes", "No", "Remove", "Select", "Select %s", "Vertical align", "Split", "Merge", "Add column", "Add row", "License: %s", "Delete", "Split vertical", "Split horizontal", "Border", "Your code is similar to HTML. Keep as HTML?", "Paste as HTML", "Keep", "Insert as Text", "Insert only Text", "You can only edit your own images. Download this image on the host?", "The image has been successfully uploaded to the host!", "palette", "There are no files", "Rename", "Enter new name", "preview", "download", "Paste from clipboard", "Your browser doesn't support direct access to the clipboard.", "Copy selection", "copy", "Border radius", "Show all", "Apply", "Please fill out this field", "Please enter a web address", "Default", "Circle", "Dot", "Quadrate", "Find", "Find Previous", "Find Next", "The pasted content is coming from a Microsoft Word/Excel document. Do you want to keep the format or clean it up?", "Word Paste Detected", "Clean", "Insert className", "Press Alt for custom resizing"];
          }, 11012: function(t4) {
            t4.exports.default = ["무엇이든 입력하세요", "Jodit에 대하여", "Jodit Editor", "Jodit 사용자 안내서", "자세한 도움말이 들어있어요", "라이센스에 관해서는 Jodit 웹 사이트를 방문해주세요：", "풀 버전 구입하기", "© XDSoft.net - Chupurnov Valeriy. 에게 저작권과 모든 권리가 있습니다.", "Anchor", "새 탭에서 열기", "전체 크기로 보기", "서식 지우기", "글씨 색상", "재실행", "실행 취소", "굵게", "기울임", "글머리 목록", "번호 목록", "가운데 정렬", "양쪽 정렬", "왼쪽 정렬", "오른쪽 정렬", "수평 구분선 넣기", "이미지 넣기", "파일 넣기", "Youtube/Vimeo 동영상", "링크 넣기", "글꼴 크기", "글꼴", "블록 요소 넣기", "일반 텍스트", "제목 1", "제목 2", "제목 3", "제목 4", "인용", "코드", "붙여 넣기", "테이블", "들여쓰기 감소", "들여쓰기 증가", "특수문자 선택", "특수문자 입력", "페인트 형식", "편집모드 변경", "마진", "위", "오른쪽", "아래", "왼쪽", "스타일", "클래스", "정렬", "오른쪽으로", "가운데로", "왼쪽으로", "--지정 안 함--", "경로(src)", "제목", "대체 텍스트(alt)", "링크", "새 탭에서 열기", null, "파일", "고급", "이미지 속성", "취소", "확인", "파일 탐색기", "목록 불러오기 에러", "폴더 불러오기", "정말 진행할까요?", "디렉토리 이름 입력", "디렉토리 생성", "이름 입력", "이미지 드래그", "파일 드래그", "혹은 클릭", "대체 텍스트", "업로드", "탐색", "배경", "텍스트", "위", "중앙", "아래", "이전 열에 삽입", "다음 열에 삽입", "위 행에 삽입", "아래 행에 삽입", "테이블 삭제", "행 삭제", "열 삭제", "빈 셀", "문자수: %d", "단어수: %d", "취소선", "밑줄", "윗첨자", "아래첨자", "선택 잘라내기", "모두 선택", "구분자", "검색", "대체하기", "대체", "붙여넣기", "붙여넣을 내용 선택", "HTML 소스", "볼드", "이탤릭", "브러시", "링크", "실행 취소", "재실행", "테이블", "이미지", "지우개", "문단", "글꼴 크기", "비디오", "글꼴", "편집기 정보", "프린트", "밑줄", "취소선", "들여쓰기", "내어쓰기", "전체 화면", "일반 화면", "구분선", "글머리 목록", "번호 목록", "잘라내기", "모두 선택", "Embed 코드", "링크 열기", "링크 편집", "No follow", "링크 제거", "갱신", "연필", "사이트 확인", "URL", "편집", "수평 정렬", "필터", "변경일 정렬", "이름 정렬", "크기 정렬", "새 폴더", "초기화", "저장", "새로 저장하기 ...", "리사이즈", "크롭", "가로 길이", "세로 높이", "비율 유지하기", "네", "아니오", "제거", "선택", "선택: %s", "수직 정렬", "분할", "셀 병합", "열 추가", "행 추가", "라이센스: %s", "삭제", "세로 셀 분할", "가로 셀 분할", "외곽선", "HTML 코드로 감지했어요. 코드인채로 붙여넣을까요?", "HTML로 붙여넣기", "원본 유지", "텍스트로 넣기", "텍스트만 넣기", "외부 이미지는 편집할 수 없어요. 외부 이미지를 다운로드 할까요?", "이미지를 무사히 업로드 했어요!", "팔레트", "파일이 없어요", "이름 변경", "새 이름 입력", "미리보기", "다운로드", "클립보드 붙여넣기", "사용중인 브라우저가 클립보드 접근을 지원하지 않아요.", "선택 복사", "복사", "둥근 테두리", "모두 보기", "적용", "이 항목을 입력해주세요!", "웹 URL을 입력해주세요.", "기본", "원", "점", "정사각형", "찾기", "이전 찾기", "다음 찾기", "Microsoft Word/Excel 문서로 감지했어요. 서식을 유지한채로 붙여넣을까요?", "Word 붙여넣기 감지", "지우기", "className 입력", "사용자 지정 크기 조정에 대 한 고도 누르십시오"];
          }, 87061: function(t4) {
            t4.exports.default = ["Бичээд үзээрэй", "Jodit-ын талаар ", "Jodit програм", "Jodit гарын авлага", "хэрэглээний талаар дэлгэрэнгүй мэдээллийг агуулна", "Лицензийн мэдээллийг манай вэб хуудаснаас авна уу:", "Бүрэн хувилбар худалдан авах", "Зохиогчийн эрх хамгаалагдсан © XDSoft.net - Chupurnov Valeriy. Бүх эрхийг эзэмшинэ.", "Холбоо барих", "Шинэ табаар нээх", "Бүтэн дэлгэцээр нээх", "Форматыг арилгах", "Өнгөөр будах эсвэл текстийн өнгө сонгох", "Дахих", "Буцаах", "Тод", "Налуу", "Тэмдэгт жагсаалт нэмэх", "Дугаарт жагсаалт нэмэх", "Голлож байрлуулах", "Тэгшитгэн байрлуулах", "Зүүнд байрлуулах", "Баруунд байрлуулах", "Хэвтээ зураас нэмэх", "Зураг нэмэх", "Файл нэмэх", "Youtube/Vimeo видео нэмэх", "Холбоос нэмэх", "Фонтын хэмжээ", "Фонтын бүл", "Блок нэмэх", "Хэвийн", "Гарчиг 1", "Гарчиг 2", "Гарчиг 3", "Гарчиг 4", "Ишлэл", "Код", "Оруулах", "Хүснэгт оруулах", "Доголын зай хасах", "Доголын зай нэмэх", "Тусгай тэмдэгт сонгох", "Тусгай тэмдэгт нэмэх", "Зургийн формат", "Горим өөрчлөх", "Цаасны зай", "Дээрээс", "Баруунаас", "Доороос", "Зүүнээс", "CSS стиль", "CSS анги", "Байрлуулах", "Баруун", "Төв", "Зүүн", "--Тодорхойгүй--", "Эх үүсвэр", "Гарчиг", "Алтернатив текст", "Холбоос", "Холбоосыг шинэ хавтсанд нээх", "Зураг", "Файл", "Дэвшилтэт", "Зургийн үзүүлэлт", "Цуцлах", "Ok", "Файлын цонх", "Жагсаалт татах үед алдаа гарлаа", "Хавтас татах үед алдаа гарлаа", "Итгэлтэй байна уу?", "Хавтсын нэр оруулах", "Хавтас үүсгэх", "Нэр бичих", "Зураг буулгах", "Файл буулгах", "эсвэл товш", "Алтернатив текст", "Байршуулах", "Үзэх", "Арын зураг", "Текст", "Дээр", "Дунд", "Доор", "Урд нь багана нэмэх", "Ард нь багана нэмэх", "Дээр нь мөр нэмэх", "Доор нь мөр нэмэх", "Хүснэгт устгах", "Мөр устгах", "Багана устгах", "Нүд цэвэрлэх", "Тэмдэгт: %d", "Үг: %d", "Дээгүүр зураас", "Доогуур зураас", "Дээд индекс", "Доод индекс", "Сонголтыг таслах", "Бүгдийг сонго", "Мөрийг таслах", "Хайх", "Үүгээр солих", "Солих", "Буулгах", "Буулгах агуулгаа сонгоно уу", "Эх үүсвэр", "Тод", "Налуу", "Будах", "Холбоос", "Буцаах", "Дахих", "Хүснэгт", "Зураг", "Баллуур", "Параграф", "Фонтын хэмжээ", "Видео", "Фонт", "Тухай", "Хэвлэх", "Доогуур зураас", "Дээгүүр зураас", "Догол нэмэх", "Догол багасгах", "Бүтэн дэлгэц", "Багасга", "Хаалт", "Тэмдэгт жагсаалт", "Дугаарласан жагсаалт", "Таслах", "Бүгдийг сонго", "Код оруулах", "Холбоос нээх", "Холбоос засах", "Nofollow özelliği", "Холбоос салгах", "Шинэчлэх", "Засах", "Нүд", "URL", "Засах", "Хэвтээ эгнүүлэх", "Шүүх", "Сүүлд өөрчлөгдсөнөөр жагсаах", "Нэрээр жагсаах", "Хэмжээгээр жагсаах", "Хавтас нэмэх", "Буцаах", "Хадгалах", "Өөрөөр хадгалах", "Хэмжээг өөрчил", "Тайрах", "Өргөн", "Өндөр", "Харьцааг хадгал", "Тийм", "Үгүй", "Арилга", "Сонго", "Сонго: %s", "Босоо эгнүүлэх", "Задлах", "Нэгтгэх", "Багана нэмэх", "Мөр нэмэх", null, "Устгах", "Баганаар задлах", "Мөрөөр задлах", "Хүрээ", "Таны код HTML кодтой адил байна. HTML форматаар үргэлжлүүлэх үү?", "HTML байдлаар буулгах", "Хадгалах", "Текст байдлаар нэмэх", "Зөвхөн текст оруулах", "Та зөвхөн өөрийн зургуудаа янзлах боломжтой. Энэ зургийг өөр лүүгээ татмаар байна уу?", "Зургийг хост руу амжилттай хадгалсан", "Палет", "Энд ямар нэг файл алга", "Шинээр нэрлэх", "Шинэ нэр оруулна уу", "Урьдчилан харах", "Татах", "Самбараас хуулах ", "Энэ вэб хөтчөөс самбарт хандах эрх алга.", "Сонголтыг хуул", "Хуулах", "Хүрээний радиус", "Бүгдийг харуулах", "Хэрэгжүүл", "Энэ талбарыг бөглөнө үү", "Вэб хаягаа оруулна уу", "Үндсэн", "Дугуй", "Цэг", "Дөрвөлжин", "Хайх", "Өмнөхийг ол", "Дараагийнхийг ол", "Буулгасан агуулга Microsoft Word/Excel форматтай байна. Энэ форматыг хэвээр хадгалах уу эсвэл арилгах уу?", "Word байдлаар буулгасан байна", "Цэвэрлэх", "Бүлгийн нэрээ оруулна уу", "Хэмжээсийг шинээр өөчрлөхийн тулд Alt товчин дээр дарна уу"];
          }, 3268: function(t4) {
            t4.exports.default = ["Begin met typen..", "Over Jodit", "Jodit Editor", "Jodit gebruikershandleiding", "bevat gedetailleerde informatie voor gebruik.", "Voor informatie over de licentie, ga naar onze website:", "Volledige versie kopen", "Copyright © XDSoft.net - Chupurnov Valeriy. Alle rechten voorbehouden.", "Anker", "Open in nieuwe tab", "Editor in volledig scherm openen", "Opmaak verwijderen", "Vulkleur of tekstkleur aanpassen", "Opnieuw", "Ongedaan maken", "Vet", "Cursief", "Geordende list invoegen", "Ongeordende lijst invoegen", "Centreren", "Uitlijnen op volledige breedte", "Links uitlijnen", "Rechts uitlijnen", "Horizontale lijn invoegen", "Afbeelding invoegen", "Bestand invoegen", "Youtube/Vimeo video invoegen", "Link toevoegen", "Tekstgrootte", "Lettertype", "Format blok invoegen", "Normaal", "Koptekst 1", "Koptekst 2", "Koptekst 3", "Koptekst 4", "Citaat", "Code", "Invoegen", "Tabel invoegen", "Inspringing verkleinen", "Inspringing vergroten", "Symbool selecteren", "Symbool invoegen", "Opmaak kopieren", "Modus veranderen", "Marges", "Boven", "Rechts", "Onder", "Links", "CSS styles", "CSS classes", "Uitlijning", "Rechts", "Gecentreerd", "Links", "--Leeg--", "Src", "Titel", "Alternatieve tekst", "Link", "Link in nieuwe tab openen", "Afbeelding", "Bestand", "Geavanceerd", "Afbeeldingseigenschappen", "Annuleren", "OK", "Bestandsbrowser", "Fout bij het laden van de lijst", "Fout bij het laden van de mappenlijst", "Weet je het zeker?", "Geef de map een naam", "Map aanmaken", "Type naam", "Sleep hier een afbeelding naartoe", "Sleep hier een bestand naartoe", "of klik", "Alternatieve tekst", "Uploaden", "Bladeren", "Achtergrond", "Tekst", "Boven", "Midden", "Onder", "Kolom invoegen (voor)", "Kolom invoegen (na)", "Rij invoegen (boven)", "Rij invoegen (onder)", "Tabel verwijderen", "Rij verwijderen", "Kolom verwijderen", "Cel leegmaken", "Tekens: %d", "Woorden: %d", "Doorstrepen", "Onderstrepen", "Superscript", "Subscript", "Selectie knippen", "Selecteer alles", "Enter", "Zoek naar", "Vervangen door", "Vervangen", "Plakken", "Kies content om te plakken", "Broncode", "vet", "cursief", "kwast", "link", "ongedaan maken", "opnieuw", "tabel", "afbeelding", "gum", "paragraaf", "lettergrootte", "video", "lettertype", "over", "afdrukken", "onderstreept", "doorgestreept", "inspringen", "minder inspringen", "volledige grootte", "kleiner maken", "horizontale lijn", "lijst", "genummerde lijst", "knip", "alles selecteren", "Embed code", "Link openen", "Link aanpassen", "Niet volgen", "link verwijderen", "Updaten", "Om te bewerken", "Recensie", " URL", "Bewerken", "Horizontaal uitlijnen", "Filteren", "Sorteren op wijzigingsdatum", "Sorteren op naam", "Sorteren op grootte", "Map toevoegen", "Herstellen", "Opslaan", "Opslaan als ...", "Grootte aanpassen", "Bijknippen", "Breedte", "Hoogte", "Verhouding behouden", "Ja", "Nee", "Verwijderen", "Selecteren", "Selecteer: %s", "Verticaal uitlijnen", "Splitsen", "Samenvoegen", "Kolom toevoegen", "Rij toevoegen", null, "Verwijderen", "Verticaal splitsen", "Horizontaal splitsen", "Rand", "Deze code lijkt op HTML. Als HTML behouden?", "Invoegen als HTML", "Origineel behouden", "Als tekst invoegen", "Als onopgemaakte tekst invoegen", "Je kunt alleen je eigen afbeeldingen aanpassen. Deze afbeelding downloaden?", "De afbeelding is succesvol geüploadet!", "Palette", "Er zijn geen bestanden in deze map.", "Hernoemen", "Voer een nieuwe naam in", "Voorvertoning", "Download", "Plakken van klembord", "Uw browser ondersteunt geen directe toegang tot het klembord.", "Selectie kopiëren", "kopiëren", "Border radius", "Toon alle", "Toepassen", "Vul dit veld in", "Voer een webadres in", "Standaard", "Cirkel", "Punt", "Kwadraat", "Zoeken", "Vorige Zoeken", "Volgende Zoeken", "De geplakte tekst is afkomstig van een Microsoft Word/Excel document. Wil je de opmaak behouden of opschonen?", "Word-tekst gedetecteerd", "Opschonen", "Voeg de klassenaam in", "Druk op Alt voor aangepaste grootte"];
          }, 97834: function(t4) {
            t4.exports.default = ["Napisz coś", "O Jodit", "Edytor Jodit", "Instrukcja Jodit", "zawiera szczegółowe informacje dotyczące użytkowania.", "Odwiedź naszą stronę, aby uzyskać więcej informacji na temat licencji:", "Zakup pełnej wersji", "Copyright © XDSoft.net - Chupurnov Valeriy. Wszystkie prawa zastrzeżone.", "Kotwica", "Otwórz w nowej zakładce", "Otwórz edytor w pełnym rozmiarze", "Wyczyść formatowanie", "Kolor wypełnienia lub ustaw kolor tekstu", "Ponów", "Cofnij", "Pogrubienie", "Kursywa", "Wstaw listę wypunktowaną", "Wstaw listę numeryczną", "Wyśrodkuj", "Wyjustuj", "Wyrównaj do lewej", "Wyrównaj do prawej", "Wstaw linię poziomą", "Wstaw grafikę", "Wstaw plik", "Wstaw film Youtube/vimeo", "Wstaw link", "Rozmiar tekstu", "Krój czcionki", "Wstaw formatowanie", "Normalne", "Nagłówek 1", "Nagłówek 2", "Nagłówek 3", "Nagłówek 4", "Cytat", "Kod", "Wstaw", "Wstaw tabelę", "Zmniejsz wcięcie", "Zwiększ wcięcie", "Wybierz znak specjalny", "Wstaw znak specjalny", "Malarz formatów", "Zmień tryb", "Marginesy", "Górny", "Prawy", "Dolny", "Levy", "Style CSS", "Klasy CSS", "Wyrównanie", "Prawa", "środek", "Lewa", "brak", "Źródło", "Tytuł", "Tekst alternatywny", "Link", "Otwórz w nowej zakładce", "Grafika", "Plik", "Zaawansowane", "Właściwości grafiki", "Anuluj", "OK", "Przeglądarka plików", "Błąd ładowania listy plików", "Błąd ładowania folderów", "Czy jesteś pewien?", "Wprowadź nazwę folderu", "Utwórz folder", "wprowadź nazwę", "Upuść plik graficzny", "Upuść plik", "lub kliknij tu", "Tekst alternatywny", "Wczytaj", "Przeglądaj", "Tło", "Treść", "Góra", "Środek", "Dół", "Wstaw kolumnę przed", "Wstaw kolumnę po", "Wstaw wiersz przed", "Wstaw wiersz po", "Usuń tabelę", "Usuń wiersz", "Usuń kolumnę", "Wyczyść komórkę", "Znaki: %d", "Słowa: %d", "Przekreślenie", "Podkreślenie", "indeks górny", "index dolny", "Wytnij zaznaczenie", "Wybierz wszystko", "Przerwa", "Szukaj", "Zamień na", "Wymienić", "Wklej", "Wybierz zawartość do wklejenia", "HTML", "pogrubienie", "kursywa", "pędzel", "link", "cofnij", "ponów", "tabela", "grafika", "wyczyść", "akapit", "rozmiar czcionki", "wideo", "czcionka", "O programie", "drukuj", "podkreślenie", "przekreślenie", "wcięcie", "wycięcie", "pełen rozmiar", "przytnij", "linia pozioma", "lista", "lista numerowana", "wytnij", "zaznacz wszystko", "Wstaw kod", "otwórz link", "edytuj link", "Atrybut no-follow", "Usuń link", "Aktualizuj", "edytuj", "szukaj", "URL", "Edytuj", "Wyrównywanie w poziomie", "Filtruj", "Sortuj wg zmiany", "Sortuj wg nazwy", "Sortuj wg rozmiaru", "Dodaj folder", "wyczyść", "zapisz", "zapisz jako", "Zmień rozmiar", "Przytnij", "Szerokość", "Wysokość", "Zachowaj proporcje", "Tak", "Nie", "Usuń", "Wybierz", "Wybierz: %s", "Wyrównywanie w pionie", "Podziel", "Scal", "Dodaj kolumnę", "Dodaj wiersz", null, "Usuń", "Podziel w pionie", "Podziel w poziomie", "Obramowanie", "Twój kod wygląda jak HTML. Zachować HTML?", "Wkleić jako HTML?", "Oryginalny tekst", "Wstaw jako tekst", "Wstaw tylko treść", "Możesz edytować tylko swoje grafiki. Czy chcesz pobrać tą grafikę?", "Grafika została pomyślnienie dodana na serwer", "Paleta", "Brak plików.", "zmień nazwę", "Wprowadź nową nazwę", "podgląd", "pobierz", "Wklej ze schowka", "Twoja przeglądarka nie obsługuje schowka", "Kopiuj zaznaczenie", "kopiuj", "Zaokrąglenie krawędzi", "Pokaż wszystkie", "Zastosuj", "Proszę wypełnić to pole", "Proszę, wpisz adres sieci web", "Domyślnie", "Koło", "Punkt", "Kwadrat", "Znaleźć", "Znaleźć Poprzednie", "Znajdź Dalej", "Wklejany tekst pochodzi z dokumentu Microsoft Word/Excel. Chcesz zachować ten format czy wyczyścić go? ", "Wykryto tekst w formacie Word", "Wyczyść", "Wstaw nazwę zajęć", "Naciśnij Alt, aby zmienić rozmiar"];
          }, 86433: function(t4) {
            t4.exports.default = ["Escreva algo...", "Sobre o Jodit", "Editor Jodit", "Guia de usuário Jodit", "contém ajuda detalhada para o uso.", "Para informação sobre a licença, por favor visite nosso site:", "Compre a versão completa", "Copyright © XDSoft.net - Chupurnov Valeriy. Todos os direitos reservados.", "Link", "Abrir em nova aba", "Abrir editor em tela cheia", "Limpar formatação", "Cor de preenchimento ou cor do texto", "Refazer", "Desfazer", "Negrito", "Itálico", "Inserir lista não ordenada", "Inserir lista ordenada", "Centralizar", "Justificar", "Alinhar à Esquerda", "Alinhar à Direita", "Inserir linha horizontal", "Inserir imagem", "Inserir arquivo", "Inserir vídeo do Youtube/vimeo", "Inserir link", "Tamanho da letra", "Fonte", "Inserir bloco", "Normal", "Cabeçalho 1", "Cabeçalho 2", "Cabeçalho 3", "Cabeçalho 4", "Citação", "Código", "Inserir", "Inserir tabela", "Diminuir recuo", "Aumentar recuo", "Selecionar caractere especial", "Inserir caractere especial", "Copiar formato", "Mudar modo", "Margens", "cima", "direta", "baixo", "esquerda", "Estilos CSS", "Classes CSS", "Alinhamento", "Direita", "Centro", "Esquerda", "--Não Estabelecido--", "Fonte", "Título", "Texto Alternativo", "Link", "Abrir link em nova aba", "Imagem", "Arquivo", "Avançado", "Propriedades da imagem", "Cancelar", "Ok", "Procurar arquivo", "Erro ao carregar a lista", "Erro ao carregar as pastas", "Você tem certeza?", "Escreva o nome da pasta", "Criar pasta", "Escreva seu nome", "Soltar imagem", "Soltar arquivo", "ou clique", "Texto alternativo", "Upload", "Explorar", "Fundo", "Texto", "Cima", "Meio", "Baixo", "Inserir coluna antes", "Inserir coluna depois", "Inserir linha acima", "Inserir linha abaixo", "Excluir tabela", "Excluir linha", "Excluir coluna", "Limpar célula", "Caracteres: %d", "Palavras: %d", "Tachado", "Sublinhar", "sobrescrito", "subscrito", "Cortar seleção", "Selecionar tudo", "Pausa", "Procurar por", "Substituir com", "Substituir", "Colar", "Escolher conteúdo para colar", "HTML", "negrito", "itálico", "pincel", "link", "desfazer", "refazer", "tabela", "imagem", "apagar", "parágrafo", "tamanho da letra", "vídeo", "fonte", "Sobre de", "Imprimir", "sublinhar", "tachado", "recuar", "diminuir recuo", "Tamanho completo", "diminuir", "linha horizontal", "lista não ordenada", "lista ordenada", "Cortar", "Selecionar tudo", "Incluir código", "Abrir link", "Editar link", "Não siga", "Remover link", "Atualizar", "Editar", "Visualizar", "URL", "Editar", "Alinhamento horizontal", "filtrar", "Ordenar por modificação", "Ordenar por nome", "Ordenar por tamanho", "Adicionar pasta", "Resetar", "Salvar", "Salvar como...", "Redimensionar", "Recortar", "Largura", "Altura", "Manter a proporção", "Sim", "Não", "Remover", "Selecionar", "Selecionar: %s", "Alinhamento vertical", "Dividir", "Mesclar", "Adicionar coluna", "Adicionar linha", null, "Excluir", "Dividir vertical", "Dividir horizontal", "Borda", "Seu código é similar ao HTML. Manter como HTML?", "Colar como HTML?", "Manter", "Inserir como Texto", "Inserir somente o Texto", "Você só pode editar suas próprias imagens. Baixar essa imagem pro servidor?", "A imagem foi enviada com sucesso para o servidor!", "Palette", "Não há arquivos nesse diretório.", "Húngara", "Digite um novo nome", "preview", "Baixar", "Colar da área de transferência", "O seu navegador não oferece suporte a acesso direto para a área de transferência.", "Selecção de cópia", "cópia", "Border radius", "Mostrar todos os", "Aplicar", "Por favor, preencha este campo", "Por favor introduza um endereço web", "Padrão", "Círculo", "Ponto", "Quadro", "Encontrar", "Encontrar Anteriores", "Localizar Próxima", "O conteúdo colado veio de um documento Microsoft Word/Excel. Você deseja manter o formato ou limpa-lo?", "Colado do Word Detectado", "Limpar", "Insira o nome da classe", "Pressione Alt para redimensionamento personalizado"];
          }, 28359: function(t4) {
            t4.exports.default = ["Напишите что-либо", "О Jodit", "Редактор Jodit", "Jodit Руководство пользователя", "содержит детальную информацию по использованию", "Для получения сведений о лицензии , пожалуйста, перейдите на наш сайт:", "Купить полную версию", "Авторские права © XDSoft.net - Чупурнов Валерий. Все права защищены.", "Анкор", "Открывать ссылку в новой вкладке", "Открыть редактор в полном размере", "Очистить форматирование", "Цвет заливки или цвет текста", "Повтор", "Отмена", "Жирный", "Наклонный", "Вставка маркированного списка", "Вставить нумерованный список", "Выровнять по центру", "Выровнять по ширине", "Выровнять по левому краю", "Выровнять по правому краю", "Вставить горизонтальную линию", "Вставить изображение", "Вставить файл", "Вставьте видео", "Вставить ссылку", "Размер шрифта", "Шрифт", "Вставить блочный элемент", "Нормальный текст", "Заголовок 1", "Заголовок 2", "Заголовок 3", "Заголовок 4", "Цитата", "Код", "Вставить", "Вставить таблицу", "Уменьшить отступ", "Увеличить отступ", "Выберите специальный символ", "Вставить специальный символ", "Формат краски", "Источник", "Отступы", "сверху", "справа", "снизу", "слева", "Стили", "Классы", "Выравнивание", "По правому краю", "По центру", "По левому краю", "--не устанавливать--", "src", "Заголовок", "Альтернативный текст (alt)", "Ссылка", "Открывать ссылку в новом окне", null, "Файл", "Расширенные", "Свойства изображения", "Отмена", "Ок", "Браузер файлов", "Ошибка при загрузке списка изображений", "Ошибка при загрузке списка директорий", "Вы уверены?", "Введите название директории", "Создать директорию", "введите название", "Перетащите сюда изображение", "Перетащите сюда файл", "или нажмите", "Альтернативный текст", "Загрузка", "Сервер", "Фон", "Текст", " К верху", "По середине", "К низу", "Вставить столбец до", "Вставить столбец после", "Вставить ряд выше", "Вставить ряд ниже", "Удалить таблицу", "Удалять ряд", "Удалить столбец", "Очистить ячейку", "Символов: %d", "Слов: %d", "Перечеркнуть", "Подчеркивание", "верхний индекс", "индекс", "Вырезать", "Выделить все", "Разделитель", "Найти", "Заменить на", "Заменить", "Вставить", "Выбрать контент для вставки", "HTML", "жирный", "курсив", "заливка", "ссылка", "отменить", "повторить", "таблица", "Изображение", "очистить", "параграф", "размер шрифта", "видео", "шрифт", "о редакторе", "печать", "подчеркнутый", "перечеркнутый", "отступ", "выступ", "во весь экран", "обычный размер", "линия", "Список", "Нумерованный список", "Вырезать", "Выделить все", "Код", "Открыть ссылку", "Редактировать ссылку", "Атрибут nofollow", "Убрать ссылку", "Обновить", "Редактировать", "Просмотр", "URL", "Редактировать", "Горизонтальное выравнивание", "Фильтр", "По изменению", "По имени", "По размеру", "Добавить папку", "Восстановить", "Сохранить", "Сохранить как", "Изменить размер", "Обрезать размер", "Ширина", "Высота", "Сохранять пропорции", "Да", "Нет", "Удалить", "Выделить", "Выделить: %s", "Вертикальное выравнивание", "Разделить", "Объединить в одну", "Добавить столбец", "Добавить строку", "Лицензия: %s", "Удалить", "Разделить по вертикали", "Разделить по горизонтали", "Рамка", "Ваш текст, который вы пытаетесь вставить похож на HTML. Вставить его как HTML?", "Вставить как HTML?", "Сохранить оригинал", "Вставить как текст", "Вставить только текст", "Вы можете редактировать только свои собственные изображения. Загрузить это изображение на ваш сервер?", "Изображение успешно загружено на сервер!", "палитра", "В данном каталоге нет файлов", "Переименовать", "Введите новое имя", "Предпросмотр", "Скачать", "Вставить из буфера обмена", "Ваш браузер не поддерживает прямой доступ к буферу обмена.", "Скопировать выделенное", "копия", "Радиус границы", "Показать все", "Применить", "Пожалуйста, заполните это поле", "Пожалуйста, введите веб-адрес", "По умолчанию", "Круг", "Точка", "Квадрат", "Найти", "Найти Предыдущие", "Найти Далее", "Контент который вы вставляете поступает из документа Microsoft Word / Excel. Вы хотите сохранить формат или очистить его?", "Возможно это фрагмент Word или Excel", "Почистить", "Вставить название класса", "Нажмите Alt для изменения пользовательского размера"];
          }, 68368: function(t4) {
            t4.exports.default = ["Bir şeyler yaz", "Jodit Hakkında", "Jodit Editor", "Jodit Kullanım Kılavuzu", "kullanım için detaylı bilgiler içerir", "Lisans hakkında bilgi için lütfen web sitemize gidin:", "Tam versiyonunu satın al", "Copyright © XDSoft.net - Chupurnov Valeriy. Tüm hakları saklıdır.", "Bağlantı", "Yeni sekmede aç", "Editörü tam ekranda aç", "Stili temizle", "Renk doldur veya yazı rengi seç", "Yinele", "Geri Al", "Kalın", "İtalik", "Sırasız Liste Ekle", "Sıralı Liste Ekle", "Ortala", "Kenarlara Yasla", "Sola Yasla", "Sağa Yasla", "Yatay Çizgi Ekle", "Resim Ekle", "Dosya Ekle", "Youtube/Vimeo Videosu Ekle", "Bağlantı Ekle", "Font Boyutu", "Font Ailesi", "Blok Ekle", "Normal", "Başlık 1", "Başlık 2", "Başlık 3", "Başlık 4", "Alıntı", "Kod", "Ekle", "Tablo Ekle", "Girintiyi Azalt", "Girintiyi Arttır", "Özel Karakter Seç", "Özel Karakter Ekle", "Resim Biçimi", "Mod Değiştir", "Boşluklar", "Üst", "Sağ", "Alt", "Sol", "CSS Stilleri", "CSS Sınıfları", "Hizalama", "Sağ", "Ortalı", "Sol", "Belirsiz", "Kaynak", "Başlık", "Alternatif Yazı", "Link", "Bağlantıyı yeni sekmede aç", "Resim", "Dosya", "Gelişmiş", "Resim özellikleri", "İptal", "Tamam", "Dosya Listeleyici", "Liste yüklenirken hata oluştu", "Klasörler yüklenirken hata oluştur", "Emin misiniz?", "Dizin yolu giriniz", "Dizin oluştur", "İsim yaz", "Resim bırak", "Dosya bırak", "veya tıkla", "Alternatif yazı", "Yükle", "Gözat", "Arka plan", "Yazı", "Üst", "Orta", "Aşağı", "Öncesine kolon ekle", "Sonrasına kolon ekle", "Üstüne satır ekle", "Altına satır ekle", "Tabloyu sil", "Satırı sil", "Kolonu sil", "Hücreyi temizle", "Harfler: %d", "Kelimeler: %d", "Üstü çizili", "Alt çizgi", "Üst yazı", "Alt yazı", "Seçilimi kes", "Tümünü seç", "Satır sonu", "Ara", "Şununla değiştir", "Değiştir", "Yapıştır", "Yapıştırılacak içerik seç", "Kaynak", "Kalın", "italik", "Fırça", "Bağlantı", "Geri al", "Yinele", "Tablo", "Resim", "Silgi", "Paragraf", "Font boyutu", "Video", "Font", "Hakkında", "Yazdır", "Alt çizgi", "Üstü çizili", "Girinti", "Çıkıntı", "Tam ekran", "Küçült", "Ayraç", "Sırasız liste", "Sıralı liste", "Kes", "Tümünü seç", "Kod ekle", "Bağlantıyı aç", "Bağlantıyı düzenle", "Nofollow özelliği", "Bağlantıyı kaldır", "Güncelle", "Düzenlemek için", "Yorumu", "URL", "Düzenle", "Yatay hizala", "Filtre", "Değişime göre sırala", "İsme göre sırala", "Boyuta göre sırala", "Klasör ekle", "Sıfırla", "Kaydet", "Farklı kaydet", "Boyutlandır", "Kırp", "Genişlik", "Yükseklik", "En boy oranını koru", "Evet", "Hayır", "Sil", "Seç", "Seç: %s", "Dikey hizala", "Ayır", "Birleştir", "Kolon ekle", "Satır ekle", null, "Sil", "Dikey ayır", "Yatay ayır", "Kenarlık", "Kodunuz HTML koduna benziyor. HTML olarak devam etmek ister misiniz?", "HTML olarak yapıştır", "Sakla", "Yazı olarak ekle", "Sadece yazıyı ekle", "Sadece kendi resimlerinizi düzenleyebilirsiniz. Bu görseli kendi hostunuza indirmek ister misiniz?", "Görsel başarıyla hostunuza yüklendi", "Palet", "Bu dizinde dosya yok", "Yeniden isimlendir", "Yeni isim girin", "Ön izleme", "İndir", "Panodan yapıştır ", "Tarayıcınız panoya doğrudan erişimi desteklemiyor.", "Seçimi kopyala", "Kopyala", "Sınır yarıçapı", "Tümünü Göster", "Uygula", "Lütfen bu alanı doldurun", "Lütfen bir web adresi girin", "Varsayılan", "Daire", "Nokta", "Kare", "Bul", "Öncekini Bul", "Sonrakini Bul", "Der Inhalt, den Sie einfügen, stammt aus einem Microsoft Word / Excel-Dokument. Möchten Sie das Format erhalten oder löschen?", "Word biçiminde yapıştırma algılandı", "Temizle", "Sınıf adı girin", "Özel yeniden boyutlandırma için Alt tuşuna basın"];
          }, 25182: function(t4) {
            t4.exports.default = ["输入一些内容", "关于Jodit", "Jodit Editor", "开发者指南", "使用帮助", "有关许可证的信息，请访问我们的网站：", "购买完整版本", "Copyright © XDSoft.net - Chupurnov Valeriy. 版权所有", "Anchor", "在新窗口打开", "全屏编辑", "清除样式", "颜色", "重做", "撤销", "粗体", "斜体", "符号列表", "编号", "居中", "对齐文本", "左对齐", "右对齐", "分割线", "图片", "文件", "视频", "链接", "字号", "字体", "格式块", "默认", "标题1", "标题2", "标题3", "标题4", "引用", "代码", "插入", "表格", "减少缩进", "增加缩进", "选择特殊符号", "特殊符号", "格式复制", "改变模式", "外边距（Margins）", "top", "right", "bottom", "left", "样式", "Classes", "对齐方式", "居右", "居中", "居左", "无", "Src", "Title", "Alternative", "Link", "在新窗口打开链接", "图片", "file", "高级", "图片属性", "取消", "确定", "文件管理", "加载list错误", "加载folders错误", "你确定吗？", "输入路径", "创建路径", "type name", "拖动图片到此", "拖动文件到此", "或点击", "Alternative text", "上传", "浏览", "背景色", "文字", "顶部", "中间", "底部", "在之前插入列", "在之后插入列", "在之前插入行", "在之后插入行", "删除表格", "删除行", "删除列", "清除内容", "字符数: %d", "单词数: %d", "删除线", "下划线", "上标", "下标", "剪切", "全选", "Break", "查找", "替换为", "替换", "粘贴", "选择内容并粘贴", "源码", "粗体", "斜体", "颜色", "链接", "撤销", "重做", "表格", "图片", "橡皮擦", "段落", "字号", "视频", "字体", "关于", "打印", "下划线", "上出现", "增加缩进", "减少缩进", "全屏", "收缩", "分割线", "无序列表", "顺序列表", "剪切", "全选", "嵌入代码", "打开链接", "编辑链接", "No follow", "取消链接", "更新", "铅笔", "预览", "URL", "编辑", "水平对齐", "筛选", "修改时间排序", "名称排序", "大小排序", "新建文件夹", "重置", "保存", "保存为", "调整大小", "剪切", "宽", "高", "保持长宽比", "是", "不", "移除", "选择", "选择: %s", "垂直对齐", "拆分", "合并", "添加列", "添加行", null, "删除", "垂直拆分", "水平拆分", "边框", "你粘贴的文本是一段html代码，是否保留源格式", "html粘贴", "保留源格式", "把html代码视为普通文本", "只保留文本", "你只能编辑你自己的图片。Download this image on the host?", "图片上传成功", "调色板", "此目录中沒有文件。", "重命名", "输入新名称", "预览", "下载", "粘贴从剪贴板", "你浏览器不支持直接访问的剪贴板。", "复制选中内容", "复制", "边界半径", "显示所有", "应用", "请填写这个字段", "请输入一个网址", "默认", "圆圈", "点", "方形", "搜索", "查找上一个", "查找下一个", "正在粘贴 Word/Excel 的文本，是否保留源格式？", "文本粘贴", "匹配目标格式", "插入班级名称", "按Alt自定义调整大小"];
          }, 44906: function(t4) {
            t4.exports.default = ["輸入一些內容", "關於Jodit", "Jodit Editor", "開發者指南", "使用幫助", "相關授權條款資訊，請造訪我們的網站：", "購買完整版本", "Copyright © XDSoft.net - Chupurnov Valeriy. All rights reserved.", "錨點", "在新分頁開啟", "全螢幕編輯", "清除樣式", "顏色", "取消復原", "復原", "粗體", "斜體", "項目符號清單", "編號清單", "置中", "文字對齊", "靠左", "靠右", "分割線", "圖片", "檔案", "插入 youtube/vimeo 影片", "插入連結", "文字大小", "字型", "格式化區塊", "內文", "標題1", "標題2", "標題3", "標題4", "引文", "程式碼", "插入", "表格", "減少縮排", "增加縮排", "選擇特殊符號", "特殊符號", "格式複製", "檢視原始碼", "邊距", "上", "右", "下", "左", "樣式", "Classes", "對齊方式", "靠右", "置中", "靠左", "無", "Src", "Title", "替代", "Link", "在新分頁開啟連結", "圖片", "檔案", "進階", "圖片屬性", "取消", "確定", "檔案瀏覽", "清單載入錯誤", "資料夾載入錯誤", "您確定嗎？", "輸入路徑", "創建路徑", "type name", "拖曳圖片至此", "拖曳檔案至此", "或點擊", "替代文字", "上傳", "瀏覽", "背景色", "文字", "頂部", "中間", "底部", "插入左方欄", "插入右方欄", "插入上方列", "插入下方列", "刪除表格", "刪除整列", "刪除整欄", "清除內容", "字元數: %d", "單字數: %d", "刪除線", "底線", "上標", "下標", "剪下", "全選", "斷行", "尋找", "取代為", "取代", "貼上", "選擇內容並貼上", "原始碼", "粗體", "斜體", "顏色", "連結", "復原", "取消復原", "表格", "圖片", "橡皮擦", "段落", "文字大小", "影片", "字型", "關於", "列印", "底線", "刪除線", "增加縮排", "減少縮排", "全螢幕", "縮減", "分隔線", "項目符號清單", "編號清單", "剪下", "全選", "嵌入程式碼", "打開連結", "編輯連結", "No follow", "取消連結", "更新", "鉛筆", "查看", "URL", null, "水平對齊", "篩選", "修改時間排序", "名稱排序", "大小排序", "新增資料夾", "重設", "儲存", "另存為...", "調整大小", "裁切", "寬", "高", "維持長寬比", "是", "否", "移除", "選擇", "選擇: %s", "垂直對齊", "分割", "合併", "新增欄", "新增列", null, "刪除", "垂直分割", "水平分割", "邊框", "您的程式碼與 HTML 類似，是否貼上 HTML 格式？", "貼上 HTML", "保留原始格式", "以純文字貼上", "僅貼上內文", "您只能編輯您自己的圖片。是否下載此圖片?", "圖片上傳成功", "調色盤", "沒有檔案", "重新命名", "輸入新名稱", "預覽", "下載", "從剪貼簿貼上", "瀏覽器無法存取剪貼簿。", "複製已選取項目", "複製", "邊框圓角", "顯示全部", "應用", "請輸入此欄位", "請輸入網址", "預設", "圓圈", "點", "方形", "尋找", "尋找上一個", "尋找下一個", "正在貼上 Word/Excel 文件的內容，是否保留原始格式？", "貼上 Word 格式", "清除格式", "插入 class 名稱", "按住 Alt 以調整自訂大小"];
          }, 928: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M621 1280h595v-595zm-45-45l595-595h-595v595zm1152 77v192q0 14-9 23t-23 9h-224v224q0 14-9 23t-23 9h-192q-14 0-23-9t-9-23v-224h-864q-14 0-23-9t-9-23v-864h-224q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h224v-224q0-14 9-23t23-9h192q14 0 23 9t9 23v224h851l246-247q10-9 23-9t23 9q9 10 9 23t-9 23l-247 246v851h224q14 0 23 9t9 23z"/> </svg>`;
          }, 31230: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24"> <g transform="translate(-251.000000, -443.000000)"> <g transform="translate(215.000000, 119.000000)"/> <path d="M252,448 L256,448 L256,444 L252,444 L252,448 Z M257,448 L269,448 L269,446 L257,446 L257,448 Z M257,464 L269,464 L269,462 L257,462 L257,464 Z M270,444 L270,448 L274,448 L274,444 L270,444 Z M252,462 L252,466 L256,466 L256,462 L252,462 Z M270,462 L270,466 L274,466 L274,462 L270,462 Z M254,461 L256,461 L256,449 L254,449 L254,461 Z M270,461 L272,461 L272,449 L270,449 L270,461 Z"/> </g> </svg>`;
          }, 54522: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' x="0px" y="0px" viewBox="0 0 459 459"> <g> <path d="M229.5,0C102,0,0,102,0,229.5S102,459,229.5,459c20.4,0,38.25-17.85,38.25-38.25c0-10.2-2.55-17.85-10.2-25.5 c-5.1-7.65-10.2-15.3-10.2-25.5c0-20.4,17.851-38.25,38.25-38.25h45.9c71.4,0,127.5-56.1,127.5-127.5C459,91.8,357,0,229.5,0z M89.25,229.5c-20.4,0-38.25-17.85-38.25-38.25S68.85,153,89.25,153s38.25,17.85,38.25,38.25S109.65,229.5,89.25,229.5z M165.75,127.5c-20.4,0-38.25-17.85-38.25-38.25S145.35,51,165.75,51S204,68.85,204,89.25S186.15,127.5,165.75,127.5z M293.25,127.5c-20.4,0-38.25-17.85-38.25-38.25S272.85,51,293.25,51s38.25,17.85,38.25,38.25S313.65,127.5,293.25,127.5z M369.75,229.5c-20.4,0-38.25-17.85-38.25-38.25S349.35,153,369.75,153S408,170.85,408,191.25S390.15,229.5,369.75,229.5z" /> </g> </svg>`;
          }, 17995: function(t4) {
            t4.exports = '<svg viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> <path d="M1088 1256v240q0 16-12 28t-28 12h-240q-16 0-28-12t-12-28v-240q0-16 12-28t28-12h240q16 0 28 12t12 28zm316-600q0 54-15.5 101t-35 76.5-55 59.5-57.5 43.5-61 35.5q-41 23-68.5 65t-27.5 67q0 17-12 32.5t-28 15.5h-240q-15 0-25.5-18.5t-10.5-37.5v-45q0-83 65-156.5t143-108.5q59-27 84-56t25-76q0-42-46.5-74t-107.5-32q-65 0-108 29-35 25-107 115-13 16-31 16-12 0-25-8l-164-125q-13-10-15.5-25t5.5-28q160-266 464-266 80 0 161 31t146 83 106 127.5 41 158.5z"/> </svg>';
          }, 86634: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 128 128" xml:space="preserve"> <polygon points="112.4560547,23.3203125 112.4560547,75.8154297 31.4853516,75.8154297 31.4853516,61.953125 16.0131836,72.6357422 0.5410156,83.3164063 16.0131836,93.9990234 31.4853516,104.6796875 31.4853516,90.8183594 112.4560547,90.8183594 112.4560547,90.8339844 127.4589844,90.8339844 127.4589844,23.3203125"/> </svg>`;
          }, 91115: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 270 270"> <path d="M 255.9537,58.150081 237.69527,40.997278 c -1.49414,-1.375593 -3.43653,-2.077427 -5.37891,-2.077427 -1.94239,0 -3.88478,0.701834 -5.37892,2.077427 L 29.919751,226.1128 c -2.988286,2.77926 -2.988286,7.32714 0,10.13447 L 48.148295,253.372 c 1.46426,1.37559 3.406646,2.1055 5.378915,2.1055 1.972268,0 3.884771,-0.72991 5.378914,-2.1055 L 221.34935,100.73732 255.9537,68.284552 c 2.9584,-2.807333 2.9584,-7.355212 0,-10.134471 z M 251.17244,63.79282 221.34935,91.781927 201.89561,73.506191 231.68882,45.48901 c 0.20918,-0.140367 0.38847,-0.224587 0.62754,-0.224587 0.23906,0 0.44824,0.08422 0.59765,0.224587 l 18.25843,17.152803 c 0,0 0.23906,0.33688 0.23906,0.561467 0,0.224586 -0.0896,0.4211 -0.23906,0.58954 z" style="stroke-width:2.8964;stroke-opacity:1" /> <path d="m 48.626421,116.87948 10.578532,23.10435 c 0.83672,1.82477 3.615826,1.85284 4.452546,0 l 10.937126,-23.52545 c 2.629692,-5.69888 7.470715,-10.24676 13.536935,-12.71722 l 25.07172,-10.274833 c 1.94239,-0.786053 1.94239,-3.396873 0,-4.182926 L 88.13156,79.008563 C 82.06534,76.53811 77.224317,71.990231 74.594625,66.291346 L 63.657499,42.737824 c -0.83672,-1.824766 -3.615826,-1.824766 -4.452546,0 L 48.267826,66.291346 C 45.638135,71.990231 40.797112,76.53811 34.730891,79.008563 L 9.6292894,89.311474 c -1.9423859,0.786054 -1.9423859,3.3688 0,4.182926 l 25.5498446,10.61172 c 6.036338,2.49852 10.847478,7.07448 13.477169,12.77336 z" style="stroke-width:2.8964;fill-opacity:1;stroke-opacity:1" /> <path d="m 111.79878,33.136746 13.56682,5.642739 c 3.19747,1.319446 5.76739,3.761826 7.14201,6.793745 l 5.61797,12.268044 c 0.44825,0.982567 1.91251,0.982567 2.36075,0 l 5.79727,-12.492631 c 1.4045,-3.031919 3.97442,-5.446225 7.20177,-6.765672 l 13.29788,-5.446225 c 1.0459,-0.4211 1.0459,-1.796693 0,-2.217793 l -13.29788,-5.446225 c -3.22735,-1.319447 -5.79727,-3.733753 -7.20177,-6.765672 L 140.48633,6.2144248 c -0.44824,-0.9825664 -1.9125,-0.9825664 -2.36075,0 l -5.79727,12.4926312 c -1.4045,3.031919 -3.97442,5.446225 -7.20177,6.765672 l -13.32776,5.474298 c -1.01601,0.4211 -1.0459,1.796693 0,2.217793 z" style="stroke-width:2.8964;fill-opacity:1" /> <path d="m 233.09331,192.98627 -14.13459,-5.7831 c -3.40665,-1.40367 -6.12599,-3.95834 -7.62013,-7.1587 l -6.15587,-13.27868 c -0.47813,-1.03872 -2.03203,-1.03872 -2.51016,0 l -6.15587,13.27868 c -1.49414,3.20036 -4.21348,5.75503 -7.62013,7.1587 l -14.13459,5.81118 c -1.10567,0.44917 -1.10567,1.90898 0,2.35816 l 14.40354,5.97961 c 3.40664,1.40367 6.12598,3.98642 7.59024,7.21485 l 5.97658,13.02602 c 0.47812,1.03872 2.03203,1.03872 2.51016,0 l 6.15586,-13.25061 c 1.49415,-3.20036 4.21349,-5.75503 7.62013,-7.1587 l 14.1346,-5.7831 c 1.10566,-0.44917 1.10566,-1.90899 0,-2.35816 z" style="stroke-width:2.8964;stroke-opacity:1" /> </svg>`;
          }, 1916: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24"> <g transform="scale(1.2 1.2) translate(-2 -0.5)"> <path d="M 22,12.5 A 1.49995,1.49995 0 0 0 20.50006,11 H 20 V 10 A 3,3 0 0 0 17,7 H 13 V 5.7226 a 2,2 0 1 0 -2,0 V 7 H 7 a 3,3 0 0 0 -3,3 v 1 H 3.49994 a 1.5,1.5 0 0 0 0,3 H 4 v 1 A 3.00128,3.00128 0 0 0 6.20251,17.89282 1.03113,1.03113 0 0 1 7,18.86975 v 0.716 a 0.99928,0.99928 0 0 0 1.00726,1.002 0.9792,0.9792 0 0 0 0.69983,-0.29486 l 2,-2 A 1,1 0 0 1 11.41425,18 H 17 a 3,3 0 0 0 3,-3 v -1 h 0.50006 A 1.49995,1.49995 0 0 0 22,12.5 Z M 19,15 a 2.00226,2.00226 0 0 1 -2,2 H 11.41425 A 1.987,1.987 0 0 0 10,17.58575 l -2,2 v -0.716 A 2.02082,2.02082 0 0 0 6.46771,16.92865 2.00439,2.00439 0 0 1 5,15 V 10 A 2.00226,2.00226 0 0 1 7,8 h 10 a 2.00222,2.00222 0 0 1 2,2 z M 10,12.5 A 1.5,1.5 0 1 1 8.5,11 1.5,1.5 0 0 1 10,12.5 Z m 7,0 A 1.5,1.5 0 1 1 15.5,11 1.5,1.5 0 0 1 17,12.5 Z"/> </g> </svg>`;
          }, 52450: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M747 1521q74 32 140 32 376 0 376-335 0-114-41-180-27-44-61.5-74t-67.5-46.5-80.5-25-84-10.5-94.5-2q-73 0-101 10 0 53-.5 159t-.5 158q0 8-1 67.5t-.5 96.5 4.5 83.5 12 66.5zm-14-746q42 7 109 7 82 0 143-13t110-44.5 74.5-89.5 25.5-142q0-70-29-122.5t-79-82-108-43.5-124-14q-50 0-130 13 0 50 4 151t4 152q0 27-.5 80t-.5 79q0 46 1 69zm-541 889l2-94q15-4 85-16t106-27q7-12 12.5-27t8.5-33.5 5.5-32.5 3-37.5.5-34v-65.5q0-982-22-1025-4-8-22-14.5t-44.5-11-49.5-7-48.5-4.5-30.5-3l-4-83q98-2 340-11.5t373-9.5q23 0 68.5.5t67.5.5q70 0 136.5 13t128.5 42 108 71 74 104.5 28 137.5q0 52-16.5 95.5t-39 72-64.5 57.5-73 45-84 40q154 35 256.5 134t102.5 248q0 100-35 179.5t-93.5 130.5-138 85.5-163.5 48.5-176 14q-44 0-132-3t-132-3q-106 0-307 11t-231 12z"/> </svg>`;
          }, 41111: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M384 1662l17-85q6-2 81.5-21.5t111.5-37.5q28-35 41-101 1-7 62-289t114-543.5 52-296.5v-25q-24-13-54.5-18.5t-69.5-8-58-5.5l19-103q33 2 120 6.5t149.5 7 120.5 2.5q48 0 98.5-2.5t121-7 98.5-6.5q-5 39-19 89-30 10-101.5 28.5t-108.5 33.5q-8 19-14 42.5t-9 40-7.5 45.5-6.5 42q-27 148-87.5 419.5t-77.5 355.5q-2 9-13 58t-20 90-16 83.5-6 57.5l1 18q17 4 185 31-3 44-16 99-11 0-32.5 1.5t-32.5 1.5q-29 0-87-10t-86-10q-138-2-206-2-51 0-143 9t-121 11z"/> </svg>`;
          }, 49972: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1760 896q14 0 23 9t9 23v64q0 14-9 23t-23 9h-1728q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h1728zm-1277-64q-28-35-51-80-48-97-48-188 0-181 134-309 133-127 393-127 50 0 167 19 66 12 177 48 10 38 21 118 14 123 14 183 0 18-5 45l-12 3-84-6-14-2q-50-149-103-205-88-91-210-91-114 0-182 59-67 58-67 146 0 73 66 140t279 129q69 20 173 66 58 28 95 52h-743zm507 256h411q7 39 7 92 0 111-41 212-23 55-71 104-37 35-109 81-80 48-153 66-80 21-203 21-114 0-195-23l-140-40q-57-16-72-28-8-8-8-22v-13q0-108-2-156-1-30 0-68l2-37v-44l102-2q15 34 30 71t22.5 56 12.5 27q35 57 80 94 43 36 105 57 59 22 132 22 64 0 139-27 77-26 122-86 47-61 47-129 0-84-81-157-34-29-137-71z"/> </svg>`;
          }, 45062: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm639 217v206h-514l-4-27q-3-45-3-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 80-65 188-65 110 0 178 59.5t68 158.5q0 66-34.5 118.5t-84 86-99.5 62.5-87 63-41 73h232v-80h126z"/> </svg>`;
          }, 18605: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1025 1369v167h-248l-159-252-24-42q-8-9-11-21h-3l-9 21q-10 20-25 44l-155 250h-258v-167h128l197-291-185-272h-137v-168h276l139 228q2 4 23 42 8 9 11 21h3q3-9 11-21l25-42 140-228h257v168h-125l-184 267 204 296h109zm637-679v206h-514l-3-27q-4-28-4-46 0-64 26-117t65-86.5 84-65 84-54.5 65-54 26-64q0-38-29.5-62.5t-70.5-24.5q-51 0-97 39-14 11-36 38l-105-92q26-37 63-66 83-65 188-65 110 0 178 59.5t68 158.5q0 56-24.5 103t-62 76.5-81.5 58.5-82 50.5-65.5 51.5-30.5 63h232v-80h126z"/> </svg>`;
          }, 83389: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M176 223q-37-2-45-4l-3-88q13-1 40-1 60 0 112 4 132 7 166 7 86 0 168-3 116-4 146-5 56 0 86-2l-1 14 2 64v9q-60 9-124 9-60 0-79 25-13 14-13 132 0 13 .5 32.5t.5 25.5l1 229 14 280q6 124 51 202 35 59 96 92 88 47 177 47 104 0 191-28 56-18 99-51 48-36 65-64 36-56 53-114 21-73 21-229 0-79-3.5-128t-11-122.5-13.5-159.5l-4-59q-5-67-24-88-34-35-77-34l-100 2-14-3 2-86h84l205 10q76 3 196-10l18 2q6 38 6 51 0 7-4 31-45 12-84 13-73 11-79 17-15 15-15 41 0 7 1.5 27t1.5 31q8 19 22 396 6 195-15 304-15 76-41 122-38 65-112 123-75 57-182 89-109 33-255 33-167 0-284-46-119-47-179-122-61-76-83-195-16-80-16-237v-333q0-188-17-213-25-36-147-39zm1488 1409v-64q0-14-9-23t-23-9h-1472q-14 0-23 9t-9 23v64q0 14 9 23t23 9h1472q14 0 23-9t9-23z"/> </svg>`;
          }, 93267: function(t4) {
            t4.exports = '<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M36 4h-24c-2.21 0-4 1.79-4 4v32c0 2.21 1.79 4 4 4h24c2.21 0 4-1.79 4-4v-32c0-2.21-1.79-4-4-4zm-24 4h10v16l-5-3-5 3v-16z"/> </svg>';
          }, 71948: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M832 1408l336-384h-768l-336 384h768zm1013-1077q15 34 9.5 71.5t-30.5 65.5l-896 1024q-38 44-96 44h-768q-38 0-69.5-20.5t-47.5-54.5q-15-34-9.5-71.5t30.5-65.5l896-1024q38-44 96-44h768q38 0 69.5 20.5t47.5 54.5z"/> </svg>`;
          }, 51457: function(t4) {
            t4.exports = '<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <path d="M24.89,6.61H22.31V4.47A2.47,2.47,0,0,0,19.84,2H6.78A2.47,2.47,0,0,0,4.31,4.47V22.92a2.47,2.47,0,0,0,2.47,2.47H9.69V27.2a2.8,2.8,0,0,0,2.8,2.8h12.4a2.8,2.8,0,0,0,2.8-2.8V9.41A2.8,2.8,0,0,0,24.89,6.61ZM6.78,23.52a.61.61,0,0,1-.61-.6V4.47a.61.61,0,0,1,.61-.6H19.84a.61.61,0,0,1,.61.6V6.61h-8a2.8,2.8,0,0,0-2.8,2.8V23.52Zm19,3.68a.94.94,0,0,1-.94.93H12.49a.94.94,0,0,1-.94-.93V9.41a.94.94,0,0,1,.94-.93h12.4a.94.94,0,0,1,.94.93Z"/> <path d="M23.49,13.53h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,17.37h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z"/> <path d="M23.49,21.22h-9.6a.93.93,0,1,0,0,1.86h9.6a.93.93,0,1,0,0-1.86Z"/> </svg>';
          }, 23602: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M960 896q26 0 45 19t19 45-19 45-45 19-45-19-19-45 19-45 45-19zm300 64l507 398q28 20 25 56-5 35-35 51l-128 64q-13 7-29 7-17 0-31-8l-690-387-110 66q-8 4-12 5 14 49 10 97-7 77-56 147.5t-132 123.5q-132 84-277 84-136 0-222-78-90-84-79-207 7-76 56-147t131-124q132-84 278-84 83 0 151 31 9-13 22-22l122-73-122-73q-13-9-22-22-68 31-151 31-146 0-278-84-82-53-131-124t-56-147q-5-59 15.5-113t63.5-93q85-79 222-79 145 0 277 84 83 52 132 123t56 148q4 48-10 97 4 1 12 5l110 66 690-387q14-8 31-8 16 0 29 7l128 64q30 16 35 51 3 36-25 56zm-681-260q46-42 21-108t-106-117q-92-59-192-59-74 0-113 36-46 42-21 108t106 117q92 59 192 59 74 0 113-36zm-85 745q81-51 106-117t-21-108q-39-36-113-36-100 0-192 59-81 51-106 117t21 108q39 36 113 36 100 0 192-59zm178-613l96 58v-11q0-36 33-56l14-8-79-47-26 26q-3 3-10 11t-12 12q-2 2-4 3.5t-3 2.5zm224 224l96 32 736-576-128-64-768 431v113l-160 96 9 8q2 2 7 6 4 4 11 12t11 12l26 26zm704 416l128-64-520-408-177 138q-2 3-13 7z"/> </svg>`;
          }, 86899: function(t4) {
            t4.exports = '<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path stroke-width="0" d="M10.5 20H2a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h1V3l2.03-.4a3 3 0 0 1 5.94 0L13 3v1h1a2 2 0 0 1 2 2v1h-2V6h-1v1H3V6H2v12h5v2h3.5zM8 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm2 4h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2zm0 2v8h8v-8h-8z"/> </svg>';
          }, 95320: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 18 18"> <g fill-rule="evenodd" stroke="none" stroke-width="1"> <g transform="translate(-381.000000, -381.000000)"> <g transform="translate(381.000000, 381.000000)"> <path d="M0,2 L2,2 L2,0 C0.9,0 0,0.9 0,2 L0,2 Z M0,10 L2,10 L2,8 L0,8 L0,10 L0,10 Z M4,18 L6,18 L6,16 L4,16 L4,18 L4,18 Z M0,6 L2,6 L2,4 L0,4 L0,6 L0,6 Z M10,0 L8,0 L8,2 L10,2 L10,0 L10,0 Z M16,0 L16,2 L18,2 C18,0.9 17.1,0 16,0 L16,0 Z M2,18 L2,16 L0,16 C0,17.1 0.9,18 2,18 L2,18 Z M0,14 L2,14 L2,12 L0,12 L0,14 L0,14 Z M6,0 L4,0 L4,2 L6,2 L6,0 L6,0 Z M8,18 L10,18 L10,16 L8,16 L8,18 L8,18 Z M16,10 L18,10 L18,8 L16,8 L16,10 L16,10 Z M16,18 C17.1,18 18,17.1 18,16 L16,16 L16,18 L16,18 Z M16,6 L18,6 L18,4 L16,4 L16,6 L16,6 Z M16,14 L18,14 L18,12 L16,12 L16,14 L16,14 Z M12,18 L14,18 L14,16 L12,16 L12,18 L12,18 Z M12,2 L14,2 L14,0 L12,0 L12,2 L12,2 Z M4,14 L14,14 L14,4 L4,4 L4,14 L4,14 Z M6,6 L12,6 L12,12 L6,12 L6,6 L6,6 Z"/> </g> </g> </g> </svg>`;
          }, 45674: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M896 1152q0-36-20-69-1-1-15.5-22.5t-25.5-38-25-44-21-50.5q-4-16-21-16t-21 16q-7 23-21 50.5t-25 44-25.5 38-15.5 22.5q-20 33-20 69 0 53 37.5 90.5t90.5 37.5 90.5-37.5 37.5-90.5zm512-128q0 212-150 362t-362 150-362-150-150-362q0-145 81-275 6-9 62.5-90.5t101-151 99.5-178 83-201.5q9-30 34-47t51-17 51.5 17 33.5 47q28 93 83 201.5t99.5 178 101 151 62.5 90.5q81 127 81 275z"/> </svg>`;
          }, 3843: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 16 16"> <path stroke-width="0" d="M16 9v-6h-3v-1c0-0.55-0.45-1-1-1h-11c-0.55 0-1 0.45-1 1v3c0 0.55 0.45 1 1 1h11c0.55 0 1-0.45 1-1v-1h2v4h-9v2h-0.5c-0.276 0-0.5 0.224-0.5 0.5v5c0 0.276 0.224 0.5 0.5 0.5h2c0.276 0 0.5-0.224 0.5-0.5v-5c0-0.276-0.224-0.5-0.5-0.5h-0.5v-1h9zM12 3h-11v-1h11v1z"/> </svg>`;
          }, 48842: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M789 559l-170 450q33 0 136.5 2t160.5 2q19 0 57-2-87-253-184-452zm-725 1105l2-79q23-7 56-12.5t57-10.5 49.5-14.5 44.5-29 31-50.5l237-616 280-724h128q8 14 11 21l205 480q33 78 106 257.5t114 274.5q15 34 58 144.5t72 168.5q20 45 35 57 19 15 88 29.5t84 20.5q6 38 6 57 0 4-.5 13t-.5 13q-63 0-190-8t-191-8q-76 0-215 7t-178 8q0-43 4-78l131-28q1 0 12.5-2.5t15.5-3.5 14.5-4.5 15-6.5 11-8 9-11 2.5-14q0-16-31-96.5t-72-177.5-42-100l-450-2q-26 58-76.5 195.5t-50.5 162.5q0 22 14 37.5t43.5 24.5 48.5 13.5 57 8.5 41 4q1 19 1 58 0 9-2 27-58 0-174.5-10t-174.5-10q-8 0-26.5 4t-21.5 4q-80 14-188 14z"/> </svg>`;
          }, 25501: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1744 1408q33 0 42 18.5t-11 44.5l-126 162q-20 26-49 26t-49-26l-126-162q-20-26-11-44.5t42-18.5h80v-1024h-80q-33 0-42-18.5t11-44.5l126-162q20-26 49-26t49 26l126 162q20 26 11 44.5t-42 18.5h-80v1024h80zm-1663-1279l54 27q12 5 211 5 44 0 132-2t132-2q36 0 107.5.5t107.5.5h293q6 0 21 .5t20.5 0 16-3 17.5-9 15-17.5l42-1q4 0 14 .5t14 .5q2 112 2 336 0 80-5 109-39 14-68 18-25-44-54-128-3-9-11-48t-14.5-73.5-7.5-35.5q-6-8-12-12.5t-15.5-6-13-2.5-18-.5-16.5.5q-17 0-66.5-.5t-74.5-.5-64 2-71 6q-9 81-8 136 0 94 2 388t2 455q0 16-2.5 71.5t0 91.5 12.5 69q40 21 124 42.5t120 37.5q5 40 5 50 0 14-3 29l-34 1q-76 2-218-8t-207-10q-50 0-151 9t-152 9q-3-51-3-52v-9q17-27 61.5-43t98.5-29 78-27q19-42 19-383 0-101-3-303t-3-303v-117q0-2 .5-15.5t.5-25-1-25.5-3-24-5-14q-11-12-162-12-33 0-93 12t-80 26q-19 13-34 72.5t-31.5 111-42.5 53.5q-42-26-56-44v-383z"/> </svg>`;
          }, 29348: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M1534 189v73q0 29-18.5 61t-42.5 32q-50 0-54 1-26 6-32 31-3 11-3 64v1152q0 25-18 43t-43 18h-108q-25 0-43-18t-18-43v-1218h-143v1218q0 25-17.5 43t-43.5 18h-108q-26 0-43.5-18t-17.5-43v-496q-147-12-245-59-126-58-192-179-64-117-64-259 0-166 88-286 88-118 209-159 111-37 417-37h479q25 0 43 18t18 43z"/></svg>`;
          }, 24772: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24"> <path stroke-width="0" d="M22,20.6L3.4,2H8V0H0v8h2V3.4L20.6,22H16v2h8v-8h-2V20.6z M16,0v2h4.7l-6.3,6.3l1.4,1.4L22,3.5V8h2V0H16z M8.3,14.3L2,20.6V16H0v8h8v-2H3.5l6.3-6.3L8.3,14.3z"/> </svg>`;
          }, 66547: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M896 960v448q0 26-19 45t-45 19-45-19l-144-144-332 332q-10 10-23 10t-23-10l-114-114q-10-10-10-23t10-23l332-332-144-144q-19-19-19-45t19-45 45-19h448q26 0 45 19t19 45zm755-672q0 13-10 23l-332 332 144 144q19 19 19 45t-19 45-45 19h-448q-26 0-45-19t-19-45v-448q0-26 19-45t45-19 45 19l144 144 332-332q10-10 23-10t23 10l114 114q10 10 10 23z"/> </svg>`;
          }, 89097: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1600 736v192q0 40-28 68t-68 28h-1216q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h1216q40 0 68 28t28 68z"/> </svg>`;
          }, 64831: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M576 576q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1024 384v448h-1408v-192l320-320 160 160 512-512zm96-704h-1600q-13 0-22.5 9.5t-9.5 22.5v1216q0 13 9.5 22.5t22.5 9.5h1600q13 0 22.5-9.5t9.5-22.5v-1216q0-13-9.5-22.5t-22.5-9.5zm160 32v1216q0 66-47 113t-113 47h-1600q-66 0-113-47t-47-113v-1216q0-66 47-113t113-47h1600q66 0 113 47t47 113z"/> </svg>`;
          }, 67176: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M352 832q0 14-9 23l-288 288q-9 9-23 9-13 0-22.5-9.5t-9.5-22.5v-576q0-13 9.5-22.5t22.5-9.5q14 0 23 9l288 288q9 9 9 23zm1440 480v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>`;
          }, 14017: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M384 544v576q0 13-9.5 22.5t-22.5 9.5q-14 0-23-9l-288-288q-9-9-9-23t9-23l288-288q9-9 23-9 13 0 22.5 9.5t9.5 22.5zm1408 768v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1088q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1088q13 0 22.5 9.5t9.5 22.5zm0-384v192q0 13-9.5 22.5t-22.5 9.5h-1728q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1728q13 0 22.5 9.5t9.5 22.5z"/> </svg>`;
          }, 38681: function(t4) {
            t4.exports = '<svg viewBox="0 0 18.151 18.151" xmlns="http://www.w3.org/2000/svg"> <g> <path stroke-width="0" d="M6.237,16.546H3.649V1.604h5.916v5.728c0.474-0.122,0.968-0.194,1.479-0.194 c0.042,0,0.083,0.006,0.125,0.006V0H2.044v18.15h5.934C7.295,17.736,6.704,17.19,6.237,16.546z"/> <path stroke-width="0" d="M11.169,8.275c-2.723,0-4.938,2.215-4.938,4.938s2.215,4.938,4.938,4.938s4.938-2.215,4.938-4.938 S13.892,8.275,11.169,8.275z M11.169,16.81c-1.983,0-3.598-1.612-3.598-3.598c0-1.983,1.614-3.597,3.598-3.597 s3.597,1.613,3.597,3.597C14.766,15.198,13.153,16.81,11.169,16.81z"/> <polygon stroke-width="0" points="11.792,11.073 10.502,11.073 10.502,12.578 9.03,12.578 9.03,13.868 10.502,13.868 10.502,15.352 11.792,15.352 11.792,13.868 13.309,13.868 13.309,12.578 11.792,12.578 "/> </g> </svg>';
          }, 64637: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 432 432"> <g> <polygon points="203.688,96 0,96 0,144 155.688,144 "/> <polygon points="155.719,288 0,288 0,336 203.719,336 "/> <path d="M97.844,230.125c-3.701-3.703-5.856-8.906-5.856-14.141s2.154-10.438,5.856-14.141l9.844-9.844H0v48h107.719 L97.844,230.125z"/> <polygon points="232,176 232,96 112,216 232,336 232,256 432,256 432,176"/> </g> </svg>`;
          }, 94190: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 312 312"> <g transform="translate(0.000000,312.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M50 3109 c0 -7 -11 -22 -25 -35 l-25 -23 0 -961 0 -961 32 -29 32 -30 501 -2 500 -3 3 -502 2 -502 31 -30 31 -31 958 0 958 0 23 25 c13 13 30 25 37 25 9 0 12 199 12 960 0 686 -3 960 -11 960 -6 0 -24 12 -40 28 l-29 27 -503 5 -502 5 -5 502 -5 503 -28 29 c-15 16 -27 34 -27 40 0 8 -274 11 -960 11 -710 0 -960 -3 -960 -11z m1738 -698 l2 -453 -40 -40 c-22 -22 -40 -43 -40 -47 0 -4 36 -42 79 -85 88 -87 82 -87 141 -23 l26 27 455 -2 454 -3 0 -775 0 -775 -775 0 -775 0 -3 450 -2 449 47 48 47 48 -82 80 c-44 44 -84 80 -87 80 -3 0 -25 -18 -48 -40 l-41 -40 -456 2 -455 3 -3 765 c-1 421 0 771 3 778 3 10 164 12 777 10 l773 -3 3 -454z"/> <path d="M607 2492 c-42 -42 -77 -82 -77 -87 0 -6 86 -96 190 -200 105 -104 190 -197 190 -205 0 -8 -41 -56 -92 -107 -65 -65 -87 -94 -77 -98 8 -3 138 -4 289 -3 l275 3 3 275 c1 151 0 281 -3 289 -4 10 -35 -14 -103 -82 -54 -53 -103 -97 -109 -97 -7 0 -99 88 -206 195 -107 107 -196 195 -198 195 -3 0 -39 -35 -82 -78z"/> <path d="M1470 1639 c-47 -49 -87 -91 -89 -94 -5 -6 149 -165 160 -165 9 0 189 179 189 188 0 12 -154 162 -165 161 -6 0 -48 -41 -95 -90z"/> <path d="M1797 1303 c-9 -8 -9 -568 0 -576 4 -4 50 36 103 88 54 52 101 95 106 95 5 0 95 -85 199 -190 104 -104 194 -190 200 -190 6 0 46 36 90 80 l79 79 -197 196 c-108 108 -197 199 -197 203 0 4 45 52 99 106 55 55 98 103 95 108 -6 10 -568 11 -577 1z"/> </g> </svg>`;
          }, 51957: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 48 48"> <path d="M6 42h4v-4h-4v4zm4-28h-4v4h4v-4zm-4 20h4v-4h-4v4zm8 8h4v-4h-4v4zm-4-36h-4v4h4v-4zm8 0h-4v4h4v-4zm16 0h-4v4h4v-4zm-8 8h-4v4h4v-4zm0-8h-4v4h4v-4zm12 28h4v-4h-4v4zm-16 8h4v-4h-4v4zm-16-16h36v-4h-36v4zm32-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-16 16h4v-4h-4v4zm8 8h4v-4h-4v4zm8 0h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg>`;
          }, 71940: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 48 48"> <path d="M6 18h4v-4h-4v4zm0-8h4v-4h-4v4zm8 32h4v-4h-4v4zm0-16h4v-4h-4v4zm-8 0h4v-4h-4v4zm0 16h4v-4h-4v4zm0-8h4v-4h-4v4zm8-24h4v-4h-4v4zm24 24h4v-4h-4v4zm-16 8h4v-36h-4v36zm16 0h4v-4h-4v4zm0-16h4v-4h-4v4zm0-20v4h4v-4h-4zm0 12h4v-4h-4v4zm-8-8h4v-4h-4v4zm0 32h4v-4h-4v4zm0-16h4v-4h-4v4z"/> <path d="M0 0h48v48h-48z" fill="none"/> </svg>`;
          }, 48007: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm-1280-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm1280 512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h960q40 0 68 28t28 68z"/> </svg>`;
          }, 43218: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M512 1248v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm-640-1024v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm640 512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68zm0-512v192q0 40-28 68t-68 28h-320q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h320q40 0 68 28t28 68z"/> </svg>`;
          }, 80515: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45z"/> </svg>`;
          }, 223: function(t4) {
            t4.exports = '<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <path d="M5.09668 6.99707H7.17358L4.17358 3.99707L1.17358 6.99707H3.09668V17.0031H1.15881L4.15881 20.0031L7.15881 17.0031H5.09668V6.99707Z"/> <path d="M22.8412 7H8.84119V5H22.8412V7Z"/> <path d="M22.8412 11H8.84119V9H22.8412V11Z"/> <path d="M8.84119 15H22.8412V13H8.84119V15Z"/> <path d="M22.8412 19H8.84119V17H22.8412V19Z"/> </svg>';
          }, 95032: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/> </svg>`;
          }, 73533: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M503 1271l-256 256q-10 9-23 9-12 0-23-9-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23zm169 41v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm-224-224q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm1264 128q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-334-335q-21-21-42-56l239-18 273 274q27 27 68 27.5t68-26.5l147-146q28-28 28-67 0-40-28-68l-274-275 18-239q35 21 56 42l336 336q84 86 84 204zm-617-724l-239 18-273-274q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l274 274-18 240q-35-21-56-42l-336-336q-84-86-84-204 0-120 85-203l147-146q83-83 203-83 121 0 204 85l334 335q21 21 42 56zm633 84q0 14-9 23t-23 9h-320q-14 0-23-9t-9-23 9-23 23-9h320q14 0 23 9t9 23zm-544-544v320q0 14-9 23t-23 9-23-9-9-23v-320q0-14 9-23t23-9 23 9 9 23zm407 151l-256 256q-11 9-23 9t-23-9q-9-10-9-23t9-23l256-256q10-9 23-9t23 9q9 10 9 23t-9 23z"/> </svg>`;
          }, 40037: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M381 1620q0 80-54.5 126t-135.5 46q-106 0-172-66l57-88q49 45 106 45 29 0 50.5-14.5t21.5-42.5q0-64-105-56l-26-56q8-10 32.5-43.5t42.5-54 37-38.5v-1q-16 0-48.5 1t-48.5 1v53h-106v-152h333v88l-95 115q51 12 81 49t30 88zm2-627v159h-362q-6-36-6-54 0-51 23.5-93t56.5-68 66-47.5 56.5-43.5 23.5-45q0-25-14.5-38.5t-39.5-13.5q-46 0-81 58l-85-59q24-51 71.5-79.5t105.5-28.5q73 0 123 41.5t50 112.5q0 50-34 91.5t-75 64.5-75.5 50.5-35.5 52.5h127v-60h105zm1409 319v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm-1408-899v99h-335v-99h107q0-41 .5-122t.5-121v-12h-2q-8 17-50 54l-71-76 136-127h106v404h108zm1408 387v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-14 9-23t23-9h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg>`;
          }, 83207: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path stroke-width="0" d="M384 1408q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm0-512q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm-1408-928q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm1408 416v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5zm0-512v192q0 13-9.5 22.5t-22.5 9.5h-1216q-13 0-22.5-9.5t-9.5-22.5v-192q0-13 9.5-22.5t22.5-9.5h1216q13 0 22.5 9.5t9.5 22.5z"/> </svg>`;
          }, 59827: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M448 1536h896v-256h-896v256zm0-640h896v-384h-160q-40 0-68-28t-28-68v-160h-640v640zm1152 64q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128 0v416q0 13-9.5 22.5t-22.5 9.5h-224v160q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-160h-224q-13 0-22.5-9.5t-9.5-22.5v-416q0-79 56.5-135.5t135.5-56.5h64v-544q0-40 28-68t68-28h672q40 0 88 20t76 48l152 152q28 28 48 76t20 88v256h64q79 0 135.5 56.5t56.5 135.5z"/> </svg>`;
          }, 34045: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1664 256v448q0 26-19 45t-45 19h-448q-42 0-59-40-17-39 14-69l138-138q-148-137-349-137-104 0-198.5 40.5t-163.5 109.5-109.5 163.5-40.5 198.5 40.5 198.5 109.5 163.5 163.5 109.5 198.5 40.5q119 0 225-52t179-147q7-10 23-12 14 0 25 9l137 138q9 8 9.5 20.5t-7.5 22.5q-109 132-264 204.5t-327 72.5q-156 0-298-61t-245-164-164-245-61-298 61-298 164-245 245-164 298-61q147 0 284.5 55.5t244.5 156.5l130-129q29-31 70-14 39 17 39 59z"/> </svg>`;
          }, 39199: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1664 896q0 156-61 298t-164 245-245 164-298 61q-172 0-327-72.5t-264-204.5q-7-10-6.5-22.5t8.5-20.5l137-138q10-9 25-9 16 2 23 12 73 95 179 147t225 52q104 0 198.5-40.5t163.5-109.5 109.5-163.5 40.5-198.5-40.5-198.5-109.5-163.5-163.5-109.5-198.5-40.5q-98 0-188 35.5t-160 101.5l137 138q31 30 14 69-17 40-59 40h-448q-26 0-45-19t-19-45v-448q0-42 40-59 39-17 69 14l130 129q107-101 244.5-156.5t284.5-55.5q156 0 298 61t245 164 164 245 61 298z"/> </svg>`;
          }, 21917: function(t4) {
            t4.exports = '<svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"> <path clip-rule="evenodd" d="M306.39,154.09c19.628,4.543,35.244,21.259,39.787,39.523 c1.551,8.54,8.998,14.989,17.904,14.989c9.991,0,18.168-8.175,18.168-18.17c0-13.083-10.991-32.98-25.985-47.881 c-14.719-14.537-32.252-24.802-46.695-24.802c-9.991,0-18.172,8.45-18.172,18.446C291.396,145.094,297.847,152.546,306.39,154.09z M56.629,392.312c-14.09,14.08-14.09,36.979,0,51.059c14.08,14.092,36.981,14.092,50.965,0l104.392-104.303 c24.347,15.181,53.062,23.991,83.953,23.991c87.857,0,158.995-71.142,158.995-158.999c0-87.854-71.138-158.995-158.995-158.995 c-87.856,0-158.995,71.141-158.995,158.995c0,30.802,8.819,59.606,23.992,83.953L56.629,392.312z M182.371,204.06 c0-62.687,50.875-113.568,113.568-113.568s113.569,50.881,113.569,113.568c0,62.694-50.876,113.569-113.569,113.569 S182.371,266.754,182.371,204.06z" fill-rule="evenodd"/> </svg>';
          }, 9103: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M553 1399l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23t-10 23l-393 393 393 393q10 10 10 23t-10 23zm591-1067l-373 1291q-4 13-15.5 19.5t-23.5 2.5l-62-17q-13-4-19.5-15.5t-2.5-24.5l373-1291q4-13 15.5-19.5t23.5-2.5l62 17q13 4 19.5 15.5t2.5 24.5zm657 651l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23t-10 23z"/> </svg>`;
          }, 22227: function(t4) {
            t4.exports = '<svg viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"> <path d="M8,11c1.657,0,3-1.343,3-3V3c0-1.657-1.343-3-3-3S5,1.343,5,3v5C5,9.657,6.343,11,8,11z"/> <path d="M13,8V6h-1l0,1.844c0,1.92-1.282,3.688-3.164,4.071C6.266,12.438,4,10.479,4,8V6H3v2c0,2.414,1.721,4.434,4,4.899V15H5v1h6 v-1H9v-2.101C11.279,12.434,13,10.414,13,8z"/> </svg>';
          }, 49989: function(t4) {
            t4.exports = '<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M24.89 32h4.18L18.86 6h-3.71L4.93 32h4.18l2.25-6h11.29l2.24 6zM12.86 22L17 10.95 21.14 22h-8.28zm30.31 1.17L27 39.34 19.66 32l-2.83 2.83L27 45l19-19-2.83-2.83z"/> </svg>';
          }, 81875: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 270 270"> <path d="m240.443652,220.45085l-47.410809,0l0,-10.342138c13.89973,-8.43655 25.752896,-19.844464 34.686646,-33.469923c11.445525,-17.455846 17.496072,-37.709239 17.496072,-58.570077c0,-59.589197 -49.208516,-108.068714 -109.693558,-108.068714s-109.69263,48.479517 -109.69263,108.069628c0,20.860839 6.050547,41.113316 17.497001,58.570077c8.93375,13.625459 20.787845,25.032458 34.686646,33.469008l0,10.342138l-47.412666,0c-10.256959,0 -18.571354,8.191376 -18.571354,18.296574c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.98402,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574l0,-39.496814c0,-7.073455 -4.137698,-13.51202 -10.626529,-16.537358c-25.24497,-11.772016 -41.557118,-37.145704 -41.557118,-64.643625c0,-39.411735 32.545369,-71.476481 72.549922,-71.476481c40.004553,0 72.550851,32.064746 72.550851,71.476481c0,27.497006 -16.312149,52.87161 -41.557118,64.643625c-6.487902,3.026253 -10.6256,9.464818 -10.6256,16.537358l0,39.496814c0,10.105198 8.314395,18.296574 18.571354,18.296574l65.982163,0c10.256959,0 18.571354,-8.191376 18.571354,-18.296574c0,-10.105198 -8.314395,-18.296574 -18.571354,-18.296574z"/> </svg>`;
          }, 67447: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M576 1376v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm-512-768v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm512 384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm0-384v-192q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v192q0 14 9 23t23 9h320q14 0 23-9t9-23zm128-320v1088q0 66-47 113t-113 47h-1344q-66 0-113-47t-47-113v-1088q0-66 47-113t113-47h1344q66 0 113 47t47 113z"/> </svg>`;
          }, 36339: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 352v1088q0 42-39 59-13 5-25 5-27 0-45-19l-403-403v166q0 119-84.5 203.5t-203.5 84.5h-704q-119 0-203.5-84.5t-84.5-203.5v-704q0-119 84.5-203.5t203.5-84.5h704q119 0 203.5 84.5t84.5 203.5v165l403-402q18-19 45-19 12 0 25 5 39 17 39 59z"/> </svg>`;
          }, 88497: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1395 736q0 13-10 23l-466 466q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l393 393 393-393q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg>`;
          }, 91882: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1203 544q0 13-10 23l-393 393 393 393q10 10 10 23t-10 23l-50 50q-10 10-23 10t-23-10l-466-466q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l50 50q10 10 10 23z"/> </svg>`;
          }, 14305: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1171 960q0 13-10 23l-466 466q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l393-393-393-393q-10-10-10-23t10-23l50-50q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg>`;
          }, 58446: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1395 1184q0 13-10 23l-50 50q-10 10-23 10t-23-10l-393-393-393 393q-10 10-23 10t-23-10l-50-50q-10-10-10-23t10-23l466-466q10-10 23-10t23 10l466 466q10 10 10 23z"/> </svg>`;
          }, 39858: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M704 1376v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm256 0v-704q0-14-9-23t-23-9h-64q-14 0-23 9t-9 23v704q0 14 9 23t23 9h64q14 0 23-9t9-23zm-544-992h448l-48-117q-7-9-17-11h-317q-10 2-17 11zm928 32v64q0 14-9 23t-23 9h-96v948q0 83-47 143.5t-113 60.5h-832q-66 0-113-58.5t-47-141.5v-952h-96q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h309l70-167q15-37 54-63t79-26h320q40 0 79 26t54 63l70 167h309q14 0 23 9t9 23z"/> </svg>`;
          }, 70881: function(t4) {
            t4.exports = '<svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"> <g stroke="none" stroke-width="1"> <path d="M14,1.4 L12.6,0 L7,5.6 L1.4,0 L0,1.4 L5.6,7 L0,12.6 L1.4,14 L7,8.4 L12.6,14 L14,12.6 L8.4,7 L14,1.4 Z"/> </g> </svg>';
          }, 60636: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h896q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1408q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1408q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-640q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h640q26 0 45 19t19 45z"/> </svg>`;
          }, 32013: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1472 930v318q0 119-84.5 203.5t-203.5 84.5h-832q-119 0-203.5-84.5t-84.5-203.5v-832q0-119 84.5-203.5t203.5-84.5h832q63 0 117 25 15 7 18 23 3 17-9 29l-49 49q-10 10-23 10-3 0-9-2-23-6-45-6h-832q-66 0-113 47t-47 113v832q0 66 47 113t113 47h832q66 0 113-47t47-113v-254q0-13 9-22l64-64q10-10 23-10 6 0 12 3 20 8 20 29zm231-489l-814 814q-24 24-57 24t-57-24l-430-430q-24-24-24-57t24-57l110-110q24-24 57-24t57 24l263 263 647-647q24-24 57-24t57 24l110 110q24 24 24 57t-24 57z"/> </svg>`;
          }, 45512: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 10 10"> <path d="M.941 4.523a.75.75 0 1 1 1.06-1.06l3.006 3.005 3.005-3.005a.75.75 0 1 1 1.06 1.06l-3.549 3.55a.75.75 0 0 1-1.168-.136L.941 4.523z"/> </svg>`;
          }, 80347: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 24 24" > <circle cx="12" cy="12" r="2.2"/> <circle cx="12" cy="5" r="2.2"/> <circle cx="12" cy="19" r="2.2"/> </svg>`;
          }, 95134: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z"/> </svg>`;
          }, 70697: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1152 512v-472q22 14 36 28l408 408q14 14 28 36h-472zm-128 32q0 40 28 68t68 28h544v1056q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h800v544z"/> </svg>`;
          }, 49983: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1728 608v704q0 92-66 158t-158 66h-1216q-92 0-158-66t-66-158v-960q0-92 66-158t158-66h320q92 0 158 66t66 158v32h672q92 0 158 66t66 158z"/> </svg>`;
          }, 98964: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1152 1376v-160q0-14-9-23t-23-9h-96v-512q0-14-9-23t-23-9h-320q-14 0-23 9t-9 23v160q0 14 9 23t23 9h96v320h-96q-14 0-23 9t-9 23v160q0 14 9 23t23 9h448q14 0 23-9t9-23zm-128-896v-160q0-14-9-23t-23-9h-192q-14 0-23 9t-9 23v160q0 14 9 23t23 9h192q14 0 23-9t9-23zm640 416q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z"/> </svg>`;
          }, 8136: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm256-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm-384-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg>`;
          }, 94806: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M640 768h512v-192q0-106-75-181t-181-75-181 75-75 181v192zm832 96v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h32v-192q0-184 132-316t316-132 316 132 132 316v192h32q40 0 68 28t28 68z"/></svg>`;
          }, 31365: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 32 32"> <path d="M27 4l-15 15-7-7-5 5 12 12 20-20z"/> </svg>`;
          }, 44636: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z"/></svg>`;
          }, 36327: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"><path d="M1600 736v192q0 40-28 68t-68 28h-416v416q0 40-28 68t-68 28h-192q-40 0-68-28t-28-68v-416h-416q-40 0-68-28t-28-68v-192q0-40 28-68t68-28h416v-416q0-40 28-68t68-28h192q40 0 68 28t28 68v416h416q40 0 68 28t28 68z"/></svg>`;
          }, 53328: function(t4) {
            t4.exports = '<svg viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"> <path d="M5.9814 11.8049C5.59087 11.4144 5.59087 10.7812 5.9814 10.3907L10.224 6.14806C10.6146 5.75754 11.2477 5.75754 11.6383 6.14806C12.0288 6.53859 12.0288 7.17175 11.6383 7.56228L7.39561 11.8049C7.00509 12.1954 6.37192 12.1954 5.9814 11.8049Z"/> <path d="M0.707107 12.0208C0.316582 11.6303 0.316582 10.9971 0.707107 10.6066L10.6066 0.707121C10.9971 0.316597 11.6303 0.316596 12.0208 0.707121C12.4113 1.09764 12.4113 1.73081 12.0208 2.12133L2.12132 12.0208C1.7308 12.4114 1.09763 12.4114 0.707107 12.0208Z"/> </svg>';
          }, 98711: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1792 1344v128q0 26-19 45t-45 19h-1664q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1664q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1280q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1280q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1536q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1536q26 0 45 19t19 45zm0-384v128q0 26-19 45t-45 19h-1152q-26 0-45-19t-19-45v-128q0-26 19-45t45-19h1152q26 0 45 19t19 45z"/> </svg>`;
          }, 53808: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M512 1536h768v-384h-768v384zm896 0h128v-896q0-14-10-38.5t-20-34.5l-281-281q-10-10-34-20t-39-10v416q0 40-28 68t-68 28h-576q-40 0-68-28t-28-68v-416h-128v1280h128v-416q0-40 28-68t68-28h832q40 0 68 28t28 68v416zm-384-928v-320q0-13-9.5-22.5t-22.5-9.5h-192q-13 0-22.5 9.5t-9.5 22.5v320q0 13 9.5 22.5t22.5 9.5h192q13 0 22.5-9.5t9.5-22.5zm640 32v928q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1344q0-40 28-68t68-28h928q40 0 88 20t76 48l280 280q28 28 48 76t20 88z"/> </svg>`;
          }, 20784: function(t4) {
            t4.exports = '<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path stroke="null" d="m42.276011,26.302547c0.098397,-0.76605 0.172194,-1.54407 0.172194,-2.33406s-0.073797,-1.56801 -0.172194,-2.33406l5.202718,-3.961917c0.467384,-0.359086 0.602679,-1.005441 0.29519,-1.532101l-4.919828,-8.29489c-0.307489,-0.51469 -0.947067,-0.730142 -1.500548,-0.51469l-6.125186,2.405877c-1.266856,-0.945594 -2.656707,-1.747553 -4.157255,-2.357999l-0.922468,-6.343855c-0.110696,-0.562568 -0.614979,-1.005441 -1.229957,-1.005441l-9.839656,0c-0.614979,0 -1.119261,0.442873 -1.217657,1.005441l-0.922468,6.343855c-1.500548,0.610446 -2.890399,1.400436 -4.157255,2.357999l-6.125186,-2.405877c-0.553481,-0.203482 -1.193058,0 -1.500548,0.51469l-4.919828,8.29489c-0.307489,0.51469 -0.172194,1.161045 0.29519,1.532101l5.190419,3.961917c-0.098397,0.76605 -0.172194,1.54407 -0.172194,2.33406s0.073797,1.56801 0.172194,2.33406l-5.190419,3.961917c-0.467384,0.359086 -0.602679,1.005441 -0.29519,1.532101l4.919828,8.29489c0.307489,0.51469 0.947067,0.730142 1.500548,0.51469l6.125186,-2.405877c1.266856,0.945594 2.656707,1.747553 4.157255,2.357999l0.922468,6.343855c0.098397,0.562568 0.602679,1.005441 1.217657,1.005441l9.839656,0c0.614979,0 1.119261,-0.442873 1.217657,-1.005441l0.922468,-6.343855c1.500548,-0.610446 2.890399,-1.400436 4.157255,-2.357999l6.125186,2.405877c0.553481,0.203482 1.193058,0 1.500548,-0.51469l4.919828,-8.29489c0.307489,-0.51469 0.172194,-1.161045 -0.29519,-1.532101l-5.190419,-3.961917zm-18.277162,6.044617c-4.759934,0 -8.609699,-3.746465 -8.609699,-8.378677s3.849766,-8.378677 8.609699,-8.378677s8.609699,3.746465 8.609699,8.378677s-3.849766,8.378677 -8.609699,8.378677z"/> </svg>';
          }, 70999: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1728 576v256q0 26-19 45t-45 19h-64q-26 0-45-19t-19-45v-256q0-106-75-181t-181-75-181 75-75 181v192h96q40 0 68 28t28 68v576q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-576q0-40 28-68t68-28h672v-192q0-185 131.5-316.5t316.5-131.5 316.5 131.5 131.5 316.5z"/> </svg>`;
          }, 45244: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1639 1056q0 5-1 7-64 268-268 434.5t-478 166.5q-146 0-282.5-55t-243.5-157l-129 129q-19 19-45 19t-45-19-19-45v-448q0-26 19-45t45-19h448q26 0 45 19t19 45-19 45l-137 137q71 66 161 102t187 36q134 0 250-65t186-179q11-17 53-117 8-23 30-23h192q13 0 22.5 9.5t9.5 22.5zm25-800v448q0 26-19 45t-45 19h-448q-26 0-45-19t-19-45 19-45l138-138q-148-137-349-137-134 0-250 65t-186 179q-11 17-53 117-8 23-30 23h-199q-13 0-22.5-9.5t-9.5-22.5v-7q65-268 270-434.5t480-166.5q146 0 284 55.5t245 156.5l130-129q19-19 45-19t45 19 19 45z"/> </svg>`;
          }, 99876: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1344 1472q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm256 0q0-26-19-45t-45-19-45 19-19 45 19 45 45 19 45-19 19-45zm128-224v320q0 40-28 68t-68 28h-1472q-40 0-68-28t-28-68v-320q0-40 28-68t68-28h427q21 56 70.5 92t110.5 36h256q61 0 110.5-36t70.5-92h427q40 0 68 28t28 68zm-325-648q-17 40-59 40h-256v448q0 26-19 45t-45 19h-256q-26 0-45-19t-19-45v-448h-256q-42 0-59-40-17-39 14-69l448-448q18-19 45-19t45 19l448 448q31 30 14 69z"/> </svg>`;
          }, 14006: function(t4) {
            t4.exports = `<svg xmlns='http://www.w3.org/2000/svg' viewBox="0 0 1792 1792"> <path d="M1216 320q0 26-19 45t-45 19h-128v1024h128q26 0 45 19t19 45-19 45l-256 256q-19 19-45 19t-45-19l-256-256q-19-19-19-45t19-45 45-19h128v-1024h-128q-26 0-45-19t-19-45 19-45l256-256q19-19 45-19t45 19l256 256q19 19 19 45z"/> </svg>`;
          }, 28712: function(t4) {
            t4.exports = { assert() {
            } };
          }, 31635: function(t4, e4, i3) {
            function o3(t5, e5, i4, o4) {
              var n2, r2 = arguments.length, s = 3 > r2 ? e5 : null === o4 ? o4 = Object.getOwnPropertyDescriptor(e5, i4) : o4;
              if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) s = Reflect.decorate(t5, e5, i4, o4);
              else for (var a2 = t5.length - 1; a2 >= 0; a2--) (n2 = t5[a2]) && (s = (3 > r2 ? n2(s) : r2 > 3 ? n2(e5, i4, s) : n2(e5, i4)) || s);
              return r2 > 3 && s && Object.defineProperty(e5, i4, s), s;
            }
            i3.d(e4, { Cg: function() {
              return o3;
            } }), "function" == typeof SuppressedError && SuppressedError;
          } }, e3 = {};
          function i2(o3) {
            var n2 = e3[o3];
            if (void 0 !== n2) return n2.exports;
            var r2 = e3[o3] = { exports: {} };
            return t3[o3](r2, r2.exports, i2), r2.exports;
          }
          i2.n = function(t4) {
            var e4 = t4 && t4.__esModule ? function() {
              return t4.default;
            } : function() {
              return t4;
            };
            return i2.d(e4, { a: e4 }), e4;
          }, i2.d = function(t4, e4) {
            for (var o3 in e4) i2.o(e4, o3) && !i2.o(t4, o3) && Object.defineProperty(t4, o3, { enumerable: true, get: e4[o3] });
          }, i2.o = function(t4, e4) {
            return Object.prototype.hasOwnProperty.call(t4, e4);
          }, i2.r = function(t4) {
            "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t4, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t4, "__esModule", { value: true });
          };
          var o2 = {};
          return function() {
            i2.r(o2), i2.d(o2, { CommitMode: function() {
              return d2;
            }, Jodit: function() {
              return a2.x;
            } });
            var t4 = i2(9823), e4 = (i2(88222), i2(17352)), n2 = i2(22664), r2 = i2(37435), s = i2(79721), a2 = i2(46173), l = i2(74470);
            Object.keys(e4).forEach((t5) => {
              a2.x[t5] = e4[t5];
            });
            const c = (t5) => "__esModule" !== t5;
            Object.keys(s).filter(c).forEach((t5) => {
              r2.Icon.set(t5.replace("_", "-"), s[t5]);
            }), Object.keys(r2).filter(c).forEach((e5) => {
              var i3;
              const o3 = r2[e5], n3 = (0, t4.Tn)(null === (i3 = o3.prototype) || void 0 === i3 ? void 0 : i3.className) ? o3.prototype.className() : e5;
              (0, t4.Kg)(n3) && (a2.x.modules[n3] = o3);
            }), Object.keys(n2).filter(c).forEach((t5) => {
              a2.x.decorators[t5] = n2[t5];
            }), ["Confirm", "Alert", "Prompt"].forEach((t5) => {
              a2.x[t5] = r2[t5];
            }), Object.keys(l.A).filter(c).forEach((t5) => {
              a2.x.lang[t5] = l.A[t5];
            });
            class d2 {
            }
          }(), o2;
        }();
      }, 428: (t2, e3, i2) => {
        var o2 = i2(134);
        function n2() {
        }
        function r2() {
        }
        r2.resetWarningCache = n2, t2.exports = function() {
          function t3(t4, e5, i4, n3, r3, s) {
            if (s !== o2) {
              var a2 = new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
              throw a2.name = "Invariant Violation", a2;
            }
          }
          function e4() {
            return t3;
          }
          t3.isRequired = t3;
          var i3 = { array: t3, bigint: t3, bool: t3, func: t3, number: t3, object: t3, string: t3, symbol: t3, any: t3, arrayOf: e4, element: t3, elementType: t3, instanceOf: e4, node: t3, objectOf: e4, oneOf: e4, oneOfType: e4, shape: e4, exact: e4, checkPropTypes: r2, resetWarningCache: n2 };
          return i3.PropTypes = i3, i3;
        };
      }, 526: (t2, e3, i2) => {
        t2.exports = i2(428)();
      }, 134: (t2) => {
        t2.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
      }, 78: (t2, e3, i2) => {
        i2.d(e3, { Z: () => m2 });
        var o2 = i2(499), n2 = i2.n(o2), r2 = i2(922), s = i2.n(r2), a2 = i2(155), l = i2.n(a2), c = new URL(i2(683), i2.b), d2 = new URL(i2(963), i2.b), u2 = new URL(i2(98), i2.b), h2 = s()(n2()), p2 = l()(c), f2 = l()(d2), g2 = l()(u2);
        h2.push([t2.id, `/*!
 * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
 * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
 * Version: v4.2.10
 * Url: https://xdsoft.net/jodit/
 * License(s): MIT
 */
	/*!
 * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
 * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
 * Version: v4.2.10
 * Url: https://xdsoft.net/jodit/
 * License(s): MIT
 */
	.jodit-about{padding:20px}.jodit-about a{color:#459ce7;text-decoration:none}.jodit-about a:focus,.jodit-about a:hover{color:#23527c;outline:0;text-decoration:underline}.jodit-about div{margin-bottom:calc(8px/2)}.jodit-ui-group{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:0;-ms-flex:0 0 auto;flex:0 0 auto;-ms-flex-negative:0;flex-shrink:0;-ms-flex-wrap:wrap;flex-wrap:wrap;max-width:100%}.jodit-ui-group_line_true{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch}.jodit-ui-group_separated_true:not(:last-child):not(.jodit-ui-group_before-spacer_true):after{border-left:0;border-right:1px solid #dadada;content:"";cursor:default;margin:2px;padding:0}.jodit-ui-group:last-child{border-bottom:0}.jodit-ui-list{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-ui-list_mode_vertical .jodit-ui-group{background-color:transparent;border:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-ui-list_mode_vertical .jodit-toolbar-button{height:auto;min-height:calc(14px + calc((14px - 4px)*2) + 2px*2)}.jodit-ui-list_mode_vertical .jodit-toolbar-button__button{cursor:pointer;height:auto;min-height:calc(14px + calc((14px - 4px)*2) + 2px*2);width:100%}.jodit-ui-list_mode_vertical .jodit-toolbar-button__text:not(:empty){-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}.jodit-ui-separator{border-left:0;border-right:1px solid #dadada;cursor:default;margin:2px;padding:0}.jodit-ui-break{border-top:1px solid #dadada;-ms-flex-preferred-size:100%;flex-basis:100%;height:0!important;width:0}.jodit-ui-spacer{-webkit-box-flex:1;-ms-flex:1;flex:1}.jodit-ui-button-icon-text__icon{display:none}.jodit-ui-button-icon-text__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-ui-button-icon-text__text{display:none}.jodit-ui-button-icon-text__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-button-icon-text_context_menu .jodit-ui-button-icon-text__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-ui-button-icon-text_context_menu .jodit-ui-button-icon-text__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-ui-button-icon-text__icon:not(:empty)+.jodit-ui-button-icon-text__text:not(:empty){margin-left:8px}.jodit-ui-button-icon-text__icon:empty+.jodit-ui-button-icon-text__text:not(:empty){padding:0 8px}.jodit-ui-button-clear,.jodit-ui-button_clear{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;font-style:normal;outline:0;padding:0;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-ui-button-sizes{height:34px;min-width:34px}.jodit-ui-button-sizes .jodit-icon{height:14px;width:14px}.jodit-ui-button-sizes button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-ui-button-sizes_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_tiny{height:16px;min-width:16px}.jodit-ui-button-sizes_size_tiny .jodit-icon{height:8px;width:8px}.jodit-ui-button-sizes_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-ui-button-sizes_size_tiny_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_xsmall{height:22px;min-width:22px}.jodit-ui-button-sizes_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-ui-button-sizes_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-ui-button-sizes_size_xsmall_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_small{height:28px;min-width:28px}.jodit-ui-button-sizes_size_small .jodit-icon{height:12px;width:12px}.jodit-ui-button-sizes_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-ui-button-sizes_size_small_text-icons_true button{padding:0 8px}.jodit-ui-button-sizes_size_large{height:40px;min-width:40px}.jodit-ui-button-sizes_size_large .jodit-icon{height:16px;width:16px}.jodit-ui-button-sizes_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-ui-button-sizes_size_large_text-icons_true button{padding:0 8px}.jodit-ui-button-variants_variant_outline{border:1px solid #dadada}.jodit-ui-button-variants_variant_default{background-color:#e3e3e3;color:#212529}.jodit-ui-button-variants_variant_default svg{fill:#212529;stroke:#212529}.jodit-ui-button-variants_variant_default [disabled]{opacity:.7}.jodit-ui-button-variants_variant_default:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button-variants_variant_default:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-variants_variant_default:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button-variants_variant_default:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-variants_variant_default:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button-variants_variant_primary{background-color:#007bff;color:#fff}.jodit-ui-button-variants_variant_primary svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_primary [disabled]{opacity:.7}.jodit-ui-button-variants_variant_primary:hover:not([disabled]){background-color:#0069d9;color:#fff}.jodit-ui-button-variants_variant_primary:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_primary:active:not([disabled]){background-color:#0062cc;color:#fff}.jodit-ui-button-variants_variant_primary:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_primary:focus:not([disabled]){outline:1px dashed #0062cc}.jodit-ui-button-variants_variant_secondary{background-color:#d8d8d8;border-radius:0;color:#212529}.jodit-ui-button-variants_variant_secondary svg{fill:#212529;stroke:#212529}.jodit-ui-button-variants_variant_secondary [disabled]{opacity:.7}.jodit-ui-button-variants_variant_secondary:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button-variants_variant_secondary:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-variants_variant_secondary:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button-variants_variant_secondary:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button-variants_variant_secondary:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button-variants_variant_success{background-color:#28a745;color:#fff}.jodit-ui-button-variants_variant_success svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_success [disabled]{opacity:.7}.jodit-ui-button-variants_variant_success:hover:not([disabled]){background-color:#218838;color:#fff}.jodit-ui-button-variants_variant_success:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_success:active:not([disabled]){background-color:#1e7e34;color:#fff}.jodit-ui-button-variants_variant_success:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_success:focus:not([disabled]){outline:1px dashed #1e7e34}.jodit-ui-button-variants_variant_danger{background-color:#dc3545;color:#fff}.jodit-ui-button-variants_variant_danger svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_danger [disabled]{opacity:.7}.jodit-ui-button-variants_variant_danger:hover:not([disabled]){background-color:#c82333;color:#fff}.jodit-ui-button-variants_variant_danger:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_danger:active:not([disabled]){background-color:#bd2130;color:#fff}.jodit-ui-button-variants_variant_danger:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button-variants_variant_danger:focus:not([disabled]){outline:1px dashed #bd2130}.jodit-ui-button-style{border-radius:3px;padding:0 8px}.jodit-ui-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:rgba(0,0,0,.75);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-button-style{-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:rgba(0,0,0,.75);display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-style:normal;height:34px;min-width:34px;outline:0;padding:0;padding:0 8px;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-ui-button:focus-visible:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-ui-button:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-ui-button:active:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-ui-button[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-ui-button[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,.6)}.jodit-ui-button[disabled]{opacity:.3;pointer-events:none}.jodit-ui-button .jodit-icon{height:14px;width:14px}.jodit-ui-button button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-ui-button_text-icons_true button{padding:0 8px}.jodit-ui-button_size_tiny{height:16px;min-width:16px}.jodit-ui-button_size_tiny .jodit-icon{height:8px;width:8px}.jodit-ui-button_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-ui-button_size_tiny_text-icons_true button{padding:0 8px}.jodit-ui-button_size_xsmall{height:22px;min-width:22px}.jodit-ui-button_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-ui-button_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-ui-button_size_xsmall_text-icons_true button{padding:0 8px}.jodit-ui-button_size_small{height:28px;min-width:28px}.jodit-ui-button_size_small .jodit-icon{height:12px;width:12px}.jodit-ui-button_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-ui-button_size_small_text-icons_true button{padding:0 8px}.jodit-ui-button_size_large{height:40px;min-width:40px}.jodit-ui-button_size_large .jodit-icon{height:16px;width:16px}.jodit-ui-button_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-ui-button_size_large_text-icons_true button{padding:0 8px}.jodit-ui-button__icon{display:none}.jodit-ui-button__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-ui-button__text{display:none}.jodit-ui-button__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-button_context_menu .jodit-ui-button__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-ui-button_context_menu .jodit-ui-button__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-ui-button__icon:not(:empty)+.jodit-ui-button__text:not(:empty){margin-left:8px}.jodit-ui-button__icon:empty+.jodit-ui-button__text:not(:empty){padding:0 8px}.jodit-ui-button:focus:not([disabled]){outline:1px dashed #b5d6fd}.jodit-ui-button_variant_outline{border:1px solid #dadada}.jodit-ui-button_variant_default{background-color:#e3e3e3;color:#212529}.jodit-ui-button_variant_default svg{fill:#212529;stroke:#212529}.jodit-ui-button_variant_default [disabled]{opacity:.7}.jodit-ui-button_variant_default:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button_variant_default:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_variant_default:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button_variant_default:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_variant_default:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button_variant_primary{background-color:#007bff;color:#fff}.jodit-ui-button_variant_primary svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_primary [disabled]{opacity:.7}.jodit-ui-button_variant_primary:hover:not([disabled]){background-color:#0069d9;color:#fff}.jodit-ui-button_variant_primary:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_primary:active:not([disabled]){background-color:#0062cc;color:#fff}.jodit-ui-button_variant_primary:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_primary:focus:not([disabled]){outline:1px dashed #0062cc}.jodit-ui-button_variant_secondary{background-color:#d8d8d8;border-radius:0;color:#212529}.jodit-ui-button_variant_secondary svg{fill:#212529;stroke:#212529}.jodit-ui-button_variant_secondary [disabled]{opacity:.7}.jodit-ui-button_variant_secondary:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-ui-button_variant_secondary:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_variant_secondary:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-ui-button_variant_secondary:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-ui-button_variant_secondary:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-ui-button_variant_success{background-color:#28a745;color:#fff}.jodit-ui-button_variant_success svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_success [disabled]{opacity:.7}.jodit-ui-button_variant_success:hover:not([disabled]){background-color:#218838;color:#fff}.jodit-ui-button_variant_success:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_success:active:not([disabled]){background-color:#1e7e34;color:#fff}.jodit-ui-button_variant_success:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_success:focus:not([disabled]){outline:1px dashed #1e7e34}.jodit-ui-button_variant_danger{background-color:#dc3545;color:#fff}.jodit-ui-button_variant_danger svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_danger [disabled]{opacity:.7}.jodit-ui-button_variant_danger:hover:not([disabled]){background-color:#c82333;color:#fff}.jodit-ui-button_variant_danger:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_danger:active:not([disabled]){background-color:#bd2130;color:#fff}.jodit-ui-button_variant_danger:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-ui-button_variant_danger:focus:not([disabled]){outline:1px dashed #bd2130}.jodit-popup{background:0 0;border:0;-webkit-box-shadow:0 4px 1px -2px rgba(76,76,76,.2),0 3px 3px 0 rgba(76,76,76,.15),0 1px 4px 0 rgba(76,76,76,.13);box-shadow:0 4px 1px -2px rgba(76,76,76,.2),0 3px 3px 0 rgba(76,76,76,.15),0 1px 4px 0 rgba(76,76,76,.13);display:inline-block;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);width:auto;z-index:10000001}.jodit-popup__content{background:#fff;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;max-height:300px;overflow:auto;padding:8px;overflow-scrolling:touch}.jodit-popup_padding_false .jodit-popup__content{padding:0}.jodit-popup_max-height_false .jodit-popup__content{max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}.jodit-context-menu{background:0 0;border:0;-webkit-box-shadow:0 4px 1px -2px rgba(76,76,76,.2),0 3px 3px 0 rgba(76,76,76,.15),0 1px 4px 0 rgba(76,76,76,.13);box-shadow:0 4px 1px -2px rgba(76,76,76,.2),0 3px 3px 0 rgba(76,76,76,.15),0 1px 4px 0 rgba(76,76,76,.13);display:inline-block;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;position:fixed;-webkit-transform:translateZ(0);transform:translateZ(0);width:auto;z-index:10000001;z-index:30000005}.jodit-context-menu{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px}.jodit-context-menu__content{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px}.jodit-context-menu__content{background:#fff;max-height:300px;overflow:auto;padding:8px;overflow-scrolling:touch}.jodit-context-menu_padding_false .jodit-context-menu__content{padding:0}.jodit-context-menu_max-height_false .jodit-context-menu__content{max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}.jodit-context-menu .jodit-ui-button{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-context-menu button{width:100%}.jodit-context-menu_theme_dark{background-color:#575757}.jodit-ui-button-group{margin-bottom:8px}.jodit-ui-button-group__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-button-group__options{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start}.jodit-ui-button-group .jodit-ui-button:not(:last-child){border-bottom-right-radius:0;border-top-right-radius:0}.jodit-ui-button-group .jodit-ui-button+.jodit-ui-button{border-bottom-left-radius:0;border-left:1px solid hsla(0,0%,86%,.4);border-top-left-radius:0}.jodit-ui-button-group .jodit-ui-button[aria-pressed=true]:not([disabled]){background-color:#dcdcdc;border-left:0;-webkit-box-shadow:inset 0 0 3px 0 #4c4c4c;box-shadow:inset 0 0 3px 0 #4c4c4c;color:#4c4c4c;outline:0}.jodit-ui-button-group .jodit-ui-button[aria-pressed=true]:not([disabled])+.jodit-ui-button{border:0}.jodit-ui-tooltip{-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out;background-clip:padding-box;background-color:rgba(0,0,0,.7);border-radius:4px;-webkit-box-shadow:0 0 0 0 #e5e5e5,0 8px 20px 0 rgba(0,0,0,.15);box-shadow:0 0 0 0 #e5e5e5,0 8px 20px 0 rgba(0,0,0,.15);color:#fff;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:11px;line-height:1.4;max-width:120px;opacity:0;outline:none;position:fixed;text-rendering:optimizelegibility;-webkit-transform:translate(-50%,calc(8px/2));-ms-transform:translate(-50%,calc(8px/2));transform:translate(-50%,calc(8px/2));-webkit-transition:opacity .2s ease 0s;transition:opacity .2s ease 0s;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:normal;width:auto;z-index:30000006}@media (max-width:768px){.jodit-ui-tooltip{display:none}}.jodit-ui-tooltip__content{padding:calc(8px/2) calc(8px*1.5)}.jodit-ui-tooltip.jodit-ui-tooltip_visible_true{opacity:1}.jodit-ui-block{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;margin-bottom:8px}.jodit-ui-block_width_full{width:100%}.jodit-ui-block_align_full{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.jodit-ui-block_align_right{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.jodit-ui-block_padding_true{padding:8px}.jodit-ui-label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-input{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:8px}.jodit-ui-input__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:0;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:1.2;outline:none;padding:0 8px;width:100%}.jodit-ui-input__input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit-ui-input__input_has-error_true{border-color:#ff3b3b}.jodit-ui-input__input:focus{outline:0}.jodit-ui-input_theme_dark .jodit-ui-input__input{background-color:#dadada}.jodit-ui-input_has-error_true .jodit-ui-input__input{border-color:#ff3b3b}.jodit-ui-input__error{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-input__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-input__error{color:#ff3b3b}.jodit-ui-input_has-error_true .jodit-ui-input__label{color:#ff3b3b}.jodit-ui-input__wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-width:200px}@media (max-width:480px){.jodit-ui-input__wrapper{min-width:140px}}.jodit-ui-input_theme_dark .jodit-ui-input__wrapper{background-color:#dadada;border-color:#dadada}.jodit-ui-input_focused_true .jodit-ui-input__wrapper{border-color:#1e88e5}.jodit-ui-input__icon:not(:empty){-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 8px}.jodit-ui-input__icon:not(:empty) svg{height:16px;width:16px;fill:#dadada}.jodit-ui-input__icon:not(:empty)+.jodit-ui-input__input{padding-left:0}.jodit-ui-input__clear{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.8;padding:0 8px 0 0}.jodit-ui-input__clear:active{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}.jodit-ui-input__clear svg{height:12px;width:12px;fill:#dadada}.jodit-ui-input_theme_dark .jodit-ui-input__clear svg{fill:#4c4c4c}.jodit-ui-input_theme_dark .jodit-ui-input__icon svg{fill:#4c4c4c}.jodit-ui-block .jodit-ui-input{margin-bottom:0}.jodit-ui-select{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:8px}.jodit-ui-select__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:0;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:1.2;outline:none;padding:0 8px;width:100%}.jodit-ui-select__input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit-ui-select__input_has-error_true{border-color:#ff3b3b}.jodit-ui-select__input:focus{outline:0}.jodit-ui-select_theme_dark .jodit-ui-select__input{background-color:#dadada}.jodit-ui-select_has-error_true .jodit-ui-select__input{border-color:#ff3b3b}.jodit-ui-select__error{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-select__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-select__error{color:#ff3b3b}.jodit-ui-select_has-error_true .jodit-ui-select__label{color:#ff3b3b}.jodit-ui-select__wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-width:200px}@media (max-width:480px){.jodit-ui-select__wrapper{min-width:140px}}.jodit-ui-select_theme_dark .jodit-ui-select__wrapper{background-color:#dadada;border-color:#dadada}.jodit-ui-select_focused_true .jodit-ui-select__wrapper{border-color:#1e88e5}.jodit-ui-select__icon:not(:empty){-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 8px}.jodit-ui-select__icon:not(:empty) svg{height:16px;width:16px;fill:#dadada}.jodit-ui-select__icon:not(:empty)+.jodit-ui-select__input{padding-left:0}.jodit-ui-select__clear{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.8;padding:0 8px 0 0}.jodit-ui-select__clear:active{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}.jodit-ui-select__clear svg{height:12px;width:12px;fill:#dadada}.jodit-ui-select_theme_dark .jodit-ui-select__clear svg{fill:#4c4c4c}.jodit-ui-select_theme_dark .jodit-ui-select__icon svg{fill:#4c4c4c}.jodit-ui-select__input{background-image:url(${p2});background-position:98% 50%;background-repeat:no-repeat;padding-right:calc(8px*2)}.jodit-ui-select_size_tiny{margin-bottom:0}.jodit-ui-select_size_tiny .jodit-ui-select__input{height:calc(32px/1.8);line-height:calc(32px/1.8)}.jodit-ui-select_variant_outline .jodit-ui-select__wrapper{border:0}.jodit-ui-select_variant_outline .jodit-ui-select__wrapper select{outline:0}.jodit-ui-select_width_auto{width:auto}.jodit-ui-select_width_auto .jodit-ui-select__wrapper{min-width:auto}.jodit-ui-text-area{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:8px;width:100%}.jodit-ui-text-area__input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:0;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:1.2;outline:none;padding:0 8px;width:100%}.jodit-ui-text-area__input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit-ui-text-area__input_has-error_true{border-color:#ff3b3b}.jodit-ui-text-area__input:focus{outline:0}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__input{background-color:#dadada}.jodit-ui-text-area_has-error_true .jodit-ui-text-area__input{border-color:#ff3b3b}.jodit-ui-text-area__error{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-text-area__label{color:#a5a5a5;display:block;font-size:.8em;margin-bottom:calc(8px/4)}.jodit-ui-text-area__error{color:#ff3b3b}.jodit-ui-text-area_has-error_true .jodit-ui-text-area__label{color:#ff3b3b}.jodit-ui-text-area__wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;min-width:200px}@media (max-width:480px){.jodit-ui-text-area__wrapper{min-width:140px}}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__wrapper{background-color:#dadada;border-color:#dadada}.jodit-ui-text-area_focused_true .jodit-ui-text-area__wrapper{border-color:#1e88e5}.jodit-ui-text-area__icon:not(:empty){-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 8px}.jodit-ui-text-area__icon:not(:empty) svg{height:16px;width:16px;fill:#dadada}.jodit-ui-text-area__icon:not(:empty)+.jodit-ui-text-area__input{padding-left:0}.jodit-ui-text-area__clear{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;opacity:.8;padding:0 8px 0 0}.jodit-ui-text-area__clear:active{opacity:1;-webkit-transform:scale(1.1);-ms-transform:scale(1.1);transform:scale(1.1)}.jodit-ui-text-area__clear svg{height:12px;width:12px;fill:#dadada}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__clear svg{fill:#4c4c4c}.jodit-ui-text-area_theme_dark .jodit-ui-text-area__icon svg{fill:#4c4c4c}.jodit-ui-text-area__wrapper{-webkit-box-flex:1;-ms-flex:1;flex:1}.jodit-ui-text-area__input{height:100%;min-height:60px;padding:8px}.jodit-ui-checkbox{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin-bottom:8px}.jodit-ui-checkbox__input{margin-right:8px}.jodit-ui-checkbox_switch_true .jodit-ui-checkbox__wrapper{display:inline-block;height:34px;margin-right:8px;position:relative;width:60px}.jodit-ui-checkbox_switch_true .jodit-ui-checkbox__wrapper input{height:0;opacity:0;width:0}.jodit-ui-checkbox_switch_true .jodit-ui-checkbox__switch-slider{background-color:#ccc;border-radius:34px;cursor:pointer;inset:0;position:absolute;-webkit-transition:.4s;transition:.4s}.jodit-ui-checkbox_switch_true .jodit-ui-checkbox__switch-slider:before{background-color:#fff;border-radius:50%;bottom:4px;content:"";height:26px;left:4px;position:absolute;-webkit-transition:.4s;transition:.4s;width:26px}.jodit-ui-checkbox_switch_true.jodit-ui-checkbox_checked_true .jodit-ui-checkbox__switch-slider{background-color:#2196f3}.jodit-ui-checkbox_switch_true.jodit-ui-checkbox_checked_true .jodit-ui-checkbox__switch-slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.jodit-ui-checkbox_switch_true.jodit-ui-checkbox_focused_true .jodit-ui-checkbox__switch-slider{-webkit-box-shadow:0 0 1px #2196f3;box-shadow:0 0 1px #2196f3}.jodit-ui-block .jodit-ui-checkbox{margin-bottom:0}.jodit-ui-file-input{overflow:hidden;position:relative}.jodit-ui-file-input__input{bottom:0;cursor:pointer;font-size:400px;margin:0 calc(8px*-1) 0 0;opacity:0;padding:0;position:absolute;right:0;top:0}@-webkit-keyframes a{30%{opacity:.6}60%{opacity:0}to{opacity:.6}}@keyframes a{30%{opacity:.6}60%{opacity:0}to{opacity:.6}}.jodit-progress-bar{border-radius:1px;height:2px;left:0;opacity:.7;position:absolute;top:0;z-index:2147483647}.jodit-progress-bar div{background:#b91f1f;height:2px;position:relative;-webkit-transition:width .5s ease-out,opacity .5s linear;transition:width .5s ease-out,opacity .5s linear;will-change:width,opacity}.jodit-progress-bar div:after{-webkit-animation:a 2s ease-out 0s infinite;animation:a 2s ease-out 0s infinite;border-radius:100%;-webkit-box-shadow:#b91f1f 1px 0 6px 1px;box-shadow:#b91f1f 1px 0 6px 1px;content:"";display:inline-block;height:2px;opacity:.6;position:absolute;top:0}.jodit-progress-bar div:before{-webkit-animation:a 2s ease-out 0s infinite;animation:a 2s ease-out 0s infinite;border-radius:100%;-webkit-box-shadow:#b91f1f 1px 0 6px 1px;box-shadow:#b91f1f 1px 0 6px 1px;content:"";display:inline-block;height:2px;opacity:.6;position:absolute;top:0}.jodit-progress-bar div:before{right:-80px;width:180px;clip:rect(-6px,90px,14px,-6px)}.jodit-progress-bar div:after{right:0;width:20px;clip:rect(-6px,22px,14px,8px)}.jodit-ui-messages{bottom:0;height:0;overflow:visible;position:absolute;right:0;width:0;z-index:3}.jodit-ui-message{background:#cfe2ff;border:1px solid #b6d4fe;border-radius:0.375rem;bottom:0;color:#084298;cursor:pointer;display:block;font-size:1rem;opacity:0;padding:0.5rem 1rem;position:absolute;right:calc(8px/2);-webkit-transition:opacity .1s linear,bottom .3s linear,-webkit-transform .1s ease-out;transition:opacity .1s linear,bottom .3s linear,-webkit-transform .1s ease-out;transition:opacity .1s linear,bottom .3s linear,transform .1s ease-out;transition:opacity .1s linear,bottom .3s linear,transform .1s ease-out,-webkit-transform .1s ease-out;white-space:pre}.jodit-ui-message_active_true{opacity:1}.jodit-ui-message:active{-webkit-transform:scale(.76);-ms-transform:scale(.76);transform:scale(.76)}.jodit-ui-message_variant_danger{background:#f8d7da;border-color:#f5c2c7;color:#842029}.jodit-ui-message_variant_error{background:#f8d7da;border-color:#f5c2c7;color:#842029}.jodit-ui-message_variant_secondary{background:#e2e3e5;border-color:#d3d6d8;color:#41464b}.jodit-ui-message_variant_success{background:#d1e7dd;border-color:#badbcc;color:#0f5132}.jodit-toolbar-collection,.jodit-toolbar-editor-collection{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc((14px - 4px)*2) + 2px*2) - 1px),#dadada calc(14px + calc((14px - 4px)*2) + 2px*2));position:relative}.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc((14px - 4px)*2) + 2px*2) - 1px),#dadada calc(14px + calc((14px - 4px)*2) + 2px*2));position:relative}.jodit-toolbar-collection_mode_horizontal:after{background-color:#fff;bottom:0;content:"";display:block;height:1px;left:0;position:absolute;width:100%}.jodit-toolbar-editor-collection_mode_horizontal:after{background-color:#fff;bottom:0;content:"";display:block;height:1px;left:0;position:absolute;width:100%}.jodit-toolbar-collection_size_tiny.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-collection_size_tiny.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-editor-collection_size_tiny.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-editor-collection_size_tiny.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 19px,#dadada 20px)}.jodit-toolbar-collection_size_xsmall.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-collection_size_xsmall.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-editor-collection_size_xsmall.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-editor-collection_size_xsmall.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 25px,#dadada 26px)}.jodit-toolbar-collection_size_small.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-collection_size_small.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-editor-collection_size_small.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-editor-collection_size_small.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 31px,#dadada 32px)}.jodit-toolbar-collection_size_middle.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-collection_size_middle.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-editor-collection_size_middle.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-editor-collection_size_middle.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 37px,#dadada 38px)}.jodit-toolbar-collection_size_large.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-collection_size_large.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-editor-collection_size_large.jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-editor-collection_size_large.jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent 43px,#dadada 44px)}.jodit-toolbar-collection_mode_vertical .jodit-ui-group,.jodit-toolbar-editor-collection_mode_vertical .jodit-ui-group{background-color:transparent;border:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.jodit-toolbar-collection_mode_vertical .jodit-toolbar-button{height:auto;min-height:calc(14px + calc((14px - 4px)*2) + 2px*2)}.jodit-toolbar-editor-collection_mode_vertical .jodit-toolbar-button{height:auto;min-height:calc(14px + calc((14px - 4px)*2) + 2px*2)}.jodit-toolbar-collection_mode_vertical .jodit-toolbar-button__button{cursor:pointer;height:auto;min-height:calc(14px + calc((14px - 4px)*2) + 2px*2);width:100%}.jodit-toolbar-editor-collection_mode_vertical .jodit-toolbar-button__button{cursor:pointer;height:auto;min-height:calc(14px + calc((14px - 4px)*2) + 2px*2);width:100%}.jodit-toolbar-collection_mode_vertical .jodit-toolbar-button__text:not(:empty),.jodit-toolbar-editor-collection_mode_vertical .jodit-toolbar-button__text:not(:empty){-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}.jodit-toolbar-collection .jodit-toolbar-button{margin:2px 1px;padding:0}.jodit-toolbar-collection .jodit-toolbar-content{margin:2px 1px;padding:0}.jodit-toolbar-collection .jodit-toolbar-select{margin:2px 1px;padding:0}.jodit-toolbar-editor-collection .jodit-toolbar-button{margin:2px 1px;padding:0}.jodit-toolbar-editor-collection .jodit-toolbar-content{margin:2px 1px;padding:0}.jodit-toolbar-editor-collection .jodit-toolbar-select{margin:2px 1px;padding:0}.jodit-dialog .jodit-toolbar-collection_mode_horizontal,.jodit-dialog .jodit-toolbar-editor-collection_mode_horizontal{background-image:none}.jodit-toolbar-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-radius:3px;display:-webkit-box;display:-ms-flexbox;display:flex;height:34px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-width:34px;overflow:hidden}.jodit-toolbar-button__icon{display:none}.jodit-toolbar-button__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-toolbar-button__text{display:none}.jodit-toolbar-button__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-toolbar-button_context_menu .jodit-toolbar-button__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-toolbar-button_context_menu .jodit-toolbar-button__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-toolbar-button__icon:not(:empty)+.jodit-toolbar-button__text:not(:empty){margin-left:8px}.jodit-toolbar-button__icon:empty+.jodit-toolbar-button__text:not(:empty){padding:0 8px;padding:0}.jodit-toolbar-button .jodit-icon{height:14px;width:14px}.jodit-toolbar-button button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-toolbar-button_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_tiny{height:16px;min-width:16px}.jodit-toolbar-button_size_tiny .jodit-icon{height:8px;width:8px}.jodit-toolbar-button_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-toolbar-button_size_tiny_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_xsmall{height:22px;min-width:22px}.jodit-toolbar-button_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-toolbar-button_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-toolbar-button_size_xsmall_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_small{height:28px;min-width:28px}.jodit-toolbar-button_size_small .jodit-icon{height:12px;width:12px}.jodit-toolbar-button_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-toolbar-button_size_small_text-icons_true button{padding:0 8px}.jodit-toolbar-button_size_large{height:40px;min-width:40px}.jodit-toolbar-button_size_large .jodit-icon{height:16px;width:16px}.jodit-toolbar-button_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-toolbar-button_size_large_text-icons_true button{padding:0 8px}.jodit-toolbar-button__button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.75);cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-style:normal;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;outline:0;padding:0;padding:0 8px;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-toolbar-button__button:focus-visible:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-button__button:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-button__button:active:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-button__button[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-button__button[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,.6)}.jodit-toolbar-button__button[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-button__trigger{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:0 3px 3px 0;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:.4;width:calc(14px + 2px)}.jodit-toolbar-button__trigger:focus-visible:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-button__trigger:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-button__trigger:active:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-button__trigger[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-button__trigger[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,.6)}.jodit-toolbar-button__trigger[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-button__trigger svg{width:calc(14px - 4px)}.jodit-toolbar-button_size_tiny .jodit-toolbar-button__trigger{width:calc(8px + 2px)}.jodit-toolbar-button_size_tiny .jodit-toolbar-button__trigger svg{width:calc(8px - 4px)}.jodit-toolbar-button_size_xsmall .jodit-toolbar-button__trigger{width:calc(10px + 2px)}.jodit-toolbar-button_size_xsmall .jodit-toolbar-button__trigger svg{width:calc(10px - 4px)}.jodit-toolbar-button_size_small .jodit-toolbar-button__trigger{width:calc(12px + 2px)}.jodit-toolbar-button_size_small .jodit-toolbar-button__trigger svg{width:calc(12px - 4px)}.jodit-toolbar-button_size_large .jodit-toolbar-button__trigger{width:calc(16px + 2px)}.jodit-toolbar-button_size_large .jodit-toolbar-button__trigger svg{width:calc(16px - 4px)}.jodit-toolbar-button_with-trigger_true .jodit-toolbar-button__button{border-radius:3px 0 0 3px}.jodit-toolbar-button_with-trigger_true:hover:not([disabled]){border-color:#dadada}.jodit-toolbar-button_stroke_false svg{stroke:none}.jodit-toolbar-content{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:1px solid transparent;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.75);cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-style:normal;height:34px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;min-width:34px;outline:0;padding:0;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-toolbar-content:focus-visible:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-content:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-content:active:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-content[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-content[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,.6)}.jodit-toolbar-content[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-content .jodit-icon{height:14px;width:14px}.jodit-toolbar-content button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-toolbar-content_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_tiny{height:16px;min-width:16px}.jodit-toolbar-content_size_tiny .jodit-icon{height:8px;width:8px}.jodit-toolbar-content_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-toolbar-content_size_tiny_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_xsmall{height:22px;min-width:22px}.jodit-toolbar-content_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-toolbar-content_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-toolbar-content_size_xsmall_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_small{height:28px;min-width:28px}.jodit-toolbar-content_size_small .jodit-icon{height:12px;width:12px}.jodit-toolbar-content_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-toolbar-content_size_small_text-icons_true button{padding:0 8px}.jodit-toolbar-content_size_large{height:40px;min-width:40px}.jodit-toolbar-content_size_large .jodit-icon{height:16px;width:16px}.jodit-toolbar-content_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-toolbar-content_size_large_text-icons_true button{padding:0 8px}.jodit-toolbar-content__icon{display:none}.jodit-toolbar-content__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-toolbar-content__text{display:none}.jodit-toolbar-content__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-toolbar-content_context_menu .jodit-toolbar-content__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-toolbar-content_context_menu .jodit-toolbar-content__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-toolbar-content__icon:not(:empty)+.jodit-toolbar-content__text:not(:empty){margin-left:8px}.jodit-toolbar-content__icon:empty+.jodit-toolbar-content__text:not(:empty){padding:0 8px}.jodit-toolbar-content:focus:not([disabled]){outline:1px dashed #b5d6fd}.jodit-toolbar-content_variant_outline{border:1px solid #dadada}.jodit-toolbar-content_variant_default{background-color:#e3e3e3;color:#212529}.jodit-toolbar-content_variant_default svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_variant_default [disabled]{opacity:.7}.jodit-toolbar-content_variant_default:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-toolbar-content_variant_default:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_variant_default:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-toolbar-content_variant_default:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_variant_default:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-toolbar-content_variant_primary{background-color:#007bff;color:#fff}.jodit-toolbar-content_variant_primary svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_primary [disabled]{opacity:.7}.jodit-toolbar-content_variant_primary:hover:not([disabled]){background-color:#0069d9;color:#fff}.jodit-toolbar-content_variant_primary:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_primary:active:not([disabled]){background-color:#0062cc;color:#fff}.jodit-toolbar-content_variant_primary:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_primary:focus:not([disabled]){outline:1px dashed #0062cc}.jodit-toolbar-content_variant_secondary{background-color:#d8d8d8;border-radius:0;color:#212529}.jodit-toolbar-content_variant_secondary svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_variant_secondary [disabled]{opacity:.7}.jodit-toolbar-content_variant_secondary:hover:not([disabled]){background-color:#c9cdd1;color:#212529}.jodit-toolbar-content_variant_secondary:hover:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_variant_secondary:active:not([disabled]){background-color:#dae0e5;color:#212529}.jodit-toolbar-content_variant_secondary:active:not([disabled]) svg{fill:#212529;stroke:#212529}.jodit-toolbar-content_variant_secondary:focus:not([disabled]){outline:1px dashed #dae0e5}.jodit-toolbar-content_variant_success{background-color:#28a745;color:#fff}.jodit-toolbar-content_variant_success svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_success [disabled]{opacity:.7}.jodit-toolbar-content_variant_success:hover:not([disabled]){background-color:#218838;color:#fff}.jodit-toolbar-content_variant_success:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_success:active:not([disabled]){background-color:#1e7e34;color:#fff}.jodit-toolbar-content_variant_success:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_success:focus:not([disabled]){outline:1px dashed #1e7e34}.jodit-toolbar-content_variant_danger{background-color:#dc3545;color:#fff}.jodit-toolbar-content_variant_danger svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_danger [disabled]{opacity:.7}.jodit-toolbar-content_variant_danger:hover:not([disabled]){background-color:#c82333;color:#fff}.jodit-toolbar-content_variant_danger:hover:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_danger:active:not([disabled]){background-color:#bd2130;color:#fff}.jodit-toolbar-content_variant_danger:active:not([disabled]) svg{fill:#fff;stroke:#fff}.jodit-toolbar-content_variant_danger:focus:not([disabled]){outline:1px dashed #bd2130}.jodit-toolbar-content:hover:not([disabled]){background-color:transparent;opacity:1;outline:0}.jodit-toolbar-select{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid transparent;border-radius:3px;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:34px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-width:34px;min-width:100px;overflow:hidden}.jodit-toolbar-select__icon{display:none}.jodit-toolbar-select__icon:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex}.jodit-toolbar-select__text{display:none}.jodit-toolbar-select__text:not(:empty){display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-toolbar-select_context_menu .jodit-toolbar-select__text{-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left;padding-left:8px;position:relative}.jodit-toolbar-select_context_menu .jodit-toolbar-select__text:before{border-left:1px solid #dadada;content:"";height:35px;left:0;position:absolute;top:calc(8px*-1)}.jodit-toolbar-select__icon:not(:empty)+.jodit-toolbar-select__text:not(:empty){margin-left:8px}.jodit-toolbar-select__icon:empty+.jodit-toolbar-select__text:not(:empty){padding:0 8px;padding:0}.jodit-toolbar-select .jodit-icon{height:14px;width:14px}.jodit-toolbar-select button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:34px;min-width:34px;padding:0}.jodit-toolbar-select_text-icons_true button{padding:0 8px}.jodit-toolbar-select_size_tiny{height:16px;min-width:16px}.jodit-toolbar-select_size_tiny .jodit-icon{height:8px;width:8px}.jodit-toolbar-select_size_tiny button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:16px;min-width:16px;padding:0}.jodit-toolbar-select_size_tiny_text-icons_true button{padding:0 8px}.jodit-toolbar-select_size_xsmall{height:22px;min-width:22px}.jodit-toolbar-select_size_xsmall .jodit-icon{height:10px;width:10px}.jodit-toolbar-select_size_xsmall button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:22px;min-width:22px;padding:0}.jodit-toolbar-select_size_xsmall_text-icons_true button{padding:0 8px}.jodit-toolbar-select_size_small{height:28px;min-width:28px}.jodit-toolbar-select_size_small .jodit-icon{height:12px;width:12px}.jodit-toolbar-select_size_small button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:28px;min-width:28px;padding:0}.jodit-toolbar-select_size_small_text-icons_true button{padding:0 8px}.jodit-toolbar-select_size_large{height:40px;min-width:40px}.jodit-toolbar-select_size_large .jodit-icon{height:16px;width:16px}.jodit-toolbar-select_size_large button{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:40px;min-width:40px;padding:0}.jodit-toolbar-select_size_large_text-icons_true button{padding:0 8px}.jodit-toolbar-select__button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:0 0;border:0;border-radius:3px;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0,0,0,.75);cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;font-style:normal;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;outline:0;padding:0;padding:0 8px;position:relative;text-align:center;text-decoration:none;text-transform:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-toolbar-select__button:focus-visible:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-select__button:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-select__button:active:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-select__button[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-select__button[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,.6)}.jodit-toolbar-select__button[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-select__trigger{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:0 3px 3px 0;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;opacity:.4;width:calc(14px + 2px)}.jodit-toolbar-select__trigger:focus-visible:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-select__trigger:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-select__trigger:active:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-select__trigger[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-select__trigger[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,.6)}.jodit-toolbar-select__trigger[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-select__trigger svg{width:calc(14px - 4px)}.jodit-toolbar-select_size_tiny .jodit-toolbar-select__trigger{width:calc(8px + 2px)}.jodit-toolbar-select_size_tiny .jodit-toolbar-select__trigger svg{width:calc(8px - 4px)}.jodit-toolbar-select_size_xsmall .jodit-toolbar-select__trigger{width:calc(10px + 2px)}.jodit-toolbar-select_size_xsmall .jodit-toolbar-select__trigger svg{width:calc(10px - 4px)}.jodit-toolbar-select_size_small .jodit-toolbar-select__trigger{width:calc(12px + 2px)}.jodit-toolbar-select_size_small .jodit-toolbar-select__trigger svg{width:calc(12px - 4px)}.jodit-toolbar-select_size_large .jodit-toolbar-select__trigger{width:calc(16px + 2px)}.jodit-toolbar-select_size_large .jodit-toolbar-select__trigger svg{width:calc(16px - 4px)}.jodit-toolbar-select_with-trigger_true .jodit-toolbar-button__button{border-radius:3px 0 0 3px}.jodit-toolbar-select_with-trigger_true:hover:not([disabled]){border-color:#dadada}.jodit-toolbar-select_stroke_false svg{stroke:none}.jodit-toolbar-select:focus-visible:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-select:hover:not([disabled]){background-color:#dcdcdc;opacity:1;outline:0}.jodit-toolbar-select:active:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-select[aria-pressed=true]:not([disabled]){background-color:hsla(0,0%,86%,.4);outline:0}.jodit-toolbar-select[aria-pressed=true]:hover:not([disabled]){background-color:hsla(0,0%,86%,.6)}.jodit-toolbar-select[disabled]{opacity:.3;pointer-events:none}.jodit-toolbar-select__text:not(:empty){-webkit-box-pack:left;-ms-flex-pack:left;justify-content:left}.jodit-toolbar-select__button{-webkit-box-flex:1;-ms-flex:1;flex:1}.jodit-toolbar__box:not(:empty){background-color:#fff;border-bottom:1px solid #dadada;border-radius:3px 3px 0 0;overflow:hidden}.jodit-toolbar__box:not(:empty):not(:empty){background-color:#fff}.jodit-toolbar__box:not(:empty) .jodit-toolbar-editor-collection:after{background-color:#f9f9f9}.jodit-dialog{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:0;position:absolute;width:0;will-change:left,top,width,height}.jodit-dialog_moved_true{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-dialog *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-dialog .jodit_elfinder,.jodit-dialog .jodit_elfinder *{-webkit-box-sizing:initial;box-sizing:initial}.jodit-dialog__overlay{background-color:rgba(0,0,0,.5);display:none;height:100%;left:0;overflow:auto;position:fixed;text-align:center;top:0;white-space:nowrap;width:100%;z-index:20000003}.jodit-dialog_static_true .jodit-dialog__overlay{display:none}.jodit-dialog_active_true,.jodit-dialog_modal_true .jodit-dialog__overlay{display:block}.jodit-dialog__panel{background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column nowrap;flex-flow:column nowrap;left:0;max-height:100%;max-width:100%;min-height:100px;min-width:200px;position:fixed;top:0;z-index:20000004;-webkit-box-shadow:undefined;box-shadow:undefined;text-align:left;white-space:normal}@media (max-width:480px){.jodit-dialog:not(.jodit-dialog_adaptive_false) .jodit-dialog__panel{height:100%!important;left:0!important;max-width:100%;top:0!important;width:100%!important}}.jodit-dialog_static_true{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;height:auto;position:relative;width:auto;z-index:inherit}.jodit-dialog_static_true .jodit-dialog__panel{border:1px solid #dadada;-webkit-box-shadow:none;box-shadow:none;left:auto!important;position:relative;top:auto!important;width:100%!important;z-index:inherit}.jodit-dialog_theme_dark{background-color:#353535;color:#d1cccc}.jodit-dialog_theme_dark .jodit-dialog__panel{background-color:#353535;color:#d1cccc}.jodit-dialog__header{border-bottom:1px solid #dadada;cursor:move;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:50px;text-align:left}.jodit-dialog__header-title{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:3;flex-shrink:3;font-size:18px;font-weight:400;line-height:48px;margin:0;padding:0 8px;vertical-align:top}.jodit-dialog__header-toolbar{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-negative:3;flex-shrink:3;font-size:18px;font-weight:400;line-height:48px;margin:0;padding:0 8px;vertical-align:top}@media (max-width:480px){.jodit-dialog__header-toolbar{padding-left:0}}.jodit-dialog__header-button{color:#222;-ms-flex-preferred-size:48px;flex-basis:48px;font-size:28px;height:48px;line-height:48px;text-align:center;text-decoration:none;-webkit-transition:background-color .2s ease 0s;transition:background-color .2s ease 0s}.jodit-dialog__header-button:hover{background-color:#ecebe9}.jodit-dialog__header .jodit_toolbar{background:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.jodit-dialog__header .jodit_toolbar>li.jodit-toolbar-button .jodit-input{padding-left:8px;width:auto}@media (max-width:480px){.jodit-dialog:not(.jodit-dialog_adaptive_false) .jodit-dialog__header{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.jodit-dialog_slim_true .jodit-dialog__header{min-height:10px}.jodit-dialog_slim_true .jodit-dialog__header-title{padding:0 calc(8px/4)}.jodit-dialog_slim_true .jodit-dialog__header-toolbar{padding:0 calc(8px/4)}.jodit-dialog_theme_dark .jodit-dialog__header{border-color:#4c4c4c}.jodit-dialog_fullsize_true .jodit-dialog__header{cursor:default}.jodit-dialog__content{-webkit-box-flex:1;-ms-flex:1;flex:1;min-height:100px;overflow:auto}.jodit-dialog__content .jodit-form__group{margin-bottom:calc(8px*1.5);padding:0 8px}.jodit-dialog__content .jodit-form__group:first-child{margin-top:8px}.jodit-dialog__content .jodit-form__group .jodit-input_group{border-collapse:separate;display:table;width:100%}.jodit-dialog__content .jodit-form__group .jodit-input_group>*{display:table-cell;height:34px;vertical-align:middle}.jodit-dialog__content .jodit-form__group .jodit-input_group>input{margin:0!important}.jodit-dialog__content .jodit-form__group .jodit-input_group>input:not([class*=col-]){width:100%}.jodit-dialog__content .jodit-form__group .jodit-input_group-buttons{font-size:0;vertical-align:middle;white-space:nowrap;width:1%}.jodit-dialog__content .jodit-form__group .jodit-input_group-buttons>.jodit-button{border:1px solid #dadada;border-radius:0;height:34px;line-height:34px;margin-left:-1px}.jodit-dialog__footer{display:none;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;padding:8px}.jodit-dialog__footer button{margin-right:calc(8px/2)}.jodit-dialog__footer button:last-child{margin-right:0}.jodit-dialog__column{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-dialog__resizer{display:none;position:relative}.jodit-dialog__resizer svg{bottom:0;cursor:nwse-resize;height:12px;overflow:hidden;position:absolute;right:0;width:12px;fill:#a5a5a5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-dialog_resizable_true .jodit-dialog__resizer{display:block}@media (max-width:480px){.jodit-dialog__resizer{display:none}}.jodit-dialog_prompt{max-width:300px;min-width:200px;padding:8px;word-break:break-all}.jodit-dialog_prompt label{display:block;margin-bottom:calc(8px/2)}.jodit-dialog_alert{max-width:300px;min-width:200px;padding:8px;word-break:break-all}.jodit-dialog_footer_true .jodit-dialog__footer{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit_fullsize .jodit-dialog__panel{height:100%!important;inset:0!important;width:100%!important}.jodit_fullsize .jodit-dialog__panel .jodit-dialog__resizer{display:none}.jodit-dialog .jodit-ui-messages{z-index:20000004}.jodit-image-editor{height:100%;overflow:hidden;padding:8px;width:100%}@media (max-width:768px){.jodit-image-editor{height:auto}}.jodit-image-editor>div,.jodit-image-editor>div>div{height:100%}@media (max-width:768px){.jodit-image-editor>div,.jodit-image-editor>div>div{height:auto;min-height:200px}}.jodit-image-editor *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-image-editor .jodit-image-editor__slider-title{background-color:#f9f9f9;border-bottom:1px solid hsla(0,0%,62%,.31);color:#333;cursor:pointer;font-weight:700;line-height:1em;padding:.8em 1em;text-overflow:ellipsis;text-shadow:#f3f3f3 0 1px 0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap}.jodit-image-editor .jodit-image-editor__slider-title svg{display:inline-block;margin-right:8px;vertical-align:middle;width:16px}.jodit-image-editor .jodit-image-editor__slider-content{display:none}.jodit-image-editor .jodit-image-editor__slider.jodit-image-editor_active .jodit-image-editor__slider-title{background-color:#5d5d5d;color:#fff;text-shadow:#000 0 1px 0}.jodit-image-editor .jodit-image-editor__slider.jodit-image-editor_active .jodit-image-editor__slider-title svg{fill:#fff}.jodit-image-editor .jodit-image-editor__slider.jodit-image-editor_active .jodit-image-editor__slider-content{display:block}.jodit-image-editor__area{background-color:#eee;background-image:linear-gradient(45deg,#dadada 25%,transparent 25%,transparent 75%,#dadada 75%,#dadada),linear-gradient(45deg,#dadada 25%,transparent 25%,transparent 75%,#dadada 75%,#dadada);background-position:0 0,15px 15px;background-size:30px 30px;display:none;height:100%;overflow:hidden;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:100%}.jodit-image-editor__area.jodit-image-editor_active{display:block}.jodit-image-editor__area .jodit-image-editor__box{height:100%;overflow:hidden;pointer-events:none;position:relative;z-index:1}.jodit-image-editor__area .jodit-image-editor__box img{max-height:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-image-editor__area .jodit-image-editor__croper{background-repeat:no-repeat;border:1px solid #fff;-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;height:100px;left:20px;pointer-events:none;position:absolute;top:8px;width:100px;z-index:2}.jodit-image-editor__area .jodit-image-editor__resizer{background-repeat:no-repeat;border:1px solid #fff;-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;height:100px;left:20px;pointer-events:none;position:absolute;top:8px;width:100px;z-index:2}.jodit-image-editor__area .jodit-image-editor__croper i.jodit_bottomright{background-color:#8c7878;border:1px solid #383838;border-radius:50%;bottom:calc(8px*-1);-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;cursor:se-resize;display:inline-block;height:20px;pointer-events:all;position:absolute;right:calc(8px*-1);width:20px;z-index:4}.jodit-image-editor__area .jodit-image-editor__resizer i.jodit_bottomright{background-color:#8c7878;border:1px solid #383838;border-radius:50%;bottom:calc(8px*-1);-webkit-box-shadow:0 0 11px #000;box-shadow:0 0 11px #000;cursor:se-resize;display:inline-block;height:20px;pointer-events:all;position:absolute;right:calc(8px*-1);width:20px;z-index:4}.jodit-image-editor__area .jodit-image-editor__croper i.jodit_bottomright:active,.jodit-image-editor__area .jodit-image-editor__resizer i.jodit_bottomright:active{border:1px solid #ff0}.jodit-image-editor__area.jodit-image-editor__area_crop{background:#eee;height:100%;line-height:100%;position:relative;text-align:center}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box{height:100%;line-height:100%;overflow:visible;pointer-events:all;text-align:left}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box img{height:100%;max-height:100%;max-width:100%;width:100%}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box:after{background:hsla(0,0%,100%,.3);content:"";inset:0;margin:auto;position:absolute;z-index:1}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box .jodit-image-editor__croper{cursor:move;pointer-events:all}.jodit-image-editor__area.jodit-image-editor__area_crop .jodit-image-editor__box .jodit-image-editor__croper i.jodit-image-editor__sizes{background:rgba(0,0,0,.2);border-radius:.4em;bottom:-30px;color:#fff;display:block;font-size:12px;left:100%;padding:9px 6px;position:absolute;text-align:center;text-shadow:none;white-space:pre}.jodit-image-editor__area.jodit-image-editor__area_crop.jodit-image-editor_active{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-file-browser-files{display:none;height:100%;overflow-anchor:auto;position:relative;vertical-align:top}.jodit-file-browser-files .jodit-button{border-radius:0}.jodit-file-browser-files_loading_true:before{content:"";height:100%;left:0;position:absolute;top:0;width:100%}.jodit-file-browser-files_loading_true:after{-webkit-animation:b 2s ease-out 0s infinite;animation:b 2s ease-out 0s infinite;background:url(${f2}) no-repeat 50%;background-size:100% 100%;content:"";display:inline-block;height:48px;left:50%;margin-left:calc(48px/-2);margin-top:calc(48px/-2);opacity:.7;position:absolute;top:50%;vertical-align:middle;width:48px;will-change:transform}.jodit-file-browser-files::-webkit-scrollbar{width:calc(8px/2)}.jodit-file-browser-files::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.jodit-file-browser-files::-webkit-scrollbar-thumb{background-color:#a9a9a9;outline:1px solid #708090}.jodit-file-browser-files_active_true{-ms-flex-line-pack:start;align-content:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;overflow-y:auto;padding:calc(8px/2);width:100%}.jodit-file-browser-files__item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border:1px solid #dadada;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:0;height:150px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:calc(8px/2);overflow:hidden;position:relative;text-align:center;-webkit-transition:border .1s linear,bottom .1s linear;transition:border .1s linear,bottom .1s linear;width:150px}@media (max-width:480px){.jodit-file-browser-files__item{width:calc(50% - 8px)}}.jodit-file-browser-files__item img{max-width:100%}.jodit-file-browser-files__item:hover{border-color:#433b5c}.jodit-file-browser-files__item_active_true{background-color:#b5b5b5;border-color:#1e88e5}.jodit-file-browser-files__item_active_true .jodit-file-browser-files__item-info{background-color:#b5b5b5;color:#fff;text-shadow:none}.jodit-file-browser-files__item-info{background-color:#e9e9e9;bottom:0;color:#333;font-size:14px;left:0;line-height:16px;opacity:.85;overflow:visible;padding:.3em .6em;position:absolute;right:0;text-align:left;text-shadow:#eee 0 1px 0;-webkit-transition:opacity .4s ease;transition:opacity .4s ease;white-space:normal}.jodit-file-browser-files__item-info>span{display:block;font-size:.75em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.jodit-file-browser-files__item-info>span.jodit-file-browser-files__item-info-filename{font-size:.9em;font-weight:700}.jodit-file-browser-files__item:hover:not(.jodit-file-browser-files__item_active_true) .jodit-file-browser-files__item-info{bottom:-100px}.jodit-file-browser-files_view_list{scroll-behavior:smooth}.jodit-file-browser-files_view_list a{border-width:0 0 1px;display:block;height:26px;line-height:26px;margin:0;text-align:left;white-space:nowrap;width:100%}.jodit-file-browser-files_view_list a img{display:inline-block;margin-left:4px;max-width:16px;min-width:16px;vertical-align:middle}.jodit-file-browser-files_view_list a .jodit-file-browser-files__item-info{background-color:transparent;display:inline-block;font-size:0;height:100%;line-height:inherit;margin-left:4px;padding:0;position:static;vertical-align:middle;width:calc(100% - 20px)}.jodit-file-browser-files_view_list a .jodit-file-browser-files__item-info>span{display:inline-block;font-size:12px;height:100%}.jodit-file-browser-files_view_list a .jodit-file-browser-files__item-info-filename{width:50%}.jodit-file-browser-files_view_list a .jodit-file-browser-files__item-info-filechanged,.jodit-file-browser-files_view_list a .jodit-file-browser-files__item-info-filesize{width:25%}.jodit-file-browser-files_view_list a:hover{background-color:#433b5c}.jodit-file-browser-files_view_list a:hover .jodit-file-browser-files__item-info{color:#fff;text-shadow:none}.jodit-file-browser-files_view_list a:before{content:"";display:inline-block;height:100%;vertical-align:middle}.jodit-file-browser-tree{display:none;height:100%;overflow-anchor:auto;position:relative;vertical-align:top}.jodit-file-browser-tree .jodit-button{border-radius:0}.jodit-file-browser-tree_loading_true:before{content:"";height:100%;left:0;position:absolute;top:0;width:100%}.jodit-file-browser-tree_loading_true:after{-webkit-animation:b 2s ease-out 0s infinite;animation:b 2s ease-out 0s infinite;background:url(${f2}) no-repeat 50%;background-size:100% 100%;content:"";display:inline-block;height:48px;left:50%;margin-left:calc(48px/-2);margin-top:calc(48px/-2);opacity:.7;position:absolute;top:50%;vertical-align:middle;width:48px;will-change:transform}.jodit-file-browser-tree::-webkit-scrollbar{width:calc(8px/2)}.jodit-file-browser-tree::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.jodit-file-browser-tree::-webkit-scrollbar-thumb{background-color:#a9a9a9;outline:1px solid #708090}.jodit-file-browser-tree_active_true{background-color:undefined;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-width:290px;min-width:200px;overflow-y:auto;width:31%;z-index:2}@media (max-width:480px){.jodit-file-browser-tree_active_true{height:100px;max-width:100%;width:auto}}.jodit-file-browser-tree_active_true::-webkit-scrollbar{width:calc(8px/2)}.jodit-file-browser-tree_active_true::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0,0,0,.3);box-shadow:inset 0 0 6px rgba(0,0,0,.3)}.jodit-file-browser-tree_active_true::-webkit-scrollbar-thumb{background-color:hsla(0,0%,50%,.5);outline:1px solid #708090}.jodit-file-browser-tree__item{-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid #474747;color:#b1b1b1;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;min-height:38px;padding:calc(8px/2) 8px;position:relative;text-decoration:none;-webkit-transition:background-color .2s ease 0s;transition:background-color .2s ease 0s;word-break:break-all}.jodit-file-browser-tree__item-title{color:#b1b1b1;-webkit-box-flex:1;-ms-flex:1;flex:1}.jodit-file-browser-tree__item .jodit-icon_folder{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:calc(12px + 4px);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-left:calc(8px/2);opacity:.3;width:calc(12px + 4px)}.jodit-file-browser-tree__item .jodit-icon_folder svg{height:12px;width:12px;fill:#b1b1b1!important;stroke:#b1b1b1!important}.jodit-file-browser-tree__item .jodit-icon_folder:hover{background:#696969}.jodit-file-browser-tree__item:hover{background-color:#ecebe9}.jodit-file-browser-tree__item:hover-title{color:#222}.jodit-file-browser-tree__item:hover i.jodit-icon_folder{opacity:.6}.jodit-file-browser-tree__source-title{background:#5a5a5a;border-bottom:1px solid #484848;color:#969696;display:block;font-size:12px;padding:2px 4px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;word-break:break-all}a+.jodit-file-browser-tree__source-title{margin-top:8px}.jodit-file-browser{display:-webkit-box;display:-ms-flexbox;display:flex;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;height:100%}.jodit-file-browser_no-files_true{padding:8px}@media (max-width:480px){.jodit-file-browser{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-ms-flex-flow:column-reverse;flex-flow:column-reverse}}.jodit-dialog .jodit-dialog__header-title.jodit-file-browser__title-box{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;padding-left:8px}.jodit-file-browser-preview{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:auto;max-height:100%;max-width:min(100%,1000px);min-height:min(100%,500px);min-width:400px;position:relative;text-align:center}@media (max-width:768px){.jodit-file-browser-preview{height:100%;max-height:100%;max-width:100%;min-height:auto;min-width:auto}}.jodit-file-browser-preview__box{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-file-browser-preview__navigation{cursor:pointer;height:100%;left:0;position:absolute;top:0}.jodit-file-browser-preview__navigation_arrow_next{left:auto;right:0}.jodit-file-browser-preview__navigation svg{height:45px;position:relative;top:50%;width:45px;fill:#9e9ba7;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:fill .3s linear;transition:fill .3s linear}.jodit-file-browser-preview__navigation:hover svg{fill:#000}.jodit-file-browser-preview img{max-height:100%;max-width:100%}.jodit-status-bar{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f9f9f9;border-radius:0 0 3px 3px;color:rgba(0,0,0,.75);display:-webkit-box;display:-ms-flexbox;display:flex;font-size:11px;height:20px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;overflow:hidden;padding:0 calc(8px/2);text-transform:uppercase}.jodit-status-bar_resize-handle_true{padding-right:14px}.jodit-status-bar:before{content:"";-webkit-box-flex:1;-ms-flex:auto;flex:auto;-webkit-box-ordinal-group:2;-ms-flex-order:1;order:1}.jodit-status-bar .jodit-status-bar__item{line-height:1.5714em;margin:0 8px 0 0;-webkit-box-ordinal-group:1;-ms-flex-order:0;order:0;padding:0}.jodit-status-bar .jodit-status-bar__item{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-size:11px}.jodit-status-bar .jodit-status-bar__item>span{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;font-size:11px}.jodit-status-bar .jodit-status-bar__item.jodit-status-bar__item-right{margin:0 0 0 8px;-webkit-box-ordinal-group:3;-ms-flex-order:2;order:2}.jodit-status-bar .jodit-status-bar__item a{border-radius:3px;cursor:default;text-decoration:none}.jodit-status-bar .jodit-status-bar__item a:hover{background-color:#dadada;text-decoration:none}.jodit-status-bar a.jodit-status-bar-link{cursor:pointer}.jodit-status-bar a.jodit-status-bar-link{background-color:transparent;color:rgba(0,0,0,.75)}.jodit-status-bar a.jodit-status-bar-link:hover{background-color:transparent;color:rgba(0,0,0,.75)}.jodit-status-bar a.jodit-status-bar-link:visited{background-color:transparent;color:rgba(0,0,0,.75)}.jodit-status-bar a.jodit-status-bar-link:hover{text-decoration:underline}.jodit-workplace+.jodit-status-bar:not(:empty){border-top:1px solid #dadada}.jodit_disabled .jodit-status-bar{opacity:.4}.jodit-drag-and-drop__file-box{border:1px dashed #dadada;margin:8px 0;overflow:hidden;padding:25px 0;position:relative;text-align:center;width:100%}.jodit_uploadfile_button{border:1px dashed #dadada;margin:8px 0;overflow:hidden;padding:25px 0;position:relative;text-align:center;width:100%}.jodit-drag-and-drop__file-box:hover{background-color:#ecebe9}.jodit_uploadfile_button:hover{background-color:#ecebe9}.jodit-drag-and-drop__file-box input,.jodit_uploadfile_button input{cursor:pointer;font-size:400px;inset:0;margin:0;opacity:0;padding:0;position:absolute}@media (max-width:768px){.jodit-drag-and-drop__file-box{max-width:100%;min-width:180px;width:auto}}.jodit-add-new-line{display:block;height:1px;outline:none;position:fixed;top:0;z-index:1}.jodit-add-new-line,.jodit-add-new-line *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-add-new-line:after{background-color:#6b6b6b;content:"";display:block;height:1px;width:100%}.jodit-add-new-line span{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:hsla(40,7%,92%,.3);border:1px solid #6b6b6b;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:20px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;left:calc(100% - 20px);position:absolute;top:0;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:20px}.jodit-add-new-line span:hover{background:#ecebe9}.jodit-add-new-line svg{width:calc(20px/2);fill:#6b6b6b}.jodit-source__mode .jodit-add-new-line{display:none!important}.jodit-color-picker{margin:0;text-align:left;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-color-picker__group{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;margin-bottom:calc(8px/2);max-width:calc(24px*10);white-space:normal}.jodit-color-picker__color-item{border:1px solid transparent;display:block;height:24px;text-align:center;text-decoration:none;vertical-align:middle;width:24px}.jodit-color-picker__color-item:hover{border-color:#000}.jodit-color-picker__color-item:active{border:2px solid #1e88e5}.jodit-color-picker__color-item_active_true{border:2px solid #1e88e5}.jodit-color-picker__native svg{display:inline-block;height:16px;margin-right:4px;width:16px}.jodit-color-picker__native input{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;height:18px;padding:0;width:18px}.jodit-color-picker__native input[type=color]::-webkit-color-swatch-wrapper{padding:0}.jodit-color-picker__native input input[type=color]::-webkit-color-swatch{border:none}.jodit-tabs{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px}.jodit-tabs .jodit-tabs__buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:8px;margin-top:calc(8px/2)}.jodit-tabs .jodit-tabs__buttons>*{cursor:pointer;margin-left:calc(8px/2)}.jodit-tabs .jodit-tabs__buttons>:only-of-type{width:100%}.jodit-tabs .jodit-tabs__buttons>:first-child{margin-left:0}@media (max-width:480px){.jodit-tabs .jodit-tabs__buttons{display:block}.jodit-tabs .jodit-tabs__buttons>*{margin-left:0;width:100%}}.jodit-tabs__button{min-width:80px}.jodit-tabs__button_columns_3{width:33.33333%}.jodit-tabs__button_columns_2{width:50%}.jodit-tabs .jodit-tabs__wrapper .jodit-tab{display:none}.jodit-tabs .jodit-tabs__wrapper .jodit-tab.jodit-tab_active{display:block}.jodit-tabs .jodit-tabs__wrapper .jodit-tab.jodit-tab_empty{min-height:100px;min-width:220px}.jodit_fullsize-box_true{overflow:visible!important;position:static!important;z-index:100000!important}body.jodit_fullsize-box_true,html.jodit_fullsize-box_true{height:0!important;overflow:hidden!important;width:0!important}html.jodit_fullsize-box_true{position:fixed!important}.jodit_fullsize{inset:0;max-width:none!important;position:absolute;z-index:100000}.jodit_fullsize .toolbar{width:100%!important}.jodit_fullsize .jodit__area,.jodit_fullsize .jodit_editor{height:100%}.jodit-ui-image-position-tab__lockMargin>svg{display:inline-block;height:14px;overflow:hidden;width:14px;fill:#4c4c4c;line-height:14px;-webkit-transform-origin:0 0!important;-ms-transform-origin:0 0!important;transform-origin:0 0!important;vertical-align:middle}.jodit-ui-image-position-tab__lockSize>svg{display:inline-block;height:14px;overflow:hidden;width:14px;fill:#4c4c4c;line-height:14px;-webkit-transform-origin:0 0!important;-ms-transform-origin:0 0!important;transform-origin:0 0!important;vertical-align:middle}.jodit-ui-image-properties-form__lockMargin>svg{display:inline-block;height:14px;overflow:hidden;width:14px;fill:#4c4c4c;line-height:14px;-webkit-transform-origin:0 0!important;-ms-transform-origin:0 0!important;transform-origin:0 0!important;vertical-align:middle}.jodit-ui-image-properties-form__lockSize>svg{display:inline-block;height:14px;overflow:hidden;width:14px;fill:#4c4c4c;line-height:14px;-webkit-transform-origin:0 0!important;-ms-transform-origin:0 0!important;transform-origin:0 0!important;vertical-align:middle}.jodit-ui-image-position-tab__view-box{padding:8px}.jodit-ui-image-properties-form__view-box{padding:8px}.jodit-ui-image-position-tab__imageView{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f5f5f6;display:-webkit-box;display:-ms-flexbox;display:flex;height:180px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0 0 8px;padding:0}.jodit-ui-image-properties-form__imageView{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#f5f5f6;display:-webkit-box;display:-ms-flexbox;display:flex;height:180px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin:0 0 8px;padding:0}.jodit-ui-image-position-tab__imageView img,.jodit-ui-image-properties-form__imageView img{max-height:100%;max-width:100%}.jodit-ui-image-position-tab__imageSizes.jodit-form__group,.jodit-ui-image-properties-form__imageSizes.jodit-form__group{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;margin:0;min-width:auto;padding:0}.jodit-ui-image-position-tab__imageSizes.jodit-form__group a,.jodit-ui-image-properties-form__imageSizes.jodit-form__group a{cursor:pointer;display:inline-block}.jodit-ui-image-position-tab .jodit-form__group,.jodit-ui-image-properties-form .jodit-form__group{padding:0}.jodit-ui-image-position-tab__tabsBox{padding:0 8px}.jodit-ui-image-properties-form__tabsBox{padding:0 8px}.jodit-ui-image-properties-form_lock_true:before{background-color:hsla(0,0%,86%,.6);content:"";height:100%;left:0;position:absolute;top:0;width:100%;z-index:3}.jodit-ui-image-properties-form_lock_true:after{-webkit-animation:b 2s ease-out 0s infinite;animation:b 2s ease-out 0s infinite;background:url(${f2}) no-repeat 50%;background-size:100% 100%;background-size:48px;content:"";display:inline-block;height:48px;left:50%;margin-left:-10px;margin-top:-10px;position:absolute;top:50%;vertical-align:middle;width:48px;will-change:transform}.jodit-popup-inline__container{min-width:700px;z-index:1300}.jodit-paste-storage{max-width:600px;padding:8px}@media (max-width:768px){.jodit-paste-storage{max-width:100%}}.jodit-paste-storage>div{border:1px solid #dadada;max-height:300px;max-width:100%}.jodit-paste-storage>div:first-child{margin-bottom:8px}.jodit-paste-storage>div:first-child a{border:1px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:#4c4c4c;display:block;margin:0;max-width:100%;outline:none;overflow:hidden;padding:calc(8px/2);text-decoration:none;text-overflow:ellipsis;white-space:pre}.jodit-paste-storage>div:first-child a.jodit_active{background-color:#575757;color:#fff}.jodit-paste-storage>div:first-child a:focus{outline:none}.jodit-paste-storage>div:last-child{overflow:auto;padding:8px}.jodit-paste-storage>div:last-child li,.jodit-paste-storage>div:last-child ul{margin:0}.jodit-placeholder{color:#a5a5a5;display:block;left:0;padding:8px;pointer-events:none;position:absolute;top:0;-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important;width:100%;z-index:1}.jodit__preview-box table{border:none;border-collapse:collapse;empty-cells:show;margin-bottom:1em;margin-top:1em;max-width:100%}.jodit__preview-box table tr{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit__preview-box table tr td{border:1px solid #dadada;min-width:2em;padding:.4em;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle}.jodit__preview-box table tr th{border:1px solid #dadada;min-width:2em;padding:.4em;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle}.jodit-table-resizer{cursor:col-resize;margin-left:calc(8px/-2);padding-left:calc(8px/2);padding-right:calc(8px/2);position:absolute;z-index:3}.jodit-table-resizer:after{border:0;content:"";display:block;height:100%;width:0}.jodit-table-resizer_moved{background-color:#b5d6fd;z-index:2}.jodit-table-resizer_moved:after{border-right:1px solid moved}[data-jodit_iframe_wrapper]{display:block;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[data-jodit_iframe_wrapper] iframe{position:relative}[data-jodit_iframe_wrapper]:after{background:transparent;content:"";cursor:pointer;display:block;inset:0;position:absolute;z-index:1}[data-jodit_iframe_wrapper][data-jodit-wrapper_active=true] iframe{z-index:2}.jodit_lock [data-jodit-wrapper_active=true] iframe{z-index:1}.jodit-resizer{font-size:0;height:100px;left:0;outline:3px solid #98c1f1;pointer-events:none;position:absolute;top:0;width:100px}.jodit-resizer,.jodit-resizer *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit-resizer>span{background-color:#a5a5a5;color:#fff;display:inline-block;font-size:12px;height:24px;left:50%;line-height:24px;margin-left:calc(70px/-2);margin-top:calc(24px/-2);opacity:0;overflow:visible;position:absolute;text-align:center;top:50%;-webkit-transition:opacity .2s linear;transition:opacity .2s linear;width:70px}.jodit-resizer>div{background-color:#5ba4f3;display:inline-block;height:10px;pointer-events:all;position:absolute;width:10px;z-index:4}.jodit-resizer>div:hover{background-color:#537ebb}.jodit-resizer>div:first-child{cursor:nwse-resize;left:calc(10px/-2);top:calc(10px/-2)}.jodit-resizer>div:nth-child(2){cursor:nesw-resize;right:calc(10px/-2);top:calc(10px/-2)}.jodit-resizer>div:nth-child(3){bottom:calc(10px/-2);cursor:nwse-resize;right:calc(10px/-2)}.jodit-resizer>div:nth-child(4){bottom:calc(10px/-2);cursor:nesw-resize;left:calc(10px/-2)}.jodit-ui-search{height:0;position:absolute;right:0;top:0;width:0}.jodit-ui-search_sticky_true{position:fixed}.jodit-ui-search__box{background-color:#f9f9f9;border:solid #dadada;border-width:0 0 1px 1px;display:-webkit-box;display:-ms-flexbox;display:flex;max-width:100vw;padding:calc(8px/2);position:absolute;right:0;width:320px}.jodit-ui-search__box input{background-color:transparent;border:0;height:100%;margin:0;outline:none;padding:0 8px;width:100%}.jodit-ui-search__box input[data-ref=replace]{display:none}.jodit-ui-search__box input:not(:focus)+input:not(:focus){border-top:1px solid #dadada}.jodit-ui-search__buttons{height:30px}.jodit-ui-search__counts{height:30px}.jodit-ui-search__inputs{height:30px}.jodit-ui-search__inputs{padding-right:calc(8px/2);width:60%}.jodit-ui-search__counts{border-left:1px solid #dadada;color:#dadada;width:15%}.jodit-ui-search__buttons,.jodit-ui-search__counts{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit-ui-search__buttons{-webkit-box-flex:1;-ms-flex:1;flex:1;padding-left:0}.jodit-ui-search__buttons button{background-color:transparent;border:1px solid transparent;height:100%;margin-right:1%;width:32%}.jodit-ui-search__buttons button[data-ref=replace-btn]{border:1px solid #dadada;display:none;margin-top:2px;width:100%}.jodit-ui-search__buttons button:hover{background-color:#ecebe9}.jodit-ui-search__buttons button:focus{border:1px solid rgba(181,214,253,.995)}.jodit-ui-search__buttons button:active{border:1px solid #b5d6fd;-webkit-transform:scale(0.95);-ms-transform:scale(0.95);transform:scale(0.95)}.jodit-ui-search_empty-query_true [data-ref=next],.jodit-ui-search_empty-query_true [data-ref=prev]{opacity:.5}.jodit-ui-search_replace_true .jodit-ui-search__counts{height:calc(30px*2)}.jodit-ui-search_replace_true .jodit-ui-search__inputs{height:calc(30px*2)}.jodit-ui-search_replace_true .jodit-ui-search__counts input{height:50%;-webkit-transition:background-color 0.1s linear;transition:background-color 0.1s linear}.jodit-ui-search_replace_true .jodit-ui-search__inputs input{height:50%;-webkit-transition:background-color 0.1s linear;transition:background-color 0.1s linear}.jodit-ui-search_replace_true .jodit-ui-search__counts input:focus{-webkit-box-shadow:inset 0 0 3px 0 #dadada;box-shadow:inset 0 0 3px 0 #dadada}.jodit-ui-search_replace_true .jodit-ui-search__inputs input:focus{-webkit-box-shadow:inset 0 0 3px 0 #dadada;box-shadow:inset 0 0 3px 0 #dadada}.jodit-ui-search_replace_true .jodit-ui-search__counts input[data-ref=replace],.jodit-ui-search_replace_true .jodit-ui-search__inputs input[data-ref=replace]{display:block}.jodit-ui-search_replace_true .jodit-ui-search__buttons{-ms-flex-wrap:wrap;flex-wrap:wrap}.jodit-ui-search_replace_true .jodit-ui-search__buttons button[data-ref=replace-btn]{display:block}::highlight(jodit-search-result){background-color:#b5d6fd;color:#fff}[jd-tmp-selection]{background-color:#b5d6fd;color:#fff}.jodit-container:not(.jodit_inline){min-height:100px}.jodit-container:not(.jodit_inline) .jodit-workplace{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:auto;min-height:50px;overflow:hidden}.jodit-container:not(.jodit_inline) .jodit-editor__resize{position:relative}.jodit-container:not(.jodit_inline) .jodit-editor__resize svg{bottom:0;cursor:nwse-resize;height:12px;overflow:hidden;position:absolute;right:0;width:12px;fill:#a5a5a5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-source{background-color:#323232;display:none;-webkit-box-flex:1;-ms-flex:auto;flex:auto;overflow:auto;position:relative}.jodit-source,.jodit-source .jodit-source__mirror-fake{min-height:100%}.jodit-source *{font:12px/normal Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace}.jodit-container.jodit-source__mode .jodit-wysiwyg,.jodit-container.jodit-source__mode .jodit-wysiwyg_iframe{display:none!important}.jodit-container.jodit-source__mode .jodit-source{display:block!important}.jodit-container.jodit_split_mode .jodit-workplace{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row nowrap;flex-flow:row nowrap}.jodit-container.jodit_split_mode .jodit-source,.jodit-container.jodit_split_mode .jodit-wysiwyg,.jodit-container.jodit_split_mode .jodit-wysiwyg_iframe{display:block!important;-webkit-box-flex:1;-ms-flex:1;flex:1;width:50%}.jodit-source__mirror{background:#323232;border:0;-webkit-box-shadow:none;box-shadow:none;-webkit-box-sizing:border-box;box-sizing:border-box;color:#f0f0f0;height:100%;line-height:1.5;font:12px/normal Monaco,Menlo,Ubuntu Mono,Consolas,source-code-pro,monospace;margin:0;min-height:100%;outline:none;overflow:auto;padding:8px;resize:none;-moz-tab-size:2em;-o-tab-size:2em;tab-size:2em;white-space:pre-wrap;width:100%;z-index:2}.jodit-source__mirror::-moz-selection{background:#bdbdbd}.jodit-source__mirror::selection{background:#bdbdbd}.jodit_sticky-dummy_toolbar{display:none}.jodit_sticky>.jodit-toolbar__box{border-bottom:1px solid #dadada;left:auto;position:fixed;position:sticky;top:0;z-index:3}.jodit_sticky .jodit_sticky-dummy_toolbar{display:block}.jodit-symbols{padding:8px;width:460px}.jodit-symbols__container{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-symbols__container_table{width:88%}.jodit-symbols__container_preview{width:12%}.jodit-symbols__preview{border:1px solid #dadada;font-size:34px;padding:20px 0;text-align:center}.jodit-symbols__table{border:0;border-spacing:0;table-layout:fixed}.jodit-symbols__table td{padding:0}.jodit-symbols__table td a{border:1px solid transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:#222;cursor:pointer;display:inline-block;font-size:16px;height:calc(18px*1.2);line-height:calc(18px*1.2);text-align:center;text-decoration:none;vertical-align:top;width:calc(18px*1.2)}.jodit-symbols__table td a:focus{outline:2px solid #dadada}.jodit-symbols__table td a:hover{outline:2px solid #dadada}.jodit-ui-ai-assistant{min-width:460px;padding:8px;width:100%}@media (max-width:768px){.jodit-ui-ai-assistant{min-width:100%}}.jodit-ui-ai-assistant__body{margin-bottom:10px}.jodit-ui-ai-assistant__prompt-row{-webkit-box-align:start;-ms-flex-align:start;align-items:flex-start;display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:10px}.jodit-ui-ai-assistant__prompt-row-label{margin-right:10px}.jodit-ui-ai-assistant__prompt-row-input{-webkit-box-flex:1;-ms-flex:1;flex:1;margin-right:10px}.jodit-ui-ai-assistant__prompt-row .jodit-icon_ai_assistant{cursor:pointer;height:22px;width:22px}.jodit-ui-ai-assistant__prompt-row .jodit-ui-button{margin-right:10px}.jodit-ui-ai-assistant__prompt-row .jodit-ui-button_ai_assistant{margin-right:0;margin-top:20px}.jodit-ui-ai-assistant__results{border-color:#a5a5a5;border-style:solid;border-width:1px;height:300px;line-height:1.5;max-width:460px;min-height:300px;min-width:100%;overflow:auto;padding:8px;position:relative}.jodit-ui-ai-assistant__results p{margin:0 0 10px}.jodit-ui-ai-assistant__close{cursor:pointer;padding:10px;position:absolute;right:0;top:0}.jodit-ui-ai-assistant_hide_true{display:none}.jodit-ui-ai-assistant__spinner:before{-webkit-animation:b .6s linear infinite;animation:b .6s linear infinite;border:1px solid #ccc;border-radius:50%;border-top-color:#8817c3;-webkit-box-sizing:border-box;box-sizing:border-box;content:"";height:30px;left:50%;margin-left:-15px;margin-top:-15px;position:absolute;top:50%;width:30px}.jodit-ui-ai-assistant__error{color:#ff3b3b}.jodit-context table,.jodit-wysiwyg table{border:none;border-collapse:collapse;empty-cells:show;margin-bottom:1em;margin-top:1em;max-width:100%}.jodit-context table tr,.jodit-wysiwyg table tr{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.jodit-context table tr td{border:1px solid #dadada;min-width:2em;padding:.4em;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle}.jodit-context table tr th{border:1px solid #dadada;min-width:2em;padding:.4em;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle}.jodit-wysiwyg table tr td{border:1px solid #dadada;min-width:2em;padding:.4em;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle}.jodit-wysiwyg table tr th{border:1px solid #dadada;min-width:2em;padding:.4em;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text;vertical-align:middle}.jodit-form__inserter .jodit-form__table-creator-box{display:-webkit-box;display:-ms-flexbox;display:flex}@media (max-width:768px){.jodit-form__inserter .jodit-form__table-creator-box{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container{font-size:0;margin:0;min-width:180px;padding:0}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container>div>span{border:1px solid #dadada;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;height:18px;margin-bottom:2px;margin-left:2px;vertical-align:top;width:18px}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container>div>span:first-child{margin-left:0}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__container>div>span.jodit_hovered{background:#dcdcdc;border-color:#dcdcdc}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__options{font-size:14px}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__options label{padding-top:0;text-align:left}.jodit-form__inserter .jodit-form__table-creator-box .jodit-form__options label input{margin-right:8px}.jodit-form__inserter label{font-size:14px;margin:0;padding:8px;text-align:center}.jodit-xpath{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:calc(8px/-2)}.jodit-xpath__item{display:-webkit-box;display:-ms-flexbox;display:flex;height:11px;line-height:calc(11px - 1px)}.jodit-xpath__item a{color:#4c4c4c;font-size:11px;margin-left:2px;outline:0;padding:0 3px}.jodit-wysiwyg{outline:0}.jodit-wysiwyg ::-moz-selection, .jodit-wysiwyg::-moz-selection{background:#b5d6fd;color:#4c4c4c}.jodit-wysiwyg ::selection,.jodit-wysiwyg::selection{background:#b5d6fd;color:#4c4c4c}.jodit-container:not(.jodit_inline) .jodit-wysiwyg{margin:0;outline:0;overflow-x:auto;padding:8px;position:relative}.jodit-container:not(.jodit_inline) .jodit-wysiwyg img{max-width:100%;position:relative}.jodit-container:not(.jodit_inline) .jodit-wysiwyg jodit-media{position:relative}.jodit-container:not(.jodit_inline) .jodit-wysiwyg jodit-media *{position:relative;z-index:0}.jodit-container:not(.jodit_inline) .jodit-wysiwyg jodit-media:before{content:"";inset:0;position:absolute;z-index:1}.jodit-form{color:#4c4c4c;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px}.jodit-form.jodit_error{border-color:#ff3b3b;-webkit-box-shadow:inset 0 0 3px 0 hsla(0,0%,74%,.3);box-shadow:inset 0 0 3px 0 hsla(0,0%,74%,.3)}@media (max-width:768px){.jodit-form{min-width:150px}}.jodit-form button{background:#d6d6d6;border:none;color:#4c4c4c;cursor:pointer;font-size:16px;height:36px;line-height:1;margin-bottom:8px;margin-top:8px;outline:none;padding:8px;text-decoration:none;-webkit-transition:background .2s ease 0s;transition:background .2s ease 0s}.jodit-form button:hover{background-color:#ecebe9;color:#4c4c4c}.jodit-form button:active{background:#ecebe9;color:#4c4c4c}.jodit-form label{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:8px;text-align:left;white-space:nowrap}.jodit-form label:last-child{margin-bottom:0}.jodit-form .jodit-form__center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.jodit .jodit-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #dadada;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:1.2;outline:none;padding:0 8px;width:100%}.jodit .jodit-select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #dadada;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:1.2;outline:none;padding:0 8px;width:100%}.jodit .jodit-textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #dadada;border-radius:0;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;font-size:14px;height:32px;line-height:1.2;outline:none;padding:0 8px;width:100%}.jodit .jodit-input[disabled]{background-color:#f0f0f0;color:#dadada}.jodit .jodit-select[disabled]{background-color:#f0f0f0;color:#dadada}.jodit .jodit-textarea[disabled]{background-color:#f0f0f0;color:#dadada}.jodit .jodit-input_has-error_true{border-color:#ff3b3b}.jodit .jodit-select_has-error_true{border-color:#ff3b3b}.jodit .jodit-textarea_has-error_true{border-color:#ff3b3b}.jodit .jodit-input:focus{border-color:#66afe9;outline:0}.jodit-checkbox{border:0;cursor:pointer;height:16px;margin:0 calc(8px/2) 0 0;outline:none;padding:0;position:relative;width:16px;z-index:2}.jodit-select{background-image:url(${g2});background-position:98% 50%;background-repeat:no-repeat;padding-right:calc(8px*2)}.jodit-textarea{height:auto}.jodit-form__group{min-width:180px}.jodit-textarea{min-width:180px}.jodit-form__group{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:8px}.jodit-form__group label{margin-bottom:calc(8px/2)}.jodit-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#dadada;border:0;border-radius:.25rem;color:#4c4c4c;cursor:pointer;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:calc(8px*4);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;line-height:1;margin:0;padding:0 8px;position:relative;text-decoration:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:auto}.jodit-button svg{display:inline-block;height:24px;width:24px}.jodit-button svg+span{margin-left:calc(8px/2)}.jodit-button:active,.jodit-button:focus{outline:0}.jodit-button.disabled{opacity:.7}.jodit-buttons{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;margin-bottom:8px}.jodit-button .jodit_icon,.jodit-button svg,.jodit-dialog__header .jodit_icon,.jodit-dialog__header svg{display:inline-block;height:16px;vertical-align:middle;width:16px}.jodit-switcher-wrapper{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-switcher-wrapper .jodit-switcher+span{margin-left:8px}.jodit-switcher{display:inline-block;height:32px;position:relative;width:60px}.jodit-switcher input{height:0;opacity:0;width:0}.jodit-switcher .jodit-switcher__slider{background-color:#dadada;border-radius:32px;cursor:pointer;inset:0;position:absolute;-webkit-transition:.4s;transition:.4s}.jodit-switcher .jodit-switcher__slider:before{background-color:#fff;border-radius:50%;bottom:4px;content:"";height:calc(32px - 4px*2);left:4px;position:absolute;-webkit-transition:.4s;transition:.4s;width:calc(32px - 4px*2)}input:checked+.jodit-switcher__slider{background-color:#2196f3}input:checked+.jodit-switcher__slider:before{-webkit-transform:translateX(calc(60px - 4px*2 - calc(32px - 4px*2)));-ms-transform:translateX(calc(60px - 4px*2 - calc(32px - 4px*2)));transform:translateX(calc(60px - 4px*2 - calc(32px - 4px*2)))}input:focus+.jodit-switcher__slider{-webkit-box-shadow:0 0 1px #2196f3;box-shadow:0 0 1px #2196f3}.jodit-button-group{display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-button-group input{display:none}.jodit-button-group button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;text-align:center}.jodit-button-group button+button{margin-left:-1px}.jodit-button-group button:first-child,.jodit-button-group input:first-child+button{border-bottom-right-radius:0;border-right:0;border-top-right-radius:0}.jodit-button-group button:last-child,.jodit-button-group input:last-child+button{border-bottom-left-radius:0;border-left:0;border-top-left-radius:0}.jodit-button-group input[type=checkbox]:checked+button,.jodit-button-group input[type=checkbox]:not(:checked)+button+button{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.3),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.3),0 1px 2px rgba(0,0,0,.05)}.jodit_text_icons .jodit_icon{font-size:14px;width:auto}.jodit_text_icons .jodit_icon:first-letter{text-transform:uppercase}.jodit_text_icons .jodit-tabs .jodit-tabs__buttons>a{font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;width:auto}.jodit_text_icons .jodit-tabs .jodit-tabs__buttons>a i{width:auto}.jodit_text_icons.jodit-dialog .jodit-button{color:rgba(0,0,0,.75);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:8px;width:auto}.jodit_text_icons.jodit-dialog .jodit-dialog__header a{color:rgba(0,0,0,.75);font-family:-apple-system,blinkmacsystemfont,"Segoe UI",roboto,oxygen-sans,ubuntu,cantarell,"Helvetica Neue",sans-serif;padding:8px;width:auto}.jodit_text_icons.jodit-dialog .jodit-button .jodit_icon,.jodit_text_icons.jodit-dialog .jodit-dialog__header a .jodit_icon{width:auto}.jodit-grid{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.jodit-grid.jodit-grid_column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}@media (max-width:480px){.jodit-grid.jodit-grid_xs-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.jodit-grid [class*=jodit_col-]{-webkit-box-flex:1;-ms-flex:1 1 auto;flex:1 1 auto}.jodit-grid .jodit_col-lg-5-5{width:100%}.jodit-grid .jodit_col-lg-4-5{width:80%}.jodit-grid .jodit_col-lg-3-5{width:60%}.jodit-grid .jodit_col-lg-2-5{width:40%}.jodit-grid .jodit_col-lg-1-5{width:20%}.jodit-grid .jodit_col-lg-4-4{width:100%}.jodit-grid .jodit_col-lg-3-4{width:75%}.jodit-grid .jodit_col-lg-2-4{width:50%}.jodit-grid .jodit_col-lg-1-4{width:25%}@media (max-width:992px){.jodit-grid .jodit_col-md-5-5{width:100%}.jodit-grid .jodit_col-md-4-5{width:80%}.jodit-grid .jodit_col-md-3-5{width:60%}.jodit-grid .jodit_col-md-2-5{width:40%}.jodit-grid .jodit_col-md-1-5{width:20%}.jodit-grid .jodit_col-md-4-4{width:100%}.jodit-grid .jodit_col-md-3-4{width:75%}.jodit-grid .jodit_col-md-2-4{width:50%}.jodit-grid .jodit_col-md-1-4{width:25%}}@media (max-width:768px){.jodit-grid .jodit_col-sm-5-5{width:100%}.jodit-grid .jodit_col-sm-4-5{width:80%}.jodit-grid .jodit_col-sm-3-5{width:60%}.jodit-grid .jodit_col-sm-2-5{width:40%}.jodit-grid .jodit_col-sm-1-5{width:20%}.jodit-grid .jodit_col-sm-4-4{width:100%}.jodit-grid .jodit_col-sm-3-4{width:75%}.jodit-grid .jodit_col-sm-2-4{width:50%}.jodit-grid .jodit_col-sm-1-4{width:25%}}@media (max-width:480px){.jodit-grid .jodit_col-xs-5-5{width:100%}.jodit-grid .jodit_col-xs-4-5{width:80%}.jodit-grid .jodit_col-xs-3-5{width:60%}.jodit-grid .jodit_col-xs-2-5{width:40%}.jodit-grid .jodit_col-xs-1-5{width:20%}.jodit-grid .jodit_col-xs-4-4{width:100%}.jodit-grid .jodit_col-xs-3-4{width:75%}.jodit-grid .jodit_col-xs-2-4{width:50%}.jodit-grid .jodit_col-xs-1-4{width:25%}}@-webkit-keyframes b{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes b{to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.jodit-icon_loader{-webkit-animation:b 2s ease-out 0s infinite;animation:b 2s ease-out 0s infinite;background:url(${f2}) no-repeat 50%;background-size:100% 100%;display:inline-block;height:48px;vertical-align:middle;width:48px;will-change:transform}.jodit-icon{background:50% no-repeat;background-size:contain;height:14px;overflow:visible;width:14px;fill:#4c4c4c;-webkit-transform-origin:0 0!important;-ms-transform-origin:0 0!important;transform-origin:0 0!important}.jodit-icon{stroke:#4c4c4c}.jodit-icon_close{stroke:#4c4c4c}svg.jodit-icon{height:auto;isolation:isolate}.jodit-icon_text{font-size:14px}.jodit,.jodit *,.jodit-container,.jodit-container *{-webkit-box-sizing:border-box;box-sizing:border-box}.jodit .jodit-workplace,.jodit-container .jodit-workplace{overflow:auto;position:relative}.jodit .jodit-workplace .jodit-wysiwyg,.jodit .jodit-workplace .jodit-wysiwyg_iframe,.jodit-container .jodit-workplace .jodit-wysiwyg,.jodit-container .jodit-workplace .jodit-wysiwyg_iframe{height:100%;width:100%}.jodit-wysiwyg [contenteditable=false]{cursor:default}.jodit-container:not(.jodit_inline){background-color:#f5f5f6;border:1px solid #dadada;border-radius:3px}.jodit-container:not(.jodit_inline) .jodit-workplace{background-color:#fff;border:0 solid #dadada;max-height:100%}.jodit-container:not(.jodit_inline).jodit_disabled{background:#dadada}.jodit-container:not(.jodit_inline).jodit_disabled .jodit-workplace{opacity:.4}.jodit_disabled,.jodit_lock{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.jodit_hidden{display:none!important}.jodit_vertical_middle{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}.jodit-box{background:0 0;border:0;float:none;height:auto;margin:0;max-width:none;outline:0;padding:0;position:static;width:auto}.jodit-dialog_theme_dark .jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc((14px - 4px)*2) + 2px*2) - 1px),#6b6b6b calc(14px + calc((14px - 4px)*2) + 2px*2))}.jodit-dialog_theme_dark .jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc((14px - 4px)*2) + 2px*2) - 1px),#6b6b6b calc(14px + calc((14px - 4px)*2) + 2px*2))}.jodit_theme_dark .jodit-toolbar-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc((14px - 4px)*2) + 2px*2) - 1px),#6b6b6b calc(14px + calc((14px - 4px)*2) + 2px*2))}.jodit_theme_dark .jodit-toolbar-editor-collection_mode_horizontal{background-image:repeating-linear-gradient(transparent 0,transparent calc(calc(14px + calc((14px - 4px)*2) + 2px*2) - 1px),#6b6b6b calc(14px + calc((14px - 4px)*2) + 2px*2))}.jodit-dialog_theme_dark .jodit-toolbar-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit-dialog_theme_dark .jodit-toolbar-editor-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit_theme_dark .jodit-toolbar-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit_theme_dark .jodit-toolbar-editor-collection_mode_horizontal:after{background-color:#6b6b6b}.jodit-dialog_theme_dark .jodit-toolbar__box:not(:empty){border-color:#6b6b6b}.jodit_theme_dark .jodit-toolbar__box:not(:empty){border-color:#6b6b6b}.jodit-dialog_theme_dark .jodit-toolbar__box:not(:empty) .jodit-toolbar-editor-collection:after{background-color:#6b6b6b}.jodit_theme_dark .jodit-toolbar__box:not(:empty) .jodit-toolbar-editor-collection:after{background-color:#6b6b6b}.jodit-dialog_theme_dark .jodit-ui-group_separated_true:not(:last-child,.jodit-ui-group_before-spacer_true):after{border-right-color:#6b6b6b}.jodit_theme_dark .jodit-ui-group_separated_true:not(:last-child,.jodit-ui-group_before-spacer_true):after{border-right-color:#6b6b6b}.jodit-dialog_theme_dark.jodit-container{background-color:#575757;border-color:#dadada}.jodit_theme_dark.jodit-container{background-color:#575757;border-color:#dadada}.jodit-dialog_theme_dark.jodit-container.jodit_disabled{background-color:#575757}.jodit_theme_dark.jodit-container.jodit_disabled{background-color:#575757}.jodit-dialog_theme_dark.jodit-container:not(.jodit_inline) .jodit-workplace{border-color:#575757}.jodit_theme_dark.jodit-container:not(.jodit_inline) .jodit-workplace{border-color:#575757}.jodit-dialog_theme_dark .jodit-popup__content{background:#575757}.jodit_theme_dark .jodit-popup__content{background:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button__text{color:#d1cccc}.jodit-dialog_theme_dark .jodit-toolbar-button__text:hover:not([disabled]){color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select__text{color:#d1cccc}.jodit-dialog_theme_dark .jodit-toolbar-select__text:hover:not([disabled]){color:#575757}.jodit-dialog_theme_dark .jodit-ui-button__text{color:#d1cccc}.jodit-dialog_theme_dark .jodit-ui-button__text:hover:not([disabled]){color:#575757}.jodit_theme_dark .jodit-toolbar-button__text{color:#d1cccc}.jodit_theme_dark .jodit-toolbar-button__text:hover:not([disabled]){color:#575757}.jodit_theme_dark .jodit-toolbar-select__text{color:#d1cccc}.jodit_theme_dark .jodit-toolbar-select__text:hover:not([disabled]){color:#575757}.jodit_theme_dark .jodit-ui-button__text{color:#d1cccc}.jodit_theme_dark .jodit-ui-button__text:hover:not([disabled]){color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button .jodit-icon{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-toolbar-button .jodit-icon:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button .jodit-icon:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button svg{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-toolbar-button svg:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button svg:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button__trigger{fill:#4c4c4c;stroke:#4c4c4c}.jodit-dialog_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select .jodit-icon{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-toolbar-select .jodit-icon:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select .jodit-icon:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select svg{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-toolbar-select svg:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select svg:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select__trigger{fill:#4c4c4c;stroke:#4c4c4c}.jodit-dialog_theme_dark .jodit-toolbar-select__trigger:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select__trigger:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-ui-button .jodit-icon{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-ui-button .jodit-icon:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-ui-button .jodit-icon:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-ui-button svg{fill:silver;stroke:silver}.jodit-dialog_theme_dark .jodit-ui-button svg:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-ui-button svg:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-ui-button__trigger{fill:#4c4c4c;stroke:#4c4c4c}.jodit-dialog_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){stroke:#575757}.jodit-dialog_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-toolbar-button .jodit-icon{fill:silver;stroke:silver}.jodit_theme_dark .jodit-toolbar-button .jodit-icon:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-toolbar-button .jodit-icon:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-toolbar-button svg{fill:silver;stroke:silver}.jodit_theme_dark .jodit-toolbar-button svg:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-toolbar-button svg:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-toolbar-button__trigger{fill:#4c4c4c;stroke:#4c4c4c}.jodit_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-toolbar-select .jodit-icon{fill:silver;stroke:silver}.jodit_theme_dark .jodit-toolbar-select .jodit-icon:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-toolbar-select .jodit-icon:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-toolbar-select svg{fill:silver;stroke:silver}.jodit_theme_dark .jodit-toolbar-select svg:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-toolbar-select svg:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-toolbar-select__trigger{fill:#4c4c4c;stroke:#4c4c4c}.jodit_theme_dark .jodit-toolbar-select__trigger:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-toolbar-select__trigger:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-ui-button .jodit-icon{fill:silver;stroke:silver}.jodit_theme_dark .jodit-ui-button .jodit-icon:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-ui-button .jodit-icon:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-ui-button svg{fill:silver;stroke:silver}.jodit_theme_dark .jodit-ui-button svg:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-ui-button svg:hover:not([disabled]){fill:#575757}.jodit_theme_dark .jodit-ui-button__trigger{fill:#4c4c4c;stroke:#4c4c4c}.jodit_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){stroke:#575757}.jodit_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){fill:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button__button:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button__text:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select__button:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select__text:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-toolbar-select__trigger:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-ui-button:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-ui-button__button:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-ui-button__text:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-button:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-button__button:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-button__text:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-button__trigger:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-select:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-select__button:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-select__text:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-toolbar-select__trigger:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-ui-button:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-ui-button__button:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-ui-button__text:hover:not([disabled]){background-color:silver;color:#575757}.jodit_theme_dark .jodit-ui-button__trigger:hover:not([disabled]){background-color:silver;color:#575757}.jodit-dialog_theme_dark .jodit-status-bar{background-color:#5f5c5c;border-color:#6b6b6b;color:#d1cccc}.jodit-dialog_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty){background-color:#5f5c5c;border-color:#6b6b6b;color:#d1cccc}.jodit_theme_dark .jodit-status-bar{background-color:#5f5c5c;border-color:#6b6b6b;color:#d1cccc}.jodit_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty){background-color:#5f5c5c;border-color:#6b6b6b;color:#d1cccc}.jodit-dialog_theme_dark .jodit-status-bar{color:#d1cccc}.jodit-dialog_theme_dark .jodit-status-bar .jodit-status-bar__item a{color:#d1cccc}.jodit-dialog_theme_dark .jodit-status-bar .jodit-status-bar__item span{color:#d1cccc}.jodit-dialog_theme_dark .jodit-status-bar a.jodit-status-bar-link{color:#d1cccc}.jodit-dialog_theme_dark .jodit-status-bar a.jodit-status-bar-link:hover{color:#d1cccc}.jodit-dialog_theme_dark .jodit-status-bar a.jodit-status-bar-link:visited{color:#d1cccc}.jodit-dialog_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty){color:#d1cccc}.jodit-dialog_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) .jodit-status-bar__item a{color:#d1cccc}.jodit-dialog_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) .jodit-status-bar__item span{color:#d1cccc}.jodit-dialog_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) a.jodit-status-bar-link{color:#d1cccc}.jodit-dialog_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) a.jodit-status-bar-link:hover{color:#d1cccc}.jodit-dialog_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) a.jodit-status-bar-link:visited{color:#d1cccc}.jodit_theme_dark .jodit-status-bar{color:#d1cccc}.jodit_theme_dark .jodit-status-bar .jodit-status-bar__item a{color:#d1cccc}.jodit_theme_dark .jodit-status-bar .jodit-status-bar__item span{color:#d1cccc}.jodit_theme_dark .jodit-status-bar a.jodit-status-bar-link{color:#d1cccc}.jodit_theme_dark .jodit-status-bar a.jodit-status-bar-link:hover{color:#d1cccc}.jodit_theme_dark .jodit-status-bar a.jodit-status-bar-link:visited{color:#d1cccc}.jodit_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty){color:#d1cccc}.jodit_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) .jodit-status-bar__item a{color:#d1cccc}.jodit_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) .jodit-status-bar__item span{color:#d1cccc}.jodit_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) a.jodit-status-bar-link{color:#d1cccc}.jodit_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) a.jodit-status-bar-link:hover{color:#d1cccc}.jodit_theme_dark .jodit-workplace+.jodit-status-bar:not(:empty) a.jodit-status-bar-link:visited{color:#d1cccc}.jodit-dialog_theme_dark .jodit-toolbar__box:not(:empty){background:#5f5c5c}.jodit_theme_dark .jodit-toolbar__box:not(:empty){background:#5f5c5c}.jodit-dialog_theme_dark .jodit-icon-close{stroke:silver}.jodit_theme_dark .jodit-icon-close{stroke:silver}.jodit-dialog_theme_dark .jodit-wysiwyg{background-color:#575757;color:#d1cccc}.jodit-dialog_theme_dark .jodit-wysiwyg_iframe{background-color:#575757;color:#d1cccc}.jodit_theme_dark .jodit-wysiwyg{background-color:#575757;color:#d1cccc}.jodit_theme_dark .jodit-wysiwyg_iframe{background-color:#575757;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form input[type=text]{background-color:rgba(81,81,81,.41);border-color:#686767;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form input[type=url]{background-color:rgba(81,81,81,.41);border-color:#686767;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form textarea{background-color:rgba(81,81,81,.41);border-color:#686767;color:#d1cccc}.jodit_theme_dark .jodit-form input[type=text]{background-color:rgba(81,81,81,.41);border-color:#686767;color:#d1cccc}.jodit_theme_dark .jodit-form input[type=url]{background-color:rgba(81,81,81,.41);border-color:#686767;color:#d1cccc}.jodit_theme_dark .jodit-form textarea{background-color:rgba(81,81,81,.41);border-color:#686767;color:#d1cccc}.jodit-dialog_theme_dark .jodit-form button{background-color:hsla(0,0%,41%,.75);color:#d1cccc}.jodit_theme_dark .jodit-form button{background-color:hsla(0,0%,41%,.75);color:#d1cccc}.jodit-dialog_theme_dark .jodit-placeholder{color:hsla(0,5%,81%,.8)}.jodit_theme_dark .jodit-placeholder{color:hsla(0,5%,81%,.8)}.jodit-dialog_theme_dark .jodit-drag-and-drop__file-box{color:#d1cccc}.jodit-dialog_theme_dark .jodit_uploadfile_button{color:#d1cccc}.jodit_theme_dark .jodit-drag-and-drop__file-box{color:#d1cccc}.jodit_theme_dark .jodit_uploadfile_button{color:#d1cccc}.jodit-dialog_theme_dark .jodit-drag-and-drop__file-box:hover{background-color:hsla(0,0%,41%,.75)}.jodit-dialog_theme_dark .jodit_uploadfile_button:hover{background-color:hsla(0,0%,41%,.75)}.jodit_theme_dark .jodit-drag-and-drop__file-box:hover{background-color:hsla(0,0%,41%,.75)}.jodit_theme_dark .jodit_uploadfile_button:hover{background-color:hsla(0,0%,41%,.75)}.jodit-dialog_theme_dark .jodit-add-new-line:before{border-top-color:#686767}.jodit_theme_dark .jodit-add-new-line:before{border-top-color:#686767}.jodit-dialog_theme_dark .jodit-add-new-line span{background:hsla(0,0%,41%,.75);border-color:#686767}.jodit_theme_dark .jodit-add-new-line span{background:hsla(0,0%,41%,.75);border-color:#686767}.jodit-dialog_theme_dark .jodit-add-new-line span svg{fill:#d1cccc}.jodit_theme_dark .jodit-add-new-line span svg{fill:#d1cccc}.jodit-dialog_theme_dark .jodit-resizer>i{background:hsla(0,0%,41%,.75);border-color:silver}.jodit_theme_dark .jodit-resizer>i{background:hsla(0,0%,41%,.75);border-color:silver}.jodit-dialog_theme_dark .jodit-input{background-color:silver;border-color:#444;color:#444}.jodit-dialog_theme_dark .jodit-select{background-color:silver;border-color:#444;color:#444}.jodit_theme_dark .jodit-input{background-color:silver;border-color:#444;color:#444}.jodit_theme_dark .jodit-select{background-color:silver;border-color:#444;color:#444}.jodit-dialog_theme_dark.jodit-dialog{background-color:#575757}.jodit_theme_dark.jodit-dialog{background-color:#575757}.jodit-dialog_theme_dark.jodit-dialog .jodit-dialog__header{border-color:#444}.jodit-dialog_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item{border-color:#444}.jodit_theme_dark.jodit-dialog .jodit-dialog__header{border-color:#444}.jodit_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item{border-color:#444}.jodit-dialog_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item-info{background-color:#d1cccc}.jodit_theme_dark.jodit-dialog .jodit-filebrowser__files.active .jodit-filebrowser__files-item-info{background-color:#d1cccc}`, ""]);
        const m2 = h2;
      }, 379: (t2) => {
        var e3 = [];
        function i2(t3) {
          for (var i3 = -1, o3 = 0; o3 < e3.length; o3++) if (e3[o3].identifier === t3) {
            i3 = o3;
            break;
          }
          return i3;
        }
        function o2(t3, o3) {
          for (var r2 = {}, s = [], a2 = 0; a2 < t3.length; a2++) {
            var l = t3[a2], c = o3.base ? l[0] + o3.base : l[0], d2 = r2[c] || 0, u2 = "".concat(c, " ").concat(d2);
            r2[c] = d2 + 1;
            var h2 = i2(u2), p2 = { css: l[1], media: l[2], sourceMap: l[3], supports: l[4], layer: l[5] };
            if (-1 !== h2) e3[h2].references++, e3[h2].updater(p2);
            else {
              var f2 = n2(p2, o3);
              o3.byIndex = a2, e3.splice(a2, 0, { identifier: u2, updater: f2, references: 1 });
            }
            s.push(u2);
          }
          return s;
        }
        function n2(t3, e4) {
          var i3 = e4.domAPI(e4);
          return i3.update(t3), function(e5) {
            if (e5) {
              if (e5.css === t3.css && e5.media === t3.media && e5.sourceMap === t3.sourceMap && e5.supports === t3.supports && e5.layer === t3.layer) return;
              i3.update(t3 = e5);
            } else i3.remove();
          };
        }
        t2.exports = function(t3, n3) {
          var r2 = o2(t3 = t3 || [], n3 = n3 || {});
          return function(t4) {
            t4 = t4 || [];
            for (var s = 0; s < r2.length; s++) {
              var a2 = i2(r2[s]);
              e3[a2].references--;
            }
            for (var l = o2(t4, n3), c = 0; c < r2.length; c++) {
              var d2 = i2(r2[c]);
              0 === e3[d2].references && (e3[d2].updater(), e3.splice(d2, 1));
            }
            r2 = l;
          };
        };
      }, 569: (t2) => {
        var e3 = {};
        t2.exports = function(t3, i2) {
          var o2 = function(t4) {
            if (void 0 === e3[t4]) {
              var i3 = document.querySelector(t4);
              if (window.HTMLIFrameElement && i3 instanceof window.HTMLIFrameElement) try {
                i3 = i3.contentDocument.head;
              } catch (t5) {
                i3 = null;
              }
              e3[t4] = i3;
            }
            return e3[t4];
          }(t3);
          if (!o2) throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
          o2.appendChild(i2);
        };
      }, 216: (t2) => {
        t2.exports = function(t3) {
          var e3 = document.createElement("style");
          return t3.setAttributes(e3, t3.attributes), t3.insert(e3, t3.options), e3;
        };
      }, 565: (t2, e3, i2) => {
        t2.exports = function(t3) {
          var e4 = i2.nc;
          e4 && t3.setAttribute("nonce", e4);
        };
      }, 795: (t2) => {
        t2.exports = function(t3) {
          if ("undefined" == typeof document) return { update: function() {
          }, remove: function() {
          } };
          var e3 = t3.insertStyleElement(t3);
          return { update: function(i2) {
            !function(t4, e4, i3) {
              var o2 = "";
              i3.supports && (o2 += "@supports (".concat(i3.supports, ") {")), i3.media && (o2 += "@media ".concat(i3.media, " {"));
              var n2 = void 0 !== i3.layer;
              n2 && (o2 += "@layer".concat(i3.layer.length > 0 ? " ".concat(i3.layer) : "", " {")), o2 += i3.css, n2 && (o2 += "}"), i3.media && (o2 += "}"), i3.supports && (o2 += "}");
              var r2 = i3.sourceMap;
              r2 && "undefined" != typeof btoa && (o2 += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r2)))), " */")), e4.styleTagTransform(o2, t4, e4.options);
            }(e3, t3, i2);
          }, remove: function() {
            !function(t4) {
              if (null === t4.parentNode) return false;
              t4.parentNode.removeChild(t4);
            }(e3);
          } };
        };
      }, 589: (t2) => {
        t2.exports = function(t3, e3) {
          if (e3.styleSheet) e3.styleSheet.cssText = t3;
          else {
            for (; e3.firstChild; ) e3.removeChild(e3.firstChild);
            e3.appendChild(document.createTextNode(t3));
          }
        };
      }, 963: (t2) => {
        t2.exports = "data:image/png;base64, ";
      }, 683: (t2) => {
        t2.exports = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGlkPSJMYXllcl8xIiBkYXRhLW5hbWU9IkxheWVyIDEiIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0ye2ZpbGw6IzQ0NH08L3N0eWxlPjwvZGVmcz48cGF0aCBkPSJNMCAwaDQuOTV2MTBIMHoiIHN0eWxlPSJmaWxsOiNmZmYiLz48cGF0aCBkPSJtMS40MSA0LjY3IDEuMDctMS40OSAxLjA2IDEuNDl6TTMuNTQgNS4zMyAyLjQ4IDYuODIgMS40MSA1LjMzeiIgY2xhc3M9ImNscy0yIi8+PC9zdmc+";
      }, 98: (t2) => {
        t2.exports = "data:image/svg+xml;charset=utf-8,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 id=%27Layer_1%27 data-name=%27Layer 1%27 viewBox=%270 0 4.95 10%27%3E%3Cdefs%3E%3Cstyle%3E.cls-2{fill:%23444}%3C/style%3E%3C/defs%3E%3Cpath d=%27M0 0h4.95v10H0z%27 style=%27fill:%23fff%27/%3E%3Cpath d=%27m1.41 4.67 1.07-1.49 1.06 1.49zM3.54 5.33 2.48 6.82 1.41 5.33z%27 class=%27cls-2%27/%3E%3C/svg%3E";
      }, 787: (e3) => {
        e3.exports = t;
      } }, i = {};
      function o(t2) {
        var n2 = i[t2];
        if (void 0 !== n2) return n2.exports;
        var r2 = i[t2] = { id: t2, exports: {} };
        return e2[t2](r2, r2.exports, o), r2.exports;
      }
      o.m = e2, o.n = (t2) => {
        var e3 = t2 && t2.__esModule ? () => t2.default : () => t2;
        return o.d(e3, { a: e3 }), e3;
      }, o.d = (t2, e3) => {
        for (var i2 in e3) o.o(e3, i2) && !o.o(t2, i2) && Object.defineProperty(t2, i2, { enumerable: true, get: e3[i2] });
      }, o.o = (t2, e3) => Object.prototype.hasOwnProperty.call(t2, e3), o.r = (t2) => {
        "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t2, "__esModule", { value: true });
      }, o.b = document.baseURI || self.location.href, o.nc = void 0;
      var n = {};
      return (() => {
        o.r(n), o.d(n, { Jodit: () => r2.Jodit, default: () => y2 });
        var t2 = o(787), e3 = o.n(t2), i2 = o(526), r2 = o(714), s = o(379), a2 = o.n(s), l = o(795), c = o.n(l), d2 = o(569), u2 = o.n(d2), h2 = o(565), p2 = o.n(h2), f2 = o(216), g2 = o.n(f2), m2 = o(589), b2 = o.n(m2), _2 = o(78), v2 = {};
        v2.styleTagTransform = b2(), v2.setAttributes = p2(), v2.insert = u2().bind(null, "head"), v2.domAPI = c(), v2.insertStyleElement = g2(), a2()(_2.Z, v2), _2.Z && _2.Z.locals && _2.Z.locals;
        var x = r2.Jodit.modules.Helpers.isFunction, w = (0, t2.forwardRef)(function(i3, o2) {
          var n2 = i3.className, s2 = i3.config, a3 = i3.id, l2 = i3.name, c2 = i3.onBlur, d3 = i3.onChange, u3 = i3.tabIndex, h3 = i3.value, p3 = i3.editorRef, f3 = (0, t2.useRef)(null);
          (0, t2.useLayoutEffect)(function() {
            o2 && (x(o2) ? o2(f3.current) : o2.current = f3.current);
          }, [f3, o2]), (0, t2.useEffect)(function() {
            var t3 = f3.current, e4 = r2.Jodit.make(t3, s2);
            return f3.current = e4, x(p3) && p3(e4), function() {
              e4 && e4.destruct(), f3.current = t3;
            };
          }, [s2, p3]);
          var g3 = function(e4) {
            var i4 = (0, t2.useRef)();
            return (0, t2.useEffect)(function() {
              i4.current = e4;
            }, [e4]), i4.current;
          }(n2);
          return (0, t2.useEffect)(function() {
            var t3, e4 = null === (t3 = f3.current) || void 0 === t3 || null === (t3 = t3.container) || void 0 === t3 ? void 0 : t3.classList;
            g3 !== n2 && "string" == typeof g3 && g3.split(/\s+/).forEach(function(t4) {
              return null == e4 ? void 0 : e4.remove(t4);
            }), n2 && "string" == typeof n2 && n2.split(/\s+/).forEach(function(t4) {
              return null == e4 ? void 0 : e4.add(t4);
            });
          }, [n2, g3]), (0, t2.useEffect)(function() {
            f3.current.workplace && (f3.current.workplace.tabIndex = u3 || -1);
          }, [u3]), (0, t2.useEffect)(function() {
            if (f3.current.events && (c2 || d3)) {
              var t3 = function(t4) {
                return c2 && c2(f3.current.value, t4);
              }, e4 = function(t4) {
                return d3 && d3(t4);
              };
              return f3.current.events.on("blur", t3).on("change", e4), function() {
                var i4;
                null === (i4 = f3.current) || void 0 === i4 || null === (i4 = i4.events) || void 0 === i4 || i4.off("blur", t3).off("change", e4);
              };
            }
          }, [c2, d3]), (0, t2.useEffect)(function() {
            var t3 = function() {
              var t4;
              f3.current && (null == f3 || null === (t4 = f3.current) || void 0 === t4 ? void 0 : t4.value) !== h3 && (f3.current.value = h3);
            };
            f3.current && (f3.current.isReady ? t3() : f3.current.waitForReady().then(t3));
          }, [h3]), e3().createElement("div", { className: "jodit-react-container" }, e3().createElement("textarea", { defaultValue: h3, name: l2, id: a3, ref: f3 }));
        });
        w.displayName = "JoditEditor", w.propTypes = { className: i2.string, config: i2.object, id: i2.string, name: i2.string, onBlur: i2.func, onChange: i2.func, editorRef: i2.func, tabIndex: i2.number, value: i2.string };
        const y2 = w;
      })(), n;
    })());
  })(joditReact);
  return joditReact.exports;
}
var joditReactExports = requireJoditReact();
const JoditEditor = /* @__PURE__ */ getDefaultExportFromCjs(joditReactExports);
const onEditorClick = (e2) => {
  var _a2;
  if (!e2.target) return;
  const target = e2.target.closest("a");
  if (!target) return;
  e2.preventDefault();
  const command = parseCommand(target.href);
  if (command.command) stmjsonClick(command);
  else if (target.href.includes("mailto")) {
    window.location.href = (_a2 = target.href.match(/mailto:[^]*/)) == null ? void 0 : _a2[0];
  } else window.open(target.href);
};
const confirmLoadImg = (espk) => {
  return new Promise((resolve) => {
    if (!espk) return resolve(false);
    renderMessageBox({
      dlgType: 3,
      message: "Вставить изображение как ссылку?",
      buttons: 12,
      closeF: (e2) => {
        console.log(e2);
      },
      selectF: (event) => {
        const {
          target: { value }
        } = event;
        resolve(value === "6");
      }
    });
  });
};
const loadImgLink = ({ base64: base642, docId, fileName }) => {
  if (!base642.includes("base64")) return;
  const config2 = {
    prefix: Prefixes.progs,
    loadMask: true,
    params: {
      name: "GetFileLinkParams",
      binary: "1"
    }
  };
  return smetaAxios.post("ExecABLProgram", { DocID: docId, $content: fileName, rcdata: base642.split(",")[1] }, config2);
};
const keyPass = [
  "F1",
  "F2",
  "F3",
  "F4",
  "F5",
  "F6",
  "F7",
  "F8",
  "F9",
  "F10",
  "F11",
  "F2",
  "CapsLock",
  "Shift",
  "Alt",
  "Meta",
  "Tab",
  "Control",
  "Insert",
  "Pause",
  "ScrollLock",
  "NumLock",
  "PageUp",
  "PageUpDown",
  "Escape",
  "End",
  "Home",
  "ContextMenu"
];
const TextEditor = ({
  inputValue,
  setValue,
  readonly,
  height: height2,
  setInputValue,
  onPostRecord,
  docId,
  onSave,
  linksEnabled
}) => {
  const [defaultValue, setDefaultValue] = reactExports.useState(inputValue.replaceAll("<a ", '<a style="cursor:pointer;" '));
  const {
    smeta: { espk }
  } = smetaStore.get(appConfig);
  const boolRef = reactExports.useRef(false);
  const editor = reactExports.useRef(null);
  const div = reactExports.useRef(null);
  const preparePaste = (jodit) => {
    jodit.events.on(
      "beforePaste",
      (e2) => {
        e2.preventDefault();
        const dataTransfer = joditReactExports.Jodit.modules.Helpers.getDataTransfer(e2);
        const pastedHTML = dataTransfer.getData(joditReactExports.Jodit.constants.TEXT_HTML);
        const pastedText = dataTransfer.getData(joditReactExports.Jodit.constants.TEXT_PLAIN);
        const pastedFiles = dataTransfer.files;
        if (pastedFiles.length > 0) {
          confirmLoadImg(Boolean(espk) && linksEnabled).then((needLink) => {
            Array.from(pastedFiles).forEach((file) => {
              if (file.type.startsWith("image/")) {
                const reader = new FileReader();
                reader.onload = (event) => {
                  let content2 = `<img src="${event.target.result}" alt="${file.name}" style="line-height: 10px;" />`;
                  if (!needLink) return jodit.s.insertHTML(content2);
                  const fileName = `Рисунок${getStrDateOfDateObj()}${getStrTimeOfDateObj()}.jpg`;
                  loadImgLink({ base64: event.target.result, docId, fileName }).then((res) => {
                    const hrefCommand = `stmjson:module,command=request,module=programs,token=ExecABLProgram,params:{${res.content}}`;
                    content2 = `<a href='${hrefCommand}' style='cursor:pointer; color:blue; text-decoration:underline;'>` + fileName + "<a/>";
                    jodit.s.insertHTML(content2);
                    setTimeout(() => {
                      onPostRecord(htmlToMime(jodit.value), jodit.text);
                    }, 500);
                  });
                };
                reader.readAsDataURL(file);
              }
            });
            return false;
          });
        } else if (pastedHTML || pastedText) {
          jodit.s.insertHTML(pastedHTML || pastedText);
        }
        return false;
      },
      { top: true }
    );
  };
  reactExports.useLayoutEffect(() => {
    joditReactExports.Jodit.plugins.add("preparePaste", preparePaste);
  }, []);
  reactExports.useEffect(() => {
    fullHeightAuto();
  }, [editor.current]);
  reactExports.useEffect(() => {
    setDefaultValue(inputValue.replaceAll("<a ", '<a style="cursor:pointer;" '));
  }, [inputValue]);
  const config2 = reactExports.useMemo(
    () => ({
      height: `calc(100% - ${height2})`,
      readonly: readonly ? readonly : false,
      addNewLine: false,
      iframe: true,
      showCharsCounter: false,
      showWordsCounter: false,
      showXPathInStatusbar: false,
      allowTabNavigation: true,
      extraPlugins: ["preparePaste"],
      askBeforePasteHTML: false,
      askBeforePasteFromWord: false,
      events: {
        click: onEditorClick,
        change: (newHtmlContent) => {
          if (boolRef.current) {
            boolRef.current = false;
            const textContent = getTextContent();
            setInputValue(newHtmlContent, textContent);
          }
        },
        keydown: (e2) => {
          if (keyPass.includes(e2.code)) return;
          if (e2.ctrlKey && e2.code === "KeyS") {
            e2.preventDefault();
            return onSave && onSave(e2);
          }
          boolRef.current = true;
        },
        paste: () => {
          boolRef.current = true;
        },
        drop: () => {
          boolRef.current = true;
        },
        beforeCommand: () => {
          boolRef.current = true;
        }
      },
      // extraPlugins: ["preparePaste"],
      allowResizeX: false,
      allowResizeY: false,
      toolbarButtonSize: "small",
      editHTMLDocumentMode: false,
      toolbarAdaptive: false,
      saveModeInStorage: false,
      saveHeightInStorage: false,
      disablePlugins: "add-new-line,about,clean-html,placeholder,class-span,inline-popup",
      buttons: "bold,italic,underline,font,fontsize,indent,outdent,left,brush,undo,redo,source,print",
      removeButtons: ["undo", "redo"],
      uploader: {
        insertImageAsBase64URI: true,
        defaultHandlerSuccess: () => {
          return false;
        }
      }
    }),
    []
  );
  const deleteLink = () => {
    const link = document.getElementsByClassName("jodit-status-bar-link");
    if (link && link.length > 0) {
      link[0].style.display = "none";
    }
  };
  const getTextContent = () => {
    if (!editor.current) return "";
    if (div.current) {
      const iframe = div.current.querySelector("iframe");
      if (!iframe) return "";
      return iframe.contentWindow.document.body.outerText;
    }
  };
  const fullHeightAuto = (elem) => {
    const JWorkPlace = elem ? elem.parentElement : document.getElementsByClassName("jodit-workplace")[0];
    if (JWorkPlace) {
      if (!elem) {
        JWorkPlace.firstChild.onfocus = function(e2) {
          fullHeightAuto(e2.target);
          deleteLink();
        };
      }
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: `calc(100% - ${height2})` }, ref: div, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    JoditEditor,
    {
      ref: editor,
      value: defaultValue,
      config: config2,
      tabIndex: 1,
      onBlur: (newHtmlContent, e2) => {
        try {
          if (e2.relatedTarget.className.includes("CloseButtonForGrid")) return;
          const textContent = getTextContent();
          fullHeightAuto();
          setValue(newHtmlContent, textContent);
        } catch {
          console.error("Потеря фокуса");
          editor.current && editor.current.focus();
        }
      }
    }
  ) });
};
const htmlToMime = (textValue) => {
  if (textValue === "") return "";
  let str = textValue;
  let result = "";
  let pos = 0;
  let img = [];
  let imgTypeArr = [];
  let imgBegin, resultBegin, resultEnd, imgEnd, imgEnd1;
  let imgType, base, imgAll;
  imgEnd = 0;
  function imageMime(number, img2, imgType2) {
    return "\r\nContent-Type: image/" + imgType2 + '; name="image' + number + "." + imgType2 + '"\r\nContent-ID: <image' + number + "." + imgType2 + ">\r\nContent-Transfer-Encoding: base64\r\n\r\n" + img2 + "\r\n\r\n------=_BOUNDARY_LINE_";
  }
  while (pos !== -1) {
    resultBegin = pos;
    pos = str.indexOf("<img", pos + 1);
    resultEnd = pos;
    let height2, width2;
    let beg, end2;
    if (pos !== -1) {
      beg = str.indexOf("width", pos + 1) + 7;
      end2 = str.indexOf('"', beg);
      width2 = beg === 6 ? 0 : str.substring(beg, end2);
      beg = str.indexOf("height", pos + 1) + 8;
      end2 = str.indexOf('"', beg);
      height2 = beg === 7 ? 0 : str.substring(beg, end2);
      base = str.indexOf(";base64", pos + 21);
      imgType = str.substring(base - 3, base);
      imgTypeArr.push(imgType);
      imgEnd1 = imgEnd;
      imgBegin = str.indexOf("base64", pos) + 7;
      imgEnd = str.indexOf('"', imgBegin);
      imgAll = str.indexOf("src=", pos) + 5;
      const img1 = new Image();
      img1.src = str.substring(imgAll, imgEnd);
      if (width2 === 0 && height2 === 0) {
        width2 = img1.width;
        height2 = img1.height;
      } else if (width2 === 0 && height2 !== 0) {
        let px = height2.indexOf("px", 0);
        height2 = px > 1 ? height2.substring(0, height2.length - 2) : height2;
        width2 = Math.round(img1.widt / img1.height * Number(height2)) + "px";
      } else if (width2 !== 0 && height2 === 0) {
        let px = width2.indexOf("px", 0);
        width2 = px > 1 ? width2.substring(0, width2.length - 2) : width2;
        height2 = Math.round(img1.height / img1.width * Number(width2)) + "px";
      }
      result += str.substring(resultBegin === 0 ? 0 : imgEnd1 + 2, resultEnd) + "<img width=" + width2 + "px height=" + height2 + ' alt="" src="cid:image' + img.length.toString() + "." + imgType + '">';
      img.push(str.substring(imgBegin, imgEnd));
      imgEnd = str.indexOf(">", pos) - 1;
    }
  }
  result += str.substring(imgEnd !== void 0 && imgEnd !== 0 ? imgEnd + 2 : 0, str.length);
  let mime = 'MIME-Version: 1.0\r\nContent-Type: multipart/related; boundary="----=_BOUNDARY_LINE_"\r\n\r\n------=_BOUNDARY_LINE_\r\nContent-Type: text/html; charset="utf-8"\r\nContent-Transfer-Encoding: base64\r\n\r\n' + btoa(utf8.encode(result)) + "\r\n\r\n------=_BOUNDARY_LINE_";
  for (let i = 0; i < img.length; i++) {
    mime += imageMime(i, img[i], imgTypeArr[i]);
  }
  mime += "--\r\n";
  return mime;
};
function DialogHtml(props) {
  const defaultValueRef = React.useRef(null);
  const [editorValue, setEditorValue] = React.useState("");
  React.useEffect(() => {
    if (props.htmlInput) {
      const mime = MIMEToHtml(props.htmlInput);
      if (mime !== "") {
        setEditorValue(mime);
      }
    }
  }, []);
  function InputButton2(event, RequestID) {
    let params2 = /* @__PURE__ */ new Map(), data, json, ClickedButton = event.target.value;
    if (ClickedButton === "1") {
      data = { Result: ClickedButton, $content: htmlToMime(editorValue) };
    } else {
      data = { Result: ClickedButton };
    }
    params2.set("prefix", "project");
    params2.set("comand", "ResumeRequest");
    params2.set("RequestID", RequestID);
    params2.set("WSM", "1");
    json = XMLrequest(params2, data);
    tokenProcessingTest(json, { propsId: props.id });
  }
  function MIMEToHtml(mime, win1251) {
    if (!mime.includes("MIME-Version: 1.0") && !mime.includes("Mime-Version: 1.0")) {
      const fixedMime = mime.replaceAll("\r\n", "<br/>").replaceAll("\n", "<br/>");
      return `<p>${fixedMime}</p>`;
    }
    let html2;
    let pos = 0;
    let img = [];
    let imgTypeArr = [];
    let resultBegin;
    let type2;
    let posName;
    let endName;
    let imgMap = /* @__PURE__ */ new Map();
    let imgExt = /* @__PURE__ */ new Map();
    var doc = document.createElement("doc");
    if (!mime.includes("-=_BOUNDARY_LINE_")) {
      let win8bit = false;
      if (mime.includes("Content-Transfer-Encoding: 8bit") || mime.includes("<html>") || mime.includes("<HTML>")) {
        if (!mime.includes("Content-Transfer-Encoding: quoted-printable")) {
          win8bit = true;
        }
      }
      html2 = "<div>Ошибка отображения данных<div>";
      let params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", "stmport");
      params2.set("comand", "EMLToMHT");
      AxiosRequest(true, params2, { $content: mime }).then((fixedMime) => {
        if (fixedMime.content && fixedMime.content.includes("-=_BOUNDARY_LINE_"))
          setEditorValue(MIMEToHtml(fixedMime.content, win8bit));
      });
      return "";
    } else {
      let utf8decoder;
      if (mime.includes('charset="koi8-r"')) {
        utf8decoder = new TextDecoder("koi8-r");
      } else if (mime.includes('charset="cp1251"')) {
        utf8decoder = new TextDecoder("cp1251");
      } else if (mime.includes('harset="windows-1251"') || win1251) {
        utf8decoder = new TextDecoder("windows-1251");
      } else {
        utf8decoder = new TextDecoder();
      }
      while (pos !== -1) {
        resultBegin = pos;
        pos = mime.indexOf("Content-Transfer-Encoding: base64", pos + 1);
        if (pos !== -1) {
          if (resultBegin === 0) {
            html2 = mime.substring(pos + 37, mime.indexOf("------=_BOUNDARY_LINE_", pos) - 4);
          } else {
            let buf = mime.substring(pos + 37, mime.indexOf("------=_BOUNDARY_LINE_", pos) - 4);
            img.push(buf);
            type2 = mime.indexOf(".", pos - 8);
            imgTypeArr.push(mime.substring(type2 + 1, pos - 3));
            posName = mime.indexOf("<", pos - 70);
            endName = mime.indexOf(">", pos - 70);
            imgMap.set(mime.substring(posName + 1, endName), buf);
            imgExt.set(mime.substring(posName + 1, endName), mime.substring(type2 + 1, pos - 3));
          }
        }
      }
      try {
        html2 = atob(html2);
        var uint8 = Uint8Array.from(html2.split("").map((x) => x.charCodeAt()));
        html2 = utf8decoder.decode(uint8);
        if (html2.includes("Mime-Version: 1.0") || html2.includes("MIME-Version: 1.0")) {
          let params2 = /* @__PURE__ */ new Map();
          params2.set("prefix", "stmport");
          params2.set("comand", "EMLToMHT");
          AxiosRequest(true, params2, { $content: html2 }).then((fixedMime) => {
            if (fixedMime.content) setEditorValue(MIMEToHtml(fixedMime.content));
          });
          return "";
        }
      } catch (_2) {
        html2 = "<div>Ошибка отображения данных<div>";
      }
    }
    if (img.length == 0) {
      if (html2.includes("<html>") || html2.includes("<HTML>")) {
        return htmlOnly(html2);
      }
    }
    html2 = html2.trim();
    doc.innerHTML = html2;
    let title = doc.querySelector("title");
    if (title !== null) {
      var para = document.createElement("div");
      let parent = title.parentNode;
      parent.replaceChild(para, title);
    }
    let spanList = doc.querySelectorAll("img");
    [...spanList].forEach((el) => {
      let key = el.src.substring(4, el.src.length);
      var para2 = document.createElement("img");
      if (el.width !== 0) {
        para2.width = el.width;
        para2.height = el.height;
        para2.src = "data:image/" + imgExt.get(key) + ";base64," + imgMap.get(key);
      } else {
        para2.src = "data:image/" + imgExt.get(key) + ";base64," + imgMap.get(key);
      }
      let parent = el.parentNode;
      parent.replaceChild(para2, el);
    });
    defaultValueRef.current = doc.innerHTML;
    return doc.innerHTML;
  }
  function htmlOnly(mime) {
    let pos = 0;
    let end2 = 0;
    let html2 = "";
    pos = mime.indexOf("<html>");
    if (pos == -1) {
      pos = mime.indexOf("<HTML>");
    }
    end2 = mime.indexOf("</html>");
    if (end2 == -1) {
      end2 = mime.indexOf("</HTML>");
    }
    html2 = mime.substring(pos, end2 + 7);
    return html2;
  }
  const handleChanges = (val) => {
    setEditorValue(val);
    if (props.onBlur && defaultValueRef.current !== val) {
      props.onBlur(htmlToMime(val));
    }
  };
  const handleOnChange = (htmlVal, textVal) => {
    if (props.onChange && defaultValueRef.current !== htmlVal) {
      const mime = htmlToMime(htmlVal);
      props.onChange(mime, textVal || mime);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      TextEditor,
      {
        inputValue: editorValue,
        setInputValue: handleOnChange,
        setValue: handleChanges,
        onPostRecord: props.onPostRecord,
        height: props.HiddenButton ? "0px" : "35px",
        readonly: props.readonly,
        docId: props.docId,
        onSave: props.onSave,
        linksEnabled: props.linksEnabled
      }
    ),
    !props.HiddenButton ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Box$1,
      {
        style: {
          marginLeft: "auto",
          width: "100%",
          height: "35px",
          justifyContent: "flex-end",
          display: "flex"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              value: 1,
              onClick: (e2) => InputButton2(e2, props.RequestID),
              style: { textTransform: "none" },
              className: "button_Modal_Select",
              children: "Выбрать"
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              onClick: (e2) => InputButton2(e2, props.RequestID),
              style: { textTransform: "none", marginLeft: 10 },
              className: "button_Modal_Close",
              children: "Отмена"
            }
          )
        ]
      }
    ) : null
  ] });
}
const DialogHtml$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: DialogHtml,
  htmlToMime
}, Symbol.toStringTag, { value: "Module" }));
function IMemo(props) {
  const [value, setValue] = React.useState(props.Text);
  const [openTooltip, setOpenTooltip] = React.useState(false);
  const [countChars, setCountChars] = React.useState(props.Text ? props.Text.length : 0);
  const counter = React.useRef();
  function onOpenToolTip() {
    setOpenTooltip(true);
  }
  function onCloseToolTip() {
    setOpenTooltip(false);
  }
  function getHint() {
    if (props.showHint) return props.hint;
    return "";
  }
  React.useEffect(() => {
    if (props) {
      setValue(props.Text);
      setCountChars(props.Text ? props.Text.length : 0);
    }
  }, [props]);
  React.useEffect(() => {
    setValue(props.Text);
  }, [props.Text]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { open: openTooltip, arrow: true, placement: "bottom-start", title: getHint(), children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "100%", width: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: `calc(100% - ${props.hideCharCount ? "0px" : "24px"})`, width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      "textarea",
      {
        id: props.id,
        onMouseEnter: onOpenToolTip,
        onMouseLeave: onCloseToolTip,
        placeholder: props.placeholder || "",
        value,
        keyname: props.keyName,
        readOnly: props.readOnly,
        style: props.style,
        onChange: (event) => {
          setValue(event.target.value);
          setCountChars(event.target.value.length);
          if (props.onChange) {
            props.onChange(event);
          }
        },
        onBlur: (ev) => {
          if (props.onBlur) props.onBlur(ev);
        },
        onPaste: props.onPaste
      },
      props.keyName
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      "div",
      {
        style: {
          width: "100%",
          height: "23px",
          paddingLeft: "5px",
          display: props.hideCharCount ? "none" : "inline-flex",
          alignItems: "center",
          fontFamily: "monospace",
          fontSize: "13.33px",
          borderTop: "1px solid rgb(203, 203, 202)"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Количество символов:" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { paddingLeft: "2px" }, ref: counter, children: countChars })
        ]
      }
    )
  ] }) });
}
var GridOff = {};
var hasRequiredGridOff;
function requireGridOff() {
  if (hasRequiredGridOff) return GridOff;
  hasRequiredGridOff = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(GridOff, "__esModule", {
    value: true
  });
  GridOff.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  GridOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2zm8 0h4v4h-4zM1.27 1.27 0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27zM10 12.55 11.45 14H10zm-6-6L5.45 8H4zM8 20H4v-4h4zm0-6H4v-4h3.45l.55.55zm6 6h-4v-4h3.45l.55.54zm2 0v-1.46L17.46 20z"
  }), "GridOff");
  return GridOff;
}
var GridOffExports = /* @__PURE__ */ requireGridOff();
const GridOffIcon = /* @__PURE__ */ getDefaultExportFromCjs(GridOffExports);
var GridOn = {};
var hasRequiredGridOn;
function requireGridOn() {
  if (hasRequiredGridOn) return GridOn;
  hasRequiredGridOn = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(GridOn, "__esModule", {
    value: true
  });
  GridOn.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  GridOn.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M8 20H4v-4h4zm0-6H4v-4h4zm0-6H4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4zm6 12h-4v-4h4zm0-6h-4v-4h4zm0-6h-4V4h4z"
  }), "GridOn");
  return GridOn;
}
var GridOnExports = /* @__PURE__ */ requireGridOn();
const GridOnIcon = /* @__PURE__ */ getDefaultExportFromCjs(GridOnExports);
var Key = {};
var hasRequiredKey;
function requireKey() {
  if (hasRequiredKey) return Key;
  hasRequiredKey = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Key, "__esModule", {
    value: true
  });
  Key.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Key.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M21 10h-8.35C11.83 7.67 9.61 6 7 6c-3.31 0-6 2.69-6 6s2.69 6 6 6c2.61 0 4.83-1.67 5.65-4H13l2 2 2-2 2 2 4-4.04zM7 15c-1.65 0-3-1.35-3-3s1.35-3 3-3 3 1.35 3 3-1.35 3-3 3"
  }), "Key");
  return Key;
}
var KeyExports = /* @__PURE__ */ requireKey();
const KeyIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyExports);
var KeyboardArrowLeft = {};
var hasRequiredKeyboardArrowLeft;
function requireKeyboardArrowLeft() {
  if (hasRequiredKeyboardArrowLeft) return KeyboardArrowLeft;
  hasRequiredKeyboardArrowLeft = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardArrowLeft, "__esModule", {
    value: true
  });
  KeyboardArrowLeft.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardArrowLeft.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"
  }), "KeyboardArrowLeft");
  return KeyboardArrowLeft;
}
var KeyboardArrowLeftExports = /* @__PURE__ */ requireKeyboardArrowLeft();
const KeyboardArrowLeftIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardArrowLeftExports);
var KeyboardArrowRight = {};
var hasRequiredKeyboardArrowRight;
function requireKeyboardArrowRight() {
  if (hasRequiredKeyboardArrowRight) return KeyboardArrowRight;
  hasRequiredKeyboardArrowRight = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardArrowRight, "__esModule", {
    value: true
  });
  KeyboardArrowRight.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardArrowRight.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"
  }), "KeyboardArrowRight");
  return KeyboardArrowRight;
}
var KeyboardArrowRightExports = /* @__PURE__ */ requireKeyboardArrowRight();
const KeyboardArrowRightIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardArrowRightExports);
var Refresh = {};
var hasRequiredRefresh;
function requireRefresh() {
  if (hasRequiredRefresh) return Refresh;
  hasRequiredRefresh = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Refresh, "__esModule", {
    value: true
  });
  Refresh.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Refresh.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"
  }), "Refresh");
  return Refresh;
}
var RefreshExports = /* @__PURE__ */ requireRefresh();
const RefreshIcon = /* @__PURE__ */ getDefaultExportFromCjs(RefreshExports);
var Save = {};
var hasRequiredSave;
function requireSave() {
  if (hasRequiredSave) return Save;
  hasRequiredSave = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Save, "__esModule", {
    value: true
  });
  Save.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Save.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"
  }), "Save");
  return Save;
}
var SaveExports = /* @__PURE__ */ requireSave();
const SaveIcon = /* @__PURE__ */ getDefaultExportFromCjs(SaveExports);
var Undo = {};
var hasRequiredUndo;
function requireUndo() {
  if (hasRequiredUndo) return Undo;
  hasRequiredUndo = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Undo, "__esModule", {
    value: true
  });
  Undo.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Undo.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8"
  }), "Undo");
  return Undo;
}
var UndoExports = /* @__PURE__ */ requireUndo();
const UndoIcon = /* @__PURE__ */ getDefaultExportFromCjs(UndoExports);
var ViewModuleOutlined = {};
var hasRequiredViewModuleOutlined;
function requireViewModuleOutlined() {
  if (hasRequiredViewModuleOutlined) return ViewModuleOutlined;
  hasRequiredViewModuleOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ViewModuleOutlined, "__esModule", {
    value: true
  });
  ViewModuleOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ViewModuleOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M3 5v14h18V5zm16 6h-3.33V7H19zm-5.33 0h-3.33V7h3.33zM8.33 7v4H5V7zM5 17v-4h3.33v4zm5.33 0v-4h3.33v4zm5.34 0v-4H19v4z"
  }), "ViewModuleOutlined");
  return ViewModuleOutlined;
}
var ViewModuleOutlinedExports = /* @__PURE__ */ requireViewModuleOutlined();
const ViewModuleOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ViewModuleOutlinedExports);
var FilterAltOff = {};
var hasRequiredFilterAltOff;
function requireFilterAltOff() {
  if (hasRequiredFilterAltOff) return FilterAltOff;
  hasRequiredFilterAltOff = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(FilterAltOff, "__esModule", {
    value: true
  });
  FilterAltOff.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  FilterAltOff.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19.79 5.61C20.3 4.95 19.83 4 19 4H6.83l7.97 7.97zM2.81 2.81 1.39 4.22 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-2.17l5.78 5.78 1.41-1.41z"
  }), "FilterAltOff");
  return FilterAltOff;
}
var FilterAltOffExports = /* @__PURE__ */ requireFilterAltOff();
const FilterAltOffIcon = /* @__PURE__ */ getDefaultExportFromCjs(FilterAltOffExports);
var FilterAlt = {};
var hasRequiredFilterAlt;
function requireFilterAlt() {
  if (hasRequiredFilterAlt) return FilterAlt;
  hasRequiredFilterAlt = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(FilterAlt, "__esModule", {
    value: true
  });
  FilterAlt.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  FilterAlt.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M4.25 5.61C6.27 8.2 10 13 10 13v6c0 .55.45 1 1 1h2c.55 0 1-.45 1-1v-6s3.72-4.8 5.74-7.39c.51-.66.04-1.61-.79-1.61H5.04c-.83 0-1.3.95-.79 1.61"
  }), "FilterAlt");
  return FilterAlt;
}
var FilterAltExports = /* @__PURE__ */ requireFilterAlt();
const FilterAltIcon = /* @__PURE__ */ getDefaultExportFromCjs(FilterAltExports);
var ChevronRight = {};
var hasRequiredChevronRight;
function requireChevronRight() {
  if (hasRequiredChevronRight) return ChevronRight;
  hasRequiredChevronRight = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ChevronRight, "__esModule", {
    value: true
  });
  ChevronRight.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ChevronRight.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
  }), "ChevronRight");
  return ChevronRight;
}
var ChevronRightExports = /* @__PURE__ */ requireChevronRight();
const ChevronRightIcon = /* @__PURE__ */ getDefaultExportFromCjs(ChevronRightExports);
const nestedMenu = "_nestedMenu_k7xnv_1";
const nestedMenuDisabled = "_nestedMenuDisabled_k7xnv_15";
const nestedMenuPopper = "_nestedMenuPopper_k7xnv_21";
const nestedMenuItem = "_nestedMenuItem_k7xnv_31";
const nestedMenuItemLabel = "_nestedMenuItemLabel_k7xnv_41";
const menuItem = "_menuItem_k7xnv_55";
const menuItemLabel = "_menuItemLabel_k7xnv_71";
const menuHidden = "_menuHidden_k7xnv_77";
const menuGroupIconLeft = "_menuGroupIconLeft_k7xnv_83";
const menuGroupIconRight = "_menuGroupIconRight_k7xnv_95";
const menuIcon = "_menuIcon_k7xnv_107";
const nestedMenuButton = "_nestedMenuButton_k7xnv_117";
const nestedMenuCheck = "_nestedMenuCheck_k7xnv_127";
const menuStyles = {
  nestedMenu,
  nestedMenuDisabled,
  nestedMenuPopper,
  nestedMenuItem,
  nestedMenuItemLabel,
  menuItem,
  menuItemLabel,
  menuHidden,
  menuGroupIconLeft,
  menuGroupIconRight,
  menuIcon,
  nestedMenuButton,
  nestedMenuCheck
};
function MenuColumnsFilters(props) {
  const { values: values2, onClickMenuItem, name, disabled } = props;
  const [open, setOpen] = reactExports.useState(false);
  const [timer2, setTimer] = reactExports.useState();
  const [checkStates, setCheckStates] = reactExports.useState({});
  const anchorEl = reactExports.useRef(null);
  const updateOpenState = () => {
    if (!values2 || !values2.length) {
      setOpen(false);
    }
  };
  reactExports.useEffect(updateOpenState, [values2]);
  const onMouseEnter2 = () => {
    if (!values2 || !values2.length) return;
    const timout = setTimeout(() => {
      setOpen(true);
    }, 350);
    setTimer(timout);
  };
  const onMouseLeave2 = () => {
    if (!values2 || !values2.length) return;
    clearTimeout(timer2);
    setOpen(false);
  };
  const onCheck = (data, item) => {
    if (!item.key) return;
    if (data.CheckState === "1") {
      checkStates[item.key] = item;
    } else delete checkStates[item.key];
    setCheckStates({ ...checkStates });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    "div",
    {
      className: clsx$3(menuStyles.nestedMenu, disabled && menuStyles.nestedMenuDisabled),
      onMouseEnter: onMouseEnter2,
      onMouseLeave: onMouseLeave2,
      ref: anchorEl,
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { className: clsx$3(menuStyles.nestedMenuItemLabel), children: name }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(ChevronRightIcon, {}),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Popper, { className: clsx$3(menuStyles.nestedMenuPopper), open, placement: "right", anchorEl: anchorEl.current, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Paper, { children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              onClick: (ev) => {
                onClickMenuItem(ev, "CFilterClear", checkStates);
              },
              disabled: isEmptyObject(checkStates),
              className: clsx$3(menuStyles.nestedMenuButton),
              children: "Снять выбранные"
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(List, { children: values2 == null ? void 0 : values2.map((item, index2) => {
            const { value, name: name2, key } = item;
            return /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItem$1, { className: clsx$3(menuStyles.nestedMenuItem), children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(menuStyles.nestedMenuCheck), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                CheckBoxMultiCheck,
                {
                  CheckState: key && checkStates[key] ? "1" : "0",
                  onEdit: (data) => onCheck(data, item)
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ListItemButton,
                {
                  onClick: (ev) => {
                    key && onClickMenuItem(ev, value, { [key]: item });
                  },
                  className: clsx$3(menuStyles.nestedMenuItemLabel),
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { children: name2 })
                }
              )
            ] }, "ButtonsMenu" + index2);
          }) })
        ] }) })
      ]
    }
  );
}
var DragHandle = {};
var hasRequiredDragHandle;
function requireDragHandle() {
  if (hasRequiredDragHandle) return DragHandle;
  hasRequiredDragHandle = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(DragHandle, "__esModule", {
    value: true
  });
  DragHandle.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  DragHandle.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M20 9H4v2h16zM4 15h16v-2H4z"
  }), "DragHandle");
  return DragHandle;
}
var DragHandleExports = /* @__PURE__ */ requireDragHandle();
const DragHandleIcon = /* @__PURE__ */ getDefaultExportFromCjs(DragHandleExports);
const getMenu = (data) => {
  const { grid, source, filterDataRef } = data;
  const filterData = grid == null ? void 0 : grid.getFilterData();
  filterDataRef.current.hFilterState = Boolean(filterData == null ? void 0 : filterData.rowFilterFiltered);
  filterDataRef.current.hFilterVisible = Boolean((grid == null ? void 0 : grid.filter.style.display) === "grid");
  const filterValues = Object.entries(filterData || {}).reduce((acc, [key, value]) => {
    const title = source == null ? void 0 : source.getFieldTitle(key);
    if (value.filtered) acc.push({ name: title, value: "CFilterClear", key });
    return acc;
  }, []);
  return [
    {
      name: "Видимость горизонтального фильтра",
      value: "HFilterVisible",
      showIcon: filterDataRef.current.hFilterVisible,
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { className: clsx$3(menuStyles.menuIcon) })
    },
    {
      name: filterDataRef.current.hFilterState ? "Выключить горизонтальный фильтр" : "Включить горизонтальный фильтр",
      value: "HFilter",
      showIcon: true,
      icon: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        filterDataRef.current.hFilterState ? /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltIcon, { className: clsx$3(menuStyles.menuGroupIconLeft) }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltOffIcon, { className: clsx$3(menuStyles.menuGroupIconLeft) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DragHandleIcon, { className: clsx$3(menuStyles.menuGroupIconRight) })
      ] }),
      disabled: !filterDataRef.current.hFilterVisible
    },
    {
      name: "Очистить горизонтальный фильтр",
      value: "HFilterClear",
      showIcon: true,
      icon: /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltOffIcon, { className: clsx$3(menuStyles.menuGroupIconLeft) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DragHandleIcon, { className: clsx$3(menuStyles.menuGroupIconRight) })
      ] }),
      disabled: !filterDataRef.current.hFilterState
    },
    { name: "Снять фильтры с", values: filterValues, disabled: filterValues.length === 0 },
    {
      name: "Снять все фильтры на колонках",
      value: "CFiltersClear",
      disabled: filterValues.length === 0
    },
    {
      name: "Снять все фильтры",
      value: "AllFiltersClear",
      showIcon: true,
      icon: /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltOffIcon, { className: clsx$3(menuStyles.menuIcon) })
    },
    {
      name: "Отфильтровать по текущему значению",
      value: "HFilterCurrentValue"
    }
  ];
};
function FilterMenuForButtonGridFilter(props) {
  const { grid, source, visible } = props;
  const [openFilterMenu, setOpenFilterMenu] = reactExports.useState(false);
  const [menuState, setMenuState] = reactExports.useState([]);
  const [menu, setMenu] = reactExports.useState();
  const filterAnchorEl = reactExports.useRef(null);
  const filterData = reactExports.useRef({
    hFilterVisible: false,
    hFilterState: false
  });
  const initVisible = () => {
    if (grid && source) {
      filterData.current.hFilterVisible = grid.filter.style.display === "grid";
    }
  };
  reactExports.useEffect(initVisible, [grid, source]);
  const updateJsx = () => {
    if (menuState) {
      setMenu(getJsxMenu(menuState));
    }
  };
  reactExports.useEffect(updateJsx, [menuState]);
  const getJsxMenu = (items) => {
    return items.map((item, index2) => {
      const { value, name, showIcon, icon, disabled, values: values2 } = item;
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuItem,
        {
          disabled,
          onClick: (ev) => {
            menuClickHandler(ev, value);
          },
          className: clsx$3(menuStyles.menuItem),
          children: values2 ? /* @__PURE__ */ jsxRuntimeExports.jsx(MenuColumnsFilters, { values: values2, onClickMenuItem: menuClickHandler, name }) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
            showIcon && icon,
            /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { className: clsx$3(menuStyles.menuItemLabel), children: name })
          ] })
        },
        "ButtonsMenu" + index2
      );
    });
  };
  const clickFilterButton = (ev) => {
    ev.preventDefault();
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
    setOpenFilterMenu(!openFilterMenu);
  };
  const menuClickHandler = (ev, comand, items) => {
    var _a2;
    if (!comand) return;
    const comands = {
      HFilterVisible: changeHFilterVisible,
      HFilter: switchHFilter,
      HFilterClear: clearHFilter,
      CFilterClear: clearCFilter,
      CFiltersClear: clearAllCFilters,
      AllFiltersClear: clearAllFilters,
      HFilterCurrentValue: setHFilterCurrentValue
    };
    (_a2 = comands[comand]) == null ? void 0 : _a2.call(comands, items);
  };
  const changeHFilterVisible = async () => {
    await (grid == null ? void 0 : grid.setOptions(1));
    filterData.current.hFilterVisible = !filterData.current.hFilterVisible;
    await (grid == null ? void 0 : grid.switchFilter(filterData.current.hFilterVisible));
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
  };
  const switchHFilter = async () => {
    var _a2;
    const filterButton = (_a2 = grid == null ? void 0 : grid.filter) == null ? void 0 : _a2.querySelector("button");
    filterButton == null ? void 0 : filterButton.click();
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
  };
  const clearHFilter = async () => {
    const data = grid == null ? void 0 : grid.getFilterData();
    if (data) {
      data.rowFilter = {};
    }
    grid == null ? void 0 : grid.setFilterData({ ...data });
    await (grid == null ? void 0 : grid.applyColumnFilter(getFilterResult(data || {}, { column: true })));
    await (grid == null ? void 0 : grid.refreshSource("!"));
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
  };
  const clearCFilter = async (items) => {
    const keys = Object.keys(items || {});
    const newItem = { checkData: {}, filtered: void 0, focusRecID: void 0, multiCheck: false };
    const newFilterData = keys.reduce((acc, key) => {
      acc[key] = newItem;
      return acc;
    }, {});
    const data = grid == null ? void 0 : grid.getFilterData();
    grid == null ? void 0 : grid.setFilterData({ ...data, ...newFilterData });
    await (grid == null ? void 0 : grid.applyColumnFilter(getFilterResult(data || {}, { column: true, row: true, ignor: keys })));
    await (grid == null ? void 0 : grid.refreshSource("!"));
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
  };
  const clearAllCFilters = async () => {
    const data = grid == null ? void 0 : grid.getFilterData();
    grid == null ? void 0 : grid.setFilterData({ rowFilter: (data == null ? void 0 : data.rowFilter) || {}, rowFilterFiltered: (data == null ? void 0 : data.rowFilterFiltered) || false });
    await (grid == null ? void 0 : grid.applyColumnFilter(getFilterResult(data || {}, { row: true })));
    await (grid == null ? void 0 : grid.refreshSource("!"));
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
  };
  const clearAllFilters = async () => {
    grid == null ? void 0 : grid.setFilterData({});
    await (grid == null ? void 0 : grid.applyColumnFilter({}));
    await (grid == null ? void 0 : grid.refreshSource("!"));
    if (filterData.current.hFilterVisible) {
      await (grid == null ? void 0 : grid.setOptions(1));
      filterData.current.hFilterVisible = !filterData.current.hFilterVisible;
    }
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
  };
  const setHFilterCurrentValue = async () => {
    const key = grid == null ? void 0 : grid.getCurrentFieldName();
    if (!key) return;
    const text = source == null ? void 0 : source.getFieldTextSync(key);
    if (!text) return;
    const data = grid == null ? void 0 : grid.getFilterData();
    if (!filterData.current.hFilterVisible) {
      filterData.current.hFilterVisible = !filterData.current.hFilterVisible;
      await (grid == null ? void 0 : grid.setOptions(1));
      await (grid == null ? void 0 : grid.switchFilter(filterData.current.hFilterVisible));
    }
    if (data) {
      if (!data.rowFilter) data.rowFilter = {};
      data.rowFilterFiltered = true;
      data.rowFilter[key] = { [text]: null, ["$tag"]: 1 };
      if (data == null ? void 0 : data[key]) data == null ? true : delete data[key];
      grid == null ? void 0 : grid.setFilterData({ ...data });
      await (grid == null ? void 0 : grid.applyColumnFilter(getFilterResult(data || {}, { row: true, column: true })));
      await (grid == null ? void 0 : grid.refreshSource("!"));
    }
    setMenuState([...getMenu({ filterDataRef: filterData, grid, source })]);
  };
  const getFilterResult = (data, params2) => {
    if (params2.row && !params2.column) {
      if (data.rowFilterFiltered) {
        return { ...data == null ? void 0 : data.rowFilter };
      }
    }
    if (params2.column && !params2.row) {
      const filterResult = {};
      Object.entries(data || {}).forEach(([key, filter2]) => {
        var _a2;
        if (!((data == null ? void 0 : data.rowFilterFiltered) && key === "rowFilter")) {
          if (filter2.filtered && ((_a2 = params2.ignor) == null ? void 0 : _a2.includes(key)) !== true) filterResult[key] = filter2.value;
        }
      });
      return filterResult;
    }
    if (params2.column && params2.row) {
      return {
        ...getFilterResult(data, { row: true }),
        ...getFilterResult(data, { column: true, ignor: params2.ignor })
      };
    }
    return {};
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Фильтрация документа", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        onContextMenu: clickFilterButton,
        ref: filterAnchorEl,
        className: clsx$3(!visible && menuStyles.menuHidden),
        onClick: changeHFilterVisible,
        children: filterData.current.hFilterVisible ? /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltIcon, { sx: { fontSize: "1.15rem" } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltOffIcon, { sx: { fontSize: "1.15rem" } })
      }
    ) }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Menu,
      {
        anchorEl: filterAnchorEl.current,
        open: openFilterMenu,
        onClose: () => {
          setOpenFilterMenu(false);
        },
        children: menu
      }
    )
  ] });
}
function ButtonsForGridComponent(props) {
  var _a2, _b;
  const [anchorEl, setAnchorEl] = React.useState(null);
  const [gridObject, setGridObject] = React.useState();
  const [canModify, setCanModify] = React.useState({
    delete: true,
    insert: true
  });
  const iconsSize = { fontSize: "1.15rem" };
  React.useEffect(() => {
    if (props.grid) {
      setGridObject(props.grid);
    }
  }, [props.grid]);
  const handleCloseAnchorEl = () => {
    setAnchorEl(null);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      id: "ButtonsForGrid",
      style: {
        height: "100%",
        width: "100%",
        paddingLeft: "5px",
        backgroundColor: "rgb(250, 249, 245)",
        ...props.style
      },
      container: true,
      direction: "row",
      justifyContent: "flex-start",
      alignItems: "center",
      children: [
        gridObject && gridObject.grid && gridObject.source ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
          props.children,
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Создать", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.create ? "" : "none" },
              value: "append",
              id: "appendButtonForGrid",
              onClick: (e2) => {
                if (props.buttons.createList) {
                  props.onClick(e2);
                } else {
                  gridObject.grid.appendRecord();
                }
              },
              disabled: !gridObject.grid.getActiveSource().rights.insert || props.canModifyObj && props.canModifyObj.insert,
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(AddIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Первая запись", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.navigate ? "" : "none" },
              disabled: gridObject.grid ? gridObject.grid.getActiveSource().activeRecord === 0 : false,
              onClick: () => {
                gridObject.grid.firstScroll();
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowLeftIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Предыдущая запись", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.navigate ? "" : "none" },
              disabled: gridObject.grid ? gridObject.grid.getActiveSource().activeRecord === 0 : false,
              onClick: async () => {
                await gridObject.grid.moveRecord(-1);
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowLeftIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Следующая запись", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.navigate ? "" : "none" },
              disabled: gridObject.grid ? gridObject.grid.getActiveSource().activeRecord === gridObject.grid.getActiveSource().recordCount - 1 : false,
              onClick: async () => {
                await gridObject.grid.moveRecord(1);
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowRightIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Последняя запись", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.navigate ? "" : "none" },
              disabled: gridObject.grid ? gridObject.grid.getActiveSource().activeRecord === gridObject.grid.getActiveSource().recordCount - 1 : false,
              onClick: () => {
                gridObject.grid.lastScroll();
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowRightIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Удалить запись", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.delete ? "" : "none" },
              disabled: !gridObject.grid.getActiveSource().rights.delete || props.canModifyObj && props.canModifyObj.delete,
              onClick: () => {
                if (gridObject.source.rights.delete) {
                  gridObject.grid.deleteRecord().then(() => gridObject.grid.refreshSource());
                }
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: props.buttonsState && props.buttonsState.card ? "Обычный режим" : "Режим карточки", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.card ? "" : "none" },
              value: "cardmode",
              onClick: (e2) => {
                props.onClick(e2);
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(ViewModuleOutlinedIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Детализация документа", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.detail ? "" : "none" },
              value: "details",
              onClick: props.onClick,
              disabled: props.DisableDetails,
              children: props.buttonsState && props.buttonsState.detail ? /* @__PURE__ */ jsxRuntimeExports.jsx(GridOnIcon, { sx: iconsSize }) : /* @__PURE__ */ jsxRuntimeExports.jsx(GridOffIcon, { sx: iconsSize })
            }
          ) }) }),
          " ",
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Подписать документ", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { style: { display: props.buttons.sign ? "" : "none" }, value: "sign", onClick: props.onClick, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyIcon, { sx: iconsSize }) }) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            FilterMenuForButtonGridFilter,
            {
              grid: gridObject == null ? void 0 : gridObject.grid,
              source: gridObject == null ? void 0 : gridObject.source,
              visible: Boolean(props.buttons.filter),
              filterState: Boolean((_a2 = props.buttonsState) == null ? void 0 : _a2.filter)
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Показать только отмеченные", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.salarySelected ? "" : "none" },
              disabled: false,
              value: "ShowOnlySelected",
              onClick: (e2) => {
                props.onClick(e2);
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                CheckIcon,
                {
                  className: ((_b = props.buttonsState) == null ? void 0 : _b.salarySelected) ? "grid-button-pressed" : void 0,
                  sx: iconsSize
                }
              )
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Печать", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.print ? "" : "none" },
              disabled: false,
              value: "print",
              onClick: (e2) => {
                props.onClick(e2);
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(PrintRoundedIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Обновить данные", children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.refreshFull ? "" : "none" },
              value: "RefreshFull",
              onClick: props.onClick,
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshIcon, { sx: iconsSize })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: props.save ? "Сохранить изменения" : "Нечего сохранять", disableInteractive: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              style: { display: props.buttons.save ? "" : "none" },
              value: "save",
              onClick: (e2) => {
                setAnchorEl(e2.currentTarget);
              },
              disabled: !props.save,
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(SaveIcon, { sx: iconsSize, className: props.save ? "SaveIcon" : "" })
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Menu,
            {
              anchorEl,
              open: Boolean(anchorEl),
              onClose: handleCloseAnchorEl,
              MenuListProps: {
                "aria-labelledby": "basic-button"
              },
              children: [
                { Name: "Сохранить изменения", value: "CommitUpdates" },
                { Name: "Отменить изменения", value: "CancelUpdates" }
              ].map((item, index2) => {
                return /* @__PURE__ */ jsxRuntimeExports.jsx(
                  MenuItem,
                  {
                    value: "Commit",
                    command: item.value,
                    onClick: (e2) => {
                      props.onClick(e2);
                      setAnchorEl(null);
                    },
                    style: { height: "35px" },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { children: item.Name })
                  },
                  "ButtonsMenu" + index2
                );
              })
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Grid$1,
            {
              item: true,
              style: {
                display: !!props.redactor && props.buttons.editButtons ? "" : "none"
              },
              id: `CommitAndCancelButtForGrid${props.id}`,
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Tooltip,
                  {
                    title: "Сохранить редактирование",
                    className: "ApplyButtonForGrid",
                    leaveTouchDelay: 0,
                    TransitionProps: { timeout: 0 },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { value: "SaveRedactor", onClick: props.onClick, className: "ApplyButtonForGrid", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { sx: iconsSize, className: "ApplyButtonForGrid" }) }) })
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Tooltip,
                  {
                    leaveTouchDelay: 0,
                    title: "Отменить редактирование",
                    className: "CloseButtonForGrid",
                    TransitionProps: { timeout: 0 },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { value: "CancelRedactor", onClick: props.onClick, className: "CloseButtonForGrid", children: /* @__PURE__ */ jsxRuntimeExports.jsx(UndoIcon, { sx: iconsSize, className: "CloseButtonForGrid" }) }) })
                  }
                )
              ]
            }
          )
        ] }) : null,
        /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { fontSize: "0.9rem" }, children: props.onTheRightText ? props.onTheRightText : "" })
      ]
    },
    "ButtonsForGrid" + props.id
  );
}
const defaultDocsSettings = {
  save: {
    label: "Предупреждать о несохраненных изменениях при переходе на другую секцию",
    disabled: false,
    checked: true
  },
  dbclick: { label: "Открывать  карточку документа по двойному щелчку мыши", disabled: true, checked: false },
  border: { label: "Выделять текущую запись запись таблицы детализации рамкой", disabled: true, checked: false },
  activeRecord: { label: "Восстанавливать активный документ при следующем входе", disabled: false, checked: true }
};
function CheckBoxedForDocandSettings(props) {
  const [checkBoxes, setCheckBoxes] = reactExports.useState(defaultDocsSettings);
  reactExports.useEffect(() => {
    const docState = checkDocsSettings();
    if (docState === null || docState === "") return;
    setCheckBoxes(docState);
  }, []);
  const onCheckChange = (key) => {
    if (key) {
      const checkState = {
        ...checkBoxes,
        [key]: { ...checkBoxes[key], checked: !checkBoxes[key].checked }
      };
      localStorage.setItem("docState", JSON.stringify(checkState));
      setCheckBoxes(checkState);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormGroup, { children: Object.entries(checkBoxes).map(([key, value]) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      FormControlLabel,
      {
        disabled: value.disabled,
        id: key,
        onChange: () => {
          onCheckChange(key);
        },
        control: /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { id: key, checked: value.checked }),
        label: value.label
      },
      key
    );
  }) });
}
function DocInfoAndSettings(props) {
  const [grid, setGrid] = reactExports.useState(props.grid);
  function getLink() {
    let link = window.location.href;
    link += `&modal&parsed&docid=${grid.getActiveSource().getFieldTextSync("ID")}&card`;
    link = link.replace(/secid=[0-9]+[&]?/gm, "");
    let lastloginDrx = localStorage.getItem("LastLogin");
    if (lastloginDrx) {
      lastloginDrx = lastloginDrx.split(",");
      if (lastloginDrx.length > 0) {
        link += `&configname=${encodeURIComponent(lastloginDrx[0])}`;
      }
    }
    return link;
  }
  return (
    // <ModalWindow
    //   Title="Документ"
    //   style={{ height: `${430}px`, width: `${580}px` }}
    //   Buttons={{
    //     jsonData: {
    //       Кнопка$Выбрать: "Закрыть",
    //     },
    //     Params: { Buttons: "1" },
    //   }}
    //   resizeMode={false}
    // >
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs, { id: "optionsForUser", style: { width: "100%", height: "100%" }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        TabItem,
        {
          label: "Информация",
          style: {
            textTransform: "none",
            width: "100%",
            height: "100%",
            padding: "0px",
            display: "inline-block",
            overflow: "hidden"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Grid$1,
            {
              container: true,
              direction: "column",
              justifyContent: "center",
              alignItems: "flex-start",
              spacing: 3,
              sx: { mt: 1, overflow: "hidden" },
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, children: [
                  `Время создания: ${grid.getActiveSource().getFieldTextSync("CreateTime")}`,
                  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
                  `Автор: ${grid.getActiveSource().getFieldTextSync("CreateUser")}`
                ] }),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, children: [
                  `Время изменения: ${grid.getActiveSource().getFieldTextSync("UpdateTime")}`,
                  /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
                  `Автор: ${grid.getActiveSource().getFieldTextSync("UpdateUser")}`
                ] }),
                /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, children: [
                  `Внутренний код: ${grid.getActiveSource().getFieldTextSync("ID")}  `,
                  `Индекс типа: ${grid.doccfgid ? grid.doccfgid : ""}`
                ] }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("a", { style: { cursor: "pointer" }, href: getLink(), children: "Ссылка на документ" }) })
              ]
            }
          )
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        TabItem,
        {
          id: "ThemeTab",
          label: "Настройки",
          style: {
            textTransform: "none",
            width: "100%",
            height: "100%",
            padding: "0px",
            display: "inline-block",
            overflow: "hidden"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Grid$1,
            {
              container: true,
              direction: "column",
              justifyContent: "center",
              alignItems: "flex-start",
              sx: { mt: 1, overflow: "hidden" },
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxedForDocandSettings, {}) }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true })
              ]
            }
          )
        }
      )
    ] })
  );
}
var BackupTable = {};
var hasRequiredBackupTable;
function requireBackupTable() {
  if (hasRequiredBackupTable) return BackupTable;
  hasRequiredBackupTable = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(BackupTable, "__esModule", {
    value: true
  });
  BackupTable.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  BackupTable.default = (0, _createSvgIcon.default)([/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M20 6v14H6v2h14c1.1 0 2-.9 2-2V6z"
  }, "0"), /* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M16 2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2M9 16H4v-5h5zm7 0h-5v-5h5zm0-7H4V4h12z"
  }, "1")], "BackupTable");
  return BackupTable;
}
var BackupTableExports = /* @__PURE__ */ requireBackupTable();
const BackupTableIcon = /* @__PURE__ */ getDefaultExportFromCjs(BackupTableExports);
function getStrNumMode() {
  return {
    0: "Дублировать основной номер",
    1: "Следующее значение от генератора номеров",
    2: "Сквозная нумерация в разрезе учреждений",
    3: "Сквозная нумерация без учета учреждений",
    4: "Генератор номеров для каждого учреждения"
  };
}
function getStrNumModeList() {
  return [
    { label: "Дублировать основной номер", id: 0 },
    { label: "Следующее значение от генератора номеров", id: 1 },
    { label: "Сквозная нумерация в разрезе учреждений", id: 2 },
    { label: "Сквозная нумерация без учета учреждений", id: 3 },
    { label: "Генератор номеров для каждого учреждения", id: 4 }
  ];
}
function getNewNumMode() {
  return {
    0: "Следующее значение от генератора номеров",
    1: "Сквозная нумерация в разрезе учреждений",
    2: "Сквозная нумерация без учета учреждений",
    3: "Генератор номеров для каждого учреждения"
  };
}
function getNewNumModeList() {
  return [
    { label: "Следующее значение от генератора номеров", id: 0 },
    { label: "Сквозная нумерация в разрезе учреждений", id: 1 },
    { label: "Сквозная нумерация без учета учреждений", id: 2 },
    { label: "Генератор номеров для каждого учреждения", id: 3 }
  ];
}
function getRangeList(generationkey) {
  if (generationkey === "Сквозная нумерация в разрезе учреждений" || generationkey === "Сквозная нумерация без учета учреждений") {
    return [
      { label: "Никогда", id: -17 },
      { label: "Каждый месяц", id: -1 },
      { label: "Каждый квартал", id: -2 },
      { label: "Каждый год", id: -3 },
      { label: "От установленного номера", id: -4 }
    ];
  }
  return [
    { label: "Никогда", id: 0 },
    { label: "Каждый месяц", id: 1 },
    { label: "Каждый квартал", id: 2 },
    { label: "Каждый год", id: 3 },
    { label: "До установленного номера", id: 4 }
  ];
}
function getRange() {
  return {
    [-17]: "Никогда",
    [-1]: "Каждый месяц",
    [-2]: "Каждый квартал",
    [-3]: "Каждый год",
    [-4]: "От установленного номера",
    0: "Никогда",
    1: "Каждый месяц",
    2: "Каждый квартал",
    3: "Каждый год",
    4: "До установленного номера"
  };
}
function getAssignMode() {
  return {
    0: "При создании документа",
    1: "При сохранении документа",
    2: "При создании с коррекцией при сохранении"
  };
}
function getAssignModeList() {
  return [
    { label: "При создании документа", id: 0 },
    { label: "При сохранении документа", id: 1 },
    { label: "При создании с коррекцией при сохранении", id: 2 }
  ];
}
function DialogDocNumbering({ props, smetaModalId = "" }) {
  const [velocity, setVelocity] = React.useState();
  const [NewNumMode, setNewNumMode] = React.useState();
  const [Current, setCurrent] = React.useState();
  const [Range, setRange] = React.useState();
  const [MaxNumber, setMaxNumber] = React.useState();
  const [AssignMode, setAssignMode] = React.useState();
  const [AssignModeDisabled, setAssignModeDisabled] = React.useState();
  const [showSub, setShowSub] = React.useState();
  const [SNumber, setSNumber] = React.useState();
  const [Mask, setMask] = React.useState();
  const [StrNumMode, setStrNumMode] = React.useState();
  const [CheckUnique, setCheckUnique] = React.useState();
  const [needRefreshCurrent, setNeedRefreshCurrent] = React.useState(false);
  const [currentReadonly, setCurrentReadonly] = React.useState();
  const currentChange = React.useRef();
  const responseData = React.useRef();
  React.useRef();
  const setButtons = reactExports.useContext(SmetaModalsButtonsContext);
  reactExports.useEffect(() => {
    setButtons({
      1: { label: "Установить", onClick: onSelect },
      2: {
        label: "Закрыть"
      }
    });
  }, [setButtons]);
  React.useEffect(() => {
    responseData.current = {
      GetNumMode: "1",
      Name: props.Sequence.split("\r\n")[0],
      NeedCurrent: false
    };
    setVelocity(props.Sequence.split("\r\n")[0]);
    if (props.res) {
      setShowSub(props.res.HasSNum === "1" ? true : false);
      setNewNumMode(getNewNumMode()[props.res.NewNumMode ? Number(props.res.NewNumMode) : 0]);
      setCurrent(props.res.Current !== void 0 ? props.res.Current : "0");
      if (props.res.NewNumMode === "1" || props.res.NewNumMode === "2") {
        setCurrentReadonly(true);
      } else {
        setCurrentReadonly(false);
      }
      let defaultPeriod = props.res.NewNumMode === "1" || props.res.NewNumMode === "2" ? -17 : 0;
      setRange(getRange()[props.res.Range !== void 0 ? Number(props.res.Range) : defaultPeriod]);
      setMaxNumber(props.res.MaxNumber !== void 0 ? props.res.MaxNumber : "0");
      if (!props.res.NewNumMode || props.res.NewNumMode === "3") {
        setAssignModeDisabled(true);
        if (!props.res.NewNumMode) setAssignMode(getAssignMode()[0]);
        if (props.res.NewNumMode === "3") setAssignMode(getAssignMode()[2]);
      } else {
        setAssignMode(getAssignMode()[Number(props.res.AssignMode !== void 0 ? props.res.AssignMode : 0)]);
      }
      setSNumber(props.res.SNumber != void 0 ? props.res.SNumber : "0");
      setMask(props.res.Mask !== void 0 ? props.res.Mask : "");
      setStrNumMode(getStrNumMode()[props.res.StrNumMode !== void 0 ? Number(props.res.StrNumMode) : 0]);
      setCheckUnique(props.res.CheckUnique !== void 0 ? props.res.CheckUnique : "0");
      responseData.current = {
        AssignMode: props.res.AssignMode !== void 0 ? props.res.AssignMode : "0",
        Current: props.res.Current,
        GetNumMode: "1",
        MaxNumber: props.res.MaxNumber !== void 0 ? props.res.MaxNumber : "0",
        NewNumMode: props.res.NewNumMode !== void 0 ? props.res.NewNumMode : "0",
        Range: props.res.Range !== void 0 ? props.res.Range : `${defaultPeriod}`,
        Rights: props.res.Rights,
        Name: props.Sequence.split("\r\n")[0],
        SNumber: props.res.SNumber != void 0 ? props.res.SNumber : "0",
        Mask: props.res.Mask,
        StrNumMode: props.res.StrNumMode !== void 0 ? props.res.StrNumMode : "0",
        CheckUnique: props.res.CheckUnique !== void 0 ? props.res.CheckUnique : "0",
        NeedCurrent: false
      };
    }
  }, []);
  function onEdit(type2, data) {
    switch (type2) {
      case "velocity":
        setVelocity(data.value);
        responseData.current.Name = data.value;
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "NewNumMode":
        setNewNumMode(data.value);
        responseData.current.NewNumMode = data.tag;
        if (!needRefreshCurrent) setNeedRefreshCurrent(true);
        if (data.tag === 1 || data.tag === 2) {
          setAssignModeDisabled(false);
          setAssignMode(getAssignMode()[Number(responseData.current.AssignMode)]);
          switch (Range) {
            case "Никогда":
              responseData.current.Range = -17;
              break;
            case "Каждый месяц":
              responseData.current.Range = -1;
              break;
            case "Каждый квартал":
              responseData.current.Range = -2;
              break;
            case "Каждый год":
              responseData.current.Range = -3;
              break;
            case "До установленного номера":
              setRange(getRange()[-4]);
              responseData.current.Range = -4;
              break;
          }
          setCurrentReadonly(true);
        } else {
          setAssignModeDisabled(true);
          if (data.tag === 0) {
            setAssignMode(getAssignMode()[0]);
          }
          if (data.tag === 3) {
            setAssignMode(getAssignMode()[1]);
          }
          switch (Range) {
            case "Никогда":
              responseData.current.Range = 0;
              break;
            case "Каждый месяц":
              responseData.current.Range = 1;
              break;
            case "Каждый квартал":
              responseData.current.Range = 2;
              break;
            case "Каждый год":
              responseData.current.Range = 3;
              break;
            case "От установленного номера":
              setRange(getRange()[4]);
              responseData.current.Range = 4;
              break;
          }
          setCurrentReadonly(false);
        }
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "Current":
        setCurrent(data.value);
        responseData.current.Current = data.value;
        currentChange.current = true;
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "Range":
        setRange(data.value);
        responseData.current.Range = data.tag;
        setNeedRefreshCurrent(true);
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "MaxNumber":
        setMaxNumber(data.value);
        responseData.current.MaxNumber = data.value;
        setNeedRefreshCurrent(true);
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "AssignMode":
        setAssignMode(data.value);
        responseData.current.AssignMode = data.tag;
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "SNumber":
        setSNumber(data.CheckState);
        responseData.current.SNumber = data.CheckState;
        break;
      case "Mask":
        setMask(data.value);
        responseData.current.Mask = data.value;
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "StrNumMode":
        setStrNumMode(data.value);
        responseData.current.StrNumMode = data.tag;
        data.setValue({ label: data.value, id: data.tag });
        break;
      case "CheckUnique":
        setCheckUnique(data.CheckState);
        responseData.current.CheckUnique = data.CheckState;
        break;
    }
    console.log(responseData.current);
  }
  function onSelect() {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "sequence").set("comand", "SequenceSetParams").set("Name", velocity).set("GetNumMode", "1").set("AssignMode", responseData.current.AssignMode).set("MaxNumber", responseData.current.MaxNumber).set("NewNumMode", responseData.current.NewNumMode).set("Range", responseData.current.Range).set("SNumber", responseData.current.SNumber).set("Mask", responseData.current.Mask).set("StrNumMode", responseData.current.StrNumMode).set("CheckUnique", responseData.current.CheckUnique);
    if (currentChange.current) params2.set("Current", responseData.current.Current);
    AxiosRequest(true, params2);
    smetaModals.close(smetaModalId);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid$1,
    {
      container: true,
      direction: "column",
      justifyContent: "flex-start",
      alignItems: "flex-start",
      style: { height: "100%", width: "100%" },
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Grid$1,
        {
          container: true,
          item: true,
          direction: "column",
          justifyContent: "flex-start",
          alignItems: "center",
          style: {
            height: "100%",
            width: "100%",
            flexWrap: "nowrap",
            overflow: "auto"
          },
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(
              Grid$1,
              {
                container: true,
                item: true,
                direction: "column",
                justifyContent: "flex-start",
                alignItems: "flex-start",
                style: {
                  height: "60%",
                  width: "100%",
                  minHeight: "200px",
                  border: "1px solid #cccccc",
                  borderRadius: "5px",
                  marginBottom: "20px",
                  paddingLeft: "5px",
                  flexWrap: "nowrap",
                  overflow: "auto"
                },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    "div",
                    {
                      style: {
                        position: "absolute",
                        top: "48px",
                        left: "43px",
                        backgroundColor: "white",
                        fontWeight: "bold"
                      },
                      children: "Основная нумерация"
                    }
                  ),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "20px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "150px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Последовательность:"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "244px",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Editor,
                          {
                            editStyle: 1,
                            readonly: true,
                            value: velocity,
                            list: props.Sequence,
                            onEdit: (data) => {
                              onEdit("velocity", data);
                            }
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "90px",
                          display: "inline-flex",
                          alignItems: "center",
                          justifyContent: "center"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { style: { width: "90%", height: "27px", textTransform: "none" }, variant: "outlined", size: "small", children: "Удалить" })
                      }
                    )
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "10px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "150px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Генерация номера:"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "330px",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Editor,
                          {
                            editStyle: 1,
                            readonly: true,
                            value: NewNumMode,
                            onDropDownList: getNewNumModeList,
                            onEdit: (data) => {
                              onEdit("NewNumMode", data);
                            }
                          }
                        )
                      }
                    )
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "10px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "150px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Следующий номер:"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "100px",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Editor,
                          {
                            disabled: currentReadonly,
                            editStyle: 8,
                            value: Current,
                            onEdit: (data) => {
                              onEdit("Current", data);
                            }
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "30px",
                          display: "inline-flex",
                          alignItems: "center",
                          justifyContent: "center"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          IconButton,
                          {
                            title: "Обновить текущую нумерацию",
                            onClick: (e2) => {
                              setNeedRefreshCurrent(false);
                              GetNextNumber({
                                Name: velocity,
                                Range: responseData.current.Range,
                                MaxNumber: responseData.current.MaxNumber
                              }).then((res) => {
                                if (res.Number) {
                                  setCurrent(res.Number);
                                }
                              });
                            },
                            children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshIcon, { fontSize: "small", className: needRefreshCurrent ? "SaveIcon" : "" })
                          }
                        )
                      }
                    )
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "10px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "150px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Частота обновления:"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "250px",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Editor,
                          {
                            editStyle: 1,
                            readonly: true,
                            onDropDownList: () => getRangeList(NewNumMode),
                            value: Range,
                            onEdit: (data) => {
                              onEdit("Range", data);
                            }
                          }
                        )
                      }
                    )
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs(
                    "div",
                    {
                      style: {
                        display: Range && (Range === "От установленного номера" || Range === "До установленного номера") ? "inline-flex" : "none",
                        marginTop: "10px"
                      },
                      children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          "div",
                          {
                            style: {
                              height: "27px",
                              width: "150px",
                              display: "inline-flex",
                              alignItems: "center"
                            },
                            children: "Установленный номер:"
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          "div",
                          {
                            style: {
                              height: "27px",
                              width: "100px",
                              border: "1px solid #cccccc"
                            },
                            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              Editor,
                              {
                                editStyle: 8,
                                value: MaxNumber,
                                onEdit: (data) => {
                                  onEdit("MaxNumber", data);
                                }
                              }
                            )
                          }
                        )
                      ]
                    }
                  ),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "10px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "150px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Присвоение номера:"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "330px",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Editor,
                          {
                            disabled: AssignModeDisabled,
                            editStyle: 1,
                            readonly: true,
                            onDropDownList: getAssignModeList,
                            value: AssignMode,
                            onEdit: (data) => {
                              onEdit("AssignMode", data);
                            }
                          }
                        )
                      }
                    )
                  ] })
                ]
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(
              Grid$1,
              {
                style: {
                  height: "40%",
                  width: "100%",
                  minHeight: "100px",
                  border: "1px solid #cccccc",
                  borderRadius: "5px",
                  paddingLeft: "5px",
                  flexWrap: "nowrap",
                  overflow: "auto",
                  display: showSub ? "" : "none"
                },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    "div",
                    {
                      style: {
                        position: "absolute",
                        top: "319px",
                        left: "16px",
                        backgroundColor: "white",
                        fontWeight: "bold"
                      },
                      children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex" }, children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "30px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          CheckBoxMultiCheck,
                          {
                            CheckState: SNumber,
                            onEdit: (data) => {
                              onEdit("SNumber", data);
                            }
                          }
                        ) }),
                        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Дополнительная нумерация" })
                      ] })
                    }
                  ),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "20px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "180px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Текстовая часть номера:"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "150px",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Editor,
                          {
                            value: Mask,
                            onEdit: (data) => {
                              onEdit("Mask", data);
                            }
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "160px",
                          display: "inline-flex",
                          alignItems: "center",
                          paddingLeft: "10px"
                        },
                        children: '(Символ "%" - номер)'
                      }
                    )
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "10px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "180px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Генерация номера:"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "27px",
                          width: "250px",
                          border: "1px solid #cccccc"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Editor,
                          {
                            editStyle: 1,
                            readonly: true,
                            value: StrNumMode,
                            onDropDownList: getStrNumModeList,
                            onEdit: (data) => {
                              onEdit("StrNumMode", data);
                            }
                          }
                        )
                      }
                    )
                  ] }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "inline-flex", marginTop: "10px" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "30px",
                          width: "27px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          CheckBoxMultiCheck,
                          {
                            CheckState: CheckUnique,
                            onEdit: (data) => {
                              onEdit("CheckUnique", data);
                            }
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          height: "30px",
                          width: "305px",
                          display: "inline-flex",
                          alignItems: "center"
                        },
                        children: "Проверять уникальность введенного номера"
                      }
                    )
                  ] })
                ]
              }
            )
          ]
        }
      )
    }
  );
}
function getLabelKeyCode(code) {
  if (typeof code === "object") {
    return code.map((cod) => {
      return getLabelKeyCode(cod);
    }).join(" + ");
  }
  const data = {
    0: "",
    1: "ЛКМ",
    2: "ПКМ",
    4: "СКМ",
    112: "F1",
    113: "F2",
    114: "F3",
    115: "F4",
    116: "F5",
    117: "F6",
    118: "F7",
    119: "F8",
    120: "F9",
    121: "F10",
    122: "F11",
    123: "F12",
    32: "Пробел",
    8: "BackSpace",
    9: "Tab",
    13: "Enter",
    16: "Shift",
    17: "Ctrl",
    18: "Alt",
    20: "CapsLock",
    27: "Esc",
    45: "Insert",
    33: "PageUp",
    34: "PageDown",
    35: "End",
    36: "Home",
    37: "arrow <",
    38: "arrow ^",
    39: "arrow >",
    40: "arrow v",
    46: "Delete",
    44: "PrintScreen",
    145: "ScrollLock",
    48: "0",
    49: "1",
    50: "2",
    51: "3",
    52: "4",
    53: "5",
    54: "6",
    55: "7",
    56: "8",
    57: "9",
    192: "`",
    189: "-",
    187: "=",
    219: "[",
    221: "]",
    186: ";",
    222: "'",
    220: "\\",
    188: ",",
    190: ".",
    191: "/",
    65: "A",
    66: "B",
    67: "C",
    68: "D",
    69: "E",
    70: "F",
    71: "G",
    72: "H",
    73: "I",
    74: "J",
    75: "K",
    76: "L",
    77: "M",
    78: "N",
    79: "O",
    80: "P",
    81: "Q",
    82: "R",
    83: "S",
    84: "T",
    85: "U",
    86: "V",
    87: "W",
    88: "X",
    89: "Y",
    90: "Z",
    91: "WinL",
    92: "WinR",
    96: "Num0",
    97: "Num1",
    98: "Num2",
    99: "Num3",
    100: "Num4",
    101: "Num5",
    102: "Num6",
    103: "Num7",
    104: "Num8",
    105: "Num9",
    106: "Num*",
    107: "Num+",
    108: "Num-",
    109: "Num.",
    110: "Num/"
  };
  return data[code];
}
function Samples({ request, list, smetaModalId = "" }) {
  const records = reactExports.useRef(getRecords(list.items));
  const [value, setValue] = reactExports.useState("Новый шаблон");
  const [checkBoxes, setCheckBoxes] = reactExports.useState({
    AllUsers: false,
    All: false
  });
  const SamplesGridRef = React.useRef(null);
  React.useEffect(() => {
    if (!SamplesGridRef.current.grid)
      GridLoader(
        SamplesGridRef.current,
        {},
        {
          defaultFields: getDefaultFieldsSigns2(),
          keyField: "ID",
          getRecords: () => records.current,
          recordKeys: ["ID", "Index", "Name", "User", "Section"],
          titleKey: "",
          localGrid: true,
          Columns: setCollumsForGridSigns2(),
          indicator: false,
          canModify: () => {
            return false;
          }
        }
      ).then((grid) => {
        console.log(grid);
      });
  }, []);
  function getRecords(data) {
    let arrRecords = [], dataFix = data ? data : [];
    dataFix.forEach((value2, index2) => {
      arrRecords.push({
        ID: value2.ID,
        Index: `${index2}`,
        Name: value2.Name,
        User: value2.User,
        Section: value2.Section
      });
    });
    return arrRecords;
  }
  function setCollumsForGridSigns2() {
    const Columns = {
      title: [
        { title: "Наименования", width: 183, fieldName: "Name" },
        { title: "Пользователь", width: 197, fieldName: "User" },
        { title: "Рабочее место", width: 180, fieldName: "Section" }
      ]
    };
    return Columns;
  }
  function getDefaultFieldsSigns2() {
    return [
      {
        Name: "ID",
        Title: "ID",
        Width: "7"
      },
      {
        Name: "Index",
        Title: "Индекс",
        Width: "7"
      },
      {
        Name: "Name",
        Title: "Время подписи",
        Width: "10"
      },
      {
        Name: "User",
        Title: "Пользователь",
        Width: "10"
      },
      {
        Name: "Section",
        Title: "Описание",
        Width: "10"
      }
    ];
  }
  function onValueChange(e2) {
    setValue(e2.currentTarget.value);
  }
  const onCheckChange = (e2) => {
    const key = e2.currentTarget.id;
    if (key) {
      setCheckBoxes({
        ...checkBoxes,
        [key]: !checkBoxes[key]
      });
    }
  };
  function ContextMenuHandler(e2) {
    const Name = SamplesGridRef.current.grid.source.getFieldTextSync("Name");
    if (Name) {
      switch (e2.value) {
        case "delete": {
          const User = SamplesGridRef.current.grid.source.getFieldTextSync("User");
          const Section = SamplesGridRef.current.grid.source.getFieldTextSync("Section");
          request("delete", { Name, User, Section }).then(() => {
            request("list").then((list2) => {
              records.current = getRecords(list2.items);
              if (SamplesGridRef.current.grid) SamplesGridRef.current.grid.refreshSource("!");
            });
          });
          break;
        }
        case "change": {
          setValue(Name);
          break;
        }
      }
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid22,
    {
      container: true,
      sx: {
        flexDirection: "column",
        alignItems: "stretch",
        height: "100%",
        overflow: "hidden"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { size: { xs: 6, md: 8 }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { container: true, spacing: 1, sx: { width: "100%", flexWrap: "nowrap", alignItems: "center" }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { size: { xs: 8, md: 8 }, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("input", { type: "text", style: { width: "100%", marginTop: "12px" }, value, onChange: onValueChange }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              FormControlLabel,
              {
                onChange: (e2) => {
                  onCheckChange(e2);
                },
                id: "AllUsers",
                control: /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { id: "AllUsers", checked: checkBoxes.AllUsers }),
                sx: { height: "30px", width: "100%" },
                label: "Для всех пользователей"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              FormControlLabel,
              {
                onChange: (e2) => {
                  onCheckChange(e2);
                },
                id: "All",
                sx: { height: "30px", width: "100%" },
                control: /* @__PURE__ */ jsxRuntimeExports.jsx(Checkbox, { id: "All", checked: checkBoxes.All }),
                label: "Для всех рабочих мест"
              }
            )
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Grid22,
            {
              container: true,
              sx: { alignItems: "stretch" },
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { sx: { width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Button$2,
                  {
                    size: "small",
                    style: { textTransform: "none", width: "100%" },
                    variant: "outlined",
                    value: "1",
                    onClick: () => {
                      request("create", {
                        Name: value,
                        AllUsers: checkBoxes.AllUsers ? "1" : "0",
                        All: checkBoxes.All ? "1" : "0"
                      });
                      smetaModals.close(smetaModalId);
                    },
                    children: "Сохранить"
                  }
                ) }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { sx: { width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Button$2,
                  {
                    size: "small",
                    style: { textTransform: "none", width: "100%" },
                    variant: "outlined",
                    value: "1",
                    onClick: () => {
                      smetaModals.close(smetaModalId);
                    },
                    children: "Закрыть"
                  }
                ) })
              ]
            }
          )
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid22,
          {
            size: { xs: 6, md: 4 },
            style: {
              position: "relative",
              height: "74%",
              border: "1px solid #9A9A9A"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              ContextMenu,
              {
                onMenuItemClick: ContextMenuHandler,
                data: [
                  { Caption: "Удалить шаблон", value: "delete" },
                  { Caption: "Заменить шаблон", value: "change" }
                ],
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  "div",
                  {
                    rcspanel: "",
                    ref: SamplesGridRef,
                    tabIndex: "0",
                    style: {
                      // height: "100%",
                      // width: "100%",
                    }
                  }
                )
              }
            )
          }
        )
      ]
    }
  );
}
const smetaMessage = "_smetaMessage_qzenz_1";
const messageImage = "_messageImage_qzenz_21";
const chatImagePreview = "_chatImagePreview_qzenz_31";
const smetaMessageUser = "_smetaMessageUser_qzenz_41";
const smetaChatWrapper = "_smetaChatWrapper_qzenz_63";
const smetaChatFullWidth = "_smetaChatFullWidth_qzenz_95";
const chatIconColor = "_chatIconColor_qzenz_103";
const messageText = "_messageText_qzenz_111";
const chatStyle = {
  smetaMessage,
  messageImage,
  chatImagePreview,
  smetaMessageUser,
  smetaChatWrapper,
  smetaChatFullWidth,
  chatIconColor,
  messageText
};
var Edit = {};
var hasRequiredEdit;
function requireEdit() {
  if (hasRequiredEdit) return Edit;
  hasRequiredEdit = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Edit, "__esModule", {
    value: true
  });
  Edit.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Edit.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"
  }), "Edit");
  return Edit;
}
var EditExports = /* @__PURE__ */ requireEdit();
const EditIcon = /* @__PURE__ */ getDefaultExportFromCjs(EditExports);
const ChatMessage = ({
  messageData: {
    Mine,
    mine,
    content: content2,
    User,
    user,
    RCDATA: rcdata,
    Files: files,
    id,
    "image@height": imageHeight,
    "image@width": imageWidth,
    data$type: dataType
  },
  docId,
  events: { onDelete, onEdit }
}) => {
  const imageData = {
    rcdata,
    imageHeight,
    imageWidth,
    dataType
  };
  const finalMine = Mine === "1" || mine === "1";
  const handleClickLink = ({ fileName = "", tag = { $tag: 0 } }) => {
    const command = {
      module: "programs",
      params: {
        Name: "HandleChatFile",
        binary: "1"
      }
    };
    const postData = {
      fileName,
      DocID: docId,
      what: "open",
      ...tag
    };
    execABLProgram({ command, postData });
  };
  const renderFiles = () => {
    if (!files) return null;
    return Object.entries(files).map(([key, value]) => {
      return /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, { onClick: () => handleClickLink({ fileName: key, tag: value }), children: key }),
        /* @__PURE__ */ jsxRuntimeExports.jsx("br", {})
      ] }, "link" + key);
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid22,
    {
      item: true,
      container: true,
      id: "messageContainer",
      direction: finalMine ? "row-reverse" : "row",
      sx: {
        justifyContent: "flex-start",
        alignItems: "flex-start"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Grid22,
        {
          container: true,
          className: clsx$3(chatStyle.smetaMessage),
          direction: "column",
          sx: {
            justifyContent: "flex-start",
            alignItems: "flex-start",
            borderRadius: finalMine ? "4px 0px 4px 4px" : "0px 4px 4px 4px"
          },
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, className: clsx$3(chatStyle.smetaChatFullWidth), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
              Grid22,
              {
                container: true,
                direction: "row",
                sx: {
                  justifyContent: "space-between",
                  alignItems: finalMine ? "flex-start" : "center"
                },
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, className: clsx$3(chatStyle.smetaMessageUser), children: User || user }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { item: true, sx: { display: finalMine ? "" : "none" }, children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Редактировать сообщение", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: () => onEdit({ id, text: content2, files, imageData }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, { fontSize: "small" }) }) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Удалить сообщение", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: () => onDelete({ id }), children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" }) }) })
                  ] })
                ]
              }
            ) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid22,
              {
                item: true,
                sx: {
                  display: rcdata ? "" : "none"
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  "img",
                  {
                    alt: "",
                    className: clsx$3(chatStyle.messageImage),
                    src: `data:image/${dataType};base64,${rcdata}`,
                    onClick: () => {
                      showContent({
                        rcdata,
                        mimeType: `data:image/${dataType || ""};base64,`,
                        data: {
                          Params: {
                            FileName: `image-${id}.${dataType}`
                          }
                        }
                      });
                    }
                  }
                )
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: renderFiles() }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, className: clsx$3(chatStyle.messageText), children: content2 })
          ]
        }
      )
    }
  );
};
var Article = {};
var hasRequiredArticle;
function requireArticle() {
  if (hasRequiredArticle) return Article;
  hasRequiredArticle = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Article, "__esModule", {
    value: true
  });
  Article.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Article.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-5 14H7v-2h7zm3-4H7v-2h10zm0-4H7V7h10z"
  }), "Article");
  return Article;
}
var ArticleExports = /* @__PURE__ */ requireArticle();
const ArticleIcon = /* @__PURE__ */ getDefaultExportFromCjs(ArticleExports);
var AttachFile = {};
var hasRequiredAttachFile;
function requireAttachFile() {
  if (hasRequiredAttachFile) return AttachFile;
  hasRequiredAttachFile = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(AttachFile, "__esModule", {
    value: true
  });
  AttachFile.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  AttachFile.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"
  }), "AttachFile");
  return AttachFile;
}
var AttachFileExports = /* @__PURE__ */ requireAttachFile();
const AttachFileIcon = /* @__PURE__ */ getDefaultExportFromCjs(AttachFileExports);
var Send = {};
var hasRequiredSend;
function requireSend() {
  if (hasRequiredSend) return Send;
  hasRequiredSend = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Send, "__esModule", {
    value: true
  });
  Send.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Send.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"
  }), "Send");
  return Send;
}
var SendExports = /* @__PURE__ */ requireSend();
const SendIcon = /* @__PURE__ */ getDefaultExportFromCjs(SendExports);
var Folder = {};
var hasRequiredFolder;
function requireFolder() {
  if (hasRequiredFolder) return Folder;
  hasRequiredFolder = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Folder, "__esModule", {
    value: true
  });
  Folder.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Folder.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8z"
  }), "Folder");
  return Folder;
}
var FolderExports = /* @__PURE__ */ requireFolder();
const FolderIcon = /* @__PURE__ */ getDefaultExportFromCjs(FolderExports);
const fileTypesForPreview = ["png", "jpeg", "jpg", "gif", "bmp", "webp"];
const ListWithDelete = ({ fileList, onChange }) => {
  const [files, setFiles] = reactExports.useState(fileList);
  const handleClickDelete = (key) => {
    const newFiles = { ...files };
    delete newFiles[key];
    setFiles(newFiles);
    onChange(newFiles);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(List, { children: Object.entries(files).map(([key, value], index2) => {
    if (value.hidden) return null;
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(
      ListItem$1,
      {
        secondaryAction: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { edge: "end", "aria-label": "delete", onClick: () => handleClickDelete(key), children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, {}) }),
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemAvatar, { children: fileTypesForPreview.includes(value == null ? void 0 : value.fileType) ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: `data:image/${value == null ? void 0 : value.fileType};base64,${value == null ? void 0 : value.rcdata}`, style: { width: 55, height: 25 } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ArticleIcon, { className: chatStyle.chatIconColor }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: key })
        ]
      },
      key + index2
    );
  }) });
};
const Chat = ({ chatData, docId, handlePage }) => {
  const [messagesData, setMessagesData] = reactExports.useState(chatData);
  const [showInfoBar, setShowInfoBar] = reactExports.useState(false);
  const [files, setFiles] = reactExports.useState({});
  const [text, setText] = reactExports.useState("");
  const [messageId, setMessageId] = reactExports.useState("");
  const [imageData, setImageData] = reactExports.useState({ dataType: "png", imageWidth: "", imageHeight: "", rcdata: "" });
  const [editText, setEditText] = reactExports.useState("");
  const renderMessages = () => {
    if (isEmptyObject(messagesData == null ? void 0 : messagesData.Chat)) return null;
    return messagesData.Chat.items.map((value, index2) => {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        ChatMessage,
        {
          messageData: value,
          docId,
          events: { onDelete: handleDeleteClick, onEdit: handleEditClick }
        },
        "message" + index2
      );
    });
  };
  const clearRedactorData = () => {
    setShowInfoBar(false);
    setFiles({});
    setText("");
    setImageData({ dataType: "png", imageWidth: "", imageHeight: "", rcdata: "" });
    setMessageId("");
    setEditText("");
  };
  const handleDeleteClick = ({ id }) => {
    const postData = {
      chat: {},
      drop: [id]
    };
    handlePage(postData);
  };
  const handleEditClick = ({ id, text: messageText2, files: messageFiles, imageData: messageImageData }) => {
    if (id === messageId) return clearRedactorData();
    setShowInfoBar(true);
    setText(messageText2 || "");
    setImageData(messageImageData);
    setMessageId(id);
    setEditText(messageText2 || "");
  };
  const handleSend = ({ messageText: messageText2 = text, messageFiles = files }) => {
    const lastLoginUser = getLastLogin().split(",")[1];
    const linksFromText = messageText2.match(/(https):\/\/[^\s]*|(http):\/\/[^\s]*/gi);
    const parsedMessageText = linksFromText == null ? void 0 : linksFromText.reduce((acc, val) => acc.replace(val, ""), messageText2);
    const filesObj = Object.values({ ...linksFromText, ...messageFiles });
    const postDataFiles = filesObj.reduce((acc, value) => {
      const name = (value == null ? void 0 : value.name) || value;
      return {
        ...acc,
        [name]: {
          rcdata: value == null ? void 0 : value.rcdata
        }
      };
    }, {});
    let item = {
      User: lastLoginUser,
      mine: "1",
      id: messageId,
      $content: parsedMessageText || messageText2 || "",
      Files: postDataFiles
    };
    if (imageData.rcdata) item = { ...item, ...imageData };
    const postData = {
      Chat: [item]
    };
    handlePage(postData);
    setShowInfoBar(false);
    setFiles({});
    setText("");
  };
  const handleChange = (e2) => {
    setText(e2.target.value);
  };
  const showFileList = () => {
    if (messageId) return;
    const fileList = {
      ...files,
      "Вложенное фото": {
        rcdata: imageData.rcdata,
        fileType: imageData.dataType,
        hidden: messageId ? true : !imageData.rcdata
      }
    };
    if (isEmptyObject(fileList) && !imageData.rcdata) return;
    let localFiles = fileList;
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        ListWithDelete,
        {
          fileList,
          onChange: (data) => {
            localFiles = { ...data };
          }
        }
      ),
      {
        Title: "Вложения сообщения",
        onSelect: () => {
          const newImageData = localFiles["Вложенное фото"];
          setImageData({ ...imageData, dataType: (newImageData == null ? void 0 : newImageData.fileType) || "", rcdata: (newImageData == null ? void 0 : newImageData.rcdata) || "" });
          const newFiles = Object.entries(localFiles).reduce((acc, [key, value]) => {
            if (key === "Вложенное фото") return acc;
            return { ...acc, [key]: value };
          }, {});
          setFiles(newFiles);
        }
      }
    );
  };
  const setNewFiles = (fileList) => {
    setFiles({
      ...files,
      ...fileList
    });
    setShowInfoBar(true);
  };
  const attachFiles = async () => {
    const fileList = await buildFileSelector();
    setNewFiles(fileList.files);
  };
  const handlePaste = async (e2) => {
    const items = (e2.clipboardData || window.clipboardData).items;
    const fileList = [];
    for (const item of items) {
      if (item.kind === "file") {
        const file = item.getAsFile();
        fileList.push(file);
      }
    }
    if (fileList.length === 0) return;
    e2.preventDefault();
    e2.stopPropagation();
    const filesData = await handleFiles(fileList);
    if (!filesData.filesNames) return;
    const [fileName] = filesData.filesNames;
    if (filesData.finalData[fileName].fileType.includes("data:image/")) {
      const { fileType, rcdata } = filesData.finalData[fileName];
      const dataType = fileType.match(/[a-z/]+(?=;)/);
      const needToLoad = await confirmLoadImg(true);
      setShowInfoBar(true);
      if (needToLoad) return setNewFiles(filesData.finalData);
      setImageData({ imageWidth: "", imageHeight: "", rcdata, dataType: dataType[0] });
    } else setNewFiles(filesData.finalData);
  };
  const onDrop = async (e2) => {
    e2.stopPropagation();
    e2.preventDefault();
    const filesData = await handleFiles(e2.dataTransfer.files);
    setNewFiles(filesData.finalData);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid22,
    {
      container: true,
      id: "chatContainer",
      direction: "column",
      onDragOver: (e2) => {
        e2.stopPropagation();
        e2.preventDefault();
      },
      onDrop,
      className: clsx$3(chatStyle.smetaChatWrapper),
      sx: {
        justifyContent: "flex-start",
        alignItems: "stretch",
        flexWrap: "nowrap"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid22,
          {
            item: true,
            sx: {
              flex: "1",
              overflow: "auto"
            },
            children: renderMessages()
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid22,
          {
            item: true,
            sx: {
              flex: "0 1",
              backgroundColor: "white"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { sx: { paddingLeft: 1, height: 36, width: "100%", display: showInfoBar ? "" : "none" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid22,
                {
                  container: true,
                  direction: "row",
                  sx: {
                    justifyContent: "space-between",
                    alignItems: "center"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      Grid22,
                      {
                        container: true,
                        direction: "row",
                        sx: {
                          justifyContent: "flex-start",
                          alignItems: "center"
                        },
                        spacing: 1,
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, sx: { display: messageId ? "" : "none", ml: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(EditIcon, { className: chatStyle.chatIconColor }) }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { badgeContent: Object.keys(files).length, color: "primary", children: imageData.rcdata ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                            "img",
                            {
                              src: `data:image/${imageData.dataType};base64,${imageData.rcdata}`,
                              className: clsx$3(chatStyle.chatImagePreview),
                              alt: "Файлы",
                              onClick: showFileList
                            }
                          ) : /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: showFileList, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FolderIcon, { className: chatStyle.chatIconColor }) }) }) }),
                          /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { item: true, sx: { display: messageId ? "" : "none" }, children: [
                            `Редактирование`,
                            /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
                            editText
                          ] })
                        ]
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: clearRedactorData, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIcon, {}) }) })
                  ]
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid22,
                {
                  container: true,
                  direction: "row",
                  sx: {
                    justifyContent: "space-around",
                    alignItems: "center"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: attachFiles, children: /* @__PURE__ */ jsxRuntimeExports.jsx(AttachFileIcon, {}) }) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, sx: { width: "89%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IMemo,
                      {
                        hideCharCount: true,
                        placeholder: "Сообщение...",
                        Text: text,
                        onChange: handleChange,
                        onBlur: handleChange,
                        onPaste: handlePaste,
                        style: {
                          resize: "none",
                          fieldSizing: "content",
                          outline: "none",
                          maxHeight: "61px",
                          width: "100%",
                          minHeight: 36
                        }
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: handleSend, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SendIcon, {}) }) })
                  ]
                }
              )
            ]
          }
        )
      ]
    }
  );
};
var Functions = {};
var hasRequiredFunctions;
function requireFunctions() {
  if (hasRequiredFunctions) return Functions;
  hasRequiredFunctions = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Functions, "__esModule", {
    value: true
  });
  Functions.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Functions.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M18 4H6v2l6.5 6L6 18v2h12v-3h-7l5-5-5-5h7z"
  }), "Functions");
  return Functions;
}
var FunctionsExports = /* @__PURE__ */ requireFunctions();
const FunctionsIcon = /* @__PURE__ */ getDefaultExportFromCjs(FunctionsExports);
const MenuJson = {
  Table: [
    { Caption: "Нумерация...", Disabled: false, value: "Numbering" },
    { Caption: "Сумма", Image: /* @__PURE__ */ jsxRuntimeExports.jsx(FunctionsIcon, { fontSize: "small" }), value: "calc" },
    { Caption: "Создать копию документа", value: "RecordCopy" },
    { Caption: "Сохранить как шаблон...", value: "Samples" },
    {
      Caption: "Детализация",
      Image: /* @__PURE__ */ jsxRuntimeExports.jsx(BackupTableIcon, { fontSize: "small" }),
      value: "Details"
    },
    {
      Caption: "Очистить состояние документа",
      items: [
        { Caption: "Сбросить все настройки документа", value: "ClearDocumentState" },
        { Caption: "Снять установленные фильтры", value: "clearAllFilters" }
      ]
    },
    { Caption: "Печать отмеченных записей", value: "PrintSelectedRecords" },
    // { Caption: "Открыть в другом окне", Disabled: true },
    // { Caption: "Открыть карточку", Disabled: true },
    // {
    //   Caption: "Копировать ссылку на документ",
    //   value: "CopyDocLink",
    //   Image: <LinkIcon fontSize="small" />,
    // },
    { Caption: "Divider" }
  ]
};
async function getImageHint(doccfgId, index2, docId) {
  let json;
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "documents").set("comand", "GetImageHint").set("DocCfgID", doccfgId).set("ImageIndex", index2).set("DocID", docId).set("smart", "1");
  json = await AxiosRequest(true, params2);
  return json.Text;
}
function SaveDocumentState(doccfgId, id, state, activeDetails) {
  if (state) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents").set("comand", "SaveDocumentState").set("DocCfgID", doccfgId).set("SectionID", id).set("ActiveDetail", activeDetails ? activeDetails + 1 : 0);
    AxiosRequest(true, params2, { GridState: state });
  }
}
function createGridStateString(gridState) {
  if (gridState) {
    let FinalStr = "";
    let valueForString;
    for (const [key, value] of Object.entries(gridState)) {
      if (value) {
        if (typeof value === "object") {
          valueForString = `${key}=`;
          for (const [keyPoint, data] of Object.entries(value)) {
            if (keyPoint === "9") {
              valueForString += `${data}`;
            } else {
              valueForString += `${data}•`;
            }
          }
        } else {
          valueForString = `${key}=${value}`;
        }
        FinalStr += valueForString + "\r\n";
      }
    }
    return FinalStr;
  }
}
function parseGridState(gridState) {
  if (gridState) {
    let arr = gridState.split("\r\n");
    let obj2 = {};
    if (arr.length > 0) {
      let valueForObj;
      for (const value of Object.values(arr)) {
        if (value !== "") {
          const ValueArr = value.split("=");
          if (ValueArr[1] && ValueArr[1].includes("•")) {
            valueForObj = Object.assign({}, ValueArr[1].split("•"));
          } else {
            valueForObj = ValueArr[1];
          }
          Object.assign(obj2, { [ValueArr[0]]: valueForObj });
        }
      }
      return obj2;
    }
  }
}
function SectionDocuments$1(props) {
  const [DocumentLayout, setDocumentLayout] = reactExports.useState(void 0);
  const [DocumentLayoutDetails, setDocumentLayoutDetails] = reactExports.useState(void 0);
  const [detailsBool, setDetailsBool] = reactExports.useState(props.detailsOpen !== void 0 ? !props.detailsOpen : true);
  const [selectedTabIndex, setSelectedTabIndex] = reactExports.useState(0);
  const [selectedRecordID, setSelectedRecordID] = reactExports.useState("");
  const [tabs, setTabs] = reactExports.useState(null);
  const [canModifyObj, setCanModifyObj] = reactExports.useState({
    delete: true,
    insert: true
  });
  const [redactor, setRedactor] = reactExports.useState(false);
  const [samples, setSamples] = reactExports.useState([]);
  const [save, setSave] = reactExports.useState({ [props.DocCfgID]: false });
  const [parentID, setParentID] = reactExports.useState(props.ParentID ? props.ParentID : "0");
  const [tree, setTree] = reactExports.useState(null);
  const [loadDetails, setLoadDetails] = reactExports.useState(false);
  const [loadMain, setLoadMain] = reactExports.useState(false);
  const [formsList, setFormsList] = reactExports.useState([]);
  const [anchorEl, setAnchorEl] = React.useState(null);
  const [anchorElButton, setAnchorElButton] = React.useState(null);
  const [selectedView, setSelectedView] = React.useState("doc");
  const [paperFormData, setPaperFormData] = React.useState({});
  const [fixHistory, setFixHistory] = React.useState();
  const [paramPath, setParamPath] = React.useState();
  const [portal, setPortal] = React.useState([]);
  const [shortsCutsData, setShortsCutsData] = React.useState({});
  const [selectedViewIdent, setSelectedViewIdent] = React.useState("");
  const setUnloadCallbacks = useSetAtom(setUnloadCallbacksAtom);
  const setClearUnloadCallBack = useSetAtom(clearUnloadCallBack);
  const [controlButtonsState, setControlButtonsState] = React.useState({
    detail: detailsBool,
    card: false,
    filter: false
  });
  const [controlButtons, setControlButtons] = React.useState({
    navigate: true,
    delete: true,
    save: true,
    card: true,
    create: true,
    createList: true,
    editButtons: true,
    detail: true,
    sign: true,
    refreshFull: true,
    filter: true,
    print: false
  });
  const MainGridRef = reactExports.useRef(null);
  const focusedGridRef = reactExports.useRef(null);
  const SubGridRef = reactExports.useRef(null);
  const TabsRef = reactExports.useRef(null);
  const timeout = reactExports.useRef(null);
  const timeoutUpdateGrid = reactExports.useRef(null);
  const sources = reactExports.useRef({});
  const saveDocs = reactExports.useRef({});
  const me = reactExports.useRef(null);
  const applyButton = reactExports.useRef(null);
  const redactorRef = reactExports.useRef(false);
  const formidRef = reactExports.useRef(null);
  const leftSplitterRef = reactExports.useRef(null);
  const parentIDStorage = reactExports.useRef({ needUpdt: true });
  const hiddenTabs = reactExports.useRef({});
  var grid = null;
  const refreshDocumentToken = async () => {
    await MainGridRef.current.grid.refreshSource("!");
    if (!detailsBool) {
      await UpdDetails(selectedTabIndex, DocumentLayoutDetails);
    }
    await updStateOfButtons();
  };
  reactExports.useEffect(() => {
    if (me.current) {
      me.current.refreshMainGrid = (data) => refreshMainGrid(data);
      me.current.CommitSaveOrCancelChanges = (comand) => CommitSaveOrCancelChanges(comand);
    }
  }, [me.current]);
  reactExports.useEffect(() => {
    setDocumentLayout(void 0);
    setTimeout(() => {
      if (redactor) {
        redactor.cancelRecord();
      }
      ClearDocumentStatus();
      updateOptionsForUser({
        Selected: {
          docid: props.DocCfgID === void 0 ? void 0 : selectedRecordID,
          DocCfgID: props.DocCfgID
        }
      });
    }, 750);
    return () => {
      setDocumentLayout(void 0);
      setDocumentLayoutDetails(void 0);
    };
  }, [props.DocCfgID]);
  reactExports.useEffect(() => {
    if (MainGridRef.current && MainGridRef.current.grid && props.tree) {
      if (parentID !== void 0) {
        setTreeGroup(props.tree.Module, props.tree.ObjType, props.tree.SectionID, parentID);
        MainGridRef.current.grid.source.onHandleRequest = onHandleRequestDocuments(
          props.DocCfgID,
          DocumentLayout.TreeInConfig === "1" ? "0" : parentID
        );
      }
      ApplyButtonClick();
    }
    if (parentIDStorage.current.needUpdt) {
      parentIDStorage.current.id = parentID;
    }
  }, [parentID]);
  reactExports.useLayoutEffect(() => {
    async function asyncFunc() {
      if (!detailsBool) {
        clearTimeout(timeout.current);
        timeout.current = setTimeout(() => {
          UpdDetails(selectedTabIndex, DocumentLayoutDetails);
        }, 250);
      }
      if (selectedView === "paper") {
        setTimeout(() => {
          PaperForm();
        }, 0);
      }
      updStateOfButtons();
    }
    asyncFunc();
  }, [selectedRecordID]);
  reactExports.useEffect(() => {
    FooterMultiOrData(MainGridRef.current.grid);
  }, [selectedRecordID]);
  reactExports.useEffect(() => {
    if (selectedView === "doc") {
      TestUpdateGrid();
    }
  }, [selectedView]);
  reactExports.useEffect(() => {
    if (MainGridRef.current.grid && MainGridRef.current.grid.source) {
      if (controlButtonsState.detail !== detailsBool)
        setControlButtonsState({
          ...controlButtonsState,
          detail: detailsBool,
          card: MainGridRef.current.grid.isCard(),
          filter: MainGridRef.current.grid.filter.style.display === "grid"
        });
      MainGridRef.current.grid.getActiveSource().details = {
        ...MainGridRef.current.grid.getActiveSource().details,
        activeDetails: selectedTabIndex,
        detailsBool
      };
      MainGridRef.current.grid.updateStateValues();
      MainGridRef.current.grid.refreshDocumentToken = refreshDocumentToken;
    }
  }, [selectedTabIndex, detailsBool]);
  reactExports.useLayoutEffect(() => {
    if (DocumentLayout) {
      CreateGrid(MainGridRef.current, {
        id: props.id,
        DocCfgID: props.DocCfgID,
        Columns: DocumentLayout.Columns,
        detailsBoolLocal: DocumentLayout.detailsBoolLocal
      }).then(async (source) => {
        const idselected = await source.getFieldText("ID");
        setSelectedRecordID(idselected === "" ? "0" : idselected);
      });
      ButtonsForDocuments(DocumentLayout.Tools.Buttons, {
        //берем кнопки и рисуем их
        DocCfgID: props.DocCfgID,
        from: "main"
      });
    }
  }, [DocumentLayout]);
  reactExports.useEffect(() => {
    if (DocumentLayout) {
      MainGridRef.current.focus();
    }
  }, [MainGridRef]);
  reactExports.useEffect(() => {
    redactorRef.current = redactor;
    document.removeEventListener("click", clickAwayForRedactor, true);
  }, [redactor]);
  reactExports.useEffect(() => {
    if (DocumentLayoutDetails !== void 0 && !isEmptyObject(DocumentLayoutDetails) && selectedRecordID !== "") {
      UpdDetails(selectedTabIndex, DocumentLayoutDetails).then(() => {
        MainGridRef.current.grid.source.onDataChanged = async () => {
          UpdDetails(selectedTabIndex, DocumentLayoutDetails);
        };
      });
    }
  }, [DocumentLayoutDetails]);
  function refreshMainGrid(data) {
    MainGridRef.current.grid.source.onHandleRequest = onHandleRequestDocuments(data.DocCfgID, data.ParentID);
    MainGridRef.current.grid.setSource(MainGridRef.current.grid.source);
    MainGridRef.current.grid.source.first();
    MainGridRef.current.grid.refreshSource();
    MainGridRef.current.grid.updateGridSize();
    setParentID(data.ParentID);
  }
  async function updStateOfButtons() {
    if (MainGridRef.current.grid) {
      updateOptionsForUser({
        Selected: { docid: selectedRecordID, DocCfgID: props.DocCfgID }
      });
      setCanModifyObj({
        delete: !await MainGridRef.current.grid.canModify(2, void 0, MainGridRef.current.grid),
        insert: !await MainGridRef.current.grid.canModify(0, void 0, MainGridRef.current.grid)
      });
      MainGridRef.current.grid.refreshDocumentToken = refreshDocumentToken;
    }
  }
  function parseShortsCuts(Tools) {
    let buttonsData = { Buttons: Tools.Buttons, Menu: Tools.Menu };
    if (Tools.Buttons) buttonsData.Buttons = parseShortCut(Tools.Buttons);
    if (Tools.Menu) buttonsData.Menu = parseShortCut(Tools.Menu);
    return buttonsData;
  }
  function parseShortCutsForKeyDown(Tools, doccfgid, updateAll) {
    let onlyShortCuts = updateAll !== void 0 ? updateAll : shortsCutsData;
    if (Tools.Buttons)
      onlyShortCuts = {
        ...parseShortCut(Tools.Buttons, doccfgid),
        ...onlyShortCuts
      };
    if (Tools.Menu)
      onlyShortCuts = {
        ...parseShortCut(Tools.Menu, doccfgid),
        ...onlyShortCuts
      };
    if (updateAll !== void 0) {
      return onlyShortCuts;
    } else setShortsCutsData(onlyShortCuts);
  }
  function updAllShortsCut(DocumentLayoutDetails2, doccfgidDetails) {
    let onlyShortCuts = {};
    onlyShortCuts = parseShortCutsForKeyDown(DocumentLayout.Tools, props.DocCfgID, true);
    onlyShortCuts = {
      ...onlyShortCuts,
      ...parseShortCutsForKeyDown(DocumentLayoutDetails2.Tools, doccfgidDetails, onlyShortCuts)
    };
    setShortsCutsData(onlyShortCuts);
  }
  const parseShortCut = (Tool, localdoccfgid) => {
    if (localdoccfgid !== void 0) {
      let returnArr = {};
      for (const value of Object.values(Tool)) {
        if (value.ShortCut) {
          let parsed;
          if (typeof value.ShortCut === "object") {
            parsed = value.ShortCut;
          } else {
            parsed = getKeyCodeOfInt(Number(value.ShortCut));
          }
          returnArr = {
            ...returnArr,
            [[parsed]]: {
              ...value,
              ShortCut: parsed,
              ShortCutString: getLabelKeyCode(parsed),
              localdoccfgid
            }
          };
        }
      }
      return returnArr;
    } else {
      return Tool.map((val) => {
        if (val.ShortCut) {
          const parsed = getKeyCodeOfInt(Number(val.ShortCut));
          return {
            ...val,
            ShortCut: parsed,
            ShortCutString: getLabelKeyCode(parsed)
          };
        } else return val;
      });
    }
  };
  function getTheme() {
    return smetaStore.get(currentTheme);
  }
  async function clickAwayForRedactor(e2) {
    const closestGrid = e2.target.closest(".grid-panel");
    if (redactorRef.current && closestGrid && closestGrid.grid.doccfgid === redactorRef.current.doccfgid) return;
    if (e2.target.tagName === "BODY" || e2.target.closest("[loadmask]") || e2.target.classList.contains("MuiBackdrop-root") || e2.target.closest("[componenteditor]") || e2.target.closest("[checklist]") || e2.target.closest("[calendar]") || e2.target.closest("[details]") || e2.target.closest("UL") || e2.target.closest(".background_ModalDialog") && !me.current.closest(".background_ModalDialog")) {
      return;
    }
    if (redactorRef.current && !e2.target.closest(".CloseButtonForGrid") && !e2.target.closest(".ApplyButtonForGrid")) {
      await redactorRef.current.postExicstedEditRec();
    }
    document.removeEventListener("click", clickAwayForRedactor, true);
  }
  async function FooterMultiOrData() {
    if (props.DocCfgID && focusedGridRef.current && focusedGridRef.current.grid) {
      const grid2 = focusedGridRef.current.grid;
      const activeSource = grid2.getActiveSource();
      const selectedRecIndex = activeSource.activeRecord;
      const multiSelectCount = grid2.getMultiSelect().length, arrtoShow = [`Всего: ${activeSource.recordCount}`];
      if (multiSelectCount > 0) {
        arrtoShow.push(`Выделено: ${multiSelectCount}`);
      } else {
        const dataAboutRecord = {
          updateUser: await activeSource.getFieldText("UpdateUser", selectedRecIndex),
          updTime: await activeSource.getFieldText("UpdateTime", selectedRecIndex)
        };
        arrtoShow.push(
          `Изменен ${dataAboutRecord.updTime ? dataAboutRecord.updTime : ""} (${dataAboutRecord.updateUser ? dataAboutRecord.updateUser : ""})  `
        );
      }
      FooterDataShow(props.id, arrtoShow, props.footerID);
    }
  }
  function addButtonsForSectionTools(resButtons, newButtons) {
    if (resButtons) {
      return [...newButtons, ...resButtons];
    }
  }
  function getDefaultButtonsforSectionTools() {
    return [
      {
        ID: "-10",
        Hint: "Видимость левой боковой панели",
        Image: getIcons("35")
      }
    ];
  }
  const ClearDocumentStatus = async (refresh) => {
    if (props.DocCfgID !== void 0) {
      setLoadMain(true);
      const res = await GetDocumentLayout(props.DocCfgID, void 0, refresh);
      if (refresh && sources.current[props.DocCfgID]) {
        MainGridRef.current.grid.getActiveSource().setGridState({});
        await refreshFullDocument(true);
      }
      let gridState, activeDetails = 0, detailsBoolLocal = detailsBool, DetailsSplittersSizes = void 0, ParsedTools;
      ParsedTools = parseShortsCuts(res.Tools, props.DocCfgID);
      res.Tools = ParsedTools;
      if (res.Samples && res.Samples.items) {
        setSamples(res.Samples.items);
      }
      res.Tools.Buttons = addButtonsForSectionTools(res.Tools.Buttons, getDefaultButtonsforSectionTools());
      setFormsList(res.Forms);
      parseShortCutsForKeyDown(res.Tools, props.DocCfgID);
      if (res.GridState) {
        gridState = parseGridState(res.GridState);
        if (gridState.details) {
          const details = JSON.parse(gridState.details);
          detailsBoolLocal = details.detailsBool;
        }
      }
      if (sources.current[props.DocCfgID] && sources.current[props.DocCfgID].source.details) {
        activeDetails = Number(sources.current[props.DocCfgID].source.details.activeDetails);
        detailsBoolLocal = sources.current[props.DocCfgID].source.details.detailsBool;
        DetailsSplittersSizes = sources.current[props.DocCfgID].source.details.DetailsSplittersSizes;
      } else {
        activeDetails = Number(res.ActiveDetail) - 1;
      }
      activeDetails = isNaN(activeDetails) ? 0 : activeDetails;
      if (res && res.Params && res.Params.Path) setParamPath(res.Params.Path);
      setSelectedView("doc");
      setSelectedViewIdent("");
      formidRef.current = null;
      setDocumentLayout({
        ...res,
        GridState: gridState,
        detailsBoolLocal
      });
      let indexOfDetails = void 0;
      if (!isEmptyObject(res.Details)) {
        for (const [index2, detail] of Object.entries(res.Details.items)) {
          if (detail.Hidden !== "1") {
            indexOfDetails = Number(index2);
            break;
          }
        }
      }
      if (indexOfDetails !== void 0) {
        if (activeDetails !== void 0) indexOfDetails = activeDetails;
        const detailsdataFromActiveDetails = processDetailsTabs(res.Details.items, indexOfDetails);
        const resDetails = await GetDocumentLayout(
          detailsdataFromActiveDetails.DocCfgID,
          res.Columns[indexOfDetails].ID
        );
        if (resDetails && resDetails.GridState) {
          resDetails.GridState = parseGridState(resDetails.GridState);
        }
        setTabs(TabItemsDetails(res.Details, void 0, DetailsSplittersSizes));
        if (!isEmptyObject(resDetails.Tools)) {
          resDetails.Tools = parseShortsCuts(resDetails.Tools, detailsdataFromActiveDetails.DocCfgID);
        }
        setTimeout(() => {
          if (activeDetails !== 0) TabsRef.current.nativeElement.select(activeDetails);
        }, 10);
        setDocumentLayoutDetails(resDetails);
        if (!detailsBoolLocal && !props.HideControlButtons) ChangeCollapsedDetails(detailsBoolLocal);
      } else {
        setDetailsBool(true);
      }
      setTree(getTree(res));
    }
  };
  function processDetailsTabs(data, indexToCheck, indexFrom) {
    let index2 = indexFrom !== void 0 ? indexFrom : -1;
    for (const value of Object.values(data)) {
      if (typeof index2 === "object") {
        return index2;
      }
      if (value.Hidden !== "1") {
        index2++;
        if (index2 === indexToCheck) return value;
        if (value.items) index2 = processDetailsTabs(value.items, indexToCheck, index2);
      }
    }
    return index2;
  }
  function ButtonsForDocuments(json, subData) {
    let items = [], iconbutton, buttonsBlock = props.buttonsContainerRef && props.buttonsContainerRef.current ? props.buttonsContainerRef.current : document.getElementById("buttons_for_section" + props.id);
    if (json !== void 0 && !isEmptyObject(json) && buttonsBlock) {
      for (const [key, value] of Object.entries(json)) {
        if (value.Caption !== "-") {
          let hintForButton = value.Hint;
          if (value.ShortCutString) {
            hintForButton += ` (${value.ShortCutString})`;
          }
          iconbutton = value.Width && value.Caption !== void 0 ? (
            //если есть ширина, то рисуем обычную кнопку а не айкон баттон
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                id: value.ID,
                from: subData.from,
                style: {
                  width: value.Width === void 0 ? "" : `${value.Width * 1.286}px`,
                  fontSize: "13px",
                  textTransform: "none",
                  textOverflow: "ellipsis",
                  overflow: "hidden",
                  whiteSpace: "nowrap"
                },
                component: "span",
                disabled: value.Disabled === "1",
                index: key,
                doccfgid: props.DocCfgID,
                onClick: (event) => {
                  value.items ? setAnchorElButton(event.currentTarget) : HandleToolButton(event);
                },
                startIcon: ImgURL(value.Image),
                children: value.Caption === void 0 ? "" : ` ${value.Caption}`
              },
              key
            )
          ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(
            IconButton,
            {
              id: value.ID,
              from: subData.from,
              variant: "text",
              style: {
                width: value.Caption === void 0 ? "40px" : `${value.Width}px`,
                //value.Width === undefined ||
                fontSize: "13px"
              },
              component: "span",
              doccfgid: props.DocCfgID,
              index: key,
              disabled: value.Disabled === "1",
              onClick: (event) => {
                value.items ? setAnchorElButton(event.currentTarget) : HandleToolButton(event);
              },
              children: [
                ImgURL(value.Image, { marginLeft: "0px" }),
                value.Caption === void 0 ? "" : ` ${value.Caption}`
              ]
            },
            key
          );
          items.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, documentsectionbutton: "", children: value.Hint ? /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: hintForButton, arrow: true, children: iconbutton }) : iconbutton }, key)
          );
        } else {
          items.push(/* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "vertical", flexItem: true, sx: { mr: 0.5 } }, key));
        }
      }
      setPortal(ReactDOM.createPortal(items, buttonsBlock));
    }
  }
  function customClick(id) {
    switch (id) {
      case "-10":
        const state = leftSplitterRef.current.querySelector(`div[role="separator"]`);
        if (state.hasAttribute("item-collapsed")) {
          leftSplitterRef.current.expand(true);
          onExpand();
        } else {
          leftSplitterRef.current.collapse(true);
          onCollapse();
        }
        break;
    }
  }
  function HandleToolButton(event, gridRef) {
    if (event.currentTarget.id <= -10) {
      customClick(event.currentTarget.id);
      return;
    }
    setAnchorElButton(null);
    const focusId = focusedGridRef.current.grid.doccfgid;
    let params2 = /* @__PURE__ */ new Map(), gridToHandle = gridRef ? gridRef : MainGridRef.current, mainGrid = MainGridRef.current.grid, DocID, isDetails = false;
    DocID = gridToHandle.grid.getActiveSource().getFieldTextSync("ID");
    mainGrid.getActiveSource().getFieldTextSync("ID");
    gridToHandle.grid.doccfgid === "0" ? props.DocCfgID : gridToHandle.grid.doccfgid;
    isDetails = gridToHandle && gridToHandle.grid && gridToHandle.grid.getActiveSource().Master && gridToHandle.grid.getActiveSource().Master.MasterID;
    params2.set("prefix", "documents");
    params2.set("comand", "HandleToolButton");
    params2.set("ID", event.currentTarget.id);
    params2.set("DocID", DocID ? DocID : 0);
    params2.set("DocCfgID", props.DocCfgID);
    params2.set("SectionID", props.id);
    console.log(gridToHandle);
    params2.set("MasFld", mainGrid.getSelectedField());
    params2.set("PlaneView", mainGrid.isCard() ? "1" : "0");
    params2.set("focus", focusId);
    params2.set("WSM", "1");
    if (isDetails) {
      params2.set("MasterID", gridToHandle.grid.getActiveSource().Master.MasterID);
      params2.set("ActiveDetail", gridToHandle.grid.doccfgid);
      params2.set("DetailID", DocID ? DocID : 0);
      params2.set("DetailsFld", gridToHandle.grid.getSelectedField());
    }
    if (mainGrid.getMultiSelect().length > 0) {
      CheckMultiSelect(mainGrid).then((selection) => {
        params2.set("Selection", selection);
        AfterSelection();
      });
    } else {
      AfterSelection();
    }
    function AfterSelection(passed) {
      if (isDetails && gridToHandle.grid.getMultiSelect().length > 0 && passed === void 0) {
        CheckMultiSelect(gridToHandle.grid).then((selection) => {
          params2.set("Details", selection);
          AfterSelection(true);
        });
      } else {
        AxiosRequest(true, params2).then((res) => {
          tokenProcessingTest(res, {
            from: "grid",
            func: (data) => {
              AfterWSM(gridToHandle, data);
            }
          });
        });
      }
    }
  }
  async function AfterWSM(gridRef, data = {}) {
    if (data.DocID) {
      await gridRef.grid.refreshSource(data.DocID);
    } else {
      await gridRef.grid.refreshSource("!");
    }
    if (gridRef && gridRef.grid && gridRef.grid.getActiveSource().details && gridRef.grid.getActiveSource().details.detailsBool === false || !detailsBool) {
      const selectedIndex = Number(TabsRef.current.nativeElement.getAttribute("selected-index"));
      const CurrentTabContent = TabsRef.current.nativeElement.getTabContent(selectedIndex);
      if (!CurrentTabContent) return;
      await UpdDetails(selectedIndex, CurrentTabContent.DocumentLayoutDetails);
    }
  }
  function setCollumsForGrid(Columns, grid2) {
    if (Columns) {
      const columns = parseColumns(
        { Columns },
        {
          Module: "documents",
          docOpts: true,
          widthMultiply: 1.33
        }
      );
      grid2 && grid2.setColumns(columns, true);
      return columns;
    } else grid2.defaultColumns = true;
  }
  function canModify(flag, column2, grid2) {
    const isEmptySource = grid2.getActiveSource().recordCount === 0;
    const source = grid2.getActiveSource();
    const recordInfo = grid2.getActiveSource().getRecordInfo();
    let canModify2 = true, lockStatus = recordInfo.LockStatus, localFlag = flag;
    const insertFlagDisable = 1, onlyViewMode = grid2.OnlyViewMode, mfInsert2 = 0, mfEdit2 = 1, mfDelete2 = 2, mfPaste = 3, byteRights = {
      [mfInsert2]: 1,
      [mfEdit2]: 2,
      [mfDelete2]: 4
    };
    if (grid2.detailsInDetail === true && !grid2.textField || onlyViewMode) {
      return false;
    }
    if (!isEmptyObject(recordInfo)) {
      if (!isEmptyObject(source)) {
        switch (flag) {
          case mfPaste:
          case mfInsert2:
            if (canModify2) canModify2 = !grid2.getActiveSource().Master.isEmpty;
            if (canModify2) canModify2 = grid2.getActiveSource().rights.insert;
            if (canModify2) canModify2 = grid2.getActiveSource().InsertFlag !== insertFlagDisable;
            if (canModify2 && flag === mfPaste) canModify2 = canModify2;
            if (canModify2) canModify2 = (lockStatus & byteRights[mfInsert2]) === 0;
            break;
          case mfEdit2:
            if (column2 && column2.fieldName) {
              const indexOfField = grid2.getActiveSource().getFieldIndex(column2.fieldName);
              const locking = recordInfo.Data$content;
              canModify2 = locking[indexOfField] === "0" || locking[indexOfField] === "4";
            } else canModify2 = (lockStatus & byteRights[mfEdit2]) === 0;
            break;
          case mfDelete2:
            canModify2 = grid2.getActiveSource().rights.delete;
            if (canModify2 && lockStatus & 4) canModify2 = false;
            if (canModify2 && grid2.getActiveSource().recordCount === 0) canModify2 = false;
            break;
        }
      }
    } else {
      if (localFlag === mfEdit2 && isEmptySource) localFlag = mfInsert2;
      if ([mfInsert2, mfPaste].includes(localFlag)) {
        const sourceInsertFlags = {
          insertFlagDisable: () => canModify2 = false,
          2: () => canModify2 = true
        };
        if (sourceInsertFlags[source.InsertFlag]) {
          canModify2 = sourceInsertFlags[source.InsertFlag]();
        } else {
          lockStatus = 0;
          const sourceMasterRecordInfo = source.Master.source && source.Master.source.getRecordInfo();
          if (!isEmptyObject(sourceMasterRecordInfo) && sourceMasterRecordInfo.LockStatus) {
            lockStatus = sourceMasterRecordInfo.LockStatus;
          }
        }
        canModify2 = (lockStatus & byteRights[mfEdit2]) === 0;
        if (canModify2) canModify2 = !grid2.getActiveSource().Master.isEmpty;
      } else canModify2 = false;
    }
    return canModify2;
  }
  async function CreateGrid(gridPanel, data) {
    let source, dcfg = data.DocCfgID;
    if (sources.current[dcfg] && sources.current[dcfg].source) {
      grid = gridPanel.grid;
      if (grid.isCard()) {
        await grid.Rotate("", false);
      }
      source = sources.current[dcfg].source;
      setCollumsForGrid(data.Columns, gridPanel.grid);
      grid.BkClrField = DocumentLayout.BkClrField;
      grid.ColorField = DocumentLayout.ColorField;
      grid.StyleField = DocumentLayout.StyleField;
      grid.doccfgid = data.DocCfgID;
      grid.setImageFields(DocumentLayout.ImageFields);
      await grid.setSource(source);
      grid.doccfgid = data.DocCfgID;
      source.onRecordIndexChanged = async function(source2) {
        source2.getFieldText("ID").then((id) => {
          setSelectedRecordID(id === "" ? "0" : id);
        });
      };
      const gridStateFromSource = source.getGridState();
      if (gridStateFromSource && gridStateFromSource.ViewMode === "1") {
        await grid.Rotate();
      }
      setControlButtons({
        ...controlButtons,
        sign: source.findField("Doc$DSign")
      });
      FooterDataShow(
        props.id,
        [
          `Число записей: ${source.recordCount}`,
          `Изменен ${await source.getFieldText("UpdateTime")} (${await source.getFieldText("UpdateUser")})  `
        ],
        props.footerID
      );
      props.setRecorcCount && props.setRecorcCount(source.recordCount);
    } else {
      source = new createRecordSource();
      source.onHandleRequest = onHandleRequestDocuments(data.DocCfgID, data.ParentID);
      source.details = {
        activeDetails: selectedTabIndex,
        detailsBool: data.detailsBoolLocal
      };
      source.Master = {
        ...props.master
      };
      if (!gridPanel.grid || false) {
        gridPanel.grid = new createGrid(gridPanel);
        gridPanel.grid.onButtonsStateChange = onButtonsStateChange;
        gridPanel.grid.canModify = canModify;
      }
      gridPanel.grid.doccfgid = props.DocCfgID;
      grid = gridPanel.grid;
      if (grid.isCard()) {
        await grid.Rotate("", false);
      }
      setCollumsForGrid(data.Columns, gridPanel.grid);
      grid.BkClrField = DocumentLayout.BkClrField;
      grid.ColorField = DocumentLayout.ColorField;
      grid.StyleField = DocumentLayout.StyleField;
      grid.doccfgid = data.DocCfgID;
      grid.setImageFields(DocumentLayout.ImageFields);
      if (DocumentLayout.GridState && props.disiableState !== true) {
        source.setGridState(DocumentLayout.GridState);
      }
      if (DocumentLayout.Rights) {
        source.rights = getRightsData(DocumentLayout.Rights);
      }
      const stateCallbackKey = `state${dcfg}${props.id}`;
      const callBack = () => {
        beforeSaveState({
          source: grid.getActiveSource(),
          dcgid: dcfg,
          secId: props.id
        });
      };
      source.onGridStateChange = () => setUnloadCallbacks({
        [stateCallbackKey]: callBack
      });
      source.onRecordIndexChanged = function(source2) {
        source2.getFieldText("ID").then((id) => {
          setSelectedRecordID(id === "" ? "0" : id);
        });
      };
      grid.onMultiSelectChange = function(grid2) {
        FooterMultiOrData();
      };
      grid.onRecordCountChange = function(grid2) {
        FooterMultiOrData();
      };
      source.onNeedToSaveChanged = function(source2) {
        onNeedToSaveChanged(grid);
      };
      grid.CommitToSaveChanges = function(data2) {
        if (props.setRedactor) {
          props.setRedactor(data2);
        } else {
          if (data2) document.addEventListener("click", clickAwayForRedactor, true);
          setRedactor(data2);
        }
      };
      const detailsBoolLocal = sources.current[dcfg] && sources.current[dcfg].details ? sources.current[dcfg].details : true;
      sources.current = {
        ...sources.current,
        [data.DocCfgID]: {
          source,
          details: detailsBoolLocal,
          sourcesDetail: {}
        }
      };
      grid.statusData = {
        handleStatuses: () => {
          return AxiosRequest(true, DocumentRequest({ command: "GetStatusList" }));
        },
        changeStatus
      };
      await grid.setSource(source);
      if (DocumentLayout.GridState) {
        if (DocumentLayout.GridState.ViewMode === "1") {
          grid.OnlyViewMode = true;
        }
      }
      if (props.ObjRef) {
        await grid.refreshSource("^" + props.ObjRef);
      } else {
        await grid.refreshSource();
      }
      await updStateOfButtons();
      if (DocumentLayout.GridState && DocumentLayout.GridState.CardMode === "1" || props.PlaneView === "1") {
        await grid.Rotate();
      }
      grid.refreshDocumentToken = refreshDocumentToken;
      grid.sectionid = props.id;
      setControlButtons({
        ...controlButtons,
        sign: source.findField("Doc$DSign")
      });
      FooterDataShow(
        props.id,
        [
          `Число записей: ${source.recordCount}`,
          `Изменен ${await source.getFieldText("UpdateTime")} (${await source.getFieldText("UpdateUser")})  `
        ],
        props.footerID
      );
      props.setRecorcCount && props.setRecorcCount(source.recordCount);
      if (!props.noAutoFocus && MainGridRef.current) MainGridRef.current.focus();
      if (DocumentLayout.GridState && DocumentLayout.GridState.ShowDetail) ;
    }
    grid.doccfgid = props.DocCfgID;
    me.current.grid = MainGridRef.current;
    setActiveSite();
    setLoadMain(false);
    props.ObjRef && grid.refreshSource(props.ObjRef);
    return source;
  }
  function onButtonsStateChange(grid2) {
    if (grid2) {
      setControlButtonsState({
        ...controlButtonsState,
        card: grid2.isCard(),
        filter: grid2.filter.style.display === "grid",
        detail: grid2.getActiveSource().details === void 0 ? false : grid2.getActiveSource().details.detailsBool
      });
      setControlButtons({
        ...controlButtons,
        filter: !grid2.isCard(),
        sign: grid2.getActiveSource().findField("Doc$DSign")
      });
      updStateOfButtons();
    }
  }
  async function setActiveSite() {
    let params2 = /* @__PURE__ */ new Map(), MasterID = await MainGridRef.current.grid.source.getFieldText("ID");
    params2.set("prefix", "documents").set("comand", "SetActiveSite").set("SectionID", props.id).set("DocCfgID", props.DocCfgID).set("PlaneView", "0");
    if (MasterID !== "") params2.set("MasterID", MasterID);
    await AxiosRequest(true, params2);
  }
  function CheckDetailsSources(dcgid, DocumentLayoutDetails2) {
    let detailsSource;
    if (sources.current[props.DocCfgID] && !isEmptyObject(sources.current[props.DocCfgID].sourcesDetail)) {
      for (const [key, value] of Object.entries(sources.current[props.DocCfgID].sourcesDetail)) {
        if (Number(key) === Number(dcgid)) detailsSource = value;
      }
    }
    if (detailsSource === void 0) {
      detailsSource = new createRecordSource();
      if (DocumentLayoutDetails2 && DocumentLayoutDetails2.GridState) {
        detailsSource.setGridState(DocumentLayoutDetails2.GridState);
      }
      const stateCallbackKey = `state${dcgid}${props.id}`;
      const callBack = () => {
        beforeSaveState({ source: detailsSource, dcgid, secId: props.id });
      };
      detailsSource.onGridStateChange = () => setUnloadCallbacks({
        [stateCallbackKey]: callBack
      });
      sources.current = {
        ...sources.current,
        [props.DocCfgID]: {
          ...sources.current[props.DocCfgID],
          sourcesDetail: {
            ...sources.current[props.DocCfgID].sourcesDetail,
            [dcgid]: detailsSource
          }
        }
      };
    }
    return detailsSource;
  }
  async function refreshRecord(needToUpdDetails) {
    if (MainGridRef.current && MainGridRef.current.grid)
      await MainGridRef.current.grid.getActiveSource().refreshRecord();
    if (needToUpdDetails) UpdDetails(selectedTabIndex, DocumentLayoutDetails);
  }
  async function CreateDetails(gridPanel, data) {
    let source;
    if (data.ParentDocCfgID !== void 0 && data.ParentDocCfgID !== "") {
      let parentDocCfgIDArr = data.ParentDocCfgID.split(","), parentNamesArr = data.ParentName.split(",");
      const subDetailsGrid = me.current.querySelector(`[id=subDetailsGrid${data.DocCfgID}]`);
      if (data.length) {
        subDetailsGrid.style.width = "100%";
        gridPanel.style.width = `calc(100% - ${data.length * 0 + "px"})`;
        subDetailsGrid.style.marginRight = "1px";
        subDetailsGrid.style.display = "";
      }
      let parentSource = CheckDetailsSources(parentDocCfgIDArr[0], data.DocumentLayoutDetails);
      parentSource.rights = getRightsData("-1");
      parentSource.Master = {
        parentCanModify: (flag, column2) => {
          return data.ParentGrid.canModify(flag, column2, data.ParentGrid, true);
        },
        isEmpty: !data.ParentGrid.source.recordCount > 0,
        source: data.ParentGrid.source,
        MasterID: data.ParentID,
        refreshRecord
      };
      parentSource.onHandleRequest = onHandleRequestDocuments(parentDocCfgIDArr[0], data.ParentID);
      let columns = { title: [] }, dest = {
        fieldInfo: { ...defaultFieldInfo }
      };
      dest.fieldName = "Doc$Title";
      dest.title = parentNamesArr[0];
      if (data.length === 1) {
        dest.width = subDetailsGrid.offsetWidth - 3;
      } else {
        dest.width = 119;
      }
      dest.level = 0;
      columns.title.push(dest);
      const gridParent = DetailsInDetailsSize(subDetailsGrid, data);
      gridParent.ShowIndicatorF(false);
      await parentSource.refresh();
      gridParent.setColumns(columns);
      await parentSource.open();
      gridParent.DisableResize = false;
      await gridParent.setSource(parentSource);
      parentSource.onNeedToSaveChanged = function(source2) {
        onNeedToSaveChanged(gridParent, data.ParentID);
      };
      parentSource.onRecordIndexChanged = function(source2) {
        ProcessTheDetailsInDetail(source2);
      };
      async function ProcessTheDetailsInDetail(source2) {
        const ParentDocCfgID = data.ParentDocCfgID.replace(`${parentDocCfgIDArr[0]},`, "");
        const parentName = data.ParentName.replace(`${parentNamesArr[0]},`, "");
        await CreateDetails(gridPanel, {
          //вызываем сами себя с данными нужного уровня(если изменили 2 уровень, 3 и 4 поменяются)
          DocCfgID: data.DocCfgID,
          Columns: data.Columns,
          ParentID: await source2.getFieldText("ID"),
          ParentGrid: gridParent,
          ParentDocCfgID,
          CurrentSourceDocCfgID: await source2.getFieldText("DocCfgID"),
          gridParent,
          ParentName: parentName,
          textField: data.textField,
          DocumentLayoutDetails: data.DocumentLayoutDetails
          //115308949
        });
      }
      await gridParent.refreshSource();
      await gridParent.updateGridSize();
      await ProcessTheDetailsInDetail(parentSource);
    } else {
      if (data.textField) {
        const grid2 = data.gridParent;
        gridPanel.innerHTML = "";
        let TextFeildComponent;
        if (grid2.source.findField(data.textField + "_HTML")) {
          let textfieldcontent;
          textfieldcontent = await handlePage({
            DocID: data.ParentID,
            fieldName: data.textField + "_HTML",
            DocCfgID: data.CurrentSourceDocCfgID
          });
          if (!textfieldcontent.content || isEmptyObject(textfieldcontent)) {
            textfieldcontent = grid2.source.getFieldTextSync(data.textField + "_HTML");
            if (!textfieldcontent.content) {
              textfieldcontent = await handlePage({
                DocID: data.ParentID,
                fieldName: data.textField,
                DocCfgID: data.CurrentSourceDocCfgID
              });
            }
          }
          TextFeildComponent = CreateHTMLEditor(
            textfieldcontent.content || textfieldcontent || "",
            data.gridParent,
            data.textField + "_HTML"
          );
        } else {
          TextFeildComponent = await CreateTextField(grid2, data.textField, true);
        }
        gridPanel.appendChild(TextFeildComponent);
        setLoadDetails(false);
      } else {
        grid = gridPanel.grid;
        if (!grid) {
          source = CheckDetailsSources(data.DocCfgID, data.DocumentLayoutDetails);
          source.onHandleRequest = onHandleRequestDocuments(data.DocCfgID, data.ParentID);
          source.onNeedToSaveChanged = function(source2) {
            onNeedToSaveChanged(grid);
          };
          gridPanel.grid = new createGrid(gridPanel);
          gridPanel.grid.canModify = canModify;
          grid = gridPanel.grid;
          grid.onMultiSelectChange = function(grid2) {
            FooterMultiOrData();
          };
          grid.BkClrField = data.DocumentLayoutDetails.BkClrField;
          grid.ColorField = data.DocumentLayoutDetails.ColorField;
          grid.StyleField = data.DocumentLayoutDetails.StyleField;
          grid.setImageFields(data.DocumentLayoutDetails.ImageFields);
          grid.CommitToSaveChanges = function(data2) {
            if (props.setRedactor) {
              props.setRedactor(data2);
            } else {
              if (data2) document.addEventListener("click", clickAwayForRedactor, true);
              setRedactor(data2);
            }
          };
          grid.doccfgid = data.DocCfgID;
          setCollumsForGrid(data.Columns, gridPanel.grid);
          await grid.setSource(source);
          await grid.refreshSource();
          grid.sectionid = props.id;
        } else {
          const title = Object.assign({}, gridPanel.grid.columns);
          if (isEmptyObject(title.title)) {
            setCollumsForGrid(data.Columns, gridPanel.grid);
          } else {
            if (!grid.isCard()) grid.setColumns(title, gridPanel.grid);
          }
          grid.getActiveSource().onHandleRequest = onHandleRequestDocuments(data.DocCfgID, data.ParentID);
          await grid.refreshSource();
        }
        if (data.DocumentLayoutDetails.Rights) {
          grid.source.rights = getRightsData(data.DocumentLayoutDetails.Rights);
        }
        grid.source.Master = {
          parentCanModify: (flag, column2, dd) => {
            return data.ParentGrid.canModify(flag, column2, data.ParentGrid, true);
          },
          isEmpty: !data.ParentGrid.source.recordCount > 0,
          MasterID: data.ParentID,
          source: data.ParentGrid.source,
          refreshRecord
        };
        gridPanel.ondragover = handleDrag;
        gridPanel.ondrop = handleDrop;
        gridPanel.onpaste = handlePaste;
        SubGridRef.current = gridPanel;
        setLoadDetails(false);
      }
    }
  }
  function onNeedToSaveChanged(grid2, parentID2, secId) {
    const dcfgid = grid2.doccfgid === "0" ? props.DocCfgID : grid2.doccfgid;
    if (grid2.source.updatesPending === true) {
      if (props.onNeedToSaveChanged) {
        props.onNeedToSaveChanged(grid2, parentID2);
        return;
      }
      if (saveDocs.current[props.DocCfgID] && saveDocs.current[props.DocCfgID].dcfgid) return;
      saveDocs.current = {
        ...saveDocs.current,
        [props.DocCfgID]: {
          ...saveDocs.current[props.DocCfgID],
          [dcfgid]: {
            bool: true,
            grid: grid2,
            parentID: parentID2 ? parentID2 : 0,
            id: secId
          }
        }
      };
      setSave({ ...save, [props.DocCfgID]: true });
      const saveKey = `save${props.DocCfgID}${props.id}`;
      setUnloadCallbacks({
        //добавляем новой колбэк для сохранения
        [saveKey]: () => {
          return saveDocChanges({ docName: props.docName, saveChanges });
        }
      });
    } else {
      if (props.onNeedToSaveChanged) {
        props.onNeedToSaveChanged(grid2, parentID2);
        return;
      }
      if (saveDocs.current[props.DocCfgID] && saveDocs.current[props.DocCfgID][dcfgid]) {
        for (const key of Object.keys(saveDocs.current[props.DocCfgID])) {
          const saveKey = `save${key}${props.id}`;
          setClearUnloadCallBack(saveKey);
        }
        saveDocs.current = { ...saveDocs.current, [props.DocCfgID]: {} };
        setSave({ ...save, [props.DocCfgID]: false });
      }
    }
  }
  const fakePostRecord = ({ grid: grid2, index: index2 }) => {
    const recIndex = index2 || grid2.getActiveSource().activeRecord;
    const postData = {
      Command: "PostRecord",
      RecordIndex: recIndex,
      RecordSet: { Attributes: [], Records: { Record: { $Data: [] } } }
    };
    const config2 = {
      prefix: Prefixes.doc,
      params: {
        DocCfgID: props.DocCfgID,
        SectionID: props.id,
        ParentID: 0,
        WSM: 1
      }
    };
    return smetaAxios.post("HandleDocument", postData, config2);
  };
  const createChat = async ({ grid: grid2, docCfgId }) => {
    const div = document.createElement("div");
    div.style.width = "100%";
    div.style.height = "100%";
    div.style.display = "flex";
    const docId = await grid2.getActiveSource().getFieldText("ID");
    const handlePageParams = {
      // fieldName: textField,
      DocID: docId,
      DocCfgID: docCfgId,
      id: `${docCfgId}0${props.id}`,
      returnFull: true
    };
    const jsonContent = await handlePage(handlePageParams);
    clientExports.createRoot(div).render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Chat,
        {
          chatData: jsonContent,
          docId,
          handlePage: async (postData) => {
            await handlePage({ ...handlePageParams, type: "set" }, postData);
            await fakePostRecord({ grid: grid2 });
            grid2.refreshSource("!");
            UpdDetails(null, DocumentLayoutDetails);
          }
        }
      )
    );
    return div;
  };
  async function CreateTextField(grid2, textField, dd) {
    const div = document.createElement("div");
    div.style.width = "100%";
    div.style.height = "100%";
    const style2 = {
      width: "100%",
      height: "100%",
      overflowY: "auto",
      overflowX: "hidden",
      outline: "none",
      resize: "none",
      border: "none"
    };
    let text = await grid2.getActiveSource().getFieldText(textField), textHandlePage = {};
    if (text === "") {
      textHandlePage = await handlePage({
        fieldName: textField,
        DocID: grid2.getActiveSource().getFieldTextSync("ID")
      });
    }
    clientExports.createRoot(div).render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        IMemo,
        {
          readOnly: !grid2.canModify(1, { fieldName: textField }, { ...grid2, textField: true }, dd),
          style: style2,
          Text: textHandlePage.content || text || "",
          onChange: async (event) => {
            const recIndex = grid2.getActiveSource().activeRecord;
            setRedactor({
              postExicstedEditRec: async (e2) => {
                await grid2.postSomeData(textField, { text: event.target.value }, recIndex);
                await grid2.postExicstedEditRec(false);
              },
              cancelRecord: () => {
                setRedactor(false);
              }
            });
          },
          onBlur: (e2) => {
            if (!!redactorRef.current) {
              if (redactorRef.current && !(e2.relatedTarget && e2.relatedTarget.closest(".CloseButtonForGrid"))) {
                redactorRef.current.postExicstedEditRec(false);
                if (props.setRedactor) {
                  props.setRedactor(false);
                } else {
                  setRedactor(false);
                }
              }
            }
          }
        }
      )
    );
    return div;
  }
  const findCaption = (items, captionToFind) => {
    return items.some((item) => {
      if (captionToFind.includes(item.Caption)) return true;
      if (item.items) return findCaption(item.items, captionToFind);
      else return false;
    });
  };
  function CreateHTMLEditor(mimeContent, grid2, textField) {
    const div = document.createElement("div");
    div.style.width = "100%";
    div.style.height = "100%";
    const oldContainers = document.querySelectorAll(".jodit-ui-tooltip-container");
    const linkEnabled = findCaption(DocumentLayout.Details.items, ["Файлы", "Приложения", "Вложения"]);
    if (oldContainers.length > 0) {
      for (let index2 = 0; index2 < oldContainers.length; index2++) {
        const element = oldContainers[index2];
        element.remove();
      }
    }
    clientExports.createRoot(div).render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogHtml,
        {
          htmlInput: mimeContent.content || mimeContent,
          HiddenButton: true,
          onSave: saveChanges,
          linksEnabled: linkEnabled,
          readonly: !grid2.canModify(1, { fieldName: textField }, { ...grid2, textField: true }),
          docId: grid2.getActiveSource().getKeyFieldNameData(),
          onPostRecord: async (mimeContent2, textContent) => {
            if (grid2.getActiveSource().getFieldTextSync(textField) !== mimeContent2) {
              await grid2.postSomeData(textField, { text: mimeContent2 });
              await grid2.postSomeData(textField.replace("_HTML", ""), { text: textContent });
              await grid2.postExicstedEditRec(false);
            }
          },
          onChange: (mimeContent2, textContent) => {
            if (grid2.source.getFieldTextSync(textField) !== mimeContent2) {
              const recIndex = grid2.getActiveSource().activeRecord;
              setRedactor({
                postExicstedEditRec: async () => {
                  await grid2.postSomeData(textField, { text: mimeContent2 }, recIndex);
                  await grid2.postSomeData(textField.replace("_HTML", ""), { text: textContent }, recIndex);
                  await grid2.postExicstedEditRec(false);
                },
                cancelRecord: () => {
                  setRedactor(false);
                }
              });
              document.addEventListener("click", clickAwayForRedactor, true);
            }
          }
        }
      )
    );
    return div;
  }
  function CreateDocuments(data) {
    const div = document.createElement("div");
    div.style.width = "100%";
    div.style.height = "100%";
    div.id = "DocumetsDetails" + data.id;
    clientExports.createRoot(div).render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        SectionDocuments$1,
        {
          DocCfgID: data.ObjType ? data.ObjType : "-1",
          master: {
            refreshRecord
          },
          canModify: (flag, column2, grid2, dd) => data.grid.canModify(flag, column2, grid2, dd),
          HideParams: data.HideParams === "1",
          SectionToolsJS: false,
          id: data.id,
          HideControlButtons: true,
          setRedactor: (value) => {
            if (value) document.addEventListener("click", clickAwayForRedactor, true);
            setRedactor(value);
          },
          onNeedToSaveChanged: (g2, p2) => {
            onNeedToSaveChanged(g2, p2, data.id);
          }
        }
      )
    );
    return div;
  }
  function DetailsInDetailsSize(subDetailsGrid, data) {
    let gridPanelParent = document.getElementById("gridpanelDetails" + data.ParentDocCfgID);
    if (gridPanelParent) gridPanelParent.parentElement.remove();
    const gridPanelParentBlockWidth = document.createElement("div");
    gridPanelParentBlockWidth.style.width = "100%";
    gridPanelParentBlockWidth.style.position = "relative";
    gridPanelParentBlockWidth.style.height = "inherit";
    gridPanelParentBlockWidth.style.marginRight = "1px";
    gridPanelParent = document.createElement("div");
    gridPanelParent.tabIndex = "0";
    gridPanelParent.onfocus = onFocusChange;
    gridPanelParent.style.height = "100%";
    gridPanelParent.id = "gridpanelDetails" + data.ParentDocCfgID;
    gridPanelParentBlockWidth.appendChild(gridPanelParent);
    subDetailsGrid.appendChild(gridPanelParentBlockWidth);
    subDetailsGrid.style.marginRight = "1px";
    subDetailsGrid.style.display = "";
    gridPanelParentBlockWidth.appendChild(gridPanelParent);
    subDetailsGrid.appendChild(gridPanelParentBlockWidth);
    gridPanelParent.grid = new createGrid(gridPanelParent);
    gridPanelParent.grid.doccfgId = data.ParentDocCfgID;
    gridPanelParent.grid.detailsInDetail = true;
    gridPanelParent.grid.sectionid = props.id;
    gridPanelParent.grid.canModify = canModify;
    return gridPanelParent.grid;
  }
  function deepEqual(obj1, obj2) {
    if (obj1 === obj2) return true;
    if (typeof obj1 !== "object" || obj1 === null || typeof obj2 !== "object" || obj2 === null) return false;
    const keys1 = Object.keys(obj1);
    const keys2 = Object.keys(obj2);
    if (keys1.length !== keys2.length) return false;
    return keys1.every((key) => deepEqual(obj1[key], obj2[key]));
  }
  function onHandleRequestDocuments(DocCfgID, ParentID, id, wsm) {
    return async function(request, load = true, wsmFromGrid) {
      let params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", "documents");
      params2.set("comand", "HandleDocument");
      params2.set("DocCfgID", DocCfgID);
      params2.set("SectionID", id ? id : props.id);
      params2.set("ParentID", ParentID === void 0 ? parentID : ParentID);
      if (wsm || wsmFromGrid) params2.set("WSM", "1");
      const result = await AxiosRequest(load, params2, request);
      if (result.Tabs) {
        const newHiddenTabsData = Object.entries(result.Tabs).reduce(
          (acc, [key, value]) => ({ ...acc, [key]: value.Hidden === "1" }),
          {}
        );
        if (deepEqual(hiddenTabs.current, newHiddenTabsData)) return result;
        hiddenTabs.current = newHiddenTabsData;
        const detailsSplittersSizes = sources.current[props.DocCfgID].source.details.DetailsSplittersSizes;
        setLoadDetails(true);
        setTabs(TabItemsDetails(DocumentLayout.Details, void 0, detailsSplittersSizes));
        setTimeout(() => {
          const selectedIndex = Number(TabsRef.current.nativeElement.getAttribute("selected-index"));
          onTabChange({ detail: { oldIndex: selectedIndex, index: selectedIndex } });
        }, 100);
      }
      return result;
    };
  }
  function GetDocumentLayout(docConfigID, MasterID, refresh) {
    let params2 = /* @__PURE__ */ new Map();
    if (!docConfigID) return;
    params2.set("prefix", "documents");
    params2.set("comand", "GetDocumentLayout");
    params2.set("DocCfgID", docConfigID);
    params2.set("SectionID", props.id);
    if (MasterID !== void 0) params2.set("MasterID", MasterID);
    params2.set("GridState", 1);
    if (refresh) {
      params2.set("ClearState", 1);
      params2.set("Refresh", 1);
    }
    return AxiosRequest(true, params2);
  }
  function ReturnParams(data) {
    if (data) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        Params,
        {
          Module: "documents",
          id: props.DocCfgID,
          SectionID: props.id,
          data: data.Params,
          Path: data.Params.Path,
          NoTitle: true,
          defaultFilter: data.Filter === "1" ? true : false,
          fixHistory,
          setFixHistory
        }
      );
    } else {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {});
    }
  }
  function getTree(docLay) {
    if (docLay.HasTree === "1") {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(Tree, { props: { ...props.tree, selectID: setParentID } });
    }
  }
  async function ApplyButtonClick() {
    if (redactor) {
      await redactor.postExicstedEditRec();
    }
    await refreshFullDocument();
    if (paramPath && !props.HideParams) {
      const json = await FixParamHistory(paramPath);
      if (json.History) setFixHistory(json.History);
    }
  }
  async function refreshFullDocument(refresh) {
    let selectRecord = await MainGridRef.current.grid.getActiveSource().getFieldText("ID");
    if (selectRecord === "" || refresh) {
      await MainGridRef.current.grid.refreshSource();
    } else {
      await MainGridRef.current.grid.refreshSource("!" + selectRecord);
    }
    if (!detailsBool) {
      await UpdDetails(selectedTabIndex, DocumentLayoutDetails);
    }
    await updStateOfButtons();
  }
  function FixParamHistory(path) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "programs").set("comand", "FixParamHistory").set("Path", path);
    return AxiosRequest(true, params2);
  }
  function ChangeCollapsedDetails(bool) {
    setDetailsBool(bool);
    sources.current = {
      ...sources.current,
      [props.DocCfgID]: { ...sources.current[props.DocCfgID], details: bool }
    };
    if (smetaStore.get(animationsAtom)) {
      clearTimeout(timeoutUpdateGrid.current);
      timeoutUpdateGrid.current = setTimeout(() => {
        TestUpdateGrid().then(() => {
          UpdDetails(selectedTabIndex, DocumentLayoutDetails);
        });
      }, 501);
    } else {
      clearTimeout(timeoutUpdateGrid.current);
      timeoutUpdateGrid.current = setTimeout(() => {
        TestUpdateGrid().then(() => {
          UpdDetails(selectedTabIndex, DocumentLayoutDetails);
        });
      }, 1);
    }
  }
  async function TestUpdateGrid() {
    if (MainGridRef.current.grid) {
      await updateVisibleGrids();
      await MainGridRef.current.grid.scrollTo(MainGridRef.current.grid.getActiveSource().activeRecord);
    }
    if (!detailsBool) {
      let tab = TabsRef.current.nativeElement.getTabContent(selectedTabIndex);
      if (tab) {
        tab = tab.querySelectorAll(".grid-panel");
        if (tab.length > 0) {
          for (let DetailGrid of tab) {
            if (DetailGrid.grid) {
              await DetailGrid.grid.updateGridSize();
            }
          }
        }
      }
    }
  }
  function CreateRecordCopy(DocCfgID, DocId) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents");
    params2.set("comand", "CreateRecordCopy");
    params2.set("SectionID", props.id);
    params2.set("DocCfgID", DocCfgID);
    params2.set("ID", DocId);
    return AxiosRequest(true, params2);
  }
  function onTabChange(event) {
    if (event.target) return;
    if (event.detail && event.detail["oldIndex"] !== null) {
      setLoadDetails(true);
      const newTabIndex = event.detail.index;
      const CurrentTabContent = TabsRef.current.nativeElement.getTabContent(newTabIndex);
      const DetailsDocCfgID = CurrentTabContent.parentElement.docCfgID;
      GetDocumentLayout(DetailsDocCfgID, selectedRecordID).then((res) => {
        setSelectedTabIndex(newTabIndex);
        setDocumentLayoutDetails(res);
      });
    }
  }
  function TabItemsDetails(data, parentData, DetailsSplittersSizes) {
    if (data !== void 0 && !isEmptyObject(data) && data.items !== void 0 && !isEmptyObject(data.items)) {
      let returnJsx = [];
      let DataFromParent = parentData === void 0 ? "" : parentData;
      for (const value of Object.values(data.items)) {
        if (value.Hidden !== "1" && !hiddenTabs.current[value.DocCfgID]) {
          returnJsx.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              TabItem,
              {
                style: {
                  textTransform: "none",
                  width: "100%",
                  height: "100%",
                  padding: "0px",
                  display: "inline-block",
                  overflowX: "hidden"
                },
                label: value.Name,
                parentDocCfgID: parentData === void 0 ? void 0 : parentData.DocCfgID,
                parentName: parentData === void 0 ? void 0 : parentData.Name,
                docCfgID: value.DocCfgID,
                textField: value.TextField !== void 0 ? value.TextField : null,
                id: "details" + value.DocCfgID,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Grid$1,
                  {
                    container: true,
                    direction: "row",
                    justifyContent: "flex-start",
                    alignItems: "center",
                    sx: { height: "inherit" },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      SplitterLocal,
                      {
                        style: {
                          width: "100%",
                          borderTop: "1px solid rgb(208, 208, 208)",
                          flex: "1 1"
                        },
                        orientation: "vertical",
                        onExpand: (e2) => {
                          detailsInDetailsSizeChange(e2, value.DocCfgID);
                        },
                        onCollapse: (e2) => {
                          detailsInDetailsSizeChange(e2, value.DocCfgID);
                        },
                        hideSplitter: parentData === void 0,
                        onResizeEnd: (e2) => {
                          detailsInDetailsSizeChange(e2, value.DocCfgID);
                        },
                        sizeSecondary: parentData === void 0 ? "0" : DetailsSplittersSizes && DetailsSplittersSizes[value.DocCfgID] ? DetailsSplittersSizes[value.DocCfgID] + "px" : "112px",
                        defaultCollapsed: false,
                        primaryIndex: 1,
                        blockResize: false,
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Grid$1,
                            {
                              id: `subDetailsGrid${value.DocCfgID}`,
                              item: true,
                              container: true,
                              direction: "row",
                              justifyContent: "flex-start",
                              alignItems: "center",
                              style: {
                                width: "0px",
                                height: "100%",
                                overflow: "hidden",
                                display: "none",
                                position: "relative"
                              }
                            }
                          ),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            "div",
                            {
                              id: `gridpanel${value.DocCfgID}`,
                              rcsgrid_panel: "",
                              onFocus: onFocusChange,
                              tabIndex: "0",
                              style: {
                                width: "100%",
                                height: "100%",
                                overflow: "hidden",
                                position: "relative"
                              }
                            }
                          )
                        ]
                      }
                    )
                  }
                )
              },
              "DetailsDocuments" + value.DocCfgID
            )
          );
          returnJsx.push(
            TabItemsDetails(
              value,
              {
                DocCfgID: `${DataFromParent.DocCfgID === void 0 ? "" : DataFromParent.DocCfgID + ","}` + value.DocCfgID,
                Name: `${DataFromParent.Name === void 0 ? "" : DataFromParent.Name + ","}` + value.Name
              },
              DetailsSplittersSizes
            )
          );
        }
      }
      return returnJsx;
    }
  }
  function onResizeEnd() {
    clearTimeout(timeoutUpdateGrid.current);
    timeoutUpdateGrid.current = setTimeout(() => {
      TestUpdateGrid();
    }, 1);
  }
  function onCollapse() {
    if (DocumentLayout !== void 0 && DocumentLayout.HasTree === "1" && DocumentLayout.ForceUpdates === "1") {
      parentIDStorage.current.needUpdt = false;
      refreshMainGrid({ DocCfgID: props.DocCfgID, ParentID: "0" });
    }
    onResizeEnd();
  }
  function onExpand() {
    if (DocumentLayout !== void 0 && DocumentLayout.HasTree === "1" && DocumentLayout.ForceUpdates === "1") {
      parentIDStorage.current.needUpdt = true;
      refreshMainGrid({
        DocCfgID: props.DocCfgID,
        ParentID: parentIDStorage.current.id
      });
    }
    onResizeEnd();
  }
  function onFocusChange(e2) {
    if (e2.currentTarget.grid && focusedGridRef.current !== e2.currentTarget) {
      focusedGridRef.current = e2.currentTarget;
      FooterMultiOrData(e2.currentTarget.grid);
    }
  }
  function detailsInDetailsSizeChange(block, doccfgid) {
    const grids = block.querySelectorAll(".grid-panel");
    if (block.firstChild.offsetWidth !== 112) {
      const maingridDetails = MainGridRef.current.grid.getActiveSource().details;
      MainGridRef.current.grid.getActiveSource().details = {
        ...maingridDetails,
        DetailsSplittersSizes: {
          ...maingridDetails.DetailsSplittersSizes,
          [doccfgid]: block.firstChild.offsetWidth
        }
      };
    }
    for (const detailsGrid of Object.values(grids)) {
      if (detailsGrid && detailsGrid.grid) {
        if (detailsGrid.grid.detailsInDetail) {
          detailsGrid.grid.header.firstChild.field.width = detailsGrid.offsetWidth - 2;
        }
        detailsGrid.grid.updateGridSize();
      }
    }
  }
  async function UpdDetails(tabIndex, DocumentLayoutDetails2) {
    if (DocumentLayout !== void 0 && !isEmptyObject(DocumentLayout.Details) && !isEmptyObject(DocumentLayoutDetails2)) {
      const selectedIndex = Number(TabsRef.current.nativeElement.getAttribute("selected-index"));
      const CurrentTabContent = TabsRef.current.nativeElement.getTabContent(selectedIndex);
      if (!CurrentTabContent) return;
      CurrentTabContent.DocumentLayoutDetails = DocumentLayoutDetails2;
      const ParentDocCfgID = CurrentTabContent.parentElement.parentDocCfgID;
      const DetailsDocCfgID = CurrentTabContent.parentElement.docCfgID;
      const ParentName = CurrentTabContent.parentElement.parentName;
      const GridDetailsBlock = me.current.querySelector(
        //получаем для отчиски и отрисовки загрузки
        "#gridpanel" + DetailsDocCfgID
      );
      const textField = CurrentTabContent.parentElement.textField;
      updAllShortsCut(DocumentLayoutDetails2, DetailsDocCfgID);
      if (GridDetailsBlock) {
        if (textField !== null && ParentDocCfgID === void 0) {
          let TextFeildComponent;
          if (textField === "{03338F11-FC1E-11D4-A605-0000E8D9CBDB}" || textField === "{48C155C0-1336-11D6-9CF2-DB1D5BC3046D}" || textField === "{80ED365B-C3E6-4F76-BB19-6BC22687852B}") {
            const idForDocument = Number(props.id) + Number(DetailsDocCfgID) * 1e4;
            const infoAboutDoc = await handlePage({
              DocID: await MainGridRef.current.grid.getActiveSource().getFieldText("ID"),
              DocCfgID: DetailsDocCfgID,
              id: idForDocument
            });
            const TextFieldBlockDocuments = document.getElementById("Documents" + idForDocument);
            if (textField === "{80ED365B-C3E6-4F76-BB19-6BC22687852B}") {
              GridDetailsBlock.innerHTML = "";
              TextFeildComponent = await createChat({
                grid: MainGridRef.current.grid,
                docCfgId: DetailsDocCfgID
              });
            } else {
              if (!TextFieldBlockDocuments) {
                TextFeildComponent = CreateDocuments({
                  ...infoAboutDoc,
                  id: idForDocument,
                  grid: MainGridRef.current.grid
                });
              } else {
                await TextFieldBlockDocuments.grid.grid.refreshSource();
              }
            }
          } else {
            GridDetailsBlock.innerHTML = "";
            let textfieldcontent = await MainGridRef.current.grid.getActiveSource().getFieldText(textField + "_HTML");
            if (MainGridRef.current.grid.getActiveSource().findField(textField + "_HTML")) {
              textfieldcontent = await handlePage({
                DocID: MainGridRef.current.grid.getActiveSource().getFieldTextSync("ID"),
                fieldName: textField + "_HTML"
              });
              if (!textfieldcontent.content || isEmptyObject(textfieldcontent)) {
                textfieldcontent = MainGridRef.current.grid.getActiveSource().getFieldTextSync(textField);
                if (!textfieldcontent.content) {
                  textfieldcontent = await handlePage({
                    DocID: MainGridRef.current.grid.getActiveSource().getFieldTextSync("ID"),
                    fieldName: textField
                  });
                }
                if (textfieldcontent === void 0) {
                  textfieldcontent = "";
                }
              }
              TextFeildComponent = CreateHTMLEditor(
                textfieldcontent.content || textfieldcontent || "",
                MainGridRef.current.grid,
                textField + "_HTML"
              );
            } else {
              TextFeildComponent = await CreateTextField(MainGridRef.current.grid, textField);
            }
          }
          if (TextFeildComponent !== void 0) {
            GridDetailsBlock.appendChild(TextFeildComponent);
          }
          setLoadDetails(false);
        } else {
          await CreateDetails(GridDetailsBlock, {
            DocCfgID: DetailsDocCfgID,
            Columns: DocumentLayoutDetails2.Columns,
            ParentDocCfgID: ParentDocCfgID === void 0 ? "" : ParentDocCfgID + ",",
            ParentID: await MainGridRef.current.grid.getActiveSource().getFieldText("ID"),
            ParentGrid: MainGridRef.current.grid,
            ParentName: ParentName === void 0 ? "" : ParentName + ",",
            DocumentLayoutDetails: DocumentLayoutDetails2,
            textField,
            length: ParentDocCfgID === void 0 ? 0 : ParentDocCfgID.split(",").length
          });
        }
      }
    }
  }
  const printReport = () => {
    const reportTabs = document.getElementById(`ReportsTabs${props.DocCfgID}`);
    const frame = reportTabs.getSelectedContent().firstChild;
    if (frame.contentWindow) {
      frame.contentWindow.print();
    }
  };
  async function ControlButtonClick(e2) {
    const value = e2.currentTarget.getAttribute("value");
    switch (value) {
      case "RefreshFull":
        await ApplyButtonClick();
        break;
      case "print": {
        printReport();
        break;
      }
      case "append":
        if (samples.length === 0) {
          MainGridRef.current.grid.appendRecord();
        } else {
          handleClickAnchorEl(e2);
        }
        break;
      case "details":
        ChangeCollapsedDetails(!detailsBool);
        break;
      case "sign":
        const params2 = DocumentRequest({ command: "GetDocSignImage", details: true, wsm: true });
        AxiosRequest(true, params2).then(async (response) => {
          let data = response;
          if (response.Token !== "SignDialog" && response.Result === "1" && response.RCDATA) {
            const Notes = await MainGridRef.current.grid.getActiveSource().getRecordInfo();
            const utf8decoder = new TextDecoder("windows-1251");
            const arcdata = atob(response.RCDATA);
            const uint8 = Uint8Array.from(arcdata.split("").map((x) => x.charCodeAt()));
            const content2 = utf8decoder.decode(uint8);
            const ObjRef = MainGridRef.current.grid.getActiveSource().getFieldTextSync("ID");
            data = {
              Token: "SignDialog",
              Break: "1",
              content: content2,
              Params: {
                RCDATA: response.RCDATA,
                ObjType: props.DocCfgID,
                ObjRef,
                Token: "0",
                ID: ObjRef,
                Notes: Notes.title,
                Options: "1026"
              }
            };
          }
          tokenProcessingTest(data, {
            func: () => {
              refreshRecord();
            },
            from: "grid"
          });
        });
        break;
      case "Commit":
        CommitSaveOrCancelChanges(e2.currentTarget.getAttribute("command"));
        break;
      case "SaveRedactor":
        await redactor.postExicstedEditRec();
        if (props.setRedactor) {
          props.setRedactor(false);
        } else {
          setRedactor(false);
        }
        break;
      case "CancelRedactor":
        await redactor.cancelRecord();
        if (props.setRedactor) {
          props.setRedactor(false);
        } else {
          setRedactor(false);
        }
        await UpdDetails(selectedTabIndex, DocumentLayoutDetails);
        break;
      case "cardmode": {
        await MainGridRef.current.grid.Rotate();
        break;
      }
    }
  }
  function sampleMenuClick(e2) {
    const textContent = e2.currentTarget.textContent;
    setAnchorEl(null);
    if (textContent === "Новый документ") {
      MainGridRef.current.grid.appendRecord();
    } else {
      handleSamples("document", { Name: textContent }).then((res) => {
        if (res.Result) {
          AfterWSM(MainGridRef.current, { DocID: res.Result });
        }
      });
    }
  }
  async function handleSamples(command, sampleInfo) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents");
    params2.set("comand", "HandleSamples");
    params2.set("Command", command);
    params2.set("SectionID", props.id);
    params2.set("DocCfgID", props.DocCfgID);
    switch (command) {
      case "create": {
        params2.set("Name", sampleInfo.Name);
        params2.set("DocID", selectedRecordID);
        params2.set("AllUsers", sampleInfo.AllUsers);
        params2.set("All", sampleInfo.All);
        break;
      }
      case "delete": {
        params2.set("Name", sampleInfo.Name);
        params2.set("User", sampleInfo.User);
        params2.set("Section", sampleInfo.Section);
        break;
      }
      case "document": {
        params2.set("Name", sampleInfo.Name);
        break;
      }
    }
    const json = await AxiosRequest(true, params2);
    if (json.items) {
      setSamples(json.items);
    }
    return json;
  }
  async function CommitSaveOrCancelChanges(command) {
    let commandToDo = command === void 0 ? "CommitUpdates" : command;
    const id = await MainGridRef.current.grid.source.getFieldText("ID");
    await processCommitOrCancelUpdates({
      commandToDo,
      dcfgid: props.DocCfgID,
      parentID: 0,
      id: props.id
    });
    await MainGridRef.current.grid.refreshSource("!");
    for (const value of Object.values(TabsRef.current.nativeElement["_tabs"])) {
      await processCommitOrCancelUpdates({
        dcfgid: value.docCfgID,
        commandToDo,
        parentID: id,
        id: props.id
      });
      if (value.textField) {
        const idForDocument = Number(props.id) + Number(value.docCfgID) * 1e4;
        const TextFieldBlockDocuments = document.getElementById("Documents" + idForDocument);
        if (TextFieldBlockDocuments) {
          await TextFieldBlockDocuments.CommitSaveOrCancelChanges(commandToDo);
        }
      }
    }
    async function processCommitOrCancelUpdates(data = { dcfgid: props.DocCfgID, parentID: 0, id: props.id, commandToDo }) {
      const request = onHandleRequestDocuments(data.dcfgid, data.parentID ? data.parentID : "0", data.id, true);
      const otvet = await request({
        Command: data.commandToDo
      });
      if (otvet.Token) {
        tokenProcessingTest(otvet, { subData: afterWSMCommit, from: "grid" });
      }
    }
    function afterSave() {
      if (MainGridRef.current.grid && MainGridRef.current.grid.isCard()) {
        MainGridRef.current.grid.updateCard().then(() => {
          if (!detailsBool) {
            UpdDetails(selectedTabIndex, DocumentLayoutDetails);
          }
        });
      } else {
        if (!detailsBool) {
          UpdDetails(selectedTabIndex, DocumentLayoutDetails);
        }
      }
    }
    function afterWSMCommit(json) {
      if (json.Command === "CommitUpdates") ;
    }
    afterSave();
    if (MainGridRef.current.grid) MainGridRef.current.grid.changeIndicator(1);
  }
  async function selectViewOfPaperForm(event) {
    var _a2, _b;
    if (selectedView === "paper") {
      setSelectedView("doc");
      setSelectedViewIdent("");
      setControlButtons({ ...controlButtons, print: false, save: true });
      formidRef.current = null;
    } else {
      let forms2 = DocumentLayout.Forms || [];
      if (DocumentLayout.Handle === "1") {
        const params2 = DocumentRequest({ command: "GetMenuState", type: "forms" });
        const menuState = await AxiosRequest(true, params2);
        const hiddenItemsInfo = ((_b = (_a2 = menuState[0]) == null ? void 0 : _a2.Hidden) == null ? void 0 : _b.split(",")) || [];
        forms2 = forms2.filter(({ ID: id }) => !hiddenItemsInfo.includes(id));
        setFormsList(forms2);
        if (forms2.length === 0) return;
        if (forms2.length === 1) formidRef.current = forms2[0].ID;
      }
      if (forms2.length > 1) {
        handleClickAnchorEl(event);
      } else PaperForm(event);
    }
  }
  function PaperForm(event) {
    let params2 = DocumentRequest({ command: "GetDocumentForm", details: true, wsm: true });
    let formidlocal;
    if (formidRef.current !== null) formidlocal = formidRef.current;
    else if (event && event.currentTarget) {
      formidlocal = event.currentTarget.getAttribute("formid");
      formidRef.current = formidlocal;
    }
    params2.set("ID", formidlocal);
    if (MainGridRef.current.grid.getMultiSelect().length > 0) {
      CheckMultiSelect(MainGridRef.current.grid).then((selection) => {
        params2.set("Selection", selection);
        AfterSelection();
      });
    } else {
      AfterSelection();
    }
    function AfterSelection() {
      setAnchorEl(null);
      AxiosRequest(true, params2).then((resp) => {
        tokenProcessingTest(resp, { func: openForms });
      });
    }
  }
  function openForms(form) {
    let reportViewIdent = "";
    const commonViewIdent = form.ViewIdent;
    const selectedReportTabIndex = form.TabIndex;
    if (selectedReportTabIndex) {
      const selectedReportTab = form.Items.filter((tab, index2) => index2 === selectedReportTabIndex);
      reportViewIdent = selectedReportTab[0].ViewIdent;
    }
    setSelectedViewIdent(`${commonViewIdent}.${reportViewIdent}`);
    setSelectedView("paper");
    setControlButtons({ ...controlButtons, print: true, save: false });
    setPaperFormData(form);
  }
  const handleClickAnchorEl = (event) => {
    setAnchorEl(event.target instanceof HTMLButtonElement ? event.target : event.currentTarget);
  };
  const handleCloseAnchorEl = () => {
    setAnchorEl(null);
    setAnchorElButton(null);
  };
  async function ContextMenuHandler(data, gridRef) {
    const comand = data.value;
    const grid2 = gridRef.current ? gridRef.current : gridRef;
    switch (comand) {
      case "clearAllFilters": {
        grid2.grid.clearAllFilters();
        break;
      }
      case "ClearDocumentState":
        setDocumentLayout(void 0);
        grid2.grid.setFilterData({});
        ClearDocumentStatus("refresh");
        break;
      case "OnlyViewMode": {
        grid2.grid.ChangeViewMode();
        await updStateOfButtons();
        break;
      }
      case "RecordCopy":
        CreateRecordCopy(await grid2.grid.source.getFieldText("DocCfgID"), await CheckMultiSelect(grid2.grid)).then(
          async (res) => {
            await grid2.grid.refreshSource(res.ID);
            await UpdDetails(void 0, DocumentLayoutDetails);
          }
        );
        break;
      case "SaveRedactor":
        await redactor.postExicstedEditRec();
        if (props.setRedactor) {
          props.setRedactor(false);
        } else {
          setRedactor(false);
        }
        break;
      case "CancelRedactor":
        await redactor.cancelRecord();
        if (props.setRedactor) {
          props.setRedactor(false);
        } else {
          setRedactor(false);
        }
        UpdDetails(selectedTabIndex, DocumentLayoutDetails);
        break;
      case "Settings": {
        smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DocInfoAndSettings, { grid: grid2.grid }), {
          Title: "Документ",
          style: { height: `${430}px`, width: `${580}px` },
          hiddenButton: true,
          blockMaximize: true,
          onClose: () => {
            setLastFocus();
          }
        });
        break;
      }
      case "Details": {
        setDetailsBool(!detailsBool);
        break;
      }
      case "Samples": {
        handleSamples("list").then((res) => {
          smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(Samples, { request: handleSamples, list: res === void 0 ? [] : res }), {
            Title: "Новый шаблон",
            style: { height: `${430}px`, width: `${580}px` },
            hiddenButton: true,
            blockMaximize: true,
            blockResize: true,
            onClose: () => {
              setLastFocus();
            }
          });
        });
        break;
      }
      case "Numbering": {
        SequenceGetParams({
          Name: DocumentLayout.Sequence,
          GetNumMode: "1"
        }).then((res) => {
          smetaModals.open(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              DialogDocNumbering,
              {
                props: {
                  Sequence: DocumentLayout.Sequence,
                  Name: DocumentLayout.Name,
                  res
                }
              }
            ),
            {
              Title: "Нумерация",
              style: getStyleWindow("sequence"),
              onClose: () => {
                setLastFocus();
              }
            }
          );
        });
        break;
      }
      case "CopyDocLink": {
        let link = window.location.href;
        link += `&modal&parsed&docid=${selectedRecordID}&doccfgid=${props.DocCfgID}&card`;
        let lastloginDrx = localStorage.getItem("LastLogin");
        if (lastloginDrx) {
          lastloginDrx = lastloginDrx.split(",");
          if (lastloginDrx.length > 0) {
            link += `configname=${lastloginDrx[0]}`;
          }
        }
        try {
          navigator.clipboard.writeText(link);
        } catch {
          alert(link);
        }
        break;
      }
      case "PrintSelectedRecords": {
        CheckMultiSelect(grid2.grid).then((selection) => {
          let params2 = /* @__PURE__ */ new Map(), data2 = {}, sourceFields = grid2.grid.getActiveSource().fields;
          params2.set("prefix", "documents").set("comand", "HandleToolButton").set("ID", "-17").set("DocCfgID", grid2.grid.doccfgid).set("WSM", "1");
          const cols = getShowedCols(grid2.grid.columns.levels, sourceFields);
          for (const [key, value] of Object.entries(cols)) {
            data2[`field${Number(key) + 1}`] = value;
          }
          AxiosRequest(true, params2, {
            ...data2,
            $content: selection
          }).then((res) => {
            tokenProcessingTest(res);
          });
        });
        break;
      }
      default:
        if (data.ID) HandleToolButton({ currentTarget: { id: data.ID, doccfgid: data.doccfgid } }, grid2);
        if (data.Status) changeStatus(data.Status);
        break;
    }
  }
  function getShowedCols(data, sourceFields) {
    return data.reduce((result, item, index2) => {
      const field = item.field;
      if (field.hide === true) {
        return result;
      }
      if (item.expanded && item.items) {
        const nestedResult = getShowedCols(item.items, sourceFields);
        return result.concat(nestedResult);
      }
      const sourceField = getFieldFromData(sourceFields, field.fieldName)[0];
      result.push({ Заголовок: field.title, Ширина: field.width, ИмяПоля: sourceField.displayLabel });
      return result;
    }, []);
  }
  function getFieldFromData(data, fieldName) {
    return data.filter((val) => {
      if (val.fieldName === fieldName) {
        return val;
      }
    });
  }
  function DocumentRequest({
    command,
    details,
    type: type2,
    wsm = false,
    docCfgID = props.DocCfgID,
    grid: grid2 = MainGridRef.current.grid
  }) {
    let params2 = /* @__PURE__ */ new Map();
    const masterGrid = MainGridRef.current.grid;
    params2.set("prefix", "documents");
    params2.set("comand", command);
    params2.set("SectionID", props.id);
    params2.set("DocCfgID", docCfgID);
    params2.set("MasterID", masterGrid.getActiveSource().getFieldTextSync("ID"));
    params2.set("MasFld", masterGrid.getSelectedField());
    params2.set("PlaneView", masterGrid.isCard() ? 1 : 0);
    params2.set("DocID", grid2.getActiveSource().getFieldTextSync("ID"));
    if (!detailsBool && details) {
      params2.set("ActiveDetail", TabsRef.current.nativeElement.getTabContent(selectedTabIndex).parentElement.docCfgID);
      if (SubGridRef.current !== null) {
        params2.set("DetailID", SubGridRef.current.grid.getActiveSource().getFieldTextSync("ID"));
        params2.set("DetFld", SubGridRef.current.grid.getSelectedField());
      }
    }
    if (type2) params2.set("type", type2);
    if (wsm) params2.set("WSM", "1");
    return params2;
  }
  const handlePage = async (data, postData) => {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents");
    params2.set("comand", "HandlePage");
    params2.set("Type", data.type || "get");
    params2.set("DocID", data.DocID);
    if (data.fieldName) params2.set("fieldName", data.fieldName);
    params2.set("DocCfgID", data.DocCfgID || props.DocCfgID);
    params2.set("SectionID", data.id || props.id);
    let resp = await AxiosRequest(true, params2, postData);
    return !isEmptyObject(resp) ? resp : "";
  };
  function GetMenu(commands, layout) {
    const dataForMenu = {
      docCfgID: layout.grid.doccfgid,
      grid: layout.grid
    };
    let status, obj2, state, finalArr = [];
    status = commands.status ? GetMenuSt({ command: "GetStatusList", ...dataForMenu }) : [];
    state = commands.state ? GetMenuSt({ command: "GetMenuState", ...dataForMenu }) : [];
    if (layout.Tools && layout.Tools.Menu)
      finalArr = [...finalArr, ...layout.Tools.Menu];
    obj2 = {
      arr: finalArr,
      state,
      status: { Caption: "Статус документа", items: { ...status } }
    };
    if (!commands.status) {
      delete obj2.status;
    }
    return obj2;
  }
  function GetMenuSt(data) {
    const params2 = DocumentRequest(data);
    return XMLrequest(params2);
  }
  async function changeStatus(status) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents");
    params2.set("comand", "ChangeStatus");
    params2.set("Status", status);
    if (MainGridRef.current.grid.getMultiSelect().length > 0) {
      const selection = await CheckMultiSelect(MainGridRef.current.grid);
      params2.set("DocID", selection);
    } else {
      params2.set("DocID", MainGridRef.current.grid.getActiveSource().getFieldTextSync("ID"));
    }
    params2.set("DocCfgID", props.DocCfgID);
    params2.set("SectionID", props.id);
    params2.set("WSM", "1");
    if (MainGridRef.current.grid.getActiveSource().isEditMode()) {
      await MainGridRef.current.grid.postExicstedEditRec();
    }
    const statusResp = await AxiosRequest(true, params2);
    tokenProcessingTest(statusResp, {
      func: HandleStatusChange,
      from: "grid"
    });
  }
  async function HandleStatusChange(json) {
    if (json.Result === "1") {
      MainGridRef.current.grid.refreshSource("!");
      if (MainGridRef.current && MainGridRef.current.grid && MainGridRef.current.grid.source.details && MainGridRef.current.grid.source.details.detailsBool === false || !detailsBool) {
        const selectedIndex = Number(TabsRef.current.nativeElement.getAttribute("selected-index"));
        const CurrentTabContent = TabsRef.current.nativeElement.getTabContent(selectedIndex);
        if (!CurrentTabContent) return;
        await UpdDetails(selectedIndex, CurrentTabContent.DocumentLayoutDetails);
      }
    }
    await MainGridRef.current.grid.getActiveSource().getFieldText("ID");
    setCanModifyObj({
      delete: !await MainGridRef.current.grid.canModify(2, void 0, MainGridRef.current.grid),
      insert: !await MainGridRef.current.grid.canModify(0, void 0, MainGridRef.current.grid)
    });
  }
  const showParams = (data) => {
    if (data) {
      if (data.Params === void 0 || data.Params.Items === void 0) {
        return false;
      }
      if (data.Params.Items.length === 0) {
        return false;
      }
      if (data.Params.Items.length === 1 && data.Params.Items[0].JSONType !== void 0) {
        return false;
      }
      if (data.HasTree === "1") return false;
    }
    return true;
  };
  const handlePaste = async function(e2) {
    const gridPanel = e2.target.closest(".grid-panel");
    if (!gridPanel.grid) return;
    const grid2 = gridPanel.grid;
    e2.stopPropagation();
    if (grid2.editorMode()) return;
    const items = (e2.clipboardData || window.clipboardData).items;
    const files = [];
    for (const item of items) {
      if (item.kind === "file") {
        const file = item.getAsFile();
        files.push(file);
      }
    }
    if (files.length === 0) return;
    e2.preventDefault();
    e2.stopPropagation();
    if (files.length > 0) {
      const filesNames = files.map((file) => file.name);
      const filesData = await Promise.all(files.map((file) => getBase64ByFileReader(file)));
      const finalData = filesData.reduce(
        (acc, fileData, index2) => ({
          ...acc,
          [files[index2].name]: {
            size: files[index2].size,
            rcdata: fileData.rcdata,
            name: files[index2].name
          }
        }),
        {}
      );
      attachFiles(filesNames, grid2, finalData);
    }
  };
  const handleDrop = async function(e2) {
    const grid2 = e2.target.closest(".grid-panel").grid;
    e2.stopPropagation();
    e2.preventDefault();
    if (e2.dataTransfer.files && e2.dataTransfer.files[0]) {
      const files = Array.from(e2.dataTransfer.files);
      const filesNames = files.map((file) => file.name);
      const filesData = await Promise.all(files.map((file) => getBase64ByFileReader(file)));
      const finalData = filesData.reduce(
        (acc, fileData, index2) => ({
          ...acc,
          [files[index2].name]: {
            size: files[index2].size,
            rcdata: fileData.rcdata,
            name: files[index2].name
          }
        }),
        {}
      );
      attachFiles(filesNames, grid2, finalData);
    }
  };
  function attachFiles(filesNames, grid2, dataOfFiles) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents").set("comand", "AttachFiles").set("DocCfgID", grid2.doccfgid === "0" ? props.DocCfgID : grid2.doccfgid).set("SectionID", props.id).set("DocID", grid2.getActiveSource().getFieldTextSync("ID") || 0).set("WSM", "1");
    if (grid2.getActiveSource().Master && grid2.getActiveSource().Master.MasterID) {
      params2.set("MasterID", grid2.getActiveSource().Master.MasterID);
    }
    AxiosRequest(true, params2, { Files: filesNames }).then((answer) => {
      tokenProcessingTest(answer, {
        from: "grid",
        func: () => {
          AfterWSM(MainGridRef.current, {});
        },
        props: {
          files: dataOfFiles
        }
      });
    });
  }
  const handleDrag = function(e2) {
    e2.preventDefault();
    e2.stopPropagation();
  };
  const saveChanges = async () => {
    if (!!redactorRef.current) {
      await redactorRef.current.postExicstedEditRec();
      if (props.setRedactor) {
        props.setRedactor(false);
      } else {
        setRedactor(false);
      }
    }
    await CommitSaveOrCancelChanges();
  };
  const handleKeyS = async (e2) => {
    if (e2.ctrlKey && !isEmptyObject(saveDocs.current) && !isEmptyObject(saveDocs.current[props.DocCfgID]) || redactorRef.current && e2.ctrlKey) {
      e2.preventDefault();
      await saveChanges();
    } else {
      e2.stopPropagation();
    }
  };
  const onKeyDown = async (e2) => {
    const countOfModals = CheckModalBackGrounds();
    if (countOfModals > 0 && !e2.currentTarget.closest(".smart-window")) {
      e2.stopPropagation();
      return;
    }
    switch (e2.code) {
      case "KeyS": {
        await handleKeyS(e2);
        break;
      }
      case "KeyD":
        if (e2.ctrlKey) {
          e2.preventDefault();
          const activeElement = document.activeElement;
          activeElement.blur();
          setTimeout(() => {
            applyButton.current.click();
            if (activeElement && activeElement.tagName === "INPUT") {
              activeElement.focus();
              activeElement.select();
            }
          }, 100);
        } else {
          e2.stopPropagation();
        }
        break;
      case "Enter": {
        if (e2.shiftKey && MainGridRef.current) {
          e2.preventDefault();
          ContextMenuHandler({ value: "Settings" }, MainGridRef.current);
        } else {
          e2.stopPropagation();
        }
        break;
      }
      case "Tab": {
        if (e2.ctrlKey === false && e2.shiftKey === false) {
          e2.preventDefault();
        }
        break;
      }
      default:
        if (checkShortCuts(e2)) {
          e2.preventDefault();
        } else {
          e2.stopPropagation();
        }
    }
  };
  function setLastFocus() {
    focusedGridRef.current.focus();
  }
  function checkShortCuts(e2) {
    if (!isEmptyObject(shortsCutsData)) {
      let keyArr = [];
      if (e2.ctrlKey) {
        keyArr.push(17);
      } else if (e2.shiftKey) ;
      keyArr.push(e2.keyCode);
      if (shortsCutsData.hasOwnProperty(keyArr)) {
        e2.preventDefault();
        const shortCutElem = shortsCutsData[keyArr];
        if (shortCutElem && shortCutElem.ID) {
          const grid2 = shortCutElem.localdoccfgid === props.DocCfgID ? MainGridRef.current : me.current.querySelector("gridpanel" + shortCutElem.localdoccfgid);
          HandleToolButton(
            {
              currentTarget: {
                id: shortCutElem.ID,
                doccfgid: shortCutElem.localdoccfgid
              }
            },
            grid2
          );
          return true;
        } else return false;
      } else return false;
    } else return false;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "contents" }, tabIndex: "-1", onKeyDown, ref: me, id: "Documents" + props.id, children: [
    portal,
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { style: { height: "100%" }, container: true, direction: "column", justifyContent: "flex-start", alignItems: "flex-start", children: [
      props.SectionToolsJS === true && /* @__PURE__ */ jsxRuntimeExports.jsx(SectionToolsJS, { ID: props.id }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(
        SplitterLocal,
        {
          splitterRef: leftSplitterRef,
          style: {
            width: "100%",
            borderTop: "1px solid rgb(208, 208, 208)",
            flex: "1 1"
          },
          orientation: "vertical",
          onExpand,
          onCollapse,
          onResizeEnd,
          sizeSecondary: "20%",
          defaultCollapsed: props.collapsedParams !== void 0 ? props.collapsedParams : false,
          primaryIndex: 1,
          blockResize: false,
          children: [
            !props.HideParams && showParams(DocumentLayout) ? /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: "item_Param_" + props.id, style: { height: "100%" }, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  style: {
                    height: `calc(100% - 37px)`
                    // overflow: "auto",
                  },
                  id: "ParamsDoc" + props.id,
                  children: ReturnParams(DocumentLayout)
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Button$2,
                {
                  id: "applyButton",
                  ref: applyButton,
                  style: {
                    marginBottom: "3px",
                    marginTop: "3px",
                    width: "126px",
                    height: 28,
                    textTransform: "none",
                    marginLeft: "6px"
                  },
                  variant: "outlined",
                  onClick: ApplyButtonClick,
                  className: cn("buttonStimate", {
                    light: getTheme() === "light"
                  }),
                  children: "Применить"
                }
              )
            ] }) : null,
            DocumentLayout !== void 0 && DocumentLayout.HasTree === "1" ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "item_Param_" + props.id, style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                style: {
                  height: `100%`,
                  overflow: "auto"
                },
                id: "ParamsDoc" + props.id,
                children: tree
              }
            ) }) : null,
            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: "item_Grid_" + props.id, style: { height: "100%", width: "100%" }, children: [
              DocumentLayout === void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) : null,
              props.HideControlButtons ? null : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "32px", width: "calc(100% - 0px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  container: true,
                  direction: "row",
                  justifyContent: "flex-start",
                  alignItems: "center",
                  sx: { maxHeight: "36px" },
                  className: cn("backgroundColorStimate", {
                    light: getTheme() === "light"
                  }),
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, sx: { height: "32px", ml: 1, flex: 1 }, children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        ButtonsForGridComponent,
                        {
                          onClick: ControlButtonClick,
                          id: props.id,
                          grid: MainGridRef.current && MainGridRef.current.grid ? {
                            grid: MainGridRef.current.grid,
                            source: MainGridRef.current.grid.source
                          } : void 0,
                          theme: getTheme(),
                          save: save[props.DocCfgID],
                          redactor,
                          canModifyObj,
                          selectedRecord: selectedRecordID,
                          buttons: controlButtons,
                          buttonsState: controlButtonsState,
                          DisableDetails: DocumentLayout !== void 0 && isEmptyObject(DocumentLayout.Details)
                        }
                      ),
                      samples.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Menu,
                        {
                          anchorEl,
                          open: Boolean(anchorEl) && anchorEl.id === "appendButtonForGrid",
                          onClose: handleCloseAnchorEl,
                          MenuListProps: {
                            "aria-labelledby": "basic-button"
                          },
                          children: Boolean(anchorEl) && anchorEl.id === "appendButtonForGrid" ? MenuItems([...samples, { Caption: "-" }, { Name: "Новый документ" }], sampleMenuClick) : null
                        }
                      ) : null,
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Menu,
                        {
                          anchorEl: anchorElButton,
                          open: Boolean(anchorElButton),
                          onClose: handleCloseAnchorEl,
                          MenuListProps: {
                            "aria-labelledby": "basic-button"
                          },
                          children: DocumentLayout && DocumentLayout.Tools.Buttons && Boolean(anchorElButton) ? MenuItems(
                            DocumentLayout.Tools.Buttons[anchorElButton.getAttribute("index")].items,
                            HandleToolButton,
                            GetMenuSt({ command: "GetMenuState" }),
                            GetDisable,
                            {
                              doccfgid: props.doccfgid
                            }
                          ) : null
                        }
                      )
                    ] }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      SaveAsButton,
                      {
                        reportModule: paperFormData.Module,
                        ViewIdent: selectedViewIdent,
                        style: { display: selectedViewIdent ? "" : "none" }
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Grid$1,
                      {
                        item: true,
                        sx: { height: "100%", mr: 1, flex: "0 1 auto", display: "flex", justifyContent: "flex-end" },
                        children: DocumentLayout !== void 0 && DocumentLayout.Forms && DocumentLayout.Forms.length > 0 ? /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Button$2,
                            {
                              variant: "outlined",
                              onClick: selectViewOfPaperForm,
                              id: "FormsButton" + props.id,
                              formid: DocumentLayout.Forms[0].ID,
                              style: {
                                borderRadius: "15px",
                                height: "20px",
                                textTransform: "none"
                              },
                              className: cn("buttonStimate", {
                                light: getTheme() === "light"
                              }),
                              children: "Печатный вид"
                            }
                          ),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Menu,
                            {
                              anchorEl,
                              open: Boolean(anchorEl) && anchorEl.id === "FormsButton" + props.id,
                              onClose: handleCloseAnchorEl,
                              MenuListProps: {
                                "aria-labelledby": "basic-button"
                              },
                              children: formsList.length > 1 ? MenuItems(formsList, PaperForm, void 0, GetDisable, {
                                doccfgid: props.doccfgid
                              }) : null
                            }
                          )
                        ] }) : null
                      }
                    )
                  ]
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  style: {
                    height: `calc(100% - ${props.HideControlButtons ? "0px" : "32px"})`,
                    width: "calc(100% - 5px)",
                    display: selectedView === "paper" ? "" : "none"
                  },
                  id: "PaperFormDocuments" + props.id,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { overflow: "hidden", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    TabsForReports$1,
                    {
                      reportData: paperFormData,
                      ID: props.id,
                      onViewIdentChange: setSelectedViewIdent,
                      groupId: props.DocCfgID
                    }
                  ) })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                SplitterLocal,
                {
                  style: {
                    height: `calc(100% - ${props.HideControlButtons ? "0px" : "32px"})`,
                    width: "calc(100% - 5px)",
                    display: selectedView === "doc" || selectedView === "card" ? "" : "none"
                  },
                  orientation: "horizontal",
                  onExpand: () => {
                    ChangeCollapsedDetails(false);
                  },
                  onCollapse: () => {
                    ChangeCollapsedDetails(true);
                  },
                  onResizeEnd,
                  sizeSecondary: "40%",
                  collapsed: detailsBool,
                  id: "MainSplitterOfDocumentsGrid" + props.id,
                  blockResize: props.HideDetails,
                  hideSplitter: DocumentLayout !== void 0 && isEmptyObject(DocumentLayout.Details),
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "DocumentsSplitter" + props.id, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      ContextMenu,
                      {
                        for: "grid",
                        data: MenuJson,
                        onRightClick: (dataFromContextMenu) => {
                          return GetMenu(
                            {
                              state: true,
                              status: DocumentLayout !== void 0 && DocumentLayout.HasStatus === "1" ? true : false
                            },
                            { ...DocumentLayout, ...dataFromContextMenu }
                          );
                        },
                        onMenuItemClick: ContextMenuHandler,
                        docCfgID: props.DocCfgID,
                        id: props.id,
                        Details: props.HideControlButtons,
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, { bool: !loadMain }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            "div",
                            {
                              id: "gridpanel" + props.DocCfgID,
                              ref: MainGridRef,
                              onFocus: onFocusChange,
                              tabIndex: "0",
                              style: {
                                height: "100%",
                                width: "100%"
                              },
                              rcsgrid_panel: "",
                              onDragOver: handleDrag,
                              onDrop: handleDrop
                            }
                          )
                        ]
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "Details" + props.id, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%" }, onPaste: handlePaste, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      ContextMenu,
                      {
                        for: "grid",
                        onRightClick: (dataFromContextMenu) => {
                          return GetMenu({ state: true }, { ...DocumentLayoutDetails, ...dataFromContextMenu });
                        },
                        onMenuItemClick: ContextMenuHandler,
                        id: props.id,
                        data: {
                          Table: [
                            {
                              Caption: "Печать отмеченных записей",
                              value: "PrintSelectedRecords"
                            }
                          ]
                        },
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, { bool: !loadDetails }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Tabs,
                            {
                              scrollMode: "paging",
                              id: "tabsDocumentDetails" + props.id,
                              animation: "none",
                              ref: TabsRef,
                              tabPosition: "bottom",
                              style: {
                                position: "absolute",
                                borderBottom: "0px",
                                height: "100%",
                                width: "100%"
                              },
                              onChange: onTabChange,
                              children: tabs
                            },
                            "tabsDocumentDetails" + props.id
                          )
                        ]
                      }
                    ) }, "tabsDocumentDetailsDiv" + props.id) })
                  ]
                }
              )
            ] })
          ]
        }
      )
    ] })
  ] });
}
const SectionDocuments$2 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  SaveDocumentState,
  createGridStateString,
  default: SectionDocuments$1,
  getImageHint,
  parseGridState
}, Symbol.toStringTag, { value: "Module" }));
function DocumentsForTabs({ props }) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    SectionDocuments$1,
    {
      id: props.SectionID,
      DocCfgID: props.detailItem.DocCfgID ? props.detailItem.DocCfgID : props.detailItem.ObjType,
      ParentID: props.selectedRecordID,
      HideParams: true,
      SectionToolsJS: false,
      PlaneView: "0",
      setRecorcCount: () => {
      },
      HideControlButtons: true,
      footerID: `footerData_${props.SectionID}`,
      noAutoFocus: true
    }
  ) });
}
function ParamsForTabs({ props }) {
  const [data, setData] = React.useState();
  React.useEffect(() => {
    if (props.onRequest) {
      props.onRequest(props).then((res) => {
        setData({ ...res, GroupID: props.selectedRecordID });
      });
    } else {
      setData({ ...props.data, GroupID: props.selectedRecordID });
    }
  }, []);
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%" }, children: data ? /* @__PURE__ */ jsxRuntimeExports.jsx(
    Params,
    {
      Module: props.Module,
      reqCommand: props.detailItem.Token,
      GroupID: props.selectedRecordID,
      Path: props.Path,
      data,
      NoHistory: true,
      NoTitle: true,
      NoClearState: true,
      NoSaveSample: true,
      noEdit: props.detailItem.noEdit
    }
  ) : /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) });
}
function TreeMultiCheckForTabs({ props }) {
  const [tree, setTree] = React.useState(null);
  const mainBlock = React.useRef();
  const treeRef = React.useRef();
  React.useEffect(() => {
    mainBlock.current.update = (id) => {
      if (treeRef.current) {
        treeRef.current.updateMultiCheckState(id);
      }
    };
  }, []);
  React.useEffect(() => {
    if (tree === null) {
      setTree(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Tree,
          {
            props: {
              MultiCheckSet: true,
              CheckSet: [1, 9, 11, 12],
              Module: "paytypes",
              ObjType: "2380",
              SectionID: props.SectionID,
              Info: props.selectedRecordID,
              UsedDate: "0",
              ObjRef: "0",
              ref: treeRef
            }
          }
        )
      );
    }
  }, [tree]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      id: "treeBox",
      ref: mainBlock,
      style: {
        display: "flex",
        width: "100%",
        height: "100%",
        justifyContent: "center",
        alignItems: "center"
      },
      children: tree
    }
  );
}
const defaultFieldInfo$1 = {
  options: getParamColumnsOptions(0),
  Values: []
};
function getPaytypesColumnsForSection(codeField) {
  let columns = {
    title: [
      {
        fieldName: "Code",
        title: "Код",
        width: codeField ? codeField.displayWidth * 15 : 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo$1 },
        collapseRecord: true
      },
      {
        fieldName: "Name",
        title: "Наименование",
        width: 300,
        level: 0,
        fieldInfo: { ...defaultFieldInfo$1 }
      },
      {
        fieldName: "ShortName",
        title: "Сокращение",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo$1, EditStyle: "64" }
      },
      {
        fieldName: "Title",
        title: "Заголовок",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo$1 }
      },
      {
        fieldName: "ShortCode",
        title: "Короткий код",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo$1 }
      },
      {
        fieldName: "ImageIndex",
        title: "Рисунок",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo$1, EditStyle: "8", type: "Image" }
      },
      {
        fieldName: "Параметры",
        title: "Набор параметров",
        width: 120,
        level: 0,
        fieldInfo: {
          ...defaultFieldInfo$1,
          EditStyle: "16",
          DataType: "2789",
          Module: "Params"
        }
      },
      {
        fieldName: "Атрибуты",
        title: "Атрибуты",
        width: 120,
        level: 0,
        fieldInfo: {
          ...defaultFieldInfo$1,
          EditStyle: "32",
          DataType: "2380",
          Module: "paytypes"
        }
      }
    ]
  };
  return columns;
}
const paytypesColumnsForPrograms = {
  title: [
    {
      fieldName: "Code2",
      title: "Вид оплаты",
      width: 120,
      level: 0,
      fieldInfo: {
        ...defaultFieldInfo$1,
        EditStyle: "17",
        Module: "paytypes",
        DataType: "2380"
      }
    },
    {
      fieldName: "ProgID",
      title: "Программа",
      width: 300,
      level: 0,
      fieldInfo: {
        ...defaultFieldInfo$1,
        EditStyle: "17",
        Module: "programs",
        DataType: "2001"
      }
    }
  ]
};
const paytypesSettingstColumns = {
  title: [
    {
      fieldName: "ID",
      title: "ID",
      width: 60,
      level: 0,
      hide: true,
      hideInGrid: true,
      hideInCard: true,
      fieldInfo: { ...defaultFieldInfo$1 }
    },
    {
      fieldName: "Code",
      title: "Код",
      width: 60,
      level: 0,
      fieldInfo: { ...defaultFieldInfo$1 }
    },
    {
      fieldName: "Name",
      title: "Наименование",
      width: 300,
      level: 0,
      fieldInfo: { ...defaultFieldInfo$1 }
    },
    {
      fieldName: "Deep",
      title: "Deep",
      width: 30,
      level: 0,
      fieldInfo: { ...defaultFieldInfo$1 }
    },
    {
      fieldName: "ImageIndex",
      title: "ImageIndex",
      width: 30,
      level: 0,
      fieldInfo: { ...defaultFieldInfo$1, type: "Image" }
    },
    {
      fieldName: "Options",
      title: "Параметры",
      width: 300,
      level: 0,
      fieldInfo: { ...defaultFieldInfo$1, EditStyle: "32", Values: [{ label: "Суммировать по сотрудникам", id: 1 }] }
    },
    {
      fieldName: "OnGetAmount",
      title: "Получить сумму",
      width: 120,
      level: 1,
      fieldInfo: { ...defaultFieldInfo$1, EditStyle: "17", Module: "Programs", DataType: "2001" }
    },
    {
      fieldName: "OnSetAmount",
      title: "Установить сумму",
      width: 120,
      level: 1,
      fieldInfo: { ...defaultFieldInfo$1, EditStyle: "17", Module: "Programs", DataType: "2001" }
    },
    {
      fieldName: "ParamSetID",
      title: "Раскладка",
      width: 120,
      level: 1,
      fieldInfo: { ...defaultFieldInfo$1, EditStyle: "16", Module: "Params", DataType: "2789" }
    }
  ]
};
async function paytypesGrid(grid, source, props, data) {
  source.onHandleRequest = HandleRequestForPaytypes(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  await source.open();
  const codeField = source.fields[source.getFieldIndex("Code")];
  let columns;
  if (data.Columns) {
    switch (data.Columns) {
      case "Section":
        columns = getPaytypesColumnsForSection(codeField);
        break;
      case "Programs":
        columns = paytypesColumnsForPrograms;
        break;
    }
  }
  if (data.json && data.json.Columns) {
    source.rights = getRightsData(data.json.Rights);
    columns = parseColumns(data.json, { inputColumns: columns });
    grid.setColumns(columns);
    source.rights = getRightsData(data.json.Rights);
  } else {
    grid.setColumns(columns);
    source.rights = getRightsData("-1");
  }
  grid.setImageFields(["ID"]);
  source.booksGetImage = (value, field) => {
    if (value < 0) return 3;
    if (source.getFieldTextSync("ShortName") !== "") return 2;
  };
  source.onRecordCollapsed = async function(event) {
    let RecordIndex;
    if (event.currentTarget !== void 0) {
      RecordIndex = event.currentTarget.getAttribute("recordindex");
    } else {
      RecordIndex = event;
    }
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "RecordCollapsed").set("SectionID", props.SectionID).set("ObjType", props.ObjType).set("RecordIndex", RecordIndex);
    await AxiosRequest(true, params2);
    await grid.refreshSource("!");
    if (data.setCountRecords) data.setCountRecords(source.recordCount);
    return;
  };
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldValueSync("Code"));
    };
  }
  await source.first();
  await grid.setSource(source);
  if (props.ID) {
    await grid.refreshSource(props.ID);
  }
  await grid.updateGridSize();
  if (data.setCountRecords) data.setCountRecords(source.recordCount);
  if (data.setSelectedRecord) {
    data.setSelectedRecord(source.getFieldValueSync("Code"));
  }
}
function HandleRequestForPaytypes(props) {
  return function onHandleRequest(request, loadCursor, wsm, subParams) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID);
    if (props.GroupID) params2.set("GroupID", props.GroupID);
    wsm && params2.set("WSM", "1");
    if (subParams) {
      const sParams = Object.entries(subParams);
      sParams.forEach(([key, value]) => {
        params2.set(key, value);
      });
    }
    return AxiosRequest(loadCursor !== void 0 ? loadCursor : true, params2, request);
  };
}
function PaytypesForTabs({ props }) {
  const [mainGrid, setMainGrid] = React.useState();
  const gridpanelRef = React.useRef();
  const box = React.useRef();
  React.useEffect(() => {
    GridLoader(
      gridpanelRef.current,
      {
        ...props,
        Module: "paytypes",
        ObjType: "2001",
        GroupID: props.selectedRecordID
      },
      {
        Columns: "Programs"
      }
    ).then((res) => {
      setMainGrid(res);
    });
  }, []);
  React.useEffect(() => {
    if (mainGrid) {
      box.current.update = update;
    }
  }, [mainGrid]);
  async function update(id) {
    if (mainGrid) {
      mainGrid.source.onHandleRequest = HandleRequestForPaytypes({
        ...props,
        Module: "paytypes",
        ObjType: "2001",
        GroupID: id
      });
      await mainGrid.grid.setSource(mainGrid.source);
      await mainGrid.grid.refreshSource();
      await mainGrid.grid.updateGridSize();
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      ref: box,
      id: "paytypesBox",
      style: {
        display: "flex",
        width: "100%",
        height: "100%",
        justifyContent: "center",
        alignItems: "center"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          id: `rcgrid_panel`,
          ref: gridpanelRef,
          style: {
            height: "100%",
            width: "100%",
            position: "relative"
          }
        }
      )
    }
  );
}
function PaytypesLinksForTabs({ props }) {
  const gridPanelRef = React.useRef();
  const [records, setRecords] = React.useState();
  const [mainGrid, setMainGrid] = React.useState();
  const box = React.useRef();
  React.useEffect(() => {
    box.current.update = update;
    if (props.onRequest) {
      props.onRequest().then((res) => {
        if (res && res.items) setRecords(res.items);
      });
    }
  }, []);
  React.useEffect(() => {
    if (records) {
      if (mainGrid === void 0) {
        mainGridLoader();
      } else {
        mainGridLoader(true);
      }
    }
  }, [records]);
  async function mainGridLoader(refresh) {
    const res = await GridLoader(
      gridPanelRef.current,
      {},
      {
        localGrid: true,
        refresh,
        source: refresh ? mainGrid.source : void 0,
        Columns: getColumns(),
        defaultFields: getDefaultFields(),
        keyField: "Code",
        getRecords: () => records,
        recordKeys: ["Code", "Image", "Name"],
        titleKey: "Name"
      }
    );
    setMainGrid(res);
  }
  function getColumns() {
    return {
      title: [
        {
          fieldName: "Image",
          title: " ",
          width: 18,
          fieldInfo: { ...defaultFieldInfo, type: "Image" }
        },
        {
          fieldName: "Name",
          title: "Вид оплаты",
          width: document.body.getBoundingClientRect().width,
          fieldInfo: { ...defaultFieldInfo }
        }
      ]
    };
  }
  function getDefaultFields() {
    return [
      {
        Name: "Code",
        Title: "Code",
        Width: "7"
      },
      {
        Name: "Image",
        title: " ",
        width: "20",
        fieldInfo: { ...defaultFieldInfo, type: "Image" }
      },
      {
        Name: "Name",
        Title: "Вид оплаты",
        Width: "20"
      }
    ];
  }
  function update(id) {
    props.onRequest(id).then((res) => {
      if (res && res.items) {
        setRecords(res.items);
      } else setRecords([]);
    });
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      ref: box,
      id: "linksBox",
      style: {
        display: "flex",
        width: "100%",
        height: "100%",
        flexDirection: "column"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          id: `rcgrid_panel`,
          ref: gridPanelRef,
          style: {
            height: "100%",
            width: "100%",
            position: "relative"
          }
        }
      ) })
    }
  );
}
function PaytypesSearchForTabs({ props }) {
  const gridPanelRef = React.useRef();
  const [records, setRecords] = React.useState();
  const [mainGrid, setMainGrid] = React.useState();
  React.useEffect(() => {
    if (records) {
      if (mainGrid === void 0) {
        mainGridLoader();
      } else {
        mainGridLoader(true);
      }
    }
  }, [records]);
  async function mainGridLoader(refresh) {
    const res = await GridLoader(
      gridPanelRef.current,
      {},
      {
        localGrid: true,
        refresh,
        source: refresh ? mainGrid.source : void 0,
        Columns: getColumns(),
        defaultFields: getDefaultFields(),
        keyField: "ID",
        getRecords: () => records,
        recordKeys: ["ID", "Name"],
        titleKey: "Name"
      }
    );
    setMainGrid(res);
  }
  function getColumns() {
    return {
      title: [
        {
          fieldName: "Name",
          title: "Результаты поиска",
          width: document.body.getBoundingClientRect().width,
          fieldInfo: defaultFieldInfo
        }
      ]
    };
  }
  function getDefaultFields() {
    return [
      {
        Name: "ID",
        Title: "ID",
        Width: "7"
      },
      {
        Name: "Name",
        Title: "Результаты поиска",
        Width: "20"
      }
    ];
  }
  async function SearchPayTypes(data) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "paytypes").set("comand", "SearchPayTypes").set("Value", data.value);
    return AxiosRequest(true, params2);
  }
  async function onEditSearch(data) {
    const json = await SearchPayTypes(data);
    if (json && json.items) setRecords(json.items);
  }
  function onDoubleClick() {
    if (props.onSearch) props.onSearch(mainGrid.source.getFieldTextSync("ID"));
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    "div",
    {
      style: {
        display: "flex",
        width: "100%",
        height: "100%",
        flexDirection: "column"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          "div",
          {
            style: {
              width: "100%",
              height: "27px",
              border: "1px solid #cccccc",
              boxShadow: "0px 3px 5px #cccccc",
              display: "flex",
              flexDirection: "row"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(SearchOutlinedIcon, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { placeholder: "Поиск по видам начислений", onEdit: onEditSearch })
            ]
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx("div", { onDoubleClick, style: { height: "calc(100% - 27px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          "div",
          {
            id: `rcgrid_panel`,
            ref: gridPanelRef,
            style: {
              height: "100%",
              width: "100%",
              position: "relative"
            }
          }
        ) })
      ]
    }
  );
}
function getDetailContent(selector, props, data) {
  const properties2 = { ...props, ...data };
  const returnComponent = {
    accounts: /* @__PURE__ */ jsxRuntimeExports.jsx(AcoountsTableForTabs, { props: properties2 }),
    documents: /* @__PURE__ */ jsxRuntimeExports.jsx(DocumentsForTabs, { props: properties2 }),
    params: /* @__PURE__ */ jsxRuntimeExports.jsx(ParamsForTabs, { props: properties2 }),
    addressParams: /* @__PURE__ */ jsxRuntimeExports.jsx(AddressForTabs, { props: properties2 }),
    clsbook: /* @__PURE__ */ jsxRuntimeExports.jsx(ClsBookTableForTabs, { props: properties2 }),
    treeMultiCheck: /* @__PURE__ */ jsxRuntimeExports.jsx(TreeMultiCheckForTabs, { props: properties2 }),
    paytypesSearch: /* @__PURE__ */ jsxRuntimeExports.jsx(PaytypesSearchForTabs, { props: properties2 }),
    links: /* @__PURE__ */ jsxRuntimeExports.jsx(PaytypesLinksForTabs, { props: properties2 }),
    paytypes: /* @__PURE__ */ jsxRuntimeExports.jsx(PaytypesForTabs, { props: properties2 })
  };
  return returnComponent[selector];
}
function updateTabContentFunc(data) {
  switch (data.selector) {
    case "params":
      data.onRequest(data).then((res) => {
        const parambox = data.element.querySelector("#paramsBox");
        if (parambox && parambox.update) {
          parambox.update(res);
        }
      });
      break;
    case "addressParams":
      data.onRequest(data).then((res) => {
        const parambox = data.element.querySelector("#paramsBox");
        parambox.update(getParamsObject(res, data.selectedRecordID, res.Caption, data.Module));
      });
      break;
    case "documents":
      const docDiv = data.element.querySelector(`#Documents${data.SectionID}`);
      if (docDiv && docDiv.refreshMainGrid) {
        docDiv.refreshMainGrid({
          DocCfgID: data.detailItem.DocCfgID ? data.detailItem.DocCfgID : data.detailItem.ObjType,
          ParentID: data.selectedRecordID
        });
      }
      break;
    case "accounts":
      const accBox = data.element.querySelector(`#accBox`);
      if (accBox && accBox.refreshMainGrid) {
        accBox.refreshMainGrid({
          ObjType: data.detailItem.ObjType ? data.detailItem.ObjType : data.detailItem.Params.ObjType,
          GroupID: data.selectedRecordID
        });
      }
      break;
    case "clsbook":
      const clsbookBox = data.element.querySelector(`#clsBookBox`);
      if (clsbookBox && clsbookBox.refreshMainGrid) {
        clsbookBox.refreshMainGrid({
          ObjType: data.detailItem.ObjType ? data.detailItem.ObjType : data.detailItem.Params.ObjType,
          GroupID: data.selectedRecordID
        });
      }
      break;
    case "treeMultiCheck":
      const treeBox = data.element.querySelector(`#treeBox`);
      if (treeBox && treeBox.update) {
        treeBox.update(data.selectedRecordID);
      }
      break;
    case "paytypesSearch":
      break;
    case "links":
      const linksBox = data.element.querySelector(`#linksBox`);
      if (linksBox && linksBox.update) {
        linksBox.update(data.selectedRecordID);
      }
      break;
    case "paytypes":
      const paytypesBox = data.element.querySelector(`#paytypesBox`);
      if (paytypesBox && paytypesBox.update) {
        paytypesBox.update(data.selectedRecordID);
      }
      break;
  }
}
function getLoadTab(Caption, index2) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    TabItem,
    {
      id: `LoadTab_${Caption}-${index2}`,
      style: {
        textTransform: "none",
        width: "100%",
        height: "100%",
        padding: "0px",
        display: "inline-block"
      },
      label: Caption,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: `item_${Caption}`, load: "true", style: { width: "100%", height: "100%", position: "relative" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) })
    },
    `TabItem_${Caption}-${index2}`
  );
}
function getFullTab(detailItem, content2, index2) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    TabItem,
    {
      id: `Tab_${detailItem.Caption}-${index2}`,
      style: {
        textTransform: "none",
        width: "100%",
        height: "100%",
        padding: "0px",
        display: "inline-block"
      },
      label: detailItem.Caption,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: `item_${detailItem.Caption}`, style: { width: "100%", height: "100%", position: "relative" }, children: content2 })
    },
    `TabItem_${detailItem.Caption}-${index2}`
  );
}
const getDialogParams = async (data) => {
  const params2 = /* @__PURE__ */ new Map([
    ["prefix", data.module],
    ["comand", "GetDialogParams"],
    ["ObjType", data.objType],
    ["ObjRef", data.objRef]
  ]);
  return AxiosRequest(true, params2);
};
async function saveCurrentGrid(props, gridObject, groupID, setSelectedRecordID, mainSources, ObjRef) {
  const json = await PostHandleTable$2(props.Module, "0", groupID, props.SectionID);
  if (json) {
    gridObject.source.rights = getRightsData(json.Rights);
  }
  let objType = json ? json.ObjType : props.ObjType;
  if (objType === void 0) objType = "2310";
  const columns = parseColumns(json);
  gridObject.grid.setColumns(columns);
  gridObject.source.onHandleRequest = handleTable$1({
    Module: props.Module,
    ObjType: objType,
    GroupID: groupID,
    selectedRecordID: ObjRef ? ObjRef : "0",
    SectionsID: props.SectionID
  });
  gridObject.source.onRecordIndexChanged = function(source) {
    const id = source.getFieldTextSync("ID");
    setSelectedRecordID(id);
  };
  gridObject.grid.setImageFields(["CloseDate", "ExternalKey"]);
  gridObject.source.booksGetImage = orgGetImage;
  await gridObject.grid.setSource(gridObject.source);
  await gridObject.grid.refreshSource(ObjRef ? ObjRef : "0");
  await gridObject.grid.updateGridSize();
  setSelectedRecordID(gridObject.source.getFieldTextSync("ID"));
  mainSources.set(groupID, {
    columns,
    ID: gridObject.source.getFieldTextSync("ID"),
    request: handleTable$1,
    objType
  });
}
function orgGetImage(value, field) {
  if (field === "CloseDate") {
    return value > 0 ? 154 : 0;
  }
  if (value > 0) {
    return 54;
  }
  if (value === "-1") {
    return 3;
  }
  return -value;
}
function DialogOrganizations({ props }) {
  const [mainGrid, setMainGrid] = React.useState(void 0);
  const [selectedRecordID, setSelectedRecordID] = React.useState();
  const [accSelectedRecordID, setAccSelectedRecordID] = React.useState();
  const [selectRecord, setSelectRecord] = React.useState();
  const [kladr, setKladr] = React.useState();
  const [countRecords, setCountRecords] = React.useState("0");
  const gridPanel = React.useRef();
  const tabsPanel = React.useRef();
  const [groupID, setGroupID] = React.useState(props.NodeID ? props.NodeID : "0");
  const [searchResult, setSearchResult] = React.useState();
  const mainSources = React.useRef(/* @__PURE__ */ new Map());
  const detailValues = React.useRef();
  const subGridPanelRef = React.useRef();
  const needUpdateMainGrid = React.useRef();
  const [tabs, setTabs] = React.useState();
  const [needUpdate, setNeedUpdate] = React.useState(false);
  const [groupIDChange, setGroupIDChange] = React.useState(false);
  const [timer2, setTimer] = React.useState(null);
  const [tree, setTree] = React.useState(void 0);
  const treeRef = React.useRef();
  React.useEffect(() => {
    async function getKladr() {
      const json = await GetAddressUseKladr();
      json.service === "1" ? setKladr(true) : setKladr(false);
    }
    setTree(null);
    getKladr();
  }, []);
  React.useEffect(() => {
    if (tree === null) {
      setTree(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Tree,
          {
            props: {
              ref: treeRef,
              CLSID: props.CLSID,
              ObjType: props.ObjType,
              SectionID: props.SectionID,
              Module: props.Module,
              Current: groupID,
              ObjRef: groupID,
              selectID: setGroupID,
              UsedDate: "0",
              Info: "0",
              Internal: "0"
            }
          }
        )
      );
      return;
    }
    if (groupID && tree) {
      setMainGridLoader();
    }
    if (groupID === "0") {
      treeRequest("organizations", props.ObjType, props.SectionID).then((res) => {
        setGroupID(res.Current);
      });
    }
  }, [tree]);
  React.useLayoutEffect(() => {
    if (mainGrid) {
      saveCurrentGrid(
        props,
        mainGrid,
        groupID,
        setSelectedRecordID,
        mainSources.current,
        selectedRecordID ? selectedRecordID : props.ObjRef ? props.ObjRef : "0"
      ).then(async () => {
        setTabs(await getTabs(groupID));
        setTimeout(() => {
          setNeedUpdate(true);
        });
        setCountRecords(mainGrid.source.recordCount);
      });
    }
  }, [mainGrid]);
  React.useLayoutEffect(() => {
    if (groupID && groupID !== "0") {
      setMainSource().then(() => {
        if (mainGrid) setCountRecords(mainGrid.source.recordCount);
      });
    }
    if (mainSources.current.get(groupID)) {
      setSelectedRecordID(mainGrid.source.getFieldTextSync("ID"));
    }
    if (needUpdateMainGrid.current) {
      mainGrid.grid.refreshSource(needUpdateMainGrid.current);
      needUpdateMainGrid.current = void 0;
    }
    setGroupIDChange(true);
  }, [groupID]);
  React.useLayoutEffect(() => {
    if (mainGrid !== void 0 && mainSources.current.get(groupID)) {
      mainSources.current.get(groupID).ID = selectedRecordID;
    }
    if (mainGrid !== void 0) {
      const tabID = tabsPanel.current.selectedIndex;
      updateTab(tabID, tabs);
    }
  }, [selectedRecordID]);
  React.useLayoutEffect(() => {
    if (mainGrid && searchResult) {
      const id = GetDialogParamsForSearch(props.Module, props.ObjType, searchResult).NodeID;
      if (id === groupID) {
        findSearchRecordFromTable();
      } else {
        setTree(null);
        setGroupID(id);
      }
    }
  }, [searchResult]);
  React.useLayoutEffect(() => {
    if (needUpdate) {
      updateTab(tabsPanel.current.selectedIndex, tabs);
      setNeedUpdate(false);
    }
  }, [needUpdate]);
  async function findSearchRecordFromTable() {
    mainGrid.grid.refreshSource(searchResult);
    setSelectedRecordID(searchResult);
    setSearchResult(void 0);
  }
  async function findSelectRecordFromTable() {
    await mainGrid.grid.refreshSource(selectRecord.ID);
    setSelectedRecordID(selectRecord.ID);
    setSelectRecord(void 0);
  }
  async function setMainSource() {
    if (mainGrid && mainSources.current.get(groupID) === void 0) {
      await saveCurrentGrid(props, mainGrid, groupID, setSelectedRecordID, mainSources.current);
    } else if (mainGrid) {
      const mainSource = mainSources.current.get(groupID);
      mainGrid.grid.setColumns(mainSource.columns);
      mainGrid.source.onHandleRequest = mainSource.request({
        Module: props.Module,
        ObjType: mainSource.objType,
        GroupID: groupID,
        selectedRecordID: mainSource.ID ? mainSource.ID : "0",
        SectionsID: props.SectionID
      });
      if (!(selectRecord || searchResult)) {
        await mainGrid.grid.refreshSource(mainSource.ID);
      }
      setSelectedRecordID(mainSource.ID);
      await mainGrid.grid.setSource(mainGrid.source);
      await mainGrid.grid.updateGridSize();
    }
    if (mainGrid) {
      if (searchResult) {
        await findSearchRecordFromTable();
        return;
      }
      if (selectRecord) {
        await findSelectRecordFromTable();
        return;
      }
    }
  }
  async function setMainGridLoader() {
    if (!mainGrid) {
      setMainGrid(
        await GridLoader(gridPanel.current, props, {
          main: true,
          GroupID: groupID,
          setSelectedRecord: setSelectedRecordID,
          selectedRecordID
        })
      );
    }
  }
  async function getTabs(groupID2) {
    const json = await GetTableLayout(props.Module, "0", groupID2, props.SectionID);
    let details = [];
    if (json && json.Details && json.Details.items) {
      details = json.Details.items.map((item) => {
        return getLoadTab2(item);
      });
      detailValues.current = json.Details.items;
    }
    const defaultTabs = getDefaultTabs();
    return [...details, ...defaultTabs];
  }
  function getDefaultTabs() {
    return [getLoadSearch()];
  }
  function getLoadSearch() {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: "LoadTab_Search",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          paddingBottom: "2px",
          display: "inline-block"
        },
        label: "Поиск",
        children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "item_Search", style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) })
      },
      "tabItem_Search"
    );
  }
  function getSearch() {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          paddingBottom: "2px",
          display: "inline-block"
        },
        label: "Поиск",
        children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "item_Search", style: { height: "100%", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Search$1, { GroupId: groupID, Module: props.Module, ObjType: props.ObjType, return: setSearchResult }) })
      },
      "tabItem_Search"
    );
  }
  function getLoadTab2(detailItem) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: `LoadTab_${detailItem.Caption}`,
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          paddingBottom: "2px",
          display: "inline-block"
        },
        label: detailItem.Caption,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          "div",
          {
            id: `item_${detailItem.Caption}`,
            load: "true",
            style: { width: "100%", height: "100%", position: "relative" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {})
          }
        )
      },
      `TabItem_${detailItem.Caption}`
    );
  }
  function getFullTab2(detailItem, content2) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: `Tab_${detailItem.Caption}`,
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          paddingBottom: "2px",
          display: "inline-block"
        },
        label: detailItem.Caption,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: `item_${detailItem.Caption}`, style: { width: "100%", height: "100%", position: "relative" }, children: content2 })
      },
      `TabItem_${detailItem.Caption}`
    );
  }
  function updateTabsContent(data, firstLoad) {
    if (firstLoad) {
      data.firstLoadFunc();
    } else {
      updateTabContentFunc(data);
    }
  }
  function getContentForTab(detail, index2) {
    switch (detail.Token) {
      case "HandleAccounts":
        return "accounts";
      case "HandleObjParams":
        return "documents";
      case "HandleParams":
        return "params";
      case "HandleAddress":
        return "addressParams";
      default:
        return "emptyTab";
    }
  }
  function getReqForContent(selector) {
    switch (selector) {
      case "params":
        return async (data) => {
          return handleParameters(data.Module, data.detailItem, data.selectedRecordID);
        };
      case "addressParams":
        return async (data) => {
          return handleParameters(data.Module, data.detailItem, data.selectedRecordID);
        };
    }
  }
  function updateTab(index2, tabs2) {
    if (index2 !== void 0 && tabs2) {
      clearTimeout(timer2);
      const newTimer = setTimeout(() => {
        if (tabs2[index2] && tabs2[index2].key === "tabItem_Search") {
          if (tabs2[index2].props.id === `LoadTab_Search`) {
            tabs2[index2] = getSearch();
            setTabs([...tabs2]);
            return;
          }
        }
        const detailItem = detailValues.current[index2];
        if (!detailItem) return;
        const selector = getContentForTab(detailItem);
        const blockTab = tabsPanel.current.nativeElement.getTabContent(index2);
        const firstLoad = blockTab.querySelector("div[load='true']");
        updateTabsContent(
          {
            Module: props.Module,
            subGridPanelRef,
            detailItem,
            selectedRecordID,
            index: index2,
            element: blockTab.ownerElement,
            selector,
            SectionID: props.SectionID,
            setAccSelectedRecordID,
            onRequest: getReqForContent(selector),
            firstLoadFunc: () => {
              const tabContent = getDetailContent(selector, props, {
                selectedRecordID,
                onRequest: getReqForContent(selector),
                setAccSelectedRecordID,
                detailItem,
                Module: props.Module,
                kladr,
                index: index2,
                element: blockTab.ownerElement,
                selector,
                SectionID: props.SectionID,
                subGridPanelRef
              });
              const tab = getFullTab2(detailValues.current[index2], tabContent);
              tabs2[index2] = tab;
              setTabs([...tabs2]);
            }
          },
          firstLoad
        );
      }, 100);
      setTimer(newTimer);
    }
  }
  async function getMainOrganization() {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "organizations").set("comand", "GetMainOrg");
    const json = await AxiosRequest(true, params2);
    if (groupID !== json.GroupID) {
      setSelectRecord({ GroupID: json.GroupID, ID: json.ID });
      setTree(null);
      setGroupID();
    } else {
      await mainGrid.grid.refreshSource(json.ID);
      await mainGrid.grid.updateGridSize();
      setSelectedRecordID(json.ID);
    }
  }
  async function onSelect() {
    var _a2;
    saveBookState(props.Module);
    const short = gridPanel.current.grid.source.getFieldTextSync("ShortName") !== "" ? `(${gridPanel.current.grid.source.getFieldTextSync("ShortName")})` : "";
    const full = gridPanel.current.grid.source.getFieldTextSync("FullName");
    const name = gridPanel.current.grid.source.getFieldTextSync("Name");
    let value = `${short} ${full}`;
    if (value === " ") {
      value = name;
    }
    if (props.onEdit && props.setValue && props.setInputValue) {
      props.onEdit({
        value: props.Selector === "Счета" ? (_a2 = subGridPanelRef.current) == null ? void 0 : _a2.grid.source.getFieldTextSync("Name") : value.trim(),
        tag: props.Selector === "Счета" ? accSelectedRecordID : selectedRecordID,
        name: props.Name,
        record: props.record,
        textchanged: "0",
        setValue: props.setValue,
        setInputValue: props.setInputValue,
        type: props.Module,
        requestId: props.RequestID,
        addInfo: props.addInfo
      });
      return;
    }
    if (props.RequestID) {
      await formEdit(
        "1",
        props.func,
        {
          Name: "ObjRef",
          Value: props.Selector === "Счета" ? accSelectedRecordID : selectedRecordID
        },
        props.RequestID,
        props.from
      );
    }
  }
  function BookContextMenuHandler(data) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "BookContextMenuHandler").set("ID", data.id).set("ObjRef", data.ObjRef).set("ObjType", data.ObjType).set("Selection", data.selection).set("WSM", "1");
    if (data.SectionID) params2.set("SectionID", data.SectionID);
    return AxiosRequest(true, params2);
  }
  async function getSelection2() {
    if (!mainGrid) return;
    if (mainGrid.grid.getMultiSelect().length !== 0) {
      return await CheckMultiSelect(mainGrid.grid, "ID", ",");
    }
  }
  const defaultContextClick = async (data) => {
    if (data.IDfix !== void 0) {
      const selection = await getSelection2();
      const json = await BookContextMenuHandler({
        id: data.IDfix,
        ObjRef: selectedRecordID,
        ObjType: mainSources.current.get(groupID).objType,
        selection
      });
      if (json.Token) {
        tokenProcessingTest(json, {
          func: () => mainGrid.grid.refreshSource(selectedRecordID)
        });
      } else await mainGrid.grid.refreshSource(selectedRecordID);
    }
    if (data.Caption === "Основная организация") getMainOrganization();
  };
  const contextMenuHandler = (data) => {
    var _a2;
    const comands = {
      ShowGroupID: showGroupID
    };
    ((_a2 = comands[data.value]) == null ? void 0 : _a2.call(comands, data)) || defaultContextClick(data);
  };
  const showGroupID = async (data) => {
    const index2 = selectedRecordID;
    const json = await getDialogParams({ module: props.Module, objType: props.ObjType, objRef: index2 });
    if (json && json.NodeID) {
      if (json.NodeID !== groupID) {
        needUpdateMainGrid.current = index2;
        await treeRef.current.selectGroupID(json.NodeID);
      } else {
        mainGrid.grid.refreshSource(index2);
        return;
      }
    }
  };
  const changeDataOfItem = (val) => {
    var _a2;
    const changeValue = {};
    return ((_a2 = changeValue[val.value]) == null ? void 0 : _a2.call(changeValue, val)) || val;
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    ContentOrganization,
    {
      props,
      data: {
        tabs,
        tree,
        tabsPanel,
        gridPanel,
        mainGrid,
        updateTab,
        getMainOrganization,
        countRecords,
        onSelect,
        mainMenuSelector: "organizations",
        mainMenuRequest: getBookContextMenu,
        ContextMenuHandler: contextMenuHandler,
        changeDataOfItem,
        objType: mainSources.current.get(groupID) ? mainSources.current.get(groupID).objType : props.ObjType,
        selectedRecordID: selectedRecordID ? selectedRecordID : "0"
      },
      buttons: {
        search: tabs && tabs.length ? tabs.length - 1 : 0,
        grouping: true,
        contragent: false,
        tree: true,
        detail: true
      }
    }
  ) });
}
const DialogOrganisations = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: DialogOrganizations,
  orgGetImage
}, Symbol.toStringTag, { value: "Module" }));
async function accountsGrid(grid, source, props, data) {
  let json = await postHandleTableAccounts(props.Module, data.ObjType, props.SectionID);
  source.onHandleRequest = handleTableAccounts(props.Module, data.ObjType, data.GroupID, props.SectionID);
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
  }
  grid.setImageFields(["CloseDate", "ExternalKey"]);
  source.orgGetImage = orgGetImage;
  await source.open();
  if (json) {
    source.rights = getRightsData(json.Rights);
    grid.setColumns(parseColumns(json));
  } else grid.defaultColumns = true;
  await source.refresh();
  await grid.setSource(source);
  data.setSelectedRecord && data.setSelectedRecord(await source.getFieldText("ID"));
  await grid.updateGridSize();
}
async function organizationsGrid(grid, source, props, data) {
}
async function dbviewGrid(grid, source, props, data) {
  source.onHandleRequest = handleRequest$8(props, data);
  await source.open();
  grid.defaultColumns = true;
  await grid.setSource(source);
  await grid.updateGridSize();
}
function handleRequest$8(props, data) {
  return (request) => {
    return smetaAxios.post("HandleTable", request, {
      prefix: props.Module,
      params: { ID: data.id, Refresh: request.command === "getFields" ? 1 : 0 },
      loadMask: true
    });
  };
}
async function kladrGrid(grid, source, props, data) {
  const json = await kladrtGetTable(props);
  source.onHandleRequest = handleRequest$7(props);
  source.caseSensitive = false;
  await source.open();
  if (json) {
    source.rights = getRightsData(json.Rights || "0");
    const columns = parseColumns(json);
    grid.setColumns(columns);
  } else grid.defaultColumns = true;
  await grid.setSource(source);
  await grid.refreshSource(props.RecordIndex);
  await grid.updateGridSize();
}
function handleRequest$7(props, data) {
  return (request) => {
    return smetaAxios.post("HandleTable", request, {
      prefix: Prefixes.kladr,
      params: { ObjType: props.ObjType, Code: props.Code },
      loadMask: true
    });
  };
}
const kladrtGetTable = (props) => {
  return smetaAxios.get("GetTableLayout", {
    prefix: Prefixes.kladr,
    params: { ObjType: props.ObjType, Code: props.Code },
    loadMask: true
  });
};
const reserveTabNumberHandler = (free, id) => {
  smetaAxios.get("ReserveTabNumber", {
    prefix: Prefixes.person,
    params: { Free: Number(free), ID: id },
    loadMask: true
  });
};
async function personsGrid(grid, source, props, data) {
  let reserveTabNumber = "";
  grid.CommitToSaveChanges = (data2) => {
    if (typeof data2 !== "boolean") {
      if (!data2.editorMode()) {
        reserveTabNumber = data2.source.getFieldValueSync("TabNum");
        reserveTabNumberHandler(false, reserveTabNumber);
      }
    } else if (reserveTabNumber) {
      reserveTabNumberHandler(true, reserveTabNumber);
      reserveTabNumber = "";
    }
  };
}
async function documentsGrid(grid, source, props, data) {
  if (data.sub) {
    const json = await PostHandleTableDoc(props.Module, data.DocCfgID, props.SectionID);
    if (json) {
      source.rights = getRightsData(json.Rights);
      const columns = parseColumns(json);
      if (columns) {
        grid.setColumns(columns);
      } else grid.defaultColumns = true;
    }
  }
  source.onHandleRequest = handleTableDoc(props.Module, data.DocCfgID, data.GroupID, props.SectionID);
  await source.open();
  if (data.ReturnRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.ReturnRecord(source2.getFieldTextSync("ID"));
    };
  }
  if (data.sub) await source.refresh();
  await grid.setSource(source);
  await grid.updateGridSize();
}
async function defaultGrid(grid, source, props, data) {
  source.onHandleRequest = HandleRequest$2(props);
  await source.open();
  grid.defaultColumns = true;
  await source.refresh();
  await grid.setSource(source);
  await grid.updateGridSize();
}
function HandleRequest$2(props, data) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID ? props.SectionID : getModalSectionID());
    return AxiosRequest(true, params2, request);
  };
}
async function accToolsGrid(grid, source, props, data) {
  let json = await PostHandleTable$2(props.Module, props.ObjType, void 0, props.SectionID);
  source.onHandleRequest = HandleRequest$1(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  await source.open();
  let columns = { title: [] };
  let dest;
  dest = {};
  dest.collapseRecord = true;
  dest.fieldName = "Name";
  dest.title = "Наименование операции";
  dest.width = 300;
  dest.level = 0;
  dest.fieldInfo = { ...defaultFieldInfo };
  columns.title.push(dest);
  if (json) {
    source.rights = getRightsData(json.Rights);
    columns = parseColumns(json, { inputColumns: columns });
    grid.setColumns(columns);
  } else grid.setColumns(columns);
  await grid.setSource(source);
  source.onRecordCollapsed = async function(event) {
    let RecordIndex;
    if (event.currentTarget !== void 0) {
      RecordIndex = event.currentTarget.getAttribute("recordindex");
    } else {
      RecordIndex = await event;
    }
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "RecordCollapsed").set("SectionID", props.SectionID).set("RecordIndex", RecordIndex);
    await AxiosRequest(true, params2);
    await grid.refreshSource("!");
  };
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
  if (props.ObjRef) await grid.refreshSource(props.ObjRef);
  await grid.updateGridSize();
}
function HandleRequest$1(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("SectionID", props.SectionID);
    return AxiosRequest(true, params2, request);
  };
}
async function certGrid(grid, source, props, data) {
  source.onHandleRequest = handleTable(props);
  await source.open();
  let json = await PostHandleTable$1(props);
  if (json) {
    source.rights = getRightsData(json.Rights);
    grid.setColumns(parseColumns(json));
  } else grid.defaultColumns = true;
  await grid.setSource(source);
  if (props.RecordIndex) await grid.refreshSource(props.RecordIndex);
  await grid.updateGridSize();
}
function handleTable(props) {
  return function(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "programs");
    params2.set("comand", "HandleTable");
    params2.set("Path", props.Path);
    params2.set("SectionID", props.SectionID);
    return AxiosRequest(true, params2, request);
  };
}
const PostHandleTable$1 = (props) => {
  const param = /* @__PURE__ */ new Map();
  param.set("prefix", "programs");
  param.set("comand", "GetTableLayout");
  param.set("Path", props.Path);
  param.set("SectionID", props.SectionID);
  return AxiosRequest(true, param);
};
async function localGrid(grid, source, props, data) {
  if (!grid || !source) return;
  const defaultFields2 = data.defaultFields ? data.defaultFields : [];
  const keyField = data.keyField ? data.keyField : "";
  const getRecords = data.getRecords;
  const recordKeys2 = data.recordKeys ? data.recordKeys : [];
  const titleKey = data.titleKey;
  if (data.Rights !== void 0) {
    source.rights = getRightsData(data.Rights);
  }
  if (data.showIndicator !== void 0) {
    grid.ShowIndicatorF(data.showIndicator);
  }
  source.onHandleRequest = handleRequest$6(props, {
    grid,
    source,
    defaultFields: defaultFields2,
    keyField,
    getRecords,
    recordKeys: recordKeys2,
    titleKey,
    getFieldText: data.getFieldText || (() => {
      console.warn("Нет функции на запрос текста");
      return {};
    }),
    checkFieldText: data.checkFieldText || (() => {
      console.warn("Нет функции на проверку введенного значения");
      return {};
    }),
    onPostRecord: data.onPostRecord || (() => {
      console.warn("Нет функции на изменение массива записей при редактировании");
    }),
    deleteRecord: data.deleteRecord || (() => {
      console.warn("Нет функции удаления из массива записей");
    }),
    createRecord: data.createRecord || (() => {
      console.warn("Нет функции создание записи");
    }),
    getRecordIndexRefresh: data.getRecordIndexRefresh || (() => {
      console.warn("Нет функции получения записи для обновления");
    })
  });
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
  if (data.refresh) {
    await source.close();
    await source.open();
    await source.first();
    await grid.refreshSource();
    await grid.setSource(data.source);
    await grid.updateGridSize();
    return { grid, source };
  }
  await source.open();
  if (data.Columns) {
    grid.setColumns(data.Columns);
  } else grid.defaultColumns = true;
  await grid.setSource(source);
  await grid.updateGridSize();
  return { grid, source };
}
function handleRequest$6(props, data) {
  return async function onHandleRequest(request) {
    const command = request.command ? request.command : request.Command;
    const records = data.getRecords ? await data.getRecords() : [];
    const recordCount = records.length;
    let RecordIndex = data.source.activeRecord;
    switch (command) {
      case "getFields":
        return getDefaultColumns(data.defaultFields, data.keyField, recordCount);
      case "getRecords":
        if (data.getRecords) {
          return getRecord(request.first, recordCount, records, data.recordKeys, data.titlekey);
        }
      case "GetFieldText":
        return await data.getFieldText(request, data);
      case "CheckFieldText":
        return await data.checkFieldText(request, data);
      case "PostRecord":
        const record = request.RecordSet.Records.Record;
        await data.onPostRecord(request, record["$Data"], data);
        const res = {
          Command: "PostRecord",
          RecordCount: records.length,
          UpdatesPending: "1",
          RecordSet: {
            Attributes: request.RecordSet.Attributes,
            Records: { Record: { Data: record["$Data"] } }
          }
        };
        return res;
      case "DeleteRecord":
        return await data.deleteRecord(request, data);
      case "CreateRecord":
        const dataRecords = await data.createRecord(request, data);
        return getRecord(
          dataRecords.index,
          dataRecords.records.count,
          dataRecords.records,
          dataRecords.keys,
          dataRecords.titleKey
        );
      case "refresh":
        const index2 = data.getRecordIndexRefresh(request.key);
        return {
          command: "refresh",
          RecordCount: recordCount,
          UpdatesPending: "1",
          RecordIndex: index2
        };
      case "GetRecordCount":
        if (recordCount !== data.source.recordCount && recordCount < RecordIndex + 1) RecordIndex = recordCount - 1;
        return {
          RecordIndex: Math.sign(RecordIndex) === -1 || RecordIndex === 0 ? 0 : RecordIndex,
          RecordCount: recordCount
        };
      default:
        return;
    }
  };
}
function getDefaultColumns(fields = [], keyField = "", count = "0") {
  return {
    Fields: fields,
    KeyFieldName: keyField,
    RecordCount: `${count}`,
    command: "getFields"
  };
}
async function getRecord(id, count, records, keys, titleKey) {
  {
    const recVal = records[id];
    const rec = {
      RecordCount: count,
      RecordSet: {
        Attributes: keys,
        Records: [
          {
            Title: recVal && recVal[titleKey] ? recVal[titleKey] : "",
            Data: keys.map((item) => {
              return recVal && recVal[item] ? recVal[item] : "";
            })
          }
        ]
      },
      command: "getRecords",
      count: "1",
      first: id
    };
    return rec;
  }
}
async function programsGrid(grid, source, props, data) {
  let json = await PostHandleTable$2(
    props.Module,
    props.ObjType ? props.ObjType : "0",
    void 0,
    props.SectionID,
    void 0,
    props.Path
  );
  source.onHandleRequest = handleRequest$5(props);
  await source.open();
  if (json) {
    if (json.ReadOnly === "1") grid.OnlyViewMode = true;
    source.rights = json.Rights ? getRightsData(json.Rights) : getRightsData("-1");
    const columns = parseColumns(json);
    columns.title.forEach((field) => {
      var _a2, _b;
      if ((_b = (_a2 = field.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.hidden) field.hide = true;
    });
    grid.setColumns(columns);
  } else grid.defaultColumns = true;
  await grid.setSource(source);
  if (props.ObjRef) await grid.refreshSource(props.ObjRef);
  await grid.updateGridSize();
}
function handleRequest$5(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("Path", props.Path).set("SectionID", props.SectionID ? props.SectionID : getModalSectionID());
    return AxiosRequest(true, params2, request);
  };
}
const mainDialogBlock = "_mainDialogBlock_1m9qo_33";
const dialogOverflow = "_dialogOverflow_1m9qo_71";
const fullDialogFlexContainer = "_fullDialogFlexContainer_1m9qo_115";
const dialogCreateGroupCard = "_dialogCreateGroupCard_1m9qo_989";
const dialogCreateGroupItem = "_dialogCreateGroupItem_1m9qo_1003";
const dialogCreateGroupItemLabel = "_dialogCreateGroupItemLabel_1m9qo_1013";
const dialogCreateGroupCheckItem = "_dialogCreateGroupCheckItem_1m9qo_1021";
const dialogCreateGroupItemEditor = "_dialogCreateGroupItemEditor_1m9qo_1033";
const dialogCreateGroupItemEditorShort = "_dialogCreateGroupItemEditorShort_1m9qo_1041";
const dialogCreateGroupCheck = "_dialogCreateGroupCheck_1m9qo_1021";
const dialogCreateGroupLabelDisabled = "_dialogCreateGroupLabelDisabled_1m9qo_1057";
const dialogDepNamesEditorBlock = "_dialogDepNamesEditorBlock_1m9qo_1273";
const dialogDepNamesLabel = "_dialogDepNamesLabel_1m9qo_1287";
const dialogDepNamesEditorContainer = "_dialogDepNamesEditorContainer_1m9qo_1297";
const dialogDepNamesDivider = "_dialogDepNamesDivider_1m9qo_1307";
const dialogDepNamesGridButtonContainer = "_dialogDepNamesGridButtonContainer_1m9qo_1319";
const dialogDepNamesButtonContainer = "_dialogDepNamesButtonContainer_1m9qo_1331";
const dialogDepNamesGridContainer = "_dialogDepNamesGridContainer_1m9qo_1345";
const dialogStyles = {
  mainDialogBlock,
  dialogOverflow,
  fullDialogFlexContainer,
  dialogCreateGroupCard,
  dialogCreateGroupItem,
  dialogCreateGroupItemLabel,
  dialogCreateGroupCheckItem,
  dialogCreateGroupItemEditor,
  dialogCreateGroupItemEditorShort,
  dialogCreateGroupCheck,
  dialogCreateGroupLabelDisabled,
  dialogDepNamesEditorBlock,
  dialogDepNamesLabel,
  dialogDepNamesEditorContainer,
  dialogDepNamesDivider,
  dialogDepNamesGridButtonContainer,
  dialogDepNamesButtonContainer,
  dialogDepNamesGridContainer
};
const defaultColumns = {
  title: [
    {
      fieldName: "UsedDate",
      title: "Дата",
      width: 100,
      fieldInfo: {
        DataType: DocFieldType.IntDate,
        EditStyle: EditStyle.Calendar
      }
    },
    {
      fieldName: "MainName",
      title: "Основное название",
      width: 300,
      fieldInfo: { DataType: DocFieldType.String }
    },
    {
      fieldName: "FullName",
      title: "Полное наименование",
      width: 300,
      fieldInfo: { DataType: DocFieldType.String }
    }
  ]
};
const defaultFields = [
  {
    Name: "UsedDate",
    Title: "Дата",
    Width: "10"
  },
  {
    Name: "MainName",
    Title: "Основное название",
    Width: "7"
  },
  {
    Name: "FullName",
    Title: "Полное наименование",
    Width: "20"
  }
];
function DialogDepNames({ departsId, onSelect }) {
  const [name, setName] = reactExports.useState("");
  const [text, setText] = reactExports.useState("");
  const [objRef, setObjRef] = reactExports.useState("");
  const [title, setTitle] = reactExports.useState("");
  const gridPanelRef = reactExports.useRef(null);
  const records = reactExports.useRef([]);
  const datasetId = reactExports.useContext(SmetaModalsIdContext);
  reactExports.useEffect(() => {
    smetaAxios.get("GetDepNameHistory", { prefix: Prefixes.deps, params: { ID: departsId }, loadMask: true }).then((json) => {
      var _a2;
      if (json.Name) setName(json.Name);
      if (json.Text) setText(json.Text);
      if (json.ObjRef) setObjRef(json.ObjRef);
      if (json.Title) setTitle(json.Title);
      if ((_a2 = json.Items) == null ? void 0 : _a2.items) {
        records.current = json.Items.items.map((item) => {
          return {
            UsedDate: { id: item.UsedDate, text: item.UsedDate !== "0" ? getDateOfInt(item.UsedDate) : "" },
            MainName: item.Name,
            FullName: item.Title
          };
        });
      }
      mainGridLoader();
    });
  }, []);
  const getFieldText = async (request) => {
    return { Text: await gridPanelRef.current.grid.source.getFieldText(request.FieldName) };
  };
  const onPostRecord = (request, requestData) => {
    if (request.NewRecord === "1") {
      const newRecord = {
        UsedDate: { id: "", text: "" },
        MainName: void 0,
        FullName: void 0
      };
      request.RecordSet.Attributes.forEach((attribut, index2) => {
        newRecord[attribut] = attribut === "UsedDate" ? requestData[index2] : requestData[index2].text;
      });
      records.current.splice(request.RecordIndex, 0, newRecord);
      return;
    }
    const modifiedField = request.RecordSet.Attributes[0];
    const record = records.current[request.RecordIndex];
    record[modifiedField] = modifiedField === "UsedDate" ? requestData[0] : requestData[0].text;
  };
  const createRecord = () => {
    const index2 = records.current.length ? gridPanelRef.current.grid.source.activeRecord + 1 : 0;
    const newRecords = [...records.current];
    const usedDateStr = dayjs().startOf("month").format("DD.MM.YYYY");
    const newRecord = {
      UsedDate: { id: String(getIntOfStrDate(usedDateStr)), text: usedDateStr },
      MainName: void 0,
      FullName: void 0
    };
    newRecords.splice(index2, 0, newRecord);
    return {
      index: index2,
      records: newRecords,
      keys: Object.keys(newRecord),
      titleKey: ""
    };
  };
  const deleteRecord = (request) => {
    if (!records.current.length) return;
    records.current.splice(request.RecordIndex, 1);
    return {
      Command: "DeleteRecord",
      RecordIndex: records.current.length === 0 ? 0 : request.RecordIndex - 1,
      RecordCount: records.current.length,
      UpdatesPending: "1",
      RecordKey: {}
    };
  };
  async function mainGridLoader() {
    GridLoader(gridPanelRef.current, void 0, {
      localGrid: true,
      refresh: false,
      showIndicator: false,
      Columns: defaultColumns,
      defaultFields,
      keyField: "UsedDate",
      recordKeys: ["UsedDate", "MainName", "FullName"],
      titleKey: "UsedDate",
      getFieldText,
      onPostRecord,
      createRecord,
      deleteRecord,
      getRecords: () => records.current,
      Rights: "-1"
    });
  }
  function setDepNameHistory() {
    const data = records.current.map((item) => {
      return { UsedDate: item.UsedDate.id, Name: item.MainName, Title: item.FullName };
    });
    return smetaAxios.post(
      "SetDepNameHistory",
      { Items: data.length ? data : void 0 },
      { prefix: Prefixes.deps, params: { ID: departsId, ObjRef: objRef, Name: name, Title: title }, loadMask: true }
    );
  }
  async function organizationDropDownList() {
    const json = await getParamObjectValues(Prefixes.orgs, ObjType.Organization);
    return json.Items.map((item) => {
      return { label: item.text, id: item.id };
    });
  }
  function organizationOnEditButtonClick(editButtonData) {
    tokenProcessingTest(editButtonData.json, editButtonData.subData);
  }
  async function organizationOnEdit(data) {
    var _a2;
    const isTextChanged = data.textchanged === "1";
    if (!isTextChanged) {
      setObjRef(data.tag);
      const newTextValue = (await getParamObjectText(Prefixes.orgs, ObjType.Organization, data.tag, -1)).Text ?? "";
      setText(newTextValue);
      return;
    }
    if (!data.value) {
      setObjRef("");
      setText("");
      return;
    }
    const json = await setParamObjectText(Prefixes.orgs, ObjType.Organization, objRef, data.value);
    if (json.ObjRef === "-1") {
      if ((_a2 = json.Selection) == null ? void 0 : _a2.length) {
        smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogSetObjText, { list: json.Selection, onEdit: organizationOnEdit }), {
          Title: "Выберите элемент из списка",
          style: getStyleWindow(),
          hiddenButton: true,
          blockMaximize: true
        });
      }
      return;
    }
    setObjRef(json.ObjRef);
    setText(json.Text);
  }
  const handleClose = () => {
    smetaModals.close(datasetId);
  };
  const handleSet = async () => {
    await setDepNameHistory();
    await smetaModals.close(datasetId);
    onSelect == null ? void 0 : onSelect();
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(dialogStyles.mainDialogBlock), children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(dialogStyles.dialogDepNamesEditorBlock), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesLabel), children: "Присоединенная организация:" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesEditorContainer), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Editor,
        {
          editStyle: EditStyle.PickList + EditStyle.Ellipsis,
          value: text,
          objref: objRef,
          onDropDownList: organizationDropDownList,
          datatype: ObjType.Organization,
          type: Prefixes.orgs,
          onEditButtonClick: organizationOnEditButtonClick,
          onEdit: organizationOnEdit
        }
      ) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(dialogStyles.dialogDepNamesEditorBlock), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesLabel), children: "Название по умолчанию:" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesEditorContainer), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Editor,
        {
          value: name,
          onEdit: (data) => {
            setName(data.value);
          }
        }
      ) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(dialogStyles.dialogDepNamesEditorBlock), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesLabel), children: "Полное наименование:" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesEditorContainer), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Editor,
        {
          value: title,
          onEdit: (data) => {
            setTitle(data.value);
          }
        }
      ) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(dialogStyles.dialogDepNamesEditorBlock), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesLabel), children: "Название на дату" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesDivider) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(dialogStyles.dialogDepNamesGridButtonContainer), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(dialogStyles.dialogDepNamesGridContainer), children: /* @__PURE__ */ jsxRuntimeExports.jsx(ContextMenu, { for: "grid", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gridPanelRef, style: { width: "100%", height: "100%", position: "relative" }, rcsgrid_panel: "" }) }) }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(dialogStyles.dialogDepNamesButtonContainer), children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", onClick: handleSet, children: "Установить" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { size: "small", variant: "outlined", onClick: handleClose, children: "Закрыть" })
      ] })
    ] })
  ] });
}
async function departmentsGrid(grid, source, props, data) {
  const json = await PostHandleTable$2(props.Module, ObjType.Department, void 0, props.SectionID);
  source.onHandleRequest = handleRequest$4(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  grid.setUnderlineCell = (col, div) => {
    if (col.fieldName !== "Title" || col.title !== "Организация") return;
    const id = source.getFieldValueSync("Name");
    if (!id || id < 0) return;
    div.classList.add("grid-cell-inner-underline");
  };
  grid.changeGridStyles = async (table) => {
    const departNameId = await source.getFieldValue("Name");
    const isFavorite = await source.getFieldValue("Favorite") !== void 0;
    table.querySelectorAll(".grid-td").forEach(async (cell) => {
      const { fieldName, title } = cell.field;
      if (!fieldName) return;
      if (departNameId > 0 && title === "Организация (подразделение)") cell.style.textDecoration = "underline";
      const fieldText = await source.getFieldText(fieldName);
      const fieldValue = await source.getFieldValue(fieldName);
      const hasTextAndIsEmpty = fieldText && fieldValue === void 0;
      if (fieldName !== "Code" && isFavorite) cell.style.color = setColor(DelphiColors.clBlue);
      if (fieldName !== "Title" && hasTextAndIsEmpty) cell.style.color = setColor(DelphiColors.clGray);
    });
  };
  await source.open();
  const departsTitleDropDownList = async () => {
    const json2 = await getParamObjectValues(Prefixes.orgs, ObjType.ChildOrg);
    const list = Object.values(json2.Items).map((item) => {
      return { label: item.text, id: item.id };
    });
    if (await source.getFieldValue("Name") > 0) list.push({ label: "(отключить организацию)", id: "-1" });
    return list;
  };
  const departsTitleEditButtonClick = async (subData) => {
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogDepNames,
        {
          departsId: await source.getFieldText("ID"),
          onSelect: async () => {
            subData.props.onEdit({
              noEdit: true
            });
            await source.refreshRecord();
            await grid.updateGridSize();
          }
        }
      ),
      {
        Title: `Код подразделения: ${await source.getFieldText("Code")}`,
        hiddenButton: true,
        blockMaximize: true,
        blockResize: true,
        blockSaveLocation: true,
        style: { height: "400px", width: "590px" }
      }
    );
  };
  const departsTitleCloseUpList = async (data2) => {
    await grid.postSomeData(
      "Title",
      data2.tag === "-1" ? { text: await source.getFieldText("Title") } : { id: data2.tag }
    );
    await grid.postExicstedEditRec(true);
  };
  let columns = {
    title: [
      {
        fieldName: "Code",
        title: "Код подразделения",
        width: 120,
        level: 0,
        collapseRecord: true,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "Title",
        title: "Организация (подразделение)",
        width: 200,
        level: 0,
        fieldInfo: {
          ...defaultFieldInfo,
          EditStyle: EditStyle.PickList + EditStyle.Ellipsis,
          onDropDownList: departsTitleDropDownList,
          onEditButtonClick: departsTitleEditButtonClick,
          onCloseUpList: departsTitleCloseUpList
        }
      },
      {
        fieldName: "Title",
        title: "Название",
        width: 200,
        level: 1,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "ShortName",
        title: "Краткий код",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "DepTypes",
        title: "Тип подразделения",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, EditStyle: EditStyle.CheckList }
      },
      {
        fieldName: "Options",
        title: "Параметры отдела",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, EditStyle: EditStyle.CheckList }
      },
      {
        fieldName: "KeyNo",
        title: "№",
        width: 38,
        level: 0,
        fieldInfo: { ...defaultFieldInfo }
      }
    ]
  };
  if (json) {
    source.rights = getRightsData(json.Rights);
    columns = parseColumns(json, { inputColumns: columns });
    grid.setColumns(columns);
  } else grid.setColumns(columns);
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
    if (data.Pages && json.Pages) {
      data.Pages.current = json.Pages.split("\r\n").map((page) => {
        return { Caption: page };
      });
    }
  }
  source.onRecordCollapsed = async function(event) {
    const recordIndex = event.currentTarget !== void 0 ? event.currentTarget.getAttribute("recordindex") : await event;
    await smetaAxios.get("RecordCollapsed", {
      prefix: props.Module,
      params: { SectionID: props.SectionID, ObjType: ObjType.Department, RecordIndex: recordIndex },
      loadMask: true
    });
    await grid.refreshSource("!");
    if (data.setCountRecords) data.setCountRecords(source.recordCount);
  };
  await grid.setSource(source);
  if (props.ID) await grid.refreshSource(props.ID);
  if (data.setSelectedRecord) {
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
  await grid.updateGridSize();
}
function handleRequest$4(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", ObjType.Department).set("SectionID", props.SectionID).set("All");
    return AxiosRequest(true, params2, request);
  };
}
async function accountsTableGrid(grid, source, props, data) {
  let json = await PostHandleTable(props.Module, props.Path);
  source.onHandleRequest = handleRequest$3(props);
  if (json) {
    source.rights = getRightsData(json.Rights);
    grid.setColumns(
      parseColumns(json, {
        Path: props.Path,
        Module: props.Module
      })
    );
  } else grid.defaultColumns = true;
  await source.open();
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
  if (data.onMultiSelectChange) {
    grid.onMultiSelectChange = function() {
      data.onMultiSelectChange();
    };
  }
  await grid.setSource(source);
  await grid.updateGridSize();
}
function handleRequest$3(props, source) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("Path", props.Path);
    return AxiosRequest(true, params2, request);
  };
}
function PostHandleTable(module2, Path) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", module2).set("comand", "GetTableLayout").set("Path", Path);
  return AxiosRequest(true, params2);
}
async function accountsPlanTableGrid(grid, source, props, data) {
  source.onHandleRequest = handleAccountsPlanRequest(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  let columns = { title: [] }, dest = {};
  dest.fieldName = "ID";
  dest.title = "ID";
  dest.width = 120;
  dest.level = 0;
  dest.hide = true;
  dest.fieldInfo = { ...defaultFieldInfo };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Code";
  dest.title = "Код";
  dest.width = 120;
  dest.level = 0;
  dest.collapseRecord = true;
  dest.fieldInfo = { ...defaultFieldInfo };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Name";
  dest.title = "Наименование счета";
  dest.width = 320;
  dest.level = 0;
  dest.fieldInfo = { ...defaultFieldInfo };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Params";
  dest.title = "Параметры счета";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "32"
  };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Alias";
  dest.title = "Замена кода";
  dest.width = 170;
  dest.level = 0;
  dest.fieldInfo = { ...defaultFieldInfo };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "KPS";
  dest.title = "КОСГУ";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "17",
    Module: "clsbook",
    DataType: "23001"
  };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "ClsType";
  dest.title = "ВидКБК";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "1"
  };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "ExpenceCls";
  dest.title = "КОСГУ";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "17",
    Module: "clsbook",
    DataType: "23001"
  };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "OGSD";
  dest.title = "ОГСД";
  dest.width = 120;
  dest.level = 1;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "17",
    Module: "clsbook",
    DataType: "23001"
  };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "OGSK";
  dest.title = "ОГСК";
  dest.width = 120;
  dest.level = 1;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "17",
    Module: "clsbook",
    DataType: "23001"
  };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "ExAccount";
  dest.title = "ДопСчет";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "16",
    Module: "accounts",
    DataType: "2170"
  };
  columns.title.push(dest);
  source.rights = getRightsData("-1");
  grid.setColumns(columns);
  await source.open();
  await grid.setSource(source);
  source.onRecordCollapsed = async function(event) {
    let RecordIndex;
    if (event.currentTarget !== void 0) {
      RecordIndex = event.currentTarget.getAttribute("recordindex");
    } else {
      RecordIndex = event;
    }
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "RecordCollapsed").set("SectionID", props.SectionID).set("ObjType", props.ObjType).set("RecordIndex", RecordIndex);
    await AxiosRequest(true, params2);
    await grid.refreshSource("!");
    if (data.setCountRecords) data.setCountRecords(source.recordCount);
    return;
  };
  await grid.refreshSource();
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
  if (data.onMultiSelectChange) {
    grid.onMultiSelectChange = function() {
      data.onMultiSelectChange();
    };
  }
  await grid.updateGridSize();
}
function handleAccountsPlanRequest(props, source) {
  return function onHandleRequest(request, loadCursor, wsm, subParams) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandlePlanTable").set("SectionID", props.SectionID).set("ObjType", props.ObjType);
    wsm && params2.set("WSM", "1");
    if (subParams) {
      const sParams = Object.entries(subParams);
      sParams.forEach(([key, value]) => {
        params2.set(key, value);
      });
    }
    return AxiosRequest(loadCursor !== void 0 ? loadCursor : true, params2, request);
  };
}
async function accountsAnaliticTableGrid(grid, source, props, data) {
  source.onHandleRequest = handleAnaliticRequest(props);
  let columns = { title: [] }, dest = {};
  dest.fieldName = "AnalyticID";
  dest.title = "Название";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "17",
    Module: "accounts",
    DataType: "2223"
  };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Flags";
  dest.title = "Признаки";
  dest.width = 320;
  dest.level = 0;
  dest.fieldInfo = { ...defaultFieldInfo, EditStyle: "32" };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "InitialValue";
  dest.title = "Значение по умолчанию";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "17",
    Module: "clsbook",
    DataType: "2466"
  };
  columns.title.push(dest);
  source.rights = getRightsData("-1");
  grid.setColumns(columns);
  await source.open();
  await grid.setSource(source);
  if (props.ObjRef) {
    await grid.refreshSource(props.ObjRef);
  } else await grid.refreshSource();
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
  if (data.onMultiSelectChange) {
    grid.onMultiSelectChange = function() {
      data.onMultiSelectChange();
    };
  }
  await grid.updateGridSize();
}
function handleAnaliticRequest(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleAnalyticTable").set("ObjType", props.ObjType).set("GroupID", props.ObjRef).set("SectionID", props.SectionID);
    if (props.User) params2.set("User", props.User);
    return AxiosRequest(true, params2, request);
  };
}
async function tablesGrid(grid, source, props, data) {
  source.onHandleRequest = HandleRequest(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  await source.open();
  const codeField = source.fields[source.getFieldIndex("Code")];
  let columns = { title: [] }, dest = {};
  dest.fieldName = "Code";
  dest.title = "№ п.п.";
  dest.width = codeField ? codeField.displayWidth * 15 : 120;
  dest.level = 0;
  dest.fieldInfo = { ...defaultFieldInfo, EditStyle: "64" };
  dest.collapseRecord = true;
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "FullName";
  dest.title = "Наименование";
  dest.width = 320;
  dest.level = 0;
  dest.fieldInfo = { ...defaultFieldInfo };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Name";
  dest.title = "Сокращение";
  dest.width = 120;
  dest.level = 1;
  dest.fieldInfo = { ...defaultFieldInfo, EditStyle: "64" };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Title";
  dest.title = "Заголовок";
  dest.width = 120;
  dest.level = 1;
  dest.fieldInfo = { ...defaultFieldInfo };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "Norms";
  dest.title = "Виды учета";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = { ...defaultFieldInfo, EditStyle: "32" };
  columns.title.push(dest);
  dest = {};
  dest.fieldName = "PayTypeCode";
  dest.title = "Вид оплаты";
  dest.width = 120;
  dest.level = 0;
  dest.fieldInfo = {
    ...defaultFieldInfo,
    EditStyle: "17",
    Module: "paytypes",
    DataType: "2380"
  };
  columns.title.push(dest);
  if (data.json) {
    source.rights = getRightsData(data.json.Rights);
    columns = parseColumns(data.json, { inputColumns: columns });
    grid.setColumns(columns);
    source.setKeyFieldName(data.json.keyField ? data.json.keyField.toUpperCase() : "CODE");
    source.rights = getRightsData(data.json.Rights);
  } else grid.setColumns(columns);
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
  }
  source.rights = getRightsData("-1");
  source.onRecordCollapsed = async function(event) {
    let RecordIndex;
    if (event.currentTarget !== void 0) {
      RecordIndex = event.currentTarget.getAttribute("recordindex");
    } else {
      RecordIndex = event;
    }
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "RecordCollapsed").set("SectionID", props.SectionID).set("ObjType", props.ObjType).set("RecordIndex", RecordIndex);
    await AxiosRequest(true, params2);
    await grid.refreshSource("!");
    if (data.setCountRecords) data.setCountRecords(source.recordCount);
    return;
  };
  await grid.setSource(source);
  if (props.ID) {
    await grid.refreshSource(props.ID);
  } else await grid.refreshSource();
  await grid.updateGridSize();
  if (data.setCountRecords) data.setCountRecords(source.recordCount);
  if (data.setSelectedRecord) {
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
}
function HandleRequest(props) {
  return function onHandleRequest(request, loadCursor, wsm, subParams) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID).set("CanChangeActual", "1");
    wsm && params2.set("WSM", "1");
    if (subParams) {
      const sParams = Object.entries(subParams);
      sParams.forEach(([key, value]) => {
        params2.set(key, value);
      });
    }
    return AxiosRequest(loadCursor !== void 0 ? loadCursor : true, params2, request);
  };
}
async function cadresGrid(grid, source, props, data) {
  let json = await PostHandleTable$2(props.Module, props.ObjType, void 0, props.SectionID, void 0, props.Path);
  source.onHandleRequest = handleCadresRequest(props);
  await source.open();
  if (json) {
    source.rights = getRightsData(json.Rights);
    if (json.ReadOnly === "1") grid.OnlyViewMode = true;
    grid.setColumns(parseColumns(json));
  } else grid.defaultColumns = true;
  if (!props.ObjRef) await source.refresh();
  await grid.setSource(source);
  if (props.ObjRef) await grid.refreshSource(props.ObjRef);
  await grid.updateGridSize();
}
function handleCadresRequest(props) {
  return function onHandleRequest(request, load, wsm) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("GroupID", props.GroupID).set("Path", props.Path).set("SectionID", props.SectionID);
    if (wsm) params2.set("WSM", "1");
    return AxiosRequest(true, params2, request);
  };
}
async function paytypesSettingsGrid(grid, source, props, data) {
  source.onHandleRequest = HandleRequestForPaytypesSettings(props);
  await source.open();
  let columns = paytypesSettingstColumns;
  grid.setColumns(columns);
  source.rights = getRightsData("-1");
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldValueSync("Code"));
    };
  }
  await source.first();
  await grid.setSource(source);
  if (props.ID) {
    await grid.refreshSource(props.ID);
  }
  if (data.setSelectedRecord) {
    data.setSelectedRecord(source.getFieldValueSync("Code"));
  }
  await grid.updateGridSize();
}
function HandleRequestForPaytypesSettings(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID);
    return AxiosRequest(true, params2, request);
  };
}
function DayTypeTitle({ label }) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.dialogDayTypeTitleContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.dialogDayTypeTitle, children: label }) });
}
function DayTypeCheckBox({ label, checkValues, onEditCheckBox }) {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogDayTypeCheckBoxContainer, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { onEdit: onEditCheckBox, parentProps: { name: label }, CheckState: checkValues[label] }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.dialogDayTypelabel, children: label })
  ] });
}
const defaultCheckState = {
  Отработанные: 0,
  Неотработанные: 0,
  Обычный: 0,
  Праздничный: 0,
  Выходной: 0,
  ПредПраздничный: 0,
  Понедельник: 0,
  Вторник: 0,
  Среда: 0,
  Четверг: 0,
  Пятница: 0,
  Суббота: 0,
  Воскресенье: 0
};
const daysData = {
  0: "Понедельник",
  1: "Вторник",
  2: "Среда",
  3: "Четверг",
  4: "Пятница",
  5: "Суббота",
  6: "Воскресенье"
};
const typesData = {
  0: "Обычный",
  1: "Праздничный",
  2: "Выходной",
  3: "ПредПраздничный"
};
const statesData = {
  0: "Отработанные",
  1: "Неотработанные"
};
function DialogDayType({ props, smetaModalId = "" }) {
  const [checkValues, setChecValues] = reactExports.useState(defaultCheckState);
  reactExports.useEffect(() => {
    setChecValues(getCheckStates(props.ObjRef));
  }, []);
  const getCheckStates = (objref) => {
    const result = {};
    const days = objref >> 16 & 127;
    const types = objref >> 24 & 15;
    const states = objref >> 28 & 3;
    for (let i = 0; i < 7; i++) {
      result[daysData[i]] = days >> i & 1;
    }
    for (let i = 0; i < 4; i++) {
      result[typesData[i]] = types >> i & 1;
    }
    for (let i = 0; i < 2; i++) {
      result[statesData[i]] = states >> i & 1;
    }
    return result;
  };
  const getTag = () => {
    let result = 0;
    for (let i = 0; i < 7; i++) {
      result += checkValues[daysData[i]] << i + 16;
    }
    for (let i = 0; i < 4; i++) {
      result += checkValues[typesData[i]] << i + 24;
    }
    for (let i = 0; i < 2; i++) {
      result += checkValues[statesData[i]] << i + 28;
    }
    return result;
  };
  async function onSelect() {
    if (props.onEdit && props.setValue && props.setInputValue) {
      props.onEdit({
        value: "",
        tag: getTag(),
        name: props.Name,
        record: props.record,
        textchanged: "0",
        setValue: props.setValue,
        setInputValue: props.setInputValue,
        type: props.Module,
        requestId: props.RequestID,
        addInfo: props.addInfo,
        docID: true
      });
      smetaModals.close(smetaModalId);
      return;
    }
    if (props.RequestID) {
      await formEdit("1", props.func, { Name: "ObjRef", Value: getTag() }, props.RequestID, props.from);
    }
    smetaModals.close(smetaModalId);
  }
  const onEditCheckBox = (data) => {
    checkValues[data.name] = Number(data.CheckState);
    setChecValues({ ...checkValues });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.mainDialogBlock, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: `${styles$4.fullDialogFlexContainer} ${styles$4.dialogDayTypeContainer}`, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogDayTypeItemContainer, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogDayTypeStateContainer, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeTitle, { label: "Виды дней" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Отработанные", checkValues, onEditCheckBox }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Неотработанные", checkValues, onEditCheckBox })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogDayTypeTypesContainer, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeTitle, { label: "Типы дней" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Обычный", checkValues, onEditCheckBox }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Праздничный", checkValues, onEditCheckBox }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Выходной", checkValues, onEditCheckBox }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "ПредПраздничный", checkValues, onEditCheckBox })
        ] })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$4.dialogDayTypeItemContainer, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogDayTypeDaysContainer, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeTitle, { label: "Дни недели" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Понедельник", checkValues, onEditCheckBox }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Вторник", checkValues, onEditCheckBox }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Среда", checkValues, onEditCheckBox }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Четверг", checkValues, onEditCheckBox }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Пятница", checkValues, onEditCheckBox }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Суббота", checkValues, onEditCheckBox }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(DayTypeCheckBox, { label: "Воскресенье", checkValues, onEditCheckBox })
      ] }) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogButtonsContainer, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          onClick: onSelect,
          size: "small",
          variant: "outlined",
          className: `${styles$4.dialogButton} button_Modal_Select ${cn(
            props.Buttons && (props.Buttons & 1) === 0 && "hidden"
          )}`,
          value: "1",
          children: "Выбрать"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          value: "2",
          className: `${styles$4.dialogButton} button_Modal_Close`,
          onClick: () => {
            smetaModals.close(smetaModalId);
          },
          children: "Закрыть"
        }
      )
    ] })
  ] });
}
async function tablesDistractionsGrid(grid, source, props, data) {
  source.onHandleRequest = handleRequest$2(props);
  await source.open();
  let columns = {
    title: [
      {
        fieldName: "ID",
        title: "ID",
        width: 30,
        level: 0,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: { ...defaultFieldInfo },
        collapseRecord: true
      },
      {
        fieldName: "Mask",
        title: "№ п.п.",
        width: 60,
        level: 0,
        fieldInfo: { ...defaultFieldInfo },
        collapseRecord: true
      },
      {
        fieldName: "Name",
        title: "Наименование",
        width: 160,
        level: 0,
        fieldInfo: {
          ...defaultFieldInfo,
          onEditField: true,
          squareColorField: "Color",
          EditStyle: EditStyle.ColorBox + EditStyle.Ellipsis
        }
      },
      {
        fieldName: "ShortName",
        title: "Сокр.",
        width: 60,
        level: 0,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "DayMask",
        title: "Влияет на дни",
        width: 160,
        level: 0,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "16", onEditButtonClick: openDayType }
      },
      {
        fieldName: "PayTypeCode",
        title: "Вид оплаты",
        width: 160,
        level: 0,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "17", DataType: "2380", Module: "paytypes" }
      },
      {
        fieldName: "Code",
        title: "Code",
        width: 30,
        level: 0,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "Options",
        title: "Options",
        width: 120,
        level: 0,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: {
          ...defaultFieldInfo
        }
      }
    ]
  };
  if (data.json) {
    source.rights = getRightsData(data.json.Rights);
    columns = parseColumns(data.json, { inputColumns: columns });
    grid.setColumns(columns);
    source.setKeyFieldName("ID");
    source.rights = getRightsData(data.json.Rights);
  } else grid.setColumns(columns);
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
  }
  source.rights = getRightsData("-1");
  await grid.setSource(source);
  if (props.ID) {
    await grid.refreshSource(props.ID);
  } else await grid.refreshSource();
  await grid.updateGridSize();
  if (data.setCountRecords) data.setCountRecords(source.recordCount);
  if (data.setSelectedRecord) {
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
}
function handleRequest$2(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType);
    return AxiosRequest(true, params2, request);
  };
}
const openDayType = (data) => {
  smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogDayType, { props: data.props }), {
    Title: "Маска типов дней",
    style: getStyleWindow("DayTypes"),
    hiddenButton: true
  });
};
function getMaxDay(id, year2) {
  return {
    0: 0,
    1: 31,
    2: year2 % 4 === 0 ? 29 : 28,
    3: 31,
    4: 30,
    5: 31,
    6: 30,
    7: 31,
    8: 31,
    9: 30,
    10: 31,
    11: 30,
    12: 31
  }[id] || 0;
}
const defaultCols = [
  {
    fieldName: "CalcRange",
    title: "Период расчёта",
    width: 160,
    collapseRecord: true,
    fieldInfo: {
      options: getParamColumnsOptions(ParamSetOption.Fixed),
      EditStyle: "",
      Module: "",
      DataType: "",
      columnID: "",
      mapId: ""
    }
  },
  {
    fieldName: "Document",
    title: "Документ - основание",
    width: 140,
    hide: true,
    fieldInfo: {
      options: getParamColumnsOptions(ParamSetOption.Hidden + ParamSetOption.Reference),
      DataType: "2200",
      EditStyle: "16",
      Module: "",
      columnID: "",
      mapId: ""
    }
  },
  {
    fieldName: "Owner",
    title: "Пользователь",
    width: 99,
    fieldInfo: {
      options: getParamColumnsOptions(0),
      EditStyle: "64",
      Module: "",
      DataType: "",
      columnID: "",
      mapId: ""
    }
  },
  {
    fieldName: "AcceptDate",
    title: "Дата закрытия",
    width: 90,
    fieldInfo: {
      onEditField: true,
      options: getParamColumnsOptions(0),
      EditStyle: "2",
      DataType: "",
      columnID: "",
      mapId: "",
      tagField: "CalcRange",
      getCustomDefaultTag: (id) => {
        const year2 = (Number(id) >> 24) + 1950;
        const month = Number(id) >> 20 & 15 || 1;
        const day = Number(id) >> 15 & 31 || getMaxDay(month, year2);
        return getDateRusFormatWithId(`${year2}-${month < 10 ? `0${month}` : month}-${day < 10 ? `0${day}` : day}`).id;
      }
    }
  }
];
const chartOfCalculations = async (grid, source, props, data) => {
  const onRecordCollapsed = async (event) => {
    const recordIndex = event.currentTarget !== void 0 ? event.currentTarget.getAttribute("recordindex") : event;
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "RecordCollapsed").set("SectionID", props.SectionID).set("ObjType", props.ObjType).set("RecordIndex", recordIndex);
    await AxiosRequest(true, params2);
    await grid.refreshSource("!");
  };
  source.onHandleRequest = handleRequest$1(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  await source.open();
  const columns = defaultCols.concat(data.Columns);
  grid.setColumns({ title: columns });
  await grid.setSource(source);
  source.onRecordCollapsed = onRecordCollapsed;
  props.ID ? await grid.refreshSource(props.ID) : await grid.refreshSource();
  await grid.updateGridSize();
};
function handleRequest$1(props) {
  return function onHandleRequest(request) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID).set("CanChangeActual", "1");
    return AxiosRequest(true, params2, request);
  };
}
function getscheduleColumns(codeField) {
  let columns = {
    title: [
      {
        fieldName: "ID",
        title: "ID",
        width: 60,
        level: 0,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "Code",
        title: "Код",
        width: codeField ? codeField.displayWidth * 15 : 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" },
        collapseRecord: true
      },
      {
        fieldName: "Name",
        title: "Наименование",
        width: 300,
        level: 0,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "DayMask",
        title: "DayMask",
        width: 120,
        level: 0,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" }
      },
      {
        fieldName: "ModeID",
        title: "ModeID",
        width: 120,
        level: 0,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: { ...defaultFieldInfo }
      },
      {
        fieldName: "WorkRange",
        title: "Время работы",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" }
      },
      {
        fieldName: "WorkStart",
        title: "Начало",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, editMask: "##-##" }
      },
      {
        fieldName: "WorkEnd",
        title: "Конец",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, editMask: "##-##" }
      },
      {
        fieldName: "BreakRange",
        title: "Перерыв",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" }
      },
      {
        fieldName: "BreakStart",
        title: "Начало",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, editMask: "##-##" }
      },
      {
        fieldName: "BreakEnd",
        title: "Конец",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, editMask: "##-##" }
      },
      {
        fieldName: "HourNorm",
        title: "Норма часов",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" }
      },
      {
        fieldName: "DayNorm",
        title: "Дневная",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" }
      },
      {
        fieldName: "EveningNorm",
        title: "Вечерняя",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" }
      },
      {
        fieldName: "NightNorm",
        title: "Ночная",
        width: 120,
        level: 1,
        fieldInfo: { ...defaultFieldInfo, EditStyle: "64" }
      },
      {
        fieldName: "UnitNorm",
        title: "Выработка",
        width: 120,
        level: 0,
        fieldInfo: { ...defaultFieldInfo }
      }
    ]
  };
  return columns;
}
async function scheduleGrid(grid, source, props, data) {
  source.onHandleRequest = handleRequest(props);
  source.CreateCollapsibleRecords = CreateCollapsibleRecords;
  await source.open();
  source.rights = getRightsData("-1");
  const codeField = source.fields[source.getFieldIndex("Code")];
  let columns = getscheduleColumns(codeField);
  grid.setColumns(columns);
  if (data.setSelectedRecord) {
    source.onRecordIndexChanged = async function(source2) {
      data.setSelectedRecord(source2.getFieldTextSync("ID"));
    };
  }
  await grid.setSource(source);
  source.onRecordCollapsed = async function(event) {
    let RecordIndex;
    if (event.currentTarget !== void 0) {
      RecordIndex = event.currentTarget.getAttribute("recordindex");
    } else {
      RecordIndex = event;
    }
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "RecordCollapsed").set("SectionID", props.SectionID).set("ObjType", props.ObjType).set("RecordIndex", RecordIndex);
    await AxiosRequest(true, params2);
    await grid.refreshSource("!");
    if (data.setCountRecords) data.setCountRecords(source.recordCount);
    return;
  };
  await grid.refreshSource();
  await grid.updateGridSize();
  if (data.setSelectedRecord) {
    data.setSelectedRecord(source.getFieldTextSync("ID"));
  }
}
function handleRequest(props) {
  return function onHandleRequest(request, loadCursor, wsm, subParams) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", props.Module).set("comand", "HandleTable").set("ObjType", props.ObjType).set("SectionID", props.SectionID).set("GroupID", props.GroupID || "0");
    wsm && params2.set("WSM", "1");
    if (subParams) {
      const sParams = Object.entries(subParams);
      sParams.forEach(([key, value]) => {
        params2.set(key, value);
      });
    }
    return AxiosRequest(loadCursor !== void 0 ? loadCursor : true, params2, request);
  };
}
const checkAvailabilityFromCanModify = (flag, grid) => {
  let available = true;
  if (grid) {
    available = !grid.canModify(flag, void 0, grid);
  }
  return available;
};
async function CheckMultiSelect(grid, field, separator) {
  let multiSelect = grid.getMultiSelect(), returnStr = "";
  if (multiSelect.length > 0) {
    for (const index2 of multiSelect) {
      {
        returnStr += await grid.getActiveSource().getFieldText(field ? field : "ID", Number(index2));
        if (index2 !== multiSelect[multiSelect.length - 1]) returnStr += separator ? separator : ",";
      }
    }
  } else {
    returnStr += grid.getActiveSource().getFieldTextSync(field ? field : "ID");
  }
  return returnStr;
}
async function createModule(func, properties2) {
  if (!func) return;
  await func(...properties2);
}
async function GridLoader(gridPanel, props, data = {}) {
  if (!gridPanel.getAttribute("rcsgrid_panel")) gridPanel.setAttribute("rcsgrid_panel", "");
  if (data.refresh) {
    if (data.localGrid) {
      return localGrid(gridPanel.grid, data.source, props, data);
    }
    return refreshGrid(gridPanel.grid, props, data);
  }
  let grid;
  let source;
  if (gridPanel !== null) {
    if (!gridPanel.grid) {
      gridPanel.innerHTML = "";
      gridPanel.grid = new createGrid(gridPanel);
    }
    grid = gridPanel.grid;
    if (data.onGetImageIndex) grid.onGetImageIndex = data.onGetImageIndex;
    if (data.changeGridStyles) grid.changeGridStyles = data.changeGridStyles;
    source = new createRecordSource();
    if (data.indicator === false) {
      grid.ShowIndicatorF(false);
    }
    if (data.canModify !== void 0 && data.canModify !== null) {
      grid.canModify = data.canModify;
    }
    if (data.localGrid) {
      return localGrid(grid, source, props, data);
    }
    const properties2 = [grid, source, props, data];
    const modules = {
      books: () => createModule(booksGrid, properties2),
      dbview: () => createModule(dbviewGrid, properties2),
      clsbook: () => createModule(clsBookGrid, properties2),
      address: () => createModule(kladrGrid, properties2),
      organizations_group: () => createModule(groupingOrg, properties2),
      persons: () => createModule(personsGrid, properties2),
      staff: () => createModule(personsGrid, properties2),
      documents: () => createModule(documentsGrid, properties2),
      acctools: () => createModule(accToolsGrid, properties2),
      storobj: () => createModule(organizationsGrid, properties2),
      cert: () => createModule(certGrid, properties2),
      programs: () => createModule(programsGrid, properties2),
      Programs: () => createModule(programsGrid, properties2),
      departments: () => createModule(departmentsGrid, properties2),
      cadres: () => createModule(cadresGrid, properties2),
      salary: () => createModule(chartOfCalculations, properties2),
      schedule: () => createModule(scheduleGrid, properties2),
      tables: () => createModule(data.distractions && tablesDistractionsGrid || tablesGrid, properties2),
      paytypes: () => createModule(data.settings && paytypesSettingsGrid || paytypesGrid, properties2),
      organizations: () => createModule(data.main && organizationsGrid || data.sub && accountsGrid, properties2),
      accounts: () => createModule(
        data.plan && accountsPlanTableGrid || data.analitic && accountsAnaliticTableGrid || accountsTableGrid,
        properties2
      ),
      default: () => createModule(defaultGrid, properties2)
    };
    const createSelectedModule = modules[props.Module] || props.Module.default;
    await createSelectedModule();
  }
  if (!grid || !source) return;
  return { grid, source };
}
async function refreshGrid(grid, props, data) {
  switch (data.token) {
    case "HandleAccounts":
      data.source.onHandleRequest = handleTableAccounts(props.Module, data.ObjType, data.GroupID, props.SectionID);
      break;
    case "HandleObjParams":
      data.source.onHandleRequest = handleTableDoc(props.Module, data.DocCfgID, data.GroupID, props.SectionID);
      break;
    case "HandleParams":
      data.source.onHandleRequest = handleTableDoc(props.Module, data.DocCfgID, data.GroupID, props.SectionID);
      break;
    default:
      data.source.onHandleRequest = handleTableDoc(props.Module, data.DocCfgID, data.GroupID, props.SectionID);
      break;
  }
  await grid.setSource(data.source);
  await data.source.first();
  await grid.refreshSource();
  await grid.updateGridSize();
  return { grid, source: data.source };
}
const getUpdatesHelp = async (id) => {
  const params2 = /* @__PURE__ */ new Map([
    ["prefix", "updates"],
    ["comand", "GetUpdatesHelp"],
    ["ID", id],
    ["Client", "1"]
  ]);
  return AxiosRequest(true, params2);
};
function downloadReport(data) {
  const a2 = document.createElement("a");
  a2.href = "data:" + data.mimeType + ";base64," + data.RCDATA;
  a2.download = `${data.FileName}`;
  a2.click();
}
function NotesButton({ id, label }) {
  const onClick2 = async () => {
    const json = await getUpdatesHelp(id);
    downloadReport({ ...json, mimeType: reactNativeMimeTypesExports.lookup(json.FileName).slice(-1)[0] });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { title: `Скачать описание обновления: ${label}`, className: styles$4.dialogRef, onClick: onClick2, children: label });
}
const getDefaultFieldsDlgInstScrptsUpdt = () => {
  return [
    {
      Name: "ID",
      Title: "ID",
      Width: "7"
    },
    {
      Name: "Name",
      Title: "Наименование",
      Width: "10"
    },
    {
      Name: "Date",
      Title: "Дата",
      Width: "20"
    },
    {
      Name: "Version",
      Title: "Версия",
      Width: "7"
    },
    {
      Name: "Status",
      Title: "Статус",
      Width: "30"
    },
    {
      Name: "Notes",
      Title: "Описание",
      Width: "30"
    },
    {
      Name: "Help",
      Title: "",
      Width: "30"
    },
    {
      Name: "GUID",
      Title: "",
      Width: "30"
    }
  ];
};
const getColumnsDlgInstScrptsUpdt = () => {
  return {
    title: [
      {
        fieldName: "ID",
        title: "ID",
        width: 50,
        hide: true,
        hideInGrid: true,
        hideInCard: true,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Name",
        title: "Наименование",
        width: 200,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Date",
        title: "Дата",
        width: 100,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Version",
        title: "Версия",
        width: 100,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Status",
        title: "Статус",
        width: 100,
        fieldInfo: {
          ...defaultFieldInfo
        }
      },
      {
        fieldName: "Notes",
        title: "Описание",
        width: 200,
        fieldInfo: {
          ...defaultFieldInfo
        }
      }
    ]
  };
};
const getUpdatesList = () => {
  const params2 = /* @__PURE__ */ new Map([
    ["prefix", "updates"],
    ["comand", "GetUpdatesList"],
    ["Client", "1"]
  ]);
  return AxiosRequest(true, params2);
};
const getUpdatesFile = (id) => {
  const params2 = /* @__PURE__ */ new Map([
    ["prefix", "updates"],
    ["comand", "GetUpdatesFile"],
    ["Client", "1"],
    ["ID", id],
    ["WSM", "1"]
  ]);
  return AxiosRequest(true, params2);
};
function DialogInstallScriptsUpdates({ props, smetaModalId }) {
  const configEnable = useAtomValue(configEnabledAtom);
  const [disableInstallButton, setDisableInstallButton] = reactExports.useState(!configEnable);
  const { Buttons: buttons } = props;
  const [mainGrid, setMainGrid] = reactExports.useState();
  const [selectedRecordId, setSelectedRecordId] = reactExports.useState("0");
  const [allUpdts, setAllUpdts] = reactExports.useState("0");
  const gridPanel = reactExports.useRef(null);
  const records = reactExports.useRef([]);
  const data = reactExports.useRef();
  reactExports.useEffect(() => {
    loadGrid();
  }, []);
  const loadGrid = async () => {
    const json = await getUpdatesList();
    data.current = json;
    if (!data.current || !data.current.items || !data.current.items.items) data.current = { items: { items: [] } };
    records.current = allUpdts === "1" ? data.current && data.current.items.items || [] : data.current && data.current.items.items.filter(filterRecords) || [];
    setDisableInstallButton(records.current.length !== 0 ? !configEnable : true);
    const res = await GridLoader(gridPanel.current, props, {
      localGrid: true,
      refresh: false,
      Columns: getColumnsDlgInstScrptsUpdt(),
      defaultFields: getDefaultFieldsDlgInstScrptsUpdt(),
      keyField: "ID",
      recordKeys: ["ID", "Name", "Date", "Version", "Status", "Notes", "Help", "GUID"],
      getRecords,
      Rights: "0",
      setSelectedRecord: setSelectedRecordId
    });
    setMainGrid(res);
  };
  const getRecords = () => {
    return getFixRecords(records.current);
  };
  const getFixRecords = (records2) => {
    return records2.map((item) => {
      const fullDate = getDateOfInt(item.Date);
      return { ...item, Date: fullDate };
    });
  };
  const getLabelForRef = () => {
    if (!mainGrid) return "";
    return mainGrid.source.getFieldTextSync("Name");
  };
  const filterRecords = (record) => {
    if (!record.Status) return true;
    if (!record.Status.match(/\[вер.[\d]\]/)) return false;
    const text = new RegExp(`вер.${record.Version}`);
    if (record.Status.match(text)) return false;
    return true;
  };
  const onCheck = async (checkData) => {
    setAllUpdts(checkData.CheckState);
    records.current = checkData.CheckState === "1" ? data.current && data.current.items.items || [] : records.current.filter(filterRecords);
    setDisableInstallButton(records.current.length !== 0 ? !configEnable : true);
    setTimeout(async () => {
      await (mainGrid == null ? void 0 : mainGrid.grid.refreshSource());
      setSelectedRecordId(mainGrid == null ? void 0 : mainGrid.source.getFieldTextSync("ID"));
    });
  };
  const updateStatus = () => {
    if ((mainGrid == null ? void 0 : mainGrid.source.activeRecord) === void 0) return;
    records.current[mainGrid == null ? void 0 : mainGrid.source.activeRecord].Status = "Установлено";
    mainGrid == null ? void 0 : mainGrid.grid.refreshSource();
  };
  const installUpdt = async (id) => {
    if (!id) return;
    const json = await getUpdatesFile(id);
    if (json.Token) {
      tokenProcessingTest(json, {
        func: (data2) => {
          const reg = new RegExp(`${id}`);
          if (data2.ID.match(reg)) {
            updateStatus();
          }
        }
      });
    } else {
      updateStatus();
    }
  };
  const createConfirmation2 = (caption, onSelect2, id) => {
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        MessageBox,
        {
          DlgType: DlgType.Confirmation,
          Buttons: Button$1.Yes + Button$1.No,
          Message: caption,
          onSelect: (ev) => {
            if (ev.target.value === DlgRes.Yes.toString()) onSelect2(id);
          }
        }
      ),
      {
        style: getStyleWindow("MessageBox"),
        hiddenButton: true,
        blockMaximize: true,
        blockSaveLocation: true,
        blockResize: true,
        Title: "Подтверждение"
      }
    );
  };
  const onSelect = async () => {
    {
      const id = await (mainGrid == null ? void 0 : mainGrid.source.getFieldText("ID")), status = await (mainGrid == null ? void 0 : mainGrid.source.getFieldText("Status"));
      createConfirmation2(`Установить обновление "${getLabelForRef()}" ${status ? "повторно" : ""}?`, installUpdt, id);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.mainDialogBlock, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `${styles$4.fullDialogFlexContainer} ${styles$4.dialogDayTypeContainer}`, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: gridPanel, style: { height: "100%", width: "100%", position: "relative" } }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogButtonsContainer, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$4.dialogFutterInfo, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxWithLabel, { label: "Все обновления", onEdit: onCheck, CheckState: allUpdts }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(NotesButton, { id: selectedRecordId, label: getLabelForRef() })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          onClick: onSelect,
          size: "small",
          variant: "outlined",
          className: `${styles$4.dialogButton} button_Modal_Select ${cn(
            buttons && (Number(buttons) & 1) === 0 && "hidden"
          )}`,
          value: "1",
          disabled: disableInstallButton,
          children: "Установить"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          value: "2",
          className: `${styles$4.dialogButton} button_Modal_Close`,
          onClick: () => {
            smetaModals.close(smetaModalId);
          },
          children: "Закрыть"
        }
      )
    ] })
  ] });
}
const DialogAboutSite = () => {
  const {
    smeta: { stimateVersion: version }
  } = useAtomValue(appConfig);
  const userIsAdmin = useAtomValue(isAdminAtom);
  const [info, setInfo] = reactExports.useState({
    CFGVer: "",
    Configuration: "",
    OCXVer: "",
    Release: "",
    Rights: "",
    SystemName: "",
    Using: "",
    Version: ""
  });
  reactExports.useEffect(() => {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("comand", "info").set("Info", "1").set("JSON", "1");
    AxiosRequest(true, params2).then((resp) => {
      setInfo(resp);
    });
  }, []);
  const resetLicense = (rcdata) => {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("comand", "ResetLicense");
    AxiosRequest(true, params2, { RCDATA: rcdata }).then((resp) => {
      if (resp.SystemName && resp.Using) setInfo(resp);
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid22,
    {
      direction: "column",
      spacing: 1,
      sx: {
        alignItems: "center",
        justifyContent: "stretch",
        pl: 3,
        pr: 3
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid22,
          {
            container: true,
            direction: "column",
            sx: {
              alignItems: "center",
              justifyContent: "stretch"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", children: "Автоматизированная система" }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h4", children: info.SystemName }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h6", gutterBottom: true, children: info.Configuration }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "subtitle2", gutterBottom: true, children: info.Release }) })
            ]
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid22,
          {
            container: true,
            direction: "column",
            sx: {
              alignItems: "flex-start",
              justifyContent: "stretch",
              borderTop: "1px solid gray",
              borderBottom: "1px solid gray"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "subtitle2", gutterBottom: true, sx: { whiteSpace: "pre-wrap" }, children: info.Using }) }),
              (userIsAdmin || userIsAdmin || Number(info.Rights) === Rights.All) && /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid22,
                {
                  item: true,
                  sx: {
                    width: "100%"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { container: true, direction: "row-reverse", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Link$1,
                    {
                      underline: "hover",
                      onClick: () => {
                        selectNewLicenseToInstall().then((fileData) => {
                          if (fileData && fileData.reqData.FileName && fileData.files) {
                            const fileName = fileData.reqData.FileName;
                            const rcdata = fileData.files[fileName].rcdata;
                            resetLicense(rcdata);
                          }
                        });
                      },
                      sx: { cursor: "pointer" },
                      children: "Обновить лицензию"
                    }
                  ) }) })
                }
              )
            ]
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid22,
          {
            container: true,
            direction: "column",
            sx: {
              alignItems: "flex-start",
              justifyContent: "stretch"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "subtitle2", gutterBottom: true, sx: { whiteSpace: "pre-wrap" }, children: `Версия сайта: ${version}` }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "subtitle2", gutterBottom: true, sx: { whiteSpace: "pre-wrap" }, children: `Версия сервера: ${info.Version}` }) })
            ]
          }
        ) })
      ]
    }
  );
};
var Home = {};
var hasRequiredHome;
function requireHome() {
  if (hasRequiredHome) return Home;
  hasRequiredHome = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Home, "__esModule", {
    value: true
  });
  Home.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Home.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"
  }), "Home");
  return Home;
}
var HomeExports = /* @__PURE__ */ requireHome();
const HomeIcon = /* @__PURE__ */ getDefaultExportFromCjs(HomeExports);
const DialogHelpContext = ({ smetaModalId }) => {
  const helpContextUrl = useAtomValue(helpContextAtom);
  const iframeRef = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (!helpContextUrl) smetaModals.close(smetaModalId);
  }, []);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid22,
    {
      container: true,
      direction: "column",
      sx: {
        height: "100%",
        alignItems: "streach"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            onClick: () => {
              iframeRef.current.src = helpContextUrl;
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(HomeIcon, { fontSize: "small" })
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, sx: { flex: "1 1 auto" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("iframe", { ref: iframeRef, src: helpContextUrl, style: { height: "97%", width: "100%" } }) })
      ]
    }
  );
};
function createPolymorphicComponent(component) {
  return component;
}
function createSafeContext(errorMessage) {
  const Context2 = reactExports.createContext(null);
  const useSafeContext = () => {
    const ctx = reactExports.useContext(Context2);
    if (ctx === null) {
      throw new Error(errorMessage);
    }
    return ctx;
  };
  const Provider2 = ({ children, value }) => /* @__PURE__ */ React.createElement(Context2.Provider, {
    value
  }, children);
  return [Provider2, useSafeContext];
}
function packSx(sx) {
  return Array.isArray(sx) ? sx : [sx];
}
function toVal(mix) {
  var k2, y2, str = "";
  if (typeof mix === "string" || typeof mix === "number") {
    str += mix;
  } else if (typeof mix === "object") {
    if (Array.isArray(mix)) {
      for (k2 = 0; k2 < mix.length; k2++) {
        if (mix[k2]) {
          if (y2 = toVal(mix[k2])) {
            str && (str += " ");
            str += y2;
          }
        }
      }
    } else {
      for (k2 in mix) {
        if (mix[k2]) {
          str && (str += " ");
          str += k2;
        }
      }
    }
  }
  return str;
}
function clsx() {
  var i = 0, tmp, x, str = "";
  while (i < arguments.length) {
    if (tmp = arguments[i++]) {
      if (x = toVal(tmp)) {
        str && (str += " ");
        str += x;
      }
    }
  }
  return str;
}
const DEFAULT_COLORS = {
  dark: [
    "#C1C2C5",
    "#A6A7AB",
    "#909296",
    "#5c5f66",
    "#373A40",
    "#2C2E33",
    "#25262b",
    "#1A1B1E",
    "#141517",
    "#101113"
  ],
  gray: [
    "#f8f9fa",
    "#f1f3f5",
    "#e9ecef",
    "#dee2e6",
    "#ced4da",
    "#adb5bd",
    "#868e96",
    "#495057",
    "#343a40",
    "#212529"
  ],
  red: [
    "#fff5f5",
    "#ffe3e3",
    "#ffc9c9",
    "#ffa8a8",
    "#ff8787",
    "#ff6b6b",
    "#fa5252",
    "#f03e3e",
    "#e03131",
    "#c92a2a"
  ],
  pink: [
    "#fff0f6",
    "#ffdeeb",
    "#fcc2d7",
    "#faa2c1",
    "#f783ac",
    "#f06595",
    "#e64980",
    "#d6336c",
    "#c2255c",
    "#a61e4d"
  ],
  grape: [
    "#f8f0fc",
    "#f3d9fa",
    "#eebefa",
    "#e599f7",
    "#da77f2",
    "#cc5de8",
    "#be4bdb",
    "#ae3ec9",
    "#9c36b5",
    "#862e9c"
  ],
  violet: [
    "#f3f0ff",
    "#e5dbff",
    "#d0bfff",
    "#b197fc",
    "#9775fa",
    "#845ef7",
    "#7950f2",
    "#7048e8",
    "#6741d9",
    "#5f3dc4"
  ],
  indigo: [
    "#edf2ff",
    "#dbe4ff",
    "#bac8ff",
    "#91a7ff",
    "#748ffc",
    "#5c7cfa",
    "#4c6ef5",
    "#4263eb",
    "#3b5bdb",
    "#364fc7"
  ],
  blue: [
    "#e7f5ff",
    "#d0ebff",
    "#a5d8ff",
    "#74c0fc",
    "#4dabf7",
    "#339af0",
    "#228be6",
    "#1c7ed6",
    "#1971c2",
    "#1864ab"
  ],
  cyan: [
    "#e3fafc",
    "#c5f6fa",
    "#99e9f2",
    "#66d9e8",
    "#3bc9db",
    "#22b8cf",
    "#15aabf",
    "#1098ad",
    "#0c8599",
    "#0b7285"
  ],
  teal: [
    "#e6fcf5",
    "#c3fae8",
    "#96f2d7",
    "#63e6be",
    "#38d9a9",
    "#20c997",
    "#12b886",
    "#0ca678",
    "#099268",
    "#087f5b"
  ],
  green: [
    "#ebfbee",
    "#d3f9d8",
    "#b2f2bb",
    "#8ce99a",
    "#69db7c",
    "#51cf66",
    "#40c057",
    "#37b24d",
    "#2f9e44",
    "#2b8a3e"
  ],
  lime: [
    "#f4fce3",
    "#e9fac8",
    "#d8f5a2",
    "#c0eb75",
    "#a9e34b",
    "#94d82d",
    "#82c91e",
    "#74b816",
    "#66a80f",
    "#5c940d"
  ],
  yellow: [
    "#fff9db",
    "#fff3bf",
    "#ffec99",
    "#ffe066",
    "#ffd43b",
    "#fcc419",
    "#fab005",
    "#f59f00",
    "#f08c00",
    "#e67700"
  ],
  orange: [
    "#fff4e6",
    "#ffe8cc",
    "#ffd8a8",
    "#ffc078",
    "#ffa94d",
    "#ff922b",
    "#fd7e14",
    "#f76707",
    "#e8590c",
    "#d9480f"
  ]
};
function fontStyles(theme) {
  return () => ({ fontFamily: theme.fontFamily || "sans-serif" });
}
var __defProp$A = Object.defineProperty;
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
var __defNormalProp$A = (obj2, key, value) => key in obj2 ? __defProp$A(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$A = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$B.call(b2, prop))
      __defNormalProp$A(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$B)
    for (var prop of __getOwnPropSymbols$B(b2)) {
      if (__propIsEnum$B.call(b2, prop))
        __defNormalProp$A(a2, prop, b2[prop]);
    }
  return a2;
};
function focusStyles(theme) {
  return (selector) => ({
    WebkitTapHighlightColor: "transparent",
    [selector || "&:focus"]: __spreadValues$A({}, theme.focusRing === "always" || theme.focusRing === "auto" ? theme.focusRingStyles.styles(theme) : theme.focusRingStyles.resetStyles(theme)),
    [selector ? selector.replace(":focus", ":focus:not(:focus-visible)") : "&:focus:not(:focus-visible)"]: __spreadValues$A({}, theme.focusRing === "auto" || theme.focusRing === "never" ? theme.focusRingStyles.resetStyles(theme) : null)
  });
}
function primaryShade(theme) {
  return (colorScheme) => {
    if (typeof theme.primaryShade === "number") {
      return theme.primaryShade;
    }
    return theme.primaryShade[colorScheme || theme.colorScheme];
  };
}
function themeColor(theme) {
  const getPrimaryShade = primaryShade(theme);
  return (color2, shade, primaryFallback = true, useSplittedShade = true) => {
    if (typeof color2 === "string" && color2.includes(".")) {
      const [splitterColor, _splittedShade] = color2.split(".");
      const splittedShade = parseInt(_splittedShade, 10);
      if (splitterColor in theme.colors && splittedShade >= 0 && splittedShade < 10) {
        return theme.colors[splitterColor][typeof shade === "number" && !useSplittedShade ? shade : splittedShade];
      }
    }
    const _shade = typeof shade === "number" ? shade : getPrimaryShade();
    return color2 in theme.colors ? theme.colors[color2][_shade] : primaryFallback ? theme.colors[theme.primaryColor][_shade] : color2;
  };
}
function getGradientColorStops(colors) {
  let stops = "";
  for (let i = 1; i < colors.length - 1; i += 1) {
    stops += `${colors[i]} ${i / (colors.length - 1) * 100}%, `;
  }
  return `${colors[0]} 0%, ${stops}${colors[colors.length - 1]} 100%`;
}
function linearGradient$1(deg2, ...colors) {
  return `linear-gradient(${deg2}deg, ${getGradientColorStops(colors)})`;
}
function radialGradient$1(...colors) {
  return `radial-gradient(circle, ${getGradientColorStops(colors)})`;
}
function gradient(theme) {
  const getThemeColor = themeColor(theme);
  const getPrimaryShade = primaryShade(theme);
  return (payload) => {
    const merged = {
      from: (payload == null ? void 0 : payload.from) || theme.defaultGradient.from,
      to: (payload == null ? void 0 : payload.to) || theme.defaultGradient.to,
      deg: (payload == null ? void 0 : payload.deg) || theme.defaultGradient.deg
    };
    return `linear-gradient(${merged.deg}deg, ${getThemeColor(merged.from, getPrimaryShade(), false)} 0%, ${getThemeColor(merged.to, getPrimaryShade(), false)} 100%)`;
  };
}
function createConverter(units) {
  return (px) => {
    if (typeof px === "number") {
      return `${px / 16}${units}`;
    }
    if (typeof px === "string") {
      const replaced = px.replace("px", "");
      if (!Number.isNaN(Number(replaced))) {
        return `${Number(replaced) / 16}${units}`;
      }
    }
    return px;
  };
}
const rem = createConverter("rem");
const em = createConverter("em");
function getSize({
  size,
  sizes: sizes2,
  units
}) {
  if (size in sizes2) {
    return sizes2[size];
  }
  if (typeof size === "number") {
    return units === "em" ? em(size) : rem(size);
  }
  return size || sizes2.md;
}
function getBreakpointValue(value) {
  if (typeof value === "number") {
    return value;
  }
  if (typeof value === "string" && value.includes("rem")) {
    return Number(value.replace("rem", "")) * 16;
  }
  if (typeof value === "string" && value.includes("em")) {
    return Number(value.replace("em", "")) * 16;
  }
  return Number(value);
}
function largerThan(theme) {
  return (breakpoint) => `@media (min-width: ${em(getBreakpointValue(getSize({ size: breakpoint, sizes: theme.breakpoints })))})`;
}
function smallerThan(theme) {
  return (breakpoint) => `@media (max-width: ${em(getBreakpointValue(getSize({ size: breakpoint, sizes: theme.breakpoints })) - 1)})`;
}
function isHexColor(hex) {
  const HEX_REGEXP = /^#?([0-9A-F]{3}){1,2}$/i;
  return HEX_REGEXP.test(hex);
}
function hexToRgba(color2) {
  let hexString = color2.replace("#", "");
  if (hexString.length === 3) {
    const shorthandHex = hexString.split("");
    hexString = [
      shorthandHex[0],
      shorthandHex[0],
      shorthandHex[1],
      shorthandHex[1],
      shorthandHex[2],
      shorthandHex[2]
    ].join("");
  }
  const parsed = parseInt(hexString, 16);
  const r2 = parsed >> 16 & 255;
  const g2 = parsed >> 8 & 255;
  const b2 = parsed & 255;
  return {
    r: r2,
    g: g2,
    b: b2,
    a: 1
  };
}
function rgbStringToRgba(color2) {
  const [r2, g2, b2, a2] = color2.replace(/[^0-9,.]/g, "").split(",").map(Number);
  return { r: r2, g: g2, b: b2, a: a2 || 1 };
}
function toRgba(color2) {
  if (isHexColor(color2)) {
    return hexToRgba(color2);
  }
  if (color2.startsWith("rgb")) {
    return rgbStringToRgba(color2);
  }
  return {
    r: 0,
    g: 0,
    b: 0,
    a: 1
  };
}
function rgba(color2, alpha2) {
  if (typeof color2 !== "string" || alpha2 > 1 || alpha2 < 0) {
    return "rgba(0, 0, 0, 1)";
  }
  if (color2.startsWith("var(--")) {
    return color2;
  }
  const { r: r2, g: g2, b: b2 } = toRgba(color2);
  return `rgba(${r2}, ${g2}, ${b2}, ${alpha2})`;
}
function cover(offset2 = 0) {
  return {
    position: "absolute",
    top: rem(offset2),
    right: rem(offset2),
    left: rem(offset2),
    bottom: rem(offset2)
  };
}
function darken(color2, alpha2) {
  if (typeof color2 === "string" && color2.startsWith("var(--")) {
    return color2;
  }
  const { r: r2, g: g2, b: b2, a: a2 } = toRgba(color2);
  const f2 = 1 - alpha2;
  const dark2 = (input) => Math.round(input * f2);
  return `rgba(${dark2(r2)}, ${dark2(g2)}, ${dark2(b2)}, ${a2})`;
}
function lighten(color2, alpha2) {
  if (typeof color2 === "string" && color2.startsWith("var(--")) {
    return color2;
  }
  const { r: r2, g: g2, b: b2, a: a2 } = toRgba(color2);
  const light2 = (input) => Math.round(input + (255 - input) * alpha2);
  return `rgba(${light2(r2)}, ${light2(g2)}, ${light2(b2)}, ${a2})`;
}
function radius(theme) {
  return (size) => {
    if (typeof size === "number") {
      return rem(size);
    }
    const defaultRadius = typeof theme.defaultRadius === "number" ? theme.defaultRadius : theme.radius[theme.defaultRadius] || theme.defaultRadius;
    return theme.radius[size] || size || defaultRadius;
  };
}
function getColorIndexInfo(color2, theme) {
  if (typeof color2 === "string" && color2.includes(".")) {
    const [splittedColor, _splittedShade] = color2.split(".");
    const splittedShade = parseInt(_splittedShade, 10);
    if (splittedColor in theme.colors && splittedShade >= 0 && splittedShade < 10) {
      return { isSplittedColor: true, key: splittedColor, shade: splittedShade };
    }
  }
  return { isSplittedColor: false };
}
function variant(theme) {
  const getThemeColor = themeColor(theme);
  const getPrimaryShade = primaryShade(theme);
  const getGradient = gradient(theme);
  return ({ variant: variant2, color: color2, gradient: gradient2, primaryFallback }) => {
    const colorInfo = getColorIndexInfo(color2, theme);
    switch (variant2) {
      case "light": {
        return {
          border: "transparent",
          background: rgba(getThemeColor(color2, theme.colorScheme === "dark" ? 8 : 0, primaryFallback, false), theme.colorScheme === "dark" ? 0.2 : 1),
          color: color2 === "dark" ? theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.colors.dark[9] : getThemeColor(color2, theme.colorScheme === "dark" ? 2 : getPrimaryShade("light")),
          hover: rgba(getThemeColor(color2, theme.colorScheme === "dark" ? 7 : 1, primaryFallback, false), theme.colorScheme === "dark" ? 0.25 : 0.65)
        };
      }
      case "subtle": {
        return {
          border: "transparent",
          background: "transparent",
          color: color2 === "dark" ? theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.colors.dark[9] : getThemeColor(color2, theme.colorScheme === "dark" ? 2 : getPrimaryShade("light")),
          hover: rgba(getThemeColor(color2, theme.colorScheme === "dark" ? 8 : 0, primaryFallback, false), theme.colorScheme === "dark" ? 0.2 : 1)
        };
      }
      case "outline": {
        return {
          border: getThemeColor(color2, theme.colorScheme === "dark" ? 5 : getPrimaryShade("light")),
          background: "transparent",
          color: getThemeColor(color2, theme.colorScheme === "dark" ? 5 : getPrimaryShade("light")),
          hover: theme.colorScheme === "dark" ? rgba(getThemeColor(color2, 5, primaryFallback, false), 0.05) : rgba(getThemeColor(color2, 0, primaryFallback, false), 0.35)
        };
      }
      case "default": {
        return {
          border: theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[4],
          background: theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.white,
          color: theme.colorScheme === "dark" ? theme.white : theme.black,
          hover: theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[0]
        };
      }
      case "white": {
        return {
          border: "transparent",
          background: theme.white,
          color: getThemeColor(color2, getPrimaryShade()),
          hover: null
        };
      }
      case "transparent": {
        return {
          border: "transparent",
          color: color2 === "dark" ? theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.colors.dark[9] : getThemeColor(color2, theme.colorScheme === "dark" ? 2 : getPrimaryShade("light")),
          background: "transparent",
          hover: null
        };
      }
      case "gradient": {
        return {
          background: getGradient(gradient2),
          color: theme.white,
          border: "transparent",
          hover: null
        };
      }
      default: {
        const _primaryShade = getPrimaryShade();
        const _shade = colorInfo.isSplittedColor ? colorInfo.shade : _primaryShade;
        const _color = colorInfo.isSplittedColor ? colorInfo.key : color2;
        return {
          border: "transparent",
          background: getThemeColor(_color, _shade, primaryFallback),
          color: theme.white,
          hover: getThemeColor(_color, _shade === 9 ? 8 : _shade + 1)
        };
      }
    }
  };
}
function primaryColor(theme) {
  return (colorScheme) => {
    const shade = primaryShade(theme)(colorScheme);
    return theme.colors[theme.primaryColor][shade];
  };
}
function hover(hoverStyle) {
  return {
    "@media (hover: hover)": {
      "&:hover": hoverStyle
    },
    "@media (hover: none)": {
      "&:active": hoverStyle
    }
  };
}
function placeholderStyles(theme) {
  return () => ({
    userSelect: "none",
    color: theme.colorScheme === "dark" ? theme.colors.dark[3] : theme.colors.gray[5]
  });
}
function dimmed(theme) {
  return () => theme.colorScheme === "dark" ? theme.colors.dark[2] : theme.colors.gray[6];
}
const fns = {
  fontStyles,
  themeColor,
  focusStyles,
  linearGradient: linearGradient$1,
  radialGradient: radialGradient$1,
  smallerThan,
  largerThan,
  rgba,
  cover,
  darken,
  lighten,
  radius,
  variant,
  primaryShade,
  hover,
  gradient,
  primaryColor,
  placeholderStyles,
  dimmed
};
var __defProp$z = Object.defineProperty;
var __defProps$b = Object.defineProperties;
var __getOwnPropDescs$b = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
var __defNormalProp$z = (obj2, key, value) => key in obj2 ? __defProp$z(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$z = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$A.call(b2, prop))
      __defNormalProp$z(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$A)
    for (var prop of __getOwnPropSymbols$A(b2)) {
      if (__propIsEnum$A.call(b2, prop))
        __defNormalProp$z(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$b = (a2, b2) => __defProps$b(a2, __getOwnPropDescs$b(b2));
function attachFunctions(themeBase) {
  return __spreadProps$b(__spreadValues$z({}, themeBase), {
    fn: {
      fontStyles: fns.fontStyles(themeBase),
      themeColor: fns.themeColor(themeBase),
      focusStyles: fns.focusStyles(themeBase),
      largerThan: fns.largerThan(themeBase),
      smallerThan: fns.smallerThan(themeBase),
      radialGradient: fns.radialGradient,
      linearGradient: fns.linearGradient,
      gradient: fns.gradient(themeBase),
      rgba: fns.rgba,
      cover: fns.cover,
      lighten: fns.lighten,
      darken: fns.darken,
      primaryShade: fns.primaryShade(themeBase),
      radius: fns.radius(themeBase),
      variant: fns.variant(themeBase),
      hover: fns.hover,
      primaryColor: fns.primaryColor(themeBase),
      placeholderStyles: fns.placeholderStyles(themeBase),
      dimmed: fns.dimmed(themeBase)
    }
  });
}
const MANTINE_SIZES = ["xs", "sm", "md", "lg", "xl"];
const _DEFAULT_THEME = {
  dir: "ltr",
  primaryShade: {
    light: 6,
    dark: 8
  },
  focusRing: "auto",
  loader: "oval",
  colorScheme: "light",
  white: "#fff",
  black: "#000",
  defaultRadius: "sm",
  transitionTimingFunction: "ease",
  colors: DEFAULT_COLORS,
  lineHeight: 1.55,
  fontFamily: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
  fontFamilyMonospace: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace",
  primaryColor: "blue",
  respectReducedMotion: true,
  cursorType: "default",
  defaultGradient: {
    from: "indigo",
    to: "cyan",
    deg: 45
  },
  shadows: {
    xs: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1)",
    sm: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 0.625rem 0.9375rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.4375rem 0.4375rem -0.3125rem",
    md: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.25rem 1.5625rem -0.3125rem, rgba(0, 0, 0, 0.04) 0 0.625rem 0.625rem -0.3125rem",
    lg: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 1.75rem 1.4375rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 0.75rem 0.75rem -0.4375rem",
    xl: "0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 2.25rem 1.75rem -0.4375rem, rgba(0, 0, 0, 0.04) 0 1.0625rem 1.0625rem -0.4375rem"
  },
  fontSizes: {
    xs: "0.75rem",
    sm: "0.875rem",
    md: "1rem",
    lg: "1.125rem",
    xl: "1.25rem"
  },
  radius: {
    xs: "0.125rem",
    sm: "0.25rem",
    md: "0.5rem",
    lg: "1rem",
    xl: "2rem"
  },
  spacing: {
    xs: "0.625rem",
    sm: "0.75rem",
    md: "1rem",
    lg: "1.25rem",
    xl: "1.5rem"
  },
  breakpoints: {
    xs: "36em",
    sm: "48em",
    md: "62em",
    lg: "75em",
    xl: "88em"
  },
  headings: {
    fontFamily: "-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji",
    fontWeight: 700,
    sizes: {
      h1: { fontSize: "2.125rem", lineHeight: 1.3, fontWeight: void 0 },
      h2: { fontSize: "1.625rem", lineHeight: 1.35, fontWeight: void 0 },
      h3: { fontSize: "1.375rem", lineHeight: 1.4, fontWeight: void 0 },
      h4: { fontSize: "1.125rem", lineHeight: 1.45, fontWeight: void 0 },
      h5: { fontSize: "1rem", lineHeight: 1.5, fontWeight: void 0 },
      h6: { fontSize: "0.875rem", lineHeight: 1.5, fontWeight: void 0 }
    }
  },
  other: {},
  components: {},
  activeStyles: { transform: "translateY(0.0625rem)" },
  datesLocale: "en",
  globalStyles: void 0,
  focusRingStyles: {
    styles: (theme) => ({
      outlineOffset: "0.125rem",
      outline: `0.125rem solid ${theme.colors[theme.primaryColor][theme.colorScheme === "dark" ? 7 : 5]}`
    }),
    resetStyles: () => ({ outline: "none" }),
    inputStyles: (theme) => ({
      outline: "none",
      borderColor: theme.colors[theme.primaryColor][typeof theme.primaryShade === "object" ? theme.primaryShade[theme.colorScheme] : theme.primaryShade]
    })
  }
};
const DEFAULT_THEME = attachFunctions(_DEFAULT_THEME);
function filterProps(props) {
  return Object.keys(props).reduce((acc, key) => {
    if (props[key] !== void 0) {
      acc[key] = props[key];
    }
    return acc;
  }, {});
}
var __defProp$y = Object.defineProperty;
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
var __defNormalProp$y = (obj2, key, value) => key in obj2 ? __defProp$y(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$y = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$z.call(b2, prop))
      __defNormalProp$y(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$z)
    for (var prop of __getOwnPropSymbols$z(b2)) {
      if (__propIsEnum$z.call(b2, prop))
        __defNormalProp$y(a2, prop, b2[prop]);
    }
  return a2;
};
const MantineProviderContext = reactExports.createContext({
  theme: DEFAULT_THEME
});
function useMantineTheme() {
  var _a2;
  return ((_a2 = reactExports.useContext(MantineProviderContext)) == null ? void 0 : _a2.theme) || DEFAULT_THEME;
}
function useMantineProviderStyles(component) {
  const theme = useMantineTheme();
  const getStyles2 = (name) => {
    var _a2, _b, _c, _d;
    return {
      styles: ((_a2 = theme.components[name]) == null ? void 0 : _a2.styles) || {},
      classNames: ((_b = theme.components[name]) == null ? void 0 : _b.classNames) || {},
      variants: (_c = theme.components[name]) == null ? void 0 : _c.variants,
      sizes: (_d = theme.components[name]) == null ? void 0 : _d.sizes
    };
  };
  if (Array.isArray(component)) {
    return component.map(getStyles2);
  }
  return [getStyles2(component)];
}
function useMantineEmotionCache() {
  var _a2;
  return (_a2 = reactExports.useContext(MantineProviderContext)) == null ? void 0 : _a2.emotionCache;
}
function useComponentDefaultProps(component, defaultProps2, props) {
  var _a2;
  const theme = useMantineTheme();
  const contextPropsPayload = (_a2 = theme.components[component]) == null ? void 0 : _a2.defaultProps;
  const contextProps = typeof contextPropsPayload === "function" ? contextPropsPayload(theme) : contextPropsPayload;
  return __spreadValues$y(__spreadValues$y(__spreadValues$y({}, defaultProps2), contextProps), filterProps(props));
}
function useGuaranteedMemo(fn2, deps) {
  const ref2 = reactExports.useRef();
  if (!ref2.current || deps.length !== ref2.current.prevDeps.length || ref2.current.prevDeps.map((v2, i) => v2 === deps[i]).indexOf(false) >= 0) {
    ref2.current = {
      v: fn2(),
      prevDeps: [...deps]
    };
  }
  return ref2.current.v;
}
const defaultMantineEmotionCache = createCache({ key: "mantine", prepend: true });
function useEmotionCache() {
  const cache2 = useMantineEmotionCache();
  return cache2 || defaultMantineEmotionCache;
}
var __defProp$x = Object.defineProperty;
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
var __defNormalProp$x = (obj2, key, value) => key in obj2 ? __defProp$x(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$x = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$y.call(b2, prop))
      __defNormalProp$x(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$y)
    for (var prop of __getOwnPropSymbols$y(b2)) {
      if (__propIsEnum$y.call(b2, prop))
        __defNormalProp$x(a2, prop, b2[prop]);
    }
  return a2;
};
const refPropertyName = "ref";
function getRef(args) {
  let ref2;
  if (args.length !== 1) {
    return { args, ref: ref2 };
  }
  const [arg] = args;
  if (!(arg instanceof Object)) {
    return { args, ref: ref2 };
  }
  if (!(refPropertyName in arg)) {
    return { args, ref: ref2 };
  }
  ref2 = arg[refPropertyName];
  const argCopy = __spreadValues$x({}, arg);
  delete argCopy[refPropertyName];
  return { args: [argCopy], ref: ref2 };
}
const { cssFactory } = /* @__PURE__ */ (() => {
  function merge2(registered, css2, className) {
    const registeredStyles = [];
    const rawClassName = getRegisteredStyles(registered, registeredStyles, className);
    if (registeredStyles.length < 2) {
      return className;
    }
    return rawClassName + css2(registeredStyles);
  }
  function _cssFactory(params2) {
    const { cache: cache2 } = params2;
    const css2 = (...styles2) => {
      const { ref: ref2, args } = getRef(styles2);
      const serialized = serializeStyles(args, cache2.registered);
      insertStyles(cache2, serialized, false);
      return `${cache2.key}-${serialized.name}${ref2 === void 0 ? "" : ` ${ref2}`}`;
    };
    const cx = (...args) => merge2(cache2.registered, css2, clsx(args));
    return { css: css2, cx };
  }
  return { cssFactory: _cssFactory };
})();
function useCss() {
  const cache2 = useEmotionCache();
  return useGuaranteedMemo(() => cssFactory({ cache: cache2 }), [cache2]);
}
function mergeClassNames({
  cx,
  classes,
  context,
  classNames,
  name,
  cache: cache2
}) {
  const contextClassNames = context.reduce((acc, item) => {
    Object.keys(item.classNames).forEach((key) => {
      if (typeof acc[key] !== "string") {
        acc[key] = `${item.classNames[key]}`;
      } else {
        acc[key] = `${acc[key]} ${item.classNames[key]}`;
      }
    });
    return acc;
  }, {});
  return Object.keys(classes).reduce((acc, className) => {
    acc[className] = cx(classes[className], contextClassNames[className], classNames != null && classNames[className], Array.isArray(name) ? name.filter(Boolean).map((part) => `${(cache2 == null ? void 0 : cache2.key) || "mantine"}-${part}-${className}`).join(" ") : name ? `${(cache2 == null ? void 0 : cache2.key) || "mantine"}-${name}-${className}` : null);
    return acc;
  }, {});
}
var __defProp$w = Object.defineProperty;
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
var __defNormalProp$w = (obj2, key, value) => key in obj2 ? __defProp$w(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$w = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$x.call(b2, prop))
      __defNormalProp$w(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$x)
    for (var prop of __getOwnPropSymbols$x(b2)) {
      if (__propIsEnum$x.call(b2, prop))
        __defNormalProp$w(a2, prop, b2[prop]);
    }
  return a2;
};
function assignAccStyles(acc, styles2) {
  if (styles2) {
    Object.keys(styles2).forEach((key) => {
      if (!acc[key]) {
        acc[key] = __spreadValues$w({}, styles2[key]);
      } else {
        acc[key] = __spreadValues$w(__spreadValues$w({}, acc[key]), styles2[key]);
      }
    });
  }
  return acc;
}
function getStyles(styles2, theme, params2, contextParams) {
  const extractStyles = (stylesPartial) => typeof stylesPartial === "function" ? stylesPartial(theme, params2 || {}, contextParams) : stylesPartial || {};
  if (Array.isArray(styles2)) {
    return styles2.map((item) => extractStyles(item.styles)).reduce((acc, item) => assignAccStyles(acc, item), {});
  }
  return extractStyles(styles2);
}
function getContextVariation({ ctx, theme, params: params2, variant: variant2, size }) {
  return ctx.reduce((acc, item) => {
    if (item.variants && variant2 in item.variants) {
      assignAccStyles(acc, item.variants[variant2](theme, params2, { variant: variant2, size }));
    }
    if (item.sizes && size in item.sizes) {
      assignAccStyles(acc, item.sizes[size](theme, params2, { variant: variant2, size }));
    }
    return acc;
  }, {});
}
function createStyles$1(input) {
  const getCssObject = typeof input === "function" ? input : () => input;
  function useStyles2(params2, options) {
    const theme = useMantineTheme();
    const context = useMantineProviderStyles(options == null ? void 0 : options.name);
    const cache2 = useMantineEmotionCache();
    const contextParams = { variant: options == null ? void 0 : options.variant, size: options == null ? void 0 : options.size };
    const { css: css2, cx } = useCss();
    const cssObject = getCssObject(theme, params2, contextParams);
    const componentStyles = getStyles(options == null ? void 0 : options.styles, theme, params2, contextParams);
    const providerStyles = getStyles(context, theme, params2, contextParams);
    const contextVariations = getContextVariation({
      ctx: context,
      theme,
      params: params2,
      variant: options == null ? void 0 : options.variant,
      size: options == null ? void 0 : options.size
    });
    const classes = Object.fromEntries(Object.keys(cssObject).map((key) => {
      const mergedStyles = cx({ [css2(cssObject[key])]: !(options == null ? void 0 : options.unstyled) }, css2(contextVariations[key]), css2(providerStyles[key]), css2(componentStyles[key]));
      return [key, mergedStyles];
    }));
    return {
      classes: mergeClassNames({
        cx,
        classes,
        context,
        classNames: options == null ? void 0 : options.classNames,
        name: options == null ? void 0 : options.name,
        cache: cache2
      }),
      cx,
      theme
    };
  }
  return useStyles2;
}
const useIsomorphicEffect = typeof document !== "undefined" ? reactExports.useLayoutEffect : reactExports.useEffect;
function randomId() {
  return `mantine-${Math.random().toString(36).slice(2, 11)}`;
}
const __useId = React["useId".toString()] || (() => void 0);
function useReactId() {
  const id = __useId();
  return id ? `mantine-${id.replace(/:/g, "")}` : "";
}
function useId(staticId) {
  const reactId = useReactId();
  const [uuid2, setUuid] = reactExports.useState(reactId);
  useIsomorphicEffect(() => {
    setUuid(randomId());
  }, []);
  if (typeof staticId === "string") {
    return staticId;
  }
  if (typeof window === "undefined") {
    return reactId;
  }
  return uuid2;
}
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
var __objRest$k = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$w)
    for (var prop of __getOwnPropSymbols$w(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function extractSystemStyles(others) {
  const _a2 = others, {
    m: m2,
    mx,
    my,
    mt,
    mb,
    ml,
    mr,
    p: p2,
    px,
    py,
    pt,
    pb,
    pl,
    pr,
    bg,
    c,
    opacity: opacity2,
    ff,
    fz,
    fw,
    lts,
    ta,
    lh,
    fs,
    tt,
    td,
    w,
    miw,
    maw,
    h: h2,
    mih,
    mah,
    bgsz,
    bgp,
    bgr,
    bga,
    pos,
    top: top2,
    left: left2,
    bottom: bottom2,
    right: right2,
    inset,
    display: display2
  } = _a2, rest = __objRest$k(_a2, [
    "m",
    "mx",
    "my",
    "mt",
    "mb",
    "ml",
    "mr",
    "p",
    "px",
    "py",
    "pt",
    "pb",
    "pl",
    "pr",
    "bg",
    "c",
    "opacity",
    "ff",
    "fz",
    "fw",
    "lts",
    "ta",
    "lh",
    "fs",
    "tt",
    "td",
    "w",
    "miw",
    "maw",
    "h",
    "mih",
    "mah",
    "bgsz",
    "bgp",
    "bgr",
    "bga",
    "pos",
    "top",
    "left",
    "bottom",
    "right",
    "inset",
    "display"
  ]);
  const systemStyles = filterProps({
    m: m2,
    mx,
    my,
    mt,
    mb,
    ml,
    mr,
    p: p2,
    px,
    py,
    pt,
    pb,
    pl,
    pr,
    bg,
    c,
    opacity: opacity2,
    ff,
    fz,
    fw,
    lts,
    ta,
    lh,
    fs,
    tt,
    td,
    w,
    miw,
    maw,
    h: h2,
    mih,
    mah,
    bgsz,
    bgp,
    bgr,
    bga,
    pos,
    top: top2,
    left: left2,
    bottom: bottom2,
    right: right2,
    inset,
    display: display2
  });
  return { systemStyles, rest };
}
function getSortedKeys(value, theme) {
  const sorted = Object.keys(value).filter((breakpoint) => breakpoint !== "base").sort((a2, b2) => getBreakpointValue(getSize({ size: a2, sizes: theme.breakpoints })) - getBreakpointValue(getSize({ size: b2, sizes: theme.breakpoints })));
  return "base" in value ? ["base", ...sorted] : sorted;
}
function getResponsiveValue({ value, theme, getValue: getValue2, property }) {
  if (value == null) {
    return void 0;
  }
  if (typeof value === "object") {
    const result = getSortedKeys(value, theme).reduce((acc, breakpointKey) => {
      if (breakpointKey === "base" && value.base !== void 0) {
        const baseValue = getValue2(value.base, theme);
        if (Array.isArray(property)) {
          property.forEach((prop) => {
            acc[prop] = baseValue;
          });
          return acc;
        }
        acc[property] = baseValue;
        return acc;
      }
      const breakpointValue = getValue2(value[breakpointKey], theme);
      if (Array.isArray(property)) {
        acc[theme.fn.largerThan(breakpointKey)] = {};
        property.forEach((prop) => {
          acc[theme.fn.largerThan(breakpointKey)][prop] = breakpointValue;
        });
        return acc;
      }
      acc[theme.fn.largerThan(breakpointKey)] = {
        [property]: breakpointValue
      };
      return acc;
    }, {});
    return result;
  }
  const cssValue = getValue2(value, theme);
  if (Array.isArray(property)) {
    return property.reduce((acc, prop) => {
      acc[prop] = cssValue;
      return acc;
    }, {});
  }
  return { [property]: cssValue };
}
function getColorValue(color2, theme) {
  if (color2 === "dimmed") {
    return theme.colorScheme === "dark" ? theme.colors.dark[2] : theme.colors.gray[6];
  }
  return theme.fn.variant({ variant: "filled", color: color2, primaryFallback: false }).background;
}
function getSizeValue(value) {
  return rem(value);
}
function identity(value) {
  return value;
}
function getFontSizeValue(size, theme) {
  return getSize({ size, sizes: theme.fontSizes });
}
const NEGATIVE_VALUES = ["-xs", "-sm", "-md", "-lg", "-xl"];
function getSpacingValue(size, theme) {
  if (NEGATIVE_VALUES.includes(size)) {
    return `calc(${getSize({
      size: size.replace("-", ""),
      sizes: theme.spacing
    })} * -1)`;
  }
  return getSize({ size, sizes: theme.spacing });
}
const valueGetters = {
  identity,
  color: getColorValue,
  size: getSizeValue,
  fontSize: getFontSizeValue,
  spacing: getSpacingValue
};
const SYSTEM_PROPS = {
  m: { type: "spacing", property: "margin" },
  mt: { type: "spacing", property: "marginTop" },
  mb: { type: "spacing", property: "marginBottom" },
  ml: { type: "spacing", property: "marginLeft" },
  mr: { type: "spacing", property: "marginRight" },
  mx: { type: "spacing", property: ["marginRight", "marginLeft"] },
  my: { type: "spacing", property: ["marginTop", "marginBottom"] },
  p: { type: "spacing", property: "padding" },
  pt: { type: "spacing", property: "paddingTop" },
  pb: { type: "spacing", property: "paddingBottom" },
  pl: { type: "spacing", property: "paddingLeft" },
  pr: { type: "spacing", property: "paddingRight" },
  px: { type: "spacing", property: ["paddingRight", "paddingLeft"] },
  py: { type: "spacing", property: ["paddingTop", "paddingBottom"] },
  bg: { type: "color", property: "background" },
  c: { type: "color", property: "color" },
  opacity: { type: "identity", property: "opacity" },
  ff: { type: "identity", property: "fontFamily" },
  fz: { type: "fontSize", property: "fontSize" },
  fw: { type: "identity", property: "fontWeight" },
  lts: { type: "size", property: "letterSpacing" },
  ta: { type: "identity", property: "textAlign" },
  lh: { type: "identity", property: "lineHeight" },
  fs: { type: "identity", property: "fontStyle" },
  tt: { type: "identity", property: "textTransform" },
  td: { type: "identity", property: "textDecoration" },
  w: { type: "spacing", property: "width" },
  miw: { type: "spacing", property: "minWidth" },
  maw: { type: "spacing", property: "maxWidth" },
  h: { type: "spacing", property: "height" },
  mih: { type: "spacing", property: "minHeight" },
  mah: { type: "spacing", property: "maxHeight" },
  bgsz: { type: "size", property: "backgroundSize" },
  bgp: { type: "identity", property: "backgroundPosition" },
  bgr: { type: "identity", property: "backgroundRepeat" },
  bga: { type: "identity", property: "backgroundAttachment" },
  pos: { type: "identity", property: "position" },
  top: { type: "identity", property: "top" },
  left: { type: "size", property: "left" },
  bottom: { type: "size", property: "bottom" },
  right: { type: "size", property: "right" },
  inset: { type: "size", property: "inset" },
  display: { type: "identity", property: "display" }
};
var __defProp$v = Object.defineProperty;
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
var __defNormalProp$v = (obj2, key, value) => key in obj2 ? __defProp$v(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$v = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$v.call(b2, prop))
      __defNormalProp$v(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$v)
    for (var prop of __getOwnPropSymbols$v(b2)) {
      if (__propIsEnum$v.call(b2, prop))
        __defNormalProp$v(a2, prop, b2[prop]);
    }
  return a2;
};
function getSystemStyles(systemStyles, theme, systemProps = SYSTEM_PROPS) {
  const styles2 = Object.keys(systemProps).reduce((acc, systemProp) => {
    if (systemProp in systemStyles && systemStyles[systemProp] !== void 0) {
      acc.push(getResponsiveValue({
        value: systemStyles[systemProp],
        getValue: valueGetters[systemProps[systemProp].type],
        property: systemProps[systemProp].property,
        theme
      }));
    }
    return acc;
  }, []);
  return styles2.reduce((acc, stylesPartial) => {
    Object.keys(stylesPartial).forEach((property) => {
      if (typeof stylesPartial[property] === "object" && stylesPartial[property] !== null) {
        if (!(property in acc)) {
          acc[property] = stylesPartial[property];
        } else {
          acc[property] = __spreadValues$v(__spreadValues$v({}, acc[property]), stylesPartial[property]);
        }
      } else {
        acc[property] = stylesPartial[property];
      }
    });
    return acc;
  }, {});
}
function extractSx(sx, theme) {
  return typeof sx === "function" ? sx(theme) : sx;
}
function useSx(sx, systemProps, className) {
  const theme = useMantineTheme();
  const { css: css2, cx } = useCss();
  if (Array.isArray(sx)) {
    return cx(className, css2(getSystemStyles(systemProps, theme)), sx.map((partial) => css2(extractSx(partial, theme))));
  }
  return cx(className, css2(extractSx(sx, theme)), css2(getSystemStyles(systemProps, theme)));
}
var __defProp$u = Object.defineProperty;
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
var __defNormalProp$u = (obj2, key, value) => key in obj2 ? __defProp$u(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$u = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$u.call(b2, prop))
      __defNormalProp$u(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$u)
    for (var prop of __getOwnPropSymbols$u(b2)) {
      if (__propIsEnum$u.call(b2, prop))
        __defNormalProp$u(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$j = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$u)
    for (var prop of __getOwnPropSymbols$u(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const _Box = reactExports.forwardRef((_a2, ref2) => {
  var _b = _a2, { className, component, style: style2, sx } = _b, others = __objRest$j(_b, ["className", "component", "style", "sx"]);
  const { systemStyles, rest } = extractSystemStyles(others);
  const Element2 = component || "div";
  return /* @__PURE__ */ React.createElement(Element2, __spreadValues$u({
    ref: ref2,
    className: useSx(sx, systemStyles, className),
    style: style2
  }, rest));
});
_Box.displayName = "@mantine/core/Box";
const Box = createPolymorphicComponent(_Box);
var __defProp$t = Object.defineProperty;
var __defProps$a = Object.defineProperties;
var __getOwnPropDescs$a = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
var __defNormalProp$t = (obj2, key, value) => key in obj2 ? __defProp$t(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$t = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$t.call(b2, prop))
      __defNormalProp$t(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$t)
    for (var prop of __getOwnPropSymbols$t(b2)) {
      if (__propIsEnum$t.call(b2, prop))
        __defNormalProp$t(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$a = (a2, b2) => __defProps$a(a2, __getOwnPropDescs$a(b2));
var useStyles$b = createStyles$1((theme) => ({
  root: __spreadProps$a(__spreadValues$t(__spreadValues$t({}, theme.fn.focusStyles()), theme.fn.fontStyles()), {
    cursor: "pointer",
    border: 0,
    padding: 0,
    appearance: "none",
    fontSize: theme.fontSizes.md,
    backgroundColor: "transparent",
    textAlign: "left",
    color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black,
    textDecoration: "none",
    boxSizing: "border-box"
  })
}));
var __defProp$s = Object.defineProperty;
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
var __defNormalProp$s = (obj2, key, value) => key in obj2 ? __defProp$s(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$s = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$s.call(b2, prop))
      __defNormalProp$s(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$s)
    for (var prop of __getOwnPropSymbols$s(b2)) {
      if (__propIsEnum$s.call(b2, prop))
        __defNormalProp$s(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$i = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$s)
    for (var prop of __getOwnPropSymbols$s(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const _UnstyledButton = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("UnstyledButton", {}, props), {
    className,
    component = "button",
    unstyled,
    variant: variant2
  } = _a2, others = __objRest$i(_a2, [
    "className",
    "component",
    "unstyled",
    "variant"
  ]);
  const { classes, cx } = useStyles$b(null, { name: "UnstyledButton", unstyled, variant: variant2 });
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$s({
    component,
    ref: ref2,
    className: cx(classes.root, className),
    type: component === "button" ? "button" : void 0
  }, others));
});
_UnstyledButton.displayName = "@mantine/core/UnstyledButton";
const UnstyledButton = createPolymorphicComponent(_UnstyledButton);
var __defProp$r = Object.defineProperty;
var __getOwnPropSymbols$r = Object.getOwnPropertySymbols;
var __hasOwnProp$r = Object.prototype.hasOwnProperty;
var __propIsEnum$r = Object.prototype.propertyIsEnumerable;
var __defNormalProp$r = (obj2, key, value) => key in obj2 ? __defProp$r(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$r = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$r.call(b2, prop))
      __defNormalProp$r(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$r)
    for (var prop of __getOwnPropSymbols$r(b2)) {
      if (__propIsEnum$r.call(b2, prop))
        __defNormalProp$r(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$h = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$r.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$r)
    for (var prop of __getOwnPropSymbols$r(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$r.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function Bars(_a2) {
  var _b = _a2, { size, color: color2 } = _b, others = __objRest$h(_b, ["size", "color"]);
  const _a22 = others, { style: style2 } = _a22, rest = __objRest$h(_a22, ["style"]);
  return /* @__PURE__ */ React.createElement("svg", __spreadValues$r({
    viewBox: "0 0 135 140",
    xmlns: "http://www.w3.org/2000/svg",
    fill: color2,
    style: __spreadValues$r({ width: size }, style2)
  }, rest), /* @__PURE__ */ React.createElement("rect", {
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "height",
    begin: "0.5s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "y",
    begin: "0.5s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ React.createElement("rect", {
    x: "30",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "height",
    begin: "0.25s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "y",
    begin: "0.25s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ React.createElement("rect", {
    x: "60",
    width: "15",
    height: "140",
    rx: "6"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "height",
    begin: "0s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "y",
    begin: "0s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ React.createElement("rect", {
    x: "90",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "height",
    begin: "0.25s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "y",
    begin: "0.25s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ React.createElement("rect", {
    x: "120",
    y: "10",
    width: "15",
    height: "120",
    rx: "6"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "height",
    begin: "0.5s",
    dur: "1s",
    values: "120;110;100;90;80;70;60;50;40;140;120",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "y",
    begin: "0.5s",
    dur: "1s",
    values: "10;15;20;25;30;35;40;45;50;0;10",
    calcMode: "linear",
    repeatCount: "indefinite"
  })));
}
var __defProp$q = Object.defineProperty;
var __getOwnPropSymbols$q = Object.getOwnPropertySymbols;
var __hasOwnProp$q = Object.prototype.hasOwnProperty;
var __propIsEnum$q = Object.prototype.propertyIsEnumerable;
var __defNormalProp$q = (obj2, key, value) => key in obj2 ? __defProp$q(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$q = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$q.call(b2, prop))
      __defNormalProp$q(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$q)
    for (var prop of __getOwnPropSymbols$q(b2)) {
      if (__propIsEnum$q.call(b2, prop))
        __defNormalProp$q(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$g = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$q.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$q)
    for (var prop of __getOwnPropSymbols$q(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$q.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function Oval(_a2) {
  var _b = _a2, { size, color: color2 } = _b, others = __objRest$g(_b, ["size", "color"]);
  const _a22 = others, { style: style2 } = _a22, rest = __objRest$g(_a22, ["style"]);
  return /* @__PURE__ */ React.createElement("svg", __spreadValues$q({
    viewBox: "0 0 38 38",
    xmlns: "http://www.w3.org/2000/svg",
    stroke: color2,
    style: __spreadValues$q({ width: size, height: size }, style2)
  }, rest), /* @__PURE__ */ React.createElement("g", {
    fill: "none",
    fillRule: "evenodd"
  }, /* @__PURE__ */ React.createElement("g", {
    transform: "translate(2.5 2.5)",
    strokeWidth: "5"
  }, /* @__PURE__ */ React.createElement("circle", {
    strokeOpacity: ".5",
    cx: "16",
    cy: "16",
    r: "16"
  }), /* @__PURE__ */ React.createElement("path", {
    d: "M32 16c0-9.94-8.06-16-16-16"
  }, /* @__PURE__ */ React.createElement("animateTransform", {
    attributeName: "transform",
    type: "rotate",
    from: "0 16 16",
    to: "360 16 16",
    dur: "1s",
    repeatCount: "indefinite"
  })))));
}
var __defProp$p = Object.defineProperty;
var __getOwnPropSymbols$p = Object.getOwnPropertySymbols;
var __hasOwnProp$p = Object.prototype.hasOwnProperty;
var __propIsEnum$p = Object.prototype.propertyIsEnumerable;
var __defNormalProp$p = (obj2, key, value) => key in obj2 ? __defProp$p(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$p = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$p.call(b2, prop))
      __defNormalProp$p(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$p)
    for (var prop of __getOwnPropSymbols$p(b2)) {
      if (__propIsEnum$p.call(b2, prop))
        __defNormalProp$p(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$f = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$p.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$p)
    for (var prop of __getOwnPropSymbols$p(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$p.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function Dots(_a2) {
  var _b = _a2, { size, color: color2 } = _b, others = __objRest$f(_b, ["size", "color"]);
  const _a22 = others, { style: style2 } = _a22, rest = __objRest$f(_a22, ["style"]);
  return /* @__PURE__ */ React.createElement("svg", __spreadValues$p({
    viewBox: "0 0 120 30",
    xmlns: "http://www.w3.org/2000/svg",
    fill: color2,
    style: __spreadValues$p({ width: size }, style2)
  }, rest), /* @__PURE__ */ React.createElement("circle", {
    cx: "15",
    cy: "15",
    r: "15"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "r",
    from: "15",
    to: "15",
    begin: "0s",
    dur: "0.8s",
    values: "15;9;15",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "fill-opacity",
    from: "1",
    to: "1",
    begin: "0s",
    dur: "0.8s",
    values: "1;.5;1",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ React.createElement("circle", {
    cx: "60",
    cy: "15",
    r: "9",
    fillOpacity: "0.3"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "r",
    from: "9",
    to: "9",
    begin: "0s",
    dur: "0.8s",
    values: "9;15;9",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "fill-opacity",
    from: "0.5",
    to: "0.5",
    begin: "0s",
    dur: "0.8s",
    values: ".5;1;.5",
    calcMode: "linear",
    repeatCount: "indefinite"
  })), /* @__PURE__ */ React.createElement("circle", {
    cx: "105",
    cy: "15",
    r: "15"
  }, /* @__PURE__ */ React.createElement("animate", {
    attributeName: "r",
    from: "15",
    to: "15",
    begin: "0s",
    dur: "0.8s",
    values: "15;9;15",
    calcMode: "linear",
    repeatCount: "indefinite"
  }), /* @__PURE__ */ React.createElement("animate", {
    attributeName: "fill-opacity",
    from: "1",
    to: "1",
    begin: "0s",
    dur: "0.8s",
    values: "1;.5;1",
    calcMode: "linear",
    repeatCount: "indefinite"
  })));
}
var __defProp$o = Object.defineProperty;
var __getOwnPropSymbols$o = Object.getOwnPropertySymbols;
var __hasOwnProp$o = Object.prototype.hasOwnProperty;
var __propIsEnum$o = Object.prototype.propertyIsEnumerable;
var __defNormalProp$o = (obj2, key, value) => key in obj2 ? __defProp$o(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$o = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$o.call(b2, prop))
      __defNormalProp$o(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$o)
    for (var prop of __getOwnPropSymbols$o(b2)) {
      if (__propIsEnum$o.call(b2, prop))
        __defNormalProp$o(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$e = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$o.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$o)
    for (var prop of __getOwnPropSymbols$o(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$o.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const LOADERS = {
  bars: Bars,
  oval: Oval,
  dots: Dots
};
const sizes$2 = {
  xs: rem(18),
  sm: rem(22),
  md: rem(36),
  lg: rem(44),
  xl: rem(58)
};
const defaultProps$d = {
  size: "md"
};
function Loader(props) {
  const _a2 = useComponentDefaultProps("Loader", defaultProps$d, props), { size, color: color2, variant: variant2 } = _a2, others = __objRest$e(_a2, ["size", "color", "variant"]);
  const theme = useMantineTheme();
  const defaultLoader = variant2 in LOADERS ? variant2 : theme.loader;
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$o({
    role: "presentation",
    component: LOADERS[defaultLoader] || LOADERS.bars,
    size: getSize({ size, sizes: sizes$2 }),
    color: theme.fn.variant({
      variant: "filled",
      primaryFallback: false,
      color: color2 || theme.primaryColor
    }).background
  }, others));
}
Loader.displayName = "@mantine/core/Loader";
var __defProp$n = Object.defineProperty;
var __defProps$9 = Object.defineProperties;
var __getOwnPropDescs$9 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$n = Object.getOwnPropertySymbols;
var __hasOwnProp$n = Object.prototype.hasOwnProperty;
var __propIsEnum$n = Object.prototype.propertyIsEnumerable;
var __defNormalProp$n = (obj2, key, value) => key in obj2 ? __defProp$n(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$n = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$n.call(b2, prop))
      __defNormalProp$n(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$n)
    for (var prop of __getOwnPropSymbols$n(b2)) {
      if (__propIsEnum$n.call(b2, prop))
        __defNormalProp$n(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$9 = (a2, b2) => __defProps$9(a2, __getOwnPropDescs$9(b2));
function getTextDecoration({
  underline,
  strikethrough
}) {
  const styles2 = [];
  if (underline) {
    styles2.push("underline");
  }
  if (strikethrough) {
    styles2.push("line-through");
  }
  return styles2.length > 0 ? styles2.join(" ") : "none";
}
function getTextColor({ theme, color: color2 }) {
  if (color2 === "dimmed") {
    return theme.fn.dimmed();
  }
  return typeof color2 === "string" && (color2 in theme.colors || color2.split(".")[0] in theme.colors) ? theme.fn.variant({ variant: "filled", color: color2 }).background : color2 || "inherit";
}
function getLineClamp(lineClamp) {
  if (typeof lineClamp === "number") {
    return {
      overflow: "hidden",
      textOverflow: "ellipsis",
      display: "-webkit-box",
      WebkitLineClamp: lineClamp,
      WebkitBoxOrient: "vertical"
    };
  }
  return null;
}
function getTruncate({ theme, truncate }) {
  if (truncate === "start") {
    return {
      overflow: "hidden",
      textOverflow: "ellipsis",
      whiteSpace: "nowrap",
      direction: theme.dir === "ltr" ? "rtl" : "ltr",
      textAlign: theme.dir === "ltr" ? "right" : "left"
    };
  }
  if (truncate) {
    return {
      overflow: "hidden",
      textOverflow: "ellipsis",
      whiteSpace: "nowrap"
    };
  }
  return null;
}
var useStyles$a = createStyles$1((theme, {
  color: color2,
  lineClamp,
  truncate,
  inline,
  inherit,
  underline,
  gradient: gradient2,
  weight,
  transform: transform2,
  align,
  strikethrough,
  italic
}, { size }) => {
  const colors = theme.fn.variant({ variant: "gradient", gradient: gradient2 });
  return {
    root: __spreadProps$9(__spreadValues$n(__spreadValues$n(__spreadValues$n(__spreadValues$n({}, theme.fn.fontStyles()), theme.fn.focusStyles()), getLineClamp(lineClamp)), getTruncate({ theme, truncate })), {
      color: getTextColor({ color: color2, theme }),
      fontFamily: inherit ? "inherit" : theme.fontFamily,
      fontSize: inherit || size === void 0 ? "inherit" : getSize({ size, sizes: theme.fontSizes }),
      lineHeight: inherit ? "inherit" : inline ? 1 : theme.lineHeight,
      textDecoration: getTextDecoration({ underline, strikethrough }),
      WebkitTapHighlightColor: "transparent",
      fontWeight: inherit ? "inherit" : weight,
      textTransform: transform2,
      textAlign: align,
      fontStyle: italic ? "italic" : void 0
    }),
    gradient: {
      backgroundImage: colors.background,
      WebkitBackgroundClip: "text",
      WebkitTextFillColor: "transparent"
    }
  };
});
var __defProp$m = Object.defineProperty;
var __getOwnPropSymbols$m = Object.getOwnPropertySymbols;
var __hasOwnProp$m = Object.prototype.hasOwnProperty;
var __propIsEnum$m = Object.prototype.propertyIsEnumerable;
var __defNormalProp$m = (obj2, key, value) => key in obj2 ? __defProp$m(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$m = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$m.call(b2, prop))
      __defNormalProp$m(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$m)
    for (var prop of __getOwnPropSymbols$m(b2)) {
      if (__propIsEnum$m.call(b2, prop))
        __defNormalProp$m(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$d = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$m.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$m)
    for (var prop of __getOwnPropSymbols$m(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$m.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$c = {
  variant: "text"
};
const _Text = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("Text", defaultProps$c, props), {
    className,
    size,
    weight,
    transform: transform2,
    color: color2,
    align,
    variant: variant2,
    lineClamp,
    truncate,
    gradient: gradient2,
    inline,
    inherit,
    underline,
    strikethrough,
    italic,
    classNames,
    styles: styles2,
    unstyled,
    span,
    __staticSelector
  } = _a2, others = __objRest$d(_a2, [
    "className",
    "size",
    "weight",
    "transform",
    "color",
    "align",
    "variant",
    "lineClamp",
    "truncate",
    "gradient",
    "inline",
    "inherit",
    "underline",
    "strikethrough",
    "italic",
    "classNames",
    "styles",
    "unstyled",
    "span",
    "__staticSelector"
  ]);
  const { classes, cx } = useStyles$a({
    color: color2,
    lineClamp,
    truncate,
    inline,
    inherit,
    underline,
    strikethrough,
    italic,
    weight,
    transform: transform2,
    align,
    gradient: gradient2
  }, { unstyled, name: __staticSelector || "Text", variant: variant2, size });
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$m({
    ref: ref2,
    className: cx(classes.root, { [classes.gradient]: variant2 === "gradient" }, className),
    component: span ? "span" : "div"
  }, others));
});
_Text.displayName = "@mantine/core/Text";
const Text = createPolymorphicComponent(_Text);
var __defProp$l = Object.defineProperty;
var __defProps$8 = Object.defineProperties;
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$l = Object.getOwnPropertySymbols;
var __hasOwnProp$l = Object.prototype.hasOwnProperty;
var __propIsEnum$l = Object.prototype.propertyIsEnumerable;
var __defNormalProp$l = (obj2, key, value) => key in obj2 ? __defProp$l(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$l = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$l.call(b2, prop))
      __defNormalProp$l(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$l)
    for (var prop of __getOwnPropSymbols$l(b2)) {
      if (__propIsEnum$l.call(b2, prop))
        __defNormalProp$l(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$8 = (a2, b2) => __defProps$8(a2, __getOwnPropDescs$8(b2));
var __objRest$c = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$l.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$l)
    for (var prop of __getOwnPropSymbols$l(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$l.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
function useInputProps(component, defaultProps2, props) {
  const _a2 = useComponentDefaultProps(component, defaultProps2, props), {
    label,
    description,
    error,
    required,
    classNames,
    styles: styles2,
    className,
    unstyled,
    __staticSelector,
    sx,
    errorProps,
    labelProps,
    descriptionProps,
    wrapperProps: _wrapperProps,
    id,
    size,
    style: style2,
    inputContainer,
    inputWrapperOrder,
    withAsterisk,
    variant: variant2
  } = _a2, others = __objRest$c(_a2, [
    "label",
    "description",
    "error",
    "required",
    "classNames",
    "styles",
    "className",
    "unstyled",
    "__staticSelector",
    "sx",
    "errorProps",
    "labelProps",
    "descriptionProps",
    "wrapperProps",
    "id",
    "size",
    "style",
    "inputContainer",
    "inputWrapperOrder",
    "withAsterisk",
    "variant"
  ]);
  const uid = useId(id);
  const { systemStyles, rest } = extractSystemStyles(others);
  const wrapperProps = __spreadValues$l({
    label,
    description,
    error,
    required,
    classNames,
    className,
    __staticSelector,
    sx,
    errorProps,
    labelProps,
    descriptionProps,
    unstyled,
    styles: styles2,
    id: uid,
    size,
    style: style2,
    inputContainer,
    inputWrapperOrder,
    withAsterisk,
    variant: variant2
  }, _wrapperProps);
  return __spreadProps$8(__spreadValues$l({}, rest), {
    classNames,
    styles: styles2,
    unstyled,
    wrapperProps: __spreadValues$l(__spreadValues$l({}, wrapperProps), systemStyles),
    inputProps: {
      required,
      classNames,
      styles: styles2,
      unstyled,
      id: uid,
      size,
      __staticSelector,
      error,
      variant: variant2
    }
  });
}
var useStyles$9 = createStyles$1((theme, _params, { size }) => ({
  label: {
    display: "inline-block",
    fontSize: getSize({ size, sizes: theme.fontSizes }),
    fontWeight: 500,
    color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.colors.gray[9],
    wordBreak: "break-word",
    cursor: "default",
    WebkitTapHighlightColor: "transparent"
  },
  required: {
    color: theme.fn.variant({ variant: "filled", color: "red" }).background
  }
}));
var __defProp$k = Object.defineProperty;
var __getOwnPropSymbols$k = Object.getOwnPropertySymbols;
var __hasOwnProp$k = Object.prototype.hasOwnProperty;
var __propIsEnum$k = Object.prototype.propertyIsEnumerable;
var __defNormalProp$k = (obj2, key, value) => key in obj2 ? __defProp$k(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$k = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$k.call(b2, prop))
      __defNormalProp$k(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$k)
    for (var prop of __getOwnPropSymbols$k(b2)) {
      if (__propIsEnum$k.call(b2, prop))
        __defNormalProp$k(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$b = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$k.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$k)
    for (var prop of __getOwnPropSymbols$k(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$k.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$b = {
  labelElement: "label",
  size: "sm"
};
const InputLabel = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("InputLabel", defaultProps$b, props), {
    labelElement,
    children,
    required,
    size,
    classNames,
    styles: styles2,
    unstyled,
    className,
    htmlFor,
    __staticSelector,
    variant: variant2,
    onMouseDown: onMouseDown2
  } = _a2, others = __objRest$b(_a2, [
    "labelElement",
    "children",
    "required",
    "size",
    "classNames",
    "styles",
    "unstyled",
    "className",
    "htmlFor",
    "__staticSelector",
    "variant",
    "onMouseDown"
  ]);
  const { classes, cx } = useStyles$9(null, {
    name: ["InputWrapper", __staticSelector],
    classNames,
    styles: styles2,
    unstyled,
    variant: variant2,
    size
  });
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$k({
    component: labelElement,
    ref: ref2,
    className: cx(classes.label, className),
    htmlFor: labelElement === "label" ? htmlFor : void 0,
    onMouseDown: (event) => {
      onMouseDown2 == null ? void 0 : onMouseDown2(event);
      if (!event.defaultPrevented && event.detail > 1) {
        event.preventDefault();
      }
    }
  }, others), children, required && /* @__PURE__ */ React.createElement("span", {
    className: classes.required,
    "aria-hidden": true
  }, " *"));
});
InputLabel.displayName = "@mantine/core/InputLabel";
var useStyles$8 = createStyles$1((theme, _params, { size }) => ({
  error: {
    wordBreak: "break-word",
    color: theme.fn.variant({ variant: "filled", color: "red" }).background,
    fontSize: `calc(${getSize({ size, sizes: theme.fontSizes })} - ${rem(2)})`,
    lineHeight: 1.2,
    display: "block"
  }
}));
var __defProp$j = Object.defineProperty;
var __getOwnPropSymbols$j = Object.getOwnPropertySymbols;
var __hasOwnProp$j = Object.prototype.hasOwnProperty;
var __propIsEnum$j = Object.prototype.propertyIsEnumerable;
var __defNormalProp$j = (obj2, key, value) => key in obj2 ? __defProp$j(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$j = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$j.call(b2, prop))
      __defNormalProp$j(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$j)
    for (var prop of __getOwnPropSymbols$j(b2)) {
      if (__propIsEnum$j.call(b2, prop))
        __defNormalProp$j(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$a = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$j.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$j)
    for (var prop of __getOwnPropSymbols$j(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$j.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$a = {
  size: "sm"
};
const InputError = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("InputError", defaultProps$a, props), {
    children,
    className,
    classNames,
    styles: styles2,
    unstyled,
    size,
    __staticSelector,
    variant: variant2
  } = _a2, others = __objRest$a(_a2, [
    "children",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "size",
    "__staticSelector",
    "variant"
  ]);
  const { classes, cx } = useStyles$8(null, {
    name: ["InputWrapper", __staticSelector],
    classNames,
    styles: styles2,
    unstyled,
    variant: variant2,
    size
  });
  return /* @__PURE__ */ React.createElement(Text, __spreadValues$j({
    className: cx(classes.error, className),
    ref: ref2
  }, others), children);
});
InputError.displayName = "@mantine/core/InputError";
var useStyles$7 = createStyles$1((theme, _params, { size }) => ({
  description: {
    wordBreak: "break-word",
    color: theme.colorScheme === "dark" ? theme.colors.dark[2] : theme.colors.gray[6],
    fontSize: `calc(${getSize({ size, sizes: theme.fontSizes })} - ${rem(2)})`,
    lineHeight: 1.2,
    display: "block"
  }
}));
var __defProp$i = Object.defineProperty;
var __getOwnPropSymbols$i = Object.getOwnPropertySymbols;
var __hasOwnProp$i = Object.prototype.hasOwnProperty;
var __propIsEnum$i = Object.prototype.propertyIsEnumerable;
var __defNormalProp$i = (obj2, key, value) => key in obj2 ? __defProp$i(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$i = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$i.call(b2, prop))
      __defNormalProp$i(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$i)
    for (var prop of __getOwnPropSymbols$i(b2)) {
      if (__propIsEnum$i.call(b2, prop))
        __defNormalProp$i(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$9 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$i.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$i)
    for (var prop of __getOwnPropSymbols$i(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$i.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$9 = {
  size: "sm"
};
const InputDescription = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("InputDescription", defaultProps$9, props), {
    children,
    className,
    classNames,
    styles: styles2,
    unstyled,
    size,
    __staticSelector,
    variant: variant2
  } = _a2, others = __objRest$9(_a2, [
    "children",
    "className",
    "classNames",
    "styles",
    "unstyled",
    "size",
    "__staticSelector",
    "variant"
  ]);
  const { classes, cx } = useStyles$7(null, {
    name: ["InputWrapper", __staticSelector],
    classNames,
    styles: styles2,
    unstyled,
    variant: variant2,
    size
  });
  return /* @__PURE__ */ React.createElement(Text, __spreadValues$i({
    color: "dimmed",
    className: cx(classes.description, className),
    ref: ref2,
    unstyled
  }, others), children);
});
InputDescription.displayName = "@mantine/core/InputDescription";
const InputWrapperContext = reactExports.createContext({
  offsetBottom: false,
  offsetTop: false,
  describedBy: void 0
});
const InputWrapperProvider = InputWrapperContext.Provider;
const useInputWrapperContext = () => reactExports.useContext(InputWrapperContext);
function getInputOffsets(inputWrapperOrder, { hasDescription, hasError }) {
  const inputIndex = inputWrapperOrder.findIndex((part) => part === "input");
  const aboveInput = inputWrapperOrder[inputIndex - 1];
  const belowInput = inputWrapperOrder[inputIndex + 1];
  const offsetTop = hasDescription && aboveInput === "description" || hasError && aboveInput === "error";
  const offsetBottom = hasDescription && belowInput === "description" || hasError && belowInput === "error";
  return { offsetBottom, offsetTop };
}
var __defProp$h = Object.defineProperty;
var __defProps$7 = Object.defineProperties;
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$h = Object.getOwnPropertySymbols;
var __hasOwnProp$h = Object.prototype.hasOwnProperty;
var __propIsEnum$h = Object.prototype.propertyIsEnumerable;
var __defNormalProp$h = (obj2, key, value) => key in obj2 ? __defProp$h(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$h = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$h.call(b2, prop))
      __defNormalProp$h(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$h)
    for (var prop of __getOwnPropSymbols$h(b2)) {
      if (__propIsEnum$h.call(b2, prop))
        __defNormalProp$h(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$7 = (a2, b2) => __defProps$7(a2, __getOwnPropDescs$7(b2));
var useStyles$6 = createStyles$1((theme) => ({
  root: __spreadProps$7(__spreadValues$h({}, theme.fn.fontStyles()), {
    lineHeight: theme.lineHeight
  })
}));
var __defProp$g = Object.defineProperty;
var __defProps$6 = Object.defineProperties;
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$g = Object.getOwnPropertySymbols;
var __hasOwnProp$g = Object.prototype.hasOwnProperty;
var __propIsEnum$g = Object.prototype.propertyIsEnumerable;
var __defNormalProp$g = (obj2, key, value) => key in obj2 ? __defProp$g(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$g = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$g.call(b2, prop))
      __defNormalProp$g(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$g)
    for (var prop of __getOwnPropSymbols$g(b2)) {
      if (__propIsEnum$g.call(b2, prop))
        __defNormalProp$g(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$6 = (a2, b2) => __defProps$6(a2, __getOwnPropDescs$6(b2));
var __objRest$8 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$g.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$g)
    for (var prop of __getOwnPropSymbols$g(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$g.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$8 = {
  labelElement: "label",
  size: "sm",
  inputContainer: (children) => children,
  inputWrapperOrder: ["label", "description", "input", "error"]
};
const InputWrapper = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("InputWrapper", defaultProps$8, props), {
    className,
    label,
    children,
    required,
    id,
    error,
    description,
    labelElement,
    labelProps,
    descriptionProps,
    errorProps,
    classNames,
    styles: styles2,
    size,
    inputContainer,
    __staticSelector,
    unstyled,
    inputWrapperOrder,
    withAsterisk,
    variant: variant2
  } = _a2, others = __objRest$8(_a2, [
    "className",
    "label",
    "children",
    "required",
    "id",
    "error",
    "description",
    "labelElement",
    "labelProps",
    "descriptionProps",
    "errorProps",
    "classNames",
    "styles",
    "size",
    "inputContainer",
    "__staticSelector",
    "unstyled",
    "inputWrapperOrder",
    "withAsterisk",
    "variant"
  ]);
  const { classes, cx } = useStyles$6(null, {
    classNames,
    styles: styles2,
    name: ["InputWrapper", __staticSelector],
    unstyled,
    variant: variant2,
    size
  });
  const sharedProps = {
    classNames,
    styles: styles2,
    unstyled,
    size,
    variant: variant2,
    __staticSelector
  };
  const isRequired = typeof withAsterisk === "boolean" ? withAsterisk : required;
  const errorId = id ? `${id}-error` : errorProps == null ? void 0 : errorProps.id;
  const descriptionId = id ? `${id}-description` : descriptionProps == null ? void 0 : descriptionProps.id;
  const hasError = !!error && typeof error !== "boolean";
  const _describedBy = `${hasError ? errorId : ""} ${description ? descriptionId : ""}`;
  const describedBy = _describedBy.trim().length > 0 ? _describedBy.trim() : void 0;
  const _label = label && /* @__PURE__ */ React.createElement(InputLabel, __spreadValues$g(__spreadValues$g({
    key: "label",
    labelElement,
    id: id ? `${id}-label` : void 0,
    htmlFor: id,
    required: isRequired
  }, sharedProps), labelProps), label);
  const _description = description && /* @__PURE__ */ React.createElement(InputDescription, __spreadProps$6(__spreadValues$g(__spreadValues$g({
    key: "description"
  }, descriptionProps), sharedProps), {
    size: (descriptionProps == null ? void 0 : descriptionProps.size) || sharedProps.size,
    id: (descriptionProps == null ? void 0 : descriptionProps.id) || descriptionId
  }), description);
  const _input = /* @__PURE__ */ React.createElement(reactExports.Fragment, {
    key: "input"
  }, inputContainer(children));
  const _error = typeof error !== "boolean" && error && /* @__PURE__ */ React.createElement(InputError, __spreadProps$6(__spreadValues$g(__spreadValues$g({}, errorProps), sharedProps), {
    size: (errorProps == null ? void 0 : errorProps.size) || sharedProps.size,
    key: "error",
    id: (errorProps == null ? void 0 : errorProps.id) || errorId
  }), error);
  const content2 = inputWrapperOrder.map((part) => {
    switch (part) {
      case "label":
        return _label;
      case "input":
        return _input;
      case "description":
        return _description;
      case "error":
        return _error;
      default:
        return null;
    }
  });
  return /* @__PURE__ */ React.createElement(InputWrapperProvider, {
    value: __spreadValues$g({
      describedBy
    }, getInputOffsets(inputWrapperOrder, {
      hasDescription: !!_description,
      hasError: !!_error
    }))
  }, /* @__PURE__ */ React.createElement(Box, __spreadValues$g({
    className: cx(classes.root, className),
    ref: ref2
  }, others), content2));
});
InputWrapper.displayName = "@mantine/core/InputWrapper";
var __defProp$f = Object.defineProperty;
var __getOwnPropSymbols$f = Object.getOwnPropertySymbols;
var __hasOwnProp$f = Object.prototype.hasOwnProperty;
var __propIsEnum$f = Object.prototype.propertyIsEnumerable;
var __defNormalProp$f = (obj2, key, value) => key in obj2 ? __defProp$f(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$f = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$f.call(b2, prop))
      __defNormalProp$f(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$f)
    for (var prop of __getOwnPropSymbols$f(b2)) {
      if (__propIsEnum$f.call(b2, prop))
        __defNormalProp$f(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$7 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$f.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$f)
    for (var prop of __getOwnPropSymbols$f(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$f.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$7 = {};
const InputPlaceholder = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("InputPlaceholder", defaultProps$7, props), { sx } = _a2, others = __objRest$7(_a2, ["sx"]);
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$f({
    component: "span",
    sx: [(theme) => theme.fn.placeholderStyles(), ...packSx(sx)],
    ref: ref2
  }, others));
});
InputPlaceholder.displayName = "@mantine/core/InputPlaceholder";
var __defProp$e = Object.defineProperty;
var __defProps$5 = Object.defineProperties;
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$e = Object.getOwnPropertySymbols;
var __hasOwnProp$e = Object.prototype.hasOwnProperty;
var __propIsEnum$e = Object.prototype.propertyIsEnumerable;
var __defNormalProp$e = (obj2, key, value) => key in obj2 ? __defProp$e(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$e = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$e.call(b2, prop))
      __defNormalProp$e(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$e)
    for (var prop of __getOwnPropSymbols$e(b2)) {
      if (__propIsEnum$e.call(b2, prop))
        __defNormalProp$e(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$5 = (a2, b2) => __defProps$5(a2, __getOwnPropDescs$5(b2));
const sizes$1 = {
  xs: rem(30),
  sm: rem(36),
  md: rem(42),
  lg: rem(50),
  xl: rem(60)
};
const INPUT_VARIANTS = ["default", "filled", "unstyled"];
function getVariantStyles$1({ theme, variant: variant2 }) {
  if (!INPUT_VARIANTS.includes(variant2)) {
    return null;
  }
  if (variant2 === "default") {
    return {
      border: `${rem(1)} solid ${theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[4]}`,
      backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.white,
      transition: "border-color 100ms ease",
      "&:focus, &:focus-within": theme.focusRingStyles.inputStyles(theme)
    };
  }
  if (variant2 === "filled") {
    return {
      border: `${rem(1)} solid transparent`,
      backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[5] : theme.colors.gray[1],
      "&:focus, &:focus-within": theme.focusRingStyles.inputStyles(theme)
    };
  }
  return {
    borderWidth: 0,
    color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black,
    backgroundColor: "transparent",
    minHeight: rem(28),
    outline: 0,
    "&:focus, &:focus-within": {
      outline: "none",
      borderColor: "transparent"
    },
    "&:disabled": {
      backgroundColor: "transparent",
      "&:focus, &:focus-within": {
        outline: "none",
        borderColor: "transparent"
      }
    }
  };
}
var useStyles$5 = createStyles$1((theme, {
  multiline,
  radius: radius2,
  invalid,
  rightSectionWidth,
  withRightSection,
  iconWidth,
  offsetBottom,
  offsetTop,
  pointer
}, { variant: variant2, size }) => {
  const invalidColor = theme.fn.variant({
    variant: "filled",
    color: "red"
  }).background;
  const sizeStyles = variant2 === "default" || variant2 === "filled" ? {
    minHeight: getSize({ size, sizes: sizes$1 }),
    paddingLeft: `calc(${getSize({ size, sizes: sizes$1 })}  / 3)`,
    paddingRight: withRightSection ? rightSectionWidth || getSize({ size, sizes: sizes$1 }) : `calc(${getSize({ size, sizes: sizes$1 })}  / 3)`,
    borderRadius: theme.fn.radius(radius2)
  } : variant2 === "unstyled" && withRightSection ? {
    paddingRight: rightSectionWidth || getSize({ size, sizes: sizes$1 })
  } : null;
  return {
    wrapper: {
      position: "relative",
      marginTop: offsetTop ? `calc(${theme.spacing.xs} / 2)` : void 0,
      marginBottom: offsetBottom ? `calc(${theme.spacing.xs} / 2)` : void 0,
      "&:has(input:disabled)": {
        "& .mantine-Input-rightSection": {
          display: "none"
        }
      }
    },
    input: __spreadProps$5(__spreadValues$e(__spreadValues$e(__spreadProps$5(__spreadValues$e({}, theme.fn.fontStyles()), {
      height: multiline ? variant2 === "unstyled" ? void 0 : "auto" : getSize({ size, sizes: sizes$1 }),
      WebkitTapHighlightColor: "transparent",
      lineHeight: multiline ? theme.lineHeight : `calc(${getSize({ size, sizes: sizes$1 })} - ${rem(2)})`,
      appearance: "none",
      resize: "none",
      boxSizing: "border-box",
      fontSize: getSize({ size, sizes: theme.fontSizes }),
      width: "100%",
      color: theme.colorScheme === "dark" ? theme.colors.dark[0] : theme.black,
      display: "block",
      textAlign: "left",
      cursor: pointer ? "pointer" : void 0
    }), getVariantStyles$1({ theme, variant: variant2 })), sizeStyles), {
      "&:disabled, &[data-disabled]": {
        backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.colors.gray[1],
        color: theme.colors.dark[2],
        opacity: 0.6,
        cursor: "not-allowed",
        pointerEvents: "none",
        "&::placeholder": {
          color: theme.colors.dark[2]
        }
      },
      "&[data-invalid]": {
        color: invalidColor,
        borderColor: invalidColor,
        "&::placeholder": {
          opacity: 1,
          color: invalidColor
        }
      },
      "&[data-with-icon]": {
        paddingLeft: typeof iconWidth === "number" ? rem(iconWidth) : getSize({ size, sizes: sizes$1 })
      },
      "&::placeholder": __spreadProps$5(__spreadValues$e({}, theme.fn.placeholderStyles()), {
        opacity: 1
      }),
      "&::-webkit-inner-spin-button, &::-webkit-outer-spin-button, &::-webkit-search-decoration, &::-webkit-search-cancel-button, &::-webkit-search-results-button, &::-webkit-search-results-decoration": {
        appearance: "none"
      },
      "&[type=number]": {
        MozAppearance: "textfield"
      }
    }),
    icon: {
      pointerEvents: "none",
      position: "absolute",
      zIndex: 1,
      left: 0,
      top: 0,
      bottom: 0,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: iconWidth ? rem(iconWidth) : getSize({ size, sizes: sizes$1 }),
      color: invalid ? theme.colors.red[theme.colorScheme === "dark" ? 6 : 7] : theme.colorScheme === "dark" ? theme.colors.dark[2] : theme.colors.gray[5]
    },
    rightSection: {
      position: "absolute",
      top: 0,
      bottom: 0,
      right: 0,
      display: "flex",
      alignItems: "center",
      justifyContent: "center",
      width: rightSectionWidth || getSize({ size, sizes: sizes$1 })
    }
  };
});
var __defProp$d = Object.defineProperty;
var __defProps$4 = Object.defineProperties;
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$d = Object.getOwnPropertySymbols;
var __hasOwnProp$d = Object.prototype.hasOwnProperty;
var __propIsEnum$d = Object.prototype.propertyIsEnumerable;
var __defNormalProp$d = (obj2, key, value) => key in obj2 ? __defProp$d(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$d = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$d.call(b2, prop))
      __defNormalProp$d(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$d)
    for (var prop of __getOwnPropSymbols$d(b2)) {
      if (__propIsEnum$d.call(b2, prop))
        __defNormalProp$d(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$4 = (a2, b2) => __defProps$4(a2, __getOwnPropDescs$4(b2));
var __objRest$6 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$d.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$d)
    for (var prop of __getOwnPropSymbols$d(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$d.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$6 = {
  size: "sm",
  variant: "default"
};
const _Input = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("Input", defaultProps$6, props), {
    className,
    error,
    required,
    disabled,
    variant: variant2,
    icon,
    style: style2,
    rightSectionWidth,
    iconWidth,
    rightSection,
    rightSectionProps,
    radius: radius2,
    size,
    wrapperProps,
    classNames,
    styles: styles2,
    __staticSelector,
    multiline,
    sx,
    unstyled,
    pointer
  } = _a2, others = __objRest$6(_a2, [
    "className",
    "error",
    "required",
    "disabled",
    "variant",
    "icon",
    "style",
    "rightSectionWidth",
    "iconWidth",
    "rightSection",
    "rightSectionProps",
    "radius",
    "size",
    "wrapperProps",
    "classNames",
    "styles",
    "__staticSelector",
    "multiline",
    "sx",
    "unstyled",
    "pointer"
  ]);
  const { offsetBottom, offsetTop, describedBy } = useInputWrapperContext();
  const { classes, cx } = useStyles$5({
    radius: radius2,
    multiline,
    invalid: !!error,
    rightSectionWidth: rightSectionWidth ? rem(rightSectionWidth) : void 0,
    iconWidth,
    withRightSection: !!rightSection,
    offsetBottom,
    offsetTop,
    pointer
  }, { classNames, styles: styles2, name: ["Input", __staticSelector], unstyled, variant: variant2, size });
  const { systemStyles, rest } = extractSystemStyles(others);
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$d(__spreadValues$d({
    className: cx(classes.wrapper, className),
    sx,
    style: style2
  }, systemStyles), wrapperProps), icon && /* @__PURE__ */ React.createElement("div", {
    className: classes.icon
  }, icon), /* @__PURE__ */ React.createElement(Box, __spreadProps$4(__spreadValues$d({
    component: "input"
  }, rest), {
    ref: ref2,
    required,
    "aria-invalid": !!error,
    "aria-describedby": describedBy,
    disabled,
    "data-disabled": disabled || void 0,
    "data-with-icon": !!icon || void 0,
    "data-invalid": !!error || void 0,
    className: classes.input
  })), rightSection && /* @__PURE__ */ React.createElement("div", __spreadProps$4(__spreadValues$d({}, rightSectionProps), {
    className: classes.rightSection
  }), rightSection));
});
_Input.displayName = "@mantine/core/Input";
_Input.Wrapper = InputWrapper;
_Input.Label = InputLabel;
_Input.Description = InputDescription;
_Input.Error = InputError;
_Input.Placeholder = InputPlaceholder;
const Input = createPolymorphicComponent(_Input);
var useStyles$4 = createStyles$1((_theme, { orientation, buttonBorderWidth }) => ({
  root: {
    display: "flex",
    flexDirection: orientation === "vertical" ? "column" : "row",
    "& [data-button]": {
      "&:first-of-type:not(:last-of-type)": {
        borderBottomRightRadius: 0,
        [orientation === "vertical" ? "borderBottomLeftRadius" : "borderTopRightRadius"]: 0,
        [orientation === "vertical" ? "borderBottomWidth" : "borderRightWidth"]: `calc(${rem(buttonBorderWidth)} / 2)`
      },
      "&:last-of-type:not(:first-of-type)": {
        borderTopLeftRadius: 0,
        [orientation === "vertical" ? "borderTopRightRadius" : "borderBottomLeftRadius"]: 0,
        [orientation === "vertical" ? "borderTopWidth" : "borderLeftWidth"]: `calc(${rem(buttonBorderWidth)} / 2)`
      },
      "&:not(:first-of-type):not(:last-of-type)": {
        borderRadius: 0,
        [orientation === "vertical" ? "borderTopWidth" : "borderLeftWidth"]: `calc(${rem(buttonBorderWidth)} / 2)`,
        [orientation === "vertical" ? "borderBottomWidth" : "borderRightWidth"]: `calc(${rem(buttonBorderWidth)} / 2)`
      },
      "& + [data-button]": {
        [orientation === "vertical" ? "marginTop" : "marginLeft"]: `calc(${buttonBorderWidth} * -1)`,
        "@media (min-resolution: 192dpi)": {
          [orientation === "vertical" ? "marginTop" : "marginLeft"]: 0
        }
      }
    }
  }
}));
var __defProp$c = Object.defineProperty;
var __getOwnPropSymbols$c = Object.getOwnPropertySymbols;
var __hasOwnProp$c = Object.prototype.hasOwnProperty;
var __propIsEnum$c = Object.prototype.propertyIsEnumerable;
var __defNormalProp$c = (obj2, key, value) => key in obj2 ? __defProp$c(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$c = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$c.call(b2, prop))
      __defNormalProp$c(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$c)
    for (var prop of __getOwnPropSymbols$c(b2)) {
      if (__propIsEnum$c.call(b2, prop))
        __defNormalProp$c(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$5 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$c.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$c)
    for (var prop of __getOwnPropSymbols$c(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$c.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$5 = {
  orientation: "horizontal",
  buttonBorderWidth: 1
};
const ButtonGroup = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("ButtonGroup", defaultProps$5, props), { className, orientation, buttonBorderWidth, unstyled } = _a2, others = __objRest$5(_a2, ["className", "orientation", "buttonBorderWidth", "unstyled"]);
  const { classes, cx } = useStyles$4({ orientation, buttonBorderWidth }, { name: "ButtonGroup", unstyled });
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$c({
    className: cx(classes.root, className),
    ref: ref2
  }, others));
});
ButtonGroup.displayName = "@mantine/core/ButtonGroup";
var __defProp$b = Object.defineProperty;
var __defProps$3 = Object.defineProperties;
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$b = Object.getOwnPropertySymbols;
var __hasOwnProp$b = Object.prototype.hasOwnProperty;
var __propIsEnum$b = Object.prototype.propertyIsEnumerable;
var __defNormalProp$b = (obj2, key, value) => key in obj2 ? __defProp$b(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$b = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$b.call(b2, prop))
      __defNormalProp$b(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$b)
    for (var prop of __getOwnPropSymbols$b(b2)) {
      if (__propIsEnum$b.call(b2, prop))
        __defNormalProp$b(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$3 = (a2, b2) => __defProps$3(a2, __getOwnPropDescs$3(b2));
const BUTTON_VARIANTS = [
  "filled",
  "outline",
  "light",
  "white",
  "default",
  "subtle",
  "gradient"
];
const sizes = {
  xs: { height: sizes$1.xs, paddingLeft: rem(14), paddingRight: rem(14) },
  sm: { height: sizes$1.sm, paddingLeft: rem(18), paddingRight: rem(18) },
  md: { height: sizes$1.md, paddingLeft: rem(22), paddingRight: rem(22) },
  lg: { height: sizes$1.lg, paddingLeft: rem(26), paddingRight: rem(26) },
  xl: { height: sizes$1.xl, paddingLeft: rem(32), paddingRight: rem(32) },
  "compact-xs": { height: rem(22), paddingLeft: rem(7), paddingRight: rem(7) },
  "compact-sm": { height: rem(26), paddingLeft: rem(8), paddingRight: rem(8) },
  "compact-md": { height: rem(30), paddingLeft: rem(10), paddingRight: rem(10) },
  "compact-lg": { height: rem(34), paddingLeft: rem(12), paddingRight: rem(12) },
  "compact-xl": { height: rem(40), paddingLeft: rem(14), paddingRight: rem(14) }
};
function getSizeStyles({ compact, size, withLeftIcon, withRightIcon }) {
  if (compact) {
    return sizes[`compact-${size}`];
  }
  const _sizes = sizes[size];
  if (!_sizes) {
    return {};
  }
  return __spreadProps$3(__spreadValues$b({}, _sizes), {
    paddingLeft: withLeftIcon ? `calc(${_sizes.paddingLeft}  / 1.5)` : _sizes.paddingLeft,
    paddingRight: withRightIcon ? `calc(${_sizes.paddingRight}  / 1.5)` : _sizes.paddingRight
  });
}
const getWidthStyles = (fullWidth) => ({
  display: fullWidth ? "block" : "inline-block",
  width: fullWidth ? "100%" : "auto"
});
function getVariantStyles({ variant: variant2, theme, color: color2, gradient: gradient2 }) {
  if (!BUTTON_VARIANTS.includes(variant2)) {
    return null;
  }
  const colors = theme.fn.variant({ color: color2, variant: variant2, gradient: gradient2 });
  if (variant2 === "gradient") {
    return __spreadValues$b({
      border: 0,
      backgroundImage: colors.background,
      color: colors.color
    }, theme.fn.hover({ backgroundSize: "200%" }));
  }
  return __spreadValues$b({
    border: `${rem(1)} solid ${colors.border}`,
    backgroundColor: colors.background,
    color: colors.color
  }, theme.fn.hover({ backgroundColor: colors.hover }));
}
var useStyles$3 = createStyles$1((theme, {
  radius: radius2,
  fullWidth,
  compact,
  withLeftIcon,
  withRightIcon,
  color: color2,
  gradient: gradient2
}, { variant: variant2, size }) => ({
  root: __spreadProps$3(__spreadValues$b(__spreadProps$3(__spreadValues$b(__spreadValues$b(__spreadValues$b(__spreadValues$b({}, getSizeStyles({ compact, size, withLeftIcon, withRightIcon })), theme.fn.fontStyles()), theme.fn.focusStyles()), getWidthStyles(fullWidth)), {
    borderRadius: theme.fn.radius(radius2),
    fontWeight: 600,
    position: "relative",
    lineHeight: 1,
    fontSize: getSize({ size, sizes: theme.fontSizes }),
    userSelect: "none",
    cursor: "pointer"
  }), getVariantStyles({ variant: variant2, theme, color: color2, gradient: gradient2 })), {
    "&:active": theme.activeStyles,
    "&:disabled, &[data-disabled]": {
      borderColor: "transparent",
      backgroundColor: theme.colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[2],
      color: theme.colorScheme === "dark" ? theme.colors.dark[6] : theme.colors.gray[5],
      cursor: "not-allowed",
      backgroundImage: "none",
      pointerEvents: "none",
      "&:active": {
        transform: "none"
      }
    },
    "&[data-loading]": {
      pointerEvents: "none",
      "&::before": __spreadProps$3(__spreadValues$b({
        content: '""'
      }, theme.fn.cover(rem(-1))), {
        backgroundColor: theme.colorScheme === "dark" ? theme.fn.rgba(theme.colors.dark[7], 0.5) : "rgba(255, 255, 255, .5)",
        borderRadius: theme.fn.radius(radius2),
        cursor: "not-allowed"
      })
    }
  }),
  icon: {
    display: "flex",
    alignItems: "center"
  },
  leftIcon: {
    marginRight: theme.spacing.xs
  },
  rightIcon: {
    marginLeft: theme.spacing.xs
  },
  centerLoader: {
    position: "absolute",
    left: "50%",
    transform: "translateX(-50%)",
    opacity: 0.5
  },
  inner: {
    display: "flex",
    alignItems: "center",
    justifyContent: "center",
    height: "100%",
    overflow: "visible"
  },
  label: {
    whiteSpace: "nowrap",
    height: "100%",
    overflow: "hidden",
    display: "flex",
    alignItems: "center"
  }
}));
var __defProp$a = Object.defineProperty;
var __getOwnPropSymbols$a = Object.getOwnPropertySymbols;
var __hasOwnProp$a = Object.prototype.hasOwnProperty;
var __propIsEnum$a = Object.prototype.propertyIsEnumerable;
var __defNormalProp$a = (obj2, key, value) => key in obj2 ? __defProp$a(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$a = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$a.call(b2, prop))
      __defNormalProp$a(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$a)
    for (var prop of __getOwnPropSymbols$a(b2)) {
      if (__propIsEnum$a.call(b2, prop))
        __defNormalProp$a(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$4 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$a.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$a)
    for (var prop of __getOwnPropSymbols$a(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$a.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$4 = {
  size: "sm",
  type: "button",
  variant: "filled",
  loaderPosition: "left"
};
const _Button = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("Button", defaultProps$4, props), {
    className,
    size,
    color: color2,
    type: type2,
    disabled,
    children,
    leftIcon,
    rightIcon,
    fullWidth,
    variant: variant2,
    radius: radius2,
    uppercase,
    compact,
    loading,
    loaderPosition,
    loaderProps,
    gradient: gradient2,
    classNames,
    styles: styles2,
    unstyled
  } = _a2, others = __objRest$4(_a2, [
    "className",
    "size",
    "color",
    "type",
    "disabled",
    "children",
    "leftIcon",
    "rightIcon",
    "fullWidth",
    "variant",
    "radius",
    "uppercase",
    "compact",
    "loading",
    "loaderPosition",
    "loaderProps",
    "gradient",
    "classNames",
    "styles",
    "unstyled"
  ]);
  const { classes, cx, theme } = useStyles$3({
    radius: radius2,
    color: color2,
    fullWidth,
    compact,
    gradient: gradient2,
    withLeftIcon: !!leftIcon,
    withRightIcon: !!rightIcon
  }, { name: "Button", unstyled, classNames, styles: styles2, variant: variant2, size });
  const colors = theme.fn.variant({ color: color2, variant: variant2 });
  const loader = /* @__PURE__ */ React.createElement(Loader, __spreadValues$a({
    color: colors.color,
    size: `calc(${getSize({ size, sizes }).height} / 2)`
  }, loaderProps));
  return /* @__PURE__ */ React.createElement(UnstyledButton, __spreadValues$a({
    className: cx(classes.root, className),
    type: type2,
    disabled,
    "data-button": true,
    "data-disabled": disabled || void 0,
    "data-loading": loading || void 0,
    ref: ref2,
    unstyled
  }, others), /* @__PURE__ */ React.createElement("div", {
    className: classes.inner
  }, (leftIcon || loading && loaderPosition === "left") && /* @__PURE__ */ React.createElement("span", {
    className: cx(classes.icon, classes.leftIcon)
  }, loading && loaderPosition === "left" ? loader : leftIcon), loading && loaderPosition === "center" && /* @__PURE__ */ React.createElement("span", {
    className: classes.centerLoader
  }, loader), /* @__PURE__ */ React.createElement("span", {
    className: classes.label,
    style: { textTransform: uppercase ? "uppercase" : void 0 }
  }, children), (rightIcon || loading && loaderPosition === "right") && /* @__PURE__ */ React.createElement("span", {
    className: cx(classes.icon, classes.rightIcon)
  }, loading && loaderPosition === "right" ? loader : rightIcon)));
});
_Button.displayName = "@mantine/core/Button";
_Button.Group = ButtonGroup;
const Button = createPolymorphicComponent(_Button);
const [GridProvider, useGridContext] = createSafeContext("Grid component was not found in tree");
var __defProp$9 = Object.defineProperty;
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$9 = (obj2, key, value) => key in obj2 ? __defProp$9(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$9 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$9.call(b2, prop))
      __defNormalProp$9(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$9)
    for (var prop of __getOwnPropSymbols$9(b2)) {
      if (__propIsEnum$9.call(b2, prop))
        __defNormalProp$9(a2, prop, b2[prop]);
    }
  return a2;
};
const getColumnFlexBasis = (colSpan, columns) => {
  if (colSpan === "content") {
    return "auto";
  }
  if (colSpan === "auto") {
    return "0rem";
  }
  return colSpan ? `${100 / (columns / colSpan)}%` : void 0;
};
const getColumnMaxWidth = (colSpan, columns, grow) => {
  if (grow || colSpan === "auto" || colSpan === "content") {
    return "unset";
  }
  return getColumnFlexBasis(colSpan, columns);
};
const getColumnFlexGrow = (colSpan, grow) => {
  if (!colSpan) {
    return void 0;
  }
  return colSpan === "auto" || grow ? 1 : 0;
};
const getColumnOffset = (offset2, columns) => offset2 === 0 ? 0 : offset2 ? `${100 / (columns / offset2)}%` : void 0;
const getGutterSize = (gutter, theme) => typeof gutter !== "undefined" ? `calc(${getSize({ size: gutter, sizes: theme.spacing })} / 2)` : void 0;
function getBreakpointsStyles({
  sizes: sizes2,
  offsets,
  orders,
  theme,
  columns,
  gutters,
  grow
}) {
  return MANTINE_SIZES.reduce((acc, size) => {
    acc[`@media (min-width: ${em(theme.breakpoints[size])})`] = {
      order: orders[size],
      flexBasis: getColumnFlexBasis(sizes2[size], columns),
      padding: getGutterSize(gutters[size], theme),
      flexShrink: 0,
      width: sizes2[size] === "content" ? "auto" : void 0,
      maxWidth: getColumnMaxWidth(sizes2[size], columns, grow),
      marginLeft: getColumnOffset(offsets[size], columns),
      flexGrow: getColumnFlexGrow(sizes2[size], grow)
    };
    return acc;
  }, {});
}
var useStyles$2 = createStyles$1((theme, {
  gutter,
  gutterXs,
  gutterSm,
  gutterMd,
  gutterLg,
  gutterXl,
  grow,
  offset: offset2,
  offsetXs,
  offsetSm,
  offsetMd,
  offsetLg,
  offsetXl,
  columns,
  span,
  xs,
  sm,
  md,
  lg,
  xl,
  order: order2,
  orderXs,
  orderSm,
  orderMd,
  orderLg,
  orderXl
}) => ({
  col: __spreadValues$9({
    boxSizing: "border-box",
    flexGrow: getColumnFlexGrow(span, grow),
    order: order2,
    padding: getGutterSize(gutter, theme),
    marginLeft: getColumnOffset(offset2, columns),
    flexBasis: getColumnFlexBasis(span, columns),
    flexShrink: 0,
    width: span === "content" ? "auto" : void 0,
    maxWidth: getColumnMaxWidth(span, columns, grow)
  }, getBreakpointsStyles({
    sizes: { xs, sm, md, lg, xl },
    offsets: { xs: offsetXs, sm: offsetSm, md: offsetMd, lg: offsetLg, xl: offsetXl },
    orders: { xs: orderXs, sm: orderSm, md: orderMd, lg: orderLg, xl: orderXl },
    gutters: { xs: gutterXs, sm: gutterSm, md: gutterMd, lg: gutterLg, xl: gutterXl },
    theme,
    columns,
    grow
  }))
}));
var __defProp$8 = Object.defineProperty;
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$8 = (obj2, key, value) => key in obj2 ? __defProp$8(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$8 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$8.call(b2, prop))
      __defNormalProp$8(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$8)
    for (var prop of __getOwnPropSymbols$8(b2)) {
      if (__propIsEnum$8.call(b2, prop))
        __defNormalProp$8(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$3 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$8.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$8)
    for (var prop of __getOwnPropSymbols$8(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$8.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$3 = {};
function isValidSpan(span) {
  if (span === "auto" || span === "content") {
    return true;
  }
  return typeof span === "number" && span > 0 && span % 1 === 0;
}
const Col = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("GridCol", defaultProps$3, props), {
    children,
    span,
    offset: offset2,
    offsetXs,
    offsetSm,
    offsetMd,
    offsetLg,
    offsetXl,
    xs,
    sm,
    md,
    lg,
    xl,
    order: order2,
    orderXs,
    orderSm,
    orderMd,
    orderLg,
    orderXl,
    className,
    unstyled,
    variant: variant2
  } = _a2, others = __objRest$3(_a2, [
    "children",
    "span",
    "offset",
    "offsetXs",
    "offsetSm",
    "offsetMd",
    "offsetLg",
    "offsetXl",
    "xs",
    "sm",
    "md",
    "lg",
    "xl",
    "order",
    "orderXs",
    "orderSm",
    "orderMd",
    "orderLg",
    "orderXl",
    "className",
    "unstyled",
    "variant"
  ]);
  const ctx = useGridContext();
  const colSpan = span || ctx.columns;
  const { classes, cx } = useStyles$2({
    gutter: ctx.gutter,
    gutterXs: ctx.gutterXs,
    gutterSm: ctx.gutterSm,
    gutterMd: ctx.gutterMd,
    gutterLg: ctx.gutterLg,
    gutterXl: ctx.gutterXl,
    offset: offset2,
    offsetXs,
    offsetSm,
    offsetMd,
    offsetLg,
    offsetXl,
    xs,
    sm,
    md,
    lg,
    xl,
    order: order2,
    orderXs,
    orderSm,
    orderMd,
    orderLg,
    orderXl,
    grow: ctx.grow,
    columns: ctx.columns,
    span: colSpan
  }, { unstyled, name: "Grid", variant: variant2 });
  if (!isValidSpan(colSpan) || colSpan > ctx.columns) {
    return null;
  }
  return /* @__PURE__ */ React.createElement(Box, __spreadValues$8({
    className: cx(classes.col, className),
    ref: ref2
  }, others), children);
});
Col.displayName = "@mantine/core/Col";
var __defProp$7 = Object.defineProperty;
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$7 = (obj2, key, value) => key in obj2 ? __defProp$7(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$7 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$7.call(b2, prop))
      __defNormalProp$7(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$7)
    for (var prop of __getOwnPropSymbols$7(b2)) {
      if (__propIsEnum$7.call(b2, prop))
        __defNormalProp$7(a2, prop, b2[prop]);
    }
  return a2;
};
function getGutterStyles(gutters, theme) {
  return MANTINE_SIZES.reduce((acc, size) => {
    if (typeof gutters[size] !== "undefined") {
      acc[`@media (min-width: ${theme.breakpoints[size]})`] = {
        margin: `calc(-${getSize({ size: gutters[size], sizes: theme.spacing })} / 2)`
      };
    }
    return acc;
  }, {});
}
var useStyles$1 = createStyles$1((theme, { justify, align, gutter, gutterXs, gutterSm, gutterMd, gutterLg, gutterXl }) => ({
  root: __spreadValues$7({
    margin: `calc(-${getSize({ size: gutter, sizes: theme.spacing })} / 2)`,
    display: "flex",
    flexWrap: "wrap",
    justifyContent: justify,
    alignItems: align
  }, getGutterStyles({ xs: gutterXs, sm: gutterSm, md: gutterMd, lg: gutterLg, xl: gutterXl }, theme))
}));
var __defProp$6 = Object.defineProperty;
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$6 = (obj2, key, value) => key in obj2 ? __defProp$6(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$6 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$6.call(b2, prop))
      __defNormalProp$6(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$6)
    for (var prop of __getOwnPropSymbols$6(b2)) {
      if (__propIsEnum$6.call(b2, prop))
        __defNormalProp$6(a2, prop, b2[prop]);
    }
  return a2;
};
var __objRest$2 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$6.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$6)
    for (var prop of __getOwnPropSymbols$6(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$6.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$2 = {
  gutter: "md",
  justify: "flex-start",
  align: "stretch",
  columns: 12
};
const Grid = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("Grid", defaultProps$2, props), {
    gutter,
    gutterXs,
    gutterSm,
    gutterMd,
    gutterLg,
    gutterXl,
    children,
    grow,
    justify,
    align,
    columns,
    className,
    unstyled,
    variant: variant2
  } = _a2, others = __objRest$2(_a2, [
    "gutter",
    "gutterXs",
    "gutterSm",
    "gutterMd",
    "gutterLg",
    "gutterXl",
    "children",
    "grow",
    "justify",
    "align",
    "columns",
    "className",
    "unstyled",
    "variant"
  ]);
  const { classes, cx } = useStyles$1({ gutter, justify, align, gutterXs, gutterSm, gutterMd, gutterLg, gutterXl }, { unstyled, name: "Grid", variant: variant2 });
  return /* @__PURE__ */ React.createElement(GridProvider, {
    value: { gutter, gutterXs, gutterSm, gutterMd, gutterLg, gutterXl, grow, columns }
  }, /* @__PURE__ */ React.createElement(Box, __spreadValues$6({
    className: cx(classes.root, className),
    ref: ref2
  }, others), children));
});
Grid.Col = Col;
Grid.displayName = "@mantine/core/Grid";
var index$1 = reactExports.useLayoutEffect;
var useLatest = function useLatest2(value) {
  var ref2 = React.useRef(value);
  index$1(function() {
    ref2.current = value;
  });
  return ref2;
};
var updateRef = function updateRef2(ref2, value) {
  if (typeof ref2 === "function") {
    ref2(value);
    return;
  }
  ref2.current = value;
};
var useComposedRef = function useComposedRef2(libRef, userRef) {
  var prevUserRef = React.useRef();
  return React.useCallback(function(instance) {
    libRef.current = instance;
    if (prevUserRef.current) {
      updateRef(prevUserRef.current, null);
    }
    prevUserRef.current = userRef;
    if (!userRef) {
      return;
    }
    updateRef(userRef, instance);
  }, [userRef]);
};
var HIDDEN_TEXTAREA_STYLE = {
  "min-height": "0",
  "max-height": "none",
  height: "0",
  visibility: "hidden",
  overflow: "hidden",
  position: "absolute",
  "z-index": "-1000",
  top: "0",
  right: "0"
};
var forceHiddenStyles = function forceHiddenStyles2(node2) {
  Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(key) {
    node2.style.setProperty(key, HIDDEN_TEXTAREA_STYLE[key], "important");
  });
};
var hiddenTextarea = null;
var getHeight = function getHeight2(node2, sizingData) {
  var height2 = node2.scrollHeight;
  if (sizingData.sizingStyle.boxSizing === "border-box") {
    return height2 + sizingData.borderSize;
  }
  return height2 - sizingData.paddingSize;
};
function calculateNodeHeight(sizingData, value, minRows, maxRows) {
  if (minRows === void 0) {
    minRows = 1;
  }
  if (maxRows === void 0) {
    maxRows = Infinity;
  }
  if (!hiddenTextarea) {
    hiddenTextarea = document.createElement("textarea");
    hiddenTextarea.setAttribute("tabindex", "-1");
    hiddenTextarea.setAttribute("aria-hidden", "true");
    forceHiddenStyles(hiddenTextarea);
  }
  if (hiddenTextarea.parentNode === null) {
    document.body.appendChild(hiddenTextarea);
  }
  var paddingSize = sizingData.paddingSize, borderSize = sizingData.borderSize, sizingStyle = sizingData.sizingStyle;
  var boxSizing2 = sizingStyle.boxSizing;
  Object.keys(sizingStyle).forEach(function(_key) {
    var key = _key;
    hiddenTextarea.style[key] = sizingStyle[key];
  });
  forceHiddenStyles(hiddenTextarea);
  hiddenTextarea.value = value;
  var height2 = getHeight(hiddenTextarea, sizingData);
  hiddenTextarea.value = "x";
  var rowHeight = hiddenTextarea.scrollHeight - paddingSize;
  var minHeight2 = rowHeight * minRows;
  if (boxSizing2 === "border-box") {
    minHeight2 = minHeight2 + paddingSize + borderSize;
  }
  height2 = Math.max(minHeight2, height2);
  var maxHeight2 = rowHeight * maxRows;
  if (boxSizing2 === "border-box") {
    maxHeight2 = maxHeight2 + paddingSize + borderSize;
  }
  height2 = Math.min(maxHeight2, height2);
  return [height2, rowHeight];
}
var noop = function noop2() {
};
var pick = function pick2(props, obj2) {
  return props.reduce(function(acc, prop) {
    acc[prop] = obj2[prop];
    return acc;
  }, {});
};
var SIZING_STYLE = [
  "borderBottomWidth",
  "borderLeftWidth",
  "borderRightWidth",
  "borderTopWidth",
  "boxSizing",
  "fontFamily",
  "fontSize",
  "fontStyle",
  "fontWeight",
  "letterSpacing",
  "lineHeight",
  "paddingBottom",
  "paddingLeft",
  "paddingRight",
  "paddingTop",
  // non-standard
  "tabSize",
  "textIndent",
  // non-standard
  "textRendering",
  "textTransform",
  "width",
  "wordBreak"
];
var isIE = !!document.documentElement.currentStyle;
var getSizingData = function getSizingData2(node2) {
  var style2 = window.getComputedStyle(node2);
  if (style2 === null) {
    return null;
  }
  var sizingStyle = pick(SIZING_STYLE, style2);
  var boxSizing2 = sizingStyle.boxSizing;
  if (boxSizing2 === "") {
    return null;
  }
  if (isIE && boxSizing2 === "border-box") {
    sizingStyle.width = parseFloat(sizingStyle.width) + parseFloat(sizingStyle.borderRightWidth) + parseFloat(sizingStyle.borderLeftWidth) + parseFloat(sizingStyle.paddingRight) + parseFloat(sizingStyle.paddingLeft) + "px";
  }
  var paddingSize = parseFloat(sizingStyle.paddingBottom) + parseFloat(sizingStyle.paddingTop);
  var borderSize = parseFloat(sizingStyle.borderBottomWidth) + parseFloat(sizingStyle.borderTopWidth);
  return {
    sizingStyle,
    paddingSize,
    borderSize
  };
};
var useWindowResizeListener = function useWindowResizeListener2(listener) {
  var latestListener = useLatest(listener);
  reactExports.useLayoutEffect(function() {
    var handler = function handler2(event) {
      latestListener.current(event);
    };
    window.addEventListener("resize", handler);
    return function() {
      window.removeEventListener("resize", handler);
    };
  }, []);
};
var TextareaAutosize = function TextareaAutosize22(_ref, userRef) {
  var cacheMeasurements = _ref.cacheMeasurements, maxRows = _ref.maxRows, minRows = _ref.minRows, _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? noop : _ref$onChange, _ref$onHeightChange = _ref.onHeightChange, onHeightChange = _ref$onHeightChange === void 0 ? noop : _ref$onHeightChange, props = _objectWithoutPropertiesLoose(_ref, ["cacheMeasurements", "maxRows", "minRows", "onChange", "onHeightChange"]);
  var isControlled = props.value !== void 0;
  var libRef = reactExports.useRef(null);
  var ref2 = useComposedRef(libRef, userRef);
  var heightRef = reactExports.useRef(0);
  var measurementsCacheRef = reactExports.useRef();
  var resizeTextarea = function resizeTextarea2() {
    var node2 = libRef.current;
    var nodeSizingData = cacheMeasurements && measurementsCacheRef.current ? measurementsCacheRef.current : getSizingData(node2);
    if (!nodeSizingData) {
      return;
    }
    measurementsCacheRef.current = nodeSizingData;
    var _calculateNodeHeight = calculateNodeHeight(nodeSizingData, node2.value || node2.placeholder || "x", minRows, maxRows), height2 = _calculateNodeHeight[0], rowHeight = _calculateNodeHeight[1];
    if (heightRef.current !== height2) {
      heightRef.current = height2;
      node2.style.setProperty("height", height2 + "px", "important");
      onHeightChange(height2, {
        rowHeight
      });
    }
  };
  var handleChange = function handleChange2(event) {
    if (!isControlled) {
      resizeTextarea();
    }
    onChange(event);
  };
  {
    reactExports.useLayoutEffect(resizeTextarea);
    useWindowResizeListener(resizeTextarea);
  }
  return /* @__PURE__ */ reactExports.createElement("textarea", _extends$1({}, props, {
    onChange: handleChange,
    ref: ref2
  }));
};
var index = /* @__PURE__ */ reactExports.forwardRef(TextareaAutosize);
var useStyles = createStyles$1((theme) => ({
  input: {
    paddingTop: theme.spacing.xs,
    paddingBottom: theme.spacing.xs
  }
}));
var __defProp$5 = Object.defineProperty;
var __defProps$2 = Object.defineProperties;
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$5 = (obj2, key, value) => key in obj2 ? __defProp$5(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$5 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$5.call(b2, prop))
      __defNormalProp$5(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$5)
    for (var prop of __getOwnPropSymbols$5(b2)) {
      if (__propIsEnum$5.call(b2, prop))
        __defNormalProp$5(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$2 = (a2, b2) => __defProps$2(a2, __getOwnPropDescs$2(b2));
var __objRest$1 = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$5.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$5)
    for (var prop of __getOwnPropSymbols$5(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$5.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps$1 = {
  autosize: false,
  size: "sm",
  __staticSelector: "Textarea"
};
const Textarea = reactExports.forwardRef((props, ref2) => {
  const _a2 = useComponentDefaultProps("Textarea", defaultProps$1, props), {
    autosize,
    maxRows,
    minRows,
    label,
    error,
    description,
    id,
    className,
    required,
    style: style2,
    wrapperProps,
    classNames,
    styles: styles2,
    size,
    __staticSelector,
    sx,
    errorProps,
    descriptionProps,
    labelProps,
    inputWrapperOrder,
    inputContainer,
    unstyled,
    withAsterisk,
    variant: variant2
  } = _a2, others = __objRest$1(_a2, [
    "autosize",
    "maxRows",
    "minRows",
    "label",
    "error",
    "description",
    "id",
    "className",
    "required",
    "style",
    "wrapperProps",
    "classNames",
    "styles",
    "size",
    "__staticSelector",
    "sx",
    "errorProps",
    "descriptionProps",
    "labelProps",
    "inputWrapperOrder",
    "inputContainer",
    "unstyled",
    "withAsterisk",
    "variant"
  ]);
  const uuid2 = useId(id);
  const { classes, cx } = useStyles();
  const { systemStyles, rest } = extractSystemStyles(others);
  const sharedProps = __spreadValues$5({
    required,
    ref: ref2,
    error,
    id: uuid2,
    classNames: __spreadProps$2(__spreadValues$5({}, classNames), { input: cx(classes.input, classNames == null ? void 0 : classNames.input) }),
    styles: styles2,
    __staticSelector,
    size,
    multiline: true,
    unstyled,
    variant: variant2
  }, rest);
  return /* @__PURE__ */ React.createElement(Input.Wrapper, __spreadValues$5(__spreadValues$5({
    label,
    error,
    id: uuid2,
    description,
    required,
    style: style2,
    className,
    classNames,
    styles: styles2,
    size,
    __staticSelector,
    sx,
    errorProps,
    labelProps,
    descriptionProps,
    inputContainer,
    inputWrapperOrder,
    unstyled,
    withAsterisk,
    variant: variant2
  }, systemStyles), wrapperProps), autosize ? /* @__PURE__ */ React.createElement(Input, __spreadProps$2(__spreadValues$5({}, sharedProps), {
    component: index,
    maxRows,
    minRows
  })) : /* @__PURE__ */ React.createElement(Input, __spreadProps$2(__spreadValues$5({}, sharedProps), {
    component: "textarea",
    rows: minRows
  })));
});
Textarea.displayName = "@mantine/core/Textarea";
var __defProp$4 = Object.defineProperty;
var __defProps$1 = Object.defineProperties;
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$4 = (obj2, key, value) => key in obj2 ? __defProp$4(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$4 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$4.call(b2, prop))
      __defNormalProp$4(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$4)
    for (var prop of __getOwnPropSymbols$4(b2)) {
      if (__propIsEnum$4.call(b2, prop))
        __defNormalProp$4(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps$1 = (a2, b2) => __defProps$1(a2, __getOwnPropDescs$1(b2));
var __objRest = (source, exclude) => {
  var target = {};
  for (var prop in source)
    if (__hasOwnProp$4.call(source, prop) && exclude.indexOf(prop) < 0)
      target[prop] = source[prop];
  if (source != null && __getOwnPropSymbols$4)
    for (var prop of __getOwnPropSymbols$4(source)) {
      if (exclude.indexOf(prop) < 0 && __propIsEnum$4.call(source, prop))
        target[prop] = source[prop];
    }
  return target;
};
const defaultProps = {
  type: "text",
  size: "sm",
  __staticSelector: "TextInput"
};
const TextInput = reactExports.forwardRef((props, ref2) => {
  const _a2 = useInputProps("TextInput", defaultProps, props), { inputProps, wrapperProps } = _a2, others = __objRest(_a2, ["inputProps", "wrapperProps"]);
  return /* @__PURE__ */ React.createElement(Input.Wrapper, __spreadValues$4({}, wrapperProps), /* @__PURE__ */ React.createElement(Input, __spreadProps$1(__spreadValues$4(__spreadValues$4({}, inputProps), others), {
    ref: ref2
  })));
});
TextInput.displayName = "@mantine/core/TextInput";
var fastDeepEqual;
var hasRequiredFastDeepEqual;
function requireFastDeepEqual() {
  if (hasRequiredFastDeepEqual) return fastDeepEqual;
  hasRequiredFastDeepEqual = 1;
  fastDeepEqual = function equal(a2, b2) {
    if (a2 === b2) return true;
    if (a2 && b2 && typeof a2 == "object" && typeof b2 == "object") {
      if (a2.constructor !== b2.constructor) return false;
      var length2, i, keys;
      if (Array.isArray(a2)) {
        length2 = a2.length;
        if (length2 != b2.length) return false;
        for (i = length2; i-- !== 0; )
          if (!equal(a2[i], b2[i])) return false;
        return true;
      }
      if (a2.constructor === RegExp) return a2.source === b2.source && a2.flags === b2.flags;
      if (a2.valueOf !== Object.prototype.valueOf) return a2.valueOf() === b2.valueOf();
      if (a2.toString !== Object.prototype.toString) return a2.toString() === b2.toString();
      keys = Object.keys(a2);
      length2 = keys.length;
      if (length2 !== Object.keys(b2).length) return false;
      for (i = length2; i-- !== 0; )
        if (!Object.prototype.hasOwnProperty.call(b2, keys[i])) return false;
      for (i = length2; i-- !== 0; ) {
        var key = keys[i];
        if (!equal(a2[key], b2[key])) return false;
      }
      return true;
    }
    return a2 !== a2 && b2 !== b2;
  };
  return fastDeepEqual;
}
var fastDeepEqualExports = requireFastDeepEqual();
const isEqual = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
function filterErrors(errors) {
  if (errors === null || typeof errors !== "object") {
    return {};
  }
  return Object.keys(errors).reduce((acc, key) => {
    const errorValue = errors[key];
    if (errorValue !== void 0 && errorValue !== null && errorValue !== false) {
      acc[key] = errorValue;
    }
    return acc;
  }, {});
}
var __defProp$3 = Object.defineProperty;
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$3 = (obj2, key, value) => key in obj2 ? __defProp$3(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$3 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$3.call(b2, prop))
      __defNormalProp$3(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$3)
    for (var prop of __getOwnPropSymbols$3(b2)) {
      if (__propIsEnum$3.call(b2, prop))
        __defNormalProp$3(a2, prop, b2[prop]);
    }
  return a2;
};
function clearListState(field, state) {
  if (state === null || typeof state !== "object") {
    return {};
  }
  const clone = __spreadValues$3({}, state);
  Object.keys(state).forEach((errorKey) => {
    if (errorKey.includes(`${String(field)}.`)) {
      delete clone[errorKey];
    }
  });
  return clone;
}
const FORM_INDEX = "__MANTINE_FORM_INDEX__";
function shouldValidateOnChange(path, validateInputOnChange) {
  if (!validateInputOnChange) {
    return false;
  }
  if (typeof validateInputOnChange === "boolean") {
    return validateInputOnChange;
  }
  if (Array.isArray(validateInputOnChange)) {
    return validateInputOnChange.includes(path.replace(/[.][0-9]/g, `.${FORM_INDEX}`));
  }
  return false;
}
function set(obj2, key, val) {
  if (typeof val.value === "object") val.value = klona(val.value);
  if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === "__proto__") {
    Object.defineProperty(obj2, key, val);
  } else obj2[key] = val.value;
}
function klona(x) {
  if (typeof x !== "object") return x;
  var i = 0, k2, list, tmp, str = Object.prototype.toString.call(x);
  if (str === "[object Object]") {
    tmp = Object.create(x.__proto__ || null);
  } else if (str === "[object Array]") {
    tmp = Array(x.length);
  } else if (str === "[object Set]") {
    tmp = /* @__PURE__ */ new Set();
    x.forEach(function(val) {
      tmp.add(klona(val));
    });
  } else if (str === "[object Map]") {
    tmp = /* @__PURE__ */ new Map();
    x.forEach(function(val, key) {
      tmp.set(klona(key), klona(val));
    });
  } else if (str === "[object Date]") {
    tmp = /* @__PURE__ */ new Date(+x);
  } else if (str === "[object RegExp]") {
    tmp = new RegExp(x.source, x.flags);
  } else if (str === "[object DataView]") {
    tmp = new x.constructor(klona(x.buffer));
  } else if (str === "[object ArrayBuffer]") {
    tmp = x.slice(0);
  } else if (str.slice(-6) === "Array]") {
    tmp = new x.constructor(x);
  }
  if (tmp) {
    for (list = Object.getOwnPropertySymbols(x); i < list.length; i++) {
      set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));
    }
    for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {
      if (Object.hasOwnProperty.call(tmp, k2 = list[i]) && tmp[k2] === x[k2]) continue;
      set(tmp, k2, Object.getOwnPropertyDescriptor(x, k2));
    }
  }
  return tmp || x;
}
function getSplittedPath(path) {
  if (typeof path !== "string") {
    return [];
  }
  return path.split(".");
}
function setPath(path, value, values2) {
  const splittedPath = getSplittedPath(path);
  if (splittedPath.length === 0) {
    return values2;
  }
  const cloned = klona(values2);
  if (splittedPath.length === 1) {
    cloned[splittedPath[0]] = value;
    return cloned;
  }
  let val = cloned[splittedPath[0]];
  for (let i = 1; i < splittedPath.length - 1; i += 1) {
    if (val === void 0) {
      return cloned;
    }
    val = val[splittedPath[i]];
  }
  val[splittedPath[splittedPath.length - 1]] = value;
  return cloned;
}
function getPath(path, values2) {
  const splittedPath = getSplittedPath(path);
  if (splittedPath.length === 0 || typeof values2 !== "object" || values2 === null) {
    return void 0;
  }
  let value = values2[splittedPath[0]];
  for (let i = 1; i < splittedPath.length; i += 1) {
    if (value === void 0) {
      break;
    }
    value = value[splittedPath[i]];
  }
  return value;
}
function getValidationResults(errors) {
  const filteredErrors = filterErrors(errors);
  return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
}
function validateRulesRecord(rules, values2, path = "", errors = {}) {
  if (typeof rules !== "object" || rules === null) {
    return errors;
  }
  return Object.keys(rules).reduce((acc, ruleKey) => {
    const rule = rules[ruleKey];
    const rulePath = `${path === "" ? "" : `${path}.`}${ruleKey}`;
    const value = getPath(rulePath, values2);
    let arrayValidation = false;
    if (typeof rule === "function") {
      acc[rulePath] = rule(value, values2, rulePath);
    }
    if (typeof rule === "object" && Array.isArray(value)) {
      arrayValidation = true;
      value.forEach((_item, index2) => validateRulesRecord(rule, values2, `${rulePath}.${index2}`, acc));
    }
    if (typeof rule === "object" && typeof value === "object" && value !== null) {
      if (!arrayValidation) {
        validateRulesRecord(rule, values2, rulePath, acc);
      }
    }
    return acc;
  }, errors);
}
function validateValues(validate, values2) {
  if (typeof validate === "function") {
    return getValidationResults(validate(values2));
  }
  return getValidationResults(validateRulesRecord(validate, values2));
}
function validateFieldValue(path, rules, values2) {
  if (typeof path !== "string") {
    return { hasError: false, error: null };
  }
  const results = validateValues(rules, values2);
  const pathInError = Object.keys(results.errors).find((errorKey) => path.split(".").every((pathPart, i) => pathPart === errorKey.split(".")[i]));
  return { hasError: !!pathInError, error: pathInError ? results.errors[pathInError] : null };
}
function reorderPath(path, { from: from2, to }, values2) {
  const currentValue = getPath(path, values2);
  if (!Array.isArray(currentValue)) {
    return values2;
  }
  const cloned = [...currentValue];
  const item = currentValue[from2];
  cloned.splice(from2, 1);
  cloned.splice(to, 0, item);
  return setPath(path, cloned, values2);
}
var __defProp$2 = Object.defineProperty;
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$2 = (obj2, key, value) => key in obj2 ? __defProp$2(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$2 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$2.call(b2, prop))
      __defNormalProp$2(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$2)
    for (var prop of __getOwnPropSymbols$2(b2)) {
      if (__propIsEnum$2.call(b2, prop))
        __defNormalProp$2(a2, prop, b2[prop]);
    }
  return a2;
};
function reorderErrors(path, { from: from2, to }, errors) {
  const oldKeyStart = `${path}.${from2}`;
  const newKeyStart = `${path}.${to}`;
  const clone = __spreadValues$2({}, errors);
  Object.keys(errors).every((key) => {
    let oldKey;
    let newKey;
    if (key.startsWith(oldKeyStart)) {
      oldKey = key;
      newKey = key.replace(oldKeyStart, newKeyStart);
    }
    if (key.startsWith(newKeyStart)) {
      oldKey = key.replace(newKeyStart, oldKeyStart);
      newKey = key;
    }
    if (oldKey && newKey) {
      const value1 = clone[oldKey];
      const value2 = clone[newKey];
      value2 === void 0 ? delete clone[oldKey] : clone[oldKey] = value2;
      value1 === void 0 ? delete clone[newKey] : clone[newKey] = value1;
      return false;
    }
    return true;
  });
  return clone;
}
function removePath(path, index2, values2) {
  const currentValue = getPath(path, values2);
  if (!Array.isArray(currentValue)) {
    return values2;
  }
  return setPath(path, currentValue.filter((_2, itemIndex) => itemIndex !== index2), values2);
}
var __defProp$1 = Object.defineProperty;
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
var __defNormalProp$1 = (obj2, key, value) => key in obj2 ? __defProp$1(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues$1 = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp$1.call(b2, prop))
      __defNormalProp$1(a2, prop, b2[prop]);
  if (__getOwnPropSymbols$1)
    for (var prop of __getOwnPropSymbols$1(b2)) {
      if (__propIsEnum$1.call(b2, prop))
        __defNormalProp$1(a2, prop, b2[prop]);
    }
  return a2;
};
function getIndexFromKeyAfterPath(key, path) {
  const split = key.substring(path.length + 1).split(".")[0];
  return parseInt(split, 10);
}
function changeErrorIndices(path, index2, errors, change) {
  if (index2 === void 0) {
    return errors;
  }
  const pathString = `${String(path)}`;
  let clearedErrors = errors;
  if (change === -1) {
    clearedErrors = clearListState(`${pathString}.${index2}`, clearedErrors);
  }
  const cloned = __spreadValues$1({}, clearedErrors);
  const changedKeys = /* @__PURE__ */ new Set();
  Object.entries(clearedErrors).filter(([key]) => {
    if (!key.startsWith(`${pathString}.`)) {
      return false;
    }
    const currIndex = getIndexFromKeyAfterPath(key, pathString);
    if (Number.isNaN(currIndex)) {
      return false;
    }
    return currIndex >= index2;
  }).forEach(([key, value]) => {
    const currIndex = getIndexFromKeyAfterPath(key, pathString);
    const newKey = key.replace(`${pathString}.${currIndex}`, `${pathString}.${currIndex + change}`);
    cloned[newKey] = value;
    changedKeys.add(newKey);
    if (!changedKeys.has(key)) {
      delete cloned[key];
    }
  });
  return cloned;
}
function insertPath(path, value, index2, values2) {
  const currentValue = getPath(path, values2);
  if (!Array.isArray(currentValue)) {
    return values2;
  }
  const cloned = [...currentValue];
  cloned.splice(typeof index2 === "number" ? index2 : cloned.length, 0, value);
  return setPath(path, cloned, values2);
}
function getStatus(status, path) {
  const paths = Object.keys(status);
  if (typeof path === "string") {
    const nestedPaths = paths.filter((statusPath) => statusPath.startsWith(`${path}.`));
    return status[path] || nestedPaths.some((statusPath) => status[statusPath]) || false;
  }
  return paths.some((statusPath) => status[statusPath]);
}
function getInputOnChange(setValue) {
  return (val) => {
    if (!val) {
      setValue(val);
    } else if (typeof val === "function") {
      setValue(val);
    } else if (typeof val === "object" && "nativeEvent" in val) {
      const { currentTarget } = val;
      if (currentTarget instanceof HTMLInputElement) {
        if (currentTarget.type === "checkbox") {
          setValue(currentTarget.checked);
        } else {
          setValue(currentTarget.value);
        }
      } else if (currentTarget instanceof HTMLTextAreaElement || currentTarget instanceof HTMLSelectElement) {
        setValue(currentTarget.value);
      }
    } else {
      setValue(val);
    }
  };
}
var __defProp2 = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp2 = (obj2, key, value) => key in obj2 ? __defProp2(obj2, key, { enumerable: true, configurable: true, writable: true, value }) : obj2[key] = value;
var __spreadValues = (a2, b2) => {
  for (var prop in b2 || (b2 = {}))
    if (__hasOwnProp.call(b2, prop))
      __defNormalProp2(a2, prop, b2[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b2)) {
      if (__propIsEnum.call(b2, prop))
        __defNormalProp2(a2, prop, b2[prop]);
    }
  return a2;
};
var __spreadProps = (a2, b2) => __defProps(a2, __getOwnPropDescs(b2));
function useForm({
  initialValues = {},
  initialErrors = {},
  initialDirty = {},
  initialTouched = {},
  clearInputErrorOnChange = true,
  validateInputOnChange = false,
  validateInputOnBlur = false,
  transformValues = (values2) => values2,
  validate: rules
} = {}) {
  const [touched, setTouched] = reactExports.useState(initialTouched);
  const [dirty, setDirty] = reactExports.useState(initialDirty);
  const [values2, _setValues] = reactExports.useState(initialValues);
  const [errors, _setErrors] = reactExports.useState(filterErrors(initialErrors));
  const valuesSnapshot = reactExports.useRef(initialValues);
  const setValuesSnapshot = (_values) => {
    valuesSnapshot.current = _values;
  };
  const resetTouched = reactExports.useCallback(() => setTouched({}), []);
  const resetDirty = (_values) => {
    const newSnapshot = _values ? __spreadValues(__spreadValues({}, values2), _values) : values2;
    setValuesSnapshot(newSnapshot);
    setDirty({});
  };
  const setErrors = reactExports.useCallback((errs) => _setErrors((current) => filterErrors(typeof errs === "function" ? errs(current) : errs)), []);
  const clearErrors = reactExports.useCallback(() => _setErrors({}), []);
  const reset = reactExports.useCallback(() => {
    _setValues(initialValues);
    clearErrors();
    setValuesSnapshot(initialValues);
    setDirty({});
    resetTouched();
  }, []);
  const setFieldError = reactExports.useCallback((path, error) => setErrors((current) => __spreadProps(__spreadValues({}, current), { [path]: error })), []);
  const clearFieldError = reactExports.useCallback((path) => setErrors((current) => {
    if (typeof path !== "string") {
      return current;
    }
    const clone = __spreadValues({}, current);
    delete clone[path];
    return clone;
  }), []);
  const clearFieldDirty = reactExports.useCallback((path) => setDirty((current) => {
    if (typeof path !== "string") {
      return current;
    }
    const result = clearListState(path, current);
    delete result[path];
    return result;
  }), []);
  const setFieldValue = reactExports.useCallback((path, value) => {
    const shouldValidate = shouldValidateOnChange(path, validateInputOnChange);
    clearFieldDirty(path);
    setTouched((currentTouched) => __spreadProps(__spreadValues({}, currentTouched), { [path]: true }));
    _setValues((current) => {
      const result = setPath(path, value, current);
      if (shouldValidate) {
        const validationResults = validateFieldValue(path, rules, result);
        validationResults.hasError ? setFieldError(path, validationResults.error) : clearFieldError(path);
      }
      return result;
    });
    !shouldValidate && clearInputErrorOnChange && setFieldError(path, null);
  }, []);
  const setValues = reactExports.useCallback((payload) => {
    _setValues((currentValues) => {
      const valuesPartial = typeof payload === "function" ? payload(currentValues) : payload;
      return __spreadValues(__spreadValues({}, currentValues), valuesPartial);
    });
    clearInputErrorOnChange && clearErrors();
  }, []);
  const reorderListItem = reactExports.useCallback((path, payload) => {
    clearFieldDirty(path);
    _setValues((current) => reorderPath(path, payload, current));
    _setErrors((errs) => reorderErrors(path, payload, errs));
  }, []);
  const removeListItem = reactExports.useCallback((path, index2) => {
    clearFieldDirty(path);
    _setValues((current) => removePath(path, index2, current));
    _setErrors((errs) => changeErrorIndices(path, index2, errs, -1));
  }, []);
  const insertListItem = reactExports.useCallback((path, item, index2) => {
    clearFieldDirty(path);
    _setValues((current) => insertPath(path, item, index2, current));
    _setErrors((errs) => changeErrorIndices(path, index2, errs, 1));
  }, []);
  const validate = reactExports.useCallback(() => {
    const results = validateValues(rules, values2);
    _setErrors(results.errors);
    return results;
  }, [values2, rules]);
  const validateField = reactExports.useCallback((path) => {
    const results = validateFieldValue(path, rules, values2);
    results.hasError ? setFieldError(path, results.error) : clearFieldError(path);
    return results;
  }, [values2, rules]);
  const getInputProps = (path, { type: type2 = "input", withError = true, withFocus = true } = {}) => {
    const onChange = getInputOnChange((value) => setFieldValue(path, value));
    const payload = { onChange };
    if (withError) {
      payload.error = errors[path];
    }
    if (type2 === "checkbox") {
      payload.checked = getPath(path, values2);
    } else {
      payload.value = getPath(path, values2);
    }
    if (withFocus) {
      payload.onFocus = () => setTouched((current) => __spreadProps(__spreadValues({}, current), { [path]: true }));
      payload.onBlur = () => {
        if (shouldValidateOnChange(path, validateInputOnBlur)) {
          const validationResults = validateFieldValue(path, rules, values2);
          validationResults.hasError ? setFieldError(path, validationResults.error) : clearFieldError(path);
        }
      };
    }
    return payload;
  };
  const onSubmit = (handleSubmit, handleValidationFailure) => (event) => {
    event == null ? void 0 : event.preventDefault();
    const results = validate();
    if (results.hasErrors) {
      handleValidationFailure == null ? void 0 : handleValidationFailure(results.errors, values2, event);
    } else {
      handleSubmit == null ? void 0 : handleSubmit(transformValues(values2), event);
    }
  };
  const getTransformedValues = (input) => transformValues(input || values2);
  const onReset = reactExports.useCallback((event) => {
    event.preventDefault();
    reset();
  }, []);
  const isDirty = (path) => {
    if (path) {
      const overriddenValue = getPath(path, dirty);
      if (typeof overriddenValue === "boolean") {
        return overriddenValue;
      }
      const sliceOfValues = getPath(path, values2);
      const sliceOfInitialValues = getPath(path, valuesSnapshot.current);
      return !isEqual(sliceOfValues, sliceOfInitialValues);
    }
    const isOverridden = Object.keys(dirty).length > 0;
    if (isOverridden) {
      return getStatus(dirty);
    }
    return !isEqual(values2, valuesSnapshot.current);
  };
  const isTouched = reactExports.useCallback((path) => getStatus(touched, path), [touched]);
  const isValid = reactExports.useCallback((path) => path ? !validateFieldValue(path, rules, values2).hasError : !validateValues(rules, values2).hasErrors, [values2, rules]);
  return {
    values: values2,
    errors,
    setValues,
    setErrors,
    setFieldValue,
    setFieldError,
    clearFieldError,
    clearErrors,
    reset,
    validate,
    validateField,
    reorderListItem,
    removeListItem,
    insertListItem,
    getInputProps,
    onSubmit,
    onReset,
    isDirty,
    isTouched,
    setTouched,
    setDirty,
    resetTouched,
    resetDirty,
    isValid,
    getTransformedValues
  };
}
const visuallyHiddenInput = "_visuallyHiddenInput_1r7n6_1";
const styles$2 = {
  visuallyHiddenInput
};
/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var extendStatics = function(d2, b2) {
  extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
    d3.__proto__ = b3;
  } || function(d3, b3) {
    for (var p2 in b3) if (Object.prototype.hasOwnProperty.call(b3, p2)) d3[p2] = b3[p2];
  };
  return extendStatics(d2, b2);
};
function __extends(d2, b2) {
  if (typeof b2 !== "function" && b2 !== null)
    throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
  extendStatics(d2, b2);
  function __() {
    this.constructor = d2;
  }
  d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
}
var __assign = function() {
  __assign = Object.assign || function __assign2(t) {
    for (var s, i = 1, n = arguments.length; i < n; i++) {
      s = arguments[i];
      for (var p2 in s) if (Object.prototype.hasOwnProperty.call(s, p2)) t[p2] = s[p2];
    }
    return t;
  };
  return __assign.apply(this, arguments);
};
function __awaiter$1(thisArg, _arguments, P2, generator) {
  function adopt(value) {
    return value instanceof P2 ? value : new P2(function(resolve) {
      resolve(value);
    });
  }
  return new (P2 || (P2 = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e2) {
        reject(e2);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e2) {
        reject(e2);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, [])).next());
  });
}
function __generator(thisArg, body2) {
  var _2 = { label: 0, sent: function() {
    if (t[0] & 1) throw t[1];
    return t[1];
  }, trys: [], ops: [] }, f2, y2, t, g2;
  return g2 = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g2[Symbol.iterator] = function() {
    return this;
  }), g2;
  function verb(n) {
    return function(v2) {
      return step([n, v2]);
    };
  }
  function step(op) {
    if (f2) throw new TypeError("Generator is already executing.");
    while (_2) try {
      if (f2 = 1, y2 && (t = op[0] & 2 ? y2["return"] : op[0] ? y2["throw"] || ((t = y2["return"]) && t.call(y2), 0) : y2.next) && !(t = t.call(y2, op[1])).done) return t;
      if (y2 = 0, t) op = [op[0] & 2, t.value];
      switch (op[0]) {
        case 0:
        case 1:
          t = op;
          break;
        case 4:
          _2.label++;
          return { value: op[1], done: false };
        case 5:
          _2.label++;
          y2 = op[1];
          op = [0];
          continue;
        case 7:
          op = _2.ops.pop();
          _2.trys.pop();
          continue;
        default:
          if (!(t = _2.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
            _2 = 0;
            continue;
          }
          if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
            _2.label = op[1];
            break;
          }
          if (op[0] === 6 && _2.label < t[1]) {
            _2.label = t[1];
            t = op;
            break;
          }
          if (t && _2.label < t[2]) {
            _2.label = t[2];
            _2.ops.push(op);
            break;
          }
          if (t[2]) _2.ops.pop();
          _2.trys.pop();
          continue;
      }
      op = body2.call(thisArg, _2);
    } catch (e2) {
      op = [6, e2];
      y2 = 0;
    } finally {
      f2 = t = 0;
    }
    if (op[0] & 5) throw op[1];
    return { value: op[0] ? op[1] : void 0, done: true };
  }
}
function __spreadArray(to, from2, pack2) {
  if (arguments.length === 2) for (var i = 0, l = from2.length, ar; i < l; i++) {
    if (ar || !(i in from2)) {
      if (!ar) ar = Array.prototype.slice.call(from2, 0, i);
      ar[i] = from2[i];
    }
  }
  return to.concat(ar || from2);
}
var Bounds = (
  /** @class */
  function() {
    function Bounds2(left2, top2, width2, height2) {
      this.left = left2;
      this.top = top2;
      this.width = width2;
      this.height = height2;
    }
    Bounds2.prototype.add = function(x, y2, w, h2) {
      return new Bounds2(this.left + x, this.top + y2, this.width + w, this.height + h2);
    };
    Bounds2.fromClientRect = function(context, clientRect) {
      return new Bounds2(clientRect.left + context.windowBounds.left, clientRect.top + context.windowBounds.top, clientRect.width, clientRect.height);
    };
    Bounds2.fromDOMRectList = function(context, domRectList) {
      var domRect = Array.from(domRectList).find(function(rect) {
        return rect.width !== 0;
      });
      return domRect ? new Bounds2(domRect.left + context.windowBounds.left, domRect.top + context.windowBounds.top, domRect.width, domRect.height) : Bounds2.EMPTY;
    };
    Bounds2.EMPTY = new Bounds2(0, 0, 0, 0);
    return Bounds2;
  }()
);
var parseBounds = function(context, node2) {
  return Bounds.fromClientRect(context, node2.getBoundingClientRect());
};
var parseDocumentSize = function(document2) {
  var body2 = document2.body;
  var documentElement = document2.documentElement;
  if (!body2 || !documentElement) {
    throw new Error("Unable to get document size");
  }
  var width2 = Math.max(Math.max(body2.scrollWidth, documentElement.scrollWidth), Math.max(body2.offsetWidth, documentElement.offsetWidth), Math.max(body2.clientWidth, documentElement.clientWidth));
  var height2 = Math.max(Math.max(body2.scrollHeight, documentElement.scrollHeight), Math.max(body2.offsetHeight, documentElement.offsetHeight), Math.max(body2.clientHeight, documentElement.clientHeight));
  return new Bounds(0, 0, width2, height2);
};
var toCodePoints$1 = function(str) {
  var codePoints = [];
  var i = 0;
  var length2 = str.length;
  while (i < length2) {
    var value = str.charCodeAt(i++);
    if (value >= 55296 && value <= 56319 && i < length2) {
      var extra = str.charCodeAt(i++);
      if ((extra & 64512) === 56320) {
        codePoints.push(((value & 1023) << 10) + (extra & 1023) + 65536);
      } else {
        codePoints.push(value);
        i--;
      }
    } else {
      codePoints.push(value);
    }
  }
  return codePoints;
};
var fromCodePoint$1 = function() {
  var codePoints = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    codePoints[_i] = arguments[_i];
  }
  if (String.fromCodePoint) {
    return String.fromCodePoint.apply(String, codePoints);
  }
  var length2 = codePoints.length;
  if (!length2) {
    return "";
  }
  var codeUnits = [];
  var index2 = -1;
  var result = "";
  while (++index2 < length2) {
    var codePoint = codePoints[index2];
    if (codePoint <= 65535) {
      codeUnits.push(codePoint);
    } else {
      codePoint -= 65536;
      codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
    }
    if (index2 + 1 === length2 || codeUnits.length > 16384) {
      result += String.fromCharCode.apply(String, codeUnits);
      codeUnits.length = 0;
    }
  }
  return result;
};
var chars$2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var lookup$2 = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
for (var i$2 = 0; i$2 < chars$2.length; i$2++) {
  lookup$2[chars$2.charCodeAt(i$2)] = i$2;
}
var chars$1$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var lookup$1$1 = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
for (var i$1$1 = 0; i$1$1 < chars$1$1.length; i$1$1++) {
  lookup$1$1[chars$1$1.charCodeAt(i$1$1)] = i$1$1;
}
var decode$1 = function(base642) {
  var bufferLength = base642.length * 0.75, len = base642.length, i, p2 = 0, encoded1, encoded2, encoded3, encoded4;
  if (base642[base642.length - 1] === "=") {
    bufferLength--;
    if (base642[base642.length - 2] === "=") {
      bufferLength--;
    }
  }
  var buffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined" && typeof Uint8Array.prototype.slice !== "undefined" ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
  var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
  for (i = 0; i < len; i += 4) {
    encoded1 = lookup$1$1[base642.charCodeAt(i)];
    encoded2 = lookup$1$1[base642.charCodeAt(i + 1)];
    encoded3 = lookup$1$1[base642.charCodeAt(i + 2)];
    encoded4 = lookup$1$1[base642.charCodeAt(i + 3)];
    bytes[p2++] = encoded1 << 2 | encoded2 >> 4;
    bytes[p2++] = (encoded2 & 15) << 4 | encoded3 >> 2;
    bytes[p2++] = (encoded3 & 3) << 6 | encoded4 & 63;
  }
  return buffer;
};
var polyUint16Array$1 = function(buffer) {
  var length2 = buffer.length;
  var bytes = [];
  for (var i = 0; i < length2; i += 2) {
    bytes.push(buffer[i + 1] << 8 | buffer[i]);
  }
  return bytes;
};
var polyUint32Array$1 = function(buffer) {
  var length2 = buffer.length;
  var bytes = [];
  for (var i = 0; i < length2; i += 4) {
    bytes.push(buffer[i + 3] << 24 | buffer[i + 2] << 16 | buffer[i + 1] << 8 | buffer[i]);
  }
  return bytes;
};
var UTRIE2_SHIFT_2$1 = 5;
var UTRIE2_SHIFT_1$1 = 6 + 5;
var UTRIE2_INDEX_SHIFT$1 = 2;
var UTRIE2_SHIFT_1_2$1 = UTRIE2_SHIFT_1$1 - UTRIE2_SHIFT_2$1;
var UTRIE2_LSCP_INDEX_2_OFFSET$1 = 65536 >> UTRIE2_SHIFT_2$1;
var UTRIE2_DATA_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_2$1;
var UTRIE2_DATA_MASK$1 = UTRIE2_DATA_BLOCK_LENGTH$1 - 1;
var UTRIE2_LSCP_INDEX_2_LENGTH$1 = 1024 >> UTRIE2_SHIFT_2$1;
var UTRIE2_INDEX_2_BMP_LENGTH$1 = UTRIE2_LSCP_INDEX_2_OFFSET$1 + UTRIE2_LSCP_INDEX_2_LENGTH$1;
var UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 = UTRIE2_INDEX_2_BMP_LENGTH$1;
var UTRIE2_UTF8_2B_INDEX_2_LENGTH$1 = 2048 >> 6;
var UTRIE2_INDEX_1_OFFSET$1 = UTRIE2_UTF8_2B_INDEX_2_OFFSET$1 + UTRIE2_UTF8_2B_INDEX_2_LENGTH$1;
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 = 65536 >> UTRIE2_SHIFT_1$1;
var UTRIE2_INDEX_2_BLOCK_LENGTH$1 = 1 << UTRIE2_SHIFT_1_2$1;
var UTRIE2_INDEX_2_MASK$1 = UTRIE2_INDEX_2_BLOCK_LENGTH$1 - 1;
var slice16$1 = function(view, start2, end2) {
  if (view.slice) {
    return view.slice(start2, end2);
  }
  return new Uint16Array(Array.prototype.slice.call(view, start2, end2));
};
var slice32$1 = function(view, start2, end2) {
  if (view.slice) {
    return view.slice(start2, end2);
  }
  return new Uint32Array(Array.prototype.slice.call(view, start2, end2));
};
var createTrieFromBase64$1 = function(base642, _byteLength) {
  var buffer = decode$1(base642);
  var view32 = Array.isArray(buffer) ? polyUint32Array$1(buffer) : new Uint32Array(buffer);
  var view16 = Array.isArray(buffer) ? polyUint16Array$1(buffer) : new Uint16Array(buffer);
  var headerLength = 24;
  var index2 = slice16$1(view16, headerLength / 2, view32[4] / 2);
  var data = view32[5] === 2 ? slice16$1(view16, (headerLength + view32[4]) / 2) : slice32$1(view32, Math.ceil((headerLength + view32[4]) / 4));
  return new Trie$1(view32[0], view32[1], view32[2], view32[3], index2, data);
};
var Trie$1 = (
  /** @class */
  function() {
    function Trie2(initialValue, errorValue, highStart, highValueIndex, index2, data) {
      this.initialValue = initialValue;
      this.errorValue = errorValue;
      this.highStart = highStart;
      this.highValueIndex = highValueIndex;
      this.index = index2;
      this.data = data;
    }
    Trie2.prototype.get = function(codePoint) {
      var ix;
      if (codePoint >= 0) {
        if (codePoint < 55296 || codePoint > 56319 && codePoint <= 65535) {
          ix = this.index[codePoint >> UTRIE2_SHIFT_2$1];
          ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
          return this.data[ix];
        }
        if (codePoint <= 65535) {
          ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET$1 + (codePoint - 55296 >> UTRIE2_SHIFT_2$1)];
          ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
          return this.data[ix];
        }
        if (codePoint < this.highStart) {
          ix = UTRIE2_INDEX_1_OFFSET$1 - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH$1 + (codePoint >> UTRIE2_SHIFT_1$1);
          ix = this.index[ix];
          ix += codePoint >> UTRIE2_SHIFT_2$1 & UTRIE2_INDEX_2_MASK$1;
          ix = this.index[ix];
          ix = (ix << UTRIE2_INDEX_SHIFT$1) + (codePoint & UTRIE2_DATA_MASK$1);
          return this.data[ix];
        }
        if (codePoint <= 1114111) {
          return this.data[this.highValueIndex];
        }
      }
      return this.errorValue;
    };
    return Trie2;
  }()
);
var chars$3 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var lookup$3 = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
for (var i$3 = 0; i$3 < chars$3.length; i$3++) {
  lookup$3[chars$3.charCodeAt(i$3)] = i$3;
}
var base64$1 = " ";
var LETTER_NUMBER_MODIFIER = 50;
var BK = 1;
var CR$1 = 2;
var LF$1 = 3;
var CM = 4;
var NL = 5;
var WJ = 7;
var ZW = 8;
var GL = 9;
var SP = 10;
var ZWJ$1 = 11;
var B2 = 12;
var BA = 13;
var BB = 14;
var HY = 15;
var CB = 16;
var CL = 17;
var CP = 18;
var EX = 19;
var IN = 20;
var NS = 21;
var OP = 22;
var QU = 23;
var IS = 24;
var NU = 25;
var PO = 26;
var PR = 27;
var SY = 28;
var AI = 29;
var AL = 30;
var CJ = 31;
var EB = 32;
var EM = 33;
var H2 = 34;
var H3 = 35;
var HL = 36;
var ID = 37;
var JL = 38;
var JV = 39;
var JT = 40;
var RI$1 = 41;
var SA = 42;
var XX = 43;
var ea_OP = [9001, 65288];
var BREAK_MANDATORY = "!";
var BREAK_NOT_ALLOWED$1 = "×";
var BREAK_ALLOWED$1 = "÷";
var UnicodeTrie$1 = createTrieFromBase64$1(base64$1);
var ALPHABETICS = [AL, HL];
var HARD_LINE_BREAKS = [BK, CR$1, LF$1, NL];
var SPACE$1 = [SP, ZW];
var PREFIX_POSTFIX = [PR, PO];
var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE$1);
var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];
var HYPHEN = [HY, BA];
var codePointsToCharacterClasses = function(codePoints, lineBreak2) {
  if (lineBreak2 === void 0) {
    lineBreak2 = "strict";
  }
  var types = [];
  var indices = [];
  var categories = [];
  codePoints.forEach(function(codePoint, index2) {
    var classType = UnicodeTrie$1.get(codePoint);
    if (classType > LETTER_NUMBER_MODIFIER) {
      categories.push(true);
      classType -= LETTER_NUMBER_MODIFIER;
    } else {
      categories.push(false);
    }
    if (["normal", "auto", "loose"].indexOf(lineBreak2) !== -1) {
      if ([8208, 8211, 12316, 12448].indexOf(codePoint) !== -1) {
        indices.push(index2);
        return types.push(CB);
      }
    }
    if (classType === CM || classType === ZWJ$1) {
      if (index2 === 0) {
        indices.push(index2);
        return types.push(AL);
      }
      var prev2 = types[index2 - 1];
      if (LINE_BREAKS.indexOf(prev2) === -1) {
        indices.push(indices[index2 - 1]);
        return types.push(prev2);
      }
      indices.push(index2);
      return types.push(AL);
    }
    indices.push(index2);
    if (classType === CJ) {
      return types.push(lineBreak2 === "strict" ? NS : ID);
    }
    if (classType === SA) {
      return types.push(AL);
    }
    if (classType === AI) {
      return types.push(AL);
    }
    if (classType === XX) {
      if (codePoint >= 131072 && codePoint <= 196605 || codePoint >= 196608 && codePoint <= 262141) {
        return types.push(ID);
      } else {
        return types.push(AL);
      }
    }
    types.push(classType);
  });
  return [indices, types, categories];
};
var isAdjacentWithSpaceIgnored = function(a2, b2, currentIndex, classTypes) {
  var current = classTypes[currentIndex];
  if (Array.isArray(a2) ? a2.indexOf(current) !== -1 : a2 === current) {
    var i = currentIndex;
    while (i <= classTypes.length) {
      i++;
      var next2 = classTypes[i];
      if (next2 === b2) {
        return true;
      }
      if (next2 !== SP) {
        break;
      }
    }
  }
  if (current === SP) {
    var i = currentIndex;
    while (i > 0) {
      i--;
      var prev2 = classTypes[i];
      if (Array.isArray(a2) ? a2.indexOf(prev2) !== -1 : a2 === prev2) {
        var n = currentIndex;
        while (n <= classTypes.length) {
          n++;
          var next2 = classTypes[n];
          if (next2 === b2) {
            return true;
          }
          if (next2 !== SP) {
            break;
          }
        }
      }
      if (prev2 !== SP) {
        break;
      }
    }
  }
  return false;
};
var previousNonSpaceClassType = function(currentIndex, classTypes) {
  var i = currentIndex;
  while (i >= 0) {
    var type2 = classTypes[i];
    if (type2 === SP) {
      i--;
    } else {
      return type2;
    }
  }
  return 0;
};
var _lineBreakAtIndex = function(codePoints, classTypes, indicies, index2, forbiddenBreaks) {
  if (indicies[index2] === 0) {
    return BREAK_NOT_ALLOWED$1;
  }
  var currentIndex = index2 - 1;
  if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {
    return BREAK_NOT_ALLOWED$1;
  }
  var beforeIndex = currentIndex - 1;
  var afterIndex = currentIndex + 1;
  var current = classTypes[currentIndex];
  var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;
  var next2 = classTypes[afterIndex];
  if (current === CR$1 && next2 === LF$1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (HARD_LINE_BREAKS.indexOf(current) !== -1) {
    return BREAK_MANDATORY;
  }
  if (HARD_LINE_BREAKS.indexOf(next2) !== -1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (SPACE$1.indexOf(next2) !== -1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {
    return BREAK_ALLOWED$1;
  }
  if (UnicodeTrie$1.get(codePoints[currentIndex]) === ZWJ$1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if ((current === EB || current === EM) && UnicodeTrie$1.get(codePoints[afterIndex]) === ZWJ$1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (current === WJ || next2 === WJ) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (current === GL) {
    return BREAK_NOT_ALLOWED$1;
  }
  if ([SP, BA, HY].indexOf(current) === -1 && next2 === GL) {
    return BREAK_NOT_ALLOWED$1;
  }
  if ([CL, CP, EX, IS, SY].indexOf(next2) !== -1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (current === SP) {
    return BREAK_ALLOWED$1;
  }
  if (current === QU || next2 === QU) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (next2 === CB || current === CB) {
    return BREAK_ALLOWED$1;
  }
  if ([BA, HY, NS].indexOf(next2) !== -1 || current === BB) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (before === HL && HYPHEN.indexOf(current) !== -1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (current === SY && next2 === HL) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (next2 === IN) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (ALPHABETICS.indexOf(next2) !== -1 && current === NU || ALPHABETICS.indexOf(current) !== -1 && next2 === NU) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (current === PR && [ID, EB, EM].indexOf(next2) !== -1 || [ID, EB, EM].indexOf(current) !== -1 && next2 === PO) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next2) !== -1 || PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next2) !== -1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (
    // (PR | PO) × ( OP | HY )? NU
    [PR, PO].indexOf(current) !== -1 && (next2 === NU || [OP, HY].indexOf(next2) !== -1 && classTypes[afterIndex + 1] === NU) || // ( OP | HY ) × NU
    [OP, HY].indexOf(current) !== -1 && next2 === NU || // NU ×	(NU | SY | IS)
    current === NU && [NU, SY, IS].indexOf(next2) !== -1
  ) {
    return BREAK_NOT_ALLOWED$1;
  }
  if ([NU, SY, IS, CL, CP].indexOf(next2) !== -1) {
    var prevIndex = currentIndex;
    while (prevIndex >= 0) {
      var type2 = classTypes[prevIndex];
      if (type2 === NU) {
        return BREAK_NOT_ALLOWED$1;
      } else if ([SY, IS].indexOf(type2) !== -1) {
        prevIndex--;
      } else {
        break;
      }
    }
  }
  if ([PR, PO].indexOf(next2) !== -1) {
    var prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;
    while (prevIndex >= 0) {
      var type2 = classTypes[prevIndex];
      if (type2 === NU) {
        return BREAK_NOT_ALLOWED$1;
      } else if ([SY, IS].indexOf(type2) !== -1) {
        prevIndex--;
      } else {
        break;
      }
    }
  }
  if (JL === current && [JL, JV, H2, H3].indexOf(next2) !== -1 || [JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next2) !== -1 || [JT, H3].indexOf(current) !== -1 && next2 === JT) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next2) !== -1 || KOREAN_SYLLABLE_BLOCK.indexOf(next2) !== -1 && current === PR) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next2) !== -1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (current === IS && ALPHABETICS.indexOf(next2) !== -1) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (ALPHABETICS.concat(NU).indexOf(current) !== -1 && next2 === OP && ea_OP.indexOf(codePoints[afterIndex]) === -1 || ALPHABETICS.concat(NU).indexOf(next2) !== -1 && current === CP) {
    return BREAK_NOT_ALLOWED$1;
  }
  if (current === RI$1 && next2 === RI$1) {
    var i = indicies[currentIndex];
    var count = 1;
    while (i > 0) {
      i--;
      if (classTypes[i] === RI$1) {
        count++;
      } else {
        break;
      }
    }
    if (count % 2 !== 0) {
      return BREAK_NOT_ALLOWED$1;
    }
  }
  if (current === EB && next2 === EM) {
    return BREAK_NOT_ALLOWED$1;
  }
  return BREAK_ALLOWED$1;
};
var cssFormattedClasses = function(codePoints, options) {
  if (!options) {
    options = { lineBreak: "normal", wordBreak: "normal" };
  }
  var _a2 = codePointsToCharacterClasses(codePoints, options.lineBreak), indicies = _a2[0], classTypes = _a2[1], isLetterNumber = _a2[2];
  if (options.wordBreak === "break-all" || options.wordBreak === "break-word") {
    classTypes = classTypes.map(function(type2) {
      return [NU, AL, SA].indexOf(type2) !== -1 ? ID : type2;
    });
  }
  var forbiddenBreakpoints = options.wordBreak === "keep-all" ? isLetterNumber.map(function(letterNumber, i) {
    return letterNumber && codePoints[i] >= 19968 && codePoints[i] <= 40959;
  }) : void 0;
  return [indicies, classTypes, forbiddenBreakpoints];
};
var Break = (
  /** @class */
  function() {
    function Break2(codePoints, lineBreak2, start2, end2) {
      this.codePoints = codePoints;
      this.required = lineBreak2 === BREAK_MANDATORY;
      this.start = start2;
      this.end = end2;
    }
    Break2.prototype.slice = function() {
      return fromCodePoint$1.apply(void 0, this.codePoints.slice(this.start, this.end));
    };
    return Break2;
  }()
);
var LineBreaker = function(str, options) {
  var codePoints = toCodePoints$1(str);
  var _a2 = cssFormattedClasses(codePoints, options), indicies = _a2[0], classTypes = _a2[1], forbiddenBreakpoints = _a2[2];
  var length2 = codePoints.length;
  var lastEnd = 0;
  var nextIndex = 0;
  return {
    next: function() {
      if (nextIndex >= length2) {
        return { done: true, value: null };
      }
      var lineBreak2 = BREAK_NOT_ALLOWED$1;
      while (nextIndex < length2 && (lineBreak2 = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED$1) {
      }
      if (lineBreak2 !== BREAK_NOT_ALLOWED$1 || nextIndex === length2) {
        var value = new Break(codePoints, lineBreak2, lastEnd, nextIndex);
        lastEnd = nextIndex;
        return { value, done: false };
      }
      return { done: true, value: null };
    }
  };
};
var FLAG_UNRESTRICTED = 1 << 0;
var FLAG_ID = 1 << 1;
var FLAG_INTEGER = 1 << 2;
var FLAG_NUMBER = 1 << 3;
var LINE_FEED = 10;
var SOLIDUS = 47;
var REVERSE_SOLIDUS = 92;
var CHARACTER_TABULATION = 9;
var SPACE = 32;
var QUOTATION_MARK = 34;
var EQUALS_SIGN = 61;
var NUMBER_SIGN = 35;
var DOLLAR_SIGN = 36;
var PERCENTAGE_SIGN = 37;
var APOSTROPHE = 39;
var LEFT_PARENTHESIS = 40;
var RIGHT_PARENTHESIS = 41;
var LOW_LINE = 95;
var HYPHEN_MINUS = 45;
var EXCLAMATION_MARK = 33;
var LESS_THAN_SIGN = 60;
var GREATER_THAN_SIGN = 62;
var COMMERCIAL_AT = 64;
var LEFT_SQUARE_BRACKET = 91;
var RIGHT_SQUARE_BRACKET = 93;
var CIRCUMFLEX_ACCENT = 61;
var LEFT_CURLY_BRACKET = 123;
var QUESTION_MARK = 63;
var RIGHT_CURLY_BRACKET = 125;
var VERTICAL_LINE = 124;
var TILDE = 126;
var CONTROL = 128;
var REPLACEMENT_CHARACTER = 65533;
var ASTERISK = 42;
var PLUS_SIGN = 43;
var COMMA = 44;
var COLON = 58;
var SEMICOLON = 59;
var FULL_STOP = 46;
var NULL = 0;
var BACKSPACE = 8;
var LINE_TABULATION = 11;
var SHIFT_OUT = 14;
var INFORMATION_SEPARATOR_ONE = 31;
var DELETE = 127;
var EOF = -1;
var ZERO = 48;
var a = 97;
var e = 101;
var f = 102;
var u = 117;
var z = 122;
var A = 65;
var E = 69;
var F = 70;
var U = 85;
var Z = 90;
var isDigit = function(codePoint) {
  return codePoint >= ZERO && codePoint <= 57;
};
var isSurrogateCodePoint = function(codePoint) {
  return codePoint >= 55296 && codePoint <= 57343;
};
var isHex = function(codePoint) {
  return isDigit(codePoint) || codePoint >= A && codePoint <= F || codePoint >= a && codePoint <= f;
};
var isLowerCaseLetter = function(codePoint) {
  return codePoint >= a && codePoint <= z;
};
var isUpperCaseLetter = function(codePoint) {
  return codePoint >= A && codePoint <= Z;
};
var isLetter = function(codePoint) {
  return isLowerCaseLetter(codePoint) || isUpperCaseLetter(codePoint);
};
var isNonASCIICodePoint = function(codePoint) {
  return codePoint >= CONTROL;
};
var isWhiteSpace = function(codePoint) {
  return codePoint === LINE_FEED || codePoint === CHARACTER_TABULATION || codePoint === SPACE;
};
var isNameStartCodePoint = function(codePoint) {
  return isLetter(codePoint) || isNonASCIICodePoint(codePoint) || codePoint === LOW_LINE;
};
var isNameCodePoint = function(codePoint) {
  return isNameStartCodePoint(codePoint) || isDigit(codePoint) || codePoint === HYPHEN_MINUS;
};
var isNonPrintableCodePoint = function(codePoint) {
  return codePoint >= NULL && codePoint <= BACKSPACE || codePoint === LINE_TABULATION || codePoint >= SHIFT_OUT && codePoint <= INFORMATION_SEPARATOR_ONE || codePoint === DELETE;
};
var isValidEscape = function(c1, c2) {
  if (c1 !== REVERSE_SOLIDUS) {
    return false;
  }
  return c2 !== LINE_FEED;
};
var isIdentifierStart = function(c1, c2, c3) {
  if (c1 === HYPHEN_MINUS) {
    return isNameStartCodePoint(c2) || isValidEscape(c2, c3);
  } else if (isNameStartCodePoint(c1)) {
    return true;
  } else if (c1 === REVERSE_SOLIDUS && isValidEscape(c1, c2)) {
    return true;
  }
  return false;
};
var isNumberStart = function(c1, c2, c3) {
  if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {
    if (isDigit(c2)) {
      return true;
    }
    return c2 === FULL_STOP && isDigit(c3);
  }
  if (c1 === FULL_STOP) {
    return isDigit(c2);
  }
  return isDigit(c1);
};
var stringToNumber = function(codePoints) {
  var c = 0;
  var sign2 = 1;
  if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {
    if (codePoints[c] === HYPHEN_MINUS) {
      sign2 = -1;
    }
    c++;
  }
  var integers = [];
  while (isDigit(codePoints[c])) {
    integers.push(codePoints[c++]);
  }
  var int = integers.length ? parseInt(fromCodePoint$1.apply(void 0, integers), 10) : 0;
  if (codePoints[c] === FULL_STOP) {
    c++;
  }
  var fraction = [];
  while (isDigit(codePoints[c])) {
    fraction.push(codePoints[c++]);
  }
  var fracd = fraction.length;
  var frac = fracd ? parseInt(fromCodePoint$1.apply(void 0, fraction), 10) : 0;
  if (codePoints[c] === E || codePoints[c] === e) {
    c++;
  }
  var expsign = 1;
  if (codePoints[c] === PLUS_SIGN || codePoints[c] === HYPHEN_MINUS) {
    if (codePoints[c] === HYPHEN_MINUS) {
      expsign = -1;
    }
    c++;
  }
  var exponent = [];
  while (isDigit(codePoints[c])) {
    exponent.push(codePoints[c++]);
  }
  var exp = exponent.length ? parseInt(fromCodePoint$1.apply(void 0, exponent), 10) : 0;
  return sign2 * (int + frac * Math.pow(10, -fracd)) * Math.pow(10, expsign * exp);
};
var LEFT_PARENTHESIS_TOKEN = {
  type: 2
  /* LEFT_PARENTHESIS_TOKEN */
};
var RIGHT_PARENTHESIS_TOKEN = {
  type: 3
  /* RIGHT_PARENTHESIS_TOKEN */
};
var COMMA_TOKEN = {
  type: 4
  /* COMMA_TOKEN */
};
var SUFFIX_MATCH_TOKEN = {
  type: 13
  /* SUFFIX_MATCH_TOKEN */
};
var PREFIX_MATCH_TOKEN = {
  type: 8
  /* PREFIX_MATCH_TOKEN */
};
var COLUMN_TOKEN = {
  type: 21
  /* COLUMN_TOKEN */
};
var DASH_MATCH_TOKEN = {
  type: 9
  /* DASH_MATCH_TOKEN */
};
var INCLUDE_MATCH_TOKEN = {
  type: 10
  /* INCLUDE_MATCH_TOKEN */
};
var LEFT_CURLY_BRACKET_TOKEN = {
  type: 11
  /* LEFT_CURLY_BRACKET_TOKEN */
};
var RIGHT_CURLY_BRACKET_TOKEN = {
  type: 12
  /* RIGHT_CURLY_BRACKET_TOKEN */
};
var SUBSTRING_MATCH_TOKEN = {
  type: 14
  /* SUBSTRING_MATCH_TOKEN */
};
var BAD_URL_TOKEN = {
  type: 23
  /* BAD_URL_TOKEN */
};
var BAD_STRING_TOKEN = {
  type: 1
  /* BAD_STRING_TOKEN */
};
var CDO_TOKEN = {
  type: 25
  /* CDO_TOKEN */
};
var CDC_TOKEN = {
  type: 24
  /* CDC_TOKEN */
};
var COLON_TOKEN = {
  type: 26
  /* COLON_TOKEN */
};
var SEMICOLON_TOKEN = {
  type: 27
  /* SEMICOLON_TOKEN */
};
var LEFT_SQUARE_BRACKET_TOKEN = {
  type: 28
  /* LEFT_SQUARE_BRACKET_TOKEN */
};
var RIGHT_SQUARE_BRACKET_TOKEN = {
  type: 29
  /* RIGHT_SQUARE_BRACKET_TOKEN */
};
var WHITESPACE_TOKEN = {
  type: 31
  /* WHITESPACE_TOKEN */
};
var EOF_TOKEN = {
  type: 32
  /* EOF_TOKEN */
};
var Tokenizer = (
  /** @class */
  function() {
    function Tokenizer2() {
      this._value = [];
    }
    Tokenizer2.prototype.write = function(chunk) {
      this._value = this._value.concat(toCodePoints$1(chunk));
    };
    Tokenizer2.prototype.read = function() {
      var tokens = [];
      var token2 = this.consumeToken();
      while (token2 !== EOF_TOKEN) {
        tokens.push(token2);
        token2 = this.consumeToken();
      }
      return tokens;
    };
    Tokenizer2.prototype.consumeToken = function() {
      var codePoint = this.consumeCodePoint();
      switch (codePoint) {
        case QUOTATION_MARK:
          return this.consumeStringToken(QUOTATION_MARK);
        case NUMBER_SIGN:
          var c1 = this.peekCodePoint(0);
          var c2 = this.peekCodePoint(1);
          var c3 = this.peekCodePoint(2);
          if (isNameCodePoint(c1) || isValidEscape(c2, c3)) {
            var flags = isIdentifierStart(c1, c2, c3) ? FLAG_ID : FLAG_UNRESTRICTED;
            var value = this.consumeName();
            return { type: 5, value, flags };
          }
          break;
        case DOLLAR_SIGN:
          if (this.peekCodePoint(0) === EQUALS_SIGN) {
            this.consumeCodePoint();
            return SUFFIX_MATCH_TOKEN;
          }
          break;
        case APOSTROPHE:
          return this.consumeStringToken(APOSTROPHE);
        case LEFT_PARENTHESIS:
          return LEFT_PARENTHESIS_TOKEN;
        case RIGHT_PARENTHESIS:
          return RIGHT_PARENTHESIS_TOKEN;
        case ASTERISK:
          if (this.peekCodePoint(0) === EQUALS_SIGN) {
            this.consumeCodePoint();
            return SUBSTRING_MATCH_TOKEN;
          }
          break;
        case PLUS_SIGN:
          if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {
            this.reconsumeCodePoint(codePoint);
            return this.consumeNumericToken();
          }
          break;
        case COMMA:
          return COMMA_TOKEN;
        case HYPHEN_MINUS:
          var e1 = codePoint;
          var e2 = this.peekCodePoint(0);
          var e3 = this.peekCodePoint(1);
          if (isNumberStart(e1, e2, e3)) {
            this.reconsumeCodePoint(codePoint);
            return this.consumeNumericToken();
          }
          if (isIdentifierStart(e1, e2, e3)) {
            this.reconsumeCodePoint(codePoint);
            return this.consumeIdentLikeToken();
          }
          if (e2 === HYPHEN_MINUS && e3 === GREATER_THAN_SIGN) {
            this.consumeCodePoint();
            this.consumeCodePoint();
            return CDC_TOKEN;
          }
          break;
        case FULL_STOP:
          if (isNumberStart(codePoint, this.peekCodePoint(0), this.peekCodePoint(1))) {
            this.reconsumeCodePoint(codePoint);
            return this.consumeNumericToken();
          }
          break;
        case SOLIDUS:
          if (this.peekCodePoint(0) === ASTERISK) {
            this.consumeCodePoint();
            while (true) {
              var c = this.consumeCodePoint();
              if (c === ASTERISK) {
                c = this.consumeCodePoint();
                if (c === SOLIDUS) {
                  return this.consumeToken();
                }
              }
              if (c === EOF) {
                return this.consumeToken();
              }
            }
          }
          break;
        case COLON:
          return COLON_TOKEN;
        case SEMICOLON:
          return SEMICOLON_TOKEN;
        case LESS_THAN_SIGN:
          if (this.peekCodePoint(0) === EXCLAMATION_MARK && this.peekCodePoint(1) === HYPHEN_MINUS && this.peekCodePoint(2) === HYPHEN_MINUS) {
            this.consumeCodePoint();
            this.consumeCodePoint();
            return CDO_TOKEN;
          }
          break;
        case COMMERCIAL_AT:
          var a1 = this.peekCodePoint(0);
          var a2 = this.peekCodePoint(1);
          var a3 = this.peekCodePoint(2);
          if (isIdentifierStart(a1, a2, a3)) {
            var value = this.consumeName();
            return { type: 7, value };
          }
          break;
        case LEFT_SQUARE_BRACKET:
          return LEFT_SQUARE_BRACKET_TOKEN;
        case REVERSE_SOLIDUS:
          if (isValidEscape(codePoint, this.peekCodePoint(0))) {
            this.reconsumeCodePoint(codePoint);
            return this.consumeIdentLikeToken();
          }
          break;
        case RIGHT_SQUARE_BRACKET:
          return RIGHT_SQUARE_BRACKET_TOKEN;
        case CIRCUMFLEX_ACCENT:
          if (this.peekCodePoint(0) === EQUALS_SIGN) {
            this.consumeCodePoint();
            return PREFIX_MATCH_TOKEN;
          }
          break;
        case LEFT_CURLY_BRACKET:
          return LEFT_CURLY_BRACKET_TOKEN;
        case RIGHT_CURLY_BRACKET:
          return RIGHT_CURLY_BRACKET_TOKEN;
        case u:
        case U:
          var u1 = this.peekCodePoint(0);
          var u2 = this.peekCodePoint(1);
          if (u1 === PLUS_SIGN && (isHex(u2) || u2 === QUESTION_MARK)) {
            this.consumeCodePoint();
            this.consumeUnicodeRangeToken();
          }
          this.reconsumeCodePoint(codePoint);
          return this.consumeIdentLikeToken();
        case VERTICAL_LINE:
          if (this.peekCodePoint(0) === EQUALS_SIGN) {
            this.consumeCodePoint();
            return DASH_MATCH_TOKEN;
          }
          if (this.peekCodePoint(0) === VERTICAL_LINE) {
            this.consumeCodePoint();
            return COLUMN_TOKEN;
          }
          break;
        case TILDE:
          if (this.peekCodePoint(0) === EQUALS_SIGN) {
            this.consumeCodePoint();
            return INCLUDE_MATCH_TOKEN;
          }
          break;
        case EOF:
          return EOF_TOKEN;
      }
      if (isWhiteSpace(codePoint)) {
        this.consumeWhiteSpace();
        return WHITESPACE_TOKEN;
      }
      if (isDigit(codePoint)) {
        this.reconsumeCodePoint(codePoint);
        return this.consumeNumericToken();
      }
      if (isNameStartCodePoint(codePoint)) {
        this.reconsumeCodePoint(codePoint);
        return this.consumeIdentLikeToken();
      }
      return { type: 6, value: fromCodePoint$1(codePoint) };
    };
    Tokenizer2.prototype.consumeCodePoint = function() {
      var value = this._value.shift();
      return typeof value === "undefined" ? -1 : value;
    };
    Tokenizer2.prototype.reconsumeCodePoint = function(codePoint) {
      this._value.unshift(codePoint);
    };
    Tokenizer2.prototype.peekCodePoint = function(delta) {
      if (delta >= this._value.length) {
        return -1;
      }
      return this._value[delta];
    };
    Tokenizer2.prototype.consumeUnicodeRangeToken = function() {
      var digits = [];
      var codePoint = this.consumeCodePoint();
      while (isHex(codePoint) && digits.length < 6) {
        digits.push(codePoint);
        codePoint = this.consumeCodePoint();
      }
      var questionMarks = false;
      while (codePoint === QUESTION_MARK && digits.length < 6) {
        digits.push(codePoint);
        codePoint = this.consumeCodePoint();
        questionMarks = true;
      }
      if (questionMarks) {
        var start_1 = parseInt(fromCodePoint$1.apply(void 0, digits.map(function(digit) {
          return digit === QUESTION_MARK ? ZERO : digit;
        })), 16);
        var end2 = parseInt(fromCodePoint$1.apply(void 0, digits.map(function(digit) {
          return digit === QUESTION_MARK ? F : digit;
        })), 16);
        return { type: 30, start: start_1, end: end2 };
      }
      var start2 = parseInt(fromCodePoint$1.apply(void 0, digits), 16);
      if (this.peekCodePoint(0) === HYPHEN_MINUS && isHex(this.peekCodePoint(1))) {
        this.consumeCodePoint();
        codePoint = this.consumeCodePoint();
        var endDigits = [];
        while (isHex(codePoint) && endDigits.length < 6) {
          endDigits.push(codePoint);
          codePoint = this.consumeCodePoint();
        }
        var end2 = parseInt(fromCodePoint$1.apply(void 0, endDigits), 16);
        return { type: 30, start: start2, end: end2 };
      } else {
        return { type: 30, start: start2, end: start2 };
      }
    };
    Tokenizer2.prototype.consumeIdentLikeToken = function() {
      var value = this.consumeName();
      if (value.toLowerCase() === "url" && this.peekCodePoint(0) === LEFT_PARENTHESIS) {
        this.consumeCodePoint();
        return this.consumeUrlToken();
      } else if (this.peekCodePoint(0) === LEFT_PARENTHESIS) {
        this.consumeCodePoint();
        return { type: 19, value };
      }
      return { type: 20, value };
    };
    Tokenizer2.prototype.consumeUrlToken = function() {
      var value = [];
      this.consumeWhiteSpace();
      if (this.peekCodePoint(0) === EOF) {
        return { type: 22, value: "" };
      }
      var next2 = this.peekCodePoint(0);
      if (next2 === APOSTROPHE || next2 === QUOTATION_MARK) {
        var stringToken = this.consumeStringToken(this.consumeCodePoint());
        if (stringToken.type === 0) {
          this.consumeWhiteSpace();
          if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {
            this.consumeCodePoint();
            return { type: 22, value: stringToken.value };
          }
        }
        this.consumeBadUrlRemnants();
        return BAD_URL_TOKEN;
      }
      while (true) {
        var codePoint = this.consumeCodePoint();
        if (codePoint === EOF || codePoint === RIGHT_PARENTHESIS) {
          return { type: 22, value: fromCodePoint$1.apply(void 0, value) };
        } else if (isWhiteSpace(codePoint)) {
          this.consumeWhiteSpace();
          if (this.peekCodePoint(0) === EOF || this.peekCodePoint(0) === RIGHT_PARENTHESIS) {
            this.consumeCodePoint();
            return { type: 22, value: fromCodePoint$1.apply(void 0, value) };
          }
          this.consumeBadUrlRemnants();
          return BAD_URL_TOKEN;
        } else if (codePoint === QUOTATION_MARK || codePoint === APOSTROPHE || codePoint === LEFT_PARENTHESIS || isNonPrintableCodePoint(codePoint)) {
          this.consumeBadUrlRemnants();
          return BAD_URL_TOKEN;
        } else if (codePoint === REVERSE_SOLIDUS) {
          if (isValidEscape(codePoint, this.peekCodePoint(0))) {
            value.push(this.consumeEscapedCodePoint());
          } else {
            this.consumeBadUrlRemnants();
            return BAD_URL_TOKEN;
          }
        } else {
          value.push(codePoint);
        }
      }
    };
    Tokenizer2.prototype.consumeWhiteSpace = function() {
      while (isWhiteSpace(this.peekCodePoint(0))) {
        this.consumeCodePoint();
      }
    };
    Tokenizer2.prototype.consumeBadUrlRemnants = function() {
      while (true) {
        var codePoint = this.consumeCodePoint();
        if (codePoint === RIGHT_PARENTHESIS || codePoint === EOF) {
          return;
        }
        if (isValidEscape(codePoint, this.peekCodePoint(0))) {
          this.consumeEscapedCodePoint();
        }
      }
    };
    Tokenizer2.prototype.consumeStringSlice = function(count) {
      var SLICE_STACK_SIZE = 5e4;
      var value = "";
      while (count > 0) {
        var amount = Math.min(SLICE_STACK_SIZE, count);
        value += fromCodePoint$1.apply(void 0, this._value.splice(0, amount));
        count -= amount;
      }
      this._value.shift();
      return value;
    };
    Tokenizer2.prototype.consumeStringToken = function(endingCodePoint) {
      var value = "";
      var i = 0;
      do {
        var codePoint = this._value[i];
        if (codePoint === EOF || codePoint === void 0 || codePoint === endingCodePoint) {
          value += this.consumeStringSlice(i);
          return { type: 0, value };
        }
        if (codePoint === LINE_FEED) {
          this._value.splice(0, i);
          return BAD_STRING_TOKEN;
        }
        if (codePoint === REVERSE_SOLIDUS) {
          var next2 = this._value[i + 1];
          if (next2 !== EOF && next2 !== void 0) {
            if (next2 === LINE_FEED) {
              value += this.consumeStringSlice(i);
              i = -1;
              this._value.shift();
            } else if (isValidEscape(codePoint, next2)) {
              value += this.consumeStringSlice(i);
              value += fromCodePoint$1(this.consumeEscapedCodePoint());
              i = -1;
            }
          }
        }
        i++;
      } while (true);
    };
    Tokenizer2.prototype.consumeNumber = function() {
      var repr = [];
      var type2 = FLAG_INTEGER;
      var c1 = this.peekCodePoint(0);
      if (c1 === PLUS_SIGN || c1 === HYPHEN_MINUS) {
        repr.push(this.consumeCodePoint());
      }
      while (isDigit(this.peekCodePoint(0))) {
        repr.push(this.consumeCodePoint());
      }
      c1 = this.peekCodePoint(0);
      var c2 = this.peekCodePoint(1);
      if (c1 === FULL_STOP && isDigit(c2)) {
        repr.push(this.consumeCodePoint(), this.consumeCodePoint());
        type2 = FLAG_NUMBER;
        while (isDigit(this.peekCodePoint(0))) {
          repr.push(this.consumeCodePoint());
        }
      }
      c1 = this.peekCodePoint(0);
      c2 = this.peekCodePoint(1);
      var c3 = this.peekCodePoint(2);
      if ((c1 === E || c1 === e) && ((c2 === PLUS_SIGN || c2 === HYPHEN_MINUS) && isDigit(c3) || isDigit(c2))) {
        repr.push(this.consumeCodePoint(), this.consumeCodePoint());
        type2 = FLAG_NUMBER;
        while (isDigit(this.peekCodePoint(0))) {
          repr.push(this.consumeCodePoint());
        }
      }
      return [stringToNumber(repr), type2];
    };
    Tokenizer2.prototype.consumeNumericToken = function() {
      var _a2 = this.consumeNumber(), number = _a2[0], flags = _a2[1];
      var c1 = this.peekCodePoint(0);
      var c2 = this.peekCodePoint(1);
      var c3 = this.peekCodePoint(2);
      if (isIdentifierStart(c1, c2, c3)) {
        var unit = this.consumeName();
        return { type: 15, number, flags, unit };
      }
      if (c1 === PERCENTAGE_SIGN) {
        this.consumeCodePoint();
        return { type: 16, number, flags };
      }
      return { type: 17, number, flags };
    };
    Tokenizer2.prototype.consumeEscapedCodePoint = function() {
      var codePoint = this.consumeCodePoint();
      if (isHex(codePoint)) {
        var hex = fromCodePoint$1(codePoint);
        while (isHex(this.peekCodePoint(0)) && hex.length < 6) {
          hex += fromCodePoint$1(this.consumeCodePoint());
        }
        if (isWhiteSpace(this.peekCodePoint(0))) {
          this.consumeCodePoint();
        }
        var hexCodePoint = parseInt(hex, 16);
        if (hexCodePoint === 0 || isSurrogateCodePoint(hexCodePoint) || hexCodePoint > 1114111) {
          return REPLACEMENT_CHARACTER;
        }
        return hexCodePoint;
      }
      if (codePoint === EOF) {
        return REPLACEMENT_CHARACTER;
      }
      return codePoint;
    };
    Tokenizer2.prototype.consumeName = function() {
      var result = "";
      while (true) {
        var codePoint = this.consumeCodePoint();
        if (isNameCodePoint(codePoint)) {
          result += fromCodePoint$1(codePoint);
        } else if (isValidEscape(codePoint, this.peekCodePoint(0))) {
          result += fromCodePoint$1(this.consumeEscapedCodePoint());
        } else {
          this.reconsumeCodePoint(codePoint);
          return result;
        }
      }
    };
    return Tokenizer2;
  }()
);
var Parser = (
  /** @class */
  function() {
    function Parser2(tokens) {
      this._tokens = tokens;
    }
    Parser2.create = function(value) {
      var tokenizer = new Tokenizer();
      tokenizer.write(value);
      return new Parser2(tokenizer.read());
    };
    Parser2.parseValue = function(value) {
      return Parser2.create(value).parseComponentValue();
    };
    Parser2.parseValues = function(value) {
      return Parser2.create(value).parseComponentValues();
    };
    Parser2.prototype.parseComponentValue = function() {
      var token2 = this.consumeToken();
      while (token2.type === 31) {
        token2 = this.consumeToken();
      }
      if (token2.type === 32) {
        throw new SyntaxError("Error parsing CSS component value, unexpected EOF");
      }
      this.reconsumeToken(token2);
      var value = this.consumeComponentValue();
      do {
        token2 = this.consumeToken();
      } while (token2.type === 31);
      if (token2.type === 32) {
        return value;
      }
      throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one");
    };
    Parser2.prototype.parseComponentValues = function() {
      var values2 = [];
      while (true) {
        var value = this.consumeComponentValue();
        if (value.type === 32) {
          return values2;
        }
        values2.push(value);
        values2.push();
      }
    };
    Parser2.prototype.consumeComponentValue = function() {
      var token2 = this.consumeToken();
      switch (token2.type) {
        case 11:
        case 28:
        case 2:
          return this.consumeSimpleBlock(token2.type);
        case 19:
          return this.consumeFunction(token2);
      }
      return token2;
    };
    Parser2.prototype.consumeSimpleBlock = function(type2) {
      var block = { type: type2, values: [] };
      var token2 = this.consumeToken();
      while (true) {
        if (token2.type === 32 || isEndingTokenFor(token2, type2)) {
          return block;
        }
        this.reconsumeToken(token2);
        block.values.push(this.consumeComponentValue());
        token2 = this.consumeToken();
      }
    };
    Parser2.prototype.consumeFunction = function(functionToken) {
      var cssFunction = {
        name: functionToken.value,
        values: [],
        type: 18
        /* FUNCTION */
      };
      while (true) {
        var token2 = this.consumeToken();
        if (token2.type === 32 || token2.type === 3) {
          return cssFunction;
        }
        this.reconsumeToken(token2);
        cssFunction.values.push(this.consumeComponentValue());
      }
    };
    Parser2.prototype.consumeToken = function() {
      var token2 = this._tokens.shift();
      return typeof token2 === "undefined" ? EOF_TOKEN : token2;
    };
    Parser2.prototype.reconsumeToken = function(token2) {
      this._tokens.unshift(token2);
    };
    return Parser2;
  }()
);
var isDimensionToken = function(token2) {
  return token2.type === 15;
};
var isNumberToken = function(token2) {
  return token2.type === 17;
};
var isIdentToken = function(token2) {
  return token2.type === 20;
};
var isStringToken = function(token2) {
  return token2.type === 0;
};
var isIdentWithValue = function(token2, value) {
  return isIdentToken(token2) && token2.value === value;
};
var nonWhiteSpace = function(token2) {
  return token2.type !== 31;
};
var nonFunctionArgSeparator = function(token2) {
  return token2.type !== 31 && token2.type !== 4;
};
var parseFunctionArgs = function(tokens) {
  var args = [];
  var arg = [];
  tokens.forEach(function(token2) {
    if (token2.type === 4) {
      if (arg.length === 0) {
        throw new Error("Error parsing function args, zero tokens for arg");
      }
      args.push(arg);
      arg = [];
      return;
    }
    if (token2.type !== 31) {
      arg.push(token2);
    }
  });
  if (arg.length) {
    args.push(arg);
  }
  return args;
};
var isEndingTokenFor = function(token2, type2) {
  if (type2 === 11 && token2.type === 12) {
    return true;
  }
  if (type2 === 28 && token2.type === 29) {
    return true;
  }
  return type2 === 2 && token2.type === 3;
};
var isLength = function(token2) {
  return token2.type === 17 || token2.type === 15;
};
var isLengthPercentage = function(token2) {
  return token2.type === 16 || isLength(token2);
};
var parseLengthPercentageTuple = function(tokens) {
  return tokens.length > 1 ? [tokens[0], tokens[1]] : [tokens[0]];
};
var ZERO_LENGTH = {
  type: 17,
  number: 0,
  flags: FLAG_INTEGER
};
var FIFTY_PERCENT = {
  type: 16,
  number: 50,
  flags: FLAG_INTEGER
};
var HUNDRED_PERCENT = {
  type: 16,
  number: 100,
  flags: FLAG_INTEGER
};
var getAbsoluteValueForTuple = function(tuple, width2, height2) {
  var x = tuple[0], y2 = tuple[1];
  return [getAbsoluteValue(x, width2), getAbsoluteValue(typeof y2 !== "undefined" ? y2 : x, height2)];
};
var getAbsoluteValue = function(token2, parent) {
  if (token2.type === 16) {
    return token2.number / 100 * parent;
  }
  if (isDimensionToken(token2)) {
    switch (token2.unit) {
      case "rem":
      case "em":
        return 16 * token2.number;
      // TODO use correct font-size
      case "px":
      default:
        return token2.number;
    }
  }
  return token2.number;
};
var DEG = "deg";
var GRAD = "grad";
var RAD = "rad";
var TURN = "turn";
var angle = {
  name: "angle",
  parse: function(_context, value) {
    if (value.type === 15) {
      switch (value.unit) {
        case DEG:
          return Math.PI * value.number / 180;
        case GRAD:
          return Math.PI / 200 * value.number;
        case RAD:
          return value.number;
        case TURN:
          return Math.PI * 2 * value.number;
      }
    }
    throw new Error("Unsupported angle type");
  }
};
var isAngle = function(value) {
  if (value.type === 15) {
    if (value.unit === DEG || value.unit === GRAD || value.unit === RAD || value.unit === TURN) {
      return true;
    }
  }
  return false;
};
var parseNamedSide = function(tokens) {
  var sideOrCorner = tokens.filter(isIdentToken).map(function(ident) {
    return ident.value;
  }).join(" ");
  switch (sideOrCorner) {
    case "to bottom right":
    case "to right bottom":
    case "left top":
    case "top left":
      return [ZERO_LENGTH, ZERO_LENGTH];
    case "to top":
    case "bottom":
      return deg(0);
    case "to bottom left":
    case "to left bottom":
    case "right top":
    case "top right":
      return [ZERO_LENGTH, HUNDRED_PERCENT];
    case "to right":
    case "left":
      return deg(90);
    case "to top left":
    case "to left top":
    case "right bottom":
    case "bottom right":
      return [HUNDRED_PERCENT, HUNDRED_PERCENT];
    case "to bottom":
    case "top":
      return deg(180);
    case "to top right":
    case "to right top":
    case "left bottom":
    case "bottom left":
      return [HUNDRED_PERCENT, ZERO_LENGTH];
    case "to left":
    case "right":
      return deg(270);
  }
  return 0;
};
var deg = function(deg2) {
  return Math.PI * deg2 / 180;
};
var color$1 = {
  name: "color",
  parse: function(context, value) {
    if (value.type === 18) {
      var colorFunction = SUPPORTED_COLOR_FUNCTIONS[value.name];
      if (typeof colorFunction === "undefined") {
        throw new Error('Attempting to parse an unsupported color function "' + value.name + '"');
      }
      return colorFunction(context, value.values);
    }
    if (value.type === 5) {
      if (value.value.length === 3) {
        var r2 = value.value.substring(0, 1);
        var g2 = value.value.substring(1, 2);
        var b2 = value.value.substring(2, 3);
        return pack(parseInt(r2 + r2, 16), parseInt(g2 + g2, 16), parseInt(b2 + b2, 16), 1);
      }
      if (value.value.length === 4) {
        var r2 = value.value.substring(0, 1);
        var g2 = value.value.substring(1, 2);
        var b2 = value.value.substring(2, 3);
        var a2 = value.value.substring(3, 4);
        return pack(parseInt(r2 + r2, 16), parseInt(g2 + g2, 16), parseInt(b2 + b2, 16), parseInt(a2 + a2, 16) / 255);
      }
      if (value.value.length === 6) {
        var r2 = value.value.substring(0, 2);
        var g2 = value.value.substring(2, 4);
        var b2 = value.value.substring(4, 6);
        return pack(parseInt(r2, 16), parseInt(g2, 16), parseInt(b2, 16), 1);
      }
      if (value.value.length === 8) {
        var r2 = value.value.substring(0, 2);
        var g2 = value.value.substring(2, 4);
        var b2 = value.value.substring(4, 6);
        var a2 = value.value.substring(6, 8);
        return pack(parseInt(r2, 16), parseInt(g2, 16), parseInt(b2, 16), parseInt(a2, 16) / 255);
      }
    }
    if (value.type === 20) {
      var namedColor = COLORS[value.value.toUpperCase()];
      if (typeof namedColor !== "undefined") {
        return namedColor;
      }
    }
    return COLORS.TRANSPARENT;
  }
};
var isTransparent = function(color2) {
  return (255 & color2) === 0;
};
var asString = function(color2) {
  var alpha2 = 255 & color2;
  var blue2 = 255 & color2 >> 8;
  var green2 = 255 & color2 >> 16;
  var red2 = 255 & color2 >> 24;
  return alpha2 < 255 ? "rgba(" + red2 + "," + green2 + "," + blue2 + "," + alpha2 / 255 + ")" : "rgb(" + red2 + "," + green2 + "," + blue2 + ")";
};
var pack = function(r2, g2, b2, a2) {
  return (r2 << 24 | g2 << 16 | b2 << 8 | Math.round(a2 * 255) << 0) >>> 0;
};
var getTokenColorValue = function(token2, i) {
  if (token2.type === 17) {
    return token2.number;
  }
  if (token2.type === 16) {
    var max2 = i === 3 ? 1 : 255;
    return i === 3 ? token2.number / 100 * max2 : Math.round(token2.number / 100 * max2);
  }
  return 0;
};
var rgb = function(_context, args) {
  var tokens = args.filter(nonFunctionArgSeparator);
  if (tokens.length === 3) {
    var _a2 = tokens.map(getTokenColorValue), r2 = _a2[0], g2 = _a2[1], b2 = _a2[2];
    return pack(r2, g2, b2, 1);
  }
  if (tokens.length === 4) {
    var _b = tokens.map(getTokenColorValue), r2 = _b[0], g2 = _b[1], b2 = _b[2], a2 = _b[3];
    return pack(r2, g2, b2, a2);
  }
  return 0;
};
function hue2rgb(t1, t2, hue) {
  if (hue < 0) {
    hue += 1;
  }
  if (hue >= 1) {
    hue -= 1;
  }
  if (hue < 1 / 6) {
    return (t2 - t1) * hue * 6 + t1;
  } else if (hue < 1 / 2) {
    return t2;
  } else if (hue < 2 / 3) {
    return (t2 - t1) * 6 * (2 / 3 - hue) + t1;
  } else {
    return t1;
  }
}
var hsl = function(context, args) {
  var tokens = args.filter(nonFunctionArgSeparator);
  var hue = tokens[0], saturation = tokens[1], lightness = tokens[2], alpha2 = tokens[3];
  var h2 = (hue.type === 17 ? deg(hue.number) : angle.parse(context, hue)) / (Math.PI * 2);
  var s = isLengthPercentage(saturation) ? saturation.number / 100 : 0;
  var l = isLengthPercentage(lightness) ? lightness.number / 100 : 0;
  var a2 = typeof alpha2 !== "undefined" && isLengthPercentage(alpha2) ? getAbsoluteValue(alpha2, 1) : 1;
  if (s === 0) {
    return pack(l * 255, l * 255, l * 255, 1);
  }
  var t2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
  var t1 = l * 2 - t2;
  var r2 = hue2rgb(t1, t2, h2 + 1 / 3);
  var g2 = hue2rgb(t1, t2, h2);
  var b2 = hue2rgb(t1, t2, h2 - 1 / 3);
  return pack(r2 * 255, g2 * 255, b2 * 255, a2);
};
var SUPPORTED_COLOR_FUNCTIONS = {
  hsl,
  hsla: hsl,
  rgb,
  rgba: rgb
};
var parseColor = function(context, value) {
  return color$1.parse(context, Parser.create(value).parseComponentValue());
};
var COLORS = {
  ALICEBLUE: 4042850303,
  ANTIQUEWHITE: 4209760255,
  AQUA: 16777215,
  AQUAMARINE: 2147472639,
  AZURE: 4043309055,
  BEIGE: 4126530815,
  BISQUE: 4293182719,
  BLACK: 255,
  BLANCHEDALMOND: 4293643775,
  BLUE: 65535,
  BLUEVIOLET: 2318131967,
  BROWN: 2771004159,
  BURLYWOOD: 3736635391,
  CADETBLUE: 1604231423,
  CHARTREUSE: 2147418367,
  CHOCOLATE: 3530104575,
  CORAL: 4286533887,
  CORNFLOWERBLUE: 1687547391,
  CORNSILK: 4294499583,
  CRIMSON: 3692313855,
  CYAN: 16777215,
  DARKBLUE: 35839,
  DARKCYAN: 9145343,
  DARKGOLDENROD: 3095837695,
  DARKGRAY: 2846468607,
  DARKGREEN: 6553855,
  DARKGREY: 2846468607,
  DARKKHAKI: 3182914559,
  DARKMAGENTA: 2332068863,
  DARKOLIVEGREEN: 1433087999,
  DARKORANGE: 4287365375,
  DARKORCHID: 2570243327,
  DARKRED: 2332033279,
  DARKSALMON: 3918953215,
  DARKSEAGREEN: 2411499519,
  DARKSLATEBLUE: 1211993087,
  DARKSLATEGRAY: 793726975,
  DARKSLATEGREY: 793726975,
  DARKTURQUOISE: 13554175,
  DARKVIOLET: 2483082239,
  DEEPPINK: 4279538687,
  DEEPSKYBLUE: 12582911,
  DIMGRAY: 1768516095,
  DIMGREY: 1768516095,
  DODGERBLUE: 512819199,
  FIREBRICK: 2988581631,
  FLORALWHITE: 4294635775,
  FORESTGREEN: 579543807,
  FUCHSIA: 4278255615,
  GAINSBORO: 3705462015,
  GHOSTWHITE: 4177068031,
  GOLD: 4292280575,
  GOLDENROD: 3668254975,
  GRAY: 2155905279,
  GREEN: 8388863,
  GREENYELLOW: 2919182335,
  GREY: 2155905279,
  HONEYDEW: 4043305215,
  HOTPINK: 4285117695,
  INDIANRED: 3445382399,
  INDIGO: 1258324735,
  IVORY: 4294963455,
  KHAKI: 4041641215,
  LAVENDER: 3873897215,
  LAVENDERBLUSH: 4293981695,
  LAWNGREEN: 2096890111,
  LEMONCHIFFON: 4294626815,
  LIGHTBLUE: 2916673279,
  LIGHTCORAL: 4034953471,
  LIGHTCYAN: 3774873599,
  LIGHTGOLDENRODYELLOW: 4210742015,
  LIGHTGRAY: 3553874943,
  LIGHTGREEN: 2431553791,
  LIGHTGREY: 3553874943,
  LIGHTPINK: 4290167295,
  LIGHTSALMON: 4288707327,
  LIGHTSEAGREEN: 548580095,
  LIGHTSKYBLUE: 2278488831,
  LIGHTSLATEGRAY: 2005441023,
  LIGHTSLATEGREY: 2005441023,
  LIGHTSTEELBLUE: 2965692159,
  LIGHTYELLOW: 4294959359,
  LIME: 16711935,
  LIMEGREEN: 852308735,
  LINEN: 4210091775,
  MAGENTA: 4278255615,
  MAROON: 2147483903,
  MEDIUMAQUAMARINE: 1724754687,
  MEDIUMBLUE: 52735,
  MEDIUMORCHID: 3126187007,
  MEDIUMPURPLE: 2473647103,
  MEDIUMSEAGREEN: 1018393087,
  MEDIUMSLATEBLUE: 2070474495,
  MEDIUMSPRINGGREEN: 16423679,
  MEDIUMTURQUOISE: 1221709055,
  MEDIUMVIOLETRED: 3340076543,
  MIDNIGHTBLUE: 421097727,
  MINTCREAM: 4127193855,
  MISTYROSE: 4293190143,
  MOCCASIN: 4293178879,
  NAVAJOWHITE: 4292783615,
  NAVY: 33023,
  OLDLACE: 4260751103,
  OLIVE: 2155872511,
  OLIVEDRAB: 1804477439,
  ORANGE: 4289003775,
  ORANGERED: 4282712319,
  ORCHID: 3664828159,
  PALEGOLDENROD: 4008225535,
  PALEGREEN: 2566625535,
  PALETURQUOISE: 2951671551,
  PALEVIOLETRED: 3681588223,
  PAPAYAWHIP: 4293907967,
  PEACHPUFF: 4292524543,
  PERU: 3448061951,
  PINK: 4290825215,
  PLUM: 3718307327,
  POWDERBLUE: 2967529215,
  PURPLE: 2147516671,
  REBECCAPURPLE: 1714657791,
  RED: 4278190335,
  ROSYBROWN: 3163525119,
  ROYALBLUE: 1097458175,
  SADDLEBROWN: 2336560127,
  SALMON: 4202722047,
  SANDYBROWN: 4104413439,
  SEAGREEN: 780883967,
  SEASHELL: 4294307583,
  SIENNA: 2689740287,
  SILVER: 3233857791,
  SKYBLUE: 2278484991,
  SLATEBLUE: 1784335871,
  SLATEGRAY: 1887473919,
  SLATEGREY: 1887473919,
  SNOW: 4294638335,
  SPRINGGREEN: 16744447,
  STEELBLUE: 1182971135,
  TAN: 3535047935,
  TEAL: 8421631,
  THISTLE: 3636451583,
  TOMATO: 4284696575,
  TRANSPARENT: 0,
  TURQUOISE: 1088475391,
  VIOLET: 4001558271,
  WHEAT: 4125012991,
  WHITE: 4294967295,
  WHITESMOKE: 4126537215,
  YELLOW: 4294902015,
  YELLOWGREEN: 2597139199
};
var backgroundClip = {
  name: "background-clip",
  initialValue: "border-box",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    return tokens.map(function(token2) {
      if (isIdentToken(token2)) {
        switch (token2.value) {
          case "padding-box":
            return 1;
          case "content-box":
            return 2;
        }
      }
      return 0;
    });
  }
};
var backgroundColor = {
  name: "background-color",
  initialValue: "transparent",
  prefix: false,
  type: 3,
  format: "color"
};
var parseColorStop = function(context, args) {
  var color2 = color$1.parse(context, args[0]);
  var stop = args[1];
  return stop && isLengthPercentage(stop) ? { color: color2, stop } : { color: color2, stop: null };
};
var processColorStops = function(stops, lineLength) {
  var first = stops[0];
  var last = stops[stops.length - 1];
  if (first.stop === null) {
    first.stop = ZERO_LENGTH;
  }
  if (last.stop === null) {
    last.stop = HUNDRED_PERCENT;
  }
  var processStops = [];
  var previous = 0;
  for (var i = 0; i < stops.length; i++) {
    var stop_1 = stops[i].stop;
    if (stop_1 !== null) {
      var absoluteValue = getAbsoluteValue(stop_1, lineLength);
      if (absoluteValue > previous) {
        processStops.push(absoluteValue);
      } else {
        processStops.push(previous);
      }
      previous = absoluteValue;
    } else {
      processStops.push(null);
    }
  }
  var gapBegin = null;
  for (var i = 0; i < processStops.length; i++) {
    var stop_2 = processStops[i];
    if (stop_2 === null) {
      if (gapBegin === null) {
        gapBegin = i;
      }
    } else if (gapBegin !== null) {
      var gapLength = i - gapBegin;
      var beforeGap = processStops[gapBegin - 1];
      var gapValue = (stop_2 - beforeGap) / (gapLength + 1);
      for (var g2 = 1; g2 <= gapLength; g2++) {
        processStops[gapBegin + g2 - 1] = gapValue * g2;
      }
      gapBegin = null;
    }
  }
  return stops.map(function(_a2, i2) {
    var color2 = _a2.color;
    return { color: color2, stop: Math.max(Math.min(1, processStops[i2] / lineLength), 0) };
  });
};
var getAngleFromCorner = function(corner, width2, height2) {
  var centerX = width2 / 2;
  var centerY = height2 / 2;
  var x = getAbsoluteValue(corner[0], width2) - centerX;
  var y2 = centerY - getAbsoluteValue(corner[1], height2);
  return (Math.atan2(y2, x) + Math.PI * 2) % (Math.PI * 2);
};
var calculateGradientDirection = function(angle2, width2, height2) {
  var radian = typeof angle2 === "number" ? angle2 : getAngleFromCorner(angle2, width2, height2);
  var lineLength = Math.abs(width2 * Math.sin(radian)) + Math.abs(height2 * Math.cos(radian));
  var halfWidth = width2 / 2;
  var halfHeight = height2 / 2;
  var halfLineLength = lineLength / 2;
  var yDiff = Math.sin(radian - Math.PI / 2) * halfLineLength;
  var xDiff = Math.cos(radian - Math.PI / 2) * halfLineLength;
  return [lineLength, halfWidth - xDiff, halfWidth + xDiff, halfHeight - yDiff, halfHeight + yDiff];
};
var distance = function(a2, b2) {
  return Math.sqrt(a2 * a2 + b2 * b2);
};
var findCorner = function(width2, height2, x, y2, closest) {
  var corners = [
    [0, 0],
    [0, height2],
    [width2, 0],
    [width2, height2]
  ];
  return corners.reduce(function(stat, corner) {
    var cx = corner[0], cy = corner[1];
    var d2 = distance(x - cx, y2 - cy);
    if (closest ? d2 < stat.optimumDistance : d2 > stat.optimumDistance) {
      return {
        optimumCorner: corner,
        optimumDistance: d2
      };
    }
    return stat;
  }, {
    optimumDistance: closest ? Infinity : -Infinity,
    optimumCorner: null
  }).optimumCorner;
};
var calculateRadius = function(gradient2, x, y2, width2, height2) {
  var rx = 0;
  var ry = 0;
  switch (gradient2.size) {
    case 0:
      if (gradient2.shape === 0) {
        rx = ry = Math.min(Math.abs(x), Math.abs(x - width2), Math.abs(y2), Math.abs(y2 - height2));
      } else if (gradient2.shape === 1) {
        rx = Math.min(Math.abs(x), Math.abs(x - width2));
        ry = Math.min(Math.abs(y2), Math.abs(y2 - height2));
      }
      break;
    case 2:
      if (gradient2.shape === 0) {
        rx = ry = Math.min(distance(x, y2), distance(x, y2 - height2), distance(x - width2, y2), distance(x - width2, y2 - height2));
      } else if (gradient2.shape === 1) {
        var c = Math.min(Math.abs(y2), Math.abs(y2 - height2)) / Math.min(Math.abs(x), Math.abs(x - width2));
        var _a2 = findCorner(width2, height2, x, y2, true), cx = _a2[0], cy = _a2[1];
        rx = distance(cx - x, (cy - y2) / c);
        ry = c * rx;
      }
      break;
    case 1:
      if (gradient2.shape === 0) {
        rx = ry = Math.max(Math.abs(x), Math.abs(x - width2), Math.abs(y2), Math.abs(y2 - height2));
      } else if (gradient2.shape === 1) {
        rx = Math.max(Math.abs(x), Math.abs(x - width2));
        ry = Math.max(Math.abs(y2), Math.abs(y2 - height2));
      }
      break;
    case 3:
      if (gradient2.shape === 0) {
        rx = ry = Math.max(distance(x, y2), distance(x, y2 - height2), distance(x - width2, y2), distance(x - width2, y2 - height2));
      } else if (gradient2.shape === 1) {
        var c = Math.max(Math.abs(y2), Math.abs(y2 - height2)) / Math.max(Math.abs(x), Math.abs(x - width2));
        var _b = findCorner(width2, height2, x, y2, false), cx = _b[0], cy = _b[1];
        rx = distance(cx - x, (cy - y2) / c);
        ry = c * rx;
      }
      break;
  }
  if (Array.isArray(gradient2.size)) {
    rx = getAbsoluteValue(gradient2.size[0], width2);
    ry = gradient2.size.length === 2 ? getAbsoluteValue(gradient2.size[1], height2) : rx;
  }
  return [rx, ry];
};
var linearGradient = function(context, tokens) {
  var angle$1 = deg(180);
  var stops = [];
  parseFunctionArgs(tokens).forEach(function(arg, i) {
    if (i === 0) {
      var firstToken = arg[0];
      if (firstToken.type === 20 && firstToken.value === "to") {
        angle$1 = parseNamedSide(arg);
        return;
      } else if (isAngle(firstToken)) {
        angle$1 = angle.parse(context, firstToken);
        return;
      }
    }
    var colorStop = parseColorStop(context, arg);
    stops.push(colorStop);
  });
  return {
    angle: angle$1,
    stops,
    type: 1
    /* LINEAR_GRADIENT */
  };
};
var prefixLinearGradient = function(context, tokens) {
  var angle$1 = deg(180);
  var stops = [];
  parseFunctionArgs(tokens).forEach(function(arg, i) {
    if (i === 0) {
      var firstToken = arg[0];
      if (firstToken.type === 20 && ["top", "left", "right", "bottom"].indexOf(firstToken.value) !== -1) {
        angle$1 = parseNamedSide(arg);
        return;
      } else if (isAngle(firstToken)) {
        angle$1 = (angle.parse(context, firstToken) + deg(270)) % deg(360);
        return;
      }
    }
    var colorStop = parseColorStop(context, arg);
    stops.push(colorStop);
  });
  return {
    angle: angle$1,
    stops,
    type: 1
    /* LINEAR_GRADIENT */
  };
};
var webkitGradient = function(context, tokens) {
  var angle2 = deg(180);
  var stops = [];
  var type2 = 1;
  var shape2 = 0;
  var size = 3;
  var position2 = [];
  parseFunctionArgs(tokens).forEach(function(arg, i) {
    var firstToken = arg[0];
    if (i === 0) {
      if (isIdentToken(firstToken) && firstToken.value === "linear") {
        type2 = 1;
        return;
      } else if (isIdentToken(firstToken) && firstToken.value === "radial") {
        type2 = 2;
        return;
      }
    }
    if (firstToken.type === 18) {
      if (firstToken.name === "from") {
        var color2 = color$1.parse(context, firstToken.values[0]);
        stops.push({ stop: ZERO_LENGTH, color: color2 });
      } else if (firstToken.name === "to") {
        var color2 = color$1.parse(context, firstToken.values[0]);
        stops.push({ stop: HUNDRED_PERCENT, color: color2 });
      } else if (firstToken.name === "color-stop") {
        var values2 = firstToken.values.filter(nonFunctionArgSeparator);
        if (values2.length === 2) {
          var color2 = color$1.parse(context, values2[1]);
          var stop_1 = values2[0];
          if (isNumberToken(stop_1)) {
            stops.push({
              stop: { type: 16, number: stop_1.number * 100, flags: stop_1.flags },
              color: color2
            });
          }
        }
      }
    }
  });
  return type2 === 1 ? {
    angle: (angle2 + deg(180)) % deg(360),
    stops,
    type: type2
  } : { size, shape: shape2, stops, position: position2, type: type2 };
};
var CLOSEST_SIDE = "closest-side";
var FARTHEST_SIDE = "farthest-side";
var CLOSEST_CORNER = "closest-corner";
var FARTHEST_CORNER = "farthest-corner";
var CIRCLE = "circle";
var ELLIPSE = "ellipse";
var COVER = "cover";
var CONTAIN = "contain";
var radialGradient = function(context, tokens) {
  var shape2 = 0;
  var size = 3;
  var stops = [];
  var position2 = [];
  parseFunctionArgs(tokens).forEach(function(arg, i) {
    var isColorStop = true;
    if (i === 0) {
      var isAtPosition_1 = false;
      isColorStop = arg.reduce(function(acc, token2) {
        if (isAtPosition_1) {
          if (isIdentToken(token2)) {
            switch (token2.value) {
              case "center":
                position2.push(FIFTY_PERCENT);
                return acc;
              case "top":
              case "left":
                position2.push(ZERO_LENGTH);
                return acc;
              case "right":
              case "bottom":
                position2.push(HUNDRED_PERCENT);
                return acc;
            }
          } else if (isLengthPercentage(token2) || isLength(token2)) {
            position2.push(token2);
          }
        } else if (isIdentToken(token2)) {
          switch (token2.value) {
            case CIRCLE:
              shape2 = 0;
              return false;
            case ELLIPSE:
              shape2 = 1;
              return false;
            case "at":
              isAtPosition_1 = true;
              return false;
            case CLOSEST_SIDE:
              size = 0;
              return false;
            case COVER:
            case FARTHEST_SIDE:
              size = 1;
              return false;
            case CONTAIN:
            case CLOSEST_CORNER:
              size = 2;
              return false;
            case FARTHEST_CORNER:
              size = 3;
              return false;
          }
        } else if (isLength(token2) || isLengthPercentage(token2)) {
          if (!Array.isArray(size)) {
            size = [];
          }
          size.push(token2);
          return false;
        }
        return acc;
      }, isColorStop);
    }
    if (isColorStop) {
      var colorStop = parseColorStop(context, arg);
      stops.push(colorStop);
    }
  });
  return {
    size,
    shape: shape2,
    stops,
    position: position2,
    type: 2
    /* RADIAL_GRADIENT */
  };
};
var prefixRadialGradient = function(context, tokens) {
  var shape2 = 0;
  var size = 3;
  var stops = [];
  var position2 = [];
  parseFunctionArgs(tokens).forEach(function(arg, i) {
    var isColorStop = true;
    if (i === 0) {
      isColorStop = arg.reduce(function(acc, token2) {
        if (isIdentToken(token2)) {
          switch (token2.value) {
            case "center":
              position2.push(FIFTY_PERCENT);
              return false;
            case "top":
            case "left":
              position2.push(ZERO_LENGTH);
              return false;
            case "right":
            case "bottom":
              position2.push(HUNDRED_PERCENT);
              return false;
          }
        } else if (isLengthPercentage(token2) || isLength(token2)) {
          position2.push(token2);
          return false;
        }
        return acc;
      }, isColorStop);
    } else if (i === 1) {
      isColorStop = arg.reduce(function(acc, token2) {
        if (isIdentToken(token2)) {
          switch (token2.value) {
            case CIRCLE:
              shape2 = 0;
              return false;
            case ELLIPSE:
              shape2 = 1;
              return false;
            case CONTAIN:
            case CLOSEST_SIDE:
              size = 0;
              return false;
            case FARTHEST_SIDE:
              size = 1;
              return false;
            case CLOSEST_CORNER:
              size = 2;
              return false;
            case COVER:
            case FARTHEST_CORNER:
              size = 3;
              return false;
          }
        } else if (isLength(token2) || isLengthPercentage(token2)) {
          if (!Array.isArray(size)) {
            size = [];
          }
          size.push(token2);
          return false;
        }
        return acc;
      }, isColorStop);
    }
    if (isColorStop) {
      var colorStop = parseColorStop(context, arg);
      stops.push(colorStop);
    }
  });
  return {
    size,
    shape: shape2,
    stops,
    position: position2,
    type: 2
    /* RADIAL_GRADIENT */
  };
};
var isLinearGradient = function(background) {
  return background.type === 1;
};
var isRadialGradient = function(background) {
  return background.type === 2;
};
var image = {
  name: "image",
  parse: function(context, value) {
    if (value.type === 22) {
      var image_1 = {
        url: value.value,
        type: 0
        /* URL */
      };
      context.cache.addImage(value.value);
      return image_1;
    }
    if (value.type === 18) {
      var imageFunction = SUPPORTED_IMAGE_FUNCTIONS[value.name];
      if (typeof imageFunction === "undefined") {
        throw new Error('Attempting to parse an unsupported image function "' + value.name + '"');
      }
      return imageFunction(context, value.values);
    }
    throw new Error("Unsupported image type " + value.type);
  }
};
function isSupportedImage(value) {
  return !(value.type === 20 && value.value === "none") && (value.type !== 18 || !!SUPPORTED_IMAGE_FUNCTIONS[value.name]);
}
var SUPPORTED_IMAGE_FUNCTIONS = {
  "linear-gradient": linearGradient,
  "-moz-linear-gradient": prefixLinearGradient,
  "-ms-linear-gradient": prefixLinearGradient,
  "-o-linear-gradient": prefixLinearGradient,
  "-webkit-linear-gradient": prefixLinearGradient,
  "radial-gradient": radialGradient,
  "-moz-radial-gradient": prefixRadialGradient,
  "-ms-radial-gradient": prefixRadialGradient,
  "-o-radial-gradient": prefixRadialGradient,
  "-webkit-radial-gradient": prefixRadialGradient,
  "-webkit-gradient": webkitGradient
};
var backgroundImage = {
  name: "background-image",
  initialValue: "none",
  type: 1,
  prefix: false,
  parse: function(context, tokens) {
    if (tokens.length === 0) {
      return [];
    }
    var first = tokens[0];
    if (first.type === 20 && first.value === "none") {
      return [];
    }
    return tokens.filter(function(value) {
      return nonFunctionArgSeparator(value) && isSupportedImage(value);
    }).map(function(value) {
      return image.parse(context, value);
    });
  }
};
var backgroundOrigin = {
  name: "background-origin",
  initialValue: "border-box",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    return tokens.map(function(token2) {
      if (isIdentToken(token2)) {
        switch (token2.value) {
          case "padding-box":
            return 1;
          case "content-box":
            return 2;
        }
      }
      return 0;
    });
  }
};
var backgroundPosition = {
  name: "background-position",
  initialValue: "0% 0%",
  type: 1,
  prefix: false,
  parse: function(_context, tokens) {
    return parseFunctionArgs(tokens).map(function(values2) {
      return values2.filter(isLengthPercentage);
    }).map(parseLengthPercentageTuple);
  }
};
var backgroundRepeat = {
  name: "background-repeat",
  initialValue: "repeat",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    return parseFunctionArgs(tokens).map(function(values2) {
      return values2.filter(isIdentToken).map(function(token2) {
        return token2.value;
      }).join(" ");
    }).map(parseBackgroundRepeat);
  }
};
var parseBackgroundRepeat = function(value) {
  switch (value) {
    case "no-repeat":
      return 1;
    case "repeat-x":
    case "repeat no-repeat":
      return 2;
    case "repeat-y":
    case "no-repeat repeat":
      return 3;
    case "repeat":
    default:
      return 0;
  }
};
var BACKGROUND_SIZE;
(function(BACKGROUND_SIZE2) {
  BACKGROUND_SIZE2["AUTO"] = "auto";
  BACKGROUND_SIZE2["CONTAIN"] = "contain";
  BACKGROUND_SIZE2["COVER"] = "cover";
})(BACKGROUND_SIZE || (BACKGROUND_SIZE = {}));
var backgroundSize = {
  name: "background-size",
  initialValue: "0",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    return parseFunctionArgs(tokens).map(function(values2) {
      return values2.filter(isBackgroundSizeInfoToken);
    });
  }
};
var isBackgroundSizeInfoToken = function(value) {
  return isIdentToken(value) || isLengthPercentage(value);
};
var borderColorForSide = function(side) {
  return {
    name: "border-" + side + "-color",
    initialValue: "transparent",
    prefix: false,
    type: 3,
    format: "color"
  };
};
var borderTopColor = borderColorForSide("top");
var borderRightColor = borderColorForSide("right");
var borderBottomColor = borderColorForSide("bottom");
var borderLeftColor = borderColorForSide("left");
var borderRadiusForSide = function(side) {
  return {
    name: "border-radius-" + side,
    initialValue: "0 0",
    prefix: false,
    type: 1,
    parse: function(_context, tokens) {
      return parseLengthPercentageTuple(tokens.filter(isLengthPercentage));
    }
  };
};
var borderTopLeftRadius = borderRadiusForSide("top-left");
var borderTopRightRadius = borderRadiusForSide("top-right");
var borderBottomRightRadius = borderRadiusForSide("bottom-right");
var borderBottomLeftRadius = borderRadiusForSide("bottom-left");
var borderStyleForSide = function(side) {
  return {
    name: "border-" + side + "-style",
    initialValue: "solid",
    prefix: false,
    type: 2,
    parse: function(_context, style2) {
      switch (style2) {
        case "none":
          return 0;
        case "dashed":
          return 2;
        case "dotted":
          return 3;
        case "double":
          return 4;
      }
      return 1;
    }
  };
};
var borderTopStyle = borderStyleForSide("top");
var borderRightStyle = borderStyleForSide("right");
var borderBottomStyle = borderStyleForSide("bottom");
var borderLeftStyle = borderStyleForSide("left");
var borderWidthForSide = function(side) {
  return {
    name: "border-" + side + "-width",
    initialValue: "0",
    type: 0,
    prefix: false,
    parse: function(_context, token2) {
      if (isDimensionToken(token2)) {
        return token2.number;
      }
      return 0;
    }
  };
};
var borderTopWidth = borderWidthForSide("top");
var borderRightWidth = borderWidthForSide("right");
var borderBottomWidth = borderWidthForSide("bottom");
var borderLeftWidth = borderWidthForSide("left");
var color = {
  name: "color",
  initialValue: "transparent",
  prefix: false,
  type: 3,
  format: "color"
};
var direction = {
  name: "direction",
  initialValue: "ltr",
  prefix: false,
  type: 2,
  parse: function(_context, direction2) {
    switch (direction2) {
      case "rtl":
        return 1;
      case "ltr":
      default:
        return 0;
    }
  }
};
var display = {
  name: "display",
  initialValue: "inline-block",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    return tokens.filter(isIdentToken).reduce(
      function(bit, token2) {
        return bit | parseDisplayValue(token2.value);
      },
      0
      /* NONE */
    );
  }
};
var parseDisplayValue = function(display2) {
  switch (display2) {
    case "block":
    case "-webkit-box":
      return 2;
    case "inline":
      return 4;
    case "run-in":
      return 8;
    case "flow":
      return 16;
    case "flow-root":
      return 32;
    case "table":
      return 64;
    case "flex":
    case "-webkit-flex":
      return 128;
    case "grid":
    case "-ms-grid":
      return 256;
    case "ruby":
      return 512;
    case "subgrid":
      return 1024;
    case "list-item":
      return 2048;
    case "table-row-group":
      return 4096;
    case "table-header-group":
      return 8192;
    case "table-footer-group":
      return 16384;
    case "table-row":
      return 32768;
    case "table-cell":
      return 65536;
    case "table-column-group":
      return 131072;
    case "table-column":
      return 262144;
    case "table-caption":
      return 524288;
    case "ruby-base":
      return 1048576;
    case "ruby-text":
      return 2097152;
    case "ruby-base-container":
      return 4194304;
    case "ruby-text-container":
      return 8388608;
    case "contents":
      return 16777216;
    case "inline-block":
      return 33554432;
    case "inline-list-item":
      return 67108864;
    case "inline-table":
      return 134217728;
    case "inline-flex":
      return 268435456;
    case "inline-grid":
      return 536870912;
  }
  return 0;
};
var float = {
  name: "float",
  initialValue: "none",
  prefix: false,
  type: 2,
  parse: function(_context, float2) {
    switch (float2) {
      case "left":
        return 1;
      case "right":
        return 2;
      case "inline-start":
        return 3;
      case "inline-end":
        return 4;
    }
    return 0;
  }
};
var letterSpacing = {
  name: "letter-spacing",
  initialValue: "0",
  prefix: false,
  type: 0,
  parse: function(_context, token2) {
    if (token2.type === 20 && token2.value === "normal") {
      return 0;
    }
    if (token2.type === 17) {
      return token2.number;
    }
    if (token2.type === 15) {
      return token2.number;
    }
    return 0;
  }
};
var LINE_BREAK;
(function(LINE_BREAK2) {
  LINE_BREAK2["NORMAL"] = "normal";
  LINE_BREAK2["STRICT"] = "strict";
})(LINE_BREAK || (LINE_BREAK = {}));
var lineBreak = {
  name: "line-break",
  initialValue: "normal",
  prefix: false,
  type: 2,
  parse: function(_context, lineBreak2) {
    switch (lineBreak2) {
      case "strict":
        return LINE_BREAK.STRICT;
      case "normal":
      default:
        return LINE_BREAK.NORMAL;
    }
  }
};
var lineHeight = {
  name: "line-height",
  initialValue: "normal",
  prefix: false,
  type: 4
  /* TOKEN_VALUE */
};
var computeLineHeight = function(token2, fontSize2) {
  if (isIdentToken(token2) && token2.value === "normal") {
    return 1.2 * fontSize2;
  } else if (token2.type === 17) {
    return fontSize2 * token2.number;
  } else if (isLengthPercentage(token2)) {
    return getAbsoluteValue(token2, fontSize2);
  }
  return fontSize2;
};
var listStyleImage = {
  name: "list-style-image",
  initialValue: "none",
  type: 0,
  prefix: false,
  parse: function(context, token2) {
    if (token2.type === 20 && token2.value === "none") {
      return null;
    }
    return image.parse(context, token2);
  }
};
var listStylePosition = {
  name: "list-style-position",
  initialValue: "outside",
  prefix: false,
  type: 2,
  parse: function(_context, position2) {
    switch (position2) {
      case "inside":
        return 0;
      case "outside":
      default:
        return 1;
    }
  }
};
var listStyleType = {
  name: "list-style-type",
  initialValue: "none",
  prefix: false,
  type: 2,
  parse: function(_context, type2) {
    switch (type2) {
      case "disc":
        return 0;
      case "circle":
        return 1;
      case "square":
        return 2;
      case "decimal":
        return 3;
      case "cjk-decimal":
        return 4;
      case "decimal-leading-zero":
        return 5;
      case "lower-roman":
        return 6;
      case "upper-roman":
        return 7;
      case "lower-greek":
        return 8;
      case "lower-alpha":
        return 9;
      case "upper-alpha":
        return 10;
      case "arabic-indic":
        return 11;
      case "armenian":
        return 12;
      case "bengali":
        return 13;
      case "cambodian":
        return 14;
      case "cjk-earthly-branch":
        return 15;
      case "cjk-heavenly-stem":
        return 16;
      case "cjk-ideographic":
        return 17;
      case "devanagari":
        return 18;
      case "ethiopic-numeric":
        return 19;
      case "georgian":
        return 20;
      case "gujarati":
        return 21;
      case "gurmukhi":
        return 22;
      case "hebrew":
        return 22;
      case "hiragana":
        return 23;
      case "hiragana-iroha":
        return 24;
      case "japanese-formal":
        return 25;
      case "japanese-informal":
        return 26;
      case "kannada":
        return 27;
      case "katakana":
        return 28;
      case "katakana-iroha":
        return 29;
      case "khmer":
        return 30;
      case "korean-hangul-formal":
        return 31;
      case "korean-hanja-formal":
        return 32;
      case "korean-hanja-informal":
        return 33;
      case "lao":
        return 34;
      case "lower-armenian":
        return 35;
      case "malayalam":
        return 36;
      case "mongolian":
        return 37;
      case "myanmar":
        return 38;
      case "oriya":
        return 39;
      case "persian":
        return 40;
      case "simp-chinese-formal":
        return 41;
      case "simp-chinese-informal":
        return 42;
      case "tamil":
        return 43;
      case "telugu":
        return 44;
      case "thai":
        return 45;
      case "tibetan":
        return 46;
      case "trad-chinese-formal":
        return 47;
      case "trad-chinese-informal":
        return 48;
      case "upper-armenian":
        return 49;
      case "disclosure-open":
        return 50;
      case "disclosure-closed":
        return 51;
      case "none":
      default:
        return -1;
    }
  }
};
var marginForSide = function(side) {
  return {
    name: "margin-" + side,
    initialValue: "0",
    prefix: false,
    type: 4
    /* TOKEN_VALUE */
  };
};
var marginTop = marginForSide("top");
var marginRight = marginForSide("right");
var marginBottom = marginForSide("bottom");
var marginLeft = marginForSide("left");
var overflow = {
  name: "overflow",
  initialValue: "visible",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    return tokens.filter(isIdentToken).map(function(overflow2) {
      switch (overflow2.value) {
        case "hidden":
          return 1;
        case "scroll":
          return 2;
        case "clip":
          return 3;
        case "auto":
          return 4;
        case "visible":
        default:
          return 0;
      }
    });
  }
};
var overflowWrap = {
  name: "overflow-wrap",
  initialValue: "normal",
  prefix: false,
  type: 2,
  parse: function(_context, overflow2) {
    switch (overflow2) {
      case "break-word":
        return "break-word";
      case "normal":
      default:
        return "normal";
    }
  }
};
var paddingForSide = function(side) {
  return {
    name: "padding-" + side,
    initialValue: "0",
    prefix: false,
    type: 3,
    format: "length-percentage"
  };
};
var paddingTop = paddingForSide("top");
var paddingRight = paddingForSide("right");
var paddingBottom = paddingForSide("bottom");
var paddingLeft = paddingForSide("left");
var textAlign = {
  name: "text-align",
  initialValue: "left",
  prefix: false,
  type: 2,
  parse: function(_context, textAlign2) {
    switch (textAlign2) {
      case "right":
        return 2;
      case "center":
      case "justify":
        return 1;
      case "left":
      default:
        return 0;
    }
  }
};
var position = {
  name: "position",
  initialValue: "static",
  prefix: false,
  type: 2,
  parse: function(_context, position2) {
    switch (position2) {
      case "relative":
        return 1;
      case "absolute":
        return 2;
      case "fixed":
        return 3;
      case "sticky":
        return 4;
    }
    return 0;
  }
};
var textShadow = {
  name: "text-shadow",
  initialValue: "none",
  type: 1,
  prefix: false,
  parse: function(context, tokens) {
    if (tokens.length === 1 && isIdentWithValue(tokens[0], "none")) {
      return [];
    }
    return parseFunctionArgs(tokens).map(function(values2) {
      var shadow = {
        color: COLORS.TRANSPARENT,
        offsetX: ZERO_LENGTH,
        offsetY: ZERO_LENGTH,
        blur: ZERO_LENGTH
      };
      var c = 0;
      for (var i = 0; i < values2.length; i++) {
        var token2 = values2[i];
        if (isLength(token2)) {
          if (c === 0) {
            shadow.offsetX = token2;
          } else if (c === 1) {
            shadow.offsetY = token2;
          } else {
            shadow.blur = token2;
          }
          c++;
        } else {
          shadow.color = color$1.parse(context, token2);
        }
      }
      return shadow;
    });
  }
};
var textTransform = {
  name: "text-transform",
  initialValue: "none",
  prefix: false,
  type: 2,
  parse: function(_context, textTransform2) {
    switch (textTransform2) {
      case "uppercase":
        return 2;
      case "lowercase":
        return 1;
      case "capitalize":
        return 3;
    }
    return 0;
  }
};
var transform$1 = {
  name: "transform",
  initialValue: "none",
  prefix: true,
  type: 0,
  parse: function(_context, token2) {
    if (token2.type === 20 && token2.value === "none") {
      return null;
    }
    if (token2.type === 18) {
      var transformFunction = SUPPORTED_TRANSFORM_FUNCTIONS[token2.name];
      if (typeof transformFunction === "undefined") {
        throw new Error('Attempting to parse an unsupported transform function "' + token2.name + '"');
      }
      return transformFunction(token2.values);
    }
    return null;
  }
};
var matrix = function(args) {
  var values2 = args.filter(function(arg) {
    return arg.type === 17;
  }).map(function(arg) {
    return arg.number;
  });
  return values2.length === 6 ? values2 : null;
};
var matrix3d = function(args) {
  var values2 = args.filter(function(arg) {
    return arg.type === 17;
  }).map(function(arg) {
    return arg.number;
  });
  var a1 = values2[0], b1 = values2[1];
  values2[2];
  values2[3];
  var a2 = values2[4], b2 = values2[5];
  values2[6];
  values2[7];
  values2[8];
  values2[9];
  values2[10];
  values2[11];
  var a4 = values2[12], b4 = values2[13];
  values2[14];
  values2[15];
  return values2.length === 16 ? [a1, b1, a2, b2, a4, b4] : null;
};
var SUPPORTED_TRANSFORM_FUNCTIONS = {
  matrix,
  matrix3d
};
var DEFAULT_VALUE = {
  type: 16,
  number: 50,
  flags: FLAG_INTEGER
};
var DEFAULT = [DEFAULT_VALUE, DEFAULT_VALUE];
var transformOrigin = {
  name: "transform-origin",
  initialValue: "50% 50%",
  prefix: true,
  type: 1,
  parse: function(_context, tokens) {
    var origins = tokens.filter(isLengthPercentage);
    if (origins.length !== 2) {
      return DEFAULT;
    }
    return [origins[0], origins[1]];
  }
};
var visibility = {
  name: "visible",
  initialValue: "none",
  prefix: false,
  type: 2,
  parse: function(_context, visibility2) {
    switch (visibility2) {
      case "hidden":
        return 1;
      case "collapse":
        return 2;
      case "visible":
      default:
        return 0;
    }
  }
};
var WORD_BREAK;
(function(WORD_BREAK2) {
  WORD_BREAK2["NORMAL"] = "normal";
  WORD_BREAK2["BREAK_ALL"] = "break-all";
  WORD_BREAK2["KEEP_ALL"] = "keep-all";
})(WORD_BREAK || (WORD_BREAK = {}));
var wordBreak = {
  name: "word-break",
  initialValue: "normal",
  prefix: false,
  type: 2,
  parse: function(_context, wordBreak2) {
    switch (wordBreak2) {
      case "break-all":
        return WORD_BREAK.BREAK_ALL;
      case "keep-all":
        return WORD_BREAK.KEEP_ALL;
      case "normal":
      default:
        return WORD_BREAK.NORMAL;
    }
  }
};
var zIndex = {
  name: "z-index",
  initialValue: "auto",
  prefix: false,
  type: 0,
  parse: function(_context, token2) {
    if (token2.type === 20) {
      return { auto: true, order: 0 };
    }
    if (isNumberToken(token2)) {
      return { auto: false, order: token2.number };
    }
    throw new Error("Invalid z-index number parsed");
  }
};
var time = {
  name: "time",
  parse: function(_context, value) {
    if (value.type === 15) {
      switch (value.unit.toLowerCase()) {
        case "s":
          return 1e3 * value.number;
        case "ms":
          return value.number;
      }
    }
    throw new Error("Unsupported time type");
  }
};
var opacity = {
  name: "opacity",
  initialValue: "1",
  type: 0,
  prefix: false,
  parse: function(_context, token2) {
    if (isNumberToken(token2)) {
      return token2.number;
    }
    return 1;
  }
};
var textDecorationColor = {
  name: "text-decoration-color",
  initialValue: "transparent",
  prefix: false,
  type: 3,
  format: "color"
};
var textDecorationLine = {
  name: "text-decoration-line",
  initialValue: "none",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    return tokens.filter(isIdentToken).map(function(token2) {
      switch (token2.value) {
        case "underline":
          return 1;
        case "overline":
          return 2;
        case "line-through":
          return 3;
        case "none":
          return 4;
      }
      return 0;
    }).filter(function(line2) {
      return line2 !== 0;
    });
  }
};
var fontFamily = {
  name: "font-family",
  initialValue: "",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    var accumulator = [];
    var results = [];
    tokens.forEach(function(token2) {
      switch (token2.type) {
        case 20:
        case 0:
          accumulator.push(token2.value);
          break;
        case 17:
          accumulator.push(token2.number.toString());
          break;
        case 4:
          results.push(accumulator.join(" "));
          accumulator.length = 0;
          break;
      }
    });
    if (accumulator.length) {
      results.push(accumulator.join(" "));
    }
    return results.map(function(result) {
      return result.indexOf(" ") === -1 ? result : "'" + result + "'";
    });
  }
};
var fontSize = {
  name: "font-size",
  initialValue: "0",
  prefix: false,
  type: 3,
  format: "length"
};
var fontWeight$1 = {
  name: "font-weight",
  initialValue: "normal",
  type: 0,
  prefix: false,
  parse: function(_context, token2) {
    if (isNumberToken(token2)) {
      return token2.number;
    }
    if (isIdentToken(token2)) {
      switch (token2.value) {
        case "bold":
          return 700;
        case "normal":
        default:
          return 400;
      }
    }
    return 400;
  }
};
var fontVariant = {
  name: "font-variant",
  initialValue: "none",
  type: 1,
  prefix: false,
  parse: function(_context, tokens) {
    return tokens.filter(isIdentToken).map(function(token2) {
      return token2.value;
    });
  }
};
var fontStyle = {
  name: "font-style",
  initialValue: "normal",
  prefix: false,
  type: 2,
  parse: function(_context, overflow2) {
    switch (overflow2) {
      case "oblique":
        return "oblique";
      case "italic":
        return "italic";
      case "normal":
      default:
        return "normal";
    }
  }
};
var contains = function(bit, value) {
  return (bit & value) !== 0;
};
var content = {
  name: "content",
  initialValue: "none",
  type: 1,
  prefix: false,
  parse: function(_context, tokens) {
    if (tokens.length === 0) {
      return [];
    }
    var first = tokens[0];
    if (first.type === 20 && first.value === "none") {
      return [];
    }
    return tokens;
  }
};
var counterIncrement = {
  name: "counter-increment",
  initialValue: "none",
  prefix: true,
  type: 1,
  parse: function(_context, tokens) {
    if (tokens.length === 0) {
      return null;
    }
    var first = tokens[0];
    if (first.type === 20 && first.value === "none") {
      return null;
    }
    var increments = [];
    var filtered = tokens.filter(nonWhiteSpace);
    for (var i = 0; i < filtered.length; i++) {
      var counter = filtered[i];
      var next2 = filtered[i + 1];
      if (counter.type === 20) {
        var increment = next2 && isNumberToken(next2) ? next2.number : 1;
        increments.push({ counter: counter.value, increment });
      }
    }
    return increments;
  }
};
var counterReset = {
  name: "counter-reset",
  initialValue: "none",
  prefix: true,
  type: 1,
  parse: function(_context, tokens) {
    if (tokens.length === 0) {
      return [];
    }
    var resets = [];
    var filtered = tokens.filter(nonWhiteSpace);
    for (var i = 0; i < filtered.length; i++) {
      var counter = filtered[i];
      var next2 = filtered[i + 1];
      if (isIdentToken(counter) && counter.value !== "none") {
        var reset = next2 && isNumberToken(next2) ? next2.number : 0;
        resets.push({ counter: counter.value, reset });
      }
    }
    return resets;
  }
};
var duration = {
  name: "duration",
  initialValue: "0s",
  prefix: false,
  type: 1,
  parse: function(context, tokens) {
    return tokens.filter(isDimensionToken).map(function(token2) {
      return time.parse(context, token2);
    });
  }
};
var quotes = {
  name: "quotes",
  initialValue: "none",
  prefix: true,
  type: 1,
  parse: function(_context, tokens) {
    if (tokens.length === 0) {
      return null;
    }
    var first = tokens[0];
    if (first.type === 20 && first.value === "none") {
      return null;
    }
    var quotes2 = [];
    var filtered = tokens.filter(isStringToken);
    if (filtered.length % 2 !== 0) {
      return null;
    }
    for (var i = 0; i < filtered.length; i += 2) {
      var open_1 = filtered[i].value;
      var close_1 = filtered[i + 1].value;
      quotes2.push({ open: open_1, close: close_1 });
    }
    return quotes2;
  }
};
var getQuote = function(quotes2, depth, open) {
  if (!quotes2) {
    return "";
  }
  var quote = quotes2[Math.min(depth, quotes2.length - 1)];
  if (!quote) {
    return "";
  }
  return open ? quote.open : quote.close;
};
var boxShadow = {
  name: "box-shadow",
  initialValue: "none",
  type: 1,
  prefix: false,
  parse: function(context, tokens) {
    if (tokens.length === 1 && isIdentWithValue(tokens[0], "none")) {
      return [];
    }
    return parseFunctionArgs(tokens).map(function(values2) {
      var shadow = {
        color: 255,
        offsetX: ZERO_LENGTH,
        offsetY: ZERO_LENGTH,
        blur: ZERO_LENGTH,
        spread: ZERO_LENGTH,
        inset: false
      };
      var c = 0;
      for (var i = 0; i < values2.length; i++) {
        var token2 = values2[i];
        if (isIdentWithValue(token2, "inset")) {
          shadow.inset = true;
        } else if (isLength(token2)) {
          if (c === 0) {
            shadow.offsetX = token2;
          } else if (c === 1) {
            shadow.offsetY = token2;
          } else if (c === 2) {
            shadow.blur = token2;
          } else {
            shadow.spread = token2;
          }
          c++;
        } else {
          shadow.color = color$1.parse(context, token2);
        }
      }
      return shadow;
    });
  }
};
var paintOrder = {
  name: "paint-order",
  initialValue: "normal",
  prefix: false,
  type: 1,
  parse: function(_context, tokens) {
    var DEFAULT_VALUE2 = [
      0,
      1,
      2
      /* MARKERS */
    ];
    var layers = [];
    tokens.filter(isIdentToken).forEach(function(token2) {
      switch (token2.value) {
        case "stroke":
          layers.push(
            1
            /* STROKE */
          );
          break;
        case "fill":
          layers.push(
            0
            /* FILL */
          );
          break;
        case "markers":
          layers.push(
            2
            /* MARKERS */
          );
          break;
      }
    });
    DEFAULT_VALUE2.forEach(function(value) {
      if (layers.indexOf(value) === -1) {
        layers.push(value);
      }
    });
    return layers;
  }
};
var webkitTextStrokeColor = {
  name: "-webkit-text-stroke-color",
  initialValue: "currentcolor",
  prefix: false,
  type: 3,
  format: "color"
};
var webkitTextStrokeWidth = {
  name: "-webkit-text-stroke-width",
  initialValue: "0",
  type: 0,
  prefix: false,
  parse: function(_context, token2) {
    if (isDimensionToken(token2)) {
      return token2.number;
    }
    return 0;
  }
};
var CSSParsedDeclaration = (
  /** @class */
  function() {
    function CSSParsedDeclaration2(context, declaration2) {
      var _a2, _b;
      this.animationDuration = parse(context, duration, declaration2.animationDuration);
      this.backgroundClip = parse(context, backgroundClip, declaration2.backgroundClip);
      this.backgroundColor = parse(context, backgroundColor, declaration2.backgroundColor);
      this.backgroundImage = parse(context, backgroundImage, declaration2.backgroundImage);
      this.backgroundOrigin = parse(context, backgroundOrigin, declaration2.backgroundOrigin);
      this.backgroundPosition = parse(context, backgroundPosition, declaration2.backgroundPosition);
      this.backgroundRepeat = parse(context, backgroundRepeat, declaration2.backgroundRepeat);
      this.backgroundSize = parse(context, backgroundSize, declaration2.backgroundSize);
      this.borderTopColor = parse(context, borderTopColor, declaration2.borderTopColor);
      this.borderRightColor = parse(context, borderRightColor, declaration2.borderRightColor);
      this.borderBottomColor = parse(context, borderBottomColor, declaration2.borderBottomColor);
      this.borderLeftColor = parse(context, borderLeftColor, declaration2.borderLeftColor);
      this.borderTopLeftRadius = parse(context, borderTopLeftRadius, declaration2.borderTopLeftRadius);
      this.borderTopRightRadius = parse(context, borderTopRightRadius, declaration2.borderTopRightRadius);
      this.borderBottomRightRadius = parse(context, borderBottomRightRadius, declaration2.borderBottomRightRadius);
      this.borderBottomLeftRadius = parse(context, borderBottomLeftRadius, declaration2.borderBottomLeftRadius);
      this.borderTopStyle = parse(context, borderTopStyle, declaration2.borderTopStyle);
      this.borderRightStyle = parse(context, borderRightStyle, declaration2.borderRightStyle);
      this.borderBottomStyle = parse(context, borderBottomStyle, declaration2.borderBottomStyle);
      this.borderLeftStyle = parse(context, borderLeftStyle, declaration2.borderLeftStyle);
      this.borderTopWidth = parse(context, borderTopWidth, declaration2.borderTopWidth);
      this.borderRightWidth = parse(context, borderRightWidth, declaration2.borderRightWidth);
      this.borderBottomWidth = parse(context, borderBottomWidth, declaration2.borderBottomWidth);
      this.borderLeftWidth = parse(context, borderLeftWidth, declaration2.borderLeftWidth);
      this.boxShadow = parse(context, boxShadow, declaration2.boxShadow);
      this.color = parse(context, color, declaration2.color);
      this.direction = parse(context, direction, declaration2.direction);
      this.display = parse(context, display, declaration2.display);
      this.float = parse(context, float, declaration2.cssFloat);
      this.fontFamily = parse(context, fontFamily, declaration2.fontFamily);
      this.fontSize = parse(context, fontSize, declaration2.fontSize);
      this.fontStyle = parse(context, fontStyle, declaration2.fontStyle);
      this.fontVariant = parse(context, fontVariant, declaration2.fontVariant);
      this.fontWeight = parse(context, fontWeight$1, declaration2.fontWeight);
      this.letterSpacing = parse(context, letterSpacing, declaration2.letterSpacing);
      this.lineBreak = parse(context, lineBreak, declaration2.lineBreak);
      this.lineHeight = parse(context, lineHeight, declaration2.lineHeight);
      this.listStyleImage = parse(context, listStyleImage, declaration2.listStyleImage);
      this.listStylePosition = parse(context, listStylePosition, declaration2.listStylePosition);
      this.listStyleType = parse(context, listStyleType, declaration2.listStyleType);
      this.marginTop = parse(context, marginTop, declaration2.marginTop);
      this.marginRight = parse(context, marginRight, declaration2.marginRight);
      this.marginBottom = parse(context, marginBottom, declaration2.marginBottom);
      this.marginLeft = parse(context, marginLeft, declaration2.marginLeft);
      this.opacity = parse(context, opacity, declaration2.opacity);
      var overflowTuple = parse(context, overflow, declaration2.overflow);
      this.overflowX = overflowTuple[0];
      this.overflowY = overflowTuple[overflowTuple.length > 1 ? 1 : 0];
      this.overflowWrap = parse(context, overflowWrap, declaration2.overflowWrap);
      this.paddingTop = parse(context, paddingTop, declaration2.paddingTop);
      this.paddingRight = parse(context, paddingRight, declaration2.paddingRight);
      this.paddingBottom = parse(context, paddingBottom, declaration2.paddingBottom);
      this.paddingLeft = parse(context, paddingLeft, declaration2.paddingLeft);
      this.paintOrder = parse(context, paintOrder, declaration2.paintOrder);
      this.position = parse(context, position, declaration2.position);
      this.textAlign = parse(context, textAlign, declaration2.textAlign);
      this.textDecorationColor = parse(context, textDecorationColor, (_a2 = declaration2.textDecorationColor) !== null && _a2 !== void 0 ? _a2 : declaration2.color);
      this.textDecorationLine = parse(context, textDecorationLine, (_b = declaration2.textDecorationLine) !== null && _b !== void 0 ? _b : declaration2.textDecoration);
      this.textShadow = parse(context, textShadow, declaration2.textShadow);
      this.textTransform = parse(context, textTransform, declaration2.textTransform);
      this.transform = parse(context, transform$1, declaration2.transform);
      this.transformOrigin = parse(context, transformOrigin, declaration2.transformOrigin);
      this.visibility = parse(context, visibility, declaration2.visibility);
      this.webkitTextStrokeColor = parse(context, webkitTextStrokeColor, declaration2.webkitTextStrokeColor);
      this.webkitTextStrokeWidth = parse(context, webkitTextStrokeWidth, declaration2.webkitTextStrokeWidth);
      this.wordBreak = parse(context, wordBreak, declaration2.wordBreak);
      this.zIndex = parse(context, zIndex, declaration2.zIndex);
    }
    CSSParsedDeclaration2.prototype.isVisible = function() {
      return this.display > 0 && this.opacity > 0 && this.visibility === 0;
    };
    CSSParsedDeclaration2.prototype.isTransparent = function() {
      return isTransparent(this.backgroundColor);
    };
    CSSParsedDeclaration2.prototype.isTransformed = function() {
      return this.transform !== null;
    };
    CSSParsedDeclaration2.prototype.isPositioned = function() {
      return this.position !== 0;
    };
    CSSParsedDeclaration2.prototype.isPositionedWithZIndex = function() {
      return this.isPositioned() && !this.zIndex.auto;
    };
    CSSParsedDeclaration2.prototype.isFloating = function() {
      return this.float !== 0;
    };
    CSSParsedDeclaration2.prototype.isInlineLevel = function() {
      return contains(
        this.display,
        4
        /* INLINE */
      ) || contains(
        this.display,
        33554432
        /* INLINE_BLOCK */
      ) || contains(
        this.display,
        268435456
        /* INLINE_FLEX */
      ) || contains(
        this.display,
        536870912
        /* INLINE_GRID */
      ) || contains(
        this.display,
        67108864
        /* INLINE_LIST_ITEM */
      ) || contains(
        this.display,
        134217728
        /* INLINE_TABLE */
      );
    };
    return CSSParsedDeclaration2;
  }()
);
var CSSParsedPseudoDeclaration = (
  /** @class */
  /* @__PURE__ */ function() {
    function CSSParsedPseudoDeclaration2(context, declaration2) {
      this.content = parse(context, content, declaration2.content);
      this.quotes = parse(context, quotes, declaration2.quotes);
    }
    return CSSParsedPseudoDeclaration2;
  }()
);
var CSSParsedCounterDeclaration = (
  /** @class */
  /* @__PURE__ */ function() {
    function CSSParsedCounterDeclaration2(context, declaration2) {
      this.counterIncrement = parse(context, counterIncrement, declaration2.counterIncrement);
      this.counterReset = parse(context, counterReset, declaration2.counterReset);
    }
    return CSSParsedCounterDeclaration2;
  }()
);
var parse = function(context, descriptor, style2) {
  var tokenizer = new Tokenizer();
  var value = style2 !== null && typeof style2 !== "undefined" ? style2.toString() : descriptor.initialValue;
  tokenizer.write(value);
  var parser = new Parser(tokenizer.read());
  switch (descriptor.type) {
    case 2:
      var token2 = parser.parseComponentValue();
      return descriptor.parse(context, isIdentToken(token2) ? token2.value : descriptor.initialValue);
    case 0:
      return descriptor.parse(context, parser.parseComponentValue());
    case 1:
      return descriptor.parse(context, parser.parseComponentValues());
    case 4:
      return parser.parseComponentValue();
    case 3:
      switch (descriptor.format) {
        case "angle":
          return angle.parse(context, parser.parseComponentValue());
        case "color":
          return color$1.parse(context, parser.parseComponentValue());
        case "image":
          return image.parse(context, parser.parseComponentValue());
        case "length":
          var length_1 = parser.parseComponentValue();
          return isLength(length_1) ? length_1 : ZERO_LENGTH;
        case "length-percentage":
          var value_1 = parser.parseComponentValue();
          return isLengthPercentage(value_1) ? value_1 : ZERO_LENGTH;
        case "time":
          return time.parse(context, parser.parseComponentValue());
      }
      break;
  }
};
var elementDebuggerAttribute = "data-html2canvas-debug";
var getElementDebugType = function(element) {
  var attribute = element.getAttribute(elementDebuggerAttribute);
  switch (attribute) {
    case "all":
      return 1;
    case "clone":
      return 2;
    case "parse":
      return 3;
    case "render":
      return 4;
    default:
      return 0;
  }
};
var isDebugging = function(element, type2) {
  var elementType = getElementDebugType(element);
  return elementType === 1 || type2 === elementType;
};
var ElementContainer = (
  /** @class */
  /* @__PURE__ */ function() {
    function ElementContainer2(context, element) {
      this.context = context;
      this.textNodes = [];
      this.elements = [];
      this.flags = 0;
      if (isDebugging(
        element,
        3
        /* PARSE */
      )) {
        debugger;
      }
      this.styles = new CSSParsedDeclaration(context, window.getComputedStyle(element, null));
      if (isHTMLElementNode(element)) {
        if (this.styles.animationDuration.some(function(duration2) {
          return duration2 > 0;
        })) {
          element.style.animationDuration = "0s";
        }
        if (this.styles.transform !== null) {
          element.style.transform = "none";
        }
      }
      this.bounds = parseBounds(this.context, element);
      if (isDebugging(
        element,
        4
        /* RENDER */
      )) {
        this.flags |= 16;
      }
    }
    return ElementContainer2;
  }()
);
var base64 = " ";
var chars$1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var lookup$1 = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
for (var i$1 = 0; i$1 < chars$1.length; i$1++) {
  lookup$1[chars$1.charCodeAt(i$1)] = i$1;
}
var decode = function(base642) {
  var bufferLength = base642.length * 0.75, len = base642.length, i, p2 = 0, encoded1, encoded2, encoded3, encoded4;
  if (base642[base642.length - 1] === "=") {
    bufferLength--;
    if (base642[base642.length - 2] === "=") {
      bufferLength--;
    }
  }
  var buffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined" && typeof Uint8Array.prototype.slice !== "undefined" ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
  var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
  for (i = 0; i < len; i += 4) {
    encoded1 = lookup$1[base642.charCodeAt(i)];
    encoded2 = lookup$1[base642.charCodeAt(i + 1)];
    encoded3 = lookup$1[base642.charCodeAt(i + 2)];
    encoded4 = lookup$1[base642.charCodeAt(i + 3)];
    bytes[p2++] = encoded1 << 2 | encoded2 >> 4;
    bytes[p2++] = (encoded2 & 15) << 4 | encoded3 >> 2;
    bytes[p2++] = (encoded3 & 3) << 6 | encoded4 & 63;
  }
  return buffer;
};
var polyUint16Array = function(buffer) {
  var length2 = buffer.length;
  var bytes = [];
  for (var i = 0; i < length2; i += 2) {
    bytes.push(buffer[i + 1] << 8 | buffer[i]);
  }
  return bytes;
};
var polyUint32Array = function(buffer) {
  var length2 = buffer.length;
  var bytes = [];
  for (var i = 0; i < length2; i += 4) {
    bytes.push(buffer[i + 3] << 24 | buffer[i + 2] << 16 | buffer[i + 1] << 8 | buffer[i]);
  }
  return bytes;
};
var UTRIE2_SHIFT_2 = 5;
var UTRIE2_SHIFT_1 = 6 + 5;
var UTRIE2_INDEX_SHIFT = 2;
var UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
var UTRIE2_LSCP_INDEX_2_OFFSET = 65536 >> UTRIE2_SHIFT_2;
var UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
var UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
var UTRIE2_LSCP_INDEX_2_LENGTH = 1024 >> UTRIE2_SHIFT_2;
var UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
var UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
var UTRIE2_UTF8_2B_INDEX_2_LENGTH = 2048 >> 6;
var UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 65536 >> UTRIE2_SHIFT_1;
var UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
var UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
var slice16 = function(view, start2, end2) {
  if (view.slice) {
    return view.slice(start2, end2);
  }
  return new Uint16Array(Array.prototype.slice.call(view, start2, end2));
};
var slice32 = function(view, start2, end2) {
  if (view.slice) {
    return view.slice(start2, end2);
  }
  return new Uint32Array(Array.prototype.slice.call(view, start2, end2));
};
var createTrieFromBase64 = function(base642, _byteLength) {
  var buffer = decode(base642);
  var view32 = Array.isArray(buffer) ? polyUint32Array(buffer) : new Uint32Array(buffer);
  var view16 = Array.isArray(buffer) ? polyUint16Array(buffer) : new Uint16Array(buffer);
  var headerLength = 24;
  var index2 = slice16(view16, headerLength / 2, view32[4] / 2);
  var data = view32[5] === 2 ? slice16(view16, (headerLength + view32[4]) / 2) : slice32(view32, Math.ceil((headerLength + view32[4]) / 4));
  return new Trie(view32[0], view32[1], view32[2], view32[3], index2, data);
};
var Trie = (
  /** @class */
  function() {
    function Trie2(initialValue, errorValue, highStart, highValueIndex, index2, data) {
      this.initialValue = initialValue;
      this.errorValue = errorValue;
      this.highStart = highStart;
      this.highValueIndex = highValueIndex;
      this.index = index2;
      this.data = data;
    }
    Trie2.prototype.get = function(codePoint) {
      var ix;
      if (codePoint >= 0) {
        if (codePoint < 55296 || codePoint > 56319 && codePoint <= 65535) {
          ix = this.index[codePoint >> UTRIE2_SHIFT_2];
          ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
          return this.data[ix];
        }
        if (codePoint <= 65535) {
          ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 55296 >> UTRIE2_SHIFT_2)];
          ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
          return this.data[ix];
        }
        if (codePoint < this.highStart) {
          ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
          ix = this.index[ix];
          ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
          ix = this.index[ix];
          ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
          return this.data[ix];
        }
        if (codePoint <= 1114111) {
          return this.data[this.highValueIndex];
        }
      }
      return this.errorValue;
    };
    return Trie2;
  }()
);
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
for (var i = 0; i < chars.length; i++) {
  lookup[chars.charCodeAt(i)] = i;
}
var Prepend = 1;
var CR = 2;
var LF = 3;
var Control = 4;
var Extend = 5;
var SpacingMark = 7;
var L = 8;
var V = 9;
var T = 10;
var LV = 11;
var LVT = 12;
var ZWJ = 13;
var Extended_Pictographic = 14;
var RI = 15;
var toCodePoints = function(str) {
  var codePoints = [];
  var i = 0;
  var length2 = str.length;
  while (i < length2) {
    var value = str.charCodeAt(i++);
    if (value >= 55296 && value <= 56319 && i < length2) {
      var extra = str.charCodeAt(i++);
      if ((extra & 64512) === 56320) {
        codePoints.push(((value & 1023) << 10) + (extra & 1023) + 65536);
      } else {
        codePoints.push(value);
        i--;
      }
    } else {
      codePoints.push(value);
    }
  }
  return codePoints;
};
var fromCodePoint = function() {
  var codePoints = [];
  for (var _i = 0; _i < arguments.length; _i++) {
    codePoints[_i] = arguments[_i];
  }
  if (String.fromCodePoint) {
    return String.fromCodePoint.apply(String, codePoints);
  }
  var length2 = codePoints.length;
  if (!length2) {
    return "";
  }
  var codeUnits = [];
  var index2 = -1;
  var result = "";
  while (++index2 < length2) {
    var codePoint = codePoints[index2];
    if (codePoint <= 65535) {
      codeUnits.push(codePoint);
    } else {
      codePoint -= 65536;
      codeUnits.push((codePoint >> 10) + 55296, codePoint % 1024 + 56320);
    }
    if (index2 + 1 === length2 || codeUnits.length > 16384) {
      result += String.fromCharCode.apply(String, codeUnits);
      codeUnits.length = 0;
    }
  }
  return result;
};
var UnicodeTrie = createTrieFromBase64(base64);
var BREAK_NOT_ALLOWED = "×";
var BREAK_ALLOWED = "÷";
var codePointToClass = function(codePoint) {
  return UnicodeTrie.get(codePoint);
};
var _graphemeBreakAtIndex = function(_codePoints, classTypes, index2) {
  var prevIndex = index2 - 2;
  var prev2 = classTypes[prevIndex];
  var current = classTypes[index2 - 1];
  var next2 = classTypes[index2];
  if (current === CR && next2 === LF) {
    return BREAK_NOT_ALLOWED;
  }
  if (current === CR || current === LF || current === Control) {
    return BREAK_ALLOWED;
  }
  if (next2 === CR || next2 === LF || next2 === Control) {
    return BREAK_ALLOWED;
  }
  if (current === L && [L, V, LV, LVT].indexOf(next2) !== -1) {
    return BREAK_NOT_ALLOWED;
  }
  if ((current === LV || current === V) && (next2 === V || next2 === T)) {
    return BREAK_NOT_ALLOWED;
  }
  if ((current === LVT || current === T) && next2 === T) {
    return BREAK_NOT_ALLOWED;
  }
  if (next2 === ZWJ || next2 === Extend) {
    return BREAK_NOT_ALLOWED;
  }
  if (next2 === SpacingMark) {
    return BREAK_NOT_ALLOWED;
  }
  if (current === Prepend) {
    return BREAK_NOT_ALLOWED;
  }
  if (current === ZWJ && next2 === Extended_Pictographic) {
    while (prev2 === Extend) {
      prev2 = classTypes[--prevIndex];
    }
    if (prev2 === Extended_Pictographic) {
      return BREAK_NOT_ALLOWED;
    }
  }
  if (current === RI && next2 === RI) {
    var countRI = 0;
    while (prev2 === RI) {
      countRI++;
      prev2 = classTypes[--prevIndex];
    }
    if (countRI % 2 === 0) {
      return BREAK_NOT_ALLOWED;
    }
  }
  return BREAK_ALLOWED;
};
var GraphemeBreaker = function(str) {
  var codePoints = toCodePoints(str);
  var length2 = codePoints.length;
  var index2 = 0;
  var lastEnd = 0;
  var classTypes = codePoints.map(codePointToClass);
  return {
    next: function() {
      if (index2 >= length2) {
        return { done: true, value: null };
      }
      var graphemeBreak = BREAK_NOT_ALLOWED;
      while (index2 < length2 && (graphemeBreak = _graphemeBreakAtIndex(codePoints, classTypes, ++index2)) === BREAK_NOT_ALLOWED) {
      }
      if (graphemeBreak !== BREAK_NOT_ALLOWED || index2 === length2) {
        var value = fromCodePoint.apply(null, codePoints.slice(lastEnd, index2));
        lastEnd = index2;
        return { value, done: false };
      }
      return { done: true, value: null };
    }
  };
};
var splitGraphemes = function(str) {
  var breaker = GraphemeBreaker(str);
  var graphemes = [];
  var bk;
  while (!(bk = breaker.next()).done) {
    if (bk.value) {
      graphemes.push(bk.value.slice());
    }
  }
  return graphemes;
};
var testRangeBounds = function(document2) {
  var TEST_HEIGHT = 123;
  if (document2.createRange) {
    var range2 = document2.createRange();
    if (range2.getBoundingClientRect) {
      var testElement = document2.createElement("boundtest");
      testElement.style.height = TEST_HEIGHT + "px";
      testElement.style.display = "block";
      document2.body.appendChild(testElement);
      range2.selectNode(testElement);
      var rangeBounds = range2.getBoundingClientRect();
      var rangeHeight = Math.round(rangeBounds.height);
      document2.body.removeChild(testElement);
      if (rangeHeight === TEST_HEIGHT) {
        return true;
      }
    }
  }
  return false;
};
var testIOSLineBreak = function(document2) {
  var testElement = document2.createElement("boundtest");
  testElement.style.width = "50px";
  testElement.style.display = "block";
  testElement.style.fontSize = "12px";
  testElement.style.letterSpacing = "0px";
  testElement.style.wordSpacing = "0px";
  document2.body.appendChild(testElement);
  var range2 = document2.createRange();
  testElement.innerHTML = typeof "".repeat === "function" ? "&#128104;".repeat(10) : "";
  var node2 = testElement.firstChild;
  var textList = toCodePoints$1(node2.data).map(function(i) {
    return fromCodePoint$1(i);
  });
  var offset2 = 0;
  var prev2 = {};
  var supports = textList.every(function(text, i) {
    range2.setStart(node2, offset2);
    range2.setEnd(node2, offset2 + text.length);
    var rect = range2.getBoundingClientRect();
    offset2 += text.length;
    var boundAhead = rect.x > prev2.x || rect.y > prev2.y;
    prev2 = rect;
    if (i === 0) {
      return true;
    }
    return boundAhead;
  });
  document2.body.removeChild(testElement);
  return supports;
};
var testCORS = function() {
  return typeof new Image().crossOrigin !== "undefined";
};
var testResponseType = function() {
  return typeof new XMLHttpRequest().responseType === "string";
};
var testSVG = function(document2) {
  var img = new Image();
  var canvas = document2.createElement("canvas");
  var ctx = canvas.getContext("2d");
  if (!ctx) {
    return false;
  }
  img.src = "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";
  try {
    ctx.drawImage(img, 0, 0);
    canvas.toDataURL();
  } catch (e2) {
    return false;
  }
  return true;
};
var isGreenPixel = function(data) {
  return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
};
var testForeignObject = function(document2) {
  var canvas = document2.createElement("canvas");
  var size = 100;
  canvas.width = size;
  canvas.height = size;
  var ctx = canvas.getContext("2d");
  if (!ctx) {
    return Promise.reject(false);
  }
  ctx.fillStyle = "rgb(0, 255, 0)";
  ctx.fillRect(0, 0, size, size);
  var img = new Image();
  var greenImageSrc = canvas.toDataURL();
  img.src = greenImageSrc;
  var svg = createForeignObjectSVG(size, size, 0, 0, img);
  ctx.fillStyle = "red";
  ctx.fillRect(0, 0, size, size);
  return loadSerializedSVG$1(svg).then(function(img2) {
    ctx.drawImage(img2, 0, 0);
    var data = ctx.getImageData(0, 0, size, size).data;
    ctx.fillStyle = "red";
    ctx.fillRect(0, 0, size, size);
    var node2 = document2.createElement("div");
    node2.style.backgroundImage = "url(" + greenImageSrc + ")";
    node2.style.height = size + "px";
    return isGreenPixel(data) ? loadSerializedSVG$1(createForeignObjectSVG(size, size, 0, 0, node2)) : Promise.reject(false);
  }).then(function(img2) {
    ctx.drawImage(img2, 0, 0);
    return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
  }).catch(function() {
    return false;
  });
};
var createForeignObjectSVG = function(width2, height2, x, y2, node2) {
  var xmlns = "http://www.w3.org/2000/svg";
  var svg = document.createElementNS(xmlns, "svg");
  var foreignObject = document.createElementNS(xmlns, "foreignObject");
  svg.setAttributeNS(null, "width", width2.toString());
  svg.setAttributeNS(null, "height", height2.toString());
  foreignObject.setAttributeNS(null, "width", "100%");
  foreignObject.setAttributeNS(null, "height", "100%");
  foreignObject.setAttributeNS(null, "x", x.toString());
  foreignObject.setAttributeNS(null, "y", y2.toString());
  foreignObject.setAttributeNS(null, "externalResourcesRequired", "true");
  svg.appendChild(foreignObject);
  foreignObject.appendChild(node2);
  return svg;
};
var loadSerializedSVG$1 = function(svg) {
  return new Promise(function(resolve, reject) {
    var img = new Image();
    img.onload = function() {
      return resolve(img);
    };
    img.onerror = reject;
    img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg));
  });
};
var FEATURES = {
  get SUPPORT_RANGE_BOUNDS() {
    var value = testRangeBounds(document);
    Object.defineProperty(FEATURES, "SUPPORT_RANGE_BOUNDS", { value });
    return value;
  },
  get SUPPORT_WORD_BREAKING() {
    var value = FEATURES.SUPPORT_RANGE_BOUNDS && testIOSLineBreak(document);
    Object.defineProperty(FEATURES, "SUPPORT_WORD_BREAKING", { value });
    return value;
  },
  get SUPPORT_SVG_DRAWING() {
    var value = testSVG(document);
    Object.defineProperty(FEATURES, "SUPPORT_SVG_DRAWING", { value });
    return value;
  },
  get SUPPORT_FOREIGNOBJECT_DRAWING() {
    var value = typeof Array.from === "function" && typeof window.fetch === "function" ? testForeignObject(document) : Promise.resolve(false);
    Object.defineProperty(FEATURES, "SUPPORT_FOREIGNOBJECT_DRAWING", { value });
    return value;
  },
  get SUPPORT_CORS_IMAGES() {
    var value = testCORS();
    Object.defineProperty(FEATURES, "SUPPORT_CORS_IMAGES", { value });
    return value;
  },
  get SUPPORT_RESPONSE_TYPE() {
    var value = testResponseType();
    Object.defineProperty(FEATURES, "SUPPORT_RESPONSE_TYPE", { value });
    return value;
  },
  get SUPPORT_CORS_XHR() {
    var value = "withCredentials" in new XMLHttpRequest();
    Object.defineProperty(FEATURES, "SUPPORT_CORS_XHR", { value });
    return value;
  },
  get SUPPORT_NATIVE_TEXT_SEGMENTATION() {
    var value = !!(typeof Intl !== "undefined" && Intl.Segmenter);
    Object.defineProperty(FEATURES, "SUPPORT_NATIVE_TEXT_SEGMENTATION", { value });
    return value;
  }
};
var TextBounds = (
  /** @class */
  /* @__PURE__ */ function() {
    function TextBounds2(text, bounds) {
      this.text = text;
      this.bounds = bounds;
    }
    return TextBounds2;
  }()
);
var parseTextBounds = function(context, value, styles2, node2) {
  var textList = breakText(value, styles2);
  var textBounds = [];
  var offset2 = 0;
  textList.forEach(function(text) {
    if (styles2.textDecorationLine.length || text.trim().length > 0) {
      if (FEATURES.SUPPORT_RANGE_BOUNDS) {
        var clientRects = createRange(node2, offset2, text.length).getClientRects();
        if (clientRects.length > 1) {
          var subSegments = segmentGraphemes(text);
          var subOffset_1 = 0;
          subSegments.forEach(function(subSegment) {
            textBounds.push(new TextBounds(subSegment, Bounds.fromDOMRectList(context, createRange(node2, subOffset_1 + offset2, subSegment.length).getClientRects())));
            subOffset_1 += subSegment.length;
          });
        } else {
          textBounds.push(new TextBounds(text, Bounds.fromDOMRectList(context, clientRects)));
        }
      } else {
        var replacementNode = node2.splitText(text.length);
        textBounds.push(new TextBounds(text, getWrapperBounds(context, node2)));
        node2 = replacementNode;
      }
    } else if (!FEATURES.SUPPORT_RANGE_BOUNDS) {
      node2 = node2.splitText(text.length);
    }
    offset2 += text.length;
  });
  return textBounds;
};
var getWrapperBounds = function(context, node2) {
  var ownerDocument2 = node2.ownerDocument;
  if (ownerDocument2) {
    var wrapper = ownerDocument2.createElement("html2canvaswrapper");
    wrapper.appendChild(node2.cloneNode(true));
    var parentNode = node2.parentNode;
    if (parentNode) {
      parentNode.replaceChild(wrapper, node2);
      var bounds = parseBounds(context, wrapper);
      if (wrapper.firstChild) {
        parentNode.replaceChild(wrapper.firstChild, wrapper);
      }
      return bounds;
    }
  }
  return Bounds.EMPTY;
};
var createRange = function(node2, offset2, length2) {
  var ownerDocument2 = node2.ownerDocument;
  if (!ownerDocument2) {
    throw new Error("Node has no owner document");
  }
  var range2 = ownerDocument2.createRange();
  range2.setStart(node2, offset2);
  range2.setEnd(node2, offset2 + length2);
  return range2;
};
var segmentGraphemes = function(value) {
  if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {
    var segmenter = new Intl.Segmenter(void 0, { granularity: "grapheme" });
    return Array.from(segmenter.segment(value)).map(function(segment) {
      return segment.segment;
    });
  }
  return splitGraphemes(value);
};
var segmentWords = function(value, styles2) {
  if (FEATURES.SUPPORT_NATIVE_TEXT_SEGMENTATION) {
    var segmenter = new Intl.Segmenter(void 0, {
      granularity: "word"
    });
    return Array.from(segmenter.segment(value)).map(function(segment) {
      return segment.segment;
    });
  }
  return breakWords(value, styles2);
};
var breakText = function(value, styles2) {
  return styles2.letterSpacing !== 0 ? segmentGraphemes(value) : segmentWords(value, styles2);
};
var wordSeparators = [32, 160, 4961, 65792, 65793, 4153, 4241];
var breakWords = function(str, styles2) {
  var breaker = LineBreaker(str, {
    lineBreak: styles2.lineBreak,
    wordBreak: styles2.overflowWrap === "break-word" ? "break-word" : styles2.wordBreak
  });
  var words = [];
  var bk;
  var _loop_1 = function() {
    if (bk.value) {
      var value = bk.value.slice();
      var codePoints = toCodePoints$1(value);
      var word_1 = "";
      codePoints.forEach(function(codePoint) {
        if (wordSeparators.indexOf(codePoint) === -1) {
          word_1 += fromCodePoint$1(codePoint);
        } else {
          if (word_1.length) {
            words.push(word_1);
          }
          words.push(fromCodePoint$1(codePoint));
          word_1 = "";
        }
      });
      if (word_1.length) {
        words.push(word_1);
      }
    }
  };
  while (!(bk = breaker.next()).done) {
    _loop_1();
  }
  return words;
};
var TextContainer = (
  /** @class */
  /* @__PURE__ */ function() {
    function TextContainer2(context, node2, styles2) {
      this.text = transform(node2.data, styles2.textTransform);
      this.textBounds = parseTextBounds(context, this.text, styles2, node2);
    }
    return TextContainer2;
  }()
);
var transform = function(text, transform2) {
  switch (transform2) {
    case 1:
      return text.toLowerCase();
    case 3:
      return text.replace(CAPITALIZE, capitalize);
    case 2:
      return text.toUpperCase();
    default:
      return text;
  }
};
var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
var capitalize = function(m2, p1, p2) {
  if (m2.length > 0) {
    return p1 + p2.toUpperCase();
  }
  return m2;
};
var ImageElementContainer = (
  /** @class */
  function(_super) {
    __extends(ImageElementContainer2, _super);
    function ImageElementContainer2(context, img) {
      var _this = _super.call(this, context, img) || this;
      _this.src = img.currentSrc || img.src;
      _this.intrinsicWidth = img.naturalWidth;
      _this.intrinsicHeight = img.naturalHeight;
      _this.context.cache.addImage(_this.src);
      return _this;
    }
    return ImageElementContainer2;
  }(ElementContainer)
);
var CanvasElementContainer = (
  /** @class */
  function(_super) {
    __extends(CanvasElementContainer2, _super);
    function CanvasElementContainer2(context, canvas) {
      var _this = _super.call(this, context, canvas) || this;
      _this.canvas = canvas;
      _this.intrinsicWidth = canvas.width;
      _this.intrinsicHeight = canvas.height;
      return _this;
    }
    return CanvasElementContainer2;
  }(ElementContainer)
);
var SVGElementContainer = (
  /** @class */
  function(_super) {
    __extends(SVGElementContainer2, _super);
    function SVGElementContainer2(context, img) {
      var _this = _super.call(this, context, img) || this;
      var s = new XMLSerializer();
      var bounds = parseBounds(context, img);
      img.setAttribute("width", bounds.width + "px");
      img.setAttribute("height", bounds.height + "px");
      _this.svg = "data:image/svg+xml," + encodeURIComponent(s.serializeToString(img));
      _this.intrinsicWidth = img.width.baseVal.value;
      _this.intrinsicHeight = img.height.baseVal.value;
      _this.context.cache.addImage(_this.svg);
      return _this;
    }
    return SVGElementContainer2;
  }(ElementContainer)
);
var LIElementContainer = (
  /** @class */
  function(_super) {
    __extends(LIElementContainer2, _super);
    function LIElementContainer2(context, element) {
      var _this = _super.call(this, context, element) || this;
      _this.value = element.value;
      return _this;
    }
    return LIElementContainer2;
  }(ElementContainer)
);
var OLElementContainer = (
  /** @class */
  function(_super) {
    __extends(OLElementContainer2, _super);
    function OLElementContainer2(context, element) {
      var _this = _super.call(this, context, element) || this;
      _this.start = element.start;
      _this.reversed = typeof element.reversed === "boolean" && element.reversed === true;
      return _this;
    }
    return OLElementContainer2;
  }(ElementContainer)
);
var CHECKBOX_BORDER_RADIUS = [
  {
    type: 15,
    flags: 0,
    unit: "px",
    number: 3
  }
];
var RADIO_BORDER_RADIUS = [
  {
    type: 16,
    flags: 0,
    number: 50
  }
];
var reformatInputBounds = function(bounds) {
  if (bounds.width > bounds.height) {
    return new Bounds(bounds.left + (bounds.width - bounds.height) / 2, bounds.top, bounds.height, bounds.height);
  } else if (bounds.width < bounds.height) {
    return new Bounds(bounds.left, bounds.top + (bounds.height - bounds.width) / 2, bounds.width, bounds.width);
  }
  return bounds;
};
var getInputValue = function(node2) {
  var value = node2.type === PASSWORD ? new Array(node2.value.length + 1).join("•") : node2.value;
  return value.length === 0 ? node2.placeholder || "" : value;
};
var CHECKBOX = "checkbox";
var RADIO = "radio";
var PASSWORD = "password";
var INPUT_COLOR = 707406591;
var InputElementContainer = (
  /** @class */
  function(_super) {
    __extends(InputElementContainer2, _super);
    function InputElementContainer2(context, input) {
      var _this = _super.call(this, context, input) || this;
      _this.type = input.type.toLowerCase();
      _this.checked = input.checked;
      _this.value = getInputValue(input);
      if (_this.type === CHECKBOX || _this.type === RADIO) {
        _this.styles.backgroundColor = 3739148031;
        _this.styles.borderTopColor = _this.styles.borderRightColor = _this.styles.borderBottomColor = _this.styles.borderLeftColor = 2779096575;
        _this.styles.borderTopWidth = _this.styles.borderRightWidth = _this.styles.borderBottomWidth = _this.styles.borderLeftWidth = 1;
        _this.styles.borderTopStyle = _this.styles.borderRightStyle = _this.styles.borderBottomStyle = _this.styles.borderLeftStyle = 1;
        _this.styles.backgroundClip = [
          0
          /* BORDER_BOX */
        ];
        _this.styles.backgroundOrigin = [
          0
          /* BORDER_BOX */
        ];
        _this.bounds = reformatInputBounds(_this.bounds);
      }
      switch (_this.type) {
        case CHECKBOX:
          _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = CHECKBOX_BORDER_RADIUS;
          break;
        case RADIO:
          _this.styles.borderTopRightRadius = _this.styles.borderTopLeftRadius = _this.styles.borderBottomRightRadius = _this.styles.borderBottomLeftRadius = RADIO_BORDER_RADIUS;
          break;
      }
      return _this;
    }
    return InputElementContainer2;
  }(ElementContainer)
);
var SelectElementContainer = (
  /** @class */
  function(_super) {
    __extends(SelectElementContainer2, _super);
    function SelectElementContainer2(context, element) {
      var _this = _super.call(this, context, element) || this;
      var option = element.options[element.selectedIndex || 0];
      _this.value = option ? option.text || "" : "";
      return _this;
    }
    return SelectElementContainer2;
  }(ElementContainer)
);
var TextareaElementContainer = (
  /** @class */
  function(_super) {
    __extends(TextareaElementContainer2, _super);
    function TextareaElementContainer2(context, element) {
      var _this = _super.call(this, context, element) || this;
      _this.value = element.value;
      return _this;
    }
    return TextareaElementContainer2;
  }(ElementContainer)
);
var IFrameElementContainer = (
  /** @class */
  function(_super) {
    __extends(IFrameElementContainer2, _super);
    function IFrameElementContainer2(context, iframe) {
      var _this = _super.call(this, context, iframe) || this;
      _this.src = iframe.src;
      _this.width = parseInt(iframe.width, 10) || 0;
      _this.height = parseInt(iframe.height, 10) || 0;
      _this.backgroundColor = _this.styles.backgroundColor;
      try {
        if (iframe.contentWindow && iframe.contentWindow.document && iframe.contentWindow.document.documentElement) {
          _this.tree = parseTree(context, iframe.contentWindow.document.documentElement);
          var documentBackgroundColor = iframe.contentWindow.document.documentElement ? parseColor(context, getComputedStyle(iframe.contentWindow.document.documentElement).backgroundColor) : COLORS.TRANSPARENT;
          var bodyBackgroundColor = iframe.contentWindow.document.body ? parseColor(context, getComputedStyle(iframe.contentWindow.document.body).backgroundColor) : COLORS.TRANSPARENT;
          _this.backgroundColor = isTransparent(documentBackgroundColor) ? isTransparent(bodyBackgroundColor) ? _this.styles.backgroundColor : bodyBackgroundColor : documentBackgroundColor;
        }
      } catch (e2) {
      }
      return _this;
    }
    return IFrameElementContainer2;
  }(ElementContainer)
);
var LIST_OWNERS = ["OL", "UL", "MENU"];
var parseNodeTree = function(context, node2, parent, root) {
  for (var childNode = node2.firstChild, nextNode = void 0; childNode; childNode = nextNode) {
    nextNode = childNode.nextSibling;
    if (isTextNode(childNode) && childNode.data.trim().length > 0) {
      parent.textNodes.push(new TextContainer(context, childNode, parent.styles));
    } else if (isElementNode(childNode)) {
      if (isSlotElement(childNode) && childNode.assignedNodes) {
        childNode.assignedNodes().forEach(function(childNode2) {
          return parseNodeTree(context, childNode2, parent, root);
        });
      } else {
        var container = createContainer(context, childNode);
        if (container.styles.isVisible()) {
          if (createsRealStackingContext(childNode, container, root)) {
            container.flags |= 4;
          } else if (createsStackingContext(container.styles)) {
            container.flags |= 2;
          }
          if (LIST_OWNERS.indexOf(childNode.tagName) !== -1) {
            container.flags |= 8;
          }
          parent.elements.push(container);
          childNode.slot;
          if (childNode.shadowRoot) {
            parseNodeTree(context, childNode.shadowRoot, container, root);
          } else if (!isTextareaElement(childNode) && !isSVGElement(childNode) && !isSelectElement(childNode)) {
            parseNodeTree(context, childNode, container, root);
          }
        }
      }
    }
  }
};
var createContainer = function(context, element) {
  if (isImageElement(element)) {
    return new ImageElementContainer(context, element);
  }
  if (isCanvasElement(element)) {
    return new CanvasElementContainer(context, element);
  }
  if (isSVGElement(element)) {
    return new SVGElementContainer(context, element);
  }
  if (isLIElement(element)) {
    return new LIElementContainer(context, element);
  }
  if (isOLElement(element)) {
    return new OLElementContainer(context, element);
  }
  if (isInputElement(element)) {
    return new InputElementContainer(context, element);
  }
  if (isSelectElement(element)) {
    return new SelectElementContainer(context, element);
  }
  if (isTextareaElement(element)) {
    return new TextareaElementContainer(context, element);
  }
  if (isIFrameElement(element)) {
    return new IFrameElementContainer(context, element);
  }
  return new ElementContainer(context, element);
};
var parseTree = function(context, element) {
  var container = createContainer(context, element);
  container.flags |= 4;
  parseNodeTree(context, element, container, container);
  return container;
};
var createsRealStackingContext = function(node2, container, root) {
  return container.styles.isPositionedWithZIndex() || container.styles.opacity < 1 || container.styles.isTransformed() || isBodyElement(node2) && root.styles.isTransparent();
};
var createsStackingContext = function(styles2) {
  return styles2.isPositioned() || styles2.isFloating();
};
var isTextNode = function(node2) {
  return node2.nodeType === Node.TEXT_NODE;
};
var isElementNode = function(node2) {
  return node2.nodeType === Node.ELEMENT_NODE;
};
var isHTMLElementNode = function(node2) {
  return isElementNode(node2) && typeof node2.style !== "undefined" && !isSVGElementNode(node2);
};
var isSVGElementNode = function(element) {
  return typeof element.className === "object";
};
var isLIElement = function(node2) {
  return node2.tagName === "LI";
};
var isOLElement = function(node2) {
  return node2.tagName === "OL";
};
var isInputElement = function(node2) {
  return node2.tagName === "INPUT";
};
var isHTMLElement = function(node2) {
  return node2.tagName === "HTML";
};
var isSVGElement = function(node2) {
  return node2.tagName === "svg";
};
var isBodyElement = function(node2) {
  return node2.tagName === "BODY";
};
var isCanvasElement = function(node2) {
  return node2.tagName === "CANVAS";
};
var isVideoElement = function(node2) {
  return node2.tagName === "VIDEO";
};
var isImageElement = function(node2) {
  return node2.tagName === "IMG";
};
var isIFrameElement = function(node2) {
  return node2.tagName === "IFRAME";
};
var isStyleElement = function(node2) {
  return node2.tagName === "STYLE";
};
var isScriptElement = function(node2) {
  return node2.tagName === "SCRIPT";
};
var isTextareaElement = function(node2) {
  return node2.tagName === "TEXTAREA";
};
var isSelectElement = function(node2) {
  return node2.tagName === "SELECT";
};
var isSlotElement = function(node2) {
  return node2.tagName === "SLOT";
};
var isCustomElement = function(node2) {
  return node2.tagName.indexOf("-") > 0;
};
var CounterState = (
  /** @class */
  function() {
    function CounterState2() {
      this.counters = {};
    }
    CounterState2.prototype.getCounterValue = function(name) {
      var counter = this.counters[name];
      if (counter && counter.length) {
        return counter[counter.length - 1];
      }
      return 1;
    };
    CounterState2.prototype.getCounterValues = function(name) {
      var counter = this.counters[name];
      return counter ? counter : [];
    };
    CounterState2.prototype.pop = function(counters) {
      var _this = this;
      counters.forEach(function(counter) {
        return _this.counters[counter].pop();
      });
    };
    CounterState2.prototype.parse = function(style2) {
      var _this = this;
      var counterIncrement2 = style2.counterIncrement;
      var counterReset2 = style2.counterReset;
      var canReset = true;
      if (counterIncrement2 !== null) {
        counterIncrement2.forEach(function(entry) {
          var counter = _this.counters[entry.counter];
          if (counter && entry.increment !== 0) {
            canReset = false;
            if (!counter.length) {
              counter.push(1);
            }
            counter[Math.max(0, counter.length - 1)] += entry.increment;
          }
        });
      }
      var counterNames = [];
      if (canReset) {
        counterReset2.forEach(function(entry) {
          var counter = _this.counters[entry.counter];
          counterNames.push(entry.counter);
          if (!counter) {
            counter = _this.counters[entry.counter] = [];
          }
          counter.push(entry.reset);
        });
      }
      return counterNames;
    };
    return CounterState2;
  }()
);
var ROMAN_UPPER = {
  integers: [1e3, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
  values: ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"]
};
var ARMENIAN = {
  integers: [
    9e3,
    8e3,
    7e3,
    6e3,
    5e3,
    4e3,
    3e3,
    2e3,
    1e3,
    900,
    800,
    700,
    600,
    500,
    400,
    300,
    200,
    100,
    90,
    80,
    70,
    60,
    50,
    40,
    30,
    20,
    10,
    9,
    8,
    7,
    6,
    5,
    4,
    3,
    2,
    1
  ],
  values: [
    "Ք",
    "Փ",
    "Ւ",
    "Ց",
    "Ր",
    "Տ",
    "Վ",
    "Ս",
    "Ռ",
    "Ջ",
    "Պ",
    "Չ",
    "Ո",
    "Շ",
    "Ն",
    "Յ",
    "Մ",
    "Ճ",
    "Ղ",
    "Ձ",
    "Հ",
    "Կ",
    "Ծ",
    "Խ",
    "Լ",
    "Ի",
    "Ժ",
    "Թ",
    "Ը",
    "Է",
    "Զ",
    "Ե",
    "Դ",
    "Գ",
    "Բ",
    "Ա"
  ]
};
var HEBREW = {
  integers: [
    1e4,
    9e3,
    8e3,
    7e3,
    6e3,
    5e3,
    4e3,
    3e3,
    2e3,
    1e3,
    400,
    300,
    200,
    100,
    90,
    80,
    70,
    60,
    50,
    40,
    30,
    20,
    19,
    18,
    17,
    16,
    15,
    10,
    9,
    8,
    7,
    6,
    5,
    4,
    3,
    2,
    1
  ],
  values: [
    "י׳",
    "ט׳",
    "ח׳",
    "ז׳",
    "ו׳",
    "ה׳",
    "ד׳",
    "ג׳",
    "ב׳",
    "א׳",
    "ת",
    "ש",
    "ר",
    "ק",
    "צ",
    "פ",
    "ע",
    "ס",
    "נ",
    "מ",
    "ל",
    "כ",
    "יט",
    "יח",
    "יז",
    "טז",
    "טו",
    "י",
    "ט",
    "ח",
    "ז",
    "ו",
    "ה",
    "ד",
    "ג",
    "ב",
    "א"
  ]
};
var GEORGIAN = {
  integers: [
    1e4,
    9e3,
    8e3,
    7e3,
    6e3,
    5e3,
    4e3,
    3e3,
    2e3,
    1e3,
    900,
    800,
    700,
    600,
    500,
    400,
    300,
    200,
    100,
    90,
    80,
    70,
    60,
    50,
    40,
    30,
    20,
    10,
    9,
    8,
    7,
    6,
    5,
    4,
    3,
    2,
    1
  ],
  values: [
    "ჵ",
    "ჰ",
    "ჯ",
    "ჴ",
    "ხ",
    "ჭ",
    "წ",
    "ძ",
    "ც",
    "ჩ",
    "შ",
    "ყ",
    "ღ",
    "ქ",
    "ფ",
    "ჳ",
    "ტ",
    "ს",
    "რ",
    "ჟ",
    "პ",
    "ო",
    "ჲ",
    "ნ",
    "მ",
    "ლ",
    "კ",
    "ი",
    "თ",
    "ჱ",
    "ზ",
    "ვ",
    "ე",
    "დ",
    "გ",
    "ბ",
    "ა"
  ]
};
var createAdditiveCounter = function(value, min2, max2, symbols, fallback, suffix) {
  if (value < min2 || value > max2) {
    return createCounterText(value, fallback, suffix.length > 0);
  }
  return symbols.integers.reduce(function(string, integer, index2) {
    while (value >= integer) {
      value -= integer;
      string += symbols.values[index2];
    }
    return string;
  }, "") + suffix;
};
var createCounterStyleWithSymbolResolver = function(value, codePointRangeLength, isNumeric, resolver) {
  var string = "";
  do {
    if (!isNumeric) {
      value--;
    }
    string = resolver(value) + string;
    value /= codePointRangeLength;
  } while (value * codePointRangeLength >= codePointRangeLength);
  return string;
};
var createCounterStyleFromRange = function(value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) {
  var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;
  return (value < 0 ? "-" : "") + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, function(codePoint) {
    return fromCodePoint$1(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart);
  }) + suffix);
};
var createCounterStyleFromSymbols = function(value, symbols, suffix) {
  if (suffix === void 0) {
    suffix = ". ";
  }
  var codePointRangeLength = symbols.length;
  return createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, false, function(codePoint) {
    return symbols[Math.floor(codePoint % codePointRangeLength)];
  }) + suffix;
};
var CJK_ZEROS = 1 << 0;
var CJK_TEN_COEFFICIENTS = 1 << 1;
var CJK_TEN_HIGH_COEFFICIENTS = 1 << 2;
var CJK_HUNDRED_COEFFICIENTS = 1 << 3;
var createCJKCounter = function(value, numbers, multipliers, negativeSign, suffix, flags) {
  if (value < -9999 || value > 9999) {
    return createCounterText(value, 4, suffix.length > 0);
  }
  var tmp = Math.abs(value);
  var string = suffix;
  if (tmp === 0) {
    return numbers[0] + string;
  }
  for (var digit = 0; tmp > 0 && digit <= 4; digit++) {
    var coefficient = tmp % 10;
    if (coefficient === 0 && contains(flags, CJK_ZEROS) && string !== "") {
      string = numbers[coefficient] + string;
    } else if (coefficient > 1 || coefficient === 1 && digit === 0 || coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_COEFFICIENTS) || coefficient === 1 && digit === 1 && contains(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100 || coefficient === 1 && digit > 1 && contains(flags, CJK_HUNDRED_COEFFICIENTS)) {
      string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : "") + string;
    } else if (coefficient === 1 && digit > 0) {
      string = multipliers[digit - 1] + string;
    }
    tmp = Math.floor(tmp / 10);
  }
  return (value < 0 ? negativeSign : "") + string;
};
var CHINESE_INFORMAL_MULTIPLIERS = "十百千萬";
var CHINESE_FORMAL_MULTIPLIERS = "拾佰仟萬";
var JAPANESE_NEGATIVE = "マイナス";
var KOREAN_NEGATIVE = "마이너스";
var createCounterText = function(value, type2, appendSuffix) {
  var defaultSuffix = appendSuffix ? ". " : "";
  var cjkSuffix = appendSuffix ? "、" : "";
  var koreanSuffix = appendSuffix ? ", " : "";
  var spaceSuffix = appendSuffix ? " " : "";
  switch (type2) {
    case 0:
      return "•" + spaceSuffix;
    case 1:
      return "◦" + spaceSuffix;
    case 2:
      return "◾" + spaceSuffix;
    case 5:
      var string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);
      return string.length < 4 ? "0" + string : string;
    case 4:
      return createCounterStyleFromSymbols(value, "〇一二三四五六七八九", cjkSuffix);
    case 6:
      return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, 3, defaultSuffix).toLowerCase();
    case 7:
      return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, 3, defaultSuffix);
    case 8:
      return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix);
    case 9:
      return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix);
    case 10:
      return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix);
    case 11:
      return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix);
    case 12:
    case 49:
      return createAdditiveCounter(value, 1, 9999, ARMENIAN, 3, defaultSuffix);
    case 35:
      return createAdditiveCounter(value, 1, 9999, ARMENIAN, 3, defaultSuffix).toLowerCase();
    case 13:
      return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix);
    case 14:
    case 30:
      return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix);
    case 15:
      return createCounterStyleFromSymbols(value, "子丑寅卯辰巳午未申酉戌亥", cjkSuffix);
    case 16:
      return createCounterStyleFromSymbols(value, "甲乙丙丁戊己庚辛壬癸", cjkSuffix);
    case 17:
    case 48:
      return createCJKCounter(value, "零一二三四五六七八九", CHINESE_INFORMAL_MULTIPLIERS, "負", cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
    case 47:
      return createCJKCounter(value, "零壹貳參肆伍陸柒捌玖", CHINESE_FORMAL_MULTIPLIERS, "負", cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
    case 42:
      return createCJKCounter(value, "零一二三四五六七八九", CHINESE_INFORMAL_MULTIPLIERS, "负", cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
    case 41:
      return createCJKCounter(value, "零壹贰叁肆伍陆柒捌玖", CHINESE_FORMAL_MULTIPLIERS, "负", cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
    case 26:
      return createCJKCounter(value, "〇一二三四五六七八九", "十百千万", JAPANESE_NEGATIVE, cjkSuffix, 0);
    case 25:
      return createCJKCounter(value, "零壱弐参四伍六七八九", "拾百千万", JAPANESE_NEGATIVE, cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
    case 31:
      return createCJKCounter(value, "영일이삼사오육칠팔구", "십백천만", KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
    case 33:
      return createCJKCounter(value, "零一二三四五六七八九", "十百千萬", KOREAN_NEGATIVE, koreanSuffix, 0);
    case 32:
      return createCJKCounter(value, "零壹貳參四五六七八九", "拾百千", KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
    case 18:
      return createCounterStyleFromRange(value, 2406, 2415, true, defaultSuffix);
    case 20:
      return createAdditiveCounter(value, 1, 19999, GEORGIAN, 3, defaultSuffix);
    case 21:
      return createCounterStyleFromRange(value, 2790, 2799, true, defaultSuffix);
    case 22:
      return createCounterStyleFromRange(value, 2662, 2671, true, defaultSuffix);
    case 22:
      return createAdditiveCounter(value, 1, 10999, HEBREW, 3, defaultSuffix);
    case 23:
      return createCounterStyleFromSymbols(value, "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");
    case 24:
      return createCounterStyleFromSymbols(value, "いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");
    case 27:
      return createCounterStyleFromRange(value, 3302, 3311, true, defaultSuffix);
    case 28:
      return createCounterStyleFromSymbols(value, "アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン", cjkSuffix);
    case 29:
      return createCounterStyleFromSymbols(value, "イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス", cjkSuffix);
    case 34:
      return createCounterStyleFromRange(value, 3792, 3801, true, defaultSuffix);
    case 37:
      return createCounterStyleFromRange(value, 6160, 6169, true, defaultSuffix);
    case 38:
      return createCounterStyleFromRange(value, 4160, 4169, true, defaultSuffix);
    case 39:
      return createCounterStyleFromRange(value, 2918, 2927, true, defaultSuffix);
    case 40:
      return createCounterStyleFromRange(value, 1776, 1785, true, defaultSuffix);
    case 43:
      return createCounterStyleFromRange(value, 3046, 3055, true, defaultSuffix);
    case 44:
      return createCounterStyleFromRange(value, 3174, 3183, true, defaultSuffix);
    case 45:
      return createCounterStyleFromRange(value, 3664, 3673, true, defaultSuffix);
    case 46:
      return createCounterStyleFromRange(value, 3872, 3881, true, defaultSuffix);
    case 3:
    default:
      return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);
  }
};
var IGNORE_ATTRIBUTE = "data-html2canvas-ignore";
var DocumentCloner = (
  /** @class */
  function() {
    function DocumentCloner2(context, element, options) {
      this.context = context;
      this.options = options;
      this.scrolledElements = [];
      this.referenceElement = element;
      this.counters = new CounterState();
      this.quoteDepth = 0;
      if (!element.ownerDocument) {
        throw new Error("Cloned element does not have an owner document");
      }
      this.documentElement = this.cloneNode(element.ownerDocument.documentElement, false);
    }
    DocumentCloner2.prototype.toIFrame = function(ownerDocument2, windowSize) {
      var _this = this;
      var iframe = createIFrameContainer(ownerDocument2, windowSize);
      if (!iframe.contentWindow) {
        return Promise.reject("Unable to find iframe window");
      }
      var scrollX = ownerDocument2.defaultView.pageXOffset;
      var scrollY = ownerDocument2.defaultView.pageYOffset;
      var cloneWindow = iframe.contentWindow;
      var documentClone = cloneWindow.document;
      var iframeLoad = iframeLoader(iframe).then(function() {
        return __awaiter$1(_this, void 0, void 0, function() {
          var onclone, referenceElement;
          return __generator(this, function(_a2) {
            switch (_a2.label) {
              case 0:
                this.scrolledElements.forEach(restoreNodeScroll);
                if (cloneWindow) {
                  cloneWindow.scrollTo(windowSize.left, windowSize.top);
                  if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && (cloneWindow.scrollY !== windowSize.top || cloneWindow.scrollX !== windowSize.left)) {
                    this.context.logger.warn("Unable to restore scroll position for cloned document");
                    this.context.windowBounds = this.context.windowBounds.add(cloneWindow.scrollX - windowSize.left, cloneWindow.scrollY - windowSize.top, 0, 0);
                  }
                }
                onclone = this.options.onclone;
                referenceElement = this.clonedReferenceElement;
                if (typeof referenceElement === "undefined") {
                  return [2, Promise.reject("Error finding the " + this.referenceElement.nodeName + " in the cloned document")];
                }
                if (!(documentClone.fonts && documentClone.fonts.ready)) return [3, 2];
                return [4, documentClone.fonts.ready];
              case 1:
                _a2.sent();
                _a2.label = 2;
              case 2:
                if (!/(AppleWebKit)/g.test(navigator.userAgent)) return [3, 4];
                return [4, imagesReady(documentClone)];
              case 3:
                _a2.sent();
                _a2.label = 4;
              case 4:
                if (typeof onclone === "function") {
                  return [2, Promise.resolve().then(function() {
                    return onclone(documentClone, referenceElement);
                  }).then(function() {
                    return iframe;
                  })];
                }
                return [2, iframe];
            }
          });
        });
      });
      documentClone.open();
      documentClone.write(serializeDoctype(document.doctype) + "<html></html>");
      restoreOwnerScroll(this.referenceElement.ownerDocument, scrollX, scrollY);
      documentClone.replaceChild(documentClone.adoptNode(this.documentElement), documentClone.documentElement);
      documentClone.close();
      return iframeLoad;
    };
    DocumentCloner2.prototype.createElementClone = function(node2) {
      if (isDebugging(
        node2,
        2
        /* CLONE */
      )) {
        debugger;
      }
      if (isCanvasElement(node2)) {
        return this.createCanvasClone(node2);
      }
      if (isVideoElement(node2)) {
        return this.createVideoClone(node2);
      }
      if (isStyleElement(node2)) {
        return this.createStyleClone(node2);
      }
      var clone = node2.cloneNode(false);
      if (isImageElement(clone)) {
        if (isImageElement(node2) && node2.currentSrc && node2.currentSrc !== node2.src) {
          clone.src = node2.currentSrc;
          clone.srcset = "";
        }
        if (clone.loading === "lazy") {
          clone.loading = "eager";
        }
      }
      if (isCustomElement(clone)) {
        return this.createCustomElementClone(clone);
      }
      return clone;
    };
    DocumentCloner2.prototype.createCustomElementClone = function(node2) {
      var clone = document.createElement("html2canvascustomelement");
      copyCSSStyles(node2.style, clone);
      return clone;
    };
    DocumentCloner2.prototype.createStyleClone = function(node2) {
      try {
        var sheet = node2.sheet;
        if (sheet && sheet.cssRules) {
          var css2 = [].slice.call(sheet.cssRules, 0).reduce(function(css3, rule) {
            if (rule && typeof rule.cssText === "string") {
              return css3 + rule.cssText;
            }
            return css3;
          }, "");
          var style2 = node2.cloneNode(false);
          style2.textContent = css2;
          return style2;
        }
      } catch (e2) {
        this.context.logger.error("Unable to access cssRules property", e2);
        if (e2.name !== "SecurityError") {
          throw e2;
        }
      }
      return node2.cloneNode(false);
    };
    DocumentCloner2.prototype.createCanvasClone = function(canvas) {
      var _a2;
      if (this.options.inlineImages && canvas.ownerDocument) {
        var img = canvas.ownerDocument.createElement("img");
        try {
          img.src = canvas.toDataURL();
          return img;
        } catch (e2) {
          this.context.logger.info("Unable to inline canvas contents, canvas is tainted", canvas);
        }
      }
      var clonedCanvas = canvas.cloneNode(false);
      try {
        clonedCanvas.width = canvas.width;
        clonedCanvas.height = canvas.height;
        var ctx = canvas.getContext("2d");
        var clonedCtx = clonedCanvas.getContext("2d");
        if (clonedCtx) {
          if (!this.options.allowTaint && ctx) {
            clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
          } else {
            var gl = (_a2 = canvas.getContext("webgl2")) !== null && _a2 !== void 0 ? _a2 : canvas.getContext("webgl");
            if (gl) {
              var attribs = gl.getContextAttributes();
              if ((attribs === null || attribs === void 0 ? void 0 : attribs.preserveDrawingBuffer) === false) {
                this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false", canvas);
              }
            }
            clonedCtx.drawImage(canvas, 0, 0);
          }
        }
        return clonedCanvas;
      } catch (e2) {
        this.context.logger.info("Unable to clone canvas as it is tainted", canvas);
      }
      return clonedCanvas;
    };
    DocumentCloner2.prototype.createVideoClone = function(video) {
      var canvas = video.ownerDocument.createElement("canvas");
      canvas.width = video.offsetWidth;
      canvas.height = video.offsetHeight;
      var ctx = canvas.getContext("2d");
      try {
        if (ctx) {
          ctx.drawImage(video, 0, 0, canvas.width, canvas.height);
          if (!this.options.allowTaint) {
            ctx.getImageData(0, 0, canvas.width, canvas.height);
          }
        }
        return canvas;
      } catch (e2) {
        this.context.logger.info("Unable to clone video as it is tainted", video);
      }
      var blankCanvas = video.ownerDocument.createElement("canvas");
      blankCanvas.width = video.offsetWidth;
      blankCanvas.height = video.offsetHeight;
      return blankCanvas;
    };
    DocumentCloner2.prototype.appendChildNode = function(clone, child, copyStyles) {
      if (!isElementNode(child) || !isScriptElement(child) && !child.hasAttribute(IGNORE_ATTRIBUTE) && (typeof this.options.ignoreElements !== "function" || !this.options.ignoreElements(child))) {
        if (!this.options.copyStyles || !isElementNode(child) || !isStyleElement(child)) {
          clone.appendChild(this.cloneNode(child, copyStyles));
        }
      }
    };
    DocumentCloner2.prototype.cloneChildNodes = function(node2, clone, copyStyles) {
      var _this = this;
      for (var child = node2.shadowRoot ? node2.shadowRoot.firstChild : node2.firstChild; child; child = child.nextSibling) {
        if (isElementNode(child) && isSlotElement(child) && typeof child.assignedNodes === "function") {
          var assignedNodes = child.assignedNodes();
          if (assignedNodes.length) {
            assignedNodes.forEach(function(assignedNode) {
              return _this.appendChildNode(clone, assignedNode, copyStyles);
            });
          }
        } else {
          this.appendChildNode(clone, child, copyStyles);
        }
      }
    };
    DocumentCloner2.prototype.cloneNode = function(node2, copyStyles) {
      if (isTextNode(node2)) {
        return document.createTextNode(node2.data);
      }
      if (!node2.ownerDocument) {
        return node2.cloneNode(false);
      }
      var window2 = node2.ownerDocument.defaultView;
      if (window2 && isElementNode(node2) && (isHTMLElementNode(node2) || isSVGElementNode(node2))) {
        var clone = this.createElementClone(node2);
        clone.style.transitionProperty = "none";
        var style2 = window2.getComputedStyle(node2);
        var styleBefore = window2.getComputedStyle(node2, ":before");
        var styleAfter = window2.getComputedStyle(node2, ":after");
        if (this.referenceElement === node2 && isHTMLElementNode(clone)) {
          this.clonedReferenceElement = clone;
        }
        if (isBodyElement(clone)) {
          createPseudoHideStyles(clone);
        }
        var counters = this.counters.parse(new CSSParsedCounterDeclaration(this.context, style2));
        var before = this.resolvePseudoContent(node2, clone, styleBefore, PseudoElementType.BEFORE);
        if (isCustomElement(node2)) {
          copyStyles = true;
        }
        if (!isVideoElement(node2)) {
          this.cloneChildNodes(node2, clone, copyStyles);
        }
        if (before) {
          clone.insertBefore(before, clone.firstChild);
        }
        var after = this.resolvePseudoContent(node2, clone, styleAfter, PseudoElementType.AFTER);
        if (after) {
          clone.appendChild(after);
        }
        this.counters.pop(counters);
        if (style2 && (this.options.copyStyles || isSVGElementNode(node2)) && !isIFrameElement(node2) || copyStyles) {
          copyCSSStyles(style2, clone);
        }
        if (node2.scrollTop !== 0 || node2.scrollLeft !== 0) {
          this.scrolledElements.push([clone, node2.scrollLeft, node2.scrollTop]);
        }
        if ((isTextareaElement(node2) || isSelectElement(node2)) && (isTextareaElement(clone) || isSelectElement(clone))) {
          clone.value = node2.value;
        }
        return clone;
      }
      return node2.cloneNode(false);
    };
    DocumentCloner2.prototype.resolvePseudoContent = function(node2, clone, style2, pseudoElt) {
      var _this = this;
      if (!style2) {
        return;
      }
      var value = style2.content;
      var document2 = clone.ownerDocument;
      if (!document2 || !value || value === "none" || value === "-moz-alt-content" || style2.display === "none") {
        return;
      }
      this.counters.parse(new CSSParsedCounterDeclaration(this.context, style2));
      var declaration2 = new CSSParsedPseudoDeclaration(this.context, style2);
      var anonymousReplacedElement = document2.createElement("html2canvaspseudoelement");
      copyCSSStyles(style2, anonymousReplacedElement);
      declaration2.content.forEach(function(token2) {
        if (token2.type === 0) {
          anonymousReplacedElement.appendChild(document2.createTextNode(token2.value));
        } else if (token2.type === 22) {
          var img = document2.createElement("img");
          img.src = token2.value;
          img.style.opacity = "1";
          anonymousReplacedElement.appendChild(img);
        } else if (token2.type === 18) {
          if (token2.name === "attr") {
            var attr = token2.values.filter(isIdentToken);
            if (attr.length) {
              anonymousReplacedElement.appendChild(document2.createTextNode(node2.getAttribute(attr[0].value) || ""));
            }
          } else if (token2.name === "counter") {
            var _a2 = token2.values.filter(nonFunctionArgSeparator), counter = _a2[0], counterStyle = _a2[1];
            if (counter && isIdentToken(counter)) {
              var counterState = _this.counters.getCounterValue(counter.value);
              var counterType = counterStyle && isIdentToken(counterStyle) ? listStyleType.parse(_this.context, counterStyle.value) : 3;
              anonymousReplacedElement.appendChild(document2.createTextNode(createCounterText(counterState, counterType, false)));
            }
          } else if (token2.name === "counters") {
            var _b = token2.values.filter(nonFunctionArgSeparator), counter = _b[0], delim = _b[1], counterStyle = _b[2];
            if (counter && isIdentToken(counter)) {
              var counterStates = _this.counters.getCounterValues(counter.value);
              var counterType_1 = counterStyle && isIdentToken(counterStyle) ? listStyleType.parse(_this.context, counterStyle.value) : 3;
              var separator = delim && delim.type === 0 ? delim.value : "";
              var text = counterStates.map(function(value2) {
                return createCounterText(value2, counterType_1, false);
              }).join(separator);
              anonymousReplacedElement.appendChild(document2.createTextNode(text));
            }
          } else ;
        } else if (token2.type === 20) {
          switch (token2.value) {
            case "open-quote":
              anonymousReplacedElement.appendChild(document2.createTextNode(getQuote(declaration2.quotes, _this.quoteDepth++, true)));
              break;
            case "close-quote":
              anonymousReplacedElement.appendChild(document2.createTextNode(getQuote(declaration2.quotes, --_this.quoteDepth, false)));
              break;
            default:
              anonymousReplacedElement.appendChild(document2.createTextNode(token2.value));
          }
        }
      });
      anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
      var newClassName = pseudoElt === PseudoElementType.BEFORE ? " " + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE : " " + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
      if (isSVGElementNode(clone)) {
        clone.className.baseValue += newClassName;
      } else {
        clone.className += newClassName;
      }
      return anonymousReplacedElement;
    };
    DocumentCloner2.destroy = function(container) {
      if (container.parentNode) {
        container.parentNode.removeChild(container);
        return true;
      }
      return false;
    };
    return DocumentCloner2;
  }()
);
var PseudoElementType;
(function(PseudoElementType2) {
  PseudoElementType2[PseudoElementType2["BEFORE"] = 0] = "BEFORE";
  PseudoElementType2[PseudoElementType2["AFTER"] = 1] = "AFTER";
})(PseudoElementType || (PseudoElementType = {}));
var createIFrameContainer = function(ownerDocument2, bounds) {
  var cloneIframeContainer = ownerDocument2.createElement("iframe");
  cloneIframeContainer.className = "html2canvas-container";
  cloneIframeContainer.style.visibility = "hidden";
  cloneIframeContainer.style.position = "fixed";
  cloneIframeContainer.style.left = "-10000px";
  cloneIframeContainer.style.top = "0px";
  cloneIframeContainer.style.border = "0";
  cloneIframeContainer.width = bounds.width.toString();
  cloneIframeContainer.height = bounds.height.toString();
  cloneIframeContainer.scrolling = "no";
  cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, "true");
  ownerDocument2.body.appendChild(cloneIframeContainer);
  return cloneIframeContainer;
};
var imageReady = function(img) {
  return new Promise(function(resolve) {
    if (img.complete) {
      resolve();
      return;
    }
    if (!img.src) {
      resolve();
      return;
    }
    img.onload = resolve;
    img.onerror = resolve;
  });
};
var imagesReady = function(document2) {
  return Promise.all([].slice.call(document2.images, 0).map(imageReady));
};
var iframeLoader = function(iframe) {
  return new Promise(function(resolve, reject) {
    var cloneWindow = iframe.contentWindow;
    if (!cloneWindow) {
      return reject("No window assigned for iframe");
    }
    var documentClone = cloneWindow.document;
    cloneWindow.onload = iframe.onload = function() {
      cloneWindow.onload = iframe.onload = null;
      var interval = setInterval(function() {
        if (documentClone.body.childNodes.length > 0 && documentClone.readyState === "complete") {
          clearInterval(interval);
          resolve(iframe);
        }
      }, 50);
    };
  });
};
var ignoredStyleProperties = [
  "all",
  "d",
  "content"
  // Safari shows pseudoelements if content is set
];
var copyCSSStyles = function(style2, target) {
  for (var i = style2.length - 1; i >= 0; i--) {
    var property = style2.item(i);
    if (ignoredStyleProperties.indexOf(property) === -1) {
      target.style.setProperty(property, style2.getPropertyValue(property));
    }
  }
  return target;
};
var serializeDoctype = function(doctype) {
  var str = "";
  if (doctype) {
    str += "<!DOCTYPE ";
    if (doctype.name) {
      str += doctype.name;
    }
    if (doctype.internalSubset) {
      str += doctype.internalSubset;
    }
    if (doctype.publicId) {
      str += '"' + doctype.publicId + '"';
    }
    if (doctype.systemId) {
      str += '"' + doctype.systemId + '"';
    }
    str += ">";
  }
  return str;
};
var restoreOwnerScroll = function(ownerDocument2, x, y2) {
  if (ownerDocument2 && ownerDocument2.defaultView && (x !== ownerDocument2.defaultView.pageXOffset || y2 !== ownerDocument2.defaultView.pageYOffset)) {
    ownerDocument2.defaultView.scrollTo(x, y2);
  }
};
var restoreNodeScroll = function(_a2) {
  var element = _a2[0], x = _a2[1], y2 = _a2[2];
  element.scrollLeft = x;
  element.scrollTop = y2;
};
var PSEUDO_BEFORE = ":before";
var PSEUDO_AFTER = ":after";
var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = "___html2canvas___pseudoelement_before";
var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = "___html2canvas___pseudoelement_after";
var PSEUDO_HIDE_ELEMENT_STYLE = '{\n    content: "" !important;\n    display: none !important;\n}';
var createPseudoHideStyles = function(body2) {
  createStyles(body2, "." + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + "\n         ." + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE);
};
var createStyles = function(body2, styles2) {
  var document2 = body2.ownerDocument;
  if (document2) {
    var style2 = document2.createElement("style");
    style2.textContent = styles2;
    body2.appendChild(style2);
  }
};
var CacheStorage = (
  /** @class */
  function() {
    function CacheStorage2() {
    }
    CacheStorage2.getOrigin = function(url) {
      var link = CacheStorage2._link;
      if (!link) {
        return "about:blank";
      }
      link.href = url;
      link.href = link.href;
      return link.protocol + link.hostname + link.port;
    };
    CacheStorage2.isSameOrigin = function(src) {
      return CacheStorage2.getOrigin(src) === CacheStorage2._origin;
    };
    CacheStorage2.setContext = function(window2) {
      CacheStorage2._link = window2.document.createElement("a");
      CacheStorage2._origin = CacheStorage2.getOrigin(window2.location.href);
    };
    CacheStorage2._origin = "about:blank";
    return CacheStorage2;
  }()
);
var Cache = (
  /** @class */
  function() {
    function Cache2(context, _options) {
      this.context = context;
      this._options = _options;
      this._cache = {};
    }
    Cache2.prototype.addImage = function(src) {
      var result = Promise.resolve();
      if (this.has(src)) {
        return result;
      }
      if (isBlobImage(src) || isRenderable(src)) {
        (this._cache[src] = this.loadImage(src)).catch(function() {
        });
        return result;
      }
      return result;
    };
    Cache2.prototype.match = function(src) {
      return this._cache[src];
    };
    Cache2.prototype.loadImage = function(key) {
      return __awaiter$1(this, void 0, void 0, function() {
        var isSameOrigin, useCORS, useProxy, src;
        var _this = this;
        return __generator(this, function(_a2) {
          switch (_a2.label) {
            case 0:
              isSameOrigin = CacheStorage.isSameOrigin(key);
              useCORS = !isInlineImage(key) && this._options.useCORS === true && FEATURES.SUPPORT_CORS_IMAGES && !isSameOrigin;
              useProxy = !isInlineImage(key) && !isSameOrigin && !isBlobImage(key) && typeof this._options.proxy === "string" && FEATURES.SUPPORT_CORS_XHR && !useCORS;
              if (!isSameOrigin && this._options.allowTaint === false && !isInlineImage(key) && !isBlobImage(key) && !useProxy && !useCORS) {
                return [
                  2
                  /*return*/
                ];
              }
              src = key;
              if (!useProxy) return [3, 2];
              return [4, this.proxy(src)];
            case 1:
              src = _a2.sent();
              _a2.label = 2;
            case 2:
              this.context.logger.debug("Added image " + key.substring(0, 256));
              return [4, new Promise(function(resolve, reject) {
                var img = new Image();
                img.onload = function() {
                  return resolve(img);
                };
                img.onerror = reject;
                if (isInlineBase64Image(src) || useCORS) {
                  img.crossOrigin = "anonymous";
                }
                img.src = src;
                if (img.complete === true) {
                  setTimeout(function() {
                    return resolve(img);
                  }, 500);
                }
                if (_this._options.imageTimeout > 0) {
                  setTimeout(function() {
                    return reject("Timed out (" + _this._options.imageTimeout + "ms) loading image");
                  }, _this._options.imageTimeout);
                }
              })];
            case 3:
              return [2, _a2.sent()];
          }
        });
      });
    };
    Cache2.prototype.has = function(key) {
      return typeof this._cache[key] !== "undefined";
    };
    Cache2.prototype.keys = function() {
      return Promise.resolve(Object.keys(this._cache));
    };
    Cache2.prototype.proxy = function(src) {
      var _this = this;
      var proxy = this._options.proxy;
      if (!proxy) {
        throw new Error("No proxy defined");
      }
      var key = src.substring(0, 256);
      return new Promise(function(resolve, reject) {
        var responseType = FEATURES.SUPPORT_RESPONSE_TYPE ? "blob" : "text";
        var xhr = new XMLHttpRequest();
        xhr.onload = function() {
          if (xhr.status === 200) {
            if (responseType === "text") {
              resolve(xhr.response);
            } else {
              var reader_1 = new FileReader();
              reader_1.addEventListener("load", function() {
                return resolve(reader_1.result);
              }, false);
              reader_1.addEventListener("error", function(e2) {
                return reject(e2);
              }, false);
              reader_1.readAsDataURL(xhr.response);
            }
          } else {
            reject("Failed to proxy resource " + key + " with status code " + xhr.status);
          }
        };
        xhr.onerror = reject;
        var queryString = proxy.indexOf("?") > -1 ? "&" : "?";
        xhr.open("GET", "" + proxy + queryString + "url=" + encodeURIComponent(src) + "&responseType=" + responseType);
        if (responseType !== "text" && xhr instanceof XMLHttpRequest) {
          xhr.responseType = responseType;
        }
        if (_this._options.imageTimeout) {
          var timeout_1 = _this._options.imageTimeout;
          xhr.timeout = timeout_1;
          xhr.ontimeout = function() {
            return reject("Timed out (" + timeout_1 + "ms) proxying " + key);
          };
        }
        xhr.send();
      });
    };
    return Cache2;
  }()
);
var INLINE_SVG = /^data:image\/svg\+xml/i;
var INLINE_BASE64 = /^data:image\/.*;base64,/i;
var INLINE_IMG = /^data:image\/.*/i;
var isRenderable = function(src) {
  return FEATURES.SUPPORT_SVG_DRAWING || !isSVG(src);
};
var isInlineImage = function(src) {
  return INLINE_IMG.test(src);
};
var isInlineBase64Image = function(src) {
  return INLINE_BASE64.test(src);
};
var isBlobImage = function(src) {
  return src.substr(0, 4) === "blob";
};
var isSVG = function(src) {
  return src.substr(-3).toLowerCase() === "svg" || INLINE_SVG.test(src);
};
var Vector = (
  /** @class */
  function() {
    function Vector2(x, y2) {
      this.type = 0;
      this.x = x;
      this.y = y2;
    }
    Vector2.prototype.add = function(deltaX, deltaY) {
      return new Vector2(this.x + deltaX, this.y + deltaY);
    };
    return Vector2;
  }()
);
var lerp = function(a2, b2, t) {
  return new Vector(a2.x + (b2.x - a2.x) * t, a2.y + (b2.y - a2.y) * t);
};
var BezierCurve = (
  /** @class */
  function() {
    function BezierCurve2(start2, startControl, endControl, end2) {
      this.type = 1;
      this.start = start2;
      this.startControl = startControl;
      this.endControl = endControl;
      this.end = end2;
    }
    BezierCurve2.prototype.subdivide = function(t, firstHalf) {
      var ab = lerp(this.start, this.startControl, t);
      var bc = lerp(this.startControl, this.endControl, t);
      var cd = lerp(this.endControl, this.end, t);
      var abbc = lerp(ab, bc, t);
      var bccd = lerp(bc, cd, t);
      var dest = lerp(abbc, bccd, t);
      return firstHalf ? new BezierCurve2(this.start, ab, abbc, dest) : new BezierCurve2(dest, bccd, cd, this.end);
    };
    BezierCurve2.prototype.add = function(deltaX, deltaY) {
      return new BezierCurve2(this.start.add(deltaX, deltaY), this.startControl.add(deltaX, deltaY), this.endControl.add(deltaX, deltaY), this.end.add(deltaX, deltaY));
    };
    BezierCurve2.prototype.reverse = function() {
      return new BezierCurve2(this.end, this.endControl, this.startControl, this.start);
    };
    return BezierCurve2;
  }()
);
var isBezierCurve = function(path) {
  return path.type === 1;
};
var BoundCurves = (
  /** @class */
  /* @__PURE__ */ function() {
    function BoundCurves2(element) {
      var styles2 = element.styles;
      var bounds = element.bounds;
      var _a2 = getAbsoluteValueForTuple(styles2.borderTopLeftRadius, bounds.width, bounds.height), tlh = _a2[0], tlv = _a2[1];
      var _b = getAbsoluteValueForTuple(styles2.borderTopRightRadius, bounds.width, bounds.height), trh = _b[0], trv = _b[1];
      var _c = getAbsoluteValueForTuple(styles2.borderBottomRightRadius, bounds.width, bounds.height), brh = _c[0], brv = _c[1];
      var _d = getAbsoluteValueForTuple(styles2.borderBottomLeftRadius, bounds.width, bounds.height), blh = _d[0], blv = _d[1];
      var factors = [];
      factors.push((tlh + trh) / bounds.width);
      factors.push((blh + brh) / bounds.width);
      factors.push((tlv + blv) / bounds.height);
      factors.push((trv + brv) / bounds.height);
      var maxFactor = Math.max.apply(Math, factors);
      if (maxFactor > 1) {
        tlh /= maxFactor;
        tlv /= maxFactor;
        trh /= maxFactor;
        trv /= maxFactor;
        brh /= maxFactor;
        brv /= maxFactor;
        blh /= maxFactor;
        blv /= maxFactor;
      }
      var topWidth = bounds.width - trh;
      var rightHeight = bounds.height - brv;
      var bottomWidth = bounds.width - brh;
      var leftHeight = bounds.height - blv;
      var borderTopWidth2 = styles2.borderTopWidth;
      var borderRightWidth2 = styles2.borderRightWidth;
      var borderBottomWidth2 = styles2.borderBottomWidth;
      var borderLeftWidth2 = styles2.borderLeftWidth;
      var paddingTop2 = getAbsoluteValue(styles2.paddingTop, element.bounds.width);
      var paddingRight2 = getAbsoluteValue(styles2.paddingRight, element.bounds.width);
      var paddingBottom2 = getAbsoluteValue(styles2.paddingBottom, element.bounds.width);
      var paddingLeft2 = getAbsoluteValue(styles2.paddingLeft, element.bounds.width);
      this.topLeftBorderDoubleOuterBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 / 3, bounds.top + borderTopWidth2 / 3, tlh - borderLeftWidth2 / 3, tlv - borderTopWidth2 / 3, CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth2 / 3, bounds.top + borderTopWidth2 / 3);
      this.topRightBorderDoubleOuterBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth2 / 3, trh - borderRightWidth2 / 3, trv - borderTopWidth2 / 3, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2 / 3, bounds.top + borderTopWidth2 / 3);
      this.bottomRightBorderDoubleOuterBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth2 / 3, brv - borderBottomWidth2 / 3, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2 / 3, bounds.top + bounds.height - borderBottomWidth2 / 3);
      this.bottomLeftBorderDoubleOuterBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 / 3, bounds.top + leftHeight, blh - borderLeftWidth2 / 3, blv - borderBottomWidth2 / 3, CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth2 / 3, bounds.top + bounds.height - borderBottomWidth2 / 3);
      this.topLeftBorderDoubleInnerBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 * 2 / 3, bounds.top + borderTopWidth2 * 2 / 3, tlh - borderLeftWidth2 * 2 / 3, tlv - borderTopWidth2 * 2 / 3, CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth2 * 2 / 3, bounds.top + borderTopWidth2 * 2 / 3);
      this.topRightBorderDoubleInnerBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth2 * 2 / 3, trh - borderRightWidth2 * 2 / 3, trv - borderTopWidth2 * 2 / 3, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2 * 2 / 3, bounds.top + borderTopWidth2 * 2 / 3);
      this.bottomRightBorderDoubleInnerBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth2 * 2 / 3, brv - borderBottomWidth2 * 2 / 3, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2 * 2 / 3, bounds.top + bounds.height - borderBottomWidth2 * 2 / 3);
      this.bottomLeftBorderDoubleInnerBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 * 2 / 3, bounds.top + leftHeight, blh - borderLeftWidth2 * 2 / 3, blv - borderBottomWidth2 * 2 / 3, CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth2 * 2 / 3, bounds.top + bounds.height - borderBottomWidth2 * 2 / 3);
      this.topLeftBorderStroke = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 / 2, bounds.top + borderTopWidth2 / 2, tlh - borderLeftWidth2 / 2, tlv - borderTopWidth2 / 2, CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth2 / 2, bounds.top + borderTopWidth2 / 2);
      this.topRightBorderStroke = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top + borderTopWidth2 / 2, trh - borderRightWidth2 / 2, trv - borderTopWidth2 / 2, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2 / 2, bounds.top + borderTopWidth2 / 2);
      this.bottomRightBorderStroke = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh - borderRightWidth2 / 2, brv - borderBottomWidth2 / 2, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2 / 2, bounds.top + bounds.height - borderBottomWidth2 / 2);
      this.bottomLeftBorderStroke = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 / 2, bounds.top + leftHeight, blh - borderLeftWidth2 / 2, blv - borderBottomWidth2 / 2, CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth2 / 2, bounds.top + bounds.height - borderBottomWidth2 / 2);
      this.topLeftBorderBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT) : new Vector(bounds.left, bounds.top);
      this.topRightBorderBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width, bounds.top);
      this.bottomRightBorderBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width, bounds.top + bounds.height);
      this.bottomLeftBorderBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) : new Vector(bounds.left, bounds.top + bounds.height);
      this.topLeftPaddingBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2, bounds.top + borderTopWidth2, Math.max(0, tlh - borderLeftWidth2), Math.max(0, tlv - borderTopWidth2), CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth2, bounds.top + borderTopWidth2);
      this.topRightPaddingBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width - borderRightWidth2), bounds.top + borderTopWidth2, topWidth > bounds.width + borderRightWidth2 ? 0 : Math.max(0, trh - borderRightWidth2), Math.max(0, trv - borderTopWidth2), CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2, bounds.top + borderTopWidth2);
      this.bottomRightPaddingBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borderLeftWidth2), bounds.top + Math.min(rightHeight, bounds.height - borderBottomWidth2), Math.max(0, brh - borderRightWidth2), Math.max(0, brv - borderBottomWidth2), CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - borderRightWidth2, bounds.top + bounds.height - borderBottomWidth2);
      this.bottomLeftPaddingBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2, bounds.top + Math.min(leftHeight, bounds.height - borderBottomWidth2), Math.max(0, blh - borderLeftWidth2), Math.max(0, blv - borderBottomWidth2), CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth2, bounds.top + bounds.height - borderBottomWidth2);
      this.topLeftContentBox = tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 + paddingLeft2, bounds.top + borderTopWidth2 + paddingTop2, Math.max(0, tlh - (borderLeftWidth2 + paddingLeft2)), Math.max(0, tlv - (borderTopWidth2 + paddingTop2)), CORNER.TOP_LEFT) : new Vector(bounds.left + borderLeftWidth2 + paddingLeft2, bounds.top + borderTopWidth2 + paddingTop2);
      this.topRightContentBox = trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borderLeftWidth2 + paddingLeft2), bounds.top + borderTopWidth2 + paddingTop2, topWidth > bounds.width + borderLeftWidth2 + paddingLeft2 ? 0 : trh - borderLeftWidth2 + paddingLeft2, trv - (borderTopWidth2 + paddingTop2), CORNER.TOP_RIGHT) : new Vector(bounds.left + bounds.width - (borderRightWidth2 + paddingRight2), bounds.top + borderTopWidth2 + paddingTop2);
      this.bottomRightContentBox = brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - (borderLeftWidth2 + paddingLeft2)), bounds.top + Math.min(rightHeight, bounds.height + borderTopWidth2 + paddingTop2), Math.max(0, brh - (borderRightWidth2 + paddingRight2)), brv - (borderBottomWidth2 + paddingBottom2), CORNER.BOTTOM_RIGHT) : new Vector(bounds.left + bounds.width - (borderRightWidth2 + paddingRight2), bounds.top + bounds.height - (borderBottomWidth2 + paddingBottom2));
      this.bottomLeftContentBox = blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borderLeftWidth2 + paddingLeft2, bounds.top + leftHeight, Math.max(0, blh - (borderLeftWidth2 + paddingLeft2)), blv - (borderBottomWidth2 + paddingBottom2), CORNER.BOTTOM_LEFT) : new Vector(bounds.left + borderLeftWidth2 + paddingLeft2, bounds.top + bounds.height - (borderBottomWidth2 + paddingBottom2));
    }
    return BoundCurves2;
  }()
);
var CORNER;
(function(CORNER2) {
  CORNER2[CORNER2["TOP_LEFT"] = 0] = "TOP_LEFT";
  CORNER2[CORNER2["TOP_RIGHT"] = 1] = "TOP_RIGHT";
  CORNER2[CORNER2["BOTTOM_RIGHT"] = 2] = "BOTTOM_RIGHT";
  CORNER2[CORNER2["BOTTOM_LEFT"] = 3] = "BOTTOM_LEFT";
})(CORNER || (CORNER = {}));
var getCurvePoints = function(x, y2, r1, r2, position2) {
  var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
  var ox = r1 * kappa;
  var oy = r2 * kappa;
  var xm = x + r1;
  var ym = y2 + r2;
  switch (position2) {
    case CORNER.TOP_LEFT:
      return new BezierCurve(new Vector(x, ym), new Vector(x, ym - oy), new Vector(xm - ox, y2), new Vector(xm, y2));
    case CORNER.TOP_RIGHT:
      return new BezierCurve(new Vector(x, y2), new Vector(x + ox, y2), new Vector(xm, ym - oy), new Vector(xm, ym));
    case CORNER.BOTTOM_RIGHT:
      return new BezierCurve(new Vector(xm, y2), new Vector(xm, y2 + oy), new Vector(x + ox, ym), new Vector(x, ym));
    case CORNER.BOTTOM_LEFT:
    default:
      return new BezierCurve(new Vector(xm, ym), new Vector(xm - ox, ym), new Vector(x, y2 + oy), new Vector(x, y2));
  }
};
var calculateBorderBoxPath = function(curves) {
  return [curves.topLeftBorderBox, curves.topRightBorderBox, curves.bottomRightBorderBox, curves.bottomLeftBorderBox];
};
var calculateContentBoxPath = function(curves) {
  return [
    curves.topLeftContentBox,
    curves.topRightContentBox,
    curves.bottomRightContentBox,
    curves.bottomLeftContentBox
  ];
};
var calculatePaddingBoxPath = function(curves) {
  return [
    curves.topLeftPaddingBox,
    curves.topRightPaddingBox,
    curves.bottomRightPaddingBox,
    curves.bottomLeftPaddingBox
  ];
};
var TransformEffect = (
  /** @class */
  /* @__PURE__ */ function() {
    function TransformEffect2(offsetX, offsetY, matrix2) {
      this.offsetX = offsetX;
      this.offsetY = offsetY;
      this.matrix = matrix2;
      this.type = 0;
      this.target = 2 | 4;
    }
    return TransformEffect2;
  }()
);
var ClipEffect = (
  /** @class */
  /* @__PURE__ */ function() {
    function ClipEffect2(path, target) {
      this.path = path;
      this.target = target;
      this.type = 1;
    }
    return ClipEffect2;
  }()
);
var OpacityEffect = (
  /** @class */
  /* @__PURE__ */ function() {
    function OpacityEffect2(opacity2) {
      this.opacity = opacity2;
      this.type = 2;
      this.target = 2 | 4;
    }
    return OpacityEffect2;
  }()
);
var isTransformEffect = function(effect2) {
  return effect2.type === 0;
};
var isClipEffect = function(effect2) {
  return effect2.type === 1;
};
var isOpacityEffect = function(effect2) {
  return effect2.type === 2;
};
var equalPath = function(a2, b2) {
  if (a2.length === b2.length) {
    return a2.some(function(v2, i) {
      return v2 === b2[i];
    });
  }
  return false;
};
var transformPath = function(path, deltaX, deltaY, deltaW, deltaH) {
  return path.map(function(point, index2) {
    switch (index2) {
      case 0:
        return point.add(deltaX, deltaY);
      case 1:
        return point.add(deltaX + deltaW, deltaY);
      case 2:
        return point.add(deltaX + deltaW, deltaY + deltaH);
      case 3:
        return point.add(deltaX, deltaY + deltaH);
    }
    return point;
  });
};
var StackingContext = (
  /** @class */
  /* @__PURE__ */ function() {
    function StackingContext2(container) {
      this.element = container;
      this.inlineLevel = [];
      this.nonInlineLevel = [];
      this.negativeZIndex = [];
      this.zeroOrAutoZIndexOrTransformedOrOpacity = [];
      this.positiveZIndex = [];
      this.nonPositionedFloats = [];
      this.nonPositionedInlineLevel = [];
    }
    return StackingContext2;
  }()
);
var ElementPaint = (
  /** @class */
  function() {
    function ElementPaint2(container, parent) {
      this.container = container;
      this.parent = parent;
      this.effects = [];
      this.curves = new BoundCurves(this.container);
      if (this.container.styles.opacity < 1) {
        this.effects.push(new OpacityEffect(this.container.styles.opacity));
      }
      if (this.container.styles.transform !== null) {
        var offsetX = this.container.bounds.left + this.container.styles.transformOrigin[0].number;
        var offsetY = this.container.bounds.top + this.container.styles.transformOrigin[1].number;
        var matrix2 = this.container.styles.transform;
        this.effects.push(new TransformEffect(offsetX, offsetY, matrix2));
      }
      if (this.container.styles.overflowX !== 0) {
        var borderBox = calculateBorderBoxPath(this.curves);
        var paddingBox2 = calculatePaddingBoxPath(this.curves);
        if (equalPath(borderBox, paddingBox2)) {
          this.effects.push(new ClipEffect(
            borderBox,
            2 | 4
            /* CONTENT */
          ));
        } else {
          this.effects.push(new ClipEffect(
            borderBox,
            2
            /* BACKGROUND_BORDERS */
          ));
          this.effects.push(new ClipEffect(
            paddingBox2,
            4
            /* CONTENT */
          ));
        }
      }
    }
    ElementPaint2.prototype.getEffects = function(target) {
      var inFlow = [
        2,
        3
        /* FIXED */
      ].indexOf(this.container.styles.position) === -1;
      var parent = this.parent;
      var effects = this.effects.slice(0);
      while (parent) {
        var croplessEffects = parent.effects.filter(function(effect2) {
          return !isClipEffect(effect2);
        });
        if (inFlow || parent.container.styles.position !== 0 || !parent.parent) {
          effects.unshift.apply(effects, croplessEffects);
          inFlow = [
            2,
            3
            /* FIXED */
          ].indexOf(parent.container.styles.position) === -1;
          if (parent.container.styles.overflowX !== 0) {
            var borderBox = calculateBorderBoxPath(parent.curves);
            var paddingBox2 = calculatePaddingBoxPath(parent.curves);
            if (!equalPath(borderBox, paddingBox2)) {
              effects.unshift(new ClipEffect(
                paddingBox2,
                2 | 4
                /* CONTENT */
              ));
            }
          }
        } else {
          effects.unshift.apply(effects, croplessEffects);
        }
        parent = parent.parent;
      }
      return effects.filter(function(effect2) {
        return contains(effect2.target, target);
      });
    };
    return ElementPaint2;
  }()
);
var parseStackTree = function(parent, stackingContext, realStackingContext, listItems) {
  parent.container.elements.forEach(function(child) {
    var treatAsRealStackingContext = contains(
      child.flags,
      4
      /* CREATES_REAL_STACKING_CONTEXT */
    );
    var createsStackingContext2 = contains(
      child.flags,
      2
      /* CREATES_STACKING_CONTEXT */
    );
    var paintContainer = new ElementPaint(child, parent);
    if (contains(
      child.styles.display,
      2048
      /* LIST_ITEM */
    )) {
      listItems.push(paintContainer);
    }
    var listOwnerItems = contains(
      child.flags,
      8
      /* IS_LIST_OWNER */
    ) ? [] : listItems;
    if (treatAsRealStackingContext || createsStackingContext2) {
      var parentStack = treatAsRealStackingContext || child.styles.isPositioned() ? realStackingContext : stackingContext;
      var stack = new StackingContext(paintContainer);
      if (child.styles.isPositioned() || child.styles.opacity < 1 || child.styles.isTransformed()) {
        var order_1 = child.styles.zIndex.order;
        if (order_1 < 0) {
          var index_1 = 0;
          parentStack.negativeZIndex.some(function(current, i) {
            if (order_1 > current.element.container.styles.zIndex.order) {
              index_1 = i;
              return false;
            } else if (index_1 > 0) {
              return true;
            }
            return false;
          });
          parentStack.negativeZIndex.splice(index_1, 0, stack);
        } else if (order_1 > 0) {
          var index_2 = 0;
          parentStack.positiveZIndex.some(function(current, i) {
            if (order_1 >= current.element.container.styles.zIndex.order) {
              index_2 = i + 1;
              return false;
            } else if (index_2 > 0) {
              return true;
            }
            return false;
          });
          parentStack.positiveZIndex.splice(index_2, 0, stack);
        } else {
          parentStack.zeroOrAutoZIndexOrTransformedOrOpacity.push(stack);
        }
      } else {
        if (child.styles.isFloating()) {
          parentStack.nonPositionedFloats.push(stack);
        } else {
          parentStack.nonPositionedInlineLevel.push(stack);
        }
      }
      parseStackTree(paintContainer, stack, treatAsRealStackingContext ? stack : realStackingContext, listOwnerItems);
    } else {
      if (child.styles.isInlineLevel()) {
        stackingContext.inlineLevel.push(paintContainer);
      } else {
        stackingContext.nonInlineLevel.push(paintContainer);
      }
      parseStackTree(paintContainer, stackingContext, realStackingContext, listOwnerItems);
    }
    if (contains(
      child.flags,
      8
      /* IS_LIST_OWNER */
    )) {
      processListItems(child, listOwnerItems);
    }
  });
};
var processListItems = function(owner, elements) {
  var numbering = owner instanceof OLElementContainer ? owner.start : 1;
  var reversed = owner instanceof OLElementContainer ? owner.reversed : false;
  for (var i = 0; i < elements.length; i++) {
    var item = elements[i];
    if (item.container instanceof LIElementContainer && typeof item.container.value === "number" && item.container.value !== 0) {
      numbering = item.container.value;
    }
    item.listValue = createCounterText(numbering, item.container.styles.listStyleType, true);
    numbering += reversed ? -1 : 1;
  }
};
var parseStackingContexts = function(container) {
  var paintContainer = new ElementPaint(container, null);
  var root = new StackingContext(paintContainer);
  var listItems = [];
  parseStackTree(paintContainer, root, root, listItems);
  processListItems(paintContainer.container, listItems);
  return root;
};
var parsePathForBorder = function(curves, borderSide) {
  switch (borderSide) {
    case 0:
      return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftPaddingBox, curves.topRightBorderBox, curves.topRightPaddingBox);
    case 1:
      return createPathFromCurves(curves.topRightBorderBox, curves.topRightPaddingBox, curves.bottomRightBorderBox, curves.bottomRightPaddingBox);
    case 2:
      return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox);
    case 3:
    default:
      return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftPaddingBox, curves.topLeftBorderBox, curves.topLeftPaddingBox);
  }
};
var parsePathForBorderDoubleOuter = function(curves, borderSide) {
  switch (borderSide) {
    case 0:
      return createPathFromCurves(curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox, curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox);
    case 1:
      return createPathFromCurves(curves.topRightBorderBox, curves.topRightBorderDoubleOuterBox, curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox);
    case 2:
      return createPathFromCurves(curves.bottomRightBorderBox, curves.bottomRightBorderDoubleOuterBox, curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox);
    case 3:
    default:
      return createPathFromCurves(curves.bottomLeftBorderBox, curves.bottomLeftBorderDoubleOuterBox, curves.topLeftBorderBox, curves.topLeftBorderDoubleOuterBox);
  }
};
var parsePathForBorderDoubleInner = function(curves, borderSide) {
  switch (borderSide) {
    case 0:
      return createPathFromCurves(curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox, curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox);
    case 1:
      return createPathFromCurves(curves.topRightBorderDoubleInnerBox, curves.topRightPaddingBox, curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox);
    case 2:
      return createPathFromCurves(curves.bottomRightBorderDoubleInnerBox, curves.bottomRightPaddingBox, curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox);
    case 3:
    default:
      return createPathFromCurves(curves.bottomLeftBorderDoubleInnerBox, curves.bottomLeftPaddingBox, curves.topLeftBorderDoubleInnerBox, curves.topLeftPaddingBox);
  }
};
var parsePathForBorderStroke = function(curves, borderSide) {
  switch (borderSide) {
    case 0:
      return createStrokePathFromCurves(curves.topLeftBorderStroke, curves.topRightBorderStroke);
    case 1:
      return createStrokePathFromCurves(curves.topRightBorderStroke, curves.bottomRightBorderStroke);
    case 2:
      return createStrokePathFromCurves(curves.bottomRightBorderStroke, curves.bottomLeftBorderStroke);
    case 3:
    default:
      return createStrokePathFromCurves(curves.bottomLeftBorderStroke, curves.topLeftBorderStroke);
  }
};
var createStrokePathFromCurves = function(outer1, outer2) {
  var path = [];
  if (isBezierCurve(outer1)) {
    path.push(outer1.subdivide(0.5, false));
  } else {
    path.push(outer1);
  }
  if (isBezierCurve(outer2)) {
    path.push(outer2.subdivide(0.5, true));
  } else {
    path.push(outer2);
  }
  return path;
};
var createPathFromCurves = function(outer1, inner1, outer2, inner2) {
  var path = [];
  if (isBezierCurve(outer1)) {
    path.push(outer1.subdivide(0.5, false));
  } else {
    path.push(outer1);
  }
  if (isBezierCurve(outer2)) {
    path.push(outer2.subdivide(0.5, true));
  } else {
    path.push(outer2);
  }
  if (isBezierCurve(inner2)) {
    path.push(inner2.subdivide(0.5, true).reverse());
  } else {
    path.push(inner2);
  }
  if (isBezierCurve(inner1)) {
    path.push(inner1.subdivide(0.5, false).reverse());
  } else {
    path.push(inner1);
  }
  return path;
};
var paddingBox = function(element) {
  var bounds = element.bounds;
  var styles2 = element.styles;
  return bounds.add(styles2.borderLeftWidth, styles2.borderTopWidth, -(styles2.borderRightWidth + styles2.borderLeftWidth), -(styles2.borderTopWidth + styles2.borderBottomWidth));
};
var contentBox = function(element) {
  var styles2 = element.styles;
  var bounds = element.bounds;
  var paddingLeft2 = getAbsoluteValue(styles2.paddingLeft, bounds.width);
  var paddingRight2 = getAbsoluteValue(styles2.paddingRight, bounds.width);
  var paddingTop2 = getAbsoluteValue(styles2.paddingTop, bounds.width);
  var paddingBottom2 = getAbsoluteValue(styles2.paddingBottom, bounds.width);
  return bounds.add(paddingLeft2 + styles2.borderLeftWidth, paddingTop2 + styles2.borderTopWidth, -(styles2.borderRightWidth + styles2.borderLeftWidth + paddingLeft2 + paddingRight2), -(styles2.borderTopWidth + styles2.borderBottomWidth + paddingTop2 + paddingBottom2));
};
var calculateBackgroundPositioningArea = function(backgroundOrigin2, element) {
  if (backgroundOrigin2 === 0) {
    return element.bounds;
  }
  if (backgroundOrigin2 === 2) {
    return contentBox(element);
  }
  return paddingBox(element);
};
var calculateBackgroundPaintingArea = function(backgroundClip2, element) {
  if (backgroundClip2 === 0) {
    return element.bounds;
  }
  if (backgroundClip2 === 2) {
    return contentBox(element);
  }
  return paddingBox(element);
};
var calculateBackgroundRendering = function(container, index2, intrinsicSize) {
  var backgroundPositioningArea = calculateBackgroundPositioningArea(getBackgroundValueForIndex(container.styles.backgroundOrigin, index2), container);
  var backgroundPaintingArea = calculateBackgroundPaintingArea(getBackgroundValueForIndex(container.styles.backgroundClip, index2), container);
  var backgroundImageSize = calculateBackgroundSize(getBackgroundValueForIndex(container.styles.backgroundSize, index2), intrinsicSize, backgroundPositioningArea);
  var sizeWidth = backgroundImageSize[0], sizeHeight = backgroundImageSize[1];
  var position2 = getAbsoluteValueForTuple(getBackgroundValueForIndex(container.styles.backgroundPosition, index2), backgroundPositioningArea.width - sizeWidth, backgroundPositioningArea.height - sizeHeight);
  var path = calculateBackgroundRepeatPath(getBackgroundValueForIndex(container.styles.backgroundRepeat, index2), position2, backgroundImageSize, backgroundPositioningArea, backgroundPaintingArea);
  var offsetX = Math.round(backgroundPositioningArea.left + position2[0]);
  var offsetY = Math.round(backgroundPositioningArea.top + position2[1]);
  return [path, offsetX, offsetY, sizeWidth, sizeHeight];
};
var isAuto = function(token2) {
  return isIdentToken(token2) && token2.value === BACKGROUND_SIZE.AUTO;
};
var hasIntrinsicValue = function(value) {
  return typeof value === "number";
};
var calculateBackgroundSize = function(size, _a2, bounds) {
  var intrinsicWidth = _a2[0], intrinsicHeight = _a2[1], intrinsicProportion = _a2[2];
  var first = size[0], second = size[1];
  if (!first) {
    return [0, 0];
  }
  if (isLengthPercentage(first) && second && isLengthPercentage(second)) {
    return [getAbsoluteValue(first, bounds.width), getAbsoluteValue(second, bounds.height)];
  }
  var hasIntrinsicProportion = hasIntrinsicValue(intrinsicProportion);
  if (isIdentToken(first) && (first.value === BACKGROUND_SIZE.CONTAIN || first.value === BACKGROUND_SIZE.COVER)) {
    if (hasIntrinsicValue(intrinsicProportion)) {
      var targetRatio = bounds.width / bounds.height;
      return targetRatio < intrinsicProportion !== (first.value === BACKGROUND_SIZE.COVER) ? [bounds.width, bounds.width / intrinsicProportion] : [bounds.height * intrinsicProportion, bounds.height];
    }
    return [bounds.width, bounds.height];
  }
  var hasIntrinsicWidth = hasIntrinsicValue(intrinsicWidth);
  var hasIntrinsicHeight = hasIntrinsicValue(intrinsicHeight);
  var hasIntrinsicDimensions = hasIntrinsicWidth || hasIntrinsicHeight;
  if (isAuto(first) && (!second || isAuto(second))) {
    if (hasIntrinsicWidth && hasIntrinsicHeight) {
      return [intrinsicWidth, intrinsicHeight];
    }
    if (!hasIntrinsicProportion && !hasIntrinsicDimensions) {
      return [bounds.width, bounds.height];
    }
    if (hasIntrinsicDimensions && hasIntrinsicProportion) {
      var width_1 = hasIntrinsicWidth ? intrinsicWidth : intrinsicHeight * intrinsicProportion;
      var height_1 = hasIntrinsicHeight ? intrinsicHeight : intrinsicWidth / intrinsicProportion;
      return [width_1, height_1];
    }
    var width_2 = hasIntrinsicWidth ? intrinsicWidth : bounds.width;
    var height_2 = hasIntrinsicHeight ? intrinsicHeight : bounds.height;
    return [width_2, height_2];
  }
  if (hasIntrinsicProportion) {
    var width_3 = 0;
    var height_3 = 0;
    if (isLengthPercentage(first)) {
      width_3 = getAbsoluteValue(first, bounds.width);
    } else if (isLengthPercentage(second)) {
      height_3 = getAbsoluteValue(second, bounds.height);
    }
    if (isAuto(first)) {
      width_3 = height_3 * intrinsicProportion;
    } else if (!second || isAuto(second)) {
      height_3 = width_3 / intrinsicProportion;
    }
    return [width_3, height_3];
  }
  var width2 = null;
  var height2 = null;
  if (isLengthPercentage(first)) {
    width2 = getAbsoluteValue(first, bounds.width);
  } else if (second && isLengthPercentage(second)) {
    height2 = getAbsoluteValue(second, bounds.height);
  }
  if (width2 !== null && (!second || isAuto(second))) {
    height2 = hasIntrinsicWidth && hasIntrinsicHeight ? width2 / intrinsicWidth * intrinsicHeight : bounds.height;
  }
  if (height2 !== null && isAuto(first)) {
    width2 = hasIntrinsicWidth && hasIntrinsicHeight ? height2 / intrinsicHeight * intrinsicWidth : bounds.width;
  }
  if (width2 !== null && height2 !== null) {
    return [width2, height2];
  }
  throw new Error("Unable to calculate background-size for element");
};
var getBackgroundValueForIndex = function(values2, index2) {
  var value = values2[index2];
  if (typeof value === "undefined") {
    return values2[0];
  }
  return value;
};
var calculateBackgroundRepeatPath = function(repeat, _a2, _b, backgroundPositioningArea, backgroundPaintingArea) {
  var x = _a2[0], y2 = _a2[1];
  var width2 = _b[0], height2 = _b[1];
  switch (repeat) {
    case 2:
      return [
        new Vector(Math.round(backgroundPositioningArea.left), Math.round(backgroundPositioningArea.top + y2)),
        new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(backgroundPositioningArea.top + y2)),
        new Vector(Math.round(backgroundPositioningArea.left + backgroundPositioningArea.width), Math.round(height2 + backgroundPositioningArea.top + y2)),
        new Vector(Math.round(backgroundPositioningArea.left), Math.round(height2 + backgroundPositioningArea.top + y2))
      ];
    case 3:
      return [
        new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top)),
        new Vector(Math.round(backgroundPositioningArea.left + x + width2), Math.round(backgroundPositioningArea.top)),
        new Vector(Math.round(backgroundPositioningArea.left + x + width2), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top)),
        new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.height + backgroundPositioningArea.top))
      ];
    case 1:
      return [
        new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y2)),
        new Vector(Math.round(backgroundPositioningArea.left + x + width2), Math.round(backgroundPositioningArea.top + y2)),
        new Vector(Math.round(backgroundPositioningArea.left + x + width2), Math.round(backgroundPositioningArea.top + y2 + height2)),
        new Vector(Math.round(backgroundPositioningArea.left + x), Math.round(backgroundPositioningArea.top + y2 + height2))
      ];
    default:
      return [
        new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.top)),
        new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.top)),
        new Vector(Math.round(backgroundPaintingArea.left + backgroundPaintingArea.width), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top)),
        new Vector(Math.round(backgroundPaintingArea.left), Math.round(backgroundPaintingArea.height + backgroundPaintingArea.top))
      ];
  }
};
var SMALL_IMAGE = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
var SAMPLE_TEXT = "Hidden Text";
var FontMetrics = (
  /** @class */
  function() {
    function FontMetrics2(document2) {
      this._data = {};
      this._document = document2;
    }
    FontMetrics2.prototype.parseMetrics = function(fontFamily2, fontSize2) {
      var container = this._document.createElement("div");
      var img = this._document.createElement("img");
      var span = this._document.createElement("span");
      var body2 = this._document.body;
      container.style.visibility = "hidden";
      container.style.fontFamily = fontFamily2;
      container.style.fontSize = fontSize2;
      container.style.margin = "0";
      container.style.padding = "0";
      container.style.whiteSpace = "nowrap";
      body2.appendChild(container);
      img.src = SMALL_IMAGE;
      img.width = 1;
      img.height = 1;
      img.style.margin = "0";
      img.style.padding = "0";
      img.style.verticalAlign = "baseline";
      span.style.fontFamily = fontFamily2;
      span.style.fontSize = fontSize2;
      span.style.margin = "0";
      span.style.padding = "0";
      span.appendChild(this._document.createTextNode(SAMPLE_TEXT));
      container.appendChild(span);
      container.appendChild(img);
      var baseline = img.offsetTop - span.offsetTop + 2;
      container.removeChild(span);
      container.appendChild(this._document.createTextNode(SAMPLE_TEXT));
      container.style.lineHeight = "normal";
      img.style.verticalAlign = "super";
      var middle = img.offsetTop - container.offsetTop + 2;
      body2.removeChild(container);
      return { baseline, middle };
    };
    FontMetrics2.prototype.getMetrics = function(fontFamily2, fontSize2) {
      var key = fontFamily2 + " " + fontSize2;
      if (typeof this._data[key] === "undefined") {
        this._data[key] = this.parseMetrics(fontFamily2, fontSize2);
      }
      return this._data[key];
    };
    return FontMetrics2;
  }()
);
var Renderer = (
  /** @class */
  /* @__PURE__ */ function() {
    function Renderer2(context, options) {
      this.context = context;
      this.options = options;
    }
    return Renderer2;
  }()
);
var MASK_OFFSET = 1e4;
var CanvasRenderer = (
  /** @class */
  function(_super) {
    __extends(CanvasRenderer2, _super);
    function CanvasRenderer2(context, options) {
      var _this = _super.call(this, context, options) || this;
      _this._activeEffects = [];
      _this.canvas = options.canvas ? options.canvas : document.createElement("canvas");
      _this.ctx = _this.canvas.getContext("2d");
      if (!options.canvas) {
        _this.canvas.width = Math.floor(options.width * options.scale);
        _this.canvas.height = Math.floor(options.height * options.scale);
        _this.canvas.style.width = options.width + "px";
        _this.canvas.style.height = options.height + "px";
      }
      _this.fontMetrics = new FontMetrics(document);
      _this.ctx.scale(_this.options.scale, _this.options.scale);
      _this.ctx.translate(-options.x, -options.y);
      _this.ctx.textBaseline = "bottom";
      _this._activeEffects = [];
      _this.context.logger.debug("Canvas renderer initialized (" + options.width + "x" + options.height + ") with scale " + options.scale);
      return _this;
    }
    CanvasRenderer2.prototype.applyEffects = function(effects) {
      var _this = this;
      while (this._activeEffects.length) {
        this.popEffect();
      }
      effects.forEach(function(effect2) {
        return _this.applyEffect(effect2);
      });
    };
    CanvasRenderer2.prototype.applyEffect = function(effect2) {
      this.ctx.save();
      if (isOpacityEffect(effect2)) {
        this.ctx.globalAlpha = effect2.opacity;
      }
      if (isTransformEffect(effect2)) {
        this.ctx.translate(effect2.offsetX, effect2.offsetY);
        this.ctx.transform(effect2.matrix[0], effect2.matrix[1], effect2.matrix[2], effect2.matrix[3], effect2.matrix[4], effect2.matrix[5]);
        this.ctx.translate(-effect2.offsetX, -effect2.offsetY);
      }
      if (isClipEffect(effect2)) {
        this.path(effect2.path);
        this.ctx.clip();
      }
      this._activeEffects.push(effect2);
    };
    CanvasRenderer2.prototype.popEffect = function() {
      this._activeEffects.pop();
      this.ctx.restore();
    };
    CanvasRenderer2.prototype.renderStack = function(stack) {
      return __awaiter$1(this, void 0, void 0, function() {
        var styles2;
        return __generator(this, function(_a2) {
          switch (_a2.label) {
            case 0:
              styles2 = stack.element.container.styles;
              if (!styles2.isVisible()) return [3, 2];
              return [4, this.renderStackContent(stack)];
            case 1:
              _a2.sent();
              _a2.label = 2;
            case 2:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    CanvasRenderer2.prototype.renderNode = function(paint) {
      return __awaiter$1(this, void 0, void 0, function() {
        return __generator(this, function(_a2) {
          switch (_a2.label) {
            case 0:
              if (contains(
                paint.container.flags,
                16
                /* DEBUG_RENDER */
              )) {
                debugger;
              }
              if (!paint.container.styles.isVisible()) return [3, 3];
              return [4, this.renderNodeBackgroundAndBorders(paint)];
            case 1:
              _a2.sent();
              return [4, this.renderNodeContent(paint)];
            case 2:
              _a2.sent();
              _a2.label = 3;
            case 3:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    CanvasRenderer2.prototype.renderTextWithLetterSpacing = function(text, letterSpacing2, baseline) {
      var _this = this;
      if (letterSpacing2 === 0) {
        this.ctx.fillText(text.text, text.bounds.left, text.bounds.top + baseline);
      } else {
        var letters = segmentGraphemes(text.text);
        letters.reduce(function(left2, letter) {
          _this.ctx.fillText(letter, left2, text.bounds.top + baseline);
          return left2 + _this.ctx.measureText(letter).width;
        }, text.bounds.left);
      }
    };
    CanvasRenderer2.prototype.createFontStyle = function(styles2) {
      var fontVariant2 = styles2.fontVariant.filter(function(variant2) {
        return variant2 === "normal" || variant2 === "small-caps";
      }).join("");
      var fontFamily2 = fixIOSSystemFonts(styles2.fontFamily).join(", ");
      var fontSize2 = isDimensionToken(styles2.fontSize) ? "" + styles2.fontSize.number + styles2.fontSize.unit : styles2.fontSize.number + "px";
      return [
        [styles2.fontStyle, fontVariant2, styles2.fontWeight, fontSize2, fontFamily2].join(" "),
        fontFamily2,
        fontSize2
      ];
    };
    CanvasRenderer2.prototype.renderTextNode = function(text, styles2) {
      return __awaiter$1(this, void 0, void 0, function() {
        var _a2, font, fontFamily2, fontSize2, _b, baseline, middle, paintOrder2;
        var _this = this;
        return __generator(this, function(_c) {
          _a2 = this.createFontStyle(styles2), font = _a2[0], fontFamily2 = _a2[1], fontSize2 = _a2[2];
          this.ctx.font = font;
          this.ctx.direction = styles2.direction === 1 ? "rtl" : "ltr";
          this.ctx.textAlign = "left";
          this.ctx.textBaseline = "alphabetic";
          _b = this.fontMetrics.getMetrics(fontFamily2, fontSize2), baseline = _b.baseline, middle = _b.middle;
          paintOrder2 = styles2.paintOrder;
          text.textBounds.forEach(function(text2) {
            paintOrder2.forEach(function(paintOrderLayer) {
              switch (paintOrderLayer) {
                case 0:
                  _this.ctx.fillStyle = asString(styles2.color);
                  _this.renderTextWithLetterSpacing(text2, styles2.letterSpacing, baseline);
                  var textShadows = styles2.textShadow;
                  if (textShadows.length && text2.text.trim().length) {
                    textShadows.slice(0).reverse().forEach(function(textShadow2) {
                      _this.ctx.shadowColor = asString(textShadow2.color);
                      _this.ctx.shadowOffsetX = textShadow2.offsetX.number * _this.options.scale;
                      _this.ctx.shadowOffsetY = textShadow2.offsetY.number * _this.options.scale;
                      _this.ctx.shadowBlur = textShadow2.blur.number;
                      _this.renderTextWithLetterSpacing(text2, styles2.letterSpacing, baseline);
                    });
                    _this.ctx.shadowColor = "";
                    _this.ctx.shadowOffsetX = 0;
                    _this.ctx.shadowOffsetY = 0;
                    _this.ctx.shadowBlur = 0;
                  }
                  if (styles2.textDecorationLine.length) {
                    _this.ctx.fillStyle = asString(styles2.textDecorationColor || styles2.color);
                    styles2.textDecorationLine.forEach(function(textDecorationLine2) {
                      switch (textDecorationLine2) {
                        case 1:
                          _this.ctx.fillRect(text2.bounds.left, Math.round(text2.bounds.top + baseline), text2.bounds.width, 1);
                          break;
                        case 2:
                          _this.ctx.fillRect(text2.bounds.left, Math.round(text2.bounds.top), text2.bounds.width, 1);
                          break;
                        case 3:
                          _this.ctx.fillRect(text2.bounds.left, Math.ceil(text2.bounds.top + middle), text2.bounds.width, 1);
                          break;
                      }
                    });
                  }
                  break;
                case 1:
                  if (styles2.webkitTextStrokeWidth && text2.text.trim().length) {
                    _this.ctx.strokeStyle = asString(styles2.webkitTextStrokeColor);
                    _this.ctx.lineWidth = styles2.webkitTextStrokeWidth;
                    _this.ctx.lineJoin = !!window.chrome ? "miter" : "round";
                    _this.ctx.strokeText(text2.text, text2.bounds.left, text2.bounds.top + baseline);
                  }
                  _this.ctx.strokeStyle = "";
                  _this.ctx.lineWidth = 0;
                  _this.ctx.lineJoin = "miter";
                  break;
              }
            });
          });
          return [
            2
            /*return*/
          ];
        });
      });
    };
    CanvasRenderer2.prototype.renderReplacedElement = function(container, curves, image2) {
      if (image2 && container.intrinsicWidth > 0 && container.intrinsicHeight > 0) {
        var box = contentBox(container);
        var path = calculatePaddingBoxPath(curves);
        this.path(path);
        this.ctx.save();
        this.ctx.clip();
        this.ctx.drawImage(image2, 0, 0, container.intrinsicWidth, container.intrinsicHeight, box.left, box.top, box.width, box.height);
        this.ctx.restore();
      }
    };
    CanvasRenderer2.prototype.renderNodeContent = function(paint) {
      return __awaiter$1(this, void 0, void 0, function() {
        var container, curves, styles2, _i, _a2, child, image2, image2, iframeRenderer, canvas, size, _b, fontFamily2, fontSize2, baseline, bounds, x, textBounds, img, image2, url, fontFamily2, bounds;
        return __generator(this, function(_c) {
          switch (_c.label) {
            case 0:
              this.applyEffects(paint.getEffects(
                4
                /* CONTENT */
              ));
              container = paint.container;
              curves = paint.curves;
              styles2 = container.styles;
              _i = 0, _a2 = container.textNodes;
              _c.label = 1;
            case 1:
              if (!(_i < _a2.length)) return [3, 4];
              child = _a2[_i];
              return [4, this.renderTextNode(child, styles2)];
            case 2:
              _c.sent();
              _c.label = 3;
            case 3:
              _i++;
              return [3, 1];
            case 4:
              if (!(container instanceof ImageElementContainer)) return [3, 8];
              _c.label = 5;
            case 5:
              _c.trys.push([5, 7, , 8]);
              return [4, this.context.cache.match(container.src)];
            case 6:
              image2 = _c.sent();
              this.renderReplacedElement(container, curves, image2);
              return [3, 8];
            case 7:
              _c.sent();
              this.context.logger.error("Error loading image " + container.src);
              return [3, 8];
            case 8:
              if (container instanceof CanvasElementContainer) {
                this.renderReplacedElement(container, curves, container.canvas);
              }
              if (!(container instanceof SVGElementContainer)) return [3, 12];
              _c.label = 9;
            case 9:
              _c.trys.push([9, 11, , 12]);
              return [4, this.context.cache.match(container.svg)];
            case 10:
              image2 = _c.sent();
              this.renderReplacedElement(container, curves, image2);
              return [3, 12];
            case 11:
              _c.sent();
              this.context.logger.error("Error loading svg " + container.svg.substring(0, 255));
              return [3, 12];
            case 12:
              if (!(container instanceof IFrameElementContainer && container.tree)) return [3, 14];
              iframeRenderer = new CanvasRenderer2(this.context, {
                scale: this.options.scale,
                backgroundColor: container.backgroundColor,
                x: 0,
                y: 0,
                width: container.width,
                height: container.height
              });
              return [4, iframeRenderer.render(container.tree)];
            case 13:
              canvas = _c.sent();
              if (container.width && container.height) {
                this.ctx.drawImage(canvas, 0, 0, container.width, container.height, container.bounds.left, container.bounds.top, container.bounds.width, container.bounds.height);
              }
              _c.label = 14;
            case 14:
              if (container instanceof InputElementContainer) {
                size = Math.min(container.bounds.width, container.bounds.height);
                if (container.type === CHECKBOX) {
                  if (container.checked) {
                    this.ctx.save();
                    this.path([
                      new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79),
                      new Vector(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549),
                      new Vector(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071),
                      new Vector(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649),
                      new Vector(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23),
                      new Vector(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085),
                      new Vector(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79)
                    ]);
                    this.ctx.fillStyle = asString(INPUT_COLOR);
                    this.ctx.fill();
                    this.ctx.restore();
                  }
                } else if (container.type === RADIO) {
                  if (container.checked) {
                    this.ctx.save();
                    this.ctx.beginPath();
                    this.ctx.arc(container.bounds.left + size / 2, container.bounds.top + size / 2, size / 4, 0, Math.PI * 2, true);
                    this.ctx.fillStyle = asString(INPUT_COLOR);
                    this.ctx.fill();
                    this.ctx.restore();
                  }
                }
              }
              if (isTextInputElement(container) && container.value.length) {
                _b = this.createFontStyle(styles2), fontFamily2 = _b[0], fontSize2 = _b[1];
                baseline = this.fontMetrics.getMetrics(fontFamily2, fontSize2).baseline;
                this.ctx.font = fontFamily2;
                this.ctx.fillStyle = asString(styles2.color);
                this.ctx.textBaseline = "alphabetic";
                this.ctx.textAlign = canvasTextAlign(container.styles.textAlign);
                bounds = contentBox(container);
                x = 0;
                switch (container.styles.textAlign) {
                  case 1:
                    x += bounds.width / 2;
                    break;
                  case 2:
                    x += bounds.width;
                    break;
                }
                textBounds = bounds.add(x, 0, 0, -bounds.height / 2 + 1);
                this.ctx.save();
                this.path([
                  new Vector(bounds.left, bounds.top),
                  new Vector(bounds.left + bounds.width, bounds.top),
                  new Vector(bounds.left + bounds.width, bounds.top + bounds.height),
                  new Vector(bounds.left, bounds.top + bounds.height)
                ]);
                this.ctx.clip();
                this.renderTextWithLetterSpacing(new TextBounds(container.value, textBounds), styles2.letterSpacing, baseline);
                this.ctx.restore();
                this.ctx.textBaseline = "alphabetic";
                this.ctx.textAlign = "left";
              }
              if (!contains(
                container.styles.display,
                2048
                /* LIST_ITEM */
              )) return [3, 20];
              if (!(container.styles.listStyleImage !== null)) return [3, 19];
              img = container.styles.listStyleImage;
              if (!(img.type === 0)) return [3, 18];
              image2 = void 0;
              url = img.url;
              _c.label = 15;
            case 15:
              _c.trys.push([15, 17, , 18]);
              return [4, this.context.cache.match(url)];
            case 16:
              image2 = _c.sent();
              this.ctx.drawImage(image2, container.bounds.left - (image2.width + 10), container.bounds.top);
              return [3, 18];
            case 17:
              _c.sent();
              this.context.logger.error("Error loading list-style-image " + url);
              return [3, 18];
            case 18:
              return [3, 20];
            case 19:
              if (paint.listValue && container.styles.listStyleType !== -1) {
                fontFamily2 = this.createFontStyle(styles2)[0];
                this.ctx.font = fontFamily2;
                this.ctx.fillStyle = asString(styles2.color);
                this.ctx.textBaseline = "middle";
                this.ctx.textAlign = "right";
                bounds = new Bounds(container.bounds.left, container.bounds.top + getAbsoluteValue(container.styles.paddingTop, container.bounds.width), container.bounds.width, computeLineHeight(styles2.lineHeight, styles2.fontSize.number) / 2 + 1);
                this.renderTextWithLetterSpacing(new TextBounds(paint.listValue, bounds), styles2.letterSpacing, computeLineHeight(styles2.lineHeight, styles2.fontSize.number) / 2 + 2);
                this.ctx.textBaseline = "bottom";
                this.ctx.textAlign = "left";
              }
              _c.label = 20;
            case 20:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    CanvasRenderer2.prototype.renderStackContent = function(stack) {
      return __awaiter$1(this, void 0, void 0, function() {
        var _i, _a2, child, _b, _c, child, _d, _e, child, _f, _g, child, _h, _j, child, _k, _l, child, _m, _o, child;
        return __generator(this, function(_p) {
          switch (_p.label) {
            case 0:
              if (contains(
                stack.element.container.flags,
                16
                /* DEBUG_RENDER */
              )) {
                debugger;
              }
              return [4, this.renderNodeBackgroundAndBorders(stack.element)];
            case 1:
              _p.sent();
              _i = 0, _a2 = stack.negativeZIndex;
              _p.label = 2;
            case 2:
              if (!(_i < _a2.length)) return [3, 5];
              child = _a2[_i];
              return [4, this.renderStack(child)];
            case 3:
              _p.sent();
              _p.label = 4;
            case 4:
              _i++;
              return [3, 2];
            case 5:
              return [4, this.renderNodeContent(stack.element)];
            case 6:
              _p.sent();
              _b = 0, _c = stack.nonInlineLevel;
              _p.label = 7;
            case 7:
              if (!(_b < _c.length)) return [3, 10];
              child = _c[_b];
              return [4, this.renderNode(child)];
            case 8:
              _p.sent();
              _p.label = 9;
            case 9:
              _b++;
              return [3, 7];
            case 10:
              _d = 0, _e = stack.nonPositionedFloats;
              _p.label = 11;
            case 11:
              if (!(_d < _e.length)) return [3, 14];
              child = _e[_d];
              return [4, this.renderStack(child)];
            case 12:
              _p.sent();
              _p.label = 13;
            case 13:
              _d++;
              return [3, 11];
            case 14:
              _f = 0, _g = stack.nonPositionedInlineLevel;
              _p.label = 15;
            case 15:
              if (!(_f < _g.length)) return [3, 18];
              child = _g[_f];
              return [4, this.renderStack(child)];
            case 16:
              _p.sent();
              _p.label = 17;
            case 17:
              _f++;
              return [3, 15];
            case 18:
              _h = 0, _j = stack.inlineLevel;
              _p.label = 19;
            case 19:
              if (!(_h < _j.length)) return [3, 22];
              child = _j[_h];
              return [4, this.renderNode(child)];
            case 20:
              _p.sent();
              _p.label = 21;
            case 21:
              _h++;
              return [3, 19];
            case 22:
              _k = 0, _l = stack.zeroOrAutoZIndexOrTransformedOrOpacity;
              _p.label = 23;
            case 23:
              if (!(_k < _l.length)) return [3, 26];
              child = _l[_k];
              return [4, this.renderStack(child)];
            case 24:
              _p.sent();
              _p.label = 25;
            case 25:
              _k++;
              return [3, 23];
            case 26:
              _m = 0, _o = stack.positiveZIndex;
              _p.label = 27;
            case 27:
              if (!(_m < _o.length)) return [3, 30];
              child = _o[_m];
              return [4, this.renderStack(child)];
            case 28:
              _p.sent();
              _p.label = 29;
            case 29:
              _m++;
              return [3, 27];
            case 30:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    CanvasRenderer2.prototype.mask = function(paths) {
      this.ctx.beginPath();
      this.ctx.moveTo(0, 0);
      this.ctx.lineTo(this.canvas.width, 0);
      this.ctx.lineTo(this.canvas.width, this.canvas.height);
      this.ctx.lineTo(0, this.canvas.height);
      this.ctx.lineTo(0, 0);
      this.formatPath(paths.slice(0).reverse());
      this.ctx.closePath();
    };
    CanvasRenderer2.prototype.path = function(paths) {
      this.ctx.beginPath();
      this.formatPath(paths);
      this.ctx.closePath();
    };
    CanvasRenderer2.prototype.formatPath = function(paths) {
      var _this = this;
      paths.forEach(function(point, index2) {
        var start2 = isBezierCurve(point) ? point.start : point;
        if (index2 === 0) {
          _this.ctx.moveTo(start2.x, start2.y);
        } else {
          _this.ctx.lineTo(start2.x, start2.y);
        }
        if (isBezierCurve(point)) {
          _this.ctx.bezierCurveTo(point.startControl.x, point.startControl.y, point.endControl.x, point.endControl.y, point.end.x, point.end.y);
        }
      });
    };
    CanvasRenderer2.prototype.renderRepeat = function(path, pattern, offsetX, offsetY) {
      this.path(path);
      this.ctx.fillStyle = pattern;
      this.ctx.translate(offsetX, offsetY);
      this.ctx.fill();
      this.ctx.translate(-offsetX, -offsetY);
    };
    CanvasRenderer2.prototype.resizeImage = function(image2, width2, height2) {
      var _a2;
      if (image2.width === width2 && image2.height === height2) {
        return image2;
      }
      var ownerDocument2 = (_a2 = this.canvas.ownerDocument) !== null && _a2 !== void 0 ? _a2 : document;
      var canvas = ownerDocument2.createElement("canvas");
      canvas.width = Math.max(1, width2);
      canvas.height = Math.max(1, height2);
      var ctx = canvas.getContext("2d");
      ctx.drawImage(image2, 0, 0, image2.width, image2.height, 0, 0, width2, height2);
      return canvas;
    };
    CanvasRenderer2.prototype.renderBackgroundImage = function(container) {
      return __awaiter$1(this, void 0, void 0, function() {
        var index2, _loop_1, this_1, _i, _a2, backgroundImage2;
        return __generator(this, function(_b) {
          switch (_b.label) {
            case 0:
              index2 = container.styles.backgroundImage.length - 1;
              _loop_1 = function(backgroundImage3) {
                var image2, url, _c, path, x, y2, width2, height2, pattern, _d, path, x, y2, width2, height2, _e, lineLength, x0, x1, y0, y1, canvas, ctx, gradient_1, pattern, _f, path, left2, top_1, width2, height2, position2, x, y2, _g, rx, ry, radialGradient_1, midX, midY, f2, invF;
                return __generator(this, function(_h) {
                  switch (_h.label) {
                    case 0:
                      if (!(backgroundImage3.type === 0)) return [3, 5];
                      image2 = void 0;
                      url = backgroundImage3.url;
                      _h.label = 1;
                    case 1:
                      _h.trys.push([1, 3, , 4]);
                      return [4, this_1.context.cache.match(url)];
                    case 2:
                      image2 = _h.sent();
                      return [3, 4];
                    case 3:
                      _h.sent();
                      this_1.context.logger.error("Error loading background-image " + url);
                      return [3, 4];
                    case 4:
                      if (image2) {
                        _c = calculateBackgroundRendering(container, index2, [
                          image2.width,
                          image2.height,
                          image2.width / image2.height
                        ]), path = _c[0], x = _c[1], y2 = _c[2], width2 = _c[3], height2 = _c[4];
                        pattern = this_1.ctx.createPattern(this_1.resizeImage(image2, width2, height2), "repeat");
                        this_1.renderRepeat(path, pattern, x, y2);
                      }
                      return [3, 6];
                    case 5:
                      if (isLinearGradient(backgroundImage3)) {
                        _d = calculateBackgroundRendering(container, index2, [null, null, null]), path = _d[0], x = _d[1], y2 = _d[2], width2 = _d[3], height2 = _d[4];
                        _e = calculateGradientDirection(backgroundImage3.angle, width2, height2), lineLength = _e[0], x0 = _e[1], x1 = _e[2], y0 = _e[3], y1 = _e[4];
                        canvas = document.createElement("canvas");
                        canvas.width = width2;
                        canvas.height = height2;
                        ctx = canvas.getContext("2d");
                        gradient_1 = ctx.createLinearGradient(x0, y0, x1, y1);
                        processColorStops(backgroundImage3.stops, lineLength).forEach(function(colorStop) {
                          return gradient_1.addColorStop(colorStop.stop, asString(colorStop.color));
                        });
                        ctx.fillStyle = gradient_1;
                        ctx.fillRect(0, 0, width2, height2);
                        if (width2 > 0 && height2 > 0) {
                          pattern = this_1.ctx.createPattern(canvas, "repeat");
                          this_1.renderRepeat(path, pattern, x, y2);
                        }
                      } else if (isRadialGradient(backgroundImage3)) {
                        _f = calculateBackgroundRendering(container, index2, [
                          null,
                          null,
                          null
                        ]), path = _f[0], left2 = _f[1], top_1 = _f[2], width2 = _f[3], height2 = _f[4];
                        position2 = backgroundImage3.position.length === 0 ? [FIFTY_PERCENT] : backgroundImage3.position;
                        x = getAbsoluteValue(position2[0], width2);
                        y2 = getAbsoluteValue(position2[position2.length - 1], height2);
                        _g = calculateRadius(backgroundImage3, x, y2, width2, height2), rx = _g[0], ry = _g[1];
                        if (rx > 0 && ry > 0) {
                          radialGradient_1 = this_1.ctx.createRadialGradient(left2 + x, top_1 + y2, 0, left2 + x, top_1 + y2, rx);
                          processColorStops(backgroundImage3.stops, rx * 2).forEach(function(colorStop) {
                            return radialGradient_1.addColorStop(colorStop.stop, asString(colorStop.color));
                          });
                          this_1.path(path);
                          this_1.ctx.fillStyle = radialGradient_1;
                          if (rx !== ry) {
                            midX = container.bounds.left + 0.5 * container.bounds.width;
                            midY = container.bounds.top + 0.5 * container.bounds.height;
                            f2 = ry / rx;
                            invF = 1 / f2;
                            this_1.ctx.save();
                            this_1.ctx.translate(midX, midY);
                            this_1.ctx.transform(1, 0, 0, f2, 0, 0);
                            this_1.ctx.translate(-midX, -midY);
                            this_1.ctx.fillRect(left2, invF * (top_1 - midY) + midY, width2, height2 * invF);
                            this_1.ctx.restore();
                          } else {
                            this_1.ctx.fill();
                          }
                        }
                      }
                      _h.label = 6;
                    case 6:
                      index2--;
                      return [
                        2
                        /*return*/
                      ];
                  }
                });
              };
              this_1 = this;
              _i = 0, _a2 = container.styles.backgroundImage.slice(0).reverse();
              _b.label = 1;
            case 1:
              if (!(_i < _a2.length)) return [3, 4];
              backgroundImage2 = _a2[_i];
              return [5, _loop_1(backgroundImage2)];
            case 2:
              _b.sent();
              _b.label = 3;
            case 3:
              _i++;
              return [3, 1];
            case 4:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    CanvasRenderer2.prototype.renderSolidBorder = function(color2, side, curvePoints) {
      return __awaiter$1(this, void 0, void 0, function() {
        return __generator(this, function(_a2) {
          this.path(parsePathForBorder(curvePoints, side));
          this.ctx.fillStyle = asString(color2);
          this.ctx.fill();
          return [
            2
            /*return*/
          ];
        });
      });
    };
    CanvasRenderer2.prototype.renderDoubleBorder = function(color2, width2, side, curvePoints) {
      return __awaiter$1(this, void 0, void 0, function() {
        var outerPaths, innerPaths;
        return __generator(this, function(_a2) {
          switch (_a2.label) {
            case 0:
              if (!(width2 < 3)) return [3, 2];
              return [4, this.renderSolidBorder(color2, side, curvePoints)];
            case 1:
              _a2.sent();
              return [
                2
                /*return*/
              ];
            case 2:
              outerPaths = parsePathForBorderDoubleOuter(curvePoints, side);
              this.path(outerPaths);
              this.ctx.fillStyle = asString(color2);
              this.ctx.fill();
              innerPaths = parsePathForBorderDoubleInner(curvePoints, side);
              this.path(innerPaths);
              this.ctx.fill();
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    CanvasRenderer2.prototype.renderNodeBackgroundAndBorders = function(paint) {
      return __awaiter$1(this, void 0, void 0, function() {
        var styles2, hasBackground, borders, backgroundPaintingArea, side, _i, borders_1, border2;
        var _this = this;
        return __generator(this, function(_a2) {
          switch (_a2.label) {
            case 0:
              this.applyEffects(paint.getEffects(
                2
                /* BACKGROUND_BORDERS */
              ));
              styles2 = paint.container.styles;
              hasBackground = !isTransparent(styles2.backgroundColor) || styles2.backgroundImage.length;
              borders = [
                { style: styles2.borderTopStyle, color: styles2.borderTopColor, width: styles2.borderTopWidth },
                { style: styles2.borderRightStyle, color: styles2.borderRightColor, width: styles2.borderRightWidth },
                { style: styles2.borderBottomStyle, color: styles2.borderBottomColor, width: styles2.borderBottomWidth },
                { style: styles2.borderLeftStyle, color: styles2.borderLeftColor, width: styles2.borderLeftWidth }
              ];
              backgroundPaintingArea = calculateBackgroundCurvedPaintingArea(getBackgroundValueForIndex(styles2.backgroundClip, 0), paint.curves);
              if (!(hasBackground || styles2.boxShadow.length)) return [3, 2];
              this.ctx.save();
              this.path(backgroundPaintingArea);
              this.ctx.clip();
              if (!isTransparent(styles2.backgroundColor)) {
                this.ctx.fillStyle = asString(styles2.backgroundColor);
                this.ctx.fill();
              }
              return [4, this.renderBackgroundImage(paint.container)];
            case 1:
              _a2.sent();
              this.ctx.restore();
              styles2.boxShadow.slice(0).reverse().forEach(function(shadow) {
                _this.ctx.save();
                var borderBoxArea = calculateBorderBoxPath(paint.curves);
                var maskOffset = shadow.inset ? 0 : MASK_OFFSET;
                var shadowPaintingArea = transformPath(borderBoxArea, -maskOffset + (shadow.inset ? 1 : -1) * shadow.spread.number, (shadow.inset ? 1 : -1) * shadow.spread.number, shadow.spread.number * (shadow.inset ? -2 : 2), shadow.spread.number * (shadow.inset ? -2 : 2));
                if (shadow.inset) {
                  _this.path(borderBoxArea);
                  _this.ctx.clip();
                  _this.mask(shadowPaintingArea);
                } else {
                  _this.mask(borderBoxArea);
                  _this.ctx.clip();
                  _this.path(shadowPaintingArea);
                }
                _this.ctx.shadowOffsetX = shadow.offsetX.number + maskOffset;
                _this.ctx.shadowOffsetY = shadow.offsetY.number;
                _this.ctx.shadowColor = asString(shadow.color);
                _this.ctx.shadowBlur = shadow.blur.number;
                _this.ctx.fillStyle = shadow.inset ? asString(shadow.color) : "rgba(0,0,0,1)";
                _this.ctx.fill();
                _this.ctx.restore();
              });
              _a2.label = 2;
            case 2:
              side = 0;
              _i = 0, borders_1 = borders;
              _a2.label = 3;
            case 3:
              if (!(_i < borders_1.length)) return [3, 13];
              border2 = borders_1[_i];
              if (!(border2.style !== 0 && !isTransparent(border2.color) && border2.width > 0)) return [3, 11];
              if (!(border2.style === 2)) return [3, 5];
              return [4, this.renderDashedDottedBorder(
                border2.color,
                border2.width,
                side,
                paint.curves,
                2
                /* DASHED */
              )];
            case 4:
              _a2.sent();
              return [3, 11];
            case 5:
              if (!(border2.style === 3)) return [3, 7];
              return [4, this.renderDashedDottedBorder(
                border2.color,
                border2.width,
                side,
                paint.curves,
                3
                /* DOTTED */
              )];
            case 6:
              _a2.sent();
              return [3, 11];
            case 7:
              if (!(border2.style === 4)) return [3, 9];
              return [4, this.renderDoubleBorder(border2.color, border2.width, side, paint.curves)];
            case 8:
              _a2.sent();
              return [3, 11];
            case 9:
              return [4, this.renderSolidBorder(border2.color, side, paint.curves)];
            case 10:
              _a2.sent();
              _a2.label = 11;
            case 11:
              side++;
              _a2.label = 12;
            case 12:
              _i++;
              return [3, 3];
            case 13:
              return [
                2
                /*return*/
              ];
          }
        });
      });
    };
    CanvasRenderer2.prototype.renderDashedDottedBorder = function(color2, width2, side, curvePoints, style2) {
      return __awaiter$1(this, void 0, void 0, function() {
        var strokePaths, boxPaths, startX, startY, endX, endY, length2, dashLength, spaceLength, useLineDash, multiplier, numberOfDashes, minSpace, maxSpace, path1, path2, path1, path2;
        return __generator(this, function(_a2) {
          this.ctx.save();
          strokePaths = parsePathForBorderStroke(curvePoints, side);
          boxPaths = parsePathForBorder(curvePoints, side);
          if (style2 === 2) {
            this.path(boxPaths);
            this.ctx.clip();
          }
          if (isBezierCurve(boxPaths[0])) {
            startX = boxPaths[0].start.x;
            startY = boxPaths[0].start.y;
          } else {
            startX = boxPaths[0].x;
            startY = boxPaths[0].y;
          }
          if (isBezierCurve(boxPaths[1])) {
            endX = boxPaths[1].end.x;
            endY = boxPaths[1].end.y;
          } else {
            endX = boxPaths[1].x;
            endY = boxPaths[1].y;
          }
          if (side === 0 || side === 2) {
            length2 = Math.abs(startX - endX);
          } else {
            length2 = Math.abs(startY - endY);
          }
          this.ctx.beginPath();
          if (style2 === 3) {
            this.formatPath(strokePaths);
          } else {
            this.formatPath(boxPaths.slice(0, 2));
          }
          dashLength = width2 < 3 ? width2 * 3 : width2 * 2;
          spaceLength = width2 < 3 ? width2 * 2 : width2;
          if (style2 === 3) {
            dashLength = width2;
            spaceLength = width2;
          }
          useLineDash = true;
          if (length2 <= dashLength * 2) {
            useLineDash = false;
          } else if (length2 <= dashLength * 2 + spaceLength) {
            multiplier = length2 / (2 * dashLength + spaceLength);
            dashLength *= multiplier;
            spaceLength *= multiplier;
          } else {
            numberOfDashes = Math.floor((length2 + spaceLength) / (dashLength + spaceLength));
            minSpace = (length2 - numberOfDashes * dashLength) / (numberOfDashes - 1);
            maxSpace = (length2 - (numberOfDashes + 1) * dashLength) / numberOfDashes;
            spaceLength = maxSpace <= 0 || Math.abs(spaceLength - minSpace) < Math.abs(spaceLength - maxSpace) ? minSpace : maxSpace;
          }
          if (useLineDash) {
            if (style2 === 3) {
              this.ctx.setLineDash([0, dashLength + spaceLength]);
            } else {
              this.ctx.setLineDash([dashLength, spaceLength]);
            }
          }
          if (style2 === 3) {
            this.ctx.lineCap = "round";
            this.ctx.lineWidth = width2;
          } else {
            this.ctx.lineWidth = width2 * 2 + 1.1;
          }
          this.ctx.strokeStyle = asString(color2);
          this.ctx.stroke();
          this.ctx.setLineDash([]);
          if (style2 === 2) {
            if (isBezierCurve(boxPaths[0])) {
              path1 = boxPaths[3];
              path2 = boxPaths[0];
              this.ctx.beginPath();
              this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]);
              this.ctx.stroke();
            }
            if (isBezierCurve(boxPaths[1])) {
              path1 = boxPaths[1];
              path2 = boxPaths[2];
              this.ctx.beginPath();
              this.formatPath([new Vector(path1.end.x, path1.end.y), new Vector(path2.start.x, path2.start.y)]);
              this.ctx.stroke();
            }
          }
          this.ctx.restore();
          return [
            2
            /*return*/
          ];
        });
      });
    };
    CanvasRenderer2.prototype.render = function(element) {
      return __awaiter$1(this, void 0, void 0, function() {
        var stack;
        return __generator(this, function(_a2) {
          switch (_a2.label) {
            case 0:
              if (this.options.backgroundColor) {
                this.ctx.fillStyle = asString(this.options.backgroundColor);
                this.ctx.fillRect(this.options.x, this.options.y, this.options.width, this.options.height);
              }
              stack = parseStackingContexts(element);
              return [4, this.renderStack(stack)];
            case 1:
              _a2.sent();
              this.applyEffects([]);
              return [2, this.canvas];
          }
        });
      });
    };
    return CanvasRenderer2;
  }(Renderer)
);
var isTextInputElement = function(container) {
  if (container instanceof TextareaElementContainer) {
    return true;
  } else if (container instanceof SelectElementContainer) {
    return true;
  } else if (container instanceof InputElementContainer && container.type !== RADIO && container.type !== CHECKBOX) {
    return true;
  }
  return false;
};
var calculateBackgroundCurvedPaintingArea = function(clip, curves) {
  switch (clip) {
    case 0:
      return calculateBorderBoxPath(curves);
    case 2:
      return calculateContentBoxPath(curves);
    case 1:
    default:
      return calculatePaddingBoxPath(curves);
  }
};
var canvasTextAlign = function(textAlign2) {
  switch (textAlign2) {
    case 1:
      return "center";
    case 2:
      return "right";
    case 0:
    default:
      return "left";
  }
};
var iOSBrokenFonts = ["-apple-system", "system-ui"];
var fixIOSSystemFonts = function(fontFamilies) {
  return /iPhone OS 15_(0|1)/.test(window.navigator.userAgent) ? fontFamilies.filter(function(fontFamily2) {
    return iOSBrokenFonts.indexOf(fontFamily2) === -1;
  }) : fontFamilies;
};
var ForeignObjectRenderer = (
  /** @class */
  function(_super) {
    __extends(ForeignObjectRenderer2, _super);
    function ForeignObjectRenderer2(context, options) {
      var _this = _super.call(this, context, options) || this;
      _this.canvas = options.canvas ? options.canvas : document.createElement("canvas");
      _this.ctx = _this.canvas.getContext("2d");
      _this.options = options;
      _this.canvas.width = Math.floor(options.width * options.scale);
      _this.canvas.height = Math.floor(options.height * options.scale);
      _this.canvas.style.width = options.width + "px";
      _this.canvas.style.height = options.height + "px";
      _this.ctx.scale(_this.options.scale, _this.options.scale);
      _this.ctx.translate(-options.x, -options.y);
      _this.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized (" + options.width + "x" + options.height + " at " + options.x + "," + options.y + ") with scale " + options.scale);
      return _this;
    }
    ForeignObjectRenderer2.prototype.render = function(element) {
      return __awaiter$1(this, void 0, void 0, function() {
        var svg, img;
        return __generator(this, function(_a2) {
          switch (_a2.label) {
            case 0:
              svg = createForeignObjectSVG(this.options.width * this.options.scale, this.options.height * this.options.scale, this.options.scale, this.options.scale, element);
              return [4, loadSerializedSVG(svg)];
            case 1:
              img = _a2.sent();
              if (this.options.backgroundColor) {
                this.ctx.fillStyle = asString(this.options.backgroundColor);
                this.ctx.fillRect(0, 0, this.options.width * this.options.scale, this.options.height * this.options.scale);
              }
              this.ctx.drawImage(img, -this.options.x * this.options.scale, -this.options.y * this.options.scale);
              return [2, this.canvas];
          }
        });
      });
    };
    return ForeignObjectRenderer2;
  }(Renderer)
);
var loadSerializedSVG = function(svg) {
  return new Promise(function(resolve, reject) {
    var img = new Image();
    img.onload = function() {
      resolve(img);
    };
    img.onerror = reject;
    img.src = "data:image/svg+xml;charset=utf-8," + encodeURIComponent(new XMLSerializer().serializeToString(svg));
  });
};
var Logger = (
  /** @class */
  function() {
    function Logger2(_a2) {
      var id = _a2.id, enabled = _a2.enabled;
      this.id = id;
      this.enabled = enabled;
      this.start = Date.now();
    }
    Logger2.prototype.debug = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      if (this.enabled) {
        if (typeof window !== "undefined" && window.console && typeof console.debug === "function") {
          console.debug.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
        } else {
          this.info.apply(this, args);
        }
      }
    };
    Logger2.prototype.getTime = function() {
      return Date.now() - this.start;
    };
    Logger2.prototype.info = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      if (this.enabled) {
        if (typeof window !== "undefined" && window.console && typeof console.info === "function") {
          console.info.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
        }
      }
    };
    Logger2.prototype.warn = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      if (this.enabled) {
        if (typeof window !== "undefined" && window.console && typeof console.warn === "function") {
          console.warn.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
        } else {
          this.info.apply(this, args);
        }
      }
    };
    Logger2.prototype.error = function() {
      var args = [];
      for (var _i = 0; _i < arguments.length; _i++) {
        args[_i] = arguments[_i];
      }
      if (this.enabled) {
        if (typeof window !== "undefined" && window.console && typeof console.error === "function") {
          console.error.apply(console, __spreadArray([this.id, this.getTime() + "ms"], args));
        } else {
          this.info.apply(this, args);
        }
      }
    };
    Logger2.instances = {};
    return Logger2;
  }()
);
var Context = (
  /** @class */
  function() {
    function Context2(options, windowBounds) {
      var _a2;
      this.windowBounds = windowBounds;
      this.instanceName = "#" + Context2.instanceCount++;
      this.logger = new Logger({ id: this.instanceName, enabled: options.logging });
      this.cache = (_a2 = options.cache) !== null && _a2 !== void 0 ? _a2 : new Cache(this, options);
    }
    Context2.instanceCount = 1;
    return Context2;
  }()
);
var html2canvas = function(element, options) {
  if (options === void 0) {
    options = {};
  }
  return renderElement(element, options);
};
if (typeof window !== "undefined") {
  CacheStorage.setContext(window);
}
var renderElement = function(element, opts) {
  return __awaiter$1(void 0, void 0, void 0, function() {
    var ownerDocument2, defaultView, resourceOptions, contextOptions, windowOptions, windowBounds, context, foreignObjectRendering, cloneOptions, documentCloner, clonedElement, container, _a2, width2, height2, left2, top2, backgroundColor2, renderOptions, canvas, renderer, root, renderer;
    var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t7;
    return __generator(this, function(_u) {
      switch (_u.label) {
        case 0:
          if (!element || typeof element !== "object") {
            return [2, Promise.reject("Invalid element provided as first argument")];
          }
          ownerDocument2 = element.ownerDocument;
          if (!ownerDocument2) {
            throw new Error("Element is not attached to a Document");
          }
          defaultView = ownerDocument2.defaultView;
          if (!defaultView) {
            throw new Error("Document is not attached to a Window");
          }
          resourceOptions = {
            allowTaint: (_b = opts.allowTaint) !== null && _b !== void 0 ? _b : false,
            imageTimeout: (_c = opts.imageTimeout) !== null && _c !== void 0 ? _c : 15e3,
            proxy: opts.proxy,
            useCORS: (_d = opts.useCORS) !== null && _d !== void 0 ? _d : false
          };
          contextOptions = __assign({ logging: (_e = opts.logging) !== null && _e !== void 0 ? _e : true, cache: opts.cache }, resourceOptions);
          windowOptions = {
            windowWidth: (_f = opts.windowWidth) !== null && _f !== void 0 ? _f : defaultView.innerWidth,
            windowHeight: (_g = opts.windowHeight) !== null && _g !== void 0 ? _g : defaultView.innerHeight,
            scrollX: (_h = opts.scrollX) !== null && _h !== void 0 ? _h : defaultView.pageXOffset,
            scrollY: (_j = opts.scrollY) !== null && _j !== void 0 ? _j : defaultView.pageYOffset
          };
          windowBounds = new Bounds(windowOptions.scrollX, windowOptions.scrollY, windowOptions.windowWidth, windowOptions.windowHeight);
          context = new Context(contextOptions, windowBounds);
          foreignObjectRendering = (_k = opts.foreignObjectRendering) !== null && _k !== void 0 ? _k : false;
          cloneOptions = {
            allowTaint: (_l = opts.allowTaint) !== null && _l !== void 0 ? _l : false,
            onclone: opts.onclone,
            ignoreElements: opts.ignoreElements,
            inlineImages: foreignObjectRendering,
            copyStyles: foreignObjectRendering
          };
          context.logger.debug("Starting document clone with size " + windowBounds.width + "x" + windowBounds.height + " scrolled to " + -windowBounds.left + "," + -windowBounds.top);
          documentCloner = new DocumentCloner(context, element, cloneOptions);
          clonedElement = documentCloner.clonedReferenceElement;
          if (!clonedElement) {
            return [2, Promise.reject("Unable to find element in cloned iframe")];
          }
          return [4, documentCloner.toIFrame(ownerDocument2, windowBounds)];
        case 1:
          container = _u.sent();
          _a2 = isBodyElement(clonedElement) || isHTMLElement(clonedElement) ? parseDocumentSize(clonedElement.ownerDocument) : parseBounds(context, clonedElement), width2 = _a2.width, height2 = _a2.height, left2 = _a2.left, top2 = _a2.top;
          backgroundColor2 = parseBackgroundColor(context, clonedElement, opts.backgroundColor);
          renderOptions = {
            canvas: opts.canvas,
            backgroundColor: backgroundColor2,
            scale: (_o = (_m = opts.scale) !== null && _m !== void 0 ? _m : defaultView.devicePixelRatio) !== null && _o !== void 0 ? _o : 1,
            x: ((_p = opts.x) !== null && _p !== void 0 ? _p : 0) + left2,
            y: ((_q = opts.y) !== null && _q !== void 0 ? _q : 0) + top2,
            width: (_r = opts.width) !== null && _r !== void 0 ? _r : Math.ceil(width2),
            height: (_s = opts.height) !== null && _s !== void 0 ? _s : Math.ceil(height2)
          };
          if (!foreignObjectRendering) return [3, 3];
          context.logger.debug("Document cloned, using foreign object rendering");
          renderer = new ForeignObjectRenderer(context, renderOptions);
          return [4, renderer.render(clonedElement)];
        case 2:
          canvas = _u.sent();
          return [3, 5];
        case 3:
          context.logger.debug("Document cloned, element located at " + left2 + "," + top2 + " with size " + width2 + "x" + height2 + " using computed rendering");
          context.logger.debug("Starting DOM parsing");
          root = parseTree(context, clonedElement);
          if (backgroundColor2 === root.styles.backgroundColor) {
            root.styles.backgroundColor = COLORS.TRANSPARENT;
          }
          context.logger.debug("Starting renderer for element at " + renderOptions.x + "," + renderOptions.y + " with size " + renderOptions.width + "x" + renderOptions.height);
          renderer = new CanvasRenderer(context, renderOptions);
          return [4, renderer.render(root)];
        case 4:
          canvas = _u.sent();
          _u.label = 5;
        case 5:
          if ((_t7 = opts.removeContainer) !== null && _t7 !== void 0 ? _t7 : true) {
            if (!DocumentCloner.destroy(container)) {
              context.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore");
            }
          }
          context.logger.debug("Finished rendering");
          return [2, canvas];
      }
    });
  });
};
var parseBackgroundColor = function(context, element, backgroundColorOverride) {
  var ownerDocument2 = element.ownerDocument;
  var documentBackgroundColor = ownerDocument2.documentElement ? parseColor(context, getComputedStyle(ownerDocument2.documentElement).backgroundColor) : COLORS.TRANSPARENT;
  var bodyBackgroundColor = ownerDocument2.body ? parseColor(context, getComputedStyle(ownerDocument2.body).backgroundColor) : COLORS.TRANSPARENT;
  var defaultBackgroundColor = typeof backgroundColorOverride === "string" ? parseColor(context, backgroundColorOverride) : backgroundColorOverride === null ? COLORS.TRANSPARENT : 4294967295;
  return element === ownerDocument2.documentElement ? isTransparent(documentBackgroundColor) ? isTransparent(bodyBackgroundColor) ? defaultBackgroundColor : bodyBackgroundColor : documentBackgroundColor : defaultBackgroundColor;
};
const periodValues = [
  { id: 0, title: "весь период" },
  { id: 1, title: "год" },
  { id: 2, title: "месяц" }
];
function TicketsListTableFilter({
  closedChecked,
  setClosedChecked,
  onlyMyChecked,
  setOnlyMyChecked,
  filterGridByDescription,
  period,
  setPeriod,
  handleSubmit
}) {
  const flatProps = {
    options: periodValues.map((option) => option.title)
  };
  const [descriptionInput, setDescriptionInput] = reactExports.useState("");
  const isAdmin = useAtomValue(isAdminAtom);
  const handleKeyDown2 = (event) => {
    if (event.key === "Enter") {
      event.preventDefault();
      filterGridByDescription(descriptionInput);
      setDescriptionInput(descriptionInput);
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("form", { onSubmit: handleSubmit, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid22,
    {
      container: true,
      direction: "row",
      justifyContent: "center",
      alignItems: "flex-start",
      spacing: 2,
      style: { width: "100%" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { xs: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormControl, { fullWidth: true, variant: "outlined", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          FormControlLabel,
          {
            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
              Checkbox,
              {
                checked: Boolean(closedChecked),
                onChange: (event) => setClosedChecked(Number(event.target.checked))
              }
            ),
            label: "Не закрытые"
          }
        ) }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { xs: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormControl, { fullWidth: true, variant: "outlined", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          FormControlLabel,
          {
            control: /* @__PURE__ */ jsxRuntimeExports.jsx(
              Checkbox,
              {
                checked: Boolean(onlyMyChecked),
                onChange: (event) => setOnlyMyChecked(Number(event.target.checked)),
                disabled: !isAdmin
              }
            ),
            label: "Только мои"
          }
        ) }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { xs: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { fullWidth: true, variant: "outlined", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { htmlFor: "findDescription", size: "small", children: "Искать в описании" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            OutlinedInput,
            {
              id: "findDescription",
              name: "findDescription",
              value: descriptionInput,
              label: "Искать в описании",
              style: { height: "42px" },
              onChange: (e2) => {
                setDescriptionInput(e2.target.value);
              },
              onKeyDown: handleKeyDown2
            }
          )
        ] }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { xs: 3, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormControl, { fullWidth: true, variant: "outlined", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Autocomplete,
          {
            disablePortal: true,
            ...flatProps,
            id: "period",
            value: period,
            onChange: (e2, newValue) => {
              if (newValue !== null) {
                setPeriod(newValue);
              }
            },
            renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsx(TextField, { ...params2, label: "Заявки за" })
          }
        ) }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { xs: 2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(FormControl, { fullWidth: true, variant: "outlined", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Button$2,
          {
            size: "large",
            variant: "outlined",
            style: { textTransform: "none", marginRight: "10px" },
            type: "submit",
            children: "Обновить"
          }
        ) }) })
      ]
    }
  ) }) });
}
async function getAttachedFiles(files) {
  const filesArray = Array.from(files);
  let result = {};
  let index2 = 0;
  for (const file of filesArray) {
    const rcdata = await getRcdata(file);
    const itemKey = `item${index2}`;
    const item = {
      [itemKey]: {
        ИмяФайла: file.name,
        RCDATA: rcdata
      }
    };
    result = { ...result, ...item };
    index2++;
  }
  return result;
}
function getRcdata(file) {
  return new Promise((resolve) => {
    const fileReader = new FileReader();
    fileReader.readAsDataURL(file);
    fileReader.onload = (event) => {
      var _a2;
      if ((_a2 = event.target) == null ? void 0 : _a2.result) {
        const rcdata = event.target.result.toString().split(",");
        resolve(rcdata[1]);
      }
    };
  });
}
function fetchGridData(filter2, recordsRef, afterLoad) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "config");
  params2.set("comand", "GetSupportInfo");
  params2.set("Active", filter2.onlyOpen);
  params2.set("User", filter2.onlyMy);
  params2.set("Date", filter2.period);
  params2.set("smart", "1");
  AxiosRequest(true, params2).then((res) => {
    if (!res.error) {
      const data = handleResponse(res);
      recordsRef.current = data;
      afterLoad();
    }
  });
}
function handleResponse(response) {
  const arrRecords = [];
  if (response) {
    Object.values(response).filter((item) => item.Номер != null).forEach((item, index2) => {
      arrRecords.push({
        ID: item.$tag,
        Index: index2,
        Time: item.Время,
        Number: item.Номер,
        Topic: item.Тема,
        Term: item.Срок,
        Status: item.Статус,
        Executor: item.Исполнитель,
        Solution: item.Решение,
        User: item.Пользователь,
        Description: item.Описание
      });
    });
  }
  return arrRecords;
}
function getPeriodValueByName(name) {
  const period = periodValues.find((value) => value.title === name);
  const periodId = period ? period.id : void 0;
  switch (periodId) {
    case 0:
      return "0";
    case 1: {
      const oneYearBeforeDate = dayjs().subtract(1, "year");
      return getIntOfStrDate(oneYearBeforeDate.format("YYYY-MM-DD")).toString();
    }
    case 2: {
      const oneMonthBeforeDate = dayjs().subtract(1, "month");
      return getIntOfStrDate(oneMonthBeforeDate.format("YYYY-MM-DD")).toString();
    }
    default:
      return void 0;
  }
}
function getCurrentDateTimeForScreenshot() {
  const currentDate = dayjs();
  return currentDate.format("YYYY.MM.DD_HH.mm.ss");
}
function filterGridDataByDescription(array, description) {
  if (!(description == null || description.trim() === "")) {
    return array.filter((record) => record.Description.toLowerCase().includes(description.toLowerCase()));
  }
  return array;
}
function FileUploadList({ files, setFiles, height: height2 }) {
  const shortenFileName = (fileName, maxLength = 23) => {
    if (fileName.length <= maxLength) return fileName;
    const extension = fileName.split(".").pop() || "";
    const nameWithoutExtension = fileName.slice(0, -(extension.length + 1));
    const shortenedName = nameWithoutExtension.slice(0, maxLength - extension.length - 4);
    return `${shortenedName}...${extension}`;
  };
  const takeScreenshot = () => {
    const element = document.getElementById("root");
    if (element) {
      html2canvas(element).then((canvas) => {
        canvas.toBlob((blob) => {
          if (blob) {
            const fileName = "Screen_" + getCurrentDateTimeForScreenshot() + ".jpg";
            const file = new File([blob], fileName, { type: "image/jpeg" });
            setFiles([...files, file]);
          }
        }, "image/jpeg");
      });
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { container: true, direction: "column", justifyContent: "center", alignItems: "flex-start", spacing: 1, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, xs: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { item: true, container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", spacing: 1, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Button$2,
        {
          component: "label",
          role: void 0,
          variant: "outlined",
          tabIndex: -1,
          size: "small",
          style: { textTransform: "none", marginRight: "10px" },
          children: [
            "Выбрать",
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "input",
              {
                type: "file",
                className: styles$2.visuallyHiddenInput,
                onChange: (event) => {
                  if (event.target.files) {
                    setFiles([...files, ...Array.from(event.target.files)]);
                  }
                },
                multiple: true
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          component: "label",
          role: void 0,
          variant: "outlined",
          tabIndex: -1,
          size: "small",
          style: { textTransform: "none", marginRight: "10px" },
          onClick: takeScreenshot,
          children: "Экран"
        }
      ) })
    ] }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, xs: 12, style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Box$1,
      {
        sx: {
          width: "100%",
          height: height2,
          borderRadius: 1,
          bgcolor: "rgba(220, 216, 204, 1)",
          overflowY: "auto"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(List, { children: files.map((file, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
          ListItem$1,
          {
            secondaryAction: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteFileButton, { deleteFile: () => setFiles(files.filter((f2) => file.name !== f2.name)) }),
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { primary: shortenFileName(file.name) })
          },
          index2
        )) })
      }
    ) })
  ] });
}
function DeleteFileButton({ deleteFile }) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { edge: "end", "aria-label": "delete", onClick: deleteFile, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, {}) });
}
function CreateTicket({ smetaModalId = "" }) {
  const form = useForm({
    initialValues: {
      surname: "",
      name: "",
      secondName: "",
      email: "",
      phone: "",
      appointment: "",
      topic: "",
      description: "",
      files: []
    },
    validate: {
      surname: (value) => value ? null : "Фамилия обязательна",
      name: (value) => value ? null : "Имя обязательно",
      secondName: (value) => value ? null : "Отчество обязательно",
      email: (value) => /^\S+@\S+$/.test(value) ? null : "Некорректный email",
      phone: (value) => value ? null : "Телефон обязателен",
      topic: (value) => value ? null : "Тема обязательна",
      description: (value) => value ? null : "Описание обязательно"
    }
  });
  const handleSubmit = (values2) => {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "config");
    params2.set("comand", "SendToSupport");
    getAttachedFiles(values2.files).then((attachedFiles) => {
      const body2 = {
        Фамилия: values2.surname,
        Имя: values2.name,
        Отчество: values2.secondName,
        ЭлАдрес: values2.email,
        Телефон: values2.phone,
        Должность: values2.appointment,
        Тема: values2.topic,
        Вложения: attachedFiles,
        $content: values2.description
      };
      AxiosRequest(true, params2, body2).then((res) => {
        if (res.error) {
          renderMessageBox({ dlgType: 1, buttons: 1, message: "При отправке заявки возникла ошибка!" });
        } else {
          renderMessageBox({ dlgType: 2, buttons: 1, message: res.Info });
        }
      });
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box, { component: "form", onSubmit: form.onSubmit(handleSubmit), style: { paddingRight: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid, { gutter: "xs", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextInput, { label: "Фамилия", required: true, ...form.getInputProps("surname") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextInput, { label: "Эл. адрес", required: true, ...form.getInputProps("email") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextInput, { label: "Имя", required: true, ...form.getInputProps("name") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextInput, { label: "Телефон", required: true, ...form.getInputProps("phone") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextInput, { label: "Отчество", required: true, ...form.getInputProps("secondName") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 6, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextInput, { label: "Должность", ...form.getInputProps("appointment") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextInput, { label: "Тема", required: true, ...form.getInputProps("topic") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 8, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Textarea, { label: "Описание", required: true, minRows: 10, ...form.getInputProps("description") }) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid.Col, { span: 4, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      FileUploadList,
      {
        files: form.values.files,
        setFiles: (files) => form.setFieldValue("files", files),
        height: 220
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid.Col, { span: 12, style: { display: "flex", justifyContent: "flex-end" }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { type: "submit", variant: "outline", style: { marginRight: "10px" }, children: "Отправить" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Button, { variant: "outline", onClick: () => smetaModals.close(smetaModalId), children: "Отмена" })
    ] })
  ] }) });
}
function TicketsClosingDetailPanel({ status, sendTaskFeedback }) {
  const [comment2, setComment] = reactExports.useState("");
  const [close, setIsClose] = reactExports.useState(1);
  const [grade, setGrade] = reactExports.useState(0);
  const [files, setFiles] = reactExports.useState([]);
  const handleCloseChange = (event) => {
    setIsClose(Number(event.target.value));
  };
  const handleGradeChange = (event) => {
    setGrade(Number(event.target.value));
  };
  const onCommentChange = (event) => {
    setComment(event.target.value);
  };
  const handleSubmit = (event) => {
    event.preventDefault();
    sendTaskFeedback({
      comment: comment2,
      close,
      grade,
      files
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { component: "form", onSubmit: handleSubmit, style: { width: "100%", height: "100%", paddingRight: "10px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { container: true, direction: "column", justifyContent: "flex-start", alignItems: "stretch", spacing: 1, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Box$1,
      {
        style: {
          paddingLeft: "1px",
          display: "flex",
          alignItems: "center"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("label", { children: "Статус заявки:" }),
          isTicketDetailsInputsEnabled(status) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
            FormControl,
            {
              style: {
                marginLeft: "10px"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioGroup, { row: true, sx: { height: "38px", overflow: "auto" }, value: close, onChange: handleCloseChange, children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: 1, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Закрыть" }),
                status !== "Зарегистрировано" && /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: 2, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Вернуть в работу" })
              ] })
            }
          ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
            InputLabel$1,
            {
              style: {
                marginLeft: "10px"
              },
              children: status
            }
          )
        ]
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { container: true, item: true, direction: "row", justifyContent: "flex-start", alignItems: "stretch", spacing: 1, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { item: true, xs: 8, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { children: "Комментарий" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IMemo,
          {
            Text: comment2,
            onChange: onCommentChange,
            readOnly: !isTicketDetailsInputsEnabled(status),
            style: {
              height: "100%",
              width: "100%",
              resize: "none",
              overflow: "auto",
              outline: "none"
            }
          }
        )
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { item: true, xs: 4, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { htmlFor: "raised-button-file", children: "Файлы" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(FileUploadList, { files, setFiles, height: 100 })
      ] })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { container: true, item: true, direction: "row", justifyContent: "flex-start", alignItems: "space-between", spacing: 0, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, xs: 10, children: close === 1 && (status === "Решено" || status === "Зарегистрировано") && /* @__PURE__ */ jsxRuntimeExports.jsxs(
        Box$1,
        {
          style: {
            paddingLeft: "1px",
            display: "flex",
            alignItems: "center"
          },
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("label", { children: "Оценка:" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              FormControl,
              {
                style: {
                  marginLeft: "10px"
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsxs(RadioGroup, { row: true, sx: { height: "38px", overflow: "auto" }, value: grade, onChange: handleGradeChange, children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: 5, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Положительная" }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: 1, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Отрицательная" }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: 0, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, { size: "small" }), label: "Без оценки" })
                ] })
              }
            )
          ]
        }
      ) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, xs: 2, display: "flex", justifyContent: "flex-end", alignItems: "center", size: "grow", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none" },
          value: "1",
          className: "button_Modal_Select",
          type: "submit",
          disabled: !isTicketDetailsInputsEnabled(status),
          children: "Отправить"
        }
      ) })
    ] })
  ] }) });
}
function isTicketDetailsInputsEnabled(status) {
  return status === "Решено" || status === "Зарегистрировано" || status === "В ожидании";
}
function TicketsListDetails({
  description,
  solution,
  status,
  sendTaskFeedback
}) {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs, { id: "supportRequestForm", style: { width: "100%", height: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: "Description",
        label: "Описание",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          IMemo,
          {
            Text: description,
            readOnly: true,
            style: {
              height: "100%",
              width: "100%",
              resize: "none",
              overflow: "auto",
              outline: "none"
            }
          }
        )
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: "Solution",
        label: "Решение",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          IMemo,
          {
            Text: solution,
            readOnly: true,
            style: {
              height: "100%",
              width: "100%",
              resize: "none",
              overflow: "auto",
              outline: "none"
            }
          }
        )
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: "Closing",
        label: "Закрытие",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(TicketsClosingDetailPanel, { status, sendTaskFeedback })
      }
    )
  ] });
}
const setCollumsForGridSigns = () => {
  const columns = {
    title: [
      { title: "Время", width: 100, fieldName: "Time" },
      { title: "Номер", width: 100, fieldName: "Number" },
      { title: "Тема", width: 200, fieldName: "Topic" },
      { title: "Срок", width: 100, fieldName: "Term" },
      { title: "Статус", width: 180, fieldName: "Status" },
      { title: "Исполнитель", width: 180, fieldName: "Executor" },
      { title: "Решение", width: 180, fieldName: "Solution" },
      { title: "Пользователь", width: 180, fieldName: "User" }
    ]
  };
  return columns;
};
const getDefaultFieldsSigns = () => {
  return [
    { Name: "ID", Title: "ID", Width: "7" },
    { Name: "Index", Title: "Индекс", Width: "7" },
    { Name: "Time", Title: "Время", Width: "10" },
    { Name: "Number", Title: "Номер", Width: "10" },
    { Name: "Topic", Title: "Тема", Width: "10" },
    { Name: "Term", Title: "Срок", Width: "10" },
    { Name: "Status", Title: "Статус", Width: "10" },
    { Name: "Executor", Title: "Исполнитель", Width: "10" },
    { Name: "Solution", Title: "Решение", Width: "10" },
    { Name: "User", Title: "Пользователь", Width: "10" },
    { Name: "Description", Title: "Описание", Width: "10" }
  ];
};
const recordKeys = [
  "ID",
  "Index",
  "Time",
  "Number",
  "Topic",
  "Term",
  "Status",
  "Executor",
  "Solution",
  "User",
  "Description"
];
const cacheRecords = [];
function TicketsList() {
  const [selectedRecordID, setSelectedRecordID] = reactExports.useState("0");
  const [closedChecked, setClosedChecked] = reactExports.useState(1);
  const [onlyMyChecked, setOnlyMyChecked] = reactExports.useState(1);
  const [period, setPeriod] = reactExports.useState(periodValues[2].title);
  const [description, setDescription] = reactExports.useState("");
  const [solution, setSolution] = reactExports.useState("");
  const [status, setStatus] = reactExports.useState("");
  const samplesGridRef = reactExports.useRef(null);
  const records = reactExports.useRef([]);
  const isAdmin = useAtomValue(isAdminAtom);
  const loadGrid = async () => {
    const columnsData = setCollumsForGridSigns();
    if (!isAdmin) {
      columnsData.title = columnsData.title.filter((column2) => column2.title !== "Пользователь");
    }
    const { grid, source } = await GridLoader(
      samplesGridRef.current,
      {},
      {
        defaultFields: getDefaultFieldsSigns(),
        keyField: "ID",
        getRecords: () => records.current,
        recordKeys,
        titleKey: "",
        localGrid: true,
        Columns: columnsData,
        indicator: false,
        canModify: () => false,
        setSelectedRecord: setSelectedRecordID
      }
    );
    const desc = await grid.source.getFieldText("Description");
    setDescription(desc);
    const sol = await grid.source.getFieldText("Solution");
    setSolution(sol);
    const stat = await grid.source.getFieldText("Status");
    setStatus(stat);
    source.onRecordIndexChanged = function(source2) {
      source2.getFieldText("ID").then(async (id) => {
        setSelectedRecordID(id);
        const desc2 = await grid.source.getFieldText("Description");
        setDescription(desc2);
        const sol2 = await grid.source.getFieldText("Solution");
        setSolution(sol2);
        const stat2 = await grid.source.getFieldText("Status");
        setStatus(stat2);
      });
    };
    const gridData = records.current;
    cacheRecords.splice(0, cacheRecords.length);
    cacheRecords.push(...gridData);
  };
  reactExports.useEffect(() => {
    updateGridData2();
  }, [closedChecked, onlyMyChecked, period]);
  reactExports.useEffect(() => {
  }, [selectedRecordID]);
  const handleSubmit = (event) => {
    event.preventDefault();
    updateGridData2();
  };
  const updateGridData2 = () => {
    const periodValue = getPeriodValueByName(period);
    fetchGridData(
      {
        onlyOpen: closedChecked,
        onlyMy: onlyMyChecked,
        period: periodValue
      },
      records,
      () => loadGrid()
    );
  };
  const updateGridSize = () => {
    const grid = samplesGridRef.current.grid;
    if (grid) grid.updateGridSize();
  };
  const filterGridByDescription = async (description2) => {
    records.current = filterGridDataByDescription(cacheRecords, description2);
    if (samplesGridRef.current.grid) {
      await samplesGridRef.current.grid.refreshSource("!");
      const source = samplesGridRef.current.grid.source;
      source.onRecordIndexChanged(source);
    }
  };
  const sendTaskFeedback = (feedback) => {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "config");
    params2.set("comand", "CloseSupportReq");
    params2.set("ID", selectedRecordID);
    params2.set("Text", feedback.comment);
    params2.set("Rating", feedback.grade);
    params2.set("Flag", feedback.close);
    AxiosRequest(true, params2).then((res) => {
      if (res.error) {
        renderMessageBox({ dlgType: 1, buttons: 1, message: "При отправке заявки возникла ошибка!" });
      } else if (res.Info) {
        renderMessageBox({ dlgType: 2, buttons: 1, message: res.Info });
      } else {
        renderMessageBox({ dlgType: 2, buttons: 1, message: "Информация успешно отправлена!" });
      }
      updateGridData2();
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid22,
    {
      container: true,
      direction: "column",
      justifyContent: "flex-start",
      alignItems: "flex-start",
      style: { width: "100%", height: "100%" },
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        SplitterLocal,
        {
          orientation: "horizontal",
          sizeSecondary: "50%",
          onExpand: updateGridSize,
          onCollapse: updateGridSize,
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid22, { children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { xs: 12, style: { marginTop: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                TicketsListTableFilter,
                {
                  closedChecked,
                  setClosedChecked,
                  onlyMyChecked,
                  setOnlyMyChecked,
                  filterGridByDescription,
                  period,
                  setPeriod,
                  handleSubmit
                }
              ) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { style: { width: "100%", height: "280px" }, xs: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { position: "relative", height: "280px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  rcspanel: "",
                  ref: samplesGridRef,
                  tabIndex: 0,
                  style: {
                    height: "100%",
                    width: "100%"
                  }
                }
              ) }) })
            ] }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { xs: 12, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              TicketsListDetails,
              {
                description,
                solution,
                status,
                sendTaskFeedback
              }
            ) })
          ]
        }
      )
    }
  );
}
function SupportRequest({ smetaModalId = "" }) {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Tabs, { id: "supportRequestForm", style: { width: "100%", height: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: "NewTicket",
        label: "Новая заявка",
        animation: "none",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(CreateTicket, { smetaModalId })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      TabItem,
      {
        id: "TicketsList",
        label: "Список заявок",
        animation: "none",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(TicketsList, {})
      }
    )
  ] });
}
const openUpdtInstall = () => {
  smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogInstallScriptsUpdates, { props: {} }), {
    Title: "Установка обновлений",
    style: { height: `${400}px`, width: `${620}px`, minHeight: `${400}px`, minWidth: `${620}px` },
    hiddenButton: true
  });
};
const openAboutSite = () => {
  smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogAboutSite, {}), {
    Title: "О сайте",
    style: { height: `${530}px`, width: `${530}px` },
    Buttons: {
      jsonData: { Кнопка$Отмена: "Закрыть" },
      Params: { Buttons: 2 }
    },
    blockMaximize: true,
    blockSaveLocation: true,
    blockResize: true
  });
};
const openHelpContextDialog = () => {
  const helpContext = smetaStore.get(helpContextAtom);
  if (CheckModalBackGrounds() === 0 && helpContext) {
    const config2 = smetaStore.get(appConfig);
    if (config2.smeta.openHelpContextInNewTab) {
      window.open(helpContext);
    } else {
      smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogHelpContext, {}), {
        Title: "Справка",
        style: { height: `${500}px`, width: `${620}px` },
        hiddenButton: true,
        blockMaximize: true
      });
    }
  }
};
const openSupportRequest = () => {
  smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(SupportRequest, {}), {
    Title: "Заявка в службу поддержки",
    style: {
      height: "690px",
      width: "850px",
      minHeight: "750px",
      minWidth: "950px",
      overflow: "hidden"
    },
    hiddenButton: true,
    blockSaveLocation: true,
    disableBlockBackground: true,
    blockCollapse: true
  });
};
const SupportButton = () => {
  var _a2;
  const theme = useAtomValue(currentTheme);
  const isLk = (_a2 = getOptionsForUser()) == null ? void 0 : _a2.from;
  const helpContext = useAtomValue(helpContextAtom);
  if (isLk === "lk") return null;
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    IconMenuButton,
    {
      title: "Справка",
      items: [
        {
          label: "Вызов справки",
          onClick: openHelpContextDialog,
          icon: /* @__PURE__ */ jsxRuntimeExports.jsx(QuizIcon, { className: cn("iconButtonStimate", { light: theme === "light" }) }),
          shortCut: "F1",
          hidden: !helpContext
        },
        { label: "Заявка в службу поддержки", onClick: openSupportRequest },
        { label: "divider" },
        { label: "Проверить наличие обновлений", onClick: openUpdtInstall },
        { label: "Файл с ошибками", onClick: downloadErrorFile },
        { label: "О сайте...", onClick: openAboutSite }
      ],
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(HelpIcon, { className: cn("iconButtonStimate", { light: theme === "light" }) })
    }
  );
};
const styles$1 = (theme) => ({
  popper: {
    width: "fit-content"
  }
});
const PopperMy = function(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Popper, { ...props, style: styles$1.popper, placement: "bottom-start" });
};
const SectionSearch = ({ background = false, sectionArr }) => {
  const theme = useAtomValue(currentTheme);
  const [searchData, setSearchData] = reactExports.useState([]);
  const [value, setValue] = reactExports.useState({});
  const [inputValue, setInputValue] = reactExports.useState("");
  const setSelectedSection = useSetAtom(setSelectedSectionAtom);
  reactExports.useEffect(() => {
    if (searchData.length > 0) return;
    const data = createSearchData();
    setSearchData(data);
  }, [inputValue]);
  const createSearchData = () => {
    const isEmptyArray = (arr) => !Array.isArray(arr) || arr.length === 0;
    if (!sectionArr || isEmptyArray(sectionArr)) return [];
    const buildPath = (parent, name) => `${parent}/${name}`;
    const parseReports = (items, section) => {
      if (isEmptyArray(items)) return [];
      return items.flatMap(({ Name: reportName, ID: reportId, items: children }) => {
        const name = buildPath(section.name, reportName);
        return [
          ...parseReports(children || [], { ...section, name }),
          {
            Name: name,
            selected: {
              reportId,
              name: reportName
            },
            sectionId: section.id
          }
        ];
      });
    };
    const parseDocs = (items, section) => {
      if (isEmptyArray(items)) return [];
      return items.map(({ Name: docName, DocCfgID: docCfgId }) => ({
        Name: buildPath(section.name, docName),
        selected: {
          DocCfgID: docCfgId,
          name: docName
        },
        sectionId: section.id
      }));
    };
    const parsePages = (items, section) => {
      if (isEmptyArray(items)) return [];
      return items.map(({ Name: pageName, CLSID: clsid, Path: path, ProgID: progId }) => ({
        selected: {
          path,
          clsid,
          progId,
          name: pageName
        },
        Name: buildPath(section.name, pageName),
        sectionId: section.id
      }));
    };
    const parseSections = (sections, parentName = "") => {
      if (isEmptyArray(sections)) return [];
      return sections.flatMap(
        ({ Sections: sections2, Name: name, Documents: documents, Reports: reports2, Pages: pages, ID: sectionId }) => {
          const currentName = parentName === "" ? name : buildPath(parentName, name);
          const sectionInfo = { name: currentName, id: sectionId };
          return [
            ...parseSections(sections2 || [], currentName),
            ...parseReports(reports2 || [], sectionInfo),
            ...parseDocs(documents || [], sectionInfo),
            ...parsePages(pages || [], sectionInfo),
            { sectionId, Name: currentName }
          ];
        }
      );
    };
    const searchData2 = parseSections(sectionArr);
    return searchData2 || [];
  };
  const selectValue = (selectedItem) => {
    const sectionInfo = getSectionByID(selectedItem.sectionId);
    setSelectedSection({ ...sectionInfo, Selected: selectedItem.selected });
  };
  function clearValue() {
    setValue({});
    setInputValue("");
    if (value === "") document.getElementById("MainSplitter").collapse(true);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    "div",
    {
      style: { height: "34px", display: "flex", alignItems: "center" },
      id: "SearchBlock",
      className: clsx$3("sidebarStimate", { light: theme === "light" }),
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Autocomplete,
          {
            size: "small",
            disableListWrap: true,
            clearOnBlur: true,
            handleHomeEndKeys: true,
            sx: {
              display: "inline-block",
              width: "100%",
              ml: 1
            },
            value,
            onChange: (event, newValue) => {
              selectValue(newValue);
              setValue(newValue);
            },
            inputValue,
            onInputChange: (event, newInputValue) => {
              setInputValue(newInputValue);
            },
            noOptionsText: "Ничего не найдено :c",
            id: "Search",
            options: searchData,
            PopperComponent: PopperMy,
            renderInput: (params2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                style: {
                  backgroundColor: "white",
                  border: "2px solid #eeeeee",
                  paddingLeft: "5px"
                },
                ref: params2.InputProps.ref,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  "input",
                  {
                    type: "text",
                    style: {
                      margin: "0",
                      height: "100%",
                      width: "100%",
                      color: "#212529",
                      border: "0",
                      borderRadius: "0",
                      outline: "none",
                      padding: "0",
                      fontSize: "13px",
                      fontFamily: "Roboto",
                      letterSpacing: "0px",
                      backgroundColor: background ? "whitesmoke" : "inherit"
                    },
                    placeholder: "Поиск...",
                    ...params2.inputProps
                  }
                )
              }
            ),
            renderOption: (props, option, { inputValue: inputValue2 }) => {
              const text = option.Name;
              const matches = match(text, inputValue2);
              const parts = parse$1(text, matches);
              return /* @__PURE__ */ reactExports.createElement("li", { ...props, key: `${props.key}_${props.id}` }, /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: parts.map((part, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(
                "span",
                {
                  style: {
                    fontWeight: part.highlight ? 700 : 400
                  },
                  children: part.text
                },
                index2
              )) }));
            },
            getOptionLabel: (option) => option.Name || ""
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: clearValue, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CloseIcon, { className: cn("iconButtonStimate", { light: theme === "light" }), fontSize: "small" }) })
      ]
    }
  );
};
const ExpandButton = "_ExpandButton_1ita9_15";
const ListItemText = "_ListItemText_1ita9_35";
const sideBarStyles = {
  ExpandButton,
  ListItemText
};
const ListItemSmeta = ({
  value: { ID: id, Image: img, Name: name, Title: title, $tag },
  selected,
  expandButton,
  collapse,
  onCollapse,
  onClick: onClick2
}) => {
  const theme = "light";
  const handleExpand = () => {
    onCollapse(id);
  };
  const handleClick = () => {
    onClick2(id);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    ListItem$1,
    {
      component: "div",
      style: {
        padding: 0,
        display: "inherit"
      },
      sx: {
        "& .MuiListItemSecondaryAction-root": {
          right: "auto",
          left: Number($tag) * 20 + "px"
        }
      },
      secondaryAction: /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          id,
          onClick: handleExpand,
          className: clsx$3(sideBarStyles.ExpandButton),
          style: { display: expandButton ? "inline-flex" : "none" },
          children: collapse ? /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandLess, { fontSize: "small" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { fontSize: "small" })
        }
      ),
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        ListItemButton,
        {
          style: { paddingRight: 0, color: "white" },
          component: "div",
          sx: {
            //   pl: img ? howDeep : "",
            paddingLeft: Number($tag) * 30 + "px",
            "& .Mui-selected": {
              backgroundColor: "rgb(35, 114, 191)"
            }
          },
          id,
          selected,
          onClick: handleClick,
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ListItemIcon,
              {
                style: {
                  minWidth: "0px",
                  paddingRight: "10px",
                  paddingLeft: 10,
                  display: !img ? "none" : "grid"
                },
                children: img ? ImgURL(img, { height: 32 }) : ""
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ListItemText$1,
              {
                className: clsx$3("fontColorStimate", {
                  light: theme === "light"
                }),
                primary: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sideBarStyles.ListItemText), title: title || name, children: title || name })
              }
            )
          ]
        }
      )
    }
  );
};
function SideBar() {
  const setSelectedSection = useSetAtom(setSelectedSectionAtom);
  const setHeadForm = useSetAtom(headFormAtom);
  const [sectionList, setSectionList] = useAtom(sectionListAtom);
  const [collapseData, setCollapseData] = reactExports.useState({});
  const theme = useAtomValue(currentTheme);
  const setHasStartPageAtom = useSetAtom(hasStartPageAtom);
  const animationsOn = useAtomValue(animationsAtom);
  const bgcolorthemeSelect = theme === "light" ? "#dcd8cc" : "#3d5b75";
  const sideBarSelected = useAtomValue(selectedSectionAtom);
  reactExports.useEffect(() => {
    getSectionList();
  }, []);
  async function parsedUrl(sideBarData) {
    var _a2;
    if (hasURLparam("parsed") && sideBarData !== void 0) {
      const secid = getURLparam("secid");
      const jsondata = getSectionByID(secid);
      let dataAboutSelectedDoc = {
        Section: {
          CLSID: jsondata.CLSID,
          ID: jsondata.ID,
          Name: jsondata.Name,
          Documents: jsondata.Documents
        }
      };
      if (hasURLparam("docid")) {
        const docId = getURLparam("docid");
        const docInfo = await getDocInfo(docId);
        if (!docInfo) return console.error("GetDocInfo: ошибка получения данных о документе");
        const docInfoSections = (_a2 = docInfo == null ? void 0 : docInfo.Sections) == null ? void 0 : _a2.split(",");
        const docCfgId = getURLparam("doccfgid");
        const card = hasURLparam("card");
        const modal = hasURLparam("modal");
        if (!dataAboutSelectedDoc.Section.ID && docInfoSections && docInfoSections.length > 0) {
          for (const value of docInfoSections) {
            if (!dataAboutSelectedDoc.Section.ID) {
              const sectionInfo = getSectionByID(value);
              dataAboutSelectedDoc = { ...dataAboutSelectedDoc, Section: sectionInfo };
            }
          }
        }
        dataAboutSelectedDoc = {
          ...dataAboutSelectedDoc,
          docid: docId,
          DocCfgID: docCfgId || docInfo.DocCfgID,
          card,
          modal,
          Who: "Documents"
        };
        if (docInfo.Result === "1" && dataAboutSelectedDoc.DocCfgID) {
          window.history.replaceState(
            { additionalInformation: "Переход" },
            "UrlSearch",
            window.location.href.split("?")[0]
          );
          if (dataAboutSelectedDoc.Section.ID) {
            return true;
          } else if (modal) {
            openDocumentInModal(dataAboutSelectedDoc.DocCfgID, docId);
          }
        } else {
          renderMessageBox({ dlgType: 1, buttons: 1, message: "Документ не найден" });
        }
        return false;
      }
    }
    return false;
  }
  const selectSection = (id, selectedDoc) => {
    const infoAboutSection = getSectionByID(id);
    if (isEmptyObject(infoAboutSection)) return;
    setSelectedSection({ ...infoAboutSection, Selected: selectedDoc });
  };
  const getSectionList = async () => {
    var _a2, _b;
    const reqConfig = {
      params: {
        simple: "0",
        full: "1",
        png: "1"
      }
    };
    const defaultSectionList = await smetaAxios.get("getSectionList", reqConfig);
    setSectionList(defaultSectionList.Sections);
    const { PageID: pageId, HasStartPage: hasStartPage, Head: head } = defaultSectionList;
    const sectionFromStorage = getOptionsForUser();
    const idToSelect = (sectionFromStorage == null ? void 0 : sectionFromStorage.ID) || pageId;
    if (head === "1") {
      const headFormData = getHeadForm("GetSectionHead");
      setHeadForm(headFormData);
    }
    const createCollapseObj = (list) => {
      return list.reduce((acc, value) => {
        const { ID: id } = value;
        const selected = idToSelect === id;
        if (!value.Sections) return { ...acc, [selected ? idToSelect : id]: selected };
        const childData = createCollapseObj(value.Sections);
        return { ...acc, [id]: childData[idToSelect] || false, ...childData };
      }, {});
    };
    const collapseObj = createCollapseObj(defaultSectionList.Sections);
    setCollapseData(collapseObj);
    setHasStartPageAtom(hasStartPage === "1");
    await getIconsAsync(85);
    if (!defaultSectionList || isEmptyObject(defaultSectionList)) {
      createCokies("LicG", "");
      if ((_a2 = getOptionsForUser()) == null ? void 0 : _a2.from) window.location.href = (_b = getOptionsForUser()) == null ? void 0 : _b.from.replaceAll("@", "/");
      return;
    }
    if (await parsedUrl(defaultSectionList["Sections"])) return;
    const selectedDoc = sectionFromStorage == null ? void 0 : sectionFromStorage.Selected;
    selectSection(idToSelect, selectedDoc);
  };
  const renderSectionList = (listTest) => {
    if (!listTest || listTest === void 0 || listTest.length === 0) return;
    return listTest.map((value, index2) => {
      const { ID: id } = value;
      return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          ListItemSmeta,
          {
            value,
            selected: sideBarSelected.ID === id,
            expandButton: Boolean(value.Sections),
            collapse: collapseData[id],
            onCollapse: (collapseId) => {
              const collapseBoolean = collapseData[collapseId];
              if (collapseBoolean === void 0) return;
              setCollapseData({ ...collapseData, [collapseId]: !collapseBoolean });
            },
            onClick: (selectId) => {
              selectSection(selectId);
            }
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Collapse, { in: collapseData[id], timeout: animationsOn ? "auto" : 0, unmountOnExit: true, children: renderSectionList(value.Sections || []) })
      ] }, index2 + id);
    });
  };
  window.onpopstate = (event) => {
    if (event && event.currentTarget && event.currentTarget === window) {
      window.location.reload();
      return;
    }
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { style: { scrollbarWidth: "none" }, sx: { overflow: "auto" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(SectionSearch, { sectionArr: sectionList }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      List,
      {
        component: "div",
        disablePadding: true,
        sx: {
          "&& .Mui-selected, && .Mui-selected:hover": {
            backgroundColor: bgcolorthemeSelect
          }
        },
        children: renderSectionList(sectionList)
      }
    )
  ] });
}
function SideBarButton(props) {
  const theme = useAtomValue(currentTheme);
  const colorTextButton = theme === "light" ? "#535353" : "white";
  const setSelectedSection = useSetAtom(setSelectedSectionAtom);
  const [anchorEl, setAnchorEl] = reactExports.useState(null);
  const open = Boolean(anchorEl);
  const [data, setData] = reactExports.useState(void 0);
  const handleClick = (event) => {
    setAnchorEl(event.currentTarget);
    if (data === void 0) {
      let params2 = /* @__PURE__ */ new Map(), json;
      params2.set("comand", "GetSectionList");
      params2.set("Simple", "0");
      params2.set("full", "1");
      params2.set(`png`, `1`);
      json = XMLrequest(params2);
      setData(json["Sections"]);
    }
  };
  const handleClose = () => {
    setAnchorEl(null);
  };
  function UpdateSelected(event) {
    let ID2;
    ID2 = event.currentTarget.getAttribute("id");
    setSelectedSection(getSectionByID(ID2));
    setAnchorEl(null);
  }
  function MenuButton(SectionList) {
    if (SectionList !== void 0) {
      let Name, ID2, Img, CLSID;
      let assemblyLists = [];
      for (const [key, value] of Object.entries(SectionList)) {
        Name = SectionList[key]["Name"];
        ID2 = SectionList[key]["ID"];
        CLSID = SectionList[key]["CLSID"];
        Img = ImgURL(SectionList[key]["Image"], {
          height: "32px",
          width: "32px"
        });
        if (value["Sections"] !== void 0) {
          assemblyLists.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              NestedMenuItem,
              {
                leftIcon: Img,
                label: Name,
                parentMenuOpen: true,
                id: ID2,
                CLSID,
                onClick: UpdateSelected,
                style: { position: "relative", top: "5px" },
                children: MenuButtonItems(value["Sections"])
              }
            ) }, key)
          );
        } else {
          assemblyLists.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(MenuItem, { id: ID2, CLSID, style: { paddingLeft: "4px" }, onClick: UpdateSelected, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: SectionList[key]["Image"] ? Img : "" }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ListItemText$1,
                {
                  variant: "body1",
                  sx: { pl: SectionList[key]["Image"] ? 1 : 0, pd: 1, alignSelf: "center" },
                  children: Name
                }
              )
            ] }) }, key)
          );
        }
      }
      return assemblyLists;
    }
  }
  function MenuButtonItems(SectionList) {
    let Name, ID2, Img, CLSID;
    let assemblyLists = [];
    for (const [key, value] of Object.entries(SectionList)) {
      Name = SectionList[key]["Name"];
      ID2 = SectionList[key]["ID"];
      SectionList[key]["Deep"];
      Img = ImgURL(SectionList[key]["Image"], {
        height: "32px",
        width: "32px"
      });
      CLSID = SectionList[key]["CLSID"];
      if (value["Sections"] !== void 0) {
        assemblyLists.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            NestedMenuItem,
            {
              leftIcon: Img,
              label: Name,
              parentMenuOpen: true,
              id: ID2,
              CLSID,
              onClick: UpdateSelected,
              style: { alignSelf: "center" },
              children: MenuButtonItems(value["Sections"])
            }
          ) }, key)
        );
      } else {
        assemblyLists.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(MenuItem, { style: { paddingLeft: "4px" }, id: ID2, CLSID, onClick: UpdateSelected, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: SectionList[key]["Image"] ? Img : "" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { variant: "body1", sx: { pl: SectionList[key]["Image"] ? 1 : 0, pd: 1, alignSelf: "center" }, children: Name })
          ] }) }, key)
        );
      }
    }
    return assemblyLists;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { style: { ...props.style }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Button$2,
      {
        size: "small",
        onClick: handleClick,
        variant: "text",
        style: {
          textTransform: "none",
          paddingTop: "6px",
          fontSize: "0.875rem",
          color: colorTextButton
        },
        children: "Выбрать"
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Menu,
      {
        open,
        onClose: handleClose,
        anchorEl,
        style: { paddingTop: "0px", paddingBottom: "0px" },
        sx: { pt: 0, pb: 0 },
        children: MenuButton(data)
      }
    )
  ] });
}
function HiddenNav({ drawerOpen }) {
  const [visitedSectionsArr, setVisitedSectionsArr] = reactExports.useState(
    []
  );
  const contextMenuSelected = reactExports.useRef(null);
  const sideBarSelected = useAtomValue(selectedSectionAtom);
  const setSelectedSection = useSetAtom(setSelectedSectionAtom);
  const hasStartPage = useAtomValue(hasStartPageAtom);
  reactExports.useEffect(() => {
    if (!sideBarSelected.ID || Number(sideBarSelected.ID) < 0) return;
    const key = visitedSectionsArr.findIndex((value) => value.id === sideBarSelected.ID);
    if (key !== -1) return;
    const newArr = [
      ...visitedSectionsArr,
      {
        id: sideBarSelected.ID,
        name: sideBarSelected.Title || sideBarSelected.Name || "",
        img: sideBarSelected.Image
      }
    ];
    setVisitedSectionsArr(newArr);
  }, [sideBarSelected.ID]);
  const handleClickButton = (id) => {
    setSelectedSection(getSectionByID(id));
  };
  const handleContextMenu = () => {
    if (contextMenuSelected.current === null) return;
    const newArr = visitedSectionsArr.toSpliced(contextMenuSelected.current, 1, {
      ...visitedSectionsArr[contextMenuSelected.current],
      name: null
    });
    setVisitedSectionsArr(newArr);
    contextMenuSelected.current = null;
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { id: "HiddenNav", style: { display: "inline-flex", marginLeft: "8px", height: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(SideBarButton, { style: { display: drawerOpen ? "none" : "" } }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Стартовая страница", sx: { display: hasStartPage ? "inline-flex" : "none" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        "aria-label": "CancelEdit",
        size: "small",
        id: `MiniButton${sideBarSelected.ID}`,
        onClick: () => {
          setSelectedSection({
            ID: "-1",
            CLSID: ViewClass.HTMLView,
            Name: "Стартовая страница"
          });
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(HomeIcon, { sx: { fontSize: "1.25rem" } })
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      ContextMenu,
      {
        data: [
          {
            Caption: "Скрыть кнопку быстрого доступа",
            value: "hideButton"
          }
        ],
        onMenuItemClick: handleContextMenu,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: drawerOpen ? "none" : "inline-flex", height: "100%" }, children: visitedSectionsArr.map((value, index2) => {
          if (value.name === null) return null;
          return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: value.name, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IconButton,
            {
              size: "small",
              id: `MiniButton${value.id}`,
              onClick: () => {
                handleClickButton(value.id);
              },
              onContextMenu: () => {
                contextMenuSelected.current = index2;
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { alt: "", style: { height: "16px", width: "16px" }, src: ImgURLSRC(value.img) })
            }
          ) }, `mini-button_${value.id}`);
        }) })
      }
    )
  ] });
}
var NavigateNext = {};
var hasRequiredNavigateNext;
function requireNavigateNext() {
  if (hasRequiredNavigateNext) return NavigateNext;
  hasRequiredNavigateNext = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(NavigateNext, "__esModule", {
    value: true
  });
  NavigateNext.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  NavigateNext.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M10 6 8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"
  }), "NavigateNext");
  return NavigateNext;
}
var NavigateNextExports = /* @__PURE__ */ requireNavigateNext();
const NavigateNextIcon = /* @__PURE__ */ getDefaultExportFromCjs(NavigateNextExports);
const LinkBreadcrumb = ({ name = "", id = 0, onClick: onClick2 = null }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
  Link$1,
  {
    underline: "hover",
    color: "inherit",
    href: "#",
    idsec: id,
    onClick: (e2) => {
      e2.preventDefault();
      onClick2();
    },
    children: name
  }
);
function getSectionChain(sections, selectedSection) {
  function findChain(sections2, targetId) {
    return sections2.reduce((acc, section) => {
      if (acc !== null) return acc;
      if (section.ID === targetId) {
        return [section];
      }
      if (section.Sections) {
        const sub = findChain(section.Sections, targetId);
        if (sub) {
          return [section, ...sub];
        }
      }
      return null;
    }, null);
  }
  let chain = findChain(sections, selectedSection.ID);
  if (chain && selectedSection.Selected && selectedSection.Selected.Name) {
    chain = [...chain, { Name: selectedSection.Selected.Name, ...selectedSection.Selected }];
  }
  return chain;
}
const SmetaBreadcrumbs = () => {
  const sideBarSelected = useAtomValue(selectedSectionAtom);
  const sideBarData = useAtomValue(sectionListAtom);
  const [links, setLinks] = reactExports.useState([]);
  const setSelectedSection = useSetAtom(setSelectedSectionAtom);
  const breadcrumbsRef = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (sideBarSelected.ID !== "" && sideBarData) {
      const chain = getSectionChain(sideBarData, sideBarSelected);
      setLinks(chain || []);
    }
  }, [sideBarSelected.ID, sideBarSelected.Selected]);
  function сlearBreadCrumbs() {
    var _a2;
    if (breadcrumbsRef.current) {
      for (const value of Object.values(((_a2 = breadcrumbsRef.current.firstChild) == null ? void 0 : _a2.children) || {})) {
        if (value.id === "noneBreadcrumbs") value.remove();
      }
    }
  }
  function onClickLink(item) {
    const id = item.ID;
    сlearBreadCrumbs();
    if (id !== sideBarSelected.ID) {
      setSelectedSection(getSectionByID(id));
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Stack, { spacing: 1, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    Breadcrumbs,
    {
      ref: breadcrumbsRef,
      separator: /* @__PURE__ */ jsxRuntimeExports.jsx(NavigateNextIcon, { fontSize: "small" }),
      sx: { color: "inherit" },
      id: "BreadcrumbsSelected",
      children: links.length > 0 ? links.map((link, index2) => /* @__PURE__ */ jsxRuntimeExports.jsx(LinkBreadcrumb, { name: link.Name, id: link.ID, onClick: () => onClickLink(link) }, index2)) : /* @__PURE__ */ jsxRuntimeExports.jsx("span", { id: "noneBreadcrumbs" })
    }
  ) });
};
function SubHeader(props) {
  const theme = useAtomValue(currentTheme);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid$1,
    {
      className: cn("headerStimate", { light: theme === "light" }),
      item: true,
      style: {
        height: "34px",
        overflow: "hidden",
        width: "100%",
        position: "inherit",
        top: "48px",
        flex: "0 1 auto"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        "div",
        {
          id: "miniMenu",
          style: {
            display: "-webkit-box",
            alignItems: "center",
            width: "inherit",
            height: "inherit"
          },
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(HiddenNav, { drawerOpen: props.drawerOpen }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                className: cn("fontColorStimate", { light: theme === "light" }),
                id: "NameSection",
                style: {
                  paddingTop: "6px",
                  fontFamily: "Roboto,Helvetica,Arial, sans-serif",
                  fontWeight: "500",
                  fontSize: "1rem",
                  marginLeft: `${props.drawerOpen ? 10 : 0}px`
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaBreadcrumbs, {})
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "refreshbuttonforall", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Обновить секцию", placement: "right", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              IconButton,
              {
                style: { padding: "8px" },
                onClick: () => {
                  updateSection();
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshIcon, { className: cn("iconButtonStimate", { light: theme === "light" }), fontSize: "small" })
              }
            ) }) })
          ]
        }
      )
    }
  );
}
function OutPut() {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      style: {
        height: "100%",
        width: "100%",
        overflow: "hidden"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        IMemo,
        {
          id: "OutPutInput",
          style: {
            height: "100%",
            width: "100%",
            resize: "none",
            overflow: "auto",
            outline: "none"
          }
        }
      )
    }
  );
}
const splitter = "_splitter_19ggc_1";
const light = "_light_19ggc_105";
const animate = "_animate_19ggc_189";
const styles = {
  splitter,
  "splitter-container": "_splitter-container_19ggc_15",
  "splitter-horizontal": "_splitter-horizontal_19ggc_27",
  "splitter-vertical": "_splitter-vertical_19ggc_33",
  "splitter-background-feedback": "_splitter-background-feedback_19ggc_39",
  "splitter-item": "_splitter-item_19ggc_53",
  "splitter-bar": "_splitter-bar_19ggc_79",
  light,
  "splitter-far-collapse-button": "_splitter-far-collapse-button_19ggc_123",
  "splitter-near-collapse-button": "_splitter-near-collapse-button_19ggc_125",
  animate,
  "splitter-bar-feedback": "_splitter-bar-feedback_19ggc_279",
  "limit-reached": "_limit-reached_19ggc_299"
};
function SmetaSplitterBar(props) {
  const theme = smetaStore.get(currentTheme);
  const separatorRef = reactExports.useRef(null);
  reactExports.useEffect(() => {
    if (props.blockResize) {
      separatorRef.current.setAttribute("block-resize", "");
    } else separatorRef.current.removeAttribute("block-resize");
  }, [props.blockResize]);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    "div",
    {
      role: "separator",
      ref: separatorRef,
      hidden: props.hideSplitter,
      className: clsx$3(styles["splitter-bar"], { [styles.light]: theme === "light" }),
      "data-primaryelement": props.primaryIndex,
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            color: "inherit",
            size: "small",
            className: styles["splitter-far-collapse-button"],
            hidden: props.hideButtons,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowDownIcon, { fontSize: "small" })
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            color: "inherit",
            size: "small",
            className: styles["splitter-near-collapse-button"],
            hidden: props.hideButtons,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowDownIcon, { fontSize: "small" })
          }
        )
      ]
    }
  );
}
const getMeasurements = (orientation) => {
  if (orientation === "vertical")
    return {
      dimension: "width",
      minDimension: "minWidth",
      maxDimension: "maxWidth",
      restrictedDimension: "Height",
      size: "offsetWidth",
      offset: "offsetLeft",
      position: "left",
      position2: "right",
      pagePosition: "pageX",
      scroll: "scrollLeft"
    };
  return {
    dimension: "height",
    minDimension: "minHeight",
    maxDimension: "maxHeight",
    restrictedDimension: "Width",
    size: "offsetHeight",
    offset: "offsetTop",
    position: "top",
    position2: "bottom",
    pagePosition: "pageY",
    scroll: "scrollTop"
  };
};
const getChildren = (children) => {
  if (children === null || children === void 0 || typeof children === "boolean") {
    return null;
  }
  if (Array.isArray(children))
    return children.filter((child) => child !== null && child !== void 0 && typeof child !== "boolean");
  return [children];
};
const SplitterContext = reactExports.createContext(null);
const SplitterIndexContext = reactExports.createContext(null);
const useSplitterItem = () => {
  const splitterContext = reactExports.useContext(SplitterContext);
  const index2 = reactExports.useContext(SplitterIndexContext);
  if (!splitterContext || index2 === null) throw new Error("useSplitterItem must be used inside SmetaSplitter");
  return (propertyName, oldValue, newValue) => splitterContext(index2, propertyName, oldValue, newValue);
};
function SmetaSplitter(props) {
  const splitterRef = reactExports.useRef(null);
  const sizeSplitterContainer = reactExports.useRef({ width: 0, height: 0 });
  const splitterItems = reactExports.useRef([]);
  const splitterBars = reactExports.useRef([]);
  const measurements = reactExports.useRef(void 0);
  const resizeEventFired = reactExports.useRef(false);
  const noNeighbourValidation = reactExports.useRef(false);
  const splitterSize = reactExports.useRef(0);
  const sizeLimitsItems = reactExports.useRef({});
  const sizeItemsBeforeCollapse = reactExports.useRef({});
  const originalSizeItems = reactExports.useRef({});
  const currentSizeItems = reactExports.useRef({});
  const collapsedSplitterItems = reactExports.useRef({});
  const minMaxSizeItems = reactExports.useRef({});
  const paddingsItems = reactExports.useRef({});
  const neighbourItemItems = reactExports.useRef({});
  const ignorePropertyValueItems = reactExports.useRef({});
  const collapseButtonPressed = reactExports.useRef();
  const dragDetails = reactExports.useRef();
  const splitBarDummy = reactExports.useRef();
  const splitterBackgroundFeedback = reactExports.useRef();
  const animationsOn = useAtomValue(animationsAtom);
  const splitterIsInitializing = reactExports.useRef(true);
  const primaryElement = props.primaryIndex === "end" ? "end" : "start";
  const transitionDuration = props.transitionDuration !== void 0 ? props.transitionDuration : 250;
  const resizeTimeout = reactExports.useRef();
  const propertyChangedHandler = reactExports.useCallback(
    (index2, propertyName, oldValue, newValue) => {
      if (propertyName === "collapsed") {
        ignorePropertyValueItems.current[index2] = true;
        if (newValue) {
          collapse(index2);
        } else expand(index2);
      } else {
        const value = typeof newValue === "string" ? newValue : "";
        setSize(propertyName, value, index2);
      }
    },
    []
  );
  reactExports.useEffect(() => {
    if (props.hideSplitterCollapsed) {
      splitterRef.current.setAttribute("data-hideSplitterCollapsed", "");
    } else splitterRef.current.removeAttribute("data-hideSplitterCollapsed");
  }, [props.hideSplitterCollapsed]);
  reactExports.useEffect(() => {
    measurements.current = getMeasurements(props.orientation);
  }, [props.orientation]);
  reactExports.useEffect(() => {
    splitterItems.current = [];
    splitterBars.current = [];
    Array.from(splitterRef.current.children[0].children).forEach((child) => {
      if (child instanceof HTMLDivElement)
        if (child.classList.contains(styles["splitter-item"])) {
          splitterItems.current.push(child);
        } else {
          splitterBars.current.push(child);
        }
    });
  }, [props.children]);
  reactExports.useEffect(() => {
    const splitterContainer = splitterRef.current;
    splitterRef.current.resize = handleResize;
    splitterRef.current.expand = splitterExpand;
    splitterRef.current.collapse = splitterCollapse;
    sizeSplitterContainer.current = {
      width: splitterContainer.offsetWidth,
      height: splitterContainer.offsetHeight
    };
    const childrenArray = getChildren(props.children);
    splitterItems.current.forEach((item, i) => {
      const childProps = childrenArray[i].props;
      if (primaryElement === "end" && i === childrenArray.length - 1) {
        collapsedSplitterItems.current[i] = false;
      } else if (primaryElement === "start" && i === 0) {
        collapsedSplitterItems.current[i] = false;
      } else collapsedSplitterItems.current[i] = childProps.collapsed ?? childProps.defaultCollapsed ?? false;
      minMaxSizeItems.current[i] = {
        min: childProps.min ?? "",
        max: childProps.max ?? "",
        size: childProps.size ?? ""
      };
    });
    handleSplitterBars();
    splitterItems.current.forEach((item, i) => {
      if (minMaxSizeItems.current[i].min) setSize("min", minMaxSizeItems.current[i].min, i);
      if (minMaxSizeItems.current[i].max) setSize("max", minMaxSizeItems.current[i].max, i);
    });
    validateItemSize();
    splitterIsInitializing.current = false;
    const resizeObserver = new ResizeObserver(handleResize);
    resizeObserver.observe(splitterContainer);
    window.addEventListener("pointerup", documentUpHandler);
    window.addEventListener("pointermove", resize2);
    return () => {
      resizeObserver.unobserve(splitterContainer);
      resizeObserver.disconnect();
      window.removeEventListener("pointerup", documentUpHandler);
      window.removeEventListener("pointermove", resize2);
    };
  }, []);
  const getNonPrimaryElementIndex = (item) => {
    const totalItems = splitterItems.current.length;
    if (totalItems < 2) return void 0;
    if (item === void 0) return primaryElement === "start" ? 1 : totalItems - 2;
    const primaryIndex = primaryElement === "start" ? 0 : totalItems - 1;
    if (item === primaryIndex) return void 0;
    if (item < 0 || item >= totalItems) return void 0;
    return item;
  };
  const splitterCollapse = (needToDo, item) => {
    const itemIndex = getNonPrimaryElementIndex(item);
    if (itemIndex !== void 0) {
      collapse(itemIndex);
      if (needToDo)
        setTimeout(
          () => {
            var _a2;
            (_a2 = props.onCollapse) == null ? void 0 : _a2.call(props, splitterRef.current);
          },
          animationsOn ? transitionDuration + 1 : 0
        );
    }
  };
  const splitterExpand = (needToDo, item) => {
    const itemIndex = getNonPrimaryElementIndex(item);
    if (itemIndex !== void 0) {
      expand(itemIndex);
      if (needToDo)
        setTimeout(
          () => {
            var _a2;
            (_a2 = props.onExpand) == null ? void 0 : _a2.call(props, splitterRef.current);
          },
          animationsOn ? transitionDuration + 1 : 0
        );
    }
  };
  const collapse = (itemIndex, isNearSide) => {
    var _a2;
    const item = splitterItems.current[itemIndex];
    if (!ignorePropertyValueItems.current[itemIndex] && collapsedSplitterItems.current[itemIndex]) return;
    if (itemIndex === splitterItems.current.length - 1) {
      isNearSide = true;
    } else if (itemIndex === 0) {
      isNearSide = false;
    }
    const direction2 = isNearSide ? -1 : 1;
    let neighbourIndex = itemIndex + direction2;
    let neighbour = splitterItems.current[neighbourIndex];
    while (neighbour && collapsedSplitterItems.current[neighbourIndex]) {
      neighbourIndex += direction2;
      neighbour = splitterItems.current[neighbourIndex];
    }
    if (!neighbour) {
      collapsedSplitterItems.current[itemIndex] = false;
      return;
    }
    delete ignorePropertyValueItems.current[itemIndex];
    if (!sizeItemsBeforeCollapse.current[itemIndex]) {
      sizeItemsBeforeCollapse.current[itemIndex] = item[measurements.current.size];
    }
    if (!sizeItemsBeforeCollapse.current[neighbourIndex]) {
      sizeItemsBeforeCollapse.current[neighbourIndex] = neighbour[measurements.current.size];
    }
    const splitterBar = primaryElement === "end" ? splitterBars.current[itemIndex] : splitterBars.current[itemIndex - 1];
    const totalSize = neighbour[measurements.current.size] + item[measurements.current.size];
    const minSize = !props.hideSplitterCollapsed && (splitterBar == null ? void 0 : splitterBar[measurements.current.size]) !== void 0 ? splitterBar[measurements.current.size] : sizeLimitsItems.current[itemIndex][measurements.current.minDimension];
    const hiddensBarsSize = props.hideSplitterCollapsed ? 10 : 0;
    const targetSize = totalSize - minSize;
    if (totalSize && targetSize < minSize) {
      collapsedSplitterItems.current[itemIndex] = false;
      return;
    }
    if (animationsOn && !splitterIsInitializing.current) {
      splitterRef.current.classList.add(styles.animate);
      if (!item.style[measurements.current.dimension]) {
        item.style[measurements.current.dimension] = item[measurements.current.size] + "px";
      }
      item.style.transition = `all ${transitionDuration}ms cubic-bezier(0.4, 0, 0.2, 1)`;
      neighbour.style.transition = `all ${transitionDuration}ms cubic-bezier(0.4, 0, 0.2, 1)`;
      setTimeout(() => {
        splitterRef.current.classList.remove(styles.animate);
        item.style.transition = "";
        neighbour.style.transition = "";
      }, transitionDuration + 1);
    }
    if (!paddingsItems.current[itemIndex]) {
      const computed = getComputedStyle(item);
      const startPadding = parseFloat(computed.getPropertyValue("padding-" + measurements.current.position)) || 0;
      const endPadding = parseFloat(computed.getPropertyValue("padding-" + measurements.current.position2)) || 0;
      paddingsItems.current[itemIndex] = startPadding + endPadding;
    }
    if (sizeItemsBeforeCollapse.current[neighbourIndex] !== void 0) {
      sizeItemsBeforeCollapse.current[neighbourIndex] += sizeItemsBeforeCollapse.current[itemIndex];
    }
    if (((_a2 = sizeLimitsItems.current[neighbourIndex]) == null ? void 0 : _a2[measurements.current.maxDimension]) && totalSize > sizeLimitsItems.current[neighbourIndex][measurements.current.maxDimension]) {
      sizeLimitsItems.current[neighbourIndex].ignoreUpdate = true;
      neighbour.style[measurements.current.maxDimension] = sizeItemsBeforeCollapse.current[neighbourIndex] ? sizeItemsBeforeCollapse.current[neighbourIndex] + hiddensBarsSize + "px" : "";
    }
    if (sizeItemsBeforeCollapse.current[neighbourIndex]) {
      neighbour.style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[neighbourIndex] + hiddensBarsSize + "px";
    }
    item.style[measurements.current.dimension] = item.style[measurements.current.minDimension] = "0";
    item.style.padding = "0";
    neighbourItemItems.current[itemIndex] = neighbourIndex;
    collapsedSplitterItems.current[itemIndex] = true;
    splitterBar.setAttribute("data-itemcollapsed", "");
  };
  const expand = (itemIndex) => {
    const item = splitterItems.current[itemIndex];
    if (ignorePropertyValueItems.current[itemIndex] || collapsedSplitterItems.current[itemIndex]) {
      if (!splitterItems.current[neighbourItemItems.current[itemIndex]]) {
        collapsedSplitterItems.current[itemIndex] = true;
        return;
      }
      let neighbourItemIndex = neighbourItemItems.current[itemIndex];
      delete ignorePropertyValueItems.current[itemIndex];
      if (!ignorePropertyValueItems.current[neighbourItemIndex] && collapsedSplitterItems.current[neighbourItemIndex]) {
        const direction2 = itemIndex > neighbourItemIndex ? -1 : 1;
        do {
          neighbourItemIndex += direction2;
          neighbourItemItems.current[itemIndex] = neighbourItemIndex;
        } while (splitterItems.current[neighbourItemIndex] && collapsedSplitterItems.current[neighbourItemIndex]);
      }
      if (!splitterItems.current[neighbourItemIndex]) {
        collapsedSplitterItems.current[itemIndex] = true;
        return;
      }
      if (minMaxSizeItems.current[itemIndex].min)
        setSize("min", minMaxSizeItems.current[itemIndex].min, itemIndex, true);
      const neighbourSizeBeforeCollapse = sizeItemsBeforeCollapse.current[neighbourItemIndex];
      const minSize = sizeLimitsItems.current[itemIndex][measurements.current.minDimension];
      const neighbourMinSize = sizeLimitsItems.current[neighbourItemIndex][measurements.current.minDimension];
      const availableSize = neighbourSizeBeforeCollapse - minSize;
      if (neighbourSizeBeforeCollapse && availableSize < neighbourMinSize) {
        collapsedSplitterItems.current[itemIndex] = true;
        return;
      }
      if (!paddingsItems.current[neighbourItemIndex]) {
        const neighbourStyle = getComputedStyle(splitterItems.current[neighbourItemIndex]);
        paddingsItems.current[neighbourItemIndex] = (parseFloat(neighbourStyle.getPropertyValue("padding-" + measurements.current.position)) || 0) + (parseFloat(neighbourStyle.getPropertyValue("padding-" + measurements.current.position2)) || 0);
      }
      if (!paddingsItems.current[itemIndex]) {
        const itemStyle = getComputedStyle(item);
        paddingsItems.current[itemIndex] = (parseFloat(itemStyle.getPropertyValue("padding-" + measurements.current.position)) || 0) + (parseFloat(itemStyle.getPropertyValue("padding-" + measurements.current.position2)) || 0);
      }
      if (typeof minMaxSizeItems.current[itemIndex].size === "string" && minMaxSizeItems.current[itemIndex].size.includes("%") && (!sizeItemsBeforeCollapse.current[itemIndex] || sizeItemsBeforeCollapse.current[itemIndex] === 0) && sizeItemsBeforeCollapse.current[neighbourItemIndex]) {
        let totalSize = 0;
        splitterItems.current.forEach((splitterItem, i) => {
          if (collapsedSplitterItems.current[i]) return;
          if (splitterItem.style[measurements.current.dimension] && !splitterItem.style[measurements.current.dimension].includes("%") && sizeItemsBeforeCollapse.current[i]) {
            totalSize += sizeItemsBeforeCollapse.current[i];
          } else {
            totalSize += splitterItem.getBoundingClientRect()[measurements.current.dimension];
          }
        });
        sizeItemsBeforeCollapse.current[itemIndex] = totalSize * parseFloat(minMaxSizeItems.current[itemIndex].size) / 100;
      }
      const newSize = Math.min(
        Math.max(minSize, sizeItemsBeforeCollapse.current[itemIndex]),
        neighbourSizeBeforeCollapse - paddingsItems.current[neighbourItemIndex] - paddingsItems.current[itemIndex] - neighbourMinSize
      );
      if (newSize < 0) {
        collapsedSplitterItems.current[itemIndex] = true;
        return;
      }
      if (minMaxSizeItems.current[itemIndex].min) item.style[measurements.current.minDimension] = "0";
      if (animationsOn && !splitterIsInitializing.current) {
        splitterRef.current.classList.add(styles.animate);
        item.style.transition = `all ${transitionDuration}ms cubic-bezier(0.4, 0, 0.2, 1)`;
        splitterItems.current[neighbourItemIndex].style.transition = `all ${transitionDuration}ms cubic-bezier(0.4, 0, 0.2, 1)`;
        setTimeout(() => {
          splitterRef.current.classList.remove(styles.animate);
          item.style.transition = "";
          splitterItems.current[neighbourItemIndex].style.transition = "";
        }, transitionDuration + 1);
      }
      item.style.padding = "";
      if (minMaxSizeItems.current[itemIndex].min) {
        item.style[measurements.current.minDimension] = sizeLimitsItems.current[itemIndex][measurements.current.minDimension] + "px";
      }
      sizeItemsBeforeCollapse.current[itemIndex] = newSize;
      item.style[measurements.current.dimension] = newSize + "px";
      sizeItemsBeforeCollapse.current[neighbourItemIndex] = Math.max(
        sizeLimitsItems.current[neighbourItemIndex][measurements.current.minDimension],
        neighbourSizeBeforeCollapse - newSize
      );
      splitterItems.current[neighbourItemIndex].style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[neighbourItemIndex] + "px";
      if (sizeLimitsItems.current[neighbourItemIndex][measurements.current.maxDimension]) {
        splitterItems.current[neighbourItemIndex].style[measurements.current.maxDimension] = sizeLimitsItems.current[neighbourItemIndex][measurements.current.maxDimension] + "px";
      }
      collapsedSplitterItems.current[itemIndex] = false;
      if (itemIndex > neighbourItemItems.current[itemIndex]) {
        item.previousElementSibling.removeAttribute("data-itemcollapsed");
      } else {
        item.nextElementSibling.removeAttribute("data-itemcollapsed");
      }
      delete neighbourItemItems.current[itemIndex];
    }
  };
  const validateSize = (itemIndex) => {
    if (collapsedSplitterItems.current[itemIndex]) return;
    const item = splitterItems.current[itemIndex];
    const currentSize = sizeItemsBeforeCollapse.current[itemIndex] ? sizeItemsBeforeCollapse.current[itemIndex] : item.getBoundingClientRect()[measurements.current.dimension];
    const validateLimit = (type2) => {
      const dimensionKey = type2 === "min" ? "minDimension" : "maxDimension";
      const styleValue = item.style[measurements.current[dimensionKey]];
      const sizeLimit = sizeLimitsItems.current[itemIndex][measurements.current[dimensionKey]];
      const computedStyle = styleValue;
      const isBelowMin = type2 === "min" && currentSize < sizeLimit;
      const isAboveMax = type2 === "max" && currentSize > sizeLimit;
      if (isBelowMin || isAboveMax) {
        item.style[measurements.current.dimension] = typeof computedStyle === "string" && computedStyle.includes("%") ? computedStyle : sizeLimit + "px";
        sizeItemsBeforeCollapse.current[itemIndex] = sizeLimit;
      }
    };
    if (minMaxSizeItems.current[itemIndex].min) validateLimit("min");
    if (minMaxSizeItems.current[itemIndex].max) validateLimit("max");
  };
  const validateNeighbourSizeLimits = (itemIndex) => {
    function setSizeLimitsForItem(index2) {
      if (splitterItems.current[index2]) {
        if (minMaxSizeItems.current[index2].min) setSize("min", minMaxSizeItems.current[index2].min, index2, true);
        if (minMaxSizeItems.current[index2].max) setSize("max", minMaxSizeItems.current[index2].max, index2, true);
      }
    }
    if (!splitterItems.current.length) return;
    noNeighbourValidation.current = true;
    setSizeLimitsForItem(itemIndex - 1);
    setSizeLimitsForItem(itemIndex + 1);
    noNeighbourValidation.current = false;
  };
  const setSize = (property, value, itemIndex, skipValidation) => {
    const getAvailableSize = () => {
      const bars = splitterBars.current;
      let totalBarSize = 0;
      for (let i = 0; i < bars.length; i++) {
        totalBarSize += bars[i][measurements.current.size];
      }
      return sizeSplitterContainer.current[measurements.current.dimension] - totalBarSize;
    };
    const item = splitterItems.current[itemIndex];
    const isPercent = typeof value === "string" && value.includes("%");
    const availableSize = getAvailableSize();
    const toPercent = (px) => 100 * px / availableSize;
    const valueLocal = isNaN(parseFloat(value)) ? 0 : parseFloat(value);
    switch (property) {
      case "size": {
        const prevSize = item[measurements.current.size];
        if (value !== "auto" && value) {
          if (isPercent) {
            item.style[measurements.current.dimension] = valueLocal + "%";
            sizeItemsBeforeCollapse.current[itemIndex] = valueLocal * availableSize / 100;
          } else {
            sizeItemsBeforeCollapse.current[itemIndex] = valueLocal;
            item.style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[itemIndex] + "px";
          }
        } else {
          item.style[measurements.current.dimension] = value;
          sizeItemsBeforeCollapse.current[itemIndex] = item[measurements.current.size];
        }
        validateSize(itemIndex);
        const diff = prevSize - sizeItemsBeforeCollapse.current[itemIndex];
        if (originalSizeItems.current[itemIndex]) {
          originalSizeItems.current[itemIndex] = isPercent ? valueLocal + "%" : sizeItemsBeforeCollapse.current[itemIndex];
        }
        const lastItem = splitterItems.current[splitterItems.current.length - 1];
        if (item === lastItem) {
          let fallbackItemIndex = splitterItems.current.findIndex(
            (it, i) => it !== item && !collapsedSplitterItems.current[i] && !minMaxSizeItems.current[i].size
          );
          if (fallbackItemIndex === -1) {
            for (let i = splitterItems.current.length - 2; i >= 0; i--) {
              const candidate = splitterItems.current[i];
              if (!collapsedSplitterItems.current[i] && candidate !== item) {
                fallbackItemIndex = i;
                break;
              }
            }
          }
          if (fallbackItemIndex !== -1) {
            sizeItemsBeforeCollapse.current[fallbackItemIndex] = Math.max(
              0,
              splitterItems.current[fallbackItemIndex][measurements.current.size] + diff
            );
            splitterItems.current[fallbackItemIndex].style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[fallbackItemIndex] + "px";
          }
        }
        break;
      }
      case "min": {
        const minValue = isPercent ? valueLocal * availableSize / 100 : valueLocal;
        sizeLimitsItems.current[itemIndex].minWidth = sizeLimitsItems.current[itemIndex].minHeight = minValue;
        item.style[measurements.current.minDimension] = collapsedSplitterItems.current[itemIndex] || !minValue ? "" : isPercent ? toPercent(minValue) + "%" : minValue + "px";
        item.style["min" + measurements.current.restrictedDimension] = "";
        validateSize(itemIndex);
        if (minValue || !noNeighbourValidation.current) validateNeighbourSizeLimits(itemIndex);
        if (minMaxSizeItems.current[itemIndex].size) {
          setSize("size", minMaxSizeItems.current[itemIndex].size, itemIndex, skipValidation);
          return;
        }
        break;
      }
      case "max": {
        const maxValue = isPercent ? valueLocal * availableSize / 100 : valueLocal;
        sizeLimitsItems.current[itemIndex].maxWidth = maxValue;
        sizeLimitsItems.current[itemIndex].maxHeight = maxValue;
        item.style[measurements.current.maxDimension] = maxValue ? isPercent ? toPercent(maxValue) + "%" : maxValue + "px" : "";
        item.style["max" + measurements.current.restrictedDimension] = "";
        validateSize(itemIndex);
        if (maxValue || !noNeighbourValidation.current) validateNeighbourSizeLimits(itemIndex);
        if (minMaxSizeItems.current[itemIndex].size) {
          setSize("size", minMaxSizeItems.current[itemIndex].size, itemIndex, skipValidation);
          return;
        }
        break;
      }
    }
    if (!skipValidation) validateItemSize(true);
  };
  const handleSplitterBars = () => {
    for (let i = 0; i < splitterItems.current.length; i++) {
      const item = splitterItems.current[i];
      item.style[measurements.current.restrictedDimension.toLowerCase()] = "100%";
      item.style["max" + measurements.current.restrictedDimension] = "none";
      if (!minMaxSizeItems.current[i].size) {
        item.style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[i] ? sizeItemsBeforeCollapse.current[i] + "px" : "";
      }
      item.style[measurements.current.maxDimension] = minMaxSizeItems.current[i].max ? sizeLimitsItems.current[i][measurements.current.maxDimension] + "px" : "";
      if (collapsedSplitterItems.current[i]) {
        item.style.minWidth = "";
        item.style.minHeight = "";
        item.style[measurements.current.minDimension] = "0";
        ignorePropertyValueItems.current[i] = true;
        collapse(i);
      } else {
        item.style[measurements.current.minDimension] = sizeLimitsItems.current[i] && minMaxSizeItems.current[i].min ? sizeLimitsItems.current[i][measurements.current.minDimension] + "px" : "";
      }
    }
  };
  const validateItemsSizeUnderflowing = (remainingSize, isResizing) => {
    const totalItems = splitterItems.current.length;
    let currentSize, newSize, availableSize = 0;
    remainingSize = Math.abs(remainingSize);
    for (let i = 0; i < totalItems; i++) {
      const item = splitterItems.current[i];
      if (!collapsedSplitterItems.current[i] && item[measurements.current.size] < (sizeLimitsItems.current[i] ? sizeLimitsItems.current[i][measurements.current.minDimension] : 0)) {
        currentSize = item[measurements.current.size];
        availableSize = currentSize + remainingSize;
        if (currentSize < sizeLimitsItems.current[i][measurements.current.minDimension]) {
          sizeLimitsItems.current[i].ignoreUpdate = !isResizing;
          item.style[measurements.current.minDimension] = (sizeItemsBeforeCollapse.current[i] = Math.max(
            0,
            Math.min(sizeLimitsItems.current[i][measurements.current.minDimension], availableSize)
          )) + "px";
        }
        remainingSize -= (sizeItemsBeforeCollapse.current[i] || item[measurements.current.size]) - currentSize;
        if (remainingSize <= 0) break;
      }
    }
    const containerSize = sizeSplitterContainer.current[measurements.current.dimension];
    if (remainingSize > 0) {
      for (let i = 0; i < totalItems; i++) {
        const item = splitterItems.current[i];
        if (!collapsedSplitterItems.current[i] && originalSizeItems.current[i] !== void 0) {
          const originalSize = typeof originalSizeItems.current[i] === "number" ? originalSizeItems.current[i].toString() : originalSizeItems.current[i];
          if (originalSize.indexOf("%") > -1) {
            const originalSizeInPixels = parseFloat(originalSize) * containerSize / 100;
            newSize = Math.min(originalSizeInPixels, item[measurements.current.size] + remainingSize);
            const sizeDifference = newSize - item[measurements.current.size];
            if (sizeLimitsItems.current[i][measurements.current.minDimension] < sizeLimitsItems.current[i][measurements.current.minDimension]) {
              item.style[measurements.current.minDimension] = Math.min(sizeLimitsItems.current[i][measurements.current.minDimension], newSize) + "px";
            }
            item.style[measurements.current.dimension] = newSize === originalSizeInPixels ? originalSize : newSize + "px";
            sizeItemsBeforeCollapse.current[i] = Math.max(0, newSize);
            remainingSize -= sizeDifference;
          } else {
            const originalSize2 = typeof originalSizeItems.current[i] === "string" ? parseFloat(originalSizeItems.current[i]) : originalSizeItems.current[i];
            if (item[measurements.current.size] >= originalSizeItems.current[i]) {
              remainingSize += item[measurements.current.size] - originalSize2;
              item.style[measurements.current.dimension] = (sizeItemsBeforeCollapse.current[i] = originalSize2) + "px";
            } else {
              newSize = Math.min(originalSize2, item[measurements.current.size] + remainingSize);
              const sizeDifference = newSize - item[measurements.current.size];
              item.style[measurements.current.dimension] = (sizeItemsBeforeCollapse.current[i] = Math.max(0, Math.min(newSize, originalSize2))) + "px";
              remainingSize -= sizeDifference;
            }
          }
        }
        if (remainingSize <= 0) break;
      }
    }
  };
  const validateItemLimits = (itemIndex, newSize) => {
    const element = splitterItems.current[itemIndex];
    const containerSize = splitterRef.current.parentElement.getBoundingClientRect()[measurements.current.dimension];
    const minLimit = minMaxSizeItems.current[itemIndex]._min || minMaxSizeItems.current[itemIndex].min;
    if (minLimit) {
      const isPercent = typeof minLimit === "string" && minLimit.includes("%");
      const minValue = isPercent ? parseFloat(minLimit) * containerSize / 100 : parseFloat(minLimit);
      if (minValue > newSize) {
        element.style[measurements.current.minDimension] = isPercent ? `${100 * newSize / containerSize}%` : `${newSize}px`;
        sizeLimitsItems.current[itemIndex][measurements.current.minDimension] = newSize;
        minMaxSizeItems.current[itemIndex]._min = minLimit;
        minMaxSizeItems.current[itemIndex].min = element.style[measurements.current.minDimension];
      } else if (minValue < newSize) {
        element.style[measurements.current.minDimension] = isPercent ? `${100 * minValue / containerSize}%` : `${minValue}px`;
        sizeLimitsItems.current[itemIndex][measurements.current.minDimension] = minValue;
        minMaxSizeItems.current[itemIndex].min = minLimit;
        delete minMaxSizeItems.current[itemIndex]._min;
      }
    }
    const maxLimit = minMaxSizeItems.current[itemIndex]._max || minMaxSizeItems.current[itemIndex].max;
    if (maxLimit) {
      const isPercent = typeof maxLimit === "string" && maxLimit.includes("%");
      const maxValue = isPercent ? parseFloat(maxLimit) * containerSize / 100 : parseFloat(maxLimit);
      if (maxValue < newSize) {
        element.style[measurements.current.maxDimension] = isPercent ? `${100 * newSize / containerSize}%` : `${newSize}px`;
        sizeLimitsItems.current[itemIndex][measurements.current.maxDimension] = newSize;
        minMaxSizeItems.current[itemIndex]._max = maxLimit;
        minMaxSizeItems.current[itemIndex].max = element.style[measurements.current.maxDimension];
      } else if (maxValue > newSize) {
        element.style[measurements.current.maxDimension] = isPercent ? `${100 * maxValue / containerSize}%` : `${maxValue}px`;
        sizeLimitsItems.current[itemIndex][measurements.current.maxDimension] = maxValue;
        minMaxSizeItems.current[itemIndex].max = maxLimit;
        delete minMaxSizeItems.current[itemIndex]._max;
      }
    }
  };
  const autoFitLastItem = (itemIndex) => {
    const referenceItem = splitterItems.current[itemIndex];
    const totalItems = splitterItems.current.length;
    if (totalItems === 1) {
      setSize("size", "100%", itemIndex, true);
      delete originalSizeItems.current[itemIndex];
    } else {
      let totalSize = 0, totalBarsSize = 0, hiddensBarsSize = 0;
      splitterItems.current.forEach((item, index2) => {
        if (collapsedSplitterItems.current[index2]) return;
        const sizeStr = item.style[measurements.current.dimension];
        if (sizeStr && sizeStr.indexOf("%") < -1 && sizeItemsBeforeCollapse.current[index2]) {
          totalSize += sizeItemsBeforeCollapse.current[index2];
        } else {
          totalSize += item[measurements.current.size];
        }
      });
      splitterBars.current.forEach((bar) => {
        if (bar.hasAttribute("data-itemcollapsed") && props.hideSplitterCollapsed) {
          hiddensBarsSize += 10;
        } else totalBarsSize += bar[measurements.current.size];
      });
      const totalCombinedSize = totalSize + totalBarsSize;
      const containerSize = sizeSplitterContainer.current[measurements.current.dimension];
      if (totalCombinedSize !== containerSize) {
        const currentSize = referenceItem.style[measurements.current.dimension].indexOf("%") < -1 && sizeItemsBeforeCollapse.current[itemIndex] ? sizeItemsBeforeCollapse.current[itemIndex] : referenceItem[measurements.current.size];
        const diff = Math.abs(containerSize - totalCombinedSize);
        const direction2 = totalCombinedSize < containerSize ? 1 : -1;
        const newSize = Math.max(0, currentSize + direction2 * diff);
        sizeItemsBeforeCollapse.current[itemIndex] = newSize - hiddensBarsSize;
        referenceItem.style[measurements.current.dimension] = newSize + "px";
        delete originalSizeItems.current[itemIndex];
        validateItemLimits(itemIndex, newSize);
      }
    }
  };
  const autoFitItems = () => {
    const totalItems = splitterItems.current.length;
    if (totalItems === 0) return;
    let referenceItem;
    const sizedItems = [];
    for (let i = totalItems - 1; i >= 0; i--) {
      const minMaxSizeChild = minMaxSizeItems.current[i];
      if (collapsedSplitterItems.current[i]) ;
      else if (referenceItem !== void 0) {
        if (!minMaxSizeChild.size) sizedItems.push(i);
      } else {
        referenceItem = i;
      }
    }
    if (referenceItem !== void 0 && minMaxSizeItems.current[referenceItem].size && sizedItems.length > 0) {
      referenceItem = sizedItems.find(
        (item) => !minMaxSizeItems.current[item].max && !sizeLimitsItems.current[item][measurements.current.maxDimension]
      ) || referenceItem;
    }
    autoFitLastItem(referenceItem);
  };
  const keepItemProportionsOnResize = () => {
    var _a2;
    let totalSize = 0;
    const visibleItems = [];
    for (let index2 = 0; index2 < splitterItems.current.length; index2++) {
      const currentItem = splitterItems.current[index2];
      if (collapsedSplitterItems.current[index2]) continue;
      visibleItems.push(index2);
      totalSize += sizeItemsBeforeCollapse.current[index2] || currentItem[measurements.current.size];
    }
    if (splitterSize.current) totalSize = splitterSize.current;
    if (splitterItems.current.length === 1) return;
    const containerSize = splitterRef.current.getBoundingClientRect()[measurements.current.dimension];
    for (let index2 = 0; index2 < visibleItems.length; index2++) {
      const currentItemIndex = visibleItems[index2];
      const currentItem = splitterItems.current[currentItemIndex];
      const currentItemStyleSize = currentItem.style[measurements.current.dimension];
      const currentItemStyleMinSize = currentItem.style[measurements.current.minDimension];
      if (currentItemStyleSize.indexOf("%") > -1 || currentItemStyleMinSize.indexOf("%") > -1) {
        validateItemLimits(currentItemIndex, currentItem[measurements.current.size] / totalSize * containerSize);
        continue;
      }
      const itemSizeBeforeCollapse = sizeItemsBeforeCollapse.current[currentItemIndex] || currentItem[measurements.current.size];
      const newItemSize = itemSizeBeforeCollapse / totalSize * containerSize;
      if (itemSizeBeforeCollapse !== newItemSize) {
        currentItem.style[measurements.current.dimension] = newItemSize + "px";
        if (containerSize !== splitterRef.current.getBoundingClientRect()[measurements.current.dimension]) {
          currentItem.style[measurements.current.dimension] = itemSizeBeforeCollapse + "px";
          return;
        }
        currentItem.style[measurements.current.dimension] = (sizeItemsBeforeCollapse.current[currentItemIndex] = newItemSize) + "px";
        validateItemLimits(currentItemIndex, newItemSize);
      }
    }
    (_a2 = props.onResizeEnd) == null ? void 0 : _a2.call(props, splitterRef.current);
  };
  const validateItemsSizeOverflowing = (remainingSize, isResizing) => {
    const itemCount = splitterItems.current.length;
    let availableShrink = remainingSize;
    let adjustedSize = 0;
    let itemComputedSize, sizeString, sizeIsAuto;
    for (let i = 0; i < itemCount; i++) {
      const item = splitterItems.current[i];
      sizeString = item.style[measurements.current.dimension];
      if (!sizeString) sizeString = "auto";
      itemComputedSize = sizeString.includes("%") ? sizeString : item[measurements.current.size];
      if (!sizeString && !minMaxSizeItems.current[i].size && Number(minMaxSizeItems.current[i].size) !== 0) {
        delete originalSizeItems.current[i];
      }
      sizeIsAuto = itemComputedSize === "auto" && minMaxSizeItems.current[i].size && isNaN(parseFloat(minMaxSizeItems.current[i].size)) || minMaxSizeItems.current[i].size === "auto";
      originalSizeItems.current[i] = originalSizeItems.current[i] && !sizeIsAuto ? originalSizeItems.current[i] : itemComputedSize;
    }
    for (let i = itemCount - 1; i >= 0; i--) {
      const item = splitterItems.current[i];
      if (collapsedSplitterItems.current[i] || availableShrink <= 0) continue;
      const originalSize = String(originalSizeItems.current[i]);
      if (originalSize.includes("%")) {
        let sizeInPixels = item.style[measurements.current.dimension] || item[measurements.current.size];
        if (typeof sizeInPixels === "string") {
          if (sizeInPixels.includes("%")) {
            sizeInPixels = parseFloat(sizeInPixels) / 100 * sizeSplitterContainer.current[measurements.current.dimension];
          } else sizeInPixels = parseFloat(sizeInPixels);
        }
        item.style[measurements.current.dimension] = originalSize;
        sizeItemsBeforeCollapse.current[i] = sizeSplitterContainer.current[measurements.current.dimension] * parseFloat(originalSize) / 100;
        availableShrink -= sizeInPixels - sizeItemsBeforeCollapse.current[i];
      } else {
        const currentSize = item[measurements.current.size];
        adjustedSize = currentSize - availableShrink;
        const minSize = sizeLimitsItems.current[i] ? sizeLimitsItems.current[i][measurements.current.minDimension] : 0;
        sizeItemsBeforeCollapse.current[i] = Math.max(minSize, adjustedSize);
        item.style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[i] + "px";
        availableShrink -= currentSize - sizeItemsBeforeCollapse.current[i];
      }
    }
    if (availableShrink > 0) {
      for (let i = itemCount - 1; i >= 0; i--) {
        const item = splitterItems.current[i];
        if (collapsedSplitterItems.current[i]) continue;
        const currentSize = item[measurements.current.size];
        adjustedSize = currentSize - availableShrink;
        let minSize = sizeLimitsItems.current[i][measurements.current.minDimension] || minMaxSizeItems.current[i].min;
        if (minSize) {
          if (typeof minSize === "string") {
            if (minSize.includes("%")) {
              minSize = parseFloat(minSize) / 100 * splitterRef.current[measurements.current.size];
            } else minSize = parseFloat(minSize);
          }
          if (minSize > adjustedSize) {
            sizeLimitsItems.current[i].ignoreUpdate = !isResizing;
            item.style[measurements.current.minDimension] = Math.max(0, adjustedSize) + "px";
          }
        }
        if (availableShrink === 0 && originalSizeItems.current[i] && String(originalSizeItems.current[i]).includes("%")) {
          sizeLimitsItems.current[i].ignoreUpdate = !isResizing;
          sizeItemsBeforeCollapse.current[i] = Math.max(0, adjustedSize);
          item.style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[i] + "px";
          availableShrink -= currentSize - sizeItemsBeforeCollapse.current[i];
        }
      }
    }
  };
  const validateItemSize = (isResizing) => {
    const dimension = measurements.current.dimension;
    const containerSize = sizeSplitterContainer.current[dimension];
    const isPercentage = (value) => value.includes("%");
    let totalSize = 0;
    for (let i = 0; i < splitterItems.current.length; i++) {
      const item = splitterItems.current[i];
      const minMaxSizeChild = minMaxSizeItems.current[i];
      if (minMaxSizeChild.min && isPercentage(minMaxSizeChild.min)) {
        sizeLimitsItems.current[i][measurements.current.minDimension] = parseFloat(minMaxSizeChild.min) * containerSize / 100;
      }
      if (minMaxSizeChild.max && isPercentage(minMaxSizeChild.max)) {
        sizeLimitsItems.current[i][measurements.current.maxDimension] = parseFloat(minMaxSizeChild.max) * containerSize / 100;
      }
      if (!collapsedSplitterItems.current[i]) {
        const itemSize = item.style[dimension];
        totalSize += itemSize && itemSize.indexOf("%") < 0 && sizeItemsBeforeCollapse.current[i] ? sizeItemsBeforeCollapse.current[i] : item[measurements.current.size];
      }
    }
    if (props.keepProportionsOnResize !== false && resizeEventFired.current) {
      keepItemProportionsOnResize();
    } else {
      const overflowSize = totalSize + splitterBars.current.reduce((sum, bar) => sum + bar[measurements.current.size], 0) - containerSize;
      if (overflowSize > 0) {
        validateItemsSizeOverflowing(overflowSize, isResizing);
      } else if (overflowSize < 0) {
        validateItemsSizeUnderflowing(overflowSize, isResizing);
      }
    }
    autoFitItems();
    splitterSize.current = containerSize;
  };
  const handleResize = () => {
    clearTimeout(resizeTimeout.current);
    resizeTimeout.current = setTimeout(
      () => {
        var _a2;
        const splitterContainer = splitterRef.current;
        if (splitterContainer) {
          const newWidth = splitterContainer.offsetWidth, newHeight = splitterContainer.offsetHeight;
          if (newWidth !== sizeSplitterContainer.current.width && newHeight !== sizeSplitterContainer.current.height && (newWidth !== 0 || newHeight !== 0)) {
            sizeSplitterContainer.current = {
              width: newWidth,
              height: newHeight
            };
            resizeEventFired.current = true;
            validateItemSize();
            resizeEventFired.current = false;
            (_a2 = props.onResizeEnd) == null ? void 0 : _a2.call(props, splitterRef.current);
          }
        }
        resizeTimeout.current = void 0;
      },
      animationsOn ? 251 : 0
    );
  };
  const completeResizing = () => {
    var _a2, _b;
    if (!dragDetails.current) return;
    if (splitBarDummy.current && splitterRef.current) {
      const firstItemIndex = dragDetails.current.firstItem;
      const first = splitterItems.current[firstItemIndex];
      sizeItemsBeforeCollapse.current[firstItemIndex] = currentSizeItems.current[firstItemIndex] + paddingsItems.current[firstItemIndex];
      first.style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[firstItemIndex] + "px";
      delete originalSizeItems.current[firstItemIndex];
      const secondItemIndex = dragDetails.current.secondItem;
      const second = splitterItems.current[secondItemIndex];
      sizeItemsBeforeCollapse.current[secondItemIndex] = dragDetails.current.splitAreaSize - currentSizeItems.current[firstItemIndex] + paddingsItems.current[secondItemIndex];
      second.style[measurements.current.dimension] = sizeItemsBeforeCollapse.current[secondItemIndex] + "px";
      delete originalSizeItems.current[secondItemIndex];
      splitBarDummy.current.classList.remove(styles["limit-reached"]);
      splitBarDummy.current.remove();
      splitBarDummy.current = void 0;
      (_a2 = splitterBackgroundFeedback.current) == null ? void 0 : _a2.remove();
      splitterBackgroundFeedback.current = void 0;
      (_b = props.onResizeEnd) == null ? void 0 : _b.call(props, splitterRef.current);
    }
    dragDetails.current = void 0;
  };
  const documentUpHandler = (ev) => {
    const target = ev.target instanceof SVGPathElement || ev.target instanceof SVGElement ? ev.target.closest("button") : ev.target;
    completeResizing();
    if (collapseButtonPressed.current) {
      if (target === collapseButtonPressed.current.target) {
        if (collapsedSplitterItems.current[collapseButtonPressed.current.item]) {
          expand(collapseButtonPressed.current.item);
          setTimeout(
            () => {
              var _a2;
              (_a2 = props.onExpand) == null ? void 0 : _a2.call(props, splitterRef.current);
            },
            animationsOn ? transitionDuration + 1 : 0
          );
        } else {
          collapse(collapseButtonPressed.current.item, collapseButtonPressed.current.farCollapse);
          setTimeout(
            () => {
              var _a2;
              (_a2 = props.onCollapse) == null ? void 0 : _a2.call(props, splitterRef.current);
            },
            animationsOn ? transitionDuration + 1 : 0
          );
        }
      }
      collapseButtonPressed.current = void 0;
    }
  };
  const getTargetItem = (barElement, elementSibling, getLatest) => {
    let splitterItem = barElement[elementSibling];
    while (splitterItem) {
      if (splitterItem instanceof HTMLDivElement && splitterItem.classList.contains(styles["splitter-item"]) && !collapsedSplitterItems.current[Number(splitterItem.dataset.splitteritemindex)]) {
        return Number(splitterItem.dataset.splitteritemindex);
      }
      splitterItem = splitterItem[elementSibling];
    }
  };
  const setAdjacentOrEndDetails = (barElement) => {
    const secondItem = getTargetItem(barElement, "nextElementSibling");
    if (secondItem === void 0 || !dragDetails.current) {
      dragDetails.current = void 0;
      return true;
    }
    dragDetails.current.secondItem = secondItem;
    minMaxSizeItems.current[secondItem].size = "";
    currentSizeItems.current[secondItem] = splitterItems.current[secondItem][measurements.current.size];
    originalSizeItems.current[secondItem] = currentSizeItems.current[secondItem];
    const computedStyles = getComputedStyle(splitterItems.current[secondItem]);
    paddingsItems.current[secondItem] = (parseFloat(computedStyles.getPropertyValue("padding-" + measurements.current.position)) || 0) + (parseFloat(computedStyles.getPropertyValue("padding-" + measurements.current.position2)) || 0);
    currentSizeItems.current[secondItem] -= paddingsItems.current[secondItem];
    dragDetails.current.splitAreaSize = currentSizeItems.current[dragDetails.current.firstItem] + currentSizeItems.current[secondItem];
    dragDetails.current.secondItemTotalMaxSize = sizeLimitsItems.current[secondItem][measurements.current.maxDimension];
    dragDetails.current.secondItemTotalMinSize = sizeLimitsItems.current[secondItem][measurements.current.minDimension];
  };
  const setDragDetails = (barElement, ev) => {
    dragDetails.current = {};
    dragDetails.current.scrollAmount = splitterRef.current[measurements.current.scroll];
    dragDetails.current.lockedItemsSize = 0;
    const firstItem = getTargetItem(barElement, "previousElementSibling");
    if (firstItem === void 0) {
      dragDetails.current = void 0;
      return;
    }
    dragDetails.current.firstItem = firstItem;
    minMaxSizeItems.current[firstItem].size = "";
    currentSizeItems.current[firstItem] = currentSizeItems.current[firstItem] = splitterItems.current[firstItem][measurements.current.size];
    originalSizeItems.current[firstItem] = currentSizeItems.current[firstItem];
    const computedStyle = getComputedStyle(splitterItems.current[firstItem]);
    const paddings = (parseFloat(computedStyle.getPropertyValue("padding-" + measurements.current.position)) || 0) + (parseFloat(computedStyle.getPropertyValue("padding-" + measurements.current.position2)) || 0);
    paddingsItems.current[firstItem] = paddings;
    currentSizeItems.current[firstItem] -= paddings;
    dragDetails.current.splitAreaSize = 0;
    dragDetails.current.secondItemTotalMaxSize = 0;
    dragDetails.current.secondItemTotalMinSize = 0;
    if (setAdjacentOrEndDetails(barElement)) return;
    const barOffset = barElement.getBoundingClientRect()[measurements.current.position];
    dragDetails.current.position = ev[measurements.current.pagePosition];
    dragDetails.current.splitBarOffset = dragDetails.current.position - barOffset;
    if (!splitBarDummy.current) {
      splitBarDummy.current = document.createElement("div");
      splitBarDummy.current.classList.add(styles["splitter-bar-feedback"]);
    }
    if (!splitterBackgroundFeedback.current) {
      splitterBackgroundFeedback.current = document.createElement("div");
      splitterBackgroundFeedback.current.classList.add(styles["splitter-background-feedback"]);
    }
    splitBarDummy.current.style.width = barElement.offsetWidth + "px";
    splitBarDummy.current.style.height = barElement.offsetHeight + "px";
    splitBarDummy.current.style.top = barElement.offsetTop + "px";
    splitBarDummy.current.style.left = barElement.offsetLeft + "px";
    splitterRef.current.appendChild(splitBarDummy.current);
    document.body.appendChild(splitterBackgroundFeedback.current);
  };
  const resizeItem = (ev, delta, offset2) => {
    if (!dragDetails.current) return;
    const firstItem = dragDetails.current.firstItem;
    const secondItem = dragDetails.current.secondItem;
    const minFirstSize = sizeLimitsItems.current[firstItem][measurements.current.minDimension] || 0;
    const minSecondSize = sizeLimitsItems.current[secondItem][measurements.current.minDimension] || 0;
    let newSize = Math.max(
      minFirstSize,
      Math.min(
        dragDetails.current.splitAreaSize - minSecondSize,
        sizeLimitsItems.current[firstItem][measurements.current.maxDimension] ? Math.min(
          sizeLimitsItems.current[firstItem][measurements.current.maxDimension],
          currentSizeItems.current[firstItem] + delta
        ) : currentSizeItems.current[firstItem] + delta
      )
    );
    if (sizeLimitsItems.current[secondItem][measurements.current.maxDimension] && dragDetails.current.splitAreaSize - newSize > sizeLimitsItems.current[secondItem][measurements.current.maxDimension]) {
      newSize = dragDetails.current.splitAreaSize - sizeLimitsItems.current[secondItem][measurements.current.maxDimension];
    }
    currentSizeItems.current[firstItem] = newSize;
    splitBarDummy.current.style[measurements.current.position] = splitterItems.current[firstItem][measurements.current.offset] + newSize + dragDetails.current.lockedItemsSize + paddingsItems.current[firstItem] + "px";
    const firstItemPosition = splitterItems.current[firstItem].getBoundingClientRect()[props.orientation === "vertical" ? "left" : "top"] + dragDetails.current.splitBarOffset;
    dragDetails.current.position = Math.max(
      firstItemPosition + minFirstSize + paddingsItems.current[firstItem],
      Math.min(
        firstItemPosition + dragDetails.current.splitAreaSize - minSecondSize + dragDetails.current.lockedItemsSize + paddingsItems.current[firstItem],
        ev[measurements.current.pagePosition] - offset2
      )
    );
    if (sizeLimitsItems.current[firstItem][measurements.current.maxDimension]) {
      dragDetails.current.position = Math.min(
        firstItemPosition + sizeLimitsItems.current[firstItem][measurements.current.maxDimension],
        dragDetails.current.position
      );
    }
  };
  const resize2 = (ev) => {
    if (!dragDetails.current) return;
    const resizeStep = 1;
    let delta = ev[measurements.current.pagePosition] - dragDetails.current.position;
    const direction2 = Math.sign(delta);
    const minSize = sizeLimitsItems.current[dragDetails.current.firstItem][measurements.current.minDimension];
    const maxSize = sizeLimitsItems.current[dragDetails.current.firstItem][measurements.current.maxDimension];
    let availableSizeForResize, isWithinLimits, checkResizeLimitReached;
    if (Math.abs(delta) < resizeStep) return;
    let resizeAmount = Math.max(resizeStep, Math.floor(Math.abs(delta) / resizeStep) * resizeStep);
    const remainingOffset = delta - direction2 * resizeAmount;
    if (direction2 > 0) {
      availableSizeForResize = dragDetails.current.splitAreaSize - currentSizeItems.current[dragDetails.current.firstItem];
      isWithinLimits = () => availableSizeForResize - dragDetails.current.secondItemTotalMinSize >= resizeAmount || maxSize && currentSizeItems.current[dragDetails.current.firstItem] + resizeStep <= maxSize;
      checkResizeLimitReached = () => maxSize && currentSizeItems.current[dragDetails.current.firstItem] === maxSize || availableSizeForResize - resizeStep <= dragDetails.current.secondItemTotalMinSize;
    } else {
      availableSizeForResize = currentSizeItems.current[dragDetails.current.firstItem];
      isWithinLimits = () => availableSizeForResize - minSize >= resizeAmount || dragDetails.current.secondItemTotalMaxSize && dragDetails.current.splitAreaSize - currentSizeItems.current[dragDetails.current.firstItem] + resizeStep <= dragDetails.current.secondItemTotalMaxSize;
      checkResizeLimitReached = () => dragDetails.current.secondItemTotalMaxSize && dragDetails.current.splitAreaSize - currentSizeItems.current[dragDetails.current.firstItem] === dragDetails.current.secondItemTotalMaxSize || availableSizeForResize - resizeStep <= minSize;
    }
    delta = 0;
    while (resizeAmount > 0) {
      if (isWithinLimits()) delta += direction2 * resizeStep;
      resizeAmount -= resizeStep;
    }
    resizeItem(ev, delta, remainingOffset);
    if (checkResizeLimitReached()) {
      splitBarDummy.current.classList.add(styles["limit-reached"]);
    } else {
      splitBarDummy.current.classList.remove(styles["limit-reached"]);
    }
  };
  const downHandler = (ev) => {
    const target = ev.target instanceof SVGPathElement || ev.target instanceof SVGElement ? ev.target.closest("button") : ev.target;
    if (target instanceof HTMLButtonElement && (target.classList.contains(styles["splitter-far-collapse-button"]) || target.classList.contains(styles["splitter-near-collapse-button"]))) {
      ev.stopPropagation();
      const splitBar = target.parentElement;
      const splitItem = target.classList.contains(styles["splitter-far-collapse-button"]) ? splitBar.nextElementSibling : splitBar.previousElementSibling;
      collapseButtonPressed.current = {
        splitBar,
        item: Number(splitItem.dataset.splitteritemindex),
        target,
        farCollapse: target.classList.contains(styles["splitter-far-collapse-button"])
      };
    } else if (target instanceof HTMLDivElement && target.classList.contains(styles["splitter-bar"])) {
      ev.stopPropagation();
      if (!target.hasAttribute("data-itemcollapsed") && !props.blockResize) setDragDetails(target, ev);
    }
  };
  const renderSmetaSplitterItem = () => {
    const childrenArray = getChildren(props.children);
    if (!childrenArray) return null;
    sizeLimitsItems.current = {};
    const smetaSplitterItemArray = [];
    const isSplitterReady = !splitterIsInitializing.current;
    childrenArray.forEach((child, i) => {
      const childProps = child.props;
      const style2 = {};
      const sizeLimitsProps = { min: childProps.min ?? "", max: childProps.max ?? "" };
      const isMinInPercent = typeof childProps.min === "string" && childProps.min.indexOf("%") > -1;
      const isMaxInPercent = typeof childProps.max === "string" && childProps.max.indexOf("%") > -1;
      let minValue = isNaN(parseFloat(sizeLimitsProps.min)) ? 0 : parseFloat(sizeLimitsProps.min);
      let maxValue = isNaN(parseFloat(sizeLimitsProps.max)) ? 0 : parseFloat(sizeLimitsProps.max);
      if (isMinInPercent && isSplitterReady)
        minValue = minValue * splitterRef.current[measurements.current.size] / 100;
      if (isMaxInPercent && isSplitterReady)
        maxValue = maxValue * splitterRef.current[measurements.current.size] / 100;
      sizeLimitsItems.current[i] = {
        minWidth: minValue,
        minHeight: minValue,
        maxWidth: maxValue,
        maxHeight: maxValue
      };
      if (childProps.size) {
        const isSizeInPercent = childProps.size.indexOf("%") > -1;
        const parsedSize = childProps.size === "auto" ? "auto" : isNaN(parseFloat(childProps.size)) ? 0 : parseFloat(childProps.size) + (isSizeInPercent ? "%" : "px");
        if (isSplitterReady) {
          style2[measurements.current.dimension] = parsedSize;
        } else {
          style2.height = parsedSize;
          style2.width = parsedSize;
        }
      }
      smetaSplitterItemArray.push(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          "div",
          {
            className: styles["splitter-item"],
            style: style2,
            role: "presentation",
            "data-splitteritemindex": i,
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(SplitterIndexContext.Provider, { value: i, children: child })
          },
          `splitter-item-${i}`
        )
      );
      if (i < childrenArray.length - 1) {
        smetaSplitterItemArray.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            SmetaSplitterBar,
            {
              primaryIndex: primaryElement,
              hideSplitter: props.hideSplitter,
              blockResize: props.blockResize,
              hideButtons: props.hideButtons
            },
            `splitter-bar-${i}`
          )
        );
      }
    });
    return /* @__PURE__ */ jsxRuntimeExports.jsx(SplitterContext.Provider, { value: propertyChangedHandler, children: smetaSplitterItemArray });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      role: "group",
      className: styles.splitter,
      ref: (el) => {
        splitterRef.current = el;
        if (props.splitterRef) props.splitterRef.current = el;
      },
      id: props.id,
      style: props.style,
      "data-smetaresizer": "",
      onPointerDown: downHandler,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          role: "presentation",
          className: clsx$3(
            styles["splitter-container"],
            props.orientation === "vertical" ? styles["splitter-vertical"] : styles["splitter-horizontal"]
          ),
          children: renderSmetaSplitterItem()
        }
      )
    }
  );
}
function SmetaSplitterItem(props) {
  const propertyChangedHandler = useSplitterItem();
  const prevProps = reactExports.useRef({
    size: props.size,
    min: props.min,
    max: props.max,
    collapsed: props.collapsed
  });
  reactExports.useEffect(() => {
    const keys = ["collapsed", "max", "min", "size"];
    for (const key of keys) {
      if (prevProps.current[key] !== props[key]) {
        propertyChangedHandler(key, prevProps.current[key], props[key]);
        prevProps.current[key] = props[key];
      }
    }
  }, [props.collapsed, props.max, props.min, props.size]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: props.children });
}
const SectionPersonalData = reactExports.lazy(() => __vitePreload(() => import("./SectionPersonalData-BFn2gtxv.js"), true ? __vite__mapDeps([5,6,7,8,9,10]) : void 0, import.meta.url));
const StartPageJsx = reactExports.lazy(() => __vitePreload(() => import("./StartPage-DeDwIWma.js"), true ? [] : void 0, import.meta.url));
const Forms = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => FormsMainFile$1), true ? void 0 : void 0, import.meta.url));
const DocAndRepo = reactExports.lazy(() => __vitePreload(() => import("./SectionReportsAndDocuments-DT2N3iGP.js"), true ? __vite__mapDeps([11,7,8,9]) : void 0, import.meta.url));
const Docs = reactExports.lazy(() => __vitePreload(() => import("./SectionDocumentsChose-CWNMUy0u.js"), true ? [] : void 0, import.meta.url));
const Reports = reactExports.lazy(() => __vitePreload(() => import("./SectionReports-CR4VT6wR.js"), true ? __vite__mapDeps([7,8]) : void 0, import.meta.url));
const DView = reactExports.lazy(() => __vitePreload(() => import("./dbview-BtC8SWly.js"), true ? [] : void 0, import.meta.url));
const SectionNFA = reactExports.lazy(() => __vitePreload(() => import("./SectionNFA-CDYNIhL_.js"), true ? __vite__mapDeps([12,13]) : void 0, import.meta.url));
const OtherObjects = reactExports.lazy(() => __vitePreload(() => import("./OtherObjects-y5GTeuVi.js"), true ? [] : void 0, import.meta.url));
const SectionOrganizations = reactExports.lazy(() => __vitePreload(() => import("./SectionOrganizations-DgfpCG2H.js"), true ? [] : void 0, import.meta.url));
const SectionDocuments = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => SectionDocuments$2), true ? void 0 : void 0, import.meta.url));
reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => SectionToolsJS$1), true ? void 0 : void 0, import.meta.url));
const SectionDepartaments = reactExports.lazy(() => __vitePreload(() => import("./SectionDepartament-BhgnBP91.js"), true ? __vite__mapDeps([14,15]) : void 0, import.meta.url));
const TabsForReports = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => TabsForReports$2), true ? void 0 : void 0, import.meta.url));
const TestParams = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => Params$1), true ? void 0 : void 0, import.meta.url));
const BackgroundProcess = reactExports.lazy(() => __vitePreload(() => import("./BackgroundProcess-DanQPwp2.js"), true ? [] : void 0, import.meta.url));
const StillDevelopmentPage = reactExports.lazy(() => __vitePreload(() => import("./StillDevelopmentPage-tJrt5pvV.js"), true ? [] : void 0, import.meta.url));
const Salary = reactExports.lazy(() => __vitePreload(() => import("./SalaryComponent-Dn6QrfyR.js"), true ? __vite__mapDeps([16,17,6,9,7,8,18,19,0,1,20,21]) : void 0, import.meta.url));
const SectionStaff = reactExports.lazy(() => __vitePreload(() => import("./SectionStaff-CMk3nPA_.js"), true ? __vite__mapDeps([22,17,6,18,19,0,1,20,9,7,8,23]) : void 0, import.meta.url));
const Audit = reactExports.lazy(() => __vitePreload(() => import("./UsersAudit-CBH-hEaW.js"), true ? __vite__mapDeps([24,20,25]) : void 0, import.meta.url));
const SectionTimeTable = reactExports.lazy(() => __vitePreload(() => import("./SectionTimeTable-C6g_ZqO6.js"), true ? __vite__mapDeps([26,17,6,21,19,0,1,9,7,8]) : void 0, import.meta.url));
const AccountsTable = reactExports.lazy(() => __vitePreload(() => import("./AccountsTable-BX9fZwVz.js"), true ? [] : void 0, import.meta.url));
const SectionAccounting = reactExports.lazy(() => __vitePreload(() => import("./SectionAccounting-GLoEIzCT.js"), true ? __vite__mapDeps([27,11,7,8,9,25]) : void 0, import.meta.url));
const SectionClsBook = reactExports.lazy(() => __vitePreload(() => import("./SectionClsBook-CkvUzlq-.js"), true ? __vite__mapDeps([28,29]) : void 0, import.meta.url));
const SectionPayTypes = reactExports.lazy(() => __vitePreload(() => import("./SectionPayTypes-BO5EvqNM.js"), true ? __vite__mapDeps([30,31]) : void 0, import.meta.url));
const SectionWorkTime = reactExports.lazy(() => __vitePreload(() => import("./SectionWorkTime-B9Vc40Xf.js"), true ? __vite__mapDeps([32,33]) : void 0, import.meta.url));
const getSuspenseForContent = (content2) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: content2 });
};
const startPage = () => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(StartPageJsx, {}) });
};
const dbviewContent = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(DView, { CLSID: data.element.CLSID, id: data.element.ID }));
};
const docsAndReports = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(DocAndRepo, { CLSID: data.element.CLSID, id: data.element.ID }));
};
const forms = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(Forms, { id: data.element.ID, CommitFormOnSection: data.CommitFormOnSection }));
};
const reports = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(Reports, { CLSID: data.element.CLSID, id: data.element.ID || data.SectionID, SectionToolsJS: true })
  );
};
const sectionNFA = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(SectionNFA, { sectionData: data.element, SectionID: data.SectionID }));
};
const backgroundProcess = () => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(BackgroundProcess, {}));
};
const params = async (data) => {
  var _a2, _b;
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "programs");
  params2.set("comand", "GetParamDialog");
  params2.set("GroupID", "0");
  params2.set("Path", (_a2 = data.element.Params) == null ? void 0 : _a2.Path);
  params2.set("NeedRefresh", "1");
  const json = await AxiosRequest(true, params2);
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      TestParams,
      {
        Module: "programs",
        reqCommand: "GetParamDialog",
        GroupID: "0",
        id: data.element.ID || data.SectionID,
        SectionID: data.element.ID || data.SectionID,
        Path: (_b = data.element.Params) == null ? void 0 : _b.Path,
        data: json,
        NoTitle: true,
        NoHistory: true
      }
    )
  );
};
const docs = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(Docs, { CLSID: data.element.CLSID, id: data.element.ID, sectionTools: true }));
};
const sectionDepartments = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(SectionDepartaments, { sectionData: data.element, SectionID: data.SectionID }));
};
const tabsForReports = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(TabsForReports, { reportData: data.element }));
};
const audit = () => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(Audit, {}));
};
const sectionPersonalData = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(SectionPersonalData, { sectionData: data.element, SectionID: data.SectionID }));
};
const docsWithTree = async (data) => {
  const sectionId = data.SectionID || data.element.ID;
  const objType = data.element.ObjType || await GetSectionDocs(sectionId);
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      "div",
      {
        style: {
          height: "100%",
          width: "100%"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          SectionDocuments,
          {
            id: sectionId,
            DocCfgID: objType,
            HideParams: sectionId && Number(sectionId) > 100,
            SectionToolsJS: sectionId && Number(sectionId) > 100,
            setRecorcCount: () => {
            },
            tree: {
              multiCheck: false,
              Module: "documents",
              ObjType: objType,
              SectionID: sectionId,
              ObjRef: "0",
              Info: "0",
              UsedDate: "0"
            }
          }
        )
      }
    )
  );
};
const accountsTable = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(AccountsTable, { props: data.element }));
};
const sectionOrganizations = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(SectionOrganizations, { sectionData: data.element, SectionID: data.SectionID }));
};
const sectionAccounting = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      SectionAccounting,
      {
        CLSID: data.element.CLSID,
        id: data.SectionID || data.element.ID,
        SectionID: data.SectionID || data.element.ID,
        sectionData: data.element,
        element: data.element
      }
    )
  );
};
const salary = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Salary,
      {
        CLSID: data.element.CLSID,
        id: data.SectionID || data.element.ID,
        SectionID: data.SectionID || data.element.ID,
        sectionData: data.element,
        element: data.element
      }
    )
  );
};
const sectionStaff = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(SectionStaff, { sectionId: data.SectionID || data.element.ID || -1, CLSID: data.element.CLSID })
  );
};
const sectionTimeTable = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(SectionTimeTable, { sectionId: data.SectionID || data.element.ID || -1, CLSID: data.element.CLSID })
  );
};
const otherObjects = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(OtherObjects, { sectionData: data.element }));
};
const sectionPayTypes = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(SectionPayTypes, { SectionID: data.SectionID || data.element.ID, sectionData: data.element })
  );
};
const sectionClsBook = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(SectionClsBook, { SectionID: data.SectionID || data.element.ID, sectionData: data.element })
  );
};
const sectionWorkTime = (data) => {
  return getSuspenseForContent(
    /* @__PURE__ */ jsxRuntimeExports.jsx(SectionWorkTime, { SectionID: data.SectionID || data.element.ID, sectionData: data.element })
  );
};
const stillDevelopmentPage = (data) => {
  return getSuspenseForContent(/* @__PURE__ */ jsxRuntimeExports.jsx(StillDevelopmentPage, { SectionToolsJS: true, id: data.SectionID || data.element.ID }));
};
const defaultContent = (data) => {
  if (data.element.Documents) {
    return docsAndReports(data);
  }
  return stillDevelopmentPage(data);
};
async function returnPageBasedOnCLSID(element, CommitFormOnSection, SectionID) {
  var _a2;
  const data = {
    element,
    CommitFormOnSection,
    SectionID
  };
  const content2 = {
    [ViewClass.DBView]: dbviewContent,
    [ViewClass.DocReps]: docsAndReports,
    "{1D3BB51B-8729-4F3F-91F3-574898BFA297}": docsAndReports,
    "{DB69A304-4DED-46F6-8BD3-BADF1BB24393}": docsAndReports,
    [ViewClass.HTMLView]: startPage,
    [ViewClass.Forms]: forms,
    [ViewClass.RepSite]: reports,
    [ViewClass.StgBook]: sectionNFA,
    [ViewClass.LazyStat]: backgroundProcess,
    [ViewClass.ParamDlg]: params,
    [ViewClass.DocSite]: docs,
    [ViewClass.Departs]: sectionDepartments,
    [ViewClass.CellObj]: tabsForReports,
    [ViewClass.Audit]: audit,
    [ViewClass.Persons]: sectionPersonalData,
    [ViewClass.DocBook]: docsWithTree,
    [ViewClass.Transact]: accountsTable,
    [ViewClass.OrgBook]: sectionOrganizations,
    [ViewClass.Account]: sectionAccounting,
    [ViewClass.Salary]: salary,
    [ViewClass.Staff]: sectionStaff,
    [ViewClass.TimeTable]: sectionTimeTable,
    [ViewClass.MultiTab]: otherObjects,
    [ViewClass.PayTypes]: sectionPayTypes,
    [ViewClass.ClsBook]: sectionClsBook,
    [ViewClass.WModes]: sectionWorkTime
  };
  return ((_a2 = content2[element.CLSID]) == null ? void 0 : _a2.call(content2, data)) || defaultContent(data);
}
async function contentMaker(sideBarSelected, CommitFormOnSection) {
  let content2;
  if (sideBarSelected.ID && sideBarSelected.CLSID === "{353FD9D7-651E-4840-9319-A8578806C496}") {
    content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(OtherObjects, { sectionData: sideBarSelected }) });
  } else if (sideBarSelected.ID !== void 0) {
    content2 = await returnPageBasedOnCLSID(sideBarSelected, CommitFormOnSection);
  }
  return content2;
}
function FullRightSide(props) {
  const [sections, setSections] = reactExports.useState([]);
  const [tabIndex, setTabIndex] = reactExports.useState(0);
  const sideBarSelected = useAtomValue(selectedSectionAtom);
  const [refreshDataAtom, setRefreshDataAtom] = useAtom(refreshSectionDataAtom);
  const theme = useAtomValue(currentTheme);
  reactExports.useEffect(() => {
    if (sideBarSelected.ID !== "") addTab();
  }, [sideBarSelected.ID]);
  reactExports.useEffect(() => {
    if (refreshDataAtom && refreshDataAtom.refresh) {
      updateMainSection(true, refreshDataAtom.refreshId, refreshDataAtom.CommitFormOnSection).then(() => {
        setTimeout(() => {
          updateMainSection(false, refreshDataAtom.refreshId, refreshDataAtom.CommitFormOnSection);
          setRefreshDataAtom(null);
        }, 100);
      });
    }
  }, [refreshDataAtom]);
  reactExports.useEffect(() => {
    document.querySelectorAll("[data-smetaresizer]").forEach((el) => {
      if (el.checkVisibility() && typeof (el == null ? void 0 : el.resize) === "function") {
        el == null ? void 0 : el.resize();
      }
    });
    updateGridData(0);
  }, [tabIndex]);
  const getTabInfo = (id) => {
    return sections.findIndex((tab) => {
      if (sideBarSelected.ID === tab.props.data.ID || id === tab.props.data.ID) return true;
      return false;
    });
  };
  const singleTab = async (id, commitFormOnSection) => {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaTabItem, { data: { ...sideBarSelected, ID: id || sideBarSelected.ID }, children: await contentMaker(sideBarSelected, commitFormOnSection) }, id || sideBarSelected.ID);
  };
  async function addTab() {
    const newTabIndex = getTabInfo();
    if (newTabIndex === -1) {
      const newTab = await singleTab();
      setSections([...sections, newTab]);
      setTabIndex(sections.length);
    } else {
      setTabIndex(newTabIndex);
    }
  }
  async function updateMainSection(load, id, CommitFormOnSection) {
    const newTabIndex = getTabInfo(id);
    if (id && newTabIndex === -1) {
      const newTab = await singleTab();
      setSections([...sections, newTab]);
      return;
    }
    const idToRefresh = id || sideBarSelected.ID;
    const content2 = load ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, { data: { ID: idToRefresh } }) : await singleTab(idToRefresh, CommitFormOnSection);
    const newSectionsArray = sections.toSpliced(newTabIndex, 1, content2);
    setSections(newSectionsArray);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid$1,
    {
      container: true,
      direction: "column",
      justifyContent: "center",
      sx: { flexGrow: 1 },
      alignItems: "stretch",
      style: {},
      id: "IDTEST",
      className: cn("backgroundColorStimate", { light: theme === "light" }),
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
        SmetaSplitter,
        {
          id: "OutPutTextSplitter",
          onResizeEnd: () => updateGridData(0),
          onCollapse: () => {
            updateGridData(0);
          },
          onExpand: () => {
            updateGridData(0);
          },
          orientation: "horizontal",
          style: {
            width: "100%",
            height: "100%"
          },
          primaryIndex: "start",
          transitionDuration: 250,
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaSplitterItem, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
              Grid$1,
              {
                style: { width: "100%", height: "100%" },
                container: true,
                direction: "column",
                justifyContent: "flex-start",
                alignItems: "stretch",
                children: [
                  /* @__PURE__ */ jsxRuntimeExports.jsx(SubHeader, { drawerOpen: props.drawerBool }),
                  /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaTabs, { position: "hidden", tabIndex, style: { flex: "1 1 auto", width: "100%" }, children: sections })
                ]
              }
            ) }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaSplitterItem, { defaultCollapsed: true, size: "100px", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "100%", height: "100%" }, children: sideBarSelected.ID === void 0 || props.isLoading ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(OutPut, {}) }) })
          ]
        }
      )
    }
  );
}
const wrapperStyles$1 = {
  "div-wrapper": "_div-wrapper_1sb8y_1",
  "div-header-wrapper": "_div-header-wrapper_1sb8y_17",
  "div-workArea-wrapper": "_div-workArea-wrapper_1sb8y_33",
  "div-sideBar-wrapper": "_div-sideBar-wrapper_1sb8y_49",
  "div-content-wrapper": "_div-content-wrapper_1sb8y_59"
};
const hideSnow = (show = false) => {
  var _a2;
  const enableSnowEffect = (_a2 = smetaStore.get(appConfig).smeta.signOptions) == null ? void 0 : _a2.snowEffect;
  if (show && !enableSnowEffect) return hideSnow();
  const snowflakes = document.querySelector(".snowflakes-box");
  const snowball = document.querySelector(".snowball-box");
  const display2 = show ? "block" : "none";
  if (snowflakes) snowflakes.style.display = display2;
  if (snowball) snowball.style.display = display2;
};
function WrapperRightSide$1(props) {
  var _a2, _b, _c;
  const theme = useAtomValue(currentTheme);
  const animations = useAtomValue(animationsAtom);
  const {
    smeta: { homeOptions }
  } = useAtomValue(appConfig);
  const headerHeight = (_a2 = homeOptions == null ? void 0 : homeOptions.header) == null ? void 0 : _a2.height;
  const sideBarSelected = useAtomValue(selectedSectionAtom);
  const [drawerOpen, setdrawerOpen] = reactExports.useState(
    ((_b = getOptionsForUser()) == null ? void 0 : _b.drawerOpen) === void 0 ? false : (_c = getOptionsForUser()) == null ? void 0 : _c.drawerOpen
  );
  const hideToastNotifications = useAtomValue(hideToastNotificationsAtom);
  reactExports.useEffect(() => {
    updateGridData(150).then(() => {
      if (sideBarSelected && sideBarSelected.ID !== "") {
        HideAllFooterData(sideBarSelected.ID);
      }
    });
  }, [sideBarSelected]);
  function showMenu() {
    setdrawerOpen(!drawerOpen);
    updateOptionsForUser({ drawerOpen: !drawerOpen });
    if (animations) {
      updateGridData(501);
    } else updateGridData(251);
  }
  function onResizeEnd() {
    updateGridData();
  }
  const [timer2, setTimer] = reactExports.useState(null);
  const onKeyDown = (event) => {
    const key = event.key;
    const keys = {
      F1: openHelpContextDialog
    };
    if (CheckModalBackGrounds() === 0) {
      if (key in keys) {
        event.preventDefault();
        keys[key]();
      }
    }
    event.stopPropagation();
  };
  const setInfo = async () => {
    const json = await setClientInfo();
    const { ProgID: progId } = json;
    if (progId) {
      const command = {
        module: "tools",
        params: {
          ProgID: progId
        }
      };
      execABLProgram({ command });
    }
  };
  reactExports.useLayoutEffect(() => {
    document.title = "Web-Смета";
    hideSnow();
    setInfo();
  }, []);
  reactExports.useEffect(() => {
    const handleResize = () => {
      clearTimeout(timer2);
      const timout = setTimeout(() => {
        document.querySelectorAll("[data-smetaresizer]").forEach((el) => {
          if (el.checkVisibility()) el.resize();
        });
        smetaModals.refreshMinimizedWindowsPosition(
          Array.from(document.querySelectorAll(".modalWindow[minimized]"))
        );
        updateGridData();
      }, 250);
      setTimer(timout);
    };
    window.addEventListener("resize", handleResize);
    const intervalGetActualVersionWebsite = getIntervalActualVersionWebsite();
    return () => {
      window.removeEventListener("resize", handleResize);
      clearInterval(intervalGetActualVersionWebsite);
    };
  }, []);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(wrapperStyles$1["div-wrapper"]), onKeyDown, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      k,
      {
        limit: 5,
        autoClose: 6e4,
        style: { visibility: hideToastNotifications ? "hidden" : void 0 }
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      "div",
      {
        className: clsx$3(wrapperStyles$1["div-header-wrapper"]),
        id: "Header",
        style: { height: headerHeight, minHeight: headerHeight },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(DashboardNavbar, {})
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(wrapperStyles$1["div-workArea-wrapper"]), id: "SideBar_FullRightSide", children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
      SplitterLocal,
      {
        orientation: "vertical",
        style: { width: "100%", height: "100%" },
        onCollapse: showMenu,
        onExpand: showMenu,
        onResizeEnd,
        id: "MainSplitter",
        primaryIndex: 1,
        sizeSecondary: "245px",
        collapsed: drawerOpen,
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { id: "CollapsibleSplitterItem", style: { height: "100%", flex: "1" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            "div",
            {
              className: clsx$3("sidebarStimate", { light: theme === "light" }, wrapperStyles$1["div-sideBar-wrapper"]),
              id: "SideBar",
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(libExports.Scrollbars, { autoHide: true, style: { overflowX: "hidden" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SideBar, {}) })
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "div",
            {
              className: clsx$3(
                "backgroundColorStimate",
                {
                  light: theme === "light"
                },
                wrapperStyles$1["div-content-wrapper"]
              ),
              id: "FullRightSide",
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(FullRightSide, { drawerBool: !drawerOpen })
            }
          )
        ]
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(StickyFooter, {})
  ] });
}
const WrapperMainFile = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: WrapperRightSide$1,
  hideSnow
}, Symbol.toStringTag, { value: "Module" }));
var Secret;
function isInstalledWorkSpace() {
  const workspaceEx = document.getElementById("WorkspaceEx");
  const isInstalled = workspaceEx == null ? void 0 : workspaceEx.getAttribute("is-installed");
  const isNewApi = workspaceEx == null ? void 0 : workspaceEx.getAttribute("is-new-api");
  const type2 = window.webkcrypt.type === "cades" || window.webkcrypt.type === "webkcrypt";
  if (isInstalled && isNewApi || type2) return true;
  return false;
}
function CheckWorkSpace(callBack) {
  if (!isInstalledWorkSpace()) {
    const invokeCallback = () => {
      callBack == null ? void 0 : callBack();
    };
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "center", sx: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, sx: { textAlign: "center" }, children: [
        "В вашем браузере не установлено расширения для работы ",
        /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: "КЭП" }),
        '. Для установки расширения нажмите кнопку "Ок".'
      ] }) }),
      {
        Title: "Уведомление",
        blockMaximize: true,
        blockSaveLocation: true,
        blockResize: true,
        style: { height: `${180}px`, width: `${380}px` },
        Buttons: {
          jsonData: {
            Кнопка$Выбрать: "Ок"
          },
          Params: { Buttons: Button$1.Ok }
        },
        onClose: invokeCallback,
        onSelect: () => {
          smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(WorkSpaceInstall, {}), {
            Title: "Крипто-плагин",
            blockMaximize: true,
            blockSaveLocation: true,
            blockResize: true,
            style: { height: `${480}px`, width: `${580}px` },
            Buttons: {
              jsonData: {
                Кнопка$Выбрать: "Ок"
              },
              Params: { Buttons: Button$1.Ok }
            },
            onSelect: invokeCallback,
            onClose: invokeCallback
          });
        }
      }
    );
  }
  return isInstalledWorkSpace();
}
const setClientInfo = async () => {
  var _a2, _b;
  const {
    smeta: { stimateVersion: version }
  } = smetaStore.get(appConfig);
  const ip = (_a2 = getOptionsForUser()) == null ? void 0 : _a2.IP;
  const iver = (_b = version.replace(/[[\/].+/, "").match(/[\d]+/g)) == null ? void 0 : _b.join("");
  const config2 = {
    params: {
      host: window.location.host,
      port: window.location.port || null,
      ip: ip || "",
      comp: `${getBrowserType()};${getOS$1()}`,
      CVer: encodeURIComponent(version),
      IVer: iver
    }
  };
  const response = await smetaAxios.get("SetClientInfo", config2);
  if (response.PingMins) smetaStore.set(pingMinsAtom, Number(response.PingMins) * 60 * 1e3);
  return response;
};
function initContext() {
  let params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "documents");
  params2.set("comand", "InitContext");
  params2.set("LazyMemos", "1");
  return AxiosRequest(true, params2);
}
function getOS$1() {
  let detectOS = "Unknown OS";
  if (navigator.userAgent.indexOf("Win") != -1) detectOS = "windows";
  if (navigator.userAgent.indexOf("Mac") != -1) detectOS = "MacOS";
  if (navigator.userAgent.indexOf("Linux") != -1) detectOS = "linux";
  return detectOS;
}
function getBrowserType() {
  const test2 = (regexp) => {
    return regexp.test(navigator.userAgent);
  };
  if (test2(/opr\//i)) {
    return "Opera";
  } else if (test2(/edg/i)) {
    return "Microsoft Edge";
  } else if (test2(/chrome|chromium|crios/i)) {
    return "Chromium";
  } else if (test2(/firefox|fxios/i)) {
    return "Mozilla Firefox";
  } else if (test2(/safari/i)) {
    return "Apple Safari";
  } else if (test2(/trident/i)) {
    return "Microsoft Internet Explorer";
  } else if (test2(/ucbrowser/i)) {
    return "UC Browser";
  } else if (test2(/samsungbrowser/i)) {
    return "Samsung Browser";
  } else {
    return "Unknown browser";
  }
}
function clearUrl() {
  if (hasURLparam("Guid")) {
    let url = removeParam("Guid", window.location.href);
    if (hasURLparam("authed_by")) {
      updateOptionsForUser({ authed_by: getURLparam("authed_by") });
      url = removeParam("authed_by", url);
    } else {
      if (hasURLparam("from")) updateOptionsForUser({ from: getURLparam("from") });
    }
    url = removeParam("stimWebSrv", url);
    if (hasURLparam("from")) url = removeParam("from", url);
    window.history.replaceState({ additionalInformation: "Переход" }, "Test", url);
  }
}
const getUserInfo = (configName, userName) => {
  const config2 = {
    params: {
      configName,
      userName
    }
  };
  return smetaAxios.get("getUserInfo", config2);
};
const enterSmeta = (postData, { ip = null }) => {
  if (ip) smetaStore.set(ipAtom, ip);
  const config2 = {
    params: {
      ip,
      SetLic: postData.RCDATA && "1" || null
    },
    loadMask: true
  };
  return smetaAxios.post("enter", postData, config2);
};
const updateStatesAfterEnter = (enterResp, loginData) => {
  const { drx, userName, workPlace } = loginData;
  const lastLogin = `${drx},${userName},${workPlace}`;
  createCokies("LastLogin", lastLogin);
  sessionStorage.setItem("LastLogin", lastLogin);
  const isAdmin = Boolean(enterResp.IsAdmin || enterResp.SuperUser), configEnabled = Boolean(enterResp.ConfigEnabled), isSuperUser = Boolean(enterResp.SuperUser), isOrgEnter = Boolean(loginData.orgTypeCls);
  if (enterResp.HelpContext) {
    updateOptionsForUser({ helpContext: enterResp.HelpContext });
    smetaStore.set(helpContextAtom, enterResp.HelpContext);
  }
  smetaStore.set(isOrgEnterAtom, isOrgEnter);
  smetaStore.set(isAdminAtom, isAdmin);
  smetaStore.set(configEnabledAtom, configEnabled);
  smetaStore.set(isSuperUserAtom, isSuperUser);
  updateOptionsForUser({
    isAdmin,
    configEnabled,
    isSuperUser,
    isOrgEnter
  });
  clearUrl();
};
const SignIn = () => {
  var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t7, _u;
  document.title = "Вход в систему";
  const config2 = useAtomValue(appConfig);
  const navigate = useNavigate();
  const [drx, setDrx] = reactExports.useState("");
  const [hasOrgs, setHasOrgs] = reactExports.useState("0");
  const [user, setUser] = reactExports.useState("");
  const [workplace, setWorkPlace] = reactExports.useState("");
  const [password, setPassword] = reactExports.useState("");
  const [load, setLoad] = reactExports.useState(false);
  const [secret, setSecret] = reactExports.useState({});
  const [display2, setDisplay] = reactExports.useState("none");
  const [showPassword, setShowPassword] = React.useState(false);
  const [orgTypeCls, setOrgTypeCls] = React.useState(null);
  const [isSessionActive2, setIsSessionActive] = useAtom(isAuthorized);
  const lkButtonShow = reactExports.useRef(
    ((_c = (_b = (_a2 = config2.smeta) == null ? void 0 : _a2.signOptions) == null ? void 0 : _b.signButtons) == null ? void 0 : _c.lkButton) && !((_e = (_d = config2.smeta) == null ? void 0 : _d.signOptions) == null ? void 0 : _e.splitSignIn)
  );
  const getConfigInfoTimeout = reactExports.useRef();
  reactExports.useEffect(() => {
    if (isEmptyObject(secret) === false) {
      const appName = secret["AppName"];
      createCokies("drx", appName === void 0 ? drx : appName);
      setIsSessionActive(true);
      navigate("main");
    }
  }, [secret]);
  reactExports.useEffect(() => {
    setOrgTypeCls(null);
  }, [drx]);
  reactExports.useEffect(() => {
    if (drx !== "") {
      clearTimeout(getConfigInfoTimeout.current);
      getConfigInfoTimeout.current = setTimeout(getConfigInfo, 250, drx, user);
    }
  }, [drx, user]);
  reactExports.useEffect(() => {
    hideSnow(true);
    if (hasURLparam("Guid")) {
      sessionStorage.setItem("LicG", getURLparam("Guid"));
      createCokies("LicG", getURLparam("Guid"));
      handleSingIn();
    } else {
      checkSessionAndEnter().then((res) => {
        if (res === false) checkGenLicGuid(sessionStorage.getItem("LicG"), true);
      });
    }
    setDisplay(getStyleForEnter());
    return () => {
      setLoad(false);
    };
  }, []);
  const showLicenseMessage = (content2) => {
    renderMessageBox({
      dlgType: 3,
      buttons: 12,
      message: `${content2} Хотите выбрать новую лицензию для установки?`,
      selectF: async () => {
        const fileData = await selectNewLicenseToInstall();
        if (!isEmptyObject(fileData)) {
          const fileName = fileData.reqData.FileName;
          const rcdata = fileData.files[fileName].rcdata;
          handleSingIn({}, rcdata);
        }
      }
    });
  };
  async function checkSessionAndEnter() {
    const isActive = isSessionActive2;
    if (isActive === true) {
      navigate(`main` + getUrlSearh());
    }
    return isActive;
  }
  function executeCertListAsXML() {
    executeCertList().then((certList) => {
      smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(ChooseCert, { data: certList.split(/\r?\n/), onSelect: signForEnterOnSelect }), {
        Title: "Выбор сертификата",
        style: {
          height: `${530}px`,
          width: `${580}px`,
          overflow: "hidden"
        },
        hiddenButton: true,
        blockMaximize: true,
        blockResize: true
      });
    }).catch(() => {
      if (CheckWorkSpace()) return;
    });
    return;
  }
  function signForEnterOnSelect(sn) {
    const json = smetaAxios.get("secret");
    Secret = json["Pkcs7Auth-Secret"].Secret;
    window.webkcrypt.make_pkcs7_signature(sn, Secret, true).value.then((value) => {
      let fixedVal = value;
      fixedVal.replaceAll(" ", "");
      fixedVal.replaceAll("\\r", "");
      fixedVal.replaceAll("\\n", "1234");
      console.log(fixedVal);
      handleMessage(removeLinebreaks(value));
    }).catch((e2) => {
      console.log(e2);
    });
  }
  function removeLinebreaks(str) {
    let newstr = "";
    for (let i = 0; i < str.length; i++) if (!(str[i] == "\n" || str[i] == "\r")) newstr += str[i];
    return newstr;
  }
  function getStyleForEnter() {
    if (hasURLparam("Guid") || config2.smeta.hideEnter !== void 0 && config2.smeta.hideEnter === true) {
      return "none";
    } else {
      return "";
    }
  }
  async function getConfigInfo(drx2, user2) {
    const config22 = {
      params: {
        configName: drx2,
        userName: user2 || null
      }
    };
    const resp = await smetaAxios.get("getConfigInfo", config22);
    setHasOrgs(resp.HasOrgs === "1" ? "1" : "0");
  }
  const handleClickShowPassword = () => setShowPassword((show) => !show);
  const handleMouseDownPassword = (event) => {
    event.preventDefault();
  };
  function handleMessage(message) {
    if (!message) return;
    const loginData = {
      "Pkcs7Auth-Answer": {
        Answer: message
      }
    };
    const json = smetaAxios.post("answer", loginData);
    const content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(ModalSignIn, { data: json, secret: Secret, keyFromSelect: message, setSecret });
    const renderSignInEl = document.getElementById("renderSignIn");
    const renderSignInElRoot = renderSignInEl.root || clientExports.createRoot(renderSignInEl);
    renderSignInEl.root = renderSignInElRoot;
    renderSignInElRoot.render(content2);
  }
  const navigatiToMain = async (IP) => {
    const licG = sessionStorage.getItem("LicG");
    localStorage.setItem("login", licG || "");
    const initData = await initContext();
    if (IP) {
      updateOptionsForUser({ IP });
    }
    if (initData.RefWithCtrl) {
      updateOptionsForUser({ RefWithCtrl: initData.RefWithCtrl === "1" });
    }
    setIsSessionActive(true);
    navigate("main" + getUrlSearh());
  };
  const clientPasswordHandler = (event) => {
    setPassword(event.target.value);
  };
  function CheckAnswerFromServer(resp) {
    var _a3;
    setLoad(false);
    const enterErrors = {
      Password: () => {
        if (resp.NeedNewPW !== "1") return;
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ChangePassowrd,
            {
              where: "signin",
              onPasswordChange: (newPassword) => {
                handleSingIn({ password: newPassword });
              }
            }
          ),
          {
            style: { height: window.innerHeight * 0.35, width: window.innerWidth * 0.3 },
            hiddenButton: true,
            Title: resp.content
          }
        );
      }
    };
    (_a3 = enterErrors[resp.Item]) == null ? void 0 : _a3.call(enterErrors);
    if (resp.LicRes) showLicenseMessage(resp.content);
  }
  const handlekeyDownSignIn = (e2) => {
    if (e2.keyCode === 13 && CheckModalBackGrounds() === 0) {
      handleSingIn();
    }
  };
  const handleSingIn = async (loginObj = {}, rcdata) => {
    const configName = (orgTypeCls == null ? void 0 : orgTypeCls.config) || drx;
    const userInfo = await getUserInfo(configName, user);
    let ip;
    ip = userInfo.Server;
    if (hasURLparam("stimWebSrv") && getURLparam("stimWebSrv") !== void 0) {
      ip = getURLparam("stimWebSrv");
    }
    const loginData = {
      configName: (orgTypeCls == null ? void 0 : orgTypeCls.config) || drx,
      userName: user,
      password,
      workPlace: workplace,
      RCDATA: rcdata,
      orgTypeCls: orgTypeCls == null ? void 0 : orgTypeCls.code,
      drx,
      ...loginObj
    };
    if (!isEmptyObject(orgTypeCls)) {
      setLoad(true);
      axiosEnter(loginData, ip);
    } else if (hasOrgs === "1" && isEmptyObject(orgTypeCls)) {
      if (userInfo.Configs && userInfo.Configs.items && userInfo.Configs.items.length === 1) {
        axiosEnter(
          {
            ...loginData,
            orgTypeCls: userInfo.Configs.items[0].Code,
            configName: userInfo.Configs.items[0].Config || drx
          },
          ip
        );
      } else {
        selectOrg({ drx, user }).then((resp) => {
          if (!resp) return;
          setOrgTypeCls(resp);
          setLoad(true);
          axiosEnter({ ...loginData, orgTypeCls: resp.code, configName: resp.config }, ip);
        });
      }
    } else {
      axiosEnter(loginData, ip);
    }
  };
  async function axiosEnter(loginData, ip = null) {
    const resp = await enterSmeta(loginData, { ip });
    setLoad(false);
    if (isEmptyObject(resp)) return checkGenLicGuid("", true);
    if (resp.error) return CheckAnswerFromServer(resp.error);
    updateStatesAfterEnter(resp, { ...loginData, drx });
    navigatiToMain(ip);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Container, { maxWidth: "xs", style: { display: display2, marginTop: "2%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(CssBaseline, {}),
    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", justifyContent: "center" }, children: ((_g = (_f = config2.smeta.signOptions) == null ? void 0 : _f.headerSettings) == null ? void 0 : _g.image) && /* @__PURE__ */ jsxRuntimeExports.jsx(
      "img",
      {
        src: "logoSmeta.png",
        alt: "",
        width: ((_i = (_h = config2.smeta.signOptions) == null ? void 0 : _h.headerSettings) == null ? void 0 : _i.imageWidth) ? config2.smeta.signOptions.headerSettings.imageWidth : ""
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { variant: "h5", color: "#0098ad", style: { textAlign: "center" }, children: ((_l = (_k = (_j = config2.smeta) == null ? void 0 : _j.signOptions) == null ? void 0 : _k.headerSettings) == null ? void 0 : _l.title) !== void 0 ? (_o = (_n = (_m = config2.smeta) == null ? void 0 : _m.signOptions) == null ? void 0 : _n.headerSettings) == null ? void 0 : _o.title : "Web-Смета" }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { variant: "elevation", elevation: 10, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Box$1,
      {
        sx: {
          p: 3,
          marginTop: 10,
          display: "flex",
          flexDirection: "column",
          alignItems: "center"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", justifyContent: "space-around", alignItems: "stretch", spacing: 3, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, sx: { display: ((_r = (_q = (_p = config2.smeta) == null ? void 0 : _p.signOptions) == null ? void 0 : _q.signButtons) == null ? void 0 : _r.signCryptoButton) ? "" : "none" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              style: {
                backgroundColor: "#0098ad",
                textTransform: "none"
              },
              type: "submit",
              fullWidth: true,
              variant: "contained",
              className: "ButtonMargin",
              onClick: executeCertListAsXML,
              children: "Вход по ЭП"
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, sx: { display: ((_u = (_t7 = (_s = config2.smeta) == null ? void 0 : _s.signOptions) == null ? void 0 : _t7.signButtons) == null ? void 0 : _u.helpKristaButton) ? "" : "none" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              style: {
                backgroundColor: "#0098ad",
                textTransform: "none"
              },
              type: "submit",
              fullWidth: true,
              variant: "contained",
              className: "ButtonMargin",
              onClick: () => {
                window.open("https://help.krista.ru");
              },
              children: "help.krista.ru"
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            SelectDrx,
            {
              drxInfo: drx,
              setBackInfo: setDrx,
              password: void 0,
              userInfo: void 0,
              KeyDown: handlekeyDownSignIn
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            SelectUser,
            {
              HasOrgs: hasOrgs,
              userInfo: user,
              drxInfo: drx,
              setBackInfo: setUser,
              password: void 0,
              selectOrg: () => {
                selectOrg({ drx, user }).then((resp) => {
                  setOrgTypeCls(resp || orgTypeCls);
                });
              },
              KeyDown: handleSingIn,
              selectedOrg: orgTypeCls
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, xs: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { fullWidth: true, variant: "outlined", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { htmlFor: "outlined-adornment-password", children: "Пароль" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              OutlinedInput,
              {
                id: "outlined-adornment-password",
                type: showPassword ? "text" : "password",
                onChange: clientPasswordHandler,
                value: password,
                onKeyDown: handlekeyDownSignIn,
                endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", sx: { mr: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    "aria-label": "toggle password visibility",
                    onClick: handleClickShowPassword,
                    onMouseDown: handleMouseDownPassword,
                    edge: "end",
                    children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Visibility, {})
                  }
                ) }),
                label: "Password"
              }
            )
          ] }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            SelectWorkPlace,
            {
              drxInfo: drx,
              userInfo: user,
              workPlaceInfo: workplace,
              setBackInfo: setWorkPlace,
              password: void 0,
              KeyDown: handlekeyDownSignIn
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              style: { backgroundColor: "#0098ad", textTransform: "none" },
              type: "submit",
              fullWidth: true,
              variant: "contained",
              className: "ButtonMargin",
              onClick: () => {
                handleSingIn();
              },
              children: "Войти"
            }
          ) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              item: true,
              xs: true,
              sx: {
                display: lkButtonShow.current ? "" : "none"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                Button$2,
                {
                  style: {
                    backgroundColor: "#0098ad",
                    textTransform: "none"
                  },
                  type: "submit",
                  fullWidth: true,
                  variant: "contained",
                  className: "ButtonMargin",
                  onClick: () => {
                    navigate("/lk" + getUrlSearh());
                  },
                  children: "Личный кабинет"
                }
              )
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { id: "renderSignIn" })
        ] })
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Backdrop, { sx: { color: "#fff", zIndex: (theme) => theme.zIndex.drawer + 1 }, open: load, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CircularProgress, { color: "inherit" }) })
  ] });
};
const SingIn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  CheckWorkSpace,
  clearUrl,
  default: SignIn,
  enterSmeta,
  getBrowserType,
  getUserInfo,
  initContext,
  setClientInfo,
  updateStatesAfterEnter
}, Symbol.toStringTag, { value: "Module" }));
function getOS() {
  let detectOS = "Unknown OS";
  if (navigator.userAgent.indexOf("Win") != -1) detectOS = "windows";
  if (navigator.userAgent.indexOf("Mac") != -1) detectOS = "MacOS";
  if (navigator.userAgent.indexOf("Linux") != -1) detectOS = "linux";
  return detectOS;
}
const Link = ({ link, text, style: style2 }) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "a",
    {
      style: { cursor: "pointer", ...style2 },
      onClick: () => {
        window.open(link);
      },
      children: text || "ссылке"
    }
  );
};
const LinkForOs = () => {
  const config2 = useAtomValue(appConfig);
  const os = getOS();
  return os === "linux" ? /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { link: config2.smeta.pluginLinks.workspace.linux, text: "Linux." }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("ol", { style: { textAlign: "left" }, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "Загрузить хост-приложение; " }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "Разархивировать в каталог;" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: 'Запустить из каталога исполняемы файл "setup-webkcrypt";' }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "В случае успешной установки данный файл автоматически удаляется " }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("li", { children: "Перезапустить браузер." })
    ] })
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Link, { link: config2.smeta.pluginLinks.workspace[os], text: "Windows. " }),
    "Установите следуя инструкциям установщика. После установки, перезагрузите браузер."
  ] });
};
function WorkSpaceInstall() {
  const config2 = useAtomValue(appConfig);
  function forChrome() {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(React.Fragment, { children: [
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Accordion$1, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummary$1, { expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, {}), "aria-controls": "panel1-content", id: "panel1-header", children: "Установка через магазин расширений." }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionDetails$1, { children: [
          "Для установки расширения пройдите по",
          " ",
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "a",
            {
              style: { cursor: "pointer" },
              onClick: () => {
                window.open(config2.smeta.pluginLinks.chrome.store);
              },
              children: "ссылке"
            }
          ),
          ". Обновите страницу."
        ] })
      ] }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(Accordion$1, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummary$1, { expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, {}), "aria-controls": "panel1-content", id: "panel1-header", children: "Оффлайн установка." }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionDetails$1, { children: [
          "Для установки расширения пройдите по",
          " ",
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "a",
            {
              style: { cursor: "pointer" },
              onClick: () => {
                window.open(config2.smeta.pluginLinks.chrome.local);
              },
              children: "ссылке"
            }
          ),
          ". После того как файл скачался, перейдите chrome://extensions/ и включите режим разработчика, и перетащите только что скачанный файл в окно браузера. Подтвердите установку."
        ] })
      ] })
    ] });
  }
  function forMozilla() {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(Accordion$1, { expanded: true, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummary$1, { expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, {}), "aria-controls": "panel1-content", id: "panel1-header", children: "Оффлайн установка." }),
      /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionDetails$1, { children: [
        "Для установки расширения пройдите по",
        " ",
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          "a",
          {
            style: { cursor: "pointer" },
            onClick: () => {
              window.open(config2.smeta.pluginLinks.firefox.local);
            },
            children: "ссылке"
          }
        ),
        ". После того как файл скачался, перейдите Настройки - Расширения и темы. Нажимте на кнопку шестеренки и выберите ранее скачанный файл."
      ] })
    ] });
  }
  const browserContent = {
    "Mozilla Firefox": forMozilla,
    default: forChrome
  };
  function getContent() {
    const browser = getBrowserType();
    return (browserContent[browser] || browserContent["default"])();
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "column",
      justifyContent: "center",
      alignItems: "flex-start",
      sx: { height: "max-content", overflowX: "hidden" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, sx: { textAlign: "center", m: 1 }, children: [
          "Ваш браузер: ",
          /* @__PURE__ */ jsxRuntimeExports.jsx("strong", { children: getBrowserType() })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, sx: { m: 1 }, children: [
          "Сначала необходимо установить расширение, а потом хост-приложение.",
          /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Link,
            {
              style: { display: config2.smeta.pluginLinks.howToLink ? "" : "none" },
              link: config2.smeta.pluginLinks.howToLink,
              text: "Как это сделать?"
            }
          )
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { m: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          "a",
          {
            style: { cursor: "pointer" },
            onClick: () => {
              window.open("http://stimate.krista.ru/webkcrypt/index.html");
            },
            children: "Страница проверка работоспособности расширения."
          }
        ) }),
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, sx: { textAlign: "center" }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs(Accordion$1, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummary$1, { expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, {}), "aria-controls": "panel1-content", id: "panel1-header", children: "Установить расширение для браузера." }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionDetails$1, { children: getContent() })
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs(Accordion$1, { children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummary$1, { expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, {}), "aria-controls": "panel1-content", id: "panel1-header", children: "Установить хост-приложение для подписания" }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs(AccordionDetails$1, { children: [
              "Для установки хост приложения пройдите по ссылке для скачивания для ",
              /* @__PURE__ */ jsxRuntimeExports.jsx(LinkForOs, {}),
              "."
            ] })
          ] })
        ] })
      ]
    }
  );
}
function Options() {
  var _a2;
  const config2 = useAtomValue(appConfig);
  const IP = (_a2 = getOptionsForUser()) == null ? void 0 : _a2.IP;
  const [ServerInfo, setServerInfo] = reactExports.useState({});
  reactExports.useEffect(() => {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("comand", "Info");
    params2.set("Info", "1");
    params2.set("JSON", "1");
    AxiosRequest(true, params2).then((res) => {
      setServerInfo(res);
    });
  }, []);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(SmetaTabs, { id: "optionsForUser", style: { width: "100%", height: "98%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      SmetaTabItem,
      {
        id: "ChangePassowrdTab",
        label: "Безопасность",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChangePassowrd, {})
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      SmetaTabItem,
      {
        id: "ThemeTab",
        label: "Оформление",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeChange, {})
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      SmetaTabItem,
      {
        id: "AboutTab",
        label: "О сайте",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid$1,
          {
            container: true,
            direction: "column",
            justifyContent: "flex-start",
            alignItems: "flex-start",
            style: { height: "100%", paddingLeft: 4, paddingTop: 4 },
            spacing: 1,
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: `Версия сайта: ${config2.smeta.stimateVersion}` }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: `Версия сервера: ${ServerInfo.Version}` }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  item: true,
                  onClick: () => {
                    navigator.clipboard.writeText(sessionStorage.getItem("LicG"));
                  },
                  children: `Идентификатор сессии: ${sessionStorage.getItem("LicG")}`
                }
              ),
              IP !== void 0 && !config2.smeta.hideServerRedirection && /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: true, children: `Сервер перенаправления: ${IP}` })
            ]
          }
        )
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      SmetaTabItem,
      {
        id: "ChangePassowrdTab",
        label: "Крипто-плагин",
        style: {
          textTransform: "none",
          width: "100%",
          height: "100%",
          padding: "0px",
          display: "inline-block"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(WorkSpaceInstall, {})
      }
    )
  ] });
}
const PasswordInput = ({ onChange, label = "Пароль", id = "password", variant: variant2 = "standart" }) => {
  const [showPassword, setShowPassword] = reactExports.useState(false);
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(FormControl, { sx: { mt: 1 }, fullWidth: true, size: "small", variant: variant2, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(InputLabel$1, { htmlFor: "passwordInput", children: label }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Input$2,
      {
        type: showPassword ? "text" : "password",
        onChange: (e2) => {
          onChange(e2.target.value);
        },
        endAdornment: /* @__PURE__ */ jsxRuntimeExports.jsx(InputAdornment, { position: "end", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          IconButton,
          {
            id,
            onClick: () => setShowPassword(!showPassword),
            children: showPassword ? /* @__PURE__ */ jsxRuntimeExports.jsx(VisibilityOff, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Visibility, {})
          }
        ) })
      }
    )
  ] });
};
const UserProfile = ({ leave }) => {
  const theme = useAtomValue(currentTheme);
  const userInfo = getOptionsForUser() || {};
  const { isOrgEnter } = userInfo;
  const openSettings = () => {
    smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(Options, {}), {
      Title: "Настройки",
      style: { height: `${400}px`, width: `${520}px` },
      hiddenButton: true,
      blockMaximize: true,
      setFocus: true
    });
  };
  const changeOrg = async () => {
    const [drx, user, workPlace] = getLastLogin().split(",");
    const selectedOrg = await selectOrg({ drx, user });
    let typedPassword = "";
    if (!selectedOrg) return;
    const onSelect = async () => {
      checkGenLicGuid("");
      const userInfo2 = await getUserInfo(selectedOrg.config || drx, user);
      const loginData = {
        configName: selectedOrg.config || drx,
        userName: user,
        workPlace,
        password: typedPassword,
        orgTypeCls: selectedOrg.code,
        drx
      };
      const enterResp = await enterSmeta(loginData, { ip: userInfo2.Server || null });
      updateStatesAfterEnter(enterResp, loginData);
      window.location.reload();
    };
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx("input", { style: { opacity: "0.01" } }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          PasswordInput,
          {
            onChange: (e2) => {
              typedPassword = e2;
            }
          }
        )
      ] }),
      {
        Title: "Подтвердите пароль",
        style: { height: `${190}px`, width: `${500}px` },
        onSelect,
        Buttons: {
          Buttons: 3
        },
        blockMaximize: true
      }
    );
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    IconMenuButton,
    {
      title: "Профиль",
      items: [
        { label: "Настройки", onClick: openSettings },
        { label: "Выбрать организацию", onClick: changeOrg, hidden: !Boolean(isOrgEnter) },
        { label: "Выйти", onClick: leave }
      ],
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(PersonIcon, { className: clsx$3("iconButtonStimate", { light: theme === "light" }) })
    }
  );
};
function CountDown(props) {
  const { initialMinute = 0, initialSeconds = 0 } = props;
  const [minutes, setMinutes] = reactExports.useState(initialMinute);
  const [seconds, setSeconds] = reactExports.useState(initialSeconds);
  reactExports.useEffect(() => {
    let myInterval = setInterval(() => {
      if (seconds > 0) {
        setSeconds(seconds - 1);
      }
      if (seconds === 0) {
        if (minutes === 0) {
          clearInterval(myInterval);
          props.onTimerEnd && props.onTimerEnd();
        } else {
          setMinutes(minutes - 1);
          setSeconds(59);
        }
      }
    }, 1e3);
    props.getInterval && props.getInterval(myInterval);
    return () => {
      clearInterval(myInterval);
    };
  });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: props.style, children: [
    " ",
    minutes === 0 ? null : `${minutes}:`,
    seconds < 10 ? `0${seconds}` : seconds
  ] }) });
}
const stmjsonUrl = async () => {
  const hasStmJson = hasURLparam("stmjson");
  if (hasStmJson) {
    const command = parseCommand(atob(getURLparam("stmjson")));
    const ablResp = await execABLProgram({ command });
    tokenProcessingTest(ablResp);
    deleteURLparam("stmjson");
  }
};
const execABLProgram = async ({ command, id, postData }) => {
  if (command === null || command.module !== "programs" && command.module !== "tools")
    return console.error("Ошибка запроса execABLProgram");
  const prefix2 = command.module === "programs" ? Prefixes.progs : Prefixes.tools;
  const config2 = {
    prefix: prefix2,
    method: isEmptyObject(postData) ? "GET" : "POST",
    url: "execABLProgram",
    data: postData,
    params: {
      ...command.params,
      Notification: id,
      WSM: 1
    }
  };
  const json = await smetaAxios(config2);
  tokenProcessingTest(json);
};
function parseString(input) {
  const result = {};
  input = input.replace(/^stmjson:/, "");
  const parts = input.match(/(?:[^,{}]+|\{[^{}]*\})+/g);
  if (!parts) return result;
  for (const part of parts) {
    const match2 = part.match(/^([^:={]+)[:=](.+)$/);
    if (match2) {
      const key = match2[1].trim();
      let value = match2[2].trim();
      if (value.startsWith("{") && value.endsWith("}")) {
        value = value.slice(1, -1);
        result[key] = parseString(value);
      } else {
        result[key] = value.replace(/^"(.*)"$/, "$1");
      }
    } else {
      if (!result["command"]) {
        result["command"] = part.trim();
      }
    }
  }
  return result;
}
const parseCommand = (inputCommand) => {
  try {
    const reg = /[A-zА-я0-9|?&\-_.\s]+/g;
    const checkJsonStyle = new RegExp("stmjson:[A-Za-z_]+:[A-Za-z_]");
    let result = inputCommand.replaceAll('"', "");
    result = result.replaceAll(`'`, "");
    if (result.match(checkJsonStyle)) {
      result = result.replaceAll("stmjson:", "stmjson:module,");
    } else {
      result = result.replaceAll("=", ":");
    }
    const set2 = new Set(result.match(reg));
    for (let el of set2) {
      result = result.replaceAll(el, '"' + el + '"');
    }
    return JSON.parse("{" + result + "}");
  } catch {
    return parseString(inputCommand);
  }
};
const createTokenNavigate = (stmJson) => {
  tokenProcessingTest({
    token: "Navigate",
    Params: { PageID: stmJson.params.pageid || stmJson.params.PageID, RequestID: "0" }
  });
};
const stmJsonClient = (stmJson) => {
  const tokens = {
    navigate: createTokenNavigate
  };
  return tokens[stmJson.command] || null;
};
const stmJsonRequest = (stmJson, id) => {
  return execABLProgram({ command: stmJson, id });
};
const stmJsonShell = (stmJson) => {
  const operations = {
    open: shellExecute,
    download: null
  };
  if (operations[stmJson == null ? void 0 : stmJson.params.operation])
    operations[stmJson == null ? void 0 : stmJson.params.operation]({
      Params: { FileName: stmJson.params.filename, RCDATA: stmJson.params.rcdata }
    });
};
const stmjsonClick = (stmJson, id) => {
  const commands = {
    navigate: createTokenNavigate,
    client: stmJsonClient,
    request: stmJsonRequest,
    shell: stmJsonShell
  };
  if (commands[stmJson.command]) commands[stmJson.command](stmJson, id);
};
async function makeCallBacks(value, callBacks = smetaStore.get(unloadCallbacksAtom)) {
  let shouldUpdate = true;
  if (isEmptyObject(callBacks)) return shouldUpdate;
  for (const [key, callBack] of Object.entries(callBacks)) {
    const resp = await callBack(value);
    if (resp !== false) smetaStore.set(clearUnloadCallBack, key);
    else if (typeof resp === "boolean" && shouldUpdate) shouldUpdate = resp;
  }
  return shouldUpdate;
}
const getHeadForm = async (command) => {
  var _a2;
  const {
    smeta: { homeOptions }
  } = smetaStore.get(appConfig);
  const config2 = {
    prefix: Prefixes.form,
    loadMask: true,
    params: {
      height: (((_a2 = homeOptions == null ? void 0 : homeOptions.header) == null ? void 0 : _a2.height) || 38) + "px"
    }
  };
  const headData = await smetaAxios.get(command, config2);
  return headData.Head ? headData.Head : headData;
};
const DashboardNavbar = (props) => {
  const config2 = useAtomValue(appConfig);
  const hideToastNotifications = useAtomValue(hideToastNotificationsAtom);
  const theme = useAtomValue(currentTheme);
  const headForm = useAtomValue(headFormAtom);
  const navigate = useNavigate();
  const [isSessionActive2, setIsSessionActive] = useAtom(isAuthorized);
  const setSelectedSection = useSetAtom(setSelectedSectionAtom);
  const drx = getLastLogin().split(",");
  const { notifications, unreadCount, remove } = useNotificationCenter();
  const [showUnreadOnly, setShowUnreadOnly] = reactExports.useState();
  const [isOpen, setIsOpen] = reactExports.useState(false);
  const [anim, setAnim] = reactExports.useState(false);
  const [anchorEl, setAnchorEl] = reactExports.useState(null);
  const updateNotificationsButton = () => {
    switch (theme) {
      case "light":
        return {
          color: "var(--font-color-light)"
        };
      case "blue":
        return {
          color: "var(--font-color-blue)",
          borderColor: "rgba(255, 255, 255, 0.5)",
          "&:hover": {
            borderColor: "rgb(255, 255, 255)",
            backgroundColor: "rgba(255, 255, 255, 0.04)"
          }
        };
      default:
        return {};
    }
  };
  const sessionCheck = async () => {
    if (isSessionActive2 === false) {
      backToLoginPage();
    } else {
      setTimeout(async () => {
        const pingJson = await pingServer(HandleNotification);
        if (!isEmptyObject(pingJson)) {
          Notifications();
        }
      }, 100);
      setShowUnreadOnly(false);
    }
  };
  reactExports.useEffect(() => {
    stmjsonUrl();
  }, []);
  reactExports.useEffect(() => {
    sessionCheck();
  }, []);
  reactExports.useEffect(() => {
    window.addEventListener("beforeunload", beforeunloadhandler);
    window.addEventListener("storage", StorageChange);
    return () => {
      window.removeEventListener("storage", StorageChange);
      window.removeEventListener("beforeunload", beforeunloadhandler);
    };
  }, []);
  const StorageChange = (event) => {
    if (event.newValue === "leave") {
      HandleSingOut();
    }
  };
  function backToLoginPage() {
    var _a2, _b, _c, _d, _e, _f, _g;
    window.removeEventListener("beforeunload", beforeunloadhandler);
    let navigateUrl = "/";
    setIsSessionActive(false);
    if (((_a2 = getOptionsForUser()) == null ? void 0 : _a2.authed_by) === "esia" && ((_b = config2.lk.doEsia) == null ? void 0 : _b.logout)) {
      localStorage.setItem("login", "");
      window.location.href = config2.lk.doEsia.logout;
    } else {
      localStorage.setItem("login", "");
      if (((_c = getOptionsForUser()) == null ? void 0 : _c.from) && ((_d = getOptionsForUser()) == null ? void 0 : _d.from) !== "lk") {
        window.location.href = (_e = getOptionsForUser()) == null ? void 0 : _e.from.replaceAll("@", "/");
      } else {
        if (((_f = getOptionsForUser()) == null ? void 0 : _f.from) && ((_g = getOptionsForUser()) == null ? void 0 : _g.from) === "lk" && config2.smeta.hideEnter === void 0) {
          navigate("/lk");
        } else {
          if (hasURLparam("parsed")) {
            navigateUrl += getUrlSearh();
          }
          navigate(navigateUrl);
        }
      }
    }
  }
  const beforeunloadhandler = (event) => {
    event.preventDefault();
    event.returnValue = true;
    makeCallBacks();
    window.addEventListener("mousemove", mousemovehandler);
  };
  const mousemovehandler = () => {
    const licguid = sessionStorage.getItem("LicG");
    setTimeout(() => {
      localStorage.setItem("login", licguid);
    }, 3e3);
    window.removeEventListener("mousemove", mousemovehandler);
  };
  const HandleNotification = (json) => {
    if (json !== void 0) {
      if (json.content !== void 0 && json.content.substring(0, 40) === "Восстановлено подключение к конфигурации") {
        Q(json.content, {
          type: "info",
          position: "bottom-right",
          style: { width: "350px" },
          onOpen: () => {
            setTimeout(() => {
              remove("restoreConnetction");
            }, 1);
          },
          toastId: "restoreConnetction",
          data: {
            Time: `${/* @__PURE__ */ new Date()}`,
            Title: "",
            Content: json.content,
            Options: 4
          }
        });
      } else if (json.ID !== void 0) {
        RaiseToast(json);
      }
    }
  };
  const addNotification = () => {
    remove("109203");
  };
  const toggleNotificationCenter = (event) => {
    setAnchorEl(event.currentTarget);
    if (isOpen === true) {
      setTimeout(() => {
        setIsOpen(!isOpen);
      }, 499);
    } else {
      setIsOpen(!isOpen);
    }
    setAnim(!anim);
  };
  function HandleNotifications(comand, ID2) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "audit");
    params2.set("comand", "HandleNotifications");
    params2.set("Command", comand);
    if (ID2) params2.set("ID", ID2);
    params2.set("smart", "1");
    return AxiosRequest(true, params2);
  }
  function HandleNotificationClick(command, options, id) {
    let interval;
    function setInterval2(int) {
      interval = int;
    }
    switch (command.command) {
      case "navigate":
        tokenProcessingTest({
          token: "Navigate",
          Params: { PageID: command.params.pageid, RequestID: "0" }
        });
        break;
      case "client":
        if (command.token === "exit") {
          const login = localStorage.getItem("login");
          if (login === "") {
            return;
          }
          CreateBackgroundForModal(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ModalWindow,
              {
                Title: "Внимание",
                style: { height: `${180}px`, width: `${380}px` },
                Buttons: {
                  jsonData: {
                    Кнопка$Выбрать: "Выйти",
                    Кнопка$Отмена: "Остаться"
                  },
                  Params: { Buttons: "3" }
                },
                onClose: () => {
                  clearInterval(interval);
                  let params2 = /* @__PURE__ */ new Map();
                  params2.set("prefix", "project").set("comand", "info").set("info", "3");
                  XMLrequest(params2);
                },
                onSelect: () => {
                  clearInterval(interval);
                  HandleSingOut();
                },
                resizeMode: false,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "center", sx: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography, { children: [
                  "Через",
                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                    CountDown,
                    {
                      initialSeconds: 30,
                      getInterval: setInterval2,
                      onTimerEnd: HandleSingOut,
                      style: { display: "inline" }
                    }
                  ),
                  " ",
                  "произойдет автоматический выход из сессии. Продолжить работу?"
                ] }) })
              }
            )
          );
        }
        if (command.token === "navigate")
          tokenProcessingTest({
            Token: "Navigate",
            Break: "1",
            Params: { PageID: `${command.params.PageID}`, RequestID: "0" }
          });
        break;
      case "request":
        execABLProgram({ command, id });
        break;
    }
    if (options & NotifyFlag_ImdClose) {
      markAsDone(id);
      setTimeout(() => {
        remove(id);
      }, 500);
    }
  }
  const NotifyFlag_Immediately = 1;
  const NotifyFlag_CanClose = 2;
  const NotifyFlag_ImdClose = 8;
  function Notifications(jsonFromPing) {
    HandleNotifications("list").then((json) => {
      if (!isEmptyObject(json) && json.Items) {
        json = json.Items.items;
        for (const value of Object.values(json)) {
          RaiseToast(value);
        }
      }
    });
  }
  async function finishAll() {
    for (const value of Object.values(notifications)) {
      if (value.data && value.data.Options && value.data.Options & 2) {
        await markAsDone(value.id);
      }
    }
    Notifications();
  }
  function RaiseToast(value) {
    let jsonCommandData;
    try {
      if (value.Command) jsonCommandData = parseCommand(value.Command);
    } catch {
    }
    const options = Number(value.Options);
    Q(`${value.Title}` + value.content === void 0 ? "" : `${value.Title || ""}: ${value.content}`, {
      toastId: value.ID,
      type: "info",
      position: "bottom-right",
      style: {
        display: options & NotifyFlag_Immediately || isOpen === true ? "none" : "flex"
      },
      onClick: () => {
        HandleNotificationClick(jsonCommandData, options, value.ID);
      },
      data: {
        Command: jsonCommandData,
        Time: value.Time,
        Title: value.Title,
        Content: value.content,
        Options: options
      }
    });
    if (options & NotifyFlag_Immediately) {
      HandleNotificationClick(jsonCommandData, options, value.ID);
    }
    if (hideToastNotifications) Q.dismiss();
  }
  async function markAsDone(id) {
    remove(id);
    await HandleNotifications("delete", id);
  }
  const HandleSingOut = async () => {
    const callBacksResult = await makeCallBacks();
    if (!callBacksResult) return;
    await smetaAxios.get("leave", {
      loadMask: true
    });
    createCokies("drx", "");
    createCokies("LicG", "");
    updateOptionsForUser({ from: "" });
    RemoveAllBG();
    setSelectedSection({
      ID: "",
      CLSID: "",
      Name: "",
      Image: ""
    });
    backToLoginPage();
  };
  const handleClickAway = () => {
    setAnim(false);
    setTimeout(() => {
      setIsOpen(false);
    }, 499);
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    AppBar,
    {
      className: cn("headerStimate", { light: theme === "light" }),
      position: "fixed",
      sx: { zIndex: (theme2) => theme2.zIndex.drawer + 1, height: "inherit" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Toolbar,
          {
            sx: {},
            style: {
              height: "inherit",
              minHeight: 30,
              paddingLeft: !isEmptyObject(headForm) ? "0px" : "24px"
            },
            children: [
              !isEmptyObject(headForm) ? /* @__PURE__ */ jsxRuntimeExports.jsx(FormsMainFile, { head: true, jsonFormData: headForm, hideSectionTools: true, style: { overflow: "hidden" } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(
                Typography,
                {
                  variant: "h6",
                  noWrap: true,
                  component: "div",
                  sx: { mr: 2 },
                  className: cn("fontColorStimate", { light: theme === "light" }),
                  children: drx[2] + ` [${drx[0].replace(".drx", "")}] [${drx[1]}]`
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { sx: { flexGrow: 1 } }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Уведомления", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { id: "NotificationIcon", onClick: toggleNotificationCenter, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Badge, { badgeContent: unreadCount, color: "primary", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                NotificationsIcon,
                {
                  className: cn("iconButtonStimate", {
                    light: theme === "light"
                  })
                }
              ) }) }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  style: {
                    display: window.location.origin === "http://localhost:3000" ? "" : "none"
                  },
                  size: "large",
                  onClick: addNotification,
                  id: "HeadTestButton",
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(InputIcon, { className: cn("iconButtonStimate", { light: theme === "light" }) })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(SupportButton, {}),
              /* @__PURE__ */ jsxRuntimeExports.jsx(UserProfile, { leave: HandleSingOut })
            ]
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Popper,
          {
            onDoubleClick: () => {
            },
            open: isOpen,
            anchorEl,
            style: { inset: "-7px auto auto -69px", zIndex: "10", width: "450px" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClickAwayListener, { onClickAway: handleClickAway, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grow, { in: anim, style: { transformOrigin: "500px -100px 0px" }, ...isOpen ? { timeout: 500 } : {}, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "center", style: { width: "100%" }, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  item: true,
                  className: cn("headerStimate", { light: theme === "light" }),
                  sx: {
                    padding: "8px",
                    display: "flex",
                    justifyContent: "space-between",
                    alignItems: "center",
                    width: "100%",
                    border: "1px solid",
                    borderRadius: "5px 5px 0px 0px"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Typography,
                    {
                      variant: "h5",
                      className: cn("fontColorStimate", {
                        light: theme === "light"
                      }),
                      children: "Центр уведомлений"
                    }
                  )
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  item: true,
                  style: {
                    width: "100%",
                    borderWidth: "0px 1px 1px 1px",
                    borderStyle: "solid"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                    Stack,
                    {
                      sx: {
                        height: "400px",
                        width: "100%",
                        padding: "12px",
                        background: "#f1f1f1",
                        overflowY: "auto"
                      },
                      spacing: 2,
                      children: [
                        (!notifications.length || unreadCount === 0 && showUnreadOnly) && /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx("h4", { style: { textAlign: "center" }, children: "У вас нет уведомлений!" }) }),
                        (showUnreadOnly ? notifications.filter((v2) => !v2.read) : notifications).map(
                          (notification, index2) => {
                            return /* @__PURE__ */ jsxRuntimeExports.jsxs(
                              Alert,
                              {
                                severity: "info",
                                action: Number(notification.data.Options) & NotifyFlag_CanClose ? notification.read ? /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Завершить", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                  IconButton,
                                  {
                                    color: "primary",
                                    "aria-label": "upload picture",
                                    component: "span",
                                    onClick: () => markAsDone(notification.id),
                                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(MarkChatReadIcon, {})
                                  }
                                ) }) : false,
                                children: [
                                  /* @__PURE__ */ jsxRuntimeExports.jsxs(AlertTitle, { children: [
                                    notification.data.Time,
                                    " ",
                                    notification.data.Title
                                  ] }),
                                  !isEmptyObject(notification.data.Command) ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                                    Link$1,
                                    {
                                      onClick: () => HandleNotificationClick(
                                        notification.data.Command,
                                        notification.data.Options,
                                        notification.id
                                      ),
                                      style: { cursor: "pointer" },
                                      underline: "hover",
                                      children: notification.data.Content
                                    }
                                  ) : notification.data.Content
                                ]
                              },
                              `header-alert_${index2}`
                            );
                          }
                        )
                      ]
                    }
                  )
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  item: true,
                  style: {
                    width: "100%",
                    borderWidth: "0px 1px 1px 1px",
                    borderStyle: "solid",
                    borderRadius: "0px 0px 5px 5px"
                  },
                  className: cn("headerStimate", { light: theme === "light" }),
                  sx: {
                    padding: "8px",
                    display: "flex",
                    justifyContent: "space-between",
                    alignItems: "center"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Button$2,
                      {
                        variant: "outlined",
                        sx: updateNotificationsButton(),
                        style: {
                          textTransform: "none"
                        },
                        value: "refresh",
                        onClick: Notifications,
                        children: "Обновить"
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Button$2,
                      {
                        variant: "outlined",
                        sx: updateNotificationsButton(),
                        style: {
                          textTransform: "none"
                        },
                        value: "refresh",
                        onClick: finishAll,
                        children: "Прочитать всё"
                      }
                    )
                  ]
                }
              )
            ] }) }) })
          }
        )
      ]
    }
  );
};
const buttonLabels = {
  [Button$1.Ok]: "Кнопка$Выбрать",
  [Button$1.Cancel]: "Кнопка$Отмена",
  [Button$1.Yes]: "Кнопка$Да",
  [Button$1.No]: "Кнопка$Нет",
  [Button$1.Abort]: "Кнопка$Прервать",
  [Button$1.Retry]: "Кнопка$Повторить",
  [Button$1.Ignore]: "Кнопка$Пропустить",
  [Button$1.All]: "Кнопка$Для всех",
  [Button$1.NoToAll]: "Кнопка$Нет для всех",
  [Button$1.YesToAll]: "Кнопка$Да для всех"
};
const SmetaModalsIdContext = reactExports.createContext("");
const SmetaModalsButtonsContext = reactExports.createContext(void 0);
const smetaModalsAtom = atom([]);
let timer = null;
const refreshMinimizedWindowsPosition = (allMinimizedWindows) => {
  if (allMinimizedWindows.length) {
    allMinimizedWindows.sort((a2, b2) => a2.getBoundingClientRect().right - b2.getBoundingClientRect().right);
    allMinimizedWindows[0].style.left = "5px";
    let lastPlacedWindow = allMinimizedWindows[0];
    for (let i = 1; i < allMinimizedWindows.length; i++) {
      const currentWindow = allMinimizedWindows[i];
      const previousWindow = allMinimizedWindows[i - 1];
      const newLeft = parseFloat(previousWindow.style.left) + previousWindow.offsetWidth + 10;
      if (newLeft + currentWindow.offsetWidth < document.documentElement.clientWidth) {
        currentWindow.style.left = newLeft + "px";
        currentWindow.style.top = previousWindow.offsetTop + "px";
        lastPlacedWindow = currentWindow;
      } else {
        currentWindow.style.left = parseFloat(lastPlacedWindow.style.left) + "px";
        currentWindow.style.top = lastPlacedWindow.offsetTop + "px";
      }
    }
  }
};
const openModal = (content2, props = {}) => {
  const datasetId = uuid$1();
  const newModal = {
    datasetId,
    content: content2,
    props
  };
  const prevModals = smetaStore.get(smetaModalsAtom);
  smetaStore.set(smetaModalsAtom, [...prevModals, newModal]);
  return datasetId;
};
const closeModal = async (idModalWindow, executeOnClose = false) => {
  const prevModals = smetaStore.get(smetaModalsAtom);
  if (prevModals.length === 0) return;
  const closingFunction = async () => {
    var _a2;
    const lastModal = prevModals[prevModals.length - 1];
    const closedModal = idModalWindow ? prevModals.find((modal) => modal.datasetId === idModalWindow) ?? lastModal : lastModal;
    const proprClosedModal = closedModal.props;
    if (executeOnClose) {
      const afterCallBacks = proprClosedModal.callBacks === true ? await makeCallBacks() : true;
      if (!afterCallBacks) return;
      const shouldClose = proprClosedModal.closingQuery ? await proprClosedModal.closingQuery(DlgRes.Cancel.toString()) : true;
      if (!shouldClose) return;
      (_a2 = proprClosedModal.onClose) == null ? void 0 : _a2.call(proprClosedModal, "");
    }
    return smetaStore.set(
      smetaModalsAtom,
      prevModals.filter((modal) => modal !== closedModal)
    );
  };
  if (!smetaStore.get(animationsAtom)) return await closingFunction();
  if (!timer) {
    const newModals = [...prevModals];
    const lastModal = newModals[newModals.length - 1];
    const closedModal = idModalWindow ? newModals.find((modal) => modal.datasetId === idModalWindow) ?? lastModal : lastModal;
    closedModal.props.closing = true;
    smetaStore.set(smetaModalsAtom, newModals);
    timer = setTimeout(async () => {
      await closingFunction();
      timer = null;
    }, 226);
  }
};
const updateModalProps = (updatedProps, idModalWindow) => {
  const prevModals = smetaStore.get(smetaModalsAtom);
  if (prevModals.length === 0) return;
  const newModals = [...prevModals];
  const lastModal = newModals[newModals.length - 1];
  const changedModal = idModalWindow ? newModals.find((modal) => modal.datasetId === idModalWindow) ?? lastModal : lastModal;
  changedModal.props = { ...changedModal.props, ...updatedProps };
  smetaStore.set(smetaModalsAtom, newModals);
};
const smetaModals = {
  open: openModal,
  close: closeModal,
  refreshMinimizedWindowsPosition,
  updateModalProps
};
function DialogCalendar({ props, smetaModalId = "" }) {
  const [dateValue, setDateValue] = React.useState(props.value ? props.value : getDateBack(getNowDate()).label);
  const calendar = React.useRef();
  React.useEffect(() => {
    if (calendar.current) {
      const prev2 = calendar.current.querySelector(".MuiIconButton-edgeEnd");
      if (prev2) {
        prev2.title = "Предыдущий месяц";
      }
      const next2 = calendar.current.querySelector(".MuiIconButton-edgeStart");
      if (next2) {
        next2.title = "Следующий месяц";
      }
    }
  }, [calendar.current]);
  function getNowDate() {
    const test2 = /* @__PURE__ */ new Date();
    return `${test2.getDate() < 10 ? `0${test2.getDate()}` : test2.getDate()}.${test2.getMonth() + 1 < 10 ? `0${test2.getMonth() + 1}` : test2.getMonth() + 1}.${test2.getFullYear()}`;
  }
  function getDateInFormat(value) {
    let date = value;
    if (date) {
      if (date.match(/[0-9]{4}-[0-9]{2}-[0-9]{2}/)) return date;
      if (date.match(/[0-9]{2}.[0-9]{2}.[0-9]{4}/)) {
        date = date.split(".");
        date = [date[2], date[1], date[0]];
        return date.join("-");
      }
    }
  }
  function getDateBack(value) {
    const date = getDateInFormat(value);
    if (date) {
      const oneDay = 1e3 * 60 * 60 * 24;
      const startDate = /* @__PURE__ */ new Date("1899-12-30");
      const currentDate = new Date(date);
      let id = Math.round((currentDate.getTime() - startDate.getTime()) / oneDay);
      if (!id) id = "-1";
      return { label: value === ".." ? "" : value, id };
    } else return { label: "", id: "" };
  }
  function getMaxDay2(id, year2) {
    {
      return {
        ["0"]: "0",
        ["1"]: "31",
        ["2"]: Number(year2) % 4 === 0 ? "29" : "28",
        ["3"]: "31",
        ["4"]: "30",
        ["5"]: "31",
        ["6"]: "30",
        ["7"]: "31",
        ["8"]: "31",
        ["9"]: "30",
        ["10"]: "31",
        ["11"]: "30",
        ["12"]: "31"
      }[id];
    }
  }
  function monthSelect(numMonth) {
    const date = dateValue.split(".");
    let day = date[0];
    const month = numMonth < 10 ? `0${numMonth}` : numMonth;
    const year2 = date[2];
    const maxDay = getMaxDay2(numMonth, year2);
    if (day > maxDay) day = maxDay;
    setDateValue(`${day}.${month}.${year2}`);
  }
  async function onSelect() {
    const date = getDateBack(dateValue);
    if (props.onEdit && props.setValue && props.setInputValue) {
      props.onEdit({
        value: date.label,
        tag: date.id,
        name: props.Name,
        record: props.record,
        textchanged: "0",
        setValue: props.setValue,
        setInputValue: props.setInputValue,
        type: props.Module,
        requestId: props.RequestID,
        addInfo: props.addInfo
      });
      if (props.newModal) smetaModals.close(smetaModalId);
      return;
    }
    if (props.RequestID) {
      await formEdit("1", props.func, { Name: "ObjRef", Value: date.id }, props.RequestID, props.from);
    }
    if (props.newModal) smetaModals.close(smetaModalId);
  }
  const stylebttn = {
    height: "20px",
    width: "20px",
    fontSize: "90%",
    marginTop: "6px",
    borderRadius: "3px",
    border: "1px solid #eeeeee"
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "100%", width: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        container: true,
        direction: "column",
        justifyContent: "space-between",
        alignItems: "center",
        style: {
          height: "calc(100% - 50px)",
          width: "100%",
          border: "1px solid #cccccc"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", alignItems: "center", style: { height: "100%" }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              container: true,
              direction: "column",
              justifyContent: "space-between",
              alignItems: "center",
              style: {
                height: "100%",
                width: "25px",
                display: "flex",
                justifyContent: "center",
                alignItems: "center",
                paddingLeft: "20px"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Январь",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("1");
                    },
                    children: "Ⅰ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Февраль",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("2");
                    },
                    children: "Ⅱ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Март",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("3");
                    },
                    children: "Ⅲ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Апрель",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("4");
                    },
                    children: "Ⅳ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Май",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("5");
                    },
                    children: "Ⅴ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Июнь",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("6");
                    },
                    children: "Ⅵ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Июль",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("7");
                    },
                    children: "Ⅶ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Август",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("8");
                    },
                    children: "Ⅷ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Сентябрь",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("9");
                    },
                    children: "Ⅸ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Октябрь",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("10");
                    },
                    children: "Ⅹ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Ноябрь",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("11");
                    },
                    children: "Ⅺ"
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  IconButton,
                  {
                    title: "Декабрь",
                    style: stylebttn,
                    size: "small",
                    onClick: () => {
                      monthSelect("12");
                    },
                    children: "Ⅻ"
                  }
                )
              ] })
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { ref: calendar, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LocalizationProvider, { dateAdapter: AdapterDayjs, adapterLocale: "ru", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            DateCalendar,
            {
              showDaysOutsideCurrentMonth: true,
              views: ["year", "month", "day"],
              value: dayjs(getDateInFormat(dateValue)),
              onChange: (newValue, comand) => {
                setDateValue(
                  `${newValue.get("date") < 10 ? `0${newValue.get("date")}` : newValue.get("date")}.${newValue.month() + 1 < 10 ? `0${newValue.month() + 1}` : newValue.month() + 1}.${newValue.year()}`
                );
              }
            }
          ) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Grid$1,
            {
              container: true,
              direction: "column",
              justifyContent: "flex-start",
              alignItems: "center",
              style: { height: "100%", marginRight: "10px" },
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Grid$1,
                  {
                    style: {
                      height: "33%",
                      display: "flex",
                      justifyContent: "center",
                      alignItems: "center"
                    },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        title: "В начало года",
                        size: "small",
                        onClick: () => {
                          const date = getDateInFormat(dateValue) ? new Date(getDateInFormat(dateValue)) : /* @__PURE__ */ new Date();
                          setDateValue(`01.01.${date.getFullYear()}`);
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowLeftIcon, {})
                      }
                    )
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Grid$1,
                  {
                    style: {
                      height: "34%",
                      display: "flex",
                      justifyContent: "center",
                      alignItems: "center"
                    },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        title: "Текущая дата",
                        onClick: () => {
                          setDateValue(getDateInFormat(getNowDate()));
                        },
                        size: "small",
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(TodayIcon, {})
                      }
                    )
                  }
                ),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Grid$1,
                  {
                    style: {
                      height: "33%",
                      display: "flex",
                      justifyContent: "center",
                      alignItems: "center"
                    },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        title: "В конец года",
                        onClick: () => {
                          const date = getDateInFormat(dateValue) ? new Date(getDateInFormat(dateValue)) : /* @__PURE__ */ new Date();
                          setDateValue(`31.12.${date.getFullYear()}`);
                        },
                        size: "small",
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowRightIcon, {})
                      }
                    )
                  }
                )
              ]
            }
          ) })
        ] })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { height: "40px", width: "100%", marginTop: "10px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          style: { textTransform: "none", marginRight: "10px" },
          value: "1",
          className: "button_Modal_Select",
          onClick: onSelect,
          children: "Ок"
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          onClick: () => {
            if (props.newModal) smetaModals.close(smetaModalId);
          },
          size: "small",
          variant: "outlined",
          value: "2",
          style: { textTransform: "none", marginLeft: 10, width: 75 },
          className: "button_Modal_Close",
          children: "Отмена"
        }
      )
    ] }) })
  ] });
}
const DialogCalendar$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: DialogCalendar
}, Symbol.toStringTag, { value: "Module" }));
function ModalButton({ props }) {
  const [icon, setIcon] = React.useState();
  React.useEffect(() => {
    if (props.buttonImage) {
      getIconsAsync(props.buttonImage).then((res) => {
        setIcon(ImgURLSRC(res));
      });
    }
  }, []);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    IconButton,
    {
      disabled: props.disabled,
      ref: props.refButton,
      className: "modal-button",
      style: {
        width: "20px !important",
        height: "100%",
        borderRadius: "0px",
        padding: "0",
        display: props.EditStyle_Ellipsis && props.EditStyle_Calendar === 0 ? "flex" : "none"
      },
      type: "button",
      onClick: async () => {
        var _a2, _b, _c;
        if (props.disabled) return;
        props.closeList();
        const subData = {
          props: {
            FieldName: props.fieldname,
            Current: props.current,
            Value: props.value.label,
            ObjRef: props.value.id ? props.value.id : "0",
            ObjType: props.datatype,
            from: props.from,
            func: props.func,
            onEdit: props.onEdit,
            Module: props.type,
            data: props.data,
            Path: props.Path,
            GroupID: props.groupid,
            Name: props.name,
            record: props.record,
            editParam: props.editParam,
            setValue: props.setValue,
            setInputValue: props.setInputValue,
            setSelection: props.setSelection,
            addInfo: { ...props.addInfo, editButtonClick: true },
            MultiSel: props.multisel ? true : false,
            Selection: props.selection
          },
          func: props.func,
          from: props.from
        };
        let json;
        if (props.settings && props.settings.onEdit) {
          if (!props.documentGrid) {
            const params2 = {
              ProgID: props.settings.onEdit,
              Value: props.objref,
              WSM: "1"
            };
            const config2 = {
              prefix: Prefixes.progs,
              method: "GET",
              url: "EditParamProperty",
              params: params2
            };
            json = await smetaAxios(config2);
            subData.props.addInfo.needPost = true;
            subData.props.addInfo.checkObjRefBeforePost = true;
          } else {
            json = await EditColumnField({
              Module: "documents",
              DocCfgID: props.docProps.DocCfgID,
              SectionID: props.docProps.SectionID,
              ID: props.docProps.ID,
              DocID: props.docProps.DocID,
              MasterID: props.docProps.MasterID,
              Reference: props.docProps.Reference
            });
          }
          props.openModalWindow(props, json, {
            ...subData,
            from: "grid",
            func: props.addInfo.ModalButtonCallBack
          });
          return;
        }
        if ((_a2 = props.addInfo) == null ? void 0 : _a2.onEditButtonClick) {
          props.addInfo.onEditButtonClick(subData);
          return;
        }
        if (props.datatype === "0") {
          subData.props.editParam = "1";
          props.openModalWindow(props, json, subData);
          return;
        }
        if (subData.props.editParam === void 0 && props.datatype > 0 && props.datatype <= 12) {
          if (props.datatype === "4") {
            smetaModals.open(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                DialogCalendar,
                {
                  props: {
                    onEdit: props.onEdit,
                    ...props,
                    value: props.inputValue,
                    newModal: true
                  }
                }
              ),
              {
                Title: "Календарь",
                style: getStyleWindow(),
                hiddenButton: true,
                blockMaximize: true
              }
            );
            return;
          }
          CreateBackgroundForModal(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ModalWindow,
              {
                Title: ((_c = (_b = props == null ? void 0 : props.record) == null ? void 0 : _b.dataset) == null ? void 0 : _c.name) || props.title || "Текст параметра",
                style: getStyleWindow(),
                hiddenButton: true,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  TextAreaWithButtons,
                  {
                    props: {
                      ...props,
                      setValue: props.setValue,
                      setInputValue: props.setInputValue,
                      Title: "",
                      Value: props.inputValue
                    }
                  }
                )
              }
            )
          );
          return;
        }
        if (props.editParam === void 0 && (props.datatype < 7 || props.datatype > 12)) {
          json = await props.GetDialogParam(
            props.type,
            props.datatype,
            props.value.id ? props.value.id : "0",
            props.multisel
          );
          if (json.ObjType) subData.props.ObjType = json.ObjType;
          if (json.ObjRef) subData.props.ObjRef = json.ObjRef;
          if (!json.Break) json.Break = "";
          if (!json.Token) json.Token = "HandleTable";
        }
        props.openModalWindow(props, json, subData);
      },
      children: props.buttonImage ? /* @__PURE__ */ jsxRuntimeExports.jsx("img", { style: { maxHeight: "20px" }, src: icon }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MoreHorizIcon, { style: { maxHeight: "20px" } })
    },
    `modal-button_${props.id}`
  );
}
function CheckboxList(props) {
  const currentTarget = reactExports.useRef();
  const listRef = reactExports.useRef();
  function arrowDown() {
    let el = listRef.current.querySelector(".focusCheckListItem");
    const firstChild = listRef.current.firstChild;
    const lastChild = listRef.current.lastChild;
    if (!el) {
      el = firstChild;
      el.focus();
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
      return;
    }
    if (el === lastChild) {
      el.classList.remove("focusCheckListItem");
      el = firstChild;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    } else {
      el.classList.remove("focusCheckListItem");
      el = el.nextElementSibling;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    }
    const parentEl = listRef.current.parentElement.parentElement;
    const scrollingPos = el.getBoundingClientRect().y - parentEl.getBoundingClientRect().y;
    parentEl.scrollBy({
      left: 0,
      top: scrollingPos,
      behavior: "smooth"
    });
  }
  function arrowUp() {
    let el = listRef.current.querySelector(".focusCheckListItem");
    const firstChild = listRef.current.firstChild;
    const lastChild = listRef.current.lastChild;
    if (!el) {
      el = lastChild;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
      return;
    }
    if (el === firstChild) {
      el.classList.remove("focusCheckListItem");
      el = lastChild;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    } else {
      el.classList.remove("focusCheckListItem");
      el = el.previousElementSibling;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    }
    const parentEl = listRef.current.parentElement.parentElement;
    const scrollingPos = el.getBoundingClientRect().y - parentEl.getBoundingClientRect().y;
    parentEl.scrollBy({
      left: 0,
      top: scrollingPos,
      behavior: "smooth"
    });
  }
  function onKeyDown(ev) {
    switch (ev.code) {
      case "ArrowDown":
        arrowDown();
        break;
      case "ArrowUp":
        arrowUp();
        break;
      case "Space":
        ev.preventDefault();
        if (currentTarget.current) {
          const bttn = currentTarget.current.querySelector(`[listbutton="true"]`);
          if (bttn) bttn.click();
        }
        break;
      case "Enter":
        ev.stopPropagation();
        props.handleClose();
        break;
      case "Tab":
        ev.preventDefault();
        arrowDown();
        break;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Popover,
    {
      transitionDuration: 50,
      onKeyDown,
      id: props.id,
      open: props.open,
      anchorEl: props.anchorEl,
      onClose: props.handleClose,
      anchorOrigin: {
        vertical: "bottom",
        horizontal: "right"
      },
      transformOrigin: {
        vertical: "top",
        horizontal: "right"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          ref: (el) => {
            if (!el) return;
            const listEl = el.querySelector("ul");
            listRef.current = listEl;
          },
          checklist: "true",
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            List,
            {
              sx: {
                width: "fit-content",
                maxWidth: `${document.body.clientWidth / 2}px`,
                bgcolor: "background.paper"
              },
              children: props.items.map((value) => {
                const labelId = `checkbox-list-label-${value.id}`;
                return /* @__PURE__ */ jsxRuntimeExports.jsx(
                  ListItem$1,
                  {
                    title: value.label,
                    style: {
                      borderBottom: "1px solid #eeeeee",
                      height: "27px",
                      overflow: "hidden",
                      whiteSpace: "nowrap",
                      textOverflow: "ellipsis"
                    },
                    disablePadding: true,
                    children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      ListItemButton,
                      {
                        style: { height: "inherit" },
                        listbutton: "true",
                        onClick: (ev) => {
                          props.handleToggle(ev, value);
                        },
                        dense: true,
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { style: { height: "inherit", minWidth: "0" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Checkbox,
                            {
                              size: "small",
                              edge: "start",
                              checked: props.checked.indexOf(Number(value.id)) !== -1,
                              tabIndex: -1,
                              disableRipple: true,
                              inputProps: {
                                "aria-labelledby": labelId
                              }
                            }
                          ) }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { id: labelId, primary: value.label })
                        ]
                      }
                    )
                  },
                  value.id
                );
              })
            }
          )
        }
      )
    }
  );
}
const FontStyle_Bold = 1;
const FontStyle_Italic = 2;
const FontStyle_Underline = 4;
const FontStyle_StrikeOut = 8;
const ParamSetOption_Disabled = 1;
const ParamSetOption_Collapsed = 32;
const ParamSetOption_RedNegative = 128;
const ParamSetOption_Hidden = 8192;
const ParamSetOption_History = 16384;
var resize = {};
function onMouseDown(ev) {
  const record = ev.target.closest("TR");
  const table = record.parentElement;
  const el = record.querySelector(".td-name");
  const elements = table.querySelectorAll(".td-name");
  resize.resizeMode = true;
  resize.target = ev.target;
  resize.cells = elements;
  resize.cell = el;
}
function onMouseUp(ev, setWidth) {
  if (resize.size !== void 0) {
    if (resize.ctrlKey) {
      resize = {};
      return;
    }
    setWidth(resize.size);
    resize = {};
  }
}
function onMouseMove(ev) {
  if (resize.resizeMode) {
    const x = ev.clientX;
    const targetWidth = resize.target.clientWidth;
    const targetX = resize.target.getBoundingClientRect().x;
    if (ev.ctrlKey) {
      resize.ctrlKey = true;
      let size = x - targetWidth - targetX;
      size = resize.cell.clientWidth / resize.cell.parentElement.clientWidth * 100 + size / resize.cell.parentElement.clientWidth * 100;
      if (size < 30) size = 30;
      if (size > 70) size = 70;
      resize.size = size;
      resize.cell.style.width = `${size}%`;
      return;
    }
    resize.cells.forEach((el) => {
      let size = x - targetWidth - targetX;
      if (el.style.clientWidth === 0) return;
      size = el.clientWidth / el.parentElement.clientWidth * 100 + size / el.parentElement.clientWidth * 100;
      if (size < 30) size = 30;
      if (size > 70) size = 70;
      resize.size = size;
      el.style.width = `${size}%`;
    });
  }
}
function getPadding(items, item, index2) {
  let padding2 = 15;
  const level = item.Level ? item.Level : 0;
  if (items.length - 1 > index2 && level < items[index2 + 1].Level) {
    padding2 -= 15;
  }
  if (item.Level) {
    padding2 += item.Level * 15;
  }
  return padding2;
}
function getSetParamRequest(selector, props) {
  const requests = {
    custom: (data) => {
      return props.onEditCustom({ ...data, parentID: props.ID });
    },
    default: (data) => {
      const params2 = {
        DocCfgID: props.DocCfgID,
        DocID: data.ID,
        ObjRef: data.ObjRef || "0",
        State: data.CheckState,
        Type: data.Type
      };
      const config2 = {
        prefix: Prefixes.doc,
        method: "POST",
        url: "SetDetailValue",
        params: params2,
        data: { Text: data.Value }
      };
      return smetaAxios(config2);
    }
  };
  return selector && requests[selector] ? requests[selector] : requests.default;
}
function setColor$2(intColor) {
  function toHex2(i) {
    let res = 255 & i;
    if (res) {
      res = res.toString(16);
    } else res = 0;
    res = String(res).padStart(2, "0");
    return res;
  }
  let result = "#" + toHex2(intColor);
  result += toHex2(intColor >> 8);
  result += toHex2(intColor >> 16);
  return result;
}
function getStyleName(item) {
  return {
    display: "flex",
    flex: "1 1 0",
    color: item.NameColor ? setColor$2(item.NameColor) : "",
    fontWeight: item.NameStyle & FontStyle_Bold ? "bold" : "",
    fontStyle: item.NameStyle & FontStyle_Italic ? "italic" : "",
    textDecoration: item.NameStyle & FontStyle_Underline ? "underline" : item.NameStyle & FontStyle_StrikeOut ? "line-through" : ""
  };
}
function getStyleColor(item) {
  if (item.TextColor === "-16777199" || item.TextColor === "-16777198") {
    return "#aaaaaa";
  }
  if (item.TextColor !== void 0) {
    return setColor$2(item.TextColor);
  }
  return "";
}
function getStyleText(item) {
  const style2 = {};
  if (item.TextStyle !== void 0) {
    style2.fontWeight = item.TextStyle & FontStyle_Bold ? "bold" : "";
    style2.fontStyle = item.TextStyle & FontStyle_Italic ? "italic" : "";
    style2.textDecoration = item.TextStyle & FontStyle_Underline ? "underline" : item.TextStyle & FontStyle_StrikeOut ? "line-through" : "";
    style2.fontSize = "0.75rem";
  }
  return style2;
}
function DetailsParams(props) {
  const [paramsData, setParamData] = React.useState();
  const [paramsItems, setParamsItems] = React.useState();
  const [paramsJsx, setParamsJsx] = React.useState();
  const [width2, setWidth] = React.useState(35);
  const [buttonBlockWidth, setbuttonBlockWidth] = React.useState(0);
  const editor = React.useRef();
  const [editionMap, setEditionMap] = React.useState();
  const [getEdition, setGetEdition] = React.useState();
  const inputValue = React.useRef([]);
  const mouseDown = React.useRef(null);
  const paramsBox2 = React.useRef();
  const editorVals = React.useRef({});
  React.useEffect(() => {
    if (props.data) {
      setParamData(props.data);
    }
    setEditionMap(/* @__PURE__ */ new Map());
    if (props.inputValue) {
      inputValue.current = props.inputValue.split(";");
    }
  }, []);
  React.useEffect(() => {
    if (props.data) {
      setEditionMap(/* @__PURE__ */ new Map());
      setParamsJsx(null);
      setParamData(props.data);
    }
  }, [props.data]);
  React.useEffect(() => {
    if (paramsData) {
      if (editor.current) {
        deleteEditor(editor.current);
      }
      setParamsItems(paramsData.Items);
    }
  }, [paramsData]);
  React.useEffect(() => {
    if (paramsItems) {
      setParamsJsx(getJsxParams(paramsItems));
    }
  }, [paramsItems]);
  React.useEffect(() => {
    if (getEdition) {
      editionMap.set(getEdition.id, {
        setValue: getEdition.setValue,
        setInputValue: getEdition.setInputValue,
        value: getEdition.value,
        inputValue: getEdition.inputValue
      });
    }
  }, [getEdition]);
  React.useLayoutEffect(() => {
    if (paramsJsx) {
      paramsBox2.current.querySelectorAll("#expandButtonParams").forEach((el) => {
        if ((Number(el.dataset.collapsed) & ParamSetOption_Collapsed) !== ParamSetOption_Collapsed) {
          el.closest("TR").dataset.collapsed = "1";
          expandRec({ target: el });
        }
      });
    }
  }, [paramsJsx]);
  function getExpandButton(items, item, index2) {
    const level = item.Level ? item.Level : 0;
    if (items.length - 1 > index2 && level < items[index2 + 1].Level) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        IconButton,
        {
          id: "expandButtonParams",
          "data-collapsed": item.Options,
          name: "expandButton",
          onClick: async (ev) => {
            const record = ev.target.closest("tr");
            await collapseReq(
              record.id.split("_")[1],
              props.Path ? props.Path : paramsData.Path,
              record.dataset.collapsed === "1" ? "0" : "1"
            );
            expandRec(ev);
          },
          className: clsx$3(
            sectionsStyles.paramsExpandButton,
            Number(item.Options) & ParamSetOption_Collapsed && sectionsStyles.paramsExpandButtonRotate
          ),
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { style: { height: "15px", width: "15px" } })
        }
      );
    }
  }
  async function collapseReq(id, Path, collapsed) {
    const params2 = {
      Path,
      ID: id,
      Collapsed: collapsed
    };
    const config2 = {
      prefix: Prefixes.progs,
      method: "GET",
      url: "ParamCollapsed",
      params: params2
    };
    return smetaAxios(config2);
  }
  function expandRec(ev) {
    let button = ev.target.closest("BUTTON");
    let record = ev.target.closest("TR");
    const tdName = record.querySelector(".td-name");
    let level = record.dataset.level;
    let nextRec = record.nextElementSibling;
    const condition = record.dataset.collapsed === "1";
    while (nextRec && nextRec.dataset.level > level) {
      const nextButton = nextRec.querySelector("button[name=expandButton]");
      if (nextButton && nextRec.dataset.collapsed === "0") {
        nextRec.dataset.collapsed = "1";
        nextButton.classList.add(clsx$3.sectionsStyles.paramsExpandButtonRotate);
      }
      if (condition) {
        nextRec.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
        const td = nextRec.querySelector(".td-name");
        if (td && tdName) td.style.width = tdName.style.width;
      } else {
        nextRec.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      }
      if (nextRec.dataset.level !== `${Number(level) + 1}` || Number(nextRec.dataset.options) & ParamSetOption_Disabled) {
        nextRec.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      }
      nextRec = nextRec.nextElementSibling;
    }
    if (condition) button.classList.remove(clsx$3(sectionsStyles.paramsExpandButtonRotate));
    else button.classList.add(clsx$3(sectionsStyles.paramsExpandButtonRotate));
    record.dataset.collapsed = condition ? "0" : "1";
  }
  async function onEdit(data) {
    const textValueDiv = data.record.querySelector('[textvalue="true"]');
    if (data.value === void 0) data.value = data.record.dataset.value;
    if (data.tag === void 0) data.tag = data.record.dataset.objref;
    mouseDown.current = false;
    if (data.value !== void 0) textValueDiv.innerText = data.value;
    if (data.proof === true && data.type !== void 0 && data.value !== "") {
      const params2 = {
        Flag: "-1",
        ObjType: data.datatype,
        ObjRef: data.ObjRef || "0",
        Text: data.value || ""
      };
      const config2 = {
        prefix: data.type,
        method: "GET",
        url: "SetObjectText",
        params: params2
      };
      const json = await smetaAxios(config2);
      data.editType = "ObjRef";
      data.proof = false;
      settingValues(
        {
          Selection: json.Selection,
          Token: json.Token,
          CreateNew: json.Selection ? void 0 : json.CreateNew,
          ObjRef: json.ObjRef,
          Text: json.Text,
          EditVal: json.Text,
          noUpdate: true
        },
        data
      );
      if (!json.Token && !json.CreateNew && json.Selection.length === 0) {
        await getSetParamRequest(
          props.onEditCustom ? "custom" : void 0,
          props
        )({
          ID: data.record.id.split("_")[1],
          ObjRef: data.tag,
          Value: data.value,
          CheckState: data.CheckState || data.record.dataset.checkstate,
          Type: "Text",
          ObjType: data.datatype,
          TextChanged: data.textchanged
        }).then((res) => {
          settingValues(res, data);
        });
      }
      return;
    }
    if (data.value === "") {
      data.tag = 0;
      data.record.dataset.value = "";
      data.record.dataset.tag = "0";
    }
    await getSetParamRequest(
      props.onEditCustom ? "custom" : void 0,
      props
    )({
      ID: data.record.id.split("_")[1],
      ObjRef: data.tag,
      Value: data.value,
      CheckState: data.CheckState || data.record.dataset.checkstate,
      Type: data.editType || (data.CheckState ? "State" : "ObjRef"),
      fieldname: data.fieldname,
      ObjType: data.datatype,
      TextChanged: data.textchanged
    }).then((res) => {
      settingValues(res, data);
    });
  }
  async function settingValues(res, data) {
    props.valueChanged.current = true;
    if (res) {
      if (res.Token) {
        tokenProcessingTest(res, {
          func: (val) => {
            settingValues(val, data);
          }
        });
        return;
      }
      if (res.Selection && res.Selection.length) {
        smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(DialogSetObjText, { list: res.Selection, onEdit, record: data.record, data }), {
          Title: "Выберите элемент из списка",
          style: getStyleWindow(),
          hiddenButton: true,
          blockMaximize: true
        });
        return;
      }
      if (res.CreateNew) {
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogCreateObj,
            {
              onEdit,
              inputNameObj: res.CreateNew.Text,
              spanText: res.CreateNew.Label,
              CLSID: res.CreateNew.CLSID,
              ObjType: data.datatype,
              Module: data.type,
              groups: res.CreateNew.Groups,
              record: data.record
            }
          ),
          {
            Title: "Создать новый объект",
            style: getStyleWindow(`${res.CreateNew.CLSID}${res.CreateNew.Groups ? "Group" : ""}`),
            hiddenButton: true,
            blockMaximize: true,
            blockSaveLocation: true
          }
        );
        return;
      }
      const rec = data.record;
      const textValueDiv = rec.querySelector('[textvalue="true"]');
      const editText = res.EditVal || res.Text || "";
      const text = res.Text || res.EditVal || "";
      editorVals.current[rec.dataset.name] = editText;
      const resultText = Object.values(editorVals.current).filter((item) => {
        if (item) return item;
      }).join(";");
      props.setParentEditorValue({
        label: resultText
      });
      props.setParentEditorValueInput(resultText);
      if (data.CheckState !== 0) {
        rec.dataset.editval = editText;
        rec.dataset.value = text;
        rec.dataset.objref = res.ObjRef ? res.ObjRef : data.record.dataset.objref !== void 0 ? data.record.dataset.objref : "0";
        textValueDiv.innerText = text;
        textValueDiv.style.color = textValueDiv.innerText < 0 && rec.dataset.options & ParamSetOption_RedNegative ? "red" : getStyleColor(res);
        if (editor.current) {
          const edition = editionMap.get(rec.id);
          if (edition) {
            edition.setValue({
              label: editText,
              id: res.ObjRef ? res.ObjRef : "0"
            });
            edition.setInputValue(editText);
          }
        }
      } else {
        rec.dataset.editval = "";
        rec.dataset.value = "";
        rec.dataset.objref = "0";
        textValueDiv.innerText = "";
        if (editor.current) {
          const edition = editionMap.get(rec.id);
          if (edition) {
            edition.setValue({
              label: "",
              id: "0"
            });
            edition.setInputValue("");
          }
        }
      }
    }
  }
  async function onEditButtonClick(data) {
    if (props.onEdit) {
      const params2 = {
        DocCfgID: props.DocCfgID,
        DocID: data.subData.props.record.id.split("_")[1],
        Type: "EditRef",
        WSM: "1"
      };
      const config2 = {
        prefix: Prefixes.doc,
        method: "GET",
        url: "ExecDetailHandler",
        params: params2
      };
      const json = await smetaAxios(config2);
      if (json) tokenProcessingTest(json, data.subData);
    } else {
      if (data.datatype <= 12 && data.datatype >= 7) {
        CreateBackgroundForModal(
          /* @__PURE__ */ jsxRuntimeExports.jsx(ModalWindow, { Title: "Текст параметра", style: getStyleWindow(), hiddenButton: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            TextAreaWithButtons,
            {
              props: {
                ...data.subData.props,
                setValue: data.setValue,
                setInputValue: data.setInputValue,
                Title: data.subData.props.record.dataset.name
              }
            }
          ) })
        );
        return;
      }
      if (data.subData.props.editParam !== void 0) {
        const params2 = {
          Path: props.Path || paramsData.Path,
          ID: data.subData.props.record.id.split("_")[1],
          WSM: "1"
        };
        const config2 = {
          prefix: Prefixes.progs,
          method: "GET",
          url: "EditParamProperty",
          params: params2
        };
        const json = await smetaAxios(config2);
        if (json) tokenProcessingTest(json, data.subData);
      } else {
        if (data.json && Object.values(data.json).length > 2) {
          tokenProcessingTest(data.json, data.subData);
        }
      }
    }
  }
  async function onDropDownList(data, checklist) {
    if (props.onListCustom) {
      return await props.onListCustom(data);
    }
    if (props.onList) {
      const params2 = {
        DocCfgID: props.DocCfgID,
        DocID: data.record.id.split("_")[1],
        Type: "DropDown",
        WSM: "1"
      };
      const config2 = {
        prefix: Prefixes.doc,
        method: "GET",
        url: "ExecDetailHandler",
        params: params2
      };
      const json = await smetaAxios(config2);
      if (json && json.Items) {
        return Object.values(json.Items).map((item, index2) => {
          if (typeof item !== "object") {
            if (checklist) return { label: item, id: `${Math.pow(2, index2)}` };
            return { label: item, id: `${index2}` };
          }
          return { label: item.text, id: item.id };
        });
      }
    }
  }
  async function onEditList(data) {
    if (props.onCloseUpListCustom) {
      const json = await props.onCloseUpListCustom({
        ...data,
        parentID: props.ID
      });
      settingValues(json, data);
      return;
    }
  }
  function renderEditor(ev) {
    if (props.HardCodeReadOnlyForEditor === "1") return;
    const record = ev.target.closest("TR");
    if (!record.querySelector('div[editor="true"]').classList.contains(clsx$3(sectionsStyles.hiddenBlock))) return;
    record.style.backgroundColor = "whitesmoke";
    const editorDiv = record.querySelector('[editor="true"]');
    const textValueDiv = record.querySelector('[textvalue="true"]');
    if (editor.current && editor.current !== editorDiv) {
      deleteEditor(editor.current);
    }
    const editRoot = editorDiv.root || clientExports.createRoot(editorDiv);
    editorDiv.root = editRoot;
    editorDiv.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
    textValueDiv.classList.add(clsx$3(sectionsStyles.hiddenBlock));
    editRoot.render(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Editor,
        {
          styleInput: { height: "20px" },
          styleComponent: { height: "20px" },
          placeholder: " ",
          groupid: record.dataset.groupid,
          current: record.dataset.current,
          fieldname: record.dataset.fieldname,
          name: record.dataset.name,
          type: record.dataset.module,
          record,
          objref: record.dataset.objref,
          value: record.dataset.editval,
          datatype: record.dataset.datatype,
          editStyle: record.dataset.editstyle,
          checkstate: record.dataset.checkstate,
          onEdit,
          onEditButtonClick,
          onDropDownList,
          onEditList,
          getEdition: setGetEdition,
          editParam: record.dataset.onedit,
          disabled: false
        }
      )
    );
    editor.current = editorDiv;
    const input = editorDiv.querySelector("input[type=text]");
    if (input) {
      input.focus();
      if (record.dataset.editstyle & 64) return;
      input.select();
    }
  }
  function deleteEditor(editor2) {
    if (!(editor2 == null ? void 0 : editor2.classList)) return;
    if (!editor2.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
      const record = editor2.closest("TR");
      record.style.backgroundColor = "";
      const textValueDiv = record.querySelector('[textvalue="true"]');
      editor2.classList.add(clsx$3(sectionsStyles.hiddenBlock));
      textValueDiv.classList.remove(clsx$3(sectionsStyles.hiddenBlock));
    }
  }
  function onKeyArrow(ev) {
    let record;
    switch (ev.key) {
      case "ArrowDown":
        record = ev.target.closest("TR").nextElementSibling;
        if (record) {
          if (record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
            while (record !== null) {
              record = record.nextElementSibling;
              if (record && !record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
                renderEditor({ target: record });
                break;
              }
            }
          } else {
            renderEditor({ target: record });
          }
        }
        break;
      case "ArrowUp":
        record = ev.target.closest("TR").previousElementSibling;
        if (record) {
          if (record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
            while (record !== null) {
              record = record.previousElementSibling;
              if (record && !record.classList.contains(clsx$3(sectionsStyles.hiddenBlock))) {
                renderEditor({ target: record });
                break;
              }
            }
          } else {
            renderEditor({ target: record });
          }
        }
        break;
    }
  }
  function getButtonColWidth(options, other) {
    let res = 0;
    if (options & ParamSetOption_History) {
      res += 20;
    }
    return res;
  }
  const historyButtonClick = (item, index2) => {
    const paramsRequest = /* @__PURE__ */ new Map();
    paramsRequest.set("prefix", "programs").set("Path", props.Path ? props.Path : paramsData.Path).set("ID", item.ID);
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogHistory,
        {
          paramsRequest,
          Module: item.Module,
          EditStyle: item.EditStyle,
          DataType: item.DataType,
          Options: item.Options,
          Values: item.Values,
          onSelect: (json) => {
            settingValues(
              { Values: [json.CheckState === void 0 ? { ...json, CheckState: "0" } : json] },
              {
                record: paramsBox2.current.querySelector(`#param_${item.ID}_${index2}`)
              }
            );
          }
        }
      ),
      {
        Title: item.Name,
        style: getStyleWindow(),
        hiddenButton: true,
        blockMaximize: true,
        blockSaveLocation: true
      }
    );
  };
  function getJsxParams(items) {
    let colWidth;
    const returnArr = items.map((item, index2) => {
      editorVals.current[item.Title ? item.Title : item.Name] = item.EditVal;
      const expandButton = getExpandButton(items, item, index2);
      const editStyle = item.EditStyle & 4 ? item.EditStyle - 4 : item.EditStyle;
      colWidth = getButtonColWidth(item.Options);
      if (buttonBlockWidth < colWidth) {
        setbuttonBlockWidth(colWidth);
      }
      let accText;
      if (props.AccDetails && item.ObjRef) {
        accText = inputValue.current.shift();
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
        "tr",
        {
          id: `param-key_${item.ID}_${index2}`,
          "data-datatype": item.ObjType,
          "data-editstyle": editStyle,
          "data-fieldname": item.FieldName ? item.FieldName : item.Name,
          "data-name": item.Title ? item.Title : item.Name,
          "data-mapid": item.MapID,
          "data-module": item.Module,
          "data-options": item.Options,
          "data-orderno": item.OrderNo,
          "data-shortname": item.ShortName,
          "data-level": item.Level ? item.Level : 0,
          "data-parentid": item.ParentID,
          "data-collapsed": (Number(item.Options) & ParamSetOption_Collapsed) === 32 ? "1" : "0",
          "data-value": accText ? accText : item.Text,
          "data-editval": item.EditVal !== void 0 ? item.EditVal : item.Value,
          "data-objref": item.ObjRef,
          "data-groupid": paramsData.GroupID,
          "data-current": item.Current,
          "data-checkstate": item.EditStyle & 4 && item.ObjRef === "1" ? "1" : item.CheckState,
          "data-onedit": item.OnEdit,
          onMouseEnter: (ev) => {
            if (mouseDown) {
              if (mouseDown.current) renderEditor(ev);
            }
          },
          onClick: (ev) => {
            renderEditor(ev);
          },
          onKeyDown: (ev) => {
            onKeyArrow(ev);
          },
          className: clsx$3(
            sectionsStyles.paramsRecord,
            (item.Level && item.Level !== "0" || Number(item.Options) & ParamSetOption_Disabled || Number(item.Options) & ParamSetOption_Hidden) && sectionsStyles.hiddenBlock
          ),
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsxs(
              "td",
              {
                id: `name_${item.ID}`,
                title: item.Name,
                className: clsx$3(sectionsStyles.paramsName, "td-name"),
                style: {
                  paddingLeft: getPadding(items, item, index2),
                  width: `${width2}%`
                },
                children: [
                  expandButton,
                  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: getStyleName(item), children: item.Title ? item.Title : item.Name }),
                  /* @__PURE__ */ jsxRuntimeExports.jsxs(
                    "div",
                    {
                      className: clsx$3(sectionsStyles.paramsConditions),
                      style: {
                        width: getButtonColWidth(item.Options, {
                          Conditions: item.Conditions
                        })
                      },
                      children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          IconButton,
                          {
                            onClick: () => historyButtonClick(item, index2),
                            className: clsx$3(
                              sectionsStyles.paramsHistoryButton,
                              (item.Options & ParamSetOption_History) === 0 && sectionsStyles.hiddenBlock
                            ),
                            children: /* @__PURE__ */ jsxRuntimeExports.jsx(HistoryIcon, { style: { height: "15px", width: "15px" } })
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          ConditionButton,
                          {
                            visible: item.Conditions ? true : false,
                            conditions: item.Conditions,
                            condition: item.Condition ? item.Condition : "1",
                            onEdit,
                            recID: `param_${item.ID}_${index2}`,
                            paramsBoxRef: paramsBox2
                          }
                        )
                      ]
                    }
                  )
                ]
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx("td", { onMouseDown, className: clsx$3(sectionsStyles.paramsSplitter), id: "splitter-ID", children: /* @__PURE__ */ jsxRuntimeExports.jsx("br", {}) }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("td", { id: `value_${item.ID}`, className: sectionsStyles.paramsValueConteiner, children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(
                    sectionsStyles.paramsCheckContainer,
                    (item.EditStyle & 4) === 0 && sectionsStyles.hiddenBlock
                  ),
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { onEdit, MultiCheckSet: item.MultiCheckSet, CheckState: item.CheckState })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(sectionsStyles.paramsValue),
                  style: {
                    color: item.Text < 0 && item.Options & ParamSetOption_RedNegative ? "red" : getStyleColor(item),
                    ...getStyleText(item)
                  },
                  textvalue: "true",
                  children: accText ? accText : item.Text
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  className: clsx$3(sectionsStyles.paramsEditorContainer, sectionsStyles.hiddenBlock),
                  editor: "true"
                }
              )
            ] })
          ]
        },
        `param-key_${item.ID}_${index2}`
      );
    });
    return returnArr;
  }
  return (
    // при клике вне контейнера параметров редактор скроется
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      ClickAwayListener,
      {
        onClickAway: (ev) => {
          mouseDown.current = false;
          resize = {};
          if (ev.target.closest("[checklist]") || ev.target.closest("[calendar]") || ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") !== paramsBox2.current.closest(".background_ModalDialog") || ev.target.closest("LI")) {
            return;
          }
          if (editor.current) {
            editor.current.closest("TR").style.backgroundColor = "";
            deleteEditor(editor.current);
          }
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          "div",
          {
            ref: paramsBox2,
            onMouseDown: (ev) => {
              mouseDown.current = true;
            },
            onMouseUp: () => {
              mouseDown.current = false;
            },
            className: clsx$3(sectionsStyles.paramsBox),
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: props.NoTitle ? "none" : "", height: "30px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: paramsData ? paramsData.Title : props.Title ? props.Title : "" }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(sectionsStyles.paramsTableContainer), children: paramsJsx ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                "div",
                {
                  onMouseMove,
                  onMouseUp: (ev) => onMouseUp(ev, setWidth),
                  className: clsx$3(sectionsStyles.paramsTable),
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: paramsJsx })
                }
              ) : /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) })
            ]
          }
        )
      }
    )
  );
}
function DetailsButton(props) {
  const buttonRef = React.useRef();
  const popperRef = React.useRef();
  const [cash, setCash] = useAtom(editorCash);
  const [open, setOpen] = React.useState(false);
  const [position2, setPosition] = React.useState({ x: 0, y: 0 });
  reactExports.useEffect(() => {
    cash.detailsOpen && setOpen(cash.detailsOpen);
  }, []);
  reactExports.useEffect(() => {
    if (open) {
      setPosition(getPosition());
      setCash({ ...cash, detailsOpen: true });
    }
  }, [open]);
  const handleClickDetails = () => {
    setOpen(!open);
  };
  const handleCloseDetails = (ev) => {
    var _a2, _b;
    if (ev.target === ((_a2 = buttonRef.current) == null ? void 0 : _a2.closest("TD")) || ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") !== ((_b = buttonRef.current) == null ? void 0 : _b.closest(".background_ModalDialog")) || ev.target.closest("[checklist]") || ev.target.closest("[calendar]") || ev.target.closest("[details]") || ev.target.closest("[loadmask]") || ev.target.classList.contains("MuiBackdrop-root")) {
      return;
    }
    props.details.updateRecord();
    setOpen(false);
    setCash({ ...cash, detailsOpen: false });
  };
  const getPosition = () => {
    if (!popperRef.current || !buttonRef.current) return "";
    const rootRect = document.querySelector("#root").getBoundingClientRect();
    const buttonRect = buttonRef.current.getBoundingClientRect();
    const x = buttonRect.left - 400 < 0 ? 30 : buttonRect.left - 400 + 30;
    const y2 = buttonRect.top + 250 < rootRect.height - 100 ? buttonRect.top + 27 : buttonRect.top - 250;
    return { x, y: y2 };
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        disabled: props.disabled,
        ref: (el) => {
          buttonRef.current = el;
          if (props.buttonRef) props.buttonRef.current = el;
        },
        onClick: handleClickDetails,
        className: "list-button",
        style: {
          width: "20px !important",
          height: "100%",
          borderRadius: "0px",
          padding: "0"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(ExpandMoreIcon, { style: { maxHeight: "20px" } })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      "div",
      {
        style: {
          position: "fixed",
          zIndex: !buttonRef.current || buttonRef.current.closest(".background_ModalDialog") === null ? "999" : buttonRef.current.closest("DIV.background_ModalDialog").style.zIndex,
          // width: props.autoCompleteValue.current ? `${props.autoCompleteValue.current.clientWidth}px` : "400px",
          left: position2.x,
          top: position2.y
        },
        children: open && /* @__PURE__ */ jsxRuntimeExports.jsx(ClickAwayListener, { onClickAway: handleCloseDetails, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          "div",
          {
            tabIndex: 0,
            onWheel: (ev) => {
              ev.stopPropagation();
            },
            onKeyDown: (ev) => {
              ev.stopPropagation();
            },
            ref: popperRef,
            details: "true",
            style: {
              overflow: "auto",
              height: "fit-content",
              maxHeight: "250px",
              minHeight: "30px",
              minWidth: "400px",
              boxShadow: "rgba(0, 0, 0, 0.2) 3px 3px 3px 2px",
              border: " 1px solid #cccccc;",
              borderRadius: "7px"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              DetailsParams,
              {
                Module: props.module,
                ID: props.details.ID,
                DocCfgID: props.details.Details,
                NoTitle: true,
                NoHistory: true,
                data: props.details.GetDetails,
                setParentEditorValueInput: props.setInputValue,
                setParentEditorValue: props.setValue,
                valueChanged: props.valueChanged,
                getText: props.details.getText,
                updateRecord: props.details.updateRecord,
                HardCodeReadOnlyForEditor: props.details.HardCodeReadOnlyForEditor,
                AccDetails: props.details.AccDetails,
                inputValue: props.inputValue,
                onList: props.details.GetDetails.OnList,
                onListCustom: props.details.GetDetails.OnListCustom,
                onEdit: props.details.GetDetails.OnEdit,
                onEditCustom: props.details.GetDetails.OnEditCustom,
                onCloseUpList: props.details.GetDetails.OnCloseUpList,
                onCloseUpListCustom: props.details.GetDetails.OnCloseUpListCustom
              }
            )
          }
        ) })
      }
    )
  ] });
}
function CustomCheckBoxList(props) {
  const currentTarget = reactExports.useRef();
  const listRef = reactExports.useRef();
  const [items, setItems] = reactExports.useState();
  const checkstatesCount = reactExports.useRef({});
  reactExports.useEffect(() => {
    if (props.items) {
      setItems(
        props.items.map((value) => {
          const labelId = `checkbox-list-label-${value.id}`;
          return /* @__PURE__ */ jsxRuntimeExports.jsxs(
            ListItem$1,
            {
              title: value.label,
              style: {
                borderBottom: "1px solid #eeeeee",
                height: "27px",
                minWidth: "200px",
                overflow: "hidden",
                whiteSpace: "nowrap",
                textOverflow: "ellipsis"
              },
              disablePadding: true,
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { style: { height: "inherit", minWidth: "0" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  CheckBoxMultiCheck,
                  {
                    parentProps: { name: value.label, id: value.id },
                    CheckState: value.checkState,
                    MultiCheckSet: value.MultiCheckSet,
                    onEdit: (data) => {
                      getCountCheckStates(data);
                      props.onEditCustomCheckList({
                        ...data,
                        states: checkstatesCount.current
                      });
                    }
                  }
                ) }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { id: labelId, primary: value.label })
              ]
            },
            value.id
          );
        })
      );
    }
  }, [props.items]);
  function getCountCheckStates(data) {
    if (data.CheckState === "0") {
      delete checkstatesCount.current[data.id];
    } else {
      checkstatesCount.current[data.id] = data.CheckState;
    }
  }
  function arrowDown() {
    let el = listRef.current.querySelector(".focusCheckListItem");
    const firstChild = listRef.current.firstChild;
    const lastChild = listRef.current.lastChild;
    if (!el) {
      el = firstChild;
      el.focus();
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
      return;
    }
    if (el === lastChild) {
      el.classList.remove("focusCheckListItem");
      el = firstChild;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    } else {
      el.classList.remove("focusCheckListItem");
      el = el.nextElementSibling;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    }
    const parentEl = listRef.current.parentElement.parentElement;
    const scrollingPos = el.getBoundingClientRect().y - parentEl.getBoundingClientRect().y;
    parentEl.scrollBy({
      left: 0,
      top: scrollingPos,
      behavior: "smooth"
    });
  }
  function arrowUp() {
    let el = listRef.current.querySelector(".focusCheckListItem");
    const firstChild = listRef.current.firstChild;
    const lastChild = listRef.current.lastChild;
    if (!el) {
      el = lastChild;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
      return;
    }
    if (el === firstChild) {
      el.classList.remove("focusCheckListItem");
      el = lastChild;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    } else {
      el.classList.remove("focusCheckListItem");
      el = el.previousElementSibling;
      el.classList.add("focusCheckListItem");
      currentTarget.current = el;
    }
    const parentEl = listRef.current.parentElement.parentElement;
    const scrollingPos = el.getBoundingClientRect().y - parentEl.getBoundingClientRect().y;
    parentEl.scrollBy({
      left: 0,
      top: scrollingPos,
      behavior: "smooth"
    });
  }
  function onKeyDown(ev) {
    switch (ev.code) {
      case "ArrowDown":
        arrowDown();
        break;
      case "ArrowUp":
        arrowUp();
        break;
      case "Space":
        ev.preventDefault();
        if (currentTarget.current) {
          const bttn = currentTarget.current.querySelector(`[listbutton="true"]`);
          if (bttn) bttn.click();
        }
        break;
      case "Enter":
        ev.stopPropagation();
        break;
      case "Tab":
        ev.preventDefault();
        arrowDown();
        break;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Popover,
    {
      transitionDuration: 50,
      onKeyDown,
      id: props.id,
      open: props.open,
      anchorEl: props.anchorEl,
      onClose: (ev) => {
        props.handleClose(ev);
        checkstatesCount.current = {};
      },
      anchorOrigin: {
        vertical: "bottom",
        horizontal: "right"
      },
      transformOrigin: {
        vertical: "top",
        horizontal: "right"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          ref: (el) => {
            if (!el) return;
            const listEl = el.querySelector("ul");
            listRef.current = listEl;
          },
          checklist: "true",
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            List,
            {
              sx: {
                width: "fit-content",
                maxWidth: `${document.body.clientWidth / 2}px`,
                maxHeight: "400px",
                bgcolor: "background.paper"
              },
              children: items
            }
          )
        }
      )
    }
  );
}
const colorList = [
  { label: "Черный", id: "0", color: setColor$1(DelphiColors.clBlack) },
  { label: "Бордовый", id: "128", color: setColor$1(DelphiColors.clMaroon) },
  { label: "Зеленый", id: "32768", color: setColor$1(DelphiColors.clGreen) },
  { label: "Коричневый", id: "32896", color: setColor$1(DelphiColors.clOlive) },
  { label: "Темно-синий", id: "8388608", color: setColor$1(DelphiColors.clNavy) },
  { label: "Пурпурный", id: "8388736", color: setColor$1(DelphiColors.clPurple) },
  { label: "Темно-зеленый", id: "8421376", color: setColor$1(DelphiColors.clTeal) },
  { label: "Серый", id: "8421504", color: setColor$1(DelphiColors.clGray) },
  { label: "Светло-серый", id: "12632256", color: setColor$1(DelphiColors.clSilver) },
  { label: "Красный", id: "255", color: setColor$1(DelphiColors.clRed) },
  { label: "Светло-зеленый", id: "65280", color: setColor$1(DelphiColors.clLime) },
  { label: "Желтый", id: "65535", color: setColor$1(DelphiColors.clYellow) },
  { label: "Голубой", id: "16711680", color: setColor$1(DelphiColors.clBlue) },
  { label: "Фиолетовый", id: "16711935", color: setColor$1(DelphiColors.clFuchsia) },
  { label: "Светло-голубой", id: "16776960", color: setColor$1(DelphiColors.clAqua) },
  { label: "Белый", id: "16777215", color: setColor$1(DelphiColors.clWhite) },
  { label: "Подсказка", id: "14811135", color: setColor$1(DelphiColors.clInfoBk) }
];
async function getParamValues(props, editor, checkList) {
  if (props.onDropDownList) {
    SetLoadingCursor();
    const result = await props.onDropDownList(
      {
        ...props,
        module: props.type,
        events: props.onEvents,
        ID: props.id,
        editor
      },
      checkList
    );
    SetLoadingCursor(true, void 0, true);
    if (isEmptyObject(result)) {
      return [{ label: "Нет данных", id: "-1", disabled: true }];
    }
    return result;
  } else return [{ label: "Нет данных", id: "-1", disabled: true }];
}
function openModalWindow(props, json, subData) {
  if (props.onEditButtonClick) {
    props.onEditButtonClick({
      ...props,
      events: props.onEvents,
      objref: subData.props.ObjRef ? subData.props.ObjRef : props.objref,
      json,
      subData,
      setValue: subData.props.setValue,
      setInputValue: subData.props.setInputValue
    });
  }
}
const GetDialogParam$1 = (module2, ObjType2, objref, multisel) => {
  let param = /* @__PURE__ */ new Map(), json;
  param.set("prefix", module2);
  param.set("comand", "GetDialogParams");
  param.set("ObjType", ObjType2);
  param.set("ObjRef", objref);
  if (multisel) param.set("MultiSel", "1");
  json = AxiosRequest(true, param);
  return json;
};
function incValue(inputValue, setValue, valueChanged) {
  let val = Number(inputValue) || 0;
  if (Number.isNaN(val)) return;
  setValue(`${val + 1}`);
  valueChanged.current = true;
}
function decValue(value, setValue, valueChanged) {
  let val = Number(value) || 0;
  if (Number.isNaN(val)) return;
  setValue(`${val - 1}`);
  valueChanged.current = true;
}
function fixValue(value) {
  if (value !== void 0) {
    let val = value.match(/[0-9]/g);
    if (!val) return "";
    val = val.join("");
    return val;
  }
  return "";
}
function toHex(i) {
  let res = 255 & i;
  if (res) {
    res = res.toString(16);
  } else res = 0;
  res = String(res).padStart(2, "0");
  return res;
}
function setColor$1(intColor) {
  let result = `#${toHex(intColor)}${toHex(intColor >> 8)}${toHex(intColor >> 16)}`;
  return result;
}
function Editor(props) {
  const EditStyle_PickList = 1 & props.editStyle;
  const EditStyle_Calendar = 2 & props.editStyle;
  const EditStyle_Check = 4 & props.editStyle;
  const EditStyle_UpDown = 8 & props.editStyle;
  const EditStyle_Ellipsis = 16 & props.editStyle;
  const EditStyle_CheckList = 32 & props.editStyle;
  const EditStyle_ReadOnly = 64 & props.editStyle;
  128 & props.editStyle;
  const EditStyle_ColorBox = 256 & props.editStyle;
  512 & props.editStyle;
  1024 & props.editStyle;
  const EditStyle_CustomCheckList = props.editStyle === "customCheckList";
  const EditStyle_CustomColorList = props.editStyle === "customColorList";
  const autocompleteList = EditStyle_PickList || EditStyle_CustomColorList || EditStyle_ColorBox;
  const popover = autocompleteList || EditStyle_CheckList || EditStyle_CustomCheckList || EditStyle_Calendar;
  const modalButton2 = React.useRef();
  const buttonCalendar = React.useRef(null);
  const buttonPickList = React.useRef(null);
  const buttonDetails = React.useRef(null);
  const mainBlock = React.useRef();
  const [styleInput, setStyleInput] = React.useState({});
  const dateRegexp = /^(?:(?:31(\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$/;
  const [anchorElDate, setAnchorElDate] = React.useState(null);
  const handleClickDate = (event) => {
    if (EditStyle_Ellipsis) {
      modalButton2.current.click();
      return;
    }
    setAnchorElDate(event.currentTarget);
    if (EditStyle_PickList) setOpenList(false);
  };
  const handleCloseDate = () => {
    setAnchorElDate(null);
  };
  const openDate = Boolean(anchorElDate);
  const idDate = openDate ? "calendar" : void 0;
  const [anchorElForCheckList, setAnchorElForCheckList] = React.useState(null);
  const handleClickForCheckList = (event) => {
    setAnchorElForCheckList(event.currentTarget);
  };
  const handleCloseForCheckList = async () => {
    setAnchorElForCheckList(null);
    if (EditStyle_CustomCheckList) {
      return;
    }
    await props.onEdit({
      record: props.record,
      tag: checkListObjRef.current,
      value: inputValue,
      textchanged: "0",
      setValue,
      setInputValue,
      addInfo: props.addInfo,
      checkList: true
    });
  };
  const openForCheckList = Boolean(anchorElForCheckList);
  const idForCheckList = openForCheckList ? "checklist" : void 0;
  const [checkedList, setCheckedList] = React.useState([]);
  const checkListObjRef = React.useRef();
  const handleToggle = (ev, value2) => {
    const currentIndex = checkedList.indexOf(Number(value2.id));
    const indexItem = [...ev.target.closest("UL").children].indexOf(ev.target.closest("LI"));
    const newChecked = [...checkedList];
    if (currentIndex === -1) {
      newChecked[indexItem] = Number(value2.id);
      checkListObjRef.current = Number(checkListObjRef.current) + Number(value2.id);
    } else {
      newChecked[indexItem] = -1;
      checkListObjRef.current = Number(checkListObjRef.current) - Number(value2.id);
    }
    setInputValue(getCheckListInputValue(newChecked));
    setCheckedList(newChecked);
  };
  function getCheckListInputValue(newChecked) {
    let result = [];
    paramValuesItems.forEach((item, index2) => {
      if (newChecked[index2] !== -1) {
        result.push(item.label);
      }
    });
    return result.join(",");
  }
  const [openList, setOpenList] = React.useState(false);
  const [width2, setWidth] = React.useState({
    input: "100%",
    start: "0%",
    end: "0%"
  });
  const [filter2, setFilter] = React.useState("");
  const filterDefaultValues = reactExports.useRef([{ label: "Нет данных", id: "-1", disabled: true }]);
  const [value, setValue] = React.useState({});
  const [inputValue, setInputValue] = React.useState("");
  const [selection, setSelection] = React.useState(props.selection);
  const startContentRef = React.useRef(null);
  const endContentRef = React.useRef(null);
  const input = React.useRef(null);
  const maskRef = React.useRef(null);
  const autoCompleteValue = React.useRef(null);
  const [placeholder, setPlaceHolder] = React.useState("");
  const valueChanged = React.useRef();
  const blurValue = React.useRef();
  const [paramValuesItems, setParamValues] = React.useState([{ label: "Нет данных", id: "-1", disabled: true }]);
  const focus = React.useRef();
  const setCustomColorList = async () => {
    if (props.onListCustom) {
      const list = await props.onListCustom();
      filterDefaultValues.current = list.map((item) => {
        return {
          label: item.Name,
          id: item.Mask,
          color: setColor$1(Number(item.Color))
        };
      });
      setParamValues(filterDefaultValues.current);
    }
    setOpenList(!openList);
  };
  const setColorList = () => {
    filterDefaultValues.current = colorList;
    setParamValues(colorList);
    setOpenList(!openList);
  };
  const setCustomCheckList = async (ev) => {
    filterDefaultValues.current = await props.getItems();
    setParamValues(filterDefaultValues.current);
    handleClickForCheckList(ev);
    setAnchorElForCheckList(ev.target);
  };
  const setCheckList = async (ev) => {
    if (!props.onlist && props.listValues && props.listValues.length) {
      filterDefaultValues.current = props.listValues;
      setParamValues(props.listValues);
      handleClickForCheckList(ev);
      setAnchorElForCheckList(ev.target);
      return;
    }
    if (!props.onlist && props.list && props.list !== "") {
      const list = props.list.split("\r\n");
      if (list.length && list[list.length - 1] === "") list.pop();
      filterDefaultValues.current = list.map((item, index2) => {
        return { label: item, id: Math.pow(2, index2) };
      });
      setParamValues(filterDefaultValues.current);
    } else {
      filterDefaultValues.current = await getParamValues(props, autoCompleteValue.current, true);
      setParamValues(filterDefaultValues.current);
    }
    handleClickForCheckList(ev);
    setAnchorElForCheckList(ev.target);
  };
  const setPickList = async () => {
    if (!props.onlist && props.listValues && props.listValues.length) {
      filterDefaultValues.current = props.listValues;
      setParamValues(props.listValues);
      setOpenList(!openList);
      return;
    }
    if (!props.onlist && props.list && props.list !== "") {
      const list = props.list.split("\r\n");
      if (list.length && list[list.length - 1] === "") list.pop();
      filterDefaultValues.current = list.map((label, id) => ({ label, id }));
      setParamValues(filterDefaultValues.current);
    } else {
      filterDefaultValues.current = await getParamValues(props, autoCompleteValue.current);
      setParamValues(filterDefaultValues.current);
    }
    setOpenList(!openList);
  };
  const onPickListClick = async (ev) => {
    if (EditStyle_CustomColorList) {
      setCustomColorList();
      return;
    }
    if (EditStyle_ColorBox) {
      setColorList();
      return;
    }
    if (EditStyle_CustomCheckList) {
      setCustomCheckList(ev);
      return;
    }
    if (EditStyle_CheckList) {
      setCheckList(ev);
      return;
    }
    EditStyle_PickList && setPickList();
  };
  const openAfterRender = (command) => {
    var _a2;
    if (modalButton2.current || buttonPickList.current || buttonCalendar.current) {
      const mButton = modalButton2.current;
      const lButton = EditStyle_Calendar && buttonCalendar.current || buttonPickList.current;
      const comands = [() => EditStyle_Ellipsis && mButton.click(), () => popover && lButton.click()];
      (_a2 = comands[command]) == null ? void 0 : _a2.call(comands);
    }
  };
  React.useEffect(() => {
    mainBlock.current.changeValue = changeInputValue;
    props.openAfterRender !== void 0 && openAfterRender(props.openAfterRender);
    setValue({
      label: props.editMask && EditStyle_Calendar === 0 ? fixValue(props.value) : props.value,
      id: props.objref
    });
    setInputValue(props.editMask && EditStyle_Calendar === 0 ? fixValue(props.value) : props.value);
  }, []);
  React.useEffect(() => {
    if (inputValue === void 0) setInputValue("");
  }, [inputValue]);
  React.useEffect(() => {
    getInnerButtons();
    if (EditStyle_Check) {
      setPlaceHolder("");
    } else if (props.editMask && EditStyle_Calendar === 0) {
      setPlaceHolder(props.editMask.replaceAll("#", "_").replaceAll("0", "_"));
    } else {
      setPlaceHolder(props.placeholder !== void 0 ? props.placeholder : "не выбрано");
    }
    focus.current = false;
    if (EditStyle_CheckList) {
      checkListObjRef.current = props.objref ? props.objref : "0";
    }
    if (props.editor) {
      props.editor.onEdit = onEditValue;
    }
    setStyleInput({
      margin: "0",
      height: "100%",
      width: "100%",
      color: "#212529",
      border: "0",
      borderRadius: "0",
      outline: "none",
      // padding: "0",
      fontSize: "0.75rem",
      fontFamily: "Roboto",
      letterSpacing: "0px",
      backgroundColor: props.background ? "whitesmoke" : "inherit",
      ...props.styleInput
    });
  }, [props]);
  React.useEffect(() => {
    if (props.getEdition && props.record) {
      props.getEdition({
        setValue,
        setInputValue,
        value,
        inputValue,
        id: props.record.id,
        key: props.record.dataset.key,
        setSelection
      });
    } else if (props.getEdition) {
      props.getEdition({
        setValue,
        setInputValue,
        value,
        inputValue,
        setSelection
      });
    }
  }, [props.getEdition]);
  React.useEffect(() => {
    if (paramValuesItems && EditStyle_CheckList && checkedList.length === 0 && !paramValuesItems[0].disabled) {
      let objref = Number(props.objref ? props.objref : "0");
      setCheckedList(
        paramValuesItems.map((item) => {
          if (objref > 0 && objref & Number(item.id)) {
            objref -= Number(item.id);
            return Number(item.id);
          }
          return -1;
        })
      );
    } else if (paramValuesItems && EditStyle_CheckList && value.id) {
      updateCheckList(value.id);
    }
  }, [paramValuesItems, value]);
  React.useEffect(() => {
    setValue({
      label: props.editMask && EditStyle_Calendar === 0 ? fixValue(props.value) : props.value,
      id: props.objref
    });
    setInputValue(props.editMask && EditStyle_Calendar === 0 ? fixValue(props.value) : props.value);
  }, [props.value, props.objref]);
  reactExports.useEffect(() => {
    if (!(EditStyle_ReadOnly === 64 || props.readonly)) return;
    if (filter2 !== "") {
      setParamValues(
        filterDefaultValues.current.filter((option) => {
          return option.label.toLowerCase().match(filter2.toLowerCase());
        })
      );
      return;
    }
    if (filter2 === "") {
      setParamValues(filterDefaultValues.current);
    }
  }, [filter2]);
  function updateCheckList(objref) {
    if (objref === void 0) return;
    let id = Number(objref);
    setCheckedList(
      paramValuesItems.map((item) => {
        if (id > 0 && id & Number(item.id)) {
          id -= Number(item.id);
          return Number(item.id);
        }
        return -1;
      })
    );
    checkListObjRef.current = objref;
  }
  function getDateInFormat(value2) {
    let date = value2;
    if (date) {
      if (date.match(/\d{4}-\d{2}-\d{2}/)) return date;
      if (date.match(/\d{2}.\d{2}.\d{4}/)) {
        date = date.split(".");
        date = [date[2], date[1], date[0]];
        return date.join("-");
      }
      return checkDateCompletion(date);
    }
  }
  function checkDateCompletion(date) {
    const now = /* @__PURE__ */ new Date();
    const separator = date.includes(".") ? "." : "-";
    const value2 = date.split(separator).map((item) => item.replaceAll("_", ""));
    if (value2.length === 3 && value2.some((item) => item !== "")) {
      if (value2[0].length === 4) [value2[0], value2[2]] = [value2[2], value2[0]];
      if (value2[0] === "0") value2[0] = "1";
      if (value2[1] === "0") value2[1] = "1";
      const currentYear = now.getFullYear().toString();
      const currentMonth = String(now.getMonth() + 1).padStart(2, "0");
      const year2 = currentYear.slice(0, 4 - value2[2].length) + value2[2];
      const month = value2[1] ? value2[1].padStart(2, "0") : currentMonth;
      const day = value2[0] ? value2[0].padStart(2, "0") : "01";
      return `${year2}-${month}-${day}`;
    }
  }
  function getDateBack(value2) {
    const date = getDateInFormat(value2);
    if (date) {
      const oneDay = 1e3 * 60 * 60 * 24;
      const startDate = /* @__PURE__ */ new Date("1899-12-30");
      const currentDate = new Date(date);
      let id = Math.round((currentDate.getTime() - startDate.getTime()) / oneDay);
      if (!id) id = "-1";
      return { label: value2 === ".." ? "" : getStrDateOfDateObj(currentDate), id };
    }
    return { label: "", id: "" };
  }
  function getInnerButtons() {
    let startCounter = 0;
    let endCounter = 0;
    if (EditStyle_PickList) {
      endCounter++;
    }
    if (EditStyle_Calendar) {
      if (EditStyle_PickList === 0) {
        endCounter++;
      }
    }
    if (EditStyle_Check) {
      startCounter++;
    }
    if (EditStyle_UpDown) {
      endCounter++;
    }
    if (EditStyle_Ellipsis) {
      if (EditStyle_Calendar === 0) {
        endCounter++;
      }
    }
    if (EditStyle_CheckList) {
      if (EditStyle_PickList === 0) endCounter++;
    }
    if (EditStyle_ColorBox) {
      if (EditStyle_PickList === 0) endCounter++;
    }
    if (EditStyle_CustomColorList) {
      if (EditStyle_PickList === 0) endCounter++;
    }
    if (EditStyle_CustomCheckList) {
      if (EditStyle_PickList === 0) endCounter++;
    }
    setWidth({
      input: `calc(100% - ${startCounter * 27}px - ${endCounter * 20}px)`,
      start: `${startCounter * 27}px`,
      end: `${endCounter * 20}px`
    });
  }
  function onFocus() {
    var _a2;
    (_a2 = input.current) == null ? void 0 : _a2.select();
    focus.current = true;
    if (props.grid) {
      document.addEventListener("click", clickAway);
      input.current.deleteClickAway = () => document.removeEventListener("click", clickAway);
    }
  }
  function onBlur(ev) {
    if (ev.target.tagName === "INPUT" || ev.target.tagName === "TEXTAREA") {
      if (EditStyle_Calendar || props.datatype === "date") setInputValue(ev.target.value);
      focus.current = false;
      if (autocompleteList) setOpenList(false);
      if (props.placeholderVisible !== "1") input.current.placeholder = "";
      if (!props.grid) {
        onEditValue(void 0, ev.target.value ? ev.target.value : inputValue, "1");
      }
      blurValue.current = ev.target.value;
    }
  }
  function clickAway(ev) {
    var _a2, _b;
    if (ev.target === ((_a2 = autoCompleteValue.current) == null ? void 0 : _a2.closest("TD")) || ev.target.closest("[componenteditor]") || ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") === ((_b = autoCompleteValue.current) == null ? void 0 : _b.closest(".background_ModalDialog")) || ev.target.closest("[checklist]") || ev.target.closest("[calendar]") || ev.target.closest("[details]") || ev.target.closest("[loadmask]") || ev.target.classList.contains("MuiBackdrop-root")) {
      return;
    }
    if (props.clickAway) {
      props.clickAway(ev, onEditValue, blurValue.current);
    }
    document.removeEventListener("click", clickAway);
  }
  function onEditValue(ev, newValue, textchanged) {
    if (!props.onEdit || props.details) return;
    const editData = {
      path: props.path,
      type: props.type,
      datatype: props.datatype,
      name: props.name,
      input: input.current,
      proof: needProof(),
      record: props.record,
      groupid: props.groupid,
      fieldname: props.fieldname,
      current: props.current,
      textchanged,
      setValue,
      setInputValue,
      addInfo: props.addInfo,
      onEdit: props.onEdit,
      fixVal: props.editMask && EditStyle_Calendar === 0 ? fixValue : void 0
    };
    if (ev) {
      if (ev && (ev.key === "Enter" || ev.key === "NumpadEnter") && !props.grid) {
        if (typeof newValue === "object") {
          props.onEdit({
            ...editData,
            value: newValue.label,
            tag: newValue.id
          });
          valueChanged.current = false;
          return;
        } else {
          const val = EditStyle_Calendar === 2 ? getDateBack(newValue) : { label: newValue };
          props.onEdit({
            ...editData,
            value: val.label,
            tag: val.id
          });
        }
        valueChanged.current = false;
        return;
      }
      if (ev && (ev.key === "Enter" || ev.key === "NumpadEnter") && textchanged !== void 0) {
        if (typeof newValue === "object") {
          props.onEdit({
            ...editData,
            value: newValue.label,
            tag: newValue.id,
            proof: false
          });
          valueChanged.current = false;
          return;
        }
      }
      if (ev.target && ev.target.tagName === "LI") {
        if (props.onEditList) {
          props.onEditList({
            current: props.current,
            tag: newValue.id,
            value: newValue.label,
            fieldname: props.fieldname,
            record: props.record,
            listClick: true,
            setValue,
            setInputValue
          });
          valueChanged.current = false;
          return;
        }
        props.onEdit({
          ...editData,
          listClick: true,
          proof: false,
          value: newValue.label,
          tag: newValue.id,
          listindex: ev.target.dataset.optionIndex,
          textchanged: "0"
        });
        valueChanged.current = false;
        return;
      }
    }
    if (newValue !== void 0) {
      if (!ev && valueChanged.current && needProof() && newValue !== void 0) {
        const val = EditStyle_Calendar === 2 ? getDateBack(newValue) : { label: newValue };
        props.onEdit({
          ...editData,
          value: val.label,
          tag: val.id
        });
        valueChanged.current = false;
        return;
      }
      if (!ev && valueChanged.current && newValue !== void 0) {
        const val = EditStyle_Calendar === 2 ? getDateBack(newValue) : { label: newValue };
        props.onEdit({
          ...editData,
          value: val.label,
          tag: val.id
        });
        valueChanged.current = false;
        return;
      }
    }
  }
  function getMask(dataType, editStyle) {
    if (props.editMask && EditStyle_Calendar === 0) {
      return props.editMask.replaceAll("#", "0");
    }
    if (dataType === "2003") {
      return /^\d+[-]?[0-5]?[0-9]?$/;
    }
    if (dataType === "byte") {
      return /^[0]*[0-9]$|^[0]*[0-9][0-9]$|^[0]*1[0-9][0-9]$|^[0]*2[0-4][0-9]$|^[0]*25[0-5]$/;
    }
    if (dataType === "int" || dataType === "5" || dataType === "2" || dataType === "3") {
      return /^\d+$/;
    }
    if (dataType === "0" || dataType === "17") {
      return Number;
    }
    if (editStyle & 2 || dataType === "date") {
      return Date;
    }
    return /[.\n]*/;
  }
  function getScale2(dataType) {
    if (dataType === "2003") return 2;
    if (dataType === "0") return 2;
    if (dataType === "17") return 3;
    return 0;
  }
  function getRadix(dataType, editStyle) {
    if (dataType === "2003") {
      return "-";
    }
    if (dataType === "0" || dataType === "17") {
      return ",";
    }
    if (editStyle & 2) {
      return ".";
    }
  }
  function getHint() {
    if (props.showHint) {
      if (props.hintText !== void 0 && props.hintText !== "") {
        return props.hintText;
      } else {
        return input.current ? input.current.value : "";
      }
    }
    return "";
  }
  function needProof() {
    if (EditStyle_Calendar) return false;
    return (props.type || EditStyle_PickList || EditStyle_Ellipsis) && props.datatype >= 12;
  }
  function closeAllPopovers() {
    if (openList) {
      setOpenList(false);
    }
    if (anchorElForCheckList) {
      handleCloseForCheckList();
    }
    if (anchorElDate) {
      handleCloseDate();
    }
  }
  function onArrowDown(ev) {
    if (openList || anchorElForCheckList || anchorElDate) {
      ev.stopPropagation();
      if (ev.altKey) closeAllPopovers();
      setTimeout(() => {
        input.current.focus();
      });
      return;
    }
    if (ev.altKey && popover) {
      ev.stopPropagation();
      if (EditStyle_Calendar) {
        buttonCalendar.current.click();
        return;
      }
      if (popover) {
        buttonPickList.current.click();
        return;
      }
    }
  }
  function onF4keyDown(ev) {
    if (popover) {
      ev.stopPropagation();
      if (EditStyle_Calendar) {
        buttonCalendar.current.click();
        return;
      }
      if (popover) {
        buttonPickList.current.click();
        return;
      }
    }
  }
  const onKeyEnter = (ev) => {
    var _a2;
    if (openList || anchorElForCheckList || anchorElDate) {
      ev.stopPropagation();
      return;
    }
    if (ev.ctrlKey) {
      openAfterRender(0);
      return;
    }
    valueChanged.current = true;
    (_a2 = input.current) == null ? void 0 : _a2.blur();
  };
  const onKeyEscape = () => {
    valueChanged.current = false;
    closeAllPopovers();
  };
  const onKeyS = (ev) => {
    var _a2;
    if (ev.ctrlKey) {
      ev.preventDefault();
      (_a2 = input.current) == null ? void 0 : _a2.blur();
    }
  };
  const onKeyArrow = (ev) => {
    onArrowDown(ev);
  };
  const onKeyF4 = (ev) => {
    if (openList || anchorElForCheckList || anchorElDate) {
      closeAllPopovers();
    } else onF4keyDown(ev);
  };
  const onKeyDefault = (ev) => {
    if (EditStyle_ReadOnly === 64 || props.readonly) {
      if (ev.key.length === 1) {
        setFilter(`${filter2}${ev.key}`);
      } else if (ev.code === "Backspace") {
        setFilter(filter2.slice(0, -1));
      }
    }
  };
  function onKeyDown(ev) {
    var _a2;
    const keys = {
      NumpadEnter: onKeyEnter,
      Enter: onKeyEnter,
      Escape: onKeyEscape,
      KeyS: onKeyS,
      ArrowUp: onKeyArrow,
      ArrowDown: onKeyArrow,
      F4: onKeyF4
    };
    ((_a2 = keys[ev.code]) == null ? void 0 : _a2.call(keys, ev)) || onKeyDefault(ev);
  }
  function changeInputValue(value2) {
    valueChanged.current = true;
    props.onChange && props.onChange(value2, {
      valueChanged,
      datatype: props.datatype,
      addInfo: props.addInfo,
      type: props.type,
      ObjRef: props.objref
    });
    setInputValue(value2);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      ref: mainBlock,
      componenteditor: "true",
      style: {
        height: "100%",
        width: "100%",
        ...props.styleComponent
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Autocomplete,
        {
          disabled: Boolean(props.disabled || props.HardCodeReadOnlyForEditor),
          "data-needproof": `${needProof()}`,
          freeSolo: true,
          value: value && value.label ? value : "",
          onChange: (ev, newValue) => {
            if (!newValue) return;
            if (ev.code === "Enter" || ev.code === "NumpadEnter") {
              if (openList || anchorElForCheckList || anchorElDate) {
                onEditValue(ev, newValue, "0");
                closeAllPopovers();
              }
              return;
            }
            if (ev.code === "Escape") {
              return;
            }
            onEditValue(ev, newValue);
          },
          inputValue: inputValue ? inputValue : "",
          onKeyDown,
          ref: autoCompleteValue,
          sx: {
            height: "100%"
          },
          options: paramValuesItems.length ? paramValuesItems : [{ label: `Ничего не найдено... Фильтр: ${filter2}`, disabled: true }],
          renderOption: (props2, option) => {
            if (EditStyle_CustomColorList || EditStyle_ColorBox) {
              return /* @__PURE__ */ reactExports.createElement(
                "li",
                {
                  ...props2,
                  title: option.label,
                  style: {
                    height: "30px",
                    width: "100%",
                    display: "flex",
                    flexDirection: "row",
                    fontSize: "13px",
                    borderBottom: "1px solid #eeeeee",
                    overflow: "hidden",
                    whiteSpace: "nowrap",
                    textOverflow: "ellipsis"
                  },
                  key: `${option.label}-${option.id}-${props2.id}`
                },
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  "div",
                  {
                    style: {
                      height: "25px",
                      width: "25px",
                      border: "1px solid",
                      marginRight: "5px",
                      backgroundColor: option.color
                    }
                  }
                ),
                option.label
              );
            }
            return /* @__PURE__ */ reactExports.createElement(
              "li",
              {
                ...props2,
                title: option.label,
                style: {
                  height: "30px",
                  fontSize: "13px",
                  width: "100%",
                  borderBottom: "1px solid #eeeeee",
                  overflow: "hidden",
                  whiteSpace: "nowrap",
                  textOverflow: "ellipsis"
                },
                key: `${option.label}-${option.id}-${props2.id}`
              },
              option.label
            );
          },
          getOptionLabel: (option) => {
            return option.label ? option.label : "";
          },
          isOptionEqualToValue: (option, value2) => {
            return option.id === value2.id || option.label === value2.label;
          },
          getOptionDisabled: (item) => {
            return item.disabled === true;
          },
          noOptionsText: "Ничего не найдено...",
          open: openList,
          slotProps: {
            popper: {
              placement: "bottom-start",
              style: {
                minWidth: autoCompleteValue.current ? `${autoCompleteValue.current.clientWidth}px` : "200px",
                maxWidth: `${document.body.clientWidth / 2}px`,
                width: `fit-content`,
                border: "1px solid #cccccc",
                borderRadius: "6px",
                boxShadow: "5px 5px 5px #dddddd"
              },
              sx: {
                [`& .${autocompleteClasses.listbox}`]: {
                  listStyle: "none",
                  margin: "0",
                  padding: "0",
                  minWidth: "fit-content",
                  position: "relative"
                }
              },
              onClick: (ev) => {
                if (ev.target.tagName === "LI") setOpenList(false);
              }
            }
          },
          renderInput: (params2) => {
            delete params2.InputProps.endAdornment;
            delete params2.InputProps.startAdornment;
            return (
              // главный контейнер
              /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { arrow: true, placement: "bottom-start", title: getHint(), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                "div",
                {
                  onFocus: (ev) => {
                    var _a2;
                    if (!((_a2 = ev.target) == null ? void 0 : _a2.closest("[componenteditor]"))) return;
                    onFocus();
                  },
                  onBlur,
                  ...params2.InputProps,
                  style: {
                    height: "100%",
                    width: "100%",
                    display: "flex",
                    flexDirection: "row",
                    paddingRight: "0px",
                    paddingLeft: "3px",
                    backgroundColor: "#ffffff"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        ref: startContentRef,
                        style: {
                          display: "flex",
                          height: "100%",
                          alignItems: "center"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                          CheckBoxMultiCheck,
                          {
                            onEdit: (data) => {
                              props.onEdit({
                                path: props.path,
                                type: props.type,
                                datatype: props.datatype,
                                name: props.name,
                                checked: data.CheckState,
                                addInfo: props.addInfo
                              });
                            },
                            parentProps: props,
                            MultiCheckSet: void 0,
                            CheckState: props.checked,
                            display: EditStyle_Check ? "" : "none",
                            disabled: Boolean(props.disabled || props.HardCodeReadOnlyForEditor)
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      "div",
                      {
                        style: {
                          display: "flex",
                          flex: "1 1 auto",
                          alignItems: "center",
                          ...props.styleComponent
                        },
                        children: props.datatype <= 12 && props.datatype >= 7 && !props.editMask ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                          "div",
                          {
                            style: {
                              height: "100%",
                              width: "100%"
                            },
                            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                              "textarea",
                              {
                                ...params2.inputProps,
                                inputeditor: "true",
                                placeholder: props.placeholderVisible === "1" ? placeholder : "",
                                className: "textfieldinput",
                                style: {
                                  ...styleInput,
                                  resize: "none",
                                  wrap: "soft",
                                  height: "100%",
                                  paddingTop: "3px"
                                },
                                onDoubleClick: () => {
                                  if (modalButton2.current && modalButton2.current.style.display !== "none" && props.doubleClickOnInput) {
                                    modalButton2.current.click();
                                  }
                                },
                                readOnly: EditStyle_ReadOnly === 64 || props.readonly,
                                value: inputValue ? inputValue : "",
                                title: inputValue,
                                ref: (el) => {
                                  input.current = el;
                                  params2.inputProps.ref.current = el;
                                },
                                onKeyDown: (ev) => {
                                  if (ev.shiftKey) {
                                    switch (ev.code) {
                                      case "NumpadEnter":
                                      case "Enter":
                                        ev.stopPropagation();
                                        break;
                                    }
                                  }
                                  return;
                                },
                                onChange: (ev) => {
                                  if (inputValue !== ev.target.value) {
                                    valueChanged.current = true;
                                  }
                                  props.onChange && props.onChange(ev.target.value, {
                                    valueChanged,
                                    datatype: props.datatype,
                                    addInfo: props.addInfo,
                                    type: props.type,
                                    ObjRef: props.objref
                                  });
                                  setInputValue(ev.target.value);
                                }
                              }
                            )
                          }
                        ) : /* @__PURE__ */ jsxRuntimeExports.jsx(
                          IMaskInput,
                          {
                            ...params2.inputProps,
                            inputeditor: "true",
                            placeholder: props.placeholderVisible === "1" && !props.editMask ? placeholder : "",
                            className: "textfieldinput",
                            style: styleInput,
                            type: "text",
                            onDoubleClick: () => {
                              if (modalButton2.current && modalButton2.current.style.display !== "none" && props.doubleClickOnInput) {
                                modalButton2.current.click();
                              }
                            },
                            readOnly: EditStyle_ReadOnly === 64 || props.readonly,
                            mask: getMask(props.datatype, props.editStyle),
                            thousandsSeparator: " ",
                            padFractionalZeros: true,
                            scale: getScale2(props.datatype, props.editStyle),
                            radix: getRadix(props.datatype, props.editStyle),
                            lazy: false,
                            value: inputValue,
                            title: inputValue,
                            unmask: true,
                            ref: maskRef,
                            overwrite: EditStyle_Calendar ? true : false,
                            validate: (val) => {
                              if (EditStyle_Calendar !== 2) return;
                              if (val.match(/[0-9]{2}.[0-9]{2}.[0-9]{4}/)) {
                                if (val.match(dateRegexp)) {
                                  input.current.style.outline = "";
                                  input.current.title = "";
                                } else {
                                  input.current.style.outline = "1px solid red";
                                  input.current.title = "Укажите корректную дату";
                                }
                              } else {
                                input.current.style.outline = "";
                                input.current.title = "";
                              }
                            },
                            inputRef: (el) => {
                              input.current = el;
                              params2.inputProps.ref.current = el;
                            },
                            onAccept: (maskValue, mask, ev) => {
                              if ((inputValue === void 0 || inputValue === "") && (maskValue === "" || maskValue === "..")) {
                                return;
                              }
                              if (inputValue !== maskValue) valueChanged.current = true;
                              props.onChange && props.onChange(maskValue, {
                                valueChanged,
                                datatype: props.datatype,
                                addInfo: props.addInfo,
                                type: props.type,
                                ObjRef: props.objref
                              });
                              if (ev && ev.data === null) {
                                input.current.style.outline = "";
                                input.current.title = "";
                              }
                              if (EditStyle_Calendar || props.datatype === "date") return;
                              setInputValue(maskValue);
                            }
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      "div",
                      {
                        ref: endContentRef,
                        style: {
                          height: "100%",
                          display: "flex",
                          flexDirection: "row",
                          alignItems: "center"
                        },
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            CalendarButton,
                            {
                              buttonRef: buttonCalendar,
                              id: idDate,
                              handleClick: handleClickDate,
                              itemID: props.id,
                              EditStyle_Calendar,
                              disabled: Boolean(props.disabled || props.HardCodeReadOnlyForEditor)
                            }
                          ),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            UpDownButtons,
                            {
                              EditStyle_UpDown,
                              incValue,
                              decValue,
                              inputValue,
                              setInputValue,
                              valueChanged,
                              disabled: Boolean(props.disabled || props.HardCodeReadOnlyForEditor)
                            }
                          ),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            ModalButton,
                            {
                              props: {
                                ...props,
                                refButton: modalButton2,
                                EditStyle_Ellipsis,
                                EditStyle_Calendar,
                                inputValue,
                                value,
                                input,
                                selection,
                                setValue,
                                setInputValue,
                                setSelection,
                                GetDialogParam: GetDialogParam$1,
                                openModalWindow,
                                closeList: () => {
                                  if (autocompleteList) setOpenList(false);
                                },
                                disabled: Boolean(props.disabled || props.HardCodeReadOnlyForEditor)
                              }
                            }
                          ),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(
                            PickListEditor,
                            {
                              buttonRef: buttonPickList,
                              id: idForCheckList,
                              itemId: props.id,
                              EditStyle_PickList: popover && !EditStyle_Calendar && !props.details,
                              onPickListClick,
                              disabled: Boolean(props.disabled || props.HardCodeReadOnlyForEditor)
                            }
                          ),
                          props.details ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                            DetailsButton,
                            {
                              buttonRef: buttonDetails,
                              autoCompleteValue,
                              details: props.details,
                              inputValue,
                              module: props.type,
                              setInputValue,
                              setValue,
                              valueChanged
                            }
                          ) : null,
                          EditStyle_CheckList && !EditStyle_CustomCheckList ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                            CheckboxList,
                            {
                              id: idForCheckList,
                              open: openForCheckList,
                              anchorEl: anchorElForCheckList,
                              handleClose: handleCloseForCheckList,
                              items: paramValuesItems,
                              checked: checkedList,
                              handleToggle
                            }
                          ) : null,
                          EditStyle_CustomCheckList && !EditStyle_CheckList ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                            CustomCheckBoxList,
                            {
                              id: idForCheckList,
                              open: openForCheckList,
                              anchorEl: anchorElForCheckList,
                              handleClose: handleCloseForCheckList,
                              items: paramValuesItems,
                              onEditCustomCheckList: props.onEditCustomCheckList
                            }
                          ) : null
                        ]
                      }
                    ),
                    EditStyle_Calendar ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                      DateCalendarEditor,
                      {
                        id: idDate,
                        open: openDate,
                        anchorEl: anchorElDate,
                        handleClose: handleCloseDate,
                        getDateInFormat,
                        inputValue,
                        objRef: value.id,
                        setInputValue,
                        valueChanged,
                        onEditValue
                      }
                    ) : null
                  ]
                }
              ) })
            );
          }
        }
      )
    }
  );
}
var Checklist = {};
var hasRequiredChecklist;
function requireChecklist() {
  if (hasRequiredChecklist) return Checklist;
  hasRequiredChecklist = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Checklist, "__esModule", {
    value: true
  });
  Checklist.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Checklist.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"
  }), "Checklist");
  return Checklist;
}
var ChecklistExports = /* @__PURE__ */ requireChecklist();
const ChecklistIcon = /* @__PURE__ */ getDefaultExportFromCjs(ChecklistExports);
function ColumnButton(props) {
  const [anchorEl, setAnchorEl] = React.useState(null);
  const open = Boolean(anchorEl);
  const handleClose = () => {
    setAnchorEl(null);
  };
  const MenuItems2 = (json) => {
    const items = json.filter(filterByOptions);
    return items.map((item, index2) => {
      var _a2, _b;
      let Disabled = false;
      let field = item.field;
      let hide2 = field.hide === void 0 ? false : field.hide;
      if (field.fieldInfo && ((_b = (_a2 = field.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.fixed)) {
        Disabled = true;
      }
      if (item.expanded && item.items) {
        return MenuItems2(item.items);
      } else {
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(
          MenuItem,
          {
            onClick: (e2) => {
              props.onClick(field);
              const display2 = e2.currentTarget.firstChild.firstChild.style.display;
              e2.currentTarget.firstChild.firstChild.style.display = display2 === "none" ? "" : "none";
            },
            disabled: Disabled,
            style: { height: "25px" },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckIcon, { style: { display: hide2 ? "none" : "" } }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { children: field.title })
            ]
          },
          "ButtonsMenu" + index2
        );
      }
    });
  };
  function filterByOptions(value) {
    if (props.viewInfo.horizontal === true) {
      return value.field.hideInCard !== true;
    } else {
      return value.field.hideInGrid !== true;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        sx: { height: "23px", width: "23px" },
        onClick: (e2) => {
          setAnchorEl(e2.currentTarget);
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChecklistIcon, { fontSize: "small" })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Menu,
      {
        anchorEl,
        open,
        onClose: handleClose,
        MenuListProps: {
          "aria-labelledby": "basic-button"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              item: true,
              style: {
                backgroundColor: "#e6e6e6",
                position: "absolute",
                height: "100%",
                width: "46px"
              }
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: MenuItems2(props.data) })
        ] })
      }
    )
  ] });
}
var ChecklistOutlined = {};
var hasRequiredChecklistOutlined;
function requireChecklistOutlined() {
  if (hasRequiredChecklistOutlined) return ChecklistOutlined;
  hasRequiredChecklistOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ChecklistOutlined, "__esModule", {
    value: true
  });
  ChecklistOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ChecklistOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M22 7h-9v2h9zm0 8h-9v2h9zM5.54 11 2 7.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41zm0 8L2 15.46l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41z"
  }), "ChecklistOutlined");
  return ChecklistOutlined;
}
var ChecklistOutlinedExports = /* @__PURE__ */ requireChecklistOutlined();
const ChecklistOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ChecklistOutlinedExports);
var ClearOutlined = {};
var hasRequiredClearOutlined;
function requireClearOutlined() {
  if (hasRequiredClearOutlined) return ClearOutlined;
  hasRequiredClearOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(ClearOutlined, "__esModule", {
    value: true
  });
  ClearOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  ClearOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
  }), "ClearOutlined");
  return ClearOutlined;
}
var ClearOutlinedExports = /* @__PURE__ */ requireClearOutlined();
const ClearOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(ClearOutlinedExports);
var CheckOutlined = {};
var hasRequiredCheckOutlined;
function requireCheckOutlined() {
  if (hasRequiredCheckOutlined) return CheckOutlined;
  hasRequiredCheckOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(CheckOutlined, "__esModule", {
    value: true
  });
  CheckOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  CheckOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"
  }), "CheckOutlined");
  return CheckOutlined;
}
var CheckOutlinedExports = /* @__PURE__ */ requireCheckOutlined();
const CheckOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(CheckOutlinedExports);
var IndeterminateCheckBoxOutlined = {};
var hasRequiredIndeterminateCheckBoxOutlined;
function requireIndeterminateCheckBoxOutlined() {
  if (hasRequiredIndeterminateCheckBoxOutlined) return IndeterminateCheckBoxOutlined;
  hasRequiredIndeterminateCheckBoxOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(IndeterminateCheckBoxOutlined, "__esModule", {
    value: true
  });
  IndeterminateCheckBoxOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  IndeterminateCheckBoxOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 16H5V5h14zM7 11h10v2H7z"
  }), "IndeterminateCheckBoxOutlined");
  return IndeterminateCheckBoxOutlined;
}
var IndeterminateCheckBoxOutlinedExports = /* @__PURE__ */ requireIndeterminateCheckBoxOutlined();
const IndeterminateCheckBoxOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(IndeterminateCheckBoxOutlinedExports);
var Clear = {};
var hasRequiredClear;
function requireClear() {
  if (hasRequiredClear) return Clear;
  hasRequiredClear = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Clear, "__esModule", {
    value: true
  });
  Clear.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Clear.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
  }), "Clear");
  return Clear;
}
var ClearExports = /* @__PURE__ */ requireClear();
const ClearIcon = /* @__PURE__ */ getDefaultExportFromCjs(ClearExports);
function FilterGridComponent({ props }) {
  var _a2, _b, _c, _d;
  const [data, setData] = React.useState();
  const [records, setRecords] = React.useState([]);
  const [load, setLoad] = React.useState();
  const [search, setSearch] = React.useState(false);
  const [searchValue, setSearchValue] = React.useState("");
  const [multiCheck, setMultiCheck] = React.useState(
    ((_a2 = props.filterData[props.dataForReq.FieldName]) == null ? void 0 : _a2.multiCheck) || void 0
  );
  const checkData = React.useRef(((_b = props.filterData[props.dataForReq.FieldName]) == null ? void 0 : _b.checkData) || {});
  const [filtered, setFiltered] = React.useState(((_c = props.filterData[props.dataForReq.FieldName]) == null ? void 0 : _c.filtered) || void 0);
  const [needUpdateRec, setNeedUpdateRec] = React.useState();
  const [disabledAcceptBttn, setDisabledAcceptBttn] = React.useState(true);
  const filterValueChange = React.useRef(false);
  const focusRecID = React.useRef(((_d = props.filterData[props.dataForReq.FieldName]) == null ? void 0 : _d.focusRecID) || void 0);
  const focusRec = React.useRef();
  const searchRef = React.useRef();
  const oldCheckData = React.useRef({});
  const filterBox = React.useRef();
  const filterButton = React.useRef();
  const [anchorEl, setAnchorEl] = React.useState(null);
  const handleClick = (event) => {
    setAnchorEl(event.currentTarget);
    onClick2();
  };
  const handleClose = () => {
    setAnchorEl(null);
    filterValueChange.current = false;
    checkData.current = oldCheckData.current;
  };
  const open = Boolean(anchorEl);
  const id = open ? "simple-popover" : void 0;
  React.useEffect(() => {
    filterButton.current.clearFilter = clearFilterState;
  }, []);
  React.useEffect(() => {
    if (data) {
      setRecords(getRecords(data));
    }
  }, [data]);
  React.useEffect(() => {
    if (multiCheck !== void 0 && data) {
      setRecords(getRecords(data));
    }
  }, [multiCheck]);
  React.useEffect(() => {
    if (needUpdateRec) {
      setRecords(getRecords(data));
      setNeedUpdateRec(false);
    }
  }, [needUpdateRec]);
  reactExports.useEffect(() => {
    if (!(records && records.length > 2)) setMultiCheck(false);
  }, [records]);
  React.useEffect(() => {
    let objectForFilter;
    if (props.filterData[props.dataForReq.FieldName]) {
      objectForFilter = props.filterData[props.dataForReq.FieldName];
    } else {
      objectForFilter = {};
      props.filterData[props.dataForReq.FieldName] = objectForFilter;
    }
    objectForFilter.multiCheck = multiCheck;
    objectForFilter.filtered = filtered;
    objectForFilter.checkData = checkData.current || void 0;
    objectForFilter.focusRecID = focusRecID.current || void 0;
  }, [multiCheck, filtered, checkData, focusRecID]);
  function onMouseEnter2(ev) {
    const tr = ev.target.closest("TR");
    if (!focusRec.current || tr.id !== focusRecID.current) {
      tr.style.backgroundColor = "#eeeeee";
    }
  }
  function onMouseLeave2(ev) {
    const tr = ev.target.closest("TR");
    if (!focusRec.current || tr.id !== focusRecID.current) {
      tr.style.backgroundColor = "";
    }
  }
  function onClick2() {
    oldCheckData.current = checkData.current;
    setLoad(true);
    props.request(props.dataForReq).then((res) => {
      setData(res);
      setLoad(false);
    });
  }
  function onClickTr(ev) {
    if (focusRec.current !== void 0) {
      focusRec.current.style.backgroundColor = "";
    }
    const record = ev.target.closest("TR");
    record.style.backgroundColor = "#e0e0e0";
    focusRec.current = record;
    focusRecID.current = record.id;
    filterValueChange.current = true;
    setDisabledAcceptBttn(false);
    if (ev.target.tagName === "INPUT") {
      onCheckTr(record);
      return;
    }
    checkData.current[record.id] = true;
    onAccept(record);
    handleClose();
  }
  function onCheckTr(record) {
    const result = !checkData.current[record.id];
    checkData.current[record.id] = result;
    if (result === false && record) {
      record.style.backgroundColor = "";
      focusRec.current = void 0;
      focusRecID.current = void 0;
    }
  }
  function onCheck() {
    setMultiCheck(!multiCheck);
  }
  function onDeleteFilter() {
    const result = {};
    clearFilterState();
    const data2 = props.filterData;
    if (data2[props.dataForReq.FieldName]) {
      delete data2[props.dataForReq.FieldName];
    }
    for (const [fildNameData, fieldData] of Object.entries(data2)) {
      if (fieldData && fieldData.value) result[fildNameData] = fieldData.value;
    }
    if (props.filterData.rowFilter) {
      for (const [fildNameData, fieldData] of Object.entries(props.filterData.rowFilter)) {
        result[fildNameData] = fieldData;
      }
    }
    props.applyFilter(result);
    handleClose();
  }
  function clearFilterState() {
    setFiltered(false);
    oldCheckData.current = {};
    focusRec.current = void 0;
    focusRecID.current = void 0;
  }
  function onCheckAll() {
    filterValueChange.current = true;
    setDisabledAcceptBttn(false);
    let checkValues = {};
    records.forEach((item) => {
      checkValues[item.props.id] = true;
    });
    checkData.current = checkValues;
    setNeedUpdateRec(true);
  }
  function onUnCheckAll() {
    if (focusRec.current) {
      focusRec.current.style.backgroundColor = "";
      focusRec.current = void 0;
      focusRecID.current = void 0;
    }
    filterValueChange.current = true;
    setDisabledAcceptBttn(false);
    checkData.current = {};
    setNeedUpdateRec(true);
  }
  function onAccept(record, placeholder) {
    oldCheckData.current = { ...checkData.current };
    if (record) {
      if (!multiCheck) oldCheckData.current = {};
      oldCheckData.current[record.id] = true;
    }
    if (filterValueChange.current) {
      setFiltered(true);
    }
    applyFilter(record);
    handleClose();
  }
  function onCanceled() {
    handleClose();
  }
  function applyFilter(record) {
    const fieldName = props.dataForReq.FieldName;
    let data2 = {};
    if (multiCheck) {
      data2[fieldName] = [];
      let valueItem;
      for (const [key, value] of Object.entries(checkData.current)) {
        if (value) {
          valueItem = filterBox.current.querySelector(`#${getPureString(key)}`);
          if (valueItem === null) continue;
          const rec = valueItem.closest("TR");
          valueItem = valueItem.querySelector("div[textvalue=true]").innerText;
          if (rec.id.match("onlyText")) {
            data2[fieldName].push({ text: valueItem });
          } else {
            const id2 = rec.id.split("_")[1];
            data2[fieldName].push({ text: valueItem, id: id2 });
          }
        }
      }
      if (data2[fieldName] && data2[fieldName].length === 0) {
        data2 = {};
      }
    } else {
      const value = record.querySelector("div[textvalue=true]").innerText;
      if (record.id.match("onlyText")) {
        data2[fieldName] = [];
        data2[fieldName].push({ text: value });
      } else {
        const id2 = record.id.split("_")[1];
        data2[fieldName] = [];
        data2[fieldName].push({ text: value, id: id2 });
      }
    }
    props.filterData[fieldName].value = data2[fieldName];
    for (const [fildNameData, fieldData] of Object.entries(props.filterData)) {
      if (props.filterData.rowFilter && props.filterData.rowFilter[fildNameData]) {
        delete props.filterData.rowFilter[fildNameData];
        for (const input of props.filterDiv.children) {
          if (input.tagName === "INPUT" && input.field.fieldName === fildNameData) {
            input.value = "";
            break;
          }
        }
      }
      if (fildNameData === fieldName) continue;
      if (fieldData.value && !isEmptyObject(fieldData.value)) {
        data2[fildNameData] = fieldData.value;
      }
    }
    const rowFilter = {};
    if (props.filterData.rowFilter) {
      for (const [fildNameData, fieldData] of Object.entries(props.filterData.rowFilter)) {
        rowFilter[fildNameData] = fieldData;
      }
    }
    props.applyFilter({ ...rowFilter, ...data2 });
    if (isEmptyObject(data2)) {
      setFiltered(false);
    }
  }
  function getPureString(str) {
    let result = str;
    result = result.replaceAll("[", "\\[");
    result = result.replaceAll("]", "\\]");
    result = result.replaceAll("\\", "\\\\");
    result = result.replaceAll("^", "\\^");
    result = result.replaceAll("$", "\\$");
    result = result.replaceAll(".", "\\.");
    result = result.replaceAll("|", "\\|");
    result = result.replaceAll("?", "\\?");
    result = result.replaceAll("*", "\\*");
    result = result.replaceAll("+", "\\+");
    result = result.replaceAll("(", "\\(");
    return result;
  }
  const smartSearch = (text) => {
    var _a3, _b2, _c2;
    const lowerCaseText = text.toLowerCase();
    const lowerCaseSearchValue = searchValue.toLowerCase();
    let rawText, rawSearch;
    if (props.searchProps.datatype === "date") {
      rawSearch = (_a3 = lowerCaseSearchValue.match(/^[0-9.]+/)) == null ? void 0 : _a3[0];
      return Boolean(lowerCaseText.match(rawSearch));
    }
    if (props.searchProps.editMask) {
      rawText = (_b2 = lowerCaseText.match(/[0-9]+/g)) == null ? void 0 : _b2.join("");
      rawSearch = (_c2 = lowerCaseSearchValue.match(/[0-9]+/g)) == null ? void 0 : _c2.join("");
      return Boolean(rawText.match(rawSearch));
    }
    return Boolean(lowerCaseText.match(lowerCaseSearchValue));
  };
  function getRecords(data2, filter2) {
    const arrRec = [];
    if (data2 && data2.Values) {
      data2.Values[`$tag`] !== void 0 && `${data2.Values[`$tag`]}`;
      const values2 = Object.values(data2.Values);
      values2.forEach((item, id2) => {
        if (typeof item === "number") return;
        if (typeof item === "object") {
          if (filter2 && !smartSearch(item.text)) return;
          if (item.text !== "(заполненные)") {
            arrRec.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "tr",
                {
                  id: `item_${item.id}_${id2}`,
                  style: {
                    height: "17px",
                    userSelect: "none",
                    backgroundColor: focusRecID.current === `item_${item.id}_${id2}` ? "#e0e0e0" : "",
                    fontSize: "0.75rem"
                  },
                  onMouseEnter: onMouseEnter2,
                  onMouseLeave: onMouseLeave2,
                  onClick: onClickTr,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                    Grid$1,
                    {
                      container: true,
                      direction: "row",
                      justifyContent: "flex-start",
                      alignItems: "center",
                      style: { border: "1px solid #eeeeee" },
                      children: [
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Grid$1,
                          {
                            style: {
                              height: "inherit",
                              justifyContent: "center",
                              alignItems: "center",
                              display: multiCheck ? "flex" : "none"
                            },
                            children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { CheckState: checkData.current[`item_${item.id}_${id2}`] })
                          }
                        ),
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Grid$1,
                          {
                            textvalue: "true",
                            style: {
                              height: "inherit",
                              display: "flex",
                              alignItems: "center",
                              whiteSpace: "nowrap",
                              textOverflow: "ellipsis",
                              width: multiCheck ? "calc(100% - 27px)" : "100%"
                            },
                            children: item.text
                          }
                        )
                      ]
                    }
                  ) })
                },
                `item_${item.id}_${id2}`
              )
            );
          } else {
            arrRec.unshift(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                "tr",
                {
                  id: `item_${item.id}_${id2}`,
                  style: {
                    height: "17px",
                    backgroundColor: "#f5f5f5",
                    userSelect: "none",
                    cursor: "pointer",
                    fontSize: "0.75rem"
                  },
                  onClick: onClickTr,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Grid$1,
                    {
                      container: true,
                      direction: "row",
                      justifyContent: "flex-start",
                      alignItems: "center",
                      style: { border: "1px solid #eeeeee" },
                      children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Grid$1,
                        {
                          textvalue: "true",
                          style: {
                            height: "inherit",
                            display: "flex",
                            alignItems: "center",
                            whiteSpace: "nowrap",
                            textOverflow: "ellipsis",
                            width: "100%"
                          },
                          children: item.text
                        }
                      )
                    }
                  ) })
                },
                `item_${item.id}_${id2}`
              )
            );
          }
        } else {
          if (filter2 && !item.match(searchValue)) return;
          arrRec.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "tr",
              {
                id: `item_onlyText_${id2}`,
                style: {
                  height: "17px",
                  userSelect: "none",
                  backgroundColor: focusRecID.current === `item_onlyText_${id2}` ? "#e0e0e0" : "",
                  fontSize: "0.75rem"
                },
                onMouseEnter: onMouseEnter2,
                onMouseLeave: onMouseLeave2,
                onClick: onClickTr,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx("td", { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  Grid$1,
                  {
                    container: true,
                    direction: "row",
                    justifyContent: "flex-start",
                    alignItems: "center",
                    style: {
                      whiteSpace: "nowrap",
                      textOverflow: "ellipsis",
                      border: "1px solid #eeeeee"
                    },
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Grid$1,
                        {
                          style: {
                            height: "inherit",
                            justifyContent: "center",
                            alignItems: "center",
                            display: multiCheck ? "flex" : "none"
                          },
                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { CheckState: checkData.current[`item_onlyText_${id2}`] })
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Grid$1,
                        {
                          textvalue: "true",
                          style: {
                            height: "inherit",
                            display: "flex",
                            alignItems: "center",
                            whiteSpace: "nowrap",
                            textOverflow: "ellipsis",
                            width: multiCheck ? "calc(100% - 27px)" : "100%"
                          },
                          children: item
                        }
                      )
                    ]
                  }
                ) })
              },
              `item_onlyText_${id2}_${item}`
            )
          );
        }
      });
    }
    return arrRec;
  }
  const filterRecords = () => {
    return getRecords(data, true);
  };
  const getHeight3 = () => {
    let correction = 27;
    correction += filtered ? 27 : 0;
    correction += search ? 27 : 0;
    return `calc(100% - ${correction}px)`;
  };
  const openInputByKey = (ev) => {
    if (ev.code.match("Key|Numpad|Digit")) {
      setSearchValue(`${searchValue}${ev.key}`);
    }
  };
  const onKeyDownFilter = (ev) => {
    setSearch(true);
    setTimeout(() => {
      const input = searchRef.current.querySelector(".textfieldinput");
      if (document.activeElement === input) return;
      openInputByKey(ev);
      input == null ? void 0 : input.focus();
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        id: `filter-bttn_${props.dataForReq.FieldName}`,
        ref: filterButton,
        "aria-describedby": id,
        onClick: handleClick,
        style: { width: "15px", height: "15px" },
        children: filtered ? /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltIcon, { style: { fontSize: "12px" } }) : /* @__PURE__ */ jsxRuntimeExports.jsx(FilterAltOutlinedIcon, { style: { fontSize: "12px" } })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Popover,
      {
        sx: { height: "100%" },
        slotProps: {
          paper: {
            style: {
              height: "210px",
              width: "270px",
              minHeight: "210px",
              minWidth: "270px",
              maxWidth: "-webkit-fill-available",
              maxHeight: "-webkit-fill-available",
              resize: "both"
            }
          }
        },
        id,
        open,
        anchorEl,
        onClose: handleClose,
        anchorOrigin: {
          vertical: "bottom",
          horizontal: "left"
        },
        transformOrigin: {
          vertical: "top",
          horizontal: "left"
        },
        onKeyDown: onKeyDownFilter,
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Box$1,
          {
            ref: filterBox,
            style: {
              height: "100%",
              width: "100%",
              overflow: "hidden"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Box$1,
                {
                  style: {
                    height: "27px",
                    border: "1px solid #eeeeee",
                    width: "100%",
                    display: filtered ? "flex" : "none",
                    justifyContent: "center",
                    alignItems: "center"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { onClick: onDeleteFilter, style: { height: "100%", width: "100%" }, children: "снять фильтр" })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsxs(
                "div",
                {
                  ref: searchRef,
                  style: {
                    height: "27px",
                    borderBottom: "1px solid #eeeeee",
                    width: "100%",
                    display: search ? "flex" : "none",
                    justifyContent: "center",
                    alignItems: "center",
                    flexDirection: "row"
                  },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", flex: "1 1 0", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Editor,
                      {
                        ...props.searchProps,
                        value: searchValue,
                        placeholder: "поиск",
                        onEdit: async (data2) => {
                          setSearchValue(data2.value);
                        }
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", width: "27px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { style: { fontSize: "100%", height: "27px", width: "27px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SearchIcon, { style: { fontSize: "15px" } }) }) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "flex", width: "27px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        onClick: () => {
                          setSearchValue("");
                        },
                        style: { fontSize: "100%", height: "27px", width: "27px" },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClearIcon, { style: { fontSize: "15px" } })
                      }
                    ) })
                  ]
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Box$1,
                {
                  style: {
                    height: getHeight3(),
                    border: "1px solid #eeeeee",
                    width: "100%",
                    overflow: "auto"
                  },
                  children: load ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx("table", { style: { width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("tbody", { children: !searchValue || !search ? records : filterRecords() }) })
                }
              ),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Box$1,
                {
                  style: {
                    height: "27px",
                    border: "1px solid #eeeeee",
                    width: "100%"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { width: "120px", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      Grid$1,
                      {
                        container: true,
                        direction: "row",
                        justifyContent: "flex-start",
                        alignItems: "center",
                        style: {
                          display: records && records.length > 2 ? "" : "none"
                        },
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { width: "20%", display: "flex" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckBoxMultiCheck, { CheckState: multiCheck, onEdit: onCheck }) }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { width: "80%" }, children: "множество" })
                        ]
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Grid$1,
                      {
                        style: {
                          width: "calc(100% - 160px)",
                          borderLeft: "1px solid #eeeeee"
                        },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                          Grid$1,
                          {
                            container: true,
                            direction: "row",
                            justifyContent: "flex-start",
                            alignItems: "center",
                            style: { display: multiCheck === true ? "" : "none" },
                            children: [
                              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                IconButton,
                                {
                                  disabled: Object.values(checkData.current).length === records.length,
                                  onClick: onCheckAll,
                                  style: { width: "20px", height: "20px" },
                                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ChecklistOutlinedIcon, { style: { fontSize: "12px" } })
                                }
                              ) }),
                              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                IconButton,
                                {
                                  disabled: Object.values(checkData.current).length === 0,
                                  onClick: onUnCheckAll,
                                  style: { width: "20px", height: "20px" },
                                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(IndeterminateCheckBoxOutlinedIcon, { style: { fontSize: "12px" } })
                                }
                              ) }),
                              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                IconButton,
                                {
                                  disabled: disabledAcceptBttn,
                                  onClick: () => onAccept(focusRec.current),
                                  style: { width: "20px", height: "20px" },
                                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(CheckOutlinedIcon, { style: { fontSize: "12px" } })
                                }
                              ) }),
                              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: onCanceled, style: { width: "20px", height: "20px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ClearOutlinedIcon, { style: { fontSize: "12px" } }) }) })
                            ]
                          }
                        )
                      }
                    ),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { style: { width: "40px", borderLeft: "1px solid #eeeeee", paddingLeft: "4px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      IconButton,
                      {
                        onClick: () => {
                          setSearch(!search);
                          setTimeout(() => {
                            var _a3;
                            (_a3 = searchRef.current.querySelector(".textfieldinput")) == null ? void 0 : _a3.focus();
                          });
                        },
                        style: { width: "20px", height: "20px" },
                        children: /* @__PURE__ */ jsxRuntimeExports.jsx(SearchIcon, { style: { fontSize: "12px" } })
                      }
                    ) })
                  ] })
                }
              )
            ]
          }
        )
      }
    )
  ] });
}
let API$1 = (_a = class {
  static queue(promise) {
    return new Promise((resolve, reject) => {
      _a.current_queue.push({
        promise,
        resolve,
        reject
      });
      _a.dequeue();
    });
  }
  static dequeue() {
    if (this.workingOnPromise) {
      return false;
    }
    const item = _a.current_queue.shift();
    if (!item) {
      return false;
    }
    try {
      this.workingOnPromise = true;
      item.promise().then((value) => _a.afterPromise(item, true, value)).catch((error) => _a.afterPromise(item, false, error));
    } catch (error) {
      _a.afterPromise(item, false, error);
    }
    return true;
  }
  static scrollGrid(e2, func) {
    return func(e2).then(() => e2);
  }
  static stopQueued() {
    _a.current_queue.length = 0;
  }
}, __publicField(_a, "current_queue", []), __publicField(_a, "pendingPromise", false), __publicField(_a, "afterPromise", (item, resolve = false, data) => {
  _a.workingOnPromise = false;
  if (resolve) item.resolve(data);
  else item.reject(data);
  _a.dequeue();
}), _a);
const queuedGridScroll = {
  currentQueue: API$1.current_queue,
  scrollGrid(e2, func) {
    return API$1.queue(() => API$1.scrollGrid(e2, func));
  },
  stopQueued() {
    API$1.stopQueued();
  }
};
function StatusButtonCardMode({ icon, handleStatuses, changeStatus }) {
  const [anchorEl, setAnchorEl] = React.useState(null);
  const [statuses, setStatuses] = React.useState([]);
  const open = Boolean(anchorEl);
  const handleClose = () => {
    setAnchorEl(null);
  };
  const menuItems = (json) => {
    return json.map((item, index2) => {
      const { Disabled: disabled, Caption: text, Image: img, Status: status, Current: current } = item, selected = current === "1";
      return /* @__PURE__ */ jsxRuntimeExports.jsxs(
        MenuItem,
        {
          onClick: () => {
            handleClose();
            changeStatus(status);
          },
          disabled,
          selected,
          style: { height: "25px" },
          children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemIcon, { children: ImgURL(img) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { children: text })
          ]
        },
        "ButtonsMenuStatus" + index2
      );
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "grid", justifyContent: "center" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      IconButton,
      {
        sx: { width: "42px" },
        onClick: (e2) => {
          handleStatuses().then((res) => {
            setStatuses(res);
            setAnchorEl(e2.target);
          });
        },
        children: ImgURL(getIcons(icon), { width: "24px" })
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Menu,
      {
        anchorEl,
        open,
        onClose: handleClose,
        MenuListProps: {
          "aria-labelledby": "basic-button"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", вс: true, justifyContent: "flex-start", alignItems: "center", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              item: true,
              style: {
                backgroundColor: "#e6e6e6",
                position: "absolute",
                height: "100%",
                width: "46px"
              }
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: menuItems(statuses) })
        ] })
      }
    )
  ] });
}
function CardModeButton({ onClick: onClick2, rotateState }) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: onClick2, sx: { height: "23px", width: "23px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ViewModuleOutlinedIcon, { fontSize: "small", sx: { transform: `rotate(${rotateState ? "0deg" : "90deg"})` } }) });
}
const modalButton = 0;
const listButton = 1;
function appendEvent(e2, f2, el) {
  if (el) {
    el.addEventListener(e2, f2);
  } else {
    document.addEventListener(e2, f2);
  }
}
function deleteEvent(e2, f2, el) {
  {
    document.removeEventListener(e2, f2);
  }
}
function showApplicationMask(parent, text) {
  if (parent) {
    const maskbox = document.createElement("div");
    maskbox.setAttribute("class", "login-form-mask-box");
    maskbox.setAttribute("id", "mask-box");
    parent.appendChild(maskbox);
    const maskicon = document.createElement("img");
    maskicon.setAttribute("class", "login-form-mask-icon");
    maskbox.appendChild(maskicon);
    const maskboxtext = document.createElement("div");
    maskboxtext.setAttribute("class", "login-form-mask-text");
    maskboxtext.innerText = "Загрузка данных";
    maskbox.appendChild(maskboxtext);
  }
}
function hideApplicationMask(parent) {
  if (parent) {
    const el = document.getElementById("mask-box");
    if (el) el.remove();
  }
}
function minint(x, y2) {
  if (x < y2) return x;
  else return y2;
}
function maxint(x, y2) {
  if (x > y2) return x;
  else return y2;
}
function midint(min2, max2, val) {
  return maxint(min2, minint(max2, val));
}
function intInRange(int, min2, max2) {
  return int >= min2 && int <= max2;
}
function showElement(el) {
  el.style.display = "";
}
function hideElement(el) {
  el.style.display = "none";
}
function moddiv(baseval, divider) {
  {
    return (baseval - baseval % divider) / divider;
  }
}
var STATUS_GROUPED = 32, STATUS_COLLAPSED = 128, dsInactive = 0, dsBrowse = 1, dsEdit = 2, dsInsert = 3, usUnmodified = 0, usModified = 1, usInserted = 2;
function createRecordSource() {
  var me = this, points = /* @__PURE__ */ new Map(), state = {}, editRec = null, keyFieldName = "", changes = [], gridStateChanged = false, savecurrentvalues = {};
  me.recordCount = 0;
  me.onGridStateChange = null;
  me.activeRecord = 0;
  me.fields = [];
  me.modified = false;
  me.active = false;
  me.defaultFields = false;
  me.InsertFlag = 0;
  me.acquireFields = acquireFields;
  me.Master = {
    isEmpty: false
  };
  me.onHandleRequest = null;
  me.onRecordCollapsed = null;
  me.CreateCollapsibleRecords = null;
  me.updatesPending = false;
  me.selection = "";
  me.NeedToSave = false;
  me.rights = {
    modify: false,
    insert: false,
    delete: false,
    accsess: false
  };
  me.actual = false;
  const insertFlagValue = { "": 0, 1: 1, 0: 2 };
  me.caseSensitive = true;
  async function handleRequest2(request, loadCursor, wsm, subParams) {
    if (me.onHandleRequest) {
      var json = await me.onHandleRequest(request, loadCursor, wsm, subParams);
      if (json) {
        me.updatesPending = json.UpdatesPending === "1";
        me.actual = json.Actual === "1";
      }
      me.ChangeSave();
      return json;
    }
  }
  me.saveState = function() {
    if (gridStateChanged) {
      gridStateChanged = false;
      return state;
    }
  };
  me.getKeyFieldNameData = (text = true) => {
    if (text) return me.getFieldTextSync(keyFieldName) || 0;
    else return me.getFieldValueSync(keyFieldName) || 0;
  };
  me.getKeyFieldName = function() {
    return keyFieldName;
  };
  me.setKeyFieldName = function(key) {
    keyFieldName = key;
  };
  function acquireFields() {
    if (me.active) return;
    var request = {};
    request.command = "getFields";
    return handleRequest2(request, true).then((json) => {
      if (json && json.Fields) {
        me.fields = [];
        let sourField, destField, fields = json.Fields;
        for (var i = 0; i < fields.length; i++) {
          sourField = fields[i];
          if (sourField.Name) {
            destField = [];
            destField.fieldName = sourField.Name;
            if (sourField.Title) destField.displayLabel = sourField.Title;
            else destField.displayLabel = destField.fieldName;
            if (sourField.Width) destField.displayWidth = sourField.Width;
            else destField.displayWidth = 10;
            if (sourField.Type) destField.dataType = sourField.Type;
            else destField.dataType = 1;
            if (sourField.Size) destField.dataSize = sourField.Size;
            else sourField.dataSize = 0;
            if (sourField.Alignment) destField.alignment = sourField.Alignment;
            else destField.alignment = 0;
            if (sourField.Values) {
              destField.list = Object.values(sourField.Values);
            } else destField.list = [];
            me.fields.push(destField);
          }
        }
        if (json.RecordCount) me.recordCount = parseInt(json.RecordCount);
        else me.recordCount = 0;
        if (json.Selection) me.selection = json.Selection;
        if (json.KeyFieldName) keyFieldName = json.KeyFieldName;
        if (json.DisableInsert) me.InsertFlag = insertFlagValue[json.DisableInsert];
      }
    });
  }
  async function recordIndexChanged() {
    if (me.onRecordIndexChanged) {
      await me.getFieldText("ID");
      await me.onRecordIndexChanged(me);
      me.activeRecord;
    }
  }
  me.ChangeSave = function(bool) {
    onNeedToSaveChange();
  };
  function onNeedToSaveChange() {
    me.onNeedToSaveChanged && me.onNeedToSaveChanged(me);
  }
  async function dataChanged() {
    me.onDataChanged && await me.onDataChanged(me);
  }
  async function createNewRecord(info, subData) {
    return new Promise(async (resolve) => {
      let request = {}, json, fields;
      request.command = "CreateRecord";
      request.RecordIndex = me.activeRecord;
      if (info) request.info = info;
      if (subData) {
        for (let [key, value] of Object.entries(subData)) {
          request[key] = value;
        }
      }
      json = await handleRequest2(request, true);
      if (json && json.RecordSet) {
        fields = json.RecordSet.Attributes;
        if (fields) {
          let records = json.RecordSet.Records;
          if (records && records.length > 0) {
            editRec = { vals: [], info: {} };
            editRec.insert = true;
            editRec.active = me.activeRecord;
            loadRecordValues(editRec, records[0], fields);
            resolve(true);
          }
        }
      } else {
        resolve();
      }
    });
  }
  me.saveCurrentMarkedValues = function(field) {
    if (field.marked) {
      let id = me.getFieldValueSync(field.fieldName), text = me.getFieldTextSync(field.fieldName);
      const index2 = me.getFieldIndex(field.fieldName);
      savecurrentvalues = {
        ...savecurrentvalues,
        [index2]: {
          id: id === void 0 ? "" : id,
          text: text === void 0 ? "" : text
        }
      };
    } else {
      delete savecurrentvalues[field.fieldName];
    }
  };
  me.updateCurrentMarkedValues = async function() {
    for (const key of Object.keys(savecurrentvalues)) {
      const fieldName = me.fields[key].fieldName;
      let id = await me.getFieldValue(fieldName), text = await me.getFieldText(fieldName);
      savecurrentvalues = {
        ...savecurrentvalues,
        [key]: {
          id: id === void 0 ? "" : id,
          text: text === void 0 ? "" : text
        }
      };
    }
  };
  async function fieldHasData(fieldName) {
    let rec = await getRecordNode(me.activeRecord);
    if (rec) {
      return true;
    }
  }
  const getMarkedValue = (dest, index2) => {
    if (savecurrentvalues[index2] && dest.insert === true) {
      if (savecurrentvalues[index2].id || savecurrentvalues[index2].text) {
        return savecurrentvalues[index2];
      } else {
        return { id: "", text: "" };
      }
    }
    return {};
  };
  function loadRecordValues(dest, sour, fields, index2) {
    if (dest && sour && fields && fields.length) {
      if (!dest.info) dest.info = {};
      if (sour.UpdateStatus) {
        dest.info.updateStatus = parseInt(sour.UpdateStatus);
      } else {
        dest.info.updateStatus = 0;
      }
      if (sour.RecordLevel) dest.info.recordLevel = parseInt(sour.RecordLevel);
      else dest.info.recordLevel = 0;
      if (sour.RecordState) dest.info.recordState = parseInt(sour.RecordState);
      else dest.info.recordState = 0;
      if (sour.Data$content) dest.info.Data$content = sour.Data$content;
      else dest.info.Data$content = "";
      if (sour.levelsField) dest.info.levelsField = sour.levelsField;
      if (sour.Title) dest.info.title = sour.Title;
      if (sour.LockStatus) dest.info.LockStatus = Number(sour.LockStatus);
      if (sour.RecordTitle) dest.info.recordTitle = sour.RecordTitle;
      else dest.info.recordTitle = "";
      if (sour.Text) dest.info.recordText = sour.Text;
      else dest.info.recordText = "";
      if (sour.Hidden === "1") dest.info.hidden = true;
      else dest.info.hidden = false;
      dest.info.recordIndex = index2;
      if (sour.Day || sour.Year || sour.Month || sour.Number)
        dest.info.rangeInfo = {
          day: sour.Day || 0,
          year: sour.Year || 0,
          month: sour.Month || 0,
          number: sour.Number || 0
        };
      CheckRecordInfo(dest, fields);
      let data = sour.Data;
      for (let i = 0, fieldName, index22, d2, v2, markedData; i < fields.length; i++) {
        fieldName = fields[i];
        index22 = me.getFieldIndex(fieldName);
        if (index22 !== -1) {
          while (dest.vals.length <= index22) {
            const destIndex = dest.vals.length;
            markedData = getMarkedValue(dest, destIndex);
            dest.vals.push(isEmptyObject(markedData) ? {} : markedData);
          }
          try {
            d2 = data[i];
            if (!d2 || !isEmptyObject(markedData)) continue;
            v2 = dest.vals[index22];
            if (d2.text || d2.id) {
              v2.text = d2.text ? d2.text : "";
              v2.id = d2.id;
            } else v2.text = d2;
          } catch (error) {
            console.error(error);
          }
        }
      }
    }
  }
  function CheckRecordInfo(dest, attributes) {
    let dataContent = dest.info.Data$content;
    let fixedDataContent = "0".repeat(me.fields.length);
    if (dataContent !== "" && dataContent && me.fields.length > 0 && attributes) {
      for (let i = 1, index2; i < me.fields.length; i++) {
        index2 = me.getFieldIndex(attributes[i - 1]);
        fixedDataContent = fixedDataContent.replaceAt(index2 + 1, dataContent[Number(i)]);
      }
      dest.info.Data$content = fixedDataContent;
    }
  }
  function saveRecordValues(sour, dest, fields) {
    if (sour && dest && fields) {
      if (sour.vals) {
        let data = dest.$Data;
        if (data) {
          for (let i = 0, index2, fieldName, s, d2; i < fields.length; i++) {
            fieldName = fields[i];
            index2 = me.getFieldIndex(fieldName);
            d2 = {};
            if (intInRange(index2, 0, sour.vals.length - 1)) {
              s = sour.vals[index2];
              if (s.text === "" && !s.id) {
                d2 = "";
              } else {
                if (s.text || s.id) {
                  d2.text = s.text;
                  d2.id = s.id;
                } else d2.text = "";
              }
            }
            data.push(d2);
          }
        }
      }
    }
  }
  async function loadSingleRecord(first, rec, count, load = true) {
    var request = {}, json, attributes, records, record;
    request.command = "getRecords";
    request.first = first;
    request.count = count ? count : 1;
    json = await handleRequest2(request, load);
    if (json && json.RecordSet) {
      attributes = json.RecordSet.Attributes;
      records = json.RecordSet.Records;
      if (attributes && records && records.length > 0) {
        record = records[0];
        loadRecordValues(rec, record, attributes, first);
        return json;
      }
    }
    return;
  }
  function getRecordNode(index2) {
    const promise = new Promise(async (resolve) => {
      if (editRec !== null) {
        if (editRec.index === index2) return resolve(editRec);
        if (editRec.insert && index2 > editRec.index) index2--;
      }
      let rec = points.get(index2);
      if (!rec) {
        rec = { vals: [], info: {} };
        await loadSingleRecord(index2, rec);
        points.set(index2, rec);
      }
      return resolve(rec);
    });
    return promise;
  }
  me.acquireRecords = async function(first, count, load) {
    return new Promise(async (resolve) => {
      let rec = { vals: [], info: {} }, attributes, records = [], data;
      let First = maxint(first, 0), LastRec = minint(First + count - 1, me.recordCount - 1), FR = First, countToGet = 0;
      while (FR <= LastRec) {
        if (points.get(FR) !== void 0) {
          ++FR;
        } else {
          break;
        }
      }
      for (let i = FR; i <= LastRec; i++) {
        if (points.get(i) === void 0) {
          ++countToGet;
        }
      }
      if (editRec && editRec.insert === true) {
        --countToGet;
      }
      if (countToGet !== 0) {
        data = await loadSingleRecord(FR, rec, countToGet, load);
        if (data && data.RecordSet) {
          attributes = data.RecordSet.Attributes;
          records = data.RecordSet.Records;
          for (const [key, value] of Object.entries(records)) {
            let rec2 = { vals: [], info: {} };
            const isCard = value.levelsField !== void 0;
            const index2 = isCard ? Number(key) : FR;
            loadRecordValues(rec2, value, attributes, index2);
            points.set(index2, rec2);
            FR++;
          }
        }
      }
      return resolve(countToGet);
    });
  };
  me.setGridState = function(obj2, changed) {
    state = obj2;
    if (changed) {
      if (me.onGridStateChange) me.onGridStateChange();
      gridStateChanged = true;
    }
  };
  me.getGridState = function() {
    return state;
  };
  me.open = async function() {
    return new Promise(async (resolve) => {
      if (me.active) return resolve();
      if (me.fields.length == 0) {
        await acquireFields();
        me.defaultFields = me.fields.length > 0;
      } else await me.refresh();
      me.active = true;
      me.first();
      resolve();
    });
  };
  me.close = function() {
    if (!me.active) return;
    points.clear();
    if (me.defaultFields) me.fields = [];
    me.active = false;
  };
  me.refresh = async function(key, info) {
    const promise = new Promise(async (resolve) => {
      let request = {}, json;
      if (key == "!") {
        points.clear();
        if (editRec) {
          editRec = null;
        }
        request.command = "GetRecordCount";
        if (!me.isEmpty()) {
          request.recordIndex = me.activeRecord;
        }
        json = await handleRequest2(request, true);
        if (json) {
          if (json.RecordCount !== void 0) me.recordCount = parseInt(json.RecordCount);
          else me.recordCount = 0;
          if (json.RecordIndex !== void 0) {
            me.activeRecord = parseInt(json.RecordIndex);
          }
        }
        return resolve(json);
      } else {
        request.command = "refresh";
        if (key) request.key = key;
        if (info) request.info = info;
        json = await handleRequest2(request, true);
        if (json) {
          if (json.RecordCount !== void 0) me.recordCount = parseInt(json.RecordCount);
          else me.recordCount = 0;
          points.clear();
          if (editRec) {
            editRec = null;
          }
          if (json.DisableInsert !== void 0) {
            me.InsertFlag = insertFlagValue[json.DisableInsert];
          }
          if (json.RecordIndex !== void 0) {
            me.activeRecord = parseInt(json.RecordIndex);
          }
          if (json.RecordIndex === void 0 && json.key) {
            me.activeRecord = parseInt(json.key.replace("!", "").replace("^", ""));
          }
        }
        return resolve(json);
      }
    });
    return promise;
  };
  me.getRecordData = async function(recIndex) {
    var rec = await getRecordNode(recIndex !== void 0 ? recIndex : me.activeRecord);
    return rec;
  };
  me.getRecordState = async function() {
    var rec = await getRecordNode(me.activeRecord);
    if (rec.info) {
      return rec.info.recordState;
    }
    return 0;
  };
  me.getRecordInfo = function() {
    let rec = {}, index2 = Number(me.activeRecord);
    if (editRec) {
      if (editRec.index === index2) rec = editRec;
      if (editRec.insert && index2 > editRec.index) index2--;
    } else {
      rec = points.get(index2);
    }
    try {
      if (rec.info) {
        return rec.info;
      }
      return {};
    } catch {
      return "";
    }
  };
  me.getRecordID = async function(id) {
    var rec = await getRecordNode(id);
    if (rec) return rec.info.recordIndex;
  };
  me.getRecordTitle = async function() {
    var rec = await getRecordNode(me.activeRecord);
    if (rec.info) {
      return rec.info.recordTitle;
    } else return "";
  };
  me.getRecordLevel = async function() {
    var rec = await getRecordNode(me.activeRecord);
    if (rec.info) {
      return rec.info.recordLevel ? rec.info.recordLevel : 0;
    } else return 0;
  };
  me.getFieldTitle = function(fieldName) {
    var _a2;
    const index2 = me.getFieldIndex(fieldName);
    if (index2 == -1) {
      return "";
    }
    return ((_a2 = me.fields[index2]) == null ? void 0 : _a2.displayLabel) || "";
  };
  me.getFieldText = async function(fieldName, recordIndex2) {
    const index2 = me.getFieldIndex(fieldName);
    if (index2 == -1) {
      return "";
    }
    const rec = await getRecordNode(recordIndex2 ?? me.activeRecord);
    if (!rec || !rec.vals || !rec.vals[index2]) return "";
    return rec.vals.length !== 0 && rec.vals[index2].text ? rec.vals[index2].text : "";
  };
  me.getFieldTextSync = function(fieldName, recordIndex2) {
    let index2 = me.getFieldIndex(fieldName);
    const localRecordIndex = recordIndex2 ?? me.activeRecord;
    let rec = "";
    if (index2 == -1) {
      return "";
    }
    if (editRec) {
      if (editRec.index === localRecordIndex) rec = editRec;
      if (editRec.insert && localRecordIndex > editRec.index) {
        rec = points.get(localRecordIndex - 1);
      }
    } else {
      rec = points.get(localRecordIndex);
    }
    if (!rec || !rec.vals || !rec.vals[index2]) return "";
    return rec.vals[index2].text || "";
  };
  me.getFieldValueSync = function(fieldName, recordIndex2) {
    let index2 = me.getFieldIndex(fieldName);
    let rec = "";
    const localRecordIndex = recordIndex2 ?? me.activeRecord;
    if (index2 == -1) {
      return "";
    }
    if (editRec) {
      if (editRec.index === localRecordIndex) rec = editRec;
      if (editRec.insert && localRecordIndex > editRec.index) {
        rec = points.get(localRecordIndex - 1);
      }
    } else {
      rec = points.get(localRecordIndex);
    }
    if (!rec || !rec.vals || !rec.vals[index2]) return "";
    return rec.vals[index2].id || "";
  };
  me.findField = function(fieldName) {
    let isExits = false;
    me.fields.filter((fieldInfo) => {
      if (fieldInfo.fieldName === fieldName) isExits = true;
    });
    return isExits;
  };
  me.setFieldText = async function(fieldName, value, index2) {
    var rec = await getRecordNode(index2 || me.activeRecord);
    if (rec) {
      var index2 = me.getFieldIndex(fieldName);
      if (index2 !== -1) {
        while (rec.vals.length <= index2) rec.vals.push({});
        let v2 = rec.vals[index2];
        v2.text = value;
      }
      me.setFieldModified(fieldName, true);
      me.modified = true;
    }
  };
  me.setFieldValue = async function(fieldName, value, index2) {
    var rec = await getRecordNode(index2 || me.activeRecord);
    if (rec) {
      var index2 = me.getFieldIndex(fieldName);
      if (index2 !== -1) {
        while (rec.vals.length <= index2) rec.vals.push({});
        let v2 = rec.vals[index2];
        v2.id = value;
      }
      me.setFieldModified(fieldName, true);
    }
  };
  me.getFieldValue = async function(fieldName, recordIndex2) {
    var _a2;
    var index2 = me.getFieldIndex(fieldName);
    if (index2 == -1) {
      return "";
    }
    var rec = await getRecordNode(recordIndex2 ?? me.activeRecord);
    if (!rec || !rec.vals || !rec.vals[index2]) return;
    return rec.vals.length !== 0 && ((_a2 = rec.vals[index2]) == null ? void 0 : _a2.id) || void 0;
  };
  me.setRecordText = async function(text, index2 = me.activeRecord) {
    const rec = await getRecordNode(index2);
    if (rec == null ? void 0 : rec.info) rec.info.recordText = text;
  };
  me.getActiveRecordText = async function() {
    var rec = await getRecordNode(me.activeRecord);
    return { text: rec.info.recordText, id: me.activeRecord };
  };
  me.moveBy = function(distance2) {
    me.activeRecord += distance2;
    if (me.activeRecord < 0) me.first();
    else if (me.activeRecord >= me.recordCount) me.last();
    else recordIndexChanged();
  };
  me.first = function() {
    me.activeRecord = 0;
    me.recordCount == 0;
    recordIndexChanged();
  };
  me.last = function() {
    me.activeRecord = maxint(0, me.recordCount - 1);
    me.recordCount == 0;
    recordIndexChanged();
  };
  me.setRecordIndex = function(value) {
    me.activeRecord = value;
    this.moveBy(0);
  };
  me.getFieldIndex = function(fieldName) {
    if (me.caseSensitive) {
      return me.fields.findIndex((el) => el.fieldName === fieldName);
    }
    const lowerFieldName = fieldName.toLowerCase();
    return me.fields.findIndex((el) => el.fieldName.toLowerCase() === lowerFieldName);
  };
  me.orderRecords = function(indexFieldNames, selection) {
    return new Promise(async (resolve) => {
      var request = {}, json;
      request.command = "SortRecords";
      if (indexFieldNames) {
        request.fields = indexFieldNames;
        request.recordIndex = me.activeRecord;
      }
      if (selection) request.selection = selection.value;
      json = await handleRequest2(request, true);
      if (json) {
        points.clear();
        if (editRec) {
          editRec = null;
        }
        if (json.RecordIndex) me.activeRecord = parseInt(json.RecordIndex);
        if (selection && json.Selection) selection.value = json.Selection;
        await recordIndexChanged();
      }
      return resolve(json.Selection);
    });
  };
  me.SearchRecord = async function(FieldName, text, recordIndex2) {
    let request = {}, json;
    request.command = "SearchRecord";
    if (FieldName) request.FieldName = FieldName;
    if (text) request.Text = text;
    request.RecordIndex = recordIndex2 !== void 0 ? recordIndex2 : me.activeRecord;
    json = await handleRequest2(request, false);
    if (json) {
      if (editRec) {
        editRec = null;
      }
      return parseInt(json.RecordIndex) === -1 ? 0 : parseInt(json.RecordIndex);
    }
  };
  me.groupRecords = function(groupFieldNames) {
    const promise = new Promise(async (resolve) => {
      var request = {}, json;
      request.command = "GroupRecords";
      request.fields = groupFieldNames;
      request.recordIndex = me.activeRecord;
      json = await handleRequest2(request, true);
      if (json) {
        points.clear();
        if (editRec) {
          editRec = null;
        }
        if (json.RecordIndex) me.activeRecord = parseInt(json.RecordIndex);
        if (json.RecordCount) me.recordCount = parseInt(json.RecordCount);
        await recordIndexChanged();
      }
      resolve();
    });
    return promise;
  };
  me.collapseGroup = function(collapse) {
    const promise = new Promise(async (resolve) => {
      var request = {}, json;
      request.command = "CollapseGroup";
      request.recordIndex = me.activeRecord;
      request.collapsed = collapse ? 1 : 0;
      json = await handleRequest2(request, false);
      if (json) {
        points.clear();
        if (editRec) {
          editRec = null;
        }
        if (json.RecordIndex) me.activeRecord = parseInt(json.RecordIndex);
        if (json.RecordCount) me.recordCount = parseInt(json.RecordCount);
        await recordIndexChanged();
      }
      resolve();
    });
    return promise;
  };
  me.getGroupRecord = function() {
    const promise = new Promise(async (resolve) => {
      var request = {}, json;
      let subParams;
      request.command = "GetRecordGroup";
      request.recordIndex = me.activeRecord;
      if (me.CreateCollapsibleRecords !== null)
        subParams = {
          Key: await me.getFieldText(keyFieldName || "ID"),
          RecordIndex: me.activeRecord,
          comand: "GetRecordGroup"
        };
      json = await handleRequest2(request, true, void 0, subParams);
      if (json) {
        if (json.RecordIndex) {
          return resolve(parseInt(json.RecordIndex));
        }
      }
      return resolve(-1);
    });
    return promise;
  };
  me.applyFieldFilter = function(filter2) {
    const promise = new Promise(async (resolve) => {
      var request = {}, json;
      request.command = "ApplyFilter";
      request.recordIndex = me.activeRecord;
      request.fields = filter2;
      json = await handleRequest2(request, true);
      if (json) {
        points.clear();
        if (editRec) {
          editRec = null;
        }
        if (json.RecordIndex) me.activeRecord = parseInt(json.RecordIndex);
        if (json.RecordCount) me.recordCount = parseInt(json.RecordCount);
        else me.recordCount = 0;
        await recordIndexChanged();
      }
      resolve();
    });
    return promise;
  };
  me.checkActive = function(activate) {
    if (!me.active && activate) {
      if (me.fields.length == 0) {
        acquireFields();
        me.defaultFields = me.fields.length > 0;
      }
      me.active = true;
    }
    return me.active;
  };
  me.isEmpty = function() {
    return me.recordCount == 0;
  };
  me.insertRecord = async function(down, info, subData) {
    if (await createNewRecord(info, subData)) {
      if (down && me.recordCount > 0) me.activeRecord++;
      editRec.index = me.activeRecord;
      me.recordCount++;
      await recordIndexChanged();
    }
  };
  me.appendRecord = async function() {
    if (await createNewRecord()) {
      me.ChangeSave(true);
      me.activeRecord = me.recordCount;
      editRec.index = me.activeRecord;
      me.recordCount++;
      await recordIndexChanged();
    }
  };
  me.editRecord = async function(recordIndex2) {
    if (me.recordCount === 0) {
      await me.appendRecord();
    } else {
      if (!editRec) {
        let rec = await getRecordNode(recordIndex2 || me.activeRecord);
        if (rec) {
          editRec = { vals: [], info: {} };
          editRec.insert = false;
          editRec.active = recordIndex2 || me.activeRecord;
          editRec.index = recordIndex2 || me.activeRecord;
          loadRecordValues(editRec, rec, me.fields);
        }
      }
    }
  };
  me.CheckFieldText = function(field, ObjRef, text) {
    var request = {};
    request.command = "CheckFieldText";
    request.RecordIndex = me.activeRecord;
    request.FieldName = field;
    request.ObjRef = ObjRef;
    if (text) request.text = text;
    return handleRequest2(request, false).then((json2) => {
      return json2;
    });
  };
  me.GetFieldTextRequest = async function(flag, field) {
    var request = {};
    request.command = "GetFieldText";
    request.RecordIndex = me.activeRecord;
    request.FieldName = field;
    request.ForEdit = flag;
    return handleRequest2(request, false).then((res) => {
      return res;
    });
  };
  me.deleteRecord = async function(index2) {
    let request = {}, json;
    request.Command = "DeleteRecord";
    request.RecordIndex = index2 !== void 0 ? index2 : me.activeRecord;
    if (keyFieldName !== "") request.RecordKey = await me.getFieldText(keyFieldName, index2);
    json = await handleRequest2(request, true);
    if (json) {
      points.clear();
      if (json.RecordCount) me.recordCount = parseInt(json.RecordCount);
      if (me.recordCount > 0 && json.RecordIndex) me.activeRecord = parseInt(json.RecordIndex);
      else me.activeRecord = 0;
      me.moveBy(0);
    }
  };
  me.postRecord = function(index2) {
    return new Promise(async (resolve) => {
      const postProcessing = async (json) => {
        points.clear();
        editRec = null;
        if (json.RecordCount) me.recordCount = parseInt(json.RecordCount);
        if (json.RecordIndex !== void 0) me.activeRecord = parseInt(json.RecordIndex);
        else me.activeRecord = 0;
        me.modified = false;
        await dataChanged();
        this.Master.refreshRecord && await this.Master.refreshRecord();
        changes = [];
        resolve();
      };
      if (editRec) {
        let i, request = {}, json, fields;
        request.Command = "PostRecord";
        request.RecordIndex = index2 || editRec.index || me.activeRecord;
        if (me.getState() === dsInsert) request.NewRecord = "1";
        else if (keyFieldName !== "") request.RecordKey = await me.getFieldText(keyFieldName, request.RecordIndex);
        request.RecordSet = {};
        request.RecordSet.Attributes = [];
        fields = request.RecordSet.Attributes;
        if (editRec.insert) {
          for (i = 0; i < editRec.vals.length; i++) {
            editRec.vals[i];
            if (fieldHasData(me.fields[i].fieldName)) {
              fields.push(me.fields[i].fieldName);
            }
          }
        } else {
          for (i = 0; i < changes.length; i++) {
            fields.push(changes[i]);
          }
        }
        request.RecordSet.Records = { Record: {} };
        let rec = {};
        rec.$Data = [];
        saveRecordValues(editRec, rec, fields);
        request.RecordSet.Records.Record = rec;
        json = await handleRequest2(request, false, true);
        if (json && !isEmptyObject(json)) {
          if (json.Token) {
            tokenProcessingTest(json, {
              from: "grid",
              func: async () => {
                await postProcessing(json);
              }
            });
          } else {
            await postProcessing(json);
          }
        } else {
          await me.cancelRecord();
          changes = [];
          resolve();
        }
      }
    });
  };
  me.refreshRecord = async function() {
    let request = {}, rec, fields, records, json;
    rec = await getRecordNode(me.activeRecord);
    if (rec) {
      request.Command = "RefreshRecord";
      request.First = me.activeRecord;
      request.Count = 1;
      if (keyFieldName) {
        request.RecordKey = await me.getFieldText(keyFieldName);
      }
      json = await handleRequest2(request);
      if (json && json.RecordSet) {
        fields = json.RecordSet.Attributes;
        if (fields) {
          records = json.RecordSet.Records[0];
          loadRecordValues(rec, records, fields);
          points.set(me.activeRecord, rec);
        }
      }
    }
  };
  me.cancelRecord = function(needToChangeActive) {
    const promise = new Promise(async (resolve) => {
      if (editRec) {
        if (editRec.insert) {
          if (editRec.active !== void 0 && needToChangeActive !== false) me.activeRecord = editRec.active;
          me.recordCount--;
          if (needToChangeActive !== false) me.moveBy(0);
        }
        editRec = null;
      }
      me.modified = false;
      resolve();
    });
    return promise;
  };
  me.isEditMode = function() {
    let state2 = me.getState();
    return state2 === dsEdit || state2 === dsInsert;
  };
  me.isEditModeState = function() {
    let state2 = me.getState();
    return state2;
  };
  me.getState = function() {
    if (me.active) {
      if (editRec) {
        if (editRec.insert) return dsInsert;
        else return dsEdit;
      }
      return dsBrowse;
    }
    return dsInactive;
  };
  me.getFieldModified = function(fieldName) {
    return changes.indexOf(fieldName) !== -1;
  };
  me.setFieldModified = function(fieldName, value) {
    let index2 = changes.indexOf(fieldName);
    if (index2 === -1) {
      if (value) changes.push(fieldName);
    } else if (!value) changes.splice(index2, 1);
  };
  me.getUpdateStatus = async function(index2) {
    return getRecordNode(index2).then((rec) => {
      if (rec && rec.info && rec.info.updateStatus) {
        return rec.info.updateStatus;
      }
      return usUnmodified;
    });
  };
  return me;
}
function createScrollbar(view, scrollView, event) {
  this.view = view;
  const containerForScrollElements = '<div id="scrollArrows" class="lazy-scroll-arrows">';
  const scrollHtml = `
      <button class="lazy-scroll-arrow-up">&#9650;</button>
      <div class="lazy-scroll"></div>
      <button class="lazy-scroll-arrow-down">&#9660;</button>
    `;
  view.insertAdjacentHTML("beforeend", containerForScrollElements);
  const scrollContainer = view.querySelector(".lazy-scroll-arrows");
  scrollContainer.insertAdjacentHTML("beforeend", scrollHtml);
  var barContainer = view.lastChild;
  var bar = barContainer.childNodes[3];
  bar.style.zIndex = 2;
  var lastPageY, scrollTop = 0, maxScroll = 0, timeOut;
  const upArrow = barContainer.childNodes[1];
  const downArrow = barContainer.childNodes[5];
  let scrollInterval = null;
  let isScrolling = false;
  let scrollDirection = 0;
  let isMouseDown = false;
  function startSmoothScroll(direction2) {
    if (isScrolling && scrollDirection === direction2) return;
    stopSmoothScroll();
    scrollDirection = direction2;
    isScrolling = true;
    scrollView(scrollDirection, false);
    var drawing = false;
    scrollInterval = setInterval(() => {
      if (!drawing) {
        drawing = true;
        scrollView(scrollDirection, false).then(() => {
          drawing = false;
        });
      }
    }, 100);
  }
  function stopSmoothScroll() {
    if (scrollInterval) {
      clearInterval(scrollInterval);
      scrollInterval = null;
    }
    isScrolling = false;
    scrollDirection = 0;
  }
  function handleMouseDown(direction2, e2) {
    if (!isMouseDown) {
      e2.preventDefault();
      e2.stopPropagation();
      isMouseDown = true;
      startSmoothScroll(direction2);
    }
  }
  function handleMouseUp() {
    if (isMouseDown) {
      isMouseDown = false;
      stopSmoothScroll();
    }
  }
  upArrow.addEventListener("mousedown", (e2) => handleMouseDown(-1, e2));
  downArrow.addEventListener("mousedown", (e2) => handleMouseDown(1, e2));
  upArrow.addEventListener("mouseleave", () => {
    if (isMouseDown) handleMouseUp();
  });
  upArrow.addEventListener("mouseup", () => {
    if (isMouseDown) handleMouseUp();
  });
  downArrow.addEventListener("mouseleave", () => {
    if (isMouseDown) handleMouseUp();
  });
  downArrow.addEventListener("mouseup", () => {
    if (isMouseDown) handleMouseUp();
  });
  appendEvent(
    "mousedown",
    function(e2) {
      lastPageY = e2.pageY;
      appendEvent("mousemove", drag);
      appendEvent("mouseup", stop);
      return false;
    },
    bar
  );
  function drag(e2) {
    {
      scrollTop += e2.pageY - lastPageY;
      lastPageY = e2.pageY;
      scrollTop = midint(0, maxScroll, scrollTop);
      bar.style.top = scrollTop + "px";
      if (event) {
        clearTimeout(timeOut);
        timeOut = setTimeout(() => {
          queuedGridScroll.scrollGrid(scrollTop / maxScroll, event);
        }, 300);
      }
    }
  }
  function stop() {
    deleteEvent("mousemove", drag);
    deleteEvent("mouseup", stop);
  }
  this.updateBar = function(visibleRows, recordCount, scrollPos) {
    var scrollRatio = visibleRows / recordCount;
    if (scrollRatio < 1) {
      var top2, barSize, totalSize = this.view.getBoundingClientRect().height, right2 = (this.view.clientWidth - bar.clientWidth - 50) * -1, height2 = Math.max(scrollRatio * 100, 5);
      barSize = totalSize / 100 * height2;
      maxScroll = totalSize - barSize - 45;
      if (scrollPos != void 0) {
        scrollTop = maxScroll / (recordCount - visibleRows) * scrollPos;
        top2 = scrollTop + "px";
      } else top2 = bar.style.top;
      if (!top2) {
        top2 = "0px";
      }
      bar.style.cssText = "height:" + height2 + "%; top: " + top2 + ";right:" + right2 + "px";
      showElement(bar);
      showElement(upArrow);
      showElement(downArrow);
    } else {
      hideElement(bar);
      hideElement(upArrow);
      hideElement(downArrow);
    }
  };
  return this;
}
var mfInsert = 0, mfEdit = 1, mfDelete = 2;
function createGrid(panel) {
  var REGION_GROUP = "group", REGION_TITLE = "title", REGION_DATUM = "datum", ROLE_COLUMN = "column", ROLE_COLDATA = "col-data", ROLE_CHECKBOX = "check-box", ROLE_COLLAPSE = "collapse", ROLE_GROUP = "group", ROLE_FILTER = "filter", ROLE_MARKED = "marked", ROLE_COLLAPSE_GROUP = "collapsegroup", ROLE_FILTER = "filter", GRID_BACKGROUND = "var(--indicatorColor)", indicatod_image_onlyView = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAABVSURBVChThdG7DcAgEATRs0sgd0j/BTkkpwWbOQnEZ7EnAKF9GcdTso9OjnxFf6gc0A41QAoNgGa0AOqRBFTRFoR0+y1BHWkB/UgDmEdqQI308xdmL4bnGEE5vnElAAAAAElFTkSuQmCC", INDICATOR_IMAGE_BROWSE = (
    // плюс
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAzSURBVChTY2AgEvwnpA6kAK8imAKcipAVYFWErgBDETYFKIpINgHD10T7Amd4EQxJnDoBZO8j3Xd97XYAAAAASUVORK5CYII="
  ), INDICATOR_IMAGE_EDITING = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAgSURBVChTY2AgEvwHqgNhGEDnE5YgqHOEKCA6JDFiBgCPRhnnsmWU1gAAAABJRU5ErkJggg==", INDICATOR_IMAGE_INSERTED = (
    //синий плюс
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAsSURBVChTY2CgMvj/n4EBhHEC8hTAdOGiwXbiwyjuIc8NyEYQNIHKwQo2DgAiSzfJCmFmxgAAAABJRU5ErkJggg=="
  ), INDICATOR_IMAGE_MODIFIED = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA3SURBVChTY2AgHvz/z8AAw1h10VgBsvEY7sAmCRKDA3TH4fQJTBeKbnT/IktiVYjXFIIBhT1SAGnISbdGg+UeAAAAAElFTkSuQmCC", INDICATOR_IMAGE_NEW = (
    // звезда
    "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAYAAAA1WQxeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAA5SURBVBhXY/wPBAx4ABNMjpGREa4MhY1sAkwC2VBGkAJkHci2gRSCFaBbg2wCihtAEmBdyO4h5AsAEQoi/Ix3kjkAAAAASUVORK5CYII="
  ), INDICATOR_IMAGE_UPDATED = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAANCAYAAACUwi84AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA3SURBVChTY2AgBth7nPmPVx1IAV5FMAU4FSErwKoIXQGGImwKUBSRbAKGl4n2Bc7AIhiS+IIZABZaU4nPjT65AAAAAElFTkSuQmCC";
  var titleSize = 24, rowHeight = 24, indicatorSize = 42, groupSize = 0, groups = [], showIndicator = true, filterSize = 0, visibleRows = 0, firstRecord = 0, overflowColumns = false, rightOverflow = false, leftRightMover = null, columnOffset = 0, currentRow = 0, currentCol = 0, childColumnSize = 24, isJustMouseDown = false, viewInfo = { horizontal: false, saveSource: null, saveColumns: null }, selectedField = void 0, editor = null, inputEditor = null, indicator = null, imageFields = [], multiSelect = [], gridItemClassName = "grid-item-outline-selected", sortedFileds = "", fixedColumn = null, constOptions = {
    filter: 1,
    groupBy: 2,
    showIndicator: 4
  }, filterData = {};
  var me = this, sizeMarker, dragZone, handleColumnField;
  me.columns = { title: [] };
  me.OnlyViewMode = false;
  me.BkClrField = void 0;
  me.ColorField = void 0;
  me.StyleField = void 0;
  me.doccfgid = void 0;
  me.gridState = "";
  me.defaultColumns = false;
  me.MultiCLsSelect = null;
  me.ClsSelection = {};
  const updateGridSelectedClass = () => {
    const { gridSelectedRecordColor } = getOptionsForUser();
    gridItemClassName = gridSelectedRecordColor ? "grid-item-outline-selected-bg" : "grid-item-outline-selected";
    if (viewInfo.horizontal) gridItemClassName = "grid-card-selected";
  };
  me.setSource = function(source, clearMultiSelect) {
    if (me.source != source) {
      if (me.defaultColumns) me.columns = {};
    }
    me.source = source;
    me.setSourceLoad = true;
    const promise = new Promise(async (resolve) => {
      if (source.active === false) await source.open();
      if (source) {
        if (me.source && me.defaultColumns) {
          me.columns.fields = [];
          me.columns.levels = [];
          me.columns.title = [];
          var i, f2, c, fields = me.source.fields;
          for (i = 0; i < fields.length; i++) {
            c = {};
            f2 = fields[i];
            c.fieldName = f2.fieldName;
            c.title = f2.displayLabel;
            c.width = f2.displayWidth * 11;
            c.level = 0;
            me.columns.title.push(c);
          }
          prepareLevels();
        }
        if (clearMultiSelect !== false) multiSelect = [];
        currentRow = me.source.activeRecord;
        prepareLevels();
        Zaglushka();
        buildColumns();
        BuildGroupsContent();
        await queuedGridScroll.scrollGrid(void 0, buildRecords);
        me.setSourceLoad = false;
      }
      resolve();
    });
    return promise;
  };
  me.canGroup = function(field) {
    var _a2, _b;
    return (_b = (_a2 = field.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.group;
  };
  me.canSort = function(field) {
    var _a2, _b;
    return (_b = (_a2 = field.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.sort;
  };
  me.canModify = function(flag, column2, me2) {
    return me2.localCanModify(flag, column2, me2);
  };
  me.setFilterData = function(data) {
    filterData = data;
    saveState();
  };
  me.getFilterData = function() {
    return filterData;
  };
  me.changeIndicator = changeIndicator;
  me.localCanModify = function(flag, column2, me2) {
    if (me2.OnlyViewMode) return false;
    switch (flag) {
      case mfInsert:
        return me2.getActiveSource().rights.insert;
      case mfEdit:
        return me2.getActiveSource().rights.modify;
      case mfDelete:
        return me2.getActiveSource().rights.delete;
    }
    return false;
  };
  me.insertRecord = async function(down, info, subData) {
    let source = me.getActiveSource();
    if (source && source.active && source.getState() != dsInsert && await me.canModify(mfInsert, void 0, me)) {
      await source.insertRecord(down, info, subData);
      await updateRecordTable();
      await scrollToRecord(source.activeRecord);
      await changeIndicator(dsInsert);
      me.CommitToSaveChanges && me.CommitToSaveChanges(me);
      if (viewInfo.horizontal) updateCard();
    }
  };
  me.appendRecord = async function() {
    let source = me.getActiveSource();
    if (source && source.active && source.getState() != dsInsert && await me.canModify(mfInsert, void 0, me)) {
      await source.appendRecord();
      await me.postExicstedEditRec();
      await updateRecordTable();
    }
  };
  me.postRecord = async function(index2) {
    if (sourceActive()) {
      await setColumnText(editor.column, editor.content);
      if (editor.objref) await setColumnValue(editor.column, editor.objref);
      await me.source.postRecord(index2);
      let source = this.getActiveSource();
      if (source !== me.source && source.isEditMode()) {
        await source.postRecord();
      }
      await updateRecordTable(true);
      scrollToRecord(me.source.activeRecord);
    }
  };
  me.cancelRecord = async function(needToChangeActive) {
    async function cancelSource(source) {
      let b2 = source && source.active && source.isEditMode();
      if (b2) await source.cancelRecord(needToChangeActive);
    }
    await cancelSource(me.source);
    if (viewInfo.horizontal) await cancelSource(viewInfo.saveSource);
    await scrollToRecord(me.source.activeRecord);
    await updateRecordTable(true);
    if (me.editorMode()) {
      await hideEditor();
    }
    me.CommitToSaveChanges && await me.CommitToSaveChanges(false);
    await changeIndicator(dsBrowse);
  };
  me.editorMode = function() {
    if (editor) return editor.visible;
  };
  me.switchFilter = null;
  me.getActiveSource = function() {
    if (viewInfo.horizontal) return viewInfo.saveSource;
    return me.source;
  };
  me.applyColumnFilter = async (filter2) => {
    const data = getFilterContent(filter2);
    await me.source.applyFieldFilter(data);
    await updateRecordTable();
    saveState();
    await scrollToRecord(me.source.activeRecord);
    me.onMultiSelectChange && me.onMultiSelectChange(me);
  };
  me.clearAllFilters = async () => {
    var _a2, _b;
    me == null ? void 0 : me.setFilterData({});
    await (me == null ? void 0 : me.applyColumnFilter({}));
    if (((_b = (_a2 = me.filter) == null ? void 0 : _a2.style) == null ? void 0 : _b.display) === "grid") {
      ShowFilter();
    }
    await (me == null ? void 0 : me.refreshSource("!"));
  };
  me.getCurrentFieldName = function() {
    var _a2;
    const td = panel.querySelector(".grid-item-focused");
    return ((_a2 = td == null ? void 0 : td.field) == null ? void 0 : _a2.fieldName) || "";
  };
  const getFilterContent = (data) => {
    const res = {};
    Object.entries(data).forEach(([key, value]) => {
      if (!value["$tag"] && !isEmptyObject(value)) {
        res[`$${key}`] = value;
      } else res[key] = value;
    });
    return res;
  };
  function sourceActive() {
    return me.source != void 0 && me.source != null && me.source.active;
  }
  function getPointRegion(x, y2) {
    function checkElement(el) {
      var r2 = el.getBoundingClientRect();
      if (x >= r2.left && x <= r2.right && y2 >= r2.top && y2 <= r2.bottom) {
        return true;
      } else return false;
    }
    if (checkElement(me.header)) {
      return REGION_TITLE;
    }
    if (checkElement(me.table)) {
      return REGION_DATUM;
    }
    if (checkElement(me.groups)) {
      return REGION_GROUP;
    }
  }
  function sizeColumn(e2) {
    var x = e2.x - panel.getBoundingClientRect().x;
    if (x > handleColumnField.offset && x < panel.clientWidth) {
      sizeMarker.style.left = x + "px";
      handleColumnField.eventSize = x;
    }
  }
  function ajustColumnWidth(f2) {
    if (f2) {
      let maxLengStr = 0, row, valueCol, colWidth;
      for (let i = 0; i < visibleRows; i++) {
        row = getRowElement(i);
        let arr = row.getElementsByClassName("grid-td");
        for (let j = 0; j < arr.length; j++) {
          if (arr[j].field.fieldName == f2.fieldName) {
            valueCol = arr[j].firstChild.innerHTML;
            break;
          }
        }
        let textcol = document.createElement("span");
        textcol.className = "grid-cell-inner";
        textcol.innerHTML = valueCol;
        document.body.appendChild(textcol);
        colWidth = textcol.offsetWidth;
        if (colWidth > maxLengStr) {
          maxLengStr = colWidth;
        }
        document.body.removeChild(textcol);
      }
      f2.width = maxLengStr + 5;
      updateColumns();
      sizeMarker.style.opacity = 0;
    }
  }
  function getFieldAtPoint(x, y2, info) {
    function checkColumn(level, colLeft, colTop, width2, height2) {
      if (level.items && level.expanded) {
        width2.value = 0;
        height2 = childColumnSize;
        for (let i = 0, l, f2, field, left22 = colLeft, w; i < level.items.length; i++) {
          l = level.items[i];
          f2 = l.field;
          w = { value: f2.width };
          field = checkColumn(l, left22, colTop + childColumnSize, w, childColumnSize);
          {
            if (field) return field;
            left22 += w.value;
            width2.value += w.value;
          }
        }
      }
      if (intInRange(x, colLeft, colLeft + width2.value) && intInRange(y2, colTop, colTop + height2)) {
        return level.field;
      }
      return null;
    }
    var r2 = getPointRegion(x, y2);
    if (info) info.region = r2;
    switch (r2) {
      case REGION_TITLE: {
        let r22 = me.header.getBoundingClientRect(), leftModal = 0, topModal = 0;
        const isModalWindow = me.panel.closest(".smart-window");
        if (isModalWindow && isModalWindow.style) {
          leftModal = Number(isModalWindow.style.left.replace("px", ""));
          topModal = Number(isModalWindow.style.top.replace("px", ""));
        }
        for (let levels = me.header.children, i = 1, left22 = r22.left - leftModal, top22 = r22.top - topModal, width2, level, field; i < levels.length; i++) {
          level = levels[i].level;
          width2 = { value: level.field.width };
          field = checkColumn(levels[i].level, left22, top22, width2, titleSize);
          {
            if (field) return field;
            left22 += width2.value;
          }
        }
        return me.columns.stubField;
      }
      case REGION_GROUP: {
        var rect = me.groups.getBoundingClientRect(), left2 = rect.left, top2 = rect.top, bottom2 = rect.bottom;
        for (let i = 0, el; i < me.groups.childElementCount; i++) {
          el = me.groups.children[i];
          rect = el.getBoundingClientRect();
          if (intInRange(x, rect.left, rect.right)) {
            if (info) {
              info.left = rect.left;
              info.top = rect.top;
              info.bottom = rect.bottom;
            }
            return el.field;
          }
          left2 = rect.right;
          top2 = rect.top;
          bottom2 = rect.bottom;
        }
        if (info) {
          info.left = left2;
          info.top = top2;
          info.bottom = bottom2;
        }
        return null;
      }
    }
    return null;
  }
  function getFieldColumnRect(field) {
    var rect = me.header.getBoundingClientRect();
    return {
      left: field.offset + rect.left,
      top: rect.top + field.top,
      right: field.offset + field.width,
      bottom: rect.bottom
    };
  }
  function moveColumn(e2) {
    if (!isJustMouseDown) {
      isJustMouseDown = true;
      return;
    }
    if (!dragZone) {
      dragZone = document.createElement("div");
      dragZone.classList.add("grid-column");
      dragZone.classList.add("grid-drag-zone");
      dragZone.style.pointerEvents = "none";
      panel.appendChild(dragZone);
      dragZone.moveTop = document.createElement("div");
      dragZone.moveTop.className = "col-move-top";
      dragZone.moveTop.style.display = "none";
      panel.appendChild(dragZone.moveTop);
      dragZone.moveBottom = document.createElement("div");
      dragZone.moveBottom.className = "col-move-bottom";
      dragZone.moveBottom.style.display = "none";
      panel.appendChild(dragZone.moveBottom);
    }
    if (!dragZone.initRect) {
      if (handleColumnField.groupEl) dragZone.initRect = handleColumnField.groupEl.getBoundingClientRect();
      else dragZone.initRect = handleColumnField.el.getBoundingClientRect();
      dragZone.deltaX = e2.x - dragZone.initRect.left;
      dragZone.deltaY = e2.y - dragZone.initRect.top;
      dragZone.style.display = "";
      dragZone.style.height = dragZone.initRect.height + "px";
      dragZone.style.width = dragZone.initRect.width + "px";
      dragZone.style.left = dragZone.initRect.left + "px";
      dragZone.style.top = dragZone.initRect.top + "px";
      dragZone.style.width = dragZone.initRect.width + "px";
      dragZone.style.height = dragZone.initRect.height + "px";
      dragZone.textContent = handleColumnField.title;
      dragZone.style.display = "";
    }
    var x = e2.x - dragZone.deltaX, y2 = e2.y - dragZone.deltaY;
    dragZone.style.left = x + "px";
    dragZone.style.top = y2 + "px";
    var info = {}, field = getFieldAtPoint(x + 5, y2 + 5, info);
    if (info.region == REGION_GROUP && me.canGroup(handleColumnField)) {
      dragZone.moveTop.style.left = info.left - 5 + "px";
      dragZone.moveTop.style.top = info.top - dragZone.moveTop.getBoundingClientRect().height + "px";
      dragZone.moveBottom.style.left = info.left - 5 + "px";
      dragZone.moveBottom.style.top = info.bottom + "px";
      showElement(dragZone.moveTop);
      showElement(dragZone.moveBottom);
      dragZone.field = field;
      dragZone.isGroup = true;
      return;
    }
    if (field != null && (field != handleColumnField || field.groupEl) && field.parent == handleColumnField.parent) {
      let rect = getFieldColumnRect(field);
      dragZone.moveTop.style.left = rect.left + "px";
      dragZone.moveTop.style.top = rect.top - dragZone.moveTop.getBoundingClientRect().height + "px";
      dragZone.moveBottom.style.left = rect.left + "px";
      dragZone.moveBottom.style.top = rect.bottom + "px";
      showElement(dragZone.moveTop);
      showElement(dragZone.moveBottom);
      dragZone.field = field;
      dragZone.isGroup = false;
    } else {
      hideElement(dragZone.moveTop);
      hideElement(dragZone.moveBottom);
      dragZone.field = null;
    }
  }
  async function updateColumns() {
    buildColumns();
    await queuedGridScroll.scrollGrid(void 0, buildRecords);
    updateScrollBar();
    updateFilters();
    Zaglushka();
    if (me.editorMode()) {
      await showEditor();
    }
  }
  function updateScrollBar() {
    if (me.source) {
      me.scrollBar.updateBar(visibleRows, me.source.recordCount, firstRecord);
    } else {
      me.scrollBar.updateBar(0, 0, 0);
    }
  }
  async function getRecordState() {
    if (sourceActive()) {
      return await me.source.getRecordState();
    }
    return 0;
  }
  async function getLevelOffset() {
    if (!viewInfo.horizontal && /* me.getActiveSource().CreateCollapsibleRecords === null && */
    sourceActive()) {
      return await me.getActiveSource().getRecordLevel() * 15;
    }
    return 0;
  }
  async function isGroupRecord(checkView) {
    if (groups.length > 0) {
      if (checkView && viewInfo.horizontal) {
        return false;
      }
      if ((await getRecordState() & STATUS_GROUPED) != 0) {
        return true;
      }
    }
    return false;
  }
  async function getRecordCollapsed() {
    if ((await getRecordState() & STATUS_COLLAPSED) != 0) return true;
    else return false;
  }
  async function setRecordCollapsed(collapse) {
    if (sourceActive()) {
      await me.source.collapseGroup(collapse);
      await queuedGridScroll.scrollGrid(void 0, buildRecords);
      updateScrollBar();
    }
  }
  function updateActive() {
    if (sourceActive()) {
      let newRow = me.source.activeRecord - firstRecord;
      if (currentRow != newRow) {
        currentRow = newRow;
        hideEditor();
      }
    }
  }
  async function getGroupString() {
    if (sourceActive()) {
      return await me.source.getRecordTitle();
    } else return "";
  }
  async function updateCurrentView(load) {
    await drawRecords(load);
    await me.getActiveSource().updateCurrentMarkedValues();
    updateScrollBar();
  }
  async function updateRecordTable(load) {
    return new Promise(async (resolve) => {
      if (viewInfo.horizontal) me.source.refresh("!");
      await queuedGridScroll.scrollGrid(load, buildRecords);
      updateScrollBar();
      resolve();
    });
  }
  async function updateAllGrid(queued) {
    return new Promise(async (resolve) => {
      updateGridSizeForCardMode();
      buildColumns();
      queued === false ? await buildRecords() : await queuedGridScroll.scrollGrid(void 0, buildRecords);
      updateScrollBar();
      if (me.editorMode()) {
        await showEditor();
      }
      resolve();
    });
  }
  function createIndicator(id) {
    let el = document.createElement("img");
    el.className = "strelka";
    el.id = id;
    el.style.width = "9px";
    el.style.height = "12px";
    el.style.position = "absolute";
    el.style.zIndex = "1";
    el.style.top = "5px";
    el.style.right = "4px";
    if (!showIndicator) el.style.display = "none";
    return el;
  }
  async function changeIndicator(state) {
    if (showIndicator) {
      switch (state) {
        case dsBrowse:
          if (sourceActive() && await me.source.getUpdateStatus(me.source.activeRecord) > 0) {
            console.log("updated");
            indicator.setAttribute("src", INDICATOR_IMAGE_UPDATED);
          } else indicator.setAttribute("src", me.OnlyViewMode ? indicatod_image_onlyView : INDICATOR_IMAGE_BROWSE);
          break;
        case dsEdit:
          console.log("dsEdit");
          if (viewInfo.horizontal) {
            console.log(panel.querySelector(".titleText"));
          }
          indicator.setAttribute("src", INDICATOR_IMAGE_EDITING);
          break;
        case dsInsert:
          console.log("dsInsert");
          indicator.setAttribute("src", INDICATOR_IMAGE_NEW);
          break;
      }
      indicator.state = state;
    }
  }
  function CheckDrawInfo(fieldName, td, tr, i) {
    if (viewInfo.horizontal && i === 0) return;
    const recordInfo = me.getActiveSource().getRecordInfo();
    if (recordInfo && recordInfo.Data$content) {
      const indexOfField = me.getActiveSource().getFieldIndex(fieldName);
      const locking = recordInfo.Data$content;
      const lockingStatus = locking[indexOfField];
      const cellInner = td.getElementsByClassName("grid-cell-inner")[0];
      switch (lockingStatus) {
        case "1": {
          if (td) {
            td.classList.add("grid-td-locking");
            if (cellInner.innerText === "" && !td.getElementsByClassName("grid-cell-img")) {
              cellInner.innerText = "X";
            }
          }
          break;
        }
        case "2": {
          break;
        }
        default: {
          cellInner.style.textAlign = "";
          break;
        }
      }
    }
  }
  async function createRecordColumns(tr, isCurrentRow, margin2) {
    var td;
    td = document.createElement("td");
    td.marginBlock = true;
    td.style.width = isNaN(margin2) ? 0 : margin2 + "px";
    td.style.backgroundColor = GRID_BACKGROUND;
    tr.appendChild(td);
    const promise = new Promise(async (resolve) => {
      for (let i = 0, items = me.columns.fields, div, col, width2; i < items.length; i++) {
        col = items[i];
        td = document.createElement("td");
        td.className = "grid-td";
        td.col = i + columnOffset;
        td.field = col;
        if (!viewInfo.horizontal) {
          if (isCurrentRow && (selectedField === col.fieldName || currentCol === i + columnOffset && selectedField === void 0)) {
            td.classList.add("grid-item-focused");
          }
        }
        if (col.fixed === true) {
          td.classList.add("fixed-col");
        }
        width2 = col.el.clientWidth + 1;
        if (i == 0) width2 -= margin2;
        td.style.width = width2 + "px";
        td.role = ROLE_COLDATA;
        div = document.createElement("div");
        div.className = "grid-cell-inner";
        me.setUnderlineCell && me.setUnderlineCell(col, div);
        div.innerText = await me.source.getFieldText(col.fieldName);
        div.innerText = div.innerText === "undefined" ? "" : div.innerText;
        if (me.source.CreateCollapsibleRecords !== null && (col.fieldName === "CODE" || col.collapseRecord || viewInfo.horizontal)) {
          await me.source.CreateCollapsibleRecords(div, me, i, td);
        }
        const recValue = await me.getActiveSource().getFieldValue(viewInfo.horizontal ? td.levelsField.field.fieldName : col.fieldName);
        if (recValue) {
          div.recid = recValue;
        }
        renderByFiledInfo(col, td, div, recValue);
        td.appendChild(div);
        CheckDrawInfo(viewInfo.horizontal ? td.levelsField.field.fieldName : col.fieldName, td, tr, i);
        tr.appendChild(td);
      }
      tr.isGroup = false;
      resolve();
    });
    return promise;
  }
  const createSquareColor = (td, colorField) => {
    let checkContainer = td.querySelector(".grid-square-color");
    if (!checkContainer) {
      checkContainer = document.createElement("div");
      checkContainer.style.position = "absolute";
      checkContainer.className = "grid-square-color";
      td.appendChild(checkContainer);
    }
    me.getActiveSource().getFieldText(colorField).then((color2) => {
      checkContainer.style.backgroundColor = setColor(color2);
    });
  };
  const createDesignField = (td, designFieldName) => {
    me.getActiveSource().getFieldValue(designFieldName).then((color2) => {
      td.style.backgroundColor = setColor(color2);
    });
  };
  function renderByFiledInfo(col, td, div, recValue) {
    var _a2, _b, _c, _d, _e;
    let column2;
    if (viewInfo.horizontal && td.levelsField && td.levelsField.field) {
      column2 = td.levelsField.field;
    } else {
      column2 = col;
    }
    if (column2.fieldInfo && viewInfo.horizontal && col.fieldName !== "Title" || !viewInfo.horizontal) {
      if (column2.fieldInfo) {
        if (!viewInfo.horizontal && column2.fieldInfo.textAjust === "1") {
          td.style.textAlign = "center";
        }
        if (column2.fieldInfo.EditStyle & 4) {
          let checkboxState;
          if (column2.fieldInfo.checkField) {
            checkboxState = me.getActiveSource().getFieldValueSync(column2.fieldInfo.checkField);
          } else {
            checkboxState = recValue ? recValue : "0";
          }
          if (me.MultiCLsSelect) {
            if (me.ClsSelection[me.getActiveSource().getFieldValueSync(me.getActiveSource().getKeyFieldName())] !== void 0) {
              checkboxState = "1";
            } else checkboxState = "0";
          }
          const oldContainer = td.querySelector(`div[role="check-box"]`);
          if (oldContainer) {
            const checkbox = oldContainer.querySelector("#checkbox-multicheck");
            if (checkbox && checkbox.update)
              checkbox.update({
                MultiCheckSet: column2.fieldInfo.multiCheckSet,
                CheckState: checkboxState
              });
          } else {
            const checkContainer = document.createElement("div");
            checkContainer.role = ROLE_CHECKBOX;
            checkContainer.recordIndex = me.getActiveSource().activeRecord;
            checkContainer.checked = checkboxState;
            checkContainer.style.position = "absolute";
            let modifyFlag = mfEdit;
            if (me.getActiveSource().recordCount === 0) {
              modifyFlag = mfInsert;
            }
            reactDomExports.flushSync(() => {
              clientExports.createRoot(checkContainer).render(
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  CheckBoxMultiCheck,
                  {
                    MultiCheckSet: column2.fieldInfo.multiCheckSet,
                    customDefaultIcons: column2.fieldInfo.customDefaultIcons,
                    CheckState: checkboxState,
                    canModify: () => {
                      if (me.MultiCLsSelect && modifyFlag === mfEdit) return true;
                      return me.canModify(modifyFlag, column2, me);
                    },
                    onEdit: (data) => {
                      onCheck(data, checkContainer);
                    }
                  }
                )
              );
            });
            div.style.marginLeft = "19px";
            td.style.textAlign = "";
            td.appendChild(checkContainer);
          }
        }
        if (column2.fieldInfo.type === "Image" && !viewInfo.horizontal) {
          const domImg = td.getElementsByTagName("img");
          if (domImg.length > 0) {
            domImg[0].remove();
          }
          const img = createImgByIndex(div.innerText);
          img.className = "grid-cell-img";
          div.innerText = "";
          div.innerHTML = "";
          td.appendChild(img);
        }
        if (column2.fieldInfo.squareColorField) {
          div.style.marginLeft = "19px";
          createSquareColor(td, column2.fieldInfo.squareColorField);
        }
        if (column2.fieldInfo.design) {
          createDesignField(td, column2.fieldInfo.design);
        }
        if (column2.fieldInfo.backColor) td.style.backgroundColor = column2.fieldInfo.backColor;
      }
      if ((_a2 = column2.fieldInfo) == null ? void 0 : _a2.options) {
        if (((_c = (_b = column2.fieldInfo) == null ? void 0 : _b.options) == null ? void 0 : _c.link) && div.innerText !== "") {
          div.style.cursor = "pointer";
        }
        if ((_e = (_d = column2.fieldInfo) == null ? void 0 : _d.options) == null ? void 0 : _e.redNegative) {
          const text = div.innerText;
          if (Math.sign(text.replaceAll(" ", "").replace(",", ".")) === -1) {
            td.style.color = "red";
          } else {
            td.style.color = "";
          }
        }
      }
    }
    if (viewInfo.horizontal & col.fieldName === "Title" && column2 && column2.marked !== void 0) {
      const markedButton = createRoundButton(td.levelsField.field);
      markedButton.style.bottom = "";
      markedButton.style.left = "";
      markedButton.style.width = "4px";
      markedButton.style.height = "4px";
      markedButton.style.margin = "8.5px 0px 0px 1px";
      td.appendChild(markedButton);
    }
  }
  async function onCheck(data, checkContainer) {
    let oldRecordCount = me.getActiveSource().recordCount;
    const checkbox = checkContainer;
    checkbox.checked = data.CheckState;
    let el = checkContainer.parentElement;
    let newCol = el.col, newRow = el.parentElement.row;
    if (oldRecordCount === 0 && await canModifyViewInfo(mfInsert, viewInfo.horizontal ? el.levelsField.field : el.field, me)) {
      await me.getActiveSource().appendRecord();
    }
    if (newCol !== currentCol || currentRow !== newRow) await moveColRow(newCol, newRow);
    if (me.MultiCLsSelect) {
      const value = me.getActiveSource().getFieldValueSync(me.getActiveSource().getKeyFieldName());
      const prefixValue = "";
      if (checkbox.checked) {
        me.ClsSelection[value] = `${prefixValue}${value}`;
      } else {
        delete me.ClsSelection[value];
      }
      return;
    }
    if (await canModifyViewInfo(mfEdit, viewInfo.horizontal ? el.levelsField.field : el.field, me)) {
      if (viewInfo.horizontal && multiSelect.length > 0) {
        const source = me.getActiveSource(), saveacrivrecord = source.activeRecord;
        for (const value of Object.values(multiSelect)) {
          source.activeRecord = Number(value);
          await postRecordForCheckBox();
        }
        source.activeRecord = saveacrivrecord;
      } else {
        await postRecordForCheckBox();
      }
      async function postRecordForCheckBox() {
        let fieldName = viewInfo.horizontal ? el.levelsField.field : el.field;
        fieldName = fieldName.fieldInfo && fieldName.fieldInfo.checkField ? fieldName.fieldInfo.checkField : fieldName.fieldName;
        await me.postSomeData(fieldName, {
          id: checkbox.checked && checkbox.checked !== "0" ? checkbox.checked : "",
          text: ""
        });
        await me.getActiveSource().postRecord();
      }
      await UpdateOrBuild(oldRecordCount);
    }
    if (me.source.getState() != dsInsert) await changeIndicator(dsBrowse);
  }
  async function UpdateOrBuild(oldRecordCount, load) {
    if (viewInfo.horizontal) {
      await me.getActiveSource().getFieldText("ID");
      await updateCard(true);
    } else {
      if (oldRecordCount !== me.getActiveSource().recordCount) {
        await updateRecordTable(load !== void 0 ? load : true);
      } else await updateCurrentView();
    }
  }
  function createGroupRecord(tr, isCurrentRow, margin2) {
    const promise = new Promise(async (resolve) => {
      var td, width2 = -1, tmp;
      td = document.createElement("td");
      td.style.width = margin2 + "px";
      td.style.backgroundColor = GRID_BACKGROUND;
      tr.appendChild(td);
      for (let i = 0, items = me.columns.fields, col; i < items.length; i++) {
        col = items[i];
        width2 += col.width;
      }
      width2 -= margin2;
      td = document.createElement("td");
      td.className = "grid-td";
      if (isCurrentRow) {
        td.classList.add("grid-item-focused");
      } else {
        td.classList.remove("grid-item-focused");
      }
      td.style.width = width2 + "px";
      td.role = ROLE_COLDATA;
      tmp = document.createElement("img");
      tmp.src = "data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
      tmp.classList.add("collapse-img");
      tmp.style.marginTop = "4px";
      if (await getRecordCollapsed()) tmp.classList.add("collapse-plus");
      else tmp.classList.add("collapse-minus");
      tmp.style.width = "20px";
      tmp.role = ROLE_COLLAPSE_GROUP;
      td.appendChild(tmp);
      tmp = document.createElement("span");
      tmp.style.width = "100%";
      tmp.textContent = await getGroupString();
      td.appendChild(tmp);
      tr.appendChild(td);
      tr.isGroup = true;
      resolve();
    });
    return promise;
  }
  async function drawRecords(load = true) {
    async function drawRow(r2) {
      const promise = new Promise(async (resolve) => {
        var _a2;
        if (viewInfo.horizontal && r2 === 0 && fixedColumn !== null) {
          me.source.activeRecord = 0 + r2;
        } else {
          me.source.activeRecord = firstRecord + r2;
        }
        var el = getRowElement(r2), isCurrentRow = currentRow === r2, isGroup, margin2;
        deleteStyleByField(el);
        await createStyleByField(el, isGroup);
        if (multiSelect.includes(`${me.source.activeRecord}`)) {
          createMultiRow(el);
        } else {
          deleteStyleInRow(el);
        }
        if (el) el.recordIndex = me.source.activeRecord;
        me.changeGridStyles && await me.changeGridStyles(el, me);
        if (showIndicator && el) {
          let addInd = function(img) {
            let ind = createIndicator("state");
            par.appendChild(ind);
            ind.setAttribute("src", img);
          };
          let par = el.getElementsByTagName("tr")[0].firstChild;
          while (par.childElementCount > 0) par.removeChild(par.lastChild);
          switch (await me.source.getUpdateStatus(me.source.activeRecord)) {
            case usInserted:
              addInd(INDICATOR_IMAGE_INSERTED);
              break;
            case usModified:
              addInd(INDICATOR_IMAGE_MODIFIED);
              break;
          }
          if ((imageFields.length > 0 || me.onGetImageIndex) && !viewInfo.horizontal) {
            await CreateImageFields(par);
          }
          if (isCurrentRow) {
            placeIndicator(par);
          }
        }
        if (el) el = el.getElementsByTagName("tr")[0];
        isGroup = (await getRecordState() & STATUS_GROUPED) != 0 && groups.length > 0;
        margin2 = await getLevelOffset();
        if (isCurrentRow) el.parentElement.parentElement.classList.add(gridItemClassName);
        else el.parentElement.parentElement.classList.remove(gridItemClassName);
        if (isGroup || isGroup != el.isGroup || me.source.CreateCollapsibleRecords !== null) {
          while (el.childElementCount > 1) {
            el.removeChild(el.lastChild);
          }
          if (isGroup) {
            await createGroupRecord(el, isCurrentRow, margin2);
          } else {
            await createRecordColumns(el, isCurrentRow, margin2);
          }
          el.isGroup = isGroup;
        } else {
          if (isGroup) {
            let cl = el.children[2];
            cl.textContent = getGroupString();
            el.style.backgroundColor = "";
          } else {
            for (let i2 = 0, cl, col, width2 = 0; i2 < el.childElementCount; i2++) {
              cl = el.children[i2];
              if (cl.field) {
                col = cl.col;
                width2 = cl.field.clientWidth;
                if (i2 == 2) width2 -= margin2;
                cl.style.width = width2 + "px";
                const recValue = await me.source.getFieldValue(
                  viewInfo.horizontal ? (_a2 = cl == null ? void 0 : cl.levelsField) == null ? void 0 : _a2.field : cl.field.fieldName
                );
                cl.getElementsByClassName("grid-cell-inner")[0].textContent = await me.source.getFieldText(
                  cl.field.fieldName
                );
                if (cl.children.length === 2 && cl.firstChild.type === "checkbox") {
                  cl.firstChild.checked = recValue === "1" ? true : false;
                }
                if (recValue) {
                  cl.getElementsByClassName("grid-cell-inner")[0].recid = recValue;
                } else {
                  delete cl.getElementsByClassName("grid-cell-inner")[0].recid;
                }
                renderByFiledInfo(cl.field, cl, cl.getElementsByClassName("grid-cell-inner")[0], recValue);
                CheckDrawInfo(cl.field.fieldName, cl);
                cl.classList.remove("grid-item-focused");
                if (col == currentCol) {
                  if (isCurrentRow) {
                    if (!viewInfo.horizontal) cl.classList.add("grid-item-focused");
                    else el.classList.add(gridItemClassName);
                    selectedField = cl.field.fieldName;
                  }
                }
              } else if (cl.marginBlock) {
                cl.style.width = isNaN(margin2) ? 0 : margin2 + "px";
              }
            }
          }
        }
        resolve();
      });
      return promise;
    }
    const saveActiveRecord = me.source.activeRecord;
    await me.source.acquireRecords(firstRecord, visibleRows, load);
    for (var i = 0; i < visibleRows; i++) {
      await drawRow(i);
    }
    me.source.activeRecord = saveActiveRecord;
  }
  async function buildRecords(load) {
    const promise = new Promise(async (resolve) => {
      var _a2;
      const oldRecords = [...me.data.children];
      if (!me.source) return resolve();
      me.table.style.top = groupSize + filterSize + titleSize + "px";
      updateGridSelectedClass();
      const saveActiveRecord = me.source.activeRecord;
      let indicatorForCard;
      visibleRows = moddiv(me.data.clientHeight, rowHeight);
      if (visibleRows > me.source.recordCount) {
        visibleRows = me.source.recordCount;
      }
      if (viewInfo.horizontal) {
        const title = panel.querySelector(".TitleForHorizontal");
        if (title) {
          let imageBlock = title.children[0], titleText = title.children[1];
          if (!imageBlock) imageBlock = document.createElement("div");
          else imageBlock.innerHTML = "";
          imageBlock.className = "imgCardMode";
          await CreateImageFields(imageBlock);
          if (!titleText) {
            indicatorForCard = createIndicator("indicatorForCard");
            titleText = document.createElement("div");
          } else {
            indicatorForCard = titleText.children[0];
          }
          titleText.innerText = me.getActiveSource().getRecordInfo().title;
          titleText.innerText = titleText.innerText === "undefined" ? "" : titleText.innerText;
          titleText.style.height = "100%";
          titleText.style.display = "grid";
          titleText.style.alignItems = "center";
          titleText.style.marginRight = "16px";
          if (!indicatorForCard) indicatorForCard = createIndicator("indicatorForCard");
          indicatorForCard.src = "";
          titleText.appendChild(indicatorForCard);
          title.appendChild(imageBlock);
          title.appendChild(titleText);
        }
      }
      async function createRecord(r2) {
        if (viewInfo.horizontal && r2 === 0 && fixedColumn !== null) {
          me.source.activeRecord = 0 + r2;
        } else {
          me.source.activeRecord = firstRecord + r2;
        }
        if (me.needToRender && await me.needToRender(me)) {
          return;
        }
        const promise2 = new Promise(async (resolve2) => {
          var _a3;
          const table = document.createElement("table"), tbody = document.createElement("tbody"), tr = document.createElement("tr"), isCurrentRow = currentRow === r2;
          tr.row = r2;
          if (showIndicator) {
            const td = document.createElement("td");
            td.className = "grid-indicator";
            td.style.width = indicatorSize + "px";
            tr.appendChild(td);
          }
          const isGroup = (await getRecordState() & STATUS_GROUPED) != 0;
          if (isGroup && groups.length > 0) {
            await createGroupRecord(tr, isCurrentRow, await getLevelOffset());
          } else {
            await createRecordColumns(tr, isCurrentRow, await getLevelOffset());
            await createStyleByField(table);
          }
          table.classList.add("grid-item");
          table.recordIndex = me.source.activeRecord;
          if (isCurrentRow) table.classList.add(gridItemClassName);
          if (r2 % 2 != 0) {
            table.classList.add("grid-item-alt");
          }
          if (multiSelect.includes(`${me.source.activeRecord}`)) {
            createMultiRow(table);
          }
          table.style.width = "0pt";
          table.cellSpacing = "0";
          table.cellPadding = "0";
          tr.style.height = rowHeight + "px";
          tr.style.maxHeight = rowHeight + "px";
          tr.className = "grid-row";
          function addInd(img) {
            const parent = tr.firstChild;
            if (parent) {
              let ind = createIndicator("state");
              if (viewInfo.horizontal) ind = indicatorForCard;
              else parent.appendChild(ind);
              ind.setAttribute("src", img);
            }
          }
          switch (await me.getActiveSource().getUpdateStatus(me.getActiveSource().activeRecord)) {
            case usInserted:
              addInd(INDICATOR_IMAGE_INSERTED);
              break;
            case usModified:
              addInd(INDICATOR_IMAGE_MODIFIED);
              break;
          }
          if (isCurrentRow) placeIndicator(tr);
          if ((imageFields.length > 0 || me.onGetImageIndex) && !viewInfo.horizontal) {
            await CreateImageFields(tr.firstChild);
          }
          tbody.appendChild(tr);
          table.appendChild(tbody);
          await ((_a3 = me.changeGridStyles) == null ? void 0 : _a3.call(me, table, me));
          me.data.appendChild(table);
          resolve2();
        });
        return promise2;
      }
      if (me.source.recordCount < firstRecord) firstRecord = 0;
      if (getLastRecord() >= me.source.recordCount) {
        firstRecord -= getLastRecord() - (me.source.recordCount - 1);
      }
      if (me.source.recordCount === 0) {
        await createRecord(0);
        const emptyRow = getRowElement(0).firstChild.firstChild;
        if (emptyRow.classList.contains("grid-row")) {
          emptyRow.empty = true;
        }
      } else {
        await me.source.acquireRecords(firstRecord, visibleRows, load);
        (_a2 = me.onRecordCountChange) == null ? void 0 : _a2.call(me, me);
        for (let i = 0; i < visibleRows; i++) {
          await createRecord(i);
        }
      }
      for (const child of oldRecords) {
        me.data.removeChild(child);
      }
      me.source.activeRecord = saveActiveRecord;
      createResizers();
      resolve();
    });
    return promise;
  }
  function getFixedCol() {
    if (fixedColumn !== null) {
      if (!viewInfo.horizontal) {
        if (me.columns.title && me.columns.title[0].fieldName !== fixedColumn.fieldName && fixedColumn.level === 0) {
          let items = me.columns.title, i, j, item = fixedColumn;
          i = items.indexOf(item);
          if (i != -1) {
            j = 0;
            if (j != -1) {
              items.splice(i, 1);
              items.splice(j, 0, item);
            }
          }
          prepareLevels();
        }
      }
    }
  }
  async function createStyleByField(table, isGroup) {
    if (table) {
      if (me.BkClrField && !isGroup) {
        table.style.backgroundColor = setColor(Number(await me.source.getFieldText(me.BkClrField)));
      } else {
        table.style.backgroundColor = "";
      }
      if (me.ColorField && !isGroup) {
        table.style.color = setColor(Number(await me.source.getFieldText(me.ColorField)));
      } else {
        table.style.color = "";
      }
      if (me.StyleField && !isGroup) {
        const style2 = Number(await me.source.getFieldText(me.StyleField));
        table.style.fontWeight = style2 & 1 ? "bold" : "";
        table.style.fontStyle = style2 & 2 ? "italic" : "";
        table.style.textDecoration = style2 & 4 ? "underline" : style2 & 8 ? "line-through" : "";
      } else {
        table.style.fontWeight = "";
        table.style.fontStyle = "";
        table.style.textDecoration = "";
      }
      const recordData = await me.getActiveSource().getRecordData();
      if (recordData.info.hidden) {
        table.style.textDecoration = "line-through";
      }
    }
  }
  function deleteStyleByField(tr) {
    if (tr) {
      tr.style.backgroundColor = "";
      tr.style.color = "";
      tr.style.fontWeight = "";
      tr.style.fontStyle = "";
      tr.style.textDecoration = "";
    }
  }
  async function CreateImageFields(el) {
    const promise = new Promise(async (resolve) => {
      if (el && el.firstChild && el.firstChild.id === "ImageFields") {
        el.firstChild.remove();
      }
      let imageArr = [];
      let imageIndexesFromFields = imageFields;
      const imageIndexesFromEvent = me.onGetImageIndex && await me.onGetImageIndex(me);
      if (imageFields.length > 0) {
        imageIndexesFromFields = await Promise.all(
          imageFields.map(async (imageField) => {
            let imageIndex = me.getActiveSource().booksGetImage !== void 0 ? await me.getActiveSource().booksGetImage(await me.getActiveSource().getFieldText(imageField), imageField) : await me.getActiveSource().getFieldText(imageField);
            if (imageField === "Status") imageIndex = await me.getActiveSource().getFieldValue(imageField);
            if (Number(imageIndex) > 1) {
              imageIndex = parseInt(imageIndex);
              if (isNaN(imageIndex)) {
                imageIndex = parseInt(await me.getActiveSource().getFieldValue(imageField));
              }
              return imageIndex;
            }
          })
        );
      }
      imageArr = imageArr.concat(imageIndexesFromFields, imageIndexesFromEvent);
      if (viewInfo.horizontal) console.log("imageFields");
      let arrOfDOMImages = document.createElement("div");
      arrOfDOMImages.classList.add("grid-image-fields");
      arrOfDOMImages.id = "ImageFields";
      arrOfDOMImages.onmouseover = async function(e2) {
        const imgF = e2.target;
        if (imgF.imgIndex && imgF.doccfgid && imgF.docid && (imgF.title === "" || imgF.title === void 0)) {
          const img = e2.target;
          const titl = await getImageHint$1(imgF.doccfgid, imgF.imgIndex, imgF.docid);
          if (titl !== void 0 && !isEmptyObject(titl)) img.title = titl;
          else img.title = null;
        }
      };
      for (const img of imageArr) {
        let imgIndex = img;
        if (imgIndex) {
          imgIndex = parseInt(imgIndex);
          if (isNaN(imgIndex)) {
            imgIndex = parseInt(await me.source.getFieldValue(img));
          }
          const imgF = document.createElement("img");
          imgF.style.width = "16px";
          imgF.style.height = "16px";
          const icon = await getIconsAsync(imgIndex);
          if (icon !== void 0 && icon !== null & imgIndex !== 0) {
            imgF.src = ImgURLSRC(icon);
            imgF.imgIndex = imgIndex;
            imgF.docid = await me.getActiveSource().getFieldText("ID");
            imgF.doccfgid = await me.getActiveSource().getFieldText("DocCfgID");
            arrOfDOMImages.appendChild(imgF);
          }
        }
      }
      el.appendChild(arrOfDOMImages);
      resolve();
    });
    return promise;
  }
  function placeIndicator(tr) {
    if (tr && showIndicator) {
      let oldPar = indicator.parent, newPar = tr.firstChild;
      if (viewInfo.horizontal && tr.className === "grid-indicator") newPar = tr;
      if (newPar) {
        indicator.parent = null;
        if (oldPar && oldPar.childElementCount > 0 && oldPar.firstChild.style.display !== "flex") {
          oldPar.firstChild.style.display = "";
        }
        if (newPar.childElementCount > 0 && newPar.id !== "ImageFields" && newPar.firstChild.id !== "ImageFields") {
          newPar.firstChild.style.display = "none";
        }
        newPar.appendChild(indicator);
        indicator.parent = newPar;
        let updated = sourceActive() && me.source.getUpdateStatus(me.source.activeRecord) > 0;
        if (indicator.updated !== updated) {
          indicator.updated = updated;
          if (updated) {
            indicator.setAttribute("src", INDICATOR_IMAGE_UPDATED);
          } else indicator.setAttribute("src", me.OnlyViewMode ? indicatod_image_onlyView : INDICATOR_IMAGE_BROWSE);
        }
      }
    }
  }
  async function applyFilter(filtered) {
    if (sourceActive()) {
      var filter2 = {};
      const currentfilters = {};
      for (const [key, value] of Object.entries(filterData)) {
        if (value.filtered) {
          currentfilters[key] = value.value;
        }
      }
      if (filtered) {
        for (let i = 0, el, f2, t2; i < me.filter.childElementCount; i++) {
          el = me.filter.children[i];
          f2 = el.field;
          if (f2 && el.value) {
            if (currentfilters[f2.fieldName]) {
              const filterBttn = f2.el.querySelector(`#filter-bttn_${f2.fieldName}`);
              if (filterBttn) filterBttn.clearFilter();
              delete filterData[f2.fieldName];
              delete currentfilters[f2.fieldName];
            }
            t2 = {};
            Object.defineProperty(t2, el.value, {
              value: null,
              configurable: true,
              writable: true,
              enumerable: true
            });
            t2.$tag = 1;
            Object.defineProperty(filter2, f2.fieldName, {
              value: t2,
              configurable: true,
              writable: true,
              enumerable: true
            });
          }
        }
        filterData.rowFilter = filter2;
      }
      const result = getFilterContent(currentfilters);
      saveState();
      await me.source.applyFieldFilter({ ...filter2, ...result });
      await updateRecordTable();
      scrollToRecord(me.source.activeRecord);
      me.onMultiSelectChange && me.onMultiSelectChange(me);
    }
  }
  function buildFilters() {
    if (filterSize == 0) return;
    var el = me.filter;
    me.filter.getBoundingClientRect().top;
    while (el.childElementCount > 0) {
      let ch = el.lastChild;
      if (ch.field) {
        ch.field.filterText = ch.value;
      }
      el.removeChild(ch);
    }
    const applyButton = document.createElement("button");
    applyButton.style.position = "relative";
    applyButton.style.top = "1px";
    applyButton.style.left = "2px";
    applyButton.style.width = `calc(${indicatorSize}px - 5px)`;
    applyButton.style.height = "20px";
    applyButton.filtered = filterData.rowFilterFiltered ? true : false;
    applyButton.innerText = filterData.rowFilterFiltered ? "Вкл" : "Выкл";
    applyButton.onclick = (ev) => {
      if (ev.target.filtered) {
        ev.target.innerText = "Выкл";
      } else {
        ev.target.innerText = "Вкл";
      }
      ev.target.filtered = !ev.target.filtered;
      filterData.rowFilterFiltered = ev.target.filtered;
      saveState();
      applyFilter(ev.target.filtered);
    };
    me.filter.appendChild(applyButton);
    for (let i = 0, fields = me.columns.fields, f2; i < fields.length; i++) {
      f2 = fields[i];
      if (filterData.rowFilter && filterData.rowFilter[f2.fieldName]) {
        f2.filterText = Object.keys(filterData.rowFilter[f2.fieldName])[0];
      } else f2.filterText = "";
      el = document.createElement("input");
      el.style.position = "absolute";
      el.style.top = "1px";
      el.style.left = f2.offset + "px";
      el.style.width = f2.elementWidth - 4 + "px";
      el.style.height = filterSize - 6 + "px";
      el.field = f2;
      el.classList.add("grid-filter");
      el.role = ROLE_FILTER;
      if (f2.filterText) {
        el.value = f2.filterText;
      }
      el.onkeydown = function(e2) {
        if (e2.key == "Enter") {
          if (!applyButton.filtered) {
            applyButton.innerText = "Вкл";
            applyButton.filtered = true;
          }
          filterData.rowFilterFiltered = applyButton.filtered;
          saveState();
          applyFilter(applyButton.filtered);
        }
      };
      el.onblur = () => {
        if (applyButton.filtered) applyFilter(true);
      };
      me.filter.appendChild(el);
    }
    me.switchFilter = function(enabled) {
      if (enabled) {
        applyButton.innerText = "Вкл";
        applyButton.filtered = true;
        filterData.rowFilterFiltered = applyButton.filtered;
        saveState();
        applyFilter(applyButton.filtered);
      } else {
        applyButton.innerText = "Выкл";
        applyButton.filtered = false;
        filterData.rowFilterFiltered = applyButton.filtered;
        saveState();
        applyFilter(applyButton.filtered);
      }
    };
  }
  function updateFilters() {
    if (filterSize == 0) return;
    for (let i = 0, el, f2; i < me.filter.childElementCount; i++) {
      el = me.filter.children[i];
      f2 = el.field;
      if (f2) {
        el.style.left = f2.offset + "px";
        el.style.width = f2.elementWidth - 4 + "px";
        el.setAttribute("tabindex", me.columns.fields.indexOf(f2) + 1);
      }
    }
  }
  function getRowElement(r2) {
    return me.data.children[r2];
  }
  function getColElement(c, r2) {
    var rEl = getRowElement(r2);
    const colIndex = c - columnOffset;
    if (rEl) {
      rEl = rEl.getElementsByTagName("tr");
      if (rEl) {
        rEl = rEl[0];
        if (showIndicator) {
          return rEl.children[colIndex + 2];
        } else return rEl.children[colIndex + 1];
      }
    }
    return null;
  }
  const getDemandParams = async (fieldInfo) => {
    if (fieldInfo && fieldInfo.columnID && fieldInfo.demandParams) {
      const keyFieldNameID = me.getActiveSource().getKeyFieldNameData();
      const newParams = await getColumnParams(fieldInfo.columnID, keyFieldNameID, me.doccfgid);
      return { module: newParams.Module, datatype: newParams.ObjType, type: newParams.Module };
    } else return {};
  };
  async function setColumnText(column2, text) {
    await me.getActiveSource().setFieldText(column2.fieldName, text, column2.index);
  }
  async function setColumnValue(column2, id) {
    await me.getActiveSource().setFieldValue(column2.fieldName, id, column2.index);
  }
  function ClickAway(ev) {
    if (ev.target.closest("[checklist]") || ev.target.closest("[calendar]") || ev.target.closest("[details]") || ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") !== inputEditor.closest(".background_ModalDialog") || ev.target.closest("UL") && ev.target.closest("UL").role !== "menu" || ev.target.classList.contains("CloseButtonForGrid") || ev.target.classList.contains("ApplyButtonForGrid") || ev.target.tagName === "BODY" || ev.target.closest("[loadmask]") || viewInfo.horizontal && ev.target.closest("TR") && ev.target.closest("TR").querySelector("[componenteditor]")) {
      if (ev.target.closest("[details]") || ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") !== inputEditor.closest(".background_ModalDialog") && inputEditor) {
        return;
      }
      inputEditor.focus();
      inputEditor.select();
      return;
    }
    if (editor.parentElement && !editor.parentElement.contains(ev.target)) {
      hideEditor();
      deleteEvent("click", ClickAway);
    }
  }
  async function SetObjectText(editData) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", editData.type);
    params2.set("comand", "SetObjectText");
    params2.set("Flag", "-1");
    params2.set("ObjType", editData.datatype ? editData.datatype : "0");
    params2.set("ObjRef", editData.addInfo.Cell.recid ? editData.addInfo.Cell.recid : editData.tag ? editData.tag : "0");
    params2.set("Text", editData.value === "__.__.____" ? "" : editData.value);
    return AxiosRequest(true, params2);
  }
  function GetColumnStyle(ID2) {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "documents");
    params2.set("comand", "GetColumnStyle");
    params2.set("SectionID", me.sectionid);
    params2.set("ID", ID2);
    params2.set("DocID", me.source.getFieldTextSync("ID"));
    params2.set("MasterID", me.source.Master.MasterID ? me.source.Master.MasterID : "0");
    params2.set("DocCfgID", me.doccfgid);
    params2.set("WSM", "1");
    return AxiosRequest(true, params2);
  }
  async function renderEditor(data, editorDiv, addCommands) {
    var _a2, _b, _c, _d;
    appendEvent("click", ClickAway);
    const fieldIndex = me.getActiveSource().getFieldIndex(data.field.fieldName);
    const fieldData = me.getActiveSource().fields[fieldIndex];
    let editStyle = Number(data.field.fieldInfo.EditStyle), dataType = data.field.fieldInfo.DataType, module2 = data.field.fieldInfo.Module, field = data.field.fieldName, list = ((_a2 = data.field.fieldInfo.Values) == null ? void 0 : _a2.length) > 0 ? "" : (_b = fieldData.list) == null ? void 0 : _b.join("\r\n"), listValues = data.field.fieldInfo.Values, details = data.field.fieldInfo.details, accDetails = data.field.fieldInfo.accDetails, detailsByReq = data.field.fieldInfo.detailsByReq, buttonImage = data.field.fieldInfo.buttonImage, editMask = data.field.fieldInfo.editMask, onEditProgId = data.field.fieldInfo.onEdit, onList = data.field.fieldInfo.onList, onListCustom = data.field.fieldInfo.onListCustom, onCloseUpList = data.field.fieldInfo.onCloseUpList, onGetEditStyle = data.field.fieldInfo.onGetEditStyle, path = data.field.fieldInfo.Path, fieldName = data.field.fieldInfo.FieldName, columnID = data.field.fieldInfo.columnID, onEditButtonClick = data.field.fieldInfo.onEditButtonClick, onDropDownList = data.field.fieldInfo.onDropDownList, hardCodeReadOnlyForEditor = data.field.fieldInfo.hardCodeReadOnlyForEditor, onDropDown = data.field.fieldInfo.onDropDown, tagField = data.field.fieldInfo.tagField, getCustomDefaultTag = data.field.fieldInfo.getCustomDefaultTag, title = data.field.title, detailsData, customDefaultTag;
    if (data.field.fieldInfo && data.field.fieldInfo.columnID && data.field.fieldInfo.demandParams) {
      const newParams = await getDemandParams(data.field.fieldInfo);
      dataType = newParams.datatype;
      module2 = newParams.module || newParams.type;
    }
    if (tagField) {
      customDefaultTag = await me.getActiveSource().getFieldValue(tagField);
      customDefaultTag = getCustomDefaultTag(customDefaultTag);
    }
    if (!onDropDownList) {
      onDropDownList = async (data2) => {
        let json;
        const params2 = /* @__PURE__ */ new Map();
        if (data2.onlist) {
          params2.set("prefix", "documents").set("comand", "GetColumnValues").set("ID", columnID).set("SectionID", me.sectionid).set("DocCfgID", me.doccfgid).set(
            "DocID",
            me.getActiveSource().getFieldTextSync("ID") ? me.getActiveSource().getFieldTextSync("ID") : "0"
          ).set("MasterID", me.getActiveSource().Master.MasterID ? me.getActiveSource().Master.MasterID : "0").set("WSM", "1");
          json = await AxiosRequest(true, params2);
        } else if (onDropDown) {
          params2.set("prefix", "programs").set("comand", "GetParamValues").set("ProgID", onDropDown).set("WSM", "1");
          json = await AxiosRequest(true, params2);
        } else {
          params2.set("prefix", data2.module).set("comand", "GetObjectValues").set("ObjType", data2.datatype);
          json = await AxiosRequest(true, params2);
        }
        if (json && json.Items) {
          return json.Items.map((item, index2) => {
            if (typeof item === "object") {
              return { label: item.text, id: item.id };
            }
            return { label: item, id: index2 };
          });
        }
      };
    }
    editStyle += ((_d = (_c = data.field.fieldInfo) == null ? void 0 : _c.options) == null ? void 0 : _d.readOnly) && !(editStyle & 64) ? 64 : 0;
    if (onGetEditStyle) {
      let columnStyle = await GetColumnStyle(columnID);
      editStyle = columnStyle.EditStyle ? Number(columnStyle.EditStyle) : 0;
      if (columnStyle.Token) {
        tokenProcessingTest(columnStyle);
      }
    }
    let parentID = await me.getActiveSource().getFieldText("ID");
    if (details !== "" && details !== void 0) {
      editStyle += !(editStyle & 64) ? 64 : 0;
      detailsData = await GetColumnDetails(details, parentID, path, fieldName, module2);
    } else if (accDetails) {
      editStyle += !(editStyle & 64) ? 64 : 0;
      const subData = await GetColumnDetails(void 0, parentID, path, fieldName, "accounts");
      if (subData && subData.Items) {
        detailsData = {
          JSONType: subData.Items.JSONType,
          Items: subData.Items.items
        };
      }
    } else if (detailsByReq) {
      detailsData = await detailsByReq({ ID: parentID });
    }
    editStyle -= editStyle & 4 ? 4 : 0;
    if (data.cell.style.marginLeft) {
      editorDiv.style.marginLeft = data.cell.style.marginLeft;
    }
    reactDomExports.flushSync(() => {
      clientExports.createRoot(editorDiv).render(
        // редактор
        // название свойства === название ключа(это необязательно, но нужно для удобства)
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Editor,
          {
            documentGrid: me.doccfgid !== void 0,
            placeholder: "",
            placeholderVisible: "1",
            HardCodeReadOnlyForEditor: hardCodeReadOnlyForEditor,
            editor: editorDiv,
            grid: true,
            editStyle: isNaN(editStyle) ? data.field.fieldInfo.EditStyle : editStyle,
            editMask,
            value: data.value,
            datatype: dataType,
            objref: data.cell.recid || customDefaultTag,
            type: module2,
            list,
            listValues,
            onlist: onList,
            onListCustom,
            doubleClickOnInput: true,
            settings: { onEdit: onEditProgId },
            buttonImage,
            title,
            openAfterRender: addCommands == null ? void 0 : addCommands.renderCommand,
            docProps: {
              ID: columnID,
              DocCfgID: me.doccfgid,
              SectionID: me.sectionid,
              DocID: me.getActiveSource().getFieldTextSync("ID"),
              MasterID: me.getActiveSource().Master.MasterID ? me.getActiveSource().Master.MasterID : "0",
              Reference: "0"
            },
            details: (details || accDetails || detailsByReq) && !isEmptyObject(detailsData) ? {
              Details: details,
              AccDetails: accDetails,
              DetailsByReq: detailsByReq,
              OnEdit: detailsData.OnEdit,
              OnEditCustom: detailsData.OnEditCustom,
              OnList: detailsData.OnList,
              OnListCustom: detailsData.OnListCustom,
              OnCloseUpList: detailsData.OnCloseUpList,
              OnCloseUpListCustom: detailsData.OnCloseUpListCustom,
              ID: parentID,
              OnGetEditStyle: onGetEditStyle,
              GetDetails: detailsData,
              getText: data.getText,
              updateRecord: data.updateRecord,
              Path: path,
              FieldName: fieldName,
              Module: module2,
              HardCodeReadOnlyForEditor: hardCodeReadOnlyForEditor
            } : void 0,
            clickAway: (ev, edit, value) => {
              if (ev.target.closest(".background_ModalDialog") && ev.target.closest(".background_ModalDialog") === inputEditor.closest(".background_ModalDialog") || ev.target.closest(".CloseButtonForGrid")) {
                return;
              }
              if (editor.ready) {
                edit(void 0, value);
              }
            },
            onChange: async (val, ChangeData) => {
              editor.stepValue = val;
              if (data.value !== val) {
                if (!editorDiv.InputChange && ChangeData.valueChanged.current === true) {
                  editorDiv.InputChange = true;
                  me.CommitToSaveChanges && me.CommitToSaveChanges(me);
                  me.getActiveSource().modified = true;
                }
                if (me.getActiveSource().getState() != dsInsert) await changeIndicator(dsEdit);
              }
            },
            onEditList: onCloseUpList && typeof onCloseUpList === "string" && me.doccfgid ? async (data2) => {
              const params2 = /* @__PURE__ */ new Map();
              params2.set("prefix", "documents").set("comand", "CloseUpList").set("ID", columnID).set("SectionID", me.sectionid).set("DocCfgID", me.doccfgid).set(
                "DocID",
                me.getActiveSource().getFieldTextSync("ID") ? me.getActiveSource().getFieldTextSync("ID") : "0"
              ).set("MasterID", me.getActiveSource().Master.MasterID ? me.getActiveSource().Master.MasterID : "0").set("Text", data2.value ? data2.value : "").set("ObjRef", data2.tag ? data2.tag : "0").set("WSM", "1");
              const json = await AxiosRequest(true, params2);
              if (data2.setValue) {
                data2.setValue({ label: data2.value, id: data2.tag });
              }
              if (data2.setInputValue) {
                data2.setInputValue(data2.value);
              }
              tokenProcessingTest(json, {
                from: "grid",
                func: () => {
                  if (me.getActiveSource().Master.refreshRecord) {
                    me.getActiveSource().Master.refreshRecord(true);
                  } else {
                    me.refreshSource("!");
                  }
                }
              });
            } : typeof onCloseUpList === "function" && onCloseUpList,
            onDropDownList,
            addInfo: {
              FieldName: field,
              Field: data.field,
              Cell: data.cell,
              Index: data.index,
              ModalButtonCallBack: () => {
                if (me.getActiveSource().Master.refreshRecord) {
                  me.getActiveSource().Master.refreshRecord(true);
                } else {
                  me.refreshSource("!");
                }
              },
              onEditButtonClick
            },
            onEdit,
            onEditButtonClick: (editButtonData) => {
              tokenProcessingTest(editButtonData.json, editButtonData.subData);
            }
          }
        )
      );
    });
  }
  const checkDataTypeOnStringType = (dataType) => {
    if (dataType >= 7 && dataType <= 12) return true;
    return false;
  };
  const customResumeReq = async (requestId, data) => {
    const params2 = {
      RequestID: requestId,
      WSM: "1"
    };
    const config2 = {
      prefix: "project",
      method: "POST",
      url: "ResumeRequest",
      params: params2,
      data
    };
    return smetaAxios(config2);
  };
  async function onEdit(data) {
    var _a2, _b, _c;
    let editData = data;
    editor.stepValue = void 0;
    if (data.noEdit) return;
    const {
      requestId,
      addInfo: { needPost, checkObjRefBeforePost }
    } = editData;
    const oldRecordCount = me.getActiveSource().recordCount;
    const addInfo = editData.addInfo;
    const field = addInfo.Field;
    const cell = addInfo.Cell;
    if (checkDataTypeOnStringType(editData.datatype)) {
      editData = { ...editData, tag: void 0 };
    }
    if (((_c = (_b = (_a2 = editData.addInfo) == null ? void 0 : _a2.Field) == null ? void 0 : _b.fieldInfo) == null ? void 0 : _c.EditStyle) & 2 && editData.tag && !editData.forse) {
      const year2 = Number(getDateOfInt(editData.tag).split(".")[2]), currentYear = (/* @__PURE__ */ new Date()).getFullYear();
      if (year2 < currentYear - 99 || year2 > currentYear + 99) {
        checkDateBeforeEdit(editData);
        return;
      }
    }
    if (field && field.fieldInfo && field.fieldInfo.onEditField) {
      me.onEditField && me.onEditField(editData);
      return;
    }
    if (requestId) {
      if (needPost) {
        if (checkObjRefBeforePost) {
          const newObjRef = await customResumeReq(requestId, { Result: "1", ObjRef: editData.tag });
          if (newObjRef.Token) {
            addInfo.checkObjRefBeforePost = false;
            tokenProcessingTest(newObjRef, {
              func: (res2) => {
                console.log(res2);
                onEdit({ ...editData, requestId: void 0, tag: res2 == null ? void 0 : res2.Value });
              }
            });
            return;
          }
          if (newObjRef == null ? void 0 : newObjRef.Value) {
            await onEdit({ ...editData, requestId: void 0, tag: newObjRef == null ? void 0 : newObjRef.Value });
            const res2 = await resumeRequest(requestId);
            if (res2.Token) tokenProcessingTest(res2);
            return;
          }
        }
        await onEdit({ ...editData, requestId: void 0 });
        const res = await resumeRequest(requestId);
        if (res.Token) tokenProcessingTest(res);
      } else await onEditWithRequestId(editData, field, requestId);
      return;
    }
    if (cell.closest("TR").empty === true && !(editData.requestId && field.fieldInfo.onEdit)) {
      await me.getActiveSource().appendRecord();
    }
    const response = await getResponseObject(editData);
    if (!response) return;
    setFieldValues(editData, response);
    await postEditData(editData, response);
    await finalizeEdit(editData, oldRecordCount);
  }
  const checkDateBeforeEdit = (editData) => {
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        MessageBox,
        {
          DlgType: 3,
          Buttons: 12,
          Message: `Вы действительно уверены что правильно выбран год: ${year} ?`,
          onSelect: (e2) => {
            e2.target.value === "6" && onEdit({ ...editData, forse: true }) || hideEditor();
          }
        }
      ),
      {
        style: getStyleWindow("MessageBox"),
        hiddenButton: true,
        blockMaximize: true,
        blockSaveLocation: true,
        blockResize: true,
        Title: "Предупреждение",
        onClose: () => {
          hideEditor();
        }
      }
    );
  };
  const onEditWithRequestId = async (editData, field, requestId) => {
    var _a2;
    const { addInfo, tag } = editData;
    const params2 = /* @__PURE__ */ new Map([
      ["prefix", "project"],
      ["comand", "ResumeRequest"],
      ["RequestID", requestId],
      ["WSM", "1"]
    ]);
    if (((_a2 = field.OptionsDisable) == null ? void 0 : _a2.link) && addInfo.editButtonClick) {
      await onEdit({ ...editData, requestId: void 0 });
      const json2 = await AxiosRequest(true, params2);
      tokenProcessingTest(json2);
      return;
    }
    const json = await AxiosRequest(true, params2, {
      Result: "1",
      DocID: tag,
      ObjRef: tag
    });
    tokenProcessingTest(json, {
      from: "grid",
      func: () => {
        var _a3, _b;
        if (me.getActiveSource().Master.refreshRecord) {
          me.getActiveSource().Master.refreshRecord(true);
          (_a3 = me.CommitToSaveChanges) == null ? void 0 : _a3.call(me, false);
        } else {
          me.refreshSource("!");
          (_b = me.CommitToSaveChanges) == null ? void 0 : _b.call(me, false);
        }
      }
    });
  };
  const getResponseObject = async (editData) => {
    const { type: type2, value, proof, addInfo, tag, checkvalue } = editData;
    if (type2 && (value || tag) && proof) {
      let currentTag = tag;
      if (proof) {
        const json = await SetObjectText(editData);
        if (json.Selection && json.Selection.length) {
          if (json.Selection.length === 1) {
            editData.onEdit({ ...editData, proof: false, tag: json.Selection[0].id, value: json.Selection[0].text });
          } else openModalSelection(editData, json);
          return;
        }
        if (json.CreateNew) {
          openModalCreateNew(editData, json);
          return;
        }
        currentTag = json.ObjRef;
      }
      if (currentTag === "-1") {
        return;
      }
      const response = await me.getActiveSource().CheckFieldText(addInfo.FieldName, currentTag);
      if (!response.Text) response.Text = value;
      return response;
    }
    return {
      EditVal: value,
      ObjRef: tag,
      Text: value === null ? checkvalue : value
    };
  };
  const openModalSelection = (editData, json) => {
    editor.selection = true;
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogSetObjText,
        {
          list: json.Selection,
          onEdit: editData.onEdit,
          data: editData
        }
      ),
      {
        Title: "Выберите элемент из списка",
        style: getStyleWindow(),
        hiddenButton: true,
        blockMaximize: true
      }
    );
  };
  const openModalCreateNew = (editData, json) => {
    editor.selection = true;
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogCreateObj,
        {
          onEdit: editData.onEdit,
          inputNameObj: json.CreateNew.Text,
          spanText: json.CreateNew.Label,
          CLSID: json.CreateNew.CLSID,
          ObjType: editData.datatype,
          Module: editData.type,
          groups: json.CreateNew.Groups,
          data: editData
        }
      ),
      {
        Title: "Создать новый объект",
        style: getStyleWindow(`${json.CreateNew.CLSID}${json.CreateNew.Groups ? "Group" : ""}`),
        hiddenButton: true,
        blockMaximize: true,
        blockSaveLocation: true
      }
    );
  };
  const setFieldValues = (editData, response) => {
    const { setValue, setInputValue, fixVal, addInfo } = editData;
    if (setValue) {
      setValue({
        label: fixVal ? fixVal(response.EditVal) : response.EditVal,
        id: response.ObjRef
      });
    }
    if (setInputValue) {
      setInputValue(fixVal ? fixVal(response.EditVal) : response.EditVal);
    }
    inputEditor.modified = true;
    editor.content = response.Text;
    editor.objref = response.ObjRef;
    addInfo.Cell.text = response.Text;
    addInfo.Cell.editval = response.EditVal;
    addInfo.Cell.recid = response.ObjRef;
    if (editor.column === null) {
      addInfo.Cell.innerText = response.Text;
    }
  };
  const postEditData = async (editData, response) => {
    if (await me.getActiveSource().getState() == dsInsert) {
      hideEditor();
    }
    if (viewInfo.horizontal && multiSelect.length > 0) {
      const source = me.getActiveSource();
      const saveActiveRecord = source.activeRecord;
      for (const value of Object.values(multiSelect)) {
        source.activeRecord = Number(value);
        await postSomeDataEditor(editData, response);
      }
      source.activeRecord = saveActiveRecord;
    } else {
      await postSomeDataEditor(editData, response);
    }
  };
  const finalizeEdit = async (editData, oldRecordCount) => {
    me.CommitToSaveChanges && me.CommitToSaveChanges(false);
    if (await me.getActiveSource().getState() != dsInsert) {
      await changeIndicator(dsBrowse);
    }
    if (viewInfo.horizontal) {
      await me.getActiveSource().getFieldText("ID");
      await updateCard(true);
    } else {
      await UpdateOrBuild(oldRecordCount, false);
      if (editData.addInfo.Field.sortDirect) hideEditor();
      await scrollToRecord(me.getActiveSource().activeRecord);
    }
    editor.stepValue = void 0;
    if (oldRecordCount !== me.getActiveSource().recordCount && editor.visible) {
      await showEditor();
    } else if (inputEditor) {
      inputEditor.focus();
    }
  };
  async function postSomeDataEditor(data, res) {
    const indexForPostRecord = viewInfo.horizontal ? me.getActiveSource().activeRecord : data.addInfo.Index;
    if (!me.getActiveSource().isEditMode()) {
      await me.getActiveSource().editRecord(indexForPostRecord);
    }
    await setColumnText({ fieldName: data.addInfo.FieldName, index: indexForPostRecord }, res.Text);
    if (editor.objref)
      await setColumnValue({ fieldName: data.addInfo.FieldName, index: indexForPostRecord }, res.ObjRef);
    await me.getActiveSource().postRecord(indexForPostRecord);
  }
  async function showEditor(key, addCommands) {
    var _a2, _b;
    if (await isGroupRecord(false) === true || me.OnlyViewMode === true) return;
    function getModifyFlag() {
      let source = me.getActiveSource();
      if (source.isEmpty()) return mfInsert;
      else return mfEdit;
    }
    let el = getColElement(currentCol, currentRow), column2;
    if (el) {
      if (viewInfo.horizontal) {
        currentCol = 1;
        el = getColElement(1, currentRow);
        column2 = getColElement(0, currentRow).levelsField.field;
      } else column2 = el.field;
      const cellInner = el.getElementsByClassName("grid-cell-inner")[0];
      if (cellInner.parentElement.field.fieldInfo === void 0) {
        cellInner.parentElement.field.fieldInfo = {
          ...defaultFieldInfo
        };
      }
      if (column2 && await canModifyViewInfo(getModifyFlag(), column2, me)) {
        async function getEditValue(cell2) {
          if (!cell2.editval && me.getActiveSource().getState() !== dsInsert) {
            const EditValue = await me.getActiveSource().GetFieldTextRequest("1", column2.fieldName);
            cell2.editval = EditValue.Text === void 0 ? "" : EditValue.Text;
          }
          cell2.text = cell2.innerText;
          return cell2.editval;
        }
        const editData = {
          value: editor && editor.stepValue !== void 0 ? editor.stepValue : await getEditValue(cellInner),
          cell: cellInner,
          field: viewInfo.horizontal ? column2 : cellInner.parentElement.field,
          index: currentRow + firstRecord,
          getText: async () => {
            const EditValue = await me.getActiveSource().GetFieldTextRequest("1", column2.fieldName);
            return EditValue.Text === void 0 ? "" : EditValue.Text;
          },
          updateRecord: () => {
            if (me.source.Master.refreshRecord) {
              me.source.Master.refreshRecord(true);
            } else {
              me.getActiveSource().onHandleRequest({
                Command: "RefreshRecord",
                Count: "1",
                RecordKey: me.getActiveSource().getFieldTextSync("ID")
              });
              me.refreshSource("!");
            }
          }
        };
        const readOnlyProps = ((_b = (_a2 = editData.field.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.readOnly) || Number(editData.field.fieldInfo.EditStyle) & 64 || editData.field.fieldInfo.hardCodeReadOnlyForEditor;
        editor = document.createElement("div");
        editor.style.height = "21px";
        if (viewInfo.horizontal) editor.style.width = "calc(100% - 25px)";
        editor.column = column2;
        await renderEditor(editData, editor, addCommands);
        editor.ready = true;
        inputEditor = editor.querySelector("[inputeditor=true]");
        editor.el = el;
        el.appendChild(editor);
        editor.visible = true;
        let cell = el.getElementsByClassName("grid-cell-inner")[0];
        el.style.backgroundColor = "white";
        if (cell) {
          const img = cell.parentElement.querySelector(".grid-cell-img");
          if (img) img.style.display = "none";
          inputEditor.content = cell.textContent;
          inputEditor.value = cell.textContent;
          cell.textContent = "";
          cell.style.display = "none";
          setTimeout(() => {
            inputEditor.focus();
            inputEditor.select();
            const editorBlock = el.querySelector(`div[componenteditor="true"]`);
            if (editorBlock && key !== "" && key !== void 0 && !readOnlyProps) {
              editorBlock.changeValue(key);
            }
          });
        }
        inputEditor.modified = false;
      }
    }
  }
  async function canModifyViewInfo(modifyFlag, column2, me2) {
    let canModify;
    if (viewInfo.horizontal && multiSelect.length > 0) {
      const source = me2.getActiveSource(), saveacrivrecord = source.activeRecord;
      for (const value of Object.values(multiSelect)) {
        source.activeRecord = Number(value);
        await source.getFieldText("ID");
        canModify = me2.canModify(modifyFlag, column2, me2);
        if (canModify === false) {
          source.activeRecord = saveacrivrecord;
          return false;
        }
      }
      return canModify;
    } else {
      canModify = me2.canModify(modifyFlag, column2, me2);
      return canModify;
    }
  }
  function hideEditor(update) {
    if (editor && editor.visible) {
      editor.stepValue = void 0;
      editor.visible = false;
      if (editor.SearchRecord) {
        editor.onblur({ currentTarget: editor });
        return;
      }
      let el = editor.el;
      if (el) {
        el.style.backgroundColor = "";
        let cell = el.getElementsByClassName("grid-cell-inner")[0];
        cell.style.display = "";
        if (cell) {
          const state = me.getActiveSource().getState();
          const fieldInfo = viewInfo.horizontal ? cell.parentElement.levelsField.field : cell.parentElement.field;
          const recordIndex = viewInfo.horizontal ? me.getActiveSource().activeRecord : Number(cell.closest(".grid-item").recordIndex);
          cell.innerText = cell.text || me.getActiveSource().getFieldTextSync(fieldInfo.fieldName, recordIndex);
          delete cell.editval;
          if (state !== dsInsert) {
            me.CommitToSaveChanges && me.CommitToSaveChanges(false);
            changeIndicator(dsBrowse);
          }
        }
      }
      if (el && el.contains(editor)) {
        el.removeChild(editor);
        editor.el = null;
      }
      editor.column = null;
      panel.focus();
    }
  }
  function getActiveRecord() {
    return currentRow + firstRecord;
  }
  function getFirstRecord() {
    return firstRecord;
  }
  function getLastRecord() {
    return firstRecord + visibleRows - 1;
  }
  async function moveColRow(newCol, newRow, e2) {
    return new Promise(async (resolve) => {
      selectedField = null;
      async function scrollData(distance2) {
        me.source.moveBy(distance2);
        let bool;
        if (me.source.activeRecord > getLastRecord()) {
          distance2 = me.source.activeRecord - getLastRecord();
        } else if (me.source.activeRecord < getFirstRecord()) {
          distance2 = me.source.activeRecord - getFirstRecord();
        } else distance2 = 0;
        if (me.source.recordCount === 0) distance2 = 0;
        if (distance2 != 0) {
          firstRecord += distance2;
          currentRow = me.source.activeRecord - firstRecord;
          await updateCurrentView();
          bool = true;
        } else {
          currentRow = me.source.activeRecord - firstRecord;
          bool = false;
        }
        multiSelectStyles(e2, rowDelta, Array.prototype.indexOf.call(me.data.children, el));
        me.onMultiSelectChange && me.onMultiSelectChange(me);
        return bool;
      }
      let el, colDelta = newCol - currentCol, rowDelta = newRow - currentRow;
      if (currentRow === -1) {
        currentRow = 0;
      }
      if (colDelta || rowDelta) {
        if (newRow !== currentRow && me.getActiveSource() && me.source.recordCount > 0 && me.source.isEditModeState() === 3) {
          if (newRow > currentRow) {
            await me.cancelRecord(false);
            rowDelta = newRow - (currentRow + 1);
          } else {
            await me.cancelRecord(false);
            rowDelta = newRow - currentRow;
          }
        }
        el = getColElement(currentCol, currentRow);
        let needToChangeFocused = true;
        if (me.source.recordCount !== 0 && rowDelta !== me.source.recordCount && rowDelta !== -Math.abs(me.source.recordCount)) {
          if (currentRow === 0 && rowDelta === -1 || -Math.abs(visibleRows) === rowDelta) {
            needToChangeFocused = false;
          } else if (currentRow + rowDelta === visibleRows || visibleRows === rowDelta) {
            needToChangeFocused = false;
          }
        }
        if (el && needToChangeFocused) el.classList.remove("grid-item-focused");
        if (me.source.recordCount > 0) {
          if (rowDelta != 0 || getActiveRecord() < getFirstRecord() || getActiveRecord() > getLastRecord()) {
            if (me.getActiveSource().isEditMode()) ;
            el = getRowElement(currentRow);
            if (el) el.classList.remove(gridItemClassName);
            if (el) el.classList.remove("grid-item-focused");
            clearStylesForGroupRec(el);
            if (!await scrollData(rowDelta)) {
              el = getRowElement(currentRow);
              me.source.updateCurrentMarkedValues();
              if (el) {
                el.classList.add(gridItemClassName);
                placeIndicator(el.firstChild.firstChild);
              }
            }
          }
        }
        if (colDelta != 0) {
          if (newCol < 0) {
            if (columnOffset > 0) {
              columnOffset--;
              await updateAllGrid();
            }
            newCol = 0 + columnOffset;
          } else if (newCol > me.columns.fields.length - 1 + columnOffset) {
            if (rightOverflow) {
              columnOffset++;
              await updateAllGrid();
            }
            newCol = me.columns.fields.length - 1 + columnOffset;
          } else if (newCol < columnOffset) {
            if (columnOffset > 0) {
              columnOffset--;
              await updateAllGrid();
            }
          }
          currentCol = newCol;
          if (rowDelta === 0) {
            multiSelectStyles(e2, rowDelta, Array.prototype.indexOf.call(me.data.children, el));
            me.onMultiSelectChange && me.onMultiSelectChange(me);
          }
        }
        el = getColElement(currentCol, currentRow);
        if (el) {
          if (el.field) selectedField = el.field.fieldName;
          if (!viewInfo.horizontal) el.classList.add("grid-item-focused");
        }
        el = getRowElement(currentRow);
        if (el && el.firstChild && el.firstChild.firstChild.isGroup === true) {
          el = getColElement(0, currentRow);
          el.classList.add("grid-item-focused");
        }
      }
      resolve();
    });
  }
  function clearStylesForGroupRec(table) {
    if (table && table.firstChild && table.firstChild.firstChild && table.firstChild.firstChild.isGroup === true) {
      const el = getColElement(0, currentRow);
      el.classList.remove("grid-item-focused");
    }
  }
  function multiSelectStyles(e2, rowDelta, prevRowIndex) {
    const row = getRowElement(currentRow), prevRow = getRowElement(prevRowIndex), nextRow = getRowElement(currentRow + rowDelta);
    if (viewInfo.horizontal) return;
    function selectManyRecords(index22) {
      const SignRowDelta = Math.sign(rowDelta) === 1;
      const breakPont = index22 ? index22 : me.source.activeRecord;
      for (let i = prevRowIndex; i >= 0; SignRowDelta ? i++ : i--) {
        if (i === breakPont) break;
        if (!multiSelect.includes(`${i}`)) {
          multiSelect.push(`${i}`);
          createMultiRow(getRowElement(i));
        }
      }
    }
    let index2;
    if (e2 && !isEmptyObject(e2) && !multiSelect.includes(`${me.source.activeRecord}`) && //если у нас не сохранено в массиве
    (e2.ctrlKey && e2.type === "mousedown" || e2.shiftKey)) {
      multiSelect.push(`${me.source.activeRecord}`);
      if (row) {
        createMultiRow(row);
        if (e2.key === "PageUp" || e2.key === "PageDown") {
          selectManyRecords();
          me.onMultiSelectChange && me.onMultiSelectChange(me);
        }
        if (prevRow && row && e2.shiftKey && e2.type === "mousedown") {
          selectManyRecords(currentRow);
        } else if (
          //для предыдущего элемента, мы делаем + 1 шаг если выбираем через shift, выбрали 4 запись, перешли на 3. А 4 осталась не выделенной. Вот для чего это условие
          prevRow && nextRow && !containsMultiRow(prevRow) && !containsMultiRow(nextRow)
        ) {
          if (rowDelta === 1 || rowDelta === -1) {
            multiSelect.push(`${me.source.activeRecord - rowDelta}`);
            createMultiRow(prevRow);
          }
        }
      }
    } else {
      if (row && containsMultiRow(row) && (e2.shiftKey || e2.ctrlKey)) {
        if (e2.shiftKey && e2.type === "keydown") {
          if (nextRow !== void 0 && nextRow !== row) {
            index2 = multiSelect.indexOf(prevRow);
            deleteStyleInRow(prevRow, index2);
          }
        } else {
          if (rowDelta === void 0 && row && containsMultiRow(row))
            return;
          index2 = multiSelect.indexOf(me.source.activeRecord);
          deleteStyleInRow(row, index2);
        }
      } else {
        if (viewInfo.horizontal) return;
        document.querySelectorAll(".grid-multi-selection-row").forEach((rowWithStyle) => {
          deleteStyleInRow(rowWithStyle);
        });
        multiSelect.length = 0;
      }
    }
  }
  const containsMultiRow = (row) => {
    return row ? row.classList.contains("grid-multi-selection-row") : void 0;
  };
  const createMultiRow = (row) => {
    if (viewInfo.horizontal) return;
    if (row && !containsMultiRow(row) || row.backgroundColor !== "#464646") {
      row.classList.add("grid-multi-selection-row");
    }
  };
  const deleteStyleInRow = (row, index2) => {
    if (viewInfo.horizontal) return;
    if (row) {
      if (containsMultiRow(row)) {
        row.classList.remove("grid-multi-selection-row");
        row.style.backgroundColor = "";
        row.style.color = "";
        me.changeGridStyles && me.changeGridStyles(row, me);
      }
    }
    try {
      if (index2) {
        multiSelect.splice(index2, 1);
      } else if (index2 === 0) {
        multiSelect.splice(index2, 1);
      }
    } finally {
    }
  };
  async function scrollToRecord(record, moveCurrent, changeSource) {
    if (sourceActive()) {
      {
        if (me.getActiveSource().activeRecord != record && changeSource !== false) {
          if (me.getActiveSource().isEditMode()) {
            if (me.getActiveSource().modified) await me.getActiveSource().postRecord();
            else await me.getActiveSource().cancelRecord();
          }
          me.getActiveSource().setRecordIndex(record);
        }
        if (viewInfo.horizontal) {
          me.source.setRecordIndex(record);
        }
        let distance2;
        if (me.source.activeRecord > getLastRecord()) {
          distance2 = me.source.activeRecord - getLastRecord();
        } else if (me.source.activeRecord < getFirstRecord()) {
          distance2 = me.source.activeRecord - getFirstRecord();
        } else distance2 = 0;
        if (distance2 !== 0) firstRecord += distance2;
        currentRow = me.source.activeRecord - firstRecord;
        await updateCurrentView();
      }
    }
  }
  function getSelection2() {
    let selection = "";
    for (const index2 of multiSelect) {
      selection += index2;
    }
    return selection;
  }
  function saveState() {
    if (me.columns) {
      const groupFields = groups.map((val) => {
        return val.fieldName;
      }).join();
      let stateObj = {
        IndicatorSize: `${Math.round(indicatorSize)}`,
        ViewMode: `${me.OnlyViewMode ? "1" : "0"}`,
        SelectedColumn: `${currentCol}`,
        ColumnOffset: columnOffset,
        ShowHint: "0",
        sortedFileds,
        filterData: JSON.stringify(filterData),
        GroupFields: groupFields,
        details: JSON.stringify(me.source.details),
        CardMode: `${viewInfo.horizontal ? "1" : "0"}`
      };
      if (groupFields === "") delete stateObj.GroupFields;
      for (const value of Object.values(viewInfo.horizontal ? viewInfo.saveColumns : me.columns.title)) {
        if (value) {
          if (value.state) {
            const keyWithLevel = `${value.fieldName}_${value.level}`;
            Object.assign(stateObj, { [keyWithLevel]: value.state });
          }
        }
      }
      me.getActiveSource().setGridState(stateObj, true);
    }
  }
  me.ChangeViewMode = function() {
    me.OnlyViewMode = !me.OnlyViewMode;
    changeIndicator(dsBrowse);
    saveState();
  };
  me.updateStateValues = function() {
    saveState();
  };
  function CreateStateForRecord(field) {
    try {
      field.state = {
        0: field.inParentIndex,
        //index
        1: field.hide === true ? "0" : "1",
        //visible
        2: field.width,
        // width
        3: field.marked !== void 0 && field.marked === true ? "1" : "0",
        // marked
        4: "0",
        // hidden
        5: field.expanded === false ? "1" : "0",
        // collapsed
        6: field.sortDirect === "up" ? "1" : field.sortDirect === "down" ? "2" : "0",
        // sortDirect 1-up, 2-down
        7: "0",
        // filter
        8: "",
        // defaultText
        9: "0"
        // defaultCheck
      };
    } catch (err) {
    }
  }
  function UpdStateValue(field, index2, value) {
    if (!field.state) {
      CreateStateForRecord(field);
    }
    field.state[index2] = value;
    saveState();
  }
  function processLevels(f2) {
    function processLevel(level) {
      for (let i = 0, l; i < level.length; i++) {
        l = level[i];
        f2.call(me, l);
        if (l.items) {
          processLevel(l.items);
        }
      }
    }
    processLevel(me.columns.levels);
  }
  function getIndexFieldName() {
    var value = "";
    processLevels(function(level) {
      switch (level.field.sortDirect) {
        case "up":
          if (value != "") value += ";";
          value += level.field.fieldName;
          break;
        case "down":
          if (value != "") value += ";";
          value += "-";
          value += level.field.fieldName;
          break;
      }
    });
    sortedFileds = value;
    return value;
  }
  function getGroupFieldNames() {
    var value = "";
    for (let i = 0, field, s; i < groups.length; i++) {
      field = groups[i];
      s = field.fieldName;
      if (field.params) {
        s = s + "." + field.params;
      }
      if (field.sortDirect == "down") {
        s = "-" + s;
      }
      if (value != "") value += ";";
      value += s;
    }
    return value;
  }
  async function checkOrderColumns(fieldName) {
    if (sourceActive()) {
      showApplicationMask(panel);
      try {
        let selection = {};
        selection.value = getSelection2();
        await me.source.orderRecords(fieldName, selection);
        if (multiSelect.length > 0) {
          multiSelect = selection.value.split(",");
        }
        await scrollToRecord(me.source.activeRecord, true);
        await updateCurrentView();
      } finally {
        hideApplicationMask(panel);
        saveState();
      }
    }
  }
  me.getGroups = () => {
    return groups;
  };
  me.groupByField = (field, clear) => {
    if (clear && groups.indexOf(field) !== -1) {
      groups.splice(groups.indexOf(field), 1);
    } else {
      groups.push(field);
    }
    checkGroupColumnns();
    BuildGroupsContent();
  };
  async function checkGroupColumnns() {
    if (sourceActive()) {
      showApplicationMask(panel);
      try {
        await me.source.groupRecords(getGroupFieldNames());
        await updateRecordTable();
        await scrollToRecord(me.source.activeRecord, true);
      } finally {
        hideApplicationMask(panel);
        saveState();
      }
    }
  }
  async function handleMouseUp(e2) {
    if (e2.button != 0) return;
    isJustMouseDown = false;
    if (sizeMarker && sizeMarker.style.opacity == 1) {
      deleteEvent("mousemove", sizeColumn);
      if (handleColumnField && handleColumnField.eventSize) {
        handleColumnField.width = Math.trunc(handleColumnField.eventSize) - handleColumnField.offset;
        handleColumnField.width = handleColumnField.width >= 25 ? handleColumnField.width : 25;
        resizeCardMode();
        if (handleColumnField.indicator) {
          indicatorSize = handleColumnField.width;
          saveState();
        } else UpdStateValue(handleColumnField, 2, handleColumnField.width);
        if (handleColumnField && !handleColumnField.indicator) await updateColumns();
        else if (handleColumnField && handleColumnField.indicator) {
          Zaglushka();
        }
        await updateAllGrid();
      } else {
        sizeMarker.style.opacity = 0;
      }
      handleColumnField = null;
      panel.focus();
      return;
    }
    function resizeCardMode() {
      if (viewInfo.horizontal) {
        const width2 = me.panel.offsetWidth - indicatorSize;
        for (const field of Object.values(me.columns.title)) {
          if (handleColumnField.fieldName !== field.fieldName) {
            field.width = width2 - handleColumnField.width;
          }
        }
      }
    }
    deleteEvent("mousemove", moveColumn);
    if (dragZone && dragZone.initRect) {
      dragZone.initRect = null;
      hideElement(dragZone);
      hideElement(dragZone.moveTop);
      hideElement(dragZone.moveBottom);
      if (dragZone.isGroup && me.canGroup(handleColumnField)) {
        let i = groups.indexOf(handleColumnField);
        if (i !== -1) groups.splice(i, 1);
        if (dragZone.field) {
          i = groups.indexOf(dragZone.field);
          if (i !== -1) groups.splice(i, 0, handleColumnField);
          else groups.push(handleColumnField);
        } else groups.push(handleColumnField);
        handleColumnField = null;
        dragZone.field = null;
        buildGroups();
        panel.focus();
        return;
      }
      const findIndexByField = (fieldName, array) => array.findIndex((item) => item.field.fieldName === fieldName);
      if (dragZone.field && dragZone.field.el) {
        const items = handleColumnField.parent, item = dragZone.field.el.level, oldIndex = findIndexByField(handleColumnField.el.level.field.fieldName, items);
        if (oldIndex !== -1) {
          const newIndex = findIndexByField(item.field.fieldName, items);
          if (newIndex !== -1) {
            UpdStateValue(handleColumnField.el.level.field, 0, newIndex);
            items.splice(oldIndex, 1);
            items.splice(newIndex, 0, handleColumnField.el.level);
          }
        }
        prepareLevels();
      }
      await updateColumns();
      if (handleColumnField.groupEl) {
        const i = groups.indexOf(handleColumnField);
        if (i !== -1) {
          groups.splice(i, 1);
          buildGroups();
        }
        handleColumnField.groupEl = null;
      }
      handleColumnField = null;
      dragZone.field = null;
      panel.focus();
      return;
    }
    let el = document.elementFromPoint(e2.x, e2.y), role;
    while (el) {
      role = el.role;
      if (role) break;
      el = el.parentElement;
    }
    if (role) {
      switch (role) {
        case ROLE_COLUMN: {
          if (me.canSort(el.field)) await me.sortByRecord(el, e2.shiftKey);
          panel.focus();
          break;
        }
      }
    }
    if (!me.editorMode() && e2.target.className.animVal === void 0 && !e2.target.className.includes("grid-filter"))
      panel.focus();
  }
  async function EditColumnFieldClick(el, e2) {
    return new Promise(async (resolve) => {
      var _a2, _b, _c, _d;
      if (me.RefWithCtrl === void 0) {
        const optionsForUser = getOptionsForUser().RefWithCtrl;
        me.RefWithCtrl = optionsForUser === void 0 ? false : optionsForUser;
      }
      let column2;
      if (viewInfo.horizontal && el.field.fieldName === "Value") {
        column2 = el.levelsField.field;
      } else {
        column2 = el.field;
      }
      if (me.RefWithCtrl === true && !e2.ctrlKey || column2 === void 0) return resolve(true);
      const refrence = me.getActiveSource().getFieldTextSync(column2.fieldName) === "" ? "0" : "1";
      if (refrence === "1" && me.doccfgid && column2.fieldInfo && column2.fieldInfo.onEdit !== "" && ((_b = (_a2 = column2.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.link) && !me.editorMode()) {
        const linkClick = await EditColumnField({
          DocCfgID: me.doccfgid,
          SectionID: me.sectionid,
          Module: "documents",
          ID: column2.fieldInfo.columnID,
          DocID: me.getActiveSource().getFieldTextSync("ID"),
          MasterID: me.getActiveSource().Master.MasterID,
          Reference: me.getActiveSource().getFieldTextSync(column2.fieldName) === "" ? "0" : "1"
        });
        tokenProcessingTest(linkClick, {
          from: "grid",
          func: () => {
            if (me.getActiveSource().Master.refreshRecord) {
              me.getActiveSource().Master.refreshRecord(true);
              me.CommitToSaveChanges && me.CommitToSaveChanges(false);
              resolve(true);
            } else {
              me.refreshSource("!");
              me.CommitToSaveChanges && me.CommitToSaveChanges(false);
              resolve(true);
            }
          },
          props: {
            Module: el.field.fieldInfo.Module,
            ObjType: el.field.fieldInfo.ObjType,
            ObjRef: el.field.fieldInfo.ObjRef
          }
        });
      } else if (refrence === "1" && column2.fieldInfo && column2.fieldInfo.EditStyle & 16 && ((_d = (_c = column2.fieldInfo) == null ? void 0 : _c.options) == null ? void 0 : _d.link) && !column2.fieldInfo.onEdit && !me.editorMode()) {
        const subData = {
          props: {
            ObjType: column2.fieldInfo.DataType,
            ObjRef: me.getActiveSource().getFieldValueSync(column2.fieldName),
            Buttons: 2,
            PlaneView: "1"
          }
        };
        const json = await GetDocDialogParams(
          column2.fieldInfo.DataType,
          me.getActiveSource().getFieldValueSync(column2.fieldName)
        );
        if (json.ObjType) subData.props.ObjType = json.ObjType;
        if (json.ObjRef) subData.props.ObjRef = json.ObjRef;
        if (!json.Break) json.Break = "";
        if (!json.Token) json.Token = "HandleTable";
        if (json) tokenProcessingTest(json, subData);
        resolve(false);
      }
    });
  }
  async function handleMouseDown(e2) {
    var _a2, _b;
    if (e2.button != 0 && !e2.type.includes("touch")) return;
    var el = e2.target || document.elementFromPoint(e2.x, e2.y), role;
    while (el) {
      role = el.role;
      if (role) break;
      el = el.parentElement;
    }
    if (role) {
      switch (role) {
        // start move column
        case ROLE_COLUMN: {
          if (handleColumnField) return;
          handleColumnField = el.field;
          handleColumnField.groupEl = null;
          appendEvent("mousemove", moveColumn);
          break;
        }
        case ROLE_GROUP: {
          if (handleColumnField) return;
          handleColumnField = el.field;
          handleColumnField.groupEl = el;
          appendEvent("mousemove", moveColumn);
          break;
        }
        case ROLE_COLDATA: {
          let newCol = el.col, newRow = el.parentElement.row;
          if (newCol === currentCol && newRow === currentRow) {
            if (e2.target.closest("div").id === "ExpandIcon") break;
            if (!me.editorMode() && !e2.ctrlKey) {
              await showEditor();
            }
            if (e2.ctrlKey) {
              multiSelectStyles(e2, 0, currentRow);
              me.onMultiSelectChange && me.onMultiSelectChange(me);
            }
          } else await moveColRow(newCol, newRow, e2);
          if (me.source.getState() != dsInsert) await changeIndicator(dsBrowse);
          if (await EditColumnFieldClick(el, e2)) return;
          break;
        }
        case ROLE_COLLAPSE: {
          let level = el.parentElement.level;
          if (level) {
            if (!el.parentElement.state) {
              saveState();
            }
            if (el.classList.contains("collapse-minus")) {
              el.classList.remove("collapse-minus");
              el.classList.add("collapse-plus");
              level.expanded = false;
              UpdStateValue(el.parentElement.field, 5, 1);
              hideEditor();
            } else {
              el.classList.remove("collapse-plus");
              el.classList.add("collapse-minus");
              level.expanded = true;
              UpdStateValue(el.parentElement.field, 5, 0);
              hideEditor();
            }
            buildColumns();
            await queuedGridScroll.scrollGrid(void 0, buildRecords).then(() => {
              updateScrollBar();
              panel.focus();
            });
          }
          break;
        }
        case ROLE_MARKED: {
          e2.stopPropagation();
          el.style.backgroundColor = el.style.backgroundColor === "white" ? "blue" : "white";
          el.field.marked = !el.field.marked;
          saveCurrentMarkedValue(el.field);
          break;
        }
        case ROLE_COLLAPSE_GROUP: {
          let row = el.parentElement.parentElement.row;
          if (row != void 0) {
            await moveColRow(currentCol, row);
            let collapse = await getRecordCollapsed();
            await setRecordCollapsed(!collapse);
          }
          break;
        }
        case ROLE_FILTER: {
          break;
        }
        case ROLE_CHECKBOX: {
          const td = el.closest("td");
          if ((td == null ? void 0 : td.col) !== currentCol || ((_a2 = td == null ? void 0 : td.parentElement) == null ? void 0 : _a2.row) !== currentRow) {
            await moveColRow(td == null ? void 0 : td.col, (_b = td == null ? void 0 : td.parentElement) == null ? void 0 : _b.row, e2);
          }
        }
      }
    }
    if (me.source.getState() != dsInsert) await changeIndicator(dsBrowse);
  }
  function saveCurrentMarkedValue(field) {
    if (sourceActive()) {
      me.getActiveSource().saveCurrentMarkedValues(field);
      UpdStateValue(field, 3, field.marked === true ? "1" : "0");
    }
  }
  async function switchEditorMode() {
    if (inputEditor && inputEditor.deleteClickAway) {
      inputEditor.deleteClickAway();
    }
    if (!me.editorMode()) {
      showEditorThrottle();
    } else {
      await hideEditorMode();
    }
  }
  async function hideEditorMode() {
    if (me.editorMode()) {
      if (me.getActiveSource().modified && editor.onEdit) await editor.onEdit(void 0, inputEditor.value);
      if (!editor.selection) hideEditor(inputEditor.modified);
    }
  }
  async function hideEditorOnKeyDown() {
    if (me.editorMode()) {
      if (me.getActiveSource().modified && editor.onEdit) {
        await editor.onEdit(void 0, inputEditor.value);
      }
      hideEditor(inputEditor.modified);
    }
  }
  function moveColRowCardMode(distance2) {
    if (viewInfo.horizontal) {
      me.getActiveSource().moveBy(distance2);
      updateCard();
    }
  }
  const showEditorThrottle = throttle((e2, keyPass2) => {
    setTimeout(async () => {
      if (!e2 && !me.editorMode()) {
        showEditor();
        return;
      }
      if (!me.editorMode() && !keyPass2.includes(e2.key) && !document.activeElement.className.includes("grid-filter")) {
        e2.preventDefault();
        await showEditor(getKeyForEditor(e2));
      } else {
        e2.stopPropagation();
      }
    });
  }, 20);
  const copyTextOfCell = (e2) => {
    if (e2.ctrlKey && e2.shiftKey && !me.editorMode()) {
      try {
        const colElement = getColElement(viewInfo.horizontal ? 0 : currentCol, currentRow);
        navigator.clipboard.writeText(
          viewInfo.horizontal ? colElement.nextElementSibling.textContent : colElement.textContent
        );
        e2.preventDefault();
      } catch (err) {
        console.error("Не удалось скопировать", err);
      }
    }
  };
  const keyB = (e2) => {
    if (e2.ctrlKey && !e2.shiftKey && !me.editorMode()) {
      e2.preventDefault();
      me.ChangeViewMode();
      me.changeIndicator();
    }
  };
  const keyF3Filter = (e2) => {
    if (!me.editorMode()) {
      e2.preventDefault();
      me.setOptions(1);
    }
  };
  const keyF = (e2) => {
    if (e2.ctrlKey) {
      hideEditor();
      me.searchByColumn(e2);
    }
  };
  const keyP = async (e2) => {
    if (e2.ctrlKey) {
      e2.preventDefault();
      if (inputEditor && inputEditor.deleteClickAway) {
        inputEditor.deleteClickAway();
      }
      await hideEditor();
    }
  };
  const keyDelete = (e2) => {
    if (e2.ctrlKey && !me.editorMode() && me.canModify(mfDelete, void 0, me)) {
      e2.preventDefault();
      me.deleteRecord();
    }
  };
  const clickEditorButton = async (e2, button) => {
    e2.preventDefault();
    if (!me.editorMode()) {
      await showEditor(void 0, { renderCommand: button });
    } else inputEditor == null ? void 0 : inputEditor.focus();
  };
  async function handleKeyDown2(e2) {
    var _a2, _b;
    const keyPass2 = ["F5", "F12", "CapsLock", "Shift", "Alt", "Meta", "Tab"];
    const gridPanel = document.activeElement.closest("div[rcsgrid_panel]");
    const focusCell = (gridPanel == null ? void 0 : gridPanel.querySelector(".grid-item-focused")) || (gridPanel == null ? void 0 : gridPanel.querySelector(".grid-card-selected"));
    if (keypress) return;
    switch (e2.code) {
      case "ArrowLeft":
        if (me.editorMode()) break;
        e2.preventDefault();
        if (me.source.onRecordCollapsed !== null) {
          const ColElement = getColElement(viewInfo.horizontal ? 0 : currentCol, currentRow);
          if (ColElement.children.length >= 2 && ColElement.firstChild.id === "ExpandIcon" && ColElement.firstChild.type == "-") {
            const dataToRecordCollapsed = viewInfo.horizontal ? { currentTarget: ColElement.firstChild } : ColElement.firstChild.getAttribute("recordIndex");
            await me.source.onRecordCollapsed(dataToRecordCollapsed);
            break;
          }
        }
        if (await isGroupRecord(true)) {
          if (await getRecordCollapsed()) {
            let record = await me.source.getGroupRecord();
            if (record != -1) scrollToRecord(record);
          } else await setRecordCollapsed(true);
        } else {
          if (currentCol == 0 && await getLevelOffset() > 0 && columnOffset === 0) {
            let record = await me.source.getGroupRecord();
            if (record != -1) scrollToRecord(record);
          } else if (!viewInfo.horizontal) await moveColRow(currentCol - 1, currentRow, e2);
          else moveColRowCardMode(-1);
        }
        break;
      case "ArrowRight":
        if (me.editorMode()) break;
        e2.preventDefault();
        if (me.source.onRecordCollapsed !== null) {
          const ColElement = getColElement(viewInfo.horizontal ? 0 : currentCol, currentRow);
          if (ColElement.children.length >= 2 && ColElement.firstChild.id === "ExpandIcon" && ColElement.firstChild.type == "+") {
            const dataToRecordCollapsed = viewInfo.horizontal ? { currentTarget: ColElement.firstChild } : ColElement.firstChild.getAttribute("recordIndex");
            await me.source.onRecordCollapsed(dataToRecordCollapsed);
            break;
          }
        }
        if (await isGroupRecord(true)) {
          if (await getRecordCollapsed()) await setRecordCollapsed(false);
        } else if (!viewInfo.horizontal) await moveColRow(currentCol + 1, currentRow, e2);
        else moveColRowCardMode(1);
        break;
      case "ArrowUp":
        e2.preventDefault();
        if (e2.altKey) {
          clickEditorButton(e2, listButton);
          return;
        }
        await hideEditorOnKeyDown();
        if (e2.ctrlKey) await scrollView(-1);
        else await moveColRow(currentCol, currentRow - 1, e2);
        await changeIndicator(dsBrowse);
        break;
      case "ArrowDown":
        e2.preventDefault();
        if (e2.altKey) {
          clickEditorButton(e2, listButton);
          return;
        }
        await hideEditorOnKeyDown();
        if (e2.ctrlKey) await scrollView(1);
        else {
          if (me.source.recordCount !== 0 && me.source.recordCount - 1 === me.source.activeRecord) {
            if (!viewInfo.horizontal && !e2.shiftKey && !e2.ctrlKey) await me.insertRecord(true);
          } else {
            await moveColRow(currentCol, currentRow + 1, e2);
            await changeIndicator(dsBrowse);
          }
        }
        break;
      case "PageUp":
        e2.preventDefault();
        await hideEditorOnKeyDown();
        if (e2.ctrlKey) await scrollView(-visibleRows, e2);
        else await moveColRow(currentCol, currentRow - visibleRows, e2);
        break;
      case "PageDown":
        e2.preventDefault();
        await hideEditorOnKeyDown();
        if (e2.ctrlKey) await scrollView(visibleRows, e2);
        else await moveColRow(currentCol, currentRow + visibleRows, e2);
        break;
      case "Home":
        if (me.editorMode()) break;
        if (e2.ctrlKey) scrollToRecord(-1);
        else await moveColRow(0, currentRow);
        break;
      case "End":
        if (me.editorMode()) break;
        if (e2.ctrlKey) scrollToRecord(me.source.recordCount);
        else await moveColRow(me.columns.fields.length - 1, currentRow);
        break;
      case "Insert":
        if (await me.canModify(mfInsert, void 0, me)) {
          await me.insertRecord(!e2.ctrlKey);
        }
        break;
      case "Escape":
        if (me.editorMode()) await hideEditor();
        else await me.cancelRecord();
        break;
      case "F1":
        e2.preventDefault();
        openHelpContextDialog();
        break;
      case "F2":
        await switchEditorMode();
        break;
      case "F3": {
        keyF3Filter(e2);
        break;
      }
      case "NumpadEnter":
      case "Enter":
        if (!document.activeElement.className.includes("grid-filter") && !document.activeElement.className.includes("grid-search-input")) {
          if (e2.ctrlKey) {
            await clickEditorButton(e2, modalButton);
            break;
          }
          e2.preventDefault();
          await switchEditorMode();
        }
        break;
      case "KeyA":
        if (!me.editorMode() && !document.activeElement.className.includes("grid-filter") && e2.ctrlKey) {
          e2.preventDefault();
          multiSelect.length = 0;
          for (let i = 0; i < me.source.recordCount; i++) {
            multiSelect.push(i);
            const row = getRowElement(i);
            if (row) {
              createMultiRow(row);
            }
          }
          me.onMultiSelectChange && me.onMultiSelectChange(me);
        }
        break;
      case "KeyP": {
        keyP(e2);
        break;
      }
      case "KeyB": {
        keyB(e2);
        break;
      }
      case "KeyF": {
        keyF(e2);
        break;
      }
      case "KeyQ": {
        if (e2.ctrlKey) {
          me.Rotate();
        }
        break;
      }
      case "KeyC": {
        copyTextOfCell(e2);
        break;
      }
      case "Space": {
        if (e2.ctrlKey) {
          (_b = (_a2 = focusCell == null ? void 0 : focusCell.querySelector("div[role=check-box]")) == null ? void 0 : _a2.querySelector("input")) == null ? void 0 : _b.click();
          break;
        }
      }
      case "KeyO": {
        if (!e2.ctrlKey && !e2.shiftKey) return;
        if (me.editorMode()) return;
        e2.preventDefault();
        const id = me.getActiveSource().getKeyFieldNameData();
        const recCount = me.getActiveSource().recordCount;
        renderMessageBox({
          dlgType: 2,
          message: ` Record Count:${recCount} 
 Current ID: ${id} 
 IndicatorSize: ${indicatorSize}`,
          buttons: 1,
          selectF: () => {
            me.panel.focus();
          }
        });
        break;
      }
      case "Delete": {
        keyDelete(e2);
        break;
      }
      default: {
        if (!e2.ctrlKey) showEditorThrottle(e2, keyPass2);
        break;
      }
    }
  }
  function getKeyForEditor(e2) {
    switch (e2.code) {
      case "Backspace": {
        return "";
      }
      case "Equal": {
        return "";
      }
      case "F1":
      case "F2":
      case "F3":
      case "F4":
      case "F5":
      case "F6":
      case "F7":
      case "F8":
      case "F9":
      case "F10":
      case "F11":
      case "F12":
        return "";
      default: {
        return e2.key;
      }
    }
  }
  me.searchByColumn = async function(e2, el) {
    if (e2 !== void 0) {
      e2.preventDefault();
    } else {
      await moveColRow(Array.from(el.parentNode.children).indexOf(el) - 1, currentRow);
    }
    const column2 = el ? el : getColElement(currentCol, currentRow).field.el;
    const input = document.createElement("input");
    input.type = "text";
    input.className = "grid-search-input";
    input.unhideelements = function() {
      for (let i = 0; i < column2.children.length; i++) {
        const child = column2.children[i];
        child.style.display = child.style.display === "none" ? "" : "none";
      }
    };
    input.unhideelements();
    input.oninput = async function(e22) {
      e22.stopPropagation();
      const record = await me.source.SearchRecord(column2.field.fieldName, e22.currentTarget.value);
      scrollToRecord(record);
    };
    input.onkeydown = async function(e22) {
      if ([13].indexOf(e22.keyCode) !== -1) {
        e22.stopPropagation();
        const record = await me.source.SearchRecord(
          column2.field.fieldName,
          e22.currentTarget.value,
          me.source.activeRecord + 1
        );
        scrollToRecord(record);
      }
    };
    let removed = false;
    input.visible = true;
    input.SearchRecord = true;
    input.onblur = async function(e22) {
      if (removed) return;
      e22.currentTarget.unhideelements();
      removed = true;
      e22.currentTarget.remove();
      await me.source.SearchRecord(void 0, void 0, -1);
      editor = null;
    };
    column2.appendChild(input);
    input.focus();
    editor = input;
  };
  async function scrollView(distance2, load) {
    if (sourceActive()) {
      var oldFirstRecord = firstRecord;
      if (distance2 > 0) {
        firstRecord += distance2;
        let max2 = me.source.recordCount - visibleRows;
        if (firstRecord > max2) firstRecord = max2;
      } else if (distance2 < 0) {
        firstRecord += distance2;
        if (firstRecord < 0) firstRecord = 0;
      }
      if (oldFirstRecord != firstRecord) {
        currentRow = me.source.activeRecord - firstRecord;
        await updateCurrentView(load);
      }
    }
  }
  async function handleMouseWheel(e2) {
    if (me.getActiveSource().modified && editor.onEdit) editor.onEdit(void 0, inputEditor.value);
    if (me.editorMode()) await hideEditor();
    let deltaY = e2.type === "touchmove" ? touchStartY - e2.touches[0].clientY : e2.deltaY;
    if (e2.shiftKey) {
      if (e2.deltaY < 0) {
        if (columnOffset > 0) {
          columnOffset--;
          await updateAllGrid(false);
        }
      } else if (e2.deltaY > 0) {
        if (rightOverflow) {
          columnOffset++;
          await updateAllGrid(false);
        }
      }
    } else {
      if (deltaY < 0) {
        await scrollView(-1);
      } else if (deltaY > 0) {
        await scrollView(1);
      }
    }
  }
  function buildColumns() {
    if (editor) editor.ready = false;
    getFixedCol();
    var last, left2 = 0, levels = me.columns.levels, maxlev = 1, totalWidth = me.header.getBoundingClientRect().width, checkMargin = columnOffset;
    while (last = me.header.lastChild) {
      me.header.removeChild(last);
    }
    if (!levels) return;
    function getMaxLevel(level) {
      let res = 1, max2 = 0;
      if (level.items && level.expanded) {
        for (let i = 0; i < level.items.length; i++) {
          max2 = maxint(max2, getMaxLevel(level.items[i]));
        }
      }
      return res + max2;
    }
    for (let i = 0; i < levels.length; i++) {
      maxlev = maxint(maxlev, getMaxLevel(levels[i]));
    }
    childColumnSize = rowHeight;
    titleSize = maxlev * childColumnSize;
    me.header.style.height = titleSize + "px";
    if (showIndicator) {
      let el = document.createElement("div");
      el.className = "grid-column";
      el.id = "indicatorColumn";
      el.style.position = "absolute";
      el.style.left = left2 + "px";
      el.style.width = Math.trunc(indicatorSize) + "px";
      el.style.height = "100%";
      el.style.display = "flex";
      el.style.justifyContent = "flex-start";
      el.style.alignItems = "center";
      el.style.backgroundColor = "#faf9f5";
      el.style.border = "none";
      el.field = { offset: left2 };
      let CollumnsButton = document.createElement("div");
      el.appendChild(CollumnsButton);
      const dataOfHiddenCols = viewInfo.horizontal ? viewInfo.saveColumns.levels : me.columns.levels;
      if (!isEmptyObject(dataOfHiddenCols)) {
        clientExports.createRoot(CollumnsButton).render(
          /* @__PURE__ */ jsxRuntimeExports.jsx(ColumnButton, { onClick: onMenuItemClick, data: dataOfHiddenCols, viewInfo })
        );
        createStatusButtonForCardMode();
        me.header.appendChild(el);
      }
      if (me.doccfgid && me.getActiveSource() && me.getActiveSource().Master.MasterID) {
        let CardModeButtonDiv = document.createElement("div");
        el.appendChild(CardModeButtonDiv);
        clientExports.createRoot(CardModeButtonDiv).render(/* @__PURE__ */ jsxRuntimeExports.jsx(CardModeButton, { rotateState: viewInfo.horizontal, onClick: me.Rotate }));
      }
      left2 += Math.trunc(indicatorSize);
    }
    function onMenuItemClick(field) {
      me.hideColumn(field);
    }
    function createFieldElement(level, left22, top2, width2, height2) {
      var _a2, _b, _c, _d, _e, _f;
      var el, tmp, field = level.field;
      if (field.hide === true || field.hideInGrid === true) {
        return 0;
      }
      if (level.items && level.expanded) {
        width2 = 0;
        for (let i = 0, l = left22, w, lev, fld; i < level.items.length; i++) {
          lev = level.items[i];
          fld = lev.field;
          w = Math.trunc(fld.width);
          if (l + w > totalWidth) {
            overflowColumns = true;
            rightOverflow = true;
            w -= l + w - totalWidth;
            if (w < rowHeight) break;
            i = level.items.length;
          }
          w = createFieldElement(lev, l, top2 + childColumnSize, w, height2 - childColumnSize);
          width2 += w;
          l += w;
        }
        height2 = childColumnSize;
      } else {
        if (checkMargin > 0 && !(field.fieldInfo && ((_b = (_a2 = field.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.fixed))) {
          checkMargin--;
          return 0;
        }
        me.columns.fields.push(field);
      }
      el = document.createElement("div");
      el.className = "grid-column";
      el.style.position = "absolute";
      el.style.left = left22 + "px";
      el.style.top = top2 + "px";
      el.style.width = Math.trunc(width2) + "px";
      el.style.height = height2 + "px";
      el.style.display = "flex";
      el.style.alignItems = "top";
      if (field.fieldInfo && field.fieldInfo.titleBackColor) el.style.backgroundColor = field.fieldInfo.titleBackColor;
      el.role = ROLE_COLUMN;
      field.offset = left22;
      field.top = top2;
      field.height = height2;
      field.elementWidth = width2;
      el.field = field;
      el.level = level;
      field.el = el;
      const flexContainer = document.createElement("div");
      flexContainer.style.display = "flex";
      flexContainer.style.alignItems = "flex-start";
      flexContainer.style.justifyContent = "space-between";
      flexContainer.style.flexFlow = "column warp";
      flexContainer.style.width = "10px";
      if (level.items) {
        tmp = document.createElement("div");
        tmp.classList.add("collapse-img");
        tmp.style.position = "inherit";
        if (level.expanded) {
          tmp.classList.add("collapse-minus");
        } else {
          tmp.classList.add("collapse-plus");
        }
        tmp.role = ROLE_COLLAPSE;
        el.appendChild(tmp);
      }
      if (field.marked !== void 0) {
        el.appendChild(createRoundButton(field));
      }
      tmp = document.createElement("div");
      tmp.style.textAlign = "center";
      tmp.style.width = "calc(100%)";
      const parentdiv = document.createElement("div");
      const spanForText = document.createElement("span");
      spanForText.className = "column-span";
      spanForText.style.width = "100%";
      parentdiv.className = "column-header-text";
      createStyleColumn(parentdiv, field);
      if (!((_c = field.fieldInfo) == null ? void 0 : _c.NoTitle)) {
        spanForText.innerText = field.title;
      }
      parentdiv.appendChild(spanForText);
      tmp.appendChild(parentdiv);
      if (field.fieldInfo && field.fieldInfo.titleAjust === "0") {
        parentdiv.style.justifyContent = "flex-start";
        spanForText.style.marginLeft = "3px";
      }
      tmp.className = "grid-column-title";
      if (level.items && level.items.length > 0 || field.marked !== void 0) {
        tmp.style.marginLeft = "10px";
        tmp.style.width = `calc(100% - ${tmp.style.marginLeft}px - ${el.style.paddingRight}px)`;
        spanForText.style.width = "86%";
      }
      el.appendChild(tmp);
      switch (field.sortDirect) {
        case "up":
          tmp.children[0].classList.add("column-sort-asc");
          break;
        case "down":
          tmp.children[0].classList.add("column-sort-desc");
          break;
      }
      if (field && ((_d = field.fieldInfo) == null ? void 0 : _d.options) && ((_f = (_e = field.fieldInfo) == null ? void 0 : _e.options) == null ? void 0 : _f.filterByField) === true) {
        const sortIcon = document.createElement("div");
        sortIcon.style.backgroundColor = "inherit";
        sortIcon.style.border = "none";
        sortIcon.style.position = "absolute";
        sortIcon.style.right = "-1px";
        sortIcon.style.width = "15px";
        sortIcon.style.height = "15px";
        sortIcon.style.cursor = "pointer";
        sortIcon.style.zIndex = "6";
        sortIcon.style.bottom = "3px";
        sortIcon.role = "filter";
        el.appendChild(sortIcon);
        el.style.paddingRight = "12px";
        tmp.style.width = `calc(100% - ${tmp.style.marginLeft} - ${el.style.paddingRight})`;
        clientExports.createRoot(sortIcon).render(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            FilterGridComponent,
            {
              props: {
                request: me.getActiveSource().onHandleRequest,
                dataForReq: {
                  Command: "FilterValues",
                  FieldName: field.fieldName
                },
                searchProps: {
                  editMask: field.fieldInfo.editMask,
                  datatype: field.fieldInfo.EditStyle & 2 && "date"
                },
                ParentID: me.source.Master.MasterID,
                DocCfgID: me.doccfgid,
                applyFilter: me.applyColumnFilter,
                filterDiv: me.filter,
                filterData
              }
            }
          )
        );
      }
      me.header.appendChild(el);
      return Math.trunc(width2);
    }
    function createStyleColumn(span, field) {
      if (field.fieldInfo) {
        if (field.fieldInfo.Image) {
          const imgDiv = document.createElement("div");
          imgDiv.position = "absolute";
          const img = createImgByIndex(field.fieldInfo.Image);
          img.style.width = "12px";
          img.className = "grid-column-img";
          imgDiv.style.width = "17px";
          if (img.src) {
            imgDiv.appendChild(img);
            span.appendChild(imgDiv);
          }
        }
        if (field.fieldInfo.titleTextStyle) {
          const style2 = Number(field.fieldInfo.titleTextStyle);
          span.style.fontWeight = style2 & 1 ? "bold" : "";
          span.style.fontStyle = style2 & 2 ? "italic" : "";
          span.style.textDecoration = style2 & 4 ? "underline" : style2 & 8 ? "line-through" : "";
        }
        if (field.fieldInfo.textColor) {
          span.style.color = setColor(Number(field.fieldInfo.textColor));
        }
      }
    }
    me.columns.fields = [];
    overflowColumns = columnOffset != 0;
    rightOverflow = false;
    for (let i = 0, level, field, width2; i < levels.length; i++) {
      level = levels[i];
      field = level.field;
      if (field.hide !== true) {
        width2 = Math.trunc(field.width);
        if (left2 + width2 > totalWidth) {
          overflowColumns = true;
          rightOverflow = true;
          width2 -= left2 + width2 - totalWidth;
          if (width2 < rowHeight) break;
          i = levels.length;
        }
        left2 += createFieldElement(level, left2, 0, width2, titleSize);
      }
    }
    me.header.style.height = titleSize + "px";
    if (viewInfo.horizontal) {
      const divTitleForHorizontal = document.createElement("div");
      divTitleForHorizontal.style.height = titleSize - 2 + "px";
      divTitleForHorizontal.style.position = "relative";
      divTitleForHorizontal.style.left = indicatorSize + "px";
      divTitleForHorizontal.style.width = `calc(100% - ${indicatorSize + "px"})`;
      divTitleForHorizontal.style.backgroundColor = "rgb(250, 249, 245)";
      divTitleForHorizontal.id = "TitleForHorizontal";
      divTitleForHorizontal.className = "TitleForHorizontal";
      me.header.appendChild(divTitleForHorizontal);
    }
    if (me.columns.fields.length > 1) {
      let field;
      field = me.columns.fields[me.columns.fields.length - 1];
      me.columns.stubField = {
        offset: field.offset + field.width,
        el: field.el,
        parent: me.columns.levels
      };
    }
    buildFilters();
    if (overflowColumns && !leftRightMover.parentElement && !viewInfo.horizontal) {
      me.header.appendChild(leftRightMover);
    }
  }
  function createImgByIndex(index2) {
    const imgDiv = document.createElement("div");
    imgDiv.position = "absolute";
    const img = document.createElement("img");
    img.draggable = false;
    const src = getIcons(index2);
    if (src) img.src = ImgURLSRC(src);
    return img;
  }
  function createRoundButton(field) {
    const button = document.createElement("div");
    button.style.width = "6px";
    button.style.height = "6px";
    button.style.borderRadius = "50%";
    button.style.border = "1px solid";
    button.style.backgroundColor = field.marked === false ? "white" : "blue";
    button.style.position = "absolute";
    button.style.bottom = "3px";
    button.style.left = "2.2px";
    button.style.cursor = "pointer";
    button.field = field;
    button.role = ROLE_MARKED;
    return button;
  }
  me.hideColumn = async function(field) {
    if (field.hide === void 0) {
      field.hide = true;
    } else {
      field.hide ? field.hide = false : field.hide = true;
    }
    UpdStateValue(field, 1, field.hide ? "0" : "1");
    if (viewInfo.horizontal) updateCard(false);
    await updateAllGrid();
  };
  function createResizers() {
    if (me.DisableResize !== false) {
      panel.querySelectorAll(".grid-size-marker").forEach((r2) => {
        r2.remove();
      });
      const resizerHeight = visibleRows * rowHeight + titleSize + "px";
      let i = 0;
      for (const column2 of me.header.children) {
        if (column2.className === "pagination") break;
        if (me.header.children[i - 1] && column2.field && column2.field.level < me.header.children[i - 1].field.level || viewInfo.horizontal && column2 === me.header.children[0] || viewInfo.horizontal && column2 === me.header.children[2]) ;
        else {
          const resizer = document.createElement("div");
          resizer.classList = "grid-size-marker";
          resizer.style.left = parseInt(column2.style.width) + parseInt(column2.style.left) + "px";
          resizer.style.opacity = 0;
          resizer.style.height = resizerHeight;
          if (column2 === me.header.children[0]) {
            resizer.style.height = "100%";
            column2.field.indicator = true;
          }
          resizer.ondblclick = () => {
            ajustColumnWidth(column2.field);
          };
          resizer.onmousedown = function(e2) {
            if (handleColumnField === null || handleColumnField === void 0) {
              handleColumnField = column2.field;
              e2.currentTarget.style.opacity = 1;
              sizeMarker = resizer;
              if (handleColumnField) {
                appendEvent("mousemove", sizeColumn);
              }
            }
          };
          panel.appendChild(resizer);
        }
        i++;
      }
    }
  }
  function buildGroups(fieldName) {
    if (me.groups) {
      groupSize = me.groups.getBoundingClientRect().height;
      let last;
      while (last = me.groups.lastChild) {
        me.groups.removeChild(last);
      }
      BuildGroupsContent();
      groupSize = me.groups.getBoundingClientRect().height;
      me.table.style.top = groupSize + filterSize + titleSize + "px";
    }
    checkGroupColumnns();
  }
  function BuildGroupsContent() {
    if (groups.length > 0) {
      me.groups.innerHTML = "";
      groupSize = maxint(groupSize, rowHeight * groups.length);
      me.groups.style.height = groupSize + "px";
      for (let i = 0, el, field, l = 3, w, t2 = 3; i < groups.length; i++) {
        field = groups[i];
        w = 100;
        el = document.createElement("div");
        el.style.position = "absolute";
        el.style.left = l + "px";
        el.style.top = t2 + "px";
        el.style.width = w + "px";
        el.textContent = field.title;
        el.field = field;
        el.classList.add("grid-column");
        el.role = ROLE_GROUP;
        me.groups.appendChild(el);
        t2 += 7;
        l += w + 3;
      }
      groupSize = me.groups.lastChild.getBoundingClientRect().bottom - me.groups.getBoundingClientRect().top + 3;
      if (groupSize < 43) groupSize = 43;
      me.groups.style.height = groupSize + "px";
    } else {
      me.groups.style.height = rowHeight + "px";
      me.groups.innerHTML = '<p class="grid-groups-text">Для группировки перетащите сюда заголовок колонки</p>';
    }
    groupSize = me.groups.getBoundingClientRect().height;
    me.table.style.top = groupSize + filterSize + titleSize + "px";
  }
  const sortFieldsByState = () => {
    if (!me.getActiveSource()) return;
    const state = me.getActiveSource().getGridState();
    if (!state) return;
    const sortLevels = (levels) => {
      const indexedLevels = levels.map((level, index2) => {
        const keyInState = level.field.fieldName + `_${level.level}`;
        if (state[keyInState]) {
          return { index: state[keyInState][0], level };
        }
        return { index: index2, level };
      });
      indexedLevels.sort((a2, b2) => {
        return a2.index - b2.index;
      });
      return indexedLevels.map(({ level }) => {
        if (level.items && Array.isArray(level.items)) {
          return { ...level, items: sortLevels(level.items) };
        }
        return level;
      });
    };
    const sortedCols = sortLevels(me.columns.levels);
    if (sortedCols) {
      me.columns.levels = sortedCols;
    }
  };
  function prepareLevels() {
    var _a2, _b, _c, _d;
    me.columns.levels = [];
    me.columns.fields = [];
    groups = [];
    var title = me.columns.title, parents = [];
    function getParent2(value) {
      var level;
      if (intInRange(value, 0, parents.length - 1)) {
        level = parents[value];
        if (level) {
          if (!level.items) level.items = [];
          return level.items;
        }
      }
      return me.columns.levels;
    }
    const statedata = useageDataFromState();
    selectedField = title[0].fieldName;
    currentCol = 0;
    for (let i = 0, level, field, parent, state; i < title.length; i++) {
      field = title[i];
      level = { field };
      state = getGridStateFieldValue(field);
      if (field.level) level.level = maxint(0, field.level);
      else level.level = 0;
      if (!field.title) field.title = field.fieldName;
      while (parents.length <= level.level) parents.push({});
      parents[level.level] = level;
      parent = getParent2(level.level - 1);
      parent.push(level);
      const inParentIndex = parent.indexOf(level);
      if (parents[0].field && (parents[0].field.hideInGrid || parents[0].field.hideInCard)) {
        field.hideInCard = parents[0].field.hideInCard;
        field.hideInGrid = parents[0].field.hideInGrid;
      }
      field.index = i;
      field.inParentIndex = Number(inParentIndex);
      field.levelsIndex = parent.level - 1;
      if (field.fieldInfo && field.fieldInfo.options) {
        if ((_b = (_a2 = field.fieldInfo) == null ? void 0 : _a2.options) == null ? void 0 : _b.markable) {
          field.marked = false;
        }
        if (!viewInfo.horizontal) {
          if ((_d = (_c = field.fieldInfo) == null ? void 0 : _c.options) == null ? void 0 : _d.fixed) {
            field.fixed = true;
            fixedColumn = field;
          }
        }
      }
      if (state) {
        field.state = state;
        field.index = Number(state[0]);
        field.inParentIndex = Number(state[0]);
        field.hide = state[1] === "0";
        field.width = Number(state[2]);
        if (state[6].includes("1") || state[6].includes("2")) {
          field.sortDirect = state[6] === "1" ? "up" : "down";
        }
        if (state[3] === "1") {
          field.marked = true;
          if (sourceActive()) me.source.saveCurrentMarkedValues(field);
        }
        level.expanded = state[5] === "1" ? false : true;
      } else {
        level.expanded = false;
      }
      field.expanded = level.expanded;
      field.parent = parent;
      if (statedata) {
        if (statedata.GroupFields && statedata.GroupFields.indexOf(field.fieldName) !== -1) groups.push(field);
      }
    }
    sortFieldsByState();
  }
  function useageDataFromState() {
    const state = getGridStateFieldValue();
    let returnStateData = {};
    if (state) {
      if (state.IndicatorSize) indicatorSize = Number(state.IndicatorSize);
      if (state.filterData) filterData = JSON.parse(state.filterData);
      else filterData = {};
      if (state.GroupFields)
        returnStateData = {
          ...returnStateData,
          GroupFields: state.GroupFields.split(",")
        };
    }
    return returnStateData;
  }
  function getGridStateFieldValue(field, index2) {
    if (sourceActive() && !isEmptyObject(me.source.getGridState())) {
      if (field) {
        return me.source.getGridState()[field.fieldName + `_${field.level}`];
      } else {
        return me.source.getGridState();
      }
    }
  }
  me.setImageFields = function(imgFields) {
    if (typeof imgFields === "string") {
      imageFields = imgFields.split(",");
    } else if (typeof imgFields === "object") {
      imageFields = imgFields;
    }
    indicatorSize = imageFields.length * 15 + 42 > 123 ? 123 : imageFields.length * 15 + 42;
  };
  me.setColumns = function(columns) {
    me.columns = columns;
    prepareLevels();
    me.defaultColumns = false;
  };
  me.setIndicatorSize = function(size) {
    indicatorSize = size;
  };
  me.deleteRecord = function(index2) {
    return new Promise(async (resolve) => {
      if (viewInfo.horizontal) return resolve();
      const deleteRecords = async (e2) => {
        if (e2.currentTarget.value == 7) return resolve();
        if (me.onDeleteRecord) {
          return resolve(await me.onDeleteRecord(index2, me));
        }
        if (multiSelect.length > 0) {
          const sortedMultiSelect = multiSelect.toSorted();
          for (let i = sortedMultiSelect.length - 1; i >= 0; i--) {
            await me.getActiveSource().deleteRecord(sortedMultiSelect[i]);
          }
          multiSelect.length = 0;
        } else {
          await me.getActiveSource().deleteRecord(index2);
        }
        resolve(await updateRecordTable(true));
      };
      const message = multiSelect.length > 0 ? "Удалить выбранные записи?" : "Удалить текущую запись?";
      renderMessageBox({ dlgType: 3, buttons: 12, message, selectF: deleteRecords });
    });
  };
  me.firstScroll = function() {
    me.getActiveSource().first();
    if (!viewInfo.horizontal) scrollToRecord(0);
    else updateCard();
  };
  me.lastScroll = function() {
    me.getActiveSource().last();
    if (!viewInfo.horizontal) scrollToRecord(me.getActiveSource().recordCount - 1);
    else updateCard();
  };
  me.scrollTo = async function(index2) {
    await scrollToRecord(index2);
  };
  me.getMultiSelect = function() {
    return multiSelect;
  };
  me.sortByRecord = async function(el, multi, clear) {
    deleteEvent("mousemove", moveColumn);
    handleColumnField = null;
    var temp, field = el.field;
    if (!el.classList.contains("column-header-text")) {
      temp = el.getElementsByClassName("column-header-text");
      if (temp && temp.length > 0) el = temp[0];
      else el = null;
    }
    if (el && me.source.onRecordCollapsed === null) {
      let ChooseSortDirect = function(classList, sortDirect2) {
        if (!clear) {
          el.classList.add(classList);
          field.sortDirect = sortDirect2;
        } else {
          delete field.sortDirect;
        }
      };
      temp = me.header.getElementsByClassName("column-header-text");
      if (!multi) {
        let clearSortDirect = function(level) {
          level.field.sortDirect = "";
          if (level.items) {
            level.items.forEach(clearSortDirect);
          }
        };
        me.columns.levels.forEach(clearSortDirect);
        if (temp) {
          for (let i = 0, t2; i < temp.length; i++) {
            t2 = temp[i];
            if (t2 != el) {
              t2.classList.remove("column-sort-asc");
              t2.classList.remove("column-sort-desc");
            }
          }
        }
      }
      if (el.classList.contains("column-sort-asc")) {
        el.classList.remove("column-sort-asc");
        ChooseSortDirect("column-sort-desc", "down");
      } else {
        el.classList.remove("column-sort-desc");
        ChooseSortDirect("column-sort-asc", "up");
      }
      const sortDirect = field.sortDirect === "up" ? "1" : field.sortDirect === "down" ? "2" : "0";
      UpdStateValue(field, 6, sortDirect);
      await checkOrderColumns(getIndexFieldName());
    }
  };
  me.moveRecord = async function(record) {
    if (viewInfo.horizontal) {
      moveColRowCardMode(record);
      return;
    }
    let moveCol = throttle(moveColRow, 10);
    drawing = true;
    moveCol(currentCol, currentRow + record);
    drawing = false;
    record === -1 ? me.getActiveSource().activeRecord - 1 : me.getActiveSource().activeRecord + 1;
  };
  me.ChangeSave = function(bool) {
    if (me.source) me.source.ChangeSave(bool);
  };
  me.getFieldInfo = (fieldName = selectedField) => {
    return me.columns.title.find((field) => field.fieldName === fieldName);
  };
  me.getSelectedField = function() {
    return selectedField;
  };
  me.ShowIndicatorF = function(bool) {
    showIndicator = bool;
    if (indicator !== null) {
      indicator.remove();
      indicator = null;
    }
    if (me.zaglushka) {
      me.zaglushka.remove();
    }
  };
  async function updateRowCount() {
    if (me.source.recordCount < firstRecord) firstRecord = 0;
    updateActive();
    if (viewInfo.horizontal && viewInfo.fixedColumn && viewInfo.columnSource) ;
  }
  me.postSomeData = async function(fieldName, data, recordIndex) {
    const source = me.getActiveSource();
    if (!source.isEditMode()) {
      await source.editRecord(recordIndex);
    }
    await setColumnText(
      { fieldName, index: recordIndex },
      data.text ? data.text : await source.getFieldText(fieldName)
    );
    await setColumnValue(
      { fieldName, index: recordIndex },
      data.id ? data.id : await source.getFieldValue(fieldName)
    );
  };
  me.postExicstedEditRec = async function(load) {
    await changeIndicator(dsBrowse);
    me.CommitToSaveChanges && await me.CommitToSaveChanges(false);
    if (me.editorMode() && editor.InputChange) {
      inputEditor.focus();
      delete editor.InputChange;
      await hideEditor();
      return;
    }
    const recIndex = me.source.activeRecord;
    await me.getActiveSource().postRecord();
    if (!viewInfo.horizontal) {
      await updateRecordTable(load);
      await scrollToRecord(recIndex);
    } else {
      if (viewInfo.horizontal) await updateCard(false);
    }
    await hideEditor();
  };
  me.refreshSource = async function(key, info) {
    if (me.source && me.source.checkActive(key != void 0 && key != "")) {
      let dataFromRefrsh;
      if (viewInfo.horizontal) {
        viewInfo.saveSource.refresh(key);
        viewInfo.saveSource.acquireRecords(viewInfo.saveSource.activeRecord, 1);
        me.source.refresh("!");
        if (0) await me.source.refresh();
      } else {
        dataFromRefrsh = await me.source.refresh(key, info);
        updFieldsFromRefresh(dataFromRefrsh);
      }
      if (sourceActive()) {
        let distance2;
        updateRowCount();
        visibleRows = moddiv(me.data.clientHeight, rowHeight);
        if (visibleRows > me.source.recordCount) {
          visibleRows = me.source.recordCount;
        }
        if (me.source.activeRecord > getLastRecord()) {
          if (getLastRecord() == -1) {
            distance2 = me.source.activeRecord - moddiv(me.data.clientHeight, rowHeight) + 1;
            if (distance2 < 0) distance2 = 0;
          } else {
            distance2 = 0;
            distance2 = me.source.activeRecord - getLastRecord();
          }
        } else if (me.source.activeRecord < getFirstRecord()) {
          distance2 = me.source.activeRecord - getFirstRecord();
        } else distance2 = 0;
        if (distance2 === void 0) {
          distance2 = 0;
        }
        if (distance2 != 0) {
          firstRecord += distance2;
          updateRowCount();
        }
      }
      multiSelect = [];
      await updateAllGrid();
      me.onMultiSelectChange && me.onMultiSelectChange(me);
    }
  };
  function updFieldsFromRefresh(data) {
    if (data && data.Columns) {
      for (const [key, value] of Object.entries(data.Columns)) {
        let col = {};
        let field = me.columns.title.filter((val) => {
          return val.fieldName === key;
        });
        field = field[0];
        const index2 = me.columns.title.indexOf(field);
        const isHidden = value.Hidden === "1";
        if (field) {
          if (isHidden && index2) {
            me.columns.title.splice(index2, 1);
          } else {
            field.hide = isHidden;
            if (field.state && field.state[1]) field.state[1] = isHidden ? "0" : "1";
            if (value.Caption) field.title = value.Caption;
            me.columns.title[index2] = field;
          }
        } else {
          if (isHidden) continue;
          const findedFieldInSource = me.getActiveSource().fields.find((field2) => field2.fieldName === key);
          col = {
            fieldName: key,
            title: findedFieldInSource.displayLabel || key,
            width: parseInt(value.Width * 1.33) || 100,
            level: parseInt(value.Deep || value.Level) || 0
          };
          me.columns.title.push(col);
        }
      }
      me.setColumns(me.columns);
    }
  }
  me.setOptions = async function(options) {
    for (const [key, value] of Object.entries(constOptions)) {
      if ((value & options) === value) {
        switch (key) {
          case "filter":
            ShowFilter();
            break;
          case "groupBy":
            ShowGroup();
            break;
        }
      }
    }
    await updateRecordTable();
    await updateAllGrid();
  };
  me.updateGridSize = async function() {
    await updateAllGrid();
  };
  function getCorrectionHorizontalOn(arr, data) {
    for (let item of arr) {
      if (data.indexCol > data.trueCurrentCol) return data.result;
      data.indexCol++;
      if (item.expanded) {
        data.result++;
        data.trueCurrentCol++;
      }
      if (item.expanded && item.items && item.items.length !== 0) {
        data.result = getCorrectionHorizontalOn(item.items, data);
      }
    }
    return data.result;
  }
  function getCorrectionHorizontalOff(arr, data) {
    for (let item of arr) {
      if (data.indexCol >= data.trueCurrentCol) return data.result;
      data.indexCol++;
      if (item.expanded) {
        data.result++;
        data.trueCurrentCol++;
      }
      if (item.expanded && item.items && item.items.length !== 0) {
        data.result = getCorrectionHorizontalOff(item.items, data);
      }
    }
    return data.result;
  }
  me.Rotate = async function(view, newSource) {
    if (me.editorMode()) {
      await hideEditor();
    }
    let sourceHorizontal = {};
    updateGridSelectedClass();
    if (!viewInfo.horizontal) {
      if (!viewInfo.source) {
        sourceHorizontal = await createColumnSource();
      } else {
        sourceHorizontal = viewInfo.source;
      }
      if (!viewInfo.columns) {
        viewInfo.columns = CreateViewColumns();
      }
      viewInfo.saveSource = me.source;
      viewInfo.saveColumns = me.columns;
      viewInfo.source = sourceHorizontal;
      viewInfo.currentRow = currentCol;
      if (me.filter.style.display === "grid") {
        await me.setOptions(1);
      }
      viewInfo.horizontal = true;
      columnOffset = 0;
      me.onButtonsStateChange && me.onButtonsStateChange(me);
      saveState();
      me.setColumns(viewInfo.columns, false);
      sourceHorizontal.refresh("!").then(async () => {
        indicatorSize = 62;
        await me.setSource(sourceHorizontal, false);
        let collapseCorrection = getCorrectionHorizontalOn(viewInfo.saveColumns.levels, {
          trueCurrentCol: currentCol,
          result: 0,
          indexCol: 0
        });
        scrollToRecord(viewInfo.currentRow + collapseCorrection, true, false);
        updateScrollBar();
      });
    } else {
      viewInfo.horizontal = false;
      if (newSource !== false) {
        columnOffset = calculateColumnOffset(viewInfo.saveColumns.levels, me.source.activeRecord);
        let collapseCorrection = getCorrectionHorizontalOff(viewInfo.saveColumns.levels, {
          trueCurrentCol: me.source.activeRecord,
          result: 0,
          indexCol: 0
        });
        const newCol = me.source.activeRecord - collapseCorrection;
        me.setColumns(viewInfo.saveColumns, false);
        viewInfo.saveSource.onDataChanged = me.source.onDataChanged;
        await me.setSource(viewInfo.saveSource, false);
        currentCol = newCol;
        await scrollToRecord(me.source.activeRecord);
        Zaglushka();
      }
      me.onButtonsStateChange && await me.onButtonsStateChange(me);
      updateScrollBar();
      saveState();
    }
  };
  function calculateColumnOffset(data, col, indexToFind) {
    let field, coloffset = 0, width2, level, totalWidth = me.panel.offsetWidth - indicatorSize, left2 = 0, index2 = -1;
    for (const value of Object.values(data)) {
      index2++;
      level = value;
      field = level.field;
      if (field.hide !== true && field.hideInCard !== true) {
        width2 = field.width;
        if (left2 + width2 > totalWidth) {
          if (width2 > 130) coloffset += 1;
          else coloffset += 1;
          overflowColumns = true;
          rightOverflow = true;
        }
        if (col === index2) return coloffset;
        left2 += width2;
      }
    }
    return 0;
  }
  async function createColumnSource() {
    let sourceHorizontal = new createRecordSource();
    sourceHorizontal.CreateCollapsibleRecords = async function(div, me2, i, td) {
      const recordInfo = await me2.source.getRecordInfo();
      await me2.source.getRecordLevel();
      const recordState = await me2.source.getRecordState();
      const classfiresIcon = document.createElement("img");
      td.levelsField = recordInfo.levelsField;
      if (i !== 0) return;
      if (isCollapsibleRecord(recordState)) {
        classfiresIcon.textContent = recordState === 160 || recordState === 161 ? "+" : "-";
        classfiresIcon.type = recordState === 160 || recordState === 161 ? "+" : "-";
        classfiresIcon.src = "data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";
        classfiresIcon.classList.add("collapse-img");
        classfiresIcon.classList.add(recordState === 160 || recordState === 161 ? "collapse-plus" : "collapse-minus");
        classfiresIcon.style.position = "absolute";
        classfiresIcon.style.cursor = "pointer";
        classfiresIcon.style.marginLeft = "6px";
        classfiresIcon.style.marginTop = "5px";
        classfiresIcon.id = "ExpandIcon";
        classfiresIcon.setAttribute("recordindex", me2.source.activeRecord);
        classfiresIcon.onclick = function(e2) {
          me2.source.onRecordCollapsed(e2);
        };
      }
      div.style.marginLeft = "15px";
      if (classfiresIcon.textContent !== "") {
        classfiresIcon.role = "expandCard";
        td.appendChild(classfiresIcon);
      }
      return classfiresIcon.textContent === "" ? null : classfiresIcon;
    };
    sourceHorizontal.onRecordCollapsed = async function(e2) {
      const levelsField = e2.currentTarget.parentElement.levelsField;
      levelsField.expanded = !levelsField.expanded;
      updateCard(true);
    };
    sourceHorizontal.onDataChanged = me.getActiveSource().onDataChanged;
    sourceHorizontal.onHandleRequest = HandlePlaneSourceRequest;
    sourceHorizontal.onNeedToSaveChanged = me.getActiveSource().onNeedToSaveChanged;
    return sourceHorizontal;
  }
  function CreateViewColumns() {
    const width2 = me.panel.offsetWidth - indicatorSize;
    return {
      title: [
        {
          title: "",
          fieldName: "Title",
          width: width2 * 0.25,
          level: 0,
          collapseRecord: true,
          fieldInfo: { options: getParamColumnsOptions(ParamSetOption.Disabled) }
          //запрет открытия редактора
        },
        {
          title: "",
          fieldName: "Value",
          width: width2 * 0.75,
          level: 0,
          fieldInfo: { options: getParamColumnsOptions(ParamSetOption.Disabled) }
        }
      ]
    };
  }
  async function HandlePlaneSourceRequest(data) {
    async function getRecords(dataFromParent, first, count) {
      const objOfLevels = dataFromParent ? dataFromParent : viewInfo.saveColumns.levels;
      for (const value of Object.values(objOfLevels)) {
        if (!value.field.hide && value.field.hideInCard !== true) {
          let id, text, objData, info = { levelsField: value, updateStatus: 0 };
          id = await me.getActiveSource().getFieldValue(value.field.fieldName);
          text = me.getActiveSource().getFieldTextSync(value.field.fieldName);
          if (id) {
            objData = { id, text };
          } else {
            objData = text;
          }
          if (value.items) {
            info.RecordState = value.expanded ? 32 : 160;
            if (value.expanded) ;
          }
          if (value.level > 0) {
            info.RecordLevel = value.level;
          }
          dataRecord.RecordSet.Records.push({
            ...info,
            Data: [value.field.title, objData]
          });
          if (value.items && value.expanded) {
            await getRecords(value.items);
          }
        }
      }
    }
    function getRecordCount(data2) {
      let recordCount = 0, levels = data2 ? data2 : viewInfo.saveColumns.levels;
      for (const val of Object.values(levels)) {
        if (!val.field.hide && val.hideInCard !== true) {
          recordCount += 1;
          if (val.expanded === true && val.items) {
            recordCount += getRecordCount(val.items);
          }
        }
      }
      return recordCount;
    }
    function updPending() {
      return me.getActiveSource().updatesPending === true ? "1" : "0";
    }
    function getFields() {
      let recordCount = getRecordCount();
      return {
        Fields: [
          { Name: "Index", Title: "" },
          { Name: "Title", Title: "" },
          { Name: "Value", Title: "" },
          { Name: "MultiValue", Title: "" },
          { Name: "MultiCheck", Title: "" },
          { Name: "MultiCanEditing", Title: "" },
          { Name: "MultiCanModify", Title: "" }
        ],
        RecordCount: recordCount,
        UpdatesPending: updPending()
      };
    }
    let dataRecord = {
      UpdatesPending: updPending(),
      RecordSet: {
        Attributes: ["Title", "Value"],
        Records: []
      }
    };
    switch (data.command) {
      case "getFields":
        return getFields();
      case "getRecords":
        await getRecords();
        return dataRecord;
      case "GetRecordCount":
        let request = { UpdatesPending: updPending() };
        const recordCount = getRecordCount();
        request.RecordCount = recordCount;
        return request;
      default:
        console.log(data.command);
        break;
    }
  }
  async function updateCard(needToReBuild) {
    if (viewInfo.horizontal) {
      await me.source.refresh("!");
      if (needToReBuild !== false) await buildRecords();
      await createStatusButtonForCardMode();
      updateScrollBar();
      if (me.editorMode()) {
        await showEditor();
      }
    }
  }
  async function createStatusButtonForCardMode() {
    const oldbutton = panel.querySelector(".statusButtonForCardGrid");
    if (oldbutton) oldbutton.remove();
    if (viewInfo.horizontal && me.statusData) {
      let statusButtonDiv = document.createElement("div");
      statusButtonDiv.className = "statusButtonForCardGrid";
      statusButtonDiv.style.width = indicatorSize + "px";
      statusButtonDiv.style.position = "relative";
      statusButtonDiv.style.top = "21px";
      statusButtonDiv.style.left = "0px";
      statusButtonDiv.style.zIndex = "1";
      panel.appendChild(statusButtonDiv);
      const icon = await me.getActiveSource().getFieldValue("Status");
      clientExports.createRoot(statusButtonDiv).render(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          StatusButtonCardMode,
          {
            icon: icon || "1",
            handleStatuses: me.statusData.handleStatuses,
            changeStatus: me.statusData.changeStatus
          }
        )
      );
    }
  }
  me.isCard = function() {
    return viewInfo.horizontal;
  };
  me.updateCard = async function() {
    await updateCard();
  };
  function updateGridSizeForCardMode() {
    if (viewInfo.horizontal && me.columns.fields.length > 0) {
      const width2 = me.panel.offsetWidth - indicatorSize;
      const totalWidth = me.columns.fields[0].width + me.columns.fields[1].width;
      if (totalWidth !== width2) {
        console.log(width2 - totalWidth);
        const plusWidth = (width2 - totalWidth) / 2;
        me.columns.fields[0].width += plusWidth;
        me.columns.fields[1].width += plusWidth;
      }
    }
  }
  function Zaglushka() {
    if (showIndicator) {
      if (me.zaglushka) me.zaglushka.remove();
      const zaglushka = document.createElement("div");
      zaglushka.className = "zaglushkaGrid";
      zaglushka.style.zIndex = "0";
      zaglushka.style.top = "0px";
      zaglushka.style.height = "100%";
      zaglushka.style.width = indicatorSize + "px";
      zaglushka.style.backgroundColor = "#faf9f5";
      zaglushka.style.borderRightStyle = "solid";
      zaglushka.style.borderRightColor = "#d0d0d0";
      zaglushka.style.borderRightWidth = "1px";
      me.zaglushka = zaglushka;
      me.table.appendChild(me.zaglushka);
    }
  }
  function ShowFilter() {
    const display2 = me.filter.style.display;
    me.filter.style.display = display2 === "grid" ? "none" : "grid";
    filterSize = display2 === "grid" ? 0 : rowHeight + 2;
    buildFilters();
    me.onButtonsStateChange && me.onButtonsStateChange(me);
  }
  function ShowGroup() {
    const display2 = me.groups.style.display;
    me.groups.style.display = display2 === "" ? "none" : "";
    BuildGroupsContent();
    groupSize = display2 === "" ? 0 : me.groups.getBoundingClientRect().height;
  }
  var keypress = false, drawing = false;
  panel.style.userSelect = "none";
  panel.style.overflow = "hidden";
  panel.className = "grid-panel";
  panel.tabIndex = 0;
  let test2 = throttle(handleKeyDown2, 10);
  setTimeout(() => {
    appendEvent("mousedown", handleMouseDown, panel);
    appendEvent("doubleclick", handleMouseDown, panel);
    appendEvent("mouseup", handleMouseUp, panel);
    appendEvent(
      "keydown",
      (e2) => {
        if (e2.repeat === false) {
          keypress = false;
          drawing = false;
          handleKeyDown2(e2);
        } else {
          if (!me.editorMode()) e2.preventDefault();
          if (!drawing) {
            drawing = true;
            test2(e2);
            drawing = false;
          }
        }
      },
      panel
    );
    appendEvent(
      "keyup",
      () => {
        keypress = true;
      },
      panel
    );
  }, 100);
  var lastOverElement, prevEl;
  panel.getBoundingClientRect().left;
  setTimeout(() => {
    panel.onmousemove = function(e2) {
      let el = e2.target;
      if (el !== prevEl && el.className === "grid-cell-inner") {
        let field, recordIndex = me.getActiveSource().activeRecord;
        if (viewInfo.horizontal) {
          field = el.closest("TD").levelsField.field;
        } else {
          field = el.closest("TD").field;
          recordIndex = el.closest("TABLE").recordIndex;
        }
        if (field.fieldInfo && field.fieldInfo.onHint) {
          if (me.doccfgid && !el.title) {
            const json = GetColumnHintDocs({
              ID: field.fieldInfo.columnID,
              DocCfgID: me.doccfgid,
              DocID: me.getActiveSource().getFieldTextSync("ID", recordIndex),
              MasterID: me.getActiveSource().Master.MasterID
            });
            el.title = json && json.Text ? json.Text : "";
          }
        } else {
          if (el.scrollWidth > el.offsetWidth) {
            if (el.title !== el.innerText) {
              el.title = el.innerText;
            }
          } else el.title = "";
        }
        prevEl = el;
      }
      if (el !== prevEl && el.className === "column-header-text") {
        if (el.scrollWidth > el.offsetWidth) {
          if (el.title !== el.innerText) {
            el.title = el.innerText;
          }
        } else el.title = "";
        prevEl = el;
      }
      if (lastOverElement != el) {
        panel.getBoundingClientRect().left;
        lastOverElement = el;
        while (!el.role) {
          el = el.parentElement;
          if (!el) return;
        }
      }
    };
  }, 15);
  panel.classList.add("grid-main-parent");
  me.panel = panel;
  filterSize = 0;
  me.filter = document.createElement("div");
  me.filter.style.display = "none";
  me.filter.className = "grid-filter";
  me.filter.style.position = "relative";
  me.filter.style.top = "0px";
  me.filter.style.width = "100%";
  me.filter.style.height = rowHeight + 2 + "px";
  panel.appendChild(me.filter);
  groupSize = rowHeight + 4;
  if (groupSize > 0) {
    me.groups = document.createElement("div");
    me.groups.className = "grid-groups";
    me.groups.style.display = "none";
    me.groups.style.position = "relative";
    me.groups.style.width = "100%";
    me.groups.style.height = groupSize + "px";
    me.groups.style.overflow = "hidden";
    me.groups.style.whiteSpace = "nowrap";
    panel.appendChild(me.groups);
  }
  me.header = document.createElement("div");
  me.header.className = "grid-header";
  me.header.style.position = "absolute";
  me.header.style.width = "100%";
  panel.appendChild(me.header);
  leftRightMover = document.createElement("ul");
  leftRightMover.className = "pagination";
  leftRightMover.innerHTML = '<li><span role="l">❮</span></li><li><span role="r">❯</span></li>';
  leftRightMover.style.position = "absolute";
  leftRightMover.style.right = "-7px";
  leftRightMover.style.top = "2px";
  leftRightMover.style.width = "40px";
  leftRightMover.style.height = "20px";
  leftRightMover.style.opacity = 1;
  leftRightMover.style.backgroundColor = "white";
  leftRightMover.onclick = async function(el) {
    if (el.target.innerText == "❮") {
      if (columnOffset > 0) {
        columnOffset--;
        if (me.editorMode()) await hideEditor();
        await updateAllGrid();
      }
    } else if (el.target.innerText == "❯") {
      if (rightOverflow) {
        columnOffset++;
        if (me.editorMode()) await hideEditor();
        await updateAllGrid();
      }
    }
  };
  me.header.appendChild(leftRightMover);
  me.table = document.createElement("div");
  me.table.className = "grid-table";
  me.table.style.position = "absolute";
  me.table.style.width = "100%";
  me.table.style.bottom = "1px";
  Zaglushka();
  panel.appendChild(me.table);
  me.data = document.createElement("div");
  me.data.style.float = "left";
  me.data.style.width = "100%";
  me.data.style.height = "100%";
  me.data.style.backgroundColor = GRID_BACKGROUND;
  me.data.classList.add("grid-data");
  me.data.classList.add("grid-with-row-lines");
  appendEvent(
    "wheel",
    (e2) => {
      queuedGridScroll.scrollGrid(e2, handleMouseWheel).then(() => {
        queuedGridScroll.stopQueued();
      });
    },
    me.table
  );
  var touchStartY = 0;
  appendEvent(
    "touchstart",
    (e2) => {
      let touchObj = e2.changedTouches[0];
      touchStartY = parseInt(touchObj.clientY);
    },
    me.table
  );
  appendEvent(
    "touchmove",
    (e2) => {
      queuedGridScroll.scrollGrid(e2, handleMouseWheel).then(() => {
        queuedGridScroll.stopQueued();
      });
      e2.preventDefault();
    },
    me.table
  );
  appendEvent(
    "touchend",
    (e2) => {
      handleMouseDown(e2);
    },
    me.table
  );
  if (showIndicator) {
    indicator = createIndicator("strelka");
    indicator.updated = false;
    setTimeout(() => {
      changeIndicator(dsBrowse);
    }, 100);
  }
  panel.onfocus = function(e2) {
    me.onfocus(e2);
  };
  panel.onblur = function(e2) {
    me.onblur(e2);
  };
  me.onfocus = function(e2) {
  };
  me.onblur = function(e2) {
  };
  me.table.appendChild(me.data);
  me.scrollBar = new createScrollbar(me.table, scrollView, async function(ratio) {
    var pos = Math.round((me.source.recordCount - visibleRows) * ratio);
    if (pos != firstRecord) {
      firstRecord = pos;
      let max2 = me.source.recordCount - visibleRows;
      if (firstRecord > max2) firstRecord = max2;
      currentRow = me.source.activeRecord - firstRecord;
      await buildRecords();
    }
  });
  return me;
}
const ManWhoSoldTheWorld = (data) => {
  var source = null, grid = null;
  function Init(data2) {
    function initGrid(gridPanel, data3) {
      source = new createRecordSource();
      source.onHandleRequest = function(request) {
        let params2 = /* @__PURE__ */ new Map();
        switch (data3.who) {
          case "dbview":
            params2.set("prefix", "dbview");
            params2.set("comand", "handleTable");
            params2.set("id", data3.id);
            break;
          case "Forms":
            params2.set("prefix", "programs");
            params2.set("comand", "HandleTable");
            params2.set("Path", data3.path);
            params2.set("SectionID", data3.id);
            break;
          case "Documents":
            params2.set("prefix", "documents");
            params2.set("comand", "HandleDocument");
            params2.set("DocCfgID", data3.DocCfgID);
            params2.set("SectionID", data3.id);
            params2.set("ParentID", data3.ParentID === void 0 ? 0 : data3.ParentID);
            break;
        }
        return XMLrequest(params2, request);
      };
      gridPanel.grid = new createGrid(gridPanel);
      gridPanel.grid.defaultColumns = true;
      grid = gridPanel.grid;
      grid.setSource(null);
      source.close();
      source.open();
      if (data3.state !== void 0) {
        source.onRecordIndexChanged = function(source2) {
          data3.state(source2.getFieldText("ID"));
        };
      }
      grid.setSource(source);
      grid.refreshSource();
    }
    var grP = document.getElementById(`gridpanel${data2.searchID === void 0 ? data2.id : data2.searchID}`);
    if (grP) {
      grP.innerHTML = "";
      initGrid(grP, data2);
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: Init(data) });
};
const AccorionDownIcon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAF+mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDUgNzkuMTYzNDk5LCAyMDE4LzA4LzEzLTE2OjQwOjIyICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOSAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIyLTA1LTI2VDA3OjQyOjI1KzAzOjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIyLTA1LTI2VDA3OjQyOjI1KzAzOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMi0wNS0yNlQwNzo0MjoyNSswMzowMCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyNDI4M2U1Yi1jNzY2LTNkNGQtOGU3ZS04MTBhYzgxNTQ0NWYiIHhtcE1NOkRvY3VtZW50SUQ9ImFkb2JlOmRvY2lkOnBob3Rvc2hvcDpjODMxYmNiOC1iYTNkLWNhNDQtOWM0OC04NDE1ZDMzMGMyMTQiIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDozNGJlZjY4OC02NDRjLTA5NGUtYjhiOS04MDNmOGYxYjBiMGYiIGRjOmZvcm1hdD0iaW1hZ2UvcG5nIiBwaG90b3Nob3A6Q29sb3JNb2RlPSIzIiBwaG90b3Nob3A6SUNDUHJvZmlsZT0ic1JHQiBJRUM2MTk2Ni0yLjEiPiA8eG1wTU06SGlzdG9yeT4gPHJkZjpTZXE+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJjcmVhdGVkIiBzdEV2dDppbnN0YW5jZUlEPSJ4bXAuaWlkOjM0YmVmNjg4LTY0NGMtMDk0ZS1iOGI5LTgwM2Y4ZjFiMGIwZiIgc3RFdnQ6d2hlbj0iMjAyMi0wNS0yNlQwNzo0MjoyNSswMzowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIi8+IDxyZGY6bGkgc3RFdnQ6YWN0aW9uPSJzYXZlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDoyNDI4M2U1Yi1jNzY2LTNkNGQtOGU3ZS04MTBhYzgxNTQ0NWYiIHN0RXZ0OndoZW49IjIwMjItMDUtMjZUMDc6NDI6MjUrMDM6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE5IChXaW5kb3dzKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5If8guAAACNklEQVRIib2WzXHbMBCFP2ABDy+ckTtQKojVgXTzUe7AqUDuIE4FSiqwXEHsCqQOpA5Cd6AZ+WQR2BxIJTREUvlx8q7AYn/e7lsYVeVfw1xeXg6ttQPn3EZV2e/3eO8B2O12ZFnG2dkZzbP9fo9zDmstMUaen5/J8xxjDC8vL82zcVmWhc2ybCAiX4GPb5zA3Bhzl2UZFtiIyERVL4BvwPAvHx8Ca1UdisgIKGx9UABXqnrvvV8C13/oYOa9X6rqPXAFbAFcculWRBYhhCXwHvh0uHgCA+Auxjh0zk1ijEXz0LYYFCIyUlWT5/ma0+Ub53m+VtUnYERVlVdIMzlgC9wAm7p8C6qsUsyNMVNV/QCsuqKwZVn2Rbmom+IauONnVkNek9vpoCzLqlwhhD5HBfBOVZ/qrOZt5KbY7XbEGIGkXGVZ4lxXBblV1ZUxZiYiR+Q2karI0YshBESky35FT2mMMT+ib6KtuwghcIKrI/Tdb3XSdPYWsMAYmHddiDEe1fiAJrktGFDp4dTW6nvOCd1Ky3FiRVzkeb6OMZ4751aWqgWvgS/e+zXVELbCGIOq9kUPMBORJdXw3gDbZnd9FpGHRLeKvtcSDKn0C+fcKITwwzYlvuD14F38ooOp934dY3wEJmlwXZN3q6qbepktaNctqMmt9euKjhnqa+GHerLHQJsaH8g1p/Srd06o0p4Aj8kyOyK375FOoUrQXGazGOM2JfctnEC9zEIIU1Vd/IYd5n/8u74Da5Qhkgz9pY0AAAAASUVORK5CYII=";
function TRadioButton({ json, TextFromServerToBrowser: TextFromServerToBrowser2, RadioChange, checked, jsonData }) {
  const [radioValue, setRadioValue] = React.useState(checked);
  React.useEffect(() => {
    setRadioValue(checked);
  }, [json]);
  const getRadio = () => {
    let components = [], Left, Top, Width, Height, i = 0;
    for (const [key, value] of Object.entries(json)) {
      if (value.Type === "TRadioButton") {
        Left = value.Left;
        Top = value.Top;
        Height = value.Height;
        Width = value.Width;
        components.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            FormControlLabel,
            {
              value: jsonData.keyName + "," + i,
              name: value.Name,
              index: key,
              control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                Radio,
                {
                  name: jsonData.keyName + "," + i,
                  index: key,
                  sx: {
                    "& .MuiSvgIcon-root": {
                      fontSize: 18,
                      color: "#4d4d4d",
                      "&.Mui-checked": {
                        color: "#4d4d4d"
                      }
                    }
                  }
                }
              ),
              label: TextFromServerToBrowser2(value),
              style: {
                position: "absolute",
                left: `${Left}px`,
                top: `${Top}px`,
                width: `${Width}px`,
                height: `${Height}px`
              }
            },
            value.Name
          )
        );
        i++;
      }
    }
    return components;
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(FormControl, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
    RadioGroup,
    {
      onChange: (e2) => {
        setRadioValue(e2.target.value);
        RadioChange(e2);
      },
      value: radioValue,
      children: getRadio()
    }
  ) });
}
function TSectionCheckBox({ Checked, jsonData, style: style2, Visability, disabled, label, onClick: onClick2 }) {
  const [checked, setChecked] = React.useState(Checked);
  React.useEffect(() => {
    setChecked(Checked);
  }, [Checked]);
  return (
    // <Grid >
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      FormControlLabel,
      {
        keyName: jsonData.keyName,
        style: { whiteSpace: "nowrap", ...style2, visibility: Visability, marginLeft: 0 },
        control: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Checkbox,
          {
            disabled,
            keyName: jsonData.keyName,
            style: { padding: 0 },
            checked,
            onChange: (e2) => {
              setChecked(!checked);
              onClick2(e2);
            },
            sx: { "& .MuiSvgIcon-root": { fontSize: 17 } }
          }
        ),
        label
      }
    )
  );
}
const fontWeight = {
  жирный: { fontWeight: "bold" },
  курсив: { fontStyle: "italic" },
  подчеркнутый: { textDecoration: "underline" }
};
const converAlignment = {
  центр: "center",
  влево: "left",
  вправо: "right"
};
const parseWebStyle = (styles2) => {
  if (!styles2) return {};
  try {
    const parsedJson = JSON.parse(styles2);
    return parsedJson;
  } catch (err) {
    console.error("Ошибка парсинга webStyles", err);
    return {};
  }
};
const anchorsUse = ({ json, jsonStyle }) => {
  const {
    Anchors: anchors,
    Left: left2,
    Top: top2,
    Type: type2,
    Right: rightFromServer,
    Bottom: bottomFromServer,
    Width: width2,
    Height: height2
  } = json;
  if (anchors !== void 0) {
    let styles2 = { ...jsonStyle, left: "", top: "" };
    const leftLocal = left2 || 0, anchorsArr = anchors.split(",");
    let topLocal = top2 || 0, returnj = jsonStyle;
    let right2 = Number(json.widthFromParent) - Number(left2) - Number(width2);
    right2 = isNaN(right2) ? void 0 : right2;
    let bottom2 = Number(json.heightFromParent) - Number(top2) - Number(height2);
    bottom2 = isNaN(bottom2) ? void 0 : bottom2;
    const w = anchorsArr.includes("лево") && anchorsArr.includes("право"), h2 = anchors.includes("верх") && anchors.includes("низ");
    topLocal = type2 === "TTabPagePanel" ? 0 : topLocal;
    const anchorsValues = {
      лево: { left: `${leftLocal}px` },
      право: {
        right: `${rightFromServer || right2 || 0}px`
      },
      верх: { top: `${topLocal}px` },
      низ: {
        bottom: `${bottomFromServer || bottom2 || 0}px`
      }
    };
    styles2 = anchorsArr.reduce((acc, value) => {
      return { ...acc, ...anchorsValues[value] };
    }, styles2);
    if (w) {
      if (type2 !== "TButton" && returnj.width) {
        styles2 = { ...styles2, width: "" };
      }
    }
    if (h2) {
      if (type2 !== "TButton" && returnj.height) {
        styles2 = { ...styles2, height: "" };
      }
    }
    return styles2;
  } else {
    return { ...jsonStyle, left: `${left2}px`, top: `${top2}px` };
  }
};
const getColorForms = (json, color2 = "") => {
  const { ClientColor: clientColor } = json;
  if (json.Type === "TSectionPanel") return "rgb(255, 255, 255)";
  if (!color2 && json.Type !== "TSectionPanel") return "";
  if (json.ParentColor === "1" && clientColor === "") {
    return "inherit";
  }
  let colorArr = color2 == null ? void 0 : color2.split(":"), checkColor = color2;
  if (clientColor) {
    colorArr = clientColor !== "-1" ? clientColor.split(":") : colorArr;
    checkColor = clientColor !== "-1" ? clientColor : color2;
  }
  const colorMap = {
    Черный: "black",
    Бордовый: "rgb(124,10,2)",
    Зеленый: "green",
    Коричневый: "brown",
    "Темно-синий": "darkblue",
    Пурпурный: "purple",
    "Темно-зеленый": "darkgreen",
    Серый: "gray",
    "Светло-серый": "lightgray",
    Красный: "red",
    "Светло-зеленый": "lightgreen",
    Желтый: "yellow",
    Голубой: "rgb(0, 191, 255)",
    Фиолетовый: "rgb(138, 43, 226)",
    "Светло-голубой": "aqua",
    Белый: "white",
    Подсказка: "rgb(245, 245, 220)",
    прозрачный: "transparent",
    без_заливки: "transparent"
  };
  if (colorArr[1] === void 0) {
    return colorMap[checkColor] || "inherit";
  } else {
    return `rgb(${colorArr[0]},${colorArr[1]},${colorArr[2]})`;
  }
};
const TextFromServerToBrowser = ({ json, onClick: onClick2, children }) => {
  var _a2, _b;
  const {
    AutoSize: autoSize,
    "Font-color": fontColor,
    "Font-family": fontFamily2,
    "Font-name": fontName,
    "Font-style": fontStyle2,
    "Font-size": fontSize2,
    Reference: referenceLink,
    Text: text,
    Alignment: alignment,
    BorderWidth: borderWidth,
    Enabled: enabled
  } = json;
  const enabledFinal = enabled === "1" || enabled === void 0, fontColorFinal = enabledFinal ? fontColor : "grey", fontSizeFinal = Number(fontSize2 || json.fontSizeParent);
  const webStyles = parseWebStyle(json.webStyles);
  const wAnchors = ((_a2 = json.Anchors) == null ? void 0 : _a2.includes("лево")) && ((_b = json.Anchors) == null ? void 0 : _b.includes("право"));
  const textDecorationStyle = fontStyle2 == null ? void 0 : fontStyle2.split(",").reduce((acc, value) => ({ ...acc, ...fontWeight[value] }), {});
  const textStyles = {
    width: autoSize === "1" || wAnchors ? "100%" : `${json.Width}px`,
    fontSize: `${isNaN(fontSizeFinal) ? 10 : fontSizeFinal + 2}px`,
    ...textDecorationStyle,
    overflow: "hidden",
    color: !enabledFinal ? "gray" : getColorForms(json, fontColorFinal),
    textAlign: converAlignment[alignment],
    padding: `${Number(borderWidth) / 100 * 50}px`,
    fontFamily: fontFamily2 || fontName || "inherit",
    whiteSpace: json.WordWrap !== "1" ? "pre" : "pre-wrap",
    wordWrap: json.WordWrap !== "1" ? "break-word" : "normal",
    ...webStyles
  };
  if (referenceLink === "1" && enabledFinal) {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Link$1,
      {
        keyName: json.Name || json.keyName,
        name: json.Name || json.keyName,
        namePopupMenu: json.NamePopupMenu,
        component: "button",
        variant: "body2",
        underline: "hover",
        onClick: enabledFinal && onClick2,
        style: { ...textStyles, zIndex: "2" },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Typography, { style: textStyles, children: text }),
          children
        ]
      }
    );
  } else {
    return /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Typography,
      {
        keyName: json.Name || json.keyName,
        name: json.Name || json.keyName,
        onClick: json.EventHandler && json.Type === "TLabel" && enabledFinal ? onClick2 : null,
        style: textStyles,
        children: [
          text,
          children
        ]
      }
    );
  }
};
const shapeBorderStyle = {
  сплошная: { borderStyle: "solid" },
  штрих: { borderStyle: "dashed" },
  точки: { borderStyle: "dotted" },
  штрих_и_точка: {},
  без_линии: {},
  "": {}
};
const TShape = ({ children, json }) => {
  const [shapeStyle, setShapeStyle] = reactExports.useState({});
  reactExports.useEffect(() => {
    const {
      Width: width2,
      Height: height2,
      Top: top2,
      Left: left2,
      BrushColor: bgColor,
      PenColor: borderColor2,
      BrushStyle: bgStyle,
      WidthLine: borderWidth,
      LineStyle: borderStyle,
      ShapeType: shapeType
    } = json;
    const shapeTypeObj = {
      прямоугольник: {},
      скругленный_прямоугольник: { borderRadius: "10%" },
      эллипс: { clipPath: `ellipse(48% 48%)` },
      круг: { borderRadius: "50%" },
      "": {}
    };
    const finalBg = bgStyle === "без_заливки" ? "transparent" : getColorForms(json, bgColor);
    const webStyles = parseWebStyle(json.webStyles);
    let style2 = {
      ...shapeBorderStyle[borderStyle],
      ...shapeTypeObj[shapeType],
      position: "absolute",
      left: `${left2}px`,
      top: `${top2}px`,
      width: `${width2}px`,
      height: `${height2}px`,
      overflowY: "auto",
      overflowX: "hidden",
      display: json.Visible === "0" ? "none" : "",
      zIndex: 0,
      backgroundColor: finalBg,
      borderWidth: `${borderWidth}px`,
      borderColor: `${getColorForms(json, borderColor2)}`,
      pointerEvents: "none",
      ...webStyles
    };
    style2 = anchorsUse({ json, jsonStyle: style2 });
    setShapeStyle(style2);
  }, [json]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { style: shapeStyle, name: json.Name || json.keyName, type: "TShape", children });
};
const TLabel = ({ children, json, onClick: onClick2 }) => {
  const [labelStyle, setLabelStyle] = reactExports.useState({});
  reactExports.useEffect(() => {
    const { Width: width2, Height: height2, Top: top2, Left: left2, AutoSize: autoSize } = json;
    const webStyles = parseWebStyle(json.webStyles);
    let style2 = {
      position: "absolute",
      left: `${left2}px`,
      top: `${top2}px`,
      width: autoSize !== "1" ? `${width2}px` : "",
      height: autoSize !== "1" ? `${height2}px` : "",
      overflowY: "hidden",
      overflowX: "hidden",
      display: json.Visible === "0" ? "none" : "",
      zIndex: 0,
      ...webStyles
    };
    style2 = anchorsUse({ json, jsonStyle: style2 });
    setLabelStyle(style2);
  }, [json]);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid22,
    {
      style: labelStyle,
      keyName: json.Name || json.keyName,
      type: "TLabel",
      namePopupMenu: json.NamePopupMenu,
      name: json.Name || json.keyName,
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(TextFromServerToBrowser, { json, onClick: onClick2, children })
    }
  );
};
const dragover = "_dragover_mjs81_45";
const listBoxStyles = {
  "drop-file-input": "_drop-file-input_mjs81_1",
  dragover
};
const TListBox = ({ onFileChange, style: style2, name, children }) => {
  const wrapperRef = reactExports.useRef(null);
  const [isDragOver, setIsDragOver] = reactExports.useState(false);
  const onDragEnter = () => setIsDragOver(true);
  const onDragLeave = () => setIsDragOver(false);
  const onDrop = async (e2) => {
    var _a2, _b, _c;
    e2.preventDefault();
    setIsDragOver(false);
    if (!((_a2 = e2 == null ? void 0 : e2.dataTransfer) == null ? void 0 : _a2.files) || ((_c = (_b = e2 == null ? void 0 : e2.dataTransfer) == null ? void 0 : _b.files) == null ? void 0 : _c.length) === 0) return;
    const filesData = await handleFiles(e2.dataTransfer.files);
    onFileChange && onFileChange(filesData);
  };
  const onDragOver = (e2) => {
    e2.preventDefault();
    e2.stopPropagation();
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "div",
    {
      name,
      type: "TListBox",
      ref: wrapperRef,
      className: clsx$3(listBoxStyles["drop-file-input"], { [listBoxStyles.dragover]: isDragOver }),
      onDragEnter,
      onDragLeave,
      onDragOver,
      onDrop,
      style: { ...style2 },
      children
    }
  );
};
function SlideLocal(props) {
  if (props.animation) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Slide, { direction: "left", timeout: 200, in: true, children: props.children }) });
  } else return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: props.children });
}
function ZoomLocal(props) {
  if (props.animation) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(Zoom, { timeout: 500, in: true, children: props.children }) });
  } else return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: props.children });
}
function PaperComponent(props) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Draggable, { cancel: '[class*="MuiDialogContent-root"]', children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { ...props }) });
}
const Accordion = styled((props) => /* @__PURE__ */ jsxRuntimeExports.jsx(Accordion$1, { disableGutters: true, elevation: 0, square: true, ...props }))(({ theme }) => ({
  border: `1px solid ${theme.palette.divider}`,
  "&:not(:last-child)": {
    borderBottom: 0
  },
  "&:before": {
    display: "none"
  }
}));
const AccordionSummaryLeft = styled((props) => /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummary$1, { expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowForwardIosSharpIcon, { sx: { fontSize: "0.9rem" } }), ...props }))(({ theme }) => ({
  backgroundColor: theme.palette.mode === "dark" ? "rgba(255, 255, 255, .05)" : "rgba(0, 0, 0, .03)",
  flexDirection: "row-reverse",
  "& .MuiAccordionSummary-expandIconWrapper.Mui-expanded": {
    transform: "rotate(180deg)"
  },
  "& .MuiAccordionSummary-content": {
    marginLeft: theme.spacing(1)
  }
}));
const AccordionSummary = styled((props) => /* @__PURE__ */ jsxRuntimeExports.jsx(AccordionSummary$1, { expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(ArrowForwardIosSharpIcon, { sx: { fontSize: "0.9rem" } }), ...props }))(({ theme }) => ({
  backgroundColor: theme.palette.mode === "dark" ? "rgba(255, 255, 255, .05)" : "rgba(0, 0, 0, .03)",
  // flexDirection: 'row-reverse',
  "& .MuiAccordionSummary-expandIconWrapper.Mui-expanded": {
    transform: "rotate(180deg)"
  },
  "& .MuiAccordionSummary-content": {
    marginLeft: theme.spacing(1)
  }
}));
const AccordionDetails = styled(AccordionDetails$1)(({ theme }) => ({
  padding: theme.spacing(2),
  borderTop: "1px solid rgba(0, 0, 0, .125)",
  backgroundColor: "#ffffff"
}));
const Transition = React.forwardRef(function Transition24(props, ref2) {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Slide, { direction: "up", ref: ref2, ...props });
});
function FormsMainFile(props) {
  const animations = useAtomValue(animationsAtom);
  const [dataForms, setDataForms] = reactExports.useState();
  const [tab, setTab] = reactExports.useState(0);
  const [Path, setPath2] = reactExports.useState(void 0);
  const [expanded, setExpanded] = React.useState("panel1");
  const [expandedMap, setExpandedMap] = React.useState(/* @__PURE__ */ new Map());
  const [load, setLoad] = React.useState(true);
  const [radioValues, setRadioValues] = reactExports.useState({});
  const [height2, setHeight] = reactExports.useState("100%");
  const dataSetModalId = reactExports.useContext(SmetaModalsIdContext);
  const setUnloadCallbacks = useSetAtom(setUnloadCallbacksAtom);
  const popupDataRef = reactExports.useRef(/* @__PURE__ */ new Map());
  const ContextMenuFunc = reactExports.useRef(null);
  var TabsName;
  const closingQuery = (value = "8") => {
    return new Promise(async (resolve) => {
      const config2 = {
        prefix: Prefixes.form,
        loadMask: true,
        params: {
          result: value,
          path: props.path,
          WSM: 1
        }
      };
      const resp = await smetaAxios.get("closeQuery", config2);
      if (resp.Result) return resolve(true);
      else {
        tokenProcessingTest(resp, {
          func: (data) => {
            if (data.Result) {
              props.closeQuery(data);
              return resolve(true);
            } else if (data.Form) {
              setDataForms(data);
              setUnloadCallbacks(closingQuery);
              return resolve(false);
            }
          }
        });
      }
    });
  };
  reactExports.useEffect(() => {
    if (props.jsonFormData !== void 0) {
      const key = `formsClosing`;
      if (props.closeQuery) setUnloadCallbacks({ [key]: closingQuery });
      if (props.jsonFormData.Form) {
        setPath2(props.jsonFormData.Form.Path);
        setDataForms(props.jsonFormData);
      }
    } else {
      GetSectionForms(props.CommitFormOnSection);
    }
  }, [props.jsonFormData]);
  async function GetSectionForms(CommitFormOnSection) {
    let params2 = /* @__PURE__ */ new Map(), res;
    params2.set("prefix", "forms");
    const comand = CommitFormOnSection === void 0 || CommitFormOnSection === "" ? "GetSectionForm" : "GetUpdateSectionForm";
    params2.set("comand", comand);
    params2.set("SectionID", props.id);
    if (CommitFormOnSection !== void 0) {
      res = await AxiosRequest(true, params2);
    } else {
      res = await AxiosRequest(true, params2);
    }
    if (res.Break && !res.Form) {
      tokenProcessingTest(res, { func: setLoadDataForms, from: "Forms" });
    } else {
      setLoadDataForms(res);
    }
  }
  const setLoadDataForms = (res) => {
    setDataForms(res);
    setLoad(false);
  };
  function GetParams2(json, param) {
    return json[param] === void 0 ? json[param.toLowerCase()] : json[param];
  }
  function isEmptyObject2(obj2) {
    for (var i in obj2) {
      if (obj2.hasOwnProperty(i)) {
        return false;
      }
    }
    return true;
  }
  function TextFromServerToBrowser2(json, keyName, fontSize2, click) {
    let Text2, FontStyle, ReferenceLink, FontSize, FontColor, Alignment, BorderWidth, Enabled = json.Enabled, FontFamily;
    GetParams2(json, "AutoSize") === "0" ? "hidden" : "unset";
    FontSize = Number(GetParams2(json, "Font-size")) + 2;
    Text2 = GetParams2(json, "Text");
    Enabled = Enabled === "1" ? true : Enabled === void 0 ? true : false;
    FontSize = isNaN(FontSize) ? fontSize2 === void 0 ? 11 : fontSize2 + 1 : FontSize;
    ReferenceLink = GetParams2(json, "Reference");
    FontStyle = BackFontweight(GetParams2(json, "Font-style"));
    FontColor = Enabled ? getColorForms2(GetParams2(json, "Font-color")) : "grey";
    Alignment = convertAlignment(json.Alignment);
    BorderWidth = GetParams2(json, "BorderWidth");
    BorderWidth = BorderWidth === void 0 ? void 0 : `${Number(BorderWidth) / 100 * 50}px`;
    FontFamily = GetParams2(json, "Font-name");
    FontFamily = FontFamily === void 0 ? "inherit" : FontFamily;
    if (ReferenceLink === "1" && Enabled && !click) {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        Link$1,
        {
          keyName,
          namePopupMenu: json.NamePopupMenu,
          component: "button",
          variant: "body2",
          underline: "hover",
          onClick: Enabled && ClickFormElement,
          style: { zIndex: "2" },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Typography,
            {
              style: {
                fontSize: `${FontSize}px`,
                fontWeight: FontStyle,
                fontStyle: FontStyle,
                textDecoration: FontStyle,
                color: FontColor,
                textAlign: Alignment,
                padding: BorderWidth,
                overflow: "hidden",
                fontFamily: FontFamily
              },
              children: Text2
            }
          )
        }
      );
    } else {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        Typography,
        {
          keyName,
          onClick: json.EventHandler && json.Type === "TLabel" ? ClickFormElement : null,
          style: {
            fontSize: `${FontSize}px`,
            fontWeight: FontStyle,
            fontStyle: FontStyle,
            textDecoration: FontStyle,
            color: FontColor,
            textAlign: Alignment,
            padding: BorderWidth,
            overflow: "hidden",
            fontFamily: `${FontFamily}`,
            whiteSpace: "pre-wrap"
          },
          children: Text2
        }
      );
    }
  }
  const handleChangeAccordion = (panel) => async (event) => {
    let ariaexpanded, params2 = /* @__PURE__ */ new Map(), json;
    setExpanded(!expanded);
    setExpandedMap(expandedMap.set(panel, !expandedMap.get(panel)));
    const id = event.currentTarget.getAttribute("keyName");
    let content2 = document.getElementById(id + "content");
    ariaexpanded = content2.style.display === "inline-block" ? "none" : "inline-block";
    content2.style.display = ariaexpanded;
    params2.set("prefix", "forms");
    params2.set("comand", "ElementEvent");
    params2.set("SectionID", props.id);
    params2.set("Name", id);
    params2.set("Collapsed", ariaexpanded === "inline-block" ? "0" : "1");
    params2.set("WSM", "1");
    json = await AxiosRequest(true, params2);
    checkAnswerOnElementEvent(json, "TCategoryPanelGroup");
  };
  function getColorForms2(color2, who, ClientColor, parentColor) {
    if (who === "TSectionPanel") return "rgb(255, 255, 255)";
    if (color2 === void 0 && who !== "TSectionPanel") return "";
    let colorArr = color2.split(":"), CheckColor = color2;
    if (parentColor === "1" && ClientColor === "") {
      return "inherit";
    }
    if (ClientColor !== void 0 && ClientColor !== "") {
      colorArr = ClientColor !== void 0 && ClientColor !== "-1" ? ClientColor.split(":") : colorArr;
      CheckColor = ClientColor !== "-1" ? ClientColor : colorArr;
    }
    if (colorArr[1] === void 0) {
      switch (CheckColor) {
        case "Черный":
          return "black";
        case "Бордовый":
          return "rgb(124,10,2)";
        case "Зеленый":
          return "green";
        case "Коричневый":
          return "brown";
        case "Темно-синий":
          return "darkblue";
        case "Пурпурный":
          return "purple";
        case "Темно-зеленый":
          return "darkgreen";
        case "Серый":
          return "gray";
        case "Светло-серый":
          return "lightgray";
        case "Красный":
          return "red";
        case "Светло-зеленый":
          return "lightgreen";
        case "Желтый":
          return "yellow";
        case "Голубой":
          return "rgb(0, 191, 255)";
        case "Фиолетовый":
          return "rgb(138, 43, 226)";
        case "Светло-голубой":
          return "aqua";
        case "Белый":
          return "white";
        case "Подсказка":
          return "rgb(245, 245, 220)";
      }
    } else {
      return `rgb(${colorArr[0]},${colorArr[1]},${colorArr[2]})`;
    }
  }
  function BackFontweight(FS) {
    switch (FS) {
      case "жирный":
        return "bold";
      case "курсив":
        return "italic";
      case "подчеркнутый":
        return "underline";
    }
  }
  function roughScale(x, base) {
    const parsed = parseInt(x, base);
    if (isNaN(parsed)) {
      return 0;
    }
    return parsed;
  }
  function ClickCheckBox(event) {
    const checked = event.target.checked === true ? "1" : event.target.checked === false ? "0" : void 0;
    const Name = event.currentTarget.parentElement.getAttribute("keyName");
    ClickFormElement({ checkedValue: checked }, Name);
  }
  async function ClickFormElement(event, IName, Index, Tag, Sender) {
    function GetObjectText(text) {
      if (el.dataset.datatype > 20) {
        let params22 = /* @__PURE__ */ new Map();
        params22.set("prefix", el.dataset.type);
        params22.set("comand", "SetObjectText");
        params22.set("Flag", "-1");
        params22.set("ObjType", el.dataset.datatype);
        params22.set("ObjRef", el.dataset.objref);
        params22.set("Text", text === "__.__.____" ? "" : text);
        let json = XMLrequest(params22);
        if (json) {
          if (json.ObjRef) {
            el.dataset.objref = json.ObjRef;
          }
        }
        params22 = /* @__PURE__ */ new Map();
        params22.set("prefix", el.dataset.type);
        params22.set("comand", "GetObjectText");
        params22.set("Flag", "0");
        params22.set("ObjType", el.dataset.datatype);
        params22.set("ObjRef", el.dataset.objref);
        json = XMLrequest(params22);
        Tag = el.dataset.objref;
        if (json.Text) {
          el.value = json.Text;
          el.dataset.value = json.Text;
          return json.Text;
        } else {
          el.value = "";
          return "";
        }
      } else return text;
    }
    try {
      if (event && event.currentTarget && event.currentTarget.getAttribute("namePopupMenu") && ContextMenuFunc.current !== null && ContextMenuFunc.current !== void 0) {
        ContextMenuFunc.current(event);
        return;
      }
    } catch (error) {
      console.error(error);
    }
    let params2 = /* @__PURE__ */ new Map(), Name = null, el = { dataset: { value: void 0 } }, dataValue, checked = void 0;
    if (event !== void 0) {
      if (event.currentTarget) {
        el = event.currentTarget;
        Name = event.currentTarget.getAttribute("name");
        Name = Name === null ? event.currentTarget.getAttribute("keyName") : Name;
        Name = Name === null ? event.currentTarget.getAttribute("data-path") : Name;
      } else if (event.tagName) {
        el = event;
        Name = event.getAttribute("name");
        Name = Name === null ? event.getAttribute("keyName") : Name;
        Name = Name === null ? event.getAttribute("data-path") : Name;
        Name = Name === null ? event.dataName : Name;
        if (event["$input"]) {
          el = { dataset: { value: event["$input"].element.value } };
        }
      }
      if (event.key === "Enter") {
        Name = event.target.dataset.name;
      }
      if (event.checkedValue !== void 0) {
        checked = event.checkedValue;
        Name = IName;
      } else if (event.dataset) {
        checked = event.dataset.checkstate;
      }
    }
    Name = Name === null ? IName : Name;
    if (Name !== null) {
      if (event)
        dataValue = el.dataset.value === void 0 ? event.dataset === void 0 ? void 0 : event.dataset.value : el.dataset.value;
      dataValue = GetObjectText(dataValue);
      params2.set("prefix", "forms");
      params2.set("comand", "ElementEvent");
      if (props.id !== void 0 && Path === void 0) params2.set("SectionID", props.id);
      params2.set("Name", Name);
      if (Sender !== void 0) {
        params2.set("Sender", Sender);
      }
      if (dataValue !== void 0) {
        params2.set("Text", dataValue);
      }
      if (props.head) params2.set("Head", "1");
      params2.set("Tag", Tag === void 0 ? 0 : Tag);
      if (Index) params2.set("Index", Index);
      if (checked !== void 0) params2.set("Checked", checked);
      if (props.path !== void 0) params2.set("Path", props.path);
      params2.set("WSM", "1");
      if (event && event.currentTarget !== void 0) {
        try {
          event.stopPropagation();
        } catch {
        }
      }
      const postData = { Text: params2.get("Text") };
      params2.delete("Text");
      const json = await AxiosRequest(true, params2, postData);
      checkAnswerOnElementEvent(json);
    }
    document.activeElement.blur();
  }
  function getLabelAndId(data) {
    if (!data.value) return { label: "", id: "0" };
    if (data.datatype > 20) {
      let params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", data.type);
      params2.set("comand", "SetObjectText");
      params2.set("Flag", "-1");
      params2.set("ObjType", data.datatype);
      params2.set("ObjRef", data.tag ? data.tag : "0");
      params2.set("Text", data.value);
      params2.set("WSM", "1");
      const json1 = XMLrequest(params2);
      if (json1 && json1.Selection && json1.Selection.length) {
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogSetObjText,
            {
              list: json1.Selection,
              onEdit: onEditEditor,
              record: data.record,
              CheckState: data.CheckState,
              data
            }
          ),
          {
            Title: "Выберите элемент из списка",
            style: getStyleWindow(),
            hiddenButton: true,
            blockMaximize: true
          }
        );
        return;
      }
      params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", data.type);
      params2.set("comand", "GetObjectText");
      params2.set("Flag", "0");
      params2.set("ObjType", data.datatype);
      if (json1) params2.set("ObjRef", json1.ObjRef);
      params2.set("WSM", "1");
      const json2 = XMLrequest(params2);
      if (json2 && json2.Text) {
        return { label: json2.Text, id: json1.ObjRef };
      } else {
        return { label: "", id: json1 ? json1.ObjRef : "0" };
      }
    } else return { label: data.value, id: data.tag ? data.tag : "0" };
  }
  function ClickOnDropDownListV2(data) {
    let params2 = /* @__PURE__ */ new Map();
    if (data.events.OnDropDownList) {
      params2.set("prefix", "forms");
      params2.set("comand", "ElementEvent");
      params2.set("SectionID", props.id);
      params2.set("Name", data.name);
      if (props.path) params2.set("Path", props.path);
      params2.set("et", "list");
      params2.set("List", 1);
    } else {
      params2.set("prefix", data.module || "clsbook");
      params2.set("comand", "GetObjectValues");
      params2.set("ObjType", data.datatype);
      params2.set("ObjRef", data.objref);
    }
    let otv = XMLrequest(params2);
    const result = [];
    if (otv) {
      otv = Object.values(otv.Items);
      otv.forEach((item, index2) => {
        if (typeof item === "object") {
          result.push({ label: item.text, id: item.id });
        } else {
          result.push({ label: item, id: index2 });
        }
      });
    }
    return result;
  }
  function onEditButtonClick(data) {
    function SetValueEl(otv) {
      if (otv.Form) setDataForms(otv);
    }
    let params2 = /* @__PURE__ */ new Map();
    if (data.events.OnEditButtonClick) {
      params2.set("prefix", "forms");
      params2.set("comand", "ElementEvent");
      params2.set("SectionID", props.id);
      params2.set("Name", data.name);
      params2.set("et", "edit");
      params2.set("BtnClicked", 1);
      if (props.path) params2.set("Path", props.path);
      params2.set("WSM", 1);
      let otv = XMLrequest(params2);
      if (otv.Token) {
        tokenProcessingTest(otv, {
          func: SetValueEl,
          ...data
        });
      }
    } else {
      if (data.json) tokenProcessingTest(data.json, data.subData);
    }
  }
  function onEditEditor(data) {
    let labelAndId = data.proof ? getLabelAndId(data) : { label: data.value, id: data.tag };
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "forms");
    params2.set("comand", "ElementEvent");
    if (props.id !== void 0 && data.path === void 0) {
      params2.set("SectionID", props.id);
    }
    params2.set("Name", data.name);
    if (labelAndId && labelAndId.label) params2.set("Text", labelAndId.label);
    if (labelAndId && labelAndId.id) params2.set("Tag", labelAndId.id);
    if (data.index) params2.set("Index", data.index);
    if (data.checked !== void 0) params2.set("Checked", data.checked);
    if (data.path !== void 0) {
      params2.set("Path", data.path);
    } else if (props.path !== void 0) params2.set("Path", props.path);
    params2.set("WSM", "1");
    const postData = { Text: params2.get("Text") };
    params2.delete("Text");
    AxiosRequest(true, params2, postData.Text && postData).then((res) => {
      checkAnswerOnElementEvent(res);
    });
    if (labelAndId) {
      if (data.setValue) data.setValue(labelAndId);
      if (data.setInputValue) data.setInputValue(labelAndId.label);
    }
    return labelAndId;
  }
  function checkAnswerOnElementEvent(json, from2) {
    if (!isEmptyObject2(json)) {
      if (json.error === void 0) {
        tokenProcessingTest(json, {
          func: (data) => {
            if (data.CloseAfterEvent === "1") return smetaModals.close(dataSetModalId, true);
            if (data.Form) setDataForms(data);
            const key = `formsClosing`;
            if (props.closeQuery) setUnloadCallbacks({ [key]: closingQuery });
          },
          propsId: props.id,
          from: "Forms"
        });
        if (!isEmptyObject2(json.Form)) {
          setDataForms(json);
          if (from2 !== "TCategoryPanelGroup") setExpandedMap(/* @__PURE__ */ new Map());
        }
      }
    }
  }
  function sortByIndex(arr) {
    arr.sort((a2, b2) => a2.Index > b2.Index ? 1 : -1);
  }
  function convertAlignment(item) {
    switch (item) {
      case "центр":
        return "center";
      case "влево":
        return "left";
      case "вправо":
        return "right";
    }
  }
  function LinkrefClick2(event) {
    let frame = event.target;
    let AllLinksInFrame = frame.contentDocument.getElementsByClassName("linkref");
    for (const [, value] of Object.entries(AllLinksInFrame)) {
      if (value.onclick === null) {
        value.onclick = function(event2) {
          ClickFormElement(event2);
        };
      }
    }
  }
  function radioChange(event) {
    let name, index2;
    event.stopPropagation();
    const value = event.target.value.split(",");
    name = value[0];
    index2 = value[1];
    ClickFormElement(void 0, name, index2);
  }
  function anchorsUse2(anchors, jsonStyle, left2, top2, type2, rightFromServer, bottomFromServer) {
    if (anchors !== void 0) {
      let leftLocal = left2 === void 0 ? 0 : left2;
      let topLocal = top2 === void 0 ? 0 : top2;
      let bottomLocal = top2 === void 0 ? 0 : top2;
      let w, h2, returnj = jsonStyle, anchorsArr = anchors.split(","), right2 = Number(leftLocal) > 20 ? 0 : leftLocal, bottom2 = Number(bottomLocal) > 20 ? 10 : Number(bottomLocal) + 0;
      topLocal = type2 === "TTabPagePanel" ? 0 : topLocal;
      w = anchors.includes("лево,право");
      if (!w) w = anchors.includes("лево,верх,право");
      h2 = anchors.includes("верх,низ");
      for (const [, value] of Object.entries(anchorsArr)) {
        switch (value) {
          case "лево":
            returnj = Object.assign(returnj, { left: `${leftLocal}px` });
            break;
          case "право":
            returnj = Object.assign(returnj, {
              right: `${rightFromServer === void 0 ? right2 : rightFromServer}px`
            });
            break;
          case "верх":
            returnj = Object.assign(returnj, { top: `${topLocal}px` });
            break;
          case "низ":
            returnj = Object.assign(returnj, {
              bottom: type2 === true ? `${bottomFromServer === void 0 ? "0px" : bottomFromServer}px` : `${bottomFromServer === void 0 ? bottom2 : bottomFromServer}px`
            });
            break;
        }
      }
      if (w) {
        if (type2 !== "TButton" && returnj.width) {
          if (!returnj.width.includes("%"))
            returnj = Object.assign(returnj, {
              minWidth: returnj.width
            });
          delete returnj.width;
        }
      }
      if (h2) {
        if (type2 !== "TButton" && returnj.height) {
          if (!returnj.height.includes("%"))
            returnj = Object.assign(returnj, {
              minHeight: returnj.height
            });
          delete returnj.height;
        }
      }
      return returnj;
    } else {
      let returnj = jsonStyle;
      Object.assign(returnj, { left: `${left2}px` });
      Object.assign(returnj, { top: `${top2}px` });
      return returnj;
    }
  }
  function ShouldUseFullScreen(Anchors) {
    if (Anchors !== void 0) {
      let w, h2;
      w = Anchors.includes("лево,право");
      h2 = Anchors.includes("верх,низ");
      return { w, h: h2 };
    }
  }
  function CalculateMargin(cols, target, width2, left2) {
    let TargetSolo = Number(target.split(":")[0]), count = 1, elemWidthPrecent, LeftPx = 0, RightPx = 0, RightPrecent, LeftPrecent, elemPX;
    let ColsArrayWithPrecent = cols.split(";");
    const widthprecent = width2 / 100;
    for (const [, value] of Object.entries(ColsArrayWithPrecent)) {
      if (value.substring(2, 3) !== "%") {
        if (TargetSolo === count) {
          elemWidthPrecent = `${Number(value) / widthprecent}%`;
          elemPX = Number(value) / 2;
        } else {
          if (count < TargetSolo) {
            LeftPx += Number(value) / 2;
          } else {
            RightPx += Number(value) / 2;
          }
        }
        count += 1;
      }
    }
    if (RightPx > 0) {
      elemPX += RightPx;
    } else if (LeftPx > 0) {
      elemPX -= LeftPx;
    }
    LeftPrecent = `calc(${ColsArrayWithPrecent[0]} - ${elemPX}px)`;
    RightPrecent = `calc(${ColsArrayWithPrecent[ColsArrayWithPrecent.length - 1]} - ${elemPX}px)`;
    return { ml: LeftPrecent, mr: RightPrecent, w: elemWidthPrecent };
  }
  function ChangeTabs() {
    setTimeout(() => {
      let Tabs22, tabsHeader, span;
      Tabs22 = document.getElementById("Tabs" + props.id);
      if (!Tabs22.getAttribute("styled")) {
        Tabs22.setAttribute("styled", "true");
        for (const [key, value] of Object.entries(Tabs22["_tabLabelContainers"])) {
          value.style.BorderRadius = "0px";
          value.classList.add("Borders");
          value.classList.add("selectedTabItem[selected]");
          if (Number(key) === 0) {
            value.classList.add("WithoutLeftBorder");
          } else {
            value.classList.add("LeftBorder");
          }
          if (Tabs22["_tabLabelContainers"].length - 1 === Number(key)) {
            value.classList.add("RightBorder");
          } else {
            value.classList.add("WithoutRightBorder");
          }
        }
        tabsHeader = Tabs22.children[0].children[0];
        tabsHeader.style.backgroundColor = "#ffffff";
        tabsHeader.classList.add("disableBorder");
        Tabs22.children[0].children[0].children[0].classList.add("SmartCustom");
        span = Tabs22.children[0].children[0].children[0].getElementsByTagName("span")[0];
        span.classList.add("selectionBarCustom");
        Tabs22.children[0].children[1].style.overflowY = "hidden";
        Tabs22.children[0].children[1].classList.add("headerSmartCustom");
      }
    }, 300);
  }
  function isThereChild(json) {
    for (const [, value] of Object.entries(json)) {
      if (value.Type !== void 0) {
        return true;
      }
    }
    return false;
  }
  function CheckFrameEdges(FrameEdges, Radius) {
    let FrameEdgesArr, json = {};
    if (FrameEdges !== void 0) {
      FrameEdgesArr = FrameEdges.split(",");
      if (FrameEdgesArr.length > 1) {
        for (const value of Object.values(FrameEdgesArr)) {
          json = Object.assign(json, FrameEdge(value, Radius));
        }
        return json;
      } else {
        return FrameEdge(FrameEdges, Radius);
      }
    }
  }
  function FrameEdge(value, Radius) {
    switch (value) {
      case "ВерхЛево":
        return {
          borderTopLeftRadius: `${Radius}px`
        };
      case "НизЛево":
        return {
          borderBottomLeftRadius: `${Radius}px`
        };
      case "ВерхПраво":
        return {
          borderTopRightRadius: `${Radius}px`
        };
      case "НизПраво":
        return {
          borderBottomRightRadius: `${Radius}px`
        };
    }
  }
  function CheckAlignInChild(jsonOfChilds, whatSearch, type2) {
    const align = "целиком";
    const Type = void 0;
    for (const [, value] of Object.entries(jsonOfChilds)) {
      if (value && value.Type !== Type) {
        if (value.Align === align) return true;
      }
    }
    return false;
  }
  function CheckAndReturnComponent(json, jsonData) {
    let ReturnComponent = [], Disabled, Height, Left, Top, Name, Width, RCDATA, Text2, Visability, Right, BGColor, returnSub = [], style2, Anchors, BorderWidth, Bottom, position2, ShowHint, Hint;
    Left = GetParams2(json, "Left");
    Top = GetParams2(json, "Top");
    Height = GetParams2(json, "Height");
    Width = GetParams2(json, "Width");
    Name = GetParams2(json, "Name");
    Disabled = json.Enabled;
    Disabled = Disabled === "1" ? false : Disabled === void 0 ? false : true;
    Visability = GetParams2(json, "Visible");
    Visability = Visability === "1" ? "visible" : Visability === "0" ? "hidden" : "visible";
    BGColor = getColorForms2(GetParams2(json, "Back-color"), json.Type, json.ClientColor);
    ShowHint = json.ShowHint === "1" ? true : json.ShowHint === "0" ? false : void 0;
    Hint = json.Hint;
    Anchors = json.Anchors;
    BorderWidth = json.BorderWidth;
    Right = Number(jsonData.widthFromParent) - Number(Left) - Number(json.Width);
    Right = isNaN(Right) ? void 0 : Right;
    Bottom = Number(jsonData.heightFromParent) - Number(Top) - Number(json.Height);
    Bottom = isNaN(Bottom) ? void 0 : Bottom;
    switch (json.Type) {
      case "TImage":
        let ImageContent;
        RCDATA = GetParams2(json, "RCDATA");
        style2 = {
          position: "absolute",
          // left: `${Left}px`,
          // top: `${Top}px`,
          visibility: Visability,
          width: `${Width}px`,
          height: `${Height}px`
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top, json.Type, Right);
        if (jsonData.SubLabel === "TCategoryPanel") {
          ImageContent = /* @__PURE__ */ jsxRuntimeExports.jsx(ZoomLocal, { animation: animations, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { namePopupMenu: json.NamePopupMenu, keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            "img",
            {
              onClick: json.OnClick === "" ? void 0 : ClickFormElement,
              keyName: jsonData.keyName,
              style: {
                width: `${Width}px`,
                height: `${Height}px`,
                cursor: json.OnClick === "" ? "context-menu" : "pointer",
                objectFit: json.Stretch === "1" ? "scale-down" : json.stretch === "1" ? "scale-down" : "unset"
              },
              src: `data:image/png;base64,${RCDATA}`
            }
          ) }) });
        } else {
          ImageContent = /* @__PURE__ */ jsxRuntimeExports.jsx(ZoomLocal, { animation: animations, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { namePopupMenu: json.NamePopupMenu, keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            "img",
            {
              onClick: json.OnClick === "" ? void 0 : ClickFormElement,
              keyName: jsonData.keyName,
              style: {
                width: `${Width}px`,
                height: `${Height}px`,
                cursor: json.OnClick === "" ? "context-menu" : "pointer",
                objectFit: json.Stretch === "1" ? "scale-down" : json.stretch === "1" ? "scale-down" : "unset"
              },
              src: `data:image/png;base64,${RCDATA}`
            }
          ) }) });
        }
        if (RCDATA !== void 0) ReturnComponent.push(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: ImageContent }));
        break;
      case "TButton":
        Text2 = GetParams2(json, "Text");
        let ButtonContent;
        const rcdataIcon = json.RCDATA;
        let sxStyle = Text2 === "" ? {
          "& .MuiButton-startIcon": {
            margin: "0px",
            width: "inherit",
            height: "inherit"
          }
        } : Text2 === void 0 ? { "& .MuiButton-startIcon": { margin: "0px" } } : {};
        const DrawFrame = json.DrawFrame === "1" ? true : false;
        let TextContent = TextFromServerToBrowser2(json);
        if (Number(Width) < 35 && Number(Height) < 35) {
          TextContent = Text2;
        }
        Height = `${Height}px`;
        let icon = /* @__PURE__ */ jsxRuntimeExports.jsx("img", { style: { height: Height, width: "inherit" }, src: `data:image/png;base64,${rcdataIcon}` });
        Width = `${Width}px`;
        style2 = {
          color: Disabled ? getColorForms2(json["Font-color"]) : "grey",
          backgroundColor: getColorForms2(json["Back-color"]),
          minWidth: "1px",
          width: Width,
          height: Height,
          position: "absolute",
          textTransform: "none",
          visibility: Visability
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top, json.Type, Right);
        if (json.Anchors !== void 0 && json.Anchors.includes("право,верх")) {
          Right = Number(jsonData.widthFromParent) - Number(Left) - Number(json.Width);
          delete style2.left;
          Object.assign(style2, { right: `${Right}px` });
        }
        ButtonContent = /* @__PURE__ */ jsxRuntimeExports.jsx(ZoomLocal, { animation: animations, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Tooltip,
          {
            title: ShowHint ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { whiteSpace: "pre-wrap" }, children: Hint }) : "",
            style: { zIndex: "99999" },
            children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
              Button$2,
              {
                namePopupMenu: json.NamePopupMenu,
                keyName: jsonData.keyName,
                disabled: Disabled,
                name: Name,
                secid: props.id,
                id: jsonData.keyName,
                onClick: ClickFormElement,
                variant: DrawFrame ? "outlined" : "text",
                startIcon: rcdataIcon === void 0 ? void 0 : icon,
                sx: sxStyle,
                style: style2,
                Path: jsonData.Path,
                children: [
                  TextContent,
                  SubDataProcessing(json, { Path: jsonData.Path })
                ]
              }
            )
          }
        ) });
        ReturnComponent.push(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: ButtonContent }));
        break;
      case "TSectionCheckBox":
        Text2 = GetParams2(json, "Text");
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: `${Width}px`,
          height: `${Height}px`
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top, json.Type, Right);
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            TSectionCheckBox,
            {
              disabled: Disabled,
              Checked: json.Checked === "0" ? false : true,
              jsonData,
              style: style2,
              Visability,
              label: TextFromServerToBrowser2(json, jsonData.keyName),
              onClick: ClickCheckBox
            }
          )
          // <Grid keyName={jsonData.keyName} style={{ whiteSpace: "nowrap" }}>
          //   <FormControlLabel
          //     keyName={jsonData.keyName}
          //     style={{
          //       width: "max-content",
          //       position: "absolute",
          //       left: `${Left}px`,
          //       top: `${Top}px`,
          //       width: `${Width}px`,
          //       height: `${Height}px`,
          //       visibility: Visability,
          //     }}
          //     control={
          //       <Checkbox
          //         disabled={Disabled}
          //         keyName={jsonData.keyName}
          //         style={{ padding: 0 }}
          //         // defaultChecked={json.Checked === "0" ? false : true}
          //         checked={json.Checked === "0" ? false : true}
          //         onChange={ClickCheckBox}
          //         sx={{ "& .MuiSvgIcon-root": { fontSize: 17 } }}
          //       />
          //     }
          //     label={TextFromServerToBrowser(json, jsonData.keyName)}
          //   />
          // </Grid>
        );
        break;
      case "TSectionEditor":
        let EditStyle2, EditStyleCompleteInt = 0, PickListEditor2 = "", list = void 0, ReadOnly;
        ReadOnly = json.ReadOnly === "1" ? true : false;
        Text2 = GetParams2(json, "Text");
        Text2 = Text2 === "" || Text2 == void 0 ? json.CloseUpListStr === void 0 ? "" : json.CloseUpListStr : Text2;
        let fontSize2 = `${Number(GetParams2(json, "Font-size")) + 2}px`;
        let fontColor = getColorForms2(GetParams2(json, "Font-color"));
        let fontFamily2 = `${GetParams2(json, "Font-name")}`;
        let styleInput = {
          fontSize: fontSize2 ? fontSize2 : "13px",
          color: fontColor ? fontColor : "#ffffff",
          fontFamily: fontFamily2 ? fontFamily2 : void 0,
          height: `calc(${Height}px - 2px)`
        };
        let styleComponent = {
          height: `calc(${Height}px - 2px)`
        };
        let checkstate = GetParams2(json, "Checked");
        let placeholderEditor = GetParams2(json, "EmptyText");
        let showHint = GetParams2(json, "ShowHint") === "1" ? true : false;
        let hintText = GetParams2(json, "Hint");
        let borderStyle = GetParams2(json, "BorderStyle") === "линия" ? true : false;
        EditStyle2 = GetParams2(json, "EditStyle");
        PickListEditor2 = GetParams2(json, "PickList");
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: `${Width}px`,
          height: `${Height}px`,
          visibility: Visability,
          alignItems: "center",
          display: "grid"
        };
        if (borderStyle) {
          style2.border = "1px solid #cccccc";
        }
        style2 = anchorsUse2(Anchors, style2, Left, Top, json.Type, Right, Bottom);
        EditStyle2 = EditStyle2 === void 0 ? EditStyle2 : EditStyle2.split(",");
        list = PickListEditor2 && PickListEditor2.replace(/(\r\n)+$/, "");
        if (EditStyle2 !== void 0) {
          EditStyle2.forEach((item) => {
            EditStyleCompleteInt += EditStyleJson[item] ? EditStyleJson[item] : 0;
          });
        }
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: style2, keyName: json.keyName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            Editor,
            {
              datatype: json.ObjType,
              type: json.Module,
              from: "forms",
              objref: json.Tag,
              readonly: ReadOnly,
              background: Disabled,
              list,
              name: json.Name,
              id: jsonData.keyName,
              disabled: Disabled === true ? true : false,
              value: Text2,
              editStyle: EditStyleCompleteInt,
              checked: checkstate ? checkstate : json.Checked,
              onDropDownList: ClickOnDropDownListV2,
              onEdit: onEditEditor,
              onEditButtonClick,
              placeholder: placeholderEditor ? placeholderEditor : json.EmptyText === void 0 ? "" : json.EmptyText,
              placeholderVisible: "1",
              showHint,
              hintText,
              styleInput,
              styleComponent,
              onEvents: {
                OnEditButtonClick: json.OnEditButtonClick ? true : false,
                OnDropDownList: json.OnDropDownList ? true : false,
                OnCloseUpList: json.OnCloseUpList ? true : false,
                OnChange: json.OnChange ? true : false
              }
            }
          ) })
        );
        break;
      case "TSectionPanel":
        if (json.align) {
          Width = "100%";
          Height = "100%";
        } else {
          Width = `${Width}px`;
          Height = `${Height}px`;
        }
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: Width,
          height: Height,
          visibility: Visability,
          backgroundColor: BGColor
        };
        switch (json.CLSID) {
          case "{A5CDFCEB-A95A-4ABC-839E-77D1D1F5CD86}": {
            if (Left === void 0 && Top === void 0) {
              delete style2.left;
              delete style2.top;
              delete style2.position;
            }
            style2 = anchorsUse2(Anchors, style2, Left, Top, Right, Bottom);
            ReturnComponent.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { id: `innerHTMLpanel` + props.id, keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(TabsForReports$1, { reportData: json, ID: props.id }) })
            );
            break;
          }
          case "{408E20A3-4BE3-4DCD-98BD-2613A8968783}":
            if (Left === void 0 && Top === void 0) {
              delete style2.left;
              delete style2.top;
              delete style2.position;
            }
            const iframe = /* @__PURE__ */ jsxRuntimeExports.jsx(
              "iframe",
              {
                className: "iframeStimateCustom",
                srcdoc: json.content.replace("overflow: hidden;", "overflow: auto;"),
                onLoad: LinkrefClick2
              }
            );
            ReturnComponent.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { id: `innerHTMLpanel` + props.id, keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { height: "inherit" }, children: iframe }) })
            );
            break;
          case "{295EA015-4573-4AD9-922A-A14CE0FD9C78}":
            let Path2 = json.Params.Path;
            if (Path2 !== void 0) {
              let params2 = /* @__PURE__ */ new Map();
              params2.set("prefix", "programs");
              params2.set("comand", "GetTableLayout");
              params2.set("ObjType", "0");
              params2.set("Path", Path2);
              params2.set("SectionID", props.id);
              XMLrequest(params2);
              ReturnComponent.push(
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  Grid$1,
                  {
                    id: `gridpanel` + props.id,
                    "data-path": Path2,
                    keyName: jsonData.keyName,
                    style: {
                      position: "absolute",
                      left: `${Left}px`,
                      top: `${Top}px`,
                      width: Width,
                      height: Height,
                      visibility: Visability,
                      backgroundColor: BGColor
                    },
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { elevation: 2 })
                  }
                )
              );
            }
            break;
          case "{D9DE8B26-C68B-4318-96EA-FD75497A5C91}":
            delete style2.backgroundColor;
            const noOptionsText = "Если в справочнике нет необходимого адреса, введите ближайший населенный пункт";
            style2 = anchorsUse2(Anchors, style2, Left, Top, "", Right);
            if (json.BorderStyle === "нет") ;
            ReturnComponent.push(
              /* @__PURE__ */ jsxRuntimeExports.jsx("div", { keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                EditorAdress,
                {
                  text: json.Text,
                  noOptionsText,
                  height: Number(json.Height),
                  disabled: Disabled,
                  ReadOnly: json.ReadOnly === "1" ? true : false,
                  style: {
                    width: "100%",
                    height: Height,
                    visibility: Visability,
                    borderStyle: json.BorderStyle === "нет" ? "none" : "revert-layer",
                    border: "none",
                    outline: "none",
                    fontFamily: json["Font-name"],
                    color: getColorForms2(GetParams2(json, "Font-color"))
                  },
                  keyName: jsonData.keyName,
                  placeholder: json.EmptyText,
                  ClickForm: ClickFormElement,
                  onlySelectValue: true
                }
              ) })
            );
            break;
        }
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              keyName: jsonData.keyName,
              style: {
                position: "absolute",
                left: `${Left}px`,
                top: `${Top}px`,
                width: `${Width}px`,
                height: `${Height}px`,
                visibility: Visability,
                backgroundColor: BGColor
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { elevation: 2, children: SubDataProcessing(json, { Path: jsonData.Path }) })
            }
          )
        );
        break;
      case "TLabel":
        let FixedWidth = roughScale(Width, 10) + 8;
        if (json.width === void 0 && jsonData.SubLabel !== "TMarkingPanel") FixedWidth = void 0;
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: `${FixedWidth}px`,
          height: `${Height}px`,
          visibility: Visability
          // zIndex:1
        };
        Anchors = json.Anchors;
        if (json.AutoSize === "1") delete style2.width;
        if (Anchors !== void 0) {
          Anchors = ShouldUseFullScreen(Anchors);
          if (json.Anchors !== void 0 && json.Anchors.includes("право,верх") && !json.Anchors.includes("лево")) {
            delete style2.left;
            Object.assign(style2, { right: `${Right}px` });
          }
        } else {
          Height = `${Height}px`;
        }
        Width = `${Width}px`;
        if (json.Align === "целиком") {
          Width = "100%";
          Height = "95%";
        }
        if (json.Alignment === "центр" && !jsonData.ColsFromParent) {
          Object.assign(style2, { width: `${100}%` });
        }
        if (jsonData.ColsFromParent) {
          const jm = CalculateMargin(jsonData.ColsFromParent, json.Target, jsonData.widthFromParent);
          style2 = Object.assign(style2, { right: jm.mr, left: jm.ml });
        }
        if (Anchors !== void 0 && Anchors.w && !jsonData.ColsFromParent) {
          delete style2.width;
          style2 = Object.assign(style2, { right: Right });
        }
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            TLabel,
            {
              namePopupMenu: json.NamePopupMenu,
              keyName: jsonData.keyName,
              json,
              onClick: (e2) => ClickFormElement(e2, null, null, json.Tag),
              children: SubDataProcessing(json)
            },
            jsonData.keyName
          )
        );
        break;
      case "TPopupMenu":
        popupDataRef.current.set(json.Name, json);
        break;
      case "TCategoryPanelGroup":
        RCDATA = GetParams2(json, "RCDATA");
        if (json.Align === "целиком") {
          Height = `100%`;
          Width = `100%`;
        } else {
          Height = `${Height}px`;
          Width = `${Width}px`;
        }
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: Width,
          height: Height,
          overflowY: "auto",
          overflowX: "hidden",
          visibility: Visability
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top);
        if (Anchors.w) {
          delete style2.width;
          style2 = Object.assign(style2, { right: Right });
        }
        if (Anchors.h) {
          delete style2.height;
          style2 = Object.assign(style2, { bottom: "20px" });
        }
        if (style2.minWidth) delete style2.minWidth;
        if (style2.minHeight) delete style2.minHeight;
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(libExports.Scrollbars, { autoHide: true, children: SubDataProcessing(json, {
            RCDATA,
            Path: jsonData.Path,
            subElement: jsonData.SubLabel,
            ChevronAlignment: json.ChevronAlignment
          }) }) })
        );
        break;
      case "TCategoryPanel":
        let Caption;
        jsonData.keyName;
        let fs, Collapsed, styleForParent = { marginBottom: "2%" }, AccordionSummaryContent2;
        if (json.Caption) {
          Caption = json.Caption;
        } else {
          Caption = json.caption;
        }
        if (json.click$name) {
          json.click$name;
        }
        Collapsed = json.Collapsed;
        Collapsed = json.Collapsed === 1 ? false : json.Collapsed === void 0 ? false : true;
        let BoolOpen = expandedMap.get(jsonData.keyName);
        if (Collapsed && BoolOpen === void 0) {
          expandedMap.set(jsonData.keyName, !Collapsed);
        } else if (!Collapsed && BoolOpen === void 0) {
          expandedMap.set(jsonData.keyName, Collapsed);
        }
        BoolOpen = expandedMap.get(jsonData.keyName);
        const imgData = json["RCDATA"] === void 0 ? jsonData.RCDATAFormParent : json["RCDATA"];
        let HadImg = imgData !== void 0 ? true : false;
        Width = Width === void 0 ? "100%" : `${Width}px`;
        position2 = "relative";
        for (const [, value] of Object.entries(json)) {
          if (value && value.Type === "TGradientPanel") {
            position2 = "unset";
          }
        }
        position2 = jsonData.SubLabel === "TTabbedPages" ? "relative" : position2;
        style2 = {
          width: Width,
          height: `${Height}px`,
          display: BoolOpen ? "inline-block" : "none",
          backgroundColor: "#ffffff",
          padding: 0,
          position: position2
        };
        fs = BackFontweight(json["Font-style"]);
        if (json.align === "целиком") {
          Object.assign(styleForParent, { width: "100%", height: "100%" });
        }
        if (jsonData.ChevronAlignment === "право" || jsonData.ChevronAlignment === void 0) {
          AccordionSummaryContent2 = /* @__PURE__ */ jsxRuntimeExports.jsx(
            AccordionSummary,
            {
              keyName: jsonData.keyName,
              style: { backgroundColor: "#edeae2" },
              expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: AccorionDownIcon }),
              children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  namePopupMenu: json.NamePopupMenu,
                  container: true,
                  direction: "row",
                  justifyContent: "flex-start",
                  alignItems: "center",
                  keyName: jsonData.keyName,
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { position: "relative", left: "-16px" }, keyName: jsonData.keyName, children: imgData === void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: `data:image/png;base64,${imgData}` }) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, keyName: jsonData.keyName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Typography,
                      {
                        keyName: jsonData.keyName,
                        style: {
                          fontWeight: fs,
                          fontStyle: fs,
                          textDecoration: fs
                        },
                        children: Caption
                      }
                    ) })
                  ]
                }
              )
            }
          );
        } else if (jsonData.ChevronAlignment === "влево") {
          AccordionSummaryContent2 = /* @__PURE__ */ jsxRuntimeExports.jsx(
            AccordionSummaryLeft,
            {
              keyName: jsonData.keyName,
              style: { backgroundColor: "#edeae2" },
              expandIcon: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: AccorionDownIcon }),
              children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  container: true,
                  direction: "row",
                  justifyContent: "flex-start",
                  alignItems: "center",
                  keyName: jsonData.keyName,
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { position: "relative", left: "-4px" }, keyName: jsonData.keyName, children: imgData === void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: `data:image/png;base64,${imgData}` }) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, keyName: jsonData.keyName, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                      Typography,
                      {
                        keyName: jsonData.keyName,
                        style: {
                          fontWeight: fs,
                          fontStyle: fs,
                          textDecoration: fs
                        },
                        children: Caption
                      }
                    ) })
                  ]
                }
              )
            }
          );
        }
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Accordion,
            {
              expanded: BoolOpen,
              onChange: handleChangeAccordion(jsonData.keyName),
              keyName: jsonData.keyName,
              style: styleForParent,
              children: [
                AccordionSummaryContent2,
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  AccordionDetails,
                  {
                    keyName: jsonData.keyName + "content",
                    id: jsonData.keyName + "content",
                    bool: "false",
                    style: style2,
                    children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: style2, children: SubDataProcessing(json, {
                      subElement: "TCategoryPanel",
                      RCDATA: HadImg,
                      Path: jsonData.Path
                    }) })
                  }
                )
              ]
            }
          )
        );
        break;
      case "TTabbedPages":
        let ClicTabItem = function(event) {
          let gridPanel = document.getElementById("gridpanel" + props.id);
          setTab(event.detail.index);
          ClickFormElement(void 0, TabsName, event.detail.index);
          if (gridPanel) {
            let Path2 = gridPanel.dataset.path;
            ManWhoSoldTheWorld({ id: props.id, path: Path2, who: "Forms" });
          }
        };
        let SortedTabs = [];
        for (const value of Object.values(json)) {
          if (typeof value === "object" && value.Visible === "1") {
            SortedTabs.push(value);
          }
        }
        sortByIndex(SortedTabs);
        json.ItemIndex === void 0 ? 0 : Number(json.ItemIndex);
        TabsName = jsonData.keyName;
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: `${Width}px`,
          height: `${Height}px`,
          display: Visability,
          backgroundColor: BGColor,
          padding: "0px"
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top);
        if (json.Align === "целиком") {
          Object.assign(style2, { width: "100%", height: "100%" });
        }
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Tabs,
            {
              keyName: jsonData.keyName,
              class: "Tabs",
              selectedIndex: tab,
              id: "Tabs" + props.id,
              onChange: ClicTabItem,
              style: style2,
              children: [
                SubDataProcessing(SortedTabs, {
                  Path: jsonData.Path,
                  subElement: "TTabbedPages"
                }),
                ChangeTabs()
              ]
            }
          )
        );
        break;
      case "TTabPagePanel":
        Text2 = GetParams2(json, "Text");
        Text2 = Text2 === void 0 ? GetParams2(json, "Title") : Text2;
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          width: `${Width}px`,
          height: `${Height}px`,
          display: Visability,
          backgroundColor: BGColor,
          overflow: "auto"
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top, "TTabPagePanel");
        if (style2.minWidth) delete style2.minWidth;
        if (style2.minHeight) delete style2.minHeight;
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(TabItem, { keyName: jsonData.keyName, label: Text2, style: style2, children: SubDataProcessing(json, {
            Path: jsonData.Path,
            subElement: "TTabbedPages"
          }) })
        );
        break;
      case "TGradientPanel":
        let RelativeObertka = void 0, EventHandler = json.EventHandler === "" && json.EventHandler !== void 0 ? true : false, GradientPanel;
        position2 = "absolute";
        BGColor = getColorForms2(GetParams2(json, "Back-color"), json.Type, json.ClientColor, json.ParentColor);
        json.BorderStyle;
        let childsContent;
        let Radius = json.Radius;
        let FrameEdges = CheckFrameEdges(json.FrameEdges, Radius);
        Text2 = GetParams2(json, "Text");
        let BevelWidth = GetParams2(json, "BevelWidth");
        let Scrolling = json.Scrolling === "1" ? isThereChild(json) ? true : false : false;
        BevelWidth = BevelWidth === void 0 ? 0 : Number(BevelWidth);
        BevelWidth = Number(Radius) > 0 ? BevelWidth : 0;
        Height = `${Height}px`;
        Width = `${Width}px`;
        if (Anchors) Anchors.includes("лево,право");
        if (json.Align === "целиком") {
          Width = "100%";
          Height = "95%";
        }
        if (json.Align === "верх") {
          Top = 0;
          Left = 0;
          position2 = "relative";
        }
        if (jsonData.keyName === "ПанельАО") ;
        style2 = {
          position: position2,
          left: `${Left}px`,
          top: `${Top}px`,
          height: Height,
          width: Width,
          overflowX: "hidden",
          display: Visability === "hidden" ? "none" : "",
          backgroundColor: BGColor,
          borderRadius: `${Radius}px`,
          borderColor: "#cbcbca",
          borderStyle: "solid",
          borderWidth: `${BevelWidth}px`,
          fontFamily: json["Font-name"],
          margin: `${BorderWidth}px`,
          fontSize: `${json["Font-size"]}px`,
          boxShadow: json.Shadow !== void 0 ? "0px 1px 2px 0px rgba(0, 0, 0, 0.5)" : "0px"
        };
        style2 = Scrolling ? Object.assign(style2, { overflowY: "auto" }) : Object.assign(style2, { overflowY: "hidden" });
        style2 = CheckAlignInChild(json) ? Object.assign(style2, {
          display: "flex",
          flexFlow: "column wrap",
          justifyContent: "flex-start",
          alignItems: "flex-start"
        }) : Object.assign(style2, { position: position2 });
        if (Scrolling) {
          childsContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(libExports.Scrollbars, { autoHide: true, children: [
            SubDataProcessing(json, {
              Path: jsonData.Path,
              flexBool: CheckAlignInChild(json),
              fontSize: Number(json["Font-size"])
            }),
            json.ShowCaption === "0" ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                style: {
                  display: "flex",
                  alignItems: "center",
                  WebkitUserSelect: "none",
                  justifyContent: convertAlignment(json.Alignment),
                  MozUserSelect: "none",
                  width: "inherit",
                  height: "inherit"
                },
                children: TextFromServerToBrowser2(json, jsonData.keyName)
              }
            )
          ] });
        } else {
          childsContent = /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
            SubDataProcessing(json, {
              Path: jsonData.Path,
              flexBool: CheckAlignInChild(json),
              fontSize: Number(json["Font-size"])
            }),
            json.ShowCaption === "0" ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(
              "div",
              {
                style: {
                  display: "flex",
                  alignItems: "center",
                  justifyContent: convertAlignment(json.Alignment),
                  WebkitUserSelect: "none",
                  MozUserSelect: "none",
                  width: "inherit",
                  height: "inherit"
                },
                children: TextFromServerToBrowser2(json, jsonData.keyName)
              }
            )
          ] });
        }
        if (FrameEdges !== void 0) {
          style2 = { ...style2, ...FrameEdges, borderRadius: "0px" };
        }
        style2 = anchorsUse2(Anchors, style2, Left, Top, jsonData.SubLabel === "TForm" ? false : true, Right, Bottom);
        if (jsonData !== void 0)
          style2 = jsonData.flexBool ? Object.assign(style2, {
            position: "relative",
            minHeight: Height,
            minWidth: `${parseInt(style2.minWidth) - BorderWidth}px`,
            width: BorderWidth === void 0 ? "100%" : `calc(100% - ${BorderWidth}px)`,
            top: "0px"
          }) : style2;
        if (json.Align === "целиком") {
          Object.assign(style2, {
            flex: "0.98",
            minWidth: `${parseInt(json.Width) - BorderWidth}px`,
            minHeight: Path === void 0 ? style2.display === "flex" ? json.Height + "px" : "25px" : json.Height + "px"
          });
        }
        if (BorderWidth !== "0" && json.Align === "нет" && !CheckAlignInChild(json) && json.Parent.substring(0, 4) === "Form") {
          RelativeObertka = {
            position: "relative",
            margin: `${Number(BorderWidth) * 2}px`,
            height: json.Shadow !== void 0 ? `${parseInt(style2.height) + 2}px` : style2.height,
            overflow: "hidden",
            fontFamily: style2.FontFamily,
            fontSize: style2.fontSize
          };
          style2 = Object.assign(style2, {
            position: "absolute",
            top: 0,
            margin: `${0}px`
          });
        }
        if (json.Anchors !== void 0 && json.Anchors.includes("право,верх") && !json.Anchors.includes("лево")) {
          delete style2.left;
          Object.assign(style2, { right: `${Right}px` });
        }
        let radio = "";
        for (const value of Object.values(json)) {
          if (value && value.Type === "TRadioButton") {
            radio = value.Name;
          }
        }
        if (radio !== "") {
          let counterOfRadio = 0, defaultValueOfRadio = Name + ",";
          for (const value of Object.values(json)) {
            if (value.Type === "TRadioButton") {
              if (value.Checked === "1") {
                defaultValueOfRadio = jsonData.keyName + "," + counterOfRadio;
              }
              counterOfRadio += 1;
            }
          }
          ReturnComponent.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              TRadioButton,
              {
                jsonData,
                RadioChange: radioChange,
                json,
                checked: defaultValueOfRadio,
                TextFromServerToBrowser: TextFromServerToBrowser2
              }
            ) })
          );
        } else if (jsonData.SubLabel === "TCategoryPanel") {
          ReturnComponent.push(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                namePopupMenu: json.NamePopupMenu,
                className: EventHandler ? "" : "threed",
                keyName: jsonData.keyName,
                style: {
                  height: Height,
                  width: Width,
                  left: `${Left}px`,
                  top: `${Top}px`,
                  position: "relative",
                  overflowY: "auto",
                  overflow: "hidden"
                },
                onClick: EventHandler ? void 0 : ClickFormElement,
                children: SubDataProcessing(json, {
                  subElement: "TCategoryPanel",
                  Path: jsonData.Path
                })
              }
            )
          );
        } else {
          if (RelativeObertka !== void 0) {
            delete style2.minWidth;
            GradientPanel = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: RelativeObertka, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                namePopupMenu: json.NamePopupMenu,
                keyName: jsonData.keyName,
                style: style2,
                className: EventHandler ? "" : "threed",
                onClick: EventHandler ? void 0 : ClickFormElement,
                children: childsContent
              }
            ) });
          } else {
            GradientPanel = /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                namePopupMenu: json.NamePopupMenu,
                keyName: jsonData.keyName,
                style: style2,
                className: EventHandler ? "" : "threed",
                onClick: EventHandler ? void 0 : ClickFormElement,
                children: childsContent
              }
            );
          }
          ReturnComponent.push(/* @__PURE__ */ jsxRuntimeExports.jsx(SlideLocal, { animation: animations, children: GradientPanel }));
        }
        break;
      case "TBevel":
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: `${Width}px`,
          height: `${Height}px`,
          overflowY: "auto",
          overflowX: "hidden",
          display: Visability,
          backgroundColor: BGColor
        };
        const Shape = json.Shape;
        let styleForBorders = {
          height: "inherit",
          borderColor: "#cbcbca",
          borderRadius: "1px",
          borderStyle: "solid",
          borderWidth: "2px"
        };
        Anchors = ShouldUseFullScreen(Anchors);
        Right = Anchors.w ? `${Left}px` : `${0}px`;
        Bottom = Anchors.h ? `${Number(Top) + Number(Height)}px` : `${0}px`;
        Height = `${Height}px`;
        Width = `${Width}px`;
        switch (Shape) {
          case "прямоугольник":
            styleForBorders = Object.assign(styleForBorders, {
              borderWidth: "2px"
            });
            break;
          case "сверху":
            styleForBorders = Object.assign(styleForBorders, {
              borderWidth: "2px 0px 0px 0px"
            });
            break;
          case "слева":
            styleForBorders = Object.assign(styleForBorders, {
              borderWidth: "0px 0px 0px 2px"
            });
            break;
          case "справа":
            styleForBorders = Object.assign(styleForBorders, {
              borderWidth: "0px 2px 0px 0px"
            });
            break;
          case "снизу":
            styleForBorders = Object.assign(styleForBorders, {
              borderWidth: "0px 0px 2px 0px"
            });
            break;
          case "рамка":
            styleForBorders = Object.assign(styleForBorders, {
              borderWidth: "3px"
            });
            break;
        }
        if (jsonData.ColsFromParent) {
          const jm = CalculateMargin(jsonData.ColsFromParent, json.Target, jsonData.widthFromParent);
          style2 = Object.assign(style2, { left: jm.ml, right: jm.mr });
        }
        if (Anchors.w && jsonData.SubLabel !== "TMarkingPanel") {
          delete style2.width;
          style2 = Object.assign(style2, { right: Right, marginRight: "2px" });
        }
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { namePopupMenu: json.NamePopupMenu, keyName: jsonData.keyName, style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: styleForBorders }) })
        );
        break;
      case "TRadioGroup":
        let PickList, Columns;
        PickList = GetParams2(json, "PickList").split("\r\n");
        Text2 = GetParams2(json, "PickList").split("\r\n");
        Columns = GetParams2(json, "Columns");
        for (let key of PickList) {
          if (key !== "") {
            returnSub.push(/* @__PURE__ */ jsxRuntimeExports.jsx(FormControlLabel, { value: key, control: /* @__PURE__ */ jsxRuntimeExports.jsx(Radio, {}), label: key }));
          }
        }
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            FormControl,
            {
              style: {
                position: "absolute",
                left: `${Left}px`,
                top: `${Top}px`,
                width: `${Width}px`,
                height: `${Height}px`
              },
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsx(FormLabel, { children: Text2[0] }),
                /* @__PURE__ */ jsxRuntimeExports.jsx(
                  RadioGroup,
                  {
                    row: Columns === "1" ? false : true,
                    name: "controlled-radio-buttons-group",
                    children: returnSub
                  }
                )
              ]
            }
          )
        );
        break;
      case "TRadioButton":
        Text2 = GetParams2(json, "Text");
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            FormControlLabel,
            {
              value: json.Name,
              control: /* @__PURE__ */ jsxRuntimeExports.jsx(
                Radio,
                {
                  sx: {
                    "& .MuiSvgIcon-root": {
                      fontSize: 18,
                      color: "#4d4d4d",
                      "&.Mui-checked": {
                        color: "#4d4d4d"
                      }
                    }
                  }
                }
              ),
              label: TextFromServerToBrowser2(json),
              style: {
                position: "absolute",
                left: `${Left}px`,
                top: `${Top}px`,
                width: `${Width}px`,
                height: `${Height}px`
              }
            }
          )
        );
        break;
      case "TListBox":
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          height: `${Height}px`,
          overflowY: "auto",
          overflowX: "hidden",
          visibility: Visability,
          backgroundColor: BGColor
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top, json.Type, Right);
        const formAttachFiles = async (filesData) => {
          const reqConfig = {
            prefix: Prefixes.form,
            params: {
              name: jsonData.keyName,
              sectionId: props.id,
              WSM: 1
            }
          };
          const postData = Object.values(filesData == null ? void 0 : filesData.finalData).reduce((acc, val) => {
            return { ...acc, [val.name]: { RCDATA: val.rcdata, $content: val.name } };
          }, {});
          const resp = await smetaAxios.post("attachFiles", postData, reqConfig);
          checkAnswerOnElementEvent(resp);
        };
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(TListBox, { onFileChange: formAttachFiles, style: style2, name: jsonData.keyName, children: SubDataProcessing(json) })
        );
        break;
      case "TMarkingPanel":
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          right: `${Left}px`,
          top: `${Top}px`,
          height: `${Height}px`,
          overflowY: "auto",
          overflowX: "hidden",
          visibility: Visability,
          backgroundColor: BGColor
        };
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { keyName: jsonData.keyName, style: style2, children: SubDataProcessing(json, {
            subElement: "TMarkingPanel",
            Cols: json.Cols,
            Path: jsonData.Path
          }) })
        );
        break;
      case "TShape":
        ReturnComponent.push(
          /* @__PURE__ */ jsxRuntimeExports.jsx(TShape, { json, children: SubDataProcessing(json) }, json.Name)
        );
        break;
      case "TMemo":
        style2 = {
          position: "absolute",
          left: `${Left}px`,
          top: `${Top}px`,
          width: `${Width}px`,
          height: `${Height}px`,
          overflowY: "auto",
          overflowX: "hidden",
          display: Visability,
          backgroundColor: BGColor,
          // outline: "none",
          // resize: "none",
          border: "1px solid #cccccc"
        };
        style2 = anchorsUse2(Anchors, style2, Left, Top);
        Height = `${Height}px`;
        Width = `${Width}px`;
        ReturnComponent.push(
          // <Grid keyName={jsonData.keyName} style={style}>
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: style2, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            IMemo,
            {
              from: "form",
              Text: json.Text,
              keyname: jsonData.keyName,
              showHint: ShowHint,
              hint: Hint,
              style: {
                outline: "none",
                resize: "none",
                border: "none",
                width: "100%",
                height: "98.6%",
                overflowY: "auto",
                overflowX: "hidden"
              },
              onBlur: (event) => {
                if (event.target.value !== json.Text) {
                  const reqText = event.currentTarget.value;
                  ClickFormElement(
                    {
                      currentTarget: {
                        getAttribute: function() {
                          return jsonData.keyName;
                        },
                        stopPropagation: function() {
                          return;
                        },
                        dataset: { value: reqText }
                      }
                    },
                    jsonData.keyName
                  );
                }
              }
            }
          ) })
        );
        break;
    }
    return ReturnComponent;
  }
  function FormDataProcessing(json) {
    if (!isEmptyObject2(json) && dataForms !== void 0 && json !== void 0) {
      let val, returnAll = [];
      if (json.Form) json = json.Form;
      for (const [key, value] of Object.entries(json)) {
        val = value;
        if (val.Type !== void 0) {
          try {
            returnAll.push(
              CheckAndReturnComponent(value, {
                SubLabel: "TForm",
                keyName: key,
                widthFromParent: json.Width,
                heightFromParent: json.Height
              })
            );
          } catch (err) {
            console.error("Ошибка форм", err);
          }
        }
      }
      return /* @__PURE__ */ jsxRuntimeExports.jsx(
        "div",
        {
          className: "TestForms" + props.id,
          style: { position: "relative", height: "100%", width: "100%", overflow: "auto" },
          children: returnAll
        }
      );
    }
  }
  function SubDataProcessing(json, jsonData) {
    if (dataForms !== void 0) {
      let returnAll = [];
      const orderedArr = [];
      for (const [key, value] of Object.entries(json)) {
        if (value && value.Type !== void 0) {
          if (value.TabOrder !== void 0 && orderedArr[value.TabOrder] === void 0) {
            orderedArr[value.TabOrder] = CheckAndReturnComponent(value, {
              SubLabel: jsonData.subElement,
              keyName: key,
              RCDATAFormParent: jsonData.RCDATA,
              widthFromParent: json.Width,
              heightFromParent: json.Height,
              ColsFromParent: jsonData.Cols,
              flexBool: jsonData.flexBool,
              Path: jsonData.Path,
              fontSize: jsonData.fontSize,
              ChevronAlignment: jsonData.ChevronAlignment
            });
            continue;
          }
          returnAll.push(
            CheckAndReturnComponent(
              {
                subLabel: jsonData.subElement,
                keyName: key,
                RCDATAFormParent: jsonData.RCDATA,
                widthFromParent: json.Width,
                heightFromParent: json.Height,
                colsFromParent: jsonData.Cols,
                flexBool: jsonData.flexBool,
                path: jsonData.Path,
                fontSizeParent: jsonData.fontSize,
                chevronAlignment: jsonData.ChevronAlignment,
                ...value
              },
              {
                SubLabel: jsonData.subElement,
                keyName: key,
                RCDATAFormParent: jsonData.RCDATA,
                widthFromParent: json.Width,
                heightFromParent: json.Height,
                ColsFromParent: jsonData.Cols,
                flexBool: jsonData.flexBool,
                Path: jsonData.Path,
                fontSize: jsonData.fontSize,
                ChevronAlignment: jsonData.ChevronAlignment
              }
            )
          );
        }
      }
      return [...orderedArr, ...returnAll];
    }
  }
  if (props.jsonFormData !== void 0 && !isEmptyObject2(props.jsonFormData)) {
    let val, returnAll = [];
    let json = props.jsonFormData.Form;
    for (const [key, value] of Object.entries(json)) {
      val = value;
      if (val.Type !== void 0) {
        try {
          returnAll.push(
            CheckAndReturnComponent({
              subLabel: "TForm",
              keyName: key,
              widthFromParent: json.Width,
              heightFromParent: json.Height,
              ...value
            }, "TForm", {
              subLabel: "TForm",
              keyName: key,
              widthFromParent: json.Width,
              heightFromParent: json.Height
            })
          );
        } catch (err) {
          console.error("Ошибка форм", err);
        }
      }
    }
    return /* @__PURE__ */ jsxRuntimeExports.jsx(
      "div",
      {
        className: "TestForms" + props.id + "Sub",
        style: {
          ...props.style,
          position: "relative",
          height: "100%",
          width: "100%"
        },
        children: props.SubDataProcessing == true ? SubDataProcessing(dataForms, dataForms) : FormDataProcessing(dataForms)
      }
    );
  } else
    return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "100%" }, children: [
      load ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : props.hideSectionTools ? /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(SectionToolsJS, { ID: props.id, buildForms: FormDataProcessing, setHeight }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Grid$1,
        {
          id: "mainForms" + props.id,
          style: {
            ...props.style,
            position: "relative",
            height: "100%",
            width: "100%",
            backgroundColor: "s"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            ContextMenu,
            {
              for: "popupmenu",
              getContextMenuFunction: (func) => {
                ContextMenuFunc.current = func;
              },
              onRightClick: () => {
                return popupDataRef.current;
              },
              onMenuItemClick: ClickFormElement,
              children: load ? /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}) : FormDataProcessing(dataForms)
            }
          )
        },
        props.id
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { id: "RenderFormsModal" }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { id: "footerProgressNew" })
    ] }, props.id);
}
const FormsMainFile$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  PaperComponent,
  Transition,
  default: FormsMainFile
}, Symbol.toStringTag, { value: "Module" }));
function ContentModalWindow({ gridpanelRef, props, request }) {
  function checkRequest(request2) {
    if (!request2) {
      if (props.selectKey === "RecordIndex") {
        return {
          Name: "RecordIndex",
          Value: gridpanelRef.current.grid.source.activeRecord
        };
      }
      const reqValue = props.KeyField === "Code" ? gridpanelRef.current.grid.source.getFieldValueSync("CODE") : gridpanelRef.current.grid.source.getFieldTextSync(props.KeyField ? props.KeyField.toUpperCase() : "ID");
      return {
        Name: props.selectKey ? props.selectKey : "ObjRef",
        Value: reqValue
      };
    }
    return request2;
  }
  const getGridMultiSelect = async (grid) => {
    const multiSelect = grid.getMultiSelect();
    if (multiSelect.length === 0) {
      return 0;
    } else {
      return multiSelect.join(",");
    }
  };
  async function onButtonSelect(event, func, RequestId, from2, req) {
    const request2 = checkRequest(req);
    const gridSelection = await getGridMultiSelect(gridpanelRef.current.grid);
    event.target.value;
    gridpanelRef.current.grid.source.getFieldTextSync("NAME");
    if (props.onEdit && props.setValue && props.setInputValue) {
      const objRef = props.KeyField === "Code" ? gridpanelRef.current.grid.source.getFieldValueSync("CODE") : gridpanelRef.current.grid.source.getFieldTextSync(props.KeyField ? props.KeyField.toUpperCase() : "ID");
      if (props.record) {
        props.onEdit({
          tag: objRef,
          name: props.Name,
          fieldname: props.FieldName,
          current: props.Current,
          record: props.record,
          textchanged: "0",
          setValue: props.setValue,
          setInputValue: props.setInputValue,
          type: props.Module,
          requestId: props.RequestID,
          addInfo: props.addInfo
        });
        return;
      } else if (props.setValue && props.setInputValue) {
        props.onEdit({
          value: (await getObjText(props.Module, props.ObjType, objRef, "0")).Text,
          tag: objRef,
          name: props.Name,
          setValue: props.setValue,
          setInputValue: props.setInputValue,
          type: props.Module,
          requestId: props.RequestID,
          addInfo: props.addInfo
        });
        return;
      }
    }
    await formEdit("1", func, { ...request2, Selection: gridSelection }, RequestId, from2);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", height: "calc(100%-20)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      ContextMenu,
      {
        for: "grid",
        refs: gridpanelRef.current,
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            id: "rcgrid_panel",
            ref: gridpanelRef,
            "data-objref": gridpanelRef,
            style: {
              position: "absolute",
              width: "calc(100% - 20px)",
              height: "calc(100% - 103px)"
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { elevation: 4 })
          }
        )
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", display: "flex" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Box$1,
      {
        style: {
          marginLeft: "auto",
          position: "absolute",
          bottom: "8px",
          right: "10px"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              value: 1,
              onClick: (e2) => {
                onButtonSelect(e2, props.func ? props.func : void 0, props.RequestID, props.from, request);
              },
              style: {
                textTransform: "none",
                width: 75,
                display: props.hiddenButton ? "none" : props.Buttons && (props.Button & 1) === 0 ? "none" : ""
              },
              className: "button_Modal_Select",
              children: "Выбрать"
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              value: 2,
              style: { textTransform: "none", marginLeft: 10, width: 75 },
              className: "button_Modal_Close",
              onClick: () => {
                return formEdit("0", props.func, props.RequestID, props.from, props.request);
              },
              children: "Отмена"
            }
          )
        ]
      }
    ) })
  ] });
}
function DialogBook({ props }) {
  const gridpanelRef = reactExports.useRef(null);
  reactExports.useLayoutEffect(() => {
    GridLoader(gridpanelRef.current, props);
  }, []);
  let content2 = /* @__PURE__ */ jsxRuntimeExports.jsx(ContentModalWindow, { gridpanelRef, props });
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: content2 });
}
const DialogBook$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: DialogBook
}, Symbol.toStringTag, { value: "Module" }));
function DialogCert(props) {
  const gridpanelRef = reactExports.useRef(null);
  const [mainGrid, setMainGrid] = React.useState();
  reactExports.useLayoutEffect(() => {
    GridLoader(gridpanelRef.current, props).then((res) => {
      setMainGrid(res);
    });
  }, []);
  async function InputButton2(event, RequestID) {
    let params2 = /* @__PURE__ */ new Map(), data, json, ClickedButton = event.currentTarget.value;
    if (ClickedButton === "1") {
      data = {
        Result: ClickedButton,
        RecordIndex: mainGrid.source.activeRecord
      };
    } else {
      data = { Result: ClickedButton };
    }
    if (RequestID) {
      params2.set("prefix", "project");
      params2.set("comand", "ResumeRequest");
      params2.set("RequestID", RequestID);
      params2.set("WSM", "1");
      json = await AxiosRequest(true, params2, data);
      tokenProcessingTest(json, {
        func: props.setReturnValue,
        propsId: props.id,
        from: props.from
      });
    }
    if (props.from === "forms") ;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", height: "calc(100%-20)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        rcsgrid_panel: "",
        ref: gridpanelRef,
        "data-objref": gridpanelRef,
        style: {
          position: "absolute",
          width: "calc(100% - 20px)",
          height: "calc(100% - 103px)"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsx(Paper, { elevation: 4 })
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", display: "flex" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Box$1,
      {
        style: {
          marginLeft: "auto",
          position: "absolute",
          bottom: "8px",
          right: "10px"
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              value: 1,
              onClick: (e2) => InputButton2(e2, props.RequestID),
              style: { textTransform: "none", width: 75 },
              className: "button_Modal_Select",
              children: "Выбрать"
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              value: 2,
              onClick: (e2) => InputButton2(e2, props.RequestID),
              style: { textTransform: "none", marginLeft: 10, width: 75 },
              className: "button_Modal_Close",
              children: "Отмена"
            }
          )
        ]
      }
    ) })
  ] });
}
var smart_textbox = {};
var hasRequiredSmart_textbox;
function requireSmart_textbox() {
  if (hasRequiredSmart_textbox) return smart_textbox;
  hasRequiredSmart_textbox = 1;
  (() => {
    var __webpack_modules__ = {
      /***/
      2612: (
        /***/
        () => {
          Smart("smart-button", class extends Smart.ContentElement {
            static get properties() {
              return { value: { type: "string" }, name: { type: "string" }, type: { value: "button", type: "string" }, clickMode: { allowedValues: ["hover", "press", "release", "pressAndRelease"], type: "string", value: "release" } };
            }
            static get styleUrls() {
              return ["smart.button.css"];
            }
            template() {
              return `<button class="smart-button smart-unselectable" inner-h-t-m-l='[[innerHTML]]' id='button' type='[[type]]' name='[[name]]' value='[[value]]' disabled='[[disabled]]' role="presentation"></button>`;
            }
            refresh() {
            }
            static get listeners() {
              return { "button.down": "_downHandler", "button.mouseenter": "_mouseEnterHandler", "button.mouseleave": "_mouseLeaveHandler", "button.touchend": "_touchEndHandler", "button.click": "_clickHandler", "button.up": "_upHandler", up: "_upHandler", "button.focus": "_focusHandler", "button.blur": "_blurHandler" };
            }
            focus() {
              const e2 = this;
              e2.$.button ? e2.$.button.focus() : HTMLElement.prototype.focus.call(e2);
            }
            blur() {
              const e2 = this;
              e2.$.button ? e2.$.button.blur() : HTMLElement.prototype.blur.call(e2);
            }
            _upHandler(e2) {
              const t = this;
              if (e2.stopPropagation(), t.$.setAttributeValue("active", false), t.dataset.target) {
                const n = document.querySelector(t.dataset.target);
                let a2 = t.dataset.toggle;
                const r2 = "smart-window".toLowerCase();
                if (n && n.nodeName.toLowerCase() === r2 && "modal" === a2 && (a2 = "openModal"), "tab" === a2 || "pill" === a2 || "list" === a2) {
                  const e3 = this.closest(".nav, .list-group"), a3 = '[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]', r3 = !e3 || "UL" !== e3.nodeName && "OL" !== e3.nodeName ? e3.children(".active") : e3.querySelectorAll("li > .active");
                  if (e3) {
                    const n2 = e3.querySelectorAll(a3);
                    for (let e4 = 0; e4 < n2.length; e4++) n2[e4].classList.remove("primary");
                    for (let e4 = 0; e4 < r3.length; e4++) r3[e4].classList.remove("active");
                    let i = t.parentNode;
                    for (; i; ) {
                      if ("LI" === i.nodeName) {
                        i.classList.add("active");
                        break;
                      }
                      i = i.parentNode;
                    }
                    t.classList.add("primary");
                  }
                  return n.parentNode.querySelectorAll(".active").forEach((e4) => {
                    e4.classList.remove("active"), e4.classList.add("smart-hidden");
                  }), n.classList.add("active"), void n.classList.remove("smart-hidden");
                }
                a2 && n && !n[a2] && "collapse" === a2 && (setTimeout(() => {
                  n.classList.contains("smart-hidden") ? n.classList.remove("smart-hidden") : n.classList.add("smart-hidden");
                }), e2.originalEvent.preventDefault()), a2 && n && !n[a2] && "dropdown" === a2 ? (setTimeout(() => {
                  n.opened = !n.opened;
                }), e2.originalEvent.preventDefault()) : a2 && n && n[a2] && (setTimeout(() => {
                  n[a2]();
                }, 50), e2.originalEvent.preventDefault());
              }
            }
            _focusHandler() {
              this.$.setAttributeValue("focus", true), this.$.fireEvent("focus");
            }
            _blurHandler() {
              this.$.setAttributeValue("focus", false), this.$.fireEvent("blur");
            }
            _clickHandler(e2) {
              const t = this;
              ("release" !== t.clickMode && "pressAndRelease" !== t.clickMode || t.readonly) && (e2.preventDefault(), e2.stopPropagation());
            }
            _downHandler(e2) {
              const t = this;
              if (!(t.disabled || (t.hasRippleAnimation && Smart.Utilities.Animation.Ripple.animate(t, e2.pageX, e2.pageY), t.$.setAttributeValue("active", true), "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || t.readonly))) {
                if (t.hasAttribute("smart-blazor")) return void t.$.dispatchEvent(new Event("click"));
                const n = "buttons" in e2 ? e2.buttons : e2.which;
                t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY });
              }
            }
            _mouseEnterHandler(e2) {
              const t = this;
              if (!t.readonly && (t.$button.setAttributeValue("hover", true), t.$.setAttributeValue("hover", true), "hover" === t.clickMode)) {
                const n = "buttons" in e2 ? e2.buttons : e2.which;
                if (t.hasAttribute("smart-blazor")) return void t.$.dispatchEvent(new Event("click"));
                t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY });
              }
            }
            _touchEndHandler() {
              const e2 = this;
              setTimeout(function() {
                e2.$button.setAttributeValue("hover", false), e2.$.setAttributeValue("hover", false);
              }, 300);
            }
            _mouseLeaveHandler() {
              this.$button.setAttributeValue("hover", false), this.$.setAttributeValue("hover", false);
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const a2 = this;
              "disabled" === e2 ? (a2._setFocusable(), a2.$button && a2.$button.setAttributeValue("hover", false), a2.$.setAttributeValue("hover", false), a2 instanceof Smart.RepeatButton && a2._stopRepeat()) : "unfocusable" === e2 && a2._setFocusable();
            }
            _setFocusable() {
              const e2 = this, t = e2.$.button ? e2.$.button : e2;
              if (e2.disabled || e2.unfocusable) return t.removeAttribute("tabindex"), void (t.tabIndex = -1);
              t.tabIndex = e2.tabIndex > 0 ? e2.tabIndex : 0;
            }
            ready() {
              const e2 = this;
              super.ready(), e2.setAttribute("role", "button"), e2._setFocusable(), e2.enableShadowDOM && e2.$.hiddenInput && e2.appendChild(e2.$.hiddenInput);
            }
          }), Smart("smart-repeat-button", class extends Smart.Button {
            static get properties() {
              return { delay: { value: 50, type: "number" }, initialDelay: { value: 150, type: "number" } };
            }
            static get listeners() {
              return { "button.down": "_startRepeat", "button.mouseenter": "_overriddenHandler", "button.mouseleave": "_overriddenHandler", "button.pointerenter": "_updateInBoundsFlag", "button.pointerleave": "_updateInBoundsFlag", "button.touchmove": "_touchmoveHandler", "document.up": "_stopRepeat" };
            }
            _clickHandler(e2) {
              const t = this;
              ("release" !== t.clickMode || t.preventDefaultClick || t.readonly || t.disabled) && (e2.preventDefault(), e2.stopPropagation(), t.preventDefaultClick = false);
            }
            _updateInBoundsFlag(e2) {
              const t = this;
              -1 !== e2.type.indexOf("leave") ? (t._isPointerInBounds = false, t.$button.setAttributeValue("hover", false), t.$.setAttributeValue("hover", false)) : (t._isPointerInBounds = true, t.$button.setAttributeValue("hover", true), t.$.setAttributeValue("hover", true)), 1 !== ("buttons" in e2 ? e2.buttons : e2.which) && t._stopRepeat(e2);
            }
            _startRepeat(e2) {
              const t = this;
              t.setAttribute("active", ""), t._initialTimer || t.readonly || (t._initialTimer = setTimeout(function() {
                t._repeatTimer = setInterval(() => {
                  if (t._isPointerInBounds) {
                    if (t.hasAttribute("smart-blazor")) return t.$.dispatchEvent(new Event("click")), void (t.preventDefaultClick = true);
                    const n = "buttons" in e2 ? e2.buttons : e2.which;
                    t.$.fireEvent("click", { buttons: n, clientX: e2.clientX, clientY: e2.clientY, pageX: e2.pageX, pageY: e2.pageY, screenX: e2.screenX, screenY: e2.screenY }), t.preventDefaultClick = true;
                  }
                }, t.delay);
              }, t.initialDelay));
            }
            _stopRepeat(e2) {
              const t = this;
              t.readonly || e2 && ("pointercancel" === e2.type || e2.originalEvent && "pointercancel" === e2.originalEvent.type) || (t.$.setAttributeValue("active", false), t._repeatTimer && (clearInterval(t._repeatTimer), t._repeatTimer = null), t._initialTimer && (clearTimeout(t._initialTimer), t._initialTimer = null));
            }
            _touchmoveHandler(e2) {
              this.preventDefaultClick && e2.cancelable && (e2.preventDefault(), e2.stopPropagation());
            }
            _overriddenHandler() {
            }
          }), Smart("smart-toggle-button", class extends Smart.Button {
            static get properties() {
              return { checked: { value: false, type: "boolean?" }, falseContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminateContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminate: { value: false, type: "boolean" }, trueContent: { value: "", reflectToAttribute: false, type: "string" }, indeterminateTemplate: { value: null, type: "any" }, trueTemplate: { value: null, type: "any" }, falseTemplate: { value: null, type: "any" }, type: { value: "toggle", type: "string", defaultReflectToAttribute: true, readonly: true } };
            }
            static get listeners() {
              return { keydown: "_keyHandler", keyup: "_keyHandler", dragstart: "_dragStartHandler", "button.click": "_buttonClickHandler", "button.mouseenter": "_buttonMouseEnterHandler", "button.mouseleave": "_buttonMouseLeaveHandler", "document.up": "_documentUpHandler" };
            }
            ready() {
              super.ready(), this._setAriaState();
            }
            _setAriaState() {
              const e2 = this, t = e2.checked;
              null !== t ? e2.setAttribute("aria-pressed", t) : e2.setAttribute("aria-pressed", "mixed");
            }
            _buttonClickHandler() {
            }
            _buttonMouseLeaveHandler() {
              this.removeAttribute("hover");
            }
            _buttonMouseEnterHandler() {
              const e2 = this;
              e2.setAttribute("hover", ""), e2.disabled || e2.readonly || "hover" !== e2.clickMode || (e2._changeCheckState("pointer"), e2.focus(), e2._updateHidenInputNameAndValue());
            }
            _documentUpHandler(e2) {
              const t = this;
              t._pressed && (t._pressed = false, t.disabled || t.readonly || "press" === t.clickMode || "pointercancel" === e2.originalEvent.type || (t._changeCheckState("pointer"), t.focus(), t._updateHidenInputNameAndValue()));
            }
            _downHandler(e2) {
              const t = this;
              t.disabled || t.readonly || (t.hasRippleAnimation && Smart.Utilities.Animation.Ripple.animate(t, e2.pageX, e2.pageY), t._pressed = true, "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || (t._changeCheckState("pointer"), t.hasAttribute("smart-blazor") ? t.$.dispatchEvent(new Event("click")) : t.$.fireEvent("click"), t._updateHidenInputNameAndValue()), "press" === t.clickMode && (e2.preventDefault(), e2.stopPropagation()));
            }
            _dragStartHandler(e2) {
              e2.preventDefault();
            }
            _keyHandler(e2) {
              const t = this;
              if (true !== t.disabled && !t.readonly && 32 === e2.keyCode) {
                if ("keydown" === e2.type) return void e2.preventDefault();
                if ("none" === t.switchMode) return;
                t._changeCheckState("keyboard"), t._updateHidenInputNameAndValue();
              }
            }
            _changeCheckState(e2) {
              const t = this;
              let n = null;
              null === t.checked ? t.checked = true : (n = t.checked, t.checked = !t.checked), t._handleTextSelection(), t.$.fireEvent("change", { value: t.checked, oldValue: n, changeType: e2 }), t.checked ? t.$.fireEvent("checkValue", { changeType: e2 }) : t.$.fireEvent("uncheckValue", { changeType: e2 }), t._setAriaState();
            }
            _handleTextSelection() {
              const e2 = this;
              e2.$.addClass("smart-unselectable"), e2.timer && clearTimeout(e2.timer), e2.timer = setTimeout(() => e2.$.removeClass("smart-unselectable"), 500);
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const a2 = this;
              if ("checked" === e2) return a2.$.fireEvent("change", { value: n, oldValue: t, changeType: "api" }), void a2._setAriaState();
              switch (e2) {
                case "trueTemplate":
                  a2._handleTemplate(true);
                  break;
                case "falseTemplate":
                  a2._handleTemplate(false);
                  break;
                case "indeterminateTemplate":
                  a2._handleTemplate();
              }
            }
            _htmlBindOnInitialization() {
              const e2 = this;
              e2._bindContentProperty("trueContent", "smart-true-content"), e2._bindContentProperty("falseContent", "smart-false-content"), e2._bindContentProperty("indeterminateContent", "smart-indeterminate-content");
            }
            _bindContentProperty(e2, t) {
              const n = this;
              if (!n.$[e2 + "Container"]) return;
              let a2 = document.createElement("div");
              a2.innerHTML = n.innerHTML;
              let r2, i = a2.getElementsByClassName(t);
              if (i.length > 0) for (let e3 = 0; e3 < i.length; e3++) r2 = i[e3];
              "" === n[e2] && (n[e2] = void 0 === r2 ? "" : r2.outerHTML), n.$[e2 + "Container"].innerHTML = n[e2];
            }
            _updateContentProperties() {
              const e2 = this;
              function t(t2) {
                e2.$[t2 + "Container"] && (e2[t2] = e2.$[t2 + "Container"].innerHTML);
              }
              t("trueContent"), t("falseContent"), t("indeterminateContent");
            }
            _updateHidenInputValue() {
              const e2 = this;
              if (!e2.$.hiddenInput) return;
              let t;
              t = null === e2.checked ? "null" : false === e2.checked ? "off" : e2.value || "on", e2.$.hiddenInput.setAttribute("value", t);
            }
            _updateHidenInputName() {
              const e2 = this;
              if (!e2.$.hiddenInput) return;
              let t = false === e2.checked ? "" : e2.name || "";
              e2.$.hiddenInput.setAttribute("name", t);
            }
            _updateHidenInputNameAndValue() {
              this._updateHidenInputName(), this._updateHidenInputValue();
            }
            _handleTemplate(e2, t) {
              const n = this;
              let a2, r2, i;
              if (true === e2 ? (a2 = n.trueTemplate, r2 = n.$.trueContentContainer, i = n.trueContent) : false === e2 ? (a2 = n.falseTemplate, r2 = n.$.falseContentContainer, i = n.falseContent) : (a2 = n.indeterminateTemplate, r2 = n.$.indeterminateContentContainer, i = n.indeterminateContent), t && (r2.innerHTML = i || ""), null === a2 || !a2) return;
              if ("function" == typeof a2) return void a2(r2, { value: i });
              if (!("content" in document.createElement("template"))) return void n.error(n.localize("htmlTemplateNotSuported", { elementType: n.nodeName.toLowerCase() }));
              if (a2 = document.getElementById(a2), null === a2 || !("content" in a2)) return void n.error(n.localize("invalidTemplate", { elementType: n.nodeName.toLowerCase(), property: "template" }));
              const l = a2.content, o = l.childNodes.length, s = /{{\w+}}/g;
              let u2, d2 = [];
              for (let e3 = 0; e3 < o; e3++) for (u2 = s.exec(l.childNodes[e3].innerHTML); u2; ) d2.push({ childNodeIndex: e3, bindingString: u2[0] }), u2 = s.exec(l.childNodes[e3].innerHTML);
              const c = d2.length;
              let p2, h2, m2 = document.importNode(a2.content, true);
              for (let e3 = 0; e3 < c; e3++) {
                p2 = m2.childNodes[d2[e3].childNodeIndex], h2 = d2.length;
                for (let t2 = 0; t2 < h2; t2++) p2.innerHTML = p2.innerHTML.replace(d2[e3].bindingString, i);
              }
              r2.innerHTML = "";
              for (let e3 = 0; e3 < m2.childNodes.length; e3++) m2.childNodes[e3].outerHTML && (r2.innerHTML += m2.childNodes[e3].outerHTML);
            }
          });
        }
      ),
      /***/
      9097: (
        /***/
        () => {
          Smart("smart-check-box", class extends Smart.ToggleButton {
            static get properties() {
              return { checkMode: { value: "both", allowedValues: ["both", "input", "label"], type: "string" }, type: { value: "checkbox", type: "string", defaultReflectToAttribute: true, readonly: true } };
            }
            template() {
              return `<div id='container' class='smart-container' role="presentation">
                    <div class='smart-overlay' role="presentation"></div>
                    <span id='checkBoxInput' class='smart-input' aria-hidden="true"></span>
                    <span id='checkBoxLabel' inner-h-t-m-l='[[innerHTML]]' class='smart-label'><content></content></span>
                    <input id='hiddenInput' class='smart-hidden-input' type='hidden'>
                </div>`;
            }
            static get listeners() {
              return { down: "_downHandler", "document.up": "_documentUpHandler", "checkBoxInput.mouseenter": "_mouseEnterHandler", "checkBoxInput.mouseleave": "_mouseLeaveHandler", focus: "_focusHandler", blur: "_blurHandler" };
            }
            static get styleUrls() {
              return ["smart.toggle.css"];
            }
            _focusHandler() {
              this.$.setAttributeValue("focus", true);
            }
            _blurHandler() {
              this.$.setAttributeValue("focus", false);
            }
            _mouseEnterHandler() {
              this.$.setAttributeValue("hover", true);
            }
            _mouseLeaveHandler() {
              this.$.setAttributeValue("hover", false);
            }
            ready() {
              const e2 = this;
              super.ready(), e2.setAttribute("role", "checkbox"), e2.indeterminate && (e2._valueCache = e2.checked, e2.checked = null, e2._setAriaState()), e2.classList.add("smart-toggle-box"), e2._updateHidenInputNameAndValue();
            }
            propertyChangedHandler(e2, t, a2) {
              super.propertyChangedHandler(e2, t, a2);
              const n = this;
              switch (n._updateContentProperties(), e2) {
                case "indeterminate":
                  a2 ? (n._valueCache = n.checked, n.checked = null) : n.checked = n._valueCache, n._setAriaState(), n._updateHidenInputNameAndValue();
                  break;
                case "value":
                case "checked":
                  n._updateHidenInputNameAndValue();
                  break;
                case "name":
                  n._updateHidenInputName();
              }
            }
            _documentUpHandler(e2) {
              const t = this;
              if (!t._pressed || "pointercancel" === e2.originalEvent.type) return;
              const a2 = t.enableShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if (t._pressed = false, t.$.setAttributeValue("active", false), !(t.disabled || t.readonly || "input" === t.checkMode && a2 !== t.$.checkBoxInput || "label" === t.checkMode && a2 !== t.$.checkBoxLabel)) {
                if ("press" === t.clickMode) return e2.preventDefault(), void e2.stopPropagation();
                t._changeCheckState("pointer"), t.focus(), t._handleTextSelection(), t._updateHidenInputNameAndValue();
              }
            }
            _downHandler(e2) {
              const t = this, a2 = t.enableShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if (!(t.disabled || t.readonly || "input" === t.checkMode && a2 !== t.$.checkBoxInput || "label" === t.checkMode && a2 !== t.$.checkBoxLabel)) {
                if (t.$.setAttributeValue("active", true), t.hasRippleAnimation) {
                  const e3 = t.$.checkBoxInput.getBoundingClientRect(), a3 = window.scrollX || window.pageXOffset, n = window.scrollY || window.pageYOffset;
                  Smart.Utilities.Animation.Ripple.animate(t.$.checkBoxInput, e3.left + e3.width / 2 + a3, e3.top + e3.height / 2 + n);
                }
                t._pressed = true, "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || (t._changeCheckState("pointer"), t.$.fireEvent("click"), t.focus(), t._updateHidenInputNameAndValue());
              }
            }
            _setAriaState() {
              const e2 = this, t = e2.checked;
              null !== t ? e2.setAttribute("aria-checked", t) : e2.setAttribute("aria-checked", "mixed");
            }
          });
        }
      ),
      /***/
      1139: (
        /***/
        () => {
          Smart("smart-combo-box", class extends Smart.DropDownList {
            static get properties() {
              return { autoComplete: { allowedValues: ["none", "manual", "auto", "inline", "list"], type: "string", value: "none" }, autoCompleteDelay: { value: 100, type: "number" }, autoOpenShortcutKey: { value: [], type: "array" }, dropDownOpenMode: { allowedValues: ["none", "default", "dropDownButton", "auto"], value: "dropDownButton", defaultReflectToAttribute: true, type: "string" }, escKeyMode: { allowedValues: ["clearValue", "firstPossibleValue", "none", "previousValue"], type: "string", value: "none" }, inputPurpose: { type: "string", value: "off" }, minLength: { type: "number", value: 2 }, value: { value: "", type: "string" } };
            }
            static get listeners() {
              return { "input.focus": "_inputFocusHandler", "input.blur": "_inputFocusHandler", "dropDownButton.focus": "_dropDownButtonFocusHandler", "dropDownButton.blur": "_dropDownButtonFocusHandler", "input.change": "_inputChangeEventHandler", "input.mouseenter": "_buttonsMouseEventsHandler", "input.mouseleave": "_buttonsMouseEventsHandler", "document.down": "_documentDownHandler", "document.up": "_documentUpHandler", "document.selectstart": "_selectStartHandler", "dropDownButton.down": "_buttonsDownHandler", "dropDownButton.mouseenter": "_buttonsMouseEventsHandler", "dropDownButton.mouseleave": "_buttonsMouseEventsHandler", keydown: "_keyDownHandler", keyup: "_keyUpHandler", "listBox.change": "_listBoxChangeHandler", "listBox.itemClick": "_listBoxItemClickHandler", "listBox.keydown": "_listBoxKeyDownHandler", wheel: "_mouseWheelHandler" };
            }
            static get styleUrls() {
              return ["smart.combobox.css"];
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span class="smart-label" id="label">[[label]]</span>\n                    <div id="content" class="smart-content" role="presentation">\n                        <div class="smart-buttons-container" id="buttonsContainer" role="presentation">\n                            <span id="actionButton" class="smart-action-button" role="presentation">\n                                <input name="[[name]]" class="smart-input" id="input" placeholder="[[placeholder]]" autocomplete="[[inputPurpose]]" role="textbox" aria-label="[[placeholder]]" />\n                                <div class="smart-combo-box-auto-complete-string" id="autoCompleteString"></div>\n                            </span>\n                            <span id="dropDownButton" class="smart-drop-down-button" role="button" aria-label="Toggle popup">\n                                <span class="smart-drop-down-button-icon" id="arrow" aria-hidden="true"></span>\n                            </span>\n                        </div>\n                        <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n                            <smart-list-box id="listBox" unfocusable\n                                    animation="[[animation]]"\n                                    data-source="[[dataSource]]"\n                                    disabled="[[disabled]]"\n                                    display-loading-indicator="[[displayLoadingIndicator]]"\n                                    display-member="[[displayMember]]"\n                                    filterable="[[filterable]]"\n                                    filter-callback="[[filterCallback]]"\n                                    filter-mode="[[filterMode]]"\n                                    filter-input-placeholder="[[filterInputPlaceholder]]"\n                                    grouped="[[grouped]]"\n                                    group-member="[[groupMember]]"\n                                    item-height="[[itemHeight]]"\n                                    item-measure-mode="[[itemMeasureMode]]"\n                                    item-template="[[itemTemplate]]"\n                                    incremental-search-delay="[[incrementalSearchDelay]]"\n                                    incremental-search-mode="[[incrementalSearchMode]]"\n                                    loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n                                    loading-indicator-position="[[loadingIndicatorPosition]]"\n                                    placeholder="[[dropDownPlaceholder]]"\n                                    readonly="[[readonly]]"\n                                    right-to-left="[[rightToLeft]]"\n                                    selected-indexes="{{selectedIndexes}}"\n                                    selection-mode="[[selectionMode]]"\n                                    selected-values="{{selectedValues}}"\n                                    sorted="[[sorted]]"\n                                    theme="[[theme]]"\n                                    value-member="[[valueMember]]"\n                                    horizontal-scroll-bar-visibility="[[horizontalScrollBarVisibility]]"\n                                    vertical-scroll-bar-visibility="[[verticalScrollBarVisibility]]"\n                                    virtualized="[[virtualized]]">\n                                <content></content>\n                            </smart-list-box>\n                            <div id="resizeBar" class="smart-drop-down-resize-bar" aria-label="Resize">\n                                <div></div>\n                            </div>\n                         </div>\n                    </div>\n                    <span class="smart-hint" id="hint">[[hint]]</span>\n                </div>';
            }
            propertyChangedHandler(e2, t, o) {
              const n = this;
              switch (e2) {
                case "autoComplete":
                  if ("list" === o) {
                    n.$.listBox.$.filterInput.value = "";
                    let e3 = n.$.listBox.context;
                    n.$.listBox.context = n.$.listBox, n.$.listBox._filterItems(true), n.$.listBox.context = e3, n._setDropDownSize();
                  }
                  n._autoComplete(true), n._setAriaAutocomplete();
                  break;
                case "dataSource":
                case "displayMember":
                  n._clearSelection(true), n._setDropDownSize(), n._positionDetection.checkBrowserBounds("vertically"), n._positionDetection.positionDropDown(), n._positionDetection.checkBrowserBounds("horizontally");
                  break;
                case "disabled":
                  n.$.input.disabled = o, n._setFocusable(), n.close(), n._positionDetection && n._positionDetection.handleAutoPositioning(), n._ariaPropertyChangedHandler("disabled", o);
                  break;
                case "readonly":
                  n.$.input.readOnly = o, n.close(), n._ariaPropertyChangedHandler("readonly", o);
                  break;
                case "selectedValues":
                case "selectedIndexes":
                  n._clearSelection(true);
                  break;
                case "selectionMode":
                case "selectionDisplayMode":
                  n._clearSelection(), n._applySelectionDisplayMode(), "tokens" === n.selectionDisplayMode && (n._currentSelection = void 0), n._applySelection(n.selectionMode), "selectionMode" === e2 && super.propertyChangedHandler(e2, t, o);
                  break;
                case "tokenTemplate":
                  if (n.$.selectionField) for (; "SPAN" === n.$.selectionField.firstElementChild.nodeName; ) n.$.selectionField.removeChild(n.$.selectionField.firstElementChild);
                  n._tokenTemplate = n._validateTemplate(n.tokenTemplate), n._applySelection();
                  break;
                case "value":
                  n.clearSelection(), n.value = n.$.input.value = n._oldValue = o, n._queryItems(true), n._currentSelection && !n._currentSelection.length && n.$.fireEvent("change", { oldValue: t, value: n.$.input.value, addedItems: [], removedItems: [], selected: [], disabled: [], index: [], label: [] });
                  break;
                default:
                  super.propertyChangedHandler(e2, t, o);
              }
            }
            clearItems() {
              this.$.listBox.clearItems(), this._clearSelection(true);
            }
            clearSelection() {
              this.$.listBox.clearSelection(), this._clearSelection(!arguments[0]);
            }
            blur() {
              this.$.input.blur();
            }
            close() {
              super.close(), this.$.input.removeAttribute("aria-controls");
            }
            focus() {
              this.$.input.focus();
            }
            open() {
              super.open(), this.$.input.setAttribute("aria-controls", this.$.listBox.id);
            }
            _setFocusable() {
              const e2 = this;
              if (!e2.disabled && !e2.unfocusable) {
                let t = e2.tabIndex > 0 ? e2.tabIndex : 0;
                return e2.$.input.tabIndex = t, void ("dropDownButton" === e2.dropDownOpenMode ? e2.$.dropDownButton.setAttribute("tabindex", t) : e2.$.dropDownButton.removeAttribute("tabindex"));
              }
              e2.$.input.tabIndex = -1, e2.$.dropDownButton.removeAttribute("tabindex");
            }
            _autoComplete(e2) {
              const t = this;
              if ("list" === t.autoComplete) return;
              if (0 === t.$.listBox._items.length && "function" != typeof t.dataSource) return void t.close();
              const o = t.$.input.value.length < t.minLength ? "" : "escaped" === t.displayMode ? t._toDefaultDisplayMode(t.$.input.value) : t.$.input.value;
              let n;
              1 === t.$.listBox.selectedValues.length && (n = t.$.listBox.getItem(t.$.listBox.selectedValues[0])), t.$.autoCompleteString.textContent = "", t.$.listBox.$.filterInput.value = "none" === t.autoComplete || t.$.input.value.length < t.minLength ? "" : o;
              let i = t.$.listBox.context;
              t.$.listBox.context = t.$.listBox, t.$.listBox._filterItems(!!e2, function() {
                if (!t.$.listBox.isAttached || !t.$.input) return;
                const e3 = t.enableShadowDOM ? t.shadowRoot.activeElement : document.activeElement;
                if (t._setDropDownSize(), t.opened && (t._positionDetection.positionDropDown(), t._positionDetection.checkBrowserBounds()), t.$.listBox._filteredItems && t.$.listBox._filteredItems.length > 0) {
                  if (t.$.listBox._scrollView.scrollTop = t.$.listBox._filteredItems[0].offsetTop, "none" !== t.autoComplete && t.$.input.value.length >= t.minLength && !function(e4) {
                    for (let t2 = 0; t2 < e4.length; t2++) if (e4[t2]._focused && e4[t2].hasAttribute("focus")) return true;
                  }(t.$.listBox._filteredItems) && t._focus(t.$.listBox._filteredItems[0]), e3 === t.$.input && "inline" === t.autoComplete && t.$.input.value.length >= t.minLength && t._updateAutoCompleteHelper(), n && n[t.inputMember] === t.$.listBox._filteredItems[0][t.inputMember] && n.value === t.$.listBox._filteredItems[0].value && (t.$.listBox.context = t.$.listBox, t.$.listBox._select(t.$.listBox._filteredItems[0], true), t.$.listBox.context = i), o !== t.$.listBox._filteredItems[0][t.inputMember] || Smart.TextBox && t instanceof Smart.TextBox && "auto" === t.dropDownOpenMode) {
                    if (t._closedFromKeyCombination) return void (t._closedFromKeyCombination = false);
                    if (o.length < t.minLength && !(Smart.TextBox && t instanceof Smart.TextBox && "auto" === t.dropDownOpenMode)) return void t.close();
                    t.isCompleted && "none" !== t.dropDownOpenMode && e3 === t.$.input && t.open();
                  }
                } else t["function" == typeof t.dataSource ? "open" : "close"]();
              }, Smart.TextBox && t instanceof Smart.TextBox && "auto" === t.dropDownOpenMode), t.$.listBox.context = i;
            }
            _updateAutoCompleteHelper() {
              const e2 = this, t = e2.$.autoCompleteString;
              if (t.style.width = e2.$.input.offsetWidth + "px", t.style.height = e2.$.input.offsetHeight + "px", t.style.left = e2.$.input.offsetLeft + "px", t.style.top = e2.$.input.offsetTop + "px", t.style.paddingLeft = e2.selectedIndexes.length > 0 ? 0 : null, !e2._focusedItem) return void (t.textContent = "");
              const o = e2.$.input.value, n = e2._focusedItem[e2.inputMember];
              n.length !== o.length && 0 === n.toLowerCase().indexOf(o.toLowerCase()) && (t.textContent = e2.$.input.value + n.slice(o.length));
            }
            _applySelection(e2, t) {
              const o = this;
              if (o.$.selectionField || (o.$.selectionField = o.$.actionButton), o.$.autoCompleteString.textContent = "", 0 !== o.selectedIndexes.length) {
                if (o.$.listBox._items && 0 !== o.$.listBox._items.length) if ("one" === o.selectionMode || "zeroAndOne" === o.selectionMode || "zeroOrOne" === o.selectionMode || "radioButton" === o.selectionMode) {
                  if (o._currentSelection && o._currentSelection.length > o.selectedIndexes.length) return o._currentSelection = o.selectedIndexes.map((e3) => o.$.listBox._items[e3][o.inputMember]), o.$.input.value = o._currentSelection.toString(), void (o._oldValue = o.value = o._currentSelection.toString());
                  o._clearSelection(), o._currentSelection = o.selectedIndexes.map((e3) => o.$.listBox._items[e3][o.inputMember]), o.$.input.value = o._currentSelection.toString(), o._oldValue = o.value = o._currentSelection.toString(), o.$.container.setAttribute("has-value", ""), "none" !== o.autoComplete && "function" != typeof o.dataSource && (o._autoComplete(true), o._keyboardNavigation || o.close());
                } else {
                  for (o.$.input.value = "", o.$.input.placeholder = "", o.$.container.setAttribute("has-value", ""); "SPAN" === o.$.selectionField.firstElementChild.nodeName; ) o.$.selectionField.removeChild(o.$.selectionField.firstElementChild);
                  let e3, t2, n = document.createDocumentFragment();
                  t2 = 1 !== o.selectedIndexes.length || "oneOrManyExtended" !== o.selectionMode && "oneOrMany" !== o.selectionMode ? "tokens" === o.selectionDisplayMode ? "&#10006" : "," : "", o.selectedIndexes.map((i) => {
                    e3 = o._applyTokenTemplate(o.$.listBox._items[i][o.inputMember], t2), e3._value = o.$.listBox._items[i].value, n.appendChild(e3);
                  }), o.$.selectionField.insertBefore(n, o.$.input), o._currentSelection = o.selectedIndexes.map((e4) => o.$.listBox._items[e4][o.inputMember]), o._oldValue = o.value = o._currentSelection.toString(), o._positionDetection.positionDropDown();
                }
              } else o._clearSelection(t && t.index > -1 && o.$.input.value === o.$.listBox._items[t.index][o.inputMember]);
            }
            _applySelectionDisplayMode() {
              const e2 = this;
              "one" === e2.selectionMode || "zeroAndOne" === e2.selectionMode || "zeroOrOne" === e2.selectionMode || "radioButton" === e2.selectionMode ? e2.$.removeClass("auto-height") : e2.$.addClass("auto-height");
            }
            _bindingCompleteHandler() {
              this._queryItems(), this._setDropDownSize();
            }
            _buttonsMouseEventsHandler(e2) {
              const t = this;
              t.disabled || t.readonly || ("mouseenter" === e2.type ? (e2.target.setAttribute("hover", ""), t.setAttribute("hover", ""), "auto" !== t.dropDownOpenMode || Smart.TextBox && t instanceof Smart.TextBox ? "dropDownButton" === t.dropDownOpenMode && e2.target === t.$.dropDownButton && t.setAttribute("drop-down-button-hover", "") : e2.target === t.$.dropDownButton ? (t.open(), t.$.input.focus()) : t.close()) : (e2.target.removeAttribute("hover"), t.removeAttribute("hover"), t.removeAttribute("drop-down-button-hover")));
            }
            _createElement() {
              const e2 = this;
              e2.classList.add("smart-drop-down-box"), e2._tokenTemplate = e2._validateTemplate(e2.tokenTemplate), e2._applySelectionDisplayMode(), e2._applySelection(e2.selectionMode), "none" !== e2.autoComplete && e2._autoComplete(true), e2._setDropDownSize(), e2.$.input.disabled = e2.disabled, e2.$.input.readOnly = e2.readonly, e2._setFocusable(), e2.$.input.value.length > 0 && 0 === e2.selectedIndexes.length && (e2.$.container.setAttribute("has-value", ""), e2._oldValue = e2.value = e2.$.input.value), e2.$.arrow.noRipple = true, e2.checkLicense(), e2._setAriaRelations(true);
            }
            _clearSelection(e2) {
              const t = this;
              if (e2 && (t.$.input.value = "", t.value = ""), t.$.input.placeholder = t.placeholder, t.$.autoCompleteString.textContent = "", t._currentSelection = [], t.$.selectionField) for (; "SPAN" === t.$.selectionField.firstElementChild.nodeName; ) t.$.selectionField.removeChild(t.$.selectionField.firstElementChild);
              "none" !== t.autoComplete && "list" !== t.autoComplete && t.$.input.value.length > 0 && (t._autoCompleteTimer && clearTimeout(t._autoCompleteTimer), "function" != typeof t.dataSource && (t._autoCompleteTimer = setTimeout(function() {
                t._autoComplete(true);
              }, t.autoCompleteDelay))), t.$.input.value.length || t.$.container.removeAttribute("has-value");
            }
            _documentDownHandler(e2) {
              const t = this;
              super._documentDownHandler(e2);
              let o = e2.originalEvent.target;
              (t.shadowRoot || t.isInShadowDOM) && (o = e2.originalEvent.composedPath()[0]), o !== t.$.dropDownButton || "none" === t.dropDownOpenMode || Smart.Utilities.Core.isMobile || requestAnimationFrame(() => t.$.input.focus());
            }
            _documentUpHandler(e2) {
              const t = this;
              let o = e2.originalEvent.target, n = o.closest ? o.closest("smart-combo-box") : void 0;
              (t.shadowRoot || t.isInShadowDOM) && (o = e2.originalEvent.composedPath()[0], n = o.getRootNode().host);
              const i = o;
              if (t._resizeDetails && t._resizeDetails.started) return t._resizeDetails.started = t._resizeDetails.resizeEventFired = false, t.removeAttribute("resizing"), t._dropDownResized = true, void t.$.fireEvent("resizeEnd", { position: { left: e2.pageX, top: e2.pageY } });
              if (t.disabled || t._isDropDownClicked || t.readonly) return void delete t._isDropDownClicked;
              if (t._overlayDown) return t.close(), void delete t._overlayDown;
              if (o === t.$.input || void 0 === o || o === t.$.resizeBar) return;
              if (o === t.$.selectionField) return void t.$.input.focus();
              if (o === t.$.dropDownButton && "none" !== t.dropDownOpenMode) return t._preventDropDownClose = true, o === t._buttonClicked && t.$dropDownContainer.hasClass("smart-visibility-hidden") && "pointercancel" !== e2.originalEvent.type ? t.open() : t.close(), Smart.Utilities.Core.isMobile || requestAnimationFrame(() => t.$.input.focus()), void (t._buttonClicked = void 0);
              const l = o.closest(".smart-drop-down-list-selection-label");
              if (l && n === t && "none" !== t.dropDownOpenMode) {
                const e3 = t.$.listBox._items.filter((e4) => e4[t.inputMember].toString() === l.innerHTML)[0];
                if (!e3 || t.$.fireEvent("tokenClick", { index: t.$.listBox._items.indexOf(e3), label: e3.label, value: e3.value }).defaultPrevented) return;
                return t.open(), t.$.input.focus(), t.$.listBox.ensureVisible(e3), void t._focus(e3);
              }
              if ("tokens" === t.selectionDisplayMode && o.closest(".smart-drop-down-list-unselect-button") && n === t) {
                if (1 === t.selectedIndexes.length && ["zeroOrMany", "zeroOrOne", "checkBox"].indexOf(t.selectionMode) < 0) return;
                return t.unselect(t.$.listBox._items.filter((e3) => e3[t.inputMember].toString() === o.previousElementSibling.innerHTML)[0]), void t.$.input.focus();
              }
              o = t._getUpEventTarget(o), void 0 !== o ? ((!t.$dropDownContainer.hasClass("smart-visibility-hidden") && "dropDownContainer" !== o && "item" !== o || "item" === o && t.selectionMode.indexOf("Many") < 0 && "checkBox" !== t.selectionMode) && t.close(), ("item" === o || "dropDownContainer" === o && i !== t.$.listBox.$.filterInput) && t.$.input.focus()) : t.$.input.focus();
            }
            _dropDownButtonFocusHandler(e2) {
              const t = this;
              "focus" === e2.type ? ("dropDownButton" !== t.dropDownOpenMode && t.$.input.focus(), t.setAttribute("focus", "")) : t.removeAttribute("focus");
            }
            _inputFocusHandler(e2) {
              const t = this;
              if (!t.disabled) if ("focus" === e2.type) t.setAttribute("focus", ""), t._buttonClicked || (t._oldValue = t.$.input.value), t.$.fireEvent("focus");
              else {
                if (t.removeAttribute("focus"), t.$.fireEvent("blur"), "" !== e2.target.value || 0 !== t.selectedIndexes.length && "" === e2.target.value ? t.$.container.setAttribute("has-value", "") : t.$.container.removeAttribute("has-value"), t._preventDropDownClose || (t.opened && ("auto" === t.autoComplete || "inline" === t.autoComplete) && t.$.input.value.length > 0 && t._focusedItem && !t._focusedItem.selected && t.select(t._focusedItem), t.close()), !t._handleAutoCompleteModeList()) return;
                "previousValue" === t.escKeyMode && (t.value = t.$.input.value);
              }
            }
            _handleAutoCompleteModeList() {
              const e2 = this;
              if ("list" === e2.autoComplete && !e2._buttonClicked) {
                if (e2.opened && e2._isDropDownClicked) return false;
                if (e2.$.autoCompleteString.textContent = "", e2._lastSelectedItem) e2._lastSelectedItem.selected || e2.select(e2._lastSelectedItem);
                else if (e2.$.input.value.length && e2._oldValue) {
                  const t = e2.$.listBox._queryItems(e2._oldValue, e2.incrementalSearchMode);
                  for (let o = 0; o < t.length; o++) if (!t[o].hidden) {
                    t[o].selected || e2.select(t[o]), e2._focus(t[o]);
                    break;
                  }
                  e2.value = e2.$.input.value = e2._oldValue;
                } else e2.value = e2.$.input.value = "";
              }
            }
            _inputChangeEventHandler(e2) {
              const t = this;
              e2.stopPropagation(), t._preventInputChangeEvent ? delete t._preventInputChangeEvent : t._isDropDownClicked || t._oldValue === t.$.input.value || t.$.fireEvent("change", { oldValue: t._oldValue, value: t.$.input.value, addedItems: [], removedItems: [], selected: [], disabled: [], index: [], label: [] });
            }
            _keyDownHandler(e2) {
              const t = this, o = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              if (t.disabled || t.readonly || o === t.$.listBox.$.filterInput) return;
              const n = "function" == typeof t._focusedItem ? t._focusedItem() : t._focusedItem;
              switch (e2.key) {
                case "Enter":
                  if (delete t._preventInputChangeEvent, o === t.$.input && n && t.opened) {
                    if (n.selected && "list" === t.autoComplete) return t.close(), t._unfocus(), void t._handleAutoCompleteModeList();
                    n.disabled || (t.select(n), t._preventInputChangeEvent = true), !t.$dropDownContainer.hasClass("smart-visibility-hidden") && t.selectionMode.indexOf("one") > -1 && (t.close(), t._unfocus());
                  } else o === t.$.dropDownButton ? (t.$.dropDownButton.setAttribute("active", ""), t.$dropDownContainer.hasClass("smart-visibility-hidden") && "none" !== t.dropDownOpenMode ? t.open() : t.close(), t.$.input.focus()) : t.close();
                  return void t._handleAutoCompleteModeList();
                case "Escape":
                  switch (t.escKeyMode) {
                    case "none":
                      t.$dropDownContainer.hasClass("smart-visibility-hidden") || (t.close(), t._unfocus());
                      break;
                    case "clearValue":
                      t.value = t.$.input.value = "", t.close();
                      break;
                    case "previousValue":
                      t.$.input.value = t._oldValue;
                      break;
                    case "firstPossibleValue": {
                      const e3 = t.$.listBox._items.find((e4) => !e4.disabled && !e4.hidden && !e4.readonly);
                      if (e3) {
                        const o2 = e3[t.inputMember];
                        t.$.input.value === o2 && t.close(), t.$.input.value = o2;
                      }
                      t.close();
                      break;
                    }
                  }
                  break;
                case "End":
                case "Home":
                case "PageUp":
                case "PageDown":
                case "ArrowUp":
                case "ArrowDown":
                  if (true === t._autoOpenOnKeyDown(e2)) return;
                  if (e2.altKey) {
                    if (t._closedFromKeyCombination = true, t.$dropDownContainer.hasClass("smart-visibility-hidden") && "none" !== t.dropDownOpenMode) {
                      if ("ArrowDown" === e2.key && t.open(), !t.opened) return;
                      if (0 === t.items.length) return;
                      0 === t.selectedIndexes.length ? t._focus(t.items[0]) : t.selectedIndexes.length > 0 && !t.$.listBox._items[t.selectedIndexes[t.selectedIndexes.length - 1]].hidden && t._focus(t.items[t.selectedIndexes[t.selectedIndexes.length - 1]]);
                    } else t.close();
                    return;
                  }
                  if (o === t.$.input && t.$dropDownContainer.hasClass("smart-visibility-hidden")) return void (e2.ctrlKey && (e2.preventDefault(), t._handleKeyStroke(e2.key)));
                  if (("PageUp" === e2.key || "PageDown" === e2.key) && !n || o === t.$.listBox.$.filterInput) return;
                  if (e2.preventDefault(), !n || n && !n._focused) return void t._focus(t.items[0]);
                  t._handleKeyStroke(e2.key), "inline" !== t.autoComplete && "list" !== t.autoComplete || t._updateAutoCompleteHelper();
                  break;
                case "Backspace":
                  if (t.$.input.previousElementSibling) {
                    if (0 === t.$.input.value.length) {
                      if (1 === t.selectedIndexes.length && ["zeroOrMany", "zeroOrOne", "checkBox"].indexOf(t.selectionMode) < 0) return;
                      const e3 = t.$.listBox.getItem(t.$.input.previousElementSibling._value);
                      e3 ? t.unselect(e3) : t.$.selectionField.firstElementChild && "SPAN" === t.$.selectionField.firstElementChild.nodeName && t.$.selectionField.removeChild(t.$.selectionField.firstElementChild);
                    }
                    return;
                  }
                  t.selectedIndexes.length > 1 && t.clearSelection(true);
                  break;
                default:
                  if (o === t.$.input && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = true), true === t._autoOpenOnKeyDown(e2)) return;
              }
            }
            _handleKeyStroke(e2) {
              const t = this, o = t.$.listBox;
              if ("none" === t.autoComplete) return void o._handleKeyStrokes(e2);
              const n = t.items;
              switch (e2) {
                case "ArrowLeft":
                case "ArrowUp":
                  t._handleArrowKeys(true);
                  break;
                case "ArrowRight":
                case "ArrowDown":
                  t._handleArrowKeys(false);
                  break;
                case "Home":
                case "End": {
                  if (0 === n.length) return;
                  const i = "Home" === e2;
                  t._focus(i ? n[0] : n[n.length - 1]), o.scrollTop = i ? 0 : o.scrollHeight;
                  break;
                }
                case "PageUp":
                  t._pageUpKeyHandler(n);
                  break;
                case "PageDown":
                  t._pageDownKeyHandler(n);
              }
              o._recycle();
            }
            _handleArrowKeys(e2) {
              const t = this, o = t.$.listBox;
              let n;
              if (t._focusedItem) n = t.$.listBox._indexOf(t._focusedItem), t._focusedItem._focused = false;
              else {
                if (0 === t.selectedIndexes.length) return;
                n = t.selectedIndexes[t.selectedIndexes.length - 1];
              }
              const i = e2 ? o._getPreviousItem(n) : o._getNextItem(n);
              t._focus(i), "list" === t.autoComplete && o._items[n] !== i && (t._keyboardNavigation = true, o.clearSelection(), o.select(i), delete t._keyboardNavigation), t.ensureVisible(i);
            }
            _pageDownKeyHandler(e2) {
              const t = this, o = t.$.listBox;
              let n, i = o._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              o._focusedItem && (i = o._focusedItem);
              const l = o._indexOf(i);
              let s = i.top + o.$.itemsContainer.offsetHeight - i.height;
              for (let t2 = l; t2 < e2.length; t2++) if (e2[t2].top >= s) {
                n = e2[t2];
                break;
              }
              n || (n = e2[e2.length - 1]), t._focus(n), (n.height + n.top > o.$.itemsContainer.scrollTop + o.$.itemsContainer.offsetHeight || n.top < o.$.itemsContainer.scrollTop) && (o.scrollTop = n.top - o.$.itemsContainer.offsetHeight + n.height);
            }
            _pageUpKeyHandler(e2) {
              const t = this, o = t.$.listBox;
              let n = o._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              o._focusedItem && (n = o._focusedItem);
              const i = n.top - o.$.itemsContainer.offsetHeight;
              let l;
              for (let t2 = o._indexOf(n); t2 > 0; t2--) if (e2[t2].top <= i) {
                l = e2[t2];
                break;
              }
              l || (l = e2[0]), o._focus(l), o.scrollTop = l.top, 0 === o._indexOf(l) && (o.scrollTop = 0);
            }
            _autoOpenOnKeyDown(e2) {
              const t = this;
              if (t.opened || !t.opened && t.autoOpenShortcutKey.indexOf(e2.key) < 0) return;
              t.selectedIndexes.length && t._focus(t.items[t.selectedIndexes[t.selectedIndexes.length - 1]]);
              const o = "function" == typeof t._focusedItem ? t._focusedItem() : t._focusedItem;
              return t.open(), (!o || o && !o._focused) && ("ArrowDown" === e2.key ? t._focus(t.items[0]) : "ArrowUp" === e2.key && t._focus(t.items[t.items.length - 1]), t.ensureVisible(t._focusedItem)), true;
            }
            _keyUpHandler(e2) {
              const t = this, o = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              if (!(t.disabled || "none" === t.escKeyMode && "Escape" === e2.key || o === t.$.listBox.$.filterInput)) if (delete t._preventInputChangeEvent, o === t.$.input && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = false), ["one", "zeroAndOne", "radioButton", "zeroOrOne"].indexOf(t.selectionMode) > -1 && 1 === t.selectedIndexes.length && t.$.input.value !== (t._currentSelection ? t._currentSelection[0] : void 0) && (t._preventInputChangeEvent = true, t.unselect(t.$.listBox._items[t.selectedIndexes[0]])), "Enter" !== e2.key) {
                if (o === t.$.input && e2.key.indexOf("Arrow") < 0 && ["Control", "Shift"].indexOf(e2.key) < 0) {
                  if (t.value === t.$.input.value) return;
                  if (t._currentSelection ? t.value = t._currentSelection.toString() + (t._currentSelection.length > 0 ? "," : "") + t.$.input.value : t.value = t.$.input.value, t.$.autoCompleteString.textContent = "", t._closedFromKeyCombination) return void (t._closedFromKeyCombination = false);
                  if ("none" !== t.autoComplete && "list" !== t.autoComplete ? (t.$.input.value !== (t._currentSelection ? t._currentSelection.toString() : void 0) || t.$.listBox._filteredItems && t.$.listBox._filteredItems.length !== t.$.listBox._items.length) && (t._autoCompleteTimer && clearTimeout(t._autoCompleteTimer), t._autoCompleteTimer = setTimeout(function() {
                    t._autoComplete(true);
                  }, t.autoCompleteDelay)) : (t.$.input.value.length > 0 && t._queryItems(), !t._focusedItem || "Escape" === e2.key && "firstPossibleValue" === t.escKeyMode || (t.open(), " " !== e2.key && (t.$.listBox._scrollView.scrollTop = t._focusedItem.offsetTop))), "none" !== t.autoComplete && "list" !== t.autoComplete && t.$.listBox._filteredItems && t.$.listBox._filteredItems.length === t.$.listBox._items.length) return void t.close();
                }
              } else t.$.dropDownButton.removeAttribute("active");
            }
            _queryItems(e2) {
              const t = this;
              if (!t.value || !t.$.input) return void t.close();
              let o = t.$.listBox._queryItems(t.$.input.previousElementSibling ? t.$.input.value : t.value, t.incrementalSearchMode);
              0 === o.length && t._unfocus();
              for (let n = 0; n < o.length; n++) if (!o[n].hidden) {
                e2 && !o[n].selected && t.select(o[n]), t._focus(o[n]);
                break;
              }
              "list" === t.autoComplete && (t.enableShadowDOM ? t.shadowRoot.activeElement : document.activeElement) === t.$.input && t.$.input.value.length >= t.minLength ? (t._lastSelectedItem = t._focusedItem, t._updateAutoCompleteHelper()) : t._lastSelectedItem = void 0;
            }
            _selectStartHandler(e2) {
              this._resizeDetails && this._resizeDetails.started && e2.preventDefault();
            }
            _unfocus() {
              const e2 = this;
              e2._focusedItem && (e2._focusedItem._focused = false, e2.$.listBox._focusedItem = void 0);
            }
            _setAriaRelations() {
              const e2 = this;
              e2.setAttribute("role", "combobox"), e2.setAttribute("aria-describedby", e2.$.hint.id), e2.setAttribute("aria-expanded", e2.opened), e2.setAttribute("aria-haspopup", "listbox"), e2.setAttribute("aria-labelledby", e2.$.label.id), e2._ariaButton = e2, e2._setAriaAutocomplete();
            }
            _setAriaAutocomplete() {
              const e2 = this.autoComplete, t = this.$.input;
              "none" === e2 ? t.setAttribute("aria-autocomplete", "none") : "auto" === e2 || "manual" === e2 ? t.setAttribute("aria-autocomplete", "list") : t.setAttribute("aria-autocomplete", "both");
            }
          });
        }
      ),
      /***/
      4232: (
        /***/
        () => {
          Smart.Utilities.Assign("Complex", class {
            constructor(r2, a2) {
              if ("string" == typeof r2) this.complexNumber = this.parseComplexNumber(r2), this.realPart = this.complexNumber.realPart, this.imaginaryPart = this.complexNumber.imaginaryPart;
              else {
                if ("number" != typeof r2) throw new Error("Can't create complex number");
                if (this.realPart = r2, "number" == typeof a2) this.imaginaryPart = a2;
                else {
                  if (void 0 !== a2) throw new Error("Can't create complex number: invalid imaginary part");
                  this.imaginaryPart = 0;
                }
                this.complexNumber = this.parseComplexNumber(this.realPart, this.imaginaryPart);
              }
            }
            valueOf() {
              return 0 === this.imaginaryPart ? this.realPart : null;
            }
            isNaN() {
              return isNaN(this.realPart) || isNaN(this.imaginaryPart);
            }
            isZero() {
              return !(0 !== this.realPart && "-0" !== this.realPart.toString() || 0 !== this.imaginaryPart && "-0" !== this.imaginaryPart.toString());
            }
            isFinite() {
              return isFinite(this.realPart) && isFinite(this.imaginaryPart);
            }
            isInfinite() {
              return !(this.isNaN() || this.isFinite());
            }
            parseComplexNumber(r2, a2) {
              const t = { realPart: 0, imaginaryPart: 0 };
              if (null == r2) t.realPart = t.imaginaryPart = 0;
              else if (void 0 !== a2) t.realPart = r2, t.imaginaryPart = a2;
              else switch (typeof r2) {
                case "object":
                  if ("imaginaryPart" in r2 && "realPart" in r2) t.realPart = r2.realPart, t.imaginaryPart = r2.imaginaryPart;
                  else {
                    if (2 !== r2.length) throw SyntaxError("Invalid Complex Number Parameter");
                    t.realPart = r2[0], t.imaginaryPart = r2[1];
                  }
                  break;
                case "string": {
                  t.imaginaryPart = t.realPart = 0;
                  const a3 = r2.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g);
                  let i = 1, e2 = 0;
                  if (null === a3) throw SyntaxError("Invalid Complex Number Parameter");
                  for (let r3 = 0; r3 < a3.length; r3++) {
                    const s = a3[r3];
                    if (" " === s || "	" === s || "\n" === s) ;
                    else if ("+" === s) i++;
                    else if ("-" === s) e2++;
                    else if ("i" === s || "I" === s) {
                      if (i + e2 === 0) throw SyntaxError("Invalid Complex Number Parameter");
                      " " === a3[r3 + 1] || isNaN(a3[r3 + 1]) ? t.imaginaryPart += parseFloat((e2 % 2 ? "-" : "") + "1") : (t.imaginaryPart += parseFloat((e2 % 2 ? "-" : "") + a3[r3 + 1]), r3++), i = e2 = 0;
                    } else {
                      if (i + e2 === 0 || isNaN(s)) throw SyntaxError("Invalid Complex Number Parameter");
                      "i" === a3[r3 + 1] || "I" === a3[r3 + 1] ? (t.imaginaryPart += parseFloat((e2 % 2 ? "-" : "") + s), r3++) : t.realPart += parseFloat((e2 % 2 ? "-" : "") + s), i = e2 = 0;
                    }
                  }
                  if (i + e2 > 0) throw SyntaxError("Invalid Complex Number Parameter");
                  break;
                }
                case "number":
                  t.imaginaryPart = 0, t.realPart = r2;
                  break;
                default:
                  throw SyntaxError("Invalid Complex Number Parameter");
              }
              return t;
            }
            compare(r2, a2) {
              const t = this.parseComplexNumber(r2, a2), i = this.parseComplexNumber("1e-16");
              return Math.abs(t.realPart - this.realPart) <= i && Math.abs(t.imaginaryPart - this.imaginaryPart) <= i;
            }
            toString() {
              let r2 = this.realPart, a2 = this.imaginaryPart, t = "";
              return this.isNaN() ? "NaN" : this.isZero() ? "0" : this.isInfinite() ? "Infinity" : (0 !== r2 && (t += r2), 0 !== a2 && (0 !== r2 ? t += a2 < 0 ? " - " : " + " : a2 < 0 && (t += "-"), a2 = Math.abs(a2), 1 !== a2 && (t += a2), t += "i"), t || "0");
            }
          });
        }
      ),
      /***/
      7650: (
        /***/
        () => {
          Smart("smart-drop-down-list", class extends Smart.ContentElement {
            static get properties() {
              return { autoCloseDelay: { value: 100, type: "number" }, dataSource: { value: null, type: "any", reflectToAttribute: false }, displayLoadingIndicator: { value: false, type: "boolean" }, displayMember: { value: "", type: "string" }, displayMode: { allowedValues: ["outlined", "filled", "underlined"], value: "outlined", type: "string" }, dropDownAppendTo: { value: null, type: "any" }, dropDownButtonPosition: { allowedValues: ["none", "left", "right", "top", "bottom"], value: "right", defaultReflectToAttribute: true, type: "string" }, dropDownMinHeight: { value: "", type: "any", validator: "_propertyValidator" }, dropDownHeight: { value: "", type: "any", validator: "_propertyValidator" }, dropDownMaxHeight: { value: "", type: "any", validator: "_propertyValidator" }, dropDownOpenMode: { allowedValues: ["none", "default", "dropDownButton", "auto"], value: "default", type: "string" }, dropDownOverlay: { value: false, type: "boolean" }, dropDownPlaceholder: { value: "No Items", type: "string" }, dropDownPosition: { allowedValues: ["auto", "top", "bottom", "overlay-top", "overlay-center", "overlay-bottom", "center-bottom", "center-top"], value: "auto", type: "string" }, dropDownMinWidth: { value: "", type: "any", validator: "_propertyValidator" }, dropDownWidth: { value: "", type: "any", validator: "_propertyValidator" }, dropDownMaxWidth: { value: "", type: "any", validator: "_propertyValidator" }, filterable: { value: false, type: "boolean" }, filterInputPlaceholder: { value: "", type: "string" }, filterCallback: { value: null, type: "function?" }, filterMode: { value: "startsWithIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase", "custom"], type: "string" }, grouped: { value: false, type: "boolean" }, groupMember: { value: "", type: "string" }, hint: { value: "", type: "string" }, horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, incrementalSearchDelay: { value: 700, type: "number?" }, incrementalSearchMode: { value: "startsWithIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase"], type: "string" }, itemMeasureMode: { value: "auto", allowedValues: ["auto", "precise"], type: "string" }, inputMember: { value: "label", type: "string" }, itemTemplate: { value: null, type: "any" }, itemHeight: { value: null, type: "number?" }, label: { value: "", type: "string" }, loadingIndicatorPlaceholder: { value: "Loading...", type: "string" }, loadingIndicatorPosition: { value: "center", allowedValues: ["bottom", "center", "top"], type: "string" }, messages: { extend: true, value: { en: { invalidNode: '{{elementType}}: Invalid parameter "{{node}}" when calling {{method}}.' } }, type: "object" }, name: { value: "", type: "string" }, opened: { value: false, type: "boolean" }, placeholder: { value: "", type: "string" }, resizeMode: { value: "none", allowedValues: ["none", "horizontal", "vertical", "both"], type: "string" }, resizeIndicator: { value: false, type: "boolean" }, selectionDisplayMode: { value: "plain", allowedValues: ["plain", "placeholder", "tokens"], type: "string" }, selectionMode: { value: "zeroAndOne", allowedValues: ["none", "oneOrManyExtended", "zeroOrMany", "oneOrMany", "zeroOrOne", "zeroAndOne", "one", "checkBox", "radioButton"], type: "string" }, selectedIndexes: { value: [], type: "array" }, selectedValues: { value: [], type: "array" }, sorted: { value: false, type: "boolean" }, sortDirection: { value: "asc", type: "string" }, tokenTemplate: { value: null, type: "any" }, type: { value: "list", type: "string", defaultReflectToAttribute: true, readonly: true }, valueMember: { value: "", type: "string" }, virtualized: { value: false, type: "boolean" }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] } };
            }
            static get listeners() {
              return { "actionButton.down": "_buttonsDownHandler", "actionButton.mouseenter": "_buttonsMouseEventsHandler", "actionButton.mouseleave": "_buttonsMouseEventsHandler", "actionButton.focus": "_buttonsFocusHandler", "actionButton.blur": "_buttonsFocusHandler", "document.selectstart": "_selectStartHandler", "document.dragstart": "_dragStartHandler", "document.down": "_documentDownHandler", "document.up": "_documentUpHandler", "document.move": "_documentMoveHandler", "dropDownButton.down": "_buttonsDownHandler", "dropDownButton.mouseenter": "_buttonsMouseEventsHandler", "dropDownButton.mouseleave": "_buttonsMouseEventsHandler", keydown: "_keyDownHandler", keyup: "_keyUpHandler", focus: "_focusEventHandler", blur: "_blurEventHandler", "dropDownButton.focus": "_buttonsFocusHandler", "dropDownButton.blur": "_buttonsFocusHandler", "dropDownContainer.transitionend": "_dropDownTransitionendHandler", "listBox.change": "_listBoxChangeHandler", "listBox.itemClick": "_listBoxItemClickHandler", "listBox.keydown": "_listBoxKeyDownHandler", "listBox.bindingComplete": "_bindingCompleteHandler", mouseenter: "_mouseEnterHandler", mouseleave: "_mouseLeaveHandler", resize: "_resizeHandler", "resizeBar.move": "_resizeBarMoveHandler", styleChanged: "_styleChangedHandler", wheel: "_mouseWheelHandler" };
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span class="smart-label" id="label">[[label]]</span>\n                    <div id="content" class="smart-content" role="presentation">\n                        <div class="smart-buttons-container" id="buttonsContainer" role="presentation">\n                            <span id="actionButton" class ="smart-action-button" role="presentation">[[placeholder]]</span>\n                            <span id="dropDownButton" class="smart-drop-down-button">\n                                <span class ="smart-drop-down-button-icon" id="arrow" aria-hidden="true"></span>\n                            </span>\n                        </div>\n                        <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n                            <smart-list-box id="listBox" unfocusable\n                                    animation="[[animation]]"\n                                    data-source="[[dataSource]]"\n                                    disabled="[[disabled]]"\n                                    display-loading-indicator="[[displayLoadingIndicator]]"\n                                    display-member="[[displayMember]]"\n                                    filterable="[[filterable]]"\n                                    filter-callback="[[filterCallback]]"\n                                    filter-mode="[[filterMode]]"\n                                    filter-input-placeholder="[[filterInputPlaceholder]]"\n                                    grouped="[[grouped]]"\n                                    group-member="[[groupMember]]"\n                                    item-height="[[itemHeight]]"\n                                    item-measure-mode="[[itemMeasureMode]]"\n                                    item-template="[[itemTemplate]]"\n                                    incremental-search-delay="[[incrementalSearchDelay]]"\n                                    incremental-search-mode="[[incrementalSearchMode]]"\n                                    loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n                                    loading-indicator-position="[[loadingIndicatorPosition]]"\n                                    name="[[name]]"\n                                    placeholder="[[dropDownPlaceholder]]"\n                                    right-to-left="[[rightToLeft]]"\n                                    readonly="[[readonly]]"\n                                    selected-indexes="{{selectedIndexes}}"\n                                    selection-mode="[[selectionMode]]"\n                                    selected-values="{{selectedValues}}"\n                                    sorted="[[sorted]]"\n                                    sort-direction="[[sortDirection]]"\n                                    theme="[[theme]]"\n                                    value-member="[[valueMember]]"\n                                    horizontal-scroll-bar-visibility="[[horizontalScrollBarVisibility]]"\n                                    vertical-scroll-bar-visibility="[[verticalScrollBarVisibility]]"\n                                    virtualized="[[virtualized]]">\n                                <content></content>\n                            </smart-list-box>\n                            <div id="resizeBar" class="smart-drop-down-resize-bar" aria-label="Resize">\n                                <div></div>\n                            </div>\n                         </div>\n                    </div>\n                    <span class="smart-hint smart-hidden" id="hint">[[hint]]</span>\n                </div>';
            }
            static get styleUrls() {
              return ["smart.dropdownlist.css", "smart.dropdown.css"];
            }
            propertyChangedHandler(e2, t, o) {
              super.propertyChangedHandler(e2, t, o);
              const n = this;
              switch (e2) {
                case "animation":
                  n.$.dropDownContainer.setAttribute("animation", n.animation);
                  break;
                case "disabled":
                  n._setFocusable(), n.close(), n._positionDetection.handleAutoPositioning();
                  break;
                case "dataSource":
                case "displayMember":
                case "inputMember":
                  n.$.actionButton && (n.$.actionButton.innerHTML = n.placeholder), n._setDropDownSize(), n._positionDetection.checkBrowserBounds("vertically"), n._positionDetection.positionDropDown(), n._positionDetection.checkBrowserBounds("horizontally");
                  break;
                case "dropDownAppendTo":
                  n._positionDetection.dropDownAppendToChangedHandler();
                  break;
                case "dropDownOpenMode":
                  n._setFocusable(), n.$dropDownContainer.addClass("smart-visibility-hidden"), n.$.dropDownContainer.setAttribute("drop-down-open-mode", o), n.$.dropDownButton.removeAttribute("selected"), n.removeAttribute("drop-down-button-focus"), n.removeAttribute("action-button-focus"), n.opened = false, n._ariaButton && n._ariaButton.setAttribute("aria-expanded", false), n._setAriaRelations();
                  break;
                case "dropDownOverlay":
                  o || n._positionDetection.removeOverlay();
                  break;
                case "dropDownPosition":
                  n._positionDetection.dropDownPositionChangedHandler();
                  break;
                case "dropDownMinWidth":
                case "dropDownWidth":
                case "dropDownMaxWidth":
                case "dropDownHeight":
                case "dropDownMinHeight":
                case "dropDownMaxHeight":
                  n._setDropDownSize();
                  break;
                case "filterable":
                  n.$.listBox.filterable = o, n._dropDownSize && "auto" === n._dropDownSize.height && n._setDropDownSize();
                  break;
                case "label":
                  if (!n._ariaButton) return;
                  o ? n._ariaButton.setAttribute("aria-labelledby", n.$.label.id) : "DropDownList" === n.elementName && n._ariaButton.setAttribute("aria-labelledby", n.$.actionButton.id);
                  break;
                case "opened":
                  if (n.disabled || n.readonly) return;
                  o ? n.open() : n.close();
                  break;
                case "placeholder":
                  n._applySelection();
                  break;
                case "readonly":
                  n.close();
                  break;
                case "resizeIndicator":
                  o ? n.$.dropDownContainer.setAttribute("resize-indicator", "") : n.$.dropDownContainer.removeAttribute("resize-indicator");
                  break;
                case "resizeMode":
                  n.$.dropDownContainer.setAttribute("resize-mode", n.resizeMode);
                  break;
                case "selectedValues":
                case "selectedIndexes":
                  0 === o.length ? n.$.actionButton.innerHTML = n.placeholder : n._applySelection();
                  break;
                case "selectionMode":
                  n.$.listBox && (n.$.listBox[e2] = o, "checkBox" !== o && "radioButton" !== o && "checkBox" !== t && "radioButton" !== t || n._setDropDownSize());
                  break;
                case "selectionDisplayMode":
                  n._applySelection();
                  break;
                case "tokenTemplate":
                  n._tokenTemplate = n._validateTemplate(n.tokenTemplate), n._applySelection();
                  break;
                case "unfocusable":
                  n._setFocusable();
              }
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? (t.$.listBox.appendChild(e2), t._dropDownSize && "auto" === t._dropDownSize.height && t._setDropDownSize()) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "appendChild", node: "node" }));
            }
            attached() {
              const e2 = this;
              super.attached(), e2.isCompleted && e2.$.dropDownContainer && (e2._positionDetection.dropDownAttached("_setDropDownSize"), e2._positionDetection.checkBrowserBounds(), e2.selectedIndexes && e2._applySelection());
            }
            detached() {
              const e2 = this;
              super.detached(), e2.$.dropDownContainer && (e2.close(), e2._positionDetection && e2._positionDetection.dropDownDetached());
            }
            clearItems() {
              const e2 = this;
              e2.$.listBox && (e2.$.listBox.clearItems(), e2.$.actionButton.innerHTML = e2.placeholder);
            }
            clearSelection() {
              const e2 = this;
              e2.$.listBox && (e2.$.listBox.clearSelection(), e2.$.actionButton.innerHTML = e2.placeholder);
            }
            close() {
              const e2 = this;
              e2.$dropDownContainer.hasClass("smart-visibility-hidden") || e2.$.fireEvent("closing").defaultPrevented || (e2.$dropDownContainer.addClass("smart-visibility-hidden"), e2.$.fireEvent("close"), e2.$.dropDownButton && e2.$.dropDownButton.removeAttribute("selected"), e2.opened = false, e2._ariaButton && e2._ariaButton.setAttribute("aria-expanded", false), e2._preventDropDownClose = false, e2._positionDetection.removeOverlay(true), e2.$.listBox.removeAttribute("focus"), e2._edgeMacFF && !e2.hasAnimation && e2.$.dropDownContainer && (e2.$.dropDownContainer.style.top = e2.$.dropDownContainer.style.left = "", e2.$dropDownContainer.addClass("not-in-view")));
            }
            cloneNode() {
              const e2 = this;
              if (!e2.$.listBox) return;
              let t = HTMLElement.prototype.cloneNode.apply(e2, Array.prototype.slice.call(arguments, 0, 1));
              return t.dataSource = e2.dataSource, t;
            }
            ensureVisible(e2) {
              this.$.listBox && this.$.listBox.ensureVisible(e2);
            }
            getItem(e2) {
              if (this.$.listBox) return this.$.listBox.getItem(e2);
            }
            get items() {
              const e2 = this;
              return e2.$ && e2.$.listBox ? e2.$.listBox.items : [];
            }
            get _focusedItem() {
              const e2 = this;
              return e2.$ && e2.$.listBox ? e2.$.listBox._focusedItem : null;
            }
            insert(e2, t) {
              const o = this;
              o.$.listBox && (o.$.listBox.insert(e2, t), o._applySelection(), o._dropDownSize && "auto" === o._dropDownSize.height && o._setDropDownSize());
            }
            insertBefore(e2, t) {
              const o = this;
              if (!o.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(o, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 && t ? o.$.listBox && (o.$.listBox.insertBefore(e2, t), o._dropDownSize && "auto" === o._dropDownSize.height && o._setDropDownSize()) : o.error(o.localize("invalidNode", { elementType: o.nodeName.toLowerCase(), method: "insertBefore", node: "newNode/referenceNode" }));
            }
            toggle() {
              const e2 = this;
              e2.opened ? e2.close() : e2.open();
            }
            open() {
              const e2 = this, t = function() {
                for (let t2 = 0; t2 < e2.items.length; t2++) if (!e2.items[t2].disabled) return e2.items[t2];
              };
              if (!e2.disabled && e2.offsetHeight && e2.$dropDownContainer.hasClass("smart-visibility-hidden")) {
                if (e2.$dropDownContainer.hasClass("not-in-view") && e2.$dropDownContainer.removeClass("not-in-view"), e2.$.dropDownContainer.style.transition = null, e2.dropDownAppendTo) {
                  const t2 = e2.getBoundingClientRect();
                  if (e2.$.container.contains(e2.$.dropDownContainer)) {
                    let t3 = 0;
                    const o = setInterval(function() {
                      const n = e2.getBoundingClientRect();
                      t3++, n.top === e2._positionTop && t3 < 10 || (e2.open(), clearInterval(o), e2._positionTop = n.top);
                    }, 100);
                    return;
                  }
                  t2.top !== e2._positionTop && (e2._positionTop = t2.top);
                }
                e2.$.fireEvent("opening").defaultPrevented || (e2._shadowDOMStylesDelay && (e2._setDropDownSize(), delete e2._shadowDOMStylesDelay), e2.opened = true, e2._ariaButton && e2._ariaButton.setAttribute("aria-expanded", true), e2.$.listBox.setAttribute("focus", ""), e2._positionDetection.placeOverlay(), e2._positionDetection.checkBrowserBounds("vertically"), e2._positionDetection.positionDropDown(), e2._positionDetection.checkBrowserBounds("horizontally"), e2.$dropDownContainer.removeClass("smart-visibility-hidden"), e2.$.fireEvent("open"), e2.$.dropDownButton && ("dropDownButton" === e2.dropDownOpenMode ? e2.$.dropDownButton.setAttribute("selected", "") : e2.$.dropDownButton.removeAttribute("selected")), (e2.$.listBox && !e2._focusedItem || e2._focusedItem && !e2._focusedItem._focused) && (e2.selectedIndexes.length > 0 ? e2._focus(e2.items[e2.selectedIndexes[0]]) : e2._focus(t)), e2.$.input && !Smart.Utilities.Core.isMobile && e2.$.input.focus());
              }
            }
            ready() {
              super.ready();
            }
            render() {
              const e2 = this;
              e2.rightToLeft && (e2.dropDownButtonPosition = "right" === e2.dropDownButtonPosition ? "left" : "right"), e2.classList.add("smart-drop-down-box"), e2.$.dropDownContainer && (e2._positionDetection = new Smart.Utilities.PositionDetection(e2, e2.$.dropDownContainer, e2.$.container, "close"), e2._positionDetection.getDropDownParent(true), e2._positionDetection.setDropDownPosition(), e2._calculateDropDownSize(), e2.$.dropDownContainer.setAttribute("resize-mode", e2.resizeMode), e2.$.dropDownContainer.setAttribute("drop-down-open-mode", e2.dropDownOpenMode), e2.resizeIndicator && e2.$.dropDownContainer.setAttribute("resize-indicator", ""), e2._positionDetection.handleAutoPositioning()), e2.opened && e2.open(), e2._positionTop = e2.getBoundingClientRect().top, e2._edgeMacFF = Smart.Utilities.Core.Browser.Edge || Smart.Utilities.Core.Browser.Firefox && -1 !== navigator.platform.toLowerCase().indexOf("mac"), e2._edgeMacFF && e2.hasAnimation && e2.$.dropDownContainer && e2.$dropDownContainer.addClass("not-in-view"), e2.$.label && !e2.$.label.id && (e2.$.label.id = e2.id + "Label"), e2.$.actionButton && !e2.$.actionButton.id && (e2.$.actionButton.id = e2.id + "ActionButton"), e2.$.hint && !e2.$.hint.id && (e2.$.hint.id = e2.id + "Hint"), e2._createElement(), super.render();
            }
            removeAt(e2) {
              const t = this;
              t.$.listBox && (t.$.listBox.removeAt(e2), t._applySelection(), t._dropDownSize && "auto" === t._dropDownSize.height && t._setDropDownSize());
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted || e2 instanceof HTMLElement && e2.classList.contains("smart-resize-trigger-container")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 && e2 instanceof Smart.ListItem ? (t.$.listBox.removeChild(e2), t._dropDownSize && "auto" === t._dropDownSize.height && t._setDropDownSize()) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "removeChild", node: "node" }));
            }
            get value() {
              const e2 = this;
              return e2.isRendered && e2.$.listBox ? e2.$.listBox.value : null;
            }
            set value(e2) {
              const t = this;
              return t.isRendered && t.$.listBox ? void (t.$.listBox.value = e2) : null;
            }
            select(e2) {
              this.$.listBox && this.$.listBox.select(e2);
            }
            _setFocusable() {
              const e2 = this;
              if (e2.disabled || e2.unfocusable) return e2.removeAttribute("tabindex"), e2.$.actionButton.removeAttribute("tabindex"), void e2.$.dropDownButton.removeAttribute("tabindex");
              let t = e2.tabIndex > 0 ? e2.tabIndex : 0;
              e2.tabIndex = t, "dropDownButton" === e2.dropDownOpenMode ? (e2.removeAttribute("tabindex"), e2.$.actionButton.setAttribute("tabindex", t), e2.$.dropDownButton.setAttribute("tabindex", t)) : (e2.$.actionButton.removeAttribute("tabindex"), e2.$.dropDownButton.removeAttribute("tabindex"));
            }
            static get requires() {
              return { "Smart.ListBox": "smart.listbox.js" };
            }
            unselect(e2) {
              this.$.listBox && this.$.listBox.unselect(e2);
            }
            update(e2, t) {
              const o = this;
              o.$.listBox && (o.$.listBox.update(e2, t), o._applySelection());
            }
            _resizeBarMoveHandler(e2) {
              "touchmove" === e2.originalEvent.type && e2.originalEvent.preventDefault();
            }
            _createToken() {
              const e2 = this;
              let t, o = false;
              const n = document.createDocumentFragment(), i = e2.selectedIndexes[e2.selectedIndexes.length - 1];
              "plain" !== e2.selectionDisplayMode || "one" !== e2.selectionMode && "zeroAndOne" !== e2.selectionMode && "zeroOrOne" !== e2.selectionMode && "radioButton" !== e2.selectionMode ? "tokens" === e2.selectionDisplayMode ? 1 === e2.selectedIndexes.length && ["oneOrManyExtended", "oneOrMany", "zeroAndOne", "one", "radioButton"].indexOf(e2.selectionMode) > -1 ? t = "" : (t = "&#10006", o = true) : t = 1 === e2.selectedIndexes.length ? "" : "," : t = "";
              const r2 = e2.selectedIndexes, a2 = e2.$.listBox._items;
              for (let s = 0; s < r2.length; s++) {
                const l = r2[s];
                a2[l] && n.appendChild(e2._applyTokenTemplate(a2[l][e2.inputMember], "tokens" !== e2.selectionDisplayMode && l === i ? "" : t, o));
              }
              return n;
            }
            _applySelection() {
              const e2 = this;
              if ("placeholder" !== e2.selectionDisplayMode && 0 !== e2.selectedIndexes.length) {
                if (e2.$.listBox._items && 0 !== e2.$.listBox._items.length) if ("plain" !== e2.selectionDisplayMode) e2.$.actionButton.innerHTML = "", e2.$.actionButton.appendChild(e2._createToken());
                else {
                  const t = e2.$.listBox.selectedIndexes, o = e2.$.listBox._items;
                  let n = [];
                  for (let i = 0; i < t.length; i++) {
                    const r2 = t[i];
                    o[r2] && n.push(o[r2][e2.inputMember]);
                  }
                  e2.$.actionButton.innerHTML = n.length ? `<span class="smart-token">${n.join(", ").trim()}</span>` : "";
                }
              } else e2.$.actionButton.innerHTML = e2.placeholder;
            }
            _applyTokenTemplate(e2, t, o) {
              const n = this, i = document.createElement("span"), r2 = function() {
                return `<span class='smart-drop-down-list-selection-label' role="presentation">` + e2 + `</span><span class='smart-drop-down-list-unselect-button' role="button"${o ? ' aria-label="Unselect"' : ""}>${t}</span>`;
              };
              if (i.classList.add("smart-token"), n._tokenTemplate) {
                let e3 = document.importNode(n._tokenTemplate.content, true);
                const t2 = e3.childNodes.length, o2 = /{{\w+}}/g;
                let a2;
                for (let n2 = 0; n2 < t2; n2++) a2 = o2.exec(e3.childNodes[n2].innerHTML), a2 && (e3.childNodes[n2].innerHTML = e3.childNodes[n2].innerHTML.replace(a2[0], r2())), e3.childNodes[n2].outerHTML && (i.innerHTML += e3.childNodes[n2].outerHTML);
              } else "function" == typeof n.tokenTemplate ? n.tokenTemplate(i, { label: e2, iconSeparator: t }) : i.innerHTML = r2();
              return i;
            }
            _bindingCompleteHandler() {
              const e2 = this;
              e2.$.listBox && requestAnimationFrame(() => {
                e2._setDropDownSize(), e2._positionDetection.checkBrowserBounds();
              });
            }
            _buttonsDownHandler(e2) {
              const t = this;
              if (!t.disabled) {
                if (t.hasRippleAnimation) if (t.$.buttonsContainer && "dropDownButton" !== t.dropDownOpenMode) {
                  const o = t.$.buttonsContainer;
                  o.firstElementChild.noRipple = true, Smart.Utilities.Animation.Ripple.animate(o, e2.pageX, e2.pageY), o.firstElementChild.noRipple = false;
                } else Smart.Utilities.Animation.Ripple.animate(e2.target, e2.pageX, e2.pageY);
                t._preventsSelectStart = true, t.tagName.toLowerCase().indexOf("smart-drop-down-") > -1 && "dropDownButton" === t.dropDownOpenMode && e2.target === t.$.actionButton && t.$.actionButton.setAttribute("active", ""), t.opened && (t._preventDropDownClose = true);
              }
            }
            _buttonsMouseEventsHandler(e2) {
              const t = this;
              t.disabled || ("mouseenter" === e2.type ? (t.setAttribute("hover", ""), e2.target.setAttribute("hover", ""), "dropDownButton" === t.dropDownOpenMode && e2.target === t.$.dropDownButton && t.setAttribute("drop-down-button-hover", "")) : (t.removeAttribute("hover"), t.removeAttribute("drop-down-button-hover"), e2.target.removeAttribute("hover")));
            }
            _calculateDropDownSize() {
              const e2 = this;
              e2._dropDownSize = {};
              const t = window.getComputedStyle(e2.$.dropDownContainer), o = parseFloat(t.getPropertyValue("border-top-width").trim()), n = parseFloat(t.getPropertyValue("border-bottom-width").trim()), i = parseFloat(t.getPropertyValue("margin-top").trim()), r2 = parseFloat(t.getPropertyValue("margin-bottom").trim()), a2 = parseFloat(t.getPropertyValue("padding-top").trim()), s = parseFloat(t.getPropertyValue("padding-bottom").trim());
              Smart.Utilities.Core.CSSVariablesSupport() && (e2._dropDownSize.width = t.getPropertyValue("--smart-drop-down-list-drop-down-width").trim(), e2._dropDownSize.height = t.getPropertyValue("--smart-drop-down-list-drop-down-height").trim()), (!e2._dropDownSize.width || e2._dropDownSize.width.indexOf("initial") > -1) && (e2._dropDownSize.width = e2.offsetWidth), e2._dropDownSize.height || (e2._dropDownSize.height = "auto"), e2._dropDownSize.minHeight = parseFloat(t.getPropertyValue("min-height").trim()), e2._dropDownSize.maxHeight = parseFloat(t.getPropertyValue("max-height").trim()), e2._dropDownSize.borderWidth = (isNaN(o) ? 0 : o) + (isNaN(n) ? 0 : n), e2._dropDownSize.paddingWidth = (isNaN(a2) ? 0 : a2) + (isNaN(s) ? 0 : s), e2._dropDownSize.marginWidth = (isNaN(i) ? 0 : i) + (isNaN(r2) ? 0 : r2);
            }
            _createElement() {
              const e2 = this;
              e2._tokenTemplate = e2._validateTemplate(e2.tokenTemplate), e2._applySelection(), e2._setDropDownSize(), e2._setFocusable(), e2.$.arrow.noRipple = true, e2._shadowDOMStylesDelay = e2.shadowRoot, e2._setAriaRelations(true);
            }
            _documentDownHandler(e2) {
              const t = this;
              if (t.disabled || t.readonly) return;
              let o = e2.originalEvent.target;
              if (o === t._overlay && (t._overlayDown = true), t.shadowRoot) {
                o = e2.originalEvent.composedPath()[0];
                let n2 = o.getRootNode().host;
                for (; n2; ) n2.closest(".smart-drop-down-container") === t.$.dropDownContainer && (t._isDropDownClicked = true), n2 = n2.getRootNode().host;
              } else t.isInShadowDOM && (o = e2.originalEvent.composedPath()[0]), t._isDropDownClicked = o.closest(".smart-drop-down-container") === t.$.dropDownContainer;
              if (t._buttonClicked = o.closest(".smart-action-button") || o.closest(".smart-drop-down-button"), t.$.listBox) {
                let n2 = o.closest("smart-list-item");
                t.$.listBox.contains(n2) || (n2 = void 0), t.hasRippleAnimation && n2 && Smart.Utilities.Animation.Ripple.animate(n2, e2.pageX, e2.pageY), (n2 || o === t.$.listBox.$.filterInput || o.closest(".smart-token")) && (t._preventDropDownClose = true);
              }
              if (t._isDropDownClicked && (t._preventDropDownClose = true), o !== t.$.resizeBar || "none" === t.resizeMode) return;
              t._resizeDetails || (t._resizeDetails = {});
              const n = t.$.dropDownContainer.getBoundingClientRect();
              t._resizeDetails.started = true, t._resizeDetails.x = e2.pageX, t._resizeDetails.y = e2.pageY, t._resizeDetails.width = t.$.dropDownContainer.offsetWidth, t._resizeDetails.height = t.$.dropDownContainer.offsetHeight, t._resizeDetails.offsetXL = e2.clientX - n.left, t._resizeDetails.offsetXR = n.left + t.$.dropDownContainer.offsetWidth - e2.clientX, t._resizeDetails.offsetY = n.top + t.$.dropDownContainer.offsetHeight - e2.clientY, t._resizeDetails.offsetYtop = e2.clientY - n.top, t._preventDropDownClose = true;
            }
            _documentMoveHandler(e2) {
              const t = this, o = t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if ("auto" === t.dropDownOpenMode && null !== t.dropDownAppendTo && (t.contains(o) || t.$.dropDownContainer.contains(o) ? t._isElementHovered = true : (t._isElementHovered = false, t._autoClose())), !t._resizeDetails || t._resizeDetails && !t._resizeDetails.started) return;
              t.setAttribute("resizing", ""), t._resizeDetails.resizeEventFired || (t.$.fireEvent("resizeStart", { position: { left: e2.pageX, top: e2.pageY } }), t._resizeDetails.resizeEventFired = true);
              const n = document.documentElement, i = t.$.dropDownContainer.getBoundingClientRect(), r2 = t.getBoundingClientRect(), a2 = t.$.dropDownContainer.hasAttribute("top") ? "top" : "bottom";
              let s;
              function l() {
                if (s = e2.pageY - t._resizeDetails.y, "bottom" === a2) t._resizeDetails.height = Math.min(n.clientHeight - i.top - 6, Math.max(0, t._resizeDetails.height + s)), t._resizeDetails.y = Math.max(i.top + n.scrollTop - t._resizeDetails.offsetY, Math.min(n.clientHeight + n.scrollTop - 1.5 * t._resizeDetails.offsetY, e2.pageY));
                else {
                  if (t._resizeDetails.height = Math.min(t._dropDownSize.maxHeight, Math.max(0, Math.min(r2.top, t._resizeDetails.height - s))), s = Math.max(0, i.top + (i.height - Math.max(t._dropDownSize.minHeight, t._resizeDetails.height))), t.dropDownAppendTo) {
                    const e3 = Math.abs(parseFloat(getComputedStyle(t.$.dropDownContainer).getPropertyValue("margin-bottom"))) || 0;
                    t.$.dropDownContainer.style.top = t.dropDownAppendTo ? e3 + s + "px" : "";
                  }
                  const o2 = r2.top + n.scrollTop + t._resizeDetails.offsetYtop;
                  t._resizeDetails.y = Math.max(t._resizeDetails.offsetYtop, Math.min(o2, Math.max(o2 - t._dropDownSize.maxHeight, e2.pageY)));
                }
                t.$.dropDownContainer.style.height = t._resizeDetails.height + "px";
              }
              function d2() {
                s = e2.pageX - t._resizeDetails.x, t._resizeDetails.width = Math.min(n.clientWidth - i.left - 6, Math.max(0, t._resizeDetails.width + s)), t.$.dropDownContainer.style.width = t._resizeDetails.width + "px", t._resizeDetails.x = Math.max(i.left + n.scrollLeft - t._resizeDetails.offsetXR, Math.min(n.clientWidth + n.scrollLeft - 1.5 * t._resizeDetails.offsetXR, e2.pageX));
              }
              switch (t.resizeMode) {
                case "vertical":
                  l();
                  break;
                case "horizontal":
                  d2();
                  break;
                case "both":
                  d2(), l();
              }
            }
            _documentUpHandler(e2) {
              const t = this;
              if (t.$.actionButton.removeAttribute("active"), t._resizeDetails && t._resizeDetails.started) return t._resizeDetails.started = t._resizeDetails.resizeEventFired = false, t.removeAttribute("resizing"), t._preventDropDownClose = false, t.focus(), void t.$.fireEvent("resizeEnd", { position: { left: e2.pageX, top: e2.pageY } });
              if (t.disabled || t._isDropDownClicked || t.readonly) return void delete t._isDropDownClicked;
              if (t._overlayDown) return t.close(), void delete t._overlayDown;
              let o = e2.originalEvent.target, n = o.closest ? o.closest("smart-drop-down-list") : void 0;
              if ((t.enableShadowDOM || t.isInShadowDOM) && (o = e2.originalEvent.composedPath()[0], n = o.getRootNode().host), t._preventsSelectStart = false, void 0 === o || o === t.$.resizeBar) return;
              if ("tokens" === t.selectionDisplayMode && o.classList.contains("smart-drop-down-list-selection-label") && n === t) {
                "none" !== t.dropDownOpenMode && t.open();
                let e3 = t.$.listBox._items.filter((e4) => e4[t.inputMember].toString() === o.textContent)[0];
                return t.$.listBox._scrollView.scrollTop = e3.offsetTop, void t._focus(e3);
              }
              if ("tokens" === t.selectionDisplayMode && o.classList.contains("smart-drop-down-list-unselect-button") && n === t) {
                if (1 === t.selectedIndexes.length && ["zeroOrMany", "zeroOrOne", "checkBox"].indexOf(t.selectionMode) < 0) return;
                return void t.unselect(t.$.listBox._items.filter((e3) => e3[t.inputMember].toString() === o.previousElementSibling.textContent)[0]);
              }
              const i = o.closest(".smart-action-button");
              let r2;
              if (t._buttonClicked && ("dropDownButton" === t.dropDownOpenMode && i && t._buttonClicked === t.$.actionButton ? t.$.fireEvent("actionButtonClick") : o.closest(".smart-drop-down-button") !== t._buttonClicked && i !== t._buttonClicked || (r2 = true, t.$.fireEvent("dropDownButtonClick"))), t._buttonClicked = void 0, i === t.$.actionButton || o.closest(".smart-drop-down-button") === t.$.dropDownButton) return "dropDownButton" === t.dropDownOpenMode && i === t.$.actionButton ? void t.close() : void (t.$dropDownContainer.hasClass("smart-visibility-hidden") && "none" !== t.dropDownOpenMode && r2 && "pointercancel" !== e2.originalEvent.type ? t.open() : t.close());
              o = t._getUpEventTarget(o), void 0 !== o && ("dropDownContainer" !== o && "item" !== o || "item" === o && "checkBox" !== t.selectionMode && t.selectionMode.indexOf("Many") < 0) && t.close();
            }
            _dragStartHandler(e2) {
              this._resizeDetails && this._resizeDetails.started && e2.preventDefault();
            }
            _dropDownTransitionendHandler() {
              const e2 = this;
              e2._edgeMacFF && !e2.opened && e2.hasAnimation && (e2.$.dropDownContainer.style.top = e2.$.dropDownContainer.style.left = "", e2.$dropDownContainer.addClass("not-in-view"));
            }
            _focus(e2) {
              this.$.listBox._focus(e2);
            }
            _blurEventHandler() {
              const e2 = this;
              e2.$.dropDownButton && (e2.removeAttribute("focus"), e2.$.dropDownButton.removeAttribute("focus")), e2.$.actionButton && (e2.removeAttribute("focus"), e2.$.actionButton.removeAttribute("focus")), e2.nodeName && "smart-drop-down-list" === e2.nodeName.toLowerCase() && !e2._preventDropDownClose && e2.close();
            }
            _focusEventHandler() {
              const e2 = this;
              e2.$.dropDownButton && (e2.setAttribute("focus", ""), e2.$.dropDownButton.setAttribute("focus", "")), e2.$.actionButton && (e2.setAttribute("focus", ""), e2.$.actionButton.setAttribute("focus", "")), e2.removeAttribute("drop-down-button-focus"), e2.removeAttribute("action-button-focus");
            }
            _buttonsFocusHandler(e2) {
              const t = this;
              e2.target === t.$.dropDownButton ? "focus" === e2.type ? t.setAttribute("drop-down-button-focus", "") : (t.removeAttribute("drop-down-button-focus"), t.nodeName && "smart-drop-down-list" === t.nodeName.toLowerCase() && !t._preventDropDownClose && t.close()) : "focus" === e2.type ? t.setAttribute("action-button-focus", "") : t.removeAttribute("action-button-focus");
            }
            _getUpEventTarget(e2) {
              const t = this;
              let o = e2;
              for (o = void 0 === o.parentElement ? o.getRootNode().host : o.parentElement; o; ) {
                if (o === t.$.dropDownContainer) {
                  o = "dropDownContainer";
                  break;
                }
                o = void 0 === o.parentElement ? o.getRootNode().host : o.parentElement;
              }
              return o;
            }
            _keyDownHandler(e2) {
              const t = this, o = t.enableShadowDOM && t.shadowRoot.activeElement || document.activeElement, n = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              if (!(t.$.listBox && n === t.$.listBox.$.filterInput || o !== t && o !== t.$.dropDownButton && o !== t.$.actionButton)) switch (e2.key) {
                case "Enter":
                case " ":
                  e2.preventDefault(), n !== t.$.actionButton && (t._keyPressed = true, t.opened ? (t._focusedItem && t.select(t._focusedItem), ("Enter" === e2.key && ["none"].indexOf(t.selectionMode) < 0 || " " === e2.key && ["none", "zeroAndOne", "one", "radioButton"].indexOf(t.selectionMode) > -1) && t.close()) : t.opened || t.readonly || "none" === t.dropDownOpenMode || t.open()), "dropDownButton" === t.dropDownOpenMode && n.setAttribute("active", "");
                  break;
                case "End":
                case "Home":
                case "PageUp":
                case "PageDown":
                case "ArrowUp":
                case "ArrowDown":
                  if (t.readonly) return;
                  if (e2.altKey) return t._keyPressed = false, void (t.$dropDownContainer.hasClass("smart-visibility-hidden") ? t.open() : t.close());
                  e2.preventDefault(), t.$.listBox._handleKeyStrokes(e2.key);
                  break;
                case "Escape":
                  e2.preventDefault(), t.close();
                  break;
                default:
                  if (t.readonly) return;
                  "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = true), t.$.listBox._applyIncrementalSearch(e2.key);
              }
            }
            _keyUpHandler(e2) {
              const t = this, o = t.enableShadowDOM ? e2.composedPath()[0] : e2.target;
              t.$.listBox && o === t.$.listBox.$.filterInput || ("Enter" !== e2.key && " " !== e2.key || (o.removeAttribute("active"), t.$dropDownContainer.hasClass("smart-visibility-hidden") || (t._keyPressed = false)), t.$.listBox && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = false));
            }
            _listBoxChangeHandler(e2) {
              const t = this;
              if (e2.target === t.$.listBox) {
                if ((t.dropDownAppendTo || t.enableShadowDOM) && t.$.fireEvent("change", e2.detail), "list" === t.autoComplete && e2.detail) {
                  const o = t.$.listBox._items[e2.detail.index];
                  t._lastSelectedItem = o && o.selected ? o : void 0;
                }
                t._applySelection(t.selectionMode, e2.detail);
              } else e2.stopPropagation();
            }
            _listBoxItemClickHandler(e2) {
              const t = this;
              (t.dropDownAppendTo || t.enableShadowDOM) && t.$.fireEvent(e2.type, e2.detail), "checkBox" !== t.selectionMode && t.selectionMode.indexOf("Many") < 0 && t.close(), Smart.Utilities.Core.isMobile || t.focus(), delete t._isDropDownClicked;
            }
            _listBoxKeyDownHandler(e2) {
              const t = this;
              if ("Enter" === e2.key) return t.close(), "dropDownButton" === t.dropDownOpenMode ? t.$.dropDownButton.focus() : t.focus(), void e2.stopPropagation();
              "Escape" !== e2.key || t.close();
            }
            _mouseEnterHandler() {
              const e2 = this;
              e2._isElementHovered = true, e2.tagName.toLowerCase().indexOf("smart-drop-down-") > -1 && "auto" === e2.dropDownOpenMode && !e2.disabled && !e2.readonly && e2.open();
            }
            _mouseLeaveHandler() {
              const e2 = this;
              e2.removeAttribute("hover"), e2._isElementHovered = false, "auto" !== e2.dropDownOpenMode || e2.disabled || e2.readonly || e2._autoClose();
            }
            _mouseWheelHandler(e2) {
              const t = this;
              t.disabled || t.readonly || t.items && 0 === t.items.length || t.$dropDownContainer && !t.$dropDownContainer.hasClass("smart-visibility-hidden") || t.$.listBox && (e2.preventDefault(), t.$.listBox._handleKeyStrokes(e2.deltaY > 0 ? "ArrowDown" : "ArrowUp"));
            }
            _autoClose() {
              const e2 = this;
              e2._autoCloseTimeout = setTimeout((function() {
                e2._isElementHovered || e2.close(), clearTimeout(e2._autoCloseTimeout);
              }).bind(e2), e2.autoCloseDelay);
            }
            _propertyValidator(e2, t) {
              return "number" != typeof t && "string" != typeof t ? e2 : t;
            }
            _resizeHandler() {
              this.refresh();
            }
            refresh() {
              const e2 = this;
              "none" === e2.resizeMode && (e2._calculateDropDownSize(), e2._setDropDownSize());
            }
            _selectStartHandler(e2) {
              this._preventsSelectStart && e2.preventDefault();
            }
            _setAriaRelations(e2) {
              const t = this;
              let o, n;
              "dropDownButton" !== t.dropDownOpenMode ? (o = t.$.dropDownButton, o.setAttribute("aria-hidden", true), n = t, t.$.actionButton.removeAttribute("role")) : (o = t, n = t.$.dropDownButton, n.removeAttribute("aria-hidden"), t.$.actionButton.setAttribute("role", "button")), t._ariaButton = n, n.setAttribute("role", "button"), n.setAttribute("aria-haspopup", "listbox"), n.setAttribute("aria-owns", t.$.listBox.id), n.setAttribute("aria-describedby", t.$.hint.id), t.label ? n.setAttribute("aria-labelledby", t.$.label.id) : "DropDownList" === t.elementName && n.setAttribute("aria-labelledby", t.$.actionButton.id), o.setAttribute("role", "presentation"), o.removeAttribute("aria-owns"), e2 ? n.setAttribute("aria-expanded", t.opened) : (o.removeAttribute("aria-describedby"), o.removeAttribute("aria-expanded"), o.removeAttribute("aria-haspopup"), o.removeAttribute("aria-labelledby"));
            }
            _setDropDownSize() {
              const e2 = this, t = e2.$.listBox;
              let o;
              if (e2._dropDownSize || e2._calculateDropDownSize(), ["dropDownMinWidth", "dropDownMaxWidth"].forEach((t2) => {
                e2.$.dropDownContainer.style[t2.replace("dropDown", "").replace(/^./, "m")] = "initial" === e2[t2] ? e2.offsetWidth + "px" : e2[t2] ? parseFloat(e2[t2]) + (e2[t2].toString().endsWith("%") ? "%" : "px") : null;
              }), ["dropDownMinHeight", "dropDownMaxHeight"].forEach((t2) => {
                e2.$.dropDownContainer.style[t2.replace("dropDown", "").replace(/^./, "m")] = e2[t2] ? parseFloat(e2[t2]) + (e2[t2].toString().endsWith("%") ? "%" : "px") : null;
              }), e2.dropDownWidth ? "auto" !== e2.dropDownWidth ? e2.$.dropDownContainer.style.width = ("initial" === e2.dropDownWidth ? e2.offsetWidth : parseFloat(e2.dropDownWidth)) + "px" : e2.$.dropDownContainer.style.width = "auto" : e2.$.dropDownContainer.style.width = "auto" === e2._dropDownSize.width ? "auto" : (parseFloat(e2._dropDownSize.width) || 0) + "px", e2.dropDownHeight && "auto" !== e2.dropDownHeight) e2.$.dropDownContainer.style.height = parseFloat(e2.dropDownHeight) + ((e2.dropDownHeight + "").indexOf("%") > -1 ? "%" : "px");
              else if (!e2.$.listBox || "auto" !== e2._dropDownSize.height && "auto" !== e2.dropDownHeight) e2.$.dropDownContainer.style.height = e2._dropDownSize.height;
              else {
                e2.$.dropDownContainer.style.height = "";
                let n = 0;
                if (t.$.itemsContainer && (n = 2 * parseInt(window.getComputedStyle(t.$.itemsContainer).getPropertyValue("--smart-list-item-vertical-offset"))), isNaN(n) && (n = 6), o = n, t.items && t.items.length > 0 ? t.items.map((e3) => o += e3.height || e3.offsetHeight) : o = t.$.placeholder.offsetHeight, e2.filterable) {
                  const e3 = t.$.filterInputContainer;
                  o += e3.offsetHeight + e3.offsetTop;
                }
                o = o + e2._dropDownSize.paddingWidth + e2._dropDownSize.borderWidth, e2.$.dropDownContainer.style.height = o + "px";
              }
              if (t) {
                if (void 0 === o || !t.$) return void t._refreshLayout();
                const n = Math.max(0, e2._dropDownSize.minHeight - (o - t.$.horizontalScrollBar.offsetHeight));
                n && (e2.$.dropDownContainer.style.height = o + n + "px"), !e2.opened && e2.virtualized && t.refresh();
              }
            }
            _styleChangedHandler(e2) {
              const t = this;
              if (t.dropDownAppendTo) {
                const o = e2.detail.styleProperties, n = ["font-size", "font-family", "font-style", "font-weight"];
                for (let e3 = 0; e3 < n.length; e3++) o[n[e3]] && (t.$.dropDownContainer.style[n[e3]] = o[n[e3]].value);
              }
              "auto" === t._dropDownSize.height && t._setDropDownSize();
            }
            _validateTemplate(e2) {
              const t = this;
              if (e2 && "function" != typeof e2) if ("content" in document.createElement("template")) {
                if (e2 instanceof HTMLTemplateElement || (e2 = document.getElementById(e2)), null !== e2 && "content" in e2) return e2;
                t.error(t.localize("invalidTemplate", { elementType: t.nodeName.toLowerCase(), property: "tokenTemplate" }));
              } else t.error(t.localize("htmlTemplateNotSuported", { elementType: t.nodeName.toLowerCase() }));
            }
          });
        }
      ),
      /***/
      6321: (
        /***/
        () => {
          !function() {
            const e2 = "11.0.0", t = [];
            let n = "Smart";
            if (window[n] && window[n].Version) {
              if (window[n].Version === e2) return;
              if (window[n].Version !== e2) n += e2;
              else {
                let e3 = 2;
                for (; window[n]; ) n += e3.toString(), e3++;
              }
            }
            const o = navigator.userAgent.indexOf("Edge") > -1 && navigator.appVersion.indexOf("Edge") > -1;
            document.elementsFromPoint || (document.elementsFromPoint = document.msElementsFromPoint);
            class r2 {
              static isBoolean(e3) {
                return "boolean" == typeof e3;
              }
              static isFunction(e3) {
                return !!(e3 && e3.constructor && e3.call && e3.apply);
              }
              static isArray(e3) {
                return Array.isArray(e3);
              }
              static isObject(e3) {
                return e3 && ("object" == typeof e3 || this.isFunction(e3)) || false;
              }
              static isDate(e3) {
                return e3 instanceof Date;
              }
              static isString(e3) {
                return "string" == typeof e3;
              }
              static isNumber(e3) {
                return "number" == typeof e3;
              }
              static getType(e3) {
                const t2 = this, n2 = ["Boolean", "Number", "String", "Function", "Array", "Date", "Object"].find((n3) => {
                  if (t2["is" + n3](e3)) return n3;
                });
                return n2 ? n2.toLowerCase() : void 0;
              }
            }
            class i {
              static animate(e3, t2, o2, r3) {
                const i2 = e3;
                if (!i2 || i2 instanceof HTMLElement == 0) return;
                if (0 === i2.getElementsByClassName("smart-ripple").length) {
                  const e4 = document.createElement("span");
                  e4.classList.add("smart-ripple"), e4.setAttribute("role", "presentation");
                  let t3 = true, o3 = null;
                  if (window[n].EnableShadowDOM && i2.enableShadowDOM && true !== i2.isInShadowDOM) {
                    for (let e5 = 0; e5 < i2.shadowRoot.host.shadowRoot.children.length; e5++) "link" !== i2.shadowRoot.host.shadowRoot.children[e5].tagName.toLowerCase() && (o3 = i2.shadowRoot.host.shadowRoot.children[e5]);
                    i2.shadowRoot.host.shadowRoot.querySelector(".smart-ripple") && (t3 = false);
                  } else o3 = i2.firstElementChild;
                  t3 && (o3 && !o3.noRipple && o3.offsetHeight > 0 ? o3.appendChild(e4) : i2.appendChild(e4));
                }
                let s2 = null;
                if (s2 = window[n].EnableShadowDOM && i2.shadowRoot ? i2.shadowRoot.host.shadowRoot.querySelector(".smart-ripple") : i2.getElementsByClassName("smart-ripple")[0], !s2) return;
                s2.innerHTML = "", s2.classList.remove("smart-animate"), s2.style.height = s2.style.width = Math.max(i2.offsetHeight, i2.offsetWidth) + "px";
                const a3 = window.getComputedStyle(s2.parentElement), l2 = parseInt(a3.borderLeftWidth) || 0, d3 = parseInt(a3.borderTopWidth) || 0, c2 = i2.getBoundingClientRect(), u3 = t2 - (c2.left + window.pageXOffset) - s2.offsetWidth / 2 - l2, p3 = o2 - (c2.top + window.pageYOffset) - s2.offsetHeight / 2 - d3;
                s2.style.left = u3 + "px", s2.style.top = p3 + "px", s2.classList.add("smart-animate"), s2.addEventListener("animationend", function e4() {
                  s2.parentElement && s2.parentElement.removeChild(s2), r3 && r3(), s2.removeEventListener("animationend", e4), s2.removeEventListener("animationcancel", e4);
                }), s2.addEventListener("animationcancel", function e4() {
                  s2.parentElement && s2.parentElement.removeChild(s2), r3 && r3(), s2.removeEventListener("animationcancel", e4), s2.removeEventListener("animationend", e4);
                });
              }
            }
            class s {
              static easeInQuad(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 + t2;
              }
              static easeOutQuad(e3, t2, n2, o2) {
                return -n2 * (e3 /= o2) * (e3 - 2) + t2;
              }
              static easeInOutQuad(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 + t2 : -n2 / 2 * (--e3 * (e3 - 2) - 1) + t2;
              }
              static easeInCubic(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 + t2;
              }
              static easeOutCubic(e3, t2, n2, o2) {
                return n2 * ((e3 = e3 / o2 - 1) * e3 * e3 + 1) + t2;
              }
              static easeInOutCubic(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 + t2 : n2 / 2 * ((e3 -= 2) * e3 * e3 + 2) + t2;
              }
              static easeInQuart(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 * e3 + t2;
              }
              static easeOutQuart(e3, t2, n2, o2) {
                return -n2 * ((e3 = e3 / o2 - 1) * e3 * e3 * e3 - 1) + t2;
              }
              static easeInOutQuart(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 * e3 + t2 : -n2 / 2 * ((e3 -= 2) * e3 * e3 * e3 - 2) + t2;
              }
              static easeInQuint(e3, t2, n2, o2) {
                return n2 * (e3 /= o2) * e3 * e3 * e3 * e3 + t2;
              }
              static easeOutQuint(e3, t2, n2, o2) {
                return n2 * ((e3 = e3 / o2 - 1) * e3 * e3 * e3 * e3 + 1) + t2;
              }
              static easeInOutQuint(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? n2 / 2 * e3 * e3 * e3 * e3 * e3 + t2 : n2 / 2 * ((e3 -= 2) * e3 * e3 * e3 * e3 + 2) + t2;
              }
              static easeInSine(e3, t2, n2, o2) {
                return -n2 * Math.cos(e3 / o2 * (Math.PI / 2)) + n2 + t2;
              }
              static easeOutSine(e3, t2, n2, o2) {
                return n2 * Math.sin(e3 / o2 * (Math.PI / 2)) + t2;
              }
              static easeInOutSine(e3, t2, n2, o2) {
                return -n2 / 2 * (Math.cos(Math.PI * e3 / o2) - 1) + t2;
              }
              static easeInExpo(e3, t2, n2, o2) {
                return 0 === e3 ? t2 : n2 * Math.pow(2, 10 * (e3 / o2 - 1)) + t2;
              }
              static easeOutExpo(e3, t2, n2, o2) {
                return e3 === o2 ? t2 + n2 : n2 * (1 - Math.pow(2, -10 * e3 / o2)) + t2;
              }
              static easeInOutExpo(e3, t2, n2, o2) {
                return 0 === e3 ? t2 : e3 === o2 ? t2 + n2 : (e3 /= o2 / 2) < 1 ? n2 / 2 * Math.pow(2, 10 * (e3 - 1)) + t2 : n2 / 2 * (2 - Math.pow(2, -10 * --e3)) + t2;
              }
              static easeInCirc(e3, t2, n2, o2) {
                return -n2 * (Math.sqrt(1 - (e3 /= o2) * e3) - 1) + t2;
              }
              static easeOutCirc(e3, t2, n2, o2) {
                return n2 * Math.sqrt(1 - (e3 = e3 / o2 - 1) * e3) + t2;
              }
              static easeInOutCirc(e3, t2, n2, o2) {
                return (e3 /= o2 / 2) < 1 ? -n2 / 2 * (Math.sqrt(1 - e3 * e3) - 1) + t2 : n2 / 2 * (Math.sqrt(1 - (e3 -= 2) * e3) + 1) + t2;
              }
              static easeInElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 1 == (e3 /= o2) ? t2 + n2 : (i2 || (i2 = 0.3 * o2), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), -s2 * Math.pow(2, 10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) + t2);
              }
              static easeOutElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 1 == (e3 /= o2) ? t2 + n2 : (i2 || (i2 = 0.3 * o2), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), s2 * Math.pow(2, -10 * e3) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) + n2 + t2);
              }
              static easeInOutElastic(e3, t2, n2, o2) {
                let r3 = 1.70158, i2 = 0, s2 = n2;
                return 0 === e3 ? t2 : 2 == (e3 /= o2 / 2) ? t2 + n2 : (i2 || (i2 = o2 * (0.3 * 1.5)), s2 < Math.abs(n2) ? (s2 = n2, r3 = i2 / 4) : r3 = i2 / (2 * Math.PI) * Math.asin(n2 / s2), e3 < 1 ? s2 * Math.pow(2, 10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) * -0.5 + t2 : s2 * Math.pow(2, -10 * (e3 -= 1)) * Math.sin((e3 * o2 - r3) * (2 * Math.PI) / i2) * 0.5 + n2 + t2);
              }
              static easeInBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), n2 * (e3 /= o2) * e3 * ((r3 + 1) * e3 - r3) + t2;
              }
              static easeOutBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), n2 * ((e3 = e3 / o2 - 1) * e3 * ((r3 + 1) * e3 + r3) + 1) + t2;
              }
              static easeInOutBack(e3, t2, n2, o2, r3) {
                return void 0 === r3 && (r3 = 1.70158), (e3 /= o2 / 2) < 1 ? n2 / 2 * (e3 * e3 * ((1 + (r3 *= 1.525)) * e3 - r3)) + t2 : n2 / 2 * ((e3 -= 2) * e3 * ((1 + (r3 *= 1.525)) * e3 + r3) + 2) + t2;
              }
              static easeInBounce(e3, t2, n2, o2) {
                return n2 - this.easeOutBounce(o2 - e3, 0, n2, o2) + t2;
              }
              static easeOutBounce(e3, t2, n2, o2) {
                return (e3 /= o2) < 1 / 2.75 ? n2 * (7.5625 * e3 * e3) + t2 : e3 < 2 / 2.75 ? n2 * (7.5625 * (e3 -= 1.5 / 2.75) * e3 + 0.75) + t2 : e3 < 2.5 / 2.75 ? n2 * (7.5625 * (e3 -= 2.25 / 2.75) * e3 + 0.9375) + t2 : n2 * (7.5625 * (e3 -= 2.625 / 2.75) * e3 + 0.984375) + t2;
              }
              static easeInOutBounce(e3, t2, n2, o2) {
                return e3 < o2 / 2 ? 0.5 * this.easeInBounce(2 * e3, 0, n2, o2) + t2 : 0.5 * this.easeOutBounce(2 * e3 - o2, 0, n2, o2) + 0.5 * n2 + t2;
              }
            }
            class a2 {
              static get isMobile() {
                const e3 = /(iphone|ipod|ipad|android|iemobile|blackberry|bada)/.test(window.navigator.userAgent.toLowerCase());
                return e3 || ["iPad Simulator", "iPhone Simulator", "iPod Simulator", "iPad", "iPhone", "iPod"].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
              }
              static get Browser() {
                let e3;
                const t2 = function(t3) {
                  let n3 = t3.indexOf(e3);
                  if (-1 === n3) return;
                  const o2 = t3.indexOf("rv:");
                  return "Trident" === e3 && -1 !== o2 ? parseFloat(t3.substring(o2 + 3)) : parseFloat(t3.substring(n3 + e3.length + 1));
                };
                let n2 = {};
                return n2[function() {
                  const t3 = [{ string: navigator.userAgent, subString: "Edge", identity: "Edge" }, { string: navigator.userAgent, subString: "MSIE", identity: "IE" }, { string: navigator.userAgent, subString: "Trident", identity: "IE" }, { string: navigator.userAgent, subString: "Firefox", identity: "Firefox" }, { string: navigator.userAgent, subString: "Opera", identity: "Opera" }, { string: navigator.userAgent, subString: "OPR", identity: "Opera" }, { string: navigator.userAgent, subString: "Chrome", identity: "Chrome" }, { string: navigator.userAgent, subString: "Safari", identity: "Safari" }];
                  for (let n3 = 0; n3 < t3.length; n3++) {
                    let o2 = t3[n3].string;
                    if (e3 = t3[n3].subString, -1 !== o2.indexOf(t3[n3].subString)) return t3[n3].identity;
                  }
                  return "Other";
                }()] = true, n2.version = t2(navigator.userAgent) || t2(navigator.appVersion) || "Unknown", n2;
              }
              static toCamelCase(e3) {
                return e3.replace(/-([a-z])/g, function(e4) {
                  return e4[1].toUpperCase();
                });
              }
              static toDash(e3) {
                return e3.split(/(?=[A-Z])/).join("-").toLowerCase();
              }
              static unescapeHTML(e3) {
                return new DOMParser().parseFromString(e3, "text/html").documentElement.textContent;
              }
              static escapeHTML(e3) {
                const t2 = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;", "`": "&#x60;", "=": "&#x3D;" };
                return String(e3).replace(/[&<>"'`=\/]/g, (e4) => t2[e4]);
              }
              static sanitizeHTML(e3) {
                if (e3 && (e3.indexOf("onclick") >= 0 || e3.indexOf("onload") >= 0 || e3.indexOf("onerror") >= 0)) return this.escapeHTML(e3);
                const t2 = new RegExp("<s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)[^>]*>(.*?)<s*/s*(applet|audio|base|bgsound|embed|form|iframe|isindex|keygen|layout|link|meta|object|script|svg|style|template|video)>", "ig");
                return String(e3).replace(t2, (e4) => this.escapeHTML(e4));
              }
              static createGUID() {
                function e3() {
                  return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                }
                return e3() + e3() + "-" + e3() + "-" + e3() + "-" + e3() + "-" + e3() + e3() + e3();
              }
              static getScriptLocation() {
                return "./" !== window[n].BaseUrl ? window[n].BaseUrl : function() {
                  if (document.currentScript) {
                    let e4 = document.currentScript.src, t3 = e4.lastIndexOf("/");
                    return e4 = e4.substring(0, t3), e4;
                  }
                  const e3 = new Error();
                  let t2 = "(", n2 = ")";
                  if (Smart.Utilities.Core.Browser.Safari && (t2 = "@", n2 = "\n"), e3.fileName) return e3.fileName.replace("/smart.element.js", "");
                  let o2 = e3.stack.split(t2);
                  return o2 = o2[1], o2 = o2.split(n2)[0], o2 = o2.split(":"), o2.splice(-2, 2), o2 = o2.join(":"), o2.replace("/smart.element.js", "");
                }();
              }
              static CSSVariablesSupport() {
                return window.CSS && window.CSS.supports && window.CSS.supports("(--fake-var: 0)");
              }
              static assign(e3, t2) {
                const n2 = (e4) => e4 && "object" == typeof e4 && !Array.isArray(e4) && null !== e4;
                let o2 = Object.assign({}, e3);
                return n2(e3) && n2(t2) && Object.keys(t2).forEach((r3) => {
                  n2(t2[r3]) ? r3 in e3 ? o2[r3] = this.assign(e3[r3], t2[r3]) : Object.assign(o2, { [r3]: t2[r3] }) : Object.assign(o2, { [r3]: t2[r3] });
                }), o2;
              }
              static html(e3, t2) {
                const n2 = this;
                let o2 = "", r3 = e3.childNodes;
                if (!t2) {
                  for (let e4, t3 = 0, i2 = r3.length; t3 < i2 && (e4 = r3[t3]); t3++) {
                    const t4 = ["strong"];
                    if (e4 instanceof HTMLElement || e4.tagName && t4.indexOf(e4.tagName.toLowerCase()) >= 0) {
                      const t5 = e4.tagName.toLowerCase(), r4 = e4.attributes;
                      let i3 = "<" + t5;
                      for (let e5, t6 = 0; e5 = r4[t6]; t6++) i3 += " " + e5.name + '="' + e5.value.replace(/[&\u00A0"]/g, y2.Core.escapeHTML) + '"';
                      i3 += ">", ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"][t5] && (o2 += i3), o2 = o2 + i3 + n2.html(e4) + "</" + t5 + ">";
                    } else {
                      if (8 === e4.nodeType) continue;
                      o2 += e4.textContent.replace(/[&\u00A0<>]/g, y2.Core.escapeHTML);
                    }
                  }
                  return o2;
                }
                {
                  const n3 = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
                  e3.innerHTML = t2.replace(n3, "<$1></$2>");
                }
              }
            }
            let l = [];
            class d2 {
              static watch(e3) {
                switch (e3.nodeName.toLowerCase()) {
                  case "smart-grid":
                  case "smart-kanban":
                  case "smart-table":
                  case "smart-pivot-table":
                  case "smart-scheduler":
                  case "smart-tabs":
                  case "smart-card-view":
                  case "smart-list-box":
                  case "smart-combo-box":
                  case "smart-drop-down-list":
                  case "smart-calendar":
                  case "smart-gauge":
                  case "smart-numeric-text-box":
                  case "smart-menu":
                  case "smart-tree":
                    l.push(e3);
                    break;
                  default:
                    return;
                }
                d2.start();
              }
              static start() {
                d2.isStarted || (d2.isStarted = true, d2.interval && clearInterval(d2.interval), 0 === l.length || document.hidden ? d2.isStarted = false : d2.interval = setInterval(function() {
                  d2.observe();
                }, 100));
              }
              static stop() {
                d2.isStarted = false, d2.interval && clearInterval(d2.interval);
              }
              static observeElement(e3) {
                const t2 = e3;
                if ("test" === window.Smart.Mode || document.hidden) return void (d2.interval && clearInterval(d2.interval));
                let n2 = e3._computedStyle || "resize" !== t2.hasStyleObserver ? document.defaultView.getComputedStyle(t2, null) : {}, o2 = true, r3 = "resize" !== t2.hasStyleObserver ? ["paddingLeft", "paddingRight", "paddingTop", "paddingBottom", "borderLeftWidth", "borderRightWidth", "borderTopWidth", "borderBottomWidth", "display", "visibility", "font-size", "font-family", "font-style", "font-weight", "max-height", "min-height", "max-width", "min-width", "overflow", "overflow-x", "overflow-y"] : [];
                if (e3.styleProperties && (r3 = r3.concat(e3.styleProperties)), e3.observableStyleProperties && (r3 = e3.observableStyleProperties), !t2._styleInfo) {
                  t2._styleInfo = [];
                  for (let e4 = 0; e4 < r3.length; e4++) {
                    const o3 = r3[e4], i3 = o3.startsWith("--") ? n2.getPropertyValue(o3) : n2[o3];
                    t2._styleInfo[o3] = i3;
                  }
                  return;
                }
                if (e3.isHidden || "none" !== n2.display && (0 !== e3.offsetWidth && 0 !== e3.offsetHeight || (e3.isHidden = true)), e3.isHidden) {
                  if (e3.visibilityChangedHandler(), e3.isHidden) return;
                  o2 = false;
                }
                let i2 = [];
                for (let e4 = 0; e4 < r3.length; e4++) {
                  const o3 = r3[e4], s2 = o3.startsWith("--") ? n2.getPropertyValue(o3) : n2[o3];
                  t2._styleInfo[o3] !== s2 && (i2[o3] = { oldValue: t2._styleInfo[o3], value: s2 }, i2.length++), t2._styleInfo[o3] = s2;
                }
                i2.length > 0 && (t2.$.fireEvent("styleChanged", { styleProperties: i2 }, { bubbles: false, cancelable: true }), i2.display && o2 && t2.$.fireEvent("resize", t2, { bubbles: false, cancelable: true }));
              }
              static observe() {
                for (let e3 = 0; e3 < l.length; e3++) {
                  const t2 = l[e3];
                  this.observeElement(t2);
                }
              }
              static unwatch(e3) {
                d2.stop();
                const t2 = l.indexOf(e3);
                -1 !== t2 && l.splice(t2, 1), d2.start();
              }
            }
            let c = [];
            const u2 = [], p2 = ["resize", "down", "up", "move", "tap", "taphold", "swipeleft", "swiperight", "swipetop", "swipebottom"];
            class h2 {
              constructor(e3) {
                const t2 = this;
                t2.target = e3, t2.$target = new f2(e3), t2.$document = e3.$document ? e3.$document : new f2(document), t2.id = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase();
                let n2 = { handlers: {}, boundEventTypes: [], listen: t2.listen.bind(t2), unlisten: t2.unlisten.bind(t2) };
                return t2.tapHoldDelay = 750, t2.swipeMin = 10, t2.swipeMax = 5e3, t2.swipeDelay = 1e3, t2.tapHoldDelay = 750, t2.inputEventProperties = ["clientX", "clientY", "pageX", "pageY", "screenX", "screenY"], p2.forEach((e4) => {
                  n2[e4] = (t3) => {
                    n2.handlers[e4] = t3;
                  }, t2[e4] = (e5) => {
                    if (!n2.handlers[e5.type]) {
                      if (("mousemove" === e5.type || "pointermove" === e5.type || "touchmove" === e5.type) && n2.handlers.move) {
                        const o2 = t2.createEvent(e5, "move");
                        n2.handlers.move(o2);
                      }
                      return true;
                    }
                    return n2.handlers[e5.type](e5);
                  };
                }), t2.listen(), t2.handlers = n2.handlers, n2;
              }
              listen(e3) {
                const t2 = this;
                if ("resize" === e3 && t2.target !== document && t2.target !== window && false !== t2.target.hasResizeObserver) {
                  if (Smart.Utilities.Core.Browser.Firefox) {
                    if (!t2.target.resizeObserver) {
                      let e4, n2, o2, r3 = false, i2 = t2.target.offsetWidth, s2 = t2.target.offsetHeight;
                      const a3 = new ResizeObserver(() => {
                        if (!r3) return void (r3 = true);
                        const a4 = new CustomEvent("resize", { bubbles: false, cancelable: true });
                        n2 = t2.target.offsetWidth, o2 = t2.target.offsetHeight, e4 = n2 !== i2 || o2 !== s2, t2.target.requiresLayout && (e4 = true), e4 && (t2.resize(a4), t2.target.requiresLayout = false);
                      });
                      a3.observe(t2.target), t2.target.resizeObserver = a3;
                    }
                  } else if (!t2.target.resizeTrigger) {
                    const e4 = document.createElement("div");
                    e4.className = "smart-resize-trigger-container", e4.innerHTML = '<div class="smart-resize-trigger-container"><div class="smart-resize-trigger"></div></div><div class="smart-resize-trigger-container"><div class="smart-resize-trigger-shrink"></div></div>', e4.setAttribute("aria-hidden", true), window[n].EnableShadowDOM && t2.target.shadowRoot ? t2.target.shadowRoot.appendChild(e4) : t2.target.appendChild(e4), t2.target.resizeTrigger = e4;
                    const o2 = e4.childNodes[0], r3 = o2.childNodes[0], i2 = e4.childNodes[1], s2 = function() {
                      r3.style.width = "100000px", r3.style.height = "100000px", o2.scrollLeft = 1e5, o2.scrollTop = 1e5, i2.scrollLeft = 1e5, i2.scrollTop = 1e5;
                    };
                    let a3, l2, d3, c2, u3 = t2.target.offsetWidth, p3 = t2.target.offsetHeight;
                    if (0 === u3 || 0 === p3) {
                      const e5 = function() {
                        s2(), t2.target.removeEventListener("resize", e5);
                      };
                      t2.target.addEventListener("resize", e5), s2();
                    } else s2();
                    t2.target.resizeHandler = function() {
                      l2 || (l2 = requestAnimationFrame(function() {
                        if (l2 = 0, d3 = t2.target.offsetWidth, c2 = t2.target.offsetHeight, a3 = d3 !== u3 || c2 !== p3, t2.target.requiresLayout && (a3 = true), !a3) return;
                        u3 = d3, p3 = c2;
                        const e5 = new CustomEvent("resize", { bubbles: false, cancelable: true });
                        t2.resize(e5), t2.target.requiresLayout = false;
                      })), s2();
                    }, o2.addEventListener("scroll", t2.target.resizeHandler), i2.addEventListener("scroll", t2.target.resizeHandler);
                  }
                }
                t2.isListening || (t2.isListening = true, t2.isPressed = false, t2.isReleased = false, t2.isInBounds = false, window.PointerEvent ? (t2.$target.listen("pointerdown.inputEvents" + t2.id, t2.pointerDown.bind(t2)), t2.$target.listen("pointerup.inputEvents" + t2.id, t2.pointerUp.bind(t2)), t2.$target.listen("pointermove.inputEvents" + t2.id, t2.pointerMove.bind(t2)), t2.$target.listen("pointercancel.inputEvents" + t2.id, t2.pointerCancel.bind(t2))) : ("ontouchstart" in window && (t2.$target.listen("touchmove.inputEvents" + t2.id, t2.touchMove.bind(t2)), t2.$target.listen("touchstart.inputEvents" + t2.id, t2.touchStart.bind(t2)), t2.$target.listen("touchend.inputEvents" + t2.id, t2.touchEnd.bind(t2)), t2.$target.listen("touchcancel.inputEvents" + t2.id, t2.touchCancel.bind(t2))), t2.$target.listen("mousedown.inputEvents" + t2.id, t2.mouseDown.bind(t2)), t2.$target.listen("mouseup.inputEvents" + t2.id, t2.mouseUp.bind(t2)), t2.$target.listen("mousemove.inputEvents" + t2.id, t2.mouseMove.bind(t2)), t2.$target.listen("mouseleave.inputEvents" + t2.id, t2.mouseLeave.bind(t2))), t2.target._handleDocumentUp || (t2.target._handleDocumentUp = t2.handleDocumentUp.bind(t2), t2.target._handleDocumentUpId = t2.id, t2.$document.listen("mouseup.inputEvents" + t2.target._handleDocumentUpId, t2.target._handleDocumentUp)));
              }
              unlisten(e3) {
                const t2 = this;
                if (t2.isListening = false, window.PointerEvent ? (t2.$target.unlisten("pointerdown.inputEvents" + t2.id), t2.$target.unlisten("pointerup.inputEvents" + t2.id), t2.$target.unlisten("pointermove.inputEvents" + t2.id), t2.$target.unlisten("pointercancel.inputEvents" + t2.id)) : ("ontouchstart" in window && (t2.$target.unlisten("touchstart.inputEvents" + t2.id), t2.$target.unlisten("touchmove.inputEvents" + t2.id), t2.$target.unlisten("touchend.inputEvents" + t2.id), t2.$target.unlisten("touchcancel.inputEvents" + t2.id)), t2.$target.unlisten("mousedown.inputEvents" + t2.id), t2.$target.unlisten("mouseup.inputEvents" + t2.id), t2.$target.unlisten("mousemove.inputEvents" + t2.id), t2.$target.unlisten("mouseleave.inputEvents" + t2.id)), t2.target._handleDocumentUp && (t2.$document.unlisten("mouseup.inputEvents" + t2.target._handleDocumentUpId, t2.target._handleDocumentUp), delete t2.target._handleDocumentUp, delete t2.target._handleDocumentUpId), "resize" === e3) {
                  if (Smart.Utilities.Core.Browser.Firefox) t2.target.resizeObserver && (t2.target.resizeObserver.unobserve(t2.target), delete t2.target.resizeObserver);
                  else if (t2.target.resizeTrigger) {
                    const e4 = t2.target.resizeTrigger, n2 = e4.childNodes[0], o2 = e4.childNodes[1];
                    n2.removeEventListener("scroll", t2.target.resizeHandler), o2.removeEventListener("scroll", t2.target.resizeHandler), t2.target.resizeHandler = null, e4.parentNode.removeChild(e4), delete t2.target.resizeTrigger;
                  }
                }
              }
              handleDocumentUp(e3) {
                const t2 = this;
                t2.isPressed = false, t2.isReleased = false, t2.resetSwipe(e3);
              }
              createEvent(e3, t2) {
                const n2 = this, o2 = e3.touches, r3 = e3.changedTouches, i2 = o2 && o2.length ? o2[0] : r3 && r3.length ? r3[0] : void 0, s2 = new CustomEvent(t2, { bubbles: true, cancelable: true, composed: void 0 !== n2.$target.element.getRootNode().host });
                if (s2.originalEvent = e3, i2) {
                  for (let e4 = 0; e4 < n2.inputEventProperties.length; e4++) {
                    const t3 = n2.inputEventProperties[e4];
                    s2[t3] = i2[t3];
                  }
                  return s2;
                }
                for (let t3 in e3) t3 in s2 || (s2[t3] = e3[t3]);
                return s2;
              }
              fireTap(e3) {
                const t2 = this;
                if (clearTimeout(this.tapHoldTimeout), !this.tapHoldFired && this.isInBounds) {
                  const n2 = t2.createEvent(e3, "tap");
                  t2.tap(n2);
                }
              }
              initTap(e3) {
                const t2 = this;
                t2.isInBounds = true, t2.tapHoldFired = false, t2.tapHoldTimeout = setTimeout(function() {
                  if (t2.isInBounds) {
                    t2.tapHoldFired = true;
                    const n2 = t2.createEvent(e3, "taphold");
                    t2.taphold(n2);
                  }
                }, t2.tapHoldDelay);
              }
              pointerDown(e3) {
                return this.handleDown(e3);
              }
              mouseDown(e3) {
                const t2 = this;
                if (!(t2.isPressed || t2.touchStartTime && /* @__PURE__ */ new Date() - t2.touchStartTime < 500)) return t2.handleDown(e3);
              }
              touchStart(e3) {
                const t2 = this;
                return t2.touchStartTime = /* @__PURE__ */ new Date(), t2.isTouchMoved = true, t2.handleDown(e3);
              }
              mouseUp(e3) {
                const t2 = this;
                if (!(t2.isReleased || t2.touchEndTime && /* @__PURE__ */ new Date() - t2.touchEndTime < 500)) return t2.handleUp(e3);
              }
              handleDown(e3) {
                const t2 = this;
                t2.isReleased = false, t2.isPressed = true;
                const n2 = t2.createEvent(e3, "down");
                return (t2.handlers.tap || t2.handlers.taphold) && t2.initTap(n2), (t2.handlers.swipeleft || t2.handlers.swiperight || t2.handlers.swipetop || t2.handlers.swipebottom) && t2.initSwipe(n2), t2.down(n2);
              }
              handleUp(e3) {
                const t2 = this;
                t2.isReleased = true, t2.isPressed = false;
                const n2 = t2.createEvent(e3, "up"), o2 = t2.up(n2);
                return (t2.handlers.tap || t2.handlers.taphold) && t2.fireTap(n2), t2.resetSwipe(n2), o2;
              }
              handleMove(e3) {
                const t2 = this;
                let n2 = t2.move(e3);
                return t2.isPressed && (t2._maxSwipeVerticalDistance = Math.max(t2._maxSwipeVerticalDistance, Math.abs(t2._startY - e3.pageY)), t2._maxSwipeHorizontalDistance = Math.max(t2._maxSwipeHorizontalDistance, Math.abs(t2._startX - e3.pageX)), n2 = t2.handleSwipeEvents(e3)), n2;
              }
              touchEnd(e3) {
                return this.touchEndTime = /* @__PURE__ */ new Date(), this.handleUp(e3);
              }
              pointerUp(e3) {
                return this.handleUp(e3);
              }
              pointerCancel(e3) {
                this.pointerUp(e3);
              }
              touchCancel(e3) {
                this.touchEnd(e3);
              }
              mouseLeave() {
                this.isInBounds = false;
              }
              mouseMove(e3) {
                if (!this.isTouchMoved) return this.handleMove(e3);
              }
              pointerMove(e3) {
                return this.handleMove(e3);
              }
              touchMove(e3) {
                const t2 = this, n2 = e3.touches, o2 = e3.changedTouches, r3 = n2 && n2.length ? n2[0] : o2 && o2.length ? o2[0] : void 0;
                for (let n3 = 0; n3 < t2.inputEventProperties.length; n3++) {
                  const o3 = t2.inputEventProperties[n3];
                  void 0 === e3[o3] && (e3[o3] = r3[o3]);
                }
                return t2.isTouchMoved = true, t2.handleMove(e3);
              }
              handleSwipeEvents(e3) {
                const t2 = this;
                let n2 = true;
                return (t2.handlers.swipetop || t2.handlers.swipebottom) && (n2 = this.handleVerticalSwipeEvents(e3)), false === n2 || (t2.handlers.swipeleft || t2.handlers.swiperight) && (n2 = this.handleHorizontalSwipeEvents(e3)), n2;
              }
              handleVerticalSwipeEvents(e3) {
                let t2, n2;
                return t2 = e3.pageY, n2 = t2 - this._startY, this.swiped(e3, n2, "vertical");
              }
              handleHorizontalSwipeEvents(e3) {
                let t2, n2;
                return t2 = e3.pageX, n2 = t2 - this._startX, this.swiped(e3, n2, "horizontal");
              }
              swiped(e3, t2, n2) {
                const o2 = this;
                if (n2 = n2 || 0, Math.abs(t2) >= o2.swipeMin && !o2._swipeEvent && !o2._swipeLocked) {
                  let r3 = t2 < 0 ? "swipeleft" : "swiperight";
                  if ("horizontal" === n2 ? o2._swipeEvent = o2.createEvent(e3, r3) : (r3 = t2 < 0 ? "swipetop" : "swipebottom", o2._swipeEvent = o2.createEvent(e3, t2 < 0 ? "swipetop" : "swipebottom")), o2[r3] && (o2[r3](this._swipeEvent), Math.abs(t2) <= this.swipeMax)) return e3.stopImmediatePropagation(), false;
                }
                return true;
              }
              resetSwipe() {
                this._swipeEvent = null, clearTimeout(this._swipeTimeout);
              }
              initSwipe(e3) {
                const t2 = this;
                t2._maxSwipeVerticalDistance = 0, t2._maxSwipeHorizontalDistance = 0, t2._startX = e3.pageX, t2._startY = e3.pageY, t2._swipeLocked = false, t2._swipeEvent = null, t2._swipeTimeout = setTimeout(function() {
                  t2._swipeLocked = true;
                }, t2.swipeDelay);
              }
            }
            class m2 {
              get scrollWidth() {
                const e3 = this;
                return e3.horizontalScrollBar ? e3.horizontalScrollBar.max : -1;
              }
              set scrollWidth(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.horizontalScrollBar && (t2.horizontalScrollBar.max = e3);
              }
              get scrollHeight() {
                const e3 = this;
                return e3.verticalScrollBar ? e3.verticalScrollBar.max : -1;
              }
              set scrollHeight(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.verticalScrollBar && (t2.verticalScrollBar.max = e3);
              }
              get scrollLeft() {
                const e3 = this;
                return e3.horizontalScrollBar ? e3.horizontalScrollBar.value : -1;
              }
              set scrollLeft(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.horizontalScrollBar && (t2.horizontalScrollBar.value = e3);
              }
              get scrollTop() {
                const e3 = this;
                return e3.verticalScrollBar ? e3.verticalScrollBar.value : -1;
              }
              set scrollTop(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2.verticalScrollBar && (t2.verticalScrollBar.value = e3);
              }
              get vScrollBar() {
                return this.verticalScrollBar;
              }
              get hScrollBar() {
                return this.horizontalScrollBar;
              }
              constructor(e3, t2, n2) {
                const o2 = this;
                o2.container = e3, o2.horizontalScrollBar = t2, o2.verticalScrollBar = n2, o2.disableSwipeScroll = false, o2.listen();
              }
              listen() {
                const e3 = this, t2 = a2.isMobile, n2 = e3.horizontalScrollBar, o2 = e3.verticalScrollBar;
                let r3, i2, s2, l2, d3, c2, u3, p3;
                e3.inputEvents = new h2(e3.container);
                const m3 = function(e4) {
                  return { amplitude: 0, delta: 0, initialValue: 0, min: 0, max: e4.max, previousValue: 0, pointerPosition: 0, targetValue: 0, scrollBar: e4, value: 0, velocity: 0 };
                }, f3 = m3(n2), g3 = m3(o2), w2 = function() {
                  const t3 = e3.container.touchVelocityCoefficient || 50;
                  c2 = Date.now(), u3 = c2 - l2, l2 = c2;
                  const n3 = function(e4) {
                    e4.delta = e4.value - e4.previousValue, e4.previousValue = e4.value;
                    let n4 = t3 * e4.delta / (1 + u3);
                    e4.velocity = 0.8 * n4 + 0.2 * e4.velocity;
                  };
                  n3(g3), n3(f3);
                }, b3 = function(e4) {
                  return p3.value = e4 > p3.max ? p3.max : e4 < p3.min ? p3.min : e4, p3.scrollBar.value = p3.value, e4 > p3.max ? "max" : e4 < p3.min ? "min" : "value";
                };
                function v3() {
                  let t3, n3;
                  p3.amplitude && (e3.container.$.fireEvent("kineticScroll"), t3 = Date.now() - l2, n3 = -p3.amplitude * Math.exp(-t3 / 500), n3 > 5 || n3 < -5 ? (b3(p3.targetValue + n3), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(v3)) : b3(p3.targetValue));
                }
                let C3;
                e3.inputEvents.down(function(n3) {
                  if (!t2) return;
                  const o3 = n3.originalEvent.target, i3 = o3 && o3.closest ? o3.closest("smart-scroll-bar") : void 0;
                  if (i3 === e3.horizontalScrollBar || i3 === e3.verticalScrollBar) return;
                  s2 = true, r3 = false;
                  const a3 = function(e4, t3) {
                    e4.amplitude = 0, e4.pointerPosition = t3, e4.previousValue = e4.value, e4.value = e4.scrollBar.value, e4.initialValue = e4.value, e4.max = e4.scrollBar.max;
                  };
                  a3(g3, n3.clientY), a3(f3, n3.clientX), l2 = Date.now(), clearInterval(d3), d3 = setInterval(w2, 500);
                }), e3.inputEvents.up(function() {
                  if (!s2) return true;
                  if (clearInterval(d3), e3.disableSwipeScroll) return void (s2 = false);
                  const t3 = function(e4) {
                    p3 = e4, e4.amplitude = 0.8 * e4.velocity, e4.targetValue = Math.round(e4.value + e4.amplitude), l2 = Date.now(), cancelAnimationFrame(i2), i2 = requestAnimationFrame(v3), e4.velocity = 0;
                  };
                  g3.velocity > 10 || g3.velocity < -10 ? t3(g3) : (f3.velocity > 10 || f3.velocity < -10) && t3(f3), s2 = false;
                }), e3.inputEvents.move(function(t3) {
                  if (!s2) return true;
                  if (e3.disableSwipeScroll) return;
                  if (r3 && (t3.originalEvent.preventDefault(), t3.originalEvent.stopPropagation()), f3.visible = e3.scrollWidth > 0, g3.visible = e3.scrollHeight > 0, !s2 || !f3.visible && !g3.visible) return;
                  const n3 = e3.container.touchScrollRatio, o3 = e3.container;
                  let i3, a3;
                  n3 && ("number" == typeof n3 ? (i3 = -n3, a3 = -n3) : "function" == typeof n3 && (i3 = n3(g3.max, o3.offsetHeight), a3 = n3(f3.max, o3.offsetWidth))), g3.ratio = i3 || -g3.max / o3.offsetHeight, g3.delta = (t3.clientY - g3.pointerPosition) * g3.ratio, f3.ratio = a3 || -f3.max / o3.offsetWidth, f3.delta = (t3.clientX - f3.pointerPosition) * f3.ratio;
                  let l3 = "value";
                  const d4 = function(t4, n4, o4) {
                    return t4.delta > 5 || t4.delta < -5 ? (p3 = t4, l3 = t4.initialValue + t4.delta > p3.max ? "max" : t4.initialValue + t4.delta < p3.min ? "min" : "value", "min" === l3 && 0 === t4.initialValue || "max" === l3 && t4.initialValue === t4.max || !t4.visible || (e3.container.$.fireEvent("kineticScroll"), b3(t4.initialValue + t4.delta), w2(), o4.originalEvent.preventDefault(), o4.originalEvent.stopPropagation(), r3 = true, false)) : null;
                  };
                  let c3 = d4(g3, t3.clientY, t3);
                  if (null !== c3) return c3;
                  {
                    let e4 = d4(f3, t3.clientX, t3);
                    if (null !== e4) return e4;
                  }
                }), e3.scrollTo = function(t3, n3) {
                  const o3 = false === n3 ? f3 : g3;
                  let r4 = false;
                  l2 || (l2 = Date.now()), C3 || (C3 = Date.now()), Math.abs(Date.now() - C3) > 375 ? l2 = Date.now() : r4 = true, C3 = Date.now(), o3.value = o3.scrollBar.value, o3.delta = t3 - o3.value, o3.max = o3.scrollBar.max, t3 <= o3.min && (t3 = o3.min), t3 >= o3.max && (t3 = o3.max), o3.targetValue = t3;
                  const s3 = t3;
                  let a3 = o3.value;
                  o3.velocity = 100 * o3.delta / (1 + o3.max), o3.from = a3;
                  const d4 = function(e4) {
                    return o3.value = e4 > o3.max ? o3.max : e4 < o3.min ? o3.min : e4, o3.scrollBar.value = o3.value, e4 > o3.max ? "max" : e4 < o3.min ? "min" : "value";
                  }, c3 = function() {
                    let n4, u4 = Date.now() - C3, p4 = Math.min(1e3, Date.now() - l2), h3 = o3.velocity * Math.exp(p4 / 175);
                    if (r4) (h3 < 0 && o3.value <= t3 || h3 > 0 && o3.value >= t3) && (h3 = 0), (o3.value + h3 <= o3.min || o3.value + h3 >= o3.max) && (h3 = 0), h3 > 0.5 || h3 < -0.5 ? (d4(o3.value + h3), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(c3)) : d4(o3.targetValue);
                    else {
                      if (u4 >= 175) return cancelAnimationFrame(i2), e3.container.$.fireEvent("kineticScroll"), void (i2 = 0);
                      n4 = y2.Animation.Easings.easeInSine(u4, a3, s3 - a3, 175), d4(n4), cancelAnimationFrame(i2), i2 = 0, i2 = requestAnimationFrame(c3);
                    }
                  };
                  cancelAnimationFrame(i2), i2 = requestAnimationFrame(c3);
                }, e3.inputEvents.listen();
              }
              unlisten() {
                const e3 = this;
                e3.inputEvents && e3.inputEvents.unlisten(), delete e3.inputEvents;
              }
            }
            class f2 {
              constructor(e3) {
                this.events = {}, this.handlers = {}, this.element = e3;
              }
              hasClass(e3) {
                const t2 = this, n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) if (!t2.element.classList.contains(n2[e4])) return false;
                return true;
              }
              addClass(e3) {
                const t2 = this;
                if (t2.hasClass(e3)) return;
                const n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) t2.element.classList.add(n2[e4]);
                t2.isNativeElement || d2.observeElement(t2.element);
              }
              removeClass(e3) {
                const t2 = this;
                if (0 === arguments.length) return void t2.element.removeAttribute("class");
                const n2 = e3.split(" ");
                for (let e4 = 0; e4 < n2.length; e4++) t2.element.classList.remove(n2[e4]);
                "" === t2.element.className && t2.element.removeAttribute("class"), t2.isNativeElement || d2.observeElement(t2.element);
              }
              get isCustomElement() {
                const e3 = this;
                return !!e3.element.tagName.startsWith(n) || e3.element instanceof window[n].BaseElement == 1 || "DIV" !== e3.element.tagName && "SPAN" !== e3.element.tagName && "BUTTON" !== e3.element.tagName && "INPUT" !== e3.element.tagName && "UL" !== e3.element.tagName && "LI" !== e3.element.tagName && document.createElement(e3.element.nodeName) instanceof window[n].BaseElement == 1;
              }
              get isNativeElement() {
                return !this.isCustomElement;
              }
              dispatch(e3) {
                const t2 = this, n2 = t2.events[e3.type];
                let o2 = false;
                if (n2.length > 1) for (let e4 = 0; e4 < n2.length; e4++) {
                  const t3 = n2[e4];
                  if (t3.namespace && t3.namespace.indexOf("_") >= 0) {
                    o2 = true;
                    break;
                  }
                }
                o2 && n2.sort(function(e4, t3) {
                  let n3 = e4.namespace, o3 = t3.namespace;
                  return n3 = -1 === n3.indexOf("_") ? 0 : parseInt(n3.substring(n3.indexOf("_") + 1)), o3 = -1 === o3.indexOf("_") ? 0 : parseInt(o3.substring(o3.indexOf("_") + 1)), n3 < o3 ? -1 : n3 > o3 ? 1 : 0;
                });
                for (let o3 = 0; o3 < n2.length; o3++) {
                  const r3 = n2[o3];
                  if (e3.namespace = r3.namespace, e3.context = r3.context, e3.defaultPrevented) break;
                  const i2 = r3.handler.apply(t2.element, [e3]);
                  if (void 0 !== i2 && (e3.result = i2, false === i2)) {
                    e3.preventDefault(), e3.stopPropagation();
                    break;
                  }
                }
                return e3.result;
              }
              fireEvent(e3, t2, n2) {
                const o2 = this;
                n2 || (n2 = { bubbles: true, cancelable: true, composed: null !== o2.element.getRootNode().host }), n2.detail = t2 || {};
                const r3 = new CustomEvent(e3, n2);
                return r3.originalStopPropagation = r3.stopPropagation, r3.stopPropagation = function() {
                  return r3.isPropagationStopped = true, r3.originalStopPropagation();
                }, o2.dispatchEvent(r3), r3;
              }
              get isPassiveSupported() {
                const e3 = this;
                if (void 0 !== e3.supportsPassive) return e3.supportsPassive;
                e3.supportsPassive = false;
                try {
                  let t2 = Object.defineProperty({}, "passive", { get: function() {
                    e3.supportsPassive = true;
                  } });
                  window.addEventListener("testPassive", null, t2), window.removeEventListener("testPassive", null, t2);
                } catch (e4) {
                }
                return e3.supportsPassive;
              }
              dispatchEvent(e3) {
                const t2 = this, n2 = e3.type, o2 = t2.element.context, r3 = n2.substring(0, 1).toUpperCase() + n2.substring(1);
                t2.element.context = document, t2.element["on" + r3] ? t2.element["on" + r3](e3) : t2.element["on" + n2.toLowerCase()] ? t2.element["on" + n2.toLowerCase()](e3) : t2.element.dispatchEvent(e3), t2.element.context = o2;
              }
              listen(e3, t2) {
                const n2 = this, o2 = e3.split("."), r3 = o2.slice(1).join("."), i2 = o2[0];
                n2.events[i2] || (n2.events[i2] = []);
                const s2 = { type: i2, handler: t2, context: n2.element, namespace: r3 };
                p2.indexOf(i2) >= 0 && (n2.inputEvents || (n2.inputEvents = new h2(n2.element)), n2.inputEvents[i2](function(e4) {
                  n2.dispatchEvent(e4);
                }), n2.inputEvents.boundEventTypes.push(i2), n2.inputEvents.listen(i2)), 0 === n2.events[i2].length && (n2.handlers[i2] = n2.dispatch.bind(n2), "wheel" === i2 ? n2.element.addEventListener("wheel", n2.handlers[i2], !!n2.isPassiveSupported && { passive: false }) : "touchmove" === i2 || "touchstart" === i2 || "touchend" === i2 ? n2.element.addEventListener(i2, n2.handlers[i2], !!n2.isPassiveSupported && { passive: false }) : n2.element.addEventListener(i2, n2.handlers[i2], false)), n2.events[i2].push(s2);
              }
              unlisten(e3) {
                const t2 = this, n2 = e3.split("."), o2 = n2.slice(1).join("."), r3 = n2[0];
                let i2 = t2.events[r3];
                if (t2.inputEvents && t2.inputEvents.boundEventTypes.indexOf(r3) >= 0 && (t2.inputEvents.boundEventTypes.splice(t2.inputEvents.boundEventTypes.indexOf(r3), 1), 0 === t2.inputEvents.boundEventTypes.length && t2.inputEvents.unlisten(r3)), i2) {
                  for (let e4 = 0; e4 < i2.length; e4++) {
                    if ("" !== o2) {
                      let e5 = i2.findIndex((e6) => e6.namespace === o2);
                      i2.splice(e5, 1);
                      break;
                    }
                    i2 = [];
                  }
                  0 === i2.length && (t2.element.removeEventListener(r3, t2.handlers[r3]), t2.events[r3] = [], delete t2.handlers[r3]);
                }
              }
              getAttributeValue(e3, t2) {
                const n2 = this, o2 = n2.element.getAttribute(e3);
                if (n2.isNativeElement) return n2.deserialize(o2, t2);
                const r3 = n2.element.propertyByAttributeName[e3];
                return void 0 === r3.deserialize ? n2.deserialize(o2, t2, r3.nullable) : n2.element[r3.deserialize](o2);
              }
              setAttributeValue(e3, t2, n2) {
                const o2 = this;
                let r3, i2 = false;
                if (o2.isNativeElement) {
                  if (r3 = o2.serialize(t2, n2), "boolean" === n2 && ["checked", "selected", "async", "autofocus", "autoplay", "controls", "defer", "disabled", "hidden", "ismap", "loop", "multiple", "open", "readonly", "required", "scoped"].indexOf(e3) >= 0) return void (t2 ? o2.element.setAttribute(e3, "") : o2.element.removeAttribute(e3));
                } else {
                  const s2 = o2.element.propertyByAttributeName[e3];
                  i2 = !s2 || s2.nullable, r3 = s2 && s2.serialize ? o2.element[s2.serialize](t2) : o2.serialize(t2, n2, i2);
                }
                "array" !== n2 && "object" !== n2 || "[]" !== r3 && "{}" !== r3 ? void 0 === r3 ? (o2.element.removeAttribute(e3), o2.element.shadowRoot && o2.element.$.root && o2.element.$.root.removeAttribute(e3)) : (o2.element.setAttribute(e3, r3), o2.element.shadowRoot && o2.element.$.root && o2.element.$.root.setAttribute(e3, r3)) : o2.element.removeAttribute(e3);
              }
              serialize(e3, t2, n2) {
                if (void 0 === t2 && (t2 = y2.Types.getType(e3)), void 0 !== e3 && (n2 || null !== e3)) {
                  if (n2 && null === e3) return "null";
                  if ("string" === t2) return e3;
                  if ("boolean" === t2 || "bool" === t2) {
                    if (true === e3 || "true" === e3 || 1 === e3 || "1" === e3) return "";
                    if (false === e3 || "false" === e3 || 0 === e3 || "0" === e3) return;
                  }
                  return "array" === t2 ? JSON.stringify(e3) : ["string", "number", "int", "integer", "float", "date", "any", "function"].indexOf(t2) >= 0 ? e3.toString() : "object" === t2 ? JSON.stringify(e3) : void 0;
                }
              }
              deserialize(e3, t2, n2) {
                const o2 = "null" === e3;
                if (void 0 !== e3 && (!o2 || n2)) {
                  if (o2 && n2) return null;
                  if ("boolean" === t2 || "bool" === t2) return null !== e3;
                  if ("number" === t2 || "float" === t2) return "NaN" === e3 ? NaN : "Infinity" === e3 ? 1 / 0 : "-Infinity" === e3 ? -1 / 0 : parseFloat(e3);
                  if ("int" === t2 || "integer" === t2) return "NaN" === e3 ? NaN : "Infinity" === e3 ? 1 / 0 : "-Infinity" === e3 ? -1 / 0 : parseInt(e3);
                  if ("string" === t2) return e3;
                  if ("any" === t2) return e3;
                  if ("date" === t2) return new Date(e3);
                  if ("function" === t2) {
                    if ("function" == typeof window[e3]) return window[e3];
                  } else if ("array" === t2 || "object" === t2) try {
                    const t3 = JSON.parse(e3);
                    if (t3) return t3;
                  } catch (n3) {
                    if (window[e3] && "object" == typeof window[e3]) return window[e3];
                    if ("array" === t2 && e3.indexOf("[") >= 0) {
                      if (e3.indexOf("{") >= 0) {
                        let t3 = e3.replace(/{/gi, "").replace("[", "").replace("]", "").replace(/'/gi, "").replace(/"/gi, "").trim();
                        t3 = t3.split("},");
                        for (let e4 = 0; e4 < t3.length; e4++) {
                          let n4 = {}, o3 = t3[e4].trim().split(",");
                          for (let e5 = 0; e5 < o3.length; e5++) {
                            const t4 = o3[e5].split(":")[0].trim(), r3 = o3[e5].split(":")[1].trim();
                            n4[t4] = r3;
                          }
                          t3[e4] = n4;
                        }
                        return t3;
                      }
                      return e3.replace("[", "").replace("]", "").replace(/'/gi, "").replace(/"/gi, "").trim().split(",");
                    }
                  }
                }
              }
            }
            class g2 {
              static get Ripple() {
                return i;
              }
              static get Easings() {
                return s;
              }
            }
            class y2 {
              static get Types() {
                return r2;
              }
              static get Core() {
                return a2;
              }
              static get Animation() {
                return g2;
              }
              static get Scroll() {
                return m2;
              }
              static get InputEvents() {
                return h2;
              }
              static Extend(e3) {
                return new f2(e3);
              }
              static Assign(e3, t2) {
                if (e3.indexOf(".") >= 0) {
                  const n2 = e3.split(".");
                  return y2[n2[0]] || (y2[n2[0]] = {}), void (y2[n2[0]][n2[1]] = t2);
                }
                y2[e3] = t2;
              }
            }
            const w = y2.Extend(document);
            let b2 = null;
            document.addEventListener("click", () => {
              d2.start(), b2 && clearTimeout(b2), b2 = setTimeout(() => {
                d2.stop();
              }, 1e4);
            }), document.addEventListener("mouseenter", () => {
              d2.start();
            }), document.addEventListener("mouseleave", () => {
              d2.stop();
            });
            class v2 {
            }
            v2.cache = {};
            class C2 extends HTMLElement {
              static get properties() {
                return { animation: { value: "advanced", type: "string", allowedValues: ["none", "simple", "advanced"] }, unfocusable: { value: false, type: "boolean" }, disabled: { value: false, type: "boolean" }, dataContext: { value: null, reflectToAttribute: false, type: "any" }, debugMode: { value: true, type: "boolean", reflectToAttribute: false }, locale: { value: "en", type: "string", reflectToAttribute: false }, localizeFormatFunction: { value: void 0, type: "function", reflectToAttribute: false }, messages: { value: { en: { propertyUnknownName: "Invalid property name: '{{name}}'!", propertyUnknownType: "'{{name}}' property is with undefined 'type' member!", propertyInvalidValue: "Invalid '{{name}}' property value! Actual value: '{{actualValue}}', Expected value: '{{value}}'!", propertyInvalidValueType: "Invalid '{{name}}' property value type! Actual type: '{{actualType}}', Expected type: '{{type}}'!", methodInvalidValueType: "Invalid '{{name}}' method argument value type! Actual type: '{{actualType}}', Expected type: '{{type}}' for argument with index: '{{argumentIndex}}'!", methodInvalidArgumentsCount: "Invalid '{{name}}' method arguments count! Actual arguments count: '{{actualArgumentsCount}}', Expected at least: '{{argumentsCount}}' argument(s)!", methodInvalidReturnType: "Invalid '{{name}}' method return type! Actual type: '{{actualType}}', Expected type: '{{type}}'!", elementNotInDOM: "Element does not exist in DOM! Please, add the element to the DOM, before invoking a method.", moduleUndefined: "Module is undefined.", missingReference: "{{elementType}}: Missing reference to '{{files}}'.", htmlTemplateNotSuported: "{{elementType}}: Web Browser doesn't support HTMLTemplate elements.", invalidTemplate: "{{elementType}}: '{{property}}' property accepts a string that must match the id of an HTMLTemplate element from the DOM." } }, reflectToAttribute: false, inherit: true, type: "object" }, props: { value: null, reflectToAttribute: false, isHierarchicalProperty: true, type: "any" }, readonly: { value: false, type: "boolean" }, renderMode: { value: "auto", type: "string", reflectToAttribute: false, allowedValues: ["auto", "manual"] }, rightToLeft: { value: false, type: "boolean" }, rethrowError: { value: true, type: "boolean", reflectToAttribute: false }, theme: { value: window[n].Theme, type: "string" }, visibility: { value: "visible", allowedValues: ["visible", "collapsed", "hidden"], type: "string" }, wait: { value: false, type: "boolean" } };
              }
              getBindings(e3, t2) {
                const n2 = this;
                let o2 = 0, r3 = {}, i2 = ((e4) => {
                  if (e4 instanceof HTMLElement) return n2.parseAttributes(e4);
                  {
                    let t3 = n2.parseProperty(e4.data ? e4.data.trim() : null, "textContent", e4);
                    if (t3) return n2 && e4.parentNode === n2.$.content && (t3.value = "" !== n2.$.html ? n2.$.html : void 0, n2.innerHTML = ""), { textContent: t3 };
                  }
                })(e3);
                i2 && (r3.data = i2), t2 || (r3.mapping = [], t2 = r3), e3.getAttribute && (r3.nodeId = e3.getAttribute("smart-id"), t2 && i2 && (t2.mapping[r3.nodeId] = i2)), r3.node = e3, e3.firstChild && (r3.children = {});
                for (let i3 = e3.firstChild; i3; i3 = i3.nextSibling) r3.children[o2++] = n2.getBindings(i3, t2);
                return r3;
              }
              _addRemovePropertyBinding(e3, t2, n2, o2, r3) {
                if (!e3 || !t2 || !n2) return;
                const i2 = this, s2 = i2.bindings, a3 = n2.getAttribute("smart-id"), l2 = e3.indexOf("{{") >= 0;
                let d3 = false;
                (e3 = e3.replace("{{", "").replace("}}", "").replace("[[", "").replace("]]", "")).indexOf("!") >= 0 && (e3 = e3.replace("!", ""), d3 = true);
                const c2 = i2._properties[e3], u3 = { name: e3, reflectToAttribute: c2.reflectToAttribute, twoWay: l2, type: c2.type, not: d3 };
                if (r3 && !o2) {
                  const n3 = {}, o3 = { name: e3, targetPropertyName: t2, reflectToAttribute: c2.reflectToAttribute, twoWay: l2, type: c2.type, not: d3 };
                  n3[e3] = o3, s2.mapping[a3] = n3;
                }
                const p3 = function(e4) {
                  for (let r4 in e4) {
                    const s3 = e4[r4];
                    if (s3.nodeId === a3) {
                      s3.data || (s3.data = {}), o2 ? (s3.data[t2] = null, delete s3.data[t2]) : s3.data[t2] = u3;
                      break;
                    }
                    if (s3.children) p3(s3.children);
                    else if (s3.node && s3.node.children && s3.node === n2.parentElement) {
                      const e5 = s3.node;
                      if (!e5.firstChild) continue;
                      s3.children = {};
                      let t3 = 0;
                      for (let n3 = e5.firstChild; n3; n3 = n3.nextSibling) s3.children[t3++] = i2.getBindings(n3);
                      p3(s3.children);
                    }
                  }
                };
                p3(s2.children), o2 ? delete i2.boundProperties[e3] : i2.boundProperties[e3] = true, i2.updateBoundNodes(e3);
              }
              addPropertyBinding(e3, t2, n2, o2) {
                this._addRemovePropertyBinding(e3, t2, n2, false, o2);
              }
              removePropertyBinding(e3, t2, n2, o2) {
                this._addRemovePropertyBinding(e3, t2, n2, true, o2);
              }
              parseAttributes(e3) {
                const t2 = this;
                let n2;
                for (let o2 = 0; o2 < e3.attributes.length; o2++) {
                  const r3 = e3.attributes[o2], i2 = r3.name, s2 = r3.value;
                  v2.cache["toCamelCase" + i2] || (v2.cache["toCamelCase" + i2] = y2.Core.toCamelCase(i2));
                  const a3 = v2.cache["toCamelCase" + i2];
                  if (i2.indexOf("(") >= 0) {
                    let o3 = i2.substring(1, i2.length - 1);
                    if (t2 && !t2.dataContext) {
                      t2.templateListeners[e3.getAttribute("smart-id") + "." + o3] = s2, e3.removeAttribute(i2);
                      continue;
                    }
                    {
                      n2 || (n2 = {});
                      const e4 = s2.substring(0, s2.indexOf("("));
                      n2[a3] = { isEvent: true, name: o3, value: e4 };
                      continue;
                    }
                  }
                  let l2 = t2.parseProperty(s2, i2, e3);
                  l2 && (n2 || (n2 = {}), n2[a3] = l2);
                }
                return n2;
              }
              parseProperty(e3, t2) {
                if (!e3 || !e3.length) return;
                const n2 = this;
                let o2, r3 = e3.length, i2 = 0, s2 = 0, a3 = 0, l2 = true;
                for (; s2 < r3; ) {
                  i2 = e3.indexOf("{{", s2);
                  let t3 = e3.indexOf("[[", s2), n3 = "}}";
                  if (t3 >= 0 && (i2 < 0 || t3 < i2) && (i2 = t3, l2 = false, n3 = "]]"), a3 = i2 < 0 ? -1 : e3.indexOf(n3, i2 + 2), a3 < 0) return;
                  o2 = o2 || {};
                  let r4 = e3.slice(i2 + 2, a3).trim();
                  o2.name = r4, s2 = a3 + 2;
                }
                const d3 = o2.name, c2 = n2 ? n2._properties[d3] : null;
                return o2.twoWay = l2, o2.ready = false, n2 && (d3.indexOf("::") >= 0 ? n2.boundProperties[d3.substring(0, d3.indexOf("::"))] = true : n2.boundProperties[d3] = true), c2 ? (o2.type = c2.type, o2.reflectToAttribute = c2.reflectToAttribute) : (["checked", "selected", "async", "autofocus", "autoplay", "controls", "defer", "disabled", "hidden", "ismap", "loop", "multiple", "open", "readonly", "required", "scoped"].indexOf(t2) >= 0 ? o2.type = "boolean" : o2.type = "string", o2.reflectToAttribute = true), o2;
              }
              updateTextNodes() {
                const e3 = this;
                e3.updateTextNode(e3.shadowRoot || e3, e3.bindings, e3);
              }
              updateTextNode(e3, t2, n2) {
                const o2 = this;
                if (!t2) return;
                let r3 = 0;
                for (let i2 = e3.firstChild; i2 && t2.children; i2 = i2.nextSibling) o2.updateTextNode(i2, t2.children[r3++], n2);
                if (t2 && t2.data) for (let e4 in t2.data) {
                  const o3 = t2.data[e4], r4 = o3.name;
                  "textContent" === e4 && o3.twoWay && !o3.updating && void 0 !== o3.value && (n2[r4] = o3.value);
                }
              }
              updateBoundProperty(e3, t2) {
                if (t2.updating) return;
                const n2 = this;
                t2.updating = true, n2[e3] = t2.value, t2.updating = false;
              }
              updateBoundNodes(e3) {
                const t2 = this;
                if (t2.updateBoundNode(t2.shadowRoot || t2, t2.bindings, t2, e3), t2.detachedChildren.length > 0) for (let n2 = 0; n2 < t2.detachedChildren.length; n2++) {
                  const o2 = t2.detachedChildren[n2], r3 = o2.getAttribute("smart-id"), i2 = function(e4) {
                    if (e4.nodeId === r3) return e4;
                    for (let t3 in e4.children) {
                      const n3 = e4.children[t3];
                      if ((n3.getAttribute ? n3.getAttribute("smart-id") : "") === r3) return e4;
                      if (n3.children) {
                        const e5 = i2(n3);
                        if (e5) return e5;
                      }
                    }
                    return null;
                  }, s2 = i2(t2.bindings);
                  if (s2) t2.updateBoundNode(o2, s2, t2, e3, true);
                  else if (o2.getAttribute && t2.bindings.mapping) {
                    const n3 = t2, o3 = t2.bindings;
                    if (o3) for (let r4 in o3.mapping) {
                      const i3 = n3.querySelector('[smart-id="' + r4 + '"]');
                      if (i3) {
                        const s3 = o3.mapping[r4];
                        t2.updateBoundData(i3, s3, n3, e3);
                      }
                    }
                  }
                }
              }
              updateBoundMappedNodes() {
                const e3 = this, t2 = e3.bindings, n2 = e3;
                if (t2.mapping) for (let o2 in t2.mapping) {
                  let r3 = n2.querySelector('[smart-id="' + o2 + '"]');
                  if (n2.shadowRoot && (r3 = n2.querySelector('[id="' + o2 + '"]'), r3 || (r3 = n2.shadowRoot.querySelector('[id="' + o2 + '"]') || n2.shadowRoot.querySelector('[smart-id="' + o2 + '"]'))), r3) {
                    const i2 = t2.mapping[o2];
                    e3.updateBoundData(r3, i2, n2);
                  } else if (n2.getAttribute("aria-controls")) {
                    let i2 = document.getElementById(n2.getAttribute("aria-controls"));
                    if (!i2 && n2.shadowRoot && (i2 = n2.shadowRoot.getElementById(n2.getAttribute("aria-controls"))), r3 = i2.querySelector('[smart-id="' + o2 + '"]'), r3) {
                      const i3 = t2.mapping[o2];
                      e3.updateBoundData(r3, i3, n2);
                    }
                  }
                }
              }
              updateBoundNode(e3, t2, n2, o2, r3) {
                const i2 = this;
                if (!t2) return;
                let s2 = 0;
                if (r3) {
                  if (r3 && !t2.data) for (let a4 = e3.firstChild; a4 && t2.children; a4 = a4.nextSibling) if (a4.getAttribute) {
                    const e4 = a4.getAttribute("smart-id"), r4 = function() {
                      for (let n3 in t2.children) if (t2.children[n3].nodeId === e4) return t2.children[n3];
                    }();
                    i2.updateBoundNode(a4, r4, n2, o2), s2++;
                  } else i2.updateBoundNode(a4, t2.children[s2++], n2, o2, r3);
                } else for (let r4 = e3.firstChild; r4 && t2.children; r4 = r4.nextSibling) if (r4.getAttribute) {
                  const e4 = r4.getAttribute("smart-id"), a4 = function() {
                    for (let n3 in t2.children) if (t2.children[n3].nodeId === e4) return t2.children[n3];
                  }();
                  i2.updateBoundNode(r4, a4, n2, o2), s2++;
                } else i2.updateBoundNode(r4, t2.children[s2++], n2, o2);
                if (!t2 || !t2.data) return;
                const a3 = t2.data;
                i2.updateBoundData(e3, a3, n2, o2);
              }
              updateBoundData(e3, t2, n2, o2) {
                const r3 = this;
                for (let i2 in t2) {
                  const s2 = t2[i2];
                  let a3 = s2.name;
                  if (!s2.updating && (a3.indexOf("::") >= 0 && (a3 = a3.substring(0, a3.indexOf("::"))), void 0 === o2 || o2 === a3)) {
                    if (a3.indexOf("(") >= 0) {
                      let e4 = a3.substring(a3.indexOf("("));
                      const t3 = a3.substring(0, a3.indexOf("("));
                      if (e4 = e4.substring(1, e4.length - 1), e4 = e4.replace(/ /gi, ""), e4 = e4.split(","), e4.length > 0 && "" !== e4[0]) {
                        let o3 = [];
                        for (let t4 = 0; t4 < e4.length; t4++) o3.push(n2[e4[t4]]);
                        s2.value = n2[t3].apply(n2, o3);
                      } else s2.value = n2[t3]();
                      s2.type = typeof s2.value;
                    } else s2.value = n2[a3];
                    if ("innerHTML" === a3) {
                      if (e3[i2].toString().trim() !== n2[a3].toString().trim()) {
                        if (window.smartBlazor && e3[i2].indexOf("<!--") >= 0) {
                          (s2.ready || n2._properties[a3].defaultValue !== s2.value) && (e3[i2] = s2.value.toString());
                          continue;
                        }
                        (s2.ready || n2._properties[a3].defaultValue !== s2.value) && (e3[i2] = s2.value.toString().trim());
                      }
                    } else s2.not ? (e3[i2] = !s2.value, s2.targetPropertyName && (e3[s2.targetPropertyName] = !s2.value)) : (e3[i2] = s2.value, s2.targetPropertyName && (e3[s2.targetPropertyName] = s2.value));
                    if (e3.$ && e3.$.isNativeElement) {
                      v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                      const t3 = v2.cache["toDash" + i2], n3 = e3.$.getAttributeValue(t3, s2.type);
                      !s2.reflectToAttribute || n3 === s2.value && s2.ready || e3.$.setAttributeValue(t3, s2.value, s2.type), s2.reflectToAttribute || e3.$.setAttributeValue(t3, null, s2.type);
                    }
                    if (!s2.ready) {
                      if (e3.$ && e3.$.isCustomElement) {
                        v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                        const t3 = v2.cache["toDash" + i2];
                        e3._properties || (e3._beforeCreatedProperties = e3._properties = e3.propertyByAttributeName = []), e3._properties[i2] || (e3._properties[i2] = { attributeName: t3 }, e3._beforeCreatedProperties && (e3._beforeCreatedProperties[i2] = e3._properties[i2]), e3.propertyByAttributeName[t3] = e3._properties[i2]);
                        const n3 = e3._properties[i2];
                        n3.isUpdating = true, s2.reflectToAttribute && (s2.not ? e3.$.setAttributeValue(n3.attributeName, !s2.value, s2.type) : e3.$.setAttributeValue(n3.attributeName, s2.value, s2.type)), s2.reflectToAttribute || e3.$.setAttributeValue(n3.attributeName, null, s2.type), n3.isUpdating = false;
                      }
                      if (s2.twoWay) {
                        const t3 = function(t4) {
                          if (s2.value = t4, e3.$ && e3.$.isNativeElement) {
                            v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                            const t5 = v2.cache["toDash" + i2], n3 = e3.$.getAttributeValue(t5, s2.type);
                            s2.reflectToAttribute && n3 !== s2.value && e3.$.setAttributeValue(t5, s2.value, s2.type), s2.reflectToAttribute || e3.$.setAttributeValue(t5, null, s2.type);
                          }
                        };
                        if (s2.name.indexOf("::") >= 0) {
                          const n3 = s2.name.indexOf("::"), o3 = s2.name.substring(n3 + 2);
                          r3["$" + e3.getAttribute("smart-id")].listen(o3, function() {
                            t3(e3[i2]);
                            const n4 = s2.name.substring(0, s2.name.indexOf("::"));
                            r3.updateBoundProperty(n4, s2);
                          });
                        }
                        if (e3.$ && e3.$.isCustomElement) {
                          e3._properties[i2] && (e3._properties[i2].notify = true), v2.cache["toDash" + i2] || (v2.cache["toDash" + i2] = y2.Core.toDash(i2));
                          const n3 = v2.cache["toDash" + i2];
                          r3["$" + e3.getAttribute("smart-id")].listen(n3 + "-changed", function(e4) {
                            let n4 = e4.detail;
                            t3(n4.value);
                            const o3 = r3.context;
                            e4.context !== document && (r3.context = r3), r3.updateBoundProperty(s2.name, s2), r3.context = o3;
                          });
                        }
                      }
                    }
                    s2.ready = true;
                  }
                }
              }
              static clearCache() {
                this.cache = {};
              }
              addMessages(e3, t2) {
                Object.assign(this.messages[e3], t2);
              }
              localize(e3, t2) {
                const n2 = this;
                if (!n2.messages || !n2.messages[n2.locale]) return;
                let o2 = n2.messages[n2.locale][e3];
                if ("" === o2) return "";
                if (!o2) {
                  const t3 = n2.messages.en;
                  if (t3) {
                    const n3 = t3[e3];
                    return n3 || e3;
                  }
                }
                const r3 = o2;
                for (let e4 in t2) {
                  let n3 = t2[e4];
                  o2 = o2.replace(new RegExp("{{" + e4 + "}}", "g"), n3);
                }
                return n2.localizeFormatFunction && n2.localizeFormatFunction(r3, o2, t2), o2;
              }
              static get requires() {
                return {};
              }
              static get listeners() {
                return { "theme-changed": function(e3) {
                  this.theme = e3.detail.newValue;
                } };
              }
              static get methods() {
                return {};
              }
              get classNamesMap() {
                return { animation: "smart-animate", rippleAnimation: "smart-ripple" };
              }
              get hasAnimation() {
                return "none" !== this.animation;
              }
              get hasRippleAnimation() {
                return "none" !== this.animation && "advanced" === this.animation;
              }
              static get modules() {
                return window[n].Modules;
              }
              get properties() {
                const e3 = this;
                return e3._properties || (e3._properties = []), e3._properties;
              }
              get parents() {
                const e3 = this;
                let t2 = [], o2 = e3.parentNode;
                for (; o2 && 9 !== o2.nodeType; ) o2 instanceof HTMLElement == 1 && t2.push(o2), o2 = o2.parentNode;
                const r3 = e3.getRootNode();
                if (r3.host) {
                  const e4 = (e5) => {
                    let t3 = [e5], n2 = e5.parentNode;
                    for (; n2 && 9 !== n2.nodeType; ) n2 instanceof HTMLElement == 1 && t3.push(n2), n2 = n2.parentNode;
                    return t3;
                  };
                  t2 = t2.concat(e4(r3.host));
                }
                return window[n].EnableShadowDOM && e3.isInShadowDOM && e3.shadowParent && (t2 = t2.concat(e3.shadowParent.parents)), t2;
              }
              log(e3) {
                this._logger("log", e3);
              }
              warn(e3) {
                this._logger("warn", e3);
              }
              error(e3) {
                this._logger("error", e3);
              }
              _logger(e3, t2) {
                if (this.debugMode) {
                  const n2 = t2 instanceof Error ? t2.message : t2.toString();
                  console[e3](n2);
                }
                if (this.rethrowError && "error" === e3) throw t2;
              }
              get focused() {
                return this.contains(document.activeElement);
              }
              template() {
                return "<div></div>";
              }
              registered() {
                const e3 = this;
                e3.onRegistered && e3.onRegistered();
              }
              created() {
                const e3 = this;
                e3.isReady = false, e3._initElement(e3), e3._setModuleState("created"), e3.onCreated && e3.onCreated();
              }
              completed() {
                const e3 = this;
                e3.isCompleted = true, e3._onCompleted && e3._onCompleted(), e3.onCompleted && e3.onCompleted();
              }
              whenReady(e3) {
                const t2 = this;
                t2.isCompleted ? e3() : (t2.whenReadyCallbacks || (t2.whenReadyCallbacks = []), t2.whenReadyCallbacks.push(e3));
              }
              whenRendered(e3) {
                const t2 = this;
                t2.isRendered ? e3() : (t2.whenRenderedCallbacks || (t2.whenRenderedCallbacks = []), t2.whenRenderedCallbacks.push(e3));
              }
              addThemeClass() {
                const e3 = this;
                "" !== e3.theme && e3.classList.add("smart-" + e3.theme);
              }
              addDefaultClass() {
                const e3 = this;
                e3.classList.add(n.toLowerCase() + "-element"), e3.classList.add(e3.nodeName.toLowerCase());
              }
              _renderShadowRoot() {
                const e3 = this;
                if (e3.shadowRoot) {
                  e3.$.root.classList.add(e3.nodeName.toLowerCase());
                  for (let t2 = 0; t2 < e3.attributes.length; t2++) {
                    const n2 = e3.attributes[t2];
                    "class" === n2.name || "id" === n2.name || "style" === n2.name || "tabindex" === n2.name || n2.name.indexOf("aria") >= 0 || e3.$.root.setAttribute(n2.name, n2.value);
                  }
                  for (let t2 = 0; t2 < e3.classList.length; t2++) {
                    const n2 = e3.classList[t2];
                    "smart-element-init" !== n2 && "smart-element" !== n2 && "smart-hidden" !== n2 && "smart-visibility-hidden" !== n2 && e3.$.root.classList.add(n2);
                  }
                }
              }
              render() {
                const e3 = this;
                if (!e3.isRendered && (e3.isRendered = true, e3.isRendering = false, e3.context = document, e3._renderShadowRoot(), e3.whenRenderedCallbacks)) {
                  for (let t2 = 0; t2 < e3.whenRenderedCallbacks.length; t2++) e3.whenRenderedCallbacks[t2]();
                  e3.whenRenderedCallbacks = [];
                }
                e3.onRender && e3.onRender(), e3.disabled && e3.setAttribute("aria-disabled", true), e3.readonly && -1 !== ["checkbox", "combobox", "grid", "gridcell", "listbox", "radiogroup", "slider", "spinbutton", "textbox"].indexOf(e3.getAttribute("role")) && e3.setAttribute("aria-readonly", true);
              }
              ready() {
                const e3 = this;
                if (e3._setId(), e3.addThemeClass(), e3.addDefaultClass(), "collapsed" === e3.visibility ? e3.classList.add("smart-hidden") : "hidden" === e3.visibility && e3.classList.add("smart-visibility-hidden"), e3.dataContext && e3.applyDataContext(), e3.onReady && e3.onReady(), e3.shadowRoot && Smart(e3._selector)) {
                  if (Smart(e3._selector).styleUrls) {
                    const t2 = Smart(e3._selector).styleUrls;
                    for (let n2 = 0; n2 < t2.length; n2++) e3.importStyle(t2[n2]);
                  }
                  if (Smart(e3._selector).styles) {
                    const t2 = document.createElement("style");
                    t2.innerHTML = Smart(e3._selector).styles, e3.shadowRoot.insertBefore(t2, e3.shadowRoot.firstChild);
                  }
                }
                Smart(e3._selector) && Smart(e3._selector).ready && Smart(e3._selector).ready();
              }
              _setId() {
                const e3 = this;
                if (!e3.id) {
                  const t2 = e3.elementName;
                  e3.id = t2.slice(0, 1).toLowerCase() + t2.slice(1) + Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                }
              }
              checkLicense() {
                const e3 = this;
                "Evaluation" === window[n].License && -1 === window.location.hostname.indexOf("htmlelements") && (e3.logWatermark(), e3.logLicense(), window[n].License = "");
              }
              logWatermark() {
                const e3 = document.createElement("a");
                e3.href = "https://www.htmlelements.com/", e3.innerHTML = "https://www.htmlelements.com/", e3.style.position = "absolute", e3.style.right = "5px", e3.style.bottom = "5px", e3.style.color = "#fff", e3.style.padding = "20px", e3.style.borderRadius = "5px", e3.style.background = "#0C3D78", e3.style.cursor = "pointer", e3.style.zIndex = "999999", e3.style.display = "block", e3.style.fontSize = "24px", e3.style.textDecoration = "none", e3.style.fontWeight = "bold", e3.style.opacity = 0, e3.style.transition = "opacity .35s ease-in-out", e3.id = "watermark", document.getElementById("watermark") || setTimeout(() => {
                  document.getElementById("watermark") || (document.body.appendChild(e3), setTimeout(() => {
                    e3.style.opacity = 1;
                  }), setTimeout(() => {
                    e3.style.opacity = 0, setTimeout(() => {
                      e3.parentNode.removeChild(e3);
                    }, 350);
                  }, 6e3));
                }, 1e3);
              }
              logLicense() {
                console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("*jQWidgets License Key Not Found."), console.log("*This is an EVALUATION only Version, it is NOT Licensed for software projects intended for PRODUCTION."), console.log("*if you want to hide this message, please send an email to: sales@jqwidgets.com for a license."), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************"), console.log("****************************************************************************************************************");
              }
              get _selector() {
                const e3 = this;
                return e3.id ? "#" + e3.id : e3.classList.length > 0 ? "." + e3.classList[0] : "";
              }
              applyDataContext(e3) {
                const t2 = this;
                let n2 = "string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext;
                if (e3 && (n2 = e3, t2.dataContext = e3), n2) {
                  if (!n2._uid) {
                    n2._uid = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase(), n2._properties = [];
                    for (let e4 in n2) {
                      const o2 = n2[e4];
                      "function" != typeof o2 && "_properties" !== e4 && "_uid" !== e4 && (n2._properties[e4] = o2, Object.defineProperty(n2, e4, { configurable: false, enumerable: true, get: () => n2._properties[e4], set(o3) {
                        const r3 = n2._properties[e4];
                        n2._properties[e4] = o3;
                        let i2 = [];
                        i2[e4] = { oldValue: r3, value: o3 }, i2.length++, t2.updatingDataContext = true, w.fireEvent("dataContextPropertyChanged", { dataContext: n2, properties: i2 }, { bubbles: false, cancelable: true }), t2.updatingDataContext = false;
                      } }));
                    }
                  }
                  if (t2.dataContextProperties = t2.parseAttributes(t2), t2.dataContextPropertiesMap = {}, t2.dataContextListeners = {}, t2.dataContextProperties) {
                    t2.updatingDataContext = true;
                    for (let e4 in t2.dataContextProperties) {
                      const o2 = t2.dataContextProperties[e4], r3 = o2.name;
                      if (o2.propertyName = e4, t2.dataContextPropertiesMap[r3] = e4, v2.cache["toDash" + e4] || (v2.cache["toDash" + e4] = y2.Core.toDash(r3)), o2.isEvent) {
                        const e5 = o2.value;
                        t2.dataContextListeners[r3] && t2.removeEventListener(r3, t2.dataContextListeners[r3]), t2.dataContextListeners[r3] = function(t3) {
                          n2[e5](t3);
                        }, t2.addEventListener(r3, t2.dataContextListeners[r3]);
                      }
                      if (r3.indexOf(".") >= 0) {
                        const o3 = r3.split(".");
                        let i2 = n2[o3[0]];
                        for (let e5 = 1; e5 < o3.length; e5++) i2 = i2[o3[e5]];
                        void 0 !== i2 && (t2[e4] = i2);
                      } else t2[e4] = n2[r3];
                    }
                    t2.dataContextPropertyChangedHandler = function(e4) {
                      const n3 = e4.detail.properties;
                      if (e4.detail.dataContext === ("string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext)) for (let e5 in n3) {
                        const o2 = t2.dataContextPropertiesMap[e5], r3 = t2.context;
                        o2 && (t2.context = document, t2[o2] = n3[e5].value, t2.context = r3);
                      }
                    }, w.listen("dataContextPropertyChanged", t2.dataContextPropertyChangedHandler), t2.updatingDataContext = false;
                  } else t2.dataContextProperties = null;
                } else {
                  t2.dataContextProperties = null;
                  const e4 = function() {
                    ("string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext) && (t2.applyDataContext(), window.removeEventListener("load", e4));
                  };
                  window.addEventListener("load", e4);
                }
              }
              updateDataContextProperty(e3) {
                const t2 = this, n2 = "string" == typeof t2.dataContext ? window[t2.dataContext] || document[t2.dataContext] : t2.dataContext, o2 = t2.dataContextProperties[e3];
                if (!t2.updatingDataContext && o2.twoWay) {
                  const r3 = o2.name;
                  if (r3.indexOf(".") >= 0) {
                    const o3 = r3.split(".");
                    let i2 = n2[o3[0]];
                    for (let e4 = 1; e4 < o3.length; e4++) i2 = i2[o3[e4]];
                    void 0 !== i2 && (i2 = t2[e3], c[n2._uid] && (c[n2._uid][e3] = i2));
                  } else n2[r3] = t2[e3], c[n2._uid] && (c[n2._uid][e3] = n2[r3]);
                }
              }
              static get version() {
                return window[n].Version;
              }
              initProperties() {
                const e3 = this;
                if (Smart(e3._selector) && Smart(e3._selector).properties && (e3._initProperties = Smart(e3._selector).properties), e3.hasAttribute("props") && !e3.props ? e3._initProperties = window[e3.getAttribute("props")] : e3.props && (e3._initProperties = e3.props), e3._initProperties) {
                  const t2 = Object.keys(e3._initProperties);
                  for (let n2 = 0; n2 < t2.length; n2++) {
                    const o2 = t2[n2], r3 = e3._initProperties[o2];
                    if (r3.constructor === Smart.ObservableArray || r3 instanceof Smart.ObservableArray) e3[o2] = r3.toArray();
                    else if (r3.constructor === Smart.DataAdapter || "smartDataAdapter" === r3.constructor.name || "object" == typeof r3 && Smart.DataAdapter && r3 instanceof Smart.DataAdapter || r3 instanceof Smart.Observable || r3.constructor === Smart.Observable || "object" != typeof r3 || y2.Types.isArray(r3) || r3 instanceof Date) {
                      if (void 0 === e3[o2] && -1 === ["onReady", "onAttached", "onDetached", "onCreated", "onCompleted"].indexOf(o2)) {
                        const t3 = e3.localize("propertyUnknownName", { name: o2 });
                        e3.log(t3);
                      }
                      e3[o2] = r3;
                    } else if ("messages" !== o2 && "dataSourceMap" !== o2) {
                      if ("object" == typeof r3) {
                        const t3 = function(n3, o3) {
                          const r4 = Object.keys(n3);
                          for (let i2 = 0; i2 < r4.length; i2++) {
                            const s2 = r4[i2], a3 = n3[s2], l2 = e3._properties[o3 + "_" + s2];
                            if (l2 && null === l2.value) {
                              if (void 0 === e3[o3 + "_" + s2]) {
                                const t4 = e3.localize("propertyUnknownName", { name: o3 + "_" + s2 });
                                e3.log(t4);
                              }
                              e3[o3 + "_" + s2] = a3;
                            } else if ("object" == typeof a3 && !y2.Types.isArray(a3) && a3 && a3.constructor !== Date) t3(a3, o3 + "_" + s2);
                            else {
                              if (void 0 === e3[o3 + "_" + s2]) {
                                const t4 = e3.localize("propertyUnknownName", { name: o3 + "_" + s2 });
                                e3.log(t4);
                              }
                              e3[o3 + "_" + s2] = a3;
                            }
                          }
                        };
                        t3(r3, o2);
                      }
                    } else e3[o2] = r3;
                  }
                }
              }
              setup() {
                const e3 = this;
                if (e3.context = this, e3.isReady && !e3.isCompleted) return;
                if (e3.isReady) return e3._setModuleState("attached"), e3.isAttached = true, e3.attached(), e3._handleListeners("listen"), void (e3.context = document);
                e3.ownerElement && e3.ownerElement.detachedChildren.indexOf(e3) >= 0 && e3.ownerElement.detachedChildren.splice(e3.ownerElement.detachedChildren.indexOf(e3), 1), e3.isReady = true, e3.methods = e3.getStaticMember("methods"), e3.initProperties(), a2.isMobile && e3.classList.add("smart-mobile");
                for (let t3 = 0; t3 < e3.attributes.length; t3 += 1) {
                  const n2 = e3.propertyByAttributeName[e3.attributes[t3].name];
                  if (!n2) continue;
                  let o3 = e3.$.getAttributeValue(n2.attributeName, n2.type);
                  const r3 = o3 ? o3.toString() : "";
                  if (!(r3.indexOf("{{") >= 0 || r3.indexOf("[[") >= 0 || "object" !== n2.type && "array" !== n2.type && (e3.attributes[t3].value.indexOf("{{") >= 0 || e3.attributes[t3].value.indexOf("[[") >= 0) || void 0 === o3 || n2.value === o3)) {
                    const r4 = y2.Types.getType(o3), i2 = e3.attributes[t3].value;
                    if (("any" === n2.type || "object" === n2.type) && "" + e3[n2.name] === o3) continue;
                    if ("array" === n2.type && e3[n2.name] && JSON.stringify(e3[n2.name]) === o3) continue;
                    if ("number" === r4 && isNaN(o3) && "NaN" !== i2 && "Infinity" !== i2 && "-Infinity" !== i2) {
                      const t4 = e3.localize("propertyInvalidValueType", { name: n2.name, actualType: "string", type: n2.type });
                      e3.log(t4);
                    }
                    n2.isUpdatingFromAttribute = true, e3[n2.name] = o3, n2.isUpdatingFromAttribute = false;
                  }
                }
                for (let t3 in e3._properties) {
                  const n2 = e3._properties[t3];
                  if ("innerHTML" === t3 && n2.value === n2.defaultValue && (n2.value = n2.defaultValue = y2.Core.html(e3)), "boolean" !== n2.type && "bool" !== n2.type || "false" === e3.getAttribute(n2.attributeName) && (n2.isUpdating = true, e3.setAttribute(n2.attributeName, ""), n2.isUpdating = false), n2.defaultReflectToAttribute && n2.reflectToAttribute) {
                    if (n2.defaultReflectToAttribute && n2.defaultReflectToAttributeConditions) {
                      let t4 = true;
                      for (let o3 = 0; o3 < n2.defaultReflectToAttributeConditions.length; o3++) {
                        const r3 = n2.defaultReflectToAttributeConditions[o3];
                        let i2, s2;
                        for (let e4 in r3) i2 = e4, s2 = r3[e4];
                        e3._properties[i2] && e3._properties[i2].value !== s2 && (t4 = false);
                      }
                      if (!t4) continue;
                    }
                    n2.isUpdating = true, e3.$.setAttributeValue(n2.attributeName, n2.value, n2.type), n2.isUpdating = false;
                  }
                }
                const t2 = [];
                if (e3.children.length > 0) for (let n2 = 0; n2 < e3.children.length; n2++) {
                  const o3 = e3.children[n2];
                  y2.Extend(o3).isCustomElement && t2.push(o3);
                }
                e3.applyTemplate(), e3.complete = function() {
                  if (!e3.templateBindingsReady) {
                    const t4 = (e4) => {
                      e4.templateBindingsReady || (e4.templateBindingsReady = true, e4.updateTextNodes(), e4.updateBoundNodes());
                    };
                    if (e3.ownerElement) {
                      let n2 = e3.ownerElement, o3 = [];
                      for (; n2; ) o3.push(n2), n2 = n2.ownerElement;
                      for (let e4 = o3.length - 1; e4 >= 0; e4--) t4(o3[e4]);
                      t4(e3);
                    } else t4(e3);
                  }
                  const t3 = () => {
                    if (e3._setModuleState("ready"), e3.ready(), "auto" !== e3.renderMode || e3.isRendered || e3.render(), e3.isAttached = true, e3._setModuleState("attached"), e3.attached(), e3._handleListeners("listen"), e3.isHidden || 0 !== e3.offsetWidth && 0 !== e3.offsetHeight || (e3.isHidden = true), e3.completed(), e3.isRendered && (e3.context = document), e3.whenReadyCallbacks) {
                      for (let t4 = 0; t4 < e3.whenReadyCallbacks.length; t4++) e3.whenReadyCallbacks[t4]();
                      e3.whenReadyCallbacks = [];
                    }
                  };
                  if (e3.wait) e3.classList.add("smart-visibility-hidden");
                  else if (e3.classList.contains("smart-async")) requestAnimationFrame(() => {
                    t3();
                  });
                  else {
                    const n2 = e3.shadowParent;
                    e3.shadowParent = null;
                    const o3 = e3.parents;
                    if (e3.shadowParent = n2, 0 === o3.length) return;
                    const r3 = () => {
                      let t4 = e3.ownerElement, n3 = [];
                      for (; t4; ) n3.push(t4), t4 = t4.ownerElement;
                      for (let e4 = n3.length - 1; e4 >= 0; e4--) n3[e4].updateBoundMappedNodes();
                    };
                    e3.ownerElement && "HTML" !== o3[o3.length - 1].nodeName ? e3.getRootNode().host ? t3() : e3.ownerElement && "HTML" === e3.ownerElement.parents[e3.ownerElement.parents.length - 1].nodeName ? (r3(), t3()) : e3.checkIsInDomInterval = setInterval(() => {
                      const n3 = e3.parents;
                      "HTML" === n3[n3.length - 1].nodeName && (clearInterval(e3.checkIsInDomInterval), r3(), t3());
                    }, 100) : t3();
                  }
                };
                let o2 = [].slice.call(e3.querySelectorAll("[smart-id]")).concat(t2);
                if (window[n].EnableShadowDOM && true !== e3.isInShadowDOM && (o2 = [].slice.call(e3.shadowRoot.querySelectorAll("[smart-id]")).concat(t2)), 0 === o2.length) e3.complete();
                else {
                  e3._completeListeners = 0;
                  for (let t3 = 0; t3 < o2.length; t3++) {
                    const n2 = o2[t3];
                    if (y2.Extend(n2).isCustomElement) {
                      const t4 = (function() {
                        e3._completeListeners--, 0 === e3._completeListeners && (e3.complete(), delete e3._completeListeners);
                      }).bind(e3);
                      n2.isCompleted || n2.isUtilityElement || true === n2.wait || (e3._completeListeners++, n2._onCompleted || (n2.completeHandlers = [], n2._onCompleted = function() {
                        for (let e4 = 0; e4 < n2.completeHandlers.length; e4++) n2.completeHandlers[e4]();
                      }), n2.completeHandlers.push(t4));
                    }
                  }
                  0 === e3._completeListeners && e3.complete();
                }
              }
              visibilityChangedHandler() {
                const e3 = this;
                e3.isReady && requestAnimationFrame(() => {
                  0 === e3.offsetWidth || 0 === e3.offsetHeight ? e3.isHidden = true : (e3.isHidden = false, e3.$.fireEvent("resize", e3, { bubbles: false, cancelable: true }));
                });
              }
              attributeChangedCallback(e3, t2, n2) {
                const o2 = this, r3 = o2.propertyByAttributeName[e3];
                if ("class" !== e3 && "style" !== e3 || o2.visibilityChangedHandler(), r3 || o2.attributeChanged(e3, t2, n2), o2.onAttributeChanged && o2.onAttributeChanged(e3, t2, n2), !r3 || r3 && r3.isUpdating) return;
                let i2 = o2.$.getAttributeValue(r3.attributeName, r3.type);
                void 0 !== n2 && o2[r3.name] !== i2 && (r3.isUpdatingFromAttribute = true, o2[r3.name] = void 0 !== i2 ? i2 : o2._properties[r3.name].defaultValue, r3.isUpdatingFromAttribute = false);
              }
              attributeChanged(e3, t2, n2) {
              }
              set hasStyleObserver(e3) {
                const t2 = this;
                void 0 === t2._hasStyleObserver && (t2._hasStyleObserver = e3), e3 ? d2.watch(t2) : d2.unwatch(t2);
              }
              get hasStyleObserver() {
                const e3 = this;
                return void 0 === e3._hasStyleObserver || e3._hasStyleObserver;
              }
              attached() {
                const e3 = this;
                e3.hasStyleObserver && d2.watch(e3), e3.onAttached && e3.onAttached(), Smart(e3._selector) && Smart(e3._selector).attached && Smart(e3._selector).attached();
              }
              detached() {
                const e3 = this;
                e3.hasStyleObserver && d2.unwatch(e3), e3._setModuleState("detached"), e3.isAttached = false, e3.ownerElement && -1 === e3.ownerElement.detachedChildren.indexOf(e3) && e3.ownerElement.detachedChildren.push(e3), e3._handleListeners("unlisten"), e3.onDetached && e3.onDetached(), Smart(e3._selector) && Smart(e3._selector).detached && Smart(e3._selector).detached(), u2 && u2[e3._selector] && delete u2[e3._selector];
              }
              propertyChangedHandler(e3, t2, n2) {
                const o2 = this;
                t2 !== n2 && ("theme" === e3 && ("" !== t2 && o2.classList.remove("smart-" + t2), "" !== n2 && o2.classList.add("smart-" + n2)), "visibility" === e3 ? ("collapsed" === t2 ? o2.classList.remove("smart-hidden") : "hidden" === t2 && o2.classList.remove("smart-visibility-hidden"), "collapsed" === n2 ? o2.classList.add("smart-hidden") : "hidden" === n2 && o2.classList.add("smart-visibility-hidden")) : ("disabled" === e3 || "readonly" === e3) && o2._ariaPropertyChangedHandler(e3, n2), o2.propertyChanged && o2.propertyChanged(e3, t2, n2));
              }
              _ariaPropertyChangedHandler(e3, t2) {
                const n2 = this;
                "readonly" === e3 && -1 === ["checkbox", "combobox", "grid", "gridcell", "listbox", "radiogroup", "slider", "spinbutton", "textbox"].indexOf(n2.getAttribute("role")) || (t2 ? n2.setAttribute("aria-" + e3, true) : n2.removeAttribute("aria-" + e3));
              }
              _handleListeners(e3) {
                const t2 = this, n2 = t2.tagName.toLowerCase(), o2 = (o3) => {
                  for (let r3 in o3) {
                    const i2 = r3.split(".");
                    let s2 = i2[0], a3 = t2.$;
                    if (i2[1]) if (s2 = i2[1], a3 = t2["$" + i2[0]], "document" === i2[0]) {
                      let e4 = t2.smartId;
                      "" === e4 && (e4 = y2.Core.toCamelCase(n2)), s2 = s2 + "." + e4;
                    } else t2.smartId && (s2 = s2 + "." + t2.smartId + "_" + t2.parents.length);
                    else t2.smartId && (s2 = s2 + "." + t2.smartId);
                    const l2 = o3[r3], d3 = function(e4) {
                      const n3 = t2.context;
                      t2.context = t2, t2[l2] && t2[l2].apply(t2, [e4]), t2.context = n3;
                    };
                    a3 && a3[e3](s2, d3);
                  }
                };
                o2(t2.getStaticMember("listeners")), o2(t2.templateListeners), Smart(t2._selector) && Smart(t2._selector).properties && o2(Smart(t2._selector).listeners);
              }
              parseTemplate() {
                const e3 = this, n2 = e3.template(), r3 = document.createDocumentFragment();
                if (t[e3.nodeName] && !o) return t[e3.nodeName].cloneNode(true);
                if ("" === n2) return null;
                let i2 = document.createElement("div");
                r3.appendChild(i2), i2.innerHTML = n2;
                let s2 = i2.childNodes;
                i2.parentNode.removeChild(i2);
                for (let e4 = 0; e4 < s2.length; e4++) r3.appendChild(s2[e4]);
                return t[e3.nodeName] = r3, o ? r3 : r3.cloneNode(true);
              }
              applyTemplate() {
                const e3 = this, t2 = e3.parseTemplate();
                if (!t2) return;
                if (!t2.hasChildNodes) return;
                const n2 = t2.childNodes[0], o2 = (t3, n3) => {
                  e3["$" + t3] = n3.$ = y2.Extend(n3), e3.$[t3] = n3, n3.ownerElement = e3;
                };
                let r3 = n2;
                if (n2.getElementsByTagName("content").length > 0) {
                  let e4 = n2.getElementsByTagName("content")[0];
                  r3 = e4.parentNode, r3.removeChild(e4);
                } else {
                  const e4 = t2.querySelectorAll("[inner-h-t-m-l]");
                  e4 && e4.length > 0 && (r3 = e4[0]);
                }
                e3.$.template = "template" === n2.nodeName.toLowerCase() ? n2 : n2.querySelector("template");
                let i2 = t2.querySelectorAll("[id]");
                0 === i2.length && (i2 = t2.querySelectorAll("*")), o2("root", n2), o2("content", r3), e3.$.html = e3.innerHTML.toString().trim();
                for (let t3 = 0; t3 < i2.length; t3 += 1) {
                  let n3 = i2[t3];
                  "" === n3.id && (n3.id = "child" + t3), o2(n3.id, n3), n3.setAttribute("smart-id", n3.id), e3.shadowRoot ? n3.shadowParent = e3 : n3.removeAttribute("id");
                }
                for (false !== e3.hasTemplateBindings ? e3.bindings = e3.getBindings(t2) : e3.bindings = [], e3.$root.addClass("smart-container"); e3.childNodes.length; ) r3.appendChild(e3.firstChild);
                if (e3.appendTemplate(t2), e3.$.template) {
                  const t3 = document.createElement("div");
                  t3.classList.add("smart-template-container"), e3.$.templateContainer = t3, e3.$.template.parentNode.insertBefore(t3, e3.$.template), e3.refreshTemplate();
                }
              }
              refreshTemplate() {
                const e3 = this;
                if (!e3.$.templateContainer) return;
                e3.templateDetached(e3.$.templateContainer);
                const t2 = e3.$.template.content.cloneNode(true);
                e3.templateBindings = e3.getBindings(t2), e3.templateProperties = [];
                let n2 = document.createDocumentFragment();
                const o2 = function(t3, n3, r3) {
                  for (let i2 in t3) {
                    const s2 = t3[i2], a3 = s2.node.cloneNode();
                    n3.appendChild(a3);
                    let l2 = [], d3 = false;
                    if (s2.data) for (let t4 in s2.data) {
                      const o3 = s2.data[t4], i3 = o3.name;
                      if (e3.templateProperties[i3] = true, a3.removeAttribute(y2.Core.toDash(t4)), "*items" === t4) l2 = e3[i3], d3 = true;
                      else if (i3.indexOf("item.") >= 0 && void 0 !== r3) o3.value = r3[i3.substring("item.".length)], a3[t4] = o3.value;
                      else if (i3.indexOf("item") >= 0 && void 0 !== r3) o3.value = r3, a3[t4] = o3.value;
                      else if ("*if" === t4) if (i3.indexOf("(") >= 0) {
                        let t5, o4 = i3.substring(i3.indexOf("("));
                        const r4 = i3.substring(0, i3.indexOf("("));
                        if (o4 = o4.substring(1, o4.length - 1), o4 = o4.replace(/ /gi, ""), o4 = o4.split(","), o4.length > 0 && "" !== o4[0]) {
                          let n4 = [];
                          for (let t6 = 0; t6 < o4.length; t6++) n4.push(e3[o4[t6]]);
                          t5 = e3[r4].apply(e3, n4);
                        } else t5 = e3[r4]();
                        false === t5 && n3.removeChild(a3);
                      } else e3[i3] || n3.removeChild(a3);
                      else e3.updateBoundNode(a3, s2, e3, i3);
                    }
                    if (l2.length > 0 || d3) {
                      for (let e4 = 0; e4 < l2.length; e4++) s2.children && o2(s2.children, a3, l2[e4]);
                      if ("number" == typeof l2) for (let e4 = 0; e4 < l2; e4++) s2.children && o2(s2.children, a3, e4);
                    } else s2.children && o2(s2.children, a3, r3);
                  }
                };
                o2(e3.templateBindings.children, n2), e3.$.templateContainer.innerHTML = "", e3.$.templateContainer.appendChild(n2), e3.templateAttached(e3.$.templateContainer);
              }
              templateAttached() {
              }
              templateDetached() {
              }
              appendTemplate(e3) {
                this.appendChild(e3);
              }
              defineElementModules() {
                const e3 = this, t2 = e3.constructor.prototype;
                if ("BaseElement" === t2.elementName) {
                  t2.modules = e3.constructor.modules;
                  const n2 = t2.modules;
                  for (let t3 = 0; t3 < n2.length; t3 += 1) e3.addModule(n2[t3]);
                } else {
                  const n2 = t2.modules;
                  if (!n2) return;
                  for (let t3 = 0; t3 < n2.length; t3 += 1) {
                    const o2 = n2[t3], r3 = o2.prototype;
                    e3.defineElementMethods(r3.methodNames, r3), e3.defineElementProperties(o2.properties);
                  }
                }
              }
              watch(e3, t2) {
                const n2 = this;
                n2._watch = null !== e3 && null !== t2 ? { properties: e3, propertyChangedCallback: t2 } : null;
              }
              unwatch() {
                this._watch = null;
              }
              set(e3, t2, n2) {
                const o2 = this, r3 = o2.context;
                o2.context = true === n2 ? document : o2, o2[e3] = t2, o2.context = r3;
              }
              get(e3) {
                return this[e3];
              }
              _setModuleState(e3, t2) {
                const n2 = this, o2 = "is" + e3.substring(0, 1).toUpperCase() + e3.substring(1), r3 = "on" + e3.substring(0, 1).toUpperCase() + e3.substring(1);
                for (let i2 = 0; i2 < n2.modulesList.length; i2++) {
                  const s2 = n2.modulesList[i2];
                  s2[o2] = true, s2[e3] && s2[e3](t2), s2[r3] && s2[r3](t2);
                }
              }
              addModule(e3, t2) {
                const n2 = this;
                if (!e3) return;
                const o2 = n2.modules.slice(0), r3 = e3.prototype, i2 = Object.getPrototypeOf(e3);
                if (i2.name && i2.name !== e3.name && n2.addModule(i2), !e3.moduleName && e3.name && (e3.moduleName = e3.name), -1 === o2.findIndex((t3) => e3.moduleName === t3.moduleName) && o2.push(e3), n2.defineModule(e3), n2.defineElementMethods(r3.methodNames, r3), n2.defineElementProperties(e3.properties), n2.constructor.prototype.modules = o2, t2) for (let t3 in Smart.Elements.tagNames) {
                  const o3 = Smart.Elements.tagNames[t3];
                  let r4 = Object.getPrototypeOf(o3), i3 = [];
                  for (; r4 !== HTMLElement; ) i3.push(r4.prototype), r4 = Object.getPrototypeOf(r4);
                  i3.indexOf(n2) >= 0 && o3 !== n2 && o3.prototype.addModule(e3);
                }
              }
              defineModule(e3) {
                if (e3.isDefined) return;
                e3.prototype._initModule = function(e4) {
                  this.ownerElement = e4;
                };
                const t2 = e3.properties || {}, n2 = Object.keys(t2), o2 = Object.getOwnPropertyNames(e3.prototype);
                e3.prototype.methodNames = o2;
                for (let o3 = 0; o3 < n2.length; o3 += 1) {
                  const r3 = n2[o3], i2 = t2[r3];
                  Object.defineProperty(e3.prototype, r3, { configurable: false, enumerable: true, get() {
                    return this.ownerElement ? this.ownerElement[r3] : i2.value;
                  }, set(e4) {
                    this.ownerElement[r3] = e4;
                  } });
                }
                e3.isDefined = true;
              }
              getStaticMember(e3, t2) {
                const o2 = window[n][this.elementName], r3 = o2[e3];
                t2 || (t2 = "");
                let i2 = "array" === t2 ? [] : "string" === t2 ? "" : {}, s2 = Object.getPrototypeOf(o2), a3 = [];
                for (; s2[e3]; ) a3.push(s2[e3]), s2 = Object.getPrototypeOf(s2);
                for (let e4 = a3.length - 1; e4 >= 0; e4--) if ("array" === t2) for (let t3 = 0; t3 < a3[e4].length; t3++) -1 === i2.indexOf(a3[e4][t3]) && i2.push(a3[e4][t3]);
                else "string" === t2 ? -1 === i2.indexOf(a3[e4]) && (i2 += a3[e4]) : i2 = y2.Core.assign(i2, a3[e4]);
                if ("array" === t2) {
                  for (let e4 = 0; e4 < r3.length; e4++) -1 === i2.indexOf(r3[e4]) && i2.push(r3[e4]);
                  return i2;
                }
                return "string" === t2 ? (-1 === i2.indexOf(r3) && (i2 += r3), i2) : y2.Core.assign(i2, r3);
              }
              defineElementHierarchicalProperties(e3, t2) {
                const n2 = this, o2 = [];
                !function(e4) {
                  const n3 = Object.keys(e4);
                  for (let r3 = 0; r3 < n3.length; r3++) {
                    const i2 = n3[r3];
                    if ("messages" === i2) continue;
                    const s2 = e4[i2], a3 = Object.keys(s2), l2 = a3.indexOf("value") >= 0 && a3.indexOf("type") >= 0 && "object" == typeof s2.value;
                    if ("propertyObject" === s2.type || l2) {
                      const e5 = function(n4, r4) {
                        if (!n4.value) return;
                        const i3 = Object.keys(n4.value);
                        for (let s3 = 0; s3 < i3.length; s3++) {
                          const a4 = i3[s3], l3 = n4.value[a4], d3 = r4 + "_" + a4;
                          if ("object" != typeof l3 || null === l3) break;
                          const c2 = Object.keys(l3);
                          if (!(c2.indexOf("value") >= 0 && c2.indexOf("type") >= 0)) break;
                          if ("array" !== n4.type && (n4.isHierarchicalProperty = true), l3.parentPropertyName = r4, t2) {
                            const e6 = t2._properties[d3];
                            if (n4.value.hasOwnProperty(a4)) {
                              if (e6.isDefined) continue;
                              delete n4.value[a4];
                            }
                            e6.isDefined = true, Object.defineProperty(n4.value, a4, { configurable: false, enumerable: true, get: () => t2._properties[d3].value, set(e7) {
                              t2.updateProperty(t2, t2._properties[d3], e7);
                            } });
                          }
                          o2[d3] || (o2[d3] = l3, o2.length++), ("propertyObject" === l3.type || "object" == typeof l3.value && "array" !== l3.type) && e5(t2 ? t2._properties[d3] : l3, d3);
                        }
                      };
                      e5(s2, i2);
                    }
                  }
                }(e3), o2.length > 0 && !t2 && n2.defineElementProperties(o2);
              }
              defineElement() {
                const e3 = this, t2 = e3.constructor.prototype, n2 = e3.getStaticMember("properties"), o2 = Object.getOwnPropertyNames(t2);
                t2.extendedProperties = {}, t2.boundProperties = {}, t2.templateListeners = {}, e3.defineElementModules(), e3.defineElementMethods(o2, t2), e3.defineElementProperties(n2), e3.defineElementHierarchicalProperties(e3.extendedProperties), t2._initElement = function() {
                  const e4 = this, n3 = t2.extendedProperties, o3 = Object.keys(n3), r3 = e4.modules;
                  e4.$ = y2.Extend(e4), e4.$document = w, e4.smartId = (Date.now().toString(36) + Math.random().toString(36).substr(2, 5)).toUpperCase(), e4.isCreated || (e4.modulesList = [], e4._properties = [], e4._beforeCreatedProperties && (e4._properties = e4._beforeCreatedProperties, delete e4._beforeCreatedProperties), e4.detachedChildren = [], e4.propertyByAttributeName = []);
                  for (let t3 = 0; t3 < r3.length; t3 += 1) {
                    let n4 = new r3[t3]();
                    n4._initModule(e4), e4.modulesList.push(n4);
                  }
                  for (let t3 = 0; t3 < o3.length; t3 += 1) {
                    const r4 = o3[t3], i2 = n3[r4];
                    let s2 = i2.value;
                    if (e4._properties[r4]) {
                      if (void 0 !== e4._properties[r4].notify) continue;
                      delete e4._properties[r4];
                    }
                    if (E2 && "innerHTML" === r4 && delete e4[r4], -1 === window.navigator.userAgent.indexOf("PhantomJS") && e4.hasOwnProperty(r4) && (s2 = e4[r4], delete e4[r4]), "array" === i2.type && null != s2 && (s2 = s2.slice(0)), "object" === i2.type && null != s2 && (s2 = Array.isArray(s2) ? s2.slice(0) : Object.assign({}, s2)), e4._properties[r4] = { name: r4, notify: i2.notify, allowedValues: i2.allowedValues, type: i2.type, nullable: i2.nullable, reflectToAttribute: i2.reflectToAttribute, defaultReflectToAttribute: i2.defaultReflectToAttribute, defaultReflectToAttributeConditions: i2.defaultReflectToAttributeConditions, value: s2, readOnly: i2.readOnly, defaultValue: s2, attributeName: i2.attributeName, observer: i2.observer, inherit: i2.inherit, extend: i2.extend, validator: i2.validator }, e4.propertyByAttributeName[i2.attributeName] = e4._properties[r4], !i2.hasOwnProperty("type")) {
                      const t4 = e4.localize("propertyUnknownType", { name: r4 });
                      e4.log(t4);
                    }
                    if ("any" === i2.type || "propertyObject" === i2.type) continue;
                    const a3 = y2.Types.getType(s2);
                    if (null != s2 && i2.type !== a3 && !i2.validator) {
                      if ("object" === i2.type && "array" === a3) continue;
                      if ("number" === a3 && ["integer", "int", "float"].findIndex((e5) => e5 === i2.type) >= 0) continue;
                      const t4 = e4.localize("propertyInvalidValueType", { name: r4, actualType: a3, type: i2.type });
                      e4.log(t4);
                    }
                  }
                  e4.defineElementHierarchicalProperties(e4._properties, e4), e4.isCreated = true;
                }, t2.registered();
              }
              defineElementMethods(e3, t2) {
                const n2 = this.constructor.prototype, o2 = function(e4, t3) {
                  const n3 = Array.prototype.slice.call(arguments, 2), o3 = function() {
                    if (!this.isReady && "localize" !== t3 && "localize" !== t3 && "cloneNode" !== t3 && "importStyle" !== t3 && "log" !== t3 && "parseAttributes" !== t3) {
                      const e5 = this.localize("elementNotInDOM");
                      this.log(e5);
                    }
                    let o4 = this;
                    for (let e5 = 0; e5 < this.modulesList.length; e5++) {
                      let n4 = this.modulesList[e5];
                      if (t3 in n4) {
                        o4 = n4;
                        break;
                      }
                    }
                    const r4 = this.context, i2 = n3.concat(Array.prototype.slice.call(arguments));
                    let s2 = null;
                    const a3 = function(e5, t4) {
                      return e5 === t4 || "number" === e5 && ("int" === t4 || "integer" === t4 || "float" === t4) || "bool" === e5 && "boolean" === t4 || "boolean" === e5 && "bool" === t4 || "object" === e5 && "any" === t4 || void 0;
                    };
                    if (this.methods) {
                      const e5 = this.methods[t3];
                      if (e5) {
                        const n4 = e5.split(":");
                        s2 = n4[n4.length - 1].trim();
                        const o5 = [], r5 = e5.substring(1 + e5.indexOf("("), e5.lastIndexOf(")")).split(",");
                        let l3 = "";
                        for (let e6 = 0; e6 < r5.length; e6++) {
                          const t4 = r5[e6];
                          l3 += t4, t4.indexOf(":") >= 0 ? (o5.push(l3), l3 = "") : l3 += ",";
                        }
                        let d3 = o5.length;
                        for (let e6 = 0; e6 < o5.length; e6++) {
                          const n5 = o5[e6].trim().split(":"), r6 = n5[0].split("=")[0].trim().indexOf("?") >= 0, s3 = n5[1].indexOf("?") >= 0, l4 = n5[1].replace(/\?/gi, "").trim(), c2 = l4.split("|");
                          let u3 = n5[0].split("=")[1];
                          const p3 = y2.Types.getType(i2[e6]);
                          if (void 0 === i2[e6] && u3) {
                            switch (u3 = u3.trim(), l4[0]) {
                              case "date": {
                                let e7 = u3.substring(u3.indexOf("(") + 1, u3.lastIndexOf(")"));
                                e7 = e7.length > 0 ? e7.split(",").map((e8) => parseInt(e8)) : [], u3 = 0 === e7.length ? /* @__PURE__ */ new Date() : new Date(e7[0], e7[1], e7[2]);
                                break;
                              }
                              case "bool":
                              case "boolean":
                                u3 = "true" === u3 || "1" === u3;
                                break;
                              case "int":
                              case "integer":
                                u3 = parseInt(u3);
                                break;
                              case "float":
                              case "number":
                                u3 = parseFloat(u3);
                                break;
                              case "any":
                              case "object":
                                u3 = u3.indexOf("{") >= 0 ? JSON.parse(u3) : u3;
                            }
                            i2.push(u3);
                          } else r6 && d3--;
                          if (l4 !== p3 && p3) {
                            let n6 = true;
                            for (let e7 = 0; e7 < c2.length; e7++) if (a3(p3, c2[e7])) {
                              n6 = false;
                              break;
                            }
                            if (n6 && (null !== i2[e6] || !s3)) {
                              const n7 = this.localize("methodInvalidValueType", { name: t3, actualType: p3, type: l4, argumentIndex: e6 });
                              this.log(n7);
                            }
                          }
                          if (i2.length < d3) {
                            const e7 = this.localize("methodInvalidArgumentsCount", { name: t3, actualArgumentsCount: i2.length, argumentsCount: d3 });
                            this.log(e7);
                          }
                        }
                      }
                    }
                    this.context = this;
                    const l2 = e4.apply(o4, i2);
                    if (s2) {
                      const e5 = void 0 === y2.Types.getType(l2) ? "void" : y2.Types.getType(l2);
                      if (!a3(e5, s2)) {
                        const n4 = this.localize("methodInvalidReturnType", { name: t3, actualType: e5, type: s2 });
                        this.log(n4);
                      }
                    }
                    return this.context = r4, l2;
                  };
                  return o3;
                }, r3 = ["constructor", "ready", "created", "render", "attached", "detached", "appendChild", "insertBefore", "removeChild", "connect", "disconnectedCallback", "connectedCallback", "attributeChangedCallback", "propertyChangedHandler", "enableShadowDOM", "isInShadowDOM", "addPropertyBindings"];
                for (let i2 in e3) {
                  let s2 = e3[i2];
                  s2.startsWith("_") || void 0 !== r3.find((e4) => e4 === s2) || n2.extendedProperties[s2] || y2.Types.isFunction(t2[s2]) && (n2[s2] = o2(t2[s2], s2));
                }
              }
              defineElementProperties(e3) {
                if (!e3) return;
                const t2 = this, n2 = t2.constructor.prototype, o2 = Object.keys(e3), r3 = t2.getStaticMember("properties");
                Object.assign(n2.extendedProperties, e3), t2.updateProperty = function(e4, t3, n3) {
                  const o3 = e4;
                  if (!t3 || t3.readOnly) return;
                  if (t3.allowedValues) {
                    let e5 = false;
                    for (let o4 = 0; o4 < t3.allowedValues.length; o4++) if (t3.allowedValues[o4] === n3) {
                      e5 = true;
                      break;
                    }
                    if (!e5) {
                      const e6 = JSON.stringify(t3.allowedValues).replace(/\[|\]/gi, "").replace(",", ", ").replace(/"/gi, "'"), r5 = "'" + n3 + "'", i3 = o3.localize("propertyInvalidValue", { name: t3.name, actualValue: r5, value: e6 });
                      return void o3.log(i3);
                    }
                  }
                  const r4 = t3.name, i2 = o3._properties[r4].value;
                  if (t3.validator && o3[t3.validator]) {
                    const e5 = o3.context;
                    o3.context = o3;
                    const r5 = o3[t3.validator](i2, n3);
                    void 0 !== r5 && (n3 = r5), o3.context = e5;
                  }
                  if (i2 !== n3) {
                    if (o3.propertyChanging) {
                      const e5 = o3.propertyChanging(r4, i2, n3);
                      if (false === e5 || null === e5) return;
                    }
                    if (!t3.hasOwnProperty("type")) {
                      const e5 = o3.localize("propertyUnknownType", { name: r4 });
                      o3.log(e5);
                    }
                    if ("array" !== t3.type || JSON.stringify(i2) !== JSON.stringify(n3)) {
                      if (null != n3 && "any" !== t3.type && "propertyObject" !== t3.type && t3.type !== y2.Types.getType(n3) && !t3.validator || null === n3 && !t3.nullable) {
                        let e5 = true;
                        if ("object" === t3.type && "array" === y2.Types.getType(n3) && (e5 = false), "number" === y2.Types.getType(n3) && ["integer", "int", "float"].findIndex((e6) => e6 === t3.type) >= 0 && (e5 = false), e5) {
                          const e6 = o3.localize("propertyInvalidValueType", { name: r4, actualType: y2.Types.getType(n3), type: t3.type });
                          return void o3.error(e6);
                        }
                      }
                      if (t3.isUpdating = true, t3.isHierarchicalProperty) {
                        const e5 = function(t4, n4) {
                          const r5 = Object.keys(t4);
                          for (let i3 = 0; i3 < r5.length; i3++) {
                            const s2 = r5[i3], a3 = t4[s2];
                            "object" == typeof a3 && !y2.Types.isArray(a3) && a3 && a3.constructor !== Date ? e5(a3, n4 + "_" + s2) : o3[n4 + "_" + s2] = a3;
                          }
                        };
                        e5(n3, r4);
                      } else o3._properties[r4].value = n3;
                      if (!t3.isUpdatingFromAttribute && t3.reflectToAttribute && o3.$.setAttributeValue(t3.attributeName, n3, t3.type), o3.isReady && (!o3.ownerElement || o3.ownerElement && o3.ownerElement.isReady)) {
                        if ("wait" === r4 && (n3 || !i2 || o3.isCompleted || (o3.classList.remove("smart-visibility-hidden"), o3.ownerElement && o3.ownerElement.updateBoundMappedNodes(), o3.updateBoundMappedNodes(), o3.complete())), "renderMode" === r4) return;
                        if (o3.context !== o3 && !o3.wait) {
                          const e6 = o3.context;
                          o3.context = o3, o3.propertyChangedHandler(r4, i2, n3), o3.context = e6, t3.observer && o3[t3.observer] && (o3.context = o3, o3[t3.observer](i2, n3), o3.context = document), o3._watch && o3._watch.properties.indexOf(r4) >= 0 && o3._watch.propertyChangedCallback(r4, i2, n3);
                        }
                        const e5 = t3.notify || o3.boundProperties[r4];
                        e5 && (o3.$.fireEvent(t3.attributeName + "-changed", { context: o3.context, oldValue: i2, value: o3[r4] }), o3.boundProperties[r4] && o3.updateBoundNodes(r4)), e5 && o3.templateProperties && o3.templateProperties[r4] && o3.refreshTemplate(), o3.dataContextProperties && ("dataContext" === r4 ? o3.applyDataContext() : o3.dataContextProperties[r4] && o3.updateDataContextProperty(r4));
                      }
                      t3.isUpdating = false;
                    }
                  }
                };
                for (let t3 = 0; t3 < o2.length; t3 += 1) {
                  const i2 = o2[t3], s2 = e3[i2], a3 = y2.Core.toDash(i2), l2 = s2.type || "any", d3 = l2.indexOf("?") >= 0 || "any" === l2;
                  d3 && "any" !== l2 && (s2.type = l2.substring(0, l2.length - 1)), s2.nullable = d3, s2.attributeName = a3.toLowerCase(), s2.name = i2, s2.reflectToAttribute = void 0 === s2.reflectToAttribute || s2.reflectToAttribute, s2.inherit && r3[i2] && (s2.value = r3[i2].value), s2.extend && r3[i2] && y2.Core.assign(s2.value, r3[i2].value), n2.hasOwnProperty(i2) || Object.defineProperty(n2, i2, { configurable: false, enumerable: true, get() {
                    if (this._properties[i2]) return this._properties[i2].value;
                  }, set(e4) {
                    const t4 = this;
                    t4.updateProperty(t4, t4._properties[i2], e4);
                  } });
                }
              }
            }
            let _2 = [], S2 = [], x = [], E2 = false;
            const A2 = navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);
            A2 && parseInt(A2[2], 10) <= 50 && (E2 = true);
            class T2 {
              static register(e3, t2) {
                const o2 = t2.prototype;
                let r3 = a2.toCamelCase(e3).replace(/[a-z]+/, ""), i2 = t2.version || window[n].Version;
                if (window.customElements.get(e3) && window.customElements.get(e3).version === i2) return;
                let s2 = e3;
                for (i2 = i2.split("."); window.customElements.get(e3); ) e3 = s2 + "-" + i2.join("."), i2[2] = parseInt(i2[2]) + 1;
                if (!_2[e3]) {
                  if (e3.startsWith(n.toLowerCase())) _2[e3] = window[n][r3] = window[n.toLowerCase() + r3] = t2;
                  else {
                    let o3 = e3.split("-")[0];
                    o3 = o3.substring(0, 1).toUpperCase() + o3.substring(1), window[n][o3] || (window[n][o3] = {}), _2[e3] = window[n][o3][r3] = window[o3.toLowerCase() + r3] = t2, window[n][r3] && (r3 = a2.toCamelCase(e3)), window[n][r3] = t2;
                  }
                  o2.elementName = r3, o2.defineElement(), S2[e3] && S2[e3](o2), window.customElements.define(e3, t2);
                }
              }
              static registerElements() {
                const e3 = this;
                if (e3.toRegister) {
                  e3.isRegistering = true;
                  for (let t2 = 0; t2 < e3.toRegister.length; t2++) {
                    const n2 = e3.toRegister[t2];
                    e3.register(n2.tagName, n2.element);
                  }
                  e3.isRegistering = false;
                }
              }
              static get(e3) {
                if (_2[e3]) return _2[e3];
              }
              static whenRegistered(e3, t2) {
                if (!e3) throw new Error("Syntax Error: Invalid tag name");
                const n2 = S2[e3], o2 = this.get(e3), r3 = o2 ? o2.modules.length : 3;
                try {
                  n2 || o2 ? !n2 && o2 ? (t2(o2.prototype), S2[e3] = void 0) : n2 && !o2 ? S2[e3] = function(e4) {
                    n2(e4), t2(e4);
                  } : n2 && o2 && (o2.proto && (n2(o2.proto), t2(o2.proto)), S2[e3] = void 0) : S2[e3] = function(e4) {
                    try {
                      t2(e4);
                    } catch (e5) {
                      const t3 = e5 instanceof Error ? e5.message : e5.toString();
                      console.log(t3);
                    }
                  };
                } catch (e4) {
                  const t3 = e4 instanceof Error ? e4.message : e4.toString();
                  console.log(t3);
                }
                if (o2 && r3 !== o2.prototype.modules.length) {
                  const t3 = document.querySelectorAll(e3);
                  for (let e4 = 0; e4 < t3.length; e4++) {
                    const n3 = t3[e4];
                    n3.isCreated && n3._initElement();
                  }
                }
              }
            }
            T2.lazyRegister = false, T2.tagNames = [];
            class P2 {
              constructor() {
                const e3 = this;
                e3.name = "observableArray", e3.observables = arguments.length < 3 ? null : arguments[2];
                const t2 = new Proxy(e3, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, apply: function(e4, t3, n2) {
                  return e4.apply(t3, n2);
                }, get: function(t3, n2) {
                  return t3[n2] || isNaN(parseInt(n2)) ? t3[n2] : e3.getItem(parseInt(n2));
                }, set: function(t3, n2, o2) {
                  return t3[n2] || isNaN(parseInt(n2)) ? (t3[n2] = o2, true) : (e3.setItem(parseInt(n2), o2), true);
                } });
                if (e3._addArgs = { eventName: "change", object: t2, action: "add", index: null, removed: new Array(), addedCount: 1 }, e3._removeArgs = { eventName: "change", object: t2, action: "remove", index: null, removed: null, addedCount: 0 }, arguments.length >= 1 && Array.isArray(arguments[0])) {
                  e3._array = [];
                  const t3 = arguments[0];
                  for (let n2 = 0, o2 = t3.length; n2 < o2; n2++) {
                    const o3 = e3._getItem(e3._array.length, t3[n2]);
                    e3._array.push(o3);
                  }
                } else e3._array = Array.apply(null, arguments);
                return 2 === arguments.length && (e3.notifyFn = arguments[1]), t2;
              }
              get canNotify() {
                const e3 = this;
                return void 0 === e3._canNotify && (e3._canNotify = true), e3._canNotify;
              }
              set canNotify(e3) {
                this._canNotify = e3;
              }
              _notify(e3) {
                const t2 = this;
                t2.canNotify && t2.notifyFn && t2.notifyFn(e3);
              }
              notify(e3) {
                e3 && (this.notifyFn = e3);
              }
              toArray() {
                return this._array;
              }
              _getItem(e3, t2) {
                const n2 = this;
                return "string" == typeof t2 || "number" == typeof t2 || void 0 === t2 ? t2 : new Proxy(t2, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, set: function(t3, o2, r3) {
                  const i2 = t3[o2];
                  return t3[o2] = r3, !n2._canNotify || false === t3.canNotify || (n2.observables && !n2.observables[o2] || n2._notify({ eventName: "change", object: n2, target: t3, action: "update", index: e3, path: e3 + "." + o2, oldValue: i2, newValue: r3, propertyName: o2 }), true);
                } });
              }
              getItem(e3) {
                return this._array[e3];
              }
              setItem(e3, t2) {
                const n2 = this, o2 = n2._array[e3];
                n2._array[e3] = n2._getItem(e3, t2), n2._notify({ eventName: "change", object: n2._array, action: "update", index: e3, removed: [o2], addedCount: 1 });
              }
              get length() {
                return this._array.length;
              }
              set length(e3) {
                const t2 = this;
                r2.isNumber(e3) && t2._array && t2._array.length !== e3 && t2.splice(e3, t2._array.length - e3);
              }
              toString() {
                return this._array.toString();
              }
              toLocaleString() {
                return this._array.toLocaleString();
              }
              concat() {
                const e3 = this;
                e3._addArgs.index = e3._array.length;
                const t2 = e3._array.concat.apply(e3._array, arguments);
                return new Smart.ObservableArray(t2);
              }
              join(e3) {
                return this._array.join(e3);
              }
              pop() {
                const e3 = this;
                e3._removeArgs.index = e3._array.length - 1, delete e3[e3._array.length - 1];
                const t2 = e3._array.pop();
                return e3._removeArgs.removed = [t2], e3._notify(e3._removeArgs), e3._notifyLengthChange(), t2;
              }
              push() {
                const e3 = this;
                if (e3._addArgs.index = e3._array.length, 1 === arguments.length && Array.isArray(arguments[0])) {
                  const t2 = arguments[0];
                  for (let n2 = 0, o2 = t2.length; n2 < o2; n2++) {
                    const o3 = e3._getItem(e3._array.length, t2[n2]);
                    e3._array.push(o3);
                  }
                } else {
                  const t2 = e3._getItem(e3._addArgs.index, arguments[0]);
                  e3._array.push.apply(e3._array, [t2]);
                }
                return e3._addArgs.addedCount = e3._array.length - e3._addArgs.index, e3._notify(e3._addArgs), e3._notifyLengthChange(), e3._array.length;
              }
              _notifyLengthChange() {
                const e3 = this;
                if (!e3.canNotify) return;
                const t2 = e3._createPropertyChangeData("length", e3._array.length);
                e3._notify(t2);
              }
              _createPropertyChangeData(e3, t2, n2) {
                return { eventName: "change", object: this, action: e3, value: t2, oldValue: n2 };
              }
              reverse() {
                return this._array.reverse();
              }
              shift() {
                const e3 = this, t2 = e3._array.shift();
                return e3._removeArgs.index = 0, e3._removeArgs.removed = [t2], e3._notify(e3._removeArgs), e3._notifyLengthChange(), t2;
              }
              slice(e3, t2) {
                return this._array.slice(e3, t2);
              }
              sort(e3) {
                return this._array.sort(e3);
              }
              splice(e3, t2, n2) {
                const o2 = this, r3 = o2._array.length;
                let i2;
                if (n2 && n2.length) for (let r4 = 0; r4 < n2.length; r4++) i2 = o2._array.splice(e3 + r4, t2, n2[r4]);
                else i2 = o2._array.splice.apply(o2._array, arguments);
                if (n2) {
                  let t3 = o2.canNotify;
                  if (o2.canNotify = false, n2.length) for (let t4 = 0; t4 < n2.length; t4++) o2.setItem(e3 + t4, n2[t4]);
                  else o2.setItem(e3, n2);
                  o2.canNotify = t3, o2._notify({ eventName: "change", object: this, action: "add", index: e3, added: i2, addedCount: o2._array.length > r3 ? o2._array.length - r3 : 0 });
                } else o2._notify({ eventName: "change", object: this, action: "remove", index: e3, removed: i2, addedCount: o2._array.length > r3 ? o2._array.length - r3 : 0 });
                return o2._array.length !== r3 && o2._notifyLengthChange(), i2;
              }
              unshift() {
                const e3 = this, t2 = e3._array.length, n2 = e3._array.unshift.apply(e3._array, arguments);
                return e3._addArgs.index = 0, e3._addArgs.addedCount = n2 - t2, e3._notify(this._addArgs), e3._notifyLengthChange(), n2;
              }
              indexOf(e3, t2) {
                const n2 = this;
                for (let o2 = t2 || 0, r3 = n2._array.length; o2 < r3; o2++) if (n2._array[o2] === e3) return o2;
                return -1;
              }
              lastIndexOf(e3, t2) {
                const n2 = this;
                for (let o2 = t2 || n2._array.length - 1; o2 >= 0; o2--) if (n2._array[o2] === e3) return o2;
                return -1;
              }
              find(e3, t2) {
                return this._array.find(e3, t2);
              }
              findIndex(e3, t2) {
                return this._array.findIndex(e3, t2);
              }
              every(e3, t2) {
                return this._array.every(e3, t2);
              }
              some(e3, t2) {
                return this._array.some(e3, t2);
              }
              forEach(e3, t2) {
                this._array.forEach(e3, t2);
              }
              map(e3, t2) {
                return this._array.map(e3, t2);
              }
              filter(e3, t2) {
                return this._array.filter(e3, t2);
              }
              reduce(e3, t2) {
                return void 0 !== t2 ? this._array.reduce(e3, t2) : this._array.reduce(e3);
              }
              reduceRight(e3, t2) {
                return void 0 !== t2 ? this._array.reduceRight(e3, t2) : this._array.reduceRight(e3);
              }
              move(e3, t2) {
                this.splice(t2, 0, this.splice(e3, 1)[0]);
              }
            }
            let D2 = {};
            window[n] && (D2 = window[n]), window[n] = function(e3, t2) {
              let o2 = e3;
              if (e3) {
                if (e3.indexOf("#") >= 0 || e3.indexOf(".") >= 0) return u2[e3] ? u2[e3] : t2 ? (u2[e3] = new t2(), function(e4, t3) {
                  const n2 = t3.properties;
                  t3._properties = [];
                  const o3 = function(n3, r4) {
                    const i2 = Object.keys(n3);
                    for (let s2 = 0; s2 < i2.length; s2++) {
                      const a3 = i2[s2], l2 = n3[a3];
                      t3._properties[r4 + a3] = l2, Array.isArray(l2) ? t3._properties[r4 + a3] = new P2(l2, function(t4) {
                        const n4 = a3 + "." + t4.path, o4 = t4.newValue, r5 = document.querySelector(e4);
                        if (r5) {
                          const e5 = n4.split(".");
                          let t5 = r5;
                          for (let n5 = 0; n5 < e5.length; n5++) t5 = t5[e5[n5]];
                          t5 = o4;
                        }
                      }) : (Object.defineProperty(n3, a3, { configurable: false, enumerable: true, get: () => t3._properties[r4 + a3], set(e5) {
                        t3._properties[r4 + a3] = e5;
                      } }), l2 && "DataAdapter" === l2.constructor.name || l2 && "object" == typeof l2 && Smart.DataAdapter && l2 instanceof Smart.DataAdapter || "object" == typeof l2 && l2 && Object.keys(l2).length > 0 && o3(l2, r4 + a3 + "."));
                    }
                  };
                  o3(n2, ""), Object.defineProperty(t3, "properties", { configurable: false, enumerable: true, get: () => n2 });
                  const r3 = document.querySelector(e4);
                  if (r3 && r3.isReady) for (let e5 in n2) r3[e5] = n2[e5];
                  else if (r3) {
                    r3.props = {};
                    for (let e5 in n2) r3.props[e5] = n2[e5];
                  }
                }(e3, u2[e3]), u2[e3]) : void 0;
                if (t2) {
                  if (T2.tagNames[e3] = t2, T2.lazyRegister) {
                    T2.toRegister || (T2.toRegister = []);
                    const e4 = a2.toCamelCase(o2).replace(/[a-z]+/, "");
                    return window[n][e4] = t2, void T2.toRegister.push({ tagName: o2, element: t2 });
                  }
                  T2.register(o2, t2);
                }
              }
            }, window.addEventListener("load", function() {
              const e3 = window[n].Elements.tagNames;
              let t2 = [];
              for (let o2 in e3) {
                const r3 = e3[o2];
                let i2 = document.querySelectorAll("[" + o2 + "]");
                for (let e4 = 0; e4 < i2.length; e4++) {
                  const t3 = i2[e4];
                  t3 instanceof HTMLDivElement && (t3.__proto__ = r3.prototype, t3.created(), t3.connectedCallback()), t3.classList.add("smart-element-ready");
                }
                let s2 = r3.name;
                "Item" === s2 && (s2 = "ListItem"), i2 = document.querySelectorAll('[is="' + n.toLocaleLowerCase() + s2 + '"]');
                for (let e4 = 0; e4 < i2.length; e4++) t2.push(i2[e4]);
              }
              if (t2.length > 0) {
                const e4 = (e5) => {
                  let t3 = [], n2 = e5.parentNode;
                  for (; n2 && 9 !== n2.nodeType; ) n2 instanceof HTMLElement == 1 && t3.push(n2), n2 = n2.parentNode;
                  return t3;
                };
                t2.sort(function(t3, n2) {
                  let o2 = e4(t3).length, r3 = e4(n2).length;
                  return o2 < r3 ? 1 : o2 > r3 ? -1 : 0;
                });
                for (let e5 = 0; e5 < t2.length; e5++) {
                  const n2 = t2[e5], o2 = n2.getAttribute("is");
                  let r3;
                  r3 = "smartItem" === o2 ? new window.smartListItem(n2) : new window[o2](n2), r3.removeAttribute("is");
                }
              }
            });
            const L2 = function() {
              if ("complete" === document.readyState && "manual" !== window[n].RenderMode) {
                x.sort(function(e3, t2) {
                  let n2 = e3.element.parents.length, o2 = t2.element.parents.length;
                  return n2 < o2 ? -1 : n2 > o2 ? 1 : 0;
                });
                for (let e3 = 0; e3 < x.length; e3++) window[n].RenderMode = "", x[e3].element.isLoading = false, x[e3].callback(), window[n].RenderMode = "";
                x = [], document.removeEventListener("readystatechange", L2);
              }
            };
            Object.assign(window[n], { Elements: T2, Modules: [], BaseElement: class extends C2 {
              static get observedAttributes() {
                let e3 = this, t2 = ["external-style"];
                for (let n2 in e3.prototype.extendedProperties) {
                  const o2 = e3.prototype.extendedProperties[n2];
                  t2.push(o2.attributeName);
                }
                return t2;
              }
              static get styleUrls() {
                return [];
              }
              static get styles() {
                return "";
              }
              get styleUrl() {
                return this._styleUrl;
              }
              set styleUrl(e3) {
                this._styleUrl = e3;
              }
              get isInShadowDOM() {
                const e3 = this, t2 = e3.getRootNode();
                return !e3.hasAttribute("smart-blazor") && t2 !== document && t2 !== e3;
              }
              getShadowRootOrBody() {
                const e3 = this;
                return e3.isInShadowDOM && e3.getRootNode().host ? e3.getRootNode().host.shadowRoot : document.body;
              }
              get enableShadowDOM() {
                return window[n].EnableShadowDOM;
              }
              importStyle(e3, t2) {
                this._importStyle(e3, t2);
              }
              _importStyle(e3, t2) {
                const n2 = this;
                if (!n2.shadowRoot || !e3) return;
                const o2 = (e4) => {
                  const o3 = n2.shadowRoot.children;
                  for (let n3 = 0; n3 < o3.length; n3++) {
                    const r5 = o3[n3];
                    if (r5 instanceof HTMLLinkElement && r5.href === e4) return t2 && t2(), null;
                  }
                  const r4 = document.createElement("link");
                  return r4.rel = "stylesheet", r4.type = "text/css", r4.href = e4, r4.onload = t2, r4;
                }, r3 = (() => {
                  const e4 = n2.shadowRoot.children;
                  let t3 = null;
                  for (let n3 = 0; n3 < e4.length; n3++) {
                    const o3 = e4[n3];
                    o3 instanceof HTMLLinkElement && (t3 = o3);
                  }
                  return t3;
                })(), i2 = (e4, t3) => {
                  t3.parentNode.insertBefore(e4, t3.nextSibling);
                };
                if (Array.isArray(e3)) {
                  const t3 = document.createDocumentFragment();
                  for (let n3 = 0; n3 < e3.length; n3++) {
                    const r4 = o2(e3[n3]);
                    r4 && t3.appendChild(r4);
                  }
                  r3 ? i2(t3, r3) : n2.shadowRoot.insertBefore(t3, n2.shadowRoot.firstChild);
                } else {
                  const t3 = o2(e3);
                  if (!t3) return;
                  r3 ? i2(t3, r3) : n2.shadowRoot.insertBefore(t3, n2.shadowRoot.firstChild);
                }
              }
              attributeChanged(e3, t2, n2) {
                "style-url" === e3 && (this.styleUrl = n2);
              }
              attributeChangedCallback(e3, t2, n2) {
                this.isReady && super.attributeChangedCallback(e3, t2, n2);
              }
              constructor(e3, t2) {
                super();
                const n2 = this;
                if (e3) {
                  t2 && (n2._initProperties = t2);
                  const o2 = (e4) => {
                    if ("string" == typeof e4 ? document.querySelector(e4) : e4) {
                      const o3 = "string" == typeof e4 ? document.querySelector(e4) : e4;
                      if (o3 instanceof HTMLDivElement) {
                        const r3 = document.createElement(n2.tagName);
                        for (let e5 of o3.attributes) r3.setAttribute(e5.name, o3.getAttribute(e5.name));
                        for (; o3.childNodes.length; ) r3.appendChild(o3.firstChild);
                        return "string" == typeof e4 && (r3.id = e4.substring(1)), r3._initProperties = t2, o3.parentNode && o3.parentNode.replaceChild(r3, o3), r3;
                      }
                      if (t2) {
                        const e5 = o3.context;
                        if (o3._initProperties = t2, o3.isReady) {
                          o3.context = o3;
                          const n3 = {}, r3 = {};
                          for (let e6 in t2) n3[e6] = o3[e6], r3[e6] = t2[e6];
                          Object.getOwnPropertyNames(t2).length > 0 && (o3.initProperties(), o3.propertyChangedHandler(t2, n3, r3)), o3.context = e5;
                        }
                      }
                      return o3;
                    }
                  };
                  if ("string" == typeof e3) {
                    const t3 = document.querySelectorAll(e3), n3 = [];
                    if (t3.length > 1) {
                      for (let e4 = 0; e4 < t3.length; e4++) {
                        const r3 = o2(t3[e4]);
                        n3.push(r3);
                      }
                      return n3;
                    }
                  } else if (e3 && e3.length > 0) {
                    const t3 = e3;
                    if (t3.length > 1) {
                      for (let e4 = 0; e4 < t3.length; e4++) {
                        const n3 = o2(t3[e4]);
                        _2.push(n3);
                      }
                      return _2;
                    }
                  }
                  return o2(e3);
                }
                n2._styleUrl = "", n2.isUtilityElement || n2.created();
              }
              _getRootShadowParent() {
                let e3 = this.shadowParent;
                for (; e3; ) {
                  if (!e3.shadowParent) return e3;
                  e3 = e3.shadowParent;
                }
                return e3 || this.shadowParent;
              }
              _getStyleUrl(e3) {
                let t2 = y2.Core.getScriptLocation() + window[n].StyleBaseUrl + e3;
                return this.shadowParent && (t2 = t2.replace("scoped/", "")), t2;
              }
              _getStyleUrls() {
                const e3 = this;
                e3.nodeName.startsWith(n);
                const t2 = e3.getStaticMember("styleUrls", "array"), o2 = [];
                for (let n2 = 0; n2 < t2.length; n2++) {
                  const r3 = t2[n2], i2 = e3._getStyleUrl(r3);
                  o2.push(i2);
                }
                return o2;
              }
              _setupShadowRoot() {
                const e3 = this;
                e3.classList.add("smart-element-init");
                const t2 = (t3) => {
                  t3.$.root && (t3.$.root.classList.add(n.toLowerCase() + "-element"), t3.$.root.classList.add(e3.nodeName.toLowerCase())), t3.setup(), t3.classList.remove("smart-element-init");
                };
                if (document.adoptedStyleSheets) if (window[n].AdoptedStyleSheets) window[n].AdoptedStyleSheetsLoaded ? (e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets, t2(e3)) : (e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets, window[n].AdoptedStyleSheetsLoadedQueue || (window[n].AdoptedStyleSheetsLoadedQueue = []), window[n].AdoptedStyleSheetsLoadedQueue.push(e3));
                else {
                  const o2 = new CSSStyleSheet();
                  let r3 = y2.Core.getScriptLocation() + "/styles/smart.default.css";
                  o2.replace('@import url("' + r3 + '")').then(() => {
                    if (t2(e3), window[n].AdoptedStyleSheetsLoaded = true, window[n].AdoptedStyleSheetsLoadedQueue) {
                      const e4 = window[n].AdoptedStyleSheetsLoadedQueue;
                      for (let n2 = 0; n2 < e4.length; n2++) {
                        const o3 = e4[n2];
                        t2(o3);
                      }
                      delete window[n].AdoptedStyleSheetsLoadedQueue;
                    }
                  }).catch((e4) => {
                    console.error("Failed to load:", e4);
                  }), window[n].AdoptedStyleSheets = [o2], document.adoptedStyleSheets = [o2], e3.shadowRoot.adoptedStyleSheets = window[n].AdoptedStyleSheets;
                }
              }
              connect() {
                const e3 = this;
                window[n].EnableShadowDOM && !e3.shadowRoot && true !== e3.isInShadowDOM && (e3.attachShadow({ mode: "open" }), e3.shadowRoot && e3.$.root && (e3.shadowRoot.appendChild(e3.$.root), e3.$.root.classList.add(e3.nodeName.toLowerCase()))), e3.shadowRoot || e3.shadowParent ? e3.shadowRoot ? e3._setupShadowRoot() : (e3.shadowParent && window[n].EnableShadowDOM, e3.setup()) : e3.setup();
              }
              connectedCallback() {
                const e3 = this;
                if (e3.isLoading || e3.isUtilityElement) return;
                e3.classList.add("smart-element-init");
                const t2 = function() {
                  e3.classList.remove("smart-element-init");
                };
                if ("complete" === document.readyState && (void 0 === window[n].isAngular && (window[n].isAngular = null !== document.body.querySelector("[ng-version]")), window[n].isAngular)) {
                  for (let t3 = 0; t3 < e3.parents.length && !e3.parents[t3].nodeName.toLowerCase().startsWith(n.toLowerCase() + "-"); t3++) if (e3.parents[t3].hasAttribute("ng-version") && !e3.classList.contains("smart-angular")) {
                    window[n].RenderMode = "manual";
                    break;
                  }
                }
                if ("complete" === document.readyState && "manual" !== window[n].RenderMode) {
                  const n2 = e3.parents;
                  n2.length && "HTML" === n2[n2.length - 1].nodeName || e3.getRootNode().host ? (e3.checkIsInDomTimer && clearInterval(e3.checkIsInDomTimer), t2(), e3.connect()) : (e3.checkIsInDomTimer && clearInterval(e3.checkIsInDomTimer), n2.length > 0 && (e3.checkIsInDomTimer = setInterval(() => {
                    const n3 = e3.parents;
                    0 === n3.length && clearInterval(e3.checkIsInDomTimer), n3.length > 0 && "HTML" === n3[n3.length - 1].nodeName && (clearInterval(e3.checkIsInDomTimer), t2(), e3.connect());
                  }, 100)));
                } else e3.isLoading = true, x.push({ element: this, callback: (function() {
                  this.isReady || (t2(), this.connect());
                }).bind(e3) });
              }
              disconnectedCallback() {
                const e3 = this;
                e3.isAttached ? (e3.shadowParent = null, e3.detached()) : e3._resetShadowParent();
              }
              adoptedCallback() {
                this.setup();
              }
              appendTemplate(e3) {
                const t2 = this;
                t2.shadowRoot ? t2.shadowRoot.appendChild(e3) : t2.appendChild(e3);
              }
              _resetShadowParent() {
                const e3 = this;
                if (!window[n].EnableShadowDOM || null === e3.shadowParent) return;
                const t2 = [];
                let o2 = e3.parentNode;
                for (; o2 && 9 !== o2.nodeType; ) {
                  if (o2 instanceof HTMLElement == 1) t2.push(o2);
                  else if (11 === o2.nodeType && o2.host) {
                    o2 = o2.host;
                    continue;
                  }
                  o2 = o2.parentNode;
                }
                for (let n2 = 0; n2 < t2.length; n2++) if (t2[n2] === e3.shadowParent) return;
                t2.length > 0 && "HTML" === t2[t2.length - 1].nodeName && (e3.shadowParent = null);
              }
            }, Utilities: y2, Import: function(e3, t2) {
              let n2 = 0;
              const o2 = function(e4, t3) {
                return new Promise((n3) => {
                  const o3 = document.createElement("script");
                  o3.src = e4, o3.onload = n3;
                  for (let e5 = 0; e5 < document.head.children.length; e5++) {
                    const o4 = document.head.children[e5];
                    if (o4.src && o4.src.toString().indexOf(t3) >= 0) return void n3();
                  }
                  document.head.appendChild(o3);
                });
              };
              return new Promise((r3) => {
                const i2 = y2.Core.getScriptLocation(), s2 = function(t3) {
                  if (!e3[t3]) return;
                  const a3 = i2 + "/" + e3[t3];
                  o2(a3, e3[t3]).then(function() {
                    n2++, n2 === e3.length && r3(), s2(t3 + 1);
                  });
                };
                if (t2) for (let t3 = 0; t3 < e3.length; t3++) {
                  const s3 = i2 + "/" + e3[t3];
                  o2(s3, e3[t3]).then(function() {
                    n2++, n2 === e3.length && r3();
                  });
                }
                else s2(0);
              });
            }, ObservableArray: P2, Observable: class {
              constructor(e3, t2) {
                const n2 = this;
                var o2;
                return this.name = "observable", e3 && Object.assign(n2, e3), o2 = e3, Object.getOwnPropertyNames(Object.getPrototypeOf(o2)).forEach((e4) => "constructor" === e4 || !!e4.startsWith("_") || void (n2[e4] = o2[e4])), new Proxy(n2, { deleteProperty: function(e4, t3) {
                  return delete e4[t3], true;
                }, get: function(e4, t3) {
                  return e4[t3];
                }, set: function(e4, o3, r3) {
                  const i2 = e4[o3];
                  return i2 === r3 || (e4[o3] = r3, !("notifyFn" !== o3 && !o3.startsWith("_") && "canNotify" !== o3 && (!t2 || -1 !== t2.indexOf(o3)) && n2.canNotify && (n2._notify({ target: e4, propertyName: o3, oldValue: i2, newValue: r3 }), 0)));
                } });
              }
              get canNotify() {
                const e3 = this;
                return void 0 === e3._canNotify && (e3._canNotify = true), e3._canNotify;
              }
              set canNotify(e3) {
                this._canNotify = e3;
              }
              _notify(e3) {
                const t2 = this;
                if (t2.canNotify && t2.notifyFn) for (let n2 = 0; n2 < t2.notifyFn.length; n2++) t2.notifyFn[n2](e3);
              }
              notify(e3) {
                const t2 = this;
                e3 && (t2.notifyFn || (t2.notifyFn = []), t2.notifyFn.push(e3));
              }
            }, Component: class {
              constructor(e3, t2) {
                const n2 = this.name;
                let o2 = null;
                return e3 ? o2 = new window[n2](e3, t2) : (o2 = new window[n2](), o2._initProperties = t2), this._element = o2, o2;
              }
              get name() {
                return "Component";
              }
              get element() {
                return this._element;
              }
            }, Theme: D2.Theme || "", EnableShadowDOM: D2.ShadowDom || false, BaseUrl: "./", StyleBaseUrl: "/styles/default/", Version: e2, Templates: t, RenderMode: D2.RenderMode || "auto", Render: function() {
              const e3 = () => {
                window[n].RenderMode = "", L2();
              };
              "complete" === document.readyState ? e3() : (window.removeEventListener("load", e3), window.addEventListener("load", e3));
            }, Data: u2, Mode: D2.Mode || "production", License: "Evaluation" });
            let O2 = window[n].Theme;
            "manual" !== window[n].RenderMode && document.addEventListener("readystatechange", L2), Object.defineProperty(window[n], "Theme", { configurable: false, enumerable: true, get: () => O2, set(e3) {
              const t2 = O2;
              O2 = e3, w.fireEvent("theme-changed", { oldValue: t2, newValue: e3 }, { bubbles: true, cancelable: true });
            } }), window[n]("smart-base-element", window[n].BaseElement), window[n]("smart-content-element", class extends window[n].BaseElement {
              static get properties() {
                return { content: { type: "any", reflectToAttribute: false }, innerHTML: { type: "string", reflectToAttribute: false } };
              }
              template() {
                return "<div inner-h-t-m-l='[[innerHTML]]'></div>";
              }
              ready() {
                super.ready(), this.applyContent();
              }
              refresh() {
              }
              clearContent() {
                const e3 = this;
                for (; e3.$.content.firstChild; ) e3.$.content.removeChild(e3.$.content.firstChild);
              }
              applyContent() {
                const e3 = this;
                if (void 0 === e3.content) return void (e3.content = e3.$.content);
                if ("" === e3.content || null === e3.content) return void e3.clearContent();
                if (e3.content instanceof HTMLElement) return e3.clearContent(), void e3.$.content.appendChild(e3.content);
                const t2 = document.createDocumentFragment();
                let n2 = document.createElement("div");
                t2.appendChild(n2), e3.content instanceof HTMLElement ? n2.appendChild(e3.content) : n2.innerHTML = e3.content;
                let o2 = Array.from(n2.childNodes);
                n2.parentNode.removeChild(n2);
                for (let e4 = 0; e4 < o2.length; e4++) t2.appendChild(o2[e4]);
                e3.clearContent(), e3.$.content.appendChild(t2);
              }
              propertyChangedHandler(e3, t2, n2) {
                super.propertyChangedHandler(e3, t2, n2);
                const o2 = this;
                t2 !== n2 && ("innerHTML" === e3 && (o2.content = n2, o2.applyContent(), o2.innerHTML = o2.content = y2.Core.html(o2.$.content)), "content" === e3 && o2.applyContent());
              }
            }), window[n]("smart-scroll-viewer", class extends window[n].ContentElement {
              static get properties() {
                return { horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, touchScrollRatio: { type: "any", value: null }, touchVelocityCoefficient: { type: "number", value: 50 }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] } };
              }
              static get listeners() {
                return { touchmove: "_touchmoveHandler", touchstart: "_touchstartHandler", wheel: "_mouseWheelHandler", "document.up": "_upHandler" };
              }
              static get styleUrls() {
                return ["smart.scrollviewer.css"];
              }
              template() {
                return `<div id="container" class="smart-container" role="presentation">
                        <div id="scrollViewerContainer" class="smart-scroll-viewer-container" role="presentation">
                            <div id="scrollViewerContentContainer" inner-h-t-m-l='[[innerHTML]]' class="smart-scroll-viewer-content-container" role="presentation">
                                <content></content>
                            </div>
                        </div>
                        <smart-scroll-bar id="verticalScrollBar" theme="[[theme]]"  animation="[[animation]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]" orientation="vertical"></smart-scroll-bar>
                        <smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" disabled="[[disabled]]" right-to-left="[[rightToLeft]]"></smart-scroll-bar>
                    </div>`;
              }
              appendChild(e3) {
                const t2 = this;
                if (e3) {
                  if (!t2.isCompleted || e3.classList && e3.classList.contains("smart-resize-trigger-container")) {
                    const e4 = Array.prototype.slice.call(arguments, 2);
                    return HTMLElement.prototype.appendChild.apply(t2, e4.concat(Array.prototype.slice.call(arguments)));
                  }
                  t2.$.scrollViewerContentContainer.appendChild(e3);
                }
              }
              removeChild(e3) {
                const t2 = this;
                if (e3) {
                  if (!t2.isCompleted || e3.classList && e3.classList.contains("smart-resize-trigger-container")) {
                    const e4 = Array.prototype.slice.call(arguments, 2);
                    return HTMLElement.prototype.removeChild.apply(t2, e4.concat(Array.prototype.slice.call(arguments)));
                  }
                  t2.$.scrollViewerContentContainer.removeChild(e3);
                }
              }
              removeAll() {
                const e3 = this;
                e3.isCompleted && (e3.$.scrollViewerContentContainer.innerHTML = "");
              }
              _horizontalScrollbarHandler(e3) {
                const t2 = this;
                t2.$.scrollViewerContentContainer.style.left = (t2.rightToLeft ? 1 : -1) * t2.scrollLeft + "px", e3.stopPropagation && e3.stopPropagation(), t2.onHorizontalChange && t2.onHorizontalChange(e3);
              }
              _verticalScrollbarHandler(e3) {
                const t2 = this;
                t2.$.scrollViewerContentContainer.style.top = -t2.scrollTop + "px", e3.stopPropagation && e3.stopPropagation(), t2.onVerticalChange && t2.onVerticalChange(e3);
              }
              _touchmoveHandler(e3) {
                const t2 = this;
                if (t2._touchmoveInside && e3.cancelable) return e3.preventDefault(), void e3.stopPropagation();
                const n2 = t2.scrollHeight > 0, o2 = t2.scrollWidth > 0, r3 = t2._touchCoords;
                if (!n2 && !o2 || !r3) return;
                const i2 = e3.touches[0];
                let s2, a3, l2, d3;
                t2._touchCoords = [i2.pageX, i2.pageY], n2 ? (s2 = t2.scrollTop, a3 = t2.scrollHeight, l2 = i2.pageY, d3 = r3[1]) : (s2 = t2.scrollLeft, a3 = t2.scrollWidth, l2 = i2.pageX, d3 = r3[0]);
                const c2 = parseFloat(l2.toFixed(5)), u3 = parseFloat(d3.toFixed(5));
                0 === s2 && c2 >= u3 || s2 === a3 && c2 <= u3 || (l2 !== d3 && (t2._touchmoveInside = true), e3.cancelable && (e3.preventDefault(), e3.stopPropagation()));
              }
              _touchstartHandler(e3) {
                const t2 = e3.touches[0];
                this._touchCoords = [t2.pageX, t2.pageY];
              }
              _mouseWheelHandler(e3) {
                const t2 = this;
                if (!t2.disabled && (t2.computedHorizontalScrollBarVisibility || t2.computedVerticalScrollBarVisibility)) {
                  if (e3.shiftKey && t2.computedHorizontalScrollBarVisibility) {
                    const n2 = t2.scrollLeft;
                    if (0 === n2 && e3.deltaX < 0 || n2 === t2.scrollHeight && e3.deltaX > 0) return;
                    return e3.stopPropagation(), e3.preventDefault(), void (t2.scrollWidth > 0 && t2.scrollTo(void 0, t2.scrollLeft + t2._getScrollCoefficient(e3, t2.offsetWidth)));
                  }
                  if (t2.computedVerticalScrollBarVisibility) {
                    const n2 = t2.scrollTop;
                    if (0 === n2 && e3.deltaY < 0 || n2 === t2.scrollHeight && e3.deltaY > 0) return;
                    e3.stopPropagation(), e3.preventDefault(), t2.scrollHeight > 0 && t2.scrollTo(t2.scrollTop + t2._getScrollCoefficient(e3, t2.offsetHeight));
                  }
                }
              }
              _overriddenHandler() {
              }
              _upHandler() {
                delete this._touchCoords, delete this._touchmoveInside;
              }
              _getScrollCoefficient(e3, t2) {
                const n2 = e3.deltaMode, o2 = Math.abs(e3.deltaY);
                let r3;
                return 0 === n2 ? r3 = o2 < 100 / 3 ? o2 : t2 : 1 === n2 ? r3 = o2 < 1 ? o2 * (100 / 3) : t2 : 2 === n2 && (r3 = t2), e3.deltaY < 0 ? -r3 : r3;
              }
              applyContent() {
                super.applyContent(), this.refresh();
              }
              get computedHorizontalScrollBarVisibility() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? !e3._scrollView.hScrollBar.$.hasClass("smart-hidden") : null;
              }
              get computedVerticalScrollBarVisibility() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? !e3._scrollView.vScrollBar.$.hasClass("smart-hidden") : null;
              }
              scrollTo(e3, t2) {
                const n2 = this;
                n2._scrollView && (void 0 !== e3 && n2._scrollView.scrollTo(e3), void 0 !== t2 && n2._scrollView.scrollTo(t2, false));
              }
              refreshScrollBarsVisibility() {
                const e3 = this;
                e3._scrollView && (e3._scrollView.hScrollBar.disabled = e3.disabled, e3._scrollView.vScrollBar.disabled = e3.disabled, "disabled" === e3.horizontalScrollBarVisibility && (e3._scrollView.hScrollBar.disabled = true), "disabled" === e3.verticalScrollBarVisibility && (e3._scrollView.vScrollBar.disabled = true), e3.scrollWidth > 0 ? e3._scrollView.hScrollBar.$.removeClass("smart-hidden") : "visible" !== e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.addClass("smart-hidden"), e3.scrollHeight > 0 ? e3._scrollView.vScrollBar.$.removeClass("smart-hidden") : "visible" !== e3.verticalScrollBarVisibility && e3._scrollView.vScrollBar.$.addClass("smart-hidden"), "hidden" === e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.addClass("smart-hidden"), "hidden" === e3.verticalScrollBarVisibility && e3._scrollView.vScrollBar.$.addClass("smart-hidden"), "visible" === e3.horizontalScrollBarVisibility && e3._scrollView.hScrollBar.$.removeClass("smart-hidden"), "visible" === e3.verticalScrollBarVisibility && (e3._scrollView.vScrollBar.$.removeClass("smart-hidden"), e3.disabled || (e3._scrollView.vScrollBar.disabled = e3.scrollHeight <= 0)), e3.computedHorizontalScrollBarVisibility && e3.computedVerticalScrollBarVisibility ? (e3._scrollView.hScrollBar.$.addClass("bottom-corner"), e3._scrollView.vScrollBar.$.addClass("bottom-corner")) : (e3._scrollView.hScrollBar.$.removeClass("bottom-corner"), e3._scrollView.vScrollBar.$.removeClass("bottom-corner")));
              }
              ready() {
                super.ready();
                const e3 = this;
                e3.$.verticalScrollBar.onChange = (t2) => {
                  t2.detail = t2, e3._verticalScrollbarHandler(t2);
                }, e3.$.horizontalScrollBar.onChange = (t2) => {
                  t2.detail = t2, e3._horizontalScrollbarHandler(t2);
                }, e3.$.verticalScrollBar.setAttribute("aria-controls", e3.id), e3.$.horizontalScrollBar.setAttribute("aria-controls", e3.id), e3._customScrollView || (e3._scrollView = new Smart.Utilities.Scroll(e3, e3.$.horizontalScrollBar, e3.$.verticalScrollBar)), e3.refresh();
              }
              refresh() {
                const e3 = this;
                function t2() {
                  const t3 = e3.$.scrollViewerContainer.classList.contains("vscroll");
                  e3.$.scrollViewerContainer.classList.remove("vscroll");
                  const n3 = e3.$.scrollViewerContentContainer.offsetWidth - e3.$.scrollViewerContainer.offsetWidth;
                  return n3 > 0 && "hidden" !== e3.horizontalScrollBarVisibility || "visible" === e3.horizontalScrollBarVisibility ? e3.$.scrollViewerContainer.classList.add("hscroll") : e3.$.scrollViewerContainer.classList.remove("hscroll"), t3 && e3.$.scrollViewerContainer.classList.add("vscroll"), n3;
                }
                function n2() {
                  let t3;
                  const n3 = e3.$.scrollViewerContainer.classList.contains("hscroll");
                  if (e3.$.scrollViewerContainer.classList.remove("hscroll"), Smart.Utilities.Core.Browser.Safari) {
                    const n4 = e3.$.scrollViewerContentContainer.getBoundingClientRect().height, o3 = e3.$.scrollViewerContainer.getBoundingClientRect().height;
                    t3 = n4 && o3 ? parseInt(n4) - parseInt(o3) : e3.$.scrollViewerContentContainer.offsetHeight - e3.$.scrollViewerContainer.offsetHeight;
                  } else t3 = e3.$.scrollViewerContentContainer.offsetHeight - e3.$.scrollViewerContainer.offsetHeight;
                  return t3 > 0 && "hidden" !== e3.verticalScrollBarVisibility || "visible" === e3.verticalScrollBarVisibility ? e3.$.scrollViewerContainer.classList.add("vscroll") : e3.$.scrollViewerContainer.classList.remove("vscroll"), n3 && e3.$.scrollViewerContainer.classList.add("hscroll"), t3;
                }
                if (!e3.$.scrollViewerContentContainer) return;
                let o2 = e3.scrollWidth, r3 = e3.scrollHeight;
                e3.scrollWidth = t2(), e3.scrollHeight = n2(), e3.scrollHeight && r3 === e3.scrollHeight || (e3.scrollWidth = t2()), e3.scrollWidth && o2 === e3.scrollWidth || (e3.scrollHeight = n2()), e3.computedVerticalScrollBarVisibility && (e3.scrollHeight += e3._scrollView.hScrollBar.offsetHeight), e3.computedHorizontalScrollBarVisibility && (e3.scrollWidth += e3._scrollView.vScrollBar.offsetWidth), 0 === e3.scrollHeight && e3.scrollWidth > 0 && e3.$.container.offsetHeight - e3.$.content.offsetHeight < 5 && (e3.$.container.style.paddingBottom = e3._scrollView.hScrollBar.offsetHeight + "px");
              }
              attached() {
                const e3 = this;
                super.attached(), e3._scrollView || e3._customScrollView || (e3._scrollView = new Smart.Utilities.Scroll(e3, e3.$.horizontalScrollBar, e3.$.verticalScrollBar));
              }
              detached() {
                const e3 = this;
                super.detached(), e3._scrollView && (e3._scrollView.unlisten(), delete e3._scrollView);
              }
              get scrollWidth() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? 1 === e3._scrollView.hScrollBar.max && "visible" === e3.horizontalScrollBarVisibility ? 0 : e3._scrollView.hScrollBar.max : -1;
              }
              set scrollWidth(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.hScrollBar && (0 === e3 && "visible" === t2.horizontalScrollBarVisibility ? t2._scrollView.hScrollBar.max = 0 : t2._scrollView.hScrollBar.max = e3, t2.refreshScrollBarsVisibility());
              }
              get scrollHeight() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? 1 === e3._scrollView.vScrollBar.max && "visible" === e3.verticalScrollBarVisibility ? 0 : e3._scrollView.vScrollBar.max : 0;
              }
              set scrollHeight(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.vScrollBar && (0 === e3 && "visible" === t2.verticalScrollBarVisibility ? t2._scrollView.vScrollBar.max = 1 : t2._scrollView.vScrollBar.max = e3, t2.refreshScrollBarsVisibility());
              }
              get scrollLeft() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.hScrollBar ? e3._scrollView.hScrollBar.value : 0;
              }
              set scrollLeft(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.hScrollBar && (t2._scrollView.hScrollBar.value = e3);
              }
              get scrollTop() {
                const e3 = this;
                return e3._scrollView && e3._scrollView.vScrollBar ? e3._scrollView.vScrollBar.value : 0;
              }
              set scrollTop(e3) {
                const t2 = this;
                e3 < 0 && (e3 = 0), t2._scrollView && t2._scrollView.vScrollBar && (t2._scrollView.vScrollBar.value = e3);
              }
              propertyChangedHandler(e3, t2, n2) {
                const o2 = this;
                super.propertyChangedHandler(e3, t2, n2), "animation" !== e3 && "theme" !== e3 && o2.refresh();
              }
            }), window[n].Utilities.Assign("PositionDetection", class {
              constructor(e3, t2, n2, o2) {
                const r3 = this;
                if (t2) {
                  const n3 = "dropDown" + Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
                  t2.id = n3, e3.setAttribute("aria-owns", n3);
                }
                r3.context = e3, r3.dropDown = t2, r3.defaultParent = n2, r3.closeMethod = o2;
              }
              handleAutoPositioning() {
                const e3 = this, t2 = e3.context;
                if ("auto" !== t2.dropDownPosition || t2.disabled || t2.isHidden) return;
                const n2 = window.requestAnimationFrame;
                let o2, r3 = Date.now();
                return o2 = n2(function i2() {
                  t2.isHidden || document.hidden || (o2 = n2(i2), "auto" === t2.dropDownPosition && !t2.disabled && (t2.isInShadowDOM ? document.body.contains(t2.shadowParent) : document.body.contains(t2)) || cancelAnimationFrame(o2), t2.isHidden && cancelAnimationFrame(o2), Date.now() - r3 >= 200 && (e3.scrollHandler(), r3 = Date.now()));
                });
              }
              checkBrowserBounds(e3) {
                const t2 = this.context;
                if ("auto" === t2.dropDownPosition && !t2.disabled) switch (e3) {
                  case "vertically":
                    this.checkBrowserBoundsVertically();
                    break;
                  case "horizontally":
                    this.checkBrowserBoundsHorizontally();
                    break;
                  default:
                    this.checkBrowserBoundsVertically(), this.checkBrowserBoundsHorizontally();
                }
              }
              checkBrowserBoundsHorizontally() {
                const e3 = this.context, t2 = this.dropDown;
                let n2, o2 = 0;
                a2.isMobile || window.innerWidth === document.documentElement.clientWidth || (o2 = window.innerWidth - document.documentElement.clientWidth), null !== e3._dropDownParent ? n2 = true : t2.style.left = "";
                const r3 = window.innerWidth - o2;
                let i2 = e3.getBoundingClientRect().left;
                if (i2 < 0 && (t2.style.left = (n2 ? 0 : Math.abs(i2)) + "px", i2 = parseFloat(t2.style.left)), i2 + t2.offsetWidth > r3) {
                  let e4 = i2 - Math.abs(r3 - i2 - t2.offsetWidth);
                  n2 && (e4 += window.pageXOffset), t2.style.left = (n2 ? e4 : e4 - i2) + "px", window.innerWidth === document.documentElement.clientWidth && (t2.style.left = parseFloat(t2.style.left) + o2 + "px"), n2 && window.innerHeight === document.documentElement.clientHeight && this.positionDropDown(true);
                }
              }
              checkBrowserBoundsVertically(e3) {
                const t2 = this.context, n2 = this.dropDown, o2 = t2._dropDownListPosition;
                e3 || (e3 = t2.getBoundingClientRect()), 0 !== e3.height && (document.documentElement.clientHeight - Math.abs(e3.top + e3.height + n2.offsetHeight) >= 0 ? t2._dropDownListPosition = "bottom" : e3.top - n2.offsetHeight >= 0 ? t2._dropDownListPosition = "top" : t2._dropDownListPosition = "overlay-center", this.updatePositionAttribute(o2, t2._dropDownListPosition));
              }
              scrollHandler() {
                const e3 = this.context;
                if (!e3.parentElement) return;
                const t2 = e3.getBoundingClientRect();
                if (t2.top === e3._positionTop) return;
                const n2 = e3._dropDownListPosition;
                this.checkBrowserBoundsVertically(t2), e3._dropDownListPosition !== n2 && this.positionDropDown(), e3._positionTop = t2.top;
              }
              getDropDownParent(e3) {
                const t2 = this.context, n2 = this.dropDown;
                let o2 = t2.dropDownAppendTo;
                t2._positionedParent = null, null === o2 ? t2._dropDownParent = null : "body" === o2 || o2 === document.body ? t2.getRootNode().host ? t2._dropDownParent = t2.getRootNode().host.shadowRoot : t2._dropDownParent = document.body : o2 instanceof HTMLElement ? t2._dropDownParent = o2 : "string" == typeof o2 ? (o2 = document.getElementById(o2), o2 instanceof HTMLElement ? t2._dropDownParent = o2 : (t2.dropDownAppendTo = null, t2._dropDownParent = null)) : (t2.dropDownAppendTo = null, t2._dropDownParent = null);
                let r3 = t2._dropDownParent;
                if (null !== r3) {
                  for (; r3 && r3 instanceof HTMLElement && "static" === window.getComputedStyle(r3).position && r3 !== t2.getShadowRootOrBody(); ) r3 = r3.parentElement;
                  r3 === document.body ? t2._positionedParent = null : t2._positionedParent = r3, n2 && (n2.setAttribute("animation", t2.animation), "" !== t2.theme && n2.$.addClass(t2.theme), e3 && (t2._dropDownParent.appendChild(n2), n2.$.addClass("smart-drop-down-repositioned")), -1 === t2.detachedChildren.indexOf(n2) && t2.detachedChildren.push(n2));
                }
              }
              dropDownAppendToChangedHandler() {
                const e3 = this.context, t2 = this.dropDown, n2 = e3._dropDownParent;
                this.getDropDownParent(), e3._dropDownParent !== n2 && (e3[this.closeMethod](), ["left", "top", "font-size", "font-family", "font-style", "font-weight"].forEach((e4) => t2.style[e4] = null), null === e3._dropDownParent ? (this.defaultParent.appendChild(t2), t2.$.removeClass("smart-drop-down-repositioned")) : (e3._dropDownParent.appendChild(t2), t2.$.addClass("smart-drop-down-repositioned")));
              }
              dropDownPositionChangedHandler() {
                const e3 = this;
                e3.dropDown.style.transition = "none", e3.context[e3.closeMethod](), e3.setDropDownPosition(), e3.handleAutoPositioning();
              }
              dropDownAttached(e3) {
                const t2 = this.context;
                null !== t2._dropDownParent && (t2._dropDownParent.appendChild(this.dropDown), this.handleAutoPositioning(), e3 && t2[e3]());
              }
              dropDownDetached() {
                const e3 = this.context;
                null !== e3._dropDownParent && document.body.contains(this.dropDown) && document.body.contains(e3._dropDownParent) && e3._dropDownParent.removeChild(this.dropDown);
              }
              setDropDownPosition() {
                const e3 = this.context, t2 = e3.dropDownPosition, n2 = e3._dropDownListPosition;
                "auto" === t2 ? this.checkBrowserBounds() : e3._dropDownListPosition = t2, this.updatePositionAttribute(n2, e3._dropDownListPosition);
              }
              updatePositionAttribute(e3, t2) {
                const n2 = this.context, o2 = this.dropDown;
                n2.$.dropDownButton && !n2.$.dropDownButton.hasAttribute(t2) && (n2.$.dropDownButton.removeAttribute(e3), n2.$.dropDownButton.setAttribute(t2, "")), o2.hasAttribute(t2) || (o2.style.transition = "none", o2.removeAttribute(e3), o2.setAttribute(t2, ""), requestAnimationFrame(function() {
                  o2.style.transition = null;
                }));
              }
              positionDropDown(e3) {
                const t2 = this.context, n2 = this.dropDown;
                if (!t2.opened || null === t2._dropDownParent) return;
                const o2 = t2.getBoundingClientRect();
                let r3, i2;
                if (this.customPositionDropDown) {
                  const e4 = this.customPositionDropDown(o2);
                  r3 = e4.left, i2 = e4.top;
                } else switch (r3 = o2.left, i2 = o2.top, t2._dropDownListPosition) {
                  case "bottom":
                    i2 += t2.$.container.offsetHeight - 1;
                    break;
                  case "center-bottom":
                    i2 += t2.$.container.offsetHeight - 1, r3 += t2.offsetWidth - n2.offsetWidth / 2;
                    break;
                  case "center-top":
                    i2 -= n2.offsetHeight - 1, r3 += t2.offsetWidth - n2.offsetWidth / 2;
                    break;
                  case "top":
                    i2 -= n2.offsetHeight - 1;
                    break;
                  case "overlay-bottom":
                    break;
                  case "overlay-center":
                    i2 -= n2.offsetHeight / 2 - t2.offsetHeight / 2;
                    break;
                  case "overlay-top":
                    i2 -= n2.offsetHeight - t2.offsetHeight;
                }
                const s2 = this.getDropDownOffset();
                n2.style.top = i2 + s2.y + "px", e3 || (n2.style.left = r3 + s2.x + "px");
              }
              getDropDownOffset() {
                const e3 = this.context._positionedParent;
                let t2, n2;
                if (e3 && "#document-fragment" !== e3.nodeName) {
                  const o2 = e3.getBoundingClientRect();
                  t2 = -o2.left, n2 = -o2.top;
                } else t2 = window.pageXOffset, n2 = window.pageYOffset;
                return { x: t2, y: n2 };
              }
              placeOverlay() {
                const e3 = this.context;
                if (!e3.dropDownOverlay || e3._overlay) return;
                const t2 = document.createElement("div");
                t2.classList.add("smart-drop-down-overlay"), t2.style.width = document.documentElement.scrollWidth + "px", t2.style.height = document.documentElement.scrollHeight + "px", document.body.appendChild(t2), e3._overlay = t2;
              }
              removeOverlay(e3) {
                const t2 = this, n2 = t2.context;
                n2._overlay && (n2.hasAnimation && e3 ? requestAnimationFrame(function e4() {
                  t2.dropDown.getBoundingClientRect().height > 0 ? requestAnimationFrame(e4) : (document.body.removeChild(n2._overlay), delete n2._overlay);
                }) : (document.body.removeChild(n2._overlay), delete n2._overlay));
              }
            }), window.Smart.Color = class {
              constructor(e3) {
                this.r = this.g = this.b = 0, this.hex = "";
                const t2 = this.getStandardizedColor(e3);
                t2 && this.setHex(t2.substring(1));
              }
              getStandardizedColor(e3) {
                const t2 = document.createElement("canvas").getContext("2d");
                return t2.fillStyle = e3, t2.fillStyle;
              }
              getInvertedColor() {
                return "" === this.hex ? "transparent" : 255 - (0.299 * this.r + 0.587 * this.g + 0.114 * this.b) < 105 ? "Black" : "White";
              }
              hexToRgb(e3) {
                let t2 = "00", n2 = "00", o2 = "00";
                return 6 === (e3 = this.validateHex(e3)).length ? (t2 = e3.substring(0, 2), n2 = e3.substring(2, 4), o2 = e3.substring(4, 6)) : (e3.length > 4 && (t2 = e3.substring(4, e3.length), e3 = e3.substring(0, 4)), e3.length > 2 && (n2 = e3.substring(2, e3.length), e3 = e3.substring(0, 2)), e3.length > 0 && (o2 = e3.substring(0, e3.length))), { r: this.hexToInt(t2), g: this.hexToInt(n2), b: this.hexToInt(o2) };
              }
              validateHex(e3) {
                return (e3 = (e3 = new String(e3).toUpperCase()).replace(/[^A-F0-9]/g, "0")).length > 6 && (e3 = e3.substring(0, 6)), e3;
              }
              webSafeDec(e3) {
                return e3 = Math.round(e3 / 51), e3 *= 51;
              }
              hexToWebSafe(e3) {
                let t2, n2, o2;
                return 3 === e3.length ? (t2 = e3.substring(0, 1), n2 = e3.substring(1, 1), o2 = e3.substring(2, 1)) : (t2 = e3.substring(0, 2), n2 = e3.substring(2, 4), o2 = e3.substring(4, 6)), this.intToHex(this.webSafeDec(this.hexToInt(t2))) + this.intToHex(this.webSafeDec(this.hexToInt(n2))) + this.intToHex(this.webSafeDec(this.hexToInt(o2)));
              }
              rgbToWebSafe(e3) {
                return { r: this.webSafeDec(e3.r), g: this.webSafeDec(e3.g), b: this.webSafeDec(e3.b) };
              }
              rgbToHex(e3) {
                return this.intToHex(e3.r) + this.intToHex(e3.g) + this.intToHex(e3.b);
              }
              intToHex(e3) {
                let t2 = parseInt(e3).toString(16);
                return 1 === t2.length && (t2 = "0" + t2), t2.toUpperCase();
              }
              hexToInt(e3) {
                return parseInt(e3, 16);
              }
              setRgb(e3, t2, n2) {
                let o2 = function(e4) {
                  return e4 < 0 || e4 > 255 || isNaN(parseInt(e4)) ? 0 : e4;
                };
                this.r = o2(e3), this.g = o2(t2), this.b = o2(n2), this.hex = this.rgbToHex(this);
              }
              setHex(e3) {
                this.hex = e3;
                let t2 = this.hexToRgb(this.hex);
                this.r = t2.r, this.g = t2.g, this.b = t2.b;
              }
            };
          }();
        }
      ),
      /***/
      5707: (
        /***/
        () => {
          Smart("smart-list-item", class extends Smart.ContentElement {
            static get properties() {
              return { alternationIndex: { value: -1, type: "int" }, color: { value: "", type: "string" }, displayMode: { allowedValues: ["plain", "checkBox", "radioButton"], value: "plain", type: "string" }, grouped: { value: false, type: "boolean" }, selected: { value: false, type: "boolean" }, value: { value: "", type: "string" }, label: { value: "", type: "string" }, details: { value: "", type: "string" }, group: { value: "", type: "string" }, hidden: { value: false, type: "boolean" }, readonly: { value: false, type: "boolean" } };
            }
            get hasStyleObserver() {
              return false;
            }
            get enableShadowDOM() {
              return false;
            }
            get _focused() {
              const e2 = this;
              return void 0 === e2.__focused && (e2.__focused = false), e2.__focused;
            }
            set _focused(e2) {
              const t = this;
              t.__focused = e2, e2 ? (t.setAttribute("focus", ""), t.ownerListBox && t.ownerListBox.ownerElement && Smart.ComboBox && t.ownerListBox.ownerElement instanceof Smart.ComboBox && t.ownerListBox.ownerElement.$.input.setAttribute("aria-activedescendant", t.id)) : t.removeAttribute("focus");
            }
            template() {
              return `<div id="container">
                   <span id='itemInput' class='smart-input smart-hidden'></span>
                    <span class="smart-overlay" id="overlay"></span>
                    <div id="itemContainer" class="smart-content smart-list-item-container"><span class="smart-content-label" inner-h-t-m-l='[[innerHTML]]' role="presentation"><content></content></span><span inner-h-t-m-l='[[details]]' id="details" class="smart-content-details"></span></div>
                </div>`;
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted || e2.classList && e2.classList.contains("smart-ripple")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              window.smartBlazor ? t.$.itemContainer.appendChild(e2) : (t.$.itemContainer.innerHTML = "", e2 instanceof HTMLElement && t.$.itemContainer.appendChild(e2));
            }
            insertBefore(e2, t) {
              const i = this;
              if (!i.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(i, e3.concat(Array.prototype.slice.call(arguments)));
              }
              t.parentNode.insertBefore(e2, t);
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted || e2.classList.contains("smart-ripple")) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof HTMLElement && t.$.itemContainer.removeChild(e2);
            }
            attached() {
              super.attached(), this.ownerListBox = this.getListBox();
            }
            static get listeners() {
              return { mouseenter: "_itemOnMouseEnter", mouseleave: "_itemOnMouseLeave" };
            }
            ready() {
              super.ready();
              const e2 = this;
              e2.setAttribute("role", "option"), "" !== e2.label ? e2.innerHTML = e2.label : "" !== e2.innerHTML && (e2.label = e2.innerHTML), e2._setDisplayMode(e2.displayMode), e2._setItemColor(), e2.$.container.noRipple = true;
              const t = e2.closest("smart-list-box");
              if (t && t.isRendered) {
                if (cancelAnimationFrame(Smart.ListBox.processTimer), t._inLazyInit || t._isUpdating) return;
                Smart.ListBox.processTimer = requestAnimationFrame(() => {
                  t._lazyInitItems();
                });
              }
            }
            propertyChangedHandler(e2, t, i) {
              const r2 = this;
              if (super.propertyChangedHandler(e2, t, i), "hidden" === e2) i ? r2.$.addClass("smart-hidden") : r2.$.removeClass("smart-hidden");
              else if ("color" === e2) r2._setItemColor();
              else if ("displayMode" === e2) r2._setDisplayMode(i);
              else if ("label" === e2 || "value" === e2) {
                const t2 = r2.context;
                r2.context = document, "label" === e2 && (r2.innerHTML = i);
                const o = r2.getListBox();
                o._applyTemplate(r2), o.onItemUpdated(r2), r2.context = t2;
              } else if ("details" === e2) {
                const e3 = r2.context;
                r2.context = document, r2.$.details.innerHTML = i, r2.getListBox().onItemUpdated(r2), r2.context = e3;
              } else if ("innerHTML" === e2) r2.getListBox().onItemUpdated(r2);
              else if ("selected" === e2) if (i) r2.setAttribute("aria-selected", true);
              else {
                const e3 = r2.getListBox();
                r2.readonly || r2.disabled || !e3 || -1 === ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox"].indexOf(e3.selectionMode) ? r2.removeAttribute("aria-selected") : r2.setAttribute("aria-selected", false);
              }
            }
            getListBox() {
              const e2 = this;
              if (!Smart.ListBox) return e2.getRootNode().host;
              let t = e2.parentNode;
              for (; t instanceof Smart.ListBox == 0 && null !== t; ) t = t.parentNode;
              return !t && Smart.EnableShadowDOM ? e2.getRootNode().host : t;
            }
            _itemOnMouseEnter() {
              const e2 = this;
              !e2.disabled && e2.ownerListBox && (Smart.ListBox.DragDrop.Dragging && e2.ownerListBox.allowDrop && (Smart.ListBox.DragDrop.DropDetails = { item: e2, position: "bottom" }), e2.ownerListBox.$.verticalScrollBar.thumbCapture || e2.ownerListBox.$.horizontalScrollBar.thumbCapture || e2.setAttribute("hover", ""));
            }
            _itemOnMouseMove(e2) {
              const t = this;
              if (t.ownerListBox && Smart.ListBox.DragDrop.Dragging && t.ownerListBox.allowDrop && !Smart.Utilities.Core.isMobile) {
                const i = [].slice.call(t.ownerListBox.getElementsByClassName("smart-list-item-bottom-line-feedback"));
                for (let e3 = 0; e3 < i.length; e3++) i[e3].$.removeClass("smart-list-item-line-feedback"), i[e3].$.removeClass("smart-list-item-bottom-line-feedback");
                if (Smart.ListBox.DragDrop.DropDetails = { item: t, position: "top" }, !t.ownerListBox._areCSSVarsSupported) {
                  if (t.ownerListBox._indexOf(t) === t.ownerListBox._items.length - 1 || t.parentNode.lastElementChild === t) {
                    const i2 = t.getBoundingClientRect();
                    e2.pageY - window.pageYOffset > i2.top + i2.height / 2 - 1 && (Smart.ListBox.DragDrop.DropDetails = { item: t, position: "bottom" });
                  }
                  return;
                }
                if (t.$.removeClass("smart-list-item-line-feedback"), t.$.removeClass("smart-list-item-bottom-line-feedback"), t.ownerListBox.sorted && t.ownerListBox.autoSort) return;
                const r2 = t.ownerListBox._items.filter((e3) => !e3.hidden);
                if (r2.indexOf(t) === r2.length - 1 || t.parentNode.lastElementChild === t) {
                  const i2 = t.getBoundingClientRect();
                  e2.pageY - window.pageYOffset > i2.top + i2.height / 2 - 1 ? (t.$.addClass("smart-list-item-bottom-line-feedback"), Smart.ListBox.DragDrop.DropDetails = { item: t, position: "bottom" }) : arguments[1] || t.$.addClass("smart-list-item-line-feedback");
                } else arguments[1] || t.$.addClass("smart-list-item-line-feedback");
              }
            }
            _itemOnMouseLeave() {
              const e2 = this;
              e2.ownerListBox && (Smart.ListBox.DragDrop.Dragging && (e2.$.removeClass("smart-list-item-line-feedback"), e2.$.removeClass("smart-list-item-bottom-line-feedback")), e2.removeAttribute("hover"));
            }
            _setDisplayMode(e2) {
              const t = this, i = t.getListBox();
              if (i) {
                const r2 = "checkBox" === i.selectionMode || "radioButton" === i.selectionMode ? i.selectionMode : "plain";
                t.displayMode = e2 = r2;
              }
              "plain" !== e2 ? t.$itemInput.removeClass("smart-hidden") : t.$itemInput.addClass("smart-hidden");
            }
            _setItemColor() {
              const e2 = this, t = e2.querySelector(".smart-content-label"), i = /(^#[0-9A-F]{3}$)|(^#[0-9A-F]{6}$)|(^#[0-9A-F]{8}$)/i.test(e2.color) ? e2.color : "";
              t.style.backgroundColor = i, t.style.color = e2._getContrastColor(i);
            }
            _getContrastColor(e2) {
              if (!e2) return "";
              let t = (i = e2.slice(1, 3), r2 = e2.slice(3, 5), o = e2.slice(5, 7), [parseInt(i, 16), parseInt(r2, 16), parseInt(o, 16)]);
              var i, r2, o;
              return parseFloat(((0.299 * t[0] + 0.61 * t[1] + 0.114 * t[2]) / 255).toFixed(2)) > 0.65 ? "#000000" : "#FFFFFF";
            }
          }), Smart("smart-list-items-group", class extends Smart.ContentElement {
            static get properties() {
              return { label: { value: "", type: "string" } };
            }
            get enableShadowDOM() {
              return false;
            }
            template() {
              return `<div id="container" role="presentation">
                 <span id="itemsLabel" class="smart-list-items-group-label">[[label]]</span>
                 <div id="listItemsGroupContainer" inner-h-t-m-l='[[innerHTML]]' class="smart-list-items-group-container" role="presentation">
                    <content></content>
                 </div>
               </div>`;
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof HTMLElement && t.$.listItemsGroupContainer.appendChild(e2);
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 instanceof HTMLElement && t.$.listItemsGroupContainer.removeChild(e2);
            }
            getListBox() {
              let e2 = this.parentNode;
              for (; e2 instanceof Smart.ListBox == 0 && null !== e2; ) e2 = e2.parentNode;
              return e2;
            }
            attached() {
              const e2 = this;
              super.attached(), e2.ownerListBox || (e2.ownerListBox = e2.getListBox()), e2.setAttribute("role", "group"), e2.$.itemsLabel.id || (e2.$.itemsLabel.id = e2.id + "Label"), e2.setAttribute("aria-labelledby", e2.$.itemsLabel.id);
            }
          }), Smart("smart-list-box", class extends Smart.ScrollViewer {
            static get properties() {
              return { allowDrag: { value: false, type: "boolean" }, allowDrop: { value: false, type: "boolean" }, alternationStart: { value: 0, type: "int" }, alternationEnd: { value: 0, type: "int" }, alternationCount: { value: 0, type: "int" }, autoSort: { value: true, type: "boolean" }, dataSource: { value: null, type: "any?", reflectToAttribute: false }, dragFeedbackFormatFunction: { value: null, type: "function?" }, dragOffset: { value: [10, 10], type: "array" }, displayLoadingIndicator: { value: false, type: "boolean" }, displayMember: { value: "", type: "string" }, shadowDomMode: { allowedValues: ["light", "shadow"], value: "shadow", type: "string" }, dropAction: { value: "move", type: "string", allowedValues: ["copy", "move", "none"] }, editable: { value: false, type: "boolean" }, filterable: { value: false, type: "boolean" }, filterCallback: { value: null, type: "function?" }, filterMode: { value: "containsIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase", "custom"], type: "string" }, filterInputPlaceholder: { value: "", type: "string" }, grouped: { value: false, type: "boolean" }, groupMember: { value: "", type: "string" }, itemTemplate: { value: null, type: "any" }, itemHeight: { value: null, type: "number?" }, incrementalSearchDelay: { value: 700, type: "number?" }, incrementalSearchMode: { value: "startsWithIgnoreCase", allowedValues: ["contains", "containsIgnoreCase", "doesNotContain", "doesNotContainIgnoreCase", "equals", "equalsIgnoreCase", "startsWith", "startsWithIgnoreCase", "endsWith", "endsWithIgnoreCase"], type: "string" }, itemMeasureMode: { value: "auto", allowedValues: ["auto", "precise"], type: "string" }, loadingIndicatorPlaceholder: { value: "Loading...", type: "string" }, loadingIndicatorPosition: { value: "center", allowedValues: ["bottom", "center", "top"], type: "string" }, messages: { extend: true, value: { en: { overridingProperties: '{{elementType}}: Overriding properties {{property1}} and {{property2}} applied. The "{{property1}}" property is used by default.', invalidIndex: '{{elementType}}: "{{method}}" method accepts an index of type number or an Array of numbers.', indexOutOfBound: '{{elementType}}: Out of bound index/indexes in "{{method}}" method.', invalidItem: `{{elementType}}: "{{method}}" method accepts an object or an array of objects as it's second parameter.`, invalidSettings: `{{elementType}}: "{{method}}" method accepts a string or an object as it's second parameter.` } }, type: "object" }, name: { value: "", type: "string" }, placeholder: { value: "No Items", type: "string" }, selectedIndexes: { value: [], type: "array" }, selectedValues: { value: [], type: "array" }, selectionMode: { value: "oneOrManyExtended", allowedValues: ["none", "oneOrManyExtended", "zeroOrMany", "oneOrMany", "zeroOrOne", "zeroAndOne", "one", "checkBox", "radioButton"], type: "string" }, selectionChangeAction: { value: "release", allowedValues: ["press", "release"], type: "string" }, sorted: { value: false, type: "boolean" }, sortDirection: { value: "asc", type: "string" }, topVisibleIndex: { value: -1, type: "int" }, type: { value: "list", type: "string", defaultReflectToAttribute: true, readonly: true }, valueMember: { value: "", type: "string" }, virtualized: { value: false, type: "boolean" } };
            }
            static get requires() {
              return { "Smart.ScrollBar": "smart.scrollbar.js" };
            }
            static get styleUrls() {
              return ["smart.listbox.css", "smart.dropdown.css", "smart.scrollbar.css"];
            }
            static get listeners() {
              return { focus: "_focusHandler", blur: "_blurHandler", "container.wheel": "_mouseWheelHandler", "editInput.change": "_editInputEventHandler", "editInput.blur": "_editInputEventHandler", "editInput.keydown": "_editInputEventHandler", "horizontalScrollBar.change": "_horizontalScrollbarHandler", "itemsInnerContainer.down": "_downHandler", "itemsInnerContainer.dblclick": "_dblclickEventHandler", "itemsInnerContainer.move": "_itemsContainerMoveHandler", "itemsContainer.mouseleave": "_mouseLeaveHandler", "itemsInnerContainer.touchmove": "_touchmoveHandler", "itemsInnerContainer.touchstart": "_touchstartHandler", "document.move": "_moveHandler", keydown: "_keyDownHandler", keyup: "_keyUpHandler", resize: "_resizeHandler", selectstart: "_selectStartHandler", styleChanged: "_styleChangedHandler", swipeleft: "_swipeLeftHandler", swiperight: "_swipeRightHandler", touchmove: "_overriddenHandler", touchstart: "_overriddenHandler", "verticalScrollBar.change": "_verticalScrollbarHandler" };
            }
            template() {
              return `<div id="container" class="smart-container" role="presentation">
                    <div class="smart-list-box-filter-input-container smart-hidden" id="filterInputContainer" role="presentation"><input id="filterInput" disabled="[[disabled]]" placeholder='[[filterInputPlaceholder]]' role="searchbox" aria-label="[[filterInputPlaceholder]]"></div>
                    <div id="itemsContainer" class="smart-list-items-container" role="presentation">
                        <div id="placeholder" class="smart-placeholder" role="presentation" aria-hidden="true">[[placeholder]]</div>
                        <div id="itemsInnerContainer" inner-h-t-m-l='[[innerHTML]]' class="smart-list-items-inner-container" role="presentation">
                            <content></content>
                        </div>
                        <input type="text" id="editInput" class= "smart-hidden"/>
                    </div>
                    <smart-scroll-bar wait theme="[[theme]]" right-to-left="[[rightToLeft]]" id="verticalScrollBar" disabled="[[disabled]]" orientation="vertical"></smart-scroll-bar>
                    <smart-scroll-bar wait theme="[[theme]]" right-to-left="[[rightToLeft]]" id="horizontalScrollBar" disabled="[[disabled]]"></smart-scroll-bar>
                    <div id="loadingIndicatorContainer" class="smart-loader-container" role="presentation">
                        <span id="loadingIndicator" class="smart-loader" role="img" aria-label="[[loadingIndicatorPlaceholder]]"></span>
                        <span id="loadingIndicatorPlaceHolder" class="smart-loader-label smart-hidden">[[loadingIndicatorPlaceholder]]</span>
                    </div>
                    <input id="hiddenInput" type="hidden" name="[[name]]">
                </div>`;
            }
            get value() {
              const e2 = this;
              return e2.isRendered && e2._selectedItems.length > 0 ? e2._selectedItems.map((e3) => ({ label: e3.label, value: e3.value })) : null;
            }
            set value(e2) {
              const t = this;
              if (Array.isArray(e2)) {
                const i2 = t.context;
                t.context = t, t._isUpdating++, t.selectedValues = [], t.clearSelection();
                for (let i3 = 0; i3 < e2.length; i3++) {
                  const r2 = e2[i3], o = t.getItem(r2);
                  o && ("oneOrManyExtended" === t.selectionMode ? t._select(o) : t.select(o));
                }
                return t.context = i2, void t._isUpdating--;
              }
              const i = t.getItem(e2);
              i && t.select(i);
            }
            get _selectedItems() {
              const e2 = this, t = [];
              if (e2.isRendered) for (let i = 0; i < e2._items.length; i++) {
                const r2 = e2._items[i];
                r2.selected && t.push(r2);
              }
              return t;
            }
            _mouseLeaveHandler() {
              const e2 = [].slice.call(this.getElementsByClassName("smart-list-item-bottom-line-feedback"));
              for (let t = 0; t < e2.length; t++) e2[t].$.removeClass("smart-list-item-line-feedback"), e2[t].$.removeClass("smart-list-item-bottom-line-feedback");
            }
            _downHandler(e2) {
              const t = this;
              if (t.disabled || t.displayLoadingIndicator || t.readonly) return;
              let i = e2.originalEvent.target, r2 = null;
              if (!(i instanceof Smart.ListItem) || i.disabled || i.hidden || i instanceof Smart.ListItemsGroup) for (; i.parentElement; ) {
                if (i instanceof Smart.ListItem && !i.disabled && !i.hidden && !(i instanceof Smart.ListItemsGroup)) {
                  r2 = i.dataItem;
                  break;
                }
                i = i.parentElement;
              }
              else r2 = i.dataItem;
              Smart.ListBox.DragDrop.StartTime = /* @__PURE__ */ new Date(), Smart.ListBox.DragDrop.StartPosition = { left: e2.pageX, top: e2.pageY }, r2 && (e2.stopPropagation(), t.hasRippleAnimation && (r2.readonly || r2.disabled || Smart.Utilities.Animation.Ripple.animate(i.$.overlay, e2.pageX, e2.pageY)), Smart.Utilities.Core.isMobile || "press" !== t.selectionChangeAction || (t._focus(r2), t.select(r2)), !Smart.ListBox.DragDrop.Feedback && t.allowDrag && (Smart.ListBox.DragDrop.DraggedFrom = t, Smart.ListBox.DragDrop.Feedback = document.createElement("span"), t.rightToLeft ? Smart.ListBox.DragDrop.Feedback.setAttribute("right-to-left", true) : Smart.ListBox.DragDrop.Feedback.removeAttribute("right-to-left"), t.dragFeedbackFormatFunction ? Smart.ListBox.DragDrop.Feedback.innerHTML = t.dragFeedbackFormatFunction(r2) : Smart.ListBox.DragDrop.Feedback.appendChild(r2.offsetHeight ? r2.cloneNode(true) : t._createItem(r2)), Smart.ListBox.DragDrop.Item = r2, Smart.Utilities.Extend(Smart.ListBox.DragDrop.Feedback).addClass("smart-popup smart-list-item smart-list-item-feedback")));
            }
            _dblclickEventHandler(e2) {
              const t = this;
              if (!t.editable) return;
              const i = e2.target.closest("smart-list-item");
              i instanceof Smart.ListItem && !i.disabled && !i.readonly ? (t.$.editInput.dir = t.rightToLeft ? "rtl" : "ltr", t.$.editInput.style.width = t.$.itemsInnerContainer.offsetWidth + "px", t.$.editInput.owner = i, t.$.editInput.value = i.label, t.$.editInput.style.height = i.offsetHeight + "px", t.$.editInput.style.top = i.offsetTop + t.$.itemsInnerContainer.offsetTop + "px", t.$.editInput.setAttribute("aria-label", "Edit item " + i.label), t.$editInput.hasClass("smart-hidden") && t.$editInput.removeClass("smart-hidden"), t.$.editInput.focus({ preventScroll: true })) : t.$editInput.addClass("smart-hidden");
            }
            _editInputEventHandler(e2) {
              const t = this;
              if ("blur" === e2.type || "keydown" === e2.type && "Escape" === e2.key) return t.$editInput.hasClass("smart-hidden") || t.$editInput.addClass("smart-hidden"), void t.focus();
              if ("keydown" === e2.type || t.$editInput.hasClass("smart-hidden")) return;
              const i = e2.target;
              if (e2.stopPropagation(), i.owner.label !== i.value && (i.owner.label = i.value, t.itemTemplate && t._applyTemplate(i.owner), t.dataSource)) {
                const e3 = i.owner.dataIndex, r2 = t.dataSource[e3];
                r2 && (t.displayMember ? r2[t.displayMember] = i.value : r2.label = i.value);
              }
              t.$editInput.addClass("smart-hidden"), t.$.fireEvent("itemLabelChange", { selected: i.owner.selected, disabled: i.owner.disabled, index: t._indexOf(i.owner), label: i.owner.label, value: i.owner.value });
            }
            _pointerUpHandler(e2) {
              const t = this;
              let i = e2.originalEvent, r2 = i.target;
              (t.shadowRoot || t.isInShadowDOM) && (r2 = i.originalEvent ? i.originalEvent.composedPath()[0] : i.composedPath()[0]);
              const o = (e3) => {
                const i2 = e3.ownerListBox;
                i2.disabled || i2 !== t || i2.displayLoadingIndicator || "none" === i2.selectionMode || e3.grouped || e3.readonly || (i2._focus(e3), i2.select(e3), Smart.ListBox.DragDrop.StartPosition = null, t.$.fireEvent("itemClick", { selected: r2.selected, disabled: r2.disabled, index: t._indexOf(r2), label: r2.label, value: r2.value }));
              };
              if (!(i.target instanceof Smart.ListItem) || i.target.disabled || i.target instanceof Smart.ListItemsGroup) {
                for (; r2.parentElement; ) {
                  if (r2 instanceof Smart.ListItem && !r2.disabled && !(r2 instanceof Smart.ListItemsGroup)) return void o(r2.dataItem);
                  r2 = r2.parentElement;
                }
                if (this.shadowRoot && "shadow" === this.shadowDomMode) {
                  const e3 = i.composedPath();
                  for (let t2 = 0; t2 < e3.length; t2++) {
                    const i2 = e3[t2];
                    i2 instanceof Smart.ListItem && !i2.disabled && o(i2.dataItem);
                  }
                }
              } else o(r2.dataItem);
            }
            _upHandler(e2) {
              const t = this;
              if (super._upHandler(), !t.disabled && !t.readonly && Smart.ListBox.DragDrop.StartPosition) {
                if (Smart.Utilities.Core.isMobile && !Smart.ListBox.DragDrop.Dragging) {
                  const i = Math.abs(e2.pageX - Smart.ListBox.DragDrop.StartPosition.left), r2 = Math.abs(e2.pageY - Smart.ListBox.DragDrop.StartPosition.top);
                  let o = i >= 0 && i <= 3 && r2 >= 0 && r2 <= 3;
                  if (Smart.Utilities.Core.isMobile && /* @__PURE__ */ new Date() - Smart.ListBox.DragDrop.StartTime >= 300 && (o = false, Smart.ListBox.DragDrop.StartTime = null), o) {
                    const i2 = e2.originalEvent.target.closest("smart-list-box");
                    i2 ? i2._pointerUpHandler(e2) : t._pointerUpHandler(e2), Smart.ListBox.DragDrop.StartPosition = null;
                  } else {
                    let t2 = e2.originalEvent.target;
                    if (!(e2.target instanceof Smart.ListItem) || t2.readonly || e2.target.disabled || e2.target instanceof Smart.ListItemsGroup) for (; t2.parentElement; ) {
                      if (t2 instanceof Smart.ListItem && !t2.readonly && !t2.disabled && !(t2 instanceof Smart.ListItemsGroup)) {
                        e2.stopPropagation();
                        break;
                      }
                      t2 = t2.parentElement;
                    }
                    else e2.stopPropagation();
                  }
                } else if (!Smart.Utilities.Core.isMobile && !Smart.ListBox.DragDrop.Dragging && "release" === t.selectionChangeAction) {
                  const i = (t.shadowRoot || t.isInShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target).closest("smart-list-box");
                  i ? i._pointerUpHandler(e2) : t._pointerUpHandler(e2);
                }
                if (Smart.ListBox.DragDrop.Feedback) {
                  let i;
                  if (Smart.ListBox.DragDrop.Feedback.parentNode && Smart.ListBox.DragDrop.Feedback.parentNode.removeChild(Smart.ListBox.DragDrop.Feedback), Smart.ListBox.DragDrop.Feedback = null, Smart.Utilities.Core.isMobile && Smart.ListBox.DragDrop.Dragging) for (let t2 = 0; t2 < Smart.ListBox.DragDrop.ListBoxes.length; t2++) {
                    const r2 = Smart.ListBox.DragDrop.ListBoxes[t2], o = r2.getBoundingClientRect();
                    if (r2.allowDrop && !r2.closest(".smart-visibility-hidden") && o.left <= e2.clientX && e2.clientX <= o.left + o.width && o.top <= e2.clientY && e2.clientY <= o.top + o.height) {
                      i = r2;
                      const t3 = r2._items.filter((e3) => !e3.hidden);
                      for (let i2 = 0; i2 < t3.length; i2++) {
                        const s = t3[i2], n = s.getBoundingClientRect();
                        if ((t3.indexOf(s) === t3.length - 1 || s.parentNode.lastElementChild === s) && e2.clientY >= o.top + s.offsetTop - r2.scrollTop + n.height / 2 && e2.clientY <= o.top - r2.scrollTop + s.offsetTop + n.height) {
                          Smart.ListBox.DragDrop.DropDetails = { item: s, position: "bottom" };
                          break;
                        }
                        if (e2.clientY >= o.top + s.offsetTop - r2.scrollTop && e2.clientY <= o.top + s.offsetTop + n.height - r2.scrollTop) {
                          Smart.ListBox.DragDrop.DropDetails = { item: s, position: "top" };
                          break;
                        }
                      }
                    }
                  }
                  if (Smart.ListBox.DragDrop.Dragging) {
                    if (Smart.ListBox.DragDrop.DropDetails) {
                      let r2 = Smart.ListBox.DragDrop.DropDetails.item, o = Smart.ListBox.DragDrop.Item;
                      const s = o.ownerListBox;
                      let n = e2.originalEvent.target;
                      if (t.isInShadowDOM && (n = e2.originalEvent ? e2.originalEvent.composedPath()[0] : e2.composedPath()[0]), i = !i && n.closest ? n.closest("smart-list-box") : i, document.body.classList.remove("smart-dragging"), r2.$.removeClass("smart-list-item-line-feedback"), r2.$.removeClass("smart-list-item-bottom-line-feedback"), i && r2.ownerListBox !== i && i.items.length > 0 && (r2 = i.items[i.items.length - 1]), Smart.ListBox.DragDrop.Item === r2 || i !== r2.ownerListBox && !Smart.Utilities.Core.isMobile) i && 0 === i._items.length && "none" !== i.dropAction && ("move" === i.dropAction ? Smart.ListBox.DragDrop.Item.ownerListBox.removeChild(Smart.ListBox.DragDrop.Item) : "copy" === i.dropAction && (o = o.cloneNode(true)), i.appendChild(o));
                      else if ("none" !== o.ownerListBox.dropAction) {
                        r2.ownerListBox !== o.ownerListBox && "move" === o.ownerListBox.dropAction && Smart.ListBox.DragDrop.Item.ownerListBox.removeChild(Smart.ListBox.DragDrop.Item), "copy" === o.ownerListBox.dropAction && (o = o.cloneNode(true)), Smart.ListBox.DragDrop.Item.group = r2.group;
                        const e3 = r2.ownerListBox;
                        "checkBox" !== e3.selectionMode && "radioButton" !== e3.selectionMode && e3.clearSelection(), "top" === Smart.ListBox.DragDrop.DropDetails.position ? e3.insertBefore(o, r2) : r2.parentNode.lastElementChild === r2 ? e3.appendChild(o) : e3.appendChild(o, r2), e3.ensureVisible(o), "checkBox" === e3.selectionMode || "radioButton" === e3.selectionMode ? (e3._focus(o), e3._refreshSelection()) : (e3.clearSelection(), e3.select(o));
                      }
                      o.selected && i !== s && s._refreshSelection();
                      const l = Smart.ListBox.DragDrop.Item, a2 = l.ownerListBox;
                      l.displayMode = "checkBox" === a2.selectionMode || "radioButton" === a2.selectionMode ? a2.selectionMode : "plain", a2.$.fireEvent("dragEnd", { item: l, target: r2, data: Smart.ListBox.DragDrop, previousContainer: s, container: i, originalEvent: e2 }), a2._focus(l);
                    } else {
                      const t2 = Smart.ListBox.DragDrop.Item, i2 = t2.ownerListBox;
                      t2.displayMode = "checkBox" === i2.selectionMode || "radioButton" === i2.selectionMode ? i2.selectionMode : "plain", document.body.classList.remove("smart-dragging"), i2.$.fireEvent("dragEnd", { item: t2, target: null, data: Smart.ListBox.DragDrop, previousContainer: i2, container: i2, originalEvent: e2 }), i2._focus(t2);
                    }
                    e2.preventDefault();
                  }
                  delete Smart.ListBox.DragDrop.DraggedFrom, Smart.ListBox.DragDrop.Dragging = false, Smart.ListBox.DragDrop.Item = null, Smart.ListBox.DragDrop.DropDetails = null;
                }
                for (let e3 = 0; e3 < Smart.ListBox.DragDrop.ListBoxes.length; e3++) {
                  const t2 = Smart.ListBox.DragDrop.ListBoxes[e3];
                  t2._dragInterval && clearInterval(t2._dragInterval);
                }
              }
            }
            _itemsContainerMoveHandler(e2) {
              const t = this;
              if (Smart.ListBox.DragDrop.Dragging) return t._applyItemFeedback(e2), t._moveHandler(e2), e2.originalEvent.preventDefault(), e2.originalEvent.stopPropagation(), false;
            }
            _touchmoveHandler(e2) {
              if (Smart.ListBox.DragDrop.Dragging && e2.cancelable) return e2.preventDefault(), void e2.stopPropagation();
              super._touchmoveHandler(e2);
            }
            _applyItemFeedback(e2) {
              const t = this, i = e2.originalEvent.target, r2 = i.closest ? i.closest("smart-list-item") : i;
              Smart.Utilities.Core.isMobile ? Smart.ListBox.DragDrop.DropDetails = { item: Smart.ListBox.DragDrop.Item, position: "bottom" } : 0 !== t.items.length && (r2 ? r2._itemOnMouseMove(e2) : t.items[t.items.length - 1]._itemOnMouseMove(e2, true));
            }
            _moveHandler(e2) {
              const t = this;
              if (!Smart.ListBox.DragDrop.Feedback || Smart.ListBox.DragDrop.DraggedFrom !== t) return;
              const i = t.dragOffset;
              if (Smart.ListBox.DragDrop.Dragging) {
                Smart.ListBox.DragDrop.Feedback.style.left = i[0] + e2.pageX + "px", Smart.ListBox.DragDrop.Feedback.style.top = i[1] + e2.pageY + "px", t.$.fireEvent("dragging", { item: Smart.ListBox.DragDrop.Item, data: Smart.ListBox.DragDrop, originalEvent: e2.originalEvent });
                for (let t2 = 0; t2 < Smart.ListBox.DragDrop.ListBoxes.length; t2++) {
                  const i2 = Smart.ListBox.DragDrop.ListBoxes[t2];
                  i2._dragInterval && clearInterval(i2._dragInterval), i2._dragInterval = setInterval(function() {
                    const t3 = i2.getBoundingClientRect();
                    t3.left <= e2.clientX && t3.left + t3.width >= e2.clientX && (e2.clientY >= t3.top && e2.clientY <= t3.top + 20 ? i2.scrollTop -= 2 : e2.clientY >= t3.top + t3.height - 20 && e2.clientY <= t3.top + t3.height && (i2.scrollTop += 2));
                  }, 1);
                }
                return e2.preventDefault(), e2.stopPropagation(), e2.originalEvent.preventDefault(), e2.originalEvent.stopPropagation(), false;
              }
              {
                const r2 = Math.abs(e2.pageX - Smart.ListBox.DragDrop.StartPosition.left), o = Math.abs(e2.pageY - Smart.ListBox.DragDrop.StartPosition.top), s = /* @__PURE__ */ new Date() - Smart.ListBox.DragDrop.StartTime;
                let n = r2 >= 5 && r2 <= 15 || o >= 5 && o <= 15;
                if (Smart.Utilities.Core.isMobile && (s < 300 || s > 1e3) && (n = false), n) {
                  Smart.ListBox.DragDrop.Dragging = true, Smart.ListBox.DragDrop.Feedback.style.left = i[0] + e2.pageX + "px", Smart.ListBox.DragDrop.Feedback.style.top = i[1] + e2.pageY + "px", t.getShadowRootOrBody().appendChild(Smart.ListBox.DragDrop.Feedback), e2.preventDefault(), e2.stopPropagation(), e2.originalEvent.preventDefault(), e2.originalEvent.stopPropagation();
                  const r3 = Smart.ListBox.DragDrop.Item, o2 = r3.ownerListBox;
                  o2.$.fireEvent("dragStart", { item: r3, data: Smart.ListBox.DragDrop, container: o2, previousContainer: o2, originalEvent: e2.originalEvent }), document.body.classList.add("smart-dragging");
                }
              }
            }
            _focusHandler() {
              this._focused = true, this.setAttribute("focus", "");
            }
            _blurHandler() {
              this._focused = false, this.removeAttribute("focus");
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              t.isVirtualized ? (t._items.indexOf(e2) > -1 && t._items.splice(t._items.indexOf(e2), 1), t._items.push(e2)) : (e2.dataItem = e2, t.shadowRoot && "light" === t.shadowDomMode ? t.appendChild(e2) : t.$.itemsInnerContainer.appendChild(e2), t._items.indexOf(e2) > -1 && t._items.splice(t._items.indexOf(e2), 1), t._items.push(e2)), t._refreshItems(), t._refreshSelection();
            }
            insertBefore(e2, t) {
              const i = this;
              if (!i.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(i, e3.concat(Array.prototype.slice.call(arguments)));
              }
              i.isVirtualized ? (i._items.indexOf(e2) > -1 && i._items.splice(i._items.indexOf(e2), 1), i._items.splice(i._indexOf(t), 0, e2)) : (e2.dataItem = e2, t.parentNode.insertBefore(e2, t), i._items.indexOf(e2) > -1 && i._items.splice(i._items.indexOf(e2), 1), i._items.splice(i._indexOf(t), 0, e2)), i._refreshItems(), i._refreshSelection();
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.removeChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              if (t.isVirtualized) t._items.splice(t._indexOf(e2), 1);
              else if (e2.parentNode) {
                const i = t.selectedIndexes.slice(0), r2 = t.selectedValues.slice(0), o = i.indexOf(e2.dataIndex);
                e2.parentNode.removeChild(e2), o > -1 && (i.splice(o, 1), r2.splice(o, 1), t.selectedIndexes = i, t.selectedValues = r2);
              }
              t._refreshItems();
            }
            propertyChangedHandler(e2, t, i) {
              if ("dataSource" === e2 && (!i || i && Array.isArray(i) && 0 === i.length)) return void this.clearItems();
              super.propertyChangedHandler(e2, t, i);
              const r2 = this;
              switch (e2) {
                case "innerHTML":
                  r2.clearSelection(), r2._dataBind(), r2.innerHTML = r2.content = Smart.Utilities.Core.html(r2.$.content);
                  break;
                case "dataSource":
                case "valueMember":
                case "groupMember":
                case "displayMember":
                  r2.clearSelection(), r2._dataBind(), r2._applyDefaultSelection();
                  break;
                case "disabled":
                case "unfocusable":
                  r2._setFocusable();
                  break;
                case "displayLoadingIndicator":
                  r2._setLoadingIndicatorVisibility();
                  break;
                case "filterable":
                  r2._refreshFilter(), r2._refreshLayout();
                  break;
                case "grouped":
                  if (i ? r2._group() : r2._ungroup(), "radioButton" === r2.selectionMode) {
                    if (r2.selectedValues.length > 0) {
                      const e3 = r2.selectedValues;
                      r2.clearSelection(), r2.select(e3[0]);
                    }
                  } else r2._refreshSelection();
                  r2._refreshLayout();
                  break;
                case "itemTemplate": {
                  if (null === i || "" === i) return r2._items.map((e4) => e4.innerHTML = e4.label), delete r2._bindingDetails, void r2._refreshLayout();
                  const e3 = r2.querySelectorAll("smart-list-item"), t2 = function() {
                    r2._handleItemTemplate(i) && (r2._items.map((e4) => r2._applyTemplate(e4)), r2._refreshLayout()), r2.ownerElement && r2.ownerElement._setDropDownSize && r2.ownerElement._setDropDownSize(), r2.$.fireEvent("bindingComplete");
                  };
                  0 === e3.length ? t2() : r2._ensureItemsReady(e3, t2);
                  break;
                }
                case "selectedIndexes":
                case "selectedValues": {
                  let o = r2.selectedIndexes.slice(0), s = r2.selectedValues.slice(0);
                  if (!r2._items || 0 === r2._items.length) return r2.selectedIndexes = [], r2.selectedValues = [], void (r2.$.hiddenInput.value = r2.selectedValues.toString());
                  if (r2._propertyChanging = true, "selectedIndexes" === e2) {
                    o = t.slice(0), r2.clearSelection();
                    for (let e3 = 0; e3 < i.length; e3++) {
                      const t2 = i[e3], o2 = r2._items[t2];
                      o2 && ("oneOrManyExtended" === r2.selectionMode || "oneOrMany" === r2.selectionMode ? (r2.selectedIndexes.length > 0 && 0 === e3 && r2.clearSelection(), r2._select(o2)) : r2.select(o2));
                    }
                  } else {
                    s = t.slice(0), r2.selectedValues = [], r2.clearSelection();
                    for (let e3 = 0; e3 < i.length; e3++) {
                      const t2 = i[e3], o2 = r2.getItem(t2);
                      o2 && ("oneOrManyExtended" === r2.selectionMode ? r2._select(o2) : r2.select(o2));
                    }
                  }
                  if (r2.selectedIndexes.length > 0 && r2._focus(r2._items[r2.selectedIndexes[0]]), r2._propertyChanging = false, JSON.stringify(s) !== JSON.stringify(r2.selectedValues.slice(0))) {
                    let e3 = [], t2 = [];
                    for (let e4 = 0; e4 < o.length; e4++) r2.selectedIndexes.indexOf(o[e4]) < 0 && t2.push(r2._items[o[e4]]);
                    for (let t3 = 0; t3 < r2.selectedIndexes.length; t3++) o.indexOf(r2.selectedIndexes[t3]) < 0 && e3.push(r2._items[r2.selectedIndexes[t3]]);
                    let i2 = { addedItems: e3, removedItems: t2 };
                    if (r2.selectedIndexes.length > 0) {
                      const e4 = r2._items[r2.selectedIndexes[r2.selectedIndexes.length - 1]];
                      void 0 !== e4 && (i2.selected = e4.selected, i2.disabled = e4.disabled, i2.index = r2._indexOf(e4), i2.label = e4.label, i2.value = e4.value);
                    } else i2.selected = false, i2.disabled = false, i2.index = -1, i2.label = "", i2.value = "";
                    r2.$.fireEvent("change", i2);
                  }
                  break;
                }
                case "selectionMode": {
                  const e3 = "checkBox" === r2.selectionMode || "radioButton" === r2.selectionMode ? r2.selectionMode : "plain", o = r2.selectedIndexes.slice(0), s = r2.selectedValues.slice(0);
                  r2._propertyChanging = true;
                  const n = r2.selectedValues;
                  r2.setAttribute("aria-multiselectable", -1 !== ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox", "radioButton"].indexOf(i)), r2.selectedValues = [], r2.clearSelection();
                  for (let e4 = 0; e4 < n.length; e4++) {
                    const t2 = n[e4], i2 = r2.getItem(t2);
                    i2 && ("oneOrManyExtended" === r2.selectionMode ? r2._select(i2) : r2.select(i2));
                  }
                  if (r2._items.forEach((t2) => t2.displayMode = e3), r2._recycle(), r2._propertyChanging = false, JSON.stringify(s) !== JSON.stringify(r2.selectedValues.slice(0))) {
                    let e4 = [], t2 = [];
                    for (let e5 = 0; e5 < o.length; e5++) r2.selectedIndexes.indexOf(o[e5]) < 0 && t2.push(r2._items[o[e5]]);
                    for (let t3 = 0; t3 < r2.selectedIndexes.length; t3++) o.indexOf(r2.selectedIndexes[t3]) < 0 && e4.push(r2._items[r2.selectedIndexes[t3]]);
                    let i2 = { addedItems: e4, removedItems: t2 };
                    if (o.length > 0) {
                      const e5 = r2._items[o[o.length - 1]];
                      e5 && (i2.selected = e5.selected, i2.disabled = e5.disabled, i2.index = r2._indexOf(e5), i2.label = e5.label, i2.value = e5.value);
                    }
                    r2.$.fireEvent("change", i2);
                  }
                  r2._applyAriaSelected(), "checkBox" !== i && "radioButton" !== i && "checkBox" !== t && "radioButton" !== t || r2._refreshLayout();
                  break;
                }
                case "topVisibleIndex":
                  r2._setTopVisibleIndex(i);
                  break;
                case "autoSort":
                  r2._canSort = i;
                  break;
                case "alternationStart":
                case "alternationEnd":
                case "alternationCount":
                  r2._refreshItems(), r2._refreshLayout();
                  break;
                case "sortDirection":
                case "sorted": {
                  r2._canSort = true, i ? r2._sort() : r2._unsort();
                  const e3 = r2.selectedValues;
                  r2.selectedValues = [], r2._refreshSelection();
                  for (let t2 = 0; t2 < e3.length; t2++) {
                    const i2 = e3[t2], o = r2.getItem(i2);
                    o && ("oneOrManyExtended" === r2.selectionMode ? r2._select(o) : r2.select(o));
                  }
                  r2._refreshLayout(), r2._canSort = r2.autoSort;
                  break;
                }
              }
            }
            _refreshSelection() {
              const e2 = this;
              if (!e2._items || 0 === e2._items.length) return;
              const t = e2.selectedValues;
              e2.selectedIndexes = [], e2.selectedValues = [];
              for (let i = 0; i < e2._items.length; i++) {
                const r2 = e2._items[i];
                r2.selected = false, t.indexOf(r2.value) > -1 && e2.select(r2);
              }
              e2._recycle();
            }
            clearSelection() {
              const e2 = this;
              if (!e2._items || 0 === e2._items.length) return;
              let t = [];
              for (let i2 = 0; i2 < e2._items.length; i2++) e2._items[i2].selected && t.push(e2._items[i2]);
              e2._items.map((e3) => e3.selected = false), e2.selectedValues.slice(0);
              const i = e2.selectedIndexes.slice(0);
              if (e2.selectedIndexes = [], e2.selectedValues = [], e2.$.hiddenInput.value = e2.selectedValues.toString(), e2._recycle(), e2.context !== e2) {
                let r2 = { addedItems: [], removedItems: t };
                if (i.length > 0) {
                  const t2 = e2._items[i[i.length - 1]];
                  t2 && (r2.selected = t2.selected, r2.disabled = t2.disabled, r2.index = e2._indexOf(t2), r2.label = t2.label, r2.value = t2.value);
                }
                e2.$.fireEvent("change", r2);
              }
            }
            ensureVisible(e2) {
              const t = this;
              if (e2) return !("string" == typeof e2 && !(e2 = t.getItem(e2)) || (t.isVirtualized || t.$.itemsContainer.scrollTop === t.scrollTop || (t.scrollTop = t.$.itemsContainer.scrollTop), e2.top + e2.height >= t.scrollTop + t.offsetHeight && (t.scrollTop = t.scrollTop + e2.height, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)), (e2.top <= t.scrollTop || e2.top >= t.scrollTop + t.$.itemsContainer.offsetHeight) && (t.scrollTop = e2.top, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)), 0 === t._indexOf(e2) || 1 === t._indexOf(e2) && t._items.length > 1 && t._items[0].grouped ? (t.scrollTop = 0, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)) : t._indexOf(e2) === t._items.length - 1 && (t.scrollTop = t.scrollHeight, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop)), 0));
            }
            get items() {
              const e2 = this;
              if (!window.__karma__ && !window.karma && e2 instanceof Element && e2.isRendered && e2.hasAttribute && e2.hasAttribute("smart-blazor")) {
                let t = [];
                for (let i = 0; i < e2._items.length; i++) {
                  const r2 = e2._items[i];
                  t.push({ label: r2.label, value: r2.value });
                }
                return t;
              }
              return e2._filteredItems ? e2._filteredItems : e2._items;
            }
            getItems() {
              const e2 = this, t = e2._filteredItems ? e2._filteredItems : e2._items;
              let i = [];
              if (t && t.length > 0) for (let e3 = 0; e3 < t.length; e3++) {
                const r2 = t[e3];
                i.push({ label: r2.label, value: r2.value });
              }
              return i;
            }
            ready() {
              super.ready();
              const e2 = this;
              if (e2.shadowRoot && "light" === e2.shadowDomMode) {
                const t2 = document.createDocumentFragment();
                [].slice.call(e2.$.itemsInnerContainer.children).map((e3) => t2.appendChild(e3)), e2.appendChild(t2), e2.$.itemsInnerContainer.appendChild(document.createElement("slot"));
              }
              e2._areCSSVarsSupported = Smart.Utilities.Core.CSSVariablesSupport(), e2.isUpdating = 0, e2._scrollView && (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar), e2._scrollView.hScrollBar.$.addClass("smart-hidden"), e2._scrollView.vScrollBar.$.addClass("smart-hidden"));
              const t = e2._scrollView.vScrollBar, i = e2._scrollView.hScrollBar;
              t.hasStyleObserver = false, i.hasStyleObserver = false, t.hasResizeObserver = false, i.hasResizeObserver = false, t.wait = false, i.wait = false, e2._setFocusable();
            }
            render() {
              const e2 = this;
              e2.setAttribute("role", "listbox"), e2.setAttribute("aria-orientation", "vertical"), e2.$.verticalScrollBar.setAttribute("aria-controls", e2.id), e2.$.horizontalScrollBar.setAttribute("aria-controls", e2.id), e2._keysPressed = {}, e2._incrementalSearchQuery = "", e2._incrementalSearchItems = [], e2._canSort = true, e2._previousEntry = "", e2._setLoadingIndicatorVisibility(), e2._refreshFilter(), e2._initializeInnerHTML(), e2._dataBind(), e2._applyDefaultSelection(), e2.enableShadowDOM && HTMLElement.prototype.appendChild.apply(e2, [e2.$.hiddenInput]), e2.setAttribute("aria-multiselectable", -1 !== ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox", "radioButton"].indexOf(e2.selectionMode)), super.render();
            }
            _lazyInitItems() {
              const e2 = this;
              if (e2._inLazyInit) return cancelAnimationFrame(Smart.ListBox.processTimer), void delete Smart.ListBox.processTimer;
              e2._inLazyInit = true, e2.dataSource || (e2.clearSelection(), e2._dataBind(), e2._applyDefaultSelection()), cancelAnimationFrame(Smart.ListBox.processTimer), delete Smart.ListBox.processTimer, e2._inLazyInit = false;
            }
            _applyDefaultSelection() {
              const e2 = this;
              !e2._focusedItem && e2._items && e2._items.length > 0 && 0 === e2.selectedIndexes.length && ("one" !== e2.selectionMode && "oneOrMany" !== e2.selectionMode && "oneOrManyExtended" !== e2.selectionMode || e2.select(e2._items[0]));
            }
            attached() {
              const e2 = this;
              super.attached(), Smart.ListBox.DragDrop || (Smart.ListBox.DragDrop = { ListBoxes: [] }), Smart.ListBox.DragDrop.ListBoxes.push(e2), e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar)), e2.selectedIndexes.length > 0 && e2._items && e2.ensureVisible(e2._items[e2.selectedIndexes[0]]);
            }
            detached() {
              const e2 = this;
              if (super.detached(), e2._scrollView && (e2._scrollView.unlisten(), delete e2._scrollView), Smart.ListBox.DragDrop && Smart.ListBox.DragDrop.ListBoxes) {
                const t = Smart.ListBox.DragDrop.ListBoxes.indexOf(e2);
                Smart.ListBox.DragDrop.ListBoxes.splice(t, 1);
              }
            }
            _createItem(e2, t, i) {
              const r2 = this, o = "checkBox" === r2.selectionMode || "radioButton" === r2.selectionMode ? r2.selectionMode : "plain", s = i ? {} : document.createElement("smart-list-item");
              s.ownerListBox = r2, "number" == typeof e2 && (e2 = "" + e2);
              const n = function(t2, i2) {
                return void 0 !== e2[t2] ? "" + e2[t2] : e2[i2];
              };
              let l = "string" == typeof e2 ? e2 : n(r2.displayMember, "label"), a2 = "string" == typeof e2 ? e2 : n(r2.valueMember, "value"), d2 = n(r2.groupMember, "group");
              return void 0 === l && (l = void 0 !== t ? "" + t : ""), s.label = s.innerHTML = "" + l, void 0 === a2 && (a2 = void 0 !== t ? "" + t : l), e2.color && (s.color = e2.color), s.value = "" + a2, s.displayMode = o, s.selected = !!e2.selected && e2.selected, s.disabled = !!e2.disabled && e2.disabled, s.dataItem = s, void 0 !== t && (s.dataIndex = t), r2._alternateItem(s), e2.title && (s.title = e2.title), d2 && (s.group = "" + d2), s;
            }
            _alternateItem(e2) {
              const t = this, i = t.alternationStart, r2 = t.alternationEnd > 0 ? t.alternationEnd : 1 / 0;
              t.alternationCount <= 0 || (void 0 === t._alternationIndexCounter && (t._alternationIndexCounter = 0), e2.dataIndex >= i && e2.dataIndex <= r2 && (e2.alternationIndex = t._alternationIndexCounter++, t._alternationIndexCounter === t.alternationCount && (t._alternationIndexCounter = 0)));
            }
            _beginUpdate() {
              this.isUpdating++;
            }
            _isUpdating() {
              return this.isUpdating > 0;
            }
            _endUpdate() {
              this.isUpdating--;
            }
            get _scrollHeight() {
              const e2 = this;
              if (0 === e2._items.length || e2._items.filter((e3) => !e3.hidden).length < 1) return 0;
              let t = 0;
              if (e2.isVirtualized) {
                if (e2.__scrollHeight) return e2.__scrollHeight;
                if (0 === e2._items.length) return 0;
                e2.isUpdating++;
                const i = e2._createItem(e2.dataSource[0]);
                e2.$.itemsInnerContainer.appendChild(i);
                for (let r2 = 0; r2 < e2._items.length; r2++) {
                  const o = e2._items[r2];
                  o.hidden ? (o.height = 0, o.top = t) : (e2.itemHeight ? (e2.itemHeight < 32 && (e2.itemHeight = 32), o.height = e2.itemHeight) : (i.$ && i.$.itemContainer ? i.$.itemContainer.firstElementChild.innerHTML = o.label : i.label = o.label, o.height = i.offsetHeight), o.top = t, t += o.height);
                }
                e2.$.itemsInnerContainer.removeChild(i), e2.__scrollHeight = t - e2.$.itemsInnerContainer.offsetHeight, e2.filterable && (e2.__scrollHeight += e2.$.filterInput.offsetHeight), t = e2.__scrollHeight, e2.isUpdating--;
              } else {
                for (let i = 0; i < e2._items.length; i++) {
                  const r2 = e2._items[i];
                  r2.hidden ? (r2.height = 0, r2.top = t) : (e2.itemHeight ? "auto" !== e2.itemHeight && (r2.height = e2.itemHeight, r2.style.height = r2.height + "px") : r2.height = r2.offsetHeight, r2.top = r2.offsetTop, t += r2.height);
                }
                t = e2.$.itemsInnerContainer.scrollHeight - e2.$.itemsInnerContainer.offsetHeight, e2.filterable && t > 0 && (t += e2.$.filterInput.offsetHeight), e2.__scrollHeight = t;
              }
              return t;
            }
            _initializeRecyclingItems() {
              const e2 = this;
              if (!e2.dataSource || e2.dataSource && 0 === e2.dataSource.length || !e2.isVirtualized) return;
              let t = 0, i = e2.offsetHeight || 400;
              e2.$.itemsInnerContainer.innerHTML = "", e2._recyclingItems = [];
              const r2 = function() {
                for (let r3 = 0; r3 < e2.dataSource.length; r3++) {
                  const o2 = e2.dataSource[r3], s = e2._createItem(o2);
                  if (e2.itemHeight && "auto" !== e2.itemHeight && (s.style.height = e2.itemHeight + "px"), e2.$.itemsInnerContainer.appendChild(s), t += s.offsetHeight, s.dataItem = e2._items[r3], e2._recyclingItems.push(s), t > 1.5 * i) break;
                }
              };
              r2();
              let o = 0;
              for (; t < 1.5 * i && ++o < 5; ) r2();
            }
            _dataBind() {
              const e2 = this;
              if (e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar)), "function" == typeof e2.dataSource && (e2._items = [], delete e2._filteredItems), "string" == typeof e2.dataSource && (e2.dataSource = JSON.parse(e2.dataSource)), null !== e2.dataSource && Array.isArray(e2.dataSource)) {
                e2.isUpdating++;
                const t2 = (t3) => {
                  e2._items = [], e2._groups = [], delete e2._filteredItems;
                  const i2 = e2.dataSource;
                  for (let r2 = 0; r2 < i2.length; r2++) {
                    const o = i2[r2], s = e2._createItem(o, r2, !t3);
                    e2._items[r2] = s, t3 && t3.appendChild(s);
                  }
                };
                if (e2.isVirtualized) t2(), e2._initializeRecyclingItems();
                else {
                  const i2 = document.createDocumentFragment();
                  e2.$.itemsInnerContainer.innerHTML = "", t2(i2), e2.$.itemsInnerContainer.appendChild(i2);
                }
                e2.isUpdating--;
              }
              const t = e2.shadowRoot ? e2.shadowRoot.querySelectorAll("smart-list-item") : e2.querySelectorAll("smart-list-item"), i = function() {
                e2.isUpdating++, e2.dataSource || (e2._initializeHtmlListItems(), e2._initializeHtmlListGroups()), e2.grouped && e2._group(), e2.sorted && e2._sort(), e2._refreshLayout(), e2._initializeSelection(), e2.isInitialized = true, e2._canSort = e2.autoSort, e2.isUpdating--, e2.itemTemplate && e2._handleItemTemplate(e2.itemTemplate) && (e2._items.map((t2) => e2._applyTemplate(t2)), e2._refreshLayout()), e2.__onCompleted && (e2._onCompleted = e2.__onCompleted, e2.__onCompleted = null, e2._onCompleted()), e2.topVisibleIndex > -1 && e2._setTopVisibleIndex(e2.topVisibleIndex), e2.$.fireEvent("bindingComplete"), e2._updateTopVisibleIndex(), 0 === e2._items.length && e2.clearItems(), e2._applyAriaSelected();
              };
              0 === t.length ? i() : (e2._onCompleted && (e2.__onCompleted = e2._onCompleted, e2._onCompleted = null), e2._ensureItemsReady(t, i));
            }
            _ensureItemsReady(e2, t) {
              const i = this, r2 = function() {
                const i2 = function(t2) {
                  for (let i3 = 0; i3 < e2.length; i3++) e2[i3].context = "node" === t2 ? e2[i3] : document;
                };
                i2("node"), t(), i2();
              };
              if (0 === e2.length) r2();
              else {
                i._nodesReadyListeners = 0;
                for (let t2 = 0; t2 < e2.length; t2++) {
                  const o = e2[t2], s = (function() {
                    i._nodesReadyListeners--, 0 === i._nodesReadyListeners && (r2(), delete i._nodesReadyListeners);
                  }).bind(i);
                  o.isCompleted || (i._nodesReadyListeners++, o._onCompleted = s);
                }
                0 === i._nodesReadyListeners && r2();
              }
            }
            _initializeInnerHTML() {
              const e2 = this;
              e2.$.itemsInnerContainer.innerHTML.indexOf("<option") >= 0 ? e2.$.itemsInnerContainer.innerHTML = e2.$.itemsInnerContainer.innerHTML.replace(/<optgroup/gi, "<smart-list-items-group").replace(/<\/optgroup/gi, "</smart-list-items-group").replace(/<option/gi, "<smart-list-item").replace(/<\/option/gi, "</smart-list-item") : e2.$.itemsInnerContainer.innerHTML.indexOf("<ul") >= 0 && (e2.$.itemsInnerContainer.innerHTML = e2.$.itemsInnerContainer.innerHTML.replace(/<ul/gi, "<smart-list-items-group").replace(/<\/ul/gi, "</smart-list-items-group").replace(/<li/gi, "<smart-list-item").replace(/<\/li/gi, "</smart-list-item"));
            }
            _initializeHtmlListItems() {
              const e2 = this, t = e2.shadowRoot && "shadow" === e2.shadowDomMode ? e2.shadowRoot.querySelectorAll("smart-list-item") : e2.querySelectorAll("smart-list-item"), i = "checkBox" === e2.selectionMode || "radioButton" === e2.selectionMode ? e2.selectionMode : "plain", r2 = function(e3, t2, i2) {
                return void 0 !== e3[t2] ? "" + e3[t2] : e3[i2];
              };
              e2._items = [];
              let o = 0;
              for (let s = 0; s < t.length; s++) {
                const n = t[s];
                n.dataIndex = s, n.label = n.innerHTML, n.dataItem = n, n.top || (n.top = o), n.height || (n.height = n.offsetHeight), o += n.height, n.value || (n.value = "" + s);
                const l = r2(n, e2.displayMember, "label"), a2 = r2(n, e2.valueMember, "value"), d2 = r2(n, e2.groupMember, "group");
                n.label !== l && (n.label = l), n.value !== a2 && (n.value = a2), n.group !== d2 && (n.group = d2);
                const c = n.context;
                n.context = document, n.displayMode = i, n.context = c, e2._alternateItem(n), n.selected && (e2.selectedIndexes.push(s), e2.selectedValues.push(n.value)), e2._items.push(n);
              }
              e2.itemTemplate && e2._handleItemTemplate(e2.itemTemplate) && e2._items.map((t2) => e2._applyTemplate(t2));
            }
            _group() {
              const e2 = this;
              e2.isUpdating++;
              let t = [], i = [];
              e2._canSort && e2._unsort();
              for (let i2 = 0; i2 < e2._items.length; i2++) {
                const r2 = e2._items[i2];
                let o = r2.group ? r2.group.trim() : r2.innerHTML.charAt(0) || r2.label.charAt(0);
                o += " ", t[o] ? t[o].items.push(r2) : t[t.length++] = t[o] = { items: [r2], label: o };
              }
              if (e2.isVirtualized) {
                e2._groups = [];
                for (let e3 = 0; e3 < t.length; e3++) {
                  const r2 = t[e3];
                  r2.dataIndex = e3, r2.grouped = true, r2.hidden = false, r2.displayMode = "plain", i.push(r2);
                  for (let o = 0; o < t[e3].items.length; o++) {
                    const e4 = r2.items[o];
                    e4.group = r2, i.push(e4);
                  }
                }
                e2._groups = t, e2._items = i;
              } else {
                for (; e2.$.itemsInnerContainer.firstChild; ) e2.$.itemsInnerContainer.removeChild(e2.$.itemsInnerContainer.firstChild);
                const r2 = document.createDocumentFragment();
                e2._groups = [];
                for (let o = 0; o < t.length; o++) {
                  const s = t[o], n = document.createElement("smart-list-items-group");
                  n.label = s.label, n.dataIndex = o;
                  for (let e3 = 0; e3 < t[o].items.length; e3++) {
                    const t2 = s.items[e3];
                    i.push(t2), t2.group = s.label, n.appendChild(t2);
                  }
                  e2._groups.push(n), r2.appendChild(n);
                }
                e2._items = i, /Trident|Edge/.test(navigator.userAgent) ? setTimeout(function() {
                  e2.$.itemsInnerContainer.appendChild(r2);
                }, 50) : e2.$.itemsInnerContainer.appendChild(r2);
              }
              e2.sorted && e2._sort(), e2.isUpdating--;
            }
            _ungroup() {
              const e2 = this;
              e2.isUpdating++, e2._groups = [], e2._canSort && e2._unsort();
              let t = [];
              if (e2.isVirtualized) for (let i = 0; i < e2._items.length; i++) {
                const r2 = e2._items[i];
                r2.grouped || t.push(r2);
              }
              else {
                const i = document.createDocumentFragment();
                for (let r2 = 0; r2 < e2._items.length; r2++) {
                  const o = e2._items[r2];
                  i.appendChild(o), t.push(o);
                }
                t.length > 0 && (e2.$.itemsInnerContainer.innerHTML = "", e2.$.itemsInnerContainer.appendChild(i));
              }
              e2._items = t, e2.sorted && e2._sort(), e2.isUpdating--;
            }
            _initializeHtmlListGroups() {
              const e2 = this, t = e2.$.itemsInnerContainer.querySelectorAll("smart-list-items-group");
              e2._groups = [];
              for (let i = 0; i < t.length; i++) {
                const r2 = t[i];
                r2.dataIndex = i, e2._groups.push(r2);
              }
            }
            _initializeSelection() {
              const e2 = this, t = e2.selectedIndexes.slice(0), i = e2.selectedValues.slice(0);
              e2.clearSelection(), "oneOrManyExtended" === e2.selectionMode && (e2._keysPressed.Control = true);
              for (let r2 = 0; r2 < e2._items.length; r2++) {
                const o = e2._items[r2];
                (t.indexOf(r2) >= 0 || i.indexOf(o.value || o.label) >= 0) && (e2._focusedItem && (e2._focusedItem._focused = false), e2._focusedItem = null, e2.select(o));
              }
              "oneOrManyExtended" === e2.selectionMode && (e2._keysPressed.Control = false);
            }
            onItemUpdated() {
              const e2 = this;
              e2.isInitialized && !e2._isUpdating() && (e2.isUpdating++, e2._refreshLayout(), e2.isUpdating--);
            }
            _refreshItems() {
              const e2 = this;
              if (e2.isInitialized && !e2._isUpdating()) {
                if (e2.isUpdating++, e2.grouped ? e2._ungroup() : e2.sorted && e2._canSort && e2._unsort(), !e2.isVirtualized) {
                  e2._items = [];
                  const t = e2.shadowRoot ? e2.shadowRoot.querySelectorAll("smart-list-item") : e2.querySelectorAll("smart-list-item");
                  for (let i = 0; i < t.length; i++) t[i].dataIndex = i, e2._alternateItem(t[i]), e2._items.push(t[i]);
                }
                e2.grouped ? e2._group() : e2.sorted && e2._sort(), e2._refreshLayout(), e2.isUpdating--;
              }
            }
            _applyIncrementalSearch(e2) {
              const t = this;
              null === t.incrementalSearchDelay || isNaN(t.incrementalSearchDelay) || ["Shift", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Control", "Home", "End", "PageUp", "PageDown"].indexOf(e2) > -1 || (0 !== t._incrementalSearchQuery.indexOf(e2) && (t._incrementalSearchQuery += e2), t._incrementalSearchTimer && clearTimeout(t._incrementalSearchTimer), t._incrementalSearch(), t._incrementalSearchTimer = setTimeout(function() {
                t._incrementalSearchQuery = "";
              }, t.incrementalSearchDelay));
            }
            select(e2) {
              const t = this;
              if (("string" != typeof e2 || (e2 = t.getItem(e2))) && ("number" != typeof e2 || (e2 = t.getItem(e2))) && !(e2.grouped || e2.readonly || !t._items.length || e2 instanceof HTMLElement && !t.contains(e2))) {
                if ("none" === t.selectionMode) return t.selectedIndexes = [], void (t.selectedValues = []);
                switch (!t._focusedItem !== e2 && "none" !== t.selectionMode && (t._focusedItem && (t._focusedItem._focused = false), t._focusedItem = e2, e2._focused = true), t.selectionMode) {
                  case "one":
                  case "zeroAndOne":
                    return (1 !== t.selectedIndexes.length || t.selectedIndexes[0] !== t._indexOf(e2)) && (t._previouslySelectedIndexes = t.selectedIndexes, t.selectedIndexes.length >= 1 && t.clearSelection(), t._select(e2), delete t._previouslySelectedIndexes, true);
                  case "zeroOrOne":
                    return 1 === t.selectedIndexes.length && t.selectedIndexes[0] === t._indexOf(e2) ? (t.unselect(e2), true) : (t._previouslySelectedIndexes = t.selectedIndexes, t.selectedIndexes.length >= 1 && t.clearSelection(), t._select(e2), delete t._previouslySelectedIndexes, true);
                  case "radioButton":
                    if (t._previouslySelectedIndexes = t.selectedIndexes, t.$.itemsInnerContainer.querySelectorAll("smart-list-items-group").length > 0) {
                      const i = e2.parentNode;
                      if (!e2.selected) {
                        for (let e3 in i.children) {
                          const r2 = i.children[e3];
                          r2.selected && t.unselect(r2);
                        }
                        t._select(e2);
                      }
                      return delete t._previouslySelectedIndexes, true;
                    }
                    if (t.isVirtualized && t._groups.length > 0) {
                      const i = e2.group;
                      if (!e2.selected) {
                        for (let e3 in i.items) {
                          const r2 = i.items[e3];
                          r2.selected && t.unselect(r2);
                        }
                        t._select(e2);
                      }
                      return delete t._previouslySelectedIndexes, true;
                    }
                    return e2.selected || (t.selectedIndexes.length >= 1 && t.clearSelection(), t._select(e2)), delete t._previouslySelectedIndexes, true;
                  case "oneOrMany":
                    return e2.selected ? t.selectedIndexes.length > 1 && t.unselect(e2) : t._select(e2), true;
                  case "zeroOrMany":
                  case "checkBox":
                    return e2.selected ? t.unselect(e2) : t._select(e2), true;
                  case "oneOrManyExtended": {
                    const i = t.selectedValues;
                    if (t._keysPressed.Control) return t.selectedIndexes.length > 1 && e2.selected ? (t.unselect(e2), t._focus(t._items[t.selectedIndexes[0]])) : t._select(e2), true;
                    if (t._keysPressed.Shift) {
                      const r2 = t._items[t.selectedIndexes[0]];
                      let o;
                      t.clearSelection();
                      const s = i.indexOf(r2.value) >= 0 || r2.selected;
                      if (t._select(r2, s), t._indexOf(r2) > t._indexOf(e2)) for (o = t._indexOf(r2) - 1; o >= t._indexOf(e2); ) {
                        const e3 = t._items[o], r3 = i.indexOf(e3.value) >= 0 || e3.selected;
                        t._select(e3, r3), o--;
                      }
                      else for (o = t._indexOf(r2) + 1; o <= t._indexOf(e2); ) {
                        const e3 = t._items[o], r3 = i.indexOf(e3.value) >= 0 || e3.selected;
                        t._select(e3, r3), o++;
                      }
                      const n = [];
                      for (let e3 = 0; e3 < i.length; e3++) n.push(t.getItem(i[e3]));
                      if (n.length > 0 && !t._propertyChanging) {
                        let r3 = [];
                        for (let e3 = 0; e3 < t.selectedValues.length; e3++) {
                          const o2 = t.selectedValues[e3];
                          i.indexOf(o2) < 0 && r3.push(t.getItem(o2));
                        }
                        t.$.fireEvent("change", { addedItems: r3, removedItems: n, selected: e2.selected, disabled: e2.disabled, index: t._indexOf(e2), label: e2.label, value: e2.value });
                      }
                      return true;
                    }
                    for (let r2 = 0; r2 < i.length; r2++) {
                      const o = i[r2], s = t.getItem(o);
                      e2 !== s && t.unselect(s);
                    }
                    return t.clearSelection(), t._select(e2, i.indexOf(e2.value) >= 0), true;
                  }
                }
                return false;
              }
            }
            _applyTemplate(e2, t) {
              const i = this;
              if (null === i.itemTemplate) return;
              if ("function" == typeof i.itemTemplate) return void i.itemTemplate(e2, { label: e2.label, value: e2.value, index: i._items.indexOf(e2) });
              if (!i._bindingDetails || 0 === i._bindingDetails.length) return;
              const r2 = i._bindingDetails.length;
              let o, s, n = document.importNode(i._template.content, true);
              for (let t2 = 0; t2 < r2; t2++) {
                o = n.childNodes[i._bindingDetails[t2].childNodeIndex], s = i._bindingDetails[t2].bindingString.length;
                for (let r3 = 0; r3 < s; r3++) {
                  const s2 = i._bindingDetails[t2].bindingString[r3], n2 = s2.indexOf("label") >= 0 ? e2.label : e2.value;
                  o.innerHTML = o.innerHTML.replace(s2, n2);
                }
              }
              e2.innerHTML = "";
              for (let t2 = 0; t2 < n.childNodes.length; t2++) n.childNodes[t2].outerHTML && (e2.innerHTML += n.childNodes[t2].outerHTML);
              false !== t && (i._scrollHeightTimer && (clearInterval(i._scrollHeightTimer), i._scrollHeightCounter = 0), i._scrollHeightTimer = setInterval(function() {
                i._lastScrollHeight === i.$.itemsInnerContainer.scrollHeight && 10 !== i._scrollHeightCounter || (i._refreshLayout(), clearInterval(i._scrollHeightTimer)), i._lastScrollHeight = i.$.itemsInnerContainer.scrollHeight, i._scrollHeightCounter++;
              }, 50));
            }
            _filterItems(e2, t, i) {
              const r2 = this, o = r2.$.filterInput.value;
              let s, n;
              const l = function() {
                if (0 === n.length) return r2._filteredItems = [], void (t && t());
                s = r2._queryItems(o, r2.filterMode);
                for (let e3 = 0; e3 < n.length; e3++) n[e3].hidden = true, n[e3].$ && n[e3].$.addClass("smart-hidden");
                for (let e3 = 0; e3 < s.length; e3++) {
                  const t2 = s[e3];
                  t2.hidden = false, n[e3].$ && t2.$.removeClass("smart-hidden");
                }
                if (r2.grouped && r2.isVirtualized) for (let e3 = 0; e3 < r2._groups.length; e3++) {
                  const t2 = r2._groups[e3], i2 = t2.items;
                  let o2 = true;
                  for (let e4 = 0; e4 < i2.length; e4++) i2[e4].hidden || (o2 = false);
                  o2 && (t2.hidden = true);
                }
                if (r2.grouped && !r2.isVirtualized) for (let e3 = 0; e3 < r2._groups.length; e3++) {
                  const t2 = r2._groups[e3], i2 = [].concat(...t2.querySelectorAll("smart-list-item"));
                  let o2 = true;
                  for (let e4 = 0; e4 < i2.length; e4++) i2[e4].$.hasClass("smart-hidden") || (o2 = false);
                  o2 ? t2.$.addClass("smart-hidden") : t2.$.removeClass("smart-hidden");
                }
                r2._filteredItems = s, r2._refreshLayout(), t && t(), e2 || r2._refreshSelection();
              };
              if ("function" == typeof r2.dataSource) if (o || i) {
                const e3 = function(e4) {
                  (o || i) && r2.isAttached && (r2._updateListBoxAfterQuery = function() {
                    s = n = r2._items, l();
                  }, r2.clearItems(), r2.insert(0, e4));
                }, t2 = r2.dataSource(o, e3);
                if (t2) {
                  if (!o && !i) return;
                  r2._updateListBoxAfterQuery = function() {
                    s = n = r2._items, l();
                  }, r2.clearItems(), r2.insert(0, t2);
                }
              } else r2.clearItems(), s = n = r2._items, l(), r2.$.fireEvent("bindingComplete");
              else {
                if (n = r2._items, 0 === n.length) return;
                l();
              }
            }
            _getNextItem(e2) {
              const t = this._items, i = this._items.length;
              let r2 = Math.max(e2 + 1, 0);
              for (; r2 < i; ) {
                const e3 = t[r2];
                if (!(e3.disabled || e3.hidden || e3.grouped || e3.readonly)) return e3;
                r2++;
              }
              return t[e2];
            }
            _getPreviousItem(e2) {
              const t = this._items;
              let i = Math.max(e2 - 1, 0);
              for (; i > -1; ) {
                const e3 = t[i];
                if (!(e3.disabled || e3.hidden || e3.grouped || e3.readonly)) return e3;
                i--;
              }
              return t[e2];
            }
            get _scrollWidth() {
              const e2 = this, t = e2._items;
              return e2.__scrollWidth || (e2.__scrollWidth = (() => {
                const e3 = this, i = e3.virtualized, r2 = e3.itemMeasureMode;
                let o = 0, s = "";
                function n(t2) {
                  const i2 = e3._createItem({ label: t2 });
                  i2.style.position = "absolute", e3.$.itemsContainer.appendChild(i2), i2.label = t2, i2.style.width = "auto", i2.isCompleted && (i2.$.itemContainer.style.width = "auto");
                  const r3 = getComputedStyle(i2), o2 = parseInt(r3.paddingLeft) + parseInt(r3.paddingRight), s2 = i2.$.itemContainer || i2, n2 = s2.offsetWidth + s2.offsetLeft + o2;
                  return i2.parentNode.removeChild(i2), n2;
                }
                for (let e4 = 0; e4 < t.length; e4++) {
                  const l = t[e4];
                  if (!l.hidden) if ("auto" === r2) {
                    const e5 = i ? l.label : l.textContent.trim();
                    e5.length > s.length && (s = e5);
                  } else o = Math.max(o, n(l.label));
                }
                return "auto" === r2 ? n(s) : o;
              })()), e2.__scrollWidth;
            }
            update(e2, t) {
              const i = this, r2 = i._items[e2];
              if (r2) {
                if ("string" == typeof t) r2.label = t, void 0 === r2.value && (r2.value = t);
                else for (let e3 in t) "selected" === e3 && r2[e3] !== t[e3] ? i.select(r2) : r2[e3] = t[e3], "group" === e3 && i._refreshItems();
                (i.sorted || i.grouped || i.isVirtualized) && (i._refreshItems(), i._refreshSelection());
              } else i.error(i.localize("indexOutOfBound", { elementType: i.nodeName.toLowerCase(), method: "update" }));
            }
            insert(e2, t) {
              const i = this;
              let r2 = [];
              if ((!e2 || e2 < 0) && (e2 = 0), Array.isArray(t)) {
                i.isUpdating++;
                for (let o = 0; o < t.length; o++) {
                  const s = t[o], n = i._createItem(s);
                  r2.push(n), e2 >= i._items.length || 0 === i._items.length ? i.appendChild(n) : i.insertBefore(n, i._items[e2]);
                }
                i.isUpdating--;
              } else {
                const o = i._createItem(t);
                r2.push(o), e2 >= i._items.length || 0 === i._items.length ? i.appendChild(o) : i.insertBefore(o, i._items[e2]);
              }
              r2.length > 0 ? (r2.map((e3) => i._applyTemplate(e3)), i._ensureItemsReady(r2, function() {
                i._refreshItems(), 0 !== i._items.length && (i._updateListBoxAfterQuery && (i._updateListBoxAfterQuery(), delete i._updateListBoxAfterQuery), i._refreshSelection(), i.$.fireEvent("bindingComplete"));
              })) : i._updateListBoxAfterQuery && (i._updateListBoxAfterQuery(), delete i._updateListBoxAfterQuery);
            }
            removeAt(e2) {
              const t = this, i = t._items[e2];
              i ? (i.selected && t.unselect(i), t.isVirtualized ? t._items.splice(e2, 1) : i.parentNode.removeChild(i), t._refreshItems(), t._refreshSelection(), 0 === t.selectedIndexes.length && t._items.length > 0 && ("oneOrMany" !== t.selectionMode && "one" !== t.selectionMode && "oneOrManyExtended" !== t.selectionMode || t.select(t._items[0]))) : t.error(t.localize("indexOutOfBound", { elementType: t.nodeName.toLowerCase(), method: "remove" }));
            }
            _queryItems(e2, t) {
              const i = this, r2 = [], o = function(r3, o2) {
                if (r3.grouped) return r3;
                switch (t) {
                  case "startsWith":
                    if (0 === r3.label.indexOf(o2)) return r3;
                    break;
                  case "startsWithIgnoreCase":
                    if (0 === r3.label.toLowerCase().indexOf(o2.toLowerCase())) return r3;
                    break;
                  case "doesNotContain":
                    if (r3.label.indexOf(o2) < 0) return r3;
                    break;
                  case "doesNotContainIgnoreCase":
                    if (r3.label.toLowerCase().indexOf(o2.toLowerCase()) < 0) return r3;
                    break;
                  case "contains":
                    if (r3.label.indexOf(o2) > -1) return r3;
                    break;
                  case "containsIgnoreCase":
                    if (r3.label.toLowerCase().indexOf(o2.toLowerCase()) > -1) return r3;
                    break;
                  case "equals":
                    if (0 === r3.label.localeCompare(o2)) return r3;
                    break;
                  case "equalsIgnoreCase":
                    if (0 === r3.label.toLowerCase().localeCompare(o2.toLowerCase())) return r3;
                    break;
                  case "endsWith":
                    if (r3.label.endsWith(o2)) return r3;
                    break;
                  case "endsWithIgnoreCase":
                    if (r3.label.toLowerCase().endsWith(o2.toLowerCase())) return r3;
                    break;
                  case "custom":
                    if (i.filterCallback(r3, e2)) return r3;
                }
                return null;
              };
              if (0 === e2.length) return i._items;
              for (let t2 = 0; t2 < i._items.length; t2++) {
                const s = o(i._items[t2], e2);
                s && r2.push(s);
              }
              return r2;
            }
            _select(e2, t) {
              const i = this, r2 = i.selectedIndexes.indexOf(i._indexOf(e2)), o = i.selectedIndexes.slice(0), s = i.selectedValues.slice(0);
              if (e2.selected = true, -1 !== r2) return i._recycle(), false;
              if (o.push(i._indexOf(e2)), s.push(e2.value || e2.label), i.selectedIndexes = o, i.selectedValues = s, i._recycle(), i.$.hiddenInput.value = s.toString(), !i.isCompleted || t || !i.isInitialized || i._propertyChanging) return;
              let n = [];
              if (i._previouslySelectedIndexes) {
                for (let e3 = 0; e3 < i._previouslySelectedIndexes.length; e3++) i.selectedIndexes.indexOf(i._previouslySelectedIndexes[e3]) < 0 && n.push(i._items[i._previouslySelectedIndexes[e3]]);
                delete i._previouslySelectedIndexes;
              }
              return i.$.fireEvent("change", { addedItems: [e2], removedItems: n, selected: e2.selected, disabled: e2.disabled, index: i._indexOf(e2), label: e2.label, value: e2.value }), true;
            }
            _setTopVisibleIndex(e2) {
              const t = this;
              if ("number" == typeof e2 && (t.topVisibleIndex = Math.max(0, e2), e2 = t._items[t.topVisibleIndex]), !e2) return false;
              e2.top !== t.scrollTop && (t.scrollTop = e2.top, t.isVirtualized || (t.$.itemsContainer.scrollTop = t.scrollTop), t.scrollHeight === t.scrollTop && t._updateTopVisibleIndex());
            }
            _updateTopVisibleIndex() {
              const e2 = this, t = e2.scrollTop + e2._scrollView.verticalScrollBar.offsetHeight - e2.offsetHeight;
              let i;
              if (e2.scrollTop < e2.scrollHeight / 2) {
                for (let r2 = 0; r2 < e2._items.length; r2++) if (e2._items[r2].top >= t) {
                  i = e2._items[r2];
                  break;
                }
              } else for (let r2 = e2._items.length - 1; r2 >= 0 && !(e2._items[r2].top < t); r2--) i = e2._items[r2];
              if (i) {
                const t2 = e2.context;
                e2.context = e2, e2.topVisibleIndex = i.dataIndex, e2.context = t2;
              }
            }
            unselect(e2) {
              const t = this;
              if (!e2) return;
              if ("string" == typeof e2 && !(e2 = t.getItem(e2))) return;
              if ("none" === t.selectionMode) return void t.clearSelection();
              const i = t.selectedIndexes.indexOf(t._indexOf(e2)), r2 = t.selectedIndexes.slice(0), o = t.selectedValues.slice(0);
              return e2.selected = false, i >= 0 && (r2.splice(i, 1), o.splice(i, 1), t.selectedIndexes = r2, t.selectedValues = o, t.$.hiddenInput.value = o.toString(), t.isCompleted && !t._propertyChanging ? (t.$.fireEvent("change", { addedItems: [], removedItems: [e2], selected: e2.selected, disabled: e2.disabled, index: t._indexOf(e2), label: e2.label, value: e2.value }), t._recycle(), true) : void 0);
            }
            _handleItemTemplate(e2) {
              if (null === e2 || !e2) return;
              if ("function" == typeof e2) return e2;
              const t = this;
              if (!("content" in document.createElement("template"))) return t.error(t.localize("htmlTemplateNotSuported", { elementType: t.nodeName.toLowerCase() })), void (t.itemTemplate = null);
              if (null === (e2 = document.getElementById(e2)) || !("content" in e2)) return t.error(t.localize("invalidTemplate", { elementType: t.nodeName.toLowerCase(), property: "itemTemplate" })), void (t.itemTemplate = null);
              const i = e2.content, r2 = i.childNodes.length, o = /{{\w+}}/g;
              let s, n;
              t._bindingDetails = [], t._template = e2;
              for (let e3 = 0; e3 < r2; e3++) {
                for (n = []; s = o.exec(i.childNodes[e3].innerHTML); ) n.push(s[0]);
                n.length > 0 && t._bindingDetails.push({ childNodeIndex: e3, bindingString: n });
              }
              return true;
            }
            _handleKeyStrokes(e2) {
              const t = this, i = "radioButton" === t.selectionMode || "checkBox" === t.selectionMode || "zeroOrMany" === t.selectionMode || "oneOrMany" === t.selectionMode || "zeroOrOne" === t.selectionMode;
              let r2 = t._items;
              if (t.filterable && t.$.filterInput.value.length > 0 && (r2 = t._filteredItems), !t.disabled && !t.readonly && r2.length) {
                switch (e2) {
                  case "ArrowLeft":
                  case "ArrowUp":
                    t._handleArrowKeys(true);
                    break;
                  case "ArrowRight":
                  case "ArrowDown":
                    t._handleArrowKeys(false);
                    break;
                  case " ": {
                    if (t.selectedIndexes.length < 1 && !t._focusedItem) return;
                    const e3 = t._focusedItem ? t._focusedItem : t._items[t.selectedIndexes[t.selectedIndexes.length - 1]], i2 = (e4) => {
                      e4.selected && "radioButton" !== t.selectionMode ? t.unselect(e4) : t.select(e4);
                    };
                    if ("oneOrMany" === t.selectionMode) return void (e3.selected && t.selectedIndexes.length > 1 ? i2(e3) : e3.selected || i2(e3));
                    i2(e3);
                    break;
                  }
                  case "Home":
                    if (0 === r2.length) return;
                    i || (t._keysPressed.Shift || t.clearSelection(), t.select(r2[0])), t._focus(r2[0]), t.scrollTop = 0;
                    break;
                  case "End":
                    if (0 === r2.length) return;
                    i || (t._keysPressed.Shift || t.clearSelection(), t.select(r2[r2.length - 1])), t._focus(r2[r2.length - 1]), t.scrollTop = t.scrollHeight;
                    break;
                  case "PageUp":
                    t._pageUpKeyHandler(r2);
                    break;
                  case "PageDown":
                    t._pageDownKeyHandler(r2);
                }
                t._recycle();
              }
            }
            _horizontalScrollbarHandler(e2) {
              const t = this;
              e2 && e2.stopPropagation && e2.stopPropagation(), t.isVirtualized ? t._recycle() : t.$.itemsContainer.scrollLeft = t._getScrollLeft(e2.detail.value);
            }
            _getScrollLeft(e2, t) {
              const i = this;
              if (!i.rightToLeft) return e2;
              if (Smart.Utilities.Core.Browser.Chrome) {
                if (!t) {
                  const e3 = 2 * (parseInt(getComputedStyle(i.$.itemsInnerContainer).getPropertyValue("--smart-list-item-horizontal-offset")) || 0);
                  t = i._scrollWidth - i.$.itemsContainer.offsetWidth - e3;
                }
                e2 = t - e2;
              } else e2 *= -1;
              return e2;
            }
            _unsort() {
              const e2 = this;
              e2.isUpdating++;
              const t = function(e3, t2) {
                let i = e3.dataIndex, r2 = t2.dataIndex;
                return i < r2 ? -1 : i > r2 ? 1 : 0;
              };
              if (e2.isVirtualized) if (e2._groups.length > 0) {
                e2._groups.sort(t);
                let i = [];
                for (let r2 = 0; r2 < e2._groups.length; r2++) {
                  const o = e2._groups[r2], s = [].concat(...o.items);
                  s.sort(t), i.push(o), i = i.concat(s);
                }
                e2._items = i;
              } else e2._items.sort(t);
              else {
                if (e2._groups.length > 0) {
                  e2._groups.sort(t);
                  let i = [];
                  for (let r2 = 0; r2 < e2._groups.length; r2++) {
                    const o = e2._groups[r2], s = [].concat(...o.querySelectorAll("smart-list-item"));
                    s.sort(t), i = i.concat(s);
                  }
                  e2._items = i;
                } else e2._items.sort(t);
                e2._applySortOrder();
              }
              e2.isUpdating--;
            }
            _applySortOrder() {
              const e2 = function(e3) {
                for (let t = 0; t < e3.length; t++) {
                  const i = e3[t], r2 = i.parentNode;
                  r2 && r2.appendChild(i);
                }
              };
              e2(this._items), e2(this._groups);
            }
            _sort() {
              const e2 = this;
              if (!e2._canSort) return;
              e2.isUpdating++;
              const t = function(t2, i) {
                let r2 = t2.label, o = i.label;
                if ("asc" === e2.sortDirection) {
                  if (r2 < o) return -1;
                  if (r2 > o) return 1;
                } else {
                  if (r2 < o) return 1;
                  if (r2 > o) return -1;
                }
                return 0;
              };
              if (e2._groups.sort(t), e2.isVirtualized) if (e2._groups.length > 0) {
                let i = [];
                for (let r2 = 0; r2 < e2._groups.length; r2++) {
                  const o = e2._groups[r2], s = [].concat(...o.items);
                  i.push(o), s.sort(t), i = i.concat(s);
                }
                e2._items = i;
              } else e2._items.sort(t);
              else {
                if (e2._groups.length > 0) {
                  let i = [];
                  for (let r2 = 0; r2 < e2._groups.length; r2++) {
                    const o = e2._groups[r2], s = [].concat(...o.querySelectorAll("smart-list-item"));
                    s.sort(t), i = i.concat(s);
                  }
                  e2._items = i;
                } else e2._items.sort(t);
                e2._applySortOrder();
              }
              e2.isUpdating--;
            }
            getItem(e2) {
              const t = this;
              for (let i = 0; i < t._items.length; i++) if (t._items[i].value === e2) return t._items[i];
              return null;
            }
            _focus(e2) {
              const t = this;
              !e2 || "none" === t.selectionMode || t.disabled || t.readonly || (t._focusedItem && (t._focusedItem._focused = false), t._focusedItem = e2, t._focusedItem._focused = true);
            }
            _keyDownHandler(e2) {
              const t = this, i = (t.shadowRoot || t.getRootNode()).activeElement || document.activeElement;
              let r2 = e2.key;
              if (e2.metaKey && (r2 = "Control"), !t.disabled && !t.readonly && (!t.filterable || t.$.filterInput !== i) && t._focused && 0 !== t._items.length && !t.disabled && !t.displayLoadingIndicator) {
                if (t.editable) {
                  if ("F2" === r2) return void t._dblclickEventHandler({ target: t._focusedItem });
                  if (t.$.editInput === i) return;
                }
                if ("none" !== t.selectionMode) {
                  switch (e2.stopPropagation(), r2) {
                    case "Down":
                    case "Right":
                    case "Left":
                    case "Up":
                      r2 = "Arrow" + r2;
                  }
                  if (t.filterable) switch (r2) {
                    case "ArrowLeft":
                    case "ArrowRight":
                      return;
                    case "ArrowUp":
                    case "ArrowDown":
                      e2.preventDefault();
                  }
                  if (t._applyIncrementalSearch(r2), !(["Shift", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Control", " ", "Home", "End", "PageUp", "PageDown"].indexOf(r2) < 0)) if (e2.preventDefault(), !t._focusedItem && t._items.length > 0) "one" === t.selectionMode || "oneOrMany" === t.selectionMode || "oneOrManyExtended" === t.selectionMode ? t.select(t._items[0]) : t._focus(t._items[0]);
                  else switch (t.selectionMode) {
                    case "one":
                    case "zeroAndOne":
                      if ("Shift" === r2 || "Control" === r2 || " " === r2) return;
                      t._handleKeyStrokes(r2);
                      break;
                    case "oneOrMany":
                    case "zeroOrOne":
                    case "zeroOrMany":
                    case "radioButton":
                    case "checkBox":
                      if ("Shift" === r2 || "Control" === r2) return;
                      t._handleKeyStrokes(r2);
                      break;
                    case "oneOrManyExtended":
                      if (" " === r2) return;
                      t._keysPressed[r2] = "keydown" === e2.type, t._handleKeyStrokes(r2);
                  }
                }
              }
            }
            _keyUpHandler(e2) {
              const t = this, i = (t.shadowRoot || t.getRootNode()).activeElement || document.activeElement;
              if (!t.editable || t.$.editInput !== i) {
                if (t.filterable && t.$.filterInput === i) return t._filterTimer && clearTimeout(t._filterTimer), void (t._filterTimer = setTimeout(function() {
                  const e3 = t.context;
                  t.context = t, t._filterItems(), t.scrollTop = t.$.itemsContainer.scrollTop = 0, t.scrollLeft = t.$.itemsContainer.scrollLeft = t._getScrollLeft(0), t.context = e3;
                }, 300));
                if (t._focused) {
                  if (t._focusedItem && t._focusedItem.hidden && t._filteredItems.length > 0) {
                    let e3 = t._filteredItems[0];
                    e3.grouped && t._filteredItems.length > 1 && (e3 = t._filteredItems[1]), t._focus(e3), t._recycle();
                  }
                  e2.stopPropagation(), e2.preventDefault(), t.disabled || ("Escape" === e2.key && Smart.ListBox.DragDrop.Dragging && t._cancelDrag(), ["Shift", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Control", " ", "PageUp", "PageDown"].indexOf(e2.key) < 0 || (t._keysPressed[e2.key] = false));
                }
              }
            }
            _cancelDrag() {
              if (!Smart.ListBox.DragDrop.Dragging) return;
              Smart.ListBox.DragDrop.Feedback.parentNode && Smart.ListBox.DragDrop.Feedback.parentNode.removeChild(Smart.ListBox.DragDrop.Feedback);
              const e2 = Smart.ListBox.DragDrop.Item, t = e2.ownerListBox;
              if (t.$.fireEvent("dragCancel", { item: e2, data: Smart.ListBox.DragDrop, container: t, previousContainer: t }), Smart.ListBox.DragDrop.Feedback = null, Smart.ListBox.DragDrop.DropDetails) {
                let e3 = Smart.ListBox.DragDrop.DropDetails.item;
                e3 && (e3.$.removeClass("smart-list-item-line-feedback"), e3.$.removeClass("smart-list-item-bottom-line-feedback"));
              }
              document.body.classList.remove("smart-dragging"), delete Smart.ListBox.DragDrop.DraggedFrom, Smart.ListBox.DragDrop.Dragging = false, Smart.ListBox.DragDrop.Item = null, Smart.ListBox.DragDrop.DropDetails = null;
            }
            _mouseWheelHandler(e2) {
              const t = this;
              if ((t.computedHorizontalScrollBarVisibility || t.computedVerticalScrollBarVisibility) && !t.disabled && t.computedVerticalScrollBarVisibility) {
                const i = t.scrollTop;
                if (0 === i && e2.deltaY < 0 || i === t.scrollHeight && e2.deltaY > 0) return;
                e2.stopPropagation(), e2.preventDefault(), t.scrollTo(i + t._getScrollCoefficient(e2, t.offsetHeight));
              }
            }
            _pageDownKeyHandler(e2) {
              const t = this;
              if (0 === e2.length) return;
              let i, r2 = t._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              if ("checkBox" !== t.selectionMode && "radioButton" !== t.selectionMode && "zeroOrMany" !== t.selectionMode && "oneOrMany" !== t.selectionMode && "zeroOrOne" !== t.selectionMode || t._focusedItem && (r2 = t._focusedItem), !r2) return;
              const o = t._indexOf(r2);
              let s = r2.top + t.$.itemsContainer.offsetHeight - r2.height;
              for (let t2 = o; t2 < e2.length; t2++) if (e2[t2].top >= s) {
                i = e2[t2];
                break;
              }
              i || (i = e2[e2.length - 1]), "checkBox" === t.selectionMode || "radioButton" === t.selectionMode || "zeroOrMany" === t.selectionMode || "oneOrMany" === t.selectionMode || "zeroOrOne" === t.selectionMode ? t._focus(i) : i.selected || (t._keysPressed.Shift || t.clearSelection(), t.select(i), t._focus(i)), (i.height + i.top > t.$.itemsContainer.scrollTop + t.$.itemsContainer.offsetHeight || i.top < t.$.itemsContainer.scrollTop) && (t.scrollTop = i.top - t.$.itemsContainer.offsetHeight + i.height);
            }
            _pageUpKeyHandler(e2) {
              const t = this;
              if (0 === e2.length) return;
              let i = t._items[t.selectedIndexes[t.selectedIndexes.length - 1]];
              if ("checkBox" !== t.selectionMode && "radioButton" !== t.selectionMode && "zeroOrMany" !== t.selectionMode && "oneOrMany" !== t.selectionMode && "zeroOrOne" !== t.selectionMode || t._focusedItem && (i = t._focusedItem), !i) return;
              const r2 = i.top - t.$.itemsContainer.offsetHeight;
              let o;
              for (let s = t._indexOf(i); s > 0; s--) if (e2[s].top <= r2) {
                o = e2[s];
                break;
              }
              o || (o = e2[0]), "checkBox" === t.selectionMode || "radioButton" === t.selectionMode || "zeroOrMany" === t.selectionMode || "oneOrMany" === t.selectionMode || "zeroOrOne" === t.selectionMode ? t._focus(o) : o.selected || (t._keysPressed.Shift || t.clearSelection(), t.select(o), t._focus(o)), t.scrollTop = o.top, 0 === t._indexOf(o) && (t.scrollTop = 0);
            }
            clearItems() {
              const e2 = this;
              e2.clearSelection(), e2.$.itemsInnerContainer.innerHTML = "", e2._items = [], delete e2._focusedItem, e2.$placeholder.removeClass("smart-hidden"), e2.refresh();
            }
            _resizeHandler(e2) {
              this.refresh(e2);
            }
            refresh(e2) {
              const t = this;
              if (!e2 && !t._isUpdatingScrollBars && t.isInitialized) return t._isUpdatingScrollBars = true, t._initializeRecyclingItems(), t._refreshLayout(), void (t._isUpdatingScrollBars = false);
              e2 && e2.target === t && !t._isUpdatingScrollBars && (t._isUpdatingScrollBars = true, t._initializeRecyclingItems(), t._refreshLayout(), t._isUpdatingScrollBars = false);
            }
            _indexOf(e2) {
              const t = this;
              if (!e2) return -1;
              let i = t._items.indexOf(e2);
              return -1 === i && (i = t._items.indexOf(t.getItem(e2.value))), i;
            }
            _incrementalSearch() {
              const e2 = this, t = "radioButton" !== e2.selectionMode && "checkBox" !== e2.selectionMode && "zeroOrMany" !== e2.selectionMode && "oneOrMany" !== e2.selectionMode && "zeroOrOne" !== e2.selectionMode;
              let i, r2 = 0;
              switch (e2.incrementalSearchMode) {
                case "containsIgnoreCase":
                case "equalsIgnoreCase":
                case "startsWithIgnoreCase":
                case "endsWithIgnoreCase":
                  i = e2._incrementalSearchQuery.toLowerCase();
                  break;
                default:
                  i = e2._incrementalSearchQuery;
              }
              const o = function(i2) {
                i2.grouped || i2.readonly || (t ? (e2.selectedIndexes.length > 0 && e2.clearSelection(), e2._focus(i2), e2.select(i2)) : e2._focus(i2), (i2.height + i2.top > e2.$.itemsContainer.scrollTop + e2.$.itemsContainer.offsetHeight || i2.top < e2.scrollTop) && (e2.scrollTop = i2.top), 0 === e2._indexOf(i2) && (e2.scrollTop = 0), e2._indexOf(i2) === e2._items.length - 1 && (e2.scrollTop = e2.scrollHeight));
              };
              0 !== e2._previousEntry.localeCompare(i) && (e2._incrementalSearchItems = e2._queryItems(e2._incrementalSearchQuery, e2.incrementalSearchMode), delete e2._itemPosition), e2._previousEntry = i;
              const s = e2._incrementalSearchItems.length;
              if (0 !== s) if (1 !== s) for (void 0 !== e2._itemPosition ? e2._itemPosition < s - 1 ? r2 = e2._itemPosition : (r2 = 0, t ? (e2._incrementalSearchItems[e2._itemPosition].selected = false, e2.selectedIndexes = [], e2.selectedValues = []) : e2._incrementalSearchItems[e2._itemPosition]._focused = false) : t && e2.clearSelection(); r2 < s; r2++) if (e2._incrementalSearchItems[r2].selected && t) e2._incrementalSearchItems[r2].selected = false, e2.selectedIndexes = [], e2.selectedValues = [];
              else {
                if (t || !e2._incrementalSearchItems[r2]._focused) return o(e2._incrementalSearchItems[r2]), void (e2._itemPosition = r2);
                e2._incrementalSearchItems[r2]._focused = false;
              }
              else o(e2._incrementalSearchItems[0]);
            }
            _selectStartHandler(e2) {
              const t = this, i = (t.shadowRoot || t.getRootNode()).activeElement;
              t.$.filterInput !== i && t.$.editInput !== i && e2.preventDefault();
            }
            _handleArrowKeys(e2) {
              const t = this, i = "radioButton" !== t.selectionMode && "checkBox" !== t.selectionMode && "zeroOrMany" !== t.selectionMode && "oneOrMany" !== t.selectionMode && "zeroOrOne" !== t.selectionMode;
              if (t.disabled || t.readonly) return;
              let r2;
              if (t._focusedItem && !t._keysPressed.Shift) r2 = t._indexOf(t._focusedItem), t._focusedItem._focused = false;
              else {
                if (0 === t.selectedIndexes.length) return;
                r2 = t.selectedIndexes[t.selectedIndexes.length - 1];
              }
              const o = e2 ? t._getPreviousItem(r2) : t._getNextItem(r2);
              t._focus(o), i && (t._keysPressed.Shift ? t.select(o) : t._items[r2] !== o && (t.clearSelection(), t.select(o))), t.ensureVisible(o);
            }
            _refreshFilter() {
              const e2 = this;
              if (e2.filterable) return e2.$.filterInput.disabled = !(!e2.disabled && !e2.displayLoadingIndicator), e2.$filterInputContainer.removeClass("smart-hidden"), void e2.$itemsContainer.addClass("filter");
              e2.$.filterInput.disabled = true, e2.$filterInputContainer.addClass("smart-hidden"), e2.$itemsContainer.removeClass("filter");
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.removeAttribute("tabindex") : e2.tabIndex = e2.tabIndex > 0 ? e2.tabIndex : 0;
            }
            _setLoadingIndicatorVisibility() {
              const e2 = this;
              e2.displayLoadingIndicator ? e2.$loadingIndicatorContainer.hasClass("smart-visibility-hidden") ? e2.$loadingIndicatorContainer.removeClass("smart-visibility-hidden") : e2.$loadingIndicatorContainer.removeClass("smart-hidden") : e2._areCSSVarsSupported ? e2.$loadingIndicatorContainer.addClass("smart-hidden") : e2.$loadingIndicatorContainer.addClass("smart-visibility-hidden");
            }
            _refreshLayout() {
              const e2 = this, t = e2._filteredItems || e2._items;
              if (e2.__scrollHeight = null, e2.__scrollWidth = null, e2._height = null, e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2, e2.$.horizontalScrollBar, e2.$.verticalScrollBar)), e2.$itemsContainer.removeClass("hscroll"), e2.$itemsContainer.removeClass("vscroll"), !t || null === t || 0 === t.length) return e2.scrollWidth = 0, e2.scrollHeight = 0, e2.$filterInputContainer.removeClass("vscroll"), e2.$placeholder.removeClass("smart-hidden"), e2.isVirtualized && e2._recycle(), void (e2.$.itemsInnerContainer.style.width = "");
              e2.$placeholder.addClass("smart-hidden");
              const i = 2 * (parseInt(getComputedStyle(e2.$.itemsContainer).getPropertyValue("--smart-list-item-horizontal-offset")) || 0);
              let r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - i, o = e2._scrollHeight;
              if (e2._refreshHorizontalScrollBarVisibility(r2), e2._refreshVerticalScrollBarVisibility(o), e2.$.itemsInnerContainer.style.width = "", "hidden" === e2.horizontalScrollBarVisibility ? e2.$.itemsInnerContainer.style.width = e2.$.itemsContainer.offsetWidth - i : e2.$.itemsInnerContainer.style.width = Math.max(e2.$.itemsContainer.offsetWidth - i, -i + e2.__scrollWidth) + "px", e2.computedVerticalScrollBarVisibility) return r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - i, e2._refreshHorizontalScrollBarVisibility(r2), "hidden" !== e2.horizontalScrollBarVisibility && (e2.$.itemsInnerContainer.style.width = "", e2.$.itemsInnerContainer.style.width = Math.max(e2.$.itemsContainer.offsetWidth - i, -i + e2.__scrollWidth) + "px"), e2.computedHorizontalScrollBarVisibility && (("visible" !== e2.horizontalScrollBarVisibility || 0 !== e2.scrollWidth || "visible" === e2.horizontalScrollBarVisibility) && (e2.__scrollHeight += e2._scrollView.hScrollBar.offsetHeight), e2.scrollHeight = e2.__scrollHeight, e2._scrollView.hScrollBar.$.hasClass("bottom-corner") && e2._scrollView.hScrollBar.refresh()), void (e2.isVirtualized && e2._recycle());
              r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - i, e2._refreshHorizontalScrollBarVisibility(r2), e2.computedHorizontalScrollBarVisibility && (e2.scrollHeight = e2._scrollHeight, e2._refreshVerticalScrollBarVisibility(e2.scrollHeight), e2.computedVerticalScrollBarVisibility && (r2 = e2._scrollWidth - e2.$.itemsContainer.offsetWidth - e2._scrollView.vScrollBar.offsetWidth, e2._refreshHorizontalScrollBarVisibility(r2)), e2._scrollView.vScrollBar.$.hasClass("bottom-corner") && e2._scrollView.vScrollBar.refresh(), e2._scrollView.hScrollBar.$.hasClass("bottom-corner") && e2._scrollView.hScrollBar.refresh()), e2.isVirtualized && e2._recycle();
              const s = /Trident|Edge/.test(navigator.userAgent);
              !e2.isRefreshing && s && setTimeout(function() {
                e2.isRefreshing = true, e2._refreshLayout(), e2.isRefreshing = false;
              }, 50);
            }
            _styleChangedHandler() {
              this._refreshLayout();
            }
            _swipeLeftHandler() {
            }
            _swipeRightHandler() {
            }
            _refreshHorizontalScrollBarVisibility(e2) {
              const t = this;
              t.scrollWidth = e2, t.computedHorizontalScrollBarVisibility ? (t.scrollLeft = t._getScrollLeft(t.$.itemsContainer.scrollLeft, e2), t.$itemsContainer.addClass("hscroll")) : t.$itemsContainer.removeClass("hscroll");
            }
            _refreshVerticalScrollBarVisibility(e2) {
              const t = this;
              t.scrollHeight = e2, t.computedVerticalScrollBarVisibility ? (t.$itemsContainer.addClass("vscroll"), t.$filterInputContainer.addClass("vscroll")) : (t.$itemsContainer.removeClass("vscroll"), t.$filterInputContainer.removeClass("vscroll"));
            }
            _validateTemplate(e2, t) {
              if (null === t || !t) return;
              const i = this;
              return "content" in document.createElement("template") ? null !== (t = document.getElementById(t)) && "content" in t ? t : (i.error(i.localize("invalidTemplate", { elementType: i.nodeName.toLowerCase(), property: e2 })), void (i[e2] = null)) : (i.error(i.localize("htmlTemplateNotSuported", { elementType: i.nodeName.toLowerCase() })), void (i[e2] = null));
            }
            _getItemIndexByPosition(e2) {
              const t = this;
              return ((i) => {
                let r2 = 0, o = i.length - 1;
                if (e2 <= 0) return 0;
                if (i[i.length - 1].top <= e2) return i.length - 1;
                for (; ; ) {
                  const s = Math.floor((r2 + o) / 2), n = i[s];
                  if (t._isItemInPosition(n, e2)) return s;
                  n.top < e2 ? r2 = s + 1 : n.top > e2 && (o = s - 1);
                }
              })(t.filterable && t.$.filterInput.value.length > 0 ? t._filteredItems : t._items);
            }
            _isItemInPosition(e2, t) {
              const i = e2.top, r2 = e2.top + e2.height;
              return i <= t && r2 > t;
            }
            get isVirtualized() {
              const e2 = this;
              return e2.virtualized && e2.dataSource && e2.dataSource.length > 0;
            }
            _recycle() {
              const e2 = this;
              if (!e2._recyclingItems) return;
              let t = e2._height;
              e2._height || (t = e2._height = e2.$.itemsContainer.offsetHeight);
              let i = 0;
              const r2 = e2.scrollTop, o = e2._getItemIndexByPosition(r2), s = e2.filterable && e2.$.filterInput.value.length > 0 ? e2._filteredItems : e2._items, n = s[o];
              let l = n ? n.top : 0;
              if (e2.$.itemsInnerContainer.style.left = -e2.scrollLeft + "px", e2.$.itemsInnerContainer.style.top = -r2 + l + "px", e2.isUpdating++, o >= 0) {
                const n2 = s.length;
                for (let a2 = o; a2 < n2; a2++) {
                  const o2 = s[a2];
                  if (0 !== o2.height) {
                    if (!(l + o2.height >= r2 && l <= r2 + t)) break;
                    {
                      const t2 = e2._recyclingItems[i++];
                      if (!t2) break;
                      t2.setAttribute("aria-setsize", n2), t2.setAttribute("aria-posinset", a2), t2.context = document, t2.dataItem = o2, t2.label = o2.label, t2.value = o2.value, t2.selected = o2.selected, t2._focused = o2._focused, t2.hidden = o2.hidden, t2.grouped = o2.grouped, t2.readonly = o2.readonly, t2.style.height = o2.height + "px", e2._alternateItem(t2), o2.title ? t2.title = o2.title : t2.title = "", o2.grouped ? t2.displayMode = "plain" : t2.displayMode = o2.displayMode, e2.scrollWidth > 0 && (t2.style.width = e2.$.itemsInnerContainer.offsetWidth + e2.scrollWidth + "px"), e2.itemTemplate && e2._handleItemTemplate(e2.itemTemplate) && e2._applyTemplate(t2, false);
                    }
                    l += o2.height;
                  }
                }
              }
              if (i < e2._recyclingItems.length) for (let t2 = i; t2 < e2._recyclingItems.length; t2++) {
                const t3 = e2._recyclingItems[i++], r3 = t3.context;
                t3.context = document, t3.hidden = true, t3.context = r3;
              }
              e2.isUpdating--;
            }
            _verticalScrollbarHandler(e2) {
              const t = this, i = e2.detail.value;
              e2 && e2.stopPropagation && e2.stopPropagation(), t.isVirtualized ? t._recycle() : t.$.itemsContainer.scrollTop = i, t._updateTopVisibleIndex(), e2.context.max !== e2.context.value ? e2.context.min === e2.context.value && t.$.fireEvent("scrollTopReached") : t.$.fireEvent("scrollBottomReached");
            }
            _applyAriaSelected() {
              const e2 = this, t = e2.isVirtualized ? e2._recyclingItems : e2._items, i = e2.selectionMode;
              for (let e3 = 0; e3 < t.length; e3++) {
                const r2 = t[e3];
                r2.selected ? r2.setAttribute("aria-selected", true) : r2.readonly || r2.disabled || -1 === ["oneOrManyExtended", "zeroOrMany", "oneOrMany", "checkBox"].indexOf(i) ? r2.removeAttribute("aria-selected") : r2.setAttribute("aria-selected", false);
              }
            }
          });
        }
      ),
      /***/
      2629: (
        /***/
        () => {
          Smart("smart-masked-text-box", class extends Smart.BaseElement {
            static get properties() {
              return { allowPromptAsInput: { value: false, type: "boolean" }, asciiOnly: { value: false, type: "boolean" }, autoFocus: { value: false, type: "boolean" }, autoShowMask: { value: false, type: "boolean" }, cutCopyMaskFormat: { value: "excludePromptAndLiterals", allowedValues: ["excludePromptAndLiterals", "includePrompt", "includeLiterals", "includePromptAndLiterals"], type: "string" }, hidePromptOnLeave: { value: false, type: "boolean" }, hint: { value: "", reflectToAttribute: true, type: "string" }, isOverwriteMode: { value: false, type: "boolean" }, label: { value: "", reflectToAttribute: true, type: "string" }, mask: { value: "#####", type: "string" }, maskCompleted: { value: false, type: "boolean" }, maskFull: { value: false, type: "boolean" }, maxLength: { value: null, type: "number?" }, minLength: { value: 2, type: "number" }, name: { value: "", type: "string" }, placeholder: { value: "", type: "string" }, promptChar: { value: "_", type: "string" }, rejectInputOnFirstFailure: { value: false, type: "boolean" }, resetOnPrompt: { value: false, type: "boolean" }, resetOnSpace: { value: false, type: "boolean" }, selectAllOnFocus: { value: false, type: "boolean" }, textMaskFormat: { value: "excludePromptAndLiterals", allowedValues: ["excludePromptAndLiterals", "includePrompt", "includeLiterals", "includePromptAndLiterals"], type: "string" }, validation: { value: null, type: "function?", reflectToAttribute: false }, value: { value: null, reflectToAttribute: true, type: "string?" } };
            }
            static get listeners() {
              return { mouseenter: "_mouseEventsHandler", mouseleave: "_mouseEventsHandler", "input.copy": "_cutCopyHandler", "input.change": "_textBoxChangeHandler", "input.cut": "_cutCopyHandler", "input.paste": "_textBoxPasteHandler", "input.keydown": "_textBoxKeyDownHandler", "input.keyup": "_textBoxKeyUpHandler", "input.blur": "_blurHandler", "input.focus": "_focusHandler" };
            }
            static get styleUrls() {
              return ["smart.textbox.css", "smart.maskedtextbox.css"];
            }
            template() {
              return '<div id="container" role="presentation"><span id="label" inner-h-t-m-l="[[label]]" class="smart-hidden smart-label"></span><input class="smart-input" type="text" id="input"\n                   autocomplete="off"\n                   autocorrect="off"\n                   autocapitalize="off"\n                   disabled="[[disabled]]"\n                   maxlength="[[maxLength]]"\n                   minlength="[[minLength]]"\n                   name="[[name]]"\n                   placeholder="[[placeholder]]"\n                   readonly="[[readonly]]" /><span id="hint" inner-h-t-m-l="[[hint]]" class="smart-hidden smart-hint"></span></div>';
            }
            propertyChangedHandler(e2, t, a2) {
              const r2 = this;
              let l;
              switch (e2) {
                case "hidePromptOnLeave":
                  a2 && !r2._focused ? r2._hidePrompt() : r2._promptHidden && r2._showPrompt();
                  break;
                case "maxLength":
                  r2.mask.length > 0 && (r2.maxLength = t);
                  break;
                case "maskCompleted":
                case "maskFull":
                  r2[e2] = t;
                  break;
                case "promptChar":
                  r2._updatePromptChar();
                  break;
                case "placeholder":
                  r2._isPlaceholderRequired() ? (r2.$.input.value = "", r2.$.removeClass("has-value")) : r2._updatePromptChar(), r2._updatePromptChar();
                  break;
                case "mask":
                  l = r2._getValueWithTextMaskFormat({ start: 0, end: r2._mask.length }, "excludePromptAndLiterals"), r2._isPlaceholderRequired() ? (r2.$.input.value = "", r2.$.removeClass("has-value")) : (r2._initializeMask(), r2._setValueToMask(l), r2._isMobileChrome && document.activeElement === r2.$.input || r2._setMask(), r2.maxLength = r2._mask.length, r2._promptHidden && r2._hidePrompt());
                  break;
                case "value":
                  r2._overwrite = true, r2._setValueToMask(a2), r2._overwrite = false, r2._isMobileChrome && document.activeElement === r2.$.input || r2._setMask(), r2._promptHidden && r2._hidePrompt(), r2._updateMaskFullAndCompleted();
                  break;
                case "disabled":
                case "unfocusable":
                  r2._setFocusable();
                  break;
                case "readonly":
                  break;
                default:
                  super.propertyChangedHandler(e2, t, a2);
              }
              r2.value = r2._getValueWithTextMaskFormat({ start: 0, end: r2._mask.length }, r2.textMaskFormat);
            }
            render() {
              this._createElement(), super.render();
            }
            focus() {
              this.$.input.focus();
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.$.input.tabIndex = -1 : e2.$.input.removeAttribute("tabindex");
            }
            _createElement() {
              const e2 = this;
              e2.autoFocus && e2.$.input.focus(), e2.$.addClass("smart-input"), e2._setFocusable(), e2._initializeMask(), e2._updateMaxLength(), e2._isPlaceholderRequired() ? (e2.$.input.value = "", e2.$.removeClass("has-value")) : (e2._setValueToMask(e2.value), e2._isMobileChrome && document.activeElement === e2.$.input || e2._setMask(), e2._updateMaskFullAndCompleted(), e2.$.addClass("has-value")), e2.$.input.selectionStart = e2.$.input.selectionEnd = 0, e2._initializationValue = e2._value = e2.value, e2._rejectInput = false, e2.$.label.id || (e2.$.label.id = e2.id + "Label"), e2.$.hint.id || (e2.$.hint.id = e2.id + "Hint"), e2.hidePromptOnLeave && !e2._focused && e2._hidePrompt();
              const t = Smart.Utilities.Core;
              e2._isMobileChrome = t.isMobile && t.Browser.Chrome, e2.setAttribute("role", "presentation"), e2.$.input.setAttribute("aria-describedby", e2.$.hint.id), e2.$.input.setAttribute("aria-labelledby", e2.$.label.id);
            }
            _blurHandler() {
              const e2 = this, t = e2._isPlaceholderRequired();
              e2.disabled || (e2._valueBeforeChange !== e2.value && (e2.$.fireEvent("change", { value: e2.value, oldValue: e2._valueBeforeChange }), e2._valueBeforeChange = ""), e2._isMobileChrome && (e2._overwrite = true, e2._setValueToMask(e2.$.input.value), e2._overwrite = false, e2._setMask()), e2._focused = false, e2._hidePrompt(), e2._validateMaskValue(), e2.removeAttribute("focus"), e2.$.input.value.length > 0 ? e2.$.addClass("has-value") : e2.$.removeClass("has-value"), t && (e2.$.input.value = "", e2.$.removeClass("has-value")), e2.$.fireEvent("blur"));
            }
            _updateMaskFullAndCompleted() {
              const e2 = this;
              let t = true, a2 = true, r2 = false;
              for (let l = 0; l < e2._mask.length; l++) {
                const s = e2._mask[l];
                "mask" === s.type && (s.required && (r2 = true), "" === s.character && (s.required && (a2 = false), t = false));
              }
              t || !a2 || r2 || (a2 = false), e2.maskFull = t, e2.maskCompleted = a2;
            }
            _isPlaceholderRequired() {
              const e2 = this, t = e2.value && e2.value.length > 0, a2 = e2.placeholder.length > 0;
              return !t && (a2 || e2.autoShowMask);
            }
            _cleanMask(e2, t) {
              const a2 = this;
              e2 = e2 || 0, t = t || a2._mask.length;
              for (let r2 = e2; r2 < t; r2++) "mask" === a2._mask[r2].type && (a2._mask[r2].character = "");
            }
            _cutCopyHandler(e2, t) {
              const a2 = this, r2 = parseInt(a2.$.input.selectionStart, 10), l = parseInt(a2.$.input.selectionEnd, 10), s = a2._getValueWithTextMaskFormat({ start: r2, end: l });
              return window.clipboardData && (window.clipboardData.setData("text/plain", s), window.clipboardData.setData("text/html", s)), e2 && a2._preventDefault(e2), "Copy" === t || (a2._cleanMask(r2, l), a2.value = a2._getValueWithTextMaskFormat({ start: 0, end: a2._mask.length }, a2.textMaskFormat), a2._isMobileChrome && document.activeElement === a2.$.input || a2._setMask(), a2.$.input.selectionStart = a2.$.input.selectionEnd = r2, a2.maskFull = a2.maskCompleted = false), s;
            }
            _documentUpHandler() {
            }
            _deleteHandler(e2) {
              const t = this, a2 = t.$.input.selectionStart, r2 = t.$.input.selectionEnd, l = e2.key;
              let s = a2;
              if (t._preventDefault(e2), a2 === r2) if ("Backspace" === l || "Unidentified" === l) for (let e3 = a2; e3 > 0; e3--) {
                const r3 = t._mask[e3 - 1];
                if ("mask" === r3.type) {
                  s = e3 - 1, r3.character = "";
                  break;
                }
                s = a2 - 1;
                break;
              }
              else for (let e3 = a2; e3 < t._mask.length; e3++) {
                const r3 = t._mask[e3];
                if ("mask" === r3.type) {
                  s = e3 + 1, r3.character = "";
                  break;
                }
                s = a2 + 1;
                break;
              }
              else t._cleanMask(a2, r2), "Delete" === l && (s = r2);
              t._isMobileChrome && document.activeElement === t.$.input || t._setMask(), t._updateMaskFullAndCompleted(), t.value = t._getValueWithTextMaskFormat({ start: 0, end: t._mask.length }, t.textMaskFormat), t.$.input.selectionStart = t.$.input.selectionEnd = s;
            }
            _findNextOccupiedPosition(e2) {
              const t = this, a2 = t._mask.length;
              let r2 = e2;
              for (let l = e2; l < a2; l++) {
                let e3 = t._mask[l];
                if ("mask" !== e3.type || "" !== e3.character) break;
                r2++;
              }
              return r2;
            }
            select() {
              this.$.input.select();
            }
            _focusHandler(e2) {
              const t = this;
              if ("INPUT" === e2.context.nodeName.toUpperCase()) {
                if (!t.disabled) if (t.setAttribute("focus", ""), t.selectAllOnFocus && t.$.input.select(), t._focused = true, t._isMobileChrome) t._removeMask();
                else {
                  if (t._showPrompt(), t._isPlaceholderRequired()) {
                    t._initializeMask(), t._setValueToMask(t.value), t._setMask();
                    const e3 = t._getEditableSelectionStart(0);
                    t.$.input.selectionStart = t.$.input.selectionEnd = e3;
                  }
                  t.$.fireEvent("focus");
                }
              } else t.$.input.focus();
            }
            _setMask() {
              const e2 = this;
              let t = "";
              for (let a2 = 0; a2 < e2._mask.length; a2++) {
                const r2 = e2._mask[a2];
                let l;
                if ("literal" === r2.type || "separator" === r2.type || "placeholder" === r2.type || "currency" === r2.type) l = r2.character;
                else if ("mask" === r2.type && "" !== r2.character) switch (r2.escapeSymbol) {
                  case ">":
                    l = r2.character.toUpperCase();
                    break;
                  case "<":
                    l = r2.character.toLowerCase();
                    break;
                  case "|":
                  case "\\":
                  default:
                    l = r2.character;
                }
                else l = r2.defaultCharacter;
                t += l;
              }
              e2.$.input.value = t;
            }
            _removeMask() {
              const e2 = this;
              let t = "";
              for (let a2 = 0; a2 < e2._mask.length; a2++) {
                const r2 = e2._mask[a2];
                r2.character !== r2.defaultCharacter && (t += r2.character);
              }
              e2.$.input.value = t;
            }
            _getEditableSelectionStart(e2, t) {
              const a2 = this;
              for (let r2 = e2; r2 < a2._mask.length; r2++) {
                const e3 = a2._mask[r2];
                if ("mask" === e3.type && ("" === e3.character || a2.isOverwriteMode || " " === t && a2.resetOnSpace || t === a2.promptChar && a2.resetOnPrompt)) return r2;
              }
              return -1;
            }
            _getNonEditableSelectionStart(e2, t) {
              const a2 = this;
              for (let r2 = e2; r2 < a2._mask.length; r2++) {
                const e3 = a2._mask[r2];
                if ("mask" !== e3.type && e3.character === t) return r2;
              }
              return -1;
            }
            _getValueWithTextMaskFormat(e2, t) {
              const a2 = this, r2 = e2 ? e2.start : 0, l = e2 ? e2.end : a2._mask.length || a2.$.input.value.length;
              let s = "";
              if ("includePromptAndLiterals" === (t = t || a2.cutCopyMaskFormat)) return a2.$.input.value.substring(r2, l);
              for (let e3 = r2; e3 < l; e3++) {
                const r3 = a2._mask[e3];
                switch (t) {
                  case "excludePromptAndLiterals":
                    if ("mask" !== r3.type) continue;
                    s = "" === r3.character ? s + " " : s + r3.character;
                    break;
                  case "includePrompt":
                    if ("mask" !== r3.type) continue;
                    s = "" === r3.character ? s + r3.defaultCharacter : s + r3.character;
                    break;
                  case "includeLiterals":
                    if ("mask" === r3.type && "" === r3.character) continue;
                    s += r3.character;
                }
              }
              return s.trim();
            }
            _hidePrompt() {
              const e2 = this, t = new RegExp(e2.promptChar, "g");
              !e2.disabled && e2.hidePromptOnLeave && 0 !== e2.mask.length && (e2.$.input.value = e2.$.input.value.replace(t, " "), e2._promptHidden = true);
            }
            _initializeMask() {
              const e2 = this;
              let t, a2 = e2.mask.length;
              if (e2._mask = [], void 0 !== e2.mask && null !== e2.mask && 0 !== e2.mask.length) for (let r2 = 0; r2 < a2; r2++) {
                const a3 = e2.mask.charAt(r2);
                let l = {};
                switch (l.defaultCharacter = e2.promptChar, a3) {
                  case "0":
                    l.editable = true, l.required = true, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "0", l.regex = "\\d", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "9":
                    l.editable = true, l.required = false, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "9", l.regex = "(\\d|\\s)", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "#":
                    l.editable = true, l.required = false, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "#", l.regex = "(\\d|\\s|[+]|[-])", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "L":
                    l.editable = true, l.required = true, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "L", l.regex = "([a-zA-Zа-яА-Я])", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "?":
                    l.editable = true, l.required = false, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "?", l.regex = "[a-zA-Zа-яА-Я]?", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "&":
                    l.editable = true, l.required = true, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "&", l.regex = "[^\\s]", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "C":
                    l.editable = true, l.required = false, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "C", l.regex = ".", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "A":
                    l.editable = true, l.required = true, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "A", l.regex = "[a-zA-Zа-яА-Я0-9]", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "a":
                    l.editable = true, l.required = false, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "a", l.regex = "[a-zA-Zа-яА-Я0-9]?", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "Z":
                    l.editable = true, l.required = true, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "Z", l.regex = "[a-zA-Z0-9]", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "z":
                    l.editable = true, l.required = false, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "z", l.regex = "[a-zA-Z0-9]?", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "Y":
                    l.editable = true, l.required = true, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "Y", l.regex = "[a-zA-Z]", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "y":
                    l.editable = true, l.required = false, l.escapeSymbol = t, l.type = "\\" === l.escapeSymbol ? "literal" : "mask", l.maskCharacter = "y", l.regex = "[a-zA-Z]?", l.character = "\\" === l.escapeSymbol ? l.maskCharacter : "", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case ".":
                    l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "placeholder", l.maskCharacter = ".", l.regex = null, l.character = ".", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case ",":
                    l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "placeholder", l.maskCharacter = ",", l.regex = null, l.character = ",", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case ":":
                    l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "separator", l.maskCharacter = ":", l.regex = null, l.character = ":", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "/":
                    l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "separator", l.maskCharacter = "/", l.regex = null, l.character = "/", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "$":
                    l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "currency", l.maskCharacter = "$", l.regex = null, l.character = "$", l.defaultCharacter = e2.promptChar, t = null;
                    break;
                  case "<":
                    t ? "|" === t ? t = null : "\\" === t ? (l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "literal", l.maskCharacter = "<", l.regex = "<", l.character = "<", l.defaultCharacter = e2.promptChar, t = null) : t = "<" : t = "<";
                    break;
                  case ">":
                    t ? "|" === t ? t = null : "\\" === t ? (l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "literal", l.maskCharacter = ">", l.regex = ">", l.character = ">", l.defaultCharacter = e2.promptChar, t = null) : t = ">" : t = ">";
                    break;
                  case "|":
                    t && "\\" === t ? (l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "literal", l.maskCharacter = "|", l.regex = "|", l.character = "|", l.defaultCharacter = e2.promptChar, t = null) : t = "|";
                    break;
                  case "\\":
                    t && "\\" === t ? (l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "literal", l.maskCharacter = "\\", l.regex = "\\", l.character = "\\", l.defaultCharacter = e2.promptChar, t = null) : t = "\\";
                    break;
                  default:
                    l.editable = false, l.required = true, l.escapeSymbol = t, l.type = "literal", l.maskCharacter = a3, l.regex = null, l.character = a3, l.defaultCharacter = a3, t = null;
                }
                t || l.type && e2._mask.push(l);
              }
            }
            _keyDownHandler() {
            }
            _validateInput(e2, t) {
              const a2 = this._mask[t];
              return new RegExp(a2.regex).test(e2);
            }
            _setValueToMask(e2, t) {
              const a2 = this, r2 = e2 || "", l = r2.length, s = t && t.start ? t.start : 0, n = t && t.end ? t.end : a2._mask.length;
              let o = s, i = 0;
              for (; o < n && i < l; ) "mask" === a2._mask[o].type && i++, (a2._setCharAtPosition(r2.charAt(i - 1), o) || "mask" !== a2._mask[o].type) && o++;
              if (o < n) for (let e3 = o; e3 < n; e3++) "mask" === a2._mask[e3].type && (a2._mask[e3].character = "");
              t && (t.start = o);
            }
            _preventDefault(e2) {
              e2.preventDefault && e2.preventDefault(), e2.stopPropagation && e2.stopPropagation();
            }
            _showPrompt() {
              const e2 = this;
              !e2.disabled && e2._promptHidden && (e2._isMobileChrome && document.activeElement === e2.$.input || e2._setMask());
            }
            _textBoxChangeHandler(e2) {
              const t = this;
              t.disabled || t.readonly || (t.value = t._getValueWithTextMaskFormat({ start: 0, end: t._mask.length }, t.textMaskFormat), t._valueBeforeChange !== t.value && (t.$.fireEvent("change", { value: t.value, oldValue: t._valueBeforeChange }), t._valueBeforeChange = "", t._validateMaskValue()), e2 && e2.stopPropagation());
            }
            _textBoxKeyDownHandler(e2) {
              const t = this, a2 = e2.key;
              if (t._isMobileChrome) return;
              const r2 = e2.ctrlKey, l = t.$.input.selectionEnd, s = new RegExp("xxx[\0-]+xxx");
              let n = t.$.input.selectionStart;
              if (r2 && ["KeyA", "KeyC", "KeyV", "KeyX"].indexOf(e2.code) > -1) {
                const a3 = function(e3, a4) {
                  const r3 = document.createElement("textarea");
                  r3.style.position = "absolute", r3.style.left = "-1000px", r3.style.top = "-1000px", document.body.appendChild(r3), r3.focus(), "Paste" === e3 ? setTimeout(function() {
                    let e4 = r3.value;
                    0 === e4.length && window.clipboardData && (r3.value = window.clipboardData.getData("Text"), e4 = r3.value), r3.parentNode.removeChild(r3), t.$.input.focus(), a4(e4);
                  }, 25) : (r3.value = t._cutCopyHandler(null, e3), r3.focus(), r3.setSelectionRange(0, r3.value.length), setTimeout(function() {
                    document.designMode = "off", r3.focus(), r3.parentNode.removeChild(r3), t.$.input.focus();
                  }, 25), window.clipboardData && window.clipboardData.setData("Text", r3.value));
                };
                switch (e2.code) {
                  case "KeyA":
                    t.$.input.setSelectionRange(0, t.$.input.value.length);
                    break;
                  case "KeyC":
                    a3("Copy");
                    break;
                  case "KeyV":
                    a3("Paste", function(e3) {
                      const a4 = t.context;
                      t.context = t, t._textBoxPasteHandler(null, e3), t.context = a4;
                    });
                    break;
                  case "KeyX":
                    a3("Cut");
                }
                return;
              }
              if ("Backspace" === a2) return t._deleteHandler(e2), void t._updateMaskFullAndCompleted();
              if ("Delete" === a2) return t._deleteHandler(e2), void t._updateMaskFullAndCompleted();
              if (!t.allowPromptAsInput && a2 === t.promptChar) return void t._preventDefault(e2);
              if (t.disabled || t.readonly || t.asciiOnly && !s.test(a2) || !/^[a-zA-ZÀ-ÿа-яА-Я0-9.!@?#"$%&:';()*\+,\/;\-=[\\\]\^_{|}<>~` ]+$/.test(a2) || a2.length > 1) return;
              if (t._preventDefault(e2), n === l && n === t.$.input.value.length) return;
              if (" " === a2 && !t.resetOnSpace) return;
              n = t._getEditableSelectionStart(n, a2);
              const o = function() {
                n = t._getNonEditableSelectionStart(t.$.input.selectionStart, a2), -1 !== n && (t.$.input.selectionStart = t.$.input.selectionEnd = n + 1);
              };
              -1 !== n && t._setCharAtPosition(a2, n) ? (t._isMobileChrome && document.activeElement === t.$.input || t._setMask(), t._updateMaskFullAndCompleted(), t.$.input.selectionStart = t.$.input.selectionEnd = n + 1) : o();
            }
            _textBoxKeyUpHandler() {
              const e2 = this, t = e2.value;
              e2.value = e2._getValueWithTextMaskFormat({ start: 0, end: e2._mask.length }, e2.textMaskFormat), t !== e2.value && e2.$.fireEvent("changing", { value: e2.value, oldValue: t });
            }
            _textBoxPasteHandler(e2, t) {
              const a2 = this, r2 = a2.$.input.value, l = a2.$.input.selectionStart;
              let s, n = a2.$.input.selectionEnd;
              if (e2 && a2._preventDefault(e2), window.clipboardData && window.clipboardData.getData ? s = window.clipboardData.getData("Text") : e2 && e2.clipboardData && e2.clipboardData.getData ? s = e2.clipboardData.getData("text/plain") : t && (s = t), n - l !== r2.length) {
                if (l === n && (a2.$.input.selectionEnd = n = a2._mask.length), a2.rejectInputOnFirstFailure) {
                  let e4 = 0;
                  for (let t2 = l; t2 < n; t2++) if ("mask" === a2._mask[t2].type) {
                    if (!a2._validateInput(s.charAt(e4), t2)) return void (a2.$.input.selectionStart = a2.$.input.selectionEnd = l);
                    if (e4++, e4 > s.length) break;
                  }
                }
                const e3 = { start: l, end: n };
                a2._overwrite = true, a2._setValueToMask(s, e3), a2._isMobileChrome && document.activeElement === a2.$.input || a2._setMask(), a2._updateMaskFullAndCompleted(), a2.$.input.selectionStart = a2.$.input.selectionEnd = e3.start, a2.value = a2._getValueWithTextMaskFormat({ start: 0, end: a2._mask.length }, a2.textMaskFormat);
              }
            }
            _setCharAtPosition(e2, t) {
              const a2 = this, r2 = a2._mask[t];
              if (" " === e2 && a2.resetOnSpace && (e2 = ""), "mask" !== r2.type || a2.readonly || a2.disabled || !r2.editable) return false;
              if ("" === e2 && !a2.resetOnSpace) return false;
              if (e2 === a2.promptChar && !a2.resetOnPrompt && a2.allowPromptAsInput) return false;
              if (!a2.isOverwriteMode && "" !== e2 && e2 !== a2.promptChar && "" !== r2.character && !a2._overwrite) return false;
              const l = r2.regex;
              if (l) {
                if (new RegExp(l, "i").test(e2)) {
                  switch (r2.escapeSymbol) {
                    case ">":
                      e2 = e2.toUpperCase();
                      break;
                    case "<":
                      e2 = e2.toLowerCase();
                  }
                  return a2._mask[t].character = e2, true;
                }
                return a2.resetOnSpace && "" === e2 ? (a2._mask[t].character = e2, true) : !(!a2.resetOnPrompt || e2 !== a2.promptChar || !a2.allowPromptAsInput || (a2._mask[t].character = "", 0));
              }
              return false;
            }
            _updateMaxLength() {
              const e2 = this;
              e2._mask.length > 0 && (e2.maxLength = e2._mask.length);
            }
            _updatePromptChar() {
              const e2 = this;
              for (let t = 0; t < e2._mask.length; t++) e2._mask[t].defaultCharacter = e2.promptChar;
              e2._isMobileChrome && document.activeElement === e2.$.input || e2._setMask();
            }
            _validateMaskValue() {
              const e2 = this;
              if (e2.readonly || e2.disabled || !e2.validation || "function" != typeof e2.validation) return;
              const t = e2.value, a2 = e2.validation(t);
              a2 ? e2.removeAttribute("error") : e2.setAttribute("error", ""), e2.$.fireEvent("validation", { success: a2 });
            }
            _keyUpHandler() {
            }
            refresh() {
            }
            _resizeHandler() {
            }
            _selectStartHandler() {
            }
            _mouseWheelHandler() {
            }
            _applySelection() {
            }
            _setDropDownSize() {
            }
            _styleChangedHandler() {
            }
          });
        }
      ),
      /***/
      8687: (
        /***/
        () => {
          (() => {
            let t;
            try {
              BigInt, t = true;
            } catch (i) {
              t = false;
            }
            Smart.Utilities.Assign("BigNumber", class {
              constructor(t2, i, e2) {
                var r2, n = this;
                if (Smart.Utilities.BigNumber.bigIntSupport) {
                  if (t2 instanceof Smart.Utilities.BigNumber) {
                    if (!Array.isArray(t2._d)) return new Smart.Utilities.BigNumber(t2._d);
                    t2 = (t2._s ? "-" : "") + (t2._d.slice(0, t2._f).join("") || "0") + (t2._f != t2._d.length ? "." + t2._d.slice(t2._f).join("") : "");
                  }
                  try {
                    null === t2 ? n._d = BigInt(0) : "string" == typeof t2 && -1 !== t2.toLowerCase().indexOf("e") ? n._d = BigInt(parseFloat(t2)) : n._d = BigInt(t2);
                  } catch (i2) {
                    try {
                      const i3 = t2.toString().split(".");
                      let e3 = BigInt(i3[0]), r3 = parseInt(i3[1].charAt(0));
                      if (e3 >= 0 && r3 >= 5) e3 += BigInt(1);
                      else if (e3 < 0) {
                        if (r3 > 5) e3 -= BigInt(1);
                        else if (5 === r3) {
                          let t3 = 1, r4 = i3[1].charAt(t3), n2 = false;
                          for (; "" !== r4; ) if (t3++, r4 = i3[1].charAt(t3), "0" !== r4) {
                            n2 = true;
                            break;
                          }
                          n2 && (e3 -= BigInt(1));
                        }
                      }
                      n._d = e3;
                    } catch (t3) {
                      n._d = BigInt(0);
                    }
                  }
                  return n._f = n._d.toString().replace("-", "").length, void (n._s = n._d < 0);
                }
                if (t2 instanceof Smart.Utilities.BigNumber) {
                  if ("bigint" == typeof t2._d) return new Smart.Utilities.BigNumber(t2._d.toString());
                  for (r2 in { precision: 0, roundType: 0, _s: 0, _f: 0 }) n[r2] = t2[r2];
                  return n._d = t2._d.slice(), void (t2._s && 1 === t2._d.length && 0 === t2._d[0] && (n._s = false));
                }
                if (void 0 !== t2 && ("-0" === t2 && (t2 = "0"), new RegExp(/e/i).test(t2))) {
                  var s = t2.toString().toLowerCase(), a2 = s.indexOf("e"), l = new Smart.Utilities.BigNumber(s.slice(0, a2)), _2 = s.slice(a2 + 2), u2 = s.slice(a2 + 1, a2 + 2), o = new Smart.Utilities.BigNumber(10).pow(u2 + _2);
                  t2 = l.multiply(o).toString();
                }
                for (n.precision = isNaN(i = Math.abs(i)) ? Smart.Utilities.BigNumber.defaultPrecision : i, n.roundType = isNaN(e2 = Math.abs(e2)) ? Smart.Utilities.BigNumber.defaultRoundType : e2, n._s = "-" == (t2 += "").charAt(0), n._f = ((t2 = t2.replace(/[^\d.]/g, "").split(".", 2))[0] = t2[0].replace(/^0+/, "") || "0").length, r2 = (t2 = n._d = (t2.join("") || "0").split("")).length; r2; t2[--r2] = +t2[r2]) ;
                n.round();
              }
              static get defaultPrecision() {
                return 40;
              }
              static get defaultRoundType() {
                return 4;
              }
              static get bigIntSupport() {
                return t && true !== Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              }
              add(t2) {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d + new Smart.Utilities.BigNumber(t2)._d);
                let i = this.normalizeOperand(this);
                if (t2 = i.normalizeOperand(t2), i.isZero() && i._s && (i._s = false), 0 === t2 || t2.constructor === Smart.Utilities.BigNumber && 1 === t2._d.length && 0 === t2._d[0]) return new Smart.Utilities.BigNumber(i);
                if (i._s != (t2 = new Smart.Utilities.BigNumber(t2))._s) return t2._s ^= 1, i.subtract(t2);
                var e2, r2, n = new Smart.Utilities.BigNumber(i), s = n._d, a2 = t2._d, l = n._f, _2 = t2._f;
                for (t2 = Math.max(l, _2), l != _2 && ((_2 = l - _2) > 0 ? n._zeroes(a2, _2, 1) : n._zeroes(s, -_2, 1)), e2 = (l = s.length) == (_2 = a2.length) ? s.length : ((_2 = l - _2) > 0 ? n._zeroes(a2, _2) : n._zeroes(s, -_2)).length, r2 = 0; e2; r2 = (s[--e2] = s[e2] + a2[e2] + r2) / 10 >>> 0, s[e2] %= 10) ;
                return r2 && ++t2 && s.unshift(r2), n._f = t2, n.round();
              }
              subtract(t2) {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d - new Smart.Utilities.BigNumber(t2)._d);
                let i = this.normalizeOperand(this);
                if (t2 = i.normalizeOperand(t2), i.isZero() && i._s && (i._s = false), 0 === t2 || t2.constructor === Smart.Utilities.BigNumber && 1 === t2._d.length && 0 === t2._d[0]) return new Smart.Utilities.BigNumber(i);
                if (i._s != (t2 = new Smart.Utilities.BigNumber(t2))._s) return t2._s ^= 1, i.add(t2);
                var e2, r2, n = new Smart.Utilities.BigNumber(i), s = n.abs().compare(t2.abs()) + 1, a2 = s ? n : t2, l = s ? t2 : n, _2 = a2._f, u2 = l._f, o = _2;
                for (a2 = a2._d, l = l._d, _2 != u2 && ((u2 = _2 - u2) > 0 ? n._zeroes(l, u2, 1) : n._zeroes(a2, -u2, 1)), e2 = (_2 = a2.length) == (u2 = l.length) ? a2.length : ((u2 = _2 - u2) > 0 ? n._zeroes(l, u2) : n._zeroes(a2, -u2)).length; e2; ) {
                  if (a2[--e2] < l[e2]) {
                    for (r2 = e2; r2 && !a2[--r2]; a2[r2] = 9) ;
                    --a2[r2], a2[e2] += 10;
                  }
                  l[e2] = a2[e2] - l[e2];
                }
                return s || (n._s ^= 1), n._f = o, n._d = l, n.round();
              }
              multiply(t2) {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d * new Smart.Utilities.BigNumber(t2)._d);
                let i = this.normalizeOperand(this);
                t2 = i.normalizeOperand(t2);
                var e2, r2, n, s = new Smart.Utilities.BigNumber(i), a2 = s._d.length >= (t2 = new Smart.Utilities.BigNumber(t2))._d.length, l = (a2 ? s : t2)._d, _2 = (a2 ? t2 : s)._d, u2 = l.length, o = _2.length, g2 = new Smart.Utilities.BigNumber();
                for (e2 = o; e2; a2 && n.unshift(a2), g2.set(g2.add(new Smart.Utilities.BigNumber(n.join(""))))) for (n = new Array(o - --e2).join("0").split(""), a2 = 0, r2 = u2; r2; a2 += l[--r2] * _2[e2], n.unshift(a2 % 10), a2 = a2 / 10 >>> 0) ;
                return s._s = s._s != t2._s, s._f = ((a2 = u2 + o - s._f - t2._f) >= (r2 = (s._d = g2._d).length) ? i._zeroes(s._d, a2 - r2 + 1, 1).length : r2) - a2, s.round();
              }
              divide(t2) {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d / new Smart.Utilities.BigNumber(t2)._d);
                let i = this.normalizeOperand(this);
                if (t2 = i.normalizeOperand(t2), "0" == (t2 = new Smart.Utilities.BigNumber(t2))) throw new Error("Division by 0");
                if ("0" == i) return new Smart.Utilities.BigNumber();
                var e2, r2, n, s = new Smart.Utilities.BigNumber(i), a2 = s._d, l = t2._d, _2 = a2.length - s._f, u2 = l.length - t2._f, o = new Smart.Utilities.BigNumber(), g2 = 0, m2 = 1, d2 = 0, h2 = 0;
                for (o._s = s._s != t2._s, o.precision = Math.max(s.precision, t2.precision), o._f = +o._d.pop(), _2 != u2 && s._zeroes(_2 > u2 ? l : a2, Math.abs(_2 - u2)), t2._f = l.length, (l = t2)._s = false, l = l.round(), t2 = new Smart.Utilities.BigNumber(); "0" == a2[0]; a2.shift()) ;
                t: do {
                  for (n = d2 = 0, "0" == t2 && (t2._d = [], t2._f = 0); g2 < a2.length && -1 == t2.compare(l); ++g2) {
                    if (n = g2 + 1 == a2.length, (!m2 && ++d2 > 1 || (h2 = n && "0" == t2 && "0" == a2[g2])) && (o._f == o._d.length && ++o._f, o._d.push(0)), "0" == a2[g2] && "0" == t2 || (t2._d.push(a2[g2]), ++t2._f), h2) break t;
                    if (n && -1 == t2.compare(l) && (o._f == o._d.length && ++o._f, 1) || (n = 0)) for (; o._d.push(0), t2._d.push(0), ++t2._f, -1 == t2.compare(l); ) ;
                  }
                  if (m2 = 0, -1 == t2.compare(l) && !(n = 0)) for (; n ? o._d.push(0) : n = 1, t2._d.push(0), ++t2._f, -1 == t2.compare(l); ) ;
                  var f2;
                  for (r2 = new Smart.Utilities.BigNumber(), e2 = 0; t2.compare(f2 = r2.add(l)) + 1 && ++e2; r2.set(f2)) ;
                  t2.set(t2.subtract(r2)), !n && o._f == o._d.length && ++o._f, o._d.push(e2);
                } while ((g2 < a2.length || "0" != t2) && o._d.length - o._f <= o.precision);
                return o.round();
              }
              mod(t2) {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d % new Smart.Utilities.BigNumber(t2)._d);
                let i = this.normalizeOperand(this);
                t2 = i.normalizeOperand(t2);
                var e2 = i.subtract(i.divide(t2).intPart().multiply(t2));
                return e2.isZero() && e2._s && (e2._s = !e2._s), e2;
              }
              pow(t2) {
                if (Smart.Utilities.BigNumber.bigIntSupport) {
                  let i2 = BigInt(1);
                  for (let e3 = BigInt(0); e3 < new Smart.Utilities.BigNumber(t2)._d; e3 += BigInt(1)) i2 *= this._d;
                  return new Smart.Utilities.BigNumber(i2);
                }
                let i = this.normalizeOperand(this);
                t2 = i.normalizeOperand(t2);
                var e2, r2 = new Smart.Utilities.BigNumber(i);
                if (0 == (t2 = new Smart.Utilities.BigNumber(t2).intPart())) return r2.set(1);
                for (e2 = Math.abs(t2); --e2; r2.set(r2.multiply(i))) ;
                return t2 < 0 ? r2.set(new Smart.Utilities.BigNumber(1).divide(r2)) : r2;
              }
              set(t2) {
                return t2 = new Smart.Utilities.BigNumber(t2), this._d = t2._d, this._f = t2._f, this._s = t2._s, this;
              }
              compare(t2) {
                if (Smart.Utilities.BigNumber.bigIntSupport) {
                  const i2 = new Smart.Utilities.BigNumber(t2)._d;
                  return this._d === i2 ? 0 : this._d > i2 ? 1 : -1;
                }
                let i = this.normalizeOperand(this);
                t2 = i.normalizeOperand(t2);
                var e2, r2, n, s = i, a2 = i._f, l = new Smart.Utilities.BigNumber(t2), _2 = l._f, u2 = [-1, 1];
                if (s.isZero() && l.isZero()) return 0;
                if (s._s != l._s) return s._s ? -1 : 1;
                if (a2 != _2) return u2[a2 > _2 ^ s._s];
                for (a2 = (n = s._d).length, _2 = (l = l._d).length, e2 = -1, r2 = Math.min(a2, _2); ++e2 < r2; ) if (n[e2] != l[e2]) return u2[n[e2] > l[e2] ^ s._s];
                return a2 != _2 ? u2[a2 > _2 ^ s._s] : 0;
              }
              negate() {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d * BigInt(-1));
                let t2 = this.normalizeOperand(this);
                var i = new Smart.Utilities.BigNumber(t2);
                return i._s ^= 1, i;
              }
              abs() {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d < 0 ? this._d * BigInt(-1) : this._d);
                let t2 = this.normalizeOperand(this);
                var i = new Smart.Utilities.BigNumber(t2);
                return i._s = 0, i;
              }
              intPart() {
                if (Smart.Utilities.BigNumber.bigIntSupport) return new Smart.Utilities.BigNumber(this._d);
                let t2 = this.normalizeOperand(this);
                return new Smart.Utilities.BigNumber((t2._s ? "-" : "") + (t2._d.slice(0, t2._f).join("") || "0"));
              }
              valueOf(t2, i) {
                return this.normalizeOperand(this).toString(t2, i);
              }
              toString(t2, i, e2) {
                function r2(t3) {
                  var i2, e3, r3 = new Smart.Utilities.BigNumber(2), s2 = [];
                  e3 = void 0 === t3 ? n : t3;
                  do {
                    i2 = e3.mod(r3), s2.push(i2.toString()), e3 = e3.subtract(i2).divide(r3).intPart();
                  } while (1 === e3.compare(new Smart.Utilities.BigNumber(0)));
                  return s2.reverse().join("");
                }
                let n, s, a2;
                if (Smart.Utilities.BigNumber.bigIntSupport ? (n = this, s = Array.isArray(n._d) ? (n._s ? "-" : "") + (n._d.slice(0, n._f).join("") || "0") + (n._f != n._d.length ? "." + n._d.slice(n._f).join("") : "") : this._d.toString()) : (n = this.normalizeOperand(this), s = (n._s ? "-" : "") + (n._d.slice(0, n._f).join("") || "0") + (n._f != n._d.length ? "." + n._d.slice(n._f).join("") : "")), void 0 === t2 || 10 === t2) return s;
                if (n.compare(0) > -1) switch (t2) {
                  case 2:
                    a2 = r2(), e2 && (a2 = a2.padStart(i, "0"));
                    break;
                  case 8:
                    a2 = function(t3) {
                      for (var i2 = ""; t3.length % 3 != 0; ) t3 = "0" + t3;
                      for (var e3 = t3.length / 3; e3 >= 1; e3--) {
                        var r3 = t3[3 * e3 - 3] + "" + t3[3 * e3 - 2] + t3[3 * e3 - 1];
                        i2 = parseInt(r3, 2).toString(8) + "" + i2;
                      }
                      return i2;
                    }(r2());
                    break;
                  case 16:
                    a2 = function(t3) {
                      for (var i2 = ""; t3.length % 4 != 0; ) t3 = "0" + t3;
                      for (var e3 = t3.length / 4; e3 >= 1; e3--) {
                        var r3 = t3[4 * e3 - 4] + "" + t3[4 * e3 - 3] + t3[4 * e3 - 2] + t3[4 * e3 - 1];
                        i2 = parseInt(r3, 2).toString(16) + "" + i2;
                      }
                      return i2;
                    }(r2()).toUpperCase(), e2 && (a2 = a2.padStart(i / 4, "0"));
                }
                else a2 = function(t3, i2, e3) {
                  var r3 = "";
                  for (String.prototype.repeat && (t3 = "0".repeat(e3 - t3.length) + t3); t3.length < e3; ) t3 = "0" + t3;
                  for (var n2 = true, s2 = "", a3 = (r3 = (r3 = (r3 = (r3 = t3.replace(/0/g, "a")).replace(/1/g, "b")).replace(/a/g, "1")).replace(/b/g, "0")).length - 1; a3 >= 0; a3--) {
                    var l;
                    "0" === r3.charAt(a3) ? true === n2 ? (l = "1", n2 = false) : l = "0" : l = true === n2 ? "0" : "1", s2 = l + "" + s2;
                  }
                  switch (i2) {
                    case 2:
                      return s2;
                    case 8:
                      var _2, u2;
                      switch (e3) {
                        case 8:
                          _2 = 3, u2 = "0";
                          break;
                        case 16:
                          _2 = 6, u2 = "00";
                          break;
                        case 32:
                          _2 = 11, u2 = "0";
                          break;
                        case 64:
                          _2 = 22, u2 = "00";
                      }
                      s2 = u2 + s2;
                      for (var o = "", g2 = _2; g2 >= 1; g2--) {
                        var m2 = s2[3 * g2 - 3] + "" + s2[3 * g2 - 2] + s2[3 * g2 - 1];
                        o = parseInt(m2, 2).toString(8) + "" + o;
                      }
                      return o;
                    case 16:
                      var d2;
                      switch (e3) {
                        case 8:
                          d2 = 2;
                          break;
                        case 16:
                          d2 = 4;
                          break;
                        case 32:
                          d2 = 8;
                          break;
                        case 64:
                          d2 = 16;
                      }
                      for (var h2 = "", f2 = d2; f2 >= 1; f2--) {
                        var p2 = s2[4 * f2 - 4] + "" + s2[4 * f2 - 3] + s2[4 * f2 - 2] + s2[4 * f2 - 1];
                        h2 = parseInt(p2, 2).toString(16) + "" + h2;
                      }
                      return h2.toUpperCase();
                  }
                }(r2(n.negate()), t2, i);
                return a2;
              }
              _zeroes(t2, i, e2) {
                var r2 = ["push", "unshift"][e2 || 0];
                for (++i; --i; t2[r2](0)) ;
                return t2;
              }
              round() {
                if ("_rounding" in this) return this;
                var t2, i, e2, r2, n = Smart.Utilities.BigNumber, s = this.roundType, a2 = this._d;
                for (this._rounding = true; this._f > 1 && !a2[0]; --this._f, a2.shift()) ;
                for (t2 = this._f, e2 = a2[i = this.precision + t2]; a2.length > t2 && !a2[a2.length - 1]; a2.pop()) ;
                return r2 = (this._s ? "-" : "") + (i - t2 ? "0." + this._zeroes([], i - t2 - 1).join("") : "") + 1, a2.length > i && (e2 && s != n.DOWN && (s == n.UP || (s == n.CEIL ? !this._s : s == n.FLOOR ? this._s : s == n.HALF_UP ? e2 >= 5 : s == n.HALF_DOWN ? e2 > 5 : s == n.HALF_EVEN && (e2 >= 5 && 1 & a2[i - 1]))) && this.add(r2), a2.splice(i, a2.length - i)), delete this._rounding, this;
              }
              isZero() {
                return 1 === this._d.length && 0 === this._d[0];
              }
              normalizeOperand(t2) {
                return t2 instanceof Smart.Utilities.BigNumber && "bigint" == typeof t2._d ? new Smart.Utilities.BigNumber(t2._d.toString()) : t2;
              }
            });
          })();
        }
      ),
      /***/
      1115: (
        /***/
        () => {
          Smart("smart-multiline-text-box", class extends Smart.TextBox {
            static get properties() {
              return { autoCapitalize: { value: "none", allowedValues: ["none", "words", "characters"], type: "string" }, autoComplete: { value: "off", allowedValues: ["on", "off"], type: "string" }, autoExpand: { value: false, type: "boolean" }, cols: { value: 20, type: "number?" }, enterKeyBehavior: { value: "newLine", allowedValues: ["submit", "clearOnSubmit", "newLine"], type: "string" }, horizontalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, minLength: { value: 0, type: "number" }, resizable: { value: false, type: "boolean" }, rows: { value: 5, type: "number?" }, selectionDirection: { value: "none", allowedValues: ["forward", "backward", "none"], type: "string" }, selectionEnd: { value: 0, reflectToAttribute: false, type: "number" }, selectionStart: { value: 0, reflectToAttribute: false, type: "number" }, spellCheck: { value: false, type: "boolean" }, type: { value: "textarea", type: "string", defaultReflectToAttribute: true, readonly: true }, verticalScrollBarVisibility: { type: "string", value: "auto", allowedValues: ["auto", "disabled", "hidden", "visible"] }, wrap: { value: "soft", allowedValues: ["hard", "soft", "off"], type: "string" } };
            }
            static get styleUrls() {
              return ["smart.textbox.css", "smart.multilinetextbox.css"];
            }
            static get listeners() {
              return { "document.mousemove": "_documentSelectionOutsideHandler", "container.resize": "_handleScrollbarsDisplay", "document.move": "_resizeMoveHandler", "document.up": "_upHandler", focus: "_focusHandler", "horizontalScrollBar.change": "_horizontalScrollbarHandler", keydown: "_keyDownHandler", mouseenter: "_mouseEventsHandler", mouseleave: "_mouseEventsHandler", resize: "_handleScrollbarsDisplay", "resizeElement.down": "_resizeDownHandler", styleChanged: "_handleScrollbarsDisplay", "input.change": "_textBoxChangeHandler", "input.focus": "_focusHandler", "input.blur": "_blurHandler", "input.keydown": "_textBoxKeyDownHandler", "input.keyup": "_keyUpHandler", "input.paste": "_textBoxChangeHandler", "input.select": "_textBoxSelectHandler", "input.touchmove": "_inputTouchmoveHandler", "input.touchstart": "_inputTouchstartHandler", wheel: "_mouseWheelHandler", "verticalScrollBar.change": "_verticalScrollbarHandler" };
            }
            attached() {
              const e2 = this;
              super.attached(), e2._scrollView || (e2._scrollView = new Smart.Utilities.Scroll(e2.$.input, e2.$.horizontalScrollBar, e2.$.verticalScrollBar));
            }
            detached() {
              const e2 = this;
              super.detached(), e2._scrollView && (e2._scrollView.unlisten(), delete e2._scrollView);
            }
            static get requires() {
              return { "Smart.ScrollBar": "smart.scrollbar.js" };
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span id="label" class="smart-label">[[label]]</span>\n                    <div id="innerContainer" class="smart-inner-container" role="presentation">\n                            <textarea class="smart-input" id="input"\n                                autocapitalize="[[autoCapitalize]]"\n                                autocomplete="off"\n                                cols="[[cols]]"\n                                disabled="[[disabled]]"\n                                maxlength="[[maxLength]]"\n                                minlength="[[minLength]]"\n                                name="[[name]]"\n                                placeholder="[[placeholder]]"\n                                readonly="[[readonly]]"\n                                required="[[required]]"\n                                rows="[[rows]]"\n                                spellcheck="[[spellCheck]]"\n                                wrap="[[wrap]]"\n                                aria-label="[[placeholder]]"\n                                autocomplete="[[inputPurpose]]"></textarea>\n                            <smart-scroll-bar id="verticalScrollBar" theme="[[theme]]" right-to-left="[[rightToLeft]]" animation="[[animation]]" disabled="[[disabled]]" orientation="vertical"></smart-scroll-bar>\n                            <smart-scroll-bar id="horizontalScrollBar" theme="[[theme]]" right-to-left="[[rightToLeft]]" animation="[[animation]]" disabled="[[disabled]]"></smart-scroll-bar>\n                            <div id="resizeElement" class="smart-resize-element" aria-label="Resize"></div>\n\n                            <textarea id="textBoxHidden"\n                            class="smart-text-box-hidden"\n                            autocapitalize="[[autoCapitalize]]"\n                            autocomplete="off"\n                            cols="[[cols]]"\n                            disabled="[[disabled]]"\n                            inner-h-t-m-l="[[value]]"\n                            maxlength="[[maxLength]]"\n                            minlength="[[minLength]]"\n                            name="[[name]]"\n                            placeholder="[[placeholder]]"\n                            readonly="[[readonly]]"\n                            required="[[required]]"\n                            rows="[[rows]]"\n                            spellcheck="[[spellCheck]]"\n                            wrap="[[wrap]]"></textarea>\n                    </div>\n                    <span id="hint" class="smart-hidden smart-hint">[[hint]]</span>\n                </div>';
            }
            propertyChangedHandler(e2, t, l) {
              const a2 = this;
              switch (e2) {
                case "autoExpand":
                  a2._autoExpandUpdate();
                  break;
                case "displayMode":
                  switch (l) {
                    case "escaped":
                      a2.$.input.value = a2._toEscapedDisplayMode(a2.value);
                      break;
                    default:
                      a2.$.input.value = a2.value = a2._toDefaultDisplayMode(a2.$.input.value);
                  }
                  a2._autoExpandUpdate(), a2._handleScrollbarsDisplay();
                  break;
                case "value":
                  switch (a2._preventProgramaticValueChange ? (a2._userValue = "escaped" === a2.displayMode ? a2._toDefaultDisplayMode(a2.$.input.value) : a2.$.input.value, a2._programmaticValue = l) : a2._userValue = a2._programmaticValue = l, a2.displayMode) {
                    case "escaped":
                      a2.$.input.value = a2._toEscapedDisplayMode(a2._userValue);
                      break;
                    default:
                      a2.$.input.value = a2._userValue;
                  }
                  a2._oldValue = t, a2._autoExpandUpdate(), a2._handleScrollbarsDisplay();
                  break;
                case "horizontalScrollBarVisibility":
                case "verticalScrollBarVisibility":
                case "singleLine":
                case "wrap":
                case "resizable":
                case "placeholder":
                  a2._autoExpandUpdate(), a2._handleScrollbarsDisplay();
                  break;
                case "selectionEnd":
                case "selectionStart":
                  a2._handleSelectedText();
                  break;
                case "rows":
                case "cols":
                  a2._updateSizeRowsCols();
                  break;
                case "disabled":
                  a2._setFocusable(), a2._ariaPropertyChangedHandler("disabled", l);
                  break;
                case "animation":
                  break;
                case "readonly":
                  a2._ariaPropertyChangedHandler("readonly", l);
                  break;
                default:
                  super.propertyChangedHandler(e2, t, l);
              }
            }
            selection(e2) {
              const t = this;
              let l = t.$.input.selectionStart, a2 = t.$.input.selectionEnd, i = t.value;
              return "escaped" === t.displayMode ? (i = t.$.input.value.substring(l, a2), "escaped" === e2 ? i : t._toDefaultDisplayMode(i)) : "escaped" === e2 ? (i = i.substring(l, a2), t._toEscapedDisplayMode(i)) : (i = i.substring(l, a2), i);
            }
            select(e2, t) {
              const l = this, a2 = Array.from(arguments).slice(0, 2);
              let i, n;
              for (let e3 in a2) a2[e3] = parseInt(a2[e3]) || 0;
              return 2 === a2.length ? (i = Math.min([e2, t]), n = Math.max([e2, t])) : i = a2[0], 2 === a2.length ? (i = parseInt(i), i = i > 0 ? i < l.$.input.length ? l.$.input.length : i : 0, n < i ? n = i : n > l.$.input.length && (i = 0), l.$.input.focus(), void l.$.input.setSelectionRange(i, n)) : 1 === a2.length ? (l.$.input.focus(), void l.$.input.setSelectionRange(i, i + 1)) : void l.$.input.select();
            }
            _autoExpandUpdate() {
              const e2 = this, t = e2.$.input, l = e2.$.textBoxHidden, a2 = e2.$.verticalScrollBar;
              if (!e2.autoExpand) return void (t.style.height = a2.style.height = l.style.height = null);
              const i = parseFloat(window.getComputedStyle(e2).getPropertyValue("max-height"));
              l.style.height = 0, l.value = t.value;
              let n = 0;
              e2.resizeTrigger && (n = e2.resizeTrigger.clientHeight, n === e2.clientHeight && (n = 0)), t.style.height = a2.style.height = (isNaN(i) ? l.scrollHeight : Math.min((i || 0) - n, l.scrollHeight)) + "px";
            }
            _blurHandler() {
              const e2 = this;
              e2._outsideAutoScroll && clearInterval(e2._outsideAutoScroll), e2.removeAttribute("focus"), e2._preventProgramaticValueChange = false, e2._oldValue = e2.value, e2.value = e2._userValue || e2.value, e2.$.fireEvent("blur");
            }
            _createElement() {
              const e2 = this;
              e2.$.input.id || (e2.$.input.id = e2.id + "Input"), e2.autoFocus && (navigator.userAgent.match(/Edge/) ? setTimeout(function() {
                e2.$.input.focus(), e2.setAttribute("focus", "");
              }, 10) : (e2.$.input.focus(), e2.setAttribute("focus", "")));
              const t = e2.$.input.innerHTML;
              e2.value ? e2.$.input.innerHTML = "escaped" === e2.displayMode ? e2._toEscapedDisplayMode(e2.value) : e2.value : t.length > 0 && "escaped" === e2.displayMode ? (e2.value = t, e2.$.input.innerHTML = e2._toEscapedDisplayMode(t)) : t.length > 0 && (e2.value = t), e2._setFocusable(), e2._syncTextBoxContentOnInitialization(), e2._scrollView = new Smart.Utilities.Scroll(e2.$.input, e2.$.horizontalScrollBar, e2.$.verticalScrollBar), e2._autoExpandUpdate(), e2._handleScrollbarsDisplay(), e2._initializationValue = e2._oldValue = e2.value, e2.value.length > 0 ? e2.$.addClass("has-value") : e2.$.removeClass("has-value"), e2._handleHintContainer(), e2.setAttribute("role", "textbox"), e2.setAttribute("aria-multiline", true), e2.setAttribute("aria-describedby", e2.$.hint.id), e2.setAttribute("aria-labelledby", e2.$.label.id), e2.$.verticalScrollBar.setAttribute("aria-controls", e2.$.input.id), e2.$.horizontalScrollBar.setAttribute("aria-controls", e2.$.input.id);
            }
            _handleScrollbarsDisplay(e2) {
              const t = this, l = t.$.input;
              requestAnimationFrame(() => {
                switch (t._autoExpandUpdate(), t.horizontalScrollBarVisibility) {
                  case "disabled":
                    t.$container.addClass("hscroll"), t.$.horizontalScrollBar.disabled = true;
                    break;
                  case "hidden":
                    t.$container.removeClass("hscroll");
                    break;
                  case "visible":
                    t.$container.addClass("hscroll"), t._scrollView.scrollWidth = l.scrollWidth - l.clientWidth, t._scrollView.scrollTo(t.$.input.scrollLeft, true), t.$.horizontalScrollBar.disabled = false;
                    break;
                  default:
                    l.scrollWidth > l.clientWidth ? (t.$container.addClass("hscroll"), t._scrollView.scrollWidth = l.scrollWidth - l.clientWidth, e2 && "resize" === e2.type ? t.$.input.scrollLeft = t._scrollView.scrollLeft : t._scrollView.scrollTo(t.$.input.scrollLeft, true)) : t.$container.removeClass("hscroll"), t.$.horizontalScrollBar.disabled = false;
                }
                switch (t.verticalScrollBarVisibility) {
                  case "disabled":
                    t.$container.addClass("vscroll"), t.$.verticalScrollBar.disabled = true;
                    break;
                  case "hidden":
                    t.$container.removeClass("vscroll");
                    break;
                  case "visible":
                    t.$container.addClass("vscroll"), t._scrollView.scrollHeight = l.scrollHeight - l.clientHeight, t._scrollView.scrollTo(t.$.input.scrollTop), t.$.verticalScrollBar.disabled = false;
                    break;
                  default:
                    l.scrollHeight > l.clientHeight ? (t.$container.addClass("vscroll"), t._scrollView.scrollHeight = l.scrollHeight - l.clientHeight, e2 && "resize" === e2.type ? t.$.input.scrollTop = t._scrollView.scrollTop : t._scrollView.scrollTo(t.$.input.scrollTop)) : t.$container.removeClass("vscroll"), t.$.verticalScrollBar.disabled = false;
                }
              });
            }
            _focusHandler(e2) {
              const t = this;
              if (!t.disabled) {
                if (e2.target === t) return t.$.input.focus(), void (t._edgeSelect = false);
                if (t.setAttribute("focus", ""), t.selectAllOnFocus) if (navigator.userAgent.match(/Edge/)) {
                  const e3 = t.$.input.scrollTop;
                  if (t._edgeSelect) return void (t._edgeSelect = false);
                  setTimeout(function() {
                    t._edgeSelect = true, t.$.input.select(), t.$.input.scrollTop = e3;
                  }, 5);
                } else t.$.input.select();
                t.$.fireEvent("focus");
              }
            }
            _getScrollLeft(e2, t) {
              const l = this;
              return l.rightToLeft ? (Smart.Utilities.Core.Browser.Chrome ? (t || (t = l.$.input.scrollWidth - l.$.input.offsetWidth), e2 = t - e2) : e2 *= -1, e2) : e2;
            }
            _horizontalScrollbarHandler(e2) {
              const t = this;
              t.disabled || "hidden" === t.horizontalScrollBarVisibility || "disabled" === t.horizontalScrollBarVisibility || (e2.stopPropagation(), t.$.input.scrollLeft = t._getScrollLeft(e2.detail.value));
            }
            _keyDownHandler(e2) {
              const t = this, l = e2.key, a2 = e2.shiftKey, i = e2.ctrlKey, n = t.$.input.value;
              function r2(l2) {
                let a3 = t.$.input.selectionStart, i2 = t.$.input.selectionEnd, n2 = t.$.input.value;
                e2.preventDefault(), t.$.input.value = n2.substring(0, a3) + l2 + n2.substring(i2, n2.length), t.value = t._toDefaultDisplayMode(t.$.input.value), t.$.input.selectionStart = a3 + 2, t.$.input.selectionEnd = a3 + 2;
              }
              if (t.allowVerticalScrollbar && t.$.input.selectionEnd > t.$.input.value.length - 5 && t._scrollView.scrollTo(t._scrollView.scrollTop + (e2.deltaY < 0 ? -t.offsetHeight : t.offsetHeight)), l.indexOf("Arrow") > -1) e2.stopPropagation();
              else switch (l) {
                case "Enter":
                  if ("newLine" === t.enterKeyBehavior && !i && !a2 || "newLine" !== t.enterKeyBehavior && (i || a2)) {
                    "escaped" === t.displayMode && r2("\\n");
                    break;
                  }
                  e2.preventDefault(), t._userValue = "escaped" === t.displayMode ? t._toDefaultDisplayMode(t.$.input.value) : t.$.input.value, t.value = t._userValue, ("submit" === t.enterKeyBehavior || "clearOnSubmit" === t.enterKeyBehavior || "" !== n && t._userValue !== t._oldValue) && t.$.fireEvent("change", { oldValue: t._oldValue, value: n, type: "submit" }), "clearOnSubmit" === t.enterKeyBehavior && (t.$.input.value = ""), t._oldValue = t.value = t._toDefaultDisplayMode(t.$.input.value), t._submitted = true, "escaped" === t.displayMode && t.enterKeyBehavior.toLowerCase().indexOf("submit") < 0 && !i && !a2 && r2("\\n"), ("submit" === t.enterKeyBehavior || "newLine" === t.enterKeyBehavior && i) && t.$.input.blur();
                  break;
                case "Escape":
                  if ("none" === t.escKeyMode) return;
                  switch (t.escKeyMode) {
                    case "none":
                      break;
                    case "clearValue":
                      t.value = t.$.input.value = "";
                      break;
                    case "previousValue":
                      t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(t._oldValue) : t._oldValue;
                  }
                  break;
                case " ":
                  "escaped" === t.displayMode && r2("\\s");
                  break;
                case "Backspace":
                  if ("escaped" === t.displayMode && t.$.input.selectionStart === t.$.input.selectionEnd) {
                    let e3 = t.$.input.selectionStart;
                    "\\" !== n[e3 - 2] || "s" !== n[e3 - 1] && "n" !== n[e3 - 1] || (t.$.input.value = t.$.input.value.substring(0, e3 - 2) + t.$.input.value.substring(e3 - 2, t.$.input.value.length), t.$.input.selectionStart = e3 - 2);
                  }
                  t._scrollView && t._handleScrollbarsDisplay();
              }
            }
            _keyUpHandler(e2) {
              const t = this;
              switch (e2.key) {
                case "ArrowLeft":
                case "ArrowUp":
                case "ArrowDown":
                  t._handlePointerInEscapedSymbol();
                  break;
                case "ArrowRight":
                  t._handlePointerInEscapedSymbol("next");
              }
              t._userValue = "escaped" === t.displayMode ? t._toDefaultDisplayMode(t.$.input.value) : t.$.input.value, t._submitKeyUpHandler();
            }
            _textBoxKeyDownHandler(e2) {
              const t = this, l = e2.key;
              t._scrollView && t._handleScrollbarsDisplay(), t.value && t.value.length > 0 ? t.$.addClass("has-value") : t.$.removeClass("has-value"), -1 === ["Enter", "Escape"].indexOf(l) && (t._preventProgramaticValueChange = true), ["ArrowLeft", "ArrowUp", "ArrowDown", "ArrowRight"].indexOf(l) > -1 && t._scrollView.scrollTo(t.$.input.scrollTop), ["PageUp", "PageDown"].indexOf(l) > -1 && Smart.Utilities.Core.Browser.Chrome && ("PageUp" === e2.key && (t.$.input.setSelectionRange(0, 0), t.$.input.scrollTop = 0), "PageDown" === e2.key && (t.$.input.setSelectionRange(t.$.input.value.length, t.$.input.value.length), t.$.input.scrollTop = t._scrollView.verticalScrollBar.max), e2.preventDefault());
            }
            _mouseWheelHandler(e2) {
              const t = this;
              t.disabled || t.$.verticalScrollBar.disabled || (t._scrollView.scrollTo(t._scrollView.scrollTop + (e2.deltaY < 0 ? -t.offsetHeight : t.offsetHeight)), t.$.input.scrollTop += e2.deltaY < 0 ? -t.offsetHeight : t.offsetHeight, t.$.input.scrollTop > 0 && e2.preventDefault());
            }
            _syncTextBoxContentOnInitialization() {
              const e2 = this;
              let t;
              t = "" === e2.value ? e2.innerHTML : e2.value, "escaped" !== e2.displayMode ? e2.$.input.value = e2.value = e2._initializationValue = t : t.match(/\r\n|\n\r|\n|\r|\s|\t|\f|\r/g) ? (e2.value = e2._initializationValue = t, e2.$.input.value = e2._toEscapedDisplayMode(t)) : (e2.value = e2._initializationValue = e2._toDefaultDisplayMode(t), e2.$.input.value = t);
            }
            _textBoxChangeHandler(e2) {
              const t = this, l = e2.clipboardData || e2.originalEvent && e2.originalEvent.clipboardData || window.clipboardData, a2 = t.value;
              if ("escaped" === t.displayMode) {
                const a3 = t.$.input.selectionStart, i = t.$.input.selectionEnd;
                if (l) {
                  let n = l.getData("text"), r2 = t.$.input.value;
                  e2.preventDefault(), n = t._toEscapedDisplayMode(n), t.$.input.value = r2.substring(0, a3) + n + r2.substring(i, r2.length);
                }
                t.value = t._toDefaultDisplayMode(t.$.input.value);
              } else t.value = t.$.input.value;
              t._handleScrollbarsDisplay(), t.value.length > 0 ? t.$.addClass("has-value") : t.$.removeClass("has-value"), l || t.$.fireEvent("change", { value: t.value, oldValue: a2, type: "blur" }), t._handleHintContainer();
            }
            _inputTouchmoveHandler(e2) {
              const t = this;
              if ((t._resizeStarted || t._touchmoveInside) && e2.cancelable) return e2.preventDefault(), void e2.stopPropagation();
              const l = t.$.container.classList.contains("vscroll"), a2 = t._touchCoords;
              if (!t.$.container.classList.contains("hscroll") && !l || !a2) return;
              const i = t._scrollView, n = e2.touches[0];
              let r2, o, s, c;
              t._touchCoords = [n.pageX, n.pageY], l ? (r2 = i.scrollTop, o = i.scrollHeight, s = n.pageY, c = a2[1]) : (r2 = i.scrollLeft, o = i.scrollWidth, s = n.pageX, c = a2[0]);
              const u2 = parseFloat(s.toFixed(5)), d2 = parseFloat(c.toFixed(5));
              0 === r2 && u2 >= d2 || r2 === o && u2 <= d2 || (s !== c && (t._touchmoveInside = true), e2.cancelable && (e2.preventDefault(), e2.stopPropagation()));
            }
            _inputTouchstartHandler(e2) {
              const t = e2.touches[0];
              this._touchCoords = [t.pageX, t.pageY];
            }
            _resizeDownHandler() {
              const e2 = this;
              !e2.disabled && e2.resizable && (e2._resizeStarted = true, e2.$container.addClass("smart-resize"), e2.readonly || e2.$.input.setAttribute("readonly", ""));
            }
            _resizeMoveHandler(e2) {
              const t = this;
              if (t.disabled || !t.resizable || !t._resizeStarted) return;
              const l = t.getBoundingClientRect(), a2 = 50, i = 50, n = t.rightToLeft ? l.width + l.left - e2.clientX : e2.clientX - l.left, r2 = e2.clientY - l.top;
              n > a2 && (t.style.width = n + "px"), r2 > i && (t.style.height = r2 + "px");
            }
            _updateSizeRowsCols() {
              const e2 = this;
              e2.$.container.removeAttribute("style"), setTimeout(function() {
                if (!("disabled" !== e2.horizontalScrollBarVisibility && "hidden" !== e2.horizontalScrollBarVisibility || "disabled" !== e2.verticalScrollBarVisibility && "hidden" !== e2.verticalScrollBarVisibility)) return;
                const t = e2.getBoundingClientRect();
                e2.$.container.style.width = t.width + "px", e2.$.container.style.height = t.height + "px";
              }, 0);
            }
            _upHandler(e2) {
              const t = this;
              delete t._touchCoords, delete t._touchmoveInside, t._selectionStarted = false, t.disabled || (e2.originalEvent.target !== t.$.input ? (t.$container.removeClass("smart-resize"), t.readonly || t.$.input.removeAttribute("readonly"), t._resizeStarted && t.$.input.focus(), t._resizeStarted = false) : t._handlePointerInEscapedSymbol());
            }
            _verticalScrollbarHandler(e2) {
              const t = this;
              t.disabled || "disabled" === t.verticalScrollBarVisibility || "hidden" === t.verticalScrollBarVisibility || (e2.stopPropagation(), t.$.input.scrollTop = e2.detail.value);
            }
            _documentDownHandler(e2) {
              const t = this;
              t._selectionStarted = false, e2.originalEvent && t.$.input.contains(e2.originalEvent.target) && (t._selectionStarted = true, t._selectionStartTime = /* @__PURE__ */ new Date(), t._pointerDown = { pageX: e2.pageX, pageY: e2.pageY }, t._edgeSelect = false);
            }
            _documentSelectionOutsideHandler(e2) {
              const t = this;
              if (clearInterval(t._outsideAutoScroll), !t._selectionStarted) return;
              const l = t.$.input.getBoundingClientRect(), a2 = l.y + 10, i = l.y + l.height - 10;
              function n(l2) {
                const a3 = t.getBoundingClientRect(), i2 = document.documentElement, n2 = l2 ? "Left" : "Top";
                (l2 ? a3.left + i2.scrollLeft - e2.pageX : a3.top + i2.scrollTop - e2.pageY) > 0 ? (t.$.input["scroll" + n2] -= 10, t._scrollView["scroll" + n2] -= 10) : (t.$.input["scroll" + n2] += 10, t._scrollView["scroll" + n2] += 10);
              }
              e2.pageY > a2 && e2.pageY < i || !(/* @__PURE__ */ new Date() - t._selectionStartTime < 300) && (Math.abs(t._pointerDown.pageX - e2.pageX) >= 3 || Math.abs(t._pointerDown.pageY - e2.pageY) >= 3) && (t._outsideAutoScroll = setInterval(function() {
                n(), n(true);
              }, 10));
            }
            _selectStartHandler() {
            }
            _styleChangedHandler() {
            }
          });
        }
      ),
      /***/
      2754: (
        /***/
        () => {
          Smart.Utilities.Assign("NumericProcessor", class {
            constructor(t, e2) {
              switch (t[e2]) {
                case "integer":
                  return new Smart.Utilities.IntegerNumericProcessor(t, e2);
                case "floatingPoint":
                  return new Smart.Utilities.DecimalNumericProcessor(t, e2);
                case "complex":
                  return new Smart.Utilities.ComplexNumericProcessor(t, e2);
              }
            }
          }), Smart.Utilities.Assign("BaseNumericProcessor", class {
            constructor(t, e2) {
              const i = this;
              i.context = t, i._longestLabelSize = 0, i.numericFormatProperty = e2, i.regexScientificNotation = new RegExp(/^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)(Y|Z|E|P|T|G|M|k|m|u|n|p|f|a|z|y){1}$/), i.regexNoLeadingZero = new RegExp(/^(-)?[.]\d+$/), i.regexLeadingZero = new RegExp(/^[+\-]?(0+)[1-9]+|^[+\-]?(0{2,})[.]|^(0{2,})$/), i.prefixesToPowers = { Y: 24, Z: 21, E: 18, P: 15, T: 12, G: 9, M: 6, k: 3, m: -3, u: -6, n: -9, p: -12, f: -15, a: -18, z: -21, y: -24 }, window.NIComplex ? i.complexConstructor = window.NIComplex : i.complexConstructor = Smart.Utilities.Complex;
            }
            prepareForValidation(t, e2, i) {
              const r2 = this.context, a2 = t || void 0 !== e2;
              if (i = (i = i.toString()).replace(/\s/g, ""), i = r2._discardDecimalSeparator(i), this.regexLeadingZero.test(i)) {
                const t2 = this.regexLeadingZero.exec(i);
                i = t2[1] ? i.replace(t2[1], "") : t2[2] ? i.replace(t2[2], "0") : i.replace(t2[3], "0");
              }
              this.regexNoLeadingZero.test(i) ? i = "-" === i.charAt(0) ? "-0" + i.slice(1) : "0" + i : ("integer" === r2[this.numericFormatProperty] && (10 === r2._radixNumber || a2) || "floatingPoint" === r2[this.numericFormatProperty]) && this.regexScientificNotation.test(i) && (i = this.scientificToDecimal(i));
              let n, l = false;
              if ("complex" === r2[this.numericFormatProperty] && false === r2._regexSpecial.nonNumericValue.test(i)) try {
                if (r2._regexSpecial.exaValue.test(i)) {
                  const t2 = i.indexOf("E"), e3 = parseFloat(i.slice(0, t2)) * Math.pow(10, 18), r3 = parseFloat(i.slice(t2 + 1, -1));
                  n = new this.complexConstructor(e3, r3);
                } else n = new this.complexConstructor(i);
                l = true;
              } catch (t2) {
                l = false;
              }
              if (false !== l || !(!a2 && false === r2._regex[r2._radixNumber].test(i) || a2 && false === r2._regex[10].test(i))) return { value: i, enteredComplexNumber: n };
              r2._handleNonNumericValue(t, e2, i);
            }
            isENotation(t) {
              return new RegExp(/e/i).test(t.toString());
            }
            scientificToDecimal(t) {
              const e2 = this.regexScientificNotation.exec(t), i = e2[1], r2 = e2[2];
              return parseFloat(i) * Math.pow(10, this.prefixesToPowers[r2]);
            }
            _createMeasureLabel() {
              const t = this.context, e2 = document.createElement("div");
              return e2.className = "smart-label", e2.style.position = "absolute", e2.style.visibility = "hidden", "far" !== t.scalePosition ? t._measureLabelScale = t.$.scaleNear : t._measureLabelScale = t.$.scaleFar, t._measureLabelScale.appendChild(e2), e2;
            }
            _addMajorTickAndLabel(t, e2, i, r2, a2) {
              const n = this.context, l = n._settings.leftOrTop, o = this.valueToPx(r2);
              let s = "", c = "";
              if (parseInt(o) > parseInt(n._measurements.trackLength)) return { tick: s, label: c };
              if (n.logarithmicScale && (t = n._formatLabel(Math.pow(10, r2))), "smart-tank" === n.nodeName.toLowerCase() || n._intervalHasChanged) {
                let e3 = n._tickIntervalHandler.labelsSize;
                if (a2) {
                  n._labelDummy.innerHTML = t;
                  let a3 = this.valueToPx(r2), l2 = this.valueToPx(n._drawMax), o2 = this.valueToPx(n._drawMin), s2 = n._labelDummy[n._settings.size], c2 = "vertical" === n.orientation ? n._labelDummy.offsetWidth : n._labelDummy.offsetHeight, m2 = (s2 + e3.minLabelSize) / 2, u2 = (s2 + e3.maxLabelSize) / 2;
                  i = n._normalLayout ? a3 + u2 < l2 && a3 - m2 > o2 : a3 - u2 > l2 && a3 + m2 < o2, c2 > this._longestLabelSize && (this._longestLabelSize = c2);
                } else this._longestLabelSize = Math.max(e3.minLabelOtherSize, e3.maxLabelOtherSize, this._longestLabelSize);
              }
              return n._tickValues.push(r2), s = '<div style="' + l + ": " + o + 'px;" class="smart-tick"></div>', false !== i && (void 0 === e2 && (n._labelDummy.innerHTML = t, e2 = n._labelDummy[n._settings.size]), c += '<div class="smart-label' + (a2 ? " smart-label-middle" : "") + '" style="' + l + ": " + (o - e2 / 2) + 'px;">' + t + "</div>"), { tick: s, label: c };
            }
            getWordLength(t) {
              switch (this.context._unsigned = "u" === t.charAt(0), t) {
                case "int8":
                case "uint8":
                  return 8;
                case "int16":
                case "uint16":
                  return 16;
                case "int32":
                case "uint32":
                  return 32;
                case "int64":
                case "uint64":
                  return 64;
              }
            }
            getAngleByValue(t, e2, i) {
              const r2 = this.context;
              false !== e2 && r2.logarithmicScale && (t = Math.log10(t));
              const a2 = (t - r2._drawMin) * r2._angleRangeCoefficient;
              let n;
              return n = void 0 === r2.inverted || !r2.inverted && !r2.rightToLeft || r2.rightToLeft && r2.inverted ? r2.endAngle - a2 : r2.startAngle + a2, i ? n : n * Math.PI / 180 + Math.PI / 2;
            }
            getValueByAngle(t, e2) {
              const i = this.context;
              let r2, a2, n;
              for (void 0 === i.inverted || !i.inverted && !i.rightToLeft || i.rightToLeft && i.inverted ? (r2 = i.endAngle, a2 = t) : (r2 = t, a2 = i._normalizedStartAngle); r2 < a2; ) r2 += 360;
              if (n = (r2 - a2) / i._angleDifference * i._range + parseFloat(i._drawMin), i.logarithmicScale) {
                if (i.customInterval) return parseFloat(Math.pow(10, this.getCoercedValue(n, true)).toFixed(12));
                n = Math.pow(10, n);
              }
              return e2 && !i.coerce ? Math.round(n) : (n = this.createDescriptor(n, void 0, true, true), this.getCoercedValue(n, false));
            }
            updateGaugeValue(t) {
              const e2 = this.context, i = e2.value;
              e2.value = t, e2._drawValue = e2.logarithmicScale ? Math.log10(t).toString() : t, e2._number = this.createDescriptor(e2.value), e2.$.digitalDisplay.value = t, e2.$.fireEvent("change", { value: t, oldValue: i }), e2._setAriaValue("valuenow"), delete e2._valueBeforeCoercion;
            }
            validateColorRange(t) {
              const e2 = this.context;
              return Math.min(Math.max(t, e2.min), e2.max);
            }
            getActualValue(t) {
              return this.context.logarithmicScale ? Math.pow(10, t) : t;
            }
            drawGaugeLogarithmicScaleMinorTicks(t, e2, i) {
              const r2 = this.context;
              let a2;
              e2 instanceof Smart.Utilities.BigNumber && (e2 = parseFloat(e2.toString()));
              for (let e3 in t) if (a2 = e3, e3 >= 0 && e3 % 1 == 0) break;
              for (let t2 = parseFloat(a2); t2 < r2._drawMax; t2 += e2) for (let a3 = 2; a3 <= 9; a3++) {
                const n = a3 * Math.pow(10, t2 + e2 - 1);
                n < r2.max && i(n);
              }
              for (let t2 = parseFloat(a2); t2 > r2._drawMin; t2 -= e2) for (let e3 = 2; e3 <= 9; e3++) {
                const a3 = e3 * Math.pow(10, t2 - 1);
                a3 > r2.min && i(a3);
              }
            }
            _getAngleDifference(t, e2) {
              const i = Math.abs(e2 - t) % 360;
              return i > 180 ? 360 - i : i;
            }
            addCustomTicks() {
              const t = this, e2 = t.context, i = !e2.logarithmicScale;
              let r2 = "", a2 = "";
              function n(n2) {
                const l = e2.customTicks[n2], o = i ? t.createDescriptor(l) : Math.log10(l), s = n2 > 0 && n2 < e2.customTicks.length - 1, c = t._addMajorTickAndLabel(e2._formatLabel(l), void 0, true, o, s);
                r2 += c.tick, a2 += c.label;
              }
              if (t._longestLabelSize = 0, e2._tickValues = [], e2._labelDummy = t._createMeasureLabel(), e2._normalLayout) for (let t2 = 0; t2 < e2.customTicks.length; t2++) n(t2);
              else for (let t2 = e2.customTicks.length - 1; t2 >= 0; t2--) n(t2);
              "smart-tank" === e2.nodeName.toLowerCase() && e2._updateScaleWidth(t._longestLabelSize), e2._appendTicksAndLabelsToScales(r2, a2);
            }
            addGaugeCustomTicks() {
              const t = this, e2 = t.context, i = e2._distance, r2 = e2._measurements.radius - i.majorTickDistance;
              let a2, n;
              function l(i2) {
                const r3 = e2.customTicks[i2], l2 = t.createDescriptor(r3), o = t.getAngleByValue(l2, true), s = i2 > 0 && i2 < e2.customTicks.length - 1;
                a2(o), n(o, r3, s);
              }
              a2 = "none" !== e2.ticksVisibility && false !== e2._plotTicks ? function(t2) {
                e2._drawTick(t2, r2, "major");
              } : function() {
              }, n = "none" !== e2.labelsVisibility && false !== e2._plotLabels ? function(t2, r3, a3) {
                e2._drawLabel(t2, r3, i.labelDistance, a3);
              } : function() {
              };
              for (let t2 = e2.customTicks.length - 1; t2 >= 0; t2--) l(t2);
            }
          }), Smart.Utilities.Assign("IntegerNumericProcessor", class extends Smart.Utilities.BaseNumericProcessor {
            constructor(t, e2) {
              super(t, e2);
              const i = this;
              i.context = t, i.defaultMins = { int8: "-128", uint8: "0", int16: "-32768", uint16: "0", int32: "-2147483648", uint32: "0", int64: "-9223372036854775808", uint64: "0" }, i.defaultMaxs = { int8: "127", uint8: "255", int16: "32767", uint16: "65535", int32: "2147483647", uint32: "4294967295", int64: "9223372036854775807", uint64: "18446744073709551615" };
            }
            createDescriptor(t, e2, i, r2, a2) {
              const n = this.context;
              let l;
              if (t.constructor !== Smart.Utilities.BigNumber) {
                let i2 = !a2 && n._radixNumber ? n._radixNumber : 10;
                10 === i2 && e2 && t.constructor !== Smart.Utilities.BigNumber && this.isENotation(t) && (t = Smart.Utilities.BigNumber.bigIntSupport ? new Smart.Utilities.BigNumber(Math.round(t)) : new Smart.Utilities.NumberRenderer(t).largeExponentialToDecimal()), l = n._toBigNumberDecimal ? n._toBigNumberDecimal(t.toString(i2, n._wordLengthNumber), i2) : new Smart.Utilities.BigNumber(t);
              } else l = new Smart.Utilities.BigNumber(t);
              return i && (n._unsigned && -1 === l.compare(0) && (l = l.set(0)), r2 && (l = this.validate(l, n._minObject, n._maxObject)), l = this.round(l)), l;
            }
            round(t) {
              const e2 = this.context;
              if (t instanceof window.Smart.Utilities.BigNumber && "bigint" == typeof t._d) return t;
              if (t instanceof window.Smart.Utilities.BigNumber == 0 || !e2._wordLengthNumber || e2._wordLengthNumber < 64) return new Smart.Utilities.BigNumber(Math.round(t.toString()));
              const i = t.mod(1);
              return 1 === i._d.length && 0 === i._d[0] || ((t = t.intPart())._s ? (i._d[1] > 5 || 5 === i._d[1] && i._d[2]) && (t = t.add(-1)) : i._d[1] > 4 && (t = t.add(1))), t;
            }
            validate(t, e2, i) {
              let r2;
              return r2 = -1 === t.compare(e2) ? e2 : 1 === t.compare(i) ? i : t, r2;
            }
            validateMinMax(t, e2) {
              const i = this.context;
              let r2 = this.defaultMins[i.wordLength], a2 = new Smart.Utilities.BigNumber(r2), n = this.defaultMaxs[i.wordLength], l = new Smart.Utilities.BigNumber(n), o = "date" !== i.mode;
              if (void 0 === i._numberRenderer && (i._numberRenderer = new Smart.Utilities.NumberRenderer()), t && o) {
                null !== i.min && (i.min = i.min.toString().replace(/\s/g, ""), this.regexScientificNotation.test(i.min) && (i.min = this.scientificToDecimal(i.min)));
                let t2 = this.round(new Smart.Utilities.BigNumber(i.min));
                null === i.min || i._minIsNull && i._initialized || !(t2.compare(a2) >= 0) ? (i._minIsNull = true, i.min = r2, i._minObject = a2) : i._minObject = t2;
              }
              if (e2 && o) {
                null !== i.max && (i.max = i.max.toString().replace(/\s/g, ""), this.regexScientificNotation.test(i.max) && (i.max = this.scientificToDecimal(i.max)));
                let t2 = this.round(new Smart.Utilities.BigNumber(i.max));
                null === i.max || i._maxIsNull && i._initialized || !(t2.compare(l) <= 0) ? (i._maxIsNull = true, i.max = n, i._maxObject = l) : i._maxObject = t2;
              }
              o || (i._minObject = new Smart.Utilities.BigNumber(i.min), i._maxObject = new Smart.Utilities.BigNumber(i.max)), this.compare(i._minObject, i._maxObject) || (i._minObject = a2, i._maxObject = l, i._drawMin = i.logarithmicScale ? 0 : r2, i._drawMax = i.logarithmicScale ? 10 : n, i.min = r2, i.max = n), o || (i._minDate = Smart.Utilities.DateTime.fromFullTimeStamp(i.min), i._maxDate = Smart.Utilities.DateTime.fromFullTimeStamp(i.max));
            }
            valueToPx(t) {
              const e2 = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true;
              const i = this.context, r2 = new Smart.Utilities.BigNumber(i._measurements.trackLength).divide(new Smart.Utilities.BigNumber(i._range));
              let a2;
              if (i._normalLayout) {
                const e3 = i._drawMin instanceof Smart.Utilities.BigNumber ? i._drawMin : new Smart.Utilities.BigNumber(i._drawMin);
                t = new Smart.Utilities.BigNumber(t), a2 = parseFloat(r2.multiply(t.subtract(e3)).toString());
              } else {
                const e3 = i._drawMax instanceof Smart.Utilities.BigNumber ? i._drawMax : new Smart.Utilities.BigNumber(i._drawMax);
                a2 = parseFloat(this.round(e3.subtract(t).multiply(r2)).toString());
              }
              return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = e2, a2;
            }
            pxToValue(t) {
              const e2 = this.context, i = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              let r2;
              if (Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true, r2 = e2._normalLayout ? e2._valuePerPx.multiply(t - e2._trackStart) : e2._valuePerPx.multiply(e2._trackEnd - t), r2 = this.round(r2).toString(), Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = i, e2.logarithmicScale) {
                let t2 = parseFloat(r2) + parseFloat(e2._drawMin);
                return new Smart.Utilities.BigNumber(Math.round(Math.pow(10, t2)));
              }
              return this.createDescriptor(e2._minObject.add(r2), false, true, true);
            }
            compare(t, e2, i) {
              if ((null === t || null === e2) && t !== e2) return true;
              t.constructor !== Smart.Utilities.BigNumber && (t = new Smart.Utilities.BigNumber(t));
              const r2 = t.compare(e2);
              return true !== i ? 0 !== r2 : r2;
            }
            incrementDecrement(t, e2, i) {
              const r2 = this.context;
              let a2;
              if (t.constructor !== Smart.Utilities.BigNumber && (t = new Smart.Utilities.BigNumber(t)), "add" === e2) {
                if (a2 = t.add(i), void 0 !== r2._drawMax) return a2.compare(r2._drawMax) > 0 ? new Smart.Utilities.BigNumber(r2._drawMax) : a2;
              } else if (a2 = t.subtract(i), void 0 !== r2._drawMin) return a2.compare(r2._drawMin) < 0 ? new Smart.Utilities.BigNumber(r2._drawMin) : a2;
              return a2;
            }
            render(t, e2) {
              const i = this.context;
              if (!i.scientificNotation && true === e2) return new Smart.Utilities.NumberRenderer(new Smart.Utilities.BigNumber(t)).bigNumberToExponent(i.significantDigits);
              let r2 = t;
              return i.scientificNotation && true === e2 ? r2 = new Smart.Utilities.NumberRenderer(r2).toScientific(i.significantDigits, i.precisionDigits) : "string" != typeof t && (r2 = t.toString(i._radixNumber, i._wordLengthNumber, i.leadingZeros)), r2;
            }
            addTicksAndLabels() {
              const t = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true;
              const e2 = this.context, i = e2._measurements.trackLength, r2 = e2._normalLayout, a2 = e2._majorTicksInterval, n = this.round(new Smart.Utilities.BigNumber(e2._range).divide(a2)), l = i / n, o = new Smart.Utilities.BigNumber(e2._drawMin), s = new Smart.Utilities.BigNumber(e2._drawMax);
              let c, m2, u2, g2, d2, p2, h2, b2, f2, _2 = "", S2 = "";
              e2._tickValues = [], this._longestLabelSize = 0, r2 ? (c = o, m2 = a2.add(c.subtract(c.mod(a2))), u2 = m2.subtract(c), d2 = e2._formatLabel(o), p2 = e2._tickIntervalHandler.labelsSize.minLabelSize, g2 = s, h2 = e2._formatLabel(s), b2 = e2._tickIntervalHandler.labelsSize.maxLabelSize) : (c = s, m2 = c.subtract(c.mod(a2)), u2 = c.subtract(m2), d2 = e2._formatLabel(s), p2 = e2._tickIntervalHandler.labelsSize.maxLabelSize, g2 = o, h2 = e2._formatLabel(o), b2 = e2._tickIntervalHandler.labelsSize.minLabelSize), e2._labelDummy = this._createMeasureLabel(), f2 = this._addMajorTickAndLabel(d2, p2, true, c), _2 += f2.tick, S2 += f2.label;
              const x = u2.divide(a2).multiply(l);
              if (0 !== m2.compare(e2.max) && x.compare(i) < 0) {
                const t2 = e2._formatLabel(m2.toString()), i2 = x.compare(p2) > 0;
                f2 = this._addMajorTickAndLabel(t2, void 0, i2, m2, true), _2 += f2.tick, S2 += f2.label;
              }
              f2 = this.addMiddleMajorTicks(n, l, x, u2, r2, a2), _2 += f2.tick, S2 += f2.label, f2 = this._addMajorTickAndLabel(h2, b2, true, g2), _2 += f2.tick, S2 += f2.label, "date" !== e2.mode && (_2 += this.addMinorTicks(r2)), e2._measureLabelScale.removeChild(e2._labelDummy), delete e2._labelDummy, delete e2._measureLabelScale, "smart-tank" === e2.nodeName.toLowerCase() && e2._updateScaleWidth(this._longestLabelSize), e2._appendTicksAndLabelsToScales(_2, S2), Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = t;
            }
            addMiddleMajorTicks(t, e2, i, r2, a2, n) {
              const l = this.context;
              let o, s = "", c = "";
              for (let m2 = 1; m2 < t; m2++) {
                let u2, g2 = i.add(m2 * e2);
                if (a2 ? u2 = n.multiply(m2).add(r2.add(new Smart.Utilities.BigNumber(l._drawMin))) : (u2 = new Smart.Utilities.BigNumber(l._drawMax).subtract(r2).subtract(n.multiply(m2)), m2 === t - 1 && 0 === u2.compare(0) && (l._numberRenderer.numericValue = l._tickIntervalHandler.nearestPowerOfTen, o = l._numberRenderer.bigNumberToExponent(1))), 0 !== u2.compare(l._drawMax)) {
                  let i2 = l._formatLabel(u2.toString()), r3 = true;
                  l._labelDummy.innerHTML = o || i2;
                  let a3 = l._labelDummy[l._settings.size];
                  g2.add(a3).compare(t * e2) >= 0 && (r3 = false);
                  const n2 = this._addMajorTickAndLabel(i2, void 0, r3, u2, true);
                  s += n2.tick, c += n2.label;
                }
              }
              return { tick: s, label: c };
            }
            addMinorTicks(t) {
              function e2(t2) {
                -1 === r2.indexOf(t2) && t2 % n == 0 && (m2 += '<div style="' + l + ": " + i._numericProcessor.valueToPx(t2) + 'px;" class="smart-tick smart-tick-minor"></div>');
              }
              const i = this.context, r2 = i._tickValues, a2 = i._tickIntervalHandler.nearestPowerOfTen, n = i._minorTicksInterval, l = i._settings.leftOrTop;
              let o, s, c, m2 = "";
              if (t ? (o = r2[0], s = r2[1], c = r2[r2.length - 1]) : (o = r2[r2.length - 1], s = r2[r2.length - 2], c = r2[0]), i.logarithmicScale) !function() {
                let t2 = i._measurements.trackLength / r2.length, e3 = 0.1;
                t2 < 20 ? e3 = 1 : t2 >= 20 && t2 < 40 ? e3 = s - o > 1 ? 1 : 0.5 : t2 >= 40 && t2 < 80 && (e3 = 0.2);
                let a3 = Math.floor(i._drawMax), n2 = i._drawMax - a3, c2 = i._drawMax - i._drawMin > r2.length;
                for (let t3 = i._drawMax; t3 > 0; t3 -= 1) {
                  let r3 = n2 > 0 ? Math.pow(10, t3 - n2 + 1) : Math.pow(10, t3), a4 = r3 * e3;
                  for (let t4 = r3; t4 > 0; t4 -= a4) if (t4 < i.max && t4 > i.min) {
                    let e4 = new Smart.Utilities.BigNumber(Math.log10(t4));
                    (e4 % 1 == 0 && c2 || !c2) && (m2 += '<div style="' + l + ": " + i._numericProcessor.valueToPx(e4) + 'px;" class="smart-tick smart-tick-minor"></div>');
                  }
                }
              }();
              else {
                for (let t2 = s; o.compare(t2) < 0; t2 = t2.subtract(a2)) e2(t2);
                for (let t2 = s.add(a2); c.compare(t2) > 0; t2 = t2.add(a2)) e2(t2);
              }
              return m2;
            }
            validateCustomTicks() {
              const t = this.context, e2 = "date" !== t.mode;
              let i = [];
              for (let r2 = 0; r2 < t.customTicks.length; r2++) {
                let a2 = t.customTicks[r2];
                e2 ? a2 = this.createDescriptor(a2, false, true) : void 0 === a2._d && (a2 = Smart.Utilities.DateTime.validateDate(a2).getTimeStamp()), a2.compare(t._minObject) >= 0 && a2.compare(t._maxObject) <= 0 && i.push(a2);
              }
              if (i.sort(function(t2, e3) {
                return t2.compare(e3);
              }), e2) {
                for (let t2 = 0; t2 < i.length; t2++) i[t2] = i[t2].toString();
                i = i.filter(function(t2, e3, i2) {
                  return !e3 || t2 !== i2[e3 - 1];
                });
              }
              t.customTicks = i.slice(0);
            }
            addGaugeTicksAndLabels() {
              const t = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true;
              const e2 = this.context, i = this, r2 = Math.max(e2._tickIntervalHandler.labelsSize.minLabelSize, e2._tickIntervalHandler.labelsSize.maxLabelSize), a2 = e2._majorTicksInterval, n = e2._minorTicksInterval, l = {}, o = e2._distance, s = e2._measurements.radius, c = s - o.majorTickDistance, m2 = s - o.minorTickDistance, u2 = new Smart.Utilities.BigNumber(e2._drawMin), g2 = new Smart.Utilities.BigNumber(e2._drawMax);
              let d2, p2, h2, b2, f2, _2;
              "none" !== e2.ticksVisibility && false !== e2._plotTicks ? (d2 = function(t2) {
                e2._drawTick(t2, c, "major");
              }, p2 = function(t2) {
                e2._drawTick(i.getAngleByValue(t2, true), m2, "minor");
              }) : (d2 = function() {
              }, p2 = function() {
              }), h2 = "none" !== e2.labelsVisibility && false !== e2._plotLabels ? function(t2, i2, r3) {
                e2._drawLabel(t2, i2, o.labelDistance, r3);
              } : function() {
              }, void 0 === e2.inverted || !e2.inverted && !e2.rightToLeft || e2.rightToLeft && e2.inverted ? (f2 = e2.endAngle, _2 = e2.startAngle) : (f2 = e2.startAngle, _2 = e2.endAngle), b2 = i.getAngleByValue(u2, false), d2(b2), l[e2._drawMin.toString()] = true, h2(b2, e2.min, false);
              let S2, x, v2 = u2.subtract(u2.mod(a2));
              -1 !== u2.compare(0) && (v2 = v2.add(a2));
              for (let t2 = new Smart.Utilities.BigNumber(v2); -1 !== t2.compare(u2); t2 = t2.subtract(n)) S2 = t2;
              for (b2 = i.getAngleByValue(v2, false), d2(b2), l[v2.toString()] = true, 2 * Math.PI * e2._measurements.innerRadius * (this._getAngleDifference(f2, i.getAngleByValue(v2, false, true)) / 360) > r2 && h2(b2, this.getActualValue(v2), -1 === v2.compare(g2)), x = v2.add(a2); -1 === x.compare(g2.subtract(a2)); x = x.add(a2)) b2 = i.getAngleByValue(x, false), d2(b2), l[x.toString()] = true, h2(b2, this.getActualValue(x), true);
              if (void 0 === l[x.toString()] && 1 !== x.compare(g2) && (b2 = i.getAngleByValue(x, false), d2(b2), l[x.toString()] = true, 2 * Math.PI * e2._measurements.innerRadius * (this._getAngleDifference(_2, i.getAngleByValue(x, false, true)) / 360) >= r2 && h2(b2, this.getActualValue(x), true), e2._normalizedStartAngle !== e2.endAngle && (b2 = i.getAngleByValue(g2, false), d2(b2), 2 * Math.PI * e2._measurements.innerRadius * (this._getAngleDifference(_2, f2) / 360) >= r2 && h2(b2, e2.max, false))), "date" !== e2.mode) {
                if (e2.logarithmicScale) this.drawGaugeLogarithmicScaleMinorTicks(l, a2, p2);
                else for (let t2 = S2; -1 === t2.compare(g2); t2 = t2.add(n)) l[t2.toString()] || p2(t2);
                Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = t;
              } else Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = t;
            }
            updateToolTipAndValue(t, e2, i) {
              const r2 = this.context, a2 = r2.logarithmicScale;
              r2._updateTooltipValue(t.toString()), a2 && (t = parseFloat(Math.pow(10, parseFloat(t)).toFixed(11)));
              const n = (t = t instanceof Smart.Utilities.BigNumber ? t : new Smart.Utilities.BigNumber(t)).toString();
              r2._number = t, r2._drawValue = a2 ? Math.log10(n) : t, 0 !== t.compare(e2) && i && ("numeric" === r2.mode ? (r2.value = n, t = n) : (e2 = r2._valueDate, r2._valueDate = Smart.Utilities.DateTime.fromFullTimeStamp(n), r2.value = t, t = r2._valueDate), r2._programmaticValueIsSet || r2.$.fireEvent("change", { value: t, oldValue: e2 }), r2.$.hiddenInput && (r2.$.hiddenInput.value = t), r2._setAriaValue("valuenow"));
            }
            validateInterval(t) {
              const e2 = this.context, i = e2._maxObject.subtract(e2._minObject);
              e2._validInterval = new Smart.Utilities.BigNumber(t), e2._validInterval = this.round(e2._validInterval), e2._validInterval.compare(0) <= 0 && (e2._validInterval = new Smart.Utilities.BigNumber(1)), 1 === e2._validInterval.compare(i) && (e2._validInterval = i), e2.interval = e2._validInterval.toString();
            }
            getCoercedValue(t, e2, i) {
              const r2 = this.context;
              if (!r2.coerce) return t;
              const a2 = !r2.logarithmicScale;
              let n, l;
              if (t = t instanceof Smart.Utilities.BigNumber ? t : new Smart.Utilities.BigNumber(t), r2.customInterval) {
                const e3 = r2.customTicks;
                if (0 === e3.length) return t;
                let l2, o2;
                if (a2 || i) {
                  n = r2._minObject, l2 = n.subtract(t).abs(), o2 = n;
                  for (let i2 = 0; i2 < e3.length; i2++) {
                    const r3 = this.createDescriptor(e3[i2]), a3 = r3.subtract(t).abs();
                    -1 === a3.compare(l2) && (l2 = a3, o2 = r3);
                  }
                } else {
                  n = r2._drawMin, l2 = Math.abs(n - parseFloat(t.toString())), o2 = n;
                  for (let i2 = 0; i2 < e3.length; i2++) {
                    const r3 = Math.log10(e3[i2]), a3 = Math.abs(r3 - t);
                    a3 < l2 && (l2 = a3, o2 = r3);
                  }
                  o2 = new Smart.Utilities.BigNumber(o2);
                }
                return o2;
              }
              let o = r2._validInterval;
              if ("date" === r2.mode) {
                if ("addYears" === r2._dateIncrementMethod) return this.coerceYear(t);
                if ("addMonths" === r2._dateIncrementMethod) return this.coerceMonth(t);
                o = new Smart.Utilities.BigNumber(r2._dateIntervalNumber).multiply(o);
              }
              false !== e2 ? (n = new Smart.Utilities.BigNumber(r2._drawMin), l = new Smart.Utilities.BigNumber(r2._drawMax)) : (n = new Smart.Utilities.BigNumber(r2.min), l = new Smart.Utilities.BigNumber(r2.max));
              let s = t.subtract(n), c = s.mod(o);
              if (0 === c.compare(0)) return t;
              let m2 = s.subtract(c), u2 = m2.add(o);
              if (s.subtract(m2).abs().compare(s.subtract(u2).abs()) < 0) return m2.add(n);
              {
                const t2 = u2.add(n);
                return t2.compare(l) <= 0 ? t2 : m2.add(n);
              }
            }
            coerceMonth(t) {
              const e2 = this.context, i = parseFloat(e2._validInterval), r2 = Smart.Utilities.DateTime.fromFullTimeStamp(t), a2 = r2.year(), n = r2.month(), l = r2.day(), o = e2._minDate.year(), s = e2._minDate.month(), c = 12 * (e2._maxDate.year() - o - 1) + 12 - s + e2._maxDate.month();
              let m2 = 12 * (a2 - 1 - o) + (12 - s) + n;
              1 === i && (-1 !== [1, 3, 5, 7, 8, 10, 12].indexOf(n) ? (l > 16 || 16 === l && r2.hour() > 11) && m2++ : 2 === n ? r2.isLeapYear(a2) ? (l > 15 || 15 === l && r2.hour() > 11) && m2++ : l > 14 && m2++ : l > 15 && m2++), m2 = this.getCoercedTimePart(0, c, m2, i);
              let u2 = e2._minDate.addMonths(m2, true);
              return 1 === u2.compare(e2._maxDate) && (u2 = e2._minDate.addMonths(m2 - i, true)), e2._drawValue = new Smart.Utilities.BigNumber(u2.getTimeStamp()), e2._drawValue;
            }
            coerceYear(t) {
              const e2 = this.context, i = parseFloat(e2._validInterval), r2 = Smart.Utilities.DateTime.fromFullTimeStamp(t), a2 = e2._maxDate.year(), n = Smart.Utilities.DateTime.getConstructorParameters(e2._minDate);
              let l = r2.year();
              r2.month() > 6 && l++;
              let o = this.getCoercedTimePart(e2._minDate.year(), a2, l, i);
              o > a2 && (o -= i), n[0] = o, n.unshift(null);
              const s = new (Function.prototype.bind.apply(Smart.Utilities.DateTime, n))();
              return e2._drawValue = new Smart.Utilities.BigNumber(s.getTimeStamp()), e2._drawValue;
            }
            getCoercedTimePart(t, e2, i, r2) {
              let a2 = i - t, n = a2 % r2;
              if (0 === n) return i;
              let l = parseFloat((a2 - n).toFixed(12)), o = l + r2;
              if (e2 - t <= r2) return i >= t + (e2 - t) / 2 ? e2 : t;
              if (Math.abs(a2 - l) < Math.abs(a2 - o)) return l + t;
              {
                const i2 = o + t;
                return i2 > e2 ? l + t : i2;
              }
            }
            updateValue(t) {
              const e2 = this.context;
              t = t instanceof Smart.Utilities.BigNumber ? t : new Smart.Utilities.BigNumber(t);
              const i = this.validate(t, e2._minObject, e2._maxObject);
              let r2, a2, n = e2.value;
              e2._number = i, e2._drawValue = e2.logarithmicScale ? Math.log10(i) : i, "numeric" === e2.mode ? (r2 = t.toString(), e2.value = r2, a2 = this.compare(t, n)) : (n = Smart.Utilities.DateTime.fromFullTimeStamp(n), e2._valueDate = Smart.Utilities.DateTime.fromFullTimeStamp(t), e2.value = t, r2 = t = e2._valueDate, a2 = 0 !== t.compare(n)), e2._programmaticValueIsSet || !a2 && !e2._scaleTypeChangedFlag || e2.$.fireEvent("change", { value: r2, oldValue: n }), e2.$.hiddenInput && (e2.$.hiddenInput.value = t), e2._setAriaValue("valuenow"), e2._moveThumbBasedOnValue(e2._drawValue);
            }
            getValuePerPx(t, e2) {
              const i = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true;
              const r2 = new Smart.Utilities.BigNumber(t).divide(e2);
              return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = i, r2;
            }
            restrictValue(t) {
              t[1].constructor === Smart.Utilities.BigNumber ? -1 === t[1].compare(t[0]) && t[1].set(t[0]) : t[1] < t[0] && (t[1] = t[0]);
            }
            getAngleByValue(t, e2, i) {
              const r2 = this.context, a2 = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              if (Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true, r2._wordLengthNumber < 64) return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = a2, super.getAngleByValue(parseFloat(t.toString()), e2, i);
              t instanceof Smart.Utilities.BigNumber == 0 && (t = new Smart.Utilities.BigNumber(t)), false !== e2 && r2.logarithmicScale && (t = new Smart.Utilities.BigNumber(Math.log10(t.toString())));
              const n = t.subtract(r2._drawMin).multiply(r2._angleRangeCoefficient);
              let l;
              return l = void 0 === r2.inverted || !r2.inverted && !r2.rightToLeft || r2.rightToLeft && r2.inverted ? n.multiply(-1).add(r2.endAngle) : n.add(r2.startAngle), l = parseFloat(l.toString()), Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = a2, i ? l : l * Math.PI / 180 + Math.PI / 2;
            }
            getValueByAngle(t) {
              const e2 = this.context;
              if (e2._wordLengthNumber < 64) return super.getValueByAngle(t, true);
              const i = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              let r2, a2, n, l;
              for (Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true, void 0 === e2.inverted || !e2.inverted && !e2.rightToLeft || e2.rightToLeft && e2.inverted ? (r2 = e2.endAngle, a2 = t) : (r2 = t, a2 = e2._normalizedStartAngle); r2 < a2; ) r2 += 360;
              return n = new Smart.Utilities.BigNumber((r2 - a2) / e2._angleDifference).multiply(e2._range).add(e2._drawMin), e2.logarithmicScale && (n = new Smart.Utilities.BigNumber(Math.pow(10, n.toString()))), l = e2.coerce ? this.getCoercedValue(n, false) : this.round(n), Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = i, new Smart.Utilities.BigNumber(l);
            }
            updateGaugeValue(t) {
              if (t instanceof Smart.Utilities.BigNumber == 0) return super.updateGaugeValue(t);
              const e2 = this.context, i = e2._getEventValue();
              "numeric" === e2.mode ? (e2.value = t.toString(), e2.$.digitalDisplay.value = e2.value) : (e2._valueDate = Smart.Utilities.DateTime.fromFullTimeStamp(t), e2.value = t), e2._drawValue = e2.logarithmicScale ? Math.log10(e2.value).toString() : e2.value, e2._number = t, e2.$.fireEvent("change", { value: e2._getEventValue(), oldValue: i }), e2._setAriaValue("valuenow");
            }
            validateColorRange(t) {
              const e2 = this.context;
              if (e2._wordLengthNumber < 64) return super.validateColorRange(t);
              t = "numeric" === e2.mode ? new Smart.Utilities.BigNumber(t) : (t = Smart.Utilities.DateTime.validateDate(t)).getTimeStamp();
              const i = new Smart.Utilities.BigNumber(e2.min), r2 = new Smart.Utilities.BigNumber(e2.max);
              return -1 === t.compare(i) && (t = i), 1 === t.compare(r2) && (t = r2), t;
            }
            lockRotation(t, e2) {
              const i = this.context;
              if (e2 instanceof Smart.Utilities.BigNumber == 0 && (e2 = new Smart.Utilities.BigNumber(e2)), t && -1 === e2.compare(i._number)) {
                if (i._lockCW = true, -1 === e2.compare(i._maxObject)) return new Smart.Utilities.BigNumber(i._maxObject);
              } else if (!t && 1 === e2.compare(i._number) && (i._lockCCW = true, 1 === e2.compare(i._minObject))) return new Smart.Utilities.BigNumber(i._minObject);
            }
            getAngleRangeCoefficient() {
              const t = this.context, e2 = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
              Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true, t._angleRangeCoefficient = new Smart.Utilities.BigNumber(t._angleDifference).divide(t._range), Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = e2;
            }
          }), Smart.Utilities.Assign("DecimalNumericProcessor", class extends Smart.Utilities.BaseNumericProcessor {
            constructor(t, e2) {
              super(t, e2), this.context = t;
            }
            getPreciseModulo(t, e2, i) {
              const r2 = t >= 0 ? 1 : -1;
              if (t = Math.abs(t), e2 = Math.abs(e2), void 0 === i) {
                const i2 = t.toExponential(), a2 = e2.toExponential(), n = parseInt(i2.slice(i2.indexOf("e") + 1), 10), l = parseInt(a2.slice(a2.indexOf("e") + 1), 10), o = n < 0 ? Math.abs(n) : 0, s = l < 0 ? Math.abs(l) : 0, c = Math.max(o, s);
                if (this.roundCoefficient = c, t < e2) return r2 * t;
                if (t === e2) return 0;
                if ((t < -1 || t > 1) && (e2 < -1 || e2 > 1 || 1 === e2)) {
                  if (t % 1 == 0 && e2 % 1 == 0) return r2 * (t % e2);
                  {
                    const i3 = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
                    Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true;
                    const a3 = r2 * parseFloat(new Smart.Utilities.BigNumber(t).mod(e2).toString());
                    return Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = i3, a3;
                  }
                }
                const m2 = Math.pow(10, c);
                return r2 * (t * m2 % (e2 * m2) / m2);
              }
              return r2 * (Math.round(t * i) % Math.round(e2 * i));
            }
            createDescriptor(t, e2, i, r2) {
              let a2 = parseFloat(t);
              return r2 && (a2 = this.validate(a2, this.context._minObject, this.context._maxObject)), a2;
            }
            round(t) {
              return Math.round(t);
            }
            validate(t, e2, i) {
              let r2;
              return r2 = t < e2 ? e2 : t > i ? i : t, r2;
            }
            validateMinMax(t, e2) {
              const i = this.context, r2 = void 0 !== i._regexSpecial && i._regexSpecial.inf.test(i.min), a2 = void 0 !== i._regexSpecial && i._regexSpecial.inf.test(i.max);
              t && (null === i.min || r2 ? (i.min = -1 / 0, i._minObject = -1 / 0) : (i.min = i.min.toString().replace(/\s/g, ""), this.regexScientificNotation.test(i.min) && (i.min = this.scientificToDecimal(i.min)), i._minObject = i._discardDecimalSeparator(i.min))), e2 && (null === i.max || a2 ? (i.max = 1 / 0, i._maxObject = 1 / 0) : (i.max = i.max.toString().replace(/\s/g, ""), this.regexScientificNotation.test(i.max) && (i.max = this.scientificToDecimal(i.max)), i._maxObject = i._discardDecimalSeparator(i.max))), this.compare(i._minObject, i._maxObject) || (i._maxObject = parseFloat(i._maxObject) + 1, i.max = i._maxObject);
            }
            valueToPx(t) {
              const e2 = this.context, i = e2._measurements.trackLength / e2._range;
              let r2;
              return r2 = e2._normalLayout ? i * (t - e2._drawMin) : i * (e2._drawMax - t), Math.round(r2);
            }
            pxToValue(t) {
              const e2 = this.context;
              let i;
              if (i = e2._normalLayout ? (t - e2._trackStart) * e2._valuePerPx : (e2._trackEnd - t) * e2._valuePerPx, e2.logarithmicScale) {
                const t2 = i + parseFloat(e2._drawMin);
                return Math.pow(10, t2);
              }
              return this.validate(i + e2._minObject, e2._minObject, e2._maxObject);
            }
            compare(t, e2, i) {
              return t = parseFloat(t), e2 = parseFloat(e2), true !== i ? t !== e2 : t < e2 ? -1 : t > e2 ? 1 : 0;
            }
            incrementDecrement(t, e2, i) {
              const r2 = this.context;
              let a2;
              if ("add" === e2) {
                if (a2 = parseFloat(t) + parseFloat(i), void 0 !== r2._drawMax) return a2 > parseFloat(r2._drawMax) ? r2._drawMax : a2;
              } else if (a2 = parseFloat(t) - parseFloat(i), void 0 !== r2._drawMin) return a2 < parseFloat(r2._drawMin) ? r2._drawMin : a2;
              return a2;
            }
            render(t) {
              const e2 = this.context;
              if (void 0 !== e2._regexSpecial && e2._regexSpecial.nonNumericValue.test(t)) return t;
              {
                const i = new Smart.Utilities.NumberRenderer(t);
                return e2.scientificNotation ? i.toScientific(e2.significantDigits, e2.precisionDigits) : i.toDigits(e2.significantDigits, e2.precisionDigits);
              }
            }
            addTicksAndLabels() {
              const t = this.context, e2 = t._measurements.trackLength, i = t._normalLayout, r2 = t._majorTicksInterval, a2 = Math.round(t._range / parseFloat(r2.toString())), n = e2 / a2, l = parseFloat(t._drawMin), o = parseFloat(t._drawMax);
              let s, c, m2, u2, g2, d2, p2, h2, b2, f2 = "", _2 = "";
              t._tickValues = [], this._longestLabelSize = 0, i ? (s = l, c = t.logarithmicScale && l < 0 && -1 !== l ? parseFloat(s - this.getPreciseModulo(s, r2)) : parseFloat(s - this.getPreciseModulo(s, r2) + parseFloat(r2)), m2 = c - s, g2 = t._formatLabel(l), d2 = t._tickIntervalHandler.labelsSize.minLabelSize, u2 = o, p2 = t._formatLabel(o), h2 = t._tickIntervalHandler.labelsSize.maxLabelSize) : (s = o, c = parseFloat(s - this.getPreciseModulo(s, r2)), m2 = s - c, g2 = t._formatLabel(o), d2 = t._tickIntervalHandler.labelsSize.maxLabelSize, u2 = l, p2 = t._formatLabel(l), h2 = t._tickIntervalHandler.labelsSize.minLabelSize), t._labelDummy = this._createMeasureLabel(), b2 = this._addMajorTickAndLabel(g2, d2, true, s), f2 += b2.tick, _2 += b2.label;
              const S2 = m2 / r2 * n;
              if (c.toString() !== t._drawMax.toString() && S2 < e2) {
                const e3 = t._formatLabel(c.toString()), i2 = d2 < S2;
                b2 = this._addMajorTickAndLabel(e3, void 0, i2, c, true), f2 += b2.tick, _2 += b2.label;
              }
              b2 = this.addMiddleMajorTicks(a2, n, S2, m2, i, r2), f2 += b2.tick, _2 += b2.label, b2 = this._addMajorTickAndLabel(p2, h2, true, u2), f2 += b2.tick, _2 += b2.label, f2 += this.addMinorTicks(i), t._measureLabelScale.removeChild(t._labelDummy), delete t._labelDummy, delete t._measureLabelScale, "smart-tank" === t.nodeName.toLowerCase() && t._updateScaleWidth(this._longestLabelSize), t._appendTicksAndLabelsToScales(f2, _2);
            }
            addMiddleMajorTicks(t, e2, i, r2, a2, n) {
              const l = this.context;
              let o = "", s = "";
              for (let c = 1; c < t; c++) {
                let m2, u2 = c * e2 + i;
                if (m2 = a2 ? parseFloat(l._drawMin) + n * c + r2 : parseFloat(l._drawMax) - n * c - r2, m2.toString() !== l._drawMax.toString()) {
                  let i2 = l._formatLabel(m2.toString()), r3 = true;
                  l._labelDummy.innerHTML = i2, u2 + l._labelDummy[l._settings.size] >= t * e2 && (r3 = false);
                  const a3 = this._addMajorTickAndLabel(i2, void 0, r3, m2, true);
                  o += a3.tick, s += a3.label;
                }
              }
              return { tick: o, label: s };
            }
            addMinorTicks(t) {
              function e2(t2) {
                return parseFloat(t2.toFixed(o));
              }
              function i(t2) {
                -1 === a2.indexOf(t2) && 0 === r2._numericProcessor.getPreciseModulo(t2, l, s) && (d2 += '<div style="' + c + ": " + r2._numericProcessor.valueToPx(t2) + 'px;" class="smart-tick smart-tick-minor"></div>');
              }
              const r2 = this.context, a2 = r2._tickValues, n = r2._tickIntervalHandler.nearestPowerOfTen, l = r2._minorTicksInterval, o = Math.log10(n) < 0 ? Math.round(Math.abs(Math.log10(n))) : 0, s = Math.pow(10, o), c = r2._settings.leftOrTop;
              let m2, u2, g2, d2 = "";
              if (t ? (m2 = a2[0], u2 = a2[1], g2 = a2[a2.length - 1]) : (m2 = a2[a2.length - 1], u2 = a2[a2.length - 2], g2 = a2[0]), r2.logarithmicScale) !function() {
                let t2 = r2._measurements.trackLength / a2.length, e3 = 0.1;
                t2 < 20 ? e3 = 1 : t2 >= 20 && t2 < 40 ? e3 = u2 - m2 > 1 ? 1 : 0.5 : t2 >= 40 && t2 < 80 && (e3 = 0.2);
                let i2 = Math.floor(r2._drawMax), n2 = r2._drawMax - i2, l2 = r2._drawMax - r2._drawMin > a2.length;
                for (let t3 = r2._drawMax; t3 > r2._drawMin - 1; t3 -= 1) {
                  let i3 = n2 > 0 ? Math.pow(10, t3 - n2 + 1) : Math.pow(10, t3), a3 = i3 * e3;
                  for (let t4 = i3; t4 > 0; t4 -= a3) if (t4 < r2.max && t4 > r2.min) {
                    let e4 = new Smart.Utilities.BigNumber(Math.log10(t4));
                    (e4 % 1 == 0 && l2 || !l2) && (d2 += '<div style="' + c + ": " + r2._numericProcessor.valueToPx(e4) + 'px;" class="smart-tick smart-tick-minor"></div>');
                  }
                }
              }();
              else {
                for (let t2 = u2; t2 > m2; t2 = e2(t2 - n)) i(t2);
                for (let t2 = e2(u2 + n); t2 < g2; t2 = e2(t2 + n)) i(t2);
              }
              return d2;
            }
            validateCustomTicks() {
              const t = this.context;
              let e2 = [];
              for (let i = 0; i < t.customTicks.length; i++) {
                const r2 = t.customTicks[i], a2 = this.createDescriptor(r2);
                a2 >= t._minObject && a2 <= t._maxObject && e2.push(a2.toString());
              }
              e2.sort(function(t2, e3) {
                return t2 - e3;
              }), e2 = e2.filter(function(t2, e3, i) {
                return !e3 || t2 !== i[e3 - 1];
              }), t.customTicks = e2.slice(0);
            }
            addGaugeTicksAndLabels() {
              const t = this.context, e2 = this, i = Math.max(t._tickIntervalHandler.labelsSize.minLabelSize, t._tickIntervalHandler.labelsSize.maxLabelSize), r2 = t._majorTicksInterval, a2 = t._minorTicksInterval, n = {}, l = t._distance, o = t._measurements.radius, s = o - l.majorTickDistance, c = o - l.minorTickDistance;
              let m2, u2, g2, d2, p2, h2;
              "none" !== t.ticksVisibility && false !== t._plotTicks ? (m2 = function(e3) {
                t._drawTick(e3, s, "major");
              }, u2 = function(i2) {
                t._drawTick(e2.getAngleByValue(i2, true), c, "minor");
              }) : (m2 = function() {
              }, u2 = function() {
              }), g2 = "none" !== t.labelsVisibility && false !== t._plotLabels ? function(e3, i2, r3) {
                t._drawLabel(e3, i2, l.labelDistance, r3);
              } : function() {
              }, void 0 === t.inverted || !t.inverted && !t.rightToLeft || t.rightToLeft && t.inverted ? (p2 = t.endAngle, h2 = t.startAngle) : (p2 = t.startAngle, h2 = t.endAngle), d2 = e2.getAngleByValue(t._drawMin, false), m2(d2), n[t._drawMin] = true, g2(d2, t.min, false);
              let b2, f2, _2 = t._drawMin - e2.getPreciseModulo(t._drawMin, r2);
              t._drawMin >= 0 && (_2 += r2);
              for (let e3 = _2; e3 >= t._drawMin; e3 -= a2) b2 = e3;
              for (d2 = e2.getAngleByValue(_2, false), m2(d2), n[_2] = true, 2 * Math.PI * t._measurements.innerRadius * (this._getAngleDifference(p2, e2.getAngleByValue(_2, false, true)) / 360) > i && g2(d2, this.getActualValue(_2), _2 < t._drawMax), f2 = _2 + r2; f2 < t._drawMax - r2; f2 += r2) d2 = e2.getAngleByValue(f2, false), m2(d2), n[f2] = true, g2(d2, this.getActualValue(f2), true);
              if (void 0 === n[f2] && f2 <= t._drawMax && (d2 = e2.getAngleByValue(f2, false), m2(d2), n[f2] = true, 2 * Math.PI * t._measurements.innerRadius * (this._getAngleDifference(h2, e2.getAngleByValue(f2, false, true)) / 360) >= i && g2(d2, this.getActualValue(f2), true), t._normalizedStartAngle !== t.endAngle && (d2 = e2.getAngleByValue(t._drawMax, false), m2(d2), n[t._drawMax] = true, 2 * Math.PI * t._measurements.innerRadius * (this._getAngleDifference(h2, p2) / 360) >= i && g2(d2, t.max, false))), t.logarithmicScale) this.drawGaugeLogarithmicScaleMinorTicks(n, r2, u2);
              else for (let e3 = b2; e3 < t._drawMax; e3 += a2) n[e3] || u2(e3);
            }
            updateToolTipAndValue(t, e2, i) {
              const r2 = this.context, a2 = r2.logarithmicScale;
              r2._updateTooltipValue(t), a2 && (t = parseFloat(Math.pow(10, parseFloat(t)).toFixed(11)));
              const n = t.toString();
              r2._number = t, r2._drawValue = a2 ? Math.log10(n) : t, n !== e2 && i && (r2.value = r2._discardDecimalSeparator(n), r2._programmaticValueIsSet || r2.$.fireEvent("change", { value: r2.value, oldValue: e2 }), r2.$.hiddenInput && (r2.$.hiddenInput.value = r2.value), r2._setAriaValue("valuenow"));
            }
            validateInterval(t) {
              const e2 = this.context, i = e2._maxObject - e2._minObject;
              t <= 0 && (t = 1), e2._validInterval = Math.min(parseFloat(t), i), e2.interval = e2._validInterval;
            }
            getCoercedValue(t, e2, i) {
              const r2 = this.context;
              if (!r2.coerce) return t;
              let a2, n, l = !r2.logarithmicScale;
              if (r2.customInterval) {
                const n2 = r2.customTicks;
                if (0 === n2.length) return t;
                l = l || i, a2 = false !== e2 ? parseFloat(r2._drawMin) : r2._minObject;
                let o2 = Math.abs(a2 - t), s2 = a2;
                for (let e3 = 0; e3 < n2.length; e3++) {
                  const i2 = this.createDescriptor(n2[e3]), r3 = l ? i2 : Math.log10(i2), a3 = Math.abs(r3 - t);
                  a3 < o2 && (o2 = a3, s2 = r3);
                }
                return s2;
              }
              false !== e2 ? (a2 = parseFloat(r2._drawMin), n = parseFloat(r2._drawMax)) : (a2 = parseFloat(r2.min), n = parseFloat(r2.max));
              let o = t - a2, s = this.getPreciseModulo(o, parseFloat(r2.interval)), c = this.roundCoefficient;
              if (0 === s) return t;
              0 === this.roundCoefficient && (c = 12);
              let m2 = parseFloat((o - s).toFixed(c)), u2 = m2 + parseFloat(r2.interval);
              if (r2.max - r2.min <= parseFloat(r2.interval) && l) {
                let e3 = a2, i2 = n;
                return t >= e3 + (i2 - e3) / 2 ? i2 : e3;
              }
              if (Math.abs(o - m2) < Math.abs(o - u2)) return m2 + a2;
              {
                const t2 = u2 + a2;
                return t2 > n ? m2 + a2 : t2;
              }
            }
            updateValue(t) {
              const e2 = this.context, i = this.validate(t, e2._minObject, e2._maxObject), r2 = e2.value;
              t.toString() !== r2.toString() || e2._scaleTypeChangedFlag ? (e2.value = t.toString(), e2._number = i, e2._programmaticValueIsSet || e2.$.fireEvent("change", { value: e2.value, oldValue: r2 })) : e2.value = "string" == typeof t ? t : t.toString(), e2._drawValue = e2.logarithmicScale ? Math.log10(i).toString() : i.toString(), e2._moveThumbBasedOnValue(e2._drawValue), e2.$.hiddenInput && (e2.$.hiddenInput.value = e2.value), e2._setAriaValue("valuenow");
            }
            getValuePerPx(t, e2) {
              return parseFloat(t) / e2;
            }
            restrictValue(t) {
              t[1] < t[0] && (t[1] = t[0]);
            }
            lockRotation(t, e2) {
              const i = this.context;
              if (t && e2 < i._number) {
                if (i._lockCW = true, e2 < i._maxObject) return i._maxObject;
              } else if (!t && e2 > i._number && (i._lockCCW = true, e2 > i._minObject)) return i._minObject;
            }
            getAngleRangeCoefficient() {
              const t = this.context;
              t._angleRangeCoefficient = t._angleDifference / t._range;
            }
          }), Smart.Utilities.Assign("ComplexNumericProcessor", class extends Smart.Utilities.BaseNumericProcessor {
            constructor(t, e2) {
              super(t, e2), this.context = t;
            }
            createDescriptor(t, e2, i, r2, a2, n) {
              let l;
              return l = n || (t.constructor === this.complexConstructor ? new this.complexConstructor(t.realPart, t.imaginaryPart) : new this.complexConstructor(t)), r2 && (l = this.validate(l, this.context._minObject, this.context._maxObject)), l;
            }
            validate(t, e2, i) {
              let r2 = t;
              return e2 !== -1 / 0 ? -1 === this.compareComplexNumbers(t, e2) && (r2 = new this.complexConstructor(e2.realPart, e2.imaginaryPart)) : i !== 1 / 0 && 1 === this.compareComplexNumbers(t, i) && (r2 = new this.complexConstructor(i.realPart, i.imaginaryPart)), r2;
            }
            compare(t, e2, i) {
              return true !== i ? 0 !== this.compareComplexNumbers(t, e2) : this.compareComplexNumbers(t, e2);
            }
            validateMinMax(t, e2) {
              const i = this.context;
              t && (null === i.min || i._regexSpecial.inf.test(i.min) ? (i.min = -1 / 0, i._minObject = -1 / 0) : i._minObject = new this.complexConstructor(i.min)), e2 && (null === i.max || i._regexSpecial.inf.test(i.max) ? (i.max = 1 / 0, i._maxObject = 1 / 0) : i._maxObject = new this.complexConstructor(i.max));
            }
            incrementDecrement(t, e2) {
              let i = new this.complexConstructor(t.realPart, t.imaginaryPart), r2 = this.context._spinButtonsStepObject;
              return "add" === e2 ? (i.realPart += r2.realPart, i.imaginaryPart += r2.imaginaryPart) : (i.realPart -= r2.realPart, i.imaginaryPart -= r2.imaginaryPart), i;
            }
            render(t) {
              let e2 = t;
              if (false === this.context._regexSpecial.nonNumericValue.test(t)) {
                let t2, i = e2.realPart, r2 = e2.imaginaryPart, a2 = this.context.significantDigits, n = this.context.precisionDigits;
                r2 >= 0 ? t2 = "+" : (t2 = "-", r2 = Math.abs(r2));
                const l = new Smart.Utilities.NumberRenderer(i), o = new Smart.Utilities.NumberRenderer(r2);
                this.context.scientificNotation ? (i = l.toScientific(a2, n), r2 = o.toScientific(a2, n)) : (i = l.toDigits(a2, n), r2 = o.toDigits(a2, n)), e2 = `${i} ${t2} ${r2}i`;
              }
              return e2;
            }
            compareComplexNumbers(t, e2) {
              if (t instanceof this.complexConstructor == 0 || e2 instanceof this.complexConstructor == 0) return -1;
              const i = t.realPart, r2 = e2.realPart;
              if (i < r2) return -1;
              if (i > r2) return 1;
              {
                const i2 = t.imaginaryPart, r3 = e2.imaginaryPart;
                return i2 < r3 ? -1 : i2 > r3 ? 1 : 0;
              }
            }
          }), Smart.Utilities.Assign("NumberRenderer", class {
            constructor(t) {
              const e2 = this;
              e2.numericValue = t, e2.powersToPrefixes = { 24: "Y", 21: "Z", 18: "E", 15: "P", 12: "T", 9: "G", 6: "M", 3: "k", 0: "", "-3": "m", "-6": "u", "-9": "n", "-12": "p", "-15": "f", "-18": "a", "-21": "z", "-24": "y" }, e2.localizationObject = { currencysymbol: "$", currencysymbolposition: "before", decimalseparator: ".", thousandsseparator: ",", defaultPrecision: 2 };
            }
            isENotation(t) {
              return new RegExp(/e/i).test(t);
            }
            largeExponentialToDecimal(t) {
              let e2;
              void 0 === t && (t = this.numericValue, e2 = true);
              let i = t.toString().toLowerCase(), r2 = i.indexOf("e"), a2 = new Smart.Utilities.BigNumber(i.slice(0, r2)), n = i.slice(r2 + 1, r2 + 2);
              "+" !== n && "-" !== n && (i = i.slice(0, r2) + "e+" + i.slice(r2 + 1), n = "+");
              let l = i.slice(r2 + 2), o = new Smart.Utilities.BigNumber(10).pow(n + (e2 ? Math.min(20, l) : l));
              return a2.multiply(o).toString();
            }
            bigNumberToExponent(t, e2) {
              let i = this.numericValue;
              i.constructor !== Smart.Utilities.BigNumber && (i = new Smart.Utilities.BigNumber(i));
              const r2 = i._f;
              let a2 = i.toString();
              if (r2 <= 10) return e2 ? parseFloat(a2).toExponential(null !== t ? t - 1 : void 0) : new Smart.Utilities.NumberRenderer(parseFloat(a2)).toDigits(t);
              if (t >= r2 && !e2) return a2;
              {
                let n;
                false === i._s ? n = "" : (n = "-", a2 = a2.slice(1)), parseFloat(a2.slice(t, t + 1)) >= 5 && (a2 = new Smart.Utilities.BigNumber(a2.slice(0, t)).add(1).toString());
                let l = a2.slice(1, t);
                if (e2) t--, l.length > 0 && t > l.length ? l += "0".repeat(t - l.length) : 0 === l.length && (l = "0".repeat(t));
                else for (; l.length > 0 && "0" === l.charAt(l.length - 1); ) l = l.slice(0, l.length - 1);
                const o = l.length > 0 ? "." : "", s = r2 - 1;
                return n + a2.slice(0, 1) + o + l + "E+" + s;
              }
            }
            toScientific() {
              const t = this;
              let e2;
              if (e2 = t.numericValue._d ? t.bigNumberToExponent(null !== arguments[0] ? arguments[0] : arguments[1] + 1, true).toLowerCase() : t.numericValue <= -1 || t.numericValue >= 1 ? Number(t.toDigits(arguments[0], arguments[1])).toExponential() : Number(t.numericValue).toExponential(), isNaN(e2)) return e2;
              const i = e2.indexOf("e");
              let r2 = parseInt(e2.slice(i + 1), 10), a2 = parseFloat(e2.slice(0, i)), n = new Smart.Utilities.NumberRenderer(a2);
              if (r2 < 0) {
                let e3 = n.toDigits(arguments[0], arguments[1]);
                if (e3 = parseFloat(e3).toExponential(), "0" === e3.charAt(e3.length - 1)) {
                  let e4 = 0;
                  for (; r2 % 3 != 0; ) r2--, e4++;
                  if (e4) {
                    const t2 = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
                    Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true, a2 = parseFloat(new Smart.Utilities.BigNumber(a2).multiply(Math.pow(10, e4)).toString()), Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = t2;
                  }
                  n.numericValue = a2, a2 = n.toDigits(arguments[0], arguments[1]), n.numericValue = a2 / 1e3;
                  const i2 = n.toDigits(arguments[0], arguments[1]);
                  return i2 >= 1 && (a2 = i2, r2 += 3), a2 + t.powersToPrefixes[r2.toString()];
                }
              }
              let l = 0;
              if (l = Math.abs(r2) > 24 ? r2 - r2 / Math.abs(r2) * 24 : r2 % 3, l > 0) for (let t2 = 0; t2 < l; t2++) a2 *= 10;
              else if (l < 0) {
                const t2 = Smart.Utilities.BigNumber.ignoreBigIntNativeSupport;
                Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = true, a2 = parseFloat(new Smart.Utilities.BigNumber(a2).multiply(Math.pow(10, l)).toString()), Smart.Utilities.BigNumber.ignoreBigIntNativeSupport = t2;
              }
              if (r2 > 0) {
                const t2 = a2 >= 0 ? 0 : 1, r3 = e2.slice(t2, i).length - l - 2;
                r3 >= 0 && (a2 = a2.toFixed(r3));
              }
              let o = Number(a2).toExponential();
              o = parseFloat(o.charAt(o.length - 1)), n.numericValue = a2, a2 = n.toDigits(arguments[0], arguments[1]);
              let s = Number(a2).toExponential(), c = 0;
              s = parseFloat(s.charAt(s.length - 1)), s !== o && s % 3 == 0 && (a2 = parseFloat(a2) / Math.pow(10, s), n.numericValue = a2, a2 = n.toDigits(arguments[0], arguments[1]), c = s);
              const m2 = r2 - l + c;
              return a2 + t.powersToPrefixes[m2.toString()];
            }
            bigNumberToScientific() {
              const t = this, e2 = t.numericValue._f - 1, i = parseInt(e2, 10) % 3, r2 = parseInt(e2, 10) - i;
              let a2, n, l = t.numericValue.toString();
              if ("-" === l.charAt(0) ? (a2 = "-", l = l.slice(1)) : a2 = "", null !== arguments[0]) for (n = l.slice(0, arguments[0]), parseFloat(l.slice(arguments[0], arguments[0] + 1)) >= 5 && (n = new Smart.Utilities.BigNumber(n).add(1).toString()); n.length > 1 + i && "0" === n.charAt(n.length - 1); ) n = n.slice(0, n.length - 1);
              else null !== arguments[1] && (n = l.slice(0, arguments[1] + 1), parseFloat(l.slice(arguments[1] + 1, arguments[1] + 2)) >= 5 && (n = new Smart.Utilities.BigNumber(n).add(1).toString()), arguments[1] + i > n.length - 1 && (n += "0".repeat(arguments[1] + i - n.length + 1)));
              return n.length > 1 + i && (n = n.slice(0, 1 + i) + "." + n.slice(1 + i)), a2 + n + t.powersToPrefixes[r2.toString()];
            }
            toDigits(t, e2) {
              const i = this;
              let r2;
              return r2 = null !== t ? i.applySignificantDigits(t) : null !== e2 ? i.applyPrecisionDigits(e2) : i.applySignificantDigits(8), r2;
            }
            applySignificantDigits(t) {
              const e2 = this;
              function i(t2) {
                for (; "0" === t2.charAt(t2.length - 1); ) t2 = t2.slice(0, -1);
                return "." === t2.charAt(t2.length - 1) && (t2 = t2.slice(0, -1)), t2;
              }
              t = Math.max(1, Math.min(t, 21));
              let r2 = parseFloat(e2.numericValue).toPrecision(t).toUpperCase();
              if (-1 !== r2.indexOf(".")) if (e2.isENotation(r2)) {
                const t2 = r2.indexOf("."), e3 = r2.indexOf("E");
                let a2 = r2.slice(t2, e3);
                a2 = i(a2), r2 = r2.slice(0, t2) + a2 + r2.slice(e3);
              } else r2 = i(r2);
              return r2;
            }
            applyPrecisionDigits(t) {
              const e2 = this;
              t = Math.max(0, Math.min(t, 20));
              let i = parseFloat(e2.numericValue).toFixed(t);
              return e2.isENotation(i) && (i = e2.largeExponentialToDecimal(i) + "." + "0".repeat(t)), i;
            }
            getLogarithm(t) {
              const e2 = this.numericValue;
              let i;
              if (void 0 === t && (t = 10), 10 === t) try {
                i = Math.log10(e2);
              } catch (t2) {
                i = Math.log(e2) / Math.log(10);
              }
              else i = Math.log(e2) / Math.log(t);
              return i;
            }
            applySeparators(t, e2) {
              const i = this, r2 = (t = t.toString()).indexOf(".");
              if (-1 !== r2) {
                const a2 = t.slice(0, r2), n = t.slice(r2 + 1);
                return i.applyThousandsSeparator(a2, e2) + i.localizationObject.decimalseparator + n;
              }
              return i.applyThousandsSeparator(t, e2);
            }
            applyThousandsSeparator(t, e2) {
              if (e2) return t;
              let i = "";
              "-" === (t = t.toString()).charAt(0) && (i = "-", t = t.slice(1));
              let r2 = t.split("").reverse();
              for (let t2 = 2; t2 < r2.length - 1; t2 += 3) r2[t2] = this.localizationObject.thousandsseparator + r2[t2];
              return r2.reverse(), r2 = r2.join(""), i + r2;
            }
            formatNumber(t, e2, i) {
              const r2 = this;
              if (void 0 === arguments[3] && delete r2._ignoreMinus, delete r2._wordLengthNumber, !/^([a-zA-Z]\d*)$/g.test(e2)) try {
                return r2.applyCustomFormat(t, e2);
              } catch (e3) {
                return t.toString();
              }
              const a2 = e2.slice(0, 1);
              let n = e2.slice(1);
              if ("" !== n && (isNaN(parseFloat(n)) || parseFloat(n) < 0 || parseFloat(n) > 99 ? n = "" : parseFloat(n) % 1 != 0 && (n = Math.round(n))), t._d) r2.inputFormat = "integer";
              else {
                if (t.imaginaryPart) return r2.formatComplexNumber(t, e2, a2, n);
                r2.inputFormat = "floatingPoint";
              }
              let l, o = new Smart.Utilities.NumericProcessor(r2, "inputFormat"), s = o.createDescriptor(t);
              switch (r2._wordLengthNumber = o.getWordLength(i || "int32"), "integer" === r2.inputFormat && (s = o.round(s)), r2.numericValue = s, a2) {
                case "C":
                case "c":
                  return "" === n && (n = r2.localizationObject.defaultPrecision), n = parseFloat(n), l = "floatingPoint" === r2.inputFormat ? r2.applyPrecisionDigits(n) : s.toString() + (n > 0 ? "." + "0".repeat(n) : ""), l = r2.applySeparators(l), "before" === r2.localizationObject.currencysymbolposition ? "-" === l.charAt(0) ? "-" + r2.localizationObject.currencysymbol + l.slice(1) : r2.localizationObject.currencysymbol + l : l + " " + r2.localizationObject.currencysymbol;
                case "D":
                case "d": {
                  if (l = s, "floatingPoint" === r2.inputFormat && (l = Math.round(s)), l = l.toString(), "" === n) return l;
                  let t2 = "";
                  "-" === l.charAt(0) && (t2 = "-", l = l.slice(1));
                  const e3 = n - l.length;
                  return e3 > 0 && (l = "0".repeat(e3) + l), t2 + l;
                }
                case "E":
                case "e":
                case "U":
                case "u": {
                  "" === n && (n = 6), l = "floatingPoint" === r2.inputFormat ? s.toExponential(n) : r2.bigNumberToExponent(parseFloat(n) + 1, true).toLowerCase();
                  const t2 = l.indexOf("e"), e3 = l.slice(t2 + 2).length;
                  return e3 < 3 && (l = l.slice(0, t2 + 2) + "0".repeat(3 - e3) + l.slice(t2 + 2)), "u" === a2.toLowerCase() ? r2.exponentialToSuperscript(r2.applySeparators(l, true)) : ("E" === a2 && (l = l.toUpperCase()), r2.applySeparators(l, true));
                }
                case "F":
                case "f":
                case "N":
                case "n":
                  return "" === n && (n = r2.localizationObject.defaultPrecision), n = parseFloat(n), l = "floatingPoint" === r2.inputFormat ? r2.applyPrecisionDigits(n) : s.toString() + (n > 0 ? "." + "0".repeat(n) : ""), r2.applySeparators(l, "f" === a2.toLowerCase());
                case "G":
                case "g": {
                  if ("" === n || "0" === n) if ("floatingPoint" === r2.inputFormat) n = 15;
                  else switch (i) {
                    case "int8":
                    case "uint8":
                      n = 3;
                      break;
                    case "int16":
                    case "uint16":
                      n = 5;
                      break;
                    case "int64":
                      n = 19;
                      break;
                    case "uint64":
                      n = 20;
                      break;
                    default:
                      n = 10;
                  }
                  n = parseFloat(n);
                  let e3 = r2.formatNumber(t, "E" + n, i), l2 = e3.indexOf("E");
                  const o2 = parseInt(e3.slice(l2 + 1), 10);
                  if (o2 > -5 && o2 < n) return "floatingPoint" === r2.inputFormat ? r2.applySeparators(r2.applySignificantDigits(n), true) : s.toString();
                  if (o2 > -100 && o2 < 100 && (e3 = e3.slice(0, l2 + 2) + e3.slice(l2 + 3)), -1 !== e3.indexOf(r2.localizationObject.decimalseparator)) {
                    for (; "0" === e3.charAt(l2 - 1); ) e3 = e3.slice(0, l2 - 1) + e3.slice(l2), l2 = e3.indexOf("E");
                    e3.charAt(l2 - 1) === r2.localizationObject.decimalseparator && (e3 = e3.slice(0, l2 - 1) + e3.slice(l2));
                  }
                  return "g" === a2 && (e3 = e3.toLowerCase()), e3;
                }
                case "P":
                case "p":
                  return "" === n && (n = r2.localizationObject.defaultPrecision), n = parseFloat(n), "floatingPoint" === r2.inputFormat ? (r2.numericValue = 100 * s, l = r2.applyPrecisionDigits(n)) : l = s.multiply(100).toString() + (n > 0 ? "." + "0".repeat(n) : ""), r2.applySeparators(l) + " %";
                case "B":
                case "b":
                case "O":
                case "o":
                case "X":
                case "x": {
                  let e3;
                  switch ("integer" !== r2.inputFormat && (r2.inputFormat = "integer", o = new Smart.Utilities.NumericProcessor(r2, "inputFormat"), s = o.round(o.createDescriptor(t))), a2) {
                    case "B":
                    case "b":
                      e3 = 2;
                      break;
                    case "O":
                    case "o":
                      e3 = 8;
                      break;
                    default:
                      e3 = 16;
                  }
                  if (l = s.toString(e3, r2._wordLengthNumber), "" !== n) {
                    const t2 = parseFloat(n) - l.length;
                    t2 > 0 && (l = "0".repeat(t2) + l);
                  }
                  return "x" === a2 && (l = l.toLowerCase()), l;
                }
                case "S":
                case "s":
                  return "" === n && (n = r2.localizationObject.defaultPrecision), n = parseFloat(n), r2.toScientific(null, n).replace(".", r2.localizationObject.decimalseparator);
                default:
                  return t.toString();
              }
            }
            formatComplexNumber(t, e2, i) {
              const r2 = this;
              switch (i) {
                case "E":
                case "e":
                case "U":
                case "u":
                case "F":
                case "f":
                case "G":
                case "g":
                case "N":
                case "n":
                case "S":
                case "s":
                  return t.imaginaryPart >= 0 ? r2.formatNumber(t.realPart, e2) + " + " + r2.formatNumber(t.imaginaryPart, e2) + "i" : r2.formatNumber(t.realPart, e2) + " - " + r2.formatNumber(Math.abs(t.imaginaryPart), e2) + "i";
                default:
                  return t.toString();
              }
            }
            toString(t, e2, i) {
              return e2 ? this.formatNumber(t, e2, i) : t.toString();
            }
            applyCustomFormat(t, e2) {
              const i = this, r2 = (e2 = (e2 = e2.replace(/_.|\[\w*\]|\*/g, "")).replace(/\?/g, "#")).split(";");
              if ("string" == typeof t && isNaN(t)) return r2[r2.length - 1].replace(/"/g, "").replace(/@/g, t.toString());
              if (t._d) i.inputFormat = "integer";
              else {
                if (t.imaginaryPart) return t.toString();
                t = parseFloat(t), i.inputFormat = "floatingPoint";
              }
              let a2 = new Smart.Utilities.NumericProcessor(i, "inputFormat"), n = a2.createDescriptor(t);
              "integer" === i.inputFormat && (n = a2.round(n)), i.numericProcessor = a2;
              const l = i.getRelevantFormatSection(r2, n);
              if (void 0 === l) return t.toString();
              if (-1 !== l.indexOf("@")) return r2[r2.length - 1].replace(/"/g, "").replace(/@/g, t.toString());
              const o = -1 !== l.replace(/".*"/g, "").indexOf("%"), s = i.getTextParts(l);
              if (-1 !== s.main.toLowerCase().indexOf("e")) return i.applyCustomExponentialFormat(n, s, a2);
              if (-1 !== s.main.indexOf("/")) return i.applyCustomFractionalFormat(n, s, a2);
              if (o && ("integer" === i.inputFormat ? n = n.multiply(100) : n *= 100), "" === s.main) {
                if (!o) return s.suffix;
                let t2 = n.toString();
                return i._ignoreMinus && "-" === t2.charAt(0) && (t2 = t2.slice(1)), t2 + s.suffix;
              }
              let c = s.main.replace(/[^0#,. \/]/g, ""), m2 = c.indexOf(".");
              for (-1 !== m2 && (c = c.substring(0, m2 + 1) + c.substring(m2 + 1).replace(/\./g, ""), "." === c.charAt(c.length - 1) && (c = c.slice(0, c.length - 1)), 0 === m2 && (c = "#" + c)); "," === c.charAt(c.length - 1); ) c = c.slice(0, c.length - 1), "floatingPoint" === i.inputFormat ? n /= 1e3 : n = n.multiply(1e-3);
              "integer" === i.inputFormat && (n = a2.round(n));
              const u2 = -1 !== c.indexOf(",");
              c = c.replace(/,/g, "");
              const g2 = c.split("."), d2 = g2[0];
              let p2 = g2[1], h2 = "";
              if (1 === g2.length) return "floatingPoint" === i.inputFormat && (n = a2.round(n)), h2 = n.toString(), i.setTextParts(i.formatWholeNumber(h2, d2, u2), s);
              h2 = n.toString();
              let b2 = h2.split("."), f2 = i.formatWholeNumber(b2[0], d2, u2), _2 = b2[1] || "";
              if (p2.length <= _2.length && (h2 = parseFloat(n.toFixed(p2.length)).toString(), b2 = h2.split("."), f2 = i.formatWholeNumber(b2[0], d2, u2), _2 = b2[1] || "", _2)) return i.setTextParts(f2 + i.localizationObject.decimalseparator + _2.slice(0, p2.length), s);
              p2 = p2.slice(_2.length - p2.length);
              let S2 = p2.lastIndexOf("0");
              return -1 === S2 ? "" === _2 ? i.setTextParts(f2, s) : i.setTextParts(f2 + i.localizationObject.decimalseparator + _2, s) : i.setTextParts(f2 + i.localizationObject.decimalseparator + _2 + "0".repeat(S2 + 1), s);
            }
            getRelevantFormatSection(t, e2) {
              const i = this, r2 = i.numericProcessor.compare(e2, 0, true);
              if (1 === r2) return t[0];
              let a2, n;
              return t.length >= 3 ? (i._ignoreMinus = true, a2 = 1, n = 2) : 2 === t.length ? (i._ignoreMinus = true, n = 0, a2 = 1) : 1 === t.length && (n = 0, a2 = 0), 0 === r2 ? t[n] : -1 === r2 ? t[a2] : void 0;
            }
            getTextParts(t) {
              const e2 = t.replace(/"[^"]*"/g, ""), i = t.match(/"[^"]*"/g), r2 = e2.search(/0|#|\./g), a2 = Math.max(e2.lastIndexOf("0"), e2.lastIndexOf("#"), e2.lastIndexOf("."), e2.lastIndexOf(",")), n = e2.slice(r2, a2 + 1);
              if ("" === n) return { prefix: "", main: "", suffix: t.replace(/"/g, "") };
              let l = t.indexOf(n), o = l + n.length;
              if (i) for (let e3 = 0; e3 < i.length; e3++) {
                const r3 = t.indexOf(i[e3]);
                l >= r3 && o <= r3 + i[e3].length && (l = t.indexOf(n, r3 + i[e3].length), o = l + n.length);
              }
              return { prefix: t.slice(0, l).replace(/"/g, ""), main: n, suffix: t.slice(o).replace(/"/g, "") };
            }
            applyCustomExponentialFormat(t, e2, i) {
              const r2 = this;
              let a2, n = e2.main;
              const l = -1 !== n.indexOf(",");
              n = n.replace(/[^0#.eE+-]/g, "");
              const o = n.toLowerCase().indexOf("e");
              n = n.substring(0, o + 1) + n.substring(o + 1).replace(/[eE\.]/g, "");
              const s = n.charAt(o), c = n.indexOf(".");
              -1 !== c && (n = n.substring(0, c + 1) + n.substring(c + 1).replace(/\./g, "")), "." === n.charAt(n.length - 1) && (n = n.slice(0, n.length - 1));
              const m2 = n.split(s);
              let u2 = m2[0];
              const g2 = u2.split("."), d2 = g2[0], p2 = g2[1], h2 = m2[1];
              let b2 = t.toString().split(".")[0].replace(/-/, ""), f2 = 0;
              if ("0" === b2 && i.compare(t, 0)) {
                let e3 = d2.length - 1;
                for (; 0 === parseInt(t); ) f2++, t *= 10;
                b2 = t.toString().split(".")[0].replace(/-/, ""), f2 += e3, t *= Math.pow(10, e3);
              }
              if (l && (u2 = u2.slice(0, 1) + "," + u2.slice(1)), b2.length <= d2.length) a2 = r2.formatNumber(t, u2, void 0, true) + s + r2.formatExponent(0 - f2, h2);
              else {
                const e3 = b2.length - d2.length;
                let n2 = "floatingPoint" === r2.inputFormat ? t / Math.pow(10, e3) : t.divide(Math.pow(10, e3));
                p2 || (a2 = r2.applyThousandsSeparator(i.round(n2).toString(), !l) + s + r2.formatExponent(e3 - f2, h2));
                let o2 = n2.toString().split(".")[1] || "";
                o2.length === p2.length ? a2 = r2.applySeparators(n2, !l) + s + r2.formatExponent(e3 - f2, h2) : o2.length < p2.length ? a2 = r2.formatNumber(n2, u2, void 0, true) + s + r2.formatExponent(e3 - f2, h2) : (n2 = "floatingPoint" === r2.inputFormat ? n2.toFixed(p2.length) : n2 = i.round(t.divide(Math.pow(10, e3 - p2.length))).divide(Math.pow(10, p2.length)), a2 = r2.formatNumber(parseFloat(n2), u2, void 0, true) + s + r2.formatExponent(e3 - f2, h2));
              }
              return r2.setTextParts(a2, e2);
            }
            formatExponent(t, e2) {
              let i;
              return -1 !== ["+", "-"].indexOf(e2.charAt(0)) && (i = e2.charAt(0), (t > 0 && "-" === i || t < 0 && "+" === i) && (i = void 0)), t < 0 && (t = Math.abs(t), i = "-"), e2 = e2.replace(/[+-]/g, ""), (i || "") + (t = this.formatNumber(t, e2, void 0, true));
            }
            formatWholeNumber(t, e2, i) {
              const r2 = this;
              let a2 = "";
              if ("-" === t.charAt(0) && (r2._ignoreMinus || (a2 = "-"), t = t.slice(1)), "0" === t) {
                if (e2 === "#".repeat(e2.length)) return a2;
                t = "";
              }
              if (e2.length <= t.length) return a2 + r2.applyThousandsSeparator(t, !i);
              for (let i2 = (e2 = e2.slice(0, e2.length - t.length)).length - 1; i2 >= 0; i2--) "0" === e2.charAt(i2) && (t = "0" + t);
              return a2 + r2.applyThousandsSeparator(t, !i);
            }
            setTextParts(t, e2) {
              return e2.prefix + t + e2.suffix;
            }
            applyCustomFractionalFormat(t, e2, i) {
              const r2 = this, a2 = /^([0#,]+[ ]+)?([0#,]+\/[0#,]+)$/;
              let n, l = e2.main.trim();
              if (!a2.test(l)) return t.toString();
              const o = a2.exec(l);
              if (o[2] = o[2].replace(/,/g, ""), "integer" === r2.inputFormat) {
                const i2 = o[2].split("/");
                return void 0 === o[1] ? n = r2.formatNumber(t, i2[0], void 0, true) + "/" + r2.formatNumber(1, i2[1], void 0, true) : (n = r2.formatNumber(t, o[1].trim(), void 0, true), -1 !== o[2].indexOf("0") && (n += " " + r2.formatNumber(0, i2[0], void 0, true) + "/" + r2.formatNumber(1, i2[1], void 0, true))), r2.setTextParts(n, e2);
              }
              if (void 0 === o[1]) n = (t < 0 ? "-" : "") + r2.formatAsFraction(Math.abs(t), o[2]);
              else {
                const e3 = o[1].trim(), a3 = o[2];
                n = r2.formatNumber(parseInt(t, 10), e3, void 0, true) + " " + r2.formatAsFraction(i.getPreciseModulo(Math.abs(t), 1), a3);
              }
              return r2.setTextParts(n.trim(), e2);
            }
            formatAsFraction(t, e2) {
              const i = this, r2 = e2.split("/");
              if (0 === t) return -1 === e2.indexOf("0") ? "" : i.formatNumber(0, r2[0], void 0, true) + "/" + i.formatNumber(1, r2[1], void 0, true);
              if (t % 1 == 0) return i.formatNumber(t, r2[0], void 0, true) + "/" + i.formatNumber(1, r2[1], void 0, true);
              const a2 = [];
              i.approximateFractions(t, a2);
              const n = r2[1].length >= 2 ? 2 : 1;
              let l = [], o = [];
              a2.forEach(function(e3, i2) {
                const r3 = e3.denominator.toString().length, a3 = Math.abs(t - e3.numerator / e3.denominator);
                if (void 0 === l[r3]) return o[r3] = i2, void (l[r3] = a3);
                a3 < l[r3] && (o[r3] = i2, l[r3] = a3);
              });
              let s = o[n] ? a2[o[n]] : a2[o[1]];
              return i.formatNumber(s.numerator, r2[0], void 0, true) + "/" + i.formatNumber(s.denominator, r2[1], void 0, true);
            }
            approximateFractions(t, e2) {
              const i = [0, 1], r2 = [1, 0], a2 = this.getMaxNumerator(t);
              let n, l = t, o = NaN;
              for (let s = 2; s < 1e3; s++) {
                const c = Math.floor(l);
                if (i[s] = c * i[s - 1] + i[s - 2], Math.abs(i[s]) > a2) return;
                if (r2[s] = c * r2[s - 1] + r2[s - 2], n = i[s] / r2[s], n === o) return;
                if (e2.push({ numerator: i[s], denominator: r2[s] }), n === t) return;
                o = n, l = 1 / (l - c);
              }
            }
            getMaxNumerator(t) {
              let e2 = null, i = t.toString().indexOf("E");
              -1 === i && (i = t.toString().indexOf("e")), e2 = -1 === i ? t.toString() : t.toString().substring(0, i);
              let r2 = null;
              const a2 = e2.toString().indexOf(".");
              -1 === a2 ? r2 = e2 : 0 === a2 ? r2 = e2.substring(1, e2.length) : a2 < e2.length && (r2 = e2.substring(0, a2) + e2.substring(a2 + 1, e2.length));
              let n = r2;
              const l = n.toString().length, o = t;
              let s = o.toString().length;
              0 === o && (s = 0);
              const c = l - s;
              for (let t2 = c; t2 > 0 && n % 2 == 0; t2--) n /= 2;
              for (let t2 = c; t2 > 0 && n % 5 == 0; t2--) n /= 5;
              return n;
            }
            exponentialToSuperscript(t) {
              const e2 = t.indexOf("e"), i = t.slice(e2 + 1).replace(/0{1,2}/, "");
              let r2 = t.slice(0, e2 + 1);
              return r2 = r2.replace("e", "×10"), r2 += this.toSuperscript(i), r2 = r2.replace("+", ""), r2;
            }
            toSuperscript(t, e2) {
              const i = "-0123456789", r2 = "⁻⁰¹²³⁴⁵⁶⁷⁸⁹";
              let a2 = "";
              for (let n = 0; n < t.length; n++) if (true === e2) {
                const e3 = r2.indexOf(t.charAt(n));
                a2 += -1 !== e3 ? i[e3] : t[n];
              } else {
                const e3 = i.indexOf(t.charAt(n));
                a2 += -1 !== e3 ? r2[e3] : t[n];
              }
              return a2;
            }
          });
        }
      ),
      /***/
      7997: (
        /***/
        () => {
          Smart("smart-numeric-text-box", class extends Smart.BaseElement {
            static get properties() {
              return { decimalSeparator: { value: ".", type: "string" }, dropDownAppendTo: { value: null, type: "any" }, enableMouseWheelAction: { value: false, type: "boolean" }, inputFormat: { value: "integer", allowedValues: ["integer", "floatingPoint", "complex"], type: "string" }, hint: { value: "", type: "string" }, label: { value: "", type: "string" }, leadingZeros: { value: false, type: "boolean" }, max: { value: null, type: "any" }, messages: { value: { en: { binary: "BIN", octal: "OCT", decimal: "DEC", hexadecimal: "HEX", integerOnly: "smartNumericTextBox: The property {{property}} can only be set when inputFormat is integer.", noInteger: "smartNumericTextBox: the property {{property}} cannot be set when inputFormat is integer.", significantPrecisionDigits: "smartNumericTextBox: the properties significantDigits and precisionDigits cannot be set at the same time." } }, type: "object", extend: true }, min: { value: null, type: "any" }, name: { value: "", type: "string" }, nullable: { value: false, type: "boolean" }, opened: { value: false, type: "boolean" }, outputFormatString: { value: null, type: "string?" }, placeholder: { value: "", type: "string" }, dropDownEnabled: { value: false, type: "boolean" }, precisionDigits: { value: null, type: "number?" }, radix: { value: 10, allowedValues: ["2", "8", "10", "16", 2, 8, 10, 16, "binary", "octal", "decimal", "hexadecimal"], type: "any" }, radixDisplay: { value: false, type: "boolean" }, radixDisplayPosition: { value: "left", allowedValues: ["left", "right"], type: "string" }, scientificNotation: { value: false, type: "boolean" }, showDropDownValues: { value: false, type: "boolean" }, showUnit: { value: false, type: "boolean" }, significantDigits: { value: null, type: "number?" }, spinButtons: { value: false, type: "boolean" }, spinButtonsDelay: { value: 75, type: "number" }, spinButtonsInitialDelay: { value: 0, type: "number" }, spinButtonsPosition: { value: "right", allowedValues: ["left", "right"], type: "string" }, spinButtonsStep: { value: "1", type: "any" }, type: { value: "numeric", type: "string", defaultReflectToAttribute: true, readonly: true }, unit: { value: "kg", type: "string" }, validation: { value: "strict", allowedValues: ["strict", "interaction"], type: "string" }, value: { value: "0", type: "any?" }, wordLength: { value: "int32", allowedValues: ["int8", "uint8", "int16", "uint16", "int32", "uint32", "int64", "uint64"], type: "string" } };
            }
            static get listeners() {
              return { mouseenter: "_mouseenterMouseleaveHandler", mouseleave: "_mouseenterMouseleaveHandler", resize: "_resizeHandler", "downButton.click": "_downButtonClickHandler", "downButton.mouseenter": "_mouseenterMouseleaveHandler", "downButton.mouseleave": "_mouseenterMouseleaveHandler", "dropDown.click": "_dropDownItemClickHandler", "dropDown.mouseout": "_mouseenterMouseleaveHandler", "dropDown.mouseover": "_mouseenterMouseleaveHandler", "input.blur": "_inputBlurHandler", "input.change": "_inputChangeHandler", "input.focus": "_inputFocusHandler", "input.keydown": "_inputKeydownHandler", "input.keyup": "_inputKeyupHandler", "input.paste": "_inputPasteHandler", "input.wheel": "_inputWheelHandler", "radixDisplayButton.click": "_radixDisplayButtonClickHandler", "radixDisplayButton.mouseenter": "_mouseenterMouseleaveHandler", "radixDisplayButton.mouseleave": "_mouseenterMouseleaveHandler", "upButton.click": "_upButtonClickHandler", "upButton.mouseenter": "_mouseenterMouseleaveHandler", "upButton.mouseleave": "_mouseenterMouseleaveHandler", "document.down": "_documentMousedownHandler", "document.up": "_documentMouseupHandler" };
            }
            static get requires() {
              return window.NIComplex ? { "Smart.Button": "smart.button.js", "Smart.Utilities.BigNumber": "smart.math.js", "Smart.Utilities.NumericProcessor": "smart.numeric.js" } : { "Smart.Button": "smart.button.js", "Smart.Utilities.Complex": "smart.complex.js", "Smart.Utilities.BigNumber": "smart.math.js", "Smart.Utilities.NumericProcessor": "smart.numeric.js" };
            }
            static get styleUrls() {
              return ["smart.button.css", "smart.numerictextbox.css"];
            }
            template() {
              return '<div id="container" class="smart-container" role="presentation">\n                <span id="label" inner-h-t-m-l="[[label]]" class="smart-label"></span>\n                <div id="radixDisplayButton" class="smart-unselectable smart-input-addon smart-drop-down-button smart-numeric-text-box-component smart-numeric-text-box-radix-display" role="button" aria-haspopup="listbox"></div>\n                <input id="input" type="text" spellcheck="false" class="smart-input smart-numeric-text-box-component" placeholder="[[placeholder]]" readonly="[[readonly]]" disabled="[[disabled]]" name="[[name]]" aria-label="[[placeholder]]" />\n                <div id="unitDisplay" class="smart-unselectable smart-input-addon smart-drop-down-button smart-numeric-text-box-component smart-numeric-text-box-unit-display" role="presentation"></div>\n                <div id="spinButtonsContainer" class="smart-input-addon smart-numeric-text-box-component smart-spin-buttons-container" role="presentation">\n                    <smart-repeat-button initial-delay="[[spinButtonsInitialDelay]]" delay="[[spinButtonsDelay]]" animation="[[animation]]" unfocusable id="upButton" class="smart-spin-button" aria-label="Increment" right-to-left="[[rightToLeft]]">\n                        <div class="smart-arrow smart-arrow-up" role="presentation" aria-hidden="true"></div>\n                    </smart-repeat-button>\n                    <smart-repeat-button initial-delay="[[spinButtonsInitialDelay]]" delay="[[spinButtonsDelay]]" animation="[[animation]]" unfocusable id="downButton" class="smart-spin-button" aria-label="Decrement" right-to-left="[[rightToLeft]]">\n                        <div class="smart-arrow smart-arrow-down" role="presentation" aria-hidden="true"></div>\n                    </smart-repeat-button>\n                </div>\n                <ul id="dropDown" class="smart-visibility-hidden smart-drop-down smart-numeric-text-box-drop-down" role="listbox">\n                    <li id="dropDownItem2" class="smart-list-item" data-value="2" role="option"></li>\n                    <li id="dropDownItem8" class="smart-list-item" data-value="8" role="option"></li>\n                    <li id="dropDownItem10" class="smart-list-item" data-value="10" role="option"></li>\n                    <li id="dropDownItem16" class="smart-list-item" data-value="16" role="option"></li>\n                </ul>\n                <span id="hint" class="smart-hint smart-hidden" inner-h-t-m-l="[[hint]]"></span>\n            </div>';
            }
            attached() {
              const e2 = this;
              super.attached(), e2.isCompleted && (e2._positionDetection.dropDownAttached(), e2._positionDetection.checkBrowserBounds());
            }
            detached() {
              const e2 = this;
              super.detached(), e2.opened && e2._closeRadix(true), e2._positionDetection && e2._positionDetection.dropDownDetached();
            }
            ready() {
              super.ready();
            }
            render() {
              const e2 = this;
              e2._numericProcessor = new Smart.Utilities.NumericProcessor(e2, "inputFormat"), e2._numberRenderer = new Smart.Utilities.NumberRenderer(), e2._numberRenderer.localizationObject.decimalseparator = e2.decimalSeparator, e2._positionDetection = new Smart.Utilities.PositionDetection(e2, e2.$.dropDown, e2.$.container, "_closeRadix"), e2._positionDetection.getDropDownParent(true), e2._dropDownListPosition = "bottom", e2.rightToLeft && (e2.spinButtonsPosition = "right" === e2.spinButtonsPosition ? "left" : "right"), e2._setIds(), e2.setAttribute("aria-describedby", e2.$.unitDisplay.id + " " + e2.$.hint.id), e2.getAttribute("aria-labelledby") || e2.setAttribute("aria-labelledby", e2.$.label.id), e2.$.radixDisplayButton.setAttribute("aria-owns", e2.$.dropDown.id), e2.rightToLeft && null !== e2.dropDownAppendTo && e2.$.dropDown.setAttribute("right-to-left", ""), e2._radixPrefixes = { 10: "d", 2: "b", 8: "o", 16: "x" }, e2._regex = { 2: new RegExp(/^[0-1]+$/), 8: new RegExp(/^[0-7]+$/), 10: new RegExp(/^[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?$/), 16: new RegExp(/^[0-9a-f]+$/i) }, e2._regexSpecial = { nan: new RegExp(/^(nan)$/i), inf: new RegExp(/^((-?inf(inity)?)|([+\-]?∞))$/i), nonNumericValue: new RegExp(/^$|(^((nan)|((-?inf(inity)?)|([+\-]?∞))|(null))$)/i), exaValue: new RegExp(/^[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[E])([+\-]\d*)?i$/) }, e2._initialDropDownOptionsSet = false, "left" === e2.spinButtonsPosition && e2.$.container.insertBefore(e2.$.spinButtonsContainer, e2.$.label.nextElementSibling), "right" === e2.radixDisplayPosition && e2.$.container.insertBefore(e2.$.radixDisplayButton, e2.$.unitDisplay.nextElementSibling), e2._setInitialComponentDisplay(), e2._initialAdjustments(), e2._refreshShape(), e2._initialized = true, super.render();
            }
            _setIds() {
              const e2 = this;
              e2.$.label.id || (e2.$.label.id = e2.id + "Label"), e2.$.radixDisplayButton.id || (e2.$.radixDisplayButton.id = e2.id + "RadixDisplayButton"), e2.$.unitDisplay.id || (e2.$.unitDisplay.id = e2.id + "UnitDisplay"), e2.$.dropDown.id || (e2.$.dropDown.id = e2.id + "DropDown"), e2.$.hint.id || (e2.$.hint.id = e2.id + "Hint");
            }
            _refreshShape() {
              const e2 = this.$.container.querySelectorAll(".smart-numeric-text-box-component:not(.smart-hidden)");
              Array.from(this.$.container.getElementsByClassName("smart-numeric-text-box-component")).forEach((e3) => e3.classList.remove("smart-numeric-text-box-component-border-left", "smart-numeric-text-box-component-border-right")), e2.length > 0 && (e2[0].classList.add("smart-numeric-text-box-component-border-left"), e2[e2.length - 1].classList.add("smart-numeric-text-box-component-border-right"));
            }
            val(e2, t) {
              const n = this, i = null !== e2 && "object" == typeof e2 && 0 === Object.keys(e2).length;
              if (void 0 === e2 || false !== i) return n.value;
              {
                const i2 = n.value;
                if (("" === e2 || null === e2) && null === i2) return null;
                if (null === e2) return n._triggerChangeEvent = "strict" === n.validation, n._validate(false, null), n._triggerChangeEvent = false, void (n._programmaticValueIsSet = true);
                if ((e2 = e2.toString()).toUpperCase() === i2.toString().toUpperCase()) return e2;
                void 0 === t ? (n._triggerChangeEvent = "strict" === n.validation, n._validate(false, e2), n._triggerChangeEvent = false) : n._setValue(e2), n._programmaticValueIsSet = true;
              }
            }
            focus() {
              this.$.input.focus();
            }
            _updateSpinButtonsStepObject() {
              const e2 = this;
              e2._spinButtonsStepObject = e2._numericProcessor.createDescriptor(e2.spinButtonsStep, true);
            }
            _setInitialComponentDisplay() {
              const e2 = this;
              false === e2.spinButtons && e2.$spinButtonsContainer.addClass("smart-hidden"), false === e2.radixDisplay && e2.$radixDisplayButton.addClass("smart-hidden"), false === e2.showUnit && e2.$unitDisplay.addClass("smart-hidden");
            }
            _initialAdjustments() {
              const e2 = this;
              e2._radixNumber = e2._getRadix(e2.radix), e2._wordLengthNumber = e2._numericProcessor.getWordLength(e2.wordLength), e2._validatePropertyCompatibility(), e2._numericProcessor.validateMinMax(true, true), e2._updateSpinButtonsStepObject(), e2._validate(true), e2._programmaticValueIsSet = true, e2._cachedInputValue = e2.$.input.value, void 0 === e2._editableValue && (e2._editableValue = e2._cachedInputValue), e2.$.radixDisplayButton.innerHTML = e2._radixPrefixes[e2._radixNumber], e2.$.unitDisplay.innerHTML = e2.unit, e2.disabled && (e2.$.upButton.disabled = true, e2.$.downButton.disabled = true), e2.opened && (e2.dropDownEnabled && !e2.disabled && null !== e2.value ? e2._openRadix() : e2.opened = false), e2.$.radixDisplayButton.setAttribute("aria-expanded", e2.opened), e2._setFocusable();
            }
            _validatePropertyCompatibility() {
              const e2 = this;
              "integer" !== e2.inputFormat ? (10 !== e2._radixNumber && e2.error(e2.localize("integerOnly", { property: "radix" })), e2.radixDisplay && e2.error(e2.localize("integerOnly", { property: "radixDisplay" })), e2.dropDownEnabled && e2.error(e2.localize("integerOnly", { property: "dropDownEnabled" })), "int32" !== e2.wordLength && e2.error(e2.localize("integerOnly", { property: "wordLength" }))) : null !== e2.precisionDigits && e2.error(e2.localize("noInteger", { property: "precisionDigits" })), null === e2.significantDigits && null === e2.precisionDigits ? e2.significantDigits = 8 : null !== e2.significantDigits && null !== e2.precisionDigits && e2.error(e2.localize("significantPrecisionDigits"));
            }
            _validate(e2, t) {
              const n = this;
              let i;
              if (e2) i = n.value, void 0 === i && (i = n.nullable ? null : "0");
              else if (void 0 === t || null === t && !n.nullable) {
                if (i = n.$.input.value, i === n.value && true !== n._programmaticValueIsSet) return void (n.$.input.value = n._cachedInputValue);
              } else i = t;
              if (n.nullable && (null === i || "" === i)) return n.value = null, n._number = null, n.$.input.value = "", n._cachedInputValue = "", n._editableValue = "", void n._disableComponents();
              const a2 = n._numericProcessor.prepareForValidation(e2, t, i);
              if (void 0 === a2) return void n._disableComponents();
              const r2 = n._numericProcessor.createDescriptor(a2.value, true, true, !e2 && void 0 === t || "strict" === n.validation, e2 || void 0 !== t, a2.enteredComplexNumber);
              if (e2) {
                n._number = r2;
                let e3 = n._renderValue(r2);
                n.value = r2.toString(), n.$.input.value = e3;
              } else n._updateValue(r2);
              n._programmaticValueIsSet = false, n._disableComponents();
            }
            _handleNonNumericValue(e2, t, n) {
              const i = this;
              if ("integer" !== i.inputFormat) {
                if (i._regexSpecial.nan.test(n)) return void i._handleNaN(e2);
                if (i._regexSpecial.inf.test(n)) return void i._handleInfinity(e2, t, n);
              }
              if (e2) {
                let e3 = i._numericProcessor.createDescriptor(0);
                i._number = i._validateRange(e3);
                const t2 = i._renderValue(i._number);
                i.value = i._number.toString(), i.$.input.value = t2;
              } else if (void 0 === t) i.$.input.value = i._cachedInputValue;
              else {
                const e3 = i._number.toString();
                i.value !== e3 && (i.value = e3);
              }
            }
            _handleNaN(e2) {
              const t = this;
              if (t.$.input.value = "NaN", e2) t.value = NaN, t._number = NaN;
              else {
                const e3 = t.value;
                null !== e3 && "NaN" === e3.toString() || (t.value = NaN, t._number = NaN, t._cachedInputValue = "NaN", t._editableValue = "NaN", t._triggerChangeEvent && t.$.fireEvent("change", { value: NaN, oldValue: e3, radix: t._radixNumber }));
              }
            }
            _handleInfinity(e2, t, n) {
              const i = this;
              let a2, r2;
              if ("-" === n.charAt(0) ? (a2 = "∞" === n.charAt(1) ? "-∞" : "-Inf", r2 = -1 / 0) : (a2 = -1 !== n.indexOf("∞") ? "∞" : "Inf", r2 = 1 / 0), r2 === -1 / 0 && i.min === -1 / 0 || r2 === 1 / 0 && i.max === 1 / 0 || void 0 !== t) if (e2) i.value = r2, i._number = r2, i.$.input.value = a2;
              else {
                const e3 = i.value;
                n !== a2 && (i.$.input.value = a2), e3 !== r2 && (i.value = r2, i._number = r2, i._cachedInputValue = a2, i._editableValue = a2, i._triggerChangeEvent && i.$.fireEvent("change", { value: r2, oldValue: e3, radix: i._radixNumber }));
              }
              else r2 === -1 / 0 ? i._validate(false, i.min) : i._validate(false, i.max);
            }
            _validateRange(e2) {
              const t = this;
              return e2 = t._numericProcessor.validate(e2, t._minObject, t._maxObject);
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const i = this, a2 = i.$.input;
              function r2() {
                true === i._initialDropDownOptionsSet && i._setDropDownOptions(true), 2 !== i._radixNumber && 16 !== i._radixNumber || (i._cachedInputValue = i._number.toString(i._radixNumber, i._wordLengthNumber, i.leadingZeros), i._editableValue = i._cachedInputValue, i.$.input.value = i._cachedInputValue);
              }
              if (n != t) switch (e2) {
                case "disabled":
                  i._setFocusable(), true === n ? (i.$.upButton.disabled = true, i.$.downButton.disabled = true) : i._disableComponents();
                  break;
                case "dropDownAppendTo":
                  i._positionDetection.dropDownAppendToChangedHandler(), i.$.dropDown.removeAttribute("right-to-left"), i.rightToLeft && null !== n && i.$.dropDown.setAttribute("right-to-left", "");
                  break;
                case "unfocusable":
                  i._setFocusable();
                  break;
                case "enableMouseWheelAction":
                case "placeholder":
                case "readonly":
                case "spinButtonsDelay":
                case "spinButtonsInitialDelay":
                  break;
                case "value": {
                  if ("" === n && null === t) return;
                  if (null === n || "" === n || null === t) return i.value = t, i._triggerChangeEvent = "strict" === i.validation, i._validate(false, n), i._triggerChangeEvent = false, void (i._programmaticValueIsSet = true);
                  const e3 = n.toString(), a3 = t.toString();
                  a3 !== e3 && (a3.toUpperCase() === e3.toUpperCase() && (i.value = t), i._triggerChangeEvent = "strict" === i.validation, i._validate(false, e3), i._triggerChangeEvent = false, i._programmaticValueIsSet = true);
                  break;
                }
                case "radix":
                  "integer" === i.inputFormat ? i._changeRadix(n) : i.error(i.localize("integerOnly", { property: "radix" }));
                  break;
                case "rightToLeft":
                  null !== i.dropDownAppendTo && (n ? i.$.dropDown.setAttribute("right-to-left", "") : i.$.dropDown.removeAttribute("right-to-left")), i.spinButtonsPosition = i.rightToLeft ? "left" : "right", "left" === i.spinButtonsPosition ? i.$.container.insertBefore(i.$.spinButtonsContainer, i.$.label.nextElementSibling) : i.$.container.insertBefore(i.$.spinButtonsContainer, i.$.dropDown), i._refreshShape();
                  break;
                case "leadingZeros":
                  "integer" === i.inputFormat && null !== i._number && r2();
                  break;
                case "min":
                case "max":
                  if (null !== n && (i[`_${e2}IsNull`] = false), i._numericProcessor.validateMinMax("min" === e2, "max" === e2), "strict" === i.validation) i._triggerChangeEvent = true, i._validate(false, i.value), i._triggerChangeEvent = false;
                  else if (false === i._regexSpecial.nonNumericValue.test(i.value)) {
                    const e3 = i._numericProcessor.createDescriptor(i._number), t2 = i._validateRange(e3);
                    true === i._numericProcessor.compare(i.value, t2) && (i._programmaticValueIsSet = true);
                  }
                  break;
                case "opened":
                  n ? i.dropDownEnabled && !i.disabled && null !== i.value ? i._openRadix() : (i.opened = false, i.$.radixDisplayButton.setAttribute("aria-expanded", false)) : i._closeRadix(false, true);
                  break;
                case "outputFormatString":
                  n ? (i._cachedInputValue = i._numberRenderer.formatNumber(i._number, n), i.$.input.value = i._cachedInputValue) : (i._cachedInputValue = i._editableValue, i.$.input.value = i._editableValue);
                  break;
                case "dropDownEnabled":
                  n ? ("integer" !== i.inputFormat && i.error(i.localize("integerOnly", { property: "dropDownEnabled" })), true === i._initialDropDownOptionsSet && i._setDropDownOptions(true)) : i.opened && i._closeRadix(true);
                  break;
                case "spinButtons":
                  n ? i.$spinButtonsContainer.removeClass("smart-hidden") : i.$spinButtonsContainer.addClass("smart-hidden"), i._refreshShape();
                  break;
                case "spinButtonsStep":
                  i._updateSpinButtonsStepObject();
                  break;
                case "significantDigits":
                case "precisionDigits":
                  if ("precisionDigits" === e2 && "integer" === i.inputFormat && i.error(i.localize("noInteger", { property: e2 })), "significantDigits" === e2 && null !== i.precisionDigits ? i.precisionDigits = null : "precisionDigits" === e2 && null !== i.significantDigits && (i.significantDigits = null), false === i._regexSpecial.nonNumericValue.test(i.value)) {
                    const e3 = i._renderValue(i._number);
                    a2.value = e3;
                  }
                  break;
                case "decimalSeparator": {
                  i._numberRenderer.localizationObject.decimalseparator = i.decimalSeparator;
                  const e3 = i._discardDecimalSeparator(a2.value, t), n2 = i._applyDecimalSeparator(e3), r3 = i._applyDecimalSeparator(i._discardDecimalSeparator(i._editableValue, t));
                  a2.value = n2, i._editableValue = r3;
                  break;
                }
                case "spinButtonsPosition":
                  "left" === n ? i.$.container.insertBefore(i.$.spinButtonsContainer, i.$.label.nextElementSibling) : i.$.container.insertBefore(i.$.spinButtonsContainer, i.$.dropDown), i._refreshShape();
                  break;
                case "wordLength":
                  if (i._wordLengthNumber = i._numericProcessor.getWordLength(n), "integer" === i.inputFormat && (i._numericProcessor.validateMinMax(true, true), null !== i._number)) {
                    let e3 = i._validateRange(new Smart.Utilities.BigNumber(i._number));
                    i._updateValue(e3), i.leadingZeros && r2();
                  }
                  break;
                case "radixDisplay":
                  n ? ("integer" !== i.inputFormat && i.error(i.localize("integerOnly", { property: "radixDisplay" })), i.$radixDisplayButton.removeClass("smart-hidden")) : i.$radixDisplayButton.addClass("smart-hidden"), i._refreshShape();
                  break;
                case "radixDisplayPosition":
                  "left" === n ? i.$.container.insertBefore(i.$.radixDisplayButton, i.$.input) : i.$.container.insertBefore(i.$.radixDisplayButton, i.$.unitDisplay.nextElementSibling), i._refreshShape();
                  break;
                case "inputFormat":
                  i._changeInputFormat(t, n);
                  break;
                case "showUnit":
                  n ? i.$unitDisplay.removeClass("smart-hidden") : i.$unitDisplay.addClass("smart-hidden"), i._refreshShape();
                  break;
                case "unit":
                  i.$.unitDisplay.innerHTML = n;
                  break;
                case "scientificNotation":
                  if (false === i._regexSpecial.nonNumericValue.test(i.value)) {
                    const e3 = i._renderValue(i._number);
                    a2.value = e3;
                  }
                  break;
                case "locale":
                case "messages":
                case "showDropDownValues":
                  i.opened ? i._setDropDownOptions() : i._initialDropDownOptionsSet = false;
                  break;
                case "nullable":
                  true === t && null === i.value && i._validate(false, "0");
                  break;
                case "validation":
                  "strict" === n && (i._triggerChangeEvent = true, i._validate(false, i.value), i._triggerChangeEvent = false);
              }
              else "string" != typeof n && "string" == typeof t && (i[e2] = t);
              i._cachedInputValue = a2.value;
            }
            _changeInputFormat(e2, t) {
              const n = this;
              n._numericProcessor = new Smart.Utilities.NumericProcessor(n, "inputFormat"), "complex" !== e2 ? ("integer" === t && "floatingPoint" === e2 && n._changeFromFloatingPointToIntegerInputFormat(), "floatingPoint" === t && "integer" === e2 && n._changeFromIntegerToFloatingPointInputFormat(), "complex" === t && n._changeToComplexInputFormat(e2), n._updateSpinButtonsStepObject(), null !== n.value && (n._inputFormatChangedFlag = true, n._validate(void 0, n._number.toString()), n._inputFormatChangedFlag = false)) : n._changeFromComplexInputFormat(t);
            }
            _changeFromComplexInputFormat(e2) {
              const t = this;
              if (t.spinButtonsStep = t._spinButtonsStepObject.realPart, t._updateSpinButtonsStepObject(), "integer" === e2 ? (t.min === -1 / 0 ? t.min = null : t.min = t._minObject.realPart, t.max === 1 / 0 ? t.max = null : t.max = t._maxObject.realPart) : (t.min !== -1 / 0 && (t.min = t._minObject.realPart), t.max !== 1 / 0 && (t.max = t._maxObject.realPart)), t._numericProcessor.validateMinMax(true, true), null !== t.value) {
                const e3 = t._number;
                t._inputFormatChangedFlag = true, t._validate(void 0, (void 0 !== e3.realPart ? e3.realPart : e3).toString()), t._inputFormatChangedFlag = false;
              }
            }
            _changeFromFloatingPointToIntegerInputFormat() {
              const e2 = this;
              e2.min === -1 / 0 && (e2.min = null), e2.max === 1 / 0 && (e2.max = null), e2._numericProcessor.validateMinMax(true, true);
            }
            _changeFromIntegerToFloatingPointInputFormat() {
              const e2 = this;
              e2.radixDisplay && (e2.radixDisplay = false, e2.$radixDisplayButton.addClass("smart-hidden")), 10 !== e2._radixNumber && (e2.radix = 10, e2._radixNumber = 10), e2._minIsNull ? (e2.min = -1 / 0, e2._minObject = -1 / 0) : e2._minObject = parseFloat(e2._minObject.toString()), e2._maxIsNull ? (e2.max = 1 / 0, e2._maxObject = 1 / 0) : e2._maxObject = parseFloat(e2._maxObject.toString()), e2.dropDownEnabled && (e2.dropDownEnabled = false);
            }
            _changeToComplexInputFormat(e2) {
              const t = this;
              "integer" === e2 && (t.radixDisplay && (t.radixDisplay = false, t.$radixDisplayButton.addClass("smart-hidden")), t._minIsNull && (t.min = null), t._maxIsNull && (t.max = null), t.dropDownEnabled && (t.dropDownEnabled = false)), t._numericProcessor.validateMinMax(t.min !== -1 / 0, t.max !== 1 / 0);
            }
            _updateValue(e2) {
              const t = this, n = t.$.input.value, i = e2.toString(t._radixNumber, t._wordLengthNumber, t.leadingZeros), a2 = t._renderValue(e2), r2 = t.value, o = t._regexSpecial.nonNumericValue.test(i);
              if (n === i && n === t._cachedInputValue || (t.$.input.value = a2, t._cachedInputValue = a2), t._inputFormatChangedFlag || o && a2 !== r2 || false === o && t._numericProcessor.compare(e2, t._number)) {
                t._number = t._numericProcessor.createDescriptor(e2);
                const n2 = t._number.toString();
                t.value = n2, t._setDropDownOptions(true), t._triggerChangeEvent && t.$.fireEvent("change", { value: n2, oldValue: r2, radix: t._radixNumber });
              } else t.value = t._number.toString();
            }
            _setValue(e2) {
              const t = this;
              t.value = e2, t.$.input.value = e2, t._number = t._numericProcessor.createDescriptor(e2, true), t._setDropDownOptions(true);
            }
            _changeRadix(e2) {
              const t = this, n = t._getRadix(e2), i = t.radix;
              if (n === t._radixNumber) return;
              t.radix = e2, t._radixNumber = n;
              const a2 = t.$.input, r2 = a2.value;
              let o, l;
              null !== t.value ? (o = t._number.toString(n, t._wordLengthNumber, t.leadingZeros), l = t._renderValue(o)) : l = "", a2.value = l, t._cachedInputValue = l, t.$.radixDisplayButton.innerHTML = t._radixPrefixes[n], t.$.fireEvent("radixChange", { radix: e2, oldRadix: i, displayedValue: l, oldDisplayedValue: r2 });
            }
            _openRadix() {
              const e2 = this;
              if (e2.$.fireEvent("opening").defaultPrevented) return void (e2.opened = false);
              false === e2._initialDropDownOptionsSet && (e2._setDropDownOptions(), e2._initialDropDownOptionsSet = true), null !== e2._dropDownParent && (e2.$.dropDown.style.width = e2.offsetWidth + "px"), e2.$radixDisplayButton.addClass("smart-numeric-text-box-pressed-component"), e2.$dropDown.removeClass("smart-visibility-hidden"), e2.$.dropDown.style.marginTop = null, e2.opened = true, e2._positionDetection.positionDropDown();
              const t = (1 === window.devicePixelRatio ? document.documentElement.clientHeight : window.innerHeight) - e2.$.dropDown.getBoundingClientRect().top - e2.$.dropDown.offsetHeight - parseFloat(getComputedStyle(e2.$.dropDown).marginBottom);
              t < 0 && (e2.$.dropDown.style.marginTop = t + "px"), e2.$.fireEvent("open", { dropDown: e2.$.dropDown }), e2.$.radixDisplayButton.setAttribute("aria-expanded", true);
            }
            _closeRadix(e2, t) {
              const n = this;
              (n.opened || t) && (!n.$.fireEvent("closing").defaultPrevented || e2 ? (n.$radixDisplayButton.removeClass("smart-numeric-text-box-pressed-component"), n.$dropDown.addClass("smart-visibility-hidden"), n.opened = false, n.$.fireEvent("close", { dropDown: n.$.dropDown }), n.$.radixDisplayButton.setAttribute("aria-expanded", false)) : n.opened = true);
            }
            _isLeftButtonPressed(e2) {
              const t = 0 === e2.buttons || 1 === e2.which;
              return 1 === e2.detail.buttons || t;
            }
            _isIncrementOrDecrementAllowed() {
              const e2 = this;
              return !e2.disabled && !e2.readonly && false === e2._regexSpecial.nonNumericValue.test(e2.$.input.value);
            }
            _upButtonClickHandler(e2) {
              const t = this;
              t._isLeftButtonPressed(e2) && t._isIncrementOrDecrementAllowed() && (t._up || t.$upButton.addClass("smart-numeric-text-box-pressed-component"), t._incrementOrDecrement("add"));
            }
            _downButtonClickHandler(e2) {
              const t = this;
              t._isLeftButtonPressed(e2) && t._isIncrementOrDecrementAllowed() && (t._up || t.$downButton.addClass("smart-numeric-text-box-pressed-component"), t._incrementOrDecrement("subtract"));
            }
            _documentMousedownHandler(e2) {
              const t = this;
              if (t._up = false, !t.opened) return;
              let n = e2.originalEvent.target;
              (t.shadowRoot || t.isInShadowDOM) && (n = e2.originalEvent.composedPath()[0]), (t.shadowRoot || t).contains(n) || t.$.dropDown.contains(n) || t._closeRadix();
            }
            _documentMouseupHandler() {
              const e2 = this;
              e2._up = true, e2.$upButton.removeClass("smart-numeric-text-box-pressed-component"), e2.$downButton.removeClass("smart-numeric-text-box-pressed-component");
            }
            _radixDisplayButtonClickHandler() {
              const e2 = this;
              e2.dropDownEnabled && !e2.disabled && null !== e2.value && (e2.opened ? e2._closeRadix() : e2._openRadix());
            }
            _dropDownItemClickHandler(e2) {
              if (e2.target.$.hasClass("smart-list-item")) {
                const t = this;
                let n = e2.target.getAttribute("data-value");
                t._changeRadix(parseInt(n, 10)), t._closeRadix();
              }
            }
            _mouseenterMouseleaveHandler(e2) {
              const t = this;
              e2.target === t.$.dropDown || t.disabled || t.readonly || ("mouseenter" === e2.type ? e2.target.setAttribute("hover", "") : e2.target.removeAttribute("hover"));
            }
            _inputKeydownHandler(e2) {
              const t = this, n = e2.charCode ? e2.charCode : e2.which;
              40 === n && t._isIncrementOrDecrementAllowed() ? t._incrementOrDecrement("subtract") : 38 === n && t._isIncrementOrDecrementAllowed() && t._incrementOrDecrement("add"), t._keydownInfo = { value: t.$.input.value, specialKey: e2.altKey || e2.ctrlKey || e2.shiftKey };
            }
            _inputKeyupHandler(e2) {
              const t = this;
              if (13 === e2.keyCode) t._suppressBlurEvent = true, t.$.input.value !== t._cachedInputValue && (t._triggerChangeEvent = true, t._validate(), t._triggerChangeEvent = false, t.$.input.blur());
              else if (27 === e2.keyCode) t.$.input.value = t._editableValue;
              else {
                const n = t.$.input.value;
                "" !== n && t._regex[t._radixNumber].test(n) ? (t.$.upButton.disabled = false, t.$.downButton.disabled = false) : "" === n && (t.$.upButton.disabled = true, t.$.downButton.disabled = true), !t._keydownInfo || t._keydownInfo.value === n || t._keydownInfo.specialKey || e2.altKey || e2.ctrlKey || e2.shiftKey || "Control" === e2.key || t.$.fireEvent("changing", { currentValue: n, validValue: t.value, radix: t._radixNumber });
              }
              e2.preventDefault();
            }
            _inputBlurHandler() {
              const e2 = this;
              true === e2._suppressBlurEvent ? (e2._suppressBlurEvent = false, e2._formattedValue && (e2._cachedInputValue = e2._formattedValue, e2.$.input.value = e2._formattedValue, delete e2._formattedValue)) : e2.$.input.value !== e2._editableValue ? (e2._triggerChangeEvent = true, e2._validate(), e2._triggerChangeEvent = false) : e2.$.input.value = e2._cachedInputValue, e2.radixDisplay && e2.$.radixDisplayButton.removeAttribute("focus"), e2.opened && e2._closeRadix(), e2.spinButtons && e2.$.spinButtonsContainer.removeAttribute("focus"), e2.showUnit && e2.$.unitDisplay.removeAttribute("focus"), e2.removeAttribute("focus"), e2.$.fireEvent("blur");
            }
            _inputFocusHandler() {
              const e2 = this;
              e2.spinButtons && e2.$.spinButtonsContainer.setAttribute("focus", ""), e2.radixDisplay && e2.$.radixDisplayButton.setAttribute("focus", ""), e2.showUnit && e2.$.unitDisplay.setAttribute("focus", ""), e2.opened && e2._closeRadix(), e2.setAttribute("focus", ""), e2.outputFormatString && (e2.$.input.value = e2._editableValue), e2.$.fireEvent("focus");
            }
            _inputChangeHandler(e2) {
              e2.stopPropagation(), e2.preventDefault();
            }
            _inputPasteHandler() {
              const e2 = this;
              requestAnimationFrame(() => e2.$.fireEvent("changing", { currentValue: e2.$.input.value, validValue: e2.value, radix: e2._radixNumber }));
            }
            _inputWheelHandler(e2) {
              const t = this, n = t.shadowRoot && t.shadowRoot.activeElement || document.activeElement;
              t.$.input === n && t.enableMouseWheelAction && t._isIncrementOrDecrementAllowed() && (e2.stopPropagation(), e2.preventDefault(), e2.wheelDelta > 0 ? t._incrementOrDecrement("add") : t._incrementOrDecrement("subtract"));
            }
            _getRadix(e2) {
              switch (e2.toString()) {
                case "10":
                case "decimal":
                  return 10;
                case "2":
                case "binary":
                  return 2;
                case "8":
                case "octal":
                  return 8;
                case "16":
                case "hexadecimal":
                  return 16;
              }
            }
            _setDropDownOptions(e2) {
              const t = this;
              if (false === t.dropDownEnabled || null === t._number) return;
              if (!t.showDropDownValues) {
                if (e2) return;
                return t.$.dropDownItem2.innerHTML = t.localize("binary"), t.$.dropDownItem8.innerHTML = t.localize("octal"), t.$.dropDownItem10.innerHTML = t.localize("decimal"), void (t.$.dropDownItem16.innerHTML = t.localize("hexadecimal"));
              }
              const n = t._wordLengthNumber, i = t.leadingZeros;
              t.$.dropDownItem2.innerHTML = `${t._number.toString(2, n, i)} (${t.localize("binary")})`, t.$.dropDownItem8.innerHTML = `${t._number.toString(8, n)} (${t.localize("octal")})`, t.$.dropDownItem10.innerHTML = `${t._renderValue(t._number.toString(10, n), true)} (${t.localize("decimal")})`, t.$.dropDownItem16.innerHTML = `${t._number.toString(16, n, i)} (${t.localize("hexadecimal")})`;
            }
            _incrementOrDecrement(e2) {
              const t = this, n = t.shadowRoot && t.shadowRoot.activeElement || document.activeElement;
              let i = t._cachedInputValue;
              if (t.$.input === n && (i = t._editableValue, t._suppressBlurEvent = true), (t.$.input.value !== i || t._programmaticValueIsSet && "interaction" === t.validation) && (t._triggerChangeEvent = true, t._validate(), t._triggerChangeEvent = false, false === t._isIncrementOrDecrementAllowed())) return;
              const a2 = t._numericProcessor.incrementDecrement(t._number, e2, t._spinButtonsStepObject), r2 = t._validateRange(a2);
              t._triggerChangeEvent = true, t._updateValue(r2), t._triggerChangeEvent = false;
            }
            _toBigNumberDecimal(e2, t) {
              const n = this;
              let i;
              return 10 === t ? i = new Smart.Utilities.BigNumber(e2) : n._unsigned || false === n._isNegative(e2, t) ? n._wordLengthNumber < 64 ? (i = parseInt(e2, t), i = new Smart.Utilities.BigNumber(i)) : i = n._getBigNumberFrom64BitBinOctHex(e2, t) : (i = n._getNegativeDecimal(e2, t), i = new Smart.Utilities.BigNumber(i)), i;
            }
            _isNegative(e2, t) {
              const n = this, i = e2.length, a2 = e2.charAt(0).toLowerCase();
              if (2 === t) return i === n._wordLengthNumber && "1" === a2;
              if (8 !== t) return i === n._wordLengthNumber / 4 && -1 !== ["8", "9", "a", "b", "c", "d", "e", "f"].indexOf(a2);
              switch (n._wordLengthNumber) {
                case 8:
                  return 3 === i && ("2" === a2 || "3" === a2);
                case 16:
                  return 5 === i && "1" === a2;
                case 32:
                  return 11 === i && ("2" === a2 || "3" === a2);
                case 64:
                  return 22 === i && "1" === a2;
              }
            }
            _getBigNumberFrom64BitBinOctHex(e2, t) {
              let n = new Smart.Utilities.BigNumber(0);
              for (let i = e2.length - 1; i >= 0; i--) {
                let a2 = new Smart.Utilities.BigNumber(parseInt(e2.charAt(i), t));
                n = n.add(a2.multiply(new Smart.Utilities.BigNumber(t).pow(e2.length - 1 - i)));
              }
              return n;
            }
            _getNegativeDecimal(e2, t) {
              const n = this;
              let i = e2;
              if (8 === t) {
                let t2 = [];
                for (let n2 = 0; n2 < e2.length; n2++) {
                  let i2 = parseInt(e2.charAt(n2), 8).toString(2);
                  for (; 3 !== i2.length; ) i2 = `0${i2}`;
                  t2.push(i2);
                }
                for (i = t2.join(""); "0" === i.charAt(0); ) i = i.slice(1);
              } else if (16 === t) {
                let t2 = [];
                for (let n2 = 0; n2 < e2.length; n2++) {
                  let i2 = parseInt(e2.charAt(n2), 16).toString(2);
                  for (; 4 !== i2.length; ) i2 = `0${i2}`;
                  t2.push(i2);
                }
                i = t2.join("");
              }
              let a2 = i.replace(/0/g, "a");
              return a2 = a2.replace(/1/g, "b"), a2 = a2.replace(/a/g, "1"), a2 = a2.replace(/b/g, "0"), this._wordLengthNumber < 64 ? a2 = -1 * (parseInt(a2, 2) + 1) : (a2 = n._getBigNumberFrom64BitBinOctHex(a2, t), a2 = a2.add(1).negate()), a2;
            }
            _discardDecimalSeparator(e2, t) {
              if (void 0 === t && (t = this.decimalSeparator), "." !== t && e2 !== 1 / 0 && e2 !== -1 / 0) {
                let n = new RegExp(t, "g");
                return e2.replace(n, ".");
              }
              return e2;
            }
            _applyDecimalSeparator(e2) {
              const t = this;
              return "string" != typeof e2 && (e2 = e2.toString()), "." !== t.decimalSeparator && (e2 = e2.replace(/\./g, t.decimalSeparator)), e2;
            }
            _renderValue(e2, t) {
              const n = this, i = e2, a2 = 10 === n._radixNumber || true === t;
              if (e2 = n._numericProcessor.render(e2, a2), "." !== n.decimalSeparator && a2 && (e2 = n._applyDecimalSeparator(e2)), true !== t && (n._editableValue = e2, n.outputFormatString && 10 === n._radixNumber)) {
                const e3 = (n.shadowRoot || n.getRootNode()).activeElement || document.activeElement, t2 = n._numberRenderer.formatNumber(i, n.outputFormatString);
                if (e3 !== n.$.input) return t2;
                n._formattedValue = t2;
              }
              return e2;
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.$.input.tabIndex = -1 : e2.$.input.removeAttribute("tabindex");
            }
            _disableComponents() {
              const e2 = this;
              if (e2.disabled) return;
              const t = e2.value;
              null === t || "NaN" === t.toString() || Math.abs(t) === 1 / 0 ? (e2.$.upButton.disabled = true, e2.$.downButton.disabled = true) : (e2.$.upButton.disabled = false, e2.$.downButton.disabled = false);
            }
            _resizeHandler() {
              this.refresh();
            }
            refresh() {
              const e2 = this;
              e2.opened && e2._closeRadix(true);
            }
          });
        }
      ),
      /***/
      1928: (
        /***/
        () => {
          Smart("smart-password-text-box", class extends Smart.BaseElement {
            static get properties() {
              return { autoFocus: { value: false, type: "boolean" }, hint: { value: "", reflectToAttribute: true, type: "string" }, label: { value: "", reflectToAttribute: true, type: "string" }, maxLength: { value: null, type: "number?" }, minLength: { value: 2, type: "number" }, messages: { value: { en: { passwordStrength: "Password strength", short: "Short", weak: "Weak", far: "Far", good: "Good", strong: "Strong", showPassword: "Show password" } }, type: "object", extend: true }, name: { value: "", type: "string" }, passwordStrength: { value: null, type: "function?", reflectToAttribute: false }, placeholder: { value: "", type: "string" }, selectAllOnFocus: { value: false, type: "boolean" }, showPasswordIcon: { value: false, type: "boolean" }, showPasswordStrength: { value: false, type: "boolean" }, tooltipArrow: { value: false, type: "boolean" }, tooltipDelay: { value: 0, type: "number" }, tooltipPosition: { allowedValues: ["bottom", "top", "left", "right", "absolute"], value: "top", type: "string" }, tooltipTemplate: { value: null, type: "string?" }, type: { value: "password", type: "string", defaultReflectToAttribute: true, readonly: true }, value: { value: "", reflectToAttribute: false, type: "string" } };
            }
            static get listeners() {
              return { "document.up": "_documentUpHandler", mouseenter: "_mouseEventsHandler", mouseleave: "_mouseEventsHandler", "passwordIcon.down": "_showPassword", "input.change": "_textBoxChangeHandler", "input.paste": "_textBoxChangeHandler", "input.keyup": "_textBoxChangeHandler", "input.blur": "_blurHandler", "input.focus": "_focusHandler" };
            }
            static get requires() {
              return { "Smart.Tooltip": "smart.tooltip.js" };
            }
            static get styleUrls() {
              return ["smart.textbox.css", "smart.passwordtextbox.css"];
            }
            template() {
              return '<div id="container" role="presentation"><span id="label" class="smart-label">[[label]]</span><div id="innerContainer" class="smart-content" role="presentation"><input class="smart-input" type="password" id="input"\n                    disabled="[[disabled]]"\n                    maxlength="[[maxLength]]"\n                    minlength="[[minLength]]"\n                    name="[[name]]"\n                    placeholder="[[placeholder]]"\n                    readonly="[[readonly]]"\n                    value="[[value]]"/><span id="passwordIcon" title="Show Password" class="smart-password-icon smart-hidden" role="button" aria-label="Show Password"></span></div><span id="hint" class="smart-hint">[[hint]]</span><smart-tooltip id="tooltip"\n                    open-mode="manual"\n                    arrow="[[tooltipArrow]]"\n                    right-to-left="[[rightToLeft]]"\n                    tooltip-template="[[tooltipTemplate]]"\n                    position="[[tooltipPosition]]"\n                    delay="[[tooltipDelay]]"></smart-tooltip></div>';
            }
            propertyChangedHandler(e2, t, s) {
              const a2 = this;
              let o;
              switch (e2) {
                case "locale":
                case "messages":
                case "passwordStrength":
                  o = a2._evaluatePasswordStrength(), a2._updateTooltipString(o), a2.$.passwordIcon.setAttribute("title", a2.localize("showPassword")), a2._updatePasswordStrengthStyles(o);
                  break;
                case "tooltipPosition":
                  a2.$.tooltip.position = a2.tooltipPosition;
                  break;
                case "tooltipTemplate":
                  a2.$.tooltip.tooltipTemplate = a2.tooltipTemplate;
                  break;
                case "value":
                  o = a2._evaluatePasswordStrength(), a2._updateTooltipString(o), a2._updatePasswordStrengthStyles(o);
                  break;
                case "disabled":
                case "unfocusable":
                  a2._setFocusable();
                  break;
                case "readonly":
                  break;
                default:
                  super.propertyChangedHandler(e2, t, s);
              }
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.$.input.tabIndex = -1 : e2.$.input.removeAttribute("tabindex");
            }
            render() {
              this._createElement(), super.render();
            }
            focus() {
              this.$.input.focus();
            }
            blur() {
              this.$.input.blur();
            }
            reset() {
              const e2 = this;
              e2.$.input.value = e2.value = e2._initializationValue;
            }
            _createElement() {
              const e2 = this;
              e2.autoFocus && e2.$.input.focus(), e2.$.addClass("smart-input"), e2._setFocusable(), e2.$.tooltip.selector = e2.$.innerContainer, e2.$.passwordIcon.setAttribute("title", e2.localize("showPassword")), e2._updateTooltipString("short"), e2._updatePasswordStrengthStyles(), e2._initializationValue = e2.value, e2.value.length > 0 ? e2.$.addClass("has-value") : e2.$.removeClass("has-value"), e2._handleHintContainer(), e2.shadowRoot && (e2.$.tooltip.style.display = "none", requestAnimationFrame(() => e2.$.tooltip.style.display = "")), e2.$.label.id || (e2.$.label.id = e2.id + "Label"), e2.$.hint.id || (e2.$.hint.id = e2.id + "Hint"), e2.setAttribute("role", "presentation"), e2.$.innerContainer.removeAttribute("aria-describedby"), e2.$.input.setAttribute("aria-describedby", e2.$.tooltip.id + " " + e2.$.hint.id), e2.$.input.setAttribute("aria-labelledby", e2.$.label.id);
            }
            _handleHintContainer() {
              const e2 = this;
              if (!e2.hint) return;
              const t = e2.$.hint;
              if ("function" == typeof e2.hint) {
                const s = e2.value;
                e2.hint(s, t) ? e2.$.addClass("invalid") : e2.$.removeClass("invalid");
              } else "string" == typeof e2.hint && (t.innerHTML = e2.hint, e2.$.removeClass("invalid"));
            }
            _focusHandler() {
              const e2 = this;
              e2.disabled || (e2.selectAllOnFocus && e2.$.input.select(), e2.showPasswordIcon && e2.$passwordIcon.removeClass("smart-hidden"), e2.setAttribute("focus", ""), e2._valueBeforeChange = e2.value, e2.$.fireEvent("focus"), e2.showPasswordStrength && (e2._tooltipOpened || (e2.$.tooltip.open(), e2._tooltipOpened = true)));
            }
            _blurHandler() {
              const e2 = this;
              e2.disabled || e2._passwordIconPressed || (e2._valueBeforeChange !== e2.value && (e2.$.fireEvent("change", { value: e2.value, oldValue: e2._valueBeforeChange }), e2._valueBeforeChange = ""), e2.showPasswordIcon && e2.$passwordIcon.addClass("smart-hidden"), e2.removeAttribute("focus"), e2.value.length > 0 ? e2.$.addClass("has-value") : e2.$.removeClass("has-value"), e2.$.fireEvent("blur"), e2._tooltipOpened && (e2.$.tooltip.close(), e2._tooltipOpened = false));
            }
            _showPassword() {
              const e2 = this;
              !e2.disabled && e2.showPasswordIcon && (e2.$.input.type = "text", e2._passwordIconPressed = true);
            }
            _documentUpHandler() {
              const e2 = this;
              !e2.disabled && e2.showPasswordIcon && e2._passwordIconPressed && (e2.$.input.type = "password", e2._passwordIconPressed = false, e2.$.input.focus());
            }
            _textBoxChangeHandler(e2) {
              const t = this;
              if (t.disabled || t.readonly) return;
              const s = t.value;
              if (t.value = t.$.input.value, t.$.input) {
                const a3 = t.$.input.value;
                s !== a3 && t.$.fireEvent("changing", { oldValue: s, value: a3 }), e2 && "Enter" === e2.key && (t.$.fireEvent("change", { value: t.value, oldValue: t._valueBeforeChange }), t._valueBeforeChange = t.value);
              }
              e2 && "keyup" !== e2.type && e2.stopPropagation();
              let a2 = t._evaluatePasswordStrength();
              t._updateTooltipString(a2), t._updatePasswordStrengthStyles(a2);
            }
            _updatePasswordStrengthStyles(e2) {
              const t = this, s = ["short", "weak", "far", "good", "strong"];
              e2 = e2 || "short";
              for (let e3 = 0; e3 < s.length; e3++) t.$container.removeClass("smart-password-" + s[e3]);
              t.disabled || t.$container.addClass("smart-password-" + e2);
            }
            _evaluatePasswordStrength() {
              const e2 = this, t = e2.$.input.value, s = t.length, a2 = "<>@!#$%^&*()_+[]{}?:;|'\"\\,./~`-=";
              if (e2.disabled) return;
              if (e2.passwordStrength) return e2.passwordStrength(t, a2);
              let o = 0, n = 0, r2 = 0, l = 0;
              for (var i = 0; i < s; i++) {
                const e3 = t.charAt(i), s2 = t.charCodeAt(i);
                s2 > 64 && s2 < 91 || s2 > 96 && s2 < 123 || s2 > 127 && s2 < 155 || s2 > 159 && s2 < 166 ? o += 1 : false !== isNaN(e3) ? -1 === a2.indexOf(e3) || (r2 += 1) : n += 1;
              }
              return l = o + n + 2 * r2 + o * n / 2 + s, s < 8 ? "short" : l < 20 ? "weak" : l < 30 ? "far" : l < 40 ? "good" : "strong";
            }
            refresh() {
            }
            _keyUpHandler() {
            }
            _mouseWheelHandler() {
            }
            _resizeHandler() {
            }
            _selectStartHandler() {
            }
            _setDropDownSize() {
            }
            _styleChangedHandler() {
            }
            _mouseEventsHandler(e2) {
              "mouseenter" === e2.type ? this.setAttribute("hover", "") : this.removeAttribute("hover");
            }
            _updateTooltipString(e2) {
              const t = this;
              t.$.tooltip.value = '<span class="password-strength-label">' + t.localize("passwordStrength") + ': </span><span class="password-strength-value">' + t.localize(e2) + "</span>";
            }
          });
        }
      ),
      /***/
      8649: (
        /***/
        () => {
          Smart("smart-radio-button", class extends Smart.ToggleButton {
            static get properties() {
              return { checkMode: { value: "both", allowedValues: ["both", "input", "label"], type: "string" }, type: { value: "radio", type: "string", defaultReflectToAttribute: true, readonly: true }, groupName: { value: "", type: "string" } };
            }
            template() {
              return "<div  id='container' class='smart-container'>\n                 <div class ='smart-overlay'></div>\n                 <span id='radioButtonInput' class ='smart-input'></span>\n                 <span id='radioButtonLabel' inner-h-t-m-l='[[innerHTML]]' class ='smart-label'><content></content></span>\n                 <input id='hiddenInput' class ='smart-hidden-input' type='hidden'>\n               </div>";
            }
            static get listeners() {
              return { down: "_downHandler", "document.up": "_documentUpHandler", mouseenter: "_elementMouseEnterHandler", "radioButtonInput.mouseenter": "_radioMouseEnterHandler", "radioButtonInput.mouseleave": "_radioMouseLeaveHandler", focus: "_focusHandler", blur: "_blurHandler" };
            }
            static get styleUrls() {
              return ["smart.toggle.css"];
            }
            _radioMouseEnterHandler() {
              this.$.setAttributeValue("hover", true);
            }
            _radioMouseLeaveHandler() {
              this.$.setAttributeValue("hover", false);
            }
            _focusHandler() {
              this.$.setAttributeValue("focus", true);
            }
            _blurHandler() {
              this.$.setAttributeValue("focus", false);
            }
            _mouseEnterHandler() {
              this.$.setAttributeValue("hover", true);
            }
            _mouseLeaveHandler() {
              this.$.setAttributeValue("hover", false);
            }
            ready() {
              const e2 = this;
              super.ready(), e2.classList.add("smart-toggle-box"), e2._handleMultipleCheckedInstances(), e2._updateHidenInputNameAndValue();
            }
            _downHandler(e2) {
              const t = this, n = t.enableShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if (!(t.disabled || t.readonly || "input" === t.checkMode && n !== t.$.radioButtonInput || "label" === t.checkMode && n !== t.$.radioButtonLabel)) {
                if (t.$.setAttributeValue("active", true), t.hasRippleAnimation) {
                  const e3 = t.$.radioButtonInput.getBoundingClientRect(), n2 = window.scrollX || window.pageXOffset, a2 = window.scrollY || window.pageYOffset;
                  Smart.Utilities.Animation.Ripple.animate(t.$.radioButtonInput, e3.left + e3.width / 2 + n2, e3.top + e3.height / 2 + a2);
                }
                t._preventAction ? t._preventAction = false : ("release" !== t.clickMode && "pressAndRelease" !== t.clickMode || (t._pressed = true), "press" !== t.clickMode && "pressAndRelease" !== t.clickMode || ("pressAndRelease" === t.clickMode && ("" === t.groupName ? t._checkedBeforeChange = t.parentNode.querySelector("smart-radio-button[checked]") : t._checkedBeforeChange = document.querySelector('smart-radio-button[group-name="' + t.groupName + '"][checked]')), t._handleMouseInteraction()));
              }
            }
            _elementMouseEnterHandler() {
              const e2 = this;
              "hover" !== e2.clickMode || e2.disabled || e2.readonly || e2._handleMouseInteraction();
            }
            _documentUpHandler(e2) {
              const t = this, n = t.enableShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              !t._pressed || t.disabled || t.readonly || "input" === t.checkMode && n !== t.$.radioButtonInput || "label" === t.checkMode && n !== t.$.radioButtonLabel || "pointercancel" === e2.originalEvent.type || ("release" === t.clickMode ? t._handleMouseInteraction() : (null === t._checkedBeforeChange ? (t.$.fireEvent("change", { value: false, oldValue: true, changeType: "pointer" }), t.$.fireEvent("uncheckValue", { changeType: "pointer" }), t.checked = false) : t._checkedBeforeChange._changeCheckState("pointer"), t.focus(), t._updateHidenInputNameAndValue()), t.$.setAttributeValue("active", false), t._pressed = false);
            }
            _handleMouseInteraction() {
              const e2 = this;
              e2._handleTextSelection(), e2._changeCheckState("pointer"), e2.focus(), e2._updateHidenInputNameAndValue();
            }
            _handleMultipleCheckedInstances() {
              const e2 = Array.from(document.querySelectorAll('smart-radio-button[group-name="' + this.groupName + '"][checked]')), t = Array.from(document.querySelectorAll('smart-ui-radio-button[group-name="' + this.groupName + '"][checked]')), n = e2.length + t.length;
              n < 2 || e2.concat(...t).forEach((e3, t2) => t2 < n - 1 && (e3.checked = false));
            }
            _changeCheckState(e2) {
              const t = this;
              let n = document.querySelectorAll('smart-radio-button[group-name="' + t.groupName + '"]'), a2 = document.querySelectorAll('smart-ui-radio-button[group-name="' + t.groupName + '"]'), o = Array.from(n).concat(...a2);
              if (true === t.checked && "api" === e2 || false === t.checked) if (o.length > 0) t._changeCheckStateInGroup(o, e2);
              else {
                let r2 = t.parentNode;
                t.getRootNode().host ? (r2 = t.getRootNode().host.parentNode, n = r2.querySelectorAll("smart-radio-button:not([group-name])"), a2 = r2.querySelectorAll("smart-ui-radio-button:not([group-name])"), o = Array.from(n).concat(...a2)) : o = r2.querySelectorAll("smart-radio-button:not([group-name])"), t._changeCheckStateInGroup(o, e2);
              }
            }
            _changeCheckStateInGroup(e2, t) {
              const n = this, a2 = n.getRootNode().host ? n.getRootNode().host : n;
              for (let t2 = 0; t2 < e2.length; t2++) e2[t2]._isUpdating = true, e2[t2] === a2 ? a2.checked = true : e2[t2].checked && (e2[t2].checked = false), e2[t2]._isUpdating = false;
              a2.nativeElement ? (a2.nativeElement.$.fireEvent("change", { value: true, oldValue: false, changeType: t }), a2.nativeElement.$.fireEvent("checkValue", { changeType: t })) : (a2.$.fireEvent("change", { value: true, oldValue: false, changeType: t }), a2.$.fireEvent("checkValue", { changeType: t }));
            }
            propertyChangedHandler(e2, t, n) {
              const a2 = this;
              switch (e2) {
                case "value":
                  a2._updateHidenInputNameAndValue();
                  break;
                case "checked":
                  a2._isUpdating || a2._changeCheckState("api"), a2._updateHidenInputNameAndValue();
                  break;
                case "name":
                  a2._updateHidenInputName();
                  break;
                default:
                  super.propertyChangedHandler(e2, t, n);
              }
            }
          });
        }
      ),
      /***/
      9135: (
        /***/
        () => {
          Smart("smart-scroll-bar", class extends Smart.BaseElement {
            static get properties() {
              return { clickRepeatDelay: { type: "integer", value: 50 }, largeStep: { type: "integer", value: 100 }, min: { type: "integer", value: 0 }, max: { type: "integer", value: 1e3 }, mechanicalAction: { value: "switchWhileDragging", allowedValues: ["switchUntilReleased", "switchWhenReleased", "switchWhileDragging"], type: "string" }, orientation: { type: "string", value: "horizontal", allowedValues: ["horizontal", "vertical"] }, step: { type: "integer", value: 10 }, showButtons: { type: "boolean", value: true, defaultReflectToAttribute: true }, value: { type: "integer", value: 0 } };
            }
            static get styleUrls() {
              return ["smart.scrollbar.css"];
            }
            template() {
              return '<div id="container" class="smart-container" role="presentation">\n                    <div id="nearButton" class="smart-scroll-button smart-arrow-left" role="presentation" aria-hidden="true"></div>\n                    <div  id="track" class="smart-track" role="presentation">\n                        <div id="thumb" class="smart-thumb" role="presentation"></div>\n                    </div>\n                    <div id="farButton" class="smart-scroll-button smart-arrow-right" role="presentation" aria-hidden="true"></div>\n            </div>';
            }
            static get listeners() {
              return { "nearButton.click": "_nearButtonClickHandler", "nearButton.down": "_startRepeat", "nearButton.up": "_stopRepeat", "nearButton.pointerenter": "_updateInBoundsFlag", "nearButton.pointerleave": "_updateInBoundsFlag", "farButton.click": "_farButtonClickHandler", "farButton.down": "_startRepeat", "farButton.up": "_stopRepeat", "farButton.pointerenter": "_updateInBoundsFlag", "farButton.pointerleave": "_updateInBoundsFlag", "track.down": "_trackDownHandler", "track.click": "_trackClickHandler", "track.move": "_trackMoveHandler", "thumb.down": "_dragStartHandler", "document.move": "_dragHandler", "document.up": "_dragEndHandler", up: "_dragEndHandler", "document.selectstart": "_selectStartHandler", resize: "_resizeHandler" };
            }
            _updateInBoundsFlag(t) {
              const e2 = this, a2 = t.target;
              a2._isPointerInBounds = true, -1 !== t.type.indexOf("leave") && (a2._isPointerInBounds = false), 1 !== ("buttons" in t ? t.buttons : t.which) && e2._stopRepeat(t);
            }
            _startRepeat(t) {
              const e2 = this;
              if (e2.disabled) return;
              const a2 = t.target;
              a2._initialTimer || (a2._initialTimer = setTimeout(function() {
                a2._repeatTimer = setInterval(() => {
                  if (a2._isPointerInBounds) {
                    const e3 = "buttons" in t ? t.buttons : t.which;
                    a2.$.fireEvent("click", { buttons: e3, clientX: t.clientX, clientY: t.clientY, pageX: t.pageX, pageY: t.pageY, screenX: t.screenX, screenY: t.screenY });
                  }
                }, e2.clickRepeatDelay);
              }, 3 * e2.clickRepeatDelay));
            }
            _stopRepeat(t) {
              if (this.disabled) return;
              const e2 = t.target;
              e2._repeatTimer && (clearInterval(e2._repeatTimer), e2._repeatTimer = null), e2._initialTimer && (clearTimeout(e2._initialTimer), e2._initialTimer = null);
            }
            _calculateThumbSize(t) {
              const e2 = this, a2 = e2.max - e2.min, r2 = "horizontal" === e2.orientation ? e2.$.track.offsetWidth > 10 : e2.$.track.offsetHeight > 10;
              let n = 0;
              return a2 >= 1 && r2 ? (n = t / (a2 + t) * t, e2.$.thumb.className.indexOf("smart-hidden") >= 0 && e2.$thumb.removeClass("smart-hidden")) : e2.$thumb.addClass("smart-hidden"), Math.max(10, Math.min(n, t));
            }
            _dragStartHandler(t) {
              const e2 = this;
              e2.disabled || (e2.thumbCapture = true, e2.dragStartX = t.clientX, e2.dragStartY = t.clientY, e2.dragStartValue = e2.value, t.stopPropagation(), t.preventDefault());
            }
            _dragHandler(t) {
              const e2 = this;
              if (true !== e2.thumbCapture) return;
              e2._isThumbDragged = true;
              const a2 = (e2.max - e2.min) / (e2.scrollBarSize - e2.thumbSize), r2 = "horizontal" === e2.orientation ? (t.clientX - e2.dragStartX) * a2 : (t.clientY - e2.dragStartY) * a2;
              let n = r2;
              e2.rightToLeft && "horizontal" === e2.orientation && (n = -r2), e2._updateValue(e2.dragStartValue + n), t.stopPropagation(), t.preventDefault(), t.originalEvent && (t.originalEvent.stopPropagation(), t.originalEvent.preventDefault());
            }
            _dragEndHandler(t) {
              const e2 = this;
              e2._trackDownTimer && (clearInterval(e2._trackDownTimer), e2._trackDownTimer = null), e2.thumbCapture && (e2.thumbCapture = false, e2._isThumbDragged = false, "switchWhenReleased" === e2.mechanicalAction ? e2._updateValue(e2.dragStartValue, e2.value) : "switchUntilReleased" === this.mechanicalAction && e2._updateValue(e2.dragStartValue), t.preventDefault(), t.stopPropagation(), t.originalEvent.preventDefault(), t.originalEvent.stopPropagation());
            }
            _farButtonClickHandler() {
              const t = this;
              if (t.disabled) return;
              const e2 = t.value;
              t._updateValue(t.value + ("horizontal" === t.orientation && t.rightToLeft ? -1 : 1) * t.step), "switchUntilReleased" === t.mechanicalAction && t._updateValue(e2);
            }
            _nearButtonClickHandler() {
              const t = this;
              if (t.disabled) return;
              const e2 = t.value;
              t._updateValue(t.value - ("horizontal" === t.orientation && t.rightToLeft ? -1 : 1) * t.step), "switchUntilReleased" === t.mechanicalAction && t._updateValue(e2);
            }
            propertyChangedHandler(t, e2, a2) {
              super.propertyChangedHandler(t, e2, a2);
              const r2 = this;
              switch (t) {
                case "min":
                case "max":
                case "orientation":
                case "showButtons":
                  r2._layout(), "min" === t ? r2.setAttribute("aria-valuemin", a2) : "max" === t ? r2.setAttribute("aria-valuemax", a2) : "orientation" === t && r2.setAttribute("aria-orientation", a2);
                  break;
                case "value":
                  r2._updateValue(e2, a2);
                  break;
                default:
                  r2._layout();
              }
            }
            render() {
              const t = this;
              t.setAttribute("role", "scrollbar"), t.setAttribute("aria-orientation", t.orientation), t.setAttribute("aria-valuemin", t.min), t.setAttribute("aria-valuemax", t.max), t.setAttribute("aria-valuenow", t.value), t._layout(), super.render();
            }
            _resizeHandler() {
              this._layout();
            }
            refresh() {
              this._layout();
            }
            beginUpdate() {
              this._isUpdating = true;
            }
            endUpdate() {
              this._isUpdating = false, this.refreshValue();
            }
            refreshValue() {
              const t = this;
              t._layout(), t._updateValue(t.value);
            }
            _layout() {
              const t = this;
              t._isUpdating || (t.scrollBarSize = "horizontal" === t.orientation ? t.$.track.offsetWidth : t.$.track.offsetHeight, t.thumbSize = t._calculateThumbSize(t.scrollBarSize), "horizontal" === t.orientation && t.$.thumb.style.width !== t.thumbSize + "px" ? t.$.thumb.style.width = t.thumbSize + "px" : "vertical" === t.orientation && t.$.thumb.style.height !== t.thumbSize + "px" && (t.$.thumb.style.height = t.thumbSize + "px"), "horizontal" === t.orientation ? (t.$.nearButton.classList.contains("smart-arrow-up") && t.$.nearButton.classList.remove("smart-arrow-up"), t.$.farButton.classList.contains("smart-arrow-down") && t.$.farButton.classList.remove("smart-arrow-down"), t.$.nearButton.classList.contains("smart-arrow-left") || t.$.nearButton.classList.add("smart-arrow-left"), t.$.farButton.classList.contains("smart-arrow-right") || t.$.farButton.classList.add("smart-arrow-right")) : (t.$.nearButton.classList.contains("smart-arrow-left") && t.$.nearButton.classList.remove("smart-arrow-left"), t.$.farButton.classList.contains("smart-arrow-right") && t.$.farButton.classList.remove("smart-arrow-right"), t.$.nearButton.classList.contains("smart-arrow-up") || t.$.nearButton.classList.add("smart-arrow-up"), t.$.farButton.classList.contains("smart-arrow-down") || t.$.farButton.classList.add("smart-arrow-down")), t._updateThumbPosition(), (t.value > t.max || t.value < t.min) && t._updateValue(t.value, t.value > t.max ? t.max : t.min));
            }
            _selectStartHandler(t) {
              this.thumbCapture && t.preventDefault();
            }
            _trackDownHandler(t) {
              const e2 = this;
              t.target === e2.$.track && (e2._trackDownTimer && clearInterval(e2._trackDownTimer), e2.thumbCapture || (e2._trackDownTimer = setInterval(function() {
                e2._trackClickHandler(t);
              }, e2.clickRepeatDelay), t.stopPropagation(), t.preventDefault()));
            }
            _trackClickHandler(t) {
              const e2 = this;
              if (e2.disabled) return;
              if (e2._isThumbDragged) return clearInterval(e2._trackDownTimer), void (e2._trackDownTimer = null);
              const a2 = e2.$.thumb.getBoundingClientRect(), r2 = t.pageX - window.pageXOffset, n = t.pageY - window.pageYOffset, i = (e2.rightToLeft ? -1 : 1) * e2.value;
              "horizontal" === e2.orientation ? r2 > (e2._isThumbDragged ? e2.dragStartX : a2.right) ? e2._updateValue(e2.value + (e2.rightToLeft ? -1 : 1) * e2.largeStep) : r2 < (e2._isThumbDragged ? e2.dragStartX : a2.left) && e2._updateValue(e2.value - (e2.rightToLeft ? -1 : 1) * e2.largeStep) : n > (e2._isThumbDragged ? e2.dragStartY : a2.bottom) ? e2._updateValue(e2.value + e2.largeStep) : n < (e2._isThumbDragged ? e2.dragStartY : a2.top) && e2._updateValue(e2.value - e2.largeStep), "switchUntilReleased" === e2.mechanicalAction && e2._updateValue(i);
            }
            _trackMoveHandler(t) {
              "touchmove" === t.originalEvent.type && t.originalEvent.preventDefault();
            }
            _updateValue(t, e2) {
              const a2 = this;
              if (!a2._isUpdating && (1 === arguments.length && (e2 = t, t = a2.value), (void 0 === e2 || isNaN(e2)) && (e2 = a2.min), e2 > a2.max && (e2 = a2.max), e2 < a2.min && (e2 = a2.min), a2.value = e2, t !== e2)) {
                if (a2.setAttribute("aria-valuenow", e2), a2._updateThumbPosition(), a2.thumbCapture && "switchWhenReleased" === a2.mechanicalAction) return;
                if (a2.onChange) return void a2.onChange({ value: a2.value, oldValue: t, min: a2.min, max: a2.max, context: a2 });
                a2.$.fireEvent("change", { value: a2.value, oldValue: t, min: a2.min, max: a2.max });
              }
            }
            _updateThumbPosition() {
              const t = this, e2 = "horizontal" === t.orientation ? t.$.track.offsetWidth : t.$.track.offsetHeight, a2 = t._calculateThumbSize(e2), r2 = e2 - a2;
              let n = (e2 - a2) / (t.max - t.min) * (t.value - t.min);
              t.rightToLeft && "horizontal" === t.orientation && (n = (e2 - a2) / (t.max - t.min) * (t.max - t.value - t.min)), n = Math.min(r2, Math.max(0, n)), "vertical" === t.orientation && t.$.thumb.style.top !== n + "px" ? t.$.thumb.style.top = n + "px" : "horizontal" === t.orientation && t.$.thumb.style.left !== n + "px" && (t.$.thumb.style.left = n + "px");
            }
          });
        }
      ),
      /***/
      3911: (
        /***/
        () => {
          Smart("smart-text-box", class extends Smart.ComboBox {
            static get properties() {
              return { autoFocus: { value: false, type: "boolean" }, autoComplete: { allowedValues: ["none", "manual", "auto", "inline"], type: "string", value: "manual" }, displayMode: { value: "default", allowedValues: ["default", "escaped"], type: "string" }, dropDownOpenMode: { allowedValues: ["none", "default", "auto"], value: "default", type: "string" }, enterKeyBehavior: { value: "submit", allowedValues: ["submit", "clearOnSubmit"], type: "string" }, form: { value: "", type: "string" }, hint: { value: null, type: "any" }, maxLength: { value: null, type: "number?" }, minLength: { value: 2, type: "number" }, messages: { extend: true, value: { en: { missingReference: "{{elementType}}: Missing reference to {{files}}." } }, type: "object" }, required: { value: false, type: "boolean" }, requiredMessage: { value: "", type: "string" }, selectAllOnFocus: { value: false, type: "boolean" }, selectionMode: { value: "zeroOrOne", allowedValues: ["none", "oneOrManyExtended", "zeroOrMany", "oneOrMany", "zeroOrOne", "one", "checkBox", "radioButton"], type: "string" }, type: { value: "input", type: "string", defaultReflectToAttribute: true, readonly: true }, value: { value: "", type: "string" } };
            }
            static get listeners() {
              return { "document.up": "_documentUpHandler", focus: "_focusHandler", keydown: "_keyDownHandler", mouseenter: "_mouseEventsHandler", mouseleave: "_mouseEventsHandler", "input.blur": "_focusHandler", "input.change": "_textBoxChangeHandler", "input.focus": "_focusHandler", "input.keyup": "_textBoxKeyUpHandler", "input.paste": "_textBoxChangeHandler", "input.select": "_textBoxSelectHandler", "listBox.bindingComplete": "_bindingCompleteHandler" };
            }
            template() {
              return '<div id="container" role="presentation">\n                    <span id="label" inner-h-t-m-l="[[label]]" class="smart-label"></span>\n                    <div id="content" class="smart-content" role="presentation">\n                        <input class="smart-input" type="text" id="input"\n                            disabled="[[disabled]]"\n                            maxlength="[[maxLength]]"\n                            name="[[name]]"\n                            placeholder="[[placeholder]]"\n                            readonly="[[readonly]]"\n                            role="textbox"\n                            aria-label="[[placeholder]]"\n                            autocomplete="[[inputPurpose]]">\n                        <div id="autoCompleteString"></div>\n                        <div id="dropDownContainer" class="smart-drop-down smart-drop-down-container smart-visibility-hidden" role="presentation">\n                            <smart-list-box id="listBox"\n                                data-source="[[dataSource]]"\n                                unfocusable="true"\n                                disabled="[[disabled]]"\n                                display-loading-indicator="[[displayLoadingIndicator]]"\n                                display-member="[[displayMember]]"\n                                item-height="[[itemHeight]]"\n                                item-template="[[itemTemplate]]"\n                                item-measure-mode="[[itemMeasureMode]]"\n                                filter-callback="[[filterCallback]]"\n                                filter-mode="[[filterMode]]"\n                                loading-indicator-placeholder="[[loadingIndicatorPlaceholder]]"\n                                loading-indicator-position="[[loadingIndicatorPosition]]"\n                                placeholder="[[dropDownPlaceholder]]"\n                                readonly="[[readonly]]"\n                                right-to-left="[[rightToLeft]]"\n                                selection-mode="[[selectionMode]]"\n                                value-member="[[valueMember]]">\n                                <content></content>\n                            </smart-list-box>\n                        </div>\n                    </div>\n                    <span id="hint" class ="smart-hidden smart-hint"></span>\n                </div>';
            }
            propertyChangedHandler(e2, t, n) {
              const l = this;
              switch (e2) {
                case "autoComplete":
                  l.$.listBox._filteredItems && l.$.listBox._filteredItems.length !== l.$.listBox._items.length && super._autoComplete(true), l._setAriaAutocomplete();
                  break;
                case "dataSource":
                case "valueMember":
                  l._clearSelection(), l._setDropDownSize(), l._positionDetection.checkBrowserBounds("vertically"), l._positionDetection.positionDropDown(), l._positionDetection.checkBrowserBounds("horizontally");
                  break;
                case "displayMember":
                case "inputMember": {
                  const e3 = l.$.listBox;
                  if (e3.selectedIndexes.length) {
                    const t2 = e3._items[e3.selectedIndexes[0]][l.inputMember];
                    l.$.listBox.$.filterInput.value = t2, l.$.input.value = "escaped" === l.displayMode ? l._toEscapedDisplayMode(t2) : l._toDefaultDisplayMode(t2), l.set("value", l._toDefaultDisplayMode(l.$.input.value));
                  }
                  break;
                }
                case "displayMode":
                  l.$.input.value = "escaped" === n ? l._toEscapedDisplayMode(l.value) : l.value = l._toDefaultDisplayMode(l.$.input.value);
                  break;
                case "dropDownOpenMode":
                  l._setFocusable(), l.$dropDownContainer.addClass("smart-visibility-hidden"), l.opened = false;
                  break;
                case "value":
                  (l.$.input !== document.activeElement || l.$.input === document.activeElement && l.$.input.value === l._oldValue) && (l.$.input.value = "escaped" === l.displayMode ? l._toEscapedDisplayMode(l.value) : l.value, l._oldValue = l._changingOldValue = t), l.value || l.clearSelection(), n.length > 0 ? l.$.addClass("has-value") : l.$.removeClass("has-value");
                  break;
                case "hint":
                  if (null === n) return l.$.hint.innerHTML = "", void l.$.removeClass("invalid");
                  l._handleHintContainer();
                  break;
                default:
                  super.propertyChangedHandler(e2, t, n);
              }
            }
            static get requires() {
              return { "Smart.ComboBox": "smart.combobox.js" };
            }
            static get styleUrls() {
              return ["smart.textbox.css"];
            }
            open() {
              const e2 = this;
              0 === e2.$.listBox.items.length && "function" != typeof e2.dataSource || "none" === e2.autoComplete || (0 === e2.$.input.value.length && e2.$.listBox._filteredItems && e2.$.listBox._filteredItems.length !== e2.$.listBox._items.length ? super._autoComplete(true) : super.open());
            }
            close() {
              const e2 = this;
              super.close(), e2.$.autoCompleteString.textContent = "", e2.$.listBox._focusedItem && (e2.$.listBox._focusedItem._focused = false), "none" !== e2.autoComplete && e2.$.input._filteredItems && e2.$.input._filteredItems[0] && e2.$.input._filteredItems[0] !== e2.$.input.value && super._autoComplete(true);
            }
            cloneNode() {
              const e2 = this;
              let t = HTMLElement.prototype.cloneNode.apply(e2, Array.prototype.slice.call(arguments, 0, 1));
              return e2.$.listBox && (t.dataSource = e2.dataSource), t;
            }
            focus() {
              this.$.input.focus();
            }
            _setFocusable() {
              const e2 = this;
              e2.disabled || e2.unfocusable ? e2.$.input.tabIndex = -1 : e2.$.input.removeAttribute("tabindex");
            }
            reset() {
              const e2 = this;
              "escaped" === e2.displayMode ? (e2.value = e2._initializationValue, e2.$.input.value = e2._toEscapedDisplayMode(e2._initializationValue)) : e2.$.input.value = e2.value = e2._initializationValue, !e2.value && e2.$.listBox && e2.clearSelection();
            }
            _bindingCompleteHandler() {
              const e2 = this;
              e2.$.listBox && e2.isRendered && (e2._setDropDownSize(), e2._positionDetection.checkBrowserBounds());
            }
            _createElement() {
              const e2 = this;
              e2._browserIsIEorEdge = Smart.Utilities.Core.Browser.IE || Smart.Utilities.Core.Browser.Edge, e2.value && (e2.$.input.value = "escaped" === e2.displayMode ? e2._toEscapedDisplayMode(e2.value) : e2.value), e2.autoFocus && (e2.$.input.focus(), e2.selectAllOnFocus && e2.$.input.select()), e2._setDropDownSize(), e2._handleSelectedText(), e2._setFocusable(), e2._initializationValue = e2._oldValue = e2._changingOldValue = e2.value, e2.value.length > 0 ? e2.$.addClass("has-value") : e2.$.removeClass("has-value"), e2._handleHintContainer(), e2._setAriaRelations();
            }
            _focusHandler(e2) {
              const t = this;
              if (e2.target === t && t.hasAttribute("tabindex") && (t.$.input.tabIndex = t.disabled || t.unfocusable ? -1 : t.tabIndex, t.removeAttribute("tabindex")), "blur" === e2.type) {
                if (t._isDropDownClicked || e2.target === t) return;
                if (t.removeAttribute("focus"), t.$.autoCompleteString.textContent = "", t.value.length > 0 ? t.$.addClass("has-value") : t.$.removeClass("has-value"), ("auto" === t.autoComplete || "inline" === t.autoComplete) && t.$.input.value.length > 0 && t.$.listBox._focusedItem && t.$.listBox._focusedItem._focused) {
                  const e3 = t.$.listBox._focusedItem[t.inputMember];
                  t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(e3) : t._toDefaultDisplayMode(e3), t.set("value", t._toDefaultDisplayMode(e3));
                }
                return t._preventDropDownClose || t.close(), t._oldValue !== t.value && t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value }), void t.$.fireEvent("blur");
              }
              t.disabled || (t.setAttribute("focus", ""), t._oldValue = t._changingOldValue = t.value, t.selectAllOnFocus && t.$.input.select(), e2.target === t && t.$.input.focus(), false !== t._canFireFocus && (t._canFireFocus = false, t.$.fireEvent("focus"), t._canFireFocus = true));
            }
            _handlePointerInEscapedSymbol(e2) {
              const t = this;
              if ("escaped" !== t.displayMode) return;
              let n = t.$.input.selectionStart, l = t.$.input.selectionEnd, a2 = t.$.input.value;
              if ("\\" === a2[n - 1] && a2[n].match(/n|r|s|t|f/g)) {
                if (n === l) {
                  let l2 = "next" === e2 ? 1 : -1;
                  return t.$.input.selectionStart = n + l2, void (t.$.input.selectionEnd = n + l2);
                }
                t.$.input.selectionStart = n - 1, "\\" === a2[l - 1] && a2[l].match(/n|r|s|t|f/g) && (t.$.input.selectionEnd = l + 1);
              }
            }
            _handleSelectedText() {
              const e2 = this;
              null === e2.selectionStart || null === e2.selectionEnd || e2.selectionStart === e2.selectionEnd || e2.selectAllOnFocus || (e2.selectionStart = e2.selectionStart < 0 ? 0 : e2.selectionStart, e2.selectionEnd = e2.selectionEnd > e2.value.length ? e2.value.length : e2.selectionEnd, e2.$.input.setSelectionRange(e2.selectionStart, e2.selectionEnd));
            }
            _handleHintContainer() {
              const e2 = this;
              if (!e2.hint) return;
              const t = e2.$.hint;
              if ("function" == typeof e2.hint) {
                const n = e2.value;
                e2.hint(n, t) ? e2.$.addClass("invalid") : e2.$.removeClass("invalid");
              } else "string" == typeof e2.hint && (t.innerHTML = e2.hint, e2.$.removeClass("invalid"), e2.hint.length > 0 && !e2.classList.contains("outlined") && !e2.classList.contains("underlined") && t.classList.remove("smart-hidden"));
            }
            _keyDownHandler(e2) {
              const t = this;
              switch (t._showAutoCompleteHighlighter = false, e2.key) {
                case "ArrowUp":
                case "ArrowDown":
                  if (e2.altKey) return e2.preventDefault(), void ("ArrowDown" === e2.key ? t.open() : t.close());
                  if (t.opened) {
                    if (e2.preventDefault(), t.$.listBox._handleKeyStrokes(e2.key), "inline" !== t.autoComplete) break;
                    t._showAutoCompleteHighlighter = true, super._updateAutoCompleteHelper();
                  }
                  break;
                case "PageUp":
                case "PageDown":
                  e2.preventDefault(), t.$.input.selectionStart = t.$.input.selectionEnd = "PageUp" === e2.key ? 0 : t.$.input.value.length;
                  break;
                case "Enter": {
                  const e3 = "function" == typeof t.$.listBox._focusedItem ? t.$.listBox._focusedItem() : t.$.listBox._focusedItem;
                  if (t.opened && e3 && e3._focused && (t.$.listBox.$.filterInput.value = e3[t.inputMember], t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(e3[t.inputMember]) : t._toDefaultDisplayMode(e3[t.inputMember]), t.select(e3), t.close()), "default" !== t.enterKeyBehavior) {
                    const e4 = t.$.input.value;
                    t._oldValue !== e4 && (t.close(), t.$.fireEvent("change", { oldValue: t._oldValue, value: e4, type: "submit" }), "clearOnSubmit" === t.enterKeyBehavior && (Smart.MaskedTextBox && t instanceof Smart.MaskedTextBox ? (t._cleanMask(), t._setMaskToInput(), t.$.input.selectionStart = t.$.input.selectionEnd = 0) : t.$.input.value = ""), t._oldValue = t._changingOldValue = t.value = t._toDefaultDisplayMode(t.$.input.value)), t._submitted = true;
                  }
                  break;
                }
                case "Escape":
                  if (t.$.dropDownContainer && t.close(), t._closedFromKeyCombination = true, "none" === t.escKeyMode) return;
                  switch (t.escKeyMode) {
                    case "none":
                      break;
                    case "clearValue":
                      t.value = t.$.input.value = "";
                      break;
                    case "previousValue":
                      t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(t._oldValue) : t._oldValue;
                  }
                  break;
                case " ":
                  "escaped" === t.displayMode && function(n) {
                    let l = t.$.input.selectionStart, a2 = t.$.input.selectionEnd, o = t.$.input.value;
                    e2.preventDefault(), o = o.substring(0, l) + n + o.substring(a2, o.length), t.value = t._toDefaultDisplayMode(o), t.$.input.value = o, t.$.input.selectionStart = t.$.input.selectionEnd = l + 2;
                  }("\\s");
                  break;
                case "Backspace":
                  if ("escaped" === t.displayMode && t.$.input.selectionStart === t.$.input.selectionEnd) {
                    let e3 = t.$.input.selectionStart;
                    "\\" !== t.$.input.value[e3 - 2] || "s" !== t.$.input.value[e3 - 1] && "n" !== t.$.input.value[e3 - 1] || (t.$.input.value = t.$.input.value.substring(0, e3 - 2) + t.$.input.value.substring(e3 - 2, t.$.input.value.length), t.$.input.selectionStart = e3 - 2);
                  }
              }
            }
            _keyUpHandler(e2) {
              const t = this;
              if (!t.disabled && "Escape" !== e2.key && e2.target !== t.$.listBox.$.filterInput && (e2.target === t.$.input && "oneOrManyExtended" === t.selectionMode && (t.$.listBox._keysPressed[e2.key] = false), t.$.input)) {
                const e3 = t.$.input.value;
                t._changingOldValue !== e3 && t.$.fireEvent("changing", { oldValue: t._changingOldValue, value: e3 }), t._changingOldValue = e3;
              }
            }
            _listBoxItemClickHandler(e2) {
              const t = this, n = e2.detail;
              if (super._listBoxItemClickHandler(e2), n.selected) {
                if ("escaped" === t.displayMode) {
                  const e3 = t.$.input.value;
                  t.value = t._toDefaultDisplayMode(e3), t.$.input.value = e3;
                } else t.value = t.$.input.value;
                t._oldValue !== t.value && (t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value }), t.$.input.focus());
              }
            }
            _submitKeyUpHandler() {
              const e2 = this;
              e2._submitted && ("clearOnSubmit" === e2.enterKeyBehavior && (e2.$.input.selectionStart = e2.$.input.selectionEnd = 0), e2._submitted = false);
            }
            _textBoxKeyUpHandler(e2) {
              const t = this;
              if (t.disabled || e2.altKey || e2.ctrlKey) return;
              if ("escaped" === t.displayMode) {
                const e3 = t.$.input.value;
                t.value = t._toDefaultDisplayMode(t.$.input.value), t.$.input.value = e3;
              } else t.value = t.$.input.value;
              let n;
              if (1 === t.$.listBox.selectedIndexes.length && (n = t.$.listBox.getItem(t.$.listBox.selectedValues[0]), t.value !== n[t.inputMember] && t.unselect(n)), t._showAutoCompleteHighlighter || (t.$.autoCompleteString.textContent = ""), "Alt" === e2.key || "Control" === e2.key || !t.opened && "Escape" === e2.key || "Enter" === e2.key) t._closedFromKeyCombination = false;
              else if (e2.key && e2.key.indexOf("Arrow") > -1) t._handlePointerInEscapedSymbol("ArrowRight" === e2.key ? "next" : void 0);
              else {
                if ("none" !== t.autoComplete && (t.$.input.value.length > 0 || "auto" === t.dropDownOpenMode)) {
                  const e3 = super._autoComplete.bind(t);
                  if (t._autoCompleteTimer && clearTimeout(t._autoCompleteTimer), 0 === t.$.listBox._items.length && "function" != typeof t.dataSource) return void t.close();
                  t._autoCompleteTimer = setTimeout(function() {
                    e3(true);
                  }, t.autoCompleteDelay);
                } else t.close();
                "Enter" === e2.key && t.value != t.value && t._browserIsIEorEdge && (t.value = t.$.input.value, t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value }));
              }
            }
            _listBoxChangeHandler(e2) {
              const t = this;
              if (e2.stopPropagation(), e2.detail.selected) {
                const n = t.$.listBox._items[e2.detail.index];
                let l = "";
                n && (l = n[t.inputMember]), t.$.listBox.$.filterInput.value = l, t.$.input.value = "escaped" === t.displayMode ? t._toEscapedDisplayMode(l) : t._toDefaultDisplayMode(l), t.set("value", t._toDefaultDisplayMode(t.$.input.value));
              }
              "none" !== t.autoComplete && "function" != typeof t.dataSource && t._autoComplete(true);
            }
            _mouseEventsHandler(e2) {
              "mouseenter" === e2.type ? this.setAttribute("hover", "") : this.removeAttribute("hover");
            }
            _textBoxChangeHandler(e2) {
              const t = this;
              if (e2.stopPropagation(), "escaped" === t.displayMode) {
                const n = t.$.input.value, l = t.$.input.selectionStart, a2 = t.$.input.selectionEnd, o = e2.clipboardData || e2.originalEvent && e2.originalEvent.clipboardData || window.clipboardData;
                if (o) {
                  let n2 = o.getData("text"), i = t.$.input.value;
                  e2.preventDefault(), n2 = t._toEscapedDisplayMode(n2), t.$.input.value = i.substring(0, l) + n2 + i.substring(a2, i.length);
                }
                t.value = t._toDefaultDisplayMode(t.$.input.value), t.$.input.value = n;
              } else t.value = t.$.input.value;
              t._handleHintContainer();
            }
            _textBoxSelectHandler() {
              const e2 = this;
              e2.disabled || (e2.selectionStart = e2.$.input.selectionStart, e2.selectionEnd = e2.$.input.selectionEnd);
            }
            _toEscapedDisplayMode(e2) {
              const t = [{ key: /\r\n|\n\r|\n|\r/g, value: "\\n" }, { key: /\s/g, value: "\\s" }, { key: /\n/g, value: "\\n" }, { key: /\t/g, value: "\\t" }, { key: /\f/g, value: "\\f" }, { key: /\r/g, value: "\\r" }];
              for (let n = 0; n < t.length; n++) e2 = e2.replace(t[n].key, t[n].value);
              return e2;
            }
            _toDefaultDisplayMode(e2) {
              e2 || (e2 = "");
              const t = [{ key: /\\s/g, value: " " }, { key: /\\n/g, value: "\n" }, { key: /\\t/g, value: "	" }, { key: /\\f/g, value: "\f" }, { key: /\\r/g, value: "\r" }];
              for (let n = 0; n < t.length; n++) e2 = e2.replace(t[n].key, t[n].value);
              return e2;
            }
            _documentDownHandler(e2) {
              const t = this;
              if (t.disabled || t.readonly) return;
              let n = e2.originalEvent.target;
              if (t.enableShadowDOM) if (n = e2.originalEvent.composedPath()[0], null === t._dropDownParent) t._isDropDownClicked = n.closest(".smart-drop-down-container") === t.$.dropDownContainer;
              else {
                let e3 = n.getRootNode().host;
                e3 && e3.closest(".smart-drop-down-container") === t.$.dropDownContainer && (t._isDropDownClicked = true);
              }
              else t._isDropDownClicked = n.closest(".smart-drop-down-container") === t.$.dropDownContainer;
              (e2.originalEvent.target.closest("smart-list-item") || t._isDropDownClicked) && (t._preventDropDownClose = true);
            }
            _documentMoveHandler() {
            }
            _documentUpHandler(e2) {
              const t = this;
              if (t.disabled) return;
              let n = t.enableShadowDOM ? e2.originalEvent.composedPath()[0] : e2.originalEvent.target;
              if (n) if ("escaped" === t.displayMode && n === t.$.input && t._handlePointerInEscapedSymbol(), t._isDropDownClicked || t.readonly) delete t._isDropDownClicked;
              else if (n !== t.$.input || "auto" !== t.dropDownOpenMode) {
                for (; n; ) {
                  if (n instanceof Smart.ListItem && n.ownerListBox === t.$.listBox) {
                    if (n.unselectable || n.disabled) return;
                    return "escaped" === t.displayMode ? t.$.input.value = t._toEscapedDisplayMode(n[t.inputMember]) : t.$.input.value = t._toDefaultDisplayMode(n[t.inputMember]), t.value = t.$.input.value, t.$.fireEvent("change", { oldValue: t._oldValue, value: t.value, type: "submit" }), t._oldValue = t._changingOldValue = t.value, "clearOnSubmit" === t.enterKeyBehavior && (t.$.input.value = t.value = ""), super._autoComplete(true), t.close(), n = "item", void t.$.input.focus();
                  }
                  if (n === t.$.listBox) return void (n = "listBox");
                  n = n.parentElement;
                }
                "listBox" === n || "item" === n || t.close();
              } else super._autoComplete(true);
            }
          });
        }
      ),
      /***/
      6693: (
        /***/
        () => {
          Smart("smart-tooltip", class extends Smart.ContentElement {
            static get properties() {
              return { arrow: { value: false, type: "boolean" }, arrowDirection: { allowedValues: ["bottom", "top", "left", "right"], value: "bottom", type: "string" }, align: { allowedValues: ["left", "center", "right"], value: "center", type: "string" }, delay: { value: 0, type: "number" }, messages: { extend: true, value: { en: { invalidSelector: '{{elementType}}: "{{property}}" must be a String, an HTMLElement or null.', htmlTemplateNotSuported: "{{elementType}}: Browser doesn't support HTMLTemplate elements.", invalidTemplate: '{{elementType}}: "{{property}}" property accepts a string that must match the id of an HTMLTemplate element from the DOM.', invalidNode: '{{elementType}}: Invalid parameter "{{node}}" when calling {{method}}.' } }, type: "object" }, iframeRect: { value: null, type: "object?" }, offset: { value: [], type: "array" }, openMode: { allowedValues: ["click", "focus", "hover", "manual"], value: "hover", type: "string" }, position: { allowedValues: ["bottom", "top", "left", "right", "absolute", "auto"], value: "top", type: "string" }, selector: { value: null, type: "any?" }, tooltipTemplate: { value: null, type: "any" }, value: { value: "", type: "string", reflectToAttribute: false }, visible: { value: false, type: "boolean" } };
            }
            static get styleUrls() {
              return ["smart.tooltip.css"];
            }
            template() {
              return '<div id="container" role="presentation">\n                    <div id="content" class="smart-tooltip-content" inner-h-t-m-l="[[innerHTML]]" role="presentation">\n                        <content></content>\n                    </div>\n                </div>';
            }
            propertyChangedHandler(e2, t, n) {
              super.propertyChangedHandler(e2, t, n);
              const o = this;
              let l;
              switch (e2) {
                case "align":
                  o._applyPosition(n);
                  break;
                case "openMode":
                  o.close(), o._handleEventListeners(t), o._handleResize();
                  break;
                case "selector":
                  o._oldOwnerElement = o._ownerElement, o._handleSelector(n, t), o._handleEventListeners();
                  break;
                case "tooltipTemplate":
                  o._handleTemplate(t);
                  break;
                case "value":
                  o.tooltipTemplate ? o._handleTemplate() : o.$.content.innerHTML = o.value;
                  break;
                case "visible":
                  l = n ? "open" : "close", o.$.fireEvent(l, { owner: o._ownerElement }, o.isInShadowDOM ? { composed: true, bubbles: true, cancelable: true } : void 0);
                  break;
                case "position":
                  return void o._applyPosition(t);
              }
              o._applyPosition();
            }
            ready() {
              const e2 = this;
              super.ready(), e2.getAttribute("role") || e2.setAttribute("role", "tooltip"), e2._isParentPositionStatic = "static" === window.getComputedStyle(e2.parentElement || document.querySelector("body")).position, e2._handleSelector(e2.selector), e2.visible && e2._applyPosition(), e2._handleEventListeners(), e2._handleResize(), e2.value = e2.$.content.innerHTML = e2.value ? e2.value : e2.innerHTML, e2._handleTemplate();
            }
            appendChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.appendChild.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? (t.$.content.appendChild(e2), t._applyPosition()) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "appendChild", node: "node" }));
            }
            close() {
              const e2 = this;
              if (e2._isOpening && clearTimeout(e2._isOpening), !e2.visible) return;
              const t = e2.isInShadowDOM ? { composed: true, bubbles: true, cancelable: true } : void 0;
              e2.$.fireEvent("closing", { owner: e2._ownerElement }, t).defaultPrevented || (e2.$.fireEvent("close", { owner: e2._ownerElement }, t), e2.visible = false);
            }
            clear() {
              const e2 = this.$.content;
              if (e2) for (; e2.childNodes.length; ) e2.removeChild(e2.firstChild);
            }
            insertBefore(e2, t) {
              const n = this;
              if (!n.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(n, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 && t ? (n.$.content.insertBefore(e2, t), n._applyPosition()) : n.error(n.localize("invalidNode", { elementType: n.nodeName.toLowerCase(), method: "insertBefore", node: "newNode/referenceNode" }));
            }
            open() {
              const e2 = this;
              e2.disabled || e2.readonly || e2.visible || (clearTimeout(e2._isOpening), e2._isOpening = setTimeout(function() {
                const t = e2.isInShadowDOM ? { composed: true, bubbles: true, cancelable: true } : void 0;
                if (e2.$.fireEvent("opening", { owner: e2._ownerElement }, t).defaultPrevented) return void clearTimeout(e2._isOpening);
                e2._applyPosition(), e2.$.fireEvent("open", { owner: e2._ownerElement }, t);
                const n = e2.context;
                e2.context = e2, e2.visible = true, e2.context = n;
              }, e2.delay));
            }
            removeChild(e2) {
              const t = this;
              if (!t.isCompleted) {
                const e3 = Array.prototype.slice.call(arguments, 2);
                return HTMLElement.prototype.insertBefore.apply(t, e3.concat(Array.prototype.slice.call(arguments)));
              }
              e2 ? (t.$.content.removeChild(e2), t._applyPosition()) : t.error(t.localize("invalidNode", { elementType: t.nodeName.toLowerCase(), method: "removeChild", node: "node" }));
            }
            reposition() {
              const e2 = this;
              e2.isRendered && e2._applyPosition();
            }
            toggle() {
              const e2 = this;
              e2.visible ? e2.close() : e2.open();
            }
            _getDomElementPosition(e2) {
              let t = [], n = e2.parentElement;
              for (; n && "BODY" !== n.nodeName; ) t.push(n), n = !this.enableShadowDOM || n.parentElement ? n.parentElement : n.getRootNode().host;
              return t;
            }
            _getElementAndOwnerRelation(e2) {
              const t = this._getDomElementPosition(e2 || this), n = t.length;
              let o = null;
              for (let e3 = 0; e3 < n; e3++) if ("static" !== window.getComputedStyle(t[e3]).getPropertyValue("position")) {
                o = t[e3];
                break;
              }
              return o;
            }
            _applyPosition(e2) {
              const t = this;
              if (!t._ownerElement) return;
              if (!t.parentElement) return;
              t._isParentPositionStatic = "static" === window.getComputedStyle(t.parentElement).position;
              const n = t._ownerElement.getBoundingClientRect(), o = t.parentElement ? t.parentElement.getBoundingClientRect() : { top: 0, left: 0 };
              let l, i;
              t.parentElement && "BODY" === t.parentElement.nodeName.toUpperCase() ? (l = n.top + window.scrollY, i = n.left + window.scrollX) : (l = n.top - o.top, i = n.left - o.left);
              const r2 = t.position, s = t.iframeRect;
              let a2, p2 = { top: n.top, left: n.left, right: n.right, width: n.width, height: n.height, nonStaticParent: t._getElementAndOwnerRelation() };
              switch (s && (p2.top += s.top, p2.left += s.left, p2.right += s.right), r2) {
                case "auto":
                case "bottom":
                case "top":
                case "left":
                case "right": {
                  t.style.left = "";
                  const e3 = t["_position" + r2.charAt(0).toUpperCase() + r2.slice(1)](i, l, p2);
                  l = e3.top, i = e3.left, a2 = e3.translate;
                  break;
                }
                case "absolute":
                  e2 ? (t.style.top = t.style.left = "", l = i = 0) : (l = parseFloat(t.style.top), i = parseFloat(t.style.left));
              }
              const d2 = t.getAttribute("arrow-direction");
              a2 ? t.$.container.style.setProperty("--smart-tooltip-arrow-translate", a2 + "px") : t.$.container.style.removeProperty("--smart-tooltip-arrow-translate"), void 0 === l || isNaN(l) || (l += ("auto" === r2 && "top" === d2 ? -1 : 1) * parseInt(t.offset[1]) || 0, t.style.top = l + "px"), void 0 === i || isNaN(i) || (i += ("auto" === r2 && "left" === d2 ? -1 : 1) * parseInt(t.offset[0]) || 0, t.style.left = i + "px");
            }
            _positionAuto(e2, t, n) {
              const o = this;
              let l, i, r2 = o.parentElement;
              for (; r2; ) {
                if ("hidden" === getComputedStyle(r2).getPropertyValue("overflow")) {
                  l = r2;
                  break;
                }
                r2 = r2.parentElement;
              }
              if (l) i = l.getBoundingClientRect();
              else {
                const e3 = document.scrollingElement;
                let t2, n2;
                document.scrollingElement ? (t2 = e3.offsetWidth, n2 = e3.offsetHeight) : (t2 = window.innerWidth, n2 = window.innerHeight), l = document.body, i = { width: t2, height: n2, left: 0, top: 0, right: t2, bottom: n2 };
              }
              const s = parseFloat(window.getComputedStyle(o).getPropertyValue("--smart-tooltip-arrow-width")) || 0;
              let a2 = o._positionTop(e2, t, n), p2 = n.nonStaticParent, d2 = o.offsetWidth / 2 - s, c = 0, f2 = 0, m2 = a2.left, h2 = i.right - (m2 + f2 + o.offsetWidth), u2 = Math.min(0, h2);
              if (m2 <= 0 && h2 > 0 && (m2 = Math.min(e2, m2 + h2)), u2 <= 0 && (u2 = Math.sign(u2) * (Math.abs(u2) + i.right - (e2 + n.width))), p2) {
                const e3 = p2.getBoundingClientRect();
                c = e3.top, f2 = e3.left;
              }
              return a2.top + c >= i.top ? (m2 <= 0 && (m2 = e2), t = a2.top, { left: e2 = Math.max(i.left - f2, m2 + u2), top: t, translate: Math.max(-d2, Math.min(d2, a2.left - e2)) }) : (a2 = o._positionBottom(e2, t, n), a2.top + o.offsetHeight + c <= i.bottom ? (m2 = a2.left, m2 <= 0 && (m2 = e2), t = a2.top, { left: e2 = Math.max(i.left - f2, m2 + u2), top: t, translate: Math.max(-d2, Math.min(d2, a2.left - e2)) }) : (a2 = o._positionLeft(e2, t, n), t = a2.top, d2 = o.offsetHeight / 2 - s, t = Math.max(i.top - c, a2.top + Math.min(0, i.bottom - (a2.top + c + o.offsetHeight))), a2.left + f2 >= i.left ? e2 = a2.left : (a2 = o._positionRight(e2, t, n), e2 = a2.left + o.offsetWidth + f2 <= i.right ? a2.left : i.right - o.offsetWidth), { left: e2, top: t, translate: Math.max(-d2, Math.min(d2, a2.top - t)) }));
            }
            _getRelativeParentOffset(e2) {
              const t = this, n = t._ownerElement;
              let o = t._getElementAndOwnerRelation(n), l = 0, i = 0;
              if (!e2) return { left: i, top: l };
              for (; e2 && o && e2 !== o; ) l += o.offsetTop, i += o.offsetLeft, o = t._getElementAndOwnerRelation(o);
              return { left: i, top: l };
            }
            _positionTop(e2, t, n) {
              const o = this, l = o._getRelativeParentOffset(n.nonStaticParent);
              if (o.set("arrowDirection", "bottom"), null === n.nonStaticParent) return t = n.top + window.scrollY - o.offsetHeight, { left: (e2 = o._getAlignmentOffset(n.left, o.offsetWidth, n.width) + window.scrollX) + l.left, top: t + l.top };
              if (o._isParentPositionStatic) {
                if (t = o._ownerElement.offsetTop - o.offsetHeight, e2 = o._getAlignmentOffset(o._ownerElement.offsetLeft, o.offsetWidth, n.width), o._ownerElement instanceof SVGElement) {
                  const n2 = o._ownerElement.getBoundingClientRect(), l2 = o._ownerElement.parentNode.getBoundingClientRect();
                  t = n2.top - l2.top - o.offsetHeight / 2, e2 = o._getAlignmentOffset(n2.left, o.offsetWidth, l2.left);
                }
                return { left: e2 + l.left, top: t + l.top };
              }
              if (o._ownerElement instanceof SVGElement && o._ownerElement.parentElement) {
                const n2 = o._ownerElement.getBoundingClientRect(), i = o._ownerElement.parentNode.getBoundingClientRect();
                return t = n2.top - i.top - o.offsetHeight, { left: (e2 = o._getAlignmentOffset(n2.left - i.left, o.offsetWidth, n2.width)) + l.left, top: t + l.top };
              }
              return t -= o.offsetHeight, { left: (e2 = o._getAlignmentOffset(e2, o.offsetWidth, n.width)) + l.left, top: t + l.top };
            }
            _positionBottom(e2, t, n) {
              const o = this, l = o._getRelativeParentOffset(n.nonStaticParent);
              return o.set("arrowDirection", "top"), null === n.nonStaticParent ? (t = n.top + window.scrollY + n.height, { left: (e2 = o._getAlignmentOffset(n.left, o.offsetWidth, n.width) + window.scrollX) + l.left, top: t + l.top }) : o._isParentPositionStatic ? (t = o._ownerElement.offsetTop + n.height, { left: (e2 = o._getAlignmentOffset(o._ownerElement.offsetLeft, o.offsetWidth, n.width)) + l.left, top: t + l.top }) : (t += n.height, { left: (e2 = o._getAlignmentOffset(e2, o.offsetWidth, n.width)) + l.left, top: t + l.top });
            }
            _getAlignmentOffset(e2, t, n) {
              switch (this.align) {
                case "left":
                  return e2;
                case "right":
                  return e2 - t + n;
                default:
                  return e2 - t / 2 + n / 2;
              }
            }
            _positionLeft(e2, t, n) {
              const o = this, l = o._getRelativeParentOffset(n.nonStaticParent);
              return o.set("arrowDirection", "right"), null === n.nonStaticParent ? (t = n.top + window.scrollY + n.height / 2 - o.$.content.offsetHeight / 2, { left: (e2 = n.left + window.scrollX - o.offsetWidth) + l.left, top: t + l.top }) : o._isParentPositionStatic ? (t = o._ownerElement.offsetTop + n.height / 2 - o.$.content.offsetHeight / 2, { left: (e2 = o._ownerElement.offsetLeft - o.offsetWidth) + l.left, top: t + l.top }) : (t = t + n.height / 2 - o.$.content.offsetHeight / 2, { left: (e2 -= o.offsetWidth) + l.left, top: t + l.top });
            }
            _positionRight(e2, t, n) {
              const o = this, l = o._getRelativeParentOffset(n.nonStaticParent);
              return o.set("arrowDirection", "left"), null === n.nonStaticParent ? (t = n.top + window.scrollY + n.height / 2 - o.$.content.offsetHeight / 2, { left: (e2 = n.left + window.scrollX + n.width) + l.left, top: t + l.top }) : o._isParentPositionStatic ? (t = o._ownerElement.offsetTop + n.height / 2 - o.$.content.offsetHeight / 2, { left: (e2 = o._ownerElement.offsetLeft + n.width) + l.left, top: t + l.top }) : (t = t + n.height / 2 - o.$.content.offsetHeight / 2, { left: (e2 += n.width) + l.left, top: t + l.top });
            }
            _eventsHandler(e2) {
              const t = this;
              t.disabled || t.readonly || ("click" !== e2.type ? "mouseenter" === e2.type || "focus" === e2.type ? this.open() : this.close() : t.visible ? this.close() : this.open());
            }
            _handleEventListeners(e2) {
              const t = this;
              if (t._oldOwnerElement && "manual" !== t.openMode) {
                let e3 = t._oldOwnerElement.getAttribute("aria-describedby");
                e3 && "tooltip" === t.getAttribute("role") && (e3 === t.id ? t._oldOwnerElement.removeAttribute("aria-describedby") : (e3 = e3.replace(" " + t.id, ""), e3 = e3.replace(t.id + " ", ""), t._oldOwnerElement.setAttribute("aria-describedby", e3))), t._oldOwnerElement.$.unlisten("mouseenter.tooltip"), t._oldOwnerElement.$.unlisten("mouseleave.tooltip"), t._oldOwnerElement.$.unlisten("focus.tooltip"), t._oldOwnerElement.$.unlisten("blur.tooltip"), t._oldOwnerElement.$.unlisten("click.tooltip"), t._oldOwnerElement = null;
              }
              if (t._ownerElement) {
                if (e2) switch (e2) {
                  case "hover":
                    t._ownerElement.$.unlisten("mouseenter.tooltip"), t._ownerElement.$.unlisten("mouseleave.tooltip");
                    break;
                  case "focus":
                    t._ownerElement.$.unlisten("focus.tooltip"), t._ownerElement.$.unlisten("blur.tooltip");
                    break;
                  case "click":
                    t._ownerElement.$.unlisten("click.tooltip");
                }
                if ("manual" !== t.openMode) switch (t._ownerElement instanceof Smart.BaseElement || (t._ownerElement.$ = Smart.Utilities.Extend(t._ownerElement)), t.openMode) {
                  case "hover":
                    t._ownerElement.$.listen("mouseenter.tooltip", t._eventsHandler.bind(t)), t._ownerElement.$.listen("mouseleave.tooltip", t._eventsHandler.bind(t));
                    break;
                  case "focus":
                    t._ownerElement.$.listen("focus.tooltip", t._eventsHandler.bind(t)), t._ownerElement.$.listen("blur.tooltip", t._eventsHandler.bind(t));
                    break;
                  case "click":
                    t._ownerElement.$.listen("click.tooltip", t._eventsHandler.bind(t));
                }
              }
            }
            _handleResize() {
              const e2 = this;
              function t() {
                e2._applyPosition();
              }
              "click" === e2.openMode ? window.addEventListener("resize", t) : window.removeEventListener("resize", t);
            }
            _handleSelector(e2, t) {
              const n = this;
              if (t && t.removeAttribute && t.removeAttribute("aria-describedby"), "string" == typeof e2) n._ownerElement = e2.length > 0 ? document.getElementById(e2) : void 0;
              else if (e2 && e2.nodeType === Node.ELEMENT_NODE) n._ownerElement = e2;
              else {
                if (null === e2) return void (n._ownerElement = void 0);
                n.error(n.localize("invalidSelector", { elementType: n.nodeName.toLowerCase(), property: "selector" }));
              }
              if (!n._ownerElement || "tooltip" !== n.getAttribute("role")) return;
              if (!n.value) return;
              const o = n._ownerElement ? n._ownerElement.getAttribute("aria-describedby") : null;
              o ? o.indexOf(n.id) < 0 && n._ownerElement.setAttribute("aria-describedby", o + " " + n.id) : n._ownerElement.setAttribute("aria-describedby", n.id);
            }
            _handleTemplate(e2) {
              const t = this;
              let n = t.tooltipTemplate;
              if (e2 && (t.$.content.innerHTML = t.value ? t.value : ""), null === n || !n) return;
              if ("function" == typeof t.tooltipTemplate) return void t.tooltipTemplate(t.$.content, { value: t.value });
              if (!("content" in document.createElement("template"))) return void t.error(t.localize("htmlTemplateNotSuported", { elementType: t.nodeName.toLowerCase() }));
              if (n = document.getElementById(n), null === n || !("content" in n)) return void t.error(t.localize("invalidTemplate", { elementType: t.nodeName.toLowerCase(), property: "template" }));
              const o = n.content, l = o.childNodes.length, i = /{{\w+}}/g;
              let r2, s = [];
              for (let e3 = 0; e3 < l; e3++) for (r2 = i.exec(o.childNodes[e3].innerHTML); r2; ) s.push({ childNodeIndex: e3, bindingString: r2[0] }), r2 = i.exec(o.childNodes[e3].innerHTML);
              const a2 = s.length;
              let p2, d2, c = document.importNode(n.content, true);
              for (let e3 = 0; e3 < a2; e3++) {
                p2 = c.childNodes[s[e3].childNodeIndex], d2 = s.length;
                for (let n2 = 0; n2 < d2; n2++) p2.innerHTML = p2.innerHTML.replace(s[e3].bindingString, t.value);
              }
              t.$.content.innerHTML = "";
              for (let e3 = 0; e3 < c.childNodes.length; e3++) c.childNodes[e3].outerHTML && (t.$.content.innerHTML += c.childNodes[e3].outerHTML);
            }
          }), function() {
            const e2 = () => {
              const e3 = document.querySelectorAll('[data-toggle="tooltip"');
              if (e3.length > 0) for (let t = 0; t < e3.length; t++) {
                if (!e3[t].hasAttribute("data-title")) continue;
                const n = document.createElement("smart-tooltip");
                n.selector = e3[t], n.innerHTML = e3[t].getAttribute("data-title"), document.body.appendChild(n), e3[t].hasAttribute("data-placement") && (n.position = e3[t].getAttribute("data-placement"));
              }
            };
            "complete" === document.readyState ? e2() : (window.removeEventListener("load", e2), window.addEventListener("load", e2));
          }();
        }
      )
      /******/
    };
    var __webpack_module_cache__ = {};
    function __webpack_require__(moduleId) {
      var cachedModule = __webpack_module_cache__[moduleId];
      if (cachedModule !== void 0) {
        return cachedModule.exports;
      }
      var module2 = __webpack_module_cache__[moduleId] = {
        /******/
        // no module.id needed
        /******/
        // no module.loaded needed
        /******/
        exports: {}
        /******/
      };
      __webpack_modules__[moduleId](module2, module2.exports, __webpack_require__);
      return module2.exports;
    }
    (() => {
      __webpack_require__.n = (module2) => {
        var getter = module2 && module2.__esModule ? (
          /******/
          () => module2["default"]
        ) : (
          /******/
          () => module2
        );
        __webpack_require__.d(getter, { a: getter });
        return getter;
      };
    })();
    (() => {
      __webpack_require__.d = (exports2, definition) => {
        for (var key in definition) {
          if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports2, key)) {
            Object.defineProperty(exports2, key, { enumerable: true, get: definition[key] });
          }
        }
      };
    })();
    (() => {
      __webpack_require__.o = (obj2, prop) => Object.prototype.hasOwnProperty.call(obj2, prop);
    })();
    (() => {
      __webpack_require__(6321);
      __webpack_require__(2612);
      __webpack_require__(9135);
      __webpack_require__(9097);
      __webpack_require__(8649);
      __webpack_require__(5707);
      __webpack_require__(7650);
      __webpack_require__(1139);
      __webpack_require__(6693);
      __webpack_require__(2754);
      __webpack_require__(8687);
      __webpack_require__(4232);
      __webpack_require__(3911);
      __webpack_require__(2629);
      __webpack_require__(1928);
      __webpack_require__(1115);
      __webpack_require__(7997);
      class smartTextBox extends Smart.Component {
        get name() {
          return "smartTextBox";
        }
      }
      class smartMaskedTextBox extends Smart.Component {
        get name() {
          return "smartMaskedTextBox";
        }
      }
      class smartPasswordTextBox extends Smart.Component {
        get name() {
          return "smartPasswordTextBox";
        }
      }
      class smartNumericTextBox extends Smart.Component {
        get name() {
          return "smartNumericTextBox";
        }
      }
      class smartMultilineTextBox extends Smart.Component {
        get name() {
          return "smartMultilineTextBox";
        }
      }
    })();
  })();
  return smart_textbox;
}
requireSmart_textbox();
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
function __awaiter(thisArg, _arguments, P2, generator) {
  function adopt(value) {
    return value instanceof P2 ? value : new P2(function(resolve) {
      resolve(value);
    });
  }
  return new (P2 || (P2 = Promise))(function(resolve, reject) {
    function fulfilled(value) {
      try {
        step(generator.next(value));
      } catch (e2) {
        reject(e2);
      }
    }
    function rejected(value) {
      try {
        step(generator["throw"](value));
      } catch (e2) {
        reject(e2);
      }
    }
    function step(result) {
      result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
    }
    step((generator = generator.apply(thisArg, [])).next());
  });
}
class ListItem extends React.Component {
  constructor(props) {
    super(props);
    this.componentRef = React.createRef();
  }
  // Gets the id of the React component.
  get id() {
    if (!this._id) {
      this._id = "ListItem" + Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
    }
    return this._id;
  }
  /**
  *	Property type: number
  */
  get alternationIndex() {
    return this.nativeElement ? this.nativeElement.alternationIndex : void 0;
  }
  set alternationIndex(value) {
    if (this.nativeElement) {
      this.nativeElement.alternationIndex = value;
    }
  }
  /**
  *	Property type: string
  */
  get color() {
    return this.nativeElement ? this.nativeElement.color : void 0;
  }
  set color(value) {
    if (this.nativeElement) {
      this.nativeElement.color = value;
    }
  }
  /**
  *	Property type: ListItemDisplayMode
  */
  get displayMode() {
    return this.nativeElement ? this.nativeElement.displayMode : void 0;
  }
  set displayMode(value) {
    if (this.nativeElement) {
      this.nativeElement.displayMode = value;
    }
  }
  /**
  *	Property type: boolean
  */
  get grouped() {
    return this.nativeElement ? this.nativeElement.grouped : void 0;
  }
  set grouped(value) {
    if (this.nativeElement) {
      this.nativeElement.grouped = value;
    }
  }
  /**
  *	Property type: boolean
  */
  get selected() {
    return this.nativeElement ? this.nativeElement.selected : void 0;
  }
  set selected(value) {
    if (this.nativeElement) {
      this.nativeElement.selected = value;
    }
  }
  /**
  *	Property type: string
  */
  get value() {
    return this.nativeElement ? this.nativeElement.value : void 0;
  }
  set value(value) {
    if (this.nativeElement) {
      this.nativeElement.value = value;
    }
  }
  /**
  *	Property type: string
  */
  get label() {
    return this.nativeElement ? this.nativeElement.label : void 0;
  }
  set label(value) {
    if (this.nativeElement) {
      this.nativeElement.label = value;
    }
  }
  /**
  *	Property type: string
  */
  get details() {
    return this.nativeElement ? this.nativeElement.details : void 0;
  }
  set details(value) {
    if (this.nativeElement) {
      this.nativeElement.details = value;
    }
  }
  /**
  *	Property type: string
  */
  get group() {
    return this.nativeElement ? this.nativeElement.group : void 0;
  }
  set group(value) {
    if (this.nativeElement) {
      this.nativeElement.group = value;
    }
  }
  /**
  *	Property type: boolean
  */
  get hidden() {
    return this.nativeElement ? this.nativeElement.hidden : void 0;
  }
  set hidden(value) {
    if (this.nativeElement) {
      this.nativeElement.hidden = value;
    }
  }
  /**
  *	Property type: boolean
  */
  get readonly() {
    return this.nativeElement ? this.nativeElement.readonly : void 0;
  }
  set readonly(value) {
    if (this.nativeElement) {
      this.nativeElement.readonly = value;
    }
  }
  // Gets the properties of the React component.
  get properties() {
    return ["alternationIndex", "color", "displayMode", "grouped", "selected", "value", "label", "details", "group", "hidden", "readonly"];
  }
  // Gets the events of the React component.
  get eventListeners() {
    return ["onCreate", "onReady"];
  }
  componentDidRender(initialize) {
    const that = this;
    const props = {};
    const events = {};
    let styles2 = null;
    for (let prop in that.props) {
      if (prop === "children") {
        continue;
      }
      if (prop === "style") {
        styles2 = that.props[prop];
        continue;
      }
      if (prop.startsWith("on") && that.properties.indexOf(prop) === -1) {
        events[prop] = that.props[prop];
        continue;
      }
      props[prop] = that.props[prop];
    }
    if (initialize) {
      that.nativeElement = this.componentRef.current;
    }
    for (let prop in props) {
      if (prop === "class") {
        const classNames = props[prop].trim().split(" ");
        for (let className in classNames) {
          if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
            that.nativeElement.classList.add(classNames[className]);
          }
        }
        continue;
      }
      if (props[prop] !== that.nativeElement[prop]) {
        const normalizeProp = (str) => {
          return str.replace(/-([a-z])/g, function(g2) {
            return g2[1].toUpperCase();
          });
        };
        if (prop === "hover" || prop === "active" || prop === "focus" || prop === "selected") {
          that.nativeElement.setAttribute(prop, "");
        }
        const normalizedProp = normalizeProp(prop);
        that.nativeElement[normalizedProp] = props[prop];
      }
    }
    for (let eventName in events) {
      that[eventName] = events[eventName];
      that.nativeElement[eventName.toLowerCase()] = events[eventName];
    }
    if (initialize) {
      if (that.onCreate) {
        that.onCreate();
      }
      that.nativeElement.whenRendered(() => {
        if (that.onReady) {
          that.onReady();
        }
      });
    }
    if (styles2) {
      for (let styleName in styles2) {
        that.nativeElement.style[styleName] = styles2[styleName];
      }
    }
  }
  componentDidMount() {
    this.componentDidRender(true);
  }
  componentDidUpdate() {
    this.componentDidRender(false);
  }
  componentWillUnmount() {
    const that = this;
    if (!that.nativeElement) {
      return;
    }
    that.nativeElement.whenRenderedCallbacks = [];
    for (let i = 0; i < that.eventListeners.length; i++) {
      const eventName = that.eventListeners[i];
      that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
    }
  }
  render() {
    return React.createElement("smart-list-item", { ref: this.componentRef }, this.props.children);
  }
}
class ListItemsGroup extends React.Component {
  constructor(props) {
    super(props);
    this.componentRef = React.createRef();
  }
  // Gets the id of the React component.
  get id() {
    if (!this._id) {
      this._id = "ListItemsGroup" + Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
    }
    return this._id;
  }
  /**
  *	Property type: string
  */
  get label() {
    return this.nativeElement ? this.nativeElement.label : void 0;
  }
  set label(value) {
    if (this.nativeElement) {
      this.nativeElement.label = value;
    }
  }
  // Gets the properties of the React component.
  get properties() {
    return ["label"];
  }
  // Gets the events of the React component.
  get eventListeners() {
    return ["onCreate", "onReady"];
  }
  componentDidRender(initialize) {
    const that = this;
    const props = {};
    const events = {};
    let styles2 = null;
    for (let prop in that.props) {
      if (prop === "children") {
        continue;
      }
      if (prop === "style") {
        styles2 = that.props[prop];
        continue;
      }
      if (prop.startsWith("on") && that.properties.indexOf(prop) === -1) {
        events[prop] = that.props[prop];
        continue;
      }
      props[prop] = that.props[prop];
    }
    if (initialize) {
      that.nativeElement = this.componentRef.current;
    }
    for (let prop in props) {
      if (prop === "class") {
        const classNames = props[prop].trim().split(" ");
        for (let className in classNames) {
          if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
            that.nativeElement.classList.add(classNames[className]);
          }
        }
        continue;
      }
      if (props[prop] !== that.nativeElement[prop]) {
        const normalizeProp = (str) => {
          return str.replace(/-([a-z])/g, function(g2) {
            return g2[1].toUpperCase();
          });
        };
        if (prop === "hover" || prop === "active" || prop === "focus" || prop === "selected") {
          that.nativeElement.setAttribute(prop, "");
        }
        const normalizedProp = normalizeProp(prop);
        that.nativeElement[normalizedProp] = props[prop];
      }
    }
    for (let eventName in events) {
      that[eventName] = events[eventName];
      that.nativeElement[eventName.toLowerCase()] = events[eventName];
    }
    if (initialize) {
      if (that.onCreate) {
        that.onCreate();
      }
      that.nativeElement.whenRendered(() => {
        if (that.onReady) {
          that.onReady();
        }
      });
    }
    if (styles2) {
      for (let styleName in styles2) {
        that.nativeElement.style[styleName] = styles2[styleName];
      }
    }
  }
  componentDidMount() {
    this.componentDidRender(true);
  }
  componentDidUpdate() {
    this.componentDidRender(false);
  }
  componentWillUnmount() {
    const that = this;
    if (!that.nativeElement) {
      return;
    }
    that.nativeElement.whenRenderedCallbacks = [];
    for (let i = 0; i < that.eventListeners.length; i++) {
      const eventName = that.eventListeners[i];
      that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
    }
  }
  render() {
    return React.createElement("smart-list-items-group", { ref: this.componentRef }, this.props.children);
  }
}
class MultilineTextBox extends React.Component {
  constructor(props) {
    super(props);
    this.componentRef = React.createRef();
  }
  // Gets the id of the React component.
  get id() {
    if (!this._id) {
      this._id = "MultilineTextBox" + Math.floor((1 + Math.random()) * 65536).toString(16).substring(1);
    }
    return this._id;
  }
  /** Sets or gets the animation mode. Animation is disabled when the property is set to 'none'
  *	Property type: Animation
  */
  get animation() {
    return this.nativeElement ? this.nativeElement.animation : void 0;
  }
  set animation(value) {
    if (this.nativeElement) {
      this.nativeElement.animation = value;
    }
  }
  /** Determines whether and how the value should be automatically capitalized as it is entered/edited by the user.
  *	Property type: MultilineTextBoxAutoCapitalize
  */
  get autoCapitalize() {
    return this.nativeElement ? this.nativeElement.autoCapitalize : void 0;
  }
  set autoCapitalize(value) {
    if (this.nativeElement) {
      this.nativeElement.autoCapitalize = value;
    }
  }
  /** Determines whether the value of the control can be automatically completed by the browser.
  *	Property type: MultiLineTextBoxAutoComplete
  */
  get autoComplete() {
    return this.nativeElement ? this.nativeElement.autoComplete : void 0;
  }
  set autoComplete(value) {
    if (this.nativeElement) {
      this.nativeElement.autoComplete = value;
    }
  }
  /** Determines whether element will auto expand when the input overflows vertically.
  *	Property type: boolean
  */
  get autoExpand() {
    return this.nativeElement ? this.nativeElement.autoExpand : void 0;
  }
  set autoExpand(value) {
    if (this.nativeElement) {
      this.nativeElement.autoExpand = value;
    }
  }
  /** Determines whether the input should be focused when the page is loaded.
  *	Property type: boolean
  */
  get autoFocus() {
    return this.nativeElement ? this.nativeElement.autoFocus : void 0;
  }
  set autoFocus(value) {
    if (this.nativeElement) {
      this.nativeElement.autoFocus = value;
    }
  }
  /** The cols attribute specifies the visible width of a input. If it is specified, it must be a positive integer. If it is not specified, the default value is 20.
  *	Property type: number
  */
  get cols() {
    return this.nativeElement ? this.nativeElement.cols : void 0;
  }
  set cols(value) {
    if (this.nativeElement) {
      this.nativeElement.cols = value;
    }
  }
  /** Enables or disables the element.
  *	Property type: boolean
  */
  get disabled() {
    return this.nativeElement ? this.nativeElement.disabled : void 0;
  }
  set disabled(value) {
    if (this.nativeElement) {
      this.nativeElement.disabled = value;
    }
  }
  /** Specifies how the characters are displayed inside the input.
  *	Property type: TextBoxDisplayMode
  */
  get displayMode() {
    return this.nativeElement ? this.nativeElement.displayMode : void 0;
  }
  set displayMode(value) {
    if (this.nativeElement) {
      this.nativeElement.displayMode = value;
    }
  }
  /** Determines the behavior on "Enter" key.
  *	Property type: MultilineTextBoxEnterKeyBehavior
  */
  get enterKeyBehavior() {
    return this.nativeElement ? this.nativeElement.enterKeyBehavior : void 0;
  }
  set enterKeyBehavior(value) {
    if (this.nativeElement) {
      this.nativeElement.enterKeyBehavior = value;
    }
  }
  /** The form element that the element is associated with (its "form owner"). The value of the attribute must be the ID of a form element in the same document.
  *	Property type: string
  */
  get form() {
    return this.nativeElement ? this.nativeElement.form : void 0;
  }
  set form(value) {
    if (this.nativeElement) {
      this.nativeElement.form = value;
    }
  }
  /** Sets additional helper text below the element. Appears only when the element is focused.
  *	Property type: any
  */
  get hint() {
    return this.nativeElement ? this.nativeElement.hint : void 0;
  }
  set hint(value) {
    if (this.nativeElement) {
      this.nativeElement.hint = value;
    }
  }
  /** Controls horizontal scrollbar's visibility.
  *	Property type: HorizontalScrollBarVisibility
  */
  get horizontalScrollBarVisibility() {
    return this.nativeElement ? this.nativeElement.horizontalScrollBarVisibility : void 0;
  }
  set horizontalScrollBarVisibility(value) {
    if (this.nativeElement) {
      this.nativeElement.horizontalScrollBarVisibility = value;
    }
  }
  /** Sets the purpose of the input and what, if any, permission the user agent has to provide automated assistance in filling out the element's input when in a form, as well as guidance to the browser as to the type of information expected in the element. This value corresponds to the standard HTML autocomplete attribute and can be set to values such as 'on', 'name', 'organization', 'street-address', etc.
  *	Property type: string
  */
  get inputPurpose() {
    return this.nativeElement ? this.nativeElement.inputPurpose : void 0;
  }
  set inputPurpose(value) {
    if (this.nativeElement) {
      this.nativeElement.inputPurpose = value;
    }
  }
  /** Sets label above the element. The label is displayed above the input and it's always visible.
  *	Property type: string
  */
  get label() {
    return this.nativeElement ? this.nativeElement.label : void 0;
  }
  set label(value) {
    if (this.nativeElement) {
      this.nativeElement.label = value;
    }
  }
  /** Sets or gets the language. Used in conjunction with the property messages.
  *	Property type: string
  */
  get locale() {
    return this.nativeElement ? this.nativeElement.locale : void 0;
  }
  set locale(value) {
    if (this.nativeElement) {
      this.nativeElement.locale = value;
    }
  }
  /** Callback used to customize the format of the messages that are returned from the Localization Module.
  *	Property type: any
  */
  get localizeFormatFunction() {
    return this.nativeElement ? this.nativeElement.localizeFormatFunction : void 0;
  }
  set localizeFormatFunction(value) {
    if (this.nativeElement) {
      this.nativeElement.localizeFormatFunction = value;
    }
  }
  /** Sets or gets the maximum number of characters that the user can enter.
  *	Property type: number
  */
  get maxLength() {
    return this.nativeElement ? this.nativeElement.maxLength : void 0;
  }
  set maxLength(value) {
    if (this.nativeElement) {
      this.nativeElement.maxLength = value;
    }
  }
  /** Sets or gets the minimum number of characters that the user can enter.
  *	Property type: number
  */
  get minLength() {
    return this.nativeElement ? this.nativeElement.minLength : void 0;
  }
  set minLength(value) {
    if (this.nativeElement) {
      this.nativeElement.minLength = value;
    }
  }
  /** Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale.
  *	Property type: any
  */
  get messages() {
    return this.nativeElement ? this.nativeElement.messages : void 0;
  }
  set messages(value) {
    if (this.nativeElement) {
      this.nativeElement.messages = value;
    }
  }
  /** Sets or gets the name attribute for the element. Name is used when submiting HTML forms.
  *	Property type: string
  */
  get name() {
    return this.nativeElement ? this.nativeElement.name : void 0;
  }
  set name(value) {
    if (this.nativeElement) {
      this.nativeElement.name = value;
    }
  }
  /** The placeholder text that is displayed when no value is applied to the element.
  *	Property type: string
  */
  get placeholder() {
    return this.nativeElement ? this.nativeElement.placeholder : void 0;
  }
  set placeholder(value) {
    if (this.nativeElement) {
      this.nativeElement.placeholder = value;
    }
  }
  /** If enabled the users cannot iteract with the element.
  *	Property type: boolean
  */
  get readonly() {
    return this.nativeElement ? this.nativeElement.readonly : void 0;
  }
  set readonly(value) {
    if (this.nativeElement) {
      this.nativeElement.readonly = value;
    }
  }
  /** Specifies that the user must fill in a value before submitting a form that contains the element.
  *	Property type: boolean
  */
  get required() {
    return this.nativeElement ? this.nativeElement.required : void 0;
  }
  set required(value) {
    if (this.nativeElement) {
      this.nativeElement.required = value;
    }
  }
  /** Enables/ disables the resizing of the element. If enabled a resizing indicator appears in the bottom corner of the input area.
  *	Property type: boolean
  */
  get resizable() {
    return this.nativeElement ? this.nativeElement.resizable : void 0;
  }
  set resizable(value) {
    if (this.nativeElement) {
      this.nativeElement.resizable = value;
    }
  }
  /** Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts.
  *	Property type: boolean
  */
  get rightToLeft() {
    return this.nativeElement ? this.nativeElement.rightToLeft : void 0;
  }
  set rightToLeft(value) {
    if (this.nativeElement) {
      this.nativeElement.rightToLeft = value;
    }
  }
  /** The number of visible text lines for the control.
  *	Property type: number
  */
  get rows() {
    return this.nativeElement ? this.nativeElement.rows : void 0;
  }
  set rows(value) {
    if (this.nativeElement) {
      this.nativeElement.rows = value;
    }
  }
  /** Specifies whether the content of the input will be selected on focus.
  *	Property type: boolean
  */
  get selectAllOnFocus() {
    return this.nativeElement ? this.nativeElement.selectAllOnFocus : void 0;
  }
  set selectAllOnFocus(value) {
    if (this.nativeElement) {
      this.nativeElement.selectAllOnFocus = value;
    }
  }
  /** Indicates the index of the last character in the current selection.
  *	Property type: number
  */
  get selectionEnd() {
    return this.nativeElement ? this.nativeElement.selectionEnd : void 0;
  }
  set selectionEnd(value) {
    if (this.nativeElement) {
      this.nativeElement.selectionEnd = value;
    }
  }
  /** Indicates the index to the first character in the current selection.
  *	Property type: number
  */
  get selectionStart() {
    return this.nativeElement ? this.nativeElement.selectionStart : void 0;
  }
  set selectionStart(value) {
    if (this.nativeElement) {
      this.nativeElement.selectionStart = value;
    }
  }
  /** Specifies whether the element is to have its spelling and grammar checked or not.
  *	Property type: boolean
  */
  get spellCheck() {
    return this.nativeElement ? this.nativeElement.spellCheck : void 0;
  }
  set spellCheck(value) {
    if (this.nativeElement) {
      this.nativeElement.spellCheck = value;
    }
  }
  /** Determines the theme. Theme defines the look of the element
  *	Property type: string
  */
  get theme() {
    return this.nativeElement ? this.nativeElement.theme : void 0;
  }
  set theme(value) {
    if (this.nativeElement) {
      this.nativeElement.theme = value;
    }
  }
  /** If is set to true, the element cannot be focused.
  *	Property type: boolean
  */
  get unfocusable() {
    return this.nativeElement ? this.nativeElement.unfocusable : void 0;
  }
  set unfocusable(value) {
    if (this.nativeElement) {
      this.nativeElement.unfocusable = value;
    }
  }
  /** Sets or gets the value of the element.
  *	Property type: string
  */
  get value() {
    return this.nativeElement ? this.nativeElement.value : void 0;
  }
  set value(value) {
    if (this.nativeElement) {
      this.nativeElement.value = value;
    }
  }
  /** Controls vertical scrollbar's visibility.
  *	Property type: VerticalScrollBarVisibility
  */
  get verticalScrollBarVisibility() {
    return this.nativeElement ? this.nativeElement.verticalScrollBarVisibility : void 0;
  }
  set verticalScrollBarVisibility(value) {
    if (this.nativeElement) {
      this.nativeElement.verticalScrollBarVisibility = value;
    }
  }
  /** Indicates how the control wraps text.
  *	Property type: MultilineTextBoxWrap
  */
  get wrap() {
    return this.nativeElement ? this.nativeElement.wrap : void 0;
  }
  set wrap(value) {
    if (this.nativeElement) {
      this.nativeElement.wrap = value;
    }
  }
  // Gets the properties of the React component.
  get properties() {
    return ["animation", "autoCapitalize", "autoComplete", "autoExpand", "autoFocus", "cols", "disabled", "displayMode", "enterKeyBehavior", "form", "hint", "horizontalScrollBarVisibility", "inputPurpose", "label", "locale", "localizeFormatFunction", "maxLength", "minLength", "messages", "name", "placeholder", "readonly", "required", "resizable", "rightToLeft", "rows", "selectAllOnFocus", "selectionEnd", "selectionStart", "spellCheck", "theme", "unfocusable", "value", "verticalScrollBarVisibility", "wrap"];
  }
  // Gets the events of the React component.
  get eventListeners() {
    return ["onChange", "onCreate", "onReady"];
  }
  /** Focuses the element.
  */
  focus() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.focus();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.focus();
      });
    }
  }
  /** The method is used to reset the value of the element box to it's initial state.
  */
  reset() {
    if (this.nativeElement.isRendered) {
      this.nativeElement.reset();
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.reset();
      });
    }
  }
  /** Returns the currenctly selected text.
    * @param {string} displayMode. If <b>displayMode</b> is set to 'escaped', the value returned from the method contains escaped special characters.
    * @returns {string}
  */
  selection(displayMode) {
    return __awaiter(this, void 0, void 0, function* () {
      const getResultOnRender = () => {
        return new Promise((resolve) => {
          this.nativeElement.whenRendered(() => {
            const result2 = this.nativeElement.selection(displayMode);
            resolve(result2);
          });
        });
      };
      const result = yield getResultOnRender();
      return result;
    });
  }
  /** Selects a certain part of the input text. If no arguments are specified the whole text will be selected.
  * @param {any} rangeFrom?. Determines the start index of the text selection.
  * @param {any} rangeTo?. Determines the end index of the text selection.
  */
  select(rangeFrom, rangeTo) {
    if (this.nativeElement.isRendered) {
      this.nativeElement.select(rangeFrom, rangeTo);
    } else {
      this.nativeElement.whenRendered(() => {
        this.nativeElement.select(rangeFrom, rangeTo);
      });
    }
  }
  componentDidRender(initialize) {
    const that = this;
    const props = {};
    const events = {};
    let styles2 = null;
    for (let prop in that.props) {
      if (prop === "children") {
        continue;
      }
      if (prop === "style") {
        styles2 = that.props[prop];
        continue;
      }
      if (prop.startsWith("on") && that.properties.indexOf(prop) === -1) {
        events[prop] = that.props[prop];
        continue;
      }
      props[prop] = that.props[prop];
    }
    if (initialize) {
      that.nativeElement = this.componentRef.current;
    }
    for (let prop in props) {
      if (prop === "class") {
        const classNames = props[prop].trim().split(" ");
        for (let className in classNames) {
          if (!that.nativeElement.classList.contains(classNames[className]) && classNames[className] !== "") {
            that.nativeElement.classList.add(classNames[className]);
          }
        }
        continue;
      }
      if (props[prop] !== that.nativeElement[prop]) {
        const normalizeProp = (str) => {
          return str.replace(/-([a-z])/g, function(g2) {
            return g2[1].toUpperCase();
          });
        };
        if (prop === "hover" || prop === "active" || prop === "focus" || prop === "selected") {
          that.nativeElement.setAttribute(prop, "");
        }
        const normalizedProp = normalizeProp(prop);
        that.nativeElement[normalizedProp] = props[prop];
      }
    }
    for (let eventName in events) {
      that[eventName] = events[eventName];
      that.nativeElement[eventName.toLowerCase()] = events[eventName];
    }
    if (initialize) {
      if (that.onCreate) {
        that.onCreate();
      }
      that.nativeElement.whenRendered(() => {
        if (that.onReady) {
          that.onReady();
        }
      });
    }
    if (styles2) {
      for (let styleName in styles2) {
        that.nativeElement.style[styleName] = styles2[styleName];
      }
    }
  }
  componentDidMount() {
    this.componentDidRender(true);
  }
  componentDidUpdate() {
    this.componentDidRender(false);
  }
  componentWillUnmount() {
    const that = this;
    if (!that.nativeElement) {
      return;
    }
    that.nativeElement.whenRenderedCallbacks = [];
    for (let i = 0; i < that.eventListeners.length; i++) {
      const eventName = that.eventListeners[i];
      that.nativeElement.removeEventListener(eventName.substring(2).toLowerCase(), that[eventName]);
    }
  }
  render() {
    return React.createElement("smart-multiline-text-box", { ref: this.componentRef }, this.props.children);
  }
}
function WinForText(props) {
  function ClickWin(e2) {
    let bg, el = e2.target;
    bg = el;
    if (el.classList.contains("smart-close-button")) {
      if (props.onSave) props.onSave("", props.RequestID, false, props.func);
      while (bg.className !== "background_ModalDialog") {
        bg = bg.parentElement;
      }
      if (bg) bg.remove();
    }
  }
  function onSave(ev) {
    let memo2 = document.getElementById("BoxForText");
    if (memo2) {
      if (props.onSave) props.onSave(memo2.getAttribute("value"), props.RequestID, true, props.func);
    }
    let bg = ev.target;
    while (bg.className !== "background_ModalDialog") {
      bg = bg.parentElement;
    }
    if (bg) bg.remove();
  }
  function OpenText(ev) {
    let input = document.createElement("input");
    let memo2 = document.getElementById("BoxForText");
    let output;
    input.type = "file";
    input.accept = ".txt, .json";
    if (window.FileList && window.File) {
      input.addEventListener("change", function(e2) {
        output = "";
        let file = e2.target.files[0];
        let reader = new FileReader();
        reader.readAsText(file);
        reader.onload = (event) => {
          output = reader.result;
          if (output) memo2.value = output;
          input.remove();
        };
      });
    }
    input.click();
  }
  function SaveText(ev) {
    let memo2 = document.getElementById("BoxForText");
    var text = memo2.getAttribute("value");
    const b2 = new Blob([text], { type: "text/plain" });
    const url = window.URL.createObjectURL(b2);
    let a2 = document.createElement("a");
    a2.setAttribute("href", url);
    a2.setAttribute("download", props.Title + ".txt");
    a2.type = "text/plain";
    a2.addEventListener("click", () => {
      setTimeout(() => window.URL.revokeObjectURL(url), 1e4);
    });
    a2.click();
    a2.remove();
  }
  let Win = /* @__PURE__ */ jsxRuntimeExports.jsx(
    Window,
    {
      dropPosition: "center",
      headerButtons: ["close", "maximize"],
      unfocusable: true,
      modal: true,
      style: { minWidth: "400px", ...props.style },
      opened: true,
      active: true,
      label: props.Title ? props.Title : "",
      onClick: ClickWin,
      children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { id: "txt", style: { width: "100%", height: "100%" }, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(Box$1, { id: "btns", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              style: { textTransform: "none" },
              onClick: onSave,
              className: "SaveBtn",
              children: [
                /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  "svg",
                  {
                    xmlns: "http://www.w3.org/2000/svg",
                    width: "20",
                    height: "20",
                    viewBox: "0 0 512 512",
                    style: { top: "-2px", position: "relative" },
                    children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        "path",
                        {
                          fill: "#3AB37C",
                          d: "M424.3,180c-1-1.2-1.5-2.8-1.5-4.3c-14.8-26.1-15.7-58-30.5-84.1c-41.7,23.4-70.2,65.1-97.4,103.1c-16.4,22.9-31.1,46.4-44.6,71.1c-13.6,24.8-26.8,49.9-42,73.8c-2.2,3.4-7.9,5-10.3,0.7c-7.2-13.3-15.3-26.2-24.6-38.2c-8-10.3-17.1-19.5-25.3-29.6c-12.7-15.7-26.3-34.5-43.9-45.4c-6.4,21-13.9,41.8-17.2,63.6c24.6,15.9,43.4,38.9,61.5,61.6c21.2,26.6,43.1,52,66.9,76.3c15.4-20.1,26-43.5,38.8-65.3c15.1-25.7,32.7-49.4,51.4-72.6c18.7-23.2,40.3-43.7,62-63.9c10.2-9.5,22.2-17.3,33.1-26c8.2-6.6,16.2-13.4,23.7-20.7C424.4,180.2,424.4,180.1,424.3,180z"
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M436.2,170.3h-2.8c-16.3-27.7-16.2-62.6-34-89.9c-1.9-3-5.4-3.1-8.3-1.6c-45.6,23.1-76.2,67.7-105.2,108.1c-16.6,23.2-31.6,47-45.4,72c-12.3,22.3-24.1,44.8-37.4,66.6c-6-10.4-12.6-20.4-19.9-29.9c-8.2-10.8-17.8-20.3-26.3-30.8c-15.2-18.7-31.4-40.9-53.7-51.5c-3.7-1.8-7.4,0.5-8.5,4.2c-6.8,23.7-15.8,47-19.5,71.4c0,0.1,0,0.2,0,0.4c-2,2.7-2.2,7.1,1.6,9.4c26.5,15.6,46,40.8,64.9,64.6c22,27.7,45.2,54.1,70.2,79.1c2.3,2.3,6.4,1.8,8.4-0.5c17.2-20.6,28.7-45,41.8-68.2c14.7-25.9,32-50.3,51.1-73.2c19.2-22.9,40-43.7,61.9-64c10.4-9.7,22.6-17.7,33.8-26.6c9-7.2,17.7-14.7,25.9-22.8c2.3-0.5,4.2-2.1,4.6-4.7c0.6-0.6,1.2-1.3,1.8-1.9C445,176.1,441.2,170.3,436.2,170.3z M400.7,201c-10.9,8.7-22.8,16.5-33.1,26c-21.8,20.2-43.4,40.7-62,63.9c-18.7,23.2-36.3,46.8-51.4,72.6c-12.8,21.8-23.4,45.2-38.8,65.3c-23.8-24.2-45.8-49.7-66.9-76.3c-18.1-22.7-37-45.8-61.5-61.6c3.3-21.8,10.8-42.6,17.2-63.6c17.7,10.9,31.2,29.7,43.9,45.4c8.2,10.1,17.3,19.3,25.3,29.6c9.3,12,17.4,24.9,24.6,38.2c2.4,4.4,8.1,2.7,10.3-0.7c15.3-23.9,28.4-49,42-73.8c13.5-24.7,28.2-48.2,44.6-71.1c27.2-38,55.8-79.8,97.4-103.1c14.8,26.1,15.7,58,30.5,84.1c0,1.5,0.5,3.1,1.5,4.3c0,0.1,0.1,0.2,0.1,0.2C416.9,187.6,408.9,194.4,400.7,201z" })
                    ]
                  }
                ),
                "Сохранить"
              ]
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Открыть текст из файла", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { style: { minWidth: "20px" }, onClick: OpenText, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", width: "20", height: "20", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "path",
              {
                fill: "#FFA000",
                d: "M38,12H22l-4-4H8c-2.2,0-4,1.8-4,4v24c0,2.2,1.8,4,4,4h31c1.7,0,3-1.3,3-3V16C42,13.8,40.2,12,38,12z"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "path",
              {
                fill: "#FFCA28",
                d: "M42.2,18H15.3c-1.9,0-3.6,1.4-3.9,3.3L8,40h31.7c1.9,0,3.6-1.4,3.9-3.3l2.5-14C46.6,20.3,44.7,18,42.2,18z"
              }
            )
          ] }) }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Сохранить текст в файл", children: /* @__PURE__ */ jsxRuntimeExports.jsx(Button$2, { style: { minWidth: "20px" }, onClick: SaveText, children: /* @__PURE__ */ jsxRuntimeExports.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48", width: "20", height: "20", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "#3498db", d: "M42 42L6 42 6 6 37 6 42 11z" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "path",
              {
                fill: "#fff",
                d: "M39,39c0,0.553-0.447,1-1,1H10c-0.553,0-1-0.447-1-1V25c0-0.553,0.447-1,1-1h28c0.553,0,1,0.447,1,1 V39z"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "#cfd8dc", d: "M13 31H35V33H13zM13 27H35V29H13zM13 35H35V37H13z" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "#2980b9", d: "M9,6v10c0,1.104,0.896,2,2,2h15c1.104,0,2-0.896,2-2V6H9z" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "#b0bec5", d: "M15,6v10c0,1.104,0.896,2,2,2h15c1.104,0,2-0.896,2-2V6H15z" }),
            /* @__PURE__ */ jsxRuntimeExports.jsx("path", { fill: "#263238", d: "M26 8H30V16H26z" })
          ] }) }) })
        ] }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", height: "calc(100% - 33px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          MultilineTextBox,
          {
            id: "BoxForText",
            value: props.Text ? props.Text : "",
            style: { width: "100%", height: "100%" }
          }
        ) })
      ] })
    }
  );
  return Win;
}
function DialogKldr(props) {
  const [mainGrid, setMainGrid] = reactExports.useState();
  const [timer2, setTimer] = reactExports.useState();
  const gridpanelRef = reactExports.useRef(null);
  const propsData = reactExports.useMemo(() => {
    return { ...props.data };
  }, []);
  function filtration(filter2) {
    return smetaAxios.get("setFilter", {
      prefix: Prefixes.kladr,
      params: { Filter: filter2, ObjType: props.ObjType },
      loadMask: true
    });
  }
  reactExports.useLayoutEffect(() => {
    GridLoader(gridpanelRef.current, props).then((res) => {
      setMainGrid(res);
    });
  }, []);
  function resumeRequest2(request) {
    return smetaAxios.post("ResumeRequest", request, {
      prefix: Prefixes.default,
      params: { RequestID: props.RequestID, WSM: "1" },
      loadMask: true
    });
  }
  function getRequestJson() {
    const source = gridpanelRef.current.grid.source;
    const code = source.getFieldTextSync("Code");
    const name = source.getFieldTextSync("Name");
    const short = source.getFieldTextSync("Socr");
    const guid = source.getFieldTextSync("GUID");
    if (propsData.FieldName === "BulkNo" || propsData.FieldName === "BuildNo") {
      propsData.FieldName = "House";
    }
    return {
      Result: "1",
      Code: code,
      Classificator: { Классификатор: code },
      [propsData.FieldName]: {
        [localization()[propsData.FieldName]]: name,
        Сокращение: short,
        Код: code[0] + "" + code[1]
      },
      GUID: { Идентификатор: guid }
    };
  }
  async function onSelect() {
    var _a2, _b;
    const json = await resumeRequest2(getRequestJson());
    if (json.NeedRefresh === "1") {
      (_a2 = props.func) == null ? void 0 : _a2.call(props, json);
    } else {
      (_b = propsData.onEdit) == null ? void 0 : _b.call(propsData, {
        kladr: true,
        json,
        objref: propsData.ObjRef
      });
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "row",
      justifyContent: "flex-end",
      alignItems: "flex-end",
      style: { height: "100%", width: "100%" },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            id: "rcgrid_panel",
            ref: gridpanelRef,
            item: true,
            style: {
              position: "relative",
              height: "calc(100% - 40px)",
              width: "100%"
            }
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { height: "40px", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { margin: "8px", width: "calc(100% - 182px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { width: "62px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: "Поиск:" }) }),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              "input",
              {
                style: {
                  width: "calc(100% - 62px)",
                  outline: "0"
                },
                onChange: (ev) => {
                  clearTimeout(timer2);
                  setTimer(
                    setTimeout(async () => {
                      await filtration(ev.target.value === void 0 ? "" : ev.target.value);
                      if (mainGrid) {
                        await mainGrid.grid.refreshSource();
                      }
                    }, 200)
                  );
                },
                title: "Filter"
              }
            )
          ] }) }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "164px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                size: "small",
                variant: "outlined",
                style: { textTransform: "none", marginRight: "10px" },
                value: "1",
                className: "button_Modal_Select",
                onClick: onSelect,
                children: "Выбрать"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                size: "small",
                variant: "outlined",
                style: { textTransform: "none" },
                value: "2",
                className: "button_Modal_Close",
                children: "Отмена"
              }
            )
          ] }) })
        ] }) })
      ]
    }
  ) });
}
function SignDialog(props) {
  const [button, setDisableButton] = reactExports.useState(false);
  const [errorTexts, setErrorTexts] = reactExports.useState([]);
  const [newSignId, setNewSignId] = reactExports.useState("");
  const [validText, setValidText] = reactExports.useState("Проверка подписи прошла успешно.");
  const SignGridRef = reactExports.useRef(null);
  const InfoSignGridRef = reactExports.useRef(null);
  const ErrorsGridRef = reactExports.useRef(null);
  const objSignsRef = reactExports.useRef([]);
  const InfoAboutSignRef = reactExports.useRef(null);
  const ErrorDataSignRef = reactExports.useRef(null);
  const isSuperUser = useAtomValue(isSuperUserAtom);
  reactExports.useEffect(() => {
    setDisableButton(props.LockStatus === "1");
    UpdateAllSigns();
  }, []);
  function UpdateAllSigns() {
    GetObjectSigns().then(async (res) => {
      objSignsRef.current = res;
      if (SignGridRef.current.grid) await SignGridRef.current.grid.refreshSource("!");
      if (res.length > 0) {
        const index2 = SignGridRef.current.grid ? Number(SignGridRef.current.grid.source.getFieldTextSync("Index")) : 0;
        ServerValidateStream(res[index2].ID).then((resp) => {
          tokenProcessingTest(resp, {
            func: showDetailAboutSign,
            from: "grid"
          });
        });
        if (res[index2].valid === false) {
          setValidText("Оригинал документа не соответствует подписанному.");
        }
      } else {
        showDetailAboutSign([]);
      }
      if (!SignGridRef.current.grid) {
        const gridLoad = await GridLoader(
          SignGridRef.current,
          {},
          {
            defaultFields: getDefaultFieldsSigns2(),
            keyField: "ID",
            getRecords: () => getRecords(objSignsRef.current),
            recordKeys: ["ID", "Index", "SignTime", "User", "Opisanie"],
            titleKey: "",
            localGrid: true,
            Columns: setCollumsForGridSigns2(),
            indicator: false,
            canModify: () => {
              return false;
            }
          }
        );
        gridLoad.source.onRecordIndexChanged = function(source) {
          let ID2 = source.getFieldTextSync("ID"), index2 = Number(source.getFieldTextSync("Index"));
          ServerValidateStream(ID2).then((resp) => {
            tokenProcessingTest(resp, {
              func: showDetailAboutSign,
              from: "grid"
            });
          });
          if (objSignsRef.current[index2].valid === false) {
            setValidText("Оригинал документа не соответствует подписанному.");
          } else {
            setValidText("Проверка подписи прошла успешно.");
          }
        };
      }
    });
  }
  reactExports.useEffect(() => {
    if (errorTexts.length > 0) {
      updateErrorGrid();
    } else {
      ErrorDataSignRef.current = [];
      if (ErrorsGridRef.current.grid) ErrorsGridRef.current.grid.refreshSource("!");
    }
  }, [errorTexts]);
  function updateErrorGrid() {
    let recs = [];
    errorTexts.forEach((val) => {
      const name = val.split(":");
      const vals = name[1].split("•");
      if (vals[0] !== "@" && vals[1] !== "@")
        recs.push({
          Name: name[0],
          Value: vals[0],
          NewValue: vals[1]
        });
    });
    ErrorDataSignRef.current = recs;
    if (!ErrorsGridRef.current.grid)
      GridLoader(
        ErrorsGridRef.current,
        {},
        {
          defaultFields: getDefaultFieldsError(),
          keyField: "ID",
          getRecords: () => ErrorDataSignRef.current,
          recordKeys: ["Name", "Value", "NewValue"],
          titleKey: "",
          localGrid: true,
          // Columns: setCollumsForGridSigns(),
          indicator: false,
          canModify: () => {
            return false;
          }
        }
      );
    else ErrorsGridRef.current.grid.refreshSource("!");
  }
  function getRecords(data) {
    let arrRecords = [];
    data.forEach((value, index2) => {
      arrRecords.push({
        ID: value.ID,
        Index: `${index2}`,
        SignTime: value.Time,
        User: value.User,
        Opisanie: value.Text
      });
    });
    return arrRecords;
  }
  function showDetailAboutSign(data) {
    InfoAboutSignRef.current = data;
    if (!InfoSignGridRef.current.grid)
      GridLoader(
        InfoSignGridRef.current,
        {},
        {
          defaultFields: getDefaultFieldsSign(),
          keyField: "Field",
          getRecords: () => createStream(InfoAboutSignRef.current),
          recordKeys: ["Field", "Value"],
          titleKey: "",
          localGrid: true,
          indicator: false,
          canModify: () => {
            return false;
          }
        }
      );
    else InfoSignGridRef.current.grid.refreshSource("!");
  }
  function createStream(info) {
    let arrRecords = [], splitedVal, arrOfErros = [];
    if (info.Info && info.Info.items) {
      info.Info.items.forEach((value) => {
        splitedVal = value.Result.split("=");
        if (splitedVal.length === 2)
          arrRecords.push({
            Field: splitedVal[0],
            Value: splitedVal[1]
          });
        else arrOfErros.push(value.Result);
      });
    }
    setErrorTexts(arrOfErros);
    return arrRecords;
  }
  function setCollumsForGridSigns2() {
    const Columns = {
      title: [
        { title: "Время подписи", width: 133, fieldName: "SignTime" },
        { title: "Пользователь", width: 174, fieldName: "User" },
        { title: "Описание", width: 233, fieldName: "Opisanie" }
      ]
    };
    return Columns;
  }
  function getDefaultFieldsSigns2() {
    return [
      {
        Name: "ID",
        Title: "ID",
        Width: "7"
      },
      {
        Name: "Index",
        Title: "Индекс",
        Width: "7"
      },
      {
        Name: "SignTime",
        Title: "Время подписи",
        Width: "10"
      },
      {
        Name: "User",
        Title: "Пользователь",
        Width: "10"
      },
      {
        Name: "Opisanie",
        Title: "Описание",
        Width: "10"
      }
    ];
  }
  function getDefaultFieldsSign() {
    return [
      {
        Name: "Field",
        Title: "Поле",
        Width: "14.6"
      },
      {
        Name: "Value",
        Title: "Значение",
        Width: "14.7"
      }
    ];
  }
  function getDefaultFieldsError() {
    return [
      {
        Name: "Name",
        Title: "Поле",
        Width: "18.75"
      },
      {
        Name: "Value",
        Title: "Значение",
        Width: "17"
      },
      {
        Name: "NewValue",
        Title: "Значение",
        Width: "13.2"
      }
    ];
  }
  function ServerSignStream(serial) {
    if (props.Serial || serial) {
      let params2 = /* @__PURE__ */ new Map();
      params2.set("prefix", "audit").set("comand", "ServerSignStream").set("ObjType", props.ObjType).set("Token", props.Token).set("Options", props.Options).set("Notes", props.Notes).set("ID", props.ID).set("Serial", props.Serial ? props.Serial : serial).set("WSM", "1");
      props.RCDATA ? props.RCDATA : props.content;
      AxiosRequest(true, params2, { $content: props.content }).then((res) => {
        tokenProcessingTest(res, { func: AfterServerSignStream });
      });
    } else {
      selectCert();
    }
  }
  function selectCert() {
    executeCertList().then((result) => {
      smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(ChooseCert, { data: result.split(/\r?\n/), onSelect: ServerSignStream }), {
        Title: "Выбор сертификата",
        style: {
          height: `${530}px`,
          width: `${580}px`,
          overflow: "hidden"
        },
        hiddenButton: true,
        blockMaximize: true,
        blockResize: true
      });
    }).catch(() => {
      if (CheckWorkSpace()) return;
    });
  }
  function DeleteSign() {
    const ID2 = SignGridRef.current.grid.source.getFieldTextSync("ID");
    if (!ID2) {
      return;
    }
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "audit").set("comand", "DeleteSign").set("ID", ID2).set("WSM", "1");
    AxiosRequest(true, params2).then((res) => {
      if (res.Token === "GetSignDialogOptions") {
        params2.set("prefix", "project").set("comand", "ResumeRequest").set("ID", res.Params.RequestID).set("WSM", "1");
        AxiosRequest(true, params2, {
          ID: props.ID,
          ObjType: props.ObjType,
          Token: props.Token,
          Serial: props.Serial,
          Item: ID2,
          State: "1"
        }).then((resp) => {
          tokenProcessingTest(resp, { func: UpdateAllSigns, from: "grid" });
        });
      } else {
        alert("GetSignDialogOptions не первый");
        tokenProcessingTest(res, { func: UpdateAllSigns, from: "grid" });
      }
    });
  }
  function AfterServerSignStream(resp) {
    setNewSignId(resp.Result);
    GetObjectSigns().then((res) => {
      objSignsRef.current = res;
      if (SignGridRef.current.grid) SignGridRef.current.grid.refreshSource("!");
      ServerValidateStream(resp.Result).then((res2) => {
        tokenProcessingTest(res2, { func: AfterServerValidateStream });
      });
    });
  }
  function SaveSign() {
    let sign0, sign1;
    const name = `${SignGridRef.current.grid.source.getFieldTextSync(
      "Opisanie"
    )} ${SignGridRef.current.grid.source.getFieldTextSync("ID")}`;
    function setSignZero(data) {
      sign0 = atob(data.RCDATA);
      DownloadData(name + ".sgn", sign0);
      GetSignStream("1").then((res) => {
        tokenProcessingTest(res, { func: setSignOne });
      });
    }
    function setSignOne(data) {
      sign1 = atob(data.RCDATA);
      DownloadData(name + ".dat", sign1);
    }
    GetSignStream("0").then((res) => {
      tokenProcessingTest(res, { func: setSignZero });
    });
  }
  const DownloadData = (name, data) => {
    const link = document.createElement("a");
    link.download = name;
    const blob = new Blob([data], { type: "text/plain" });
    link.href = window.URL.createObjectURL(blob);
    link.click();
  };
  function GetSignStream(Sign) {
    const ID2 = SignGridRef.current.grid.source.getFieldTextSync("ID");
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "audit").set("comand", "GetSignStream").set("ID", ID2).set("isSign", Sign).set("WSM", "1");
    return AxiosRequest(true, params2);
  }
  function GetObjectSigns() {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "audit").set("comand", "GetObjectSigns").set("ObjType", props.ObjType).set("ObjRef", props.ID).set("WSM", "1");
    return AxiosRequest(true, params2);
  }
  const ServerValidateStream = (id) => {
    let params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "audit").set("comand", "ServerValidateStream").set("ID", id).set("WSM", "1");
    return AxiosRequest(true, params2, { content: props.content });
  };
  const AfterServerValidateStream = (json) => {
    showDetailAboutSign(json);
    setDisableButton(true);
  };
  const isDeleteSignButtonDisabled = !(isSuperUser || props.CanDelete === "1");
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "center", sx: { height: "100%" }, children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { sx: { height: "calc(100% - 40px)", width: "100%" }, item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Tabs,
      {
        id: "SignDialog",
        style: { width: "100%", height: "100%" },
        tabIndex: 1,
        onChange: (e2) => {
          if (e2.detail.index === 1) {
            SignGridRef.current.grid.updateGridSize();
          }
        },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            TabItem,
            {
              id: "ChangePassowrdTab",
              label: "Новая подпись",
              style: {
                textTransform: "none",
                width: "100%",
                height: "100%",
                padding: "0px",
                display: "inline-block"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  container: true,
                  direction: "column",
                  justifyContent: "center",
                  alignItems: "flex-start",
                  sx: { width: "100%", height: "100%" },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      Grid$1,
                      {
                        container: true,
                        direction: "row",
                        justifyContent: "flex-start",
                        alignItems: "center",
                        sx: { width: "100%", height: "45px" },
                        spacing: 1,
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: "Описание" }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "calc(100% - 75px - 120px)" }, children: props.Notes }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            Button$2,
                            {
                              size: "small",
                              variant: "outlined",
                              sx: { textTransform: "none" },
                              onClick: () => {
                                ServerSignStream();
                              },
                              disabled: button,
                              children: "Подписать"
                            }
                          ) })
                        ]
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { height: "17px" }, children: "Образец документа для подписи:" }),
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { width: "100%", height: "calc(100% - 59px)" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("textarea", { disabled: true, value: props.content, style: { resize: "none", width: "100%", height: "100%" } }) })
                  ]
                }
              )
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            TabItem,
            {
              id: "ChangePassowrdTab",
              label: "Текущие подписи",
              style: {
                textTransform: "none",
                width: "100%",
                height: "100%",
                padding: "0px",
                display: "inline-block"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                Grid$1,
                {
                  container: true,
                  direction: "column",
                  justifyContent: "center",
                  alignItems: "flex-start",
                  sx: { width: "100%", height: "100%" },
                  children: [
                    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                      Grid$1,
                      {
                        container: true,
                        direction: "row",
                        justifyContent: "flex-start",
                        alignItems: "center",
                        sx: { width: "100%", height: "45px" },
                        spacing: 1,
                        children: [
                          /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, children: [
                            /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Сохранить цифровую подпись", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: SaveSign, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SaveIcon, { sx: { fontSize: "75%" }, size: "small" }) }) }),
                            /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Удалить подпись из базы данных", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: DeleteSign, disabled: isDeleteSignButtonDisabled, children: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { sx: { fontSize: "75%" }, size: "small" }) }) }),
                            /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: "Обновить список", children: /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: UpdateAllSigns, children: /* @__PURE__ */ jsxRuntimeExports.jsx(RefreshIcon, { sx: { fontSize: "75%" }, size: "small" }) }) })
                          ] }),
                          /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "calc(100% - 75px - 120px)" } })
                        ]
                      }
                    ) }),
                    /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, sx: { width: "100%", height: "calc(100% - 45px)" }, children: [
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Grid$1,
                        {
                          item: true,
                          sx: {
                            width: "100%",
                            height: "38%"
                            // border: "1px solid"
                          },
                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                            "div",
                            {
                              id: "gridpanelSigns",
                              ref: SignGridRef,
                              style: {
                                height: "100%",
                                width: "100%",
                                position: "relative"
                              },
                              rcsgrid_panel: ""
                            }
                          )
                        }
                      ),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { width: "100%", height: "62%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                        Tabs,
                        {
                          scrollMode: "paging",
                          id: "CurrentSigns",
                          animation: "none",
                          tabPosition: "bottom",
                          style: {
                            position: "absolute",
                            borderBottom: "0px",
                            height: "53%",
                            width: "100%"
                          },
                          children: [
                            /* @__PURE__ */ jsxRuntimeExports.jsx(
                              TabItem,
                              {
                                id: "InfoSignGrid",
                                label: "Состав подписи",
                                style: {
                                  textTransform: "none",
                                  width: "100%",
                                  height: "100%",
                                  padding: "0px",
                                  display: "inline-block"
                                },
                                children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                                  Grid$1,
                                  {
                                    container: true,
                                    direction: "row",
                                    justifyContent: "flex-start",
                                    alignItems: "center",
                                    sx: { width: "100%", height: "100%" },
                                    children: [
                                      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { width: "60%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                        "div",
                                        {
                                          id: "gridpanelSign",
                                          ref: InfoSignGridRef,
                                          style: {
                                            height: "100%",
                                            width: "100%",
                                            position: "relative"
                                          },
                                          rcsgrid_panel: ""
                                        }
                                      ) }),
                                      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { width: "40%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                        Grid$1,
                                        {
                                          container: true,
                                          direction: "column",
                                          justifyContent: "center",
                                          alignItems: "center",
                                          style: { Width: "100%", height: "100%" },
                                          className: "grid-main-parent",
                                          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                                            Grid$1,
                                            {
                                              item: true,
                                              style: { Width: "100%", textAlign: "center" },
                                              title: "Результат проверки подписи",
                                              children: validText
                                            }
                                          )
                                        }
                                      ) })
                                    ]
                                  }
                                )
                              }
                            ),
                            /* @__PURE__ */ jsxRuntimeExports.jsxs(
                              TabItem,
                              {
                                id: "ErrorsGrid",
                                label: "Ошибки образа",
                                style: {
                                  textTransform: "none",
                                  width: "100%",
                                  height: "100%",
                                  padding: "0px",
                                  display: "inline-block"
                                },
                                children: [
                                  " ",
                                  /* @__PURE__ */ jsxRuntimeExports.jsx(
                                    "div",
                                    {
                                      id: "gridpanelErrors",
                                      ref: ErrorsGridRef,
                                      style: {
                                        height: "100%",
                                        width: "100%",
                                        position: "relative"
                                      },
                                      rcsgrid_panel: ""
                                    }
                                  )
                                ]
                              }
                            )
                          ]
                        }
                      ) })
                    ] })
                  ]
                }
              )
            }
          )
        ]
      }
    ) }),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { height: "38px", width: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "space-between", alignItems: "flex-end", spacing: 1, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, sx: { mt: 1 }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        Button$2,
        {
          size: "small",
          variant: "outlined",
          sx: { textTransform: "none" },
          className: "button_Modal_Close",
          onClick: () => {
            resumeRequest(props.RequestID, props.subData, newSignId);
          },
          children: "Закрыть"
        }
      ) })
    ] }) })
  ] });
}
function DialogWithTextField({ props }) {
  const [inputText, setInputText] = reactExports.useState(props.Value);
  function onSelect() {
    if (props.onSelect) {
      props.onSelect({ value: inputText });
    }
  }
  function onEditEnd(data) {
    setInputText(data.value);
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      Grid$1,
      {
        container: true,
        direction: "row",
        justifyContent: "center",
        alignItems: "center",
        style: { height: "calc(100% - 50px)" },
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { marginRight: "5px" }, children: props.Title ? props.Title : "" }),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Grid$1,
            {
              item: true,
              style: {
                height: "27px",
                width: "200px",
                border: "1px solid #cccccc"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(Editor, { value: props.Value, onEdit: onEditEnd })
            }
          )
        ]
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        item: true,
        style: {
          width: "100%",
          height: "40px",
          marginTop: "5px"
        },
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-end", alignItems: "center", style: { paddingTop: "8px" }, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              style: { textTransform: "none", marginRight: "10px" },
              value: "1",
              className: "button_Modal_Select",
              onClick: onSelect,
              children: "Выбрать"
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            Button$2,
            {
              size: "small",
              variant: "outlined",
              style: { textTransform: "none" },
              value: "2",
              className: "button_Modal_Close",
              children: "Отмена"
            }
          )
        ] })
      }
    )
  ] });
}
const switchFocusObj = {
  main: "buttons",
  buttons: "main"
};
const getPostData = (changes) => {
  return Object.entries(changes).reduce((acc, [key, value]) => {
    acc[value.shortname || key] = {
      ObjRef: value.objref,
      Value: value.value,
      DataType: value.datatype,
      CheckState: value.checkstate
    };
    return acc;
  }, {});
};
function DialogParams({ props, smetaModalId = "" }) {
  const [pagination, setPagination] = React.useState();
  const [currentPage, setCurrentPage] = React.useState();
  const [changes, setChanges] = reactExports.useState({});
  const paramBox = React.useRef();
  const buttonsContainer = React.useRef();
  const focusSwitch = React.useRef("main");
  const focusButtonIndex = React.useRef(0);
  React.useEffect(() => {
    var _a2;
    if (((_a2 = props.data) == null ? void 0 : _a2.Pages) && props.data.Pages.length) {
      setPagination(props.data.Pages);
      setCurrentPage(1);
    }
    setTimeout(() => {
      if (paramBox.current) {
        paramBox.current.focus();
        const pBox = paramBox.current.querySelector("#paramsBox");
        if (pBox) pBox.focus();
      }
    });
  }, []);
  async function onSelect() {
    if (props.ExecEvent) {
      const pBox = paramBox.current.querySelector("#paramsBox");
      await (pBox == null ? void 0 : pBox.dialogButtonClick(
        "-1",
        props.ExecEvent,
        async () => formEdit("1", props.func, {}, props.RequestID, props.from)
      ));
      return;
    }
    if (props.onSelect) props.onSelect(getPostData(changes));
    smetaModals.close(smetaModalId);
    if (props.RequestID) {
      await formEdit("1", props.func, {}, props.RequestID, props.from);
      return;
    }
  }
  function onKeyDown(ev) {
    switch (ev.code) {
      case "NumpadEnter":
      case "Enter":
        if (focusSwitch.current === "main") {
          setTimeout(() => {
            focusSwitch.current = switchFocusObj[focusSwitch.current];
            buttonsContainer.current.children[0].focus();
            focusButtonIndex.current = 0;
          }, 200);
        }
        break;
      case "Tab":
        ev.preventDefault();
        switch (focusSwitch.current) {
          case "main":
            focusSwitch.current = switchFocusObj[focusSwitch.current];
            buttonsContainer.current.children[0].focus();
            focusButtonIndex.current = 0;
            break;
          case "buttons":
            focusSwitch.current = switchFocusObj[focusSwitch.current];
            if (paramBox.current) {
              paramBox.current.focus();
              const pBox = paramBox.current.querySelector("#paramsBox");
              if (pBox) pBox.focus();
            }
            break;
        }
        break;
      case "ArrowLeft":
        if (focusSwitch.current === "buttons") {
          const bttns = buttonsContainer.current.children;
          if (focusButtonIndex.current > 0) {
            focusButtonIndex.current = focusButtonIndex.current - 1;
            bttns[focusButtonIndex.current].focus();
          }
        }
        break;
      case "ArrowRight":
        if (focusSwitch.current === "buttons") {
          const bttns = buttonsContainer.current.children;
          if (focusButtonIndex.current < bttns.length - 1) {
            focusButtonIndex.current = focusButtonIndex.current + 1;
            bttns[focusButtonIndex.current].focus();
          }
        }
        break;
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      id: "mainElement",
      container: true,
      direction: "column",
      justifyContent: "flex-start",
      alignItems: "stretch",
      style: { position: "relative", height: "100%" },
      onKeyDown,
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsxs(
          Grid$1,
          {
            container: true,
            item: true,
            direction: "row",
            justifyContent: "flex-start",
            alignItems: "stretch",
            style: {
              height: "calc(100% - 42px)",
              width: "100%",
              display: "flex",
              flexDirection: "column"
            },
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  tabIndex: 0,
                  ref: paramBox,
                  style: {
                    width: "100%",
                    flex: "1 1 0"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Params,
                    {
                      currentPage: currentPage !== void 0 ? currentPage - 1 : void 0,
                      pageTitles: pagination,
                      Module: props.Module,
                      reqCommand: props.reqCommand,
                      GroupID: props.GroupID,
                      Path: props.Path,
                      data: props.data,
                      NoTitle: props.NoTitle,
                      NoHistory: props.NoHistory,
                      setChanges,
                      onDropDownList: props.onDropDownList,
                      onEditList: props.onEditList,
                      onSetParam: props.onSetParam
                    }
                  )
                }
              ),
              currentPage !== void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                Grid$1,
                {
                  style: {
                    width: "100%",
                    display: "flex",
                    alignItems: "center",
                    justifyContent: "center",
                    whiteSpace: "nowrap",
                    border: "2px solid #cccccc",
                    borderBottom: "0"
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Pagination,
                    {
                      page: currentPage,
                      onChange: (ev, id) => {
                        setCurrentPage(Number(id));
                      },
                      count: pagination.length,
                      renderItem: (item) => {
                        if (item.type === "page") {
                          return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip, { title: pagination[Number(item.page) - 1].Name, children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationItem, { ...item }) }) });
                        } else {
                          return /* @__PURE__ */ jsxRuntimeExports.jsx(PaginationItem, { ...item });
                        }
                      }
                    }
                  )
                }
              ) : null
            ]
          }
        ),
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          Grid$1,
          {
            container: true,
            item: true,
            direction: "row",
            justifyContent: "flex-end",
            alignItems: "center",
            style: {
              height: "42px",
              width: "100%",
              display: props.hiddenFutter ? "none" : ""
            },
            children: /* @__PURE__ */ jsxRuntimeExports.jsx(
              ClickAwayListener,
              {
                onClickAway: (ev) => {
                  focusSwitch.current = "main";
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, style: { width: "fit-content", marginRight: "5px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(
                  Grid$1,
                  {
                    ref: buttonsContainer,
                    container: true,
                    item: true,
                    direction: "row",
                    justifyContent: "flex-end",
                    alignItems: "center",
                    style: { height: "100%", width: "100%" },
                    children: [
                      currentPage !== void 0 && currentPage !== pagination.length ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Button$2,
                        {
                          tabIndex: 0,
                          onClick: () => {
                            if (currentPage !== void 0) {
                              setCurrentPage(currentPage + 1);
                            }
                          },
                          size: "small",
                          variant: "outlined",
                          style: {
                            textTransform: "none",
                            marginRight: "10px"
                          },
                          children: "Дальше"
                        }
                      ) : /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
                        currentPage !== void 0 ? /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Button$2,
                          {
                            tabIndex: 0,
                            onClick: () => {
                              if (currentPage !== void 0) {
                                setCurrentPage(currentPage - 1);
                              }
                            },
                            size: "small",
                            variant: "outlined",
                            style: {
                              textTransform: "none",
                              marginRight: "10px"
                            },
                            children: "Назад"
                          }
                        ) : null,
                        /* @__PURE__ */ jsxRuntimeExports.jsx(
                          Button$2,
                          {
                            tabIndex: 0,
                            onClick: onSelect,
                            size: "small",
                            variant: "outlined",
                            style: {
                              textTransform: "none",
                              marginRight: "10px",
                              display: props.Buttons && (props.Buttons & 1) === 0 ? "none" : ""
                            },
                            value: "1",
                            className: "button_Modal_Select",
                            children: props.ExecEvent ? "Выполнить" : "Выбрать"
                          }
                        )
                      ] }),
                      /* @__PURE__ */ jsxRuntimeExports.jsx(
                        Button$2,
                        {
                          tabIndex: 0,
                          size: "small",
                          variant: "outlined",
                          style: { textTransform: "none" },
                          value: "2",
                          className: "button_Modal_Close",
                          onClick: () => {
                            if (props.onClose) props.onClose();
                            smetaModals.close(smetaModalId);
                          },
                          children: "Закрыть"
                        }
                      )
                    ]
                  }
                ) })
              }
            )
          }
        )
      ]
    }
  );
}
var KeyboardArrowRightOutlined = {};
var hasRequiredKeyboardArrowRightOutlined;
function requireKeyboardArrowRightOutlined() {
  if (hasRequiredKeyboardArrowRightOutlined) return KeyboardArrowRightOutlined;
  hasRequiredKeyboardArrowRightOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardArrowRightOutlined, "__esModule", {
    value: true
  });
  KeyboardArrowRightOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardArrowRightOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z"
  }), "KeyboardArrowRightOutlined");
  return KeyboardArrowRightOutlined;
}
var KeyboardArrowRightOutlinedExports = /* @__PURE__ */ requireKeyboardArrowRightOutlined();
const KeyboardArrowRightOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardArrowRightOutlinedExports);
var KeyboardArrowLeftOutlined = {};
var hasRequiredKeyboardArrowLeftOutlined;
function requireKeyboardArrowLeftOutlined() {
  if (hasRequiredKeyboardArrowLeftOutlined) return KeyboardArrowLeftOutlined;
  hasRequiredKeyboardArrowLeftOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardArrowLeftOutlined, "__esModule", {
    value: true
  });
  KeyboardArrowLeftOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardArrowLeftOutlined.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z"
  }), "KeyboardArrowLeftOutlined");
  return KeyboardArrowLeftOutlined;
}
var KeyboardArrowLeftOutlinedExports = /* @__PURE__ */ requireKeyboardArrowLeftOutlined();
const KeyboardArrowLeftOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardArrowLeftOutlinedExports);
var KeyboardDoubleArrowRightOutlined = {};
var hasRequiredKeyboardDoubleArrowRightOutlined;
function requireKeyboardDoubleArrowRightOutlined() {
  if (hasRequiredKeyboardDoubleArrowRightOutlined) return KeyboardDoubleArrowRightOutlined;
  hasRequiredKeyboardDoubleArrowRightOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardDoubleArrowRightOutlined, "__esModule", {
    value: true
  });
  KeyboardDoubleArrowRightOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardDoubleArrowRightOutlined.default = (0, _createSvgIcon.default)([/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M6.41 6 5 7.41 9.58 12 5 16.59 6.41 18l6-6z"
  }, "0"), /* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m13 6-1.41 1.41L16.17 12l-4.58 4.59L13 18l6-6z"
  }, "1")], "KeyboardDoubleArrowRightOutlined");
  return KeyboardDoubleArrowRightOutlined;
}
var KeyboardDoubleArrowRightOutlinedExports = /* @__PURE__ */ requireKeyboardDoubleArrowRightOutlined();
const KeyboardDoubleArrowRightOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardDoubleArrowRightOutlinedExports);
var KeyboardDoubleArrowLeftOutlined = {};
var hasRequiredKeyboardDoubleArrowLeftOutlined;
function requireKeyboardDoubleArrowLeftOutlined() {
  if (hasRequiredKeyboardDoubleArrowLeftOutlined) return KeyboardDoubleArrowLeftOutlined;
  hasRequiredKeyboardDoubleArrowLeftOutlined = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(KeyboardDoubleArrowLeftOutlined, "__esModule", {
    value: true
  });
  KeyboardDoubleArrowLeftOutlined.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  KeyboardDoubleArrowLeftOutlined.default = (0, _createSvgIcon.default)([/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M17.59 18 19 16.59 14.42 12 19 7.41 17.59 6l-6 6z"
  }, "0"), /* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "m11 18 1.41-1.41L7.83 12l4.58-4.59L11 6l-6 6z"
  }, "1")], "KeyboardDoubleArrowLeftOutlined");
  return KeyboardDoubleArrowLeftOutlined;
}
var KeyboardDoubleArrowLeftOutlinedExports = /* @__PURE__ */ requireKeyboardDoubleArrowLeftOutlined();
const KeyboardDoubleArrowLeftOutlinedIcon = /* @__PURE__ */ getDefaultExportFromCjs(KeyboardDoubleArrowLeftOutlinedExports);
function DialogSelectFromList({ props }) {
  const { destName, sourList, destList, sourName, RequestID: requestId, func, from: from2 } = props;
  const sourListData = reactExports.useRef([]);
  const destListData = reactExports.useRef([]);
  const sourSelected = reactExports.useRef();
  const destSelected = reactExports.useRef();
  const [sour, setSour] = reactExports.useState([]);
  const [dest, setDest] = reactExports.useState([]);
  const [sSelected, setSSelected] = reactExports.useState();
  const [dSelected, setDSelected] = reactExports.useState();
  const setButtons = reactExports.useContext(SmetaModalsButtonsContext);
  reactExports.useEffect(() => {
    setButtons == null ? void 0 : setButtons({
      1: { label: "Выбрать", onClick: onSelect }
    });
  }, [setButtons, destListData.current]);
  const getData2 = (list) => {
    if (!list) return [];
    if (typeof list !== "string") {
      return Object.values(list).map((item) => {
        return { text: item.text, id: item.id };
      });
    }
    return list.replaceAll('"', "").split(",").map((item, index2) => {
      return {
        text: item,
        id: `${index2}`
      };
    });
  };
  reactExports.useEffect(() => {
    if (sourList) {
      sourListData.current = getData2(sourList);
      destListData.current = getData2(destList);
      if (sourListData.current.length) {
        sourSelected.current = sourListData.current[0];
      }
      updateLists();
    }
  }, [sourList]);
  const updateLists = () => {
    setDest([...destListData.current]);
    setSour([...sourListData.current]);
    setSSelected(sourSelected.current);
    setDSelected(destSelected.current);
  };
  const onClickMoveSour = () => {
    let index2 = 0;
    sourListData.current = sourListData.current.filter((item, id) => {
      var _a2;
      if (item.text === ((_a2 = sourSelected.current) == null ? void 0 : _a2.text)) {
        destListData.current.push(sourSelected.current);
        index2 = id;
        return false;
      }
      return true;
    });
    if (sourListData.current.length) {
      sourSelected.current = index2 > 0 ? sourListData.current[index2 - 1] : sourListData.current[0];
    }
    destListData.current = [...destListData.current];
    updateLists();
  };
  const onClickMoveDest = () => {
    let index2 = 0;
    destListData.current = destListData.current.filter((item, id) => {
      var _a2;
      if (item.text === ((_a2 = destSelected.current) == null ? void 0 : _a2.text)) {
        sourListData.current.push(destSelected.current);
        index2 = id;
        return false;
      }
      return true;
    });
    if (destListData.current.length) {
      destSelected.current = index2 > 0 ? destListData.current[index2 - 1] : destListData.current[0];
    }
    sourListData.current = [...sourListData.current];
    updateLists();
  };
  const onClickMoveDestAll = () => {
    const oldLength = sourListData.current.length;
    sourListData.current = [...sourListData.current, ...destListData.current];
    destListData.current = [];
    if (sourListData.current.length && oldLength === 0) sourSelected.current = sourListData.current[0];
    updateLists();
  };
  const onClickMoveSourAll = () => {
    const oldLength = destListData.current.length;
    destListData.current = [...destListData.current, ...sourListData.current];
    sourListData.current = [];
    if (destListData.current.length && oldLength === 0) destSelected.current = destListData.current[0];
    updateLists();
  };
  const onSelect = async () => {
    var _a2;
    const cellText = destListData.current.map((item) => {
      return `${item.text}`;
    }).join(", ");
    if (requestId)
      await formEdit(
        "1",
        func,
        {
          $SourList: sourListData.current.map(({ text, id }) => ({ text, id })),
          $DestList: destListData.current.map(({ text, id }) => ({ text, id })),
          Name: "Selection",
          Value: cellText
        },
        requestId,
        from2
      );
    (_a2 = props.onEdit) == null ? void 0 : _a2.call(props, {
      value: cellText,
      name: props.Name,
      record: props.record,
      textchanged: "0",
      setValue: props.setValue,
      setInputValue: props.setInputValue,
      type: props.Module,
      addInfo: props.addInfo
    });
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.mainDialogBlock), children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.fullDialogFlexContainer), children: [
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.dialogSelectFromListListContainer), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogSelectFromListListLabel), children: sourName }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogSelectFromListList), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuList,
        {
          tabIndex: "-1",
          style: {
            height: "calc(100% + 1px)",
            width: "100%",
            outline: "none"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            VirtualList,
            {
              items: sour,
              selected: sSelected,
              onClick: (data) => {
                sourSelected.current = data;
                setSSelected(sourSelected.current);
              }
            }
          )
        }
      ) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.dialogSelectFromListButtonsContainer), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: onClickMoveSourAll, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowRightOutlinedIcon, {}) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: onClickMoveSour, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowRightOutlinedIcon, {}) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: onClickMoveDest, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardArrowLeftOutlinedIcon, {}) }),
      /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { onClick: onClickMoveDestAll, children: /* @__PURE__ */ jsxRuntimeExports.jsx(KeyboardDoubleArrowLeftOutlinedIcon, {}) })
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3(styles$4.dialogSelectFromListListContainer), children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogSelectFromListListLabel), children: destName }),
      /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3(styles$4.dialogSelectFromListList), children: /* @__PURE__ */ jsxRuntimeExports.jsx(
        MenuList,
        {
          tabIndex: "-1",
          style: {
            height: "calc(100% + 1px)",
            width: "100%",
            outline: "none"
          },
          children: /* @__PURE__ */ jsxRuntimeExports.jsx(
            VirtualList,
            {
              items: dest,
              selected: dSelected,
              onClick: (data) => {
                destSelected.current = data;
                setDSelected(destSelected.current);
              }
            }
          )
        }
      ) })
    ] })
  ] }) });
}
const documentModal = [ViewClass.DocSite, ViewClass.DocBook];
const raiseTokenError = async ({ message = "Ошибка токена", reqId, subData }) => {
  console.error(message);
  await resumeRequest(reqId, subData, {
    Error: "1",
    $content: message
  });
};
function CheckModalBackGrounds(backgroundEl) {
  const allElements = [
    ...Array.from(document.querySelectorAll(".background_ModalDialog")),
    ...Array.from(document.querySelectorAll(".MuiDialog-root"))
  ];
  let count = 0;
  let maxZIndex = 0;
  for (const element of allElements) {
    if (!element || element === backgroundEl) continue;
    if (element.id && element.id.includes("loadmask")) continue;
    const computedStyle = window.getComputedStyle(element);
    if (element.matches(".MuiDialog-root") && (computedStyle.visibility === "hidden" || computedStyle.display === "none")) {
      continue;
    }
    count++;
    const zIndex2 = Number(computedStyle.zIndex);
    if (!isNaN(zIndex2)) maxZIndex = Math.max(maxZIndex, zIndex2);
  }
  return maxZIndex > 999 ? maxZIndex - 999 : count;
}
function RemoveAllBG() {
  const backgroundElements = Array.from(document.querySelectorAll(".background_ModalDialog"));
  if (backgroundElements && backgroundElements.length > 0) {
    for (const element of backgroundElements) {
      element.remove();
    }
  }
}
function CreateBackgroundForModal(elem, id, zIndex2) {
  const background3 = document.createElement("div");
  background3.classList.add("background_ModalDialog");
  background3.style.height = "100%";
  background3.id = id === void 0 ? "" : id;
  background3.style.width = "100%";
  background3.style.position = "absolute";
  background3.style.top = "0px";
  background3.style.background = "";
  if (id && id.includes("loadmask")) background3.style.backdropFilter = "";
  background3.style.zIndex = `${1e3 + CheckModalBackGrounds()}`;
  if (elem) clientExports.createRoot(background3).render(elem);
  document.body.appendChild(background3);
  return background3;
}
function renderMessageBox(paramMessageBox) {
  smetaModals.open(
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      MessageBox,
      {
        DlgType: paramMessageBox.dlgType,
        Message: paramMessageBox.message,
        Buttons: paramMessageBox.buttons,
        onSelect: paramMessageBox.selectF,
        setReturnValue: paramMessageBox.func,
        from: paramMessageBox.from
      }
    ),
    {
      id: paramMessageBox.idModal,
      style: getStyleWindow("MessageBox"),
      hiddenButton: true,
      blockMaximize: true,
      blockSaveLocation: true,
      blockResize: true,
      Title: TITLE_MESSAGE_MODAL_WINDOW[paramMessageBox.dlgType],
      onClose: () => {
        var _a2;
        (_a2 = paramMessageBox.closeF) == null ? void 0 : _a2.call(paramMessageBox, { target: { value: "2" } }, void 0, paramMessageBox.func, paramMessageBox.from);
      }
    }
  );
}
function buildFileSelector(info) {
  return new Promise((resolve) => {
    const fileSelector = document.createElement("input");
    fileSelector.setAttribute("type", "file");
    fileSelector.setAttribute("accept", (info == null ? void 0 : info.filter) || "file");
    fileSelector.setAttribute("multiple", info == null ? void 0 : info.multiple);
    fileSelector.addEventListener("change", async (e2) => {
      const files = Array.from(e2.target.files);
      const filesNames = files.map((file) => file.name).join("\n");
      const filesData = await Promise.all(files.map((file) => getBase64ByFileReader(file)));
      const finalData = filesData.reduce(
        (acc, fileData, index2) => ({
          ...acc,
          [files[index2].name]: {
            size: files[index2].size,
            rcdata: fileData.rcdata,
            name: files[index2].name
          }
        }),
        {}
      );
      resolve({ reqData: { FileName: filesNames, Result: "1", $content: filesNames }, files: finalData });
    });
    fileSelector.addEventListener("cancel", () => {
      resolve();
    });
    fileSelector.click();
  });
}
const getBase64ByFileReader = (file) => {
  const reader = new FileReader();
  return new Promise((resolve) => {
    reader.onload = (ev) => {
      const fileArr = ev.target.result.split(",");
      const [fileType, file2] = fileArr;
      resolve({ fileType, rcdata: file2 });
    };
    reader.readAsDataURL(file);
  });
};
function InputTextChange(Text2, RequestID, event, func) {
  let params2 = /* @__PURE__ */ new Map(), data, json;
  if (event === false) {
    data = { Result: "" };
  } else {
    data = { Text: Text2, Result: 1 };
  }
  params2.set("prefix", "project");
  params2.set("comand", "ResumeRequest");
  params2.set("RequestID", RequestID);
  params2.set("WSM", "1");
  json = XMLrequest(params2, data);
  tokenProcessingTest(json, { func });
}
const getSerialInfo = (serial) => {
  return window.webkcrypt.x509_load_by_serial(serial).value;
};
function executeCertList() {
  return window.webkcrypt.plain_text_certificate_list().value;
}
function executeDetachedTest(sn, data) {
  return window.webkcrypt.make_pkcs7_signature(sn, data, true).value;
}
function handleMessageList(response, subData, RequestID) {
  if (response !== "") {
    sendCertListWSM(response, subData, RequestID);
  } else {
    sendCertListWSM(void 0, subData, RequestID);
  }
}
function sendCertListWSM(res, subData, RequestID) {
  let params2 = /* @__PURE__ */ new Map(), data, json;
  data = { res: res ? res : "" };
  params2.set("prefix", "project");
  params2.set("comand", "ResumeRequest");
  params2.set("RequestID", RequestID);
  params2.set("WSM", "1");
  json = XMLrequest(params2, data);
  tokenProcessingTest(json, subData);
}
function handleMessageSign(message, RequestID, subData) {
  let params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "project");
  params2.set("comand", "ResumeRequest");
  params2.set("RequestID", RequestID);
  params2.set("WSM", "1");
  let rcdata = message;
  AxiosRequest(true, params2, { RCDATA: rcdata }).then((res) => {
    tokenProcessingTest(res, subData);
  });
}
function uuid$1() {
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
    var r2 = Math.random() * 16 | 0, v2 = c === "x" ? r2 : r2 & 3 | 8;
    return v2.toString(16);
  });
}
let WebkcryptCallback$1 = class WebkcryptCallback {
  constructor(uuid2, callback) {
    this.callback = callback;
    this.uuid = uuid2;
    this.handle = (event) => {
      var handled = false;
      try {
        if (event && event.data) {
          if ("type" in event.data && event.data.type == "webkcrypt-reply") {
            if ("uuid" in event.data && event.data.uuid == this.uuid) {
              handled = this.callback(event);
              if (handled) {
                window.removeEventListener("message", this.handle);
              }
            }
          }
        }
        return handled;
      } catch {
      }
    };
  }
};
function webkcryptdata$1(method, args) {
  var data = {
    type: "webkcrypt-invoke",
    uuid: uuid$1(),
    invoke: {
      method
    }
  };
  if (args) {
    data.invoke.args = args;
  }
  return data;
}
function webkcrypt_invoke$1(method, args, callback) {
  var data = webkcryptdata$1(method, args);
  if (callback) {
    window.addEventListener("message", new WebkcryptCallback$1(data.uuid, callback).handle, false);
  }
  window.postMessage(data, "*");
}
async function resumeRequest(RequestID, subData, datas) {
  let params2 = /* @__PURE__ */ new Map(), data, json;
  data = { Result: datas ? datas : "" };
  params2.set("prefix", "project");
  params2.set("comand", "ResumeRequest");
  params2.set("RequestID", RequestID);
  params2.set("WSM", "1");
  json = await AxiosRequest(true, params2, datas ? datas : data);
  tokenProcessingTest(json, subData);
}
async function InputButton(event, RequestID, func, from2, props) {
  let ClickedButton = event.target.value, request;
  if (props && props.Button && props.Request) {
    ClickedButton = props.Button;
    request = props.Request;
  }
  let params2 = /* @__PURE__ */ new Map(), data = { Result: ClickedButton }, json;
  if (request) data = { Result: ClickedButton, [request.Name]: request.Value };
  if (request && request.subName) data[request.subName] = request.Value;
  params2.set("prefix", "project");
  params2.set("comand", "ResumeRequest");
  params2.set("RequestID", RequestID);
  params2.set("WSM", "1");
  json = await AxiosRequest(true, params2, data);
  tokenProcessingTest(json, {
    func,
    propsId: RequestID,
    from: from2,
    props
  });
}
function SetLoadingCursor(load, zIndex2, remove) {
  {
    const Mask = document.getElementById("loadmask");
    if (Mask) {
      Mask.remove();
    } else if (!remove) {
      CreateBackgroundForModal(
        /* @__PURE__ */ jsxRuntimeExports.jsx(
          "div",
          {
            style: {
              cursor: "wait",
              width: "100%",
              height: "100%",
              userSelect: "none"
            },
            loadmask: ""
          }
        ),
        "loadmask"
      );
    }
  }
}
function setLoadingCursorAxios(load) {
  {
    const elem = CreateBackgroundForModal(null, "loadmask" + CheckModalBackGrounds());
    elem.style.cursor = "wait";
    elem.style.width = "100%";
    elem.style.height = "100%";
    return elem;
  }
}
const GetDialogParam = (ObjType2, module2, ObjRef, RequestID, OnlyView, MultiSel) => {
  let param = /* @__PURE__ */ new Map(), json;
  param.set("prefix", module2);
  param.set("comand", "GetDialogParams");
  param.set("ObjType", ObjType2);
  param.set("ObjRef", ObjRef ? ObjRef : "0");
  if (OnlyView !== void 0) param.set("OnlyView", OnlyView);
  if (MultiSel) param.set("MultiSel", MultiSel);
  json = XMLrequest(param);
  return json;
};
function GetParams(json, param) {
  return json[param] === void 0 ? json[param.toLowerCase()] : json[param];
}
function changeTextInModalButton(json) {
  const objWithNewText = {};
  for (const [key, value] of Object.entries(json)) {
    if (key.includes("Кнопка")) {
      Object.assign(objWithNewText, { [key.split("$")[1]]: value });
    }
  }
  return objWithNewText;
}
function getButtons(json) {
  var _a2;
  let buttonFlags, buttonsJson, disabledButtons;
  if (typeof json === "number") {
    buttonFlags = json;
    buttonsJson = {};
    disabledButtons = {};
  } else {
    buttonFlags = ((_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.Buttons) || (json == null ? void 0 : json.Buttons);
    buttonsJson = changeTextInModalButton((json == null ? void 0 : json.jsonData) || {});
    disabledButtons = (json == null ? void 0 : json.disabledButtons) || {};
  }
  if (!buttonFlags) buttonFlags = Button$1.Ok;
  const buttonsArr = [];
  const buttonConfig2 = [
    {
      condition: Button$1.Ok,
      label: "ОК",
      value: DlgRes.Ok,
      defaultText: buttonsJson["Выбрать"] ? buttonsJson["Выбрать"] : json.Token === "ExecuteModalDialog" ? "Выбрать" : "ОК"
    },
    { condition: Button$1.Yes, label: "Да", value: DlgRes.Yes },
    { condition: Button$1.No, label: "Нет", value: DlgRes.No },
    { condition: Button$1.Abort, label: "Прервать", value: DlgRes.Abort },
    { condition: Button$1.Retry, label: "Повторить", value: DlgRes.Retry },
    { condition: Button$1.Ignore, label: "Пропустить", value: DlgRes.Ignore },
    { condition: Button$1.All, label: "Для всех", value: DlgRes.All },
    { condition: Button$1.NoToAll, label: "Нет для всех", value: DlgRes.NoToAll },
    { condition: Button$1.YesToAll, label: "Да для всех", value: DlgRes.YesToAll },
    { condition: Button$1.Cancel, label: "Отмена", value: DlgRes.Cancel, className: "button_Modal_Close" }
  ];
  buttonConfig2.forEach(({ condition, label, value, defaultText, className = "button_Modal_Select" }) => {
    if (buttonFlags & condition)
      buttonsArr.push(
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Button$2,
          {
            size: "small",
            style: { textTransform: "none", marginLeft: 10 },
            variant: "outlined",
            className,
            value,
            disabled: disabledButtons[condition],
            children: buttonsJson[label] || defaultText || label
          }
        ) }, `modal-btn_${condition}`)
      );
  });
  return buttonsArr;
}
const activateRange = async (json, subData) => {
  const grids = Array.from(document.querySelectorAll("[salary_grid]"));
  if (grids.length > 0) {
    const activateRangeGrids = grids.filter((val) => val.grid && val.grid.activateRange);
    for (const grid of activateRangeGrids) {
      grid.grid.activateRange({ year: json.Params.Year, month: json.Params.Month, range: json.Params.Range });
    }
  }
  await resumeRequest(json.RequestID, subData);
};
const refreshAmounts = async (reqId, subData) => {
  const grids = Array.from(document.querySelectorAll("[salary_grid]"));
  if (grids.length > 0) {
    await Promise.all(
      grids.map((grid) => grid.grid && grid.grid.refreshSource(grid.grid.source.getKeyFieldNameData()))
    );
  }
  const individualGrid = grids.filter((grid) => grid.grid && grid.grid.resetValues);
  if (individualGrid.length > 0) await individualGrid[0].grid.resetValues();
  await resumeRequest(reqId, subData);
};
const scrollToDocument = async (json, subData) => {
  if (!json || !json.Params) return resumeRequest(json.Params.RequestID, subData);
  const sectionsData = await getDocInfo(json.Params.DocID);
  const sections = sectionsData.Sections.split(",");
  if (!sections.length) return resumeRequest(json.Params.RequestID, subData);
  const sideBarSlice = getSectionByID(sections[0]);
  const result = {
    ...sideBarSlice,
    Who: "doc",
    Selected: { DocCfgID: json.Params.DocCfgID, docid: json.Params.DocID }
  };
  smetaStore.set(setSelectedSectionAtom, result);
  return resumeRequest(json.Params.RequestID, subData);
};
const selectFile = async (json, subData, requestID) => {
  let fileFilter;
  fileFilter = json.Params.Filter;
  if (fileFilter) {
    fileFilter = fileFilter.match(/\.[a-z]+/g);
    fileFilter = fileFilter == null ? void 0 : fileFilter.filter(function(item, pos) {
      return fileFilter.indexOf(item) == pos;
    });
    fileFilter == null ? void 0 : fileFilter.join(",");
  }
  const resp = await buildFileSelector(
    { filter: fileFilter, multiple: Boolean(json.Params.MultiSel) }
  );
  if (resp) {
    resumeRequest(json.Params.RequestID, { ...subData, props: { ...subData.props, files: resp.files } }, resp.reqData);
  } else resumeRequest(json.Params.RequestID, subData, { Error: "1" });
};
const shellExecute = (json, subData = {}, requestID = "0") => {
  let RCDATA = "";
  let FileNameShell = json.Params.FileName;
  FileNameShell = FileNameShell.split("\\");
  if (json.RCDATA) {
    RCDATA = json.RCDATA;
  } else if (subData.RCDATA) {
    RCDATA = subData.RCDATA;
  } else {
    window.open(json.Params.FileName);
    resumeRequest(requestID, subData);
    return;
  }
  let mimeType = reactNativeMimeTypesExports.lookup(FileNameShell.slice(-1)[0]);
  mimeType = "data:" + mimeType + ";base64,";
  if (showContent({ data: json, rcdata: RCDATA, mimeType, subData })) {
    downloadFile(mimeType + RCDATA, json, subData);
  }
};
const refreshDocument = async (json, subData) => {
  var _a2, _b;
  const documentByDcfg = document.getElementById("gridpanel" + json.Params.DocCfgID);
  if (documentByDcfg) {
    await ((_b = (_a2 = documentByDcfg.grid).refreshDocumentToken) == null ? void 0 : _b.call(_a2, true));
  }
  resumeRequest(json.Params.RequestID, subData);
};
const loadBySerialNumber = async (json, subData) => {
  const { failed, value } = await getSerialInfo(json.Params["СерийныйНомер"]);
  const data = failed === 1 ? { Error: "1" } : { RCDATA: value.x509.value, Result: "1" };
  return resumeRequest(json.Params.RequestID, subData, data);
};
const commitFormOnHead = (json, subData) => {
  const headFormData = getHeadForm("GetSectionHead");
  smetaStore.set(headFormAtom, headFormData);
  return resumeRequest(json.Params.RequestID, subData);
};
const clearFormOnHead = (json, subData) => {
  const headFormData = getHeadForm("ClearFormOnHead");
  smetaStore.set(headFormAtom, headFormData);
  return resumeRequest(json.Params.RequestID, subData);
};
function tokenProcessingTest(json, subData = {}) {
  var _a2, _b, _c;
  if (json !== void 0 && json.Break !== void 0) {
    let Token, RequestID, from2 = subData.from;
    subData.props;
    Token = json.Token;
    RequestID = json.Params ? json.Params.RequestID : void 0;
    window.removeEventListener("message", handleMessageList);
    window.removeEventListener("message", handleMessageSign);
    switch (Token) {
      case "RefreshAmounts": {
        refreshAmounts(RequestID, subData);
        break;
      }
      case "ActivateRange": {
        activateRange(json, subData);
        break;
      }
      case "SetClipboardText": {
        try {
          navigator.clipboard.writeText(json.Params.Text);
        } catch {
          alert(json.Params.Text);
        } finally {
          resumeRequest(RequestID, subData);
        }
        break;
      }
      case "GetClipboardText": {
        try {
          navigator.clipboard.readText().then((clipText) => resumeRequest(RequestID, subData, { Result: clipText })).catch(() => {
            resumeRequest(RequestID, subData);
          });
        } catch {
          resumeRequest(RequestID, subData);
        }
        break;
      }
      case "MessageBox":
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            MessageBox,
            {
              DlgType: json.Params.DlgType ? Number(json.Params.DlgType) : 0,
              from: from2,
              Message: json.Params.Message,
              Buttons: json.Params.Buttons,
              RequestID,
              onSelect: InputButton,
              setReturnValue: subData.func
            }
          ),
          {
            style: getStyleWindow("MessageBox"),
            hiddenButton: true,
            blockMaximize: true,
            blockSaveLocation: true,
            blockResize: true,
            Title: json.Params.DlgType ? TITLE_MESSAGE_MODAL_WINDOW[Number(json.Params.DlgType)] : TITLE_MESSAGE_MODAL_WINDOW[0],
            onClose: () => {
              InputButton({ target: { value: "2" } }, RequestID, subData.func, from2);
            }
          }
        );
        break;
      case "HideProgressDialog":
        const progressDialog = document.getElementById("footerProgress");
        if (progressDialog && progressDialog.firstChild) progressDialog.firstChild.remove();
        const ProgressDialogRef = document.getElementById("ProgressDialog" + RequestID);
        if (ProgressDialogRef && ProgressDialogRef.hideDialog) {
          ProgressDialogRef.hideDialog();
        }
        resumeRequest(RequestID, subData);
        break;
      case "ChangeStatusProgress":
        const footerProgressEl = document.getElementById("footerProgress");
        const footerProgressElRoot = footerProgressEl.root || clientExports.createRoot(footerProgressEl);
        footerProgressEl.root = footerProgressElRoot;
        footerProgressElRoot.render(
          /* @__PURE__ */ jsxRuntimeExports.jsx(ChangeStatusProgressFooter, { Json: json, setReturnValue: subData.func, from: from2, subData })
        );
        break;
      case "EditText":
        let Caption;
        Caption = json.Params.Caption;
        let WinTxt = /* @__PURE__ */ jsxRuntimeExports.jsx(
          WinForText,
          {
            Text: json.Params.Text,
            onSave: InputTextChange,
            RequestID,
            Title: Caption,
            func: subData.func
          }
        );
        CreateBackgroundForModal(
          WinTxt
          /* <ModalWindow
                         Title={Caption}
                         style={{ height: `${160}px`, width: `${300}px` }}
                         setReturnValue={subData.func}
                         hiddenButton={true}
                         headerButtons={[]}
                         resize={false}>
                         <Grid component={"form"} container direction="column" justifyContent="center" alignItems="center" spacing={2} style={{position:"absolute",left:"15px",top:"64px"}}>
                             <Grid item>
                                 <TextField id="input-text" name="input-text" label={Title} variant="outlined" fullWidth  />
                             </Grid>
                             <Grid item>
                                 <Button className="button_Modal_Select" size="small" style={{textTransform:"none"}}  variant="outlined" value={1} onClick={(e) => InputTextChange(e, RequestID)} >
                                     Ок
                                 </Button>
                                 <Button className="button_Modal_Select" size="small" style={{textTransform:"none", marginLeft:"10px"}}  variant="outlined" value={2} onClick={(e) => InputTextChange(e, RequestID)}>
                                     Отмена
                                     </Button>
                             </Grid>
                         </Grid>
                     </ModalWindow>   */
        );
        break;
      case "InputText":
        let inputTextEditor;
        if (json.Params.MultiLines === "1") {
          inputTextEditor = /* @__PURE__ */ jsxRuntimeExports.jsx(
            TextAreaWithButtons,
            {
              props: {
                Title: json.Params.Title,
                Value: json.Params.Text,
                maxLength: json.Params.Length,
                RequestID,
                func: subData.func,
                onEdit: (data2) => {
                  const json2 = resumeRequest(RequestID, subData, {
                    Text: data2.value,
                    Result: "1"
                  });
                  if (json2.NeedRefresh) data2.func(json2, data2);
                }
              }
            }
          );
        } else {
          inputTextEditor = /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogWithTextField,
            {
              props: {
                Title: json.Params.Title,
                Value: json.Params.Text,
                onSelect: (data2) => {
                  const json2 = resumeRequest(RequestID, subData, {
                    Text: data2.value,
                    Result: "1"
                  });
                  if (json2.NeedRefresh) data2.func(json2, data2);
                }
              }
            }
          );
        }
        CreateBackgroundForModal(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ModalWindow,
            {
              Title: json.Params.Caption,
              style: getStyleWindow(json.Params.MultiLines === "1" ? void 0 : "InputText"),
              hiddenButton: true,
              RequestID,
              onClose: () => {
                resumeRequest(RequestID, subData, {});
              },
              setReturnValue: subData.func,
              from: from2,
              children: inputTextEditor
            }
          )
        );
        break;
      case "ShowProgressDialog":
        const Path = json.Params.Path;
        const doc = document.getElementById("RenderModal");
        const docRoot = doc.root || clientExports.createRoot(doc);
        doc.root = docRoot;
        docRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(ModalProgress, { open: true, Json: json, path: Path, setReturnValue: subData.func, from: from2 }));
        break;
      case "SetProgressLabel":
        if (subData.from === "ModalProgress") {
          subData.func(json);
        } else {
          resumeRequest(RequestID, subData);
        }
        break;
      case "SelectFile":
        selectFile(json, subData);
        break;
      case "SelectFolder":
        resumeRequest(RequestID, subData, { Result: "1", Path: "" });
        break;
      case "GetFileSize":
        let size = subData.size;
        if (subData.props && subData.props.files) {
          for (const file of Object.values(subData.props.files)) {
            if (file.name === json.Params.FileName) size = file.size;
          }
        }
        InputButton({ target: { value: size } }, RequestID, subData.func, subData.from, subData.props);
        break;
      case "SelectObject":
        if (json.Params) {
          let DialogParam2 = GetDialogParam(
            json.Params.ObjType,
            json.Params.Module,
            json.Params.ObjRef,
            json.Params.RequestID,
            json.Params.OnlyView,
            json.Params.MultiSel
          );
          if (documentModal.includes(json.CLSID || DialogParam2.CLSID || "{7FAC2B20-109D-4406-A757-61674277B71F}")) {
            smetaModals.open(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                HandleTable,
                {
                  json: DialogParam2,
                  subData: {
                    props: {
                      SectionID: getModalSectionID(),
                      Buttons: json.Params.OnlyView === "1" ? 2 : void 0,
                      ...subData.props,
                      ...json.Params,
                      ...DialogParam2,
                      disiableState: true,
                      func: subData.func,
                      from: subData.from,
                      PlaneView: "0"
                    }
                  }
                }
              ),
              {
                Title: json.Title || DialogParam2.Title,
                callBacks: true,
                style: getStyleWindow(json.CLSID || DialogParam2.CLSID || "{7FAC2B20-109D-4406-A757-61674277B71F}"),
                // onSelect={InputButton}
                onClose: () => {
                  resumeRequest(RequestID, subData, {});
                }
              }
            );
          } else {
            CreateBackgroundForModal(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ModalWindow,
                {
                  Title: json.Title ? json.Title : DialogParam2.Title,
                  style: getStyleWindow(json.CLSID || DialogParam2.CLSID || "{7FAC2B20-109D-4406-A757-61674277B71F}"),
                  hiddenButton: true,
                  onClose: () => {
                    resumeRequest(RequestID, subData, {});
                  },
                  RequestID: json.Params ? json.Params.RequestID : void 0,
                  setReturnValue: subData.func,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    HandleTable,
                    {
                      json: DialogParam2,
                      subData: {
                        props: {
                          SectionID: getModalSectionID(),
                          Buttons: json.Params.OnlyView === "1" ? 2 : void 0,
                          ...subData.props,
                          ...json.Params,
                          ...DialogParam2,
                          disiableState: true,
                          func: subData.func,
                          from: subData.from,
                          PlaneView: "0"
                        }
                      }
                    }
                  )
                }
              )
            );
          }
        }
        break;
      case "SelectDocument":
        let subJson = json.jsonData ? json.jsonData : {};
        if (json.Params) {
          smetaModals.open(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              HandleTable,
              {
                json: {
                  ...json,
                  ...subJson,
                  CLSID: "{03338F11-FC1E-11D4-A605-0000E8D9CBDB}"
                },
                subData: {
                  props: {
                    SectionID: getModalSectionID(),
                    Buttons: json.Params.OnlyView === "1" ? 2 : void 0,
                    ...json.Params,
                    ...subData.props,
                    func: subData.func,
                    from: subData.from
                  }
                }
              }
            ),
            {
              Title: "Выбор документа",
              style: getStyleWindow("{03338F11-FC1E-11D4-A605-0000E8D9CBDB}"),
              callBacks: true,
              blockMaximize: true,
              onClose: () => {
                resumeRequest(RequestID, subData, {});
              }
            }
          );
        }
        break;
      case "PriviewDocument":
        CreateBackgroundForModal(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ModalWindow,
            {
              Title: json.Params.Title,
              style: getStyleWindow("{408E20A3-4BE3-4DCD-98BD-2613A8968783}"),
              hiddenButton: true,
              onClose: () => {
                resumeRequest(RequestID, subData, {});
              },
              RequestID,
              headerButtons: ["close", "maximize"],
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                HandleTable,
                {
                  json: {
                    ...json,
                    CLSID: "{408E20A3-4BE3-4DCD-98BD-2613A8968783}"
                  },
                  subData: {
                    props: {
                      ...subData.props,
                      Module: json.Module,
                      SectionID: getModalSectionID(),
                      func: subData.func,
                      from: subData.from,
                      CLSID: "{408E20A3-4BE3-4DCD-98BD-2613A8968783}",
                      ViewIdent: json.Params ? json.Params.ViewIdent : "",
                      content: json.content,
                      Buttons: -1,
                      NoContextMenu: true
                    }
                  }
                }
              )
            }
          )
        );
        break;
      case "ScrollToDocument":
        scrollToDocument(json, subData);
        break;
      case "SelectFromList":
        if (!json.Params) break;
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogSelectFromList,
            {
              props: {
                ...subData.props,
                sourName: json.Params.SourName,
                destName: json.Params.DestName,
                sourList: json.Params.SourList,
                destList: json.Params.DestList,
                RequestID: json.Params.RequestID
              }
            }
          ),
          {
            Title: json.Params.Title,
            style: getStyleWindow("SelectFromList"),
            onClose: () => {
              resumeRequest(RequestID, subData, {});
            }
          }
        );
        break;
      case "HandleTable":
        if (documentModal.includes(json.CLSID || json.DlgType)) {
          smetaModals.open(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              HandleTable,
              {
                json,
                subData: {
                  props: {
                    ...subData.props,
                    SectionID: getModalSectionID(),
                    func: subData.func,
                    from: subData.from
                  }
                }
              }
            ),
            {
              Title: json.Title,
              style: getStyleWindow(json.CLSID || json.DlgType),
              callBacks: true,
              onClose: () => {
                var _a3, _b2;
                (_b2 = (_a3 = subData == null ? void 0 : subData.props) == null ? void 0 : _a3.onClose) == null ? void 0 : _b2.call(_a3);
                resumeRequest(RequestID, subData, {});
              }
            }
          );
        } else {
          CreateBackgroundForModal(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ModalWindow,
              {
                Title: json.Title,
                style: getStyleWindow(json.CLSID ? json.CLSID : json.DlgType),
                hiddenButton: true,
                onClose: () => {
                  var _a3, _b2;
                  (_b2 = (_a3 = subData == null ? void 0 : subData.props) == null ? void 0 : _a3.onClose) == null ? void 0 : _b2.call(_a3);
                  resumeRequest(RequestID, subData, {});
                },
                RequestID: json.Params ? json.Params.RequestID : void 0,
                setReturnValue: subData.func,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                  HandleTable,
                  {
                    json,
                    subData: {
                      props: {
                        ...subData.props,
                        SectionID: getModalSectionID(),
                        func: subData.func,
                        from: subData.from
                      }
                    }
                  }
                )
              }
            )
          );
        }
        break;
      case "SelectSequence":
        SequenceGetParams({
          Name: (_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.Items,
          GetNumMode: "1"
        }).then((res) => {
          var _a3;
          smetaModals.open(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              DialogDocNumbering,
              {
                props: {
                  Sequence: (_a3 = json == null ? void 0 : json.Params) == null ? void 0 : _a3.Items,
                  res
                }
              }
            ),
            {
              Title: "Нумерация",
              style: getStyleWindow("sequence"),
              onClose: () => {
                resumeRequest(RequestID, subData);
              }
            }
          );
        });
        break;
      case "FindDuplicates":
        resumeRequest(RequestID, subData);
        break;
      case "StepProgress":
        if (subData.from === "ModalProgress") {
          subData.func(json);
        } else {
          resumeRequest(RequestID, subData);
        }
        break;
      case "AddressEditKladrObj":
        CreateBackgroundForModal(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ModalWindow,
            {
              Title: json.Params.Title,
              style: getStyleWindow(),
              hiddenButton: true,
              onClose: () => {
                resumeRequest(RequestID, subData, {});
              },
              RequestID: json.Params.RequestID,
              setReturnValue: subData.func,
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                DialogKldr,
                {
                  Module: json.Module,
                  ObjType: json.Params.Level,
                  Code: json.Params.Code,
                  RecordIndex: json.Params.RecordIndex && Number(json.Params.RecordIndex) >= 0 ? json.Params.RecordIndex : "0",
                  RequestID: json.Params.RequestID,
                  data: subData.props,
                  SectionID: getModalSectionID(),
                  func: subData.func
                }
              )
            }
          )
        );
        break;
      case "GetFileStream":
        let FileName = json.Params.FileName, data, RCDATAlocal = "", params2 = /* @__PURE__ */ new Map();
        if (subData.props && subData.props.files) {
          if (subData.props && subData.props.files) {
            for (const [index2, file] of Object.entries(subData.props.files)) {
              if (index2 === FileName) RCDATAlocal = file.rcdata;
            }
          }
          params2.set("prefix", "project");
          params2.set("comand", "ResumeRequest");
          params2.set("RequestID", RequestID);
          params2.set("WSM", "1");
          data = { RCDATA: RCDATAlocal };
          AxiosRequest(true, params2, data).then((res) => {
            tokenProcessingTest(res, subData);
          }).catch((reason) => {
            const {
              response: { status, statusText }
            } = reason;
            return raiseTokenError({
              message: `${status}: ${statusText}`,
              subData,
              reqId: RequestID
            });
          });
        } else {
          const errMessage = "Файл не найден в памяти, либо файл в другой цепочке запросов";
          return raiseTokenError({
            message: errMessage,
            subData,
            reqId: RequestID
          });
        }
        break;
      case "FileExists":
        resumeRequest(RequestID, subData, { Result: "1" });
        break;
      case "ExecuteParamDialog":
        SetLoadingCursor(true, void 0, true);
        let params1 = /* @__PURE__ */ new Map(), json1;
        params1.set("prefix", "programs");
        params1.set("comand", "GetParamDialog");
        params1.set("GroupID", "0");
        params1.set("Path", json.Params.Path);
        params1.set("NeedRefresh", "1");
        json1 = XMLrequest(params1);
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogParams,
            {
              props: {
                Module: "programs",
                reqCommand: "GetParamDialog",
                GroupID: "0",
                Path: json.Params.Path,
                RequestID: json.Params.RequestID,
                setReturnValue: subData.func,
                from: from2,
                func: subData.func,
                data: json1,
                NoTitle: !json1.Title,
                NoHistory: true,
                ExecEvent: (_b = json == null ? void 0 : json.Params) == null ? void 0 : _b.ExecEvent,
                onSelect: InputButton,
                onClose: () => resumeRequest(RequestID, subData, {})
              }
            }
          ),
          {
            Title: json1.Caption,
            style: getStyleWindow("params"),
            hiddenButton: true,
            onClose: () => resumeRequest(RequestID, subData, {})
          }
        );
        break;
      case "ExecuteModalDialog":
        if (json.Params.CLSID === ViewClass.Forms) {
          let setForm = function(data2) {
          };
          let height2, width2;
          const path = json.jsonData.Form.Path;
          let formsContent = json.jsonData;
          height2 = (parseInt(GetParams(json.jsonData.Form, "Height")) + 111).toString();
          width2 = (parseInt(GetParams(json.jsonData.Form, "Width")) * 1.05).toString();
          if (json.jsonData.Form.Height === void 0) {
            height2 = GetParams(json.jsonData, "Height");
            width2 = GetParams(json.jsonData, "Width");
          }
          height2 = Number(height2) > window.innerHeight ? window.innerHeight : height2;
          const onSelect = async (val) => {
            const json2 = await resumeRequest(RequestID, subData, { Result: val });
            tokenProcessingTest(json2, subData);
          };
          smetaModals.open(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              FormsMainFile,
              {
                id: subData.propsId || subData.idModal || subData.id,
                SubDataProcessing: json.jsonData.Form.Height === void 0,
                jsonFormData: formsContent,
                setForm,
                closeQuery: (data2) => {
                  resumeRequest(RequestID, subData, { Result: data2.Result });
                },
                path
              }
            ),
            {
              id: path,
              hiddenButton: !json.Params.Buttons && true,
              Title: json.Params.Caption,
              style: { height: `${height2}px`, width: `${width2}px` },
              onSelect,
              onClose: onSelect,
              Buttons: json,
              callBacks: true
              // closingQuery: closingQuery,
            }
          );
        } else {
          let excProps = { Token: "ExecuteModalDialog" };
          if (json.jsonData) excProps = { ...excProps, ...json.jsonData };
          if (json.Params) excProps = { ...excProps, ...json.Params };
          if (excProps.CLSID === "{010C6A4E-4954-4380-9E9F-40712B45D0DE}") excProps.Module = Prefixes.acctools;
          if (documentModal.includes(json.Params.CLSID)) {
            smetaModals.open(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                HandleTable,
                {
                  json: excProps,
                  subData: {
                    props: {
                      ...excProps,
                      SectionID: getModalSectionID(),
                      func: subData.func,
                      from: subData.from
                      // htmlInput: json.jsonData.content,
                      // caption: json.Params.Caption,
                      // RequestID: json.Params.RequestID,
                    }
                  }
                }
              ),
              {
                Title: json.Params.Caption,
                style: getStyleWindow(json.Params.CLSID),
                callBacks: true,
                onClose: () => {
                  resumeRequest(RequestID, subData, {});
                }
              }
            );
          } else {
            CreateBackgroundForModal(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ModalWindow,
                {
                  Title: json.Params.Caption,
                  style: getStyleWindow(json.Params.CLSID),
                  hiddenButton: true,
                  onClose: InputButton,
                  from: from2,
                  setReturnValue: subData.func,
                  RequestID: json.Params.RequestID,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    HandleTable,
                    {
                      json: excProps,
                      subData: {
                        props: {
                          ...excProps,
                          SectionID: getModalSectionID(),
                          func: subData.func,
                          from: subData.from
                          // htmlInput: json.jsonData.content,
                          // caption: json.Params.Caption,
                          // RequestID: json.Params.RequestID,
                        }
                      }
                    }
                  )
                }
              )
            );
          }
        }
        break;
      case "ExposeDocument":
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            HandleTable,
            {
              json: {
                ...json.Params,
                CLSID: "{48C155C0-1336-11D6-9CF2-DB1D5BC3046D}"
              },
              subData: {
                props: {
                  ...json.Params,
                  Module: json.Module,
                  Buttons: 2,
                  SectionID: getModalSectionID(),
                  PlaneView: "1",
                  detailsOpen: true,
                  func: subData.func,
                  from: subData.from
                  // htmlInput: json.jsonData.content,
                  // caption: json.Params.Caption,
                  // RequestID: json.Params.RequestID,
                }
              }
            }
          ),
          {
            Title: "Документ",
            style: getStyleWindow("{48C155C0-1336-11D6-9CF2-DB1D5BC3046D}"),
            callBacks: true,
            onClose: () => {
              resumeRequest(RequestID, subData, {});
            },
            blockMaximize: true
          }
        );
        break;
      case "EditDocumentField":
        let DialogParam = GetDialogParam(subData.props.ObjType, subData.props.Module, subData.props.ObjRef);
        const subDataProps = {
          props: {
            ...subData.props,
            RequestID,
            SectionID: getModalSectionID(),
            func: subData.func,
            from: subData.from,
            callBacks: true,
            addInfo: {
              ...subData.props.addInfo,
              needPost: true
            }
          }
        };
        if (documentModal.includes(DialogParam.CLSID)) {
          smetaModals.open(/* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json: DialogParam, subData: subDataProps }), {
            Title: DialogParam.Title,
            style: getStyleWindow(DialogParam.CLSID),
            onClose: () => {
              resumeRequest(RequestID, subData, {});
            }
          });
        } else {
          CreateBackgroundForModal(
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              ModalWindow,
              {
                Title: DialogParam.Title,
                style: getStyleWindow(DialogParam.CLSID),
                hiddenButton: true,
                onClose: () => {
                  resumeRequest(RequestID, subData, {});
                },
                from: from2,
                setReturnValue: subData.func,
                RequestID,
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(HandleTable, { json: DialogParam, subData: subDataProps })
              }
            )
          );
        }
        break;
      case "ShellExecute":
        shellExecute(json, subData, RequestID);
        break;
      case "SelectListIndex":
        if (!json || !json.Params) break;
        const matches = (_c = json.Params.Items) == null ? void 0 : _c.match(/[а-я\s\d\-\_\\\.\*\+\?\^\$\{\}\(\)\<\>\|\[\]\№\#]+/gi);
        if (!matches) break;
        const items = matches.map((item, index2) => {
          return { text: item.replaceAll('"', ""), id: index2, padding: item.match(/[\s]{6}/) ? "40px" : "" };
        });
        const onCloseSelectListIndex = () => resumeRequest(json.Params.RequestID, { target: { value: "2" } }, void 0);
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            DialogSetObjText,
            {
              list: items,
              RequestID: json.Params.RequestID,
              func: subData.func,
              from: from2,
              onClose: onCloseSelectListIndex
            }
          ),
          {
            Title: json.Params.Caption,
            style: getStyleWindow(),
            hiddenButton: true,
            blockMaximize: true,
            onClose: onCloseSelectListIndex
          }
        );
        break;
      case "GetDirectory":
        resumeRequest(RequestID, subData);
        break;
      case "OutPutText":
        outPutShow(json.Params.Text ?? "");
        resumeRequest(RequestID, subData);
        break;
      case "ClearOutPut": {
        outPutShow();
        resumeRequest(RequestID, subData);
        break;
      }
      case "PutFileStream":
        resumeRequest(RequestID, { ...subData, RCDATA: json.RCDATA });
        break;
      case "GetCertificateList":
        subData.func;
        executeCertList().then((value) => {
          handleMessageList(value, subData, RequestID);
        }).catch((error) => {
          const errorResumeRequest2 = () => {
            resumeRequest(RequestID, subData, {
              Error: "1",
              $content: error || "Ошибка получения списка сертификатов"
            });
          };
          if (!CheckWorkSpace(errorResumeRequest2)) return;
          renderMessageBox({
            dlgType: 1,
            buttons: 1,
            message: error || "Ошибка получения списка сертификатов",
            closeF: errorResumeRequest2,
            selectF: errorResumeRequest2
          });
        });
        break;
      case "ClientSignStream":
        subData.func;
        executeDetachedTest(json.Params.Serial, json.RCDATA).then((value) => {
          handleMessageSign(value, RequestID, subData);
        }).catch((error) => {
          const errorResumeRequest2 = () => {
            resumeRequest(RequestID, subData, { Error: "1", $content: error });
          };
          if (!CheckWorkSpace(errorResumeRequest2)) return;
          renderMessageBox({
            dlgType: 1,
            buttons: 1,
            message: error,
            closeF: errorResumeRequest2,
            selectF: errorResumeRequest2
          });
        });
        break;
      case "cryptox509_loadbyserialnumber": {
        loadBySerialNumber(json, subData);
        break;
      }
      case "SignDialog":
        CreateBackgroundForModal(
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            ModalWindow,
            {
              Title: "Подпись",
              resize: false,
              style: getStyleWindow(),
              hiddenButton: true,
              onClose: InputButton,
              setReturnValue: subData.func,
              from: from2,
              RequestID: json.Params.RequestID,
              children: /* @__PURE__ */ jsxRuntimeExports.jsx(SignDialog, { content: json.content, ...json.Params, subData })
            }
          )
        );
        break;
      case "ClientValidateStream":
        const errorResumeRequest = () => {
          resumeRequest(RequestID, subData, { Error: "1", $content: "Валидация подписи не удалась" });
        };
        if (!CheckWorkSpace(errorResumeRequest)) return;
        webkcrypt_invoke$1(
          "webkcrypt-pkcs7-verify",
          {
            pkcs7: {
              value: json.RCDATA,
              "image-length": json.Params.Size ? Number(json.Params.Size) : 0
            }
          },
          (eventVerify) => {
            if (eventVerify.data.invoke.out.failed === 0)
              resumeRequest(json.Params.RequestID, subData, {
                Info: eventVerify.data.invoke.out.value.hint
              });
            else errorResumeRequest();
          }
        );
        break;
      case "ShowDataSet":
        switch (json.Params.DlgType) {
          case "1":
            CreateBackgroundForModal(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ModalWindow,
                {
                  Title: json.Params.Title,
                  style: getStyleWindow("ShowDataSet"),
                  hiddenButton: true,
                  onClose: () => {
                    resumeRequest(RequestID, subData, {});
                  },
                  from: from2,
                  setReturnValue: subData.func,
                  RequestID: json.Params.RequestID,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    DialogCert,
                    {
                      Module: "cert",
                      Path: json.Params.Path,
                      RecordIndex: json.Params.RecordIndex,
                      RequestID: json.Params.RequestID,
                      setReturnValue: subData.func,
                      style: { height: 300, width: 500 },
                      SectionID: getModalSectionID(),
                      from: subData.from
                    }
                  )
                }
              )
            );
            break;
          case "2":
            let onSelectTree = function(tree, data2, selection) {
              if (tree) {
                let item = tree.querySelector(".tree-item-selected");
                if (item) {
                  let id = item.id;
                  let text = item.querySelector(`#text-tree-item_${id}`).innerText;
                  const res = { Result: id };
                  if (data2.MultiSel) {
                    res.Selection = selection;
                  }
                  let params22 = /* @__PURE__ */ new Map();
                  params22.set("prefix", "project");
                  params22.set("comand", "ResumeRequest");
                  params22.set("RequestID", json.Params.RequestID);
                  params22.set("WSM", "1");
                  let otv = XMLrequest(params22, res);
                  tokenProcessingTest(otv, {
                    func: data2.func,
                    from: data2.from
                  });
                  if (data2.input) data2.input.dataset.objref = id;
                  if (data2.setValue) data2.setValue({ label: text, id });
                  if (data2.setInputValue) data2.setInputValue(text);
                }
              }
            };
            CreateBackgroundForModal(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ModalWindow,
                {
                  Title: json.Params.Title,
                  style: getStyleWindow("ShowDataSet"),
                  hiddenButton: true,
                  onClose: () => {
                    resumeRequest(RequestID, subData, {});
                  },
                  setReturnValue: subData.func,
                  from: from2,
                  RequestID: json.Params.RequestID,
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    Tree,
                    {
                      props: {
                        ...subData.props,
                        RequestID,
                        CLSID: json.CLSID,
                        Module: json.Module,
                        SectionID: getModalSectionID(),
                        ...json.Params,
                        MultiSel: json.Params.MultiSel ? json.Params.MultiSel : json.Params.CanMultiSel,
                        ObjRef: json.Params.ObjRef ? json.Params.ObjRef : "0",
                        Current: json.Params.ObjRef ? json.Params.ObjRef : "0",
                        UsedDate: "0",
                        Info: "0",
                        Internal: "0",
                        showButtons: true,
                        setInputValue: subData.setInputValue,
                        setValue: subData.setValue,
                        onSelect: onSelectTree,
                        from: subData.from,
                        func: subData.func
                      }
                    }
                  )
                }
              )
            );
            break;
          default:
            CreateBackgroundForModal(
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                ModalWindow,
                {
                  Title: json.Params.Title,
                  style: getStyleWindow(),
                  hiddenButton: true,
                  from: from2,
                  setReturnValue: subData.func,
                  onClose: () => {
                    resumeRequest(RequestID, subData, {});
                  },
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(
                    DialogBook,
                    {
                      props: {
                        ...subData.props,
                        from: subData.from,
                        func: subData.func,
                        Module: json.Module,
                        Path: json.Params.Path,
                        RequestID: json.Params.RequestID,
                        ObjRef: json.Params.RecordIndex,
                        selectKey: "RecordIndex",
                        SectionID: getModalSectionID()
                      }
                    }
                  )
                }
              )
            );
            break;
        }
        break;
      case "Navigate":
        const sideBarData = smetaStore.get(sectionListAtom);
        if (json.Params.PageID === "-2" && sideBarData[sideBarData.length - 1].ID !== "-2") {
          smetaStore.set(pushNewSectionAtom, {
            CLSID: "{D22DFDA0-DB27-4FB4-865F-B478DB85F2A4}",
            ID: "-2",
            Name: "Фоновые процессы"
          });
        }
        smetaStore.set(setSelectedSectionAtom, getSectionByID(json.Params.PageID));
        resumeRequest(RequestID, subData);
        break;
      case "ClearFormOnSection":
        updateSection(json.Params.SectionID, "");
        resumeRequest(RequestID, subData);
        break;
      case "CommitFormOnSection":
        updateSection(json.Params.SectionID, json.Params.Section);
        setTimeout(() => {
          resumeRequest(RequestID, subData);
        }, 1250);
        break;
      case "RefreshDocument": {
        refreshDocument(json, subData);
        break;
      }
      case "CommitFormOnHead": {
        commitFormOnHead(json, subData);
        break;
      }
      case "ClearFormOnHead": {
        clearFormOnHead(json, subData);
        break;
      }
      default:
        resumeRequest(RequestID, subData);
    }
  } else {
    let docs2 = document.getElementById("footerProgress");
    docs2.innerHTML = "";
    const footerProgressEl = document.getElementById("footerProgress");
    const footerProgressElRoot = footerProgressEl.root || clientExports.createRoot(footerProgressEl);
    footerProgressEl.root = footerProgressElRoot;
    footerProgressElRoot.render(/* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {}));
    const Mask = document.getElementById("loadmask");
    if (Mask) {
      Mask.remove();
    }
    if (!isEmptyObject(json)) {
      if (!isEmptyObject(json.Form) || json.ViewIdent !== void 0) {
        subData.func(json);
      } else if (!isEmptyObject(json)) {
        if (subData.func) {
          subData.func(json);
        }
      }
    } else if (subData.from === "grid" && subData.func) {
      subData.func(json);
    }
  }
}
function showContent({ data, rcdata, mimeType, subData }) {
  var _a2, _b;
  if (mimeType === false) return true;
  if (mimeType.includes("png") || mimeType.includes("jpg") || mimeType.includes("jpeg")) {
    const myImage = new Image();
    try {
      myImage.onload = function() {
        const orientationVertical = myImage.naturalHeight > myImage.naturalWidth;
        smetaModals.open(
          /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { display: "inline-flex", width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx("img", { src: mimeType + rcdata }) }),
          {
            Title: "Предпросмотр картинки",
            Buttons: {
              jsonData: {
                Кнопка$Выбрать: "Скачать",
                Кнопка$Отмена: "Закрыть"
              },
              Params: { Buttons: 3 }
            },
            style: {
              width: `${orientationVertical ? window.innerHeight * 0.3 : window.innerHeight * 0.75}px`,
              height: `${window.innerHeight * 0.75}px`
            },
            blockMaximize: true,
            onSelect: () => {
              downloadFile(mimeType + rcdata, data, subData);
            },
            onClose: () => {
              var _a3, _b2;
              if ((_a3 = data == null ? void 0 : data.Params) == null ? void 0 : _a3.RequestID) resumeRequest((_b2 = data == null ? void 0 : data.Params) == null ? void 0 : _b2.RequestID, subData);
            }
          }
        );
      };
      myImage.src = mimeType + rcdata;
      return false;
    } catch {
      downloadFile(mimeType + rcdata, data, subData);
      if ((_a2 = data == null ? void 0 : data.Params) == null ? void 0 : _a2.RequestID) resumeRequest((_b = data == null ? void 0 : data.Params) == null ? void 0 : _b.RequestID, subData);
    }
  } else {
    return true;
  }
}
function downloadFile(RCDATA, json, subData) {
  var _a2, _b;
  let fileNameShell = json.Params.FileName;
  fileNameShell = fileNameShell.split("\\");
  const a2 = document.createElement("a");
  a2.href = RCDATA;
  a2.download = fileNameShell.slice(-1)[0];
  a2.click();
  if ((_a2 = json == null ? void 0 : json.Params) == null ? void 0 : _a2.RequestID) resumeRequest((_b = json == null ? void 0 : json.Params) == null ? void 0 : _b.RequestID, subData);
}
const baseUrl = window.location.port === "3000" ? `https://stim-srv.krista.ru/web~` : window.location.origin + "/web~";
const checkServerAnswer$1 = (json) => {
  var _a2, _b, _c, _d, _e, _f, _g;
  if ((_b = (_a2 = json.data) == null ? void 0 : _a2.Message) == null ? void 0 : _b.content) {
    renderMessageBox({
      dlgType: 2,
      buttons: 1,
      message: json.data.Message.content
    });
    delete json.data.Message;
  }
  if (((_c = json.data) == null ? void 0 : _c.error) && !((_e = (_d = json.data) == null ? void 0 : _d.error) == null ? void 0 : _e.NeedNewPW) && !((_g = (_f = json.data) == null ? void 0 : _f.error) == null ? void 0 : _g.LicRes)) {
    renderMessageBox({ dlgType: 1, buttons: 1, message: json.data.error.content });
    delete json.data.error;
  }
  return json;
};
const customAxios = axios.create({
  baseURL: baseUrl,
  paramsSerializer: (params2) => {
    const encodeParams = Object.entries(params2).reduce((acc, [key, value]) => {
      if (typeof value === "string") {
        acc[key] = value.replaceAll("/", "%2F");
      } else acc[key] = value;
      return acc;
    }, {});
    return qs.stringify(encodeParams, { encode: false }).replaceAll(/ /g, "%20");
  }
});
customAxios.interceptors.request.use(
  function(config2) {
    var _a2;
    if (config2.baseURL) config2.baseURL += config2.prefix || Prefixes.default;
    if (!((_a2 = config2.params) == null ? void 0 : _a2.LicGUID)) {
      const licGuid = sessionStorage.getItem("LicG");
      config2.params = { ...config2.params, LicGUID: licGuid };
    }
    if (config2.loadMask) config2.loadMask = setLoadingCursorAxios();
    document.body.setAttribute("data-locked", "true");
    return config2;
  },
  function(error) {
    document.body.setAttribute("data-locked", "false");
    const config2 = error.config;
    if (config2 && config2.loadMask) config2.loadMask.remove();
    console.log(error);
    return Promise.reject(error);
  }
);
customAxios.interceptors.response.use(
  function(response) {
    document.body.setAttribute("data-locked", "false");
    const config2 = response.config;
    const checkedResp = checkServerAnswer$1(response);
    const pingInterval = smetaStore.get(pingIntervalAtom);
    if (pingInterval) clearInterval(pingInterval);
    smetaStore.set(pingIntervalAtom, createPingInterval);
    if (config2 && config2.loadMask) config2.loadMask.remove();
    return checkedResp;
  },
  function(error) {
    document.body.setAttribute("data-locked", "false");
    const config2 = error.config;
    if (config2 && config2.loadMask) config2.loadMask.remove();
    return Promise.reject(error);
  }
);
const _API = class _API {
  static queue(promise) {
    return new Promise((resolve, reject) => {
      _API.current_queue.push({
        promise,
        resolve,
        reject
      });
      _API.dequeue();
    });
  }
  static retry() {
    clearTimeout(_API.retryTimeout);
    console.log("Пробую переподключится к интернету!");
    _API.retryTimeout = setTimeout(() => _API.dequeue(), 5e3);
  }
  static dequeue() {
    if (this.workingOnPromise) {
      return false;
    }
    if (window.navigator && !window.navigator.onLine) {
      return _API.retry();
    }
    const item = _API.current_queue.shift();
    if (!item) {
      return false;
    }
    this.workingOnPromise = true;
    item.promise().then((value) => _API.afterPromise(item, true, value)).catch((error) => _API.afterPromise(item, false, error));
    return true;
  }
  static debug() {
    return new Promise((res) => setTimeout(() => res("Completed"), 2e3));
  }
  static async request(config2) {
    return this.http(config2).then((response) => response.data).catch((error) => Promise.reject(error));
  }
};
_API.current_queue = [];
_API.pendingPromise = false;
_API.http = customAxios;
_API.retryTimeout = null;
_API.workingOnPromise = false;
_API.afterPromise = (item, resolve = false, data) => {
  _API.workingOnPromise = false;
  if (resolve) item.resolve(data);
  else item.reject(data);
  _API.dequeue();
};
let API = _API;
const smetaAxios = (config2) => {
  return API.queue(() => API.request({ ...config2, data: JSON.stringify(config2.data || {}) }));
};
smetaAxios.get = (url = "", config2) => {
  return API.queue(() => API.request({ method: "get", url, ...config2 }));
};
smetaAxios.post = (url = "", data = {}, config2) => {
  return API.queue(() => API.request({ method: "post", url, data: JSON.stringify(data), ...config2 }));
};
const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);
let idbProxyableTypes;
let cursorAdvanceMethods;
function getIdbProxyableTypes() {
  return idbProxyableTypes || (idbProxyableTypes = [
    IDBDatabase,
    IDBObjectStore,
    IDBIndex,
    IDBCursor,
    IDBTransaction
  ]);
}
function getCursorAdvanceMethods() {
  return cursorAdvanceMethods || (cursorAdvanceMethods = [
    IDBCursor.prototype.advance,
    IDBCursor.prototype.continue,
    IDBCursor.prototype.continuePrimaryKey
  ]);
}
const transactionDoneMap = /* @__PURE__ */ new WeakMap();
const transformCache = /* @__PURE__ */ new WeakMap();
const reverseTransformCache = /* @__PURE__ */ new WeakMap();
function promisifyRequest(request) {
  const promise = new Promise((resolve, reject) => {
    const unlisten = () => {
      request.removeEventListener("success", success);
      request.removeEventListener("error", error);
    };
    const success = () => {
      resolve(wrap(request.result));
      unlisten();
    };
    const error = () => {
      reject(request.error);
      unlisten();
    };
    request.addEventListener("success", success);
    request.addEventListener("error", error);
  });
  reverseTransformCache.set(promise, request);
  return promise;
}
function cacheDonePromiseForTransaction(tx) {
  if (transactionDoneMap.has(tx))
    return;
  const done = new Promise((resolve, reject) => {
    const unlisten = () => {
      tx.removeEventListener("complete", complete);
      tx.removeEventListener("error", error);
      tx.removeEventListener("abort", error);
    };
    const complete = () => {
      resolve();
      unlisten();
    };
    const error = () => {
      reject(tx.error || new DOMException("AbortError", "AbortError"));
      unlisten();
    };
    tx.addEventListener("complete", complete);
    tx.addEventListener("error", error);
    tx.addEventListener("abort", error);
  });
  transactionDoneMap.set(tx, done);
}
let idbProxyTraps = {
  get(target, prop, receiver) {
    if (target instanceof IDBTransaction) {
      if (prop === "done")
        return transactionDoneMap.get(target);
      if (prop === "store") {
        return receiver.objectStoreNames[1] ? void 0 : receiver.objectStore(receiver.objectStoreNames[0]);
      }
    }
    return wrap(target[prop]);
  },
  set(target, prop, value) {
    target[prop] = value;
    return true;
  },
  has(target, prop) {
    if (target instanceof IDBTransaction && (prop === "done" || prop === "store")) {
      return true;
    }
    return prop in target;
  }
};
function replaceTraps(callback) {
  idbProxyTraps = callback(idbProxyTraps);
}
function wrapFunction(func) {
  if (getCursorAdvanceMethods().includes(func)) {
    return function(...args) {
      func.apply(unwrap(this), args);
      return wrap(this.request);
    };
  }
  return function(...args) {
    return wrap(func.apply(unwrap(this), args));
  };
}
function transformCachableValue(value) {
  if (typeof value === "function")
    return wrapFunction(value);
  if (value instanceof IDBTransaction)
    cacheDonePromiseForTransaction(value);
  if (instanceOfAny(value, getIdbProxyableTypes()))
    return new Proxy(value, idbProxyTraps);
  return value;
}
function wrap(value) {
  if (value instanceof IDBRequest)
    return promisifyRequest(value);
  if (transformCache.has(value))
    return transformCache.get(value);
  const newValue = transformCachableValue(value);
  if (newValue !== value) {
    transformCache.set(value, newValue);
    reverseTransformCache.set(newValue, value);
  }
  return newValue;
}
const unwrap = (value) => reverseTransformCache.get(value);
function openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {
  const request = indexedDB.open(name, version);
  const openPromise = wrap(request);
  if (upgrade) {
    request.addEventListener("upgradeneeded", (event) => {
      upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);
    });
  }
  if (blocked) {
    request.addEventListener("blocked", (event) => blocked(
      // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
      event.oldVersion,
      event.newVersion,
      event
    ));
  }
  openPromise.then((db) => {
    if (terminated)
      db.addEventListener("close", () => terminated());
    if (blocking) {
      db.addEventListener("versionchange", (event) => blocking(event.oldVersion, event.newVersion, event));
    }
  }).catch(() => {
  });
  return openPromise;
}
const readMethods = ["get", "getKey", "getAll", "getAllKeys", "count"];
const writeMethods = ["put", "add", "delete", "clear"];
const cachedMethods = /* @__PURE__ */ new Map();
function getMethod(target, prop) {
  if (!(target instanceof IDBDatabase && !(prop in target) && typeof prop === "string")) {
    return;
  }
  if (cachedMethods.get(prop))
    return cachedMethods.get(prop);
  const targetFuncName = prop.replace(/FromIndex$/, "");
  const useIndex = prop !== targetFuncName;
  const isWrite = writeMethods.includes(targetFuncName);
  if (
    // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
    !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) || !(isWrite || readMethods.includes(targetFuncName))
  ) {
    return;
  }
  const method = async function(storeName, ...args) {
    const tx = this.transaction(storeName, isWrite ? "readwrite" : "readonly");
    let target2 = tx.store;
    if (useIndex)
      target2 = target2.index(args.shift());
    return (await Promise.all([
      target2[targetFuncName](...args),
      isWrite && tx.done
    ]))[0];
  };
  cachedMethods.set(prop, method);
  return method;
}
replaceTraps((oldTraps) => ({
  ...oldTraps,
  get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),
  has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop)
}));
const advanceMethodProps = ["continue", "continuePrimaryKey", "advance"];
const methodMap = {};
const advanceResults = /* @__PURE__ */ new WeakMap();
const ittrProxiedCursorToOriginalProxy = /* @__PURE__ */ new WeakMap();
const cursorIteratorTraps = {
  get(target, prop) {
    if (!advanceMethodProps.includes(prop))
      return target[prop];
    let cachedFunc = methodMap[prop];
    if (!cachedFunc) {
      cachedFunc = methodMap[prop] = function(...args) {
        advanceResults.set(this, ittrProxiedCursorToOriginalProxy.get(this)[prop](...args));
      };
    }
    return cachedFunc;
  }
};
async function* iterate(...args) {
  let cursor2 = this;
  if (!(cursor2 instanceof IDBCursor)) {
    cursor2 = await cursor2.openCursor(...args);
  }
  if (!cursor2)
    return;
  cursor2 = cursor2;
  const proxiedCursor = new Proxy(cursor2, cursorIteratorTraps);
  ittrProxiedCursorToOriginalProxy.set(proxiedCursor, cursor2);
  reverseTransformCache.set(proxiedCursor, unwrap(cursor2));
  while (cursor2) {
    yield proxiedCursor;
    cursor2 = await (advanceResults.get(proxiedCursor) || cursor2.continue());
    advanceResults.delete(proxiedCursor);
  }
}
function isIteratorProp(target, prop) {
  return prop === Symbol.asyncIterator && instanceOfAny(target, [IDBIndex, IDBObjectStore, IDBCursor]) || prop === "iterate" && instanceOfAny(target, [IDBIndex, IDBObjectStore]);
}
replaceTraps((oldTraps) => ({
  ...oldTraps,
  get(target, prop, receiver) {
    if (isIteratorProp(target, prop))
      return iterate;
    return oldTraps.get(target, prop, receiver);
  },
  has(target, prop) {
    return isIteratorProp(target, prop) || oldTraps.has(target, prop);
  }
}));
const initDB = async (dbName, storeName) => {
  const db = await openDB(dbName, 1, {
    upgrade(db2) {
      if (!db2.objectStoreNames.contains(storeName)) {
        db2.createObjectStore(storeName, { keyPath: "id", autoIncrement: true });
      }
    }
  });
  return db;
};
const saveDataBD = async (dbName, storeName, data) => {
  const db = await initDB(dbName, storeName);
  const tx = db.transaction(storeName, "readwrite");
  const store = tx.objectStore(storeName);
  await store.add(data);
  await tx.done;
};
const getAllDataBD = async (dbName, storeName) => {
  const db = await initDB(dbName, storeName);
  return await db.getAll(storeName);
};
let resultArray;
const defaultFieldInfo = {
  options: getParamColumnsOptions(0),
  Values: []
};
function isEmptyObject(obj2) {
  for (const i in obj2) {
    if (obj2.hasOwnProperty(i)) {
      return false;
    }
  }
  return true;
}
const handleFiles = async (fileList) => {
  if (!fileList || !fileList[0]) return { finalData: {}, filesNames: [] };
  const files = Array.from(fileList);
  const getFileName = (name) => name === "image.png" ? `Рисунок${getStrDateOfDateObj()}${dayjs().format("HH.mm")}.png` : name;
  const filesNames = files.map((file) => getFileName(file.name));
  const filesData = await Promise.all(files.map((file) => getBase64ByFileReader(file)));
  const finalData = filesData.reduce((acc, fileData, index2) => {
    const { name, size } = files[index2];
    const { rcdata, fileType } = fileData;
    const fixedName = getFileName(name);
    return {
      ...acc,
      [fixedName]: {
        size,
        rcdata,
        fileType,
        name: fixedName
      }
    };
  }, {});
  return {
    finalData,
    filesNames
  };
};
const selectNewLicenseToInstall = async () => {
  const licenseFile = await buildFileSelector({ filter: ".lic" });
  return licenseFile;
};
const selectOrg = ({
  drx = "",
  user = ""
}) => {
  return new Promise(async (resolve) => {
    var _a2;
    if (!drx) return resolve(null);
    const config2 = {
      params: {
        configName: encodeURIComponent(drx),
        userName: encodeURIComponent(user)
      }
    };
    const resp = await smetaAxios.get("GetOrgClsList", config2);
    const items = ((_a2 = resp == null ? void 0 : resp.Items) == null ? void 0 : _a2.items) ?? [];
    if (items.length === 0 || items.length === 1 && isEmptyObject(items[0])) return resolve({ config: drx });
    const list = items.map((val) => {
      return {
        text: val.Name,
        id: val.ID,
        code: val.Code,
        config: val.Config
      };
    });
    const onClose = () => {
      resolve(null);
    };
    smetaModals.open(
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        DialogSetObjText,
        {
          list,
          onEdit: (e2) => {
            resolve({ code: e2.code, text: e2.value, id: e2.tag, config: e2.config || drx });
          },
          onClose
        }
      ),
      {
        style: getStyleWindow(),
        blockMaximize: true,
        Title: "Выбор организации",
        hiddenButton: true,
        onClose
      }
    );
  });
};
const downloadErrorFile = async () => {
  const data = await getAllDataBD("smeta", "errors");
  const link = document.createElement("a");
  const currentLicGuid = sessionStorage.getItem("LicG");
  link.download = `${currentLicGuid || "errors"}.json`;
  const blob = new Blob([JSON.stringify(data)], { type: "text/plain" });
  const url = window.URL.createObjectURL(blob);
  link.href = url;
  link.click();
};
function isDeveloper() {
  const lastLogin = localStorage.getItem("LastLogin");
  if (!lastLogin) return false;
  const developers = [
    "Романов Станислав Павлович",
    "Смирнов Сергей Валерьевич",
    "Беляев Даниил Александрович",
    "Ковалев Андрей Владимирович",
    "Голенкевич Владимир Александрович"
  ];
  return developers.includes(lastLogin.split(",")[1]);
}
const openDocumentInModal = (doccfgid, docid) => {
  tokenProcessingTest({
    Module: "documents",
    Token: "ExposeDocument",
    Break: "1",
    Params: {
      DocCfgID: doccfgid,
      DocID: docid,
      Options: "0",
      RequestID: "0"
    }
  });
};
async function isSessionActive() {
  const { from: from2 } = getOptionsForUser() || {};
  const needToCheckMultiSession = smetaStore.get(appConfig).smeta.multiSession && from2 !== "lk";
  const licGUID = (needToCheckMultiSession ? sessionStorage.getItem("LicG") : localStorage.getItem("login")) || checkGenLicGuid("", true);
  const reqConfig = {
    prefix: Prefixes.default,
    loadMask: true,
    params: {
      info: "3",
      LicGUID: licGUID
    }
  };
  checkDocsSettings();
  const json = await smetaAxios.get("info", reqConfig);
  return { active: json.Active === "1", licGUID, multiSession: needToCheckMultiSession };
}
function checkDocsSettings() {
  const docState = localStorage.getItem("docState");
  if (docState !== null && docState !== "" && JSON.parse(docState)["save"]) return JSON.parse(docState);
  localStorage.setItem("docState", JSON.stringify(defaultDocsSettings));
  return defaultDocsSettings;
}
const MenuItems = (json, click, state, GetDisable2, props) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { container: true, direction: "row", justifyContent: "flex-start", alignItems: "center", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      Grid$1,
      {
        item: true,
        style: {
          backgroundColor: "#e6e6e6",
          position: "absolute",
          height: "100%",
          width: "46px"
        }
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: json.map((item, index2) => {
      if (item.Caption === "-") {
        return /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { orientation: "horizontal", flexItem: true }, `ButtonsMenu-Divider_${index2}`);
      } else if (item.items) {
        let Disabled = false, itemsArr = [];
        itemsArr = MenuItems(item.items, click, state, GetDisable2, props);
        if (state) {
          Disabled = GetDisable2(item.ID, state, Disabled);
        }
        return /* @__PURE__ */ jsxRuntimeExports.jsx(
          NestedMenuItem,
          {
            id: item.ID,
            onClick: click,
            disabled: Disabled,
            formid: item.ID,
            doccfgid: props && props.doccfgid ? props.doccfgid : void 0,
            style: {
              paddingLeft: "26px",
              height: "25px",
              marginLeft: item.Image && item.ID ? 2 : 18
            },
            leftIcon: item.Image && item.ID ? ImgURL(item.Image, {
              height: "16px",
              width: "16px",
              marginLeft: -13,
              marginTop: 3,
              marginRight: 13
            }) : "",
            label: item.Name ? item.Name : item.Caption,
            parentMenuOpen: true,
            children: itemsArr
          },
          "ButtonsMenu" + index2
        );
      } else {
        let Disabled = false;
        if (state) {
          Disabled = GetDisable2(item.ID, state, Disabled);
        }
        return /* @__PURE__ */ jsxRuntimeExports.jsxs(
          MenuItem,
          {
            id: item.ID,
            onClick: click,
            disabled: Disabled,
            formid: item.ID,
            style: { height: "25px" },
            doccfgid: props && props.doccfgid ? props.doccfgid : void 0,
            children: [
              /* @__PURE__ */ jsxRuntimeExports.jsxs(ListItemIcon, { children: [
                item.Image && item.ID ? ImgURL(item.Image, { width: "20px" }) : null,
                item.Image && !item.ID && !item.Status ? item.Image : null
              ] }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(ListItemText$1, { children: item.Name ? item.Name : item.Caption })
            ]
          },
          "ButtonsMenu" + index2
        );
      }
    }) })
  ] });
};
function setActiveSection(id) {
  if (id !== "") {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("comand", "SetActiveSection").set("SectionID", id);
    AxiosRequest(false, params2);
  }
}
function getIcons(id) {
  const json = smetaStore.get(imagesAtom);
  return json.Images[id] ? json.Images[id].Image : null;
}
function outPutShow(text) {
  const outPutInput = document.getElementById("OutPutInput");
  if (outPutInput) {
    const outPutTextSplitter = document.getElementById("OutPutTextSplitter");
    if (text === void 0) {
      outPutInput.value = "";
    } else {
      outPutTextSplitter.expand(true);
      outPutInput.value += text + "\n";
    }
  }
}
async function getIconsAsync(id) {
  var _a2, _b;
  let json = smetaStore.get(imagesAtom);
  if (json.length === 0) {
    const config2 = { prefix: Prefixes.resours, params: { handle: "161601", index: "-1" } };
    json = await smetaAxios.get("getImage", config2);
    smetaStore.set(imagesAtom, json);
  } else {
    json = smetaStore.get(imagesAtom);
  }
  return ((_b = (_a2 = json == null ? void 0 : json.Images) == null ? void 0 : _a2[id]) == null ? void 0 : _b.Image) || null;
}
function clearNoneBreadCrumbs() {
  const breadcrumbs = document.getElementById("BreadcrumbsSelected").firstChild;
  for (const val of Object.values(breadcrumbs.children)) {
    if (val.id === "noneBreadcrumbs") {
      val.remove();
    }
  }
}
function extend() {
  const extended = {};
  let deep = false;
  let i = 0;
  if (typeof arguments[0] === "boolean") {
    deep = arguments[0];
    i++;
  }
  const merge2 = function(obj2) {
    for (const prop in obj2) {
      if (obj2.hasOwnProperty(prop)) {
        if (deep && Object.prototype.toString.call(obj2[prop]) === "[object Object]") {
          extended[prop] = extend(true, extended[prop], obj2[prop]);
        } else {
          extended[prop] = obj2[prop];
        }
      }
    }
  };
  for (; i < arguments.length; i++) {
    merge2(arguments[i]);
  }
  return extended;
}
const createPdfIframe = (rcdata) => {
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    "iframe",
    {
      src: "data:application/pdf;base64," + rcdata,
      height: "100%",
      className: "iframeStimateCustom",
      style: { width: "100%", height: "100%" }
    }
  );
};
function clickInFrame(viewIdent, frameElem, data) {
  if (data.changeText) ChangeCellText(viewIdent, frameElem);
  if (data.linkRef) LinkrefClick(viewIdent, frameElem, data);
}
function LinkrefClick(ViewIdent, frameElem, data) {
  try {
    let frame, linksSrcOdc;
    if (frameElem) {
      frame = frameElem;
    } else {
      const frams = document.querySelectorAll(".Params.ActivParams");
      for (let n = 0; n <= frams.length - 1; n++) {
        frame = frameElem === void 0 ? frams[n].querySelector("iframe.ActivReport") : frameElem;
      }
    }
    const AllLinksInFrame = frame.contentDocument.getElementsByClassName("linkref");
    for (const value of Object.values(AllLinksInFrame)) {
      if (value.onclick === null) {
        value.command = "EditRef";
        value.viewident = ViewIdent;
        value.path = value.getAttribute("data-path");
        value.sectionid = data.ID;
        value.onclick = function(event) {
          CallCellHandler(event);
        };
      }
    }
    const allLinksInFrame = frame.contentDocument.getElementsByTagName("a");
    for (const value of Object.values(allLinksInFrame)) {
      if (value.href && value.onclick === null) {
        const command = parseCommand(value.href);
        value.onclick = function() {
          stmjsonClick(command);
        };
      }
    }
    frame.changed = "1";
  } catch {
  }
}
function ChangeCellText(ViewIdent, frameElem) {
  try {
    let frame;
    if (frameElem) {
      frame = frameElem;
    } else {
      const frams = document.querySelectorAll(".Params.ActivParams");
      for (let n = 0; n <= frams.length - 1; n++) {
        frame = frameElem === void 0 ? frams[n].querySelector("iframe.ActivReport") : frameElem;
      }
    }
    const AllBlocksThatCanChangeValue = frame.contentDocument.querySelectorAll("[data-path]");
    for (const value of Object.values(AllBlocksThatCanChangeValue)) {
      if (value.ondblclick === null) {
        value.ondblclick = function(event) {
          const textBlock = event.currentTarget.children[0].children[0];
          const input = document.createElement("input");
          input.type = "text";
          input.path = value.getAttribute("data-path");
          input.viewident = ViewIdent;
          input.command = "setText";
          input.style.outline = "none";
          input.style.position = "relative";
          input.style.width = value.offsetWidth - 6 + "px";
          input.style.height = value.offsetHeight - 4 + "px";
          input.style.border = "none";
          input.style.fontSize = "inherit";
          input.value = textBlock.textContent;
          input.onblur = function(event2) {
            value.children[0].style.display = "";
            value.style.padding = "";
            changeEvent(event2, textBlock);
          };
          input.onkeydown = function(event2) {
            if (event2.key === "Enter") {
              value.children[0].style.display = "";
              value.style.padding = "";
              changeEvent(event2, textBlock);
            }
          };
          value.children[0].style.display = "none";
          value.style.padding = "0px";
          value.appendChild(input);
          input.focus();
        };
      }
    }
  } catch {
  }
}
function changeEvent(event, textBlock) {
  if (textBlock.textContent !== event.currentTarget.value) {
    CallCellHandler(event);
    textBlock.textContent = event.currentTarget.value;
  }
  event.target.remove();
}
function CallCellHandler(event) {
  const params2 = /* @__PURE__ */ new Map(), currentTarget = event.currentTarget;
  const viewIdent = currentTarget.viewident.split(".");
  params2.set("prefix", "cellobj");
  params2.set("comand", "CallCellHandler");
  if (currentTarget.Command === "setText") {
    params2.set("Text", currentTarget.value);
    params2.set("Changed", "1");
  }
  if (currentTarget.sectiodid) {
    params2.set("SectionID", currentTarget.sectiodid);
  }
  params2.set("Command", currentTarget.command);
  params2.set("ViewIdent", viewIdent.length > 1 ? viewIdent[1] : viewIdent[0]);
  params2.set("Path", currentTarget.path);
  params2.set("WSM", "1");
  AxiosRequest(true, params2).then((res) => {
    tokenProcessingTest(res);
  });
}
const getSectionByID = (idToFind, sectionsArrData) => {
  const localSections = sectionsArrData || smetaStore.get(sectionListAtom);
  if (!localSections || localSections.length === 0) return;
  for (const section of localSections) {
    if (section.ID === idToFind) {
      return section;
    }
    if (section.Sections) {
      const found = getSectionByID(idToFind, section.Sections);
      if (found) {
        return found;
      }
    }
  }
  return;
};
const getDocInfo = async (docId) => {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "doccfg").set("comand", "GetDocInfo").set("DocID", docId);
  const responce = await AxiosRequest(true, params2);
  if (responce.Result == "1") {
    return responce;
  } else {
    return false;
  }
};
function updateSection(id = void 0, subID) {
  smetaStore.set(refreshSectionDataAtom, {
    refresh: true,
    refreshId: id,
    CommitFormOnSection: subID
  });
}
function localization() {
  return {
    Country: "Страна",
    //0 = 0
    Region: "Регион",
    //1 = 1
    District: "Район",
    //2 = 2
    Settlement: "Сельское/городское поселение",
    //30 = 3
    City: "Город",
    //4 = 4
    CityPart: "Городской район",
    //19 = 5
    Community: "Населенный пункт",
    //3 = 6
    PlanStruct: "Элемент планировочной структуры",
    //22 = 7
    Street: "Улица",
    //5 = 8
    LandPlot: "Земельный участок",
    //23 = 9
    House: "Дом",
    //6 = 10
    BulkNo: "Корпус",
    //7 = 11
    BuildNo: "Строение",
    //25 = 12
    FlatNo: "Квартира",
    //8 = 13
    OfficeNo: "Помещение",
    //18 = 14
    Parking: "Машино-место",
    //29 = 15
    PostIndex: "Почтовый индекс",
    //10 = 16
    Phone: "Телефон",
    //12 = 17
    EMail: "Эл. Адрес",
    //13 = 18
    CodeNo: "Код НО",
    //11 = 19
    Classificator: "Классификатор",
    //9 = 20
    Identifier: "ФИАС (ГАР)",
    //21 = 21
    RegDate: "Дата регистрации",
    //17 = 22
    Options: "Адрес из ЕГРЮЛ",
    //20 = 23
    ShortName: "Сокращение",
    Code: "Код",
    IsShared: "",
    //15 = 23
    OKATD: "",
    //16 = 24
    BulkType: "",
    //14 = 25
    HouseType: "",
    //24 = 26
    BuildType: "",
    //26 = 27
    FlatType: "",
    //27 = 28
    RoomType: ""
    //28 = 29
  };
}
function usePrevious(value) {
  const ref2 = reactExports.useRef();
  reactExports.useEffect(() => {
    ref2.current = value;
  }, [value]);
  return ref2.current;
}
function getSortAddressMap() {
  return {
    0: 0,
    1: 1,
    2: 2,
    3: 6,
    4: 4,
    5: 8,
    6: 10,
    7: 11,
    8: 13,
    9: 20,
    10: 16,
    11: 19,
    12: 17,
    13: 18,
    14: 26,
    15: 24,
    16: 25,
    17: 22,
    18: 14,
    19: 5,
    20: 23,
    21: 21,
    22: 7,
    23: 9,
    24: 27,
    25: 12,
    26: 28,
    27: 29,
    28: 30,
    29: 15,
    30: 3
  };
}
function sortAddresArray(array = [], sortedMap = getSortAddressMap()) {
  const result = new Array(30);
  const sortMap = sortedMap;
  for (let i = 0; i < array.length; i++) {
    result[sortMap[i]] = array[i];
  }
  return result;
}
function getParamsObject(items, selectedRecordID, title, parentModule) {
  resultArray = [];
  const itemArray = sortAddresArray(items.Values, getSortAddressMap());
  const localize = localization();
  let ID2 = 0;
  let EditStyle2, HouseType;
  itemArray.forEach((item, index2) => {
    if (localize[item.FieldName] !== "") {
      switch (index2) {
        case 10:
          HouseType = true;
          item.Conditions = "1";
          EditStyle2 = "81";
          break;
        case 11:
          HouseType = true;
          item.Conditions = "1";
          EditStyle2 = "81";
          break;
        case 12:
          HouseType = true;
          item.Conditions = "1";
          EditStyle2 = "81";
          break;
        case 13:
          HouseType = true;
          item.NoKldr = true;
          EditStyle2 = void 0;
          break;
        case 14:
          HouseType = true;
          item.NoKldr = true;
          EditStyle2 = void 0;
          break;
        case 16:
          EditStyle2 = "64";
          break;
        case 20:
          EditStyle2 = "64";
          break;
        case 21:
          EditStyle2 = "64";
          break;
        case 22:
          EditStyle2 = "2";
          break;
        case 23:
          EditStyle2 = "68";
          item.CheckState = item.Value;
          item.Value = void 0;
          break;
        default:
          if (item.DataType) {
            EditStyle2 = "80";
          } else {
            if (item.FieldName === "FlatNo" || item.FieldName === "OfficeNo") {
              item.Conditions = "1";
            }
            EditStyle2 = void 0;
            HouseType = false;
          }
      }
      resultArray.push({
        ID: ID2,
        FieldName: item.FieldName,
        Name: item.Name ? item.Name : localize[item.FieldName],
        Value: item.Value,
        CheckState: item.CheckState,
        EditStyle: EditStyle2,
        HouseType,
        DataType: item.DataType ? item.DataType : "",
        ObjRef: item.ID,
        Conditions: item.Conditions,
        NoKldr: item.NoKldr,
        Level: item.FieldName === "CityPart" ? "1" : void 0,
        Current: items.ID,
        GroupID: selectedRecordID,
        Module: "books"
      });
      ID2++;
      if (item.ShortName || item.FieldName === "District" || item.FieldName === "City" || item.FieldName === "Community" || item.FieldName === "Region" || item.FieldName === "Settlement") {
        resultArray.push({
          ID: ID2,
          FieldName: "ShortName",
          Name: localize["ShortName"],
          Value: item.ShortName,
          EditStyle: "64",
          Level: "1"
        });
        ID2++;
      }
      if (item.Code || item.FieldName === "Region") {
        if (item.FieldName !== "Region") return;
        resultArray.push({
          ID: ID2,
          FieldName: "Code",
          Name: localize["Code"],
          Value: item.Code,
          EditStyle: "64",
          Level: "1"
        });
        ID2++;
      }
    }
  });
  return {
    ID: items.ID,
    address: title,
    Module: "address",
    parentModule,
    Caption: items.Caption,
    Items: resultArray,
    Path: "Address",
    GroupID: selectedRecordID,
    NoHistory: true,
    division: items.dv ? items.dv : "0"
  };
}
function AddressEditKladrObj(ID2, DataType, Name) {
  const params2 = /* @__PURE__ */ new Map();
  params2.set("prefix", "address").set("comand", "AddressEditKladrObj").set("ID", ID2).set("Level", DataType ? DataType : "1").set("Name", Name).set("WSM", "1");
  const res = XMLrequest(params2);
  return res;
}
function createConfirmation(title, onConfirm, setPrevVal, PrevVal) {
  CreateBackgroundForModal(
    /* @__PURE__ */ jsxRuntimeExports.jsxs(
      ModalWindow,
      {
        Title: "Подтверждение",
        style: {
          height: `${150}px`,
          width: `${380}px`,
          minWidth: "380px",
          minHeight: "150px",
          maxWidth: "380px",
          maxHeight: "150px"
        },
        hiddenButton: true,
        children: [
          /* @__PURE__ */ jsxRuntimeExports.jsx(
            "div",
            {
              style: {
                height: "calc(100% - 40px)",
                display: "flex",
                justifyContent: "center"
              },
              children: /* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: title })
            }
          ),
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { height: "40px", display: "flex", justifyContent: "center" }, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                onClick: onConfirm,
                variant: "outlined",
                style: { marginRight: "30px", height: "34px" },
                className: "button_Modal_Select",
                children: "Да"
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Button$2,
              {
                onClick: () => {
                  if (setPrevVal) {
                    setPrevVal(PrevVal);
                  }
                },
                variant: "outlined",
                style: { height: "34px" },
                className: "button_Modal_Close",
                children: "Нет"
              }
            )
          ] })
        ]
      }
    )
  );
}
function AutoTextTranslate(str) {
  const search = [
    "й",
    "ц",
    "у",
    "к",
    "е",
    "н",
    "г",
    "ш",
    "щ",
    "з",
    "х",
    "ъ",
    "ф",
    "ы",
    "в",
    "а",
    "п",
    "р",
    "о",
    "л",
    "д",
    "ж",
    "э",
    "я",
    "ч",
    "с",
    "м",
    "и",
    "т",
    "ь"
  ];
  const replace2 = [
    "q",
    "w",
    "e",
    "r",
    "t",
    "y",
    "u",
    "i",
    "o",
    "p",
    "\\[",
    "\\]",
    "a",
    "s",
    "d",
    "f",
    "g",
    "h",
    "j",
    "k",
    "l",
    ";",
    "'",
    "z",
    "x",
    "c",
    "v",
    "b",
    "n",
    "m"
  ];
  function checkCase(letter, i) {
    return letter === letter.toLowerCase() ? search[i] : search[i].toUpperCase();
  }
  for (let i = 0; i < replace2.length; i++) {
    const reg = new RegExp(replace2[i], "mig");
    str = str.replace(reg, (a2) => checkCase(a2, i));
  }
  return str;
}
async function updateVisibleGrids(settings) {
  if (CheckModalBackGrounds() === 0) {
    await updateInnerGrids(document);
    return;
  } else {
    const modals = document.querySelectorAll(".background_ModalDialog");
    if (modals.length === 0) return;
    if (settings == null ? void 0 : settings.last) {
      const lastModal = modals[modals.length - 1];
      await updateInnerGrids(lastModal);
      return;
    }
    for (let modal of Array.from(modals)) {
      await updateInnerGrids(modal);
    }
  }
}
const updateInnerGrids = async (panel) => {
  var _a2;
  const gridpanels = panel.querySelectorAll("[rcsgrid_panel]");
  if (gridpanels.length) {
    for (let gridPanel of Array.from(gridpanels)) {
      if (gridPanel.checkVisibility()) {
        await ((_a2 = gridPanel == null ? void 0 : gridPanel.grid) == null ? void 0 : _a2.updateGridSize());
      }
    }
  }
};
function updateGridData(timer2 = 0, settings) {
  return new Promise((resolve) => {
    setTimeout(async () => {
      await updateVisibleGrids(settings);
      resolve(null);
    }, timer2);
  });
}
function throttle(callee, timeout) {
  let timer2 = null;
  return function perform(...args) {
    if (timer2) return;
    timer2 = setTimeout(async () => {
      await callee(...args);
      clearTimeout(timer2);
      timer2 = null;
    }, timeout);
  };
}
function getStyleWindow(CLSID = void 0) {
  const data = {
    [ViewClass.TreeView]: {
      height: `${420}px`,
      width: `${window.innerWidth / 100 * 35}px`
    },
    [ViewClass.ClsBook]: {
      height: window.innerHeight * 0.6 + "px",
      width: window.innerWidth * 0.4 + "px"
    },
    [ViewClass.OrgBook]: {
      height: window.innerHeight * 0.7 + "px",
      width: window.innerWidth * 0.7 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.PersonBook]: {
      height: window.innerHeight * 0.6 + "px",
      width: window.innerWidth * 0.65 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.DocBook]: {
      width: window.innerWidth * 0.7 + "px",
      height: window.innerHeight * 0.75 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.Address]: {
      height: `${420}px`,
      width: `${window.innerWidth / 100 * 35}px`,
      minHeight: "300px",
      minWidth: "600px"
    },
    [ViewClass.TableRep]: {
      height: `${420}px`,
      width: `${window.innerWidth / 100 * 35}px`
    },
    [ViewClass.CalcRange]: {
      height: "300px",
      width: "310px",
      minHeight: "300px",
      minWidth: "310px",
      maxHeight: "300px",
      maxWidth: "310px"
    },
    [ViewClass.LongTime]: {
      minHeight: "230px",
      minWidth: "265px",
      maxHeight: "230px",
      maxWidth: "265px"
    },
    [ViewClass.MonthRange]: {
      height: "300px",
      width: "480px",
      minHeight: "300px",
      minWidth: "480px"
    },
    [ViewClass.DateRange]: {
      height: "500px",
      width: "410px",
      minHeight: "500px",
      minWidth: "410px",
      maxHeight: "500px",
      maxWidth: "410px"
    },
    [ViewClass.CreateObject]: {
      height: "180px",
      width: "480px",
      minHeight: "180px",
      minWidth: "480px"
    },
    [ViewClass.CreateObject + "Group"]: {
      height: `450px`,
      width: `${window.innerWidth / 100 * 40}px`,
      minHeight: "420px",
      minWidth: "480px"
    },
    [ViewClass.AccCors]: {
      height: window.innerHeight * 0.6 + "px",
      width: window.innerWidth * 0.65 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.StgBook]: {
      height: window.innerHeight * 0.7 + "px",
      width: window.innerWidth * 0.7 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.Departs]: {
      height: window.innerHeight * 0.6 + "px",
      width: window.innerWidth * 0.65 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.DocSite]: {
      width: window.innerWidth * 0.7 + "px",
      height: window.innerHeight * 0.75 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.MultiTab]: {
      height: window.innerHeight * 0.8 + "px",
      width: window.innerWidth * 0.8 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.CellObj]: {
      height: window.innerHeight * 0.7 + "px",
      width: window.innerWidth * 0.7 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    [ViewClass.PayTypeSet]: {
      height: window.innerHeight * 0.7 + "px",
      width: window.innerWidth * 0.7 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    complex: {
      height: window.innerHeight * 0.6 + "px",
      width: window.innerWidth * 0.65 + "px",
      minHeight: "500px",
      minWidth: "680px"
    },
    InputText: {
      height: "150px",
      width: "350px",
      minHeight: "150px",
      minWidth: "350px"
    },
    [ViewClass.Calendar]: {
      height: "470px",
      width: "470px",
      minHeight: "470px",
      minWidth: "470px"
    },
    [ViewClass.TimeCfg]: {
      height: `${800}px`,
      width: `${window.innerWidth / 100 * 75}px`,
      minHeight: "800px",
      minWidth: `${window.innerWidth / 100 * 60}px`
    },
    Sample: {
      height: "150px",
      width: "350px",
      minHeight: "150px",
      minWidth: "350px",
      maxHeight: "150px"
    },
    ShowDataSet: {
      height: "500px",
      width: window.innerWidth * 0.55 + "px",
      minHeight: "500px"
    },
    params: {
      height: "500px",
      width: window.innerWidth * 0.55 + "px",
      minHeight: "500px"
    },
    sequence: {
      height: "550px",
      width: "526px",
      minHeight: "550px",
      minWidth: "526px",
      maxHeight: "550px",
      maxWidth: "526px"
    },
    DayTypes: {
      height: "310px",
      width: "420px",
      minHeight: "310px",
      minWidth: "420px",
      maxHeight: "310px",
      maxWidth: "420px"
    },
    MessageBox: {
      height: "max-content",
      width: "max-content",
      maxWidth: "min-content",
      minWidth: "450px",
      minHeight: "150px"
    },
    default: {
      height: `${450}px`,
      width: `${window.innerWidth / 100 * 40}px`,
      minHeight: "420px",
      minWidth: "480px"
    }
  };
  return CLSID && data[CLSID] ? data[CLSID] : data.default;
}
function getModalSectionID() {
  return 100 - CheckModalBackGrounds();
}
function getDefaultMenu(selector, data = {}) {
  const defaultMenu2 = {
    organizations: {
      Table: [
        {
          Caption: "Показать в группе",
          value: "ShowGroupID"
        },
        {
          Caption: "Отметить для перемещения",
          value: "SelectToMove",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCutIcon, { fontSize: "small" }),
          Disabled: true
        },
        {
          Caption: "Перенести в группу",
          value: "InsertToGroup",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentPasteIcon, { fontSize: "small" }),
          Disabled: true
        },
        { Caption: "Divider" },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark" }
      ],
      Header: [
        { Caption: "Divider" },
        {
          Caption: "По возрастанию",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small" }),
          value: "Sort"
        },
        {
          Caption: "По убыванию",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small", style: { transform: "scale(1,-1)" } }),
          value: "Sort-"
        },
        {
          Caption: "Снять сортировку",
          value: "ClearSort"
        },
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    grades: {
      Table: [
        {
          Caption: "Конфигурационные данные",
          value: "ConfigData",
          Disabled: true
        },
        {
          Caption: "Восстановить из конфигурации",
          value: "ConfigRestore"
        },
        {
          Caption: "Копировать запись",
          value: "Copy",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCopyIcon, { fontSize: "small" }),
          Disabled: true
        },
        {
          Caption: "Вырезать запись",
          value: "Cut",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCutIcon, { fontSize: "small" }),
          Disabled: true
        },
        {
          Caption: "Вставить запись",
          value: "Paste",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentPasteIcon, { fontSize: "small" }),
          Disabled: true
        },
        { Caption: "Divider" },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [{ Caption: "Поиск по столбцу", value: "ColumnFilter" }]
    },
    clsbook: {
      Table: [
        {
          Caption: "Добавить группу",
          value: "AddGroup",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(AddBoxOutlinedIcon, {})
        },
        {
          Caption: "Добавить подгруппу",
          value: "AddGroupInner",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(AddToPhotosOutlinedIcon, {})
        },
        {
          Caption: "Восстановить из конфигурации",
          value: "Restore",
          Disabled: true
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    accountsPlan: {
      Table: [
        {
          Caption: "Создать счет",
          value: "AddGroup",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(AddBoxOutlinedIcon, {})
        },
        {
          Caption: "Создать субсчет",
          value: "AddGroupInner",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(AddToPhotosOutlinedIcon, {})
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    accountsAnalitic: {
      Table: [
        // {
        //   Caption: "Добавить пользовательскую аналитику",
        //   value: "InsertByUser",
        //   Image: <AccountBoxIcon fontSize="small" />,
        // },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    schedule: {
      Table: [
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    personsChildren: {
      Table: [
        {
          Caption: "Обратить выделение",
          value: "ReverseSelected",
          Disabled: true
        },
        {
          Caption: "Калькулятор",
          value: "Calculator",
          Disabled: true
        },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    personsTable: {
      Table: [
        {
          Caption: "Показать в группе",
          value: "ShowGroupID"
        },
        {
          Caption: "Отметить для перемещения",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCutIcon, { fontSize: "small" }),
          value: "SelectToMove"
        },
        {
          Caption: "Перенести в группу",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentPasteIcon, { fontSize: "small" }),
          value: "InsertToGroup"
        },
        {
          Caption: "Заблокировать ФИО",
          value: "BlockFIO"
        },
        {
          Caption: "Отправить в архив личных карточек",
          value: "ArchiveUser"
        },
        { Caption: "Divider" },
        {
          Caption: "Отметить выбранных",
          value: "PinSelected"
        },
        {
          Caption: "Снять отметку",
          value: "UnPinSelected"
        },
        { Caption: "Divider" },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    NFA: {
      Table: [
        {
          Caption: "Показать в группе",
          value: "ShowGroupID"
        },
        {
          Caption: "Отметить для перемещения",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCutIcon, { fontSize: "small" }),
          value: "SelectToMove",
          Disabled: true
        },
        {
          Caption: "Отметить для копирования",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentCopyIcon, { fontSize: "small" }),
          value: "SelectToCopy",
          Disabled: true
        },
        {
          Caption: "Перенести в группу",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(ContentPasteIcon, { fontSize: "small" }),
          value: "InsertToGroup",
          Disabled: true
        },
        { Caption: "Divider" },
        {
          Caption: "Создать группу объектов...",
          value: "CreateGroup"
        },
        {
          Caption: "Добавить к объекту",
          value: "AddToObject",
          Disabled: true
        },
        {
          Caption: "Все объекты группы",
          value: "AllObjects"
        },
        { Caption: "Divider" },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark" }
      ],
      Header: [
        { Caption: "Divider" },
        {
          Caption: "По возрастанию",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small" }),
          value: "Sort"
        },
        {
          Caption: "По убыванию",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small", style: { transform: "scale(1,-1)" } }),
          value: "Sort-"
        },
        {
          Caption: "Снять сортировку",
          value: "ClearSort"
        },
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    HandleAccounts: {
      Table: [
        {
          Caption: "Обратить выделение",
          value: "ReverseSelected"
        },
        {
          Caption: "Калькулятор",
          value: "Calc"
        },
        { Caption: "Divider" },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark" }
      ],
      Header: [
        { Caption: "Divider" },
        {
          Caption: "По возрастанию",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small" }),
          value: "Sort"
        },
        {
          Caption: "По убыванию",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(SortIcon, { fontSize: "small", style: { transform: "scale(1,-1)" } }),
          value: "Sort-"
        },
        {
          Caption: "Снять сортировку",
          value: "ClearSort"
        },
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    history: {
      Table: [
        {
          Caption: "Копировать запись",
          value: "CopyRecord"
        },
        {
          Caption: "Вырезать запись",
          value: "CutRecord"
        },
        {
          Caption: "Вставить из буфера",
          value: "Paste"
        },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark" }
      ],
      Header: [{ Caption: "Поиск по столбцу", value: "ColumnFilter" }]
    },
    paytypes: {
      Table: [
        {
          Caption: "Восстановить из конфигурации",
          value: "ConfigRestore"
        },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    distractions: {
      Table: [
        {
          Caption: "Скрыть отвлечение",
          value: "HideDistraction"
        },
        {
          Caption: "Показывать только используемые",
          value: "ShowOnlyUse"
        },
        {
          Caption: "Новая запись",
          value: "Insert",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(PostAddIcon, { fontSize: "small" })
        },
        {
          Caption: "Удалить запись",
          value: "Delete",
          Image: /* @__PURE__ */ jsxRuntimeExports.jsx(DeleteIcon, { fontSize: "small" })
        },
        { Caption: "Divider" },
        { Caption: "Режим просмотра", value: "OnlyViewMode" },
        { Caption: "Сохранять отметку", value: "SaveMark", Disabled: true }
      ],
      Header: [
        { Caption: "Divider" },
        { Caption: "Область группировки", value: "GroupShow" },
        { Caption: "Поиск по столбцу", value: "ColumnFilter" }
      ],
      Grouping: [
        { Caption: "Область группировки", value: "GroupShow" },
        {
          Caption: "Расширенная группировка",
          value: "GroupShowExtended",
          Disabled: true
        }
      ]
    },
    HandleParams: {
      Field: [
        {
          Caption: "Сохранить значения параметров",
          value: "SaveSample",
          Disabled: (data == null ? void 0 : data.NoSaveSample) ? true : false
        },
        {
          Caption: "Очистить значения",
          value: "ClearValues",
          Disabled: (data == null ? void 0 : data.NoClearState) ? true : false
        }
      ]
    },
    addressParams: {
      Field: []
    },
    personsPhoto: {
      Field: [
        {
          Caption: "Добавить фото",
          value: "SetPhoto"
        },
        {
          Caption: "Удалить фото",
          value: "DeletePhoto"
        }
      ]
    },
    tree: {
      Field: []
    },
    docParams: {
      Field: [
        { Caption: "Сохранить значения параметров", value: "SaveSample" },
        { Caption: "Очистить значения", value: "ClearValues" },
        { Caption: "Фильтр параметров", value: "FilterParams" }
        // { Caption: "Настроить перечень параметров", value: "ParamsSettings" },
      ]
    }
  };
  return defaultMenu2[selector] || void 0;
}
function getRightsData(rights, other = void 0) {
  const res = {
    insert: false,
    modify: false,
    delete: false,
    accsess: false
  };
  const rightsValue = Number(rights);
  if (rightsValue === -1) {
    return {
      insert: true,
      modify: true,
      delete: true,
      accsess: true
    };
  }
  res.insert = Boolean(rightsValue & 1);
  res.modify = Boolean(rightsValue & 2);
  res.delete = Boolean(rightsValue & 4);
  res.accsess = Boolean(rightsValue & 8);
  return res;
}
function ClearAllLoadMask() {
  const loadMasks = document.querySelectorAll("[loadmask]");
  if (loadMasks.length > 0) {
    for (const val of loadMasks) {
      val.parentElement.remove();
    }
  }
}
function setColor(intColor) {
  function toHex2(i) {
    const res = 255 & i;
    if (res) {
      return res.toString(16).padStart(2, "0");
    } else return "00";
  }
  if (intColor === 0 || intColor === "" || isNaN(Number(intColor))) return "";
  let result = "#" + toHex2(Number(intColor));
  result += toHex2(Number(intColor) >> 8);
  result += toHex2(Number(intColor) >> 16);
  return result;
}
function getKeyCodeOfInt(int) {
  const letter = int & 255;
  let controlButton = int >> 8;
  if (controlButton === 64) controlButton = 17;
  if (controlButton === 0) return [letter];
  else return [controlButton, letter];
}
async function formEdit(ClickedButton, func, request, RequestId, from2) {
  let data, json;
  if (ClickedButton === "1") {
    data = {
      Result: ClickedButton,
      [request.Name]: request.Value
    };
    if (request.$SourList || request.$DestList) {
      data.$SourList = request.$SourList;
      data.$DestList = request.$DestList;
    }
    if (request.Name === "ObjRef") {
      data["DocID"] = request.Value;
    }
    if (request.Selection) {
      data.Selection = request.Selection;
    }
  } else {
    data = { Result: ClickedButton };
  }
  if (RequestId) {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "project");
    params2.set("comand", "ResumeRequest");
    params2.set("RequestID", RequestId);
    params2.set("WSM", "1");
    json = await AxiosRequest(true, params2, data);
  }
  json = json ? json : {};
  tokenProcessingTest(json, {
    func,
    propsId: RequestId,
    from: from2,
    props: { Request: request, Button: ClickedButton }
  });
}
function getDateOfInt(int) {
  const startDate = /* @__PURE__ */ new Date("1899-12-30");
  const date = new Date(startDate.setDate(startDate.getDate() + Number(int)));
  return getStrDateOfDateObj(date);
}
function getStrDateOfDateObj(date) {
  return dayjs(date).format("DD.MM.YYYY");
}
function getStrTimeOfDateObj(date) {
  return dayjs(date).format("HH.mm.ss");
}
function getIntOfStrDate(value) {
  const date = getDateForDateObj(value);
  if (!date) return -1;
  const oneDay = 1e3 * 60 * 60 * 24;
  const startDate = /* @__PURE__ */ new Date("1899-12-30");
  const currentDate = new Date(date);
  const id = Math.round((currentDate.getTime() - startDate.getTime()) / oneDay);
  if (!id) return -1;
  return id;
}
function getDateForDateObj(str) {
  if (str) {
    if (dayjs(str, "YYYY-MM-DD", true).isValid()) return str;
    if (dayjs(str, "DD.MM.YYYY", true).isValid()) return dayjs(str, "DD.MM.YYYY").format("YYYY-MM-DD");
  }
}
function getDateRusFormatWithId(str) {
  const date = getDateForDateObj(str);
  if (date) {
    const oneDay = 1e3 * 60 * 60 * 24;
    const startDate = /* @__PURE__ */ new Date("1899-12-30");
    const currentDate = new Date(date);
    let id = Math.round((currentDate.getTime() - startDate.getTime()) / oneDay);
    if (!id) id = "-1";
    return { label: str === ".." ? "" : str, id };
  } else return { label: "", id: "" };
}
function getEditorListFormat(items, subData) {
  if (!items || items.length === 0) return [];
  return items.map((item, index2) => {
    if (typeof item !== "object") {
      if (subData.checklist) {
        return { label: item, id: `${Math.pow(2, index2)}` };
      }
      return { label: item, id: `${index2}` };
    }
    if (subData.checklist) {
      return { label: item.text, id: `${Math.pow(2, index2)}` };
    }
    return { label: item.text, id: item.id };
  });
}
function getMonthInfo(year2 = dayjs().year(), month = dayjs().month() + 1) {
  const parsedYear = typeof year2 === "string" ? parseInt(year2) : year2;
  const parsedMonth = typeof month === "string" ? parseInt(month) : month;
  const firstDay = dayjs(`${parsedYear}-${parsedMonth}-01`);
  const lastDay = firstDay.endOf("month");
  return {
    year: parsedYear,
    month: parsedMonth,
    firstDay,
    firstDayStr: firstDay.format("DD.MM.YYYY"),
    firstDayInt: getIntOfStrDate(firstDay.format("DD.MM.YYYY")),
    lastDay,
    lastDayStr: lastDay.format("DD.MM.YYYY"),
    lastDayInt: getIntOfStrDate(lastDay.format("DD.MM.YYYY"))
  };
}
function getLocalAuditParams() {
  return {
    Items: [
      {
        EditStyle: "2",
        Options: "",
        Level: "",
        ID: "0",
        DataType: "",
        FieldName: "StartDate",
        Name: "Начальная дата",
        Value: getStrDateOfDateObj(/* @__PURE__ */ new Date()),
        EditVal: getStrDateOfDateObj(/* @__PURE__ */ new Date()),
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "2",
        Options: "",
        Level: "",
        ID: "1",
        DataType: "",
        FieldName: "EndDate",
        Name: "Конечная дата",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "1",
        Options: "",
        Level: "",
        ID: "2",
        DataType: "",
        FieldName: "EventType",
        Name: "Событие",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "1",
        Options: "",
        Level: "",
        ID: "3",
        DataType: "",
        FieldName: "ConfigName",
        Name: "Конфигурация",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "1",
        Options: "",
        Level: "",
        ID: "4",
        DataType: "",
        FieldName: "OrgName",
        Name: "Организация",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "1",
        Options: "",
        Level: "",
        ID: "5",
        DataType: "",
        FieldName: "UserName",
        Name: "Пользователь",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "1",
        Options: "",
        Level: "",
        ID: "6",
        DataType: "",
        FieldName: "Address",
        Name: "IP-адрес",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "1",
        Options: "",
        Level: "",
        ID: "7",
        DataType: "",
        FieldName: "Computer",
        Name: "Компьютер",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "1",
        Options: "",
        Level: "",
        ID: "8",
        DataType: "",
        FieldName: "Server",
        Name: "Сервер",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "8",
        Options: "",
        Level: "",
        ID: "9",
        DataType: "",
        FieldName: "ObjectID",
        Name: "Значение Объекта",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "",
        Options: "",
        Level: "",
        ID: "10",
        DataType: "",
        FieldName: "EventInfo",
        Name: "Информация",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      },
      {
        EditStyle: "",
        Options: "",
        Level: "",
        ID: "11",
        DataType: "",
        FieldName: "Sender",
        Name: "Дополнительно",
        Value: "",
        EditVal: "",
        ObjRef: "",
        CheckState: "",
        TextStyle: ""
      }
    ]
  };
}
const LeftArrowBlue = /* @__PURE__ */ jsxRuntimeExports.jsx(
  "img",
  {
    style: { transform: "rotate(180deg)" },
    checkicon: "true",
    src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAq0lEQVQokWNgGJ6AKWZrPUPUFkGscoQ0MzIxpjEzM15gjd1qTrJmKJD7x8BwkClmaz6KwQwMDAzMsduOMTD8tyTOnP9L/zKwpjMsdv/KAhVgI9IFDAwMjNHMDH9+/2VgSIQ6m/EX8Zr/L/3LwJIDdzY+wBy37SnD//9SDAwMP///Zyj/t8R7IkyOhUjrHjExMIT9XuJ9ElmQYGj///d/1t+//w1+L0bVOIQBAKmcMNWgTlTtAAAAAElFTkSuQmCC"
  }
);
const RightArrowRed = /* @__PURE__ */ jsxRuntimeExports.jsx(
  "img",
  {
    checkicon: "true",
    src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAkUlEQVQokd2RsQlCQRBE3xwfcxuwhR+KjZgYmWgiWILVWIiJYHZnCYIlCKJwY+APRETXUCfc3Tezy8J/qsBqD/1XvfQJtjSzlAsMv4YBDANLmwLLx7oAirQ1jCJGSGvVOm/h1HTOvRAIYE+c0pVap6mLv4The/IiNJulY5acpfPzzU0oDA7Y4xZ24Q3h/Z9/VDeRPSpapGpugQAAAABJRU5ErkJggg=="
  }
);
const UncheckedString = "";
const CheckedString = `<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeMedium svg-icon css-kry165" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="CheckIcon" tabindex="-1" title="Check"><path d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></svg>`;
const BulletString = `<img
    checkicon="true"
    src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAABmJLR0QA/wD/AP+gvaeTAAAAWUlEQVQYlX2PUQqAMAxDo+dwnkiK59d5FJ0/KcRuNvBgH28hBfoU8psdwAWgkQrARtIjknOrPIWmyOnimkhOmbPRkuaPmrQd+sM4fHTMFuuNw7WpkzQL+eQFxVQu0d8mj+cAAAAASUVORK5CYII="
  />`;
const LeftArrowBlueString = `<img
    style="transform: rotate(180deg)"
    checkicon="true"
    src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAq0lEQVQokWNgGJ6AKWZrPUPUFkGscoQ0MzIxpjEzM15gjd1qTrJmKJD7x8BwkClmaz6KwQwMDAzMsduOMTD8tyTOnP9L/zKwpjMsdv/KAhVgI9IFDAwMjNHMDH9+/2VgSIQ6m/EX8Zr/L/3LwJIDdzY+wBy37SnD//9SDAwMP///Zyj/t8R7IkyOhUjrHjExMIT9XuJ9ElmQYGj///d/1t+//w1+L0bVOIQBAKmcMNWgTlTtAAAAAElFTkSuQmCC"
  />`;
const RightArrowRedString = `<img
      checkicon="true"
      src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAABmJLR0QA/wD/AP+gvaeTAAAAkUlEQVQokd2RsQlCQRBE3xwfcxuwhR+KjZgYmWgiWILVWIiJYHZnCYIlCKJwY+APRETXUCfc3Tezy8J/qsBqD/1XvfQJtjSzlAsMv4YBDANLmwLLx7oAirQ1jCJGSGvVOm/h1HTOvRAIYE+c0pVap6mLv4The/IiNJulY5acpfPzzU0oDA7Y4xZ24Q3h/Z9/VDeRPSpapGpugQAAAABJRU5ErkJggg=="
    />`;
function getMulticheckIconForTree(checkstate) {
  const icons2 = {
    "1": UncheckedString,
    "2": CheckedString,
    "9": BulletString,
    "11": LeftArrowBlueString,
    "12": RightArrowRedString
  };
  return icons2[checkstate];
}
function getCurrentUserRights(objType, isAsync = false) {
  const userIsAdmin = smetaStore.get(isAdminAtom);
  if (userIsAdmin) return "-1";
  const userRights = smetaStore.get(userRightsAtom);
  if (userRights[objType] !== void 0) return userRights[objType];
  if (isAsync) {
    return new Promise(async (resolve) => {
      const json = await smetaAxios.get("GetObjectRights", {
        prefix: Prefixes.usercfg,
        params: { ObjType: objType },
        loadMask: true
      });
      const objTypeRights = json ? json.Result || "0" : "-1";
      userRights[objType] = objTypeRights;
      resolve(objTypeRights);
    });
  } else {
    const params2 = /* @__PURE__ */ new Map();
    params2.set("prefix", "usercfg").set("comand", "GetObjectRights").set("ObjType", objType);
    const json = XMLrequest(params2);
    const objTypeRights = json ? json.Result || "0" : "-1";
    userRights[objType] = objTypeRights;
    return objTypeRights;
  }
}
function checkRightsFlag(rights, flag) {
  const mfInsert2 = 0, mfEdit2 = 1, mfDelete2 = 2;
  const rightsData = getRightsData(rights);
  switch (flag) {
    case mfInsert2:
      return rightsData.insert;
    case mfEdit2:
      return rightsData.modify;
    case mfDelete2:
      return rightsData.delete;
    default:
      return false;
  }
}
function checkCurrentUserRights(objType, flag, isAsync = false) {
  if (isAsync) {
    return new Promise(async (resolve) => {
      resolve(checkRightsFlag(await getCurrentUserRights(objType, isAsync), flag));
    });
  } else {
    return checkRightsFlag(getCurrentUserRights(objType), flag);
  }
}
const getBaseUrl = () => {
  let path = window.location.pathname;
  if (!path.endsWith("/")) path = path.replace(/[^/]+$/, "");
  return path;
};
function getIntervalActualVersionWebsite() {
  const intervalDelay = smetaStore.get(appConfig).smeta.versionCheckInterval || 6e5;
  const replaceVer = (str) => str.replace("/", ".").replace("hotfix", "");
  const needRefreshWebsite = (old, now) => {
    const olda = replaceVer(old).split("."), nowa = replaceVer(now).split(".");
    const last = Math.min(olda.length, nowa.length);
    for (let i = 0; i < last; i++) {
      if (parseInt(olda[i]) < parseInt(nowa[i])) {
        return true;
      }
    }
    return olda.length < nowa.length;
  };
  return setInterval(async () => {
    try {
      if (document.getElementById("UpdateVersionWebsite")) return;
      const currentVersionWebsite = smetaStore.get(appConfig).smeta.stimateVersion;
      const location2 = window.location;
      const baseUrl2 = getBaseUrl();
      const response = await axios.get(`${baseUrl2}ver.json`);
      const responseVer = response.data;
      if (typeof responseVer !== "object" || isEmptyObject(responseVer)) return;
      const actualVersionWebsite = responseVer.version;
      if (!needRefreshWebsite(currentVersionWebsite, actualVersionWebsite)) return;
      renderMessageBox({
        dlgType: DlgType.Information,
        buttons: Button$1.Yes + Button$1.No,
        message: "Обнаружена новая версия сайта.\r\nОбновить страницу?",
        selectF: (ev) => {
          if (ev.target.value === DlgRes.Yes.toString()) location2.reload();
        },
        idModal: "UpdateVersionWebsite"
      });
    } catch (error) {
      console.warn(error.message);
    }
  }, intervalDelay);
}
var returnNotification = void 0;
function removeParam(key, sourceURL) {
  var splitUrl = sourceURL.split("?"), rtn = splitUrl[0], param, params_arr = [], queryString = sourceURL.indexOf("?") !== -1 ? splitUrl[1] : "";
  if (queryString !== "") {
    params_arr = queryString.split("&");
    for (var i = params_arr.length - 1; i >= 0; i -= 1) {
      param = params_arr[i].split("=")[0];
      if (param === key) {
        params_arr.splice(i, 1);
      }
    }
    rtn = rtn + "?" + params_arr.join("&");
  }
  return rtn;
}
function getLastLogin() {
  const sessionLastLogin = sessionStorage.getItem("LastLogin");
  const localLastLogin = getCookie("LastLogin");
  !sessionLastLogin && !localLastLogin && console.warn("Ошибка парсинга LastLogin");
  return sessionLastLogin || localLastLogin || "";
}
function getURLparam(key) {
  const search = getUrlSearh();
  const urlParams = new URLSearchParams(search);
  const param = urlParams.get(key);
  return param || "";
}
function hasURLparam(key) {
  const search = getUrlSearh();
  const urlParams = new URLSearchParams(search);
  return urlParams.has(key);
}
function deleteURLparam(key) {
  const search = getUrlSearh();
  const urlParams = new URLSearchParams(search);
  urlParams.delete(key);
}
function updateOptionsForUser(data) {
  var _a2, _b, _c;
  const [drx, user, workplace] = getLastLogin().split(",");
  const currentSecJSON = getCookie("CurrentSecJSON");
  const parsedJson = currentSecJSON === "" ? {} : JSON.parse(currentSecJSON);
  const jsoncrrsec = {
    ...parsedJson,
    [drx]: {
      ...parsedJson == null ? void 0 : parsedJson[drx],
      [user]: {
        ...(_a2 = parsedJson == null ? void 0 : parsedJson[drx]) == null ? void 0 : _a2[user],
        [workplace]: {
          ...(_c = (_b = parsedJson == null ? void 0 : parsedJson[drx]) == null ? void 0 : _b[user]) == null ? void 0 : _c[workplace],
          ...data
        }
      }
    }
  };
  createCokies("CurrentSecJSON", JSON.stringify(jsoncrrsec));
}
function getOptionsForUser() {
  var _a2, _b;
  let jsoncrrsec = getCookie("CurrentSecJSON");
  const [drx, user, workplace] = getLastLogin().split(",");
  jsoncrrsec = jsoncrrsec === "" ? {} : JSON.parse(jsoncrrsec);
  return (_b = (_a2 = jsoncrrsec == null ? void 0 : jsoncrrsec[drx]) == null ? void 0 : _a2[user]) == null ? void 0 : _b[workplace];
}
function createCokies(name, value) {
  document.cookie = name + "=" + value;
  localStorage.setItem(name, value);
}
function getCookie(cookieName) {
  const results = localStorage.getItem(cookieName);
  if (results) return results;
  else return "";
}
function getRandomArbitrary(min2, max2) {
  const res = Math.floor(Math.random() * (max2 - min2) + min2);
  return res;
}
const createPingInterval = () => {
  const isAuth = smetaStore.get(isAuthorized);
  if (!isAuth) return null;
  const pingTimeInterval = smetaStore.get(pingMinsAtom);
  return setInterval(() => {
    pingServer();
  }, pingTimeInterval);
};
const pingServer = (setNotifications) => {
  if (smetaStore.get(appConfig).smeta.ping !== false) {
    if (returnNotification === void 0 && setNotifications !== void 0) {
      returnNotification = setNotifications;
    }
    const loadMasks = document.querySelectorAll("[loadmask]");
    if (loadMasks.length > 0) {
      for (const val of loadMasks) {
        val.parentElement.remove();
      }
    }
    const axiosConfig = {
      loadMask: true,
      params: {
        smart: "1"
      }
    };
    return smetaAxios.get("ping", axiosConfig).then((json) => {
      if (!isEmptyObject(json) && returnNotification) returnNotification(json);
      return json;
    });
  }
};
function checkGenLicGuid(LicGuid, createNew) {
  let LicGUID = LicGuid;
  if (LicGUID === "" || LicGUID === null || createNew) {
    var s = "0123456789ABCDEFGHIKLMNOPQRSTVXYZ";
    for (var n = 0; n <= 31; n++) {
      if (n === 0) {
        LicGUID = s[getRandomArbitrary(1, 31)];
      } else {
        LicGUID = LicGUID + s[getRandomArbitrary(1, 31)];
      }
    }
    sessionStorage.setItem("LicG", LicGUID);
  }
  return LicGUID;
}
function getUrlForRequest(params2, LicGUID) {
  let attachment = new Map(params2);
  attachment.delete("prefix");
  attachment.delete("comand");
  const guid = LicGUID || sessionStorage.getItem("LicG");
  let result = "";
  const keys = Array.from(attachment.keys());
  for (let key of keys) {
    if (attachment.get(key) !== void 0) {
      result += `&${key}=${`${attachment.get(key)}`.replaceAll("/", "%2f")}`;
    }
  }
  return `${baseUrl}/web~${params2.get("prefix") === void 0 ? "project" : params2.get("prefix")}/${params2.get(
    "comand"
  )}?LicGUID=${guid}${result}`;
}
function XMLrequest(params2, postData) {
  var LicGUID, request = new XMLHttpRequest(), res = "", method;
  if (params2.has("LicGUID")) {
    LicGUID = params2.get("LicGUID");
    params2.delete("LicGUID");
  } else {
    LicGUID = sessionStorage.getItem("LicG");
    LicGUID = checkGenLicGuid(LicGUID);
  }
  const url = getUrlForRequest(params2, LicGUID);
  postData === void 0 ? method = "GET" : method = "POST";
  request.open(method, url, false);
  request.onload = function() {
    res = request.responseText;
  };
  if (postData) {
    let json = JSON.stringify(postData);
    request.send(json);
  } else request.send();
  try {
    let parsedJSON = JSON.parse(res);
    if (parsedJSON.error && params2.get("comand") !== "enter") {
      const Message = `Ошибка выполнения операции на сервере: ${parsedJSON.error.content}`;
      renderMessageBox({ dlgType: 1, buttons: 1, message: Message });
    }
    parsedJSON = checkServerAnswer(parsedJSON);
    return parsedJSON;
  } catch (err) {
    console.log(err);
  }
}
function checkServerAnswer(json) {
  var _a2;
  if ((_a2 = json.Message) == null ? void 0 : _a2.content) {
    renderMessageBox({ dlgType: 2, buttons: 1, message: json.Message.content });
    delete json.Message;
  }
  if (json.error && json.error.NeedNewPW === void 0 && json.error.LicRes === void 0) {
    renderMessageBox({ dlgType: 1, buttons: 1, message: json.error.content });
    delete json.error;
  }
  return json;
}
async function AxiosRequest(loadMask, params2, postData) {
  let LicGUID, res;
  LicGUID = sessionStorage.getItem("LicG");
  if (params2.has("LicGUID")) {
    LicGUID = params2.get("LicGUID");
  } else {
    LicGUID = checkGenLicGuid(LicGUID);
  }
  const paramsJson = Object.fromEntries(params2);
  const { prefix: prefix2, comand } = paramsJson;
  delete paramsJson.comand;
  delete paramsJson.prefix;
  const config2 = { prefix: prefix2 || "project", loadMask, params: { LicGUID, ...paramsJson } };
  try {
    if (!postData) {
      return smetaAxios.get(comand, config2).then((response) => {
        res = response;
        return res;
      });
    } else {
      return smetaAxios.post(comand, postData, config2).then((response) => {
        res = response;
        return res;
      });
    }
  } catch {
  }
  return res;
}
function ImgURL(attachment, style2, path) {
  let origin2 = `${baseUrl.replace("/web~", "")}/web~${attachment}`;
  const ip = smetaStore.get(ipAtom);
  if (ip) {
    origin2 += "?ip=" + ip;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsx("img", { alt: "", style: style2, src: origin2 }, path);
}
function ImgURLSRC(attachment) {
  if (attachment) {
    let origin2 = `${baseUrl.replace("/web~", "")}/web~${attachment}`;
    const ip = smetaStore.get(ipAtom);
    if (ip) {
      origin2 += "?ip=" + ip;
    }
    return origin2;
  }
}
const smetaStore = createStore();
const selectedProcessAtom = atom("");
const listOfProcessesAtom = atom([]);
const selectedSectionAtom = atom({
  //данные о текущей выбранной секции
  ID: "",
  CLSID: "",
  Name: "",
  Image: ""
});
const sectionListAtom = atom([]);
const pushNewSectionAtom = atom(null, (get2, set2, newValue) => {
  const sections = get2(sectionListAtom);
  const newSections = sections.concat(newValue);
  set2(sectionListAtom, newSections);
});
const setSelectedSectionAtom = atom(null, (get2, set2, newValue) => {
  makeCallBacks().then((callBacksResp) => {
    if (!callBacksResp) return;
    if (newValue.ID) {
      document.title = newValue.Name;
      updateOptionsForUser({
        ID: newValue.ID,
        CLSID: newValue.CLSID,
        Name: newValue.Name
      });
    }
    set2(selectedSectionAtom, newValue);
    setActiveSection(newValue.ID);
  });
});
const userOptions = getOptionsForUser();
const ipAtom = atom((userOptions == null ? void 0 : userOptions.IP) || null);
const pingIntervalAtom = atom(null);
const pingMinsAtom = atom(3e5);
atom(userOptions == null ? void 0 : userOptions.IP);
const currentTheme = atom((userOptions == null ? void 0 : userOptions.theme) || "light");
const animationsAtom = atom((userOptions == null ? void 0 : userOptions.animations) || false);
const refreshSectionDataAtom = atom(null);
const workPlaceToolsAtom = atom(void 0);
const imagesAtom = atom([]);
const unloadCallbacksAtom = atom({});
const clearUnloadCallBack = atom(null, (get2, set2, newValue) => {
  const callBacks = get2(unloadCallbacksAtom);
  const newCallBacks = { ...callBacks };
  delete newCallBacks[newValue];
  set2(unloadCallbacksAtom, newCallBacks);
});
const setUnloadCallbacksAtom = atom(null, (get2, set2, newValue) => {
  const [value] = Object.values(newValue);
  if (typeof value !== "function") return;
  const callBacks = get2(unloadCallbacksAtom);
  const newCallBacks = { ...callBacks, ...newValue };
  set2(unloadCallbacksAtom, newCallBacks);
});
const isAuthorized = atom(false);
const headFormAtom = atom({});
const hasStartPageAtom = atom(false);
const appConfig = atom({ ...defaultConfig });
const renderingIdAtom = atom({ renderingId: 0, personId: 0 });
const groupIdAtom = atom(0);
const salaryRangeAtom = atom({ year: "", month: "", range: "0" });
const leavesOpenAtom = atom(false);
const isAdminAtom = atom(userOptions == null ? void 0 : userOptions.isAdmin);
const isSuperUserAtom = atom(userOptions == null ? void 0 : userOptions.isSuperUser);
const isOrgEnterAtom = atom(userOptions == null ? void 0 : userOptions.isOrg);
const configEnabledAtom = atom(userOptions == null ? void 0 : userOptions.configEnabled);
atom(null);
const helpContextAtom = atom(userOptions == null ? void 0 : userOptions.helpContext);
const sectionPersonsData = atom({});
const userRightsAtom = atom({});
const gridSelectedRecordColorAtom = atom((userOptions == null ? void 0 : userOptions.gridSelectedRecordColor) || false);
const hideToastNotificationsAtom = atom((userOptions == null ? void 0 : userOptions.hideToastNotifications) || false);
const editorCash = atom({
  detailsOpen: false
});
function getMuiTheme(theme) {
  switch (theme) {
    case "light":
      return createTheme({});
    case "blue":
      return createTheme({
        components: {
          MuiBadge: {
            styleOverrides: {
              badge: {
                backgroundColor: "#9c27b0"
              }
            }
          }
        }
      });
    default:
      return createTheme({});
  }
}
const ThemeProvider = ({ children }) => {
  const theme = useAtomValue(currentTheme);
  const muiTheme = getMuiTheme(theme);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider$1, { theme: muiTheme, children });
};
function CheckMobile() {
  function checkMobileOs() {
    let link = "";
    if (navigator.userAgent.toLowerCase().indexOf("android") > -1) {
      window.location.href = "https://apps.rustore.ru/app/com.krista.smeta_personal_account";
    } else if (navigator.userAgent.toLowerCase().indexOf("iphone") > -1) {
      window.location.href = "https://apps.apple.com/id/app/id6447184444";
    }
    return link;
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid$1,
    {
      container: true,
      direction: "column",
      justifyContent: "center",
      alignItems: "center",
      sx: { width: "100%", height: "100%", m: 1 },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: "Функционал недоступен для мобильных устройств, скачайте приложение:" }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { item: true, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
          Button$2,
          {
            style: { backgroundColor: "#3c5b77", textTransform: "none" },
            variant: "contained",
            sx: { mt: 3, mb: 2 },
            onClick: checkMobileOs,
            children: "Скачать"
          }
        ) })
      ]
    }
  );
}
function webkcrypt_globals() {
  window.cadesplugin_skip_extension_install = true;
  window.cadesplugin_load_timeout = 500;
}
function cadesplugin_api() {
  if (window.cadesplugin) return;
  var pluginObject;
  var plugin_resolved = 0;
  var plugin_reject;
  var plugin_resolve;
  var isOpera = 0;
  var isFireFox = 0;
  var isSafari = 0;
  var isYandex = 0;
  var canPromise = !!window.Promise;
  var cadesplugin_loaded_event_recieved = false;
  var isFireFoxExtensionLoaded = false;
  var cadesplugin2;
  if (canPromise) {
    cadesplugin2 = new Promise(function(resolve, reject) {
      plugin_resolve = resolve;
      plugin_reject = reject;
    });
  } else {
    cadesplugin2 = {};
  }
  function check_browser() {
    var ua = navigator.userAgent, tem, M2 = ua.match(/(opera|yabrowser|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i) || [];
    if (/trident/i.test(M2[1])) {
      tem = /\brv[ :]+(\d+)/g.exec(ua) || [];
      return { name: "IE", version: tem[1] || "" };
    }
    if (M2[1] === "Chrome") {
      tem = ua.match(/\b(OPR|Edg|YaBrowser)\/(\d+)/);
      if (tem != null) return { name: tem[1].replace("OPR", "Opera"), version: tem[2] };
    }
    M2 = M2[2] ? [M2[1], M2[2]] : [navigator.appName, navigator.appVersion, "-?"];
    if ((tem = ua.match(/version\/(\d+)/i)) != null) M2.splice(1, 1, tem[1]);
    return { name: M2[0], version: M2[1] };
  }
  var browserSpecs = check_browser();
  function cpcsp_console_log(level, msg) {
    if (typeof console === "undefined") return;
    if (level <= cadesplugin2.current_log_level) {
      if (level === cadesplugin2.LOG_LEVEL_DEBUG) console.log("DEBUG: %s", msg);
      if (level === cadesplugin2.LOG_LEVEL_INFO) console.info("INFO: %s", msg);
      if (level === cadesplugin2.LOG_LEVEL_ERROR) console.error("ERROR: %s", msg);
      return;
    }
  }
  function get_extension_version(callback) {
    window.postMessage("cadesplugin_extension_version_request", "*");
    window.addEventListener(
      "message",
      function(event) {
        var resp_prefix = "cadesplugin_extension_version_response:";
        if (typeof event.data !== "string" || event.data.indexOf(resp_prefix) !== 0) return;
        ext_version = event.data.substring(resp_prefix.length);
        callback(ext_version);
      },
      false
    );
  }
  function get_extension_id(callback) {
    window.postMessage("cadesplugin_extension_id_request", "*");
    window.addEventListener(
      "message",
      function(event) {
        var resp_prefix = "cadesplugin_extension_id_response:";
        if (typeof event.data !== "string" || event.data.indexOf(resp_prefix) !== 0) return;
        ext_id = event.data.substring(resp_prefix.length);
        callback(ext_id);
      },
      false
    );
  }
  function set_log_level(level) {
    if (!(level === cadesplugin2.LOG_LEVEL_DEBUG || level === cadesplugin2.LOG_LEVEL_INFO || level === cadesplugin2.LOG_LEVEL_ERROR)) {
      cpcsp_console_log(cadesplugin2.LOG_LEVEL_ERROR, "cadesplugin_api.js: Incorrect log_level: " + level);
      return;
    }
    cadesplugin2.current_log_level = level;
    if (cadesplugin2.current_log_level === cadesplugin2.LOG_LEVEL_DEBUG)
      cpcsp_console_log(cadesplugin2.LOG_LEVEL_INFO, "cadesplugin_api.js: log_level = DEBUG");
    if (cadesplugin2.current_log_level === cadesplugin2.LOG_LEVEL_INFO)
      cpcsp_console_log(cadesplugin2.LOG_LEVEL_INFO, "cadesplugin_api.js: log_level = INFO");
    if (cadesplugin2.current_log_level === cadesplugin2.LOG_LEVEL_ERROR)
      cpcsp_console_log(cadesplugin2.LOG_LEVEL_INFO, "cadesplugin_api.js: log_level = ERROR");
    if (isNativeMessageSupported()) {
      if (cadesplugin2.current_log_level === cadesplugin2.LOG_LEVEL_DEBUG) window.postMessage("set_log_level=debug", "*");
      if (cadesplugin2.current_log_level === cadesplugin2.LOG_LEVEL_INFO) window.postMessage("set_log_level=info", "*");
      if (cadesplugin2.current_log_level === cadesplugin2.LOG_LEVEL_ERROR) window.postMessage("set_log_level=error", "*");
    }
  }
  function set_constantValues() {
    cadesplugin2.CAPICOM_MEMORY_STORE = 0;
    cadesplugin2.CAPICOM_LOCAL_MACHINE_STORE = 1;
    cadesplugin2.CAPICOM_CURRENT_USER_STORE = 2;
    cadesplugin2.CAPICOM_SMART_CARD_USER_STORE = 4;
    cadesplugin2.CADESCOM_MEMORY_STORE = 0;
    cadesplugin2.CADESCOM_LOCAL_MACHINE_STORE = 1;
    cadesplugin2.CADESCOM_CURRENT_USER_STORE = 2;
    cadesplugin2.CADESCOM_SMART_CARD_USER_STORE = 4;
    cadesplugin2.CADESCOM_CONTAINER_STORE = 100;
    cadesplugin2.CAPICOM_MY_STORE = "My";
    cadesplugin2.CAPICOM_STORE_OPEN_READ_WRITE = 1;
    cadesplugin2.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED = 2;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;
    cadesplugin2.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPED = 0;
    cadesplugin2.CADESCOM_XML_SIGNATURE_TYPE_ENVELOPING = 1;
    cadesplugin2.CADESCOM_XML_SIGNATURE_TYPE_TEMPLATE = 2;
    cadesplugin2.CADESCOM_XADES_DEFAULT = 16;
    cadesplugin2.CADESCOM_XADES_BES = 32;
    cadesplugin2.CADESCOM_XADES_T = 80;
    cadesplugin2.CADESCOM_XADES_X_LONG_TYPE_1 = 1488;
    cadesplugin2.CADESCOM_XMLDSIG_TYPE = 0;
    cadesplugin2.XmlDsigGost3410UrlObsolete = "http://www.w3.org/2001/04/xmldsig-more#gostr34102001-gostr3411";
    cadesplugin2.XmlDsigGost3411UrlObsolete = "http://www.w3.org/2001/04/xmldsig-more#gostr3411";
    cadesplugin2.XmlDsigGost3410Url = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102001-gostr3411";
    cadesplugin2.XmlDsigGost3411Url = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr3411";
    cadesplugin2.XmlDsigGost3411Url2012256 = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-256";
    cadesplugin2.XmlDsigGost3410Url2012256 = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-256";
    cadesplugin2.XmlDsigGost3411Url2012512 = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34112012-512";
    cadesplugin2.XmlDsigGost3410Url2012512 = "urn:ietf:params:xml:ns:cpxmlsec:algorithms:gostr34102012-gostr34112012-512";
    cadesplugin2.CADESCOM_CADES_DEFAULT = 0;
    cadesplugin2.CADESCOM_CADES_BES = 1;
    cadesplugin2.CADESCOM_CADES_T = 5;
    cadesplugin2.CADESCOM_CADES_X_LONG_TYPE_1 = 93;
    cadesplugin2.CADESCOM_CADES_A = 221;
    cadesplugin2.CADESCOM_PKCS7_TYPE = 65535;
    cadesplugin2.CADESCOM_ENCODE_BASE64 = 0;
    cadesplugin2.CADESCOM_ENCODE_BINARY = 1;
    cadesplugin2.CADESCOM_ENCODE_ANY = -1;
    cadesplugin2.CAPICOM_CERTIFICATE_INCLUDE_CHAIN_EXCEPT_ROOT = 0;
    cadesplugin2.CAPICOM_CERTIFICATE_INCLUDE_WHOLE_CHAIN = 1;
    cadesplugin2.CAPICOM_CERTIFICATE_INCLUDE_END_ENTITY_ONLY = 2;
    cadesplugin2.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME = 0;
    cadesplugin2.CAPICOM_CERT_INFO_ISSUER_SIMPLE_NAME = 1;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_SHA1_HASH = 0;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_SUBJECT_NAME = 1;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_ISSUER_NAME = 2;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_ROOT_NAME = 3;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_TEMPLATE_NAME = 4;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_EXTENSION = 5;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_EXTENDED_PROPERTY = 6;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_APPLICATION_POLICY = 7;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_CERTIFICATE_POLICY = 8;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_TIME_VALID = 9;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_TIME_NOT_YET_VALID = 10;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_TIME_EXPIRED = 11;
    cadesplugin2.CAPICOM_CERTIFICATE_FIND_KEY_USAGE = 12;
    cadesplugin2.CAPICOM_DIGITAL_SIGNATURE_KEY_USAGE = 128;
    cadesplugin2.CAPICOM_PROPID_ENHKEY_USAGE = 9;
    cadesplugin2.CAPICOM_OID_OTHER = 0;
    cadesplugin2.CAPICOM_OID_KEY_USAGE_EXTENSION = 10;
    cadesplugin2.CAPICOM_EKU_CLIENT_AUTH = 2;
    cadesplugin2.CAPICOM_EKU_SMARTCARD_LOGON = 5;
    cadesplugin2.CAPICOM_EKU_OTHER = 0;
    cadesplugin2.CAPICOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;
    cadesplugin2.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;
    cadesplugin2.CAPICOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;
    cadesplugin2.CADESCOM_AUTHENTICATED_ATTRIBUTE_SIGNING_TIME = 0;
    cadesplugin2.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_NAME = 1;
    cadesplugin2.CADESCOM_AUTHENTICATED_ATTRIBUTE_DOCUMENT_DESCRIPTION = 2;
    cadesplugin2.CADESCOM_AUTHENTICATED_ATTRIBUTE_MACHINE_INFO = 256;
    cadesplugin2.CADESCOM_ATTRIBUTE_OTHER = -1;
    cadesplugin2.CADESCOM_STRING_TO_UCS2LE = 0;
    cadesplugin2.CADESCOM_BASE64_TO_BINARY = 1;
    cadesplugin2.CADESCOM_DISPLAY_DATA_NONE = 0;
    cadesplugin2.CADESCOM_DISPLAY_DATA_CONTENT = 1;
    cadesplugin2.CADESCOM_DISPLAY_DATA_ATTRIBUTE = 2;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_RC2 = 0;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_RC4 = 1;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_DES = 2;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_3DES = 3;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_AES = 4;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_GOST_28147_89 = 25;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_GOST_MAGMA = 35;
    cadesplugin2.CADESCOM_ENCRYPTION_ALGORITHM_GOST_KUZNYECHIK = 45;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_SHA1 = 0;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_MD2 = 1;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_MD4 = 2;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_MD5 = 3;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_SHA_256 = 4;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_SHA_384 = 5;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_SHA_512 = 6;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_CP_GOST_3411 = 100;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256 = 101;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512 = 102;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_HMAC = 110;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_256_HMAC = 111;
    cadesplugin2.CADESCOM_HASH_ALGORITHM_CP_GOST_3411_2012_512_HMAC = 112;
    cadesplugin2.LOG_LEVEL_DEBUG = 4;
    cadesplugin2.LOG_LEVEL_INFO = 2;
    cadesplugin2.LOG_LEVEL_ERROR = 1;
    cadesplugin2.CADESCOM_AllowNone = 0;
    cadesplugin2.CADESCOM_AllowNoOutstandingRequest = 1;
    cadesplugin2.CADESCOM_AllowUntrustedCertificate = 2;
    cadesplugin2.CADESCOM_AllowUntrustedRoot = 4;
    cadesplugin2.CADESCOM_SkipInstallToStore = 268435456;
    cadesplugin2.CADESCOM_InstallCertChainToContainer = 536870912;
    cadesplugin2.CADESCOM_UseContainerStore = 1073741824;
    cadesplugin2.ContextNone = 0;
    cadesplugin2.ContextUser = 1;
    cadesplugin2.ContextMachine = 2;
    cadesplugin2.ContextAdministratorForceMachine = 3;
    cadesplugin2.ENABLE_CARRIER_TYPE_CSP = 1;
    cadesplugin2.ENABLE_CARRIER_TYPE_FKC_NO_SM = 2;
    cadesplugin2.ENABLE_CARRIER_TYPE_FKC_SM = 4;
    cadesplugin2.ENABLE_ANY_CARRIER_TYPE = 7;
    cadesplugin2.DISABLE_EVERY_CARRIER_OPERATION = 0;
    cadesplugin2.ENABLE_CARRIER_OPEN_ENUM = 1;
    cadesplugin2.ENABLE_CARRIER_CREATE = 2;
    cadesplugin2.ENABLE_ANY_OPERATION = 3;
    cadesplugin2.CADESCOM_PRODUCT_CSP = 0;
    cadesplugin2.CADESCOM_PRODUCT_OCSP = 1;
    cadesplugin2.CADESCOM_PRODUCT_TSP = 2;
    cadesplugin2.MEDIA_TYPE_REGISTRY = 1;
    cadesplugin2.MEDIA_TYPE_HDIMAGE = 2;
    cadesplugin2.MEDIA_TYPE_CLOUD = 4;
    cadesplugin2.MEDIA_TYPE_SCARD = 8;
    cadesplugin2.XCN_CRYPT_STRING_BASE64HEADER = 0;
    cadesplugin2.XCN_CRYPT_STRING_BASE64 = 1;
    cadesplugin2.XCN_CRYPT_STRING_BINARY = 2;
    cadesplugin2.XCN_CRYPT_STRING_BASE64REQUESTHEADER = 3;
    cadesplugin2.XCN_CRYPT_STRING_HEX = 4;
    cadesplugin2.XCN_CRYPT_STRING_HEXASCII = 5;
    cadesplugin2.XCN_CRYPT_STRING_BASE64_ANY = 6;
    cadesplugin2.XCN_CRYPT_STRING_ANY = 7;
    cadesplugin2.XCN_CRYPT_STRING_HEX_ANY = 8;
    cadesplugin2.XCN_CRYPT_STRING_BASE64X509CRLHEADER = 9;
    cadesplugin2.XCN_CRYPT_STRING_HEXADDR = 10;
    cadesplugin2.XCN_CRYPT_STRING_HEXASCIIADDR = 11;
    cadesplugin2.XCN_CRYPT_STRING_HEXRAW = 12;
    cadesplugin2.XCN_CRYPT_STRING_BASE64URI = 13;
    cadesplugin2.XCN_CRYPT_STRING_ENCODEMASK = 255;
    cadesplugin2.XCN_CRYPT_STRING_CHAIN = 256;
    cadesplugin2.XCN_CRYPT_STRING_TEXT = 512;
    cadesplugin2.XCN_CRYPT_STRING_PERCENTESCAPE = 134217728;
    cadesplugin2.XCN_CRYPT_STRING_HASHDATA = 268435456;
    cadesplugin2.XCN_CRYPT_STRING_STRICT = 536870912;
    cadesplugin2.XCN_CRYPT_STRING_NOCRLF = 1073741824;
    cadesplugin2.XCN_CRYPT_STRING_NOCR = 2147483648;
    cadesplugin2.XCN_CERT_NAME_STR_NONE = 0;
    cadesplugin2.XCN_AT_NONE = 0;
    cadesplugin2.XCN_AT_KEYEXCHANGE = 1;
    cadesplugin2.XCN_AT_SIGNATURE = 2;
    cadesplugin2.AT_KEYEXCHANGE = 1;
    cadesplugin2.AT_SIGNATURE = 2;
    cadesplugin2.AT_UECSYMMETRICKEY = 2147483652;
    cadesplugin2.AT_SYMMETRIC = 2147483653;
    cadesplugin2.CARRIER_FLAG_REMOVABLE = 1;
    cadesplugin2.CARRIER_FLAG_UNIQUE = 2;
    cadesplugin2.CARRIER_FLAG_PROTECTED = 4;
    cadesplugin2.CARRIER_FLAG_FUNCTIONAL_CARRIER = 8;
    cadesplugin2.CARRIER_FLAG_SECURE_MESSAGING = 16;
    cadesplugin2.CARRIER_FLAG_ABLE_SET_KEY = 32;
    cadesplugin2.CARRIER_FLAG_ABLE_VISUALISE_SIGNATURE = 64;
    cadesplugin2.CARRIER_FLAG_VIRTUAL = 128;
    cadesplugin2.CRYPT_MODE_CBCSTRICT = 1;
    cadesplugin2.CRYPT_MODE_CNT = 3;
    cadesplugin2.CRYPT_MODE_CBCRFC4357 = 31;
    cadesplugin2.CRYPT_MODE_CTR = 32;
    cadesplugin2.CRYPT_MODE_MGM = 33;
    cadesplugin2.CRYPT_MODE_GCM = 34;
    cadesplugin2.CRYPT_MODE_OMAC_CTR = 35;
    cadesplugin2.CRYPT_MODE_WRAP = 36;
    cadesplugin2.CRYPT_MODE_WRAP_PAD = 37;
    cadesplugin2.PKCS5_PADDING = 1;
    cadesplugin2.RANDOM_PADDING = 2;
    cadesplugin2.ZERO_PADDING = 3;
    cadesplugin2.ISO10126_PADDING = 4;
    cadesplugin2.ANSI_X923_PADDING = 5;
    cadesplugin2.TLS_1_0_PADDING = 6;
    cadesplugin2.ISO_IEC_7816_4_PADDING = 7;
    cadesplugin2.CAPICOM_STORE_SAVE_AS_SERIALIZED = 0;
    cadesplugin2.CAPICOM_STORE_SAVE_AS_PKCS7 = 1;
    cadesplugin2.CERT_TRUST_NO_ERROR = 0;
    cadesplugin2.CERT_TRUST_IS_NOT_TIME_VALID = 1;
    cadesplugin2.CERT_TRUST_IS_REVOKED = 4;
    cadesplugin2.CERT_TRUST_IS_NOT_SIGNATURE_VALID = 8;
    cadesplugin2.CERT_TRUST_IS_NOT_VALID_FOR_USAGE = 16;
    cadesplugin2.CERT_TRUST_IS_UNTRUSTED_ROOT = 32;
    cadesplugin2.CERT_TRUST_REVOCATION_STATUS_UNKNOWN = 64;
    cadesplugin2.CERT_TRUST_IS_CYCLIC = 128;
    cadesplugin2.CERT_TRUST_INVALID_EXTENSION = 256;
    cadesplugin2.CERT_TRUST_INVALID_POLICY_CONSTRAINTS = 512;
    cadesplugin2.CERT_TRUST_INVALID_BASIC_CONSTRAINTS = 1024;
    cadesplugin2.CERT_TRUST_INVALID_NAME_CONSTRAINTS = 2048;
    cadesplugin2.CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT = 4096;
    cadesplugin2.CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT = 8192;
    cadesplugin2.CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT = 16384;
    cadesplugin2.CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT = 32768;
    cadesplugin2.CERT_TRUST_IS_OFFLINE_REVOCATION = 16777216;
    cadesplugin2.CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY = 33554432;
    cadesplugin2.CERT_TRUST_IS_EXPLICIT_DISTRUST = 67108864;
    cadesplugin2.CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT = 134217728;
    cadesplugin2.CERT_TRUST_HAS_WEAK_SIGNATURE = 1048576;
    cadesplugin2.XCN_CERT_NO_KEY_USAGE = 0;
    cadesplugin2.XCN_CERT_DIGITAL_SIGNATURE_KEY_USAGE = 128;
    cadesplugin2.XCN_CERT_NON_REPUDIATION_KEY_USAGE = 64;
    cadesplugin2.XCN_CERT_KEY_ENCIPHERMENT_KEY_USAGE = 32;
    cadesplugin2.XCN_CERT_DATA_ENCIPHERMENT_KEY_USAGE = 16;
    cadesplugin2.XCN_CERT_KEY_AGREEMENT_KEY_USAGE = 8;
    cadesplugin2.XCN_CERT_KEY_CERT_SIGN_KEY_USAGE = 4;
    cadesplugin2.XCN_CERT_OFFLINE_CRL_SIGN_KEY_USAGE = 2;
    cadesplugin2.XCN_CERT_CRL_SIGN_KEY_USAGE = 2;
    cadesplugin2.XCN_CERT_ENCIPHER_ONLY_KEY_USAGE = 1;
    cadesplugin2.XCN_CERT_DECIPHER_ONLY_KEY_USAGE = 32768;
    cadesplugin2.CADESCOM_XADES_ACCEPT_ANY_ID_ATTR_NAMESPACE = 1;
    cadesplugin2.CADES_USE_OCSP_AUTHORIZED_POLICY = 131072;
    cadesplugin2.XCN_NCRYPT_NO_OPERATION = 0;
    cadesplugin2.XCN_NCRYPT_CIPHER_OPERATION = 1;
    cadesplugin2.XCN_NCRYPT_HASH_OPERATION = 2;
    cadesplugin2.XCN_NCRYPT_ASYMMETRIC_ENCRYPTION_OPERATION = 4;
    cadesplugin2.XCN_NCRYPT_SECRET_AGREEMENT_OPERATION = 8;
    cadesplugin2.XCN_NCRYPT_SIGNATURE_OPERATION = 16;
    cadesplugin2.XCN_NCRYPT_RNG_OPERATION = 32;
    cadesplugin2.XCN_CRYPT_ANY_GROUP_ID = 0;
    cadesplugin2.XCN_CRYPT_HASH_ALG_OID_GROUP_ID = 1;
    cadesplugin2.XCN_CRYPT_ENCRYPT_ALG_OID_GROUP_ID = 2;
    cadesplugin2.XCN_CRYPT_PUBKEY_ALG_OID_GROUP_ID = 3;
    cadesplugin2.XCN_CRYPT_SIGN_ALG_OID_GROUP_ID = 4;
    cadesplugin2.XCN_CRYPT_RDN_ATTR_OID_GROUP_ID = 5;
    cadesplugin2.XCN_CRYPT_EXT_OR_ATTR_OID_GROUP_ID = 6;
    cadesplugin2.XCN_CRYPT_ENHKEY_USAGE_OID_GROUP_ID = 7;
    cadesplugin2.XCN_CRYPT_POLICY_OID_GROUP_ID = 8;
    cadesplugin2.XCN_CRYPT_TEMPLATE_OID_GROUP_ID = 9;
    cadesplugin2.XCN_CRYPT_OID_INFO_PUBKEY_ANY = 0;
    cadesplugin2.XCN_CRYPT_OID_INFO_PUBKEY_SIGN_KEY_FLAG = 2147483648;
    cadesplugin2.XCN_CRYPT_OID_INFO_PUBKEY_ENCRYPT_KEY_FLAG = 1073741824;
    cadesplugin2.AlgorithmFlagsNone = 0;
    cadesplugin2.AlgorithmFlagsWrap = 1;
  }
  function async_spawn(generatorFunc) {
    function continuer(verb, arg) {
      var result;
      try {
        result = generator[verb](arg);
      } catch (err) {
        return Promise.reject(err);
      }
      if (result.done) {
        return result.value;
      } else {
        return Promise.resolve(result.value).then(onFulfilled, onRejected);
      }
    }
    var generator = generatorFunc(Array.prototype.slice.call(arguments, 1));
    var onFulfilled = continuer.bind(continuer, "next");
    var onRejected = continuer.bind(continuer, "throw");
    return onFulfilled();
  }
  function isIE2() {
    return browserSpecs.name === "IE" || browserSpecs.name === "MSIE";
  }
  function isIOS() {
    return navigator.userAgent.match(/ipod/i) || navigator.userAgent.match(/ipad/i) || navigator.userAgent.match(/iphone/i);
  }
  function isNativeMessageSupported() {
    if (isIE2()) return false;
    if (browserSpecs.name === "Edg") {
      return true;
    }
    if (browserSpecs.name === "YaBrowser") {
      isYandex = true;
      return true;
    }
    if (browserSpecs.name === "Opera") {
      isOpera = true;
      if (browserSpecs.version >= 33) {
        return true;
      } else {
        return false;
      }
    }
    if (browserSpecs.name === "Firefox") {
      isFireFox = true;
      if (browserSpecs.version >= 52) {
        return true;
      } else {
        return false;
      }
    }
    if (browserSpecs.name === "Chrome") {
      if (browserSpecs.version >= 42) {
        return true;
      } else {
        return false;
      }
    }
    if (browserSpecs.name === "Safari") {
      isSafari = true;
      if (browserSpecs.version >= 12) {
        return true;
      } else {
        return false;
      }
    }
  }
  function CreateObject(name) {
    if (isIOS()) {
      return call_ru_cryptopro_npcades_10_native_bridge("CreateObject", [name]);
    }
    if (isIE2()) {
      if (name.match(/X509Enrollment/i)) {
        try {
          var objCertEnrollClassFactory = document.getElementById("webClassFactory");
          return objCertEnrollClassFactory.CreateObject(name);
        } catch (e2) {
          try {
            var objWebClassFactory = document.getElementById("certEnrollClassFactory");
            return objWebClassFactory.CreateObject(name);
          } catch (err) {
            throw "Для создания обьектов X509Enrollment следует настроить веб-узел на использование проверки подлинности по протоколу HTTPS";
          }
        }
      }
      try {
        var objWebClassFactory = document.getElementById("webClassFactory");
        return objWebClassFactory.CreateObject(name);
      } catch (e2) {
        return new ActiveXObject(name);
      }
    }
    return pluginObject.CreateObject(name);
  }
  function decimalToHexString(number) {
    if (number < 0) {
      number = 4294967295 + number + 1;
    }
    return number.toString(16).toUpperCase();
  }
  function GetMessageFromException(e2) {
    var err = e2.message;
    if (!err) {
      err = e2;
    } else if (e2.number) {
      err += " (0x" + decimalToHexString(e2.number) + ")";
    }
    return err;
  }
  function getLastError(exception) {
    if (isNativeMessageSupported() || isIE2() || isIOS()) {
      return GetMessageFromException(exception);
    }
    try {
      return pluginObject.getLastError();
    } catch (e2) {
      return GetMessageFromException(exception);
    }
  }
  function ReleasePluginObjects() {
    return cpcsp_chrome_nmcades.ReleasePluginObjects();
  }
  function CreateObjectAsync(name) {
    return pluginObject.CreateObjectAsync(name);
  }
  var ru_cryptopro_npcades_10_native_bridge = {
    callbacksCount: 1,
    callbacks: {},
    // Automatically called by native layer when a result is available
    resultForCallback: function resultForCallback(callbackId, resultArray2) {
      var callback = ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId];
      if (!callback) return;
      callback.apply(null, resultArray2);
    },
    // Use this in javascript to request native objective-c code
    // functionName : string (I think the name is explicit :p)
    // args : array of arguments
    // callback : function with n-arguments that is going to be called when the native code returned
    call: function call(functionName, args, callback) {
      var hasCallback = callback && typeof callback === "function";
      var callbackId = hasCallback ? ru_cryptopro_npcades_10_native_bridge.callbacksCount++ : 0;
      if (hasCallback) ru_cryptopro_npcades_10_native_bridge.callbacks[callbackId] = callback;
      var iframe = document.createElement("IFRAME");
      var arrObjs = new Array("_CPNP_handle");
      try {
        iframe.setAttribute(
          "src",
          "cpnp-js-call:" + functionName + ":" + callbackId + ":" + encodeURIComponent(JSON.stringify(args, arrObjs))
        );
      } catch (e2) {
        alert(e2);
      }
      document.documentElement.appendChild(iframe);
      iframe.parentNode.removeChild(iframe);
      iframe = null;
    }
  };
  function call_ru_cryptopro_npcades_10_native_bridge(functionName, array) {
    var tmpobj;
    var ex;
    ru_cryptopro_npcades_10_native_bridge.call(functionName, array, function(e2, response) {
      ex = e2;
      var tmpobj2 = "";
      try {
        tmpobj2 = JSON.parse(response);
      } catch (e3) {
        tmpobj2 = response;
      }
      if (typeof tmpobj2 === "string") {
        tmpobj2 = tmpobj2.replace(/\\\n/gm, "\n");
        tmpobj2 = tmpobj2.replace(/\\\r/gm, "\r");
      }
    });
    if (ex) throw ex;
    return tmpobj;
  }
  function show_firefox_missing_extension_dialog() {
    if (!window.cadesplugin_skip_extension_install) {
      var ovr = document.createElement("div");
      ovr.id = "cadesplugin_ovr";
      ovr.style = "visibility: hidden; position: fixed; left: 0px; top: 0px; width:100%; height:100%; background-color: rgba(0,0,0,0.7)";
      ovr.innerHTML = "<div id='cadesplugin_ovr_item' style='position:relative; max-width:400px; margin:100px auto; background-color:#fff; border:2px solid #000; padding:10px; text-align:center; opacity: 1; z-index: 1500'><button id='cadesplugin_close_install' style='float: right; font-size: 10px; background: transparent; border: 1; margin: -5px'>X</button><p>Для работы КриптоПро ЭЦП Browser plugin на данном сайте необходимо расширение для браузера. Убедитесь, что оно у Вас включено или установите его.<p><a href='https://www.cryptopro.ru/sites/default/files/products/cades/extensions/firefox_cryptopro_extension_latest.xpi'>Скачать расширение</a></p></div>";
      document.getElementsByTagName("Body")[0].appendChild(ovr);
      document.getElementById("cadesplugin_close_install").addEventListener("click", function() {
        plugin_loaded_error("Плагин недоступен");
        document.getElementById("cadesplugin_ovr").style.visibility = "hidden";
      });
      ovr.addEventListener("click", function() {
        plugin_loaded_error("Плагин недоступен");
        document.getElementById("cadesplugin_ovr").style.visibility = "hidden";
      });
      ovr.style.visibility = "visible";
    }
  }
  function firefox_or_safari_nmcades_onload() {
    if (window.cadesplugin_extension_loaded_callback) window.cadesplugin_extension_loaded_callback();
    isFireFoxExtensionLoaded = true;
    cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);
  }
  function nmcades_api_onload() {
    if (!isIE2() && !isFireFox && !isSafari) {
      if (window.cadesplugin_extension_loaded_callback) window.cadesplugin_extension_loaded_callback();
    }
    window.postMessage("cadesplugin_echo_request", "*");
    window.addEventListener(
      "message",
      function(event) {
        if (typeof event.data !== "string" || !event.data.match("cadesplugin_loaded")) return;
        if (cadesplugin_loaded_event_recieved) return;
        if (isFireFox || isSafari) {
          var url = event.data.substring(event.data.indexOf("url:") + 4);
          if (!url.match("^(moz|safari)-extension://[a-zA-Z0-9/_-]+/nmcades_plugin_api.js$")) {
            cpcsp_console_log(
              cadesplugin2.LOG_LEVEL_ERROR,
              'Bad url "' + url + '" for load CryptoPro Extension for CAdES Browser plug-in'
            );
            plugin_loaded_error();
            return;
          }
          var fileref = document.createElement("script");
          fileref.setAttribute("type", "text/javascript");
          fileref.setAttribute("src", url);
          fileref.onerror = plugin_loaded_error;
          fileref.onload = firefox_or_safari_nmcades_onload;
          document.getElementsByTagName("head")[0].appendChild(fileref);
        } else {
          cpcsp_chrome_nmcades.check_chrome_plugin(plugin_loaded, plugin_loaded_error);
        }
        cadesplugin_loaded_event_recieved = true;
      },
      false
    );
  }
  function load_extension() {
    if (isFireFox || isSafari) {
      nmcades_api_onload();
    } else {
      if (isOpera || isYandex) {
        var fileref = document.createElement("script");
        fileref.setAttribute("type", "text/javascript");
        fileref.setAttribute("src", "chrome-extension://epebfcehmdedogndhlcacafjaacknbcm/nmcades_plugin_api.js");
        fileref.onerror = plugin_loaded_error;
        fileref.onload = nmcades_api_onload;
        document.getElementsByTagName("head")[0].appendChild(fileref);
      } else {
        var fileref = document.createElement("script");
        fileref.setAttribute("type", "text/javascript");
        fileref.setAttribute("src", "chrome-extension://iifchhfnnmpdbibifmljnfjhpififfog/nmcades_plugin_api.js");
        fileref.onerror = plugin_loaded_error;
        fileref.onload = nmcades_api_onload;
        document.getElementsByTagName("head")[0].appendChild(fileref);
      }
    }
  }
  function load_npapi_plugin() {
    var elem = document.createElement("object");
    elem.setAttribute("id", "cadesplugin_object");
    elem.setAttribute("type", "application/x-cades");
    elem.setAttribute("style", "visibility: hidden");
    document.getElementsByTagName("body")[0].appendChild(elem);
    pluginObject = document.getElementById("cadesplugin_object");
    if (isIE2()) {
      var elem1 = document.createElement("object");
      elem1.setAttribute("id", "certEnrollClassFactory");
      elem1.setAttribute("classid", "clsid:884e2049-217d-11da-b2a4-000e7bbb2b09");
      elem1.setAttribute("style", "visibility: hidden");
      document.getElementsByTagName("body")[0].appendChild(elem1);
      var elem2 = document.createElement("object");
      elem2.setAttribute("id", "webClassFactory");
      elem2.setAttribute("classid", "clsid:B04C8637-10BD-484E-B0DA-B8A039F60024");
      elem2.setAttribute("style", "visibility: hidden");
      document.getElementsByTagName("body")[0].appendChild(elem2);
    }
  }
  function plugin_loaded() {
    plugin_resolved = 1;
    if (canPromise) {
      plugin_resolve();
    } else {
      window.postMessage("cadesplugin_loaded", "*");
    }
  }
  function plugin_loaded_error(msg) {
    if (typeof msg === "undefined" || typeof msg === "object") msg = "Плагин недоступен";
    plugin_resolved = 1;
    if (canPromise) {
      plugin_reject(msg);
    } else {
      window.postMessage("cadesplugin_load_error", "*");
    }
  }
  function check_load_timeout() {
    if (plugin_resolved === 1) return;
    if (isFireFox) {
      if (!isFireFoxExtensionLoaded) show_firefox_missing_extension_dialog();
    }
    plugin_resolved = 1;
    if (canPromise) {
      plugin_reject("Истекло время ожидания загрузки плагина");
    } else {
      window.postMessage("cadesplugin_load_error", "*");
    }
  }
  function check_npapi_plugin() {
    try {
      var oAbout = CreateObject("CAdESCOM.About");
      plugin_loaded();
    } catch (err) {
      document.getElementById("cadesplugin_object").style.display = "none";
      var mimetype = navigator.mimeTypes["application/x-cades"];
      if (mimetype) {
        var plugin = mimetype.enabledPlugin;
        if (plugin) {
          plugin_loaded_error("Плагин загружен, но не создаются обьекты");
        } else {
          plugin_loaded_error("Ошибка при загрузке плагина");
        }
      } else {
        plugin_loaded_error("Плагин недоступен");
      }
    }
  }
  function check_plugin_working() {
    var div = document.createElement("div");
    div.innerHTML = "<!--[if lt IE 9]><i></i><![endif]-->";
    var isIeLessThan9 = div.getElementsByTagName("i").length === 1;
    if (isIeLessThan9) {
      plugin_loaded_error("Internet Explorer версии 8 и ниже не поддерживается");
      return;
    }
    if (isNativeMessageSupported()) {
      load_extension();
    } else if (!canPromise) {
      window.addEventListener(
        "message",
        function(event) {
          if (event.data !== "cadesplugin_echo_request") return;
          load_npapi_plugin();
          check_npapi_plugin();
        },
        false
      );
    } else {
      if (document.readyState === "complete") {
        load_npapi_plugin();
        check_npapi_plugin();
      } else {
        window.addEventListener(
          "load",
          function(event) {
            load_npapi_plugin();
            check_npapi_plugin();
          },
          false
        );
      }
    }
  }
  function set_pluginObject(obj2) {
    pluginObject = obj2;
  }
  function is_capilite_enabled() {
    if (typeof cadesplugin2.EnableInternalCSP !== "undefined" && cadesplugin2.EnableInternalCSP) return true;
    return false;
  }
  function set_load_timeout() {
    if (window.cadesplugin_load_timeout) {
      setTimeout(check_load_timeout, window.cadesplugin_load_timeout);
    } else {
      setTimeout(check_load_timeout, 2e4);
    }
  }
  var onVisibilityChange = function(event) {
    if (document.hidden === false) {
      document.removeEventListener("visibilitychange", onVisibilityChange);
      set_load_timeout();
      check_plugin_working();
    }
  };
  cadesplugin2.JSModuleVersion = "2.3.8";
  cadesplugin2.async_spawn = async_spawn;
  cadesplugin2.set = set_pluginObject;
  cadesplugin2.set_log_level = set_log_level;
  cadesplugin2.get_extension_version = get_extension_version;
  cadesplugin2.get_extension_id = get_extension_id;
  cadesplugin2.getLastError = getLastError;
  cadesplugin2.is_capilite_enabled = is_capilite_enabled;
  if (isNativeMessageSupported()) {
    cadesplugin2.CreateObjectAsync = CreateObjectAsync;
    cadesplugin2.ReleasePluginObjects = ReleasePluginObjects;
  }
  if (!isNativeMessageSupported()) {
    cadesplugin2.CreateObject = CreateObject;
  }
  set_constantValues();
  cadesplugin2.current_log_level = cadesplugin2.LOG_LEVEL_ERROR;
  window.cadesplugin = cadesplugin2;
  if (isSafari && document.hidden) {
    document.addEventListener("visibilitychange", onVisibilityChange);
    return;
  }
  set_load_timeout();
  check_plugin_working();
}
const haveU8 = typeof Uint8Array == "function";
let decoder;
class Base64 {
  static decode(a2) {
    let isString2 = typeof a2 == "string";
    let i;
    if (decoder === void 0) {
      let b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", ignore = "= \f\n\r	 \u2028\u2029";
      decoder = [];
      for (i = 0; i < 64; ++i) decoder[b64.charCodeAt(i)] = i;
      for (i = 0; i < ignore.length; ++i) decoder[ignore.charCodeAt(i)] = -1;
      decoder["-".charCodeAt(0)] = decoder["+".charCodeAt(0)];
      decoder["_".charCodeAt(0)] = decoder["/".charCodeAt(0)];
    }
    let out = haveU8 ? new Uint8Array(a2.length * 3 >> 2) : [];
    let bits = 0, char_count = 0, len = 0;
    for (i = 0; i < a2.length; ++i) {
      let c = isString2 ? a2.charCodeAt(i) : a2[i];
      if (c == 61)
        break;
      c = decoder[c];
      if (c == -1) continue;
      if (c === void 0) throw "Illegal character at offset " + i;
      bits |= c;
      if (++char_count >= 4) {
        out[len++] = bits >> 16;
        out[len++] = bits >> 8 & 255;
        out[len++] = bits & 255;
        bits = 0;
        char_count = 0;
      } else {
        bits <<= 6;
      }
    }
    switch (char_count) {
      case 1:
        throw "Base64 encoding incomplete: at least 2 bits missing";
      case 2:
        out[len++] = bits >> 10;
        break;
      case 3:
        out[len++] = bits >> 16;
        out[len++] = bits >> 8 & 255;
        break;
    }
    if (haveU8 && out.length > len)
      out = out.subarray(0, len);
    return out;
  }
  static pretty(str) {
    if (str.length % 4 > 0) str = (str + "===").slice(0, str.length + str.length % 4);
    str = str.replace(/-/g, "+").replace(/_/g, "/");
    return str.replace(/(.{80})/g, "$1\n");
  }
  static unarmor(a2) {
    let m2 = Base64.re.exec(a2);
    if (m2) {
      if (m2[1]) a2 = m2[1];
      else if (m2[2]) a2 = m2[2];
      else if (m2[3]) a2 = m2[3];
      else throw "RegExp out of sync";
    }
    return Base64.decode(a2);
  }
}
Base64.re = /-----BEGIN [^-]+-----([A-Za-z0-9+/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+/=\s]+)====|^([A-Za-z0-9+/=\s]+)$/;
let max = 1e13;
class Int10 {
  /**
   * Arbitrary length base-10 value.
   * @param {number} value - Optional initial value (will be 0 otherwise).
   */
  constructor(value) {
    this.buf = [+value || 0];
  }
  /**
   * Multiply value by m and add c.
   * @param {number} m - multiplier, must be < =256
   * @param {number} c - value to add
   */
  mulAdd(m2, c) {
    let b2 = this.buf, l = b2.length, i, t;
    for (i = 0; i < l; ++i) {
      t = b2[i] * m2 + c;
      if (t < max) c = 0;
      else {
        c = 0 | t / max;
        t -= c * max;
      }
      b2[i] = t;
    }
    if (c > 0) b2[i] = c;
  }
  /**
   * Subtract value.
   * @param {number} c - value to subtract
   */
  sub(c) {
    let b2 = this.buf, l = b2.length, i, t;
    for (i = 0; i < l; ++i) {
      t = b2[i] - c;
      if (t < 0) {
        t += max;
        c = 1;
      } else c = 0;
      b2[i] = t;
    }
    while (b2[b2.length - 1] === 0) b2.pop();
  }
  /**
   * Convert to decimal string representation.
   * @param {*} base - optional value, only value accepted is 10
   */
  toString(base) {
    if ((base || 10) != 10) throw "only base 10 is supported";
    let b2 = this.buf, s = b2[b2.length - 1].toString();
    for (let i = b2.length - 2; i >= 0; --i) s += (max + b2[i]).toString().substring(1);
    return s;
  }
  /**
   * Convert to Number value representation.
   * Will probably overflow 2^53 and thus become approximate.
   */
  valueOf() {
    let b2 = this.buf, v2 = 0;
    for (let i = b2.length - 1; i >= 0; --i) v2 = v2 * max + b2[i];
    return v2;
  }
  /**
   * Return value as a simple Number (if it is <= 10000000000000), or return this.
   */
  simplify() {
    let b2 = this.buf;
    return b2.length == 1 ? b2[0] : this;
  }
}
const oids = {
  "0.2.262.1.10": { d: "Telesec", c: "Deutsche Telekom" },
  "0.2.262.1.10.0": { d: "extension", c: "Telesec" },
  "0.2.262.1.10.1": { d: "mechanism", c: "Telesec" },
  "0.2.262.1.10.1.0": { d: "authentication", c: "Telesec mechanism" },
  "0.2.262.1.10.1.0.1": { d: "passwordAuthentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.0.2": { d: "protectedPasswordAuthentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.0.3": { d: "oneWayX509Authentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.0.4": { d: "twoWayX509Authentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.0.5": { d: "threeWayX509Authentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.0.6": { d: "oneWayISO9798Authentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.0.7": { d: "twoWayISO9798Authentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.0.8": { d: "telekomAuthentication", c: "Telesec authentication" },
  "0.2.262.1.10.1.1": { d: "signature", c: "Telesec mechanism" },
  "0.2.262.1.10.1.1.1": { d: "md4WithRSAAndISO9697", c: "Telesec mechanism" },
  "0.2.262.1.10.1.1.2": { d: "md4WithRSAAndTelesecSignatureStandard", c: "Telesec mechanism" },
  "0.2.262.1.10.1.1.3": { d: "md5WithRSAAndISO9697", c: "Telesec mechanism" },
  "0.2.262.1.10.1.1.4": { d: "md5WithRSAAndTelesecSignatureStandard", c: "Telesec mechanism" },
  "0.2.262.1.10.1.1.5": { d: "ripemd160WithRSAAndTelekomSignatureStandard", c: "Telesec mechanism" },
  "0.2.262.1.10.1.1.9": { d: "hbciRsaSignature", c: "Telesec signature" },
  "0.2.262.1.10.1.2": { d: "encryption", c: "Telesec mechanism" },
  "0.2.262.1.10.1.2.0": { d: "none", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.1": { d: "rsaTelesec", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.2": { d: "des", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.2.1": { d: "desECB", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.2.2": { d: "desCBC", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.2.3": { d: "desOFB", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.2.4": { d: "desCFB8", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.2.5": { d: "desCFB64", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.3": { d: "des3", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.3.1": { d: "des3ECB", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.3.2": { d: "des3CBC", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.3.3": { d: "des3OFB", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.3.4": { d: "des3CFB8", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.3.5": { d: "des3CFB64", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.4": { d: "magenta", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.5": { d: "idea", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.5.1": { d: "ideaECB", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.5.2": { d: "ideaCBC", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.5.3": { d: "ideaOFB", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.5.4": { d: "ideaCFB8", c: "Telesec encryption" },
  "0.2.262.1.10.1.2.5.5": { d: "ideaCFB64", c: "Telesec encryption" },
  "0.2.262.1.10.1.3": { d: "oneWayFunction", c: "Telesec mechanism" },
  "0.2.262.1.10.1.3.1": { d: "md4", c: "Telesec one-way function" },
  "0.2.262.1.10.1.3.2": { d: "md5", c: "Telesec one-way function" },
  "0.2.262.1.10.1.3.3": { d: "sqModNX509", c: "Telesec one-way function" },
  "0.2.262.1.10.1.3.4": { d: "sqModNISO", c: "Telesec one-way function" },
  "0.2.262.1.10.1.3.5": { d: "ripemd128", c: "Telesec one-way function" },
  "0.2.262.1.10.1.3.6": { d: "hashUsingBlockCipher", c: "Telesec one-way function" },
  "0.2.262.1.10.1.3.7": { d: "mac", c: "Telesec one-way function" },
  "0.2.262.1.10.1.3.8": { d: "ripemd160", c: "Telesec one-way function" },
  "0.2.262.1.10.1.4": { d: "fecFunction", c: "Telesec mechanism" },
  "0.2.262.1.10.1.4.1": { d: "reedSolomon", c: "Telesec mechanism" },
  "0.2.262.1.10.2": { d: "module", c: "Telesec" },
  "0.2.262.1.10.2.0": { d: "algorithms", c: "Telesec module" },
  "0.2.262.1.10.2.1": { d: "attributeTypes", c: "Telesec module" },
  "0.2.262.1.10.2.2": { d: "certificateTypes", c: "Telesec module" },
  "0.2.262.1.10.2.3": { d: "messageTypes", c: "Telesec module" },
  "0.2.262.1.10.2.4": { d: "plProtocol", c: "Telesec module" },
  "0.2.262.1.10.2.5": { d: "smeAndComponentsOfSme", c: "Telesec module" },
  "0.2.262.1.10.2.6": { d: "fec", c: "Telesec module" },
  "0.2.262.1.10.2.7": { d: "usefulDefinitions", c: "Telesec module" },
  "0.2.262.1.10.2.8": { d: "stefiles", c: "Telesec module" },
  "0.2.262.1.10.2.9": { d: "sadmib", c: "Telesec module" },
  "0.2.262.1.10.2.10": { d: "electronicOrder", c: "Telesec module" },
  "0.2.262.1.10.2.11": { d: "telesecTtpAsymmetricApplication", c: "Telesec module" },
  "0.2.262.1.10.2.12": { d: "telesecTtpBasisApplication", c: "Telesec module" },
  "0.2.262.1.10.2.13": { d: "telesecTtpMessages", c: "Telesec module" },
  "0.2.262.1.10.2.14": { d: "telesecTtpTimeStampApplication", c: "Telesec module" },
  "0.2.262.1.10.3": { d: "objectClass", c: "Telesec" },
  "0.2.262.1.10.3.0": { d: "telesecOtherName", c: "Telesec object class" },
  "0.2.262.1.10.3.1": { d: "directory", c: "Telesec object class" },
  "0.2.262.1.10.3.2": { d: "directoryType", c: "Telesec object class" },
  "0.2.262.1.10.3.3": { d: "directoryGroup", c: "Telesec object class" },
  "0.2.262.1.10.3.4": { d: "directoryUser", c: "Telesec object class" },
  "0.2.262.1.10.3.5": { d: "symmetricKeyEntry", c: "Telesec object class" },
  "0.2.262.1.10.4": { d: "package", c: "Telesec" },
  "0.2.262.1.10.5": { d: "parameter", c: "Telesec" },
  "0.2.262.1.10.6": { d: "nameBinding", c: "Telesec" },
  "0.2.262.1.10.7": { d: "attribute", c: "Telesec" },
  "0.2.262.1.10.7.0": { d: "applicationGroupIdentifier", c: "Telesec attribute" },
  "0.2.262.1.10.7.1": { d: "certificateType", c: "Telesec attribute" },
  "0.2.262.1.10.7.2": { d: "telesecCertificate", c: "Telesec attribute" },
  "0.2.262.1.10.7.3": { d: "certificateNumber", c: "Telesec attribute" },
  "0.2.262.1.10.7.4": { d: "certificateRevocationList", c: "Telesec attribute" },
  "0.2.262.1.10.7.5": { d: "creationDate", c: "Telesec attribute" },
  "0.2.262.1.10.7.6": { d: "issuer", c: "Telesec attribute" },
  "0.2.262.1.10.7.7": { d: "namingAuthority", c: "Telesec attribute" },
  "0.2.262.1.10.7.8": { d: "publicKeyDirectory", c: "Telesec attribute" },
  "0.2.262.1.10.7.9": { d: "securityDomain", c: "Telesec attribute" },
  "0.2.262.1.10.7.10": { d: "subject", c: "Telesec attribute" },
  "0.2.262.1.10.7.11": { d: "timeOfRevocation", c: "Telesec attribute" },
  "0.2.262.1.10.7.12": { d: "userGroupReference", c: "Telesec attribute" },
  "0.2.262.1.10.7.13": { d: "validity", c: "Telesec attribute" },
  "0.2.262.1.10.7.14": { d: "zert93", c: "Telesec attribute" },
  "0.2.262.1.10.7.15": { d: "securityMessEnv", c: "Telesec attribute" },
  "0.2.262.1.10.7.16": { d: "anonymizedPublicKeyDirectory", c: "Telesec attribute" },
  "0.2.262.1.10.7.17": { d: "telesecGivenName", c: "Telesec attribute" },
  "0.2.262.1.10.7.18": { d: "nameAdditions", c: "Telesec attribute" },
  "0.2.262.1.10.7.19": { d: "telesecPostalCode", c: "Telesec attribute" },
  "0.2.262.1.10.7.20": { d: "nameDistinguisher", c: "Telesec attribute" },
  "0.2.262.1.10.7.21": { d: "telesecCertificateList", c: "Telesec attribute" },
  "0.2.262.1.10.7.22": { d: "teletrustCertificateList", c: "Telesec attribute" },
  "0.2.262.1.10.7.23": { d: "x509CertificateList", c: "Telesec attribute" },
  "0.2.262.1.10.7.24": { d: "timeOfIssue", c: "Telesec attribute" },
  "0.2.262.1.10.7.25": { d: "physicalCardNumber", c: "Telesec attribute" },
  "0.2.262.1.10.7.26": { d: "fileType", c: "Telesec attribute" },
  "0.2.262.1.10.7.27": { d: "ctlFileIsArchive", c: "Telesec attribute" },
  "0.2.262.1.10.7.28": { d: "emailAddress", c: "Telesec attribute" },
  "0.2.262.1.10.7.29": { d: "certificateTemplateList", c: "Telesec attribute" },
  "0.2.262.1.10.7.30": { d: "directoryName", c: "Telesec attribute" },
  "0.2.262.1.10.7.31": { d: "directoryTypeName", c: "Telesec attribute" },
  "0.2.262.1.10.7.32": { d: "directoryGroupName", c: "Telesec attribute" },
  "0.2.262.1.10.7.33": { d: "directoryUserName", c: "Telesec attribute" },
  "0.2.262.1.10.7.34": { d: "revocationFlag", c: "Telesec attribute" },
  "0.2.262.1.10.7.35": { d: "symmetricKeyEntryName", c: "Telesec attribute" },
  "0.2.262.1.10.7.36": { d: "glNumber", c: "Telesec attribute" },
  "0.2.262.1.10.7.37": { d: "goNumber", c: "Telesec attribute" },
  "0.2.262.1.10.7.38": { d: "gKeyData", c: "Telesec attribute" },
  "0.2.262.1.10.7.39": { d: "zKeyData", c: "Telesec attribute" },
  "0.2.262.1.10.7.40": { d: "ktKeyData", c: "Telesec attribute" },
  "0.2.262.1.10.7.41": { d: "ktKeyNumber", c: "Telesec attribute" },
  "0.2.262.1.10.7.51": { d: "timeOfRevocationGen", c: "Telesec attribute" },
  "0.2.262.1.10.7.52": { d: "liabilityText", c: "Telesec attribute" },
  "0.2.262.1.10.8": { d: "attributeGroup", c: "Telesec" },
  "0.2.262.1.10.9": { d: "action", c: "Telesec" },
  "0.2.262.1.10.10": { d: "notification", c: "Telesec" },
  "0.2.262.1.10.11": { d: "snmp-mibs", c: "Telesec" },
  "0.2.262.1.10.11.1": { d: "securityApplication", c: "Telesec SNMP MIBs" },
  "0.2.262.1.10.12": { d: "certAndCrlExtensionDefinitions", c: "Telesec" },
  "0.2.262.1.10.12.0": { d: "liabilityLimitationFlag", c: "Telesec cert/CRL extension" },
  "0.2.262.1.10.12.1": { d: "telesecCertIdExt", c: "Telesec cert/CRL extension" },
  "0.2.262.1.10.12.2": { d: "Telesec policyIdentifier", c: "Telesec cert/CRL extension" },
  "0.2.262.1.10.12.3": { d: "telesecPolicyQualifierID", c: "Telesec cert/CRL extension" },
  "0.2.262.1.10.12.4": { d: "telesecCRLFilteredExt", c: "Telesec cert/CRL extension" },
  "0.2.262.1.10.12.5": { d: "telesecCRLFilterExt", c: "Telesec cert/CRL extension" },
  "0.2.262.1.10.12.6": { d: "telesecNamingAuthorityExt", c: "Telesec cert/CRL extension" },
  "0.4.0.127.0.7": { d: "bsi", c: "BSI TR-03110/TR-03111" },
  "0.4.0.127.0.7.1": { d: "bsiEcc", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1": { d: "bsifieldType", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.1": { d: "bsiPrimeField", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.2": { d: "bsiCharacteristicTwoField", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.2.2": { d: "bsiECTLVKeyFormat", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.2.2.1": { d: "bsiECTLVPublicKey", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.2.3": { d: "bsiCharacteristicTwoBasis", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.2.3.1": { d: "bsiGnBasis", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.2.3.2": { d: "bsiTpBasis", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.2.3.3": { d: "bsiPpBasis", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.4.1": { d: "bsiEcdsaSignatures", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.4.1.1": { d: "bsiEcdsaWithSHA1", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.4.1.2": { d: "bsiEcdsaWithSHA224", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.4.1.3": { d: "bsiEcdsaWithSHA256", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.4.1.4": { d: "bsiEcdsaWithSHA384", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.4.1.5": { d: "bsiEcdsaWithSHA512", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.4.1.6": { d: "bsiEcdsaWithRIPEMD160", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.1": { d: "bsiEckaEgX963KDF", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.1.1": { d: "bsiEckaEgX963KDFWithSHA1", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.1.2": { d: "bsiEckaEgX963KDFWithSHA224", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.1.3": { d: "bsiEckaEgX963KDFWithSHA256", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.1.4": { d: "bsiEckaEgX963KDFWithSHA384", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.1.5": { d: "bsiEckaEgX963KDFWithSHA512", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.1.6": { d: "bsiEckaEgX963KDFWithRIPEMD160", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.2": { d: "bsiEckaEgSessionKDF", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.2.1": { d: "bsiEckaEgSessionKDFWith3DES", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.2.2": { d: "bsiEckaEgSessionKDFWithAES128", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.2.3": { d: "bsiEckaEgSessionKDFWithAES192", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.1.2.4": { d: "bsiEckaEgSessionKDFWithAES256", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2": { d: "bsiEckaDH", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.1": { d: "bsiEckaDHX963KDF", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.1.1": { d: "bsiEckaDHX963KDFWithSHA1", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.1.2": { d: "bsiEckaDHX963KDFWithSHA224", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.1.3": { d: "bsiEckaDHX963KDFWithSHA256", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.1.4": { d: "bsiEckaDHX963KDFWithSHA384", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.1.5": { d: "bsiEckaDHX963KDFWithSHA512", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.1.6": { d: "bsiEckaDHX963KDFWithRIPEMD160", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.2": { d: "bsiEckaDHSessionKDF", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.2.1": { d: "bsiEckaDHSessionKDFWith3DES", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.2.2": { d: "bsiEckaDHSessionKDFWithAES128", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.2.3": { d: "bsiEckaDHSessionKDFWithAES192", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.1.5.2.2.4": { d: "bsiEckaDHSessionKDFWithAES256", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.2": { d: "bsiEcKeyType", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.2.1": { d: "bsiEcPublicKey", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.5.1": { d: "bsiKaeg", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.5.1.1": { d: "bsiKaegWithX963KDF", c: "BSI TR-03111" },
  "0.4.0.127.0.7.1.5.1.2": { d: "bsiKaegWith3DESKDF", c: "BSI TR-03111" },
  "0.4.0.127.0.7.2.2.1": { d: "bsiPK", c: "BSI TR-03110. Formerly known as bsiCA, now moved to ...2.2.3.x" },
  "0.4.0.127.0.7.2.2.1.1": { d: "bsiPK_DH", c: "BSI TR-03110. Formerly known as bsiCA_DH, now moved to ...2.2.3.x" },
  "0.4.0.127.0.7.2.2.1.2": {
    d: "bsiPK_ECDH",
    c: "BSI TR-03110. Formerly known as bsiCA_ECDH, now moved to ...2.2.3.x"
  },
  "0.4.0.127.0.7.2.2.2": { d: "bsiTA", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.1": { d: "bsiTA_RSA", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.1.1": { d: "bsiTA_RSAv1_5_SHA1", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.1.2": { d: "bsiTA_RSAv1_5_SHA256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.1.3": { d: "bsiTA_RSAPSS_SHA1", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.1.4": { d: "bsiTA_RSAPSS_SHA256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.1.5": { d: "bsiTA_RSAv1_5_SHA512", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.1.6": { d: "bsiTA_RSAPSS_SHA512", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.2": { d: "bsiTA_ECDSA", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.2.1": { d: "bsiTA_ECDSA_SHA1", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.2.2": { d: "bsiTA_ECDSA_SHA224", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.2.3": { d: "bsiTA_ECDSA_SHA256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.2.4": { d: "bsiTA_ECDSA_SHA384", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.2.2.5": { d: "bsiTA_ECDSA_SHA512", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3": { d: "bsiCA", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.1": { d: "bsiCA_DH", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.1.1": { d: "bsiCA_DH_3DES_CBC_CBC", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.1.2": { d: "bsiCA_DH_AES_CBC_CMAC_128", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.1.3": { d: "bsiCA_DH_AES_CBC_CMAC_192", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.1.4": { d: "bsiCA_DH_AES_CBC_CMAC_256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.2": { d: "bsiCA_ECDH", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.2.1": { d: "bsiCA_ECDH_3DES_CBC_CBC", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.2.2": { d: "bsiCA_ECDH_AES_CBC_CMAC_128", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.2.3": { d: "bsiCA_ECDH_AES_CBC_CMAC_192", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.3.2.4": { d: "bsiCA_ECDH_AES_CBC_CMAC_256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4": { d: "bsiPACE", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.1": { d: "bsiPACE_DH_GM", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.1.1": { d: "bsiPACE_DH_GM_3DES_CBC_CBC", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.1.2": { d: "bsiPACE_DH_GM_AES_CBC_CMAC_128", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.1.3": { d: "bsiPACE_DH_GM_AES_CBC_CMAC_192", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.1.4": { d: "bsiPACE_DH_GM_AES_CBC_CMAC_256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.2": { d: "bsiPACE_ECDH_GM", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.2.1": { d: "bsiPACE_ECDH_GM_3DES_CBC_CBC", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.2.2": { d: "bsiPACE_ECDH_GM_AES_CBC_CMAC_128", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.2.3": { d: "bsiPACE_ECDH_GM_AES_CBC_CMAC_192", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.2.4": { d: "bsiPACE_ECDH_GM_AES_CBC_CMAC_256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.3": { d: "bsiPACE_DH_IM", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.3.1": { d: "bsiPACE_DH_IM_3DES_CBC_CBC", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.3.2": { d: "bsiPACE_DH_IM_AES_CBC_CMAC_128", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.3.3": { d: "bsiPACE_DH_IM_AES_CBC_CMAC_192", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.3.4": { d: "bsiPACE_DH_IM_AES_CBC_CMAC_256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.4": { d: "bsiPACE_ECDH_IM", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.4.1": { d: "bsiPACE_ECDH_IM_3DES_CBC_CBC", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.4.2": { d: "bsiPACE_ECDH_IM_AES_CBC_CMAC_128", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.4.3": { d: "bsiPACE_ECDH_IM_AES_CBC_CMAC_192", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.4.4.4": { d: "bsiPACE_ECDH_IM_AES_CBC_CMAC_256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5": { d: "bsiRI", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.1": { d: "bsiRI_DH", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.1.1": { d: "bsiRI_DH_SHA1", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.1.2": { d: "bsiRI_DH_SHA224", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.1.3": { d: "bsiRI_DH_SHA256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.1.4": { d: "bsiRI_DH_SHA384", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.1.5": { d: "bsiRI_DH_SHA512", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.2": { d: "bsiRI_ECDH", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.2.1": { d: "bsiRI_ECDH_SHA1", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.2.2": { d: "bsiRI_ECDH_SHA224", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.2.3": { d: "bsiRI_ECDH_SHA256", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.2.4": { d: "bsiRI_ECDH_SHA384", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.5.2.5": { d: "bsiRI_ECDH_SHA512", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.6": { d: "bsiCardInfo", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.7": { d: "bsiEidSecurity", c: "BSI TR-03110" },
  "0.4.0.127.0.7.2.2.8": { d: "bsiPT", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.2": { d: "bsiEACRoles", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.2.1": { d: "bsiEACRolesIS", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.2.2": { d: "bsiEACRolesAT", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.2.3": { d: "bsiEACRolesST", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.3": { d: "bsiTAv2ce", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.3.1": { d: "bsiTAv2ceDescription", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.3.1.1": { d: "bsiTAv2ceDescriptionPlainText", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.3.1.2": { d: "bsiTAv2ceDescriptionIA5String", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.3.1.3": { d: "bsiTAv2ceDescriptionOctetString", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.3.2": { d: "bsiTAv2ceTerminalSector", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.4": { d: "bsiAuxData", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.4.1": { d: "bsiAuxDataBirthday", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.4.2": { d: "bsiAuxDataExpireDate", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.4.3": { d: "bsiAuxDataCommunityID", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5": { d: "bsiDefectList", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.1": { d: "bsiDefectAuthDefect", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.1.1": { d: "bsiDefectCertRevoked", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.1.2": { d: "bsiDefectCertReplaced", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.1.3": { d: "bsiDefectChipAuthKeyRevoked", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.1.4": { d: "bsiDefectActiveAuthKeyRevoked", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.2": { d: "bsiDefectEPassportDefect", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.2.1": { d: "bsiDefectEPassportDGMalformed", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.2.2": { d: "bsiDefectSODInvalid", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.3": { d: "bsiDefectEIDDefect", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.3.1": { d: "bsiDefectEIDDGMalformed", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.3.2": { d: "bsiDefectEIDIntegrity", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.4": { d: "bsiDefectDocumentDefect", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.4.1": { d: "bsiDefectCardSecurityMalformed", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.4.2": { d: "bsiDefectChipSecurityMalformed", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.5.4.3": { d: "bsiDefectPowerDownReq", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.1.6": { d: "bsiListContentDescription", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.2.1": { d: "bsiSecurityObject", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.2.2": { d: "bsiBlackList", c: "BSI TR-03110" },
  "0.4.0.127.0.7.3.4.2.2": { d: "bsiSignedUpdateDeviceAdmin", c: "BSI TR-03109" },
  "0.4.0.127.0.7.4.1.1.1": { d: "bsiCertReqMsgs", c: "BSI TR-03109" },
  "0.4.0.127.0.7.4.1.1.2": { d: "bsiCertReqMsgswithOuterSignature", c: "BSI TR-03109" },
  "0.4.0.127.0.7.4.1.1.3": { d: "bsiAuthorizedCertReqMsgs", c: "BSI TR-03109" },
  "0.4.0.127.0.7.4.1.2.2": { d: "bsiSignedRevReqs", c: "BSI TR-03109" },
  "0.4.0.1862": { d: "etsiQcsProfile", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1": { d: "etsiQcs", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.1": { d: "etsiQcsCompliance", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.2": { d: "etsiQcsLimitValue", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.3": { d: "etsiQcsRetentionPeriod", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.4": { d: "etsiQcsQcSSCD", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.5": { d: "etsiQcsQcPDS", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.6": { d: "etsiQcsQcType", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.6.1": { d: "etsiQcsQctEsign", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.6.2": { d: "etsiQcsQctEseal", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.1862.1.6.3": { d: "etsiQcsQctWeb", c: "ETSI TS 101 862 Qualified Certificates" },
  "0.4.0.2042.1.1": { d: "normalisedCertificatePolicy", c: "ETSI TS 102 042 Certificate Policies" },
  "0.4.0.2042.1.2": { d: "normalisedCertificatePolicyPlus", c: "ETSI TS 102 042 Certificate Policies" },
  "0.4.0.2042.1.3": { d: "lightweightCertificatePolicy", c: "ETSI TS 102 042 Certificate Policies" },
  "0.4.0.2042.1.4": { d: "evCertificatePolicy", c: "ETSI TS 102 042 Certificate Policies" },
  "0.4.0.2042.1.5": { d: "evCertificatePolicyPlus", c: "ETSI TS 102 042 Certificate Policies" },
  "0.4.0.2042.1.6": { d: "dvCertificatePolicy", c: "ETSI TS 102 042 Certificate Policies" },
  "0.4.0.2042.1.7": { d: "ovCertificatePolicy", c: "ETSI TS 102 042 Certificate Policies" },
  "0.4.0.194112.1.0": { d: "qcpNatural", c: "EU Qualified Certificate Policy" },
  "0.4.0.194112.1.1": { d: "qcpLegal", c: "EU Qualified Certificate Policy" },
  "0.4.0.194112.1.2": { d: "qcpNaturalQscd", c: "EU Qualified Certificate Policy" },
  "0.4.0.194112.1.3": { d: "qcpLegalQscd", c: "EU Qualified Certificate Policy" },
  "0.4.0.194112.1.4": { d: "qcpWeb", c: "EU Qualified Certificate Policy" },
  "0.4.0.194121.1.1": { d: "qcsSemanticsIdNatural", c: "EU Qualified Certificate Identifier" },
  "0.4.0.194121.1.2": { d: "qcsSemanticsIdLegal", c: "EU Qualified Certificate Identifier" },
  "0.4.0.194121.1.3": { d: "qcsSemanticsIdeIDASNatural", c: "EU Qualified Certificate Identifier" },
  "0.4.0.194121.1.4": { d: "qcsSemanticsIdeIDASLegal", c: "EU Qualified Certificate Identifier" },
  "0.9.2342.19200300.100.1.1": { d: "userID", c: "Some oddball X.500 attribute collection" },
  "0.9.2342.19200300.100.1.3": { d: "rfc822Mailbox", c: "Some oddball X.500 attribute collection" },
  "0.9.2342.19200300.100.1.25": { d: "domainComponent", c: "Men are from Mars, this OID is from Pluto" },
  "1.0.10118.3.0.49": { d: "ripemd160", c: "ISO 10118-3 hash function" },
  "1.0.10118.3.0.50": { d: "ripemd128", c: "ISO 10118-3 hash function" },
  "1.0.10118.3.0.55": { d: "whirlpool", c: "ISO 10118-3 hash function" },
  "1.0.18033.2": { d: "iso18033-2", c: "ISO 18033-2" },
  "1.0.18033.2.2": { d: "kem", c: "ISO 18033-2 algorithms" },
  "1.0.18033.2.2.4": { d: "kemRSA", c: "ISO 18033-2 KEM algorithms" },
  "1.2.36.1.3.1.1.1": { d: "qgpki", c: "Queensland Government PKI" },
  "1.2.36.1.3.1.1.1.1": { d: "qgpkiPolicies", c: "QGPKI policies" },
  "1.2.36.1.3.1.1.1.1.1": { d: "qgpkiMedIntermedCA", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.1.1": { d: "qgpkiMedIntermedIndividual", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.1.2": { d: "qgpkiMedIntermedDeviceControl", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.1.3": { d: "qgpkiMedIntermedDevice", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.1.4": { d: "qgpkiMedIntermedAuthorisedParty", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.1.5": { d: "qgpkiMedIntermedDeviceSystem", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2": { d: "qgpkiMedIssuingCA", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.1": { d: "qgpkiMedIssuingIndividual", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.2": { d: "qgpkiMedIssuingDeviceControl", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.3": { d: "qgpkiMedIssuingDevice", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.4": { d: "qgpkiMedIssuingAuthorisedParty", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.5": { d: "qgpkiMedIssuingClientAuth", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.6": { d: "qgpkiMedIssuingServerAuth", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.7": { d: "qgpkiMedIssuingDataProt", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.2.8": { d: "qgpkiMedIssuingTokenAuth", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.3": { d: "qgpkiBasicIntermedCA", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.3.1": { d: "qgpkiBasicIntermedDeviceSystem", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.4": { d: "qgpkiBasicIssuingCA", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.4.1": { d: "qgpkiBasicIssuingClientAuth", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.4.2": { d: "qgpkiBasicIssuingServerAuth", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.1.4.3": { d: "qgpkiBasicIssuingDataSigning", c: "QGPKI policy" },
  "1.2.36.1.3.1.1.1.2": { d: "qgpkiAssuranceLevel", c: "QGPKI assurance level" },
  "1.2.36.1.3.1.1.1.2.1": { d: "qgpkiAssuranceRudimentary", c: "QGPKI assurance level" },
  "1.2.36.1.3.1.1.1.2.2": { d: "qgpkiAssuranceBasic", c: "QGPKI assurance level" },
  "1.2.36.1.3.1.1.1.2.3": { d: "qgpkiAssuranceMedium", c: "QGPKI assurance level" },
  "1.2.36.1.3.1.1.1.2.4": { d: "qgpkiAssuranceHigh", c: "QGPKI assurance level" },
  "1.2.36.1.3.1.1.1.3": { d: "qgpkiCertFunction", c: "QGPKI policies" },
  "1.2.36.1.3.1.1.1.3.1": { d: "qgpkiFunctionIndividual", c: "QGPKI policies" },
  "1.2.36.1.3.1.1.1.3.2": { d: "qgpkiFunctionDevice", c: "QGPKI policies" },
  "1.2.36.1.3.1.1.1.3.3": { d: "qgpkiFunctionAuthorisedParty", c: "QGPKI policies" },
  "1.2.36.1.3.1.1.1.3.4": { d: "qgpkiFunctionDeviceControl", c: "QGPKI policies" },
  "1.2.36.1.3.1.2": { d: "qpspki", c: "Queensland Police PKI" },
  "1.2.36.1.3.1.2.1": { d: "qpspkiPolicies", c: "Queensland Police PKI" },
  "1.2.36.1.3.1.2.1.2": { d: "qpspkiPolicyBasic", c: "Queensland Police PKI" },
  "1.2.36.1.3.1.2.1.3": { d: "qpspkiPolicyMedium", c: "Queensland Police PKI" },
  "1.2.36.1.3.1.2.1.4": { d: "qpspkiPolicyHigh", c: "Queensland Police PKI" },
  "1.2.36.1.3.1.3.2": { d: "qtmrpki", c: "Queensland Transport PKI" },
  "1.2.36.1.3.1.3.2.1": { d: "qtmrpkiPolicies", c: "Queensland Transport PKI" },
  "1.2.36.1.3.1.3.2.2": { d: "qtmrpkiPurpose", c: "Queensland Transport PKI" },
  "1.2.36.1.3.1.3.2.2.1": { d: "qtmrpkiIndividual", c: "Queensland Transport PKI purpose" },
  "1.2.36.1.3.1.3.2.2.2": { d: "qtmrpkiDeviceControl", c: "Queensland Transport PKI purpose" },
  "1.2.36.1.3.1.3.2.2.3": { d: "qtmrpkiDevice", c: "Queensland Transport PKI purpose" },
  "1.2.36.1.3.1.3.2.2.4": { d: "qtmrpkiAuthorisedParty", c: "Queensland Transport PKI purpose" },
  "1.2.36.1.3.1.3.2.2.5": { d: "qtmrpkiDeviceSystem", c: "Queensland Transport PKI purpose" },
  "1.2.36.1.3.1.3.2.3": { d: "qtmrpkiDevice", c: "Queensland Transport PKI" },
  "1.2.36.1.3.1.3.2.3.1": { d: "qtmrpkiDriverLicense", c: "Queensland Transport PKI device" },
  "1.2.36.1.3.1.3.2.3.2": { d: "qtmrpkiIndustryAuthority", c: "Queensland Transport PKI device" },
  "1.2.36.1.3.1.3.2.3.3": { d: "qtmrpkiMarineLicense", c: "Queensland Transport PKI device" },
  "1.2.36.1.3.1.3.2.3.4": { d: "qtmrpkiAdultProofOfAge", c: "Queensland Transport PKI device" },
  "1.2.36.1.3.1.3.2.3.5": { d: "qtmrpkiSam", c: "Queensland Transport PKI device" },
  "1.2.36.1.3.1.3.2.4": { d: "qtmrpkiAuthorisedParty", c: "Queensland Transport PKI" },
  "1.2.36.1.3.1.3.2.4.1": { d: "qtmrpkiTransportInspector", c: "Queensland Transport PKI authorised party" },
  "1.2.36.1.3.1.3.2.4.2": { d: "qtmrpkiPoliceOfficer", c: "Queensland Transport PKI authorised party" },
  "1.2.36.1.3.1.3.2.4.3": { d: "qtmrpkiSystem", c: "Queensland Transport PKI authorised party" },
  "1.2.36.1.3.1.3.2.4.4": { d: "qtmrpkiLiquorLicensingInspector", c: "Queensland Transport PKI authorised party" },
  "1.2.36.1.3.1.3.2.4.5": { d: "qtmrpkiMarineEnforcementOfficer", c: "Queensland Transport PKI authorised party" },
  "1.2.36.1.333.1": { d: "australianBusinessNumber", c: "Australian Government corporate taxpayer ID" },
  "1.2.36.68980861.1.1.2": { d: "signetPersonal", c: "Signet CA" },
  "1.2.36.68980861.1.1.3": { d: "signetBusiness", c: "Signet CA" },
  "1.2.36.68980861.1.1.4": { d: "signetLegal", c: "Signet CA" },
  "1.2.36.68980861.1.1.10": { d: "signetPilot", c: "Signet CA" },
  "1.2.36.68980861.1.1.11": { d: "signetIntraNet", c: "Signet CA" },
  "1.2.36.68980861.1.1.20": { d: "signetPolicy", c: "Signet CA" },
  "1.2.36.75878867.1.100.1.1": { d: "certificatesAustraliaPolicy", c: "Certificates Australia CA" },
  "1.2.112.0.2.0.34.101.45.2.1": { d: "bignPubkey", c: "Belarus STB 34.101.45" },
  "1.2.112.0.2.0.34.101.45.3.1": { d: "bignParamB1", c: "Belarus STB 34.101.45" },
  "1.2.112.0.2.0.34.101.45.3.2": { d: "bignParamB2", c: "Belarus STB 34.101.45" },
  "1.2.112.0.2.0.34.101.45.3.3": { d: "bignParamB3", c: "Belarus STB 34.101.45" },
  "1.2.112.0.2.0.34.101.45.11": { d: "bignWithHSpec", c: "Belarus STB 34.101.45" },
  "1.2.112.0.2.0.34.101.45.12": { d: "bignWithHBelt", c: "Belarus STB 34.101.45" },
  "1.2.156.10197.1": { d: "gmtCryptographicAlgorithm", c: "China GM Standards Committee" },
  "1.2.156.10197.1.100": { d: "gmtBlockCipher", c: "China GM Standards Committee" },
  "1.2.156.10197.1.102": { d: "sm1Cipher", c: "China GM Standards Committee" },
  "1.2.156.10197.1.103": { d: "ssf33Cipher", c: "China GM Standards Committee" },
  "1.2.156.10197.1.104": { d: "sm4Cipher", c: "China GM Standards Committee" },
  "1.2.156.10197.1.200": { d: "gmtStreamCipher", c: "China GM Standards Committee" },
  "1.2.156.10197.1.201": { d: "zucCipher", c: "China GM Standards Committee" },
  "1.2.156.10197.1.300": { d: "gmtPublicKeyCryptography", c: "China GM Standards Committee" },
  "1.2.156.10197.1.301": { d: "sm2ECC", c: "China GM Standards Committee" },
  "1.2.156.10197.1.301.1": { d: "sm2-1DigitalSignature", c: "China GM Standards Committee" },
  "1.2.156.10197.1.301.2": { d: "sm2-2KeyExchange", c: "China GM Standards Committee" },
  "1.2.156.10197.1.301.3": { d: "sm2-3PublicKeyEncryption", c: "China GM Standards Committee" },
  "1.2.156.10197.1.302": { d: "gmtSM9IBE", c: "China GM Standards Committee" },
  "1.2.156.10197.1.302.1": { d: "sm9-1DigitalSignature", c: "China GM Standards Committee" },
  "1.2.156.10197.1.302.2": { d: "sm9-2KeyExchange", c: "China GM Standards Committee" },
  "1.2.156.10197.1.302.3": { d: "sm9-3PublicKeyEncryption", c: "China GM Standards Committee" },
  "1.2.156.10197.1.400": { d: "gmtHashAlgorithm", c: "China GM Standards Committee" },
  "1.2.156.10197.1.401": { d: "sm3Hash", c: "China GM Standards Committee" },
  "1.2.156.10197.1.401.1": { d: "sm3HashWithoutKey", c: "China GM Standards Committee" },
  "1.2.156.10197.1.401.2": { d: "sm3HashWithKey", c: "China GM Standards Committee" },
  "1.2.156.10197.1.500": { d: "gmtDigestSigning", c: "China GM Standards Committee" },
  "1.2.156.10197.1.501": { d: "sm2withSM3", c: "China GM Standards Committee" },
  "1.2.156.10197.1.504": { d: "rsaWithSM3", c: "China GM Standards Committee" },
  "1.2.156.10197.4.3": { d: "gmtCertificateAuthority", c: "China GM Standards Committee" },
  "1.2.156.10197.6": { d: "gmtStandardClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1": { d: "gmtFoundationClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.1": { d: "gmtAlgorithmClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.1.1": { d: "zucStandard", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.1.2": { d: "sm4Standard", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.1.3": { d: "sm2Standard", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.1.4": { d: "sm3Standard", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.2": { d: "gmtIDClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.2.1": { d: "gmtCryptoID", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.3": { d: "gmtOperationModes", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.4": { d: "gmtSecurityMechanism", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.4.1": { d: "gmtSM2Specification", c: "China GM Standards Committee" },
  "1.2.156.10197.6.1.4.2": { d: "gmtSM2CryptographicMessageSyntax", c: "China GM Standards Committee" },
  "1.2.156.10197.6.2": { d: "gmtDeviceClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.3": { d: "gmtServiceClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.4": { d: "gmtInfrastructure", c: "China GM Standards Committee" },
  "1.2.156.10197.6.5": { d: "gmtTestingClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.5.1": { d: "gmtRandomTestingClass", c: "China GM Standards Committee" },
  "1.2.156.10197.6.6": { d: "gmtManagementClass", c: "China GM Standards Committee" },
  "1.2.392.200011.61.1.1.1": { d: "mitsubishiSecurityAlgorithm", c: "Mitsubishi security algorithm" },
  "1.2.392.200011.61.1.1.1.1": { d: "misty1-cbc", c: "Mitsubishi security algorithm" },
  "1.2.410.200004.1": { d: "kisaAlgorithm", c: "KISA algorithm" },
  "1.2.410.200004.1.1": { d: "kcdsa", c: "Korean DSA" },
  "1.2.410.200004.1.2": { d: "has160", c: "Korean hash algorithm" },
  "1.2.410.200004.1.3": { d: "seedECB", c: "Korean SEED algorithm, ECB mode" },
  "1.2.410.200004.1.4": { d: "seedCBC", c: "Korean SEED algorithm, CBC mode" },
  "1.2.410.200004.1.5": { d: "seedOFB", c: "Korean SEED algorithm, OFB mode" },
  "1.2.410.200004.1.6": { d: "seedCFB", c: "Korean SEED algorithm, CFB mode" },
  "1.2.410.200004.1.7": { d: "seedMAC", c: "Korean SEED algorithm, MAC mode" },
  "1.2.410.200004.1.8": { d: "kcdsaWithHAS160", c: "Korean signature algorithm" },
  "1.2.410.200004.1.9": { d: "kcdsaWithSHA1", c: "Korean signature algorithm" },
  "1.2.410.200004.1.10": { d: "pbeWithHAS160AndSEED-ECB", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.11": { d: "pbeWithHAS160AndSEED-CBC", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.12": { d: "pbeWithHAS160AndSEED-CFB", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.13": { d: "pbeWithHAS160AndSEED-OFB", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.14": { d: "pbeWithSHA1AndSEED-ECB", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.15": { d: "pbeWithSHA1AndSEED-CBC", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.16": { d: "pbeWithSHA1AndSEED-CFB", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.17": { d: "pbeWithSHA1AndSEED-OFB", c: "Korean SEED algorithm, PBE key derivation" },
  "1.2.410.200004.1.20": { d: "rsaWithHAS160", c: "Korean signature algorithm" },
  "1.2.410.200004.1.21": { d: "kcdsa1", c: "Korean DSA" },
  "1.2.410.200004.2": { d: "npkiCP", c: "KISA NPKI certificate policies" },
  "1.2.410.200004.2.1": { d: "npkiSignaturePolicy", c: "KISA NPKI certificate policies" },
  "1.2.410.200004.3": { d: "npkiKP", c: "KISA NPKI key usage" },
  "1.2.410.200004.4": { d: "npkiAT", c: "KISA NPKI attribute" },
  "1.2.410.200004.5": { d: "npkiLCA", c: "KISA NPKI licensed CA" },
  "1.2.410.200004.5.1": { d: "npkiSignKorea", c: "KISA NPKI licensed CA" },
  "1.2.410.200004.5.2": { d: "npkiSignGate", c: "KISA NPKI licensed CA" },
  "1.2.410.200004.5.3": { d: "npkiNcaSign", c: "KISA NPKI licensed CA" },
  "1.2.410.200004.6": { d: "npkiON", c: "KISA NPKI otherName" },
  "1.2.410.200004.7": { d: "npkiAPP", c: "KISA NPKI application" },
  "1.2.410.200004.7.1": { d: "npkiSMIME", c: "KISA NPKI application" },
  "1.2.410.200004.7.1.1": { d: "npkiSMIMEAlgo", c: "KISA NPKI application" },
  "1.2.410.200004.7.1.1.1": { d: "npkiCmsSEEDWrap", c: "KISA NPKI application" },
  "1.2.410.200004.10": { d: "npki", c: "KISA NPKI" },
  "1.2.410.200004.10.1": { d: "npkiAttribute", c: "KISA NPKI attribute" },
  "1.2.410.200004.10.1.1": { d: "npkiIdentifyData", c: "KISA NPKI attribute" },
  "1.2.410.200004.10.1.1.1": { d: "npkiVID", c: "KISA NPKI attribute" },
  "1.2.410.200004.10.1.1.2": { d: "npkiEncryptedVID", c: "KISA NPKI attribute" },
  "1.2.410.200004.10.1.1.3": { d: "npkiRandomNum", c: "KISA NPKI attribute" },
  "1.2.410.200004.10.1.1.4": { d: "npkiVID", c: "KISA NPKI attribute" },
  "1.2.410.200046.1.1": { d: "aria1AlgorithmModes", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.1": { d: "aria128-ecb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.2": { d: "aria128-cbc", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.3": { d: "aria128-cfb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.4": { d: "aria128-ofb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.5": { d: "aria128-ctr", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.6": { d: "aria192-ecb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.7": { d: "aria192-cbc", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.8": { d: "aria192-cfb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.9": { d: "aria192-ofb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.10": { d: "aria192-ctr", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.11": { d: "aria256-ecb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.12": { d: "aria256-cbc", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.13": { d: "aria256-cfb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.14": { d: "aria256-ofb", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.15": { d: "aria256-ctr", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.21": { d: "aria128-cmac", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.22": { d: "aria192-cmac", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.23": { d: "aria256-cmac", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.31": { d: "aria128-ocb2", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.32": { d: "aria192-ocb2", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.33": { d: "aria256-ocb2", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.34": { d: "aria128-gcm", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.35": { d: "aria192-gcm", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.36": { d: "aria256-gcm", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.37": { d: "aria128-ccm", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.38": { d: "aria192-ccm", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.39": { d: "aria256-ccm", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.40": { d: "aria128-keywrap", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.41": { d: "aria192-keywrap", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.42": { d: "aria256-keywrap", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.43": { d: "aria128-keywrapWithPad", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.44": { d: "aria192-keywrapWithPad", c: "ARIA algorithm modes" },
  "1.2.410.200046.1.1.45": { d: "aria256-keywrapWithPad", c: "ARIA algorithm modes" },
  "1.2.643.2.2.3": { d: "gostSignature", c: "GOST R 34.10-2001 + GOST R 34.11-94 signature" },
  "1.2.643.2.2.4": {
    d: "gost94Signature",
    c: "GOST R 34.10-94 + GOST R 34.11-94 signature. Obsoleted by GOST R 34.10-2001",
    w: true
  },
  "1.2.643.2.2.19": { d: "gostPublicKey", c: "GOST R 34.10-2001 (ECC) public key" },
  "1.2.643.2.2.20": { d: "gost94PublicKey", c: "GOST R 34.10-94 public key. Obsoleted by GOST R 34.10-2001", w: true },
  "1.2.643.2.2.21": { d: "gostCipher", c: "GOST 28147-89 (symmetric key block cipher)" },
  "1.2.643.2.2.31.0": { d: "testCipherParams", c: "Test params for GOST 28147-89" },
  "1.2.643.2.2.31.1": { d: "cryptoProCipherA", c: "CryptoPro params A (default, variant 'Verba-O') for GOST 28147-89" },
  "1.2.643.2.2.31.2": { d: "cryptoProCipherB", c: "CryptoPro params B (variant 1) for GOST 28147-89" },
  "1.2.643.2.2.31.3": { d: "cryptoProCipherC", c: "CryptoPro params C (variant 2) for GOST 28147-89" },
  "1.2.643.2.2.31.4": { d: "cryptoProCipherD", c: "CryptoPro params D (variant 3) for GOST 28147-89" },
  "1.2.643.2.2.31.5": { d: "oscar11Cipher", c: "Oscar-1.1 params for GOST 28147-89" },
  "1.2.643.2.2.31.6": { d: "oscar10Cipher", c: "Oscar-1.0 params for GOST 28147-89" },
  "1.2.643.2.2.31.7": { d: "ric1Cipher", c: "RIC-1 params for GOST 28147-89" },
  "1.2.643.2.2.31.12": { d: "tc26CipherA", c: "TC26 params 2 for GOST 28147-89" },
  "1.2.643.2.2.31.13": { d: "tc26CipherB", c: "TC26 params 1 for GOST 28147-89" },
  "1.2.643.2.2.31.14": { d: "tc26CipherC", c: "TC26 params 3 for GOST 28147-89" },
  "1.2.643.2.2.31.15": { d: "tc26CipherD", c: "TC26 params 4 for GOST 28147-89" },
  "1.2.643.2.2.31.16": { d: "tc26CipherE", c: "TC26 params 5 for GOST 28147-89" },
  "1.2.643.2.2.31.17": { d: "tc26CipherF", c: "TC26 params 6 for GOST 28147-89" },
  "1.2.643.7.1.2.5.1.1": { d: "tc26CipherZ", c: "TC26 params Z for GOST 28147-89" },
  "1.2.643.2.2.9": { d: "gostDigest", c: "GOST R 34.11-94 digest" },
  "1.2.643.2.2.30.0": { d: "testDigestParams", c: "Test params for GOST R 34.11-94" },
  "1.2.643.2.2.30.1": {
    d: "cryptoProDigestA",
    c: "CryptoPro digest params A (default, variant 'Verba-O') for GOST R 34.11-94"
  },
  "1.2.643.2.2.30.2": { d: "cryptoProDigestB", c: "CryptoPro digest params B (variant 1) for GOST R 34.11-94" },
  "1.2.643.2.2.30.3": { d: "cryptoProDigestC", c: "CryptoPro digest params C (variant 2) for GOST R 34.11-94" },
  "1.2.643.2.2.30.4": { d: "cryptoProDigestD", c: "CryptoPro digest params D (variant 3) for GOST R 34.11-94" },
  "1.2.643.2.2.32.2": {
    d: "cryptoPro94SignA",
    c: "CryptoPro sign params A (default, variant 'Verba-O') for GOST R 34.10-94"
  },
  "1.2.643.2.2.32.3": { d: "cryptoPro94SignB", c: "CryptoPro sign params B (variant 1) for GOST R 34.10-94" },
  "1.2.643.2.2.32.4": { d: "cryptoPro94SignC", c: "CryptoPro sign params C (variant 2) for GOST R 34.10-94" },
  "1.2.643.2.2.32.5": { d: "cryptoPro94SignD", c: "CryptoPro sign params D (variant 3) for GOST R 34.10-94" },
  "1.2.643.2.2.33.1": { d: "cryptoPro94SignXA", c: "CryptoPro sign params XA (variant 1) for GOST R 34.10-94" },
  "1.2.643.2.2.33.2": { d: "cryptoPro94SignXB", c: "CryptoPro sign params XB (variant 2) for GOST R 34.10-94" },
  "1.2.643.2.2.33.3": { d: "cryptoPro94SignXC", c: "CryptoPro sign params XC (variant 3) for GOST R 34.10-94" },
  "1.2.643.2.2.35.0": { d: "testSignParams", c: "Test elliptic curve for GOST R 34.10-2001" },
  "1.2.643.2.2.35.1": { d: "cryptoProSignA", c: "CryptoPro ell.curve A for GOST R 34.10-2001" },
  "1.2.643.2.2.35.2": { d: "cryptoProSignB", c: "CryptoPro ell.curve B for GOST R 34.10-2001" },
  "1.2.643.2.2.35.3": { d: "cryptoProSignC", c: "CryptoPro ell.curve C for GOST R 34.10-2001" },
  "1.2.643.2.2.36.0": { d: "cryptoProSignXA", c: "CryptoPro ell.curve XA for GOST R 34.10-2001" },
  "1.2.643.2.2.36.1": { d: "cryptoProSignXB", c: "CryptoPro ell.curve XB for GOST R 34.10-2001" },
  "1.2.643.7.1.2.1.1.1": { d: "cryptoPro2012Sign256A", c: "CryptoPro ell.curve A for GOST R 34.10-2012 256 bit" },
  "1.2.643.7.1.2.1.2.1": {
    d: "cryptoPro2012Sign512A",
    c: "CryptoPro ell.curve A (default) for GOST R 34.10-2012 512 bit"
  },
  "1.2.643.7.1.2.1.2.2": { d: "cryptoPro2012Sign512B", c: "CryptoPro ell.curve B for GOST R 34.10-2012 512 bit" },
  "1.2.643.7.1.2.1.2.3": { d: "cryptoPro2012Sign512C", c: "CryptoPro ell.curve C for GOST R 34.10-2012 512 bit" },
  "1.2.643.2.2.14.0": { d: "nullMeshing", c: "Do not mesh state of GOST 28147-89 cipher" },
  "1.2.643.2.2.14.1": { d: "cryptoProMeshing", c: "CryptoPro meshing of state of GOST 28147-89 cipher" },
  "1.2.643.2.2.10": { d: "hmacGost", c: "HMAC with GOST R 34.11-94" },
  "1.2.643.2.2.13.0": { d: "gostWrap", c: "Wrap key using GOST 28147-89 key" },
  "1.2.643.2.2.13.1": { d: "cryptoProWrap", c: "Wrap key using diversified GOST 28147-89 key" },
  "1.2.643.2.2.96": { d: "cryptoProECDHWrap", c: "Wrap key using ECC DH on GOST R 34.10-2001 keys (VKO)" },
  "1.2.643.7.1.1.1.1": { d: "gost2012PublicKey256", c: "GOST R 34.10-2012 256 bit public key" },
  "1.2.643.7.1.1.1.2": { d: "gost2012PublicKey512", c: "GOST R 34.10-2012 512 bit public key" },
  "1.2.643.7.1.1.2.2": { d: "gost2012Digest256", c: "GOST R 34.11-2012 256 bit digest" },
  "1.2.643.7.1.1.2.3": { d: "gost2012Digest512", c: "GOST R 34.11-2012 512 bit digest" },
  "1.2.643.7.1.1.3.2": { d: "gost2012Signature256", c: "GOST R 34.10-2012 256 bit signature" },
  "1.2.643.7.1.1.3.3": { d: "gost2012Signature512", c: "GOST R 34.10-2012 512 bit signature" },
  "1.2.643.7.1.1.6.1": { d: "cryptoProECDH256", c: "CryptoPro ECC DH algorithm for GOST R 34.10-2012 256 bit key" },
  "1.2.643.7.1.1.6.2": { d: "cryptoProECDH512", c: "CryptoPro ECC DH algorithm for GOST R 34.10-2012 512 bit key" },
  "1.2.643.100.113.1": { d: "cryptoProClassSignToolKC1", c: "CryptoPro GOST" },
  "1.2.643.100.113.2": { d: "cryptoProClassSignToolKC2", c: "CryptoPro GOST" },
  "1.2.643.100.113.3": { d: "cryptoProClassSignToolKC3", c: "CryptoPro GOST" },
  "1.2.643.100.113.4": { d: "cryptoProClassSignToolKB1", c: "CryptoPro GOST" },
  "1.2.643.100.113.5": { d: "cryptoProClassSignToolKB2", c: "CryptoPro GOST" },
  "1.2.643.100.113.6": { d: "cryptoProClassSignToolKA1", c: "CryptoPro GOST" },
  "1.2.752.34.1": { d: "seis-cp", c: "SEIS Project" },
  "1.2.752.34.1.1": { d: "SEIS high-assurance policyIdentifier", c: "SEIS Project certificate policies" },
  "1.2.752.34.1.2": { d: "SEIS GAK policyIdentifier", c: "SEIS Project certificate policies" },
  "1.2.752.34.2": { d: "SEIS pe", c: "SEIS Project" },
  "1.2.752.34.3": { d: "SEIS at", c: "SEIS Project" },
  "1.2.752.34.3.1": { d: "SEIS at-personalIdentifier", c: "SEIS Project attribute" },
  "1.2.840.10040.1": { d: "module", c: "ANSI X9.57" },
  "1.2.840.10040.1.1": { d: "x9f1-cert-mgmt", c: "ANSI X9.57 module" },
  "1.2.840.10040.2": { d: "holdinstruction", c: "ANSI X9.57" },
  "1.2.840.10040.2.1": { d: "holdinstruction-none", c: "ANSI X9.57 hold instruction" },
  "1.2.840.10040.2.2": { d: "callissuer", c: "ANSI X9.57 hold instruction" },
  "1.2.840.10040.2.3": { d: "reject", c: "ANSI X9.57 hold instruction" },
  "1.2.840.10040.2.4": { d: "pickupToken", c: "ANSI X9.57 hold instruction" },
  "1.2.840.10040.3": { d: "attribute", c: "ANSI X9.57" },
  "1.2.840.10040.3.1": { d: "countersignature", c: "ANSI X9.57 attribute" },
  "1.2.840.10040.3.2": { d: "attribute-cert", c: "ANSI X9.57 attribute" },
  "1.2.840.10040.4": { d: "algorithm", c: "ANSI X9.57" },
  "1.2.840.10040.4.1": { d: "dsa", c: "ANSI X9.57 algorithm" },
  "1.2.840.10040.4.2": { d: "dsa-match", c: "ANSI X9.57 algorithm" },
  "1.2.840.10040.4.3": { d: "dsaWithSha1", c: "ANSI X9.57 algorithm" },
  "1.2.840.10045.1": { d: "fieldType", c: "ANSI X9.62. This OID is also assigned as ecdsa-with-SHA1" },
  "1.2.840.10045.1.1": { d: "prime-field", c: "ANSI X9.62 field type" },
  "1.2.840.10045.1.2": { d: "characteristic-two-field", c: "ANSI X9.62 field type" },
  "1.2.840.10045.1.2.3": { d: "characteristic-two-basis", c: "ANSI X9.62 field type" },
  "1.2.840.10045.1.2.3.1": { d: "onBasis", c: "ANSI X9.62 field basis" },
  "1.2.840.10045.1.2.3.2": { d: "tpBasis", c: "ANSI X9.62 field basis" },
  "1.2.840.10045.1.2.3.3": { d: "ppBasis", c: "ANSI X9.62 field basis" },
  "1.2.840.10045.2": { d: "publicKeyType", c: "ANSI X9.62" },
  "1.2.840.10045.2.1": { d: "ecPublicKey", c: "ANSI X9.62 public key type" },
  "1.2.840.10045.3.0.1": { d: "c2pnb163v1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.2": { d: "c2pnb163v2", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.3": { d: "c2pnb163v3", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.5": { d: "c2tnb191v1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.6": { d: "c2tnb191v2", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.7": { d: "c2tnb191v3", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.10": { d: "c2pnb208w1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.11": { d: "c2tnb239v1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.12": { d: "c2tnb239v2", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.13": { d: "c2tnb239v3", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.16": { d: "c2pnb272w1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.18": { d: "c2tnb359v1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.19": { d: "c2pnb368w1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.0.20": { d: "c2tnb431r1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.1.1": { d: "prime192v1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.1.2": { d: "prime192v2", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.1.3": { d: "prime192v3", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.1.4": { d: "prime239v1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.1.5": { d: "prime239v2", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.1.6": { d: "prime239v3", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.3.1.7": { d: "prime256v1", c: "ANSI X9.62 named elliptic curve" },
  "1.2.840.10045.4.1": { d: "ecdsaWithSHA1", c: "ANSI X9.62 ECDSA algorithm with SHA1" },
  "1.2.840.10045.4.2": { d: "ecdsaWithRecommended", c: "ANSI X9.62 ECDSA algorithm with Recommended" },
  "1.2.840.10045.4.3": { d: "ecdsaWithSpecified", c: "ANSI X9.62 ECDSA algorithm with Specified" },
  "1.2.840.10045.4.3.1": { d: "ecdsaWithSHA224", c: "ANSI X9.62 ECDSA algorithm with SHA224" },
  "1.2.840.10045.4.3.2": { d: "ecdsaWithSHA256", c: "ANSI X9.62 ECDSA algorithm with SHA256" },
  "1.2.840.10045.4.3.3": { d: "ecdsaWithSHA384", c: "ANSI X9.62 ECDSA algorithm with SHA384" },
  "1.2.840.10045.4.3.4": { d: "ecdsaWithSHA512", c: "ANSI X9.62 ECDSA algorithm with SHA512" },
  "1.2.840.10046.1": { d: "fieldType", c: "ANSI X9.42" },
  "1.2.840.10046.1.1": { d: "gf-prime", c: "ANSI X9.42 field type" },
  "1.2.840.10046.2": { d: "numberType", c: "ANSI X9.42" },
  "1.2.840.10046.2.1": { d: "dhPublicKey", c: "ANSI X9.42 number type" },
  "1.2.840.10046.3": { d: "scheme", c: "ANSI X9.42" },
  "1.2.840.10046.3.1": { d: "dhStatic", c: "ANSI X9.42 scheme" },
  "1.2.840.10046.3.2": { d: "dhEphem", c: "ANSI X9.42 scheme" },
  "1.2.840.10046.3.3": { d: "dhHybrid1", c: "ANSI X9.42 scheme" },
  "1.2.840.10046.3.4": { d: "dhHybrid2", c: "ANSI X9.42 scheme" },
  "1.2.840.10046.3.5": { d: "mqv2", c: "ANSI X9.42 scheme" },
  "1.2.840.10046.3.6": { d: "mqv1", c: "ANSI X9.42 scheme" },
  "1.2.840.10065.2.2": { d: "?", c: "ASTM 31.20" },
  "1.2.840.10065.2.3": { d: "healthcareLicense", c: "ASTM 31.20" },
  "1.2.840.10065.2.3.1.1": { d: "license?", c: "ASTM 31.20 healthcare license type" },
  "1.2.840.10070": { d: "iec62351", c: "IEC 62351" },
  "1.2.840.10070.8": { d: "iec62351_8", c: "IEC 62351-8" },
  "1.2.840.10070.8.1": { d: "iecUserRoles", c: "IEC 62351-8" },
  "1.2.840.113533.7": { d: "nsn", c: "" },
  "1.2.840.113533.7.65": { d: "nsn-ce", c: "" },
  "1.2.840.113533.7.65.0": { d: "entrustVersInfo", c: "Nortel Secure Networks ce" },
  "1.2.840.113533.7.66": { d: "nsn-alg", c: "" },
  "1.2.840.113533.7.66.3": { d: "cast3CBC", c: "Nortel Secure Networks alg" },
  "1.2.840.113533.7.66.10": { d: "cast5CBC", c: "Nortel Secure Networks alg" },
  "1.2.840.113533.7.66.11": { d: "cast5MAC", c: "Nortel Secure Networks alg" },
  "1.2.840.113533.7.66.12": { d: "pbeWithMD5AndCAST5-CBC", c: "Nortel Secure Networks alg" },
  "1.2.840.113533.7.66.13": { d: "passwordBasedMac", c: "Nortel Secure Networks alg" },
  "1.2.840.113533.7.67": { d: "nsn-oc", c: "" },
  "1.2.840.113533.7.67.0": { d: "entrustUser", c: "Nortel Secure Networks oc" },
  "1.2.840.113533.7.68": { d: "nsn-at", c: "" },
  "1.2.840.113533.7.68.0": { d: "entrustCAInfo", c: "Nortel Secure Networks at" },
  "1.2.840.113533.7.68.10": { d: "attributeCertificate", c: "Nortel Secure Networks at" },
  "1.2.840.113549.1.1": { d: "pkcs-1", c: "" },
  "1.2.840.113549.1.1.1": { d: "rsaEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.2": { d: "md2WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.3": { d: "md4WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.4": { d: "md5WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.5": { d: "sha1WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.7": { d: "rsaOAEP", c: "PKCS #1" },
  "1.2.840.113549.1.1.8": { d: "pkcs1-MGF", c: "PKCS #1" },
  "1.2.840.113549.1.1.9": { d: "rsaOAEP-pSpecified", c: "PKCS #1" },
  "1.2.840.113549.1.1.10": { d: "rsaPSS", c: "PKCS #1" },
  "1.2.840.113549.1.1.11": { d: "sha256WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.12": { d: "sha384WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.13": { d: "sha512WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.14": { d: "sha224WithRSAEncryption", c: "PKCS #1" },
  "1.2.840.113549.1.1.6": {
    d: "rsaOAEPEncryptionSET",
    c: "PKCS #1. This OID may also be assigned as ripemd160WithRSAEncryption"
  },
  "1.2.840.113549.1.2": { d: "bsafeRsaEncr", c: "Obsolete BSAFE OID", w: true },
  "1.2.840.113549.1.3": { d: "pkcs-3", c: "" },
  "1.2.840.113549.1.3.1": { d: "dhKeyAgreement", c: "PKCS #3" },
  "1.2.840.113549.1.5": { d: "pkcs-5", c: "" },
  "1.2.840.113549.1.5.1": { d: "pbeWithMD2AndDES-CBC", c: "PKCS #5" },
  "1.2.840.113549.1.5.3": { d: "pbeWithMD5AndDES-CBC", c: "PKCS #5" },
  "1.2.840.113549.1.5.4": { d: "pbeWithMD2AndRC2-CBC", c: "PKCS #5" },
  "1.2.840.113549.1.5.6": { d: "pbeWithMD5AndRC2-CBC", c: "PKCS #5" },
  "1.2.840.113549.1.5.9": { d: "pbeWithMD5AndXOR", c: "PKCS #5, used in BSAFE only", w: true },
  "1.2.840.113549.1.5.10": { d: "pbeWithSHAAndDES-CBC", c: "PKCS #5" },
  "1.2.840.113549.1.5.12": { d: "pkcs5PBKDF2", c: "PKCS #5 v2.0" },
  "1.2.840.113549.1.5.13": { d: "pkcs5PBES2", c: "PKCS #5 v2.0" },
  "1.2.840.113549.1.5.14": { d: "pkcs5PBMAC1", c: "PKCS #5 v2.0" },
  "1.2.840.113549.1.7": { d: "pkcs-7", c: "" },
  "1.2.840.113549.1.7.1": { d: "data", c: "PKCS #7" },
  "1.2.840.113549.1.7.2": { d: "signedData", c: "PKCS #7" },
  "1.2.840.113549.1.7.3": { d: "envelopedData", c: "PKCS #7" },
  "1.2.840.113549.1.7.4": { d: "signedAndEnvelopedData", c: "PKCS #7" },
  "1.2.840.113549.1.7.5": { d: "digestedData", c: "PKCS #7" },
  "1.2.840.113549.1.7.6": { d: "encryptedData", c: "PKCS #7" },
  "1.2.840.113549.1.7.7": { d: "dataWithAttributes", c: "PKCS #7 experimental", w: true },
  "1.2.840.113549.1.7.8": { d: "encryptedPrivateKeyInfo", c: "PKCS #7 experimental", w: true },
  "1.2.840.113549.1.9": { d: "pkcs-9", c: "" },
  "1.2.840.113549.1.9.1": { d: "emailAddress", c: "PKCS #9. Deprecated, use an altName extension instead" },
  "1.2.840.113549.1.9.2": { d: "unstructuredName", c: "PKCS #9" },
  "1.2.840.113549.1.9.3": { d: "contentType", c: "PKCS #9" },
  "1.2.840.113549.1.9.4": { d: "messageDigest", c: "PKCS #9" },
  "1.2.840.113549.1.9.5": { d: "signingTime", c: "PKCS #9" },
  "1.2.840.113549.1.9.6": { d: "countersignature", c: "PKCS #9" },
  "1.2.840.113549.1.9.7": { d: "challengePassword", c: "PKCS #9" },
  "1.2.840.113549.1.9.8": { d: "unstructuredAddress", c: "PKCS #9" },
  "1.2.840.113549.1.9.9": { d: "extendedCertificateAttributes", c: "PKCS #9" },
  "1.2.840.113549.1.9.10": { d: "issuerAndSerialNumber", c: "PKCS #9 experimental", w: true },
  "1.2.840.113549.1.9.11": { d: "passwordCheck", c: "PKCS #9 experimental", w: true },
  "1.2.840.113549.1.9.12": { d: "publicKey", c: "PKCS #9 experimental", w: true },
  "1.2.840.113549.1.9.13": { d: "signingDescription", c: "PKCS #9" },
  "1.2.840.113549.1.9.14": { d: "extensionRequest", c: "PKCS #9 via CRMF" },
  "1.2.840.113549.1.9.15": {
    d: "sMIMECapabilities",
    c: "PKCS #9. This OID was formerly assigned as symmetricCapabilities, then reassigned as SMIMECapabilities, then renamed to the current name"
  },
  "1.2.840.113549.1.9.15.1": { d: "preferSignedData", c: "sMIMECapabilities" },
  "1.2.840.113549.1.9.15.2": { d: "canNotDecryptAny", c: "sMIMECapabilities" },
  "1.2.840.113549.1.9.15.3": {
    d: "receiptRequest",
    c: "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 2 1) instead",
    w: true
  },
  "1.2.840.113549.1.9.15.4": {
    d: "receipt",
    c: "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 1 1) instead",
    w: true
  },
  "1.2.840.113549.1.9.15.5": {
    d: "contentHints",
    c: "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 2 4) instead",
    w: true
  },
  "1.2.840.113549.1.9.15.6": {
    d: "mlExpansionHistory",
    c: "sMIMECapabilities. Deprecated, use (1 2 840 113549 1 9 16 2 3) instead",
    w: true
  },
  "1.2.840.113549.1.9.16": { d: "id-sMIME", c: "PKCS #9" },
  "1.2.840.113549.1.9.16.0": { d: "id-mod", c: "id-sMIME" },
  "1.2.840.113549.1.9.16.0.1": { d: "id-mod-cms", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.0.2": { d: "id-mod-ess", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.0.3": { d: "id-mod-oid", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.0.4": { d: "id-mod-msg-v3", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.0.5": { d: "id-mod-ets-eSignature-88", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.0.6": { d: "id-mod-ets-eSignature-97", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.0.7": { d: "id-mod-ets-eSigPolicy-88", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.0.8": { d: "id-mod-ets-eSigPolicy-88", c: "S/MIME Modules" },
  "1.2.840.113549.1.9.16.1": { d: "contentType", c: "S/MIME" },
  "1.2.840.113549.1.9.16.1.0": { d: "anyContentType", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.1": { d: "receipt", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.2": { d: "authData", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.3": { d: "publishCert", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.4": { d: "tSTInfo", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.5": { d: "tDTInfo", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.6": { d: "contentInfo", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.7": { d: "dVCSRequestData", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.8": { d: "dVCSResponseData", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.9": { d: "compressedData", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.10": { d: "scvpCertValRequest", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.11": { d: "scvpCertValResponse", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.12": { d: "scvpValPolRequest", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.13": { d: "scvpValPolResponse", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.14": { d: "attrCertEncAttrs", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.15": { d: "tSReq", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.16": { d: "firmwarePackage", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.17": { d: "firmwareLoadReceipt", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.18": { d: "firmwareLoadError", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.19": { d: "contentCollection", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.20": { d: "contentWithAttrs", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.21": { d: "encKeyWithID", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.22": { d: "encPEPSI", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.23": { d: "authEnvelopedData", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.24": { d: "routeOriginAttest", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.25": { d: "symmetricKeyPackage", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.26": { d: "rpkiManifest", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.27": { d: "asciiTextWithCRLF", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.28": { d: "xml", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.29": { d: "pdf", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.30": { d: "postscript", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.31": { d: "timestampedData", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.32": { d: "asAdjacencyAttest", c: "S/MIME Content Types", w: true },
  "1.2.840.113549.1.9.16.1.33": { d: "rpkiTrustAnchor", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.34": { d: "trustAnchorList", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.35": { d: "rpkiGhostbusters", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.36": { d: "resourceTaggedAttest", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.37": { d: "utf8TextWithCRLF", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.38": { d: "htmlWithCRLF", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.39": { d: "epub", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.40": { d: "animaJSONVoucher", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.41": { d: "mudType", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.42": { d: "sztpConveyedInfoXML", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.43": { d: "sztpConveyedInfoJSON", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.44": { d: "cbor", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.45": { d: "cborSequence", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.46": { d: "animaCBORVoucher", c: "S/MIME Content Types", w: true },
  "1.2.840.113549.1.9.16.1.47": { d: "geofeedCSVwithCRLF", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.48": { d: "rpkiSignedChecklist", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.1.49": { d: "rpkiASPA", c: "S/MIME Content Types" },
  "1.2.840.113549.1.9.16.2": { d: "authenticatedAttributes", c: "S/MIME" },
  "1.2.840.113549.1.9.16.2.1": { d: "receiptRequest", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.2": { d: "securityLabel", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.3": { d: "mlExpandHistory", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.4": { d: "contentHint", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.5": { d: "msgSigDigest", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.6": { d: "encapContentType", c: "S/MIME Authenticated Attributes.  Obsolete", w: true },
  "1.2.840.113549.1.9.16.2.7": { d: "contentIdentifier", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.8": { d: "macValue", c: "S/MIME Authenticated Attributes.  Obsolete", w: true },
  "1.2.840.113549.1.9.16.2.9": { d: "equivalentLabels", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.10": { d: "contentReference", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.11": { d: "encrypKeyPref", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.12": { d: "signingCertificate", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.13": { d: "smimeEncryptCerts", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.14": { d: "timeStampToken", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.15": { d: "sigPolicyId", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.16": { d: "commitmentType", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.17": { d: "signerLocation", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.18": { d: "signerAttr", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.19": { d: "otherSigCert", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.20": { d: "contentTimestamp", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.21": { d: "certificateRefs", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.22": { d: "revocationRefs", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.23": { d: "certValues", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.24": { d: "revocationValues", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.25": { d: "escTimeStamp", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.26": { d: "certCRLTimestamp", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.27": { d: "archiveTimeStamp", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.28": { d: "signatureType", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.29": { d: "dvcsDvc", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.30": { d: "cekReference", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.31": { d: "maxCEKDecrypts", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.32": { d: "kekDerivationAlg", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.33": { d: "intendedRecipients", c: "S/MIME Authenticated Attributes.  Obsolete", w: true },
  "1.2.840.113549.1.9.16.2.34": { d: "cmcUnsignedData", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.35": { d: "fwPackageID", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.36": { d: "fwTargetHardwareIDs", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.37": { d: "fwDecryptKeyID", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.38": { d: "fwImplCryptAlgs", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.39": { d: "fwWrappedFirmwareKey", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.40": { d: "fwCommunityIdentifiers", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.41": { d: "fwPkgMessageDigest", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.42": { d: "fwPackageInfo", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.43": { d: "fwImplCompressAlgs", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.44": { d: "etsAttrCertificateRefs", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.45": { d: "etsAttrRevocationRefs", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.46": { d: "binarySigningTime", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.47": { d: "signingCertificateV2", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.48": { d: "etsArchiveTimeStampV2", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.49": { d: "erInternal", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.50": { d: "erExternal", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.51": { d: "multipleSignatures", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.52": { d: "cmsAlgorithmProtect", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.53": { d: "setKeyInformation", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.54": { d: "asymmDecryptKeyID", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.55": { d: "secureHeaderFieldsIdentifier", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.56": { d: "otpChallenge", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.57": { d: "revocationChallenge", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.2.58": { d: "estIdentityLinking", c: "S/MIME Authenticated Attributes" },
  "1.2.840.113549.1.9.16.3.1": { d: "esDHwith3DES", c: "S/MIME Algorithms. Obsolete", w: true },
  "1.2.840.113549.1.9.16.3.2": { d: "esDHwithRC2", c: "S/MIME Algorithms. Obsolete", w: true },
  "1.2.840.113549.1.9.16.3.3": { d: "3desWrap", c: "S/MIME Algorithms. Obsolete", w: true },
  "1.2.840.113549.1.9.16.3.4": { d: "rc2Wrap", c: "S/MIME Algorithms. Obsolete", w: true },
  "1.2.840.113549.1.9.16.3.5": { d: "esDH", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.6": { d: "cms3DESwrap", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.7": { d: "cmsRC2wrap", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.8": { d: "zlib", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.9": { d: "pwriKEK", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.10": { d: "ssDH", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.11": { d: "hmacWith3DESwrap", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.12": { d: "hmacWithAESwrap", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.13": { d: "md5XorExperiment", c: "S/MIME Algorithms.  Experimental", w: true },
  "1.2.840.113549.1.9.16.3.14": { d: "rsaKEM", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.15": { d: "authEnc128", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.16": { d: "authEnc256", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.17": { d: "hssLmsHashSig", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.18": { d: "chaCha20Poly1305", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.19": { d: "ecdhHKDF-SHA256", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.20": { d: "ecdhHKDF-SHA384", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.21": { d: "ecdhHKDF-SHA512", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.22": { d: "aesSIV-CMAC-256", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.23": { d: "aesSIV-CMAC-384", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.24": { d: "aesSIV-CMAC-512", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.25": { d: "aesSIV-CMAC-wrap256", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.26": { d: "aesSIV-CMAC-wrap384", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.27": { d: "aesSIV-CMAC-wrap512", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.28": { d: "hkdfWithSha256", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.29": { d: "hkdfWithSha384", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.3.30": { d: "hkdfWithSha512", c: "S/MIME Algorithms" },
  "1.2.840.113549.1.9.16.4.1": { d: "certDist-ldap", c: "S/MIME Certificate Distribution" },
  "1.2.840.113549.1.9.16.5.1": { d: "sigPolicyQualifier-spuri x", c: "S/MIME Signature Policy Qualifiers" },
  "1.2.840.113549.1.9.16.5.2": { d: "sigPolicyQualifier-spUserNotice", c: "S/MIME Signature Policy Qualifiers" },
  "1.2.840.113549.1.9.16.6.1": { d: "proofOfOrigin", c: "S/MIME Commitment Type Identifiers" },
  "1.2.840.113549.1.9.16.6.2": { d: "proofOfReceipt", c: "S/MIME Commitment Type Identifiers" },
  "1.2.840.113549.1.9.16.6.3": { d: "proofOfDelivery", c: "S/MIME Commitment Type Identifiers" },
  "1.2.840.113549.1.9.16.6.4": { d: "proofOfSender", c: "S/MIME Commitment Type Identifiers" },
  "1.2.840.113549.1.9.16.6.5": { d: "proofOfApproval", c: "S/MIME Commitment Type Identifiers" },
  "1.2.840.113549.1.9.16.6.6": { d: "proofOfCreation", c: "S/MIME Commitment Type Identifiers" },
  "1.2.840.113549.1.9.16.7.1": { d: "testAmoco", c: "S/MIMETest Security Policies" },
  "1.2.840.113549.1.9.16.7.2": { d: "testCaterpillar", c: "S/MIMETest Security Policies" },
  "1.2.840.113549.1.9.16.7.3": { d: "testWhirlpool", c: "S/MIMETest Security Policies" },
  "1.2.840.113549.1.9.16.7.4": { d: "testWhirlpoolCategories", c: "S/MIMETest Security Policies" },
  "1.2.840.113549.1.9.16.8.1": { d: "glUseKEK", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.2": { d: "glDelete", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.3": { d: "glAddMember", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.4": { d: "glDeleteMember", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.5": { d: "glRekey", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.6": { d: "glAddOwner", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.7": { d: "glRemoveOwner", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.8": { d: "glkCompromise", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.9": { d: "glkRefresh", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.10": {
    d: "glFailInfo",
    c: "S/MIME Symmetric Key Distribution Attributes.  Obsolete",
    w: true
  },
  "1.2.840.113549.1.9.16.8.11": { d: "glaQueryRequest", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.12": { d: "glaQueryResponse", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.13": { d: "glProvideCert", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.14": { d: "glUpdateCert", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.8.15": { d: "glKey", c: "S/MIME Symmetric Key Distribution Attributes" },
  "1.2.840.113549.1.9.16.9": { d: "signatureTypeIdentifier", c: "S/MIME" },
  "1.2.840.113549.1.9.16.9.1": { d: "originatorSig", c: "S/MIME Signature Type Identifier" },
  "1.2.840.113549.1.9.16.9.2": { d: "domainSig", c: "S/MIME Signature Type Identifier" },
  "1.2.840.113549.1.9.16.9.3": { d: "additionalAttributesSig", c: "S/MIME Signature Type Identifier" },
  "1.2.840.113549.1.9.16.9.4": { d: "reviewSig", c: "S/MIME Signature Type Identifier" },
  "1.2.840.113549.1.9.16.10.1": { d: "envelopedData", c: "S/MIME X.400 Encoded Information Types" },
  "1.2.840.113549.1.9.16.10.2": { d: "signedData", c: "S/MIME X.400 Encoded Information Types" },
  "1.2.840.113549.1.9.16.10.3": { d: "certsOnly", c: "S/MIME X.400 Encoded Information Types" },
  "1.2.840.113549.1.9.16.10.4": { d: "signedReceipt", c: "S/MIME X.400 Encoded Information Types" },
  "1.2.840.113549.1.9.16.10.5": { d: "envelopedX400", c: "S/MIME X.400 Encoded Information Types" },
  "1.2.840.113549.1.9.16.10.6": { d: "signedX400", c: "S/MIME X.400 Encoded Information Types" },
  "1.2.840.113549.1.9.16.10.7": { d: "compressedData", c: "S/MIME X.400 Encoded Information Types" },
  "1.2.840.113549.1.9.16.11": { d: "capabilities", c: "S/MIME" },
  "1.2.840.113549.1.9.16.11.1": { d: "preferBinaryInside", c: "S/MIME Capability" },
  "1.2.840.113549.1.9.16.12": { d: "pskcAttributes", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.1": { d: "pskcManufacturer", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.2": { d: "pskcSerialNo", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.3": { d: "pskcModel", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.4": { d: "pskcIssueno", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.5": { d: "pskcDevicebinding", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.6": { d: "pskcDevicestartdate", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.7": { d: "pskcDeviceexpirydate", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.8": { d: "pskcModuleid", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.9": { d: "pskcKeyid", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.10": { d: "pskcAlgorithm", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.11": { d: "pskcIssuer", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.12": { d: "pskcKeyprofileid", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.13": { d: "pskcKeyreference", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.14": { d: "pskcFriendlyname", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.15": { d: "pskcAlgorithmparams", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.16": { d: "pskcCounter", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.17": { d: "pskcTime", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.18": { d: "pskcTimeinterval", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.19": { d: "pskcTimedrift", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.20": { d: "pskcValuemac", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.21": { d: "pskcKeystartdate", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.22": { d: "pskcKeyexpirydate", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.23": { d: "pskcNooftransactions", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.24": { d: "pskcKeyusages", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.25": { d: "pskcPinpolicy", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.26": { d: "pskcDeviceuserid", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.12.27": { d: "pskcKeyuserid", c: "S/MIME Portable Symmetric Key Container Attributes" },
  "1.2.840.113549.1.9.16.13": { d: "otherRecipientInfoIds", c: "S/MIME Other Recipient Info Identifiers" },
  "1.2.840.113549.1.9.16.13.1": { d: "keyTransPSK", c: "S/MIME Other Recipient Info Identifiers" },
  "1.2.840.113549.1.9.16.13.2": { d: "keyAgreePSK", c: "S/MIME Other Recipient Info Identifiers" },
  "1.2.840.113549.1.9.20": { d: "friendlyName (for PKCS #12)", c: "PKCS #9 via PKCS #12" },
  "1.2.840.113549.1.9.21": { d: "localKeyID (for PKCS #12)", c: "PKCS #9 via PKCS #12" },
  "1.2.840.113549.1.9.22": { d: "certTypes (for PKCS #12)", c: "PKCS #9 via PKCS #12" },
  "1.2.840.113549.1.9.22.1": { d: "x509Certificate (for PKCS #12)", c: "PKCS #9 via PKCS #12" },
  "1.2.840.113549.1.9.22.2": { d: "sdsiCertificate (for PKCS #12)", c: "PKCS #9 via PKCS #12" },
  "1.2.840.113549.1.9.23": { d: "crlTypes (for PKCS #12)", c: "PKCS #9 via PKCS #12" },
  "1.2.840.113549.1.9.23.1": { d: "x509Crl (for PKCS #12)", c: "PKCS #9 via PKCS #12" },
  "1.2.840.113549.1.9.24": { d: "pkcs9objectClass", c: "PKCS #9/RFC 2985" },
  "1.2.840.113549.1.9.25": { d: "pkcs9attributes", c: "PKCS #9/RFC 2985" },
  "1.2.840.113549.1.9.25.1": { d: "pkcs15Token", c: "PKCS #9/RFC 2985 attribute" },
  "1.2.840.113549.1.9.25.2": { d: "encryptedPrivateKeyInfo", c: "PKCS #9/RFC 2985 attribute" },
  "1.2.840.113549.1.9.25.3": { d: "randomNonce", c: "PKCS #9/RFC 2985 attribute" },
  "1.2.840.113549.1.9.25.4": { d: "sequenceNumber", c: "PKCS #9/RFC 2985 attribute" },
  "1.2.840.113549.1.9.25.5": { d: "pkcs7PDU", c: "PKCS #9/RFC 2985 attribute" },
  "1.2.840.113549.1.9.26": { d: "pkcs9syntax", c: "PKCS #9/RFC 2985" },
  "1.2.840.113549.1.9.27": { d: "pkcs9matchingRules", c: "PKCS #9/RFC 2985" },
  "1.2.840.113549.1.9.52": { d: "cmsAlgorithmProtection", c: "RFC 6211" },
  "1.2.840.113549.1.12": { d: "pkcs-12", c: "" },
  "1.2.840.113549.1.12.1": { d: "pkcs-12-PbeIds", c: "This OID was formerly assigned as PKCS #12 modeID" },
  "1.2.840.113549.1.12.1.1": {
    d: "pbeWithSHAAnd128BitRC4",
    c: "PKCS #12 PbeIds. This OID was formerly assigned as pkcs-12-OfflineTransportMode"
  },
  "1.2.840.113549.1.12.1.2": {
    d: "pbeWithSHAAnd40BitRC4",
    c: "PKCS #12 PbeIds. This OID was formerly assigned as pkcs-12-OnlineTransportMode"
  },
  "1.2.840.113549.1.12.1.3": { d: "pbeWithSHAAnd3-KeyTripleDES-CBC", c: "PKCS #12 PbeIds" },
  "1.2.840.113549.1.12.1.4": { d: "pbeWithSHAAnd2-KeyTripleDES-CBC", c: "PKCS #12 PbeIds" },
  "1.2.840.113549.1.12.1.5": { d: "pbeWithSHAAnd128BitRC2-CBC", c: "PKCS #12 PbeIds" },
  "1.2.840.113549.1.12.1.6": { d: "pbeWithSHAAnd40BitRC2-CBC", c: "PKCS #12 PbeIds" },
  "1.2.840.113549.1.12.2": { d: "pkcs-12-ESPVKID", c: "Deprecated", w: true },
  "1.2.840.113549.1.12.2.1": {
    d: "pkcs-12-PKCS8KeyShrouding",
    c: "PKCS #12 ESPVKID. Deprecated, use (1 2 840 113549 1 12 3 5) instead",
    w: true
  },
  "1.2.840.113549.1.12.3": { d: "pkcs-12-BagIds", c: "" },
  "1.2.840.113549.1.12.3.1": { d: "pkcs-12-keyBagId", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.3.2": { d: "pkcs-12-certAndCRLBagId", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.3.3": { d: "pkcs-12-secretBagId", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.3.4": { d: "pkcs-12-safeContentsId", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.3.5": { d: "pkcs-12-pkcs-8ShroudedKeyBagId", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.4": { d: "pkcs-12-CertBagID", c: "Deprecated", w: true },
  "1.2.840.113549.1.12.4.1": {
    d: "pkcs-12-X509CertCRLBagID",
    c: "PKCS #12 CertBagID. This OID was formerly assigned as pkcs-12-X509CertCRLBag"
  },
  "1.2.840.113549.1.12.4.2": {
    d: "pkcs-12-SDSICertBagID",
    c: "PKCS #12 CertBagID. This OID was formerly assigned as pkcs-12-SDSICertBag"
  },
  "1.2.840.113549.1.12.5": { d: "pkcs-12-OID", c: "", w: true },
  "1.2.840.113549.1.12.5.1": {
    d: "pkcs-12-PBEID",
    c: "PKCS #12 OID. Deprecated, use the partially compatible (1 2 840 113549 1 12 1) OIDs instead",
    w: true
  },
  "1.2.840.113549.1.12.5.1.1": {
    d: "pkcs-12-PBEWithSha1And128BitRC4",
    c: "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 1) instead",
    w: true
  },
  "1.2.840.113549.1.12.5.1.2": {
    d: "pkcs-12-PBEWithSha1And40BitRC4",
    c: "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 2) instead",
    w: true
  },
  "1.2.840.113549.1.12.5.1.3": {
    d: "pkcs-12-PBEWithSha1AndTripleDESCBC",
    c: "PKCS #12 OID PBEID. Deprecated, use the incompatible but similar (1 2 840 113549 1 12 1 3) or (1 2 840 113549 1 12 1 4) instead",
    w: true
  },
  "1.2.840.113549.1.12.5.1.4": {
    d: "pkcs-12-PBEWithSha1And128BitRC2CBC",
    c: "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 5) instead",
    w: true
  },
  "1.2.840.113549.1.12.5.1.5": {
    d: "pkcs-12-PBEWithSha1And40BitRC2CBC",
    c: "PKCS #12 OID PBEID. Deprecated, use (1 2 840 113549 1 12 1 6) instead",
    w: true
  },
  "1.2.840.113549.1.12.5.1.6": {
    d: "pkcs-12-PBEWithSha1AndRC4",
    c: "PKCS #12 OID PBEID. Deprecated, use the incompatible but similar (1 2 840 113549 1 12 1 1) or (1 2 840 113549 1 12 1 2) instead",
    w: true
  },
  "1.2.840.113549.1.12.5.1.7": {
    d: "pkcs-12-PBEWithSha1AndRC2CBC",
    c: "PKCS #12 OID PBEID. Deprecated, use the incompatible but similar (1 2 840 113549 1 12 1 5) or (1 2 840 113549 1 12 1 6) instead",
    w: true
  },
  "1.2.840.113549.1.12.5.2": {
    d: "pkcs-12-EnvelopingID",
    c: "PKCS #12 OID. Deprecated, use the conventional PKCS #1 OIDs instead"
  },
  "1.2.840.113549.1.12.5.2.1": {
    d: "pkcs-12-RSAEncryptionWith128BitRC4",
    c: "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead",
    w: true
  },
  "1.2.840.113549.1.12.5.2.2": {
    d: "pkcs-12-RSAEncryptionWith40BitRC4",
    c: "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead",
    w: true
  },
  "1.2.840.113549.1.12.5.2.3": {
    d: "pkcs-12-RSAEncryptionWithTripleDES",
    c: "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead",
    w: true
  },
  "1.2.840.113549.1.12.5.3": {
    d: "pkcs-12-SignatureID",
    c: "PKCS #12 OID EnvelopingID. Deprecated, use the conventional PKCS #1 OIDs instead",
    w: true
  },
  "1.2.840.113549.1.12.5.3.1": {
    d: "pkcs-12-RSASignatureWithSHA1Digest",
    c: "PKCS #12 OID SignatureID. Deprecated, use the conventional PKCS #1 OIDs instead",
    w: true
  },
  "1.2.840.113549.1.12.10": { d: "pkcs-12Version1", c: "" },
  "1.2.840.113549.1.12.10.1": { d: "pkcs-12BadIds", c: "" },
  "1.2.840.113549.1.12.10.1.1": { d: "pkcs-12-keyBag", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.10.1.2": { d: "pkcs-12-pkcs-8ShroudedKeyBag", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.10.1.3": { d: "pkcs-12-certBag", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.10.1.4": { d: "pkcs-12-crlBag", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.10.1.5": { d: "pkcs-12-secretBag", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.12.10.1.6": { d: "pkcs-12-safeContentsBag", c: "PKCS #12 BagIds" },
  "1.2.840.113549.1.15.1": { d: "pkcs15modules", c: "PKCS #15" },
  "1.2.840.113549.1.15.2": { d: "pkcs15attributes", c: "PKCS #15" },
  "1.2.840.113549.1.15.3": { d: "pkcs15contentType", c: "PKCS #15" },
  "1.2.840.113549.1.15.3.1": { d: "pkcs15content", c: "PKCS #15 content type" },
  "1.2.840.113549.2": { d: "digestAlgorithm", c: "" },
  "1.2.840.113549.2.2": { d: "md2", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.2.4": { d: "md4", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.2.5": { d: "md5", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.2.7": { d: "hmacWithSHA1", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.2.8": { d: "hmacWithSHA224", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.2.9": { d: "hmacWithSHA256", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.2.10": { d: "hmacWithSHA384", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.2.11": { d: "hmacWithSHA512", c: "RSADSI digestAlgorithm" },
  "1.2.840.113549.3": { d: "encryptionAlgorithm", c: "" },
  "1.2.840.113549.3.2": { d: "rc2CBC", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.3": { d: "rc2ECB", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.4": { d: "rc4", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.5": { d: "rc4WithMAC", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.6": { d: "desx-CBC", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.7": { d: "des-EDE3-CBC", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.8": { d: "rc5CBC", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.9": { d: "rc5-CBCPad", c: "RSADSI encryptionAlgorithm" },
  "1.2.840.113549.3.10": { d: "desCDMF", c: "RSADSI encryptionAlgorithm. Formerly called CDMFCBCPad" },
  "1.2.840.114021.1.6.1": { d: "Identrus unknown policyIdentifier", c: "Identrus" },
  "1.2.840.114021.4.1": { d: "identrusOCSP", c: "Identrus" },
  "1.2.840.113556.1.2.241": { d: "deliveryMechanism", c: "Microsoft Exchange Server - attribute" },
  "1.2.840.113556.1.2.281": { d: "ntSecurityDescriptor", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.3.0": { d: "site-Addressing", c: "Microsoft Exchange Server - object class" },
  "1.2.840.113556.1.3.13": { d: "classSchema", c: "Microsoft Exchange Server - object class" },
  "1.2.840.113556.1.3.14": { d: "attributeSchema", c: "Microsoft Exchange Server - object class" },
  "1.2.840.113556.1.3.17": { d: "mailbox-Agent", c: "Microsoft Exchange Server - object class" },
  "1.2.840.113556.1.3.22": { d: "mailbox", c: "Microsoft Exchange Server - object class" },
  "1.2.840.113556.1.3.23": { d: "container", c: "Microsoft Exchange Server - object class" },
  "1.2.840.113556.1.3.46": { d: "mailRecipient", c: "Microsoft Exchange Server - object class" },
  "1.2.840.113556.1.4.145": { d: "revision", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1327": { d: "pKIDefaultKeySpec", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1328": { d: "pKIKeyUsage", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1329": { d: "pKIMaxIssuingDepth", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1330": { d: "pKICriticalExtensions", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1331": { d: "pKIExpirationPeriod", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1332": { d: "pKIOverlapPeriod", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1333": { d: "pKIExtendedKeyUsage", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1334": { d: "pKIDefaultCSPs", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1335": { d: "pKIEnrollmentAccess", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1429": { d: "msPKI-RA-Signature", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1430": { d: "msPKI-Enrollment-Flag", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1431": { d: "msPKI-Private-Key-Flag", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1432": { d: "msPKI-Certificate-Name-Flag", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1433": { d: "msPKI-Minimal-Key-Size", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1434": { d: "msPKI-Template-Schema-Version", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1435": { d: "msPKI-Template-Minor-Revision", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1436": { d: "msPKI-Cert-Template-OID", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1437": { d: "msPKI-Supersede-Templates", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1438": { d: "msPKI-RA-Policies", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1439": { d: "msPKI-Certificate-Policy", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1674": { d: "msPKI-Certificate-Application-Policy", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.1.4.1675": { d: "msPKI-RA-Application-Policies", c: "Microsoft Cert Template - attribute" },
  "1.2.840.113556.4.3": { d: "microsoftExcel", c: "Microsoft" },
  "1.2.840.113556.4.4": { d: "titledWithOID", c: "Microsoft" },
  "1.2.840.113556.4.5": { d: "microsoftPowerPoint", c: "Microsoft" },
  "1.2.840.113583.1": { d: "adobeAcrobat", c: "Adobe Acrobat" },
  "1.2.840.113583.1.1": { d: "acrobatSecurity", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.1": { d: "pdfPassword", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.2": { d: "pdfDefaultSigningCredential", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.3": { d: "pdfDefaultEncryptionCredential", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.4": { d: "pdfPasswordTimeout", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.5": { d: "pdfAuthenticDocumentsTrust", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.6": { d: "pdfDynamicContentTrust", c: "Adobe Acrobat security", w: true },
  "1.2.840.113583.1.1.7": { d: "pdfUbiquityTrust", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.8": { d: "pdfRevocationInfoArchival", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.9": { d: "pdfX509Extension", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.9.1": { d: "pdfTimeStamp", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.9.2": { d: "pdfArchiveRevInfo", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.1.10": { d: "pdfPPLKLiteCredential", c: "Adobe Acrobat security" },
  "1.2.840.113583.1.2": { d: "acrobatCPS", c: "Adobe Acrobat CPS" },
  "1.2.840.113583.1.2.1": { d: "pdfAuthenticDocumentsCPS", c: "Adobe Acrobat CPS" },
  "1.2.840.113583.1.2.2": { d: "pdfTestCPS", c: "Adobe Acrobat CPS" },
  "1.2.840.113583.1.2.3": { d: "pdfUbiquityCPS", c: "Adobe Acrobat CPS" },
  "1.2.840.113583.1.2.4": { d: "pdfAdhocCPS", c: "Adobe Acrobat CPS" },
  "1.2.840.113583.1.7": { d: "acrobatUbiquity", c: "Adobe Acrobat ubiquity" },
  "1.2.840.113583.1.7.1": { d: "pdfUbiquitySubRights", c: "Adobe Acrobat ubiquity" },
  "1.2.840.113583.1.9": { d: "acrobatExtension", c: "Adobe Acrobat X.509 extension" },
  "1.2.840.113628.114.1.7": { d: "adobePKCS7", c: "Adobe" },
  "1.2.840.113635.100": { d: "appleDataSecurity", c: "Apple" },
  "1.2.840.113635.100.1": { d: "appleTrustPolicy", c: "Apple" },
  "1.2.840.113635.100.1.1": { d: "appleISignTP", c: "Apple trust policy" },
  "1.2.840.113635.100.1.2": { d: "appleX509Basic", c: "Apple trust policy" },
  "1.2.840.113635.100.1.3": { d: "appleSSLPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.4": { d: "appleLocalCertGenPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.5": { d: "appleCSRGenPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.6": { d: "appleCRLPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.7": { d: "appleOCSPPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.8": { d: "appleSMIMEPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.9": { d: "appleEAPPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.10": { d: "appleSWUpdateSigningPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.11": { d: "appleIPSecPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.12": { d: "appleIChatPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.13": { d: "appleResourceSignPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.14": { d: "applePKINITClientPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.15": { d: "applePKINITServerPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.16": { d: "appleCodeSigningPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.1.17": { d: "applePackageSigningPolicy", c: "Apple trust policy" },
  "1.2.840.113635.100.2": { d: "appleSecurityAlgorithm", c: "Apple" },
  "1.2.840.113635.100.2.1": { d: "appleFEE", c: "Apple security algorithm" },
  "1.2.840.113635.100.2.2": { d: "appleASC", c: "Apple security algorithm" },
  "1.2.840.113635.100.2.3": { d: "appleFEE_MD5", c: "Apple security algorithm" },
  "1.2.840.113635.100.2.4": { d: "appleFEE_SHA1", c: "Apple security algorithm" },
  "1.2.840.113635.100.2.5": { d: "appleFEED", c: "Apple security algorithm" },
  "1.2.840.113635.100.2.6": { d: "appleFEEDEXP", c: "Apple security algorithm" },
  "1.2.840.113635.100.2.7": { d: "appleECDSA", c: "Apple security algorithm" },
  "1.2.840.113635.100.3": { d: "appleDotMacCertificate", c: "Apple" },
  "1.2.840.113635.100.3.1": { d: "appleDotMacCertificateRequest", c: "Apple dotMac certificate" },
  "1.2.840.113635.100.3.2": { d: "appleDotMacCertificateExtension", c: "Apple dotMac certificate" },
  "1.2.840.113635.100.3.3": { d: "appleDotMacCertificateRequestValues", c: "Apple dotMac certificate" },
  "1.2.840.113635.100.4": { d: "appleExtendedKeyUsage", c: "Apple" },
  "1.2.840.113635.100.4.1": { d: "appleCodeSigning", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.1.1": { d: "appleCodeSigningDevelopment", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.1.2": { d: "appleSoftwareUpdateSigning", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.1.3": { d: "appleCodeSigningThirdParty", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.1.4": { d: "appleResourceSigning", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.2": { d: "appleIChatSigning", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.3": { d: "appleIChatEncryption", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.4": { d: "appleSystemIdentity", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.5": { d: "appleCryptoEnv", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.5.1": { d: "appleCryptoProductionEnv", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.5.2": { d: "appleCryptoMaintenanceEnv", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.5.3": { d: "appleCryptoTestEnv", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.5.4": { d: "appleCryptoDevelopmentEnv", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.6": { d: "appleCryptoQoS", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.6.1": { d: "appleCryptoTier0QoS", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.6.2": { d: "appleCryptoTier1QoS", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.6.3": { d: "appleCryptoTier2QoS", c: "Apple extended key usage" },
  "1.2.840.113635.100.4.6.4": { d: "appleCryptoTier3QoS", c: "Apple extended key usage" },
  "1.2.840.113635.100.5": { d: "appleCertificatePolicies", c: "Apple" },
  "1.2.840.113635.100.5.1": { d: "appleCertificatePolicyID", c: "Apple" },
  "1.2.840.113635.100.5.2": { d: "appleDotMacCertificatePolicyID", c: "Apple" },
  "1.2.840.113635.100.5.3": { d: "appleADCCertificatePolicyID", c: "Apple" },
  "1.2.840.113635.100.6": { d: "appleCertificateExtensions", c: "Apple" },
  "1.2.840.113635.100.6.1": { d: "appleCertificateExtensionCodeSigning", c: "Apple certificate extension" },
  "1.2.840.113635.100.6.1.1": { d: "appleCertificateExtensionAppleSigning", c: "Apple certificate extension" },
  "1.2.840.113635.100.6.1.2": { d: "appleCertificateExtensionADCDeveloperSigning", c: "Apple certificate extension" },
  "1.2.840.113635.100.6.1.3": { d: "appleCertificateExtensionADCAppleSigning", c: "Apple certificate extension" },
  "1.2.840.113635.100.15.1": { d: "appleCustomCertificateExtension1", c: "Apple custom certificate extension" },
  "1.2.840.113635.100.15.2": { d: "appleCustomCertificateExtension2", c: "Apple custom certificate extension" },
  "1.2.840.113635.100.15.3": { d: "appleCustomCertificateExtension3", c: "Apple custom certificate extension" },
  "1.3.6.1.4.1.311.2.1.4": { d: "spcIndirectDataContext", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.10": { d: "spcAgencyInfo", c: "Microsoft code signing. Also assigned as policyLink" },
  "1.3.6.1.4.1.311.2.1.11": { d: "spcStatementType", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.12": { d: "spcSpOpusInfo", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.14": { d: "certReqExtensions", c: "Microsoft" },
  "1.3.6.1.4.1.311.2.1.15": { d: "spcPEImageData", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.18": { d: "spcRawFileData", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.19": { d: "spcStructuredStorageData", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.20": {
    d: "spcJavaClassData (type 1)",
    c: 'Microsoft code signing. Formerly "link extension" aka "glue extension"'
  },
  "1.3.6.1.4.1.311.2.1.21": { d: "individualCodeSigning", c: "Microsoft" },
  "1.3.6.1.4.1.311.2.1.22": { d: "commercialCodeSigning", c: "Microsoft" },
  "1.3.6.1.4.1.311.2.1.25": { d: "spcLink (type 2)", c: 'Microsoft code signing. Also assigned as "glue extension"' },
  "1.3.6.1.4.1.311.2.1.26": { d: "spcMinimalCriteriaInfo", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.27": { d: "spcFinancialCriteriaInfo", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.28": { d: "spcLink (type 3)", c: 'Microsoft code signing.  Also assigned as "glue extension"' },
  "1.3.6.1.4.1.311.2.1.29": { d: "spcHashInfoObjID", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.1.30": { d: "spcSipInfoObjID", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.2.2": { d: "ctl", c: "Microsoft CTL" },
  "1.3.6.1.4.1.311.2.2.1": { d: "ctlTrustedCodesigningCAList", c: "Microsoft CTL" },
  "1.3.6.1.4.1.311.2.2.2": { d: "ctlTrustedClientAuthCAList", c: "Microsoft CTL" },
  "1.3.6.1.4.1.311.2.2.3": { d: "ctlTrustedServerAuthCAList", c: "Microsoft CTL" },
  "1.3.6.1.4.1.311.3.2.1": { d: "timestampRequest", c: "Microsoft code signing" },
  "1.3.6.1.4.1.311.10.1": { d: "certTrustList", c: "Microsoft contentType" },
  "1.3.6.1.4.1.311.10.1.1": { d: "sortedCtl", c: "Microsoft contentType" },
  "1.3.6.1.4.1.311.10.2": { d: "nextUpdateLocation", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.3.1": { d: "certTrustListSigning", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.2": { d: "timeStampSigning", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.3": { d: "serverGatedCrypto", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.3.1": { d: "serialized", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.3.4": { d: "encryptedFileSystem", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.5": { d: "whqlCrypto", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.6": { d: "nt5Crypto", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.7": { d: "oemWHQLCrypto", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.8": { d: "embeddedNTCrypto", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.9": { d: "rootListSigner", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.10": { d: "qualifiedSubordination", c: "Microsoft extended 3key usage" },
  "1.3.6.1.4.1.311.10.3.11": { d: "keyRecovery", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.12": { d: "documentSigning", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.13": { d: "lifetimeSigning", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.14": { d: "mobileDeviceSoftware", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.15": { d: "smartDisplay", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.16": { d: "cspSignature", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.3.4.1": { d: "efsRecovery", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.4.1": { d: "yesnoTrustAttr", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.10.5.1": { d: "drm", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.5.2": { d: "drmIndividualization", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.6.1": { d: "licenses", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.6.2": { d: "licenseServer", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.10.7.1": { d: "keyidRdn", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.10.8.1": { d: "removeCertificate", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.10.9.1": { d: "crossCertDistPoints", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.10.10.1": { d: "cmcAddAttributes", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.11": { d: "certPropIdPrefix", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.11.4": { d: "certMd5HashPropId", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.11.20": { d: "certKeyIdentifierPropId", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.11.28": { d: "certIssuerSerialNumberMd5HashPropId", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.11.29": { d: "certSubjectNameMd5HashPropId", c: "Microsoft" },
  "1.3.6.1.4.1.311.10.12.1": { d: "anyApplicationPolicy", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.12": { d: "catalog", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.12.1.1": { d: "catalogList", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.12.1.2": { d: "catalogListMember", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.12.2.1": { d: "catalogNameValueObjID", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.12.2.2": { d: "catalogMemberInfoObjID", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.13.1": { d: "renewalCertificate", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.13.2.1": { d: "enrolmentNameValuePair", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.13.2.2": { d: "enrolmentCSP", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.13.2.3": { d: "osVersion", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.16.4": { d: "microsoftRecipientInfo", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.17.1": { d: "pkcs12KeyProviderNameAttr", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.17.2": { d: "localMachineKeyset", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.17.3": { d: "pkcs12ExtendedAttributes", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.20.1": { d: "autoEnrollCtlUsage", c: "Microsoft" },
  "1.3.6.1.4.1.311.20.2": { d: "enrollCerttypeExtension", c: "Microsoft CAPICOM certificate template, V1" },
  "1.3.6.1.4.1.311.20.2.1": { d: "enrollmentAgent", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.20.2.2": { d: "smartcardLogon", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.20.2.3": { d: "userPrincipalName", c: "Microsoft UPN" },
  "1.3.6.1.4.1.311.20.3": { d: "certManifold", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.1": { d: "cAKeyCertIndexPair", c: "Microsoft attribute.  Also assigned as certsrvCaVersion" },
  "1.3.6.1.4.1.311.21.2": { d: "certSrvPreviousCertHash", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.3": { d: "crlVirtualBase", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.4": { d: "crlNextPublish", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.5": { d: "caExchange", c: "Microsoft extended key usage", w: true },
  "1.3.6.1.4.1.311.21.6": { d: "keyRecovery", c: "Microsoft extended key usage", w: true },
  "1.3.6.1.4.1.311.21.7": { d: "certificateTemplate", c: "Microsoft CAPICOM certificate template, V2" },
  "1.3.6.1.4.1.311.21.9": { d: "rdnDummySigner", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.10": { d: "applicationCertPolicies", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.11": { d: "applicationPolicyMappings", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.12": { d: "applicationPolicyConstraints", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.13": { d: "archivedKey", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.21.14": { d: "crlSelfCDP", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.15": { d: "requireCertChainPolicy", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.16": { d: "archivedKeyCertHash", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.17": { d: "issuedCertHash", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.19": { d: "dsEmailReplication", c: "Microsoft" },
  "1.3.6.1.4.1.311.21.20": { d: "requestClientInfo", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.21.21": { d: "encryptedKeyHash", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.21.22": { d: "certsrvCrossCaVersion", c: "Microsoft" },
  "1.3.6.1.4.1.311.25.1": { d: "ntdsReplication", c: "Microsoft" },
  "1.3.6.1.4.1.311.25.2": { d: "ntdsCASecurityExt", c: "Microsoft" },
  "1.3.6.1.4.1.311.25.2.1": { d: "ntdsObjectSID", c: "Microsoft" },
  "1.3.6.1.4.1.311.31.1": { d: "productUpdate", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.47.1.1": { d: "systemHealth", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.47.1.3": { d: "systemHealthLoophole", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.60.1.1": { d: "rootProgramFlags", c: "Microsoft policy attribute" },
  "1.3.6.1.4.1.311.61.1.1": { d: "kernelModeCodeSigning", c: "Microsoft extended key usage" },
  "1.3.6.1.4.1.311.60.2.1.1": { d: "jurisdictionOfIncorporationL", c: "Microsoft (???)" },
  "1.3.6.1.4.1.311.60.2.1.2": { d: "jurisdictionOfIncorporationSP", c: "Microsoft (???)" },
  "1.3.6.1.4.1.311.60.2.1.3": { d: "jurisdictionOfIncorporationC", c: "Microsoft (???)" },
  "1.3.6.1.4.1.311.76.509.1.1": { d: "microsoftCPS", c: "Microsoft PKI services" },
  "1.3.6.1.4.1.311.88": { d: "capiCom", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.88.1": { d: "capiComVersion", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.88.2": { d: "capiComAttribute", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.88.2.1": { d: "capiComDocumentName", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.88.2.2": { d: "capiComDocumentDescription", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.88.3": { d: "capiComEncryptedData", c: "Microsoft attribute" },
  "1.3.6.1.4.1.311.88.3.1": { d: "capiComEncryptedContent", c: "Microsoft attribute" },
  "1.3.6.1.4.1.188.7.1.1": { d: "ascom", c: "Ascom Systech" },
  "1.3.6.1.4.1.188.7.1.1.1": { d: "ideaECB", c: "Ascom Systech" },
  "1.3.6.1.4.1.188.7.1.1.2": { d: "ideaCBC", c: "Ascom Systech" },
  "1.3.6.1.4.1.188.7.1.1.3": { d: "ideaCFB", c: "Ascom Systech" },
  "1.3.6.1.4.1.188.7.1.1.4": { d: "ideaOFB", c: "Ascom Systech" },
  "1.3.6.1.4.1.2363.3.2": { d: "euroControlUntrustedEA", c: "Eurocontrol certificate policy" },
  "1.3.6.1.4.1.2363.4.3": { d: "euroControlEARootCA", c: "Eurocontrol certificate policy" },
  "1.3.6.1.4.1.2363.4.3.1": { d: "euroControlEABridgeCA", c: "Eurocontrol certificate policy" },
  "1.3.6.1.4.1.2363.4.3.1.1": { d: "euroControlEAIssuingCA", c: "Eurocontrol certificate policy" },
  "1.3.6.1.4.1.2363.4.3.1.1.1": { d: "euroControlEAClientCertificate", c: "Eurocontrol certificate policy" },
  "1.3.6.1.4.1.2363.4.3.1.1.2": { d: "euroControlEAServerCertificate", c: "Eurocontrol certificate policy" },
  "1.3.6.1.4.1.2363.4.3.1.1.3": { d: "euroControlEASWIMSigningCertificate", c: "Eurocontrol certificate policy" },
  "1.3.6.1.4.1.2428.10.1.1": { d: "UNINETT policyIdentifier", c: "UNINETT PCA" },
  "1.3.6.1.4.1.2712.10": { d: "ICE-TEL policyIdentifier", c: "ICE-TEL CA" },
  "1.3.6.1.4.1.2786.1.1.1": { d: "ICE-TEL Italian policyIdentifier", c: "ICE-TEL CA policy" },
  "1.3.6.1.4.1.3029.1.1.1": { d: "blowfishECB", c: "cryptlib encryption algorithm" },
  "1.3.6.1.4.1.3029.1.1.2": { d: "blowfishCBC", c: "cryptlib encryption algorithm" },
  "1.3.6.1.4.1.3029.1.1.3": { d: "blowfishCFB", c: "cryptlib encryption algorithm" },
  "1.3.6.1.4.1.3029.1.1.4": { d: "blowfishOFB", c: "cryptlib encryption algorithm" },
  "1.3.6.1.4.1.3029.1.2.1": { d: "elgamal", c: "cryptlib public-key algorithm" },
  "1.3.6.1.4.1.3029.1.2.1.1": { d: "elgamalWithSHA-1", c: "cryptlib public-key algorithm" },
  "1.3.6.1.4.1.3029.1.2.1.2": { d: "elgamalWithRIPEMD-160", c: "cryptlib public-key algorithm" },
  "1.3.6.1.4.1.3029.3.1.1": { d: "cryptlibPresenceCheck", c: "cryptlib attribute type" },
  "1.3.6.1.4.1.3029.3.1.2": { d: "pkiBoot", c: "cryptlib attribute type" },
  "1.3.6.1.4.1.3029.3.1.4": { d: "crlExtReason", c: "cryptlib attribute type" },
  "1.3.6.1.4.1.3029.3.1.5": { d: "keyFeatures", c: "cryptlib attribute type" },
  "1.3.6.1.4.1.3029.4.1": { d: "cryptlibContent", c: "cryptlib" },
  "1.3.6.1.4.1.3029.4.1.1": { d: "cryptlibConfigData", c: "cryptlib content type" },
  "1.3.6.1.4.1.3029.4.1.2": { d: "cryptlibUserIndex", c: "cryptlib content type" },
  "1.3.6.1.4.1.3029.4.1.3": { d: "cryptlibUserInfo", c: "cryptlib content type" },
  "1.3.6.1.4.1.3029.4.1.4": { d: "rtcsRequest", c: "cryptlib content type" },
  "1.3.6.1.4.1.3029.4.1.5": { d: "rtcsResponse", c: "cryptlib content type" },
  "1.3.6.1.4.1.3029.4.1.6": { d: "rtcsResponseExt", c: "cryptlib content type" },
  "1.3.6.1.4.1.3029.42.11172.1": { d: "mpeg-1", c: "cryptlib special MPEG-of-cat OID" },
  "1.3.6.1.4.1.3029.54.11940.54": { d: 'TSA policy "Anything that arrives, we sign"', c: "cryptlib TSA policy" },
  "1.3.6.1.4.1.3029.88.89.90.90.89": { d: "xYZZY policyIdentifier", c: "cryptlib certificate policy" },
  "1.3.6.1.4.1.3401.8.1.1": { d: "pgpExtension", c: "PGP key information" },
  "1.3.6.1.4.1.3576.7": { d: "eciaAscX12Edi", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.3576.7.1": { d: "plainEDImessage", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.3576.7.2": { d: "signedEDImessage", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.3576.7.5": { d: "integrityEDImessage", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.3576.7.65": { d: "iaReceiptMessage", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.3576.7.97": { d: "iaStatusMessage", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.3576.8": { d: "eciaEdifact", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.3576.9": { d: "eciaNonEdi", c: "TMN EDI for Interactive Agents" },
  "1.3.6.1.4.1.4146": { d: "Globalsign", c: "Globalsign" },
  "1.3.6.1.4.1.4146.1": { d: "globalsignPolicy", c: "Globalsign" },
  "1.3.6.1.4.1.4146.1.10": { d: "globalsignDVPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.20": { d: "globalsignOVPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.30": { d: "globalsignTSAPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.40": { d: "globalsignClientCertPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.50": { d: "globalsignCodeSignPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.60": { d: "globalsignRootSignPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.70": { d: "globalsignTrustedRootPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.80": { d: "globalsignEDIClientPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.81": { d: "globalsignEDIServerPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.90": { d: "globalsignTPMRootPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.4146.1.95": { d: "globalsignOCSPPolicy", c: "Globalsign policy" },
  "1.3.6.1.4.1.5309.1": { d: "edelWebPolicy", c: "EdelWeb policy" },
  "1.3.6.1.4.1.5309.1.2": { d: "edelWebCustomerPolicy", c: "EdelWeb policy" },
  "1.3.6.1.4.1.5309.1.2.1": { d: "edelWebClepsydrePolicy", c: "EdelWeb policy" },
  "1.3.6.1.4.1.5309.1.2.2": { d: "edelWebExperimentalTSAPolicy", c: "EdelWeb policy" },
  "1.3.6.1.4.1.5309.1.2.3": { d: "edelWebOpenEvidenceTSAPolicy", c: "EdelWeb policy" },
  "1.3.6.1.4.1.5472": { d: "timeproof", c: "enterprise" },
  "1.3.6.1.4.1.5472.1": { d: "tss", c: "timeproof" },
  "1.3.6.1.4.1.5472.1.1": { d: "tss80", c: "timeproof TSS" },
  "1.3.6.1.4.1.5472.1.2": { d: "tss380", c: "timeproof TSS" },
  "1.3.6.1.4.1.5472.1.3": { d: "tss400", c: "timeproof TSS" },
  "1.3.6.1.4.1.5770.0.3": { d: "secondaryPractices", c: "MEDePass" },
  "1.3.6.1.4.1.5770.0.4": { d: "physicianIdentifiers", c: "MEDePass" },
  "1.3.6.1.4.1.6449.1.2.1.3.1": { d: "comodoPolicy", c: "Comodo CA" },
  "1.3.6.1.4.1.6449.1.2.2.15": { d: "wotrustPolicy", c: "WoTrust (Comodo) CA" },
  "1.3.6.1.4.1.6449.1.3.5.2": { d: "comodoCertifiedDeliveryService", c: "Comodo CA" },
  "1.3.6.1.4.1.6449.2.1.1": { d: "comodoTimestampingPolicy", c: "Comodo CA" },
  "1.3.6.1.4.1.8301.3.5.1": { d: "validityModelChain", c: "TU Darmstadt ValidityModel" },
  "1.3.6.1.4.1.8301.3.5.2": { d: "validityModelShell", c: "ValidityModel" },
  "1.3.6.1.4.1.8231.1": { d: "rolUnicoNacional", c: "Chilean Government national unique roll number" },
  "1.3.6.1.4.1.11129.2.4.2": { d: "googleSignedCertificateTimestamp", c: "Google Certificate Transparency" },
  "1.3.6.1.4.1.11129.2.4.3": { d: "googlePrecertificatePoison", c: "Google Certificate Transparency" },
  "1.3.6.1.4.1.11129.2.4.4": { d: "googlePrecertificateCA", c: "Google Certificate Transparency" },
  "1.3.6.1.4.1.11129.2.4.5": { d: "googleOcspSignedCertificateTimestamp", c: "Google Certificate Transparency" },
  "1.3.6.1.4.1.11591": { d: "gnu", c: "GNU Project (see https://www.gnupg.org/oids.html)" },
  "1.3.6.1.4.1.11591.1": { d: "gnuRadius", c: "GNU Radius" },
  "1.3.6.1.4.1.11591.2.2.1": { d: "gpgX509StandaloneCert", c: "Cert is intentionally self-signed." },
  "1.3.6.1.4.1.11591.2.2.2": { d: "gpgX509WellKnownPrivateKey", c: "Mark cert as having a well known key" },
  "1.3.6.1.4.1.11591.2.2.10": { d: "gpgX509PgpKdfKekParm", c: "Description of ECC params" },
  "1.3.6.1.4.1.11591.2.3.1": { d: "gpgCtPgpKeyblock", c: "CMS ct for a binary PGP keyblock" },
  "1.3.6.1.4.1.11591.2.4.1.1": { d: "gpgFingerprint", c: "LDAP keyserver attribute" },
  "1.3.6.1.4.1.11591.2.4.1.2": { d: "gpgSubFingerprint", c: "LDAP keyserver attribute" },
  "1.3.6.1.4.1.11591.2.4.1.3": { d: "gpgMailbox", c: "LDAP keyserver attribute" },
  "1.3.6.1.4.1.11591.2.4.1.4": { d: "gpgSubCertID", c: "LDAP keyserver attribute" },
  "1.3.6.1.4.1.11591.2.5.1": { d: "gpgNtds", c: "LDAP URL ext, auth with current AD user" },
  "1.3.6.1.4.1.11591.2.6.1": { d: "gpgX509PgpUseCert", c: "X.509 encoded OpenPGP key usage" },
  "1.3.6.1.4.1.11591.2.6.2": { d: "gpgX509PgpUseSign", c: "X.509 encoded PGP key usage" },
  "1.3.6.1.4.1.11591.2.6.3": { d: "gpgX509PgpUseEncr", c: "X.509 encoded PGP key usage" },
  "1.3.6.1.4.1.11591.2.6.4": { d: "gpgX509PgpUseAuth", c: "X.509 encoded PGP key usage" },
  "1.3.6.1.4.1.11591.2.12242973": { d: "gpgInvalidOid", c: "0xBAD01D to indicate an invalid encoded OID" },
  "1.3.6.1.4.1.11591.3": { d: "gnuRadar", c: "GNU Radar" },
  "1.3.6.1.4.1.11591.4.11": { d: "scrypt", c: "GNU Generic Security Service" },
  "1.3.6.1.4.1.11591.12": { d: "gnuDigestAlgorithm", c: "GNU digest algorithm" },
  "1.3.6.1.4.1.11591.12.2": { d: "tiger", c: "GNU digest algorithm" },
  "1.3.6.1.4.1.11591.13": { d: "gnuEncryptionAlgorithm", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2": { d: "serpent", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.1": { d: "serpent128_ECB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.2": { d: "serpent128_CBC", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.3": { d: "serpent128_OFB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.4": { d: "serpent128_CFB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.21": { d: "serpent192_ECB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.22": { d: "serpent192_CBC", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.23": { d: "serpent192_OFB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.24": { d: "serpent192_CFB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.41": { d: "serpent256_ECB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.42": { d: "serpent256_CBC", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.43": { d: "serpent256_OFB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.13.2.44": { d: "serpent256_CFB", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.15.1": { d: "curve25519", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.15.2": { d: "curve448", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.15.3": { d: "curve25519ph", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.11591.15.4": { d: "curve448ph", c: "GNU encryption algorithm" },
  "1.3.6.1.4.1.16334.509.1.1": { d: "Northrop Grumman extKeyUsage?", c: "Northrop Grumman extended key usage" },
  "1.3.6.1.4.1.16334.509.2.1": { d: "ngcClass1", c: "Northrop Grumman policy" },
  "1.3.6.1.4.1.16334.509.2.2": { d: "ngcClass2", c: "Northrop Grumman policy" },
  "1.3.6.1.4.1.16334.509.2.3": { d: "ngcClass3", c: "Northrop Grumman policy" },
  "1.3.6.1.4.1.23629.1.4.2.1.1": { d: "safenetUsageLimit", c: "SafeNet" },
  "1.3.6.1.4.1.23629.1.4.2.1.2": { d: "safenetEndDate", c: "SafeNet" },
  "1.3.6.1.4.1.23629.1.4.2.1.3": { d: "safenetStartDate", c: "SafeNet" },
  "1.3.6.1.4.1.23629.1.4.2.1.4": { d: "safenetAdminCert", c: "SafeNet" },
  "1.3.6.1.4.1.23629.1.4.2.2.1": { d: "safenetKeyDigest", c: "SafeNet" },
  "1.3.6.1.4.1.25054.3": { d: "carillonSecurity", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.1": { d: "carillonCommercialPKI", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.2": { d: "carillonCommercialTSA", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.3": { d: "carillonCommercialSCVP", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.3.1": { d: "carillonSCVPExtendedStatusInfo", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.4": { d: "carillonCommercialCMS", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.4.1": { d: "carillonExtKeyUsageCIVCardAuth", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.4.2": { d: "carillonExtKeyUsageCIVContentSigning", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.5": { d: "carillonCommercialLSAP", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.5.1": { d: "carillonExtKeyUsageLSAPCodeSigning", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.6": { d: "carillonCommercialCE", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.7": { d: "carillonCommercialLicense", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.7.1": { d: "carillonExtKeyUsageLicenseSigning", c: "Carillon security" },
  "1.3.6.1.4.1.25054.3.8": { d: "carillonCommercialSecret", c: "Carillon security" },
  "1.3.6.1.4.1.51483.2.1": { d: "hashOfRootKey", c: "CTIA" },
  "1.3.6.1.5.2.3.1": { d: "authData", c: "Kerberos" },
  "1.3.6.1.5.2.3.2": { d: "dHKeyData", c: "Kerberos" },
  "1.3.6.1.5.2.3.3": { d: "rkeyData", c: "Kerberos" },
  "1.3.6.1.5.2.3.4": { d: "keyPurposeClientAuth", c: "Kerberos" },
  "1.3.6.1.5.2.3.5": { d: "keyPurposeKdc", c: "Kerberos" },
  "1.3.6.1.5.2.3.6": { d: "kdf", c: "Kerberos" },
  "1.3.6.1.5.5.7": { d: "pkix", c: "" },
  "1.3.6.1.5.5.7.0.12": { d: "attributeCert", c: "PKIX" },
  "1.3.6.1.5.5.7.1": { d: "privateExtension", c: "PKIX" },
  "1.3.6.1.5.5.7.1.1": { d: "authorityInfoAccess", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.2": { d: "biometricInfo", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.3": { d: "qcStatements", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.4": { d: "acAuditIdentity", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.5": { d: "acTargeting", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.6": { d: "acAaControls", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.7": { d: "ipAddrBlocks", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.8": { d: "autonomousSysIds", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.9": { d: "routerIdentifier", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.10": { d: "acProxying", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.11": { d: "subjectInfoAccess", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.12": { d: "logoType", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.13": { d: "wlanSSID", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.14": { d: "proxyCertInfo", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.15": { d: "acPolicies", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.16": { d: "certificateWarranty", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.18": { d: "cmsContentConstraints", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.19": { d: "otherCerts", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.20": { d: "wrappedApexContinKey", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.21": { d: "clearanceConstraints", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.22": { d: "skiSemantics", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.23": { d: "noSecrecyAfforded", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.24": { d: "tlsFeature", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.25": { d: "manufacturerUsageDescription", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.26": { d: "tnAuthList", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.27": { d: "jwtClaimConstraints", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.28": { d: "ipAddrBlocksV2", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.29": { d: "autonomousSysIdsV2", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.30": { d: "manufacturerUsageDescriptionSigner", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.31": { d: "acmeIdentifier", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.32": { d: "masaURL", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.33": { d: "enhancedJWTClaimConstraints", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.1.34": { d: "nfTypes", c: "PKIX private extension" },
  "1.3.6.1.5.5.7.2": { d: "policyQualifierIds", c: "PKIX" },
  "1.3.6.1.5.5.7.2.1": { d: "cps", c: "PKIX policy qualifier" },
  "1.3.6.1.5.5.7.2.2": { d: "unotice", c: "PKIX policy qualifier" },
  "1.3.6.1.5.5.7.2.3": { d: "textNotice", c: "PKIX policy qualifier" },
  "1.3.6.1.5.5.7.2.4": { d: "acps", c: "PKIX policy qualifier" },
  "1.3.6.1.5.5.7.2.5": { d: "acunotice", c: "PKIX policy qualifier" },
  "1.3.6.1.5.5.7.3": { d: "keyPurpose", c: "PKIX" },
  "1.3.6.1.5.5.7.3.1": { d: "serverAuth", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.2": { d: "clientAuth", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.3": { d: "codeSigning", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.4": { d: "emailProtection", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.5": { d: "ipsecEndSystem", c: "PKIX key purpose", w: true },
  "1.3.6.1.5.5.7.3.6": { d: "ipsecTunnel", c: "PKIX key purpose", w: true },
  "1.3.6.1.5.5.7.3.7": { d: "ipsecUser", c: "PKIX key purpose", w: true },
  "1.3.6.1.5.5.7.3.8": { d: "timeStamping", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.9": { d: "ocspSigning", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.10": { d: "dvcs", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.11": { d: "sbgpCertAAServerAuth", c: "PKIX key purpose", w: true },
  "1.3.6.1.5.5.7.3.12": { d: "scvpResponder", c: "PKIX key purpose", w: true },
  "1.3.6.1.5.5.7.3.13": { d: "eapOverPPP", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.14": { d: "eapOverLAN", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.15": { d: "scvpServer", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.16": { d: "scvpClient", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.17": { d: "ipsecIKE", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.18": { d: "capwapAC", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.19": { d: "capwapWTP", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.20": { d: "sipDomain", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.21": { d: "secureShellClient", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.22": { d: "secureShellServer", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.23": { d: "sendRouter", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.24": { d: "sendProxiedRouter", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.25": { d: "sendOwner", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.26": { d: "sendProxiedOwner", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.27": { d: "cmcCA", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.28": { d: "cmcRA", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.29": { d: "cmcArchive", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.30": { d: "bgpsecRouter", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.31": { d: "bimi", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.32": { d: "cmKGA", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.33": { d: "rpcTLSClient", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.34": { d: "rpcTLSServer", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.35": { d: "bundleSecurity", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.3.36": { d: "documentSigning", c: "PKIX key purpose" },
  "1.3.6.1.5.5.7.4": { d: "cmpInformationTypes", c: "PKIX" },
  "1.3.6.1.5.5.7.4.1": { d: "caProtEncCert", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.2": { d: "signKeyPairTypes", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.3": { d: "encKeyPairTypes", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.4": { d: "preferredSymmAlg", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.5": { d: "caKeyUpdateInfo", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.6": { d: "currentCRL", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.7": { d: "unsupportedOIDs", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.10": { d: "keyPairParamReq", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.11": { d: "keyPairParamRep", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.12": { d: "revPassphrase", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.13": { d: "implicitConfirm", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.14": { d: "confirmWaitTime", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.15": { d: "origPKIMessage", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.4.16": { d: "suppLangTags", c: "PKIX CMP information" },
  "1.3.6.1.5.5.7.5": { d: "crmfRegistration", c: "PKIX" },
  "1.3.6.1.5.5.7.5.1": { d: "regCtrl", c: "PKIX CRMF registration" },
  "1.3.6.1.5.5.7.5.1.1": { d: "regToken", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.1.2": { d: "authenticator", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.1.3": { d: "pkiPublicationInfo", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.1.4": { d: "pkiArchiveOptions", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.1.5": { d: "oldCertID", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.1.6": { d: "protocolEncrKey", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.1.7": { d: "altCertTemplate", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.1.8": { d: "wtlsTemplate", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.2": { d: "utf8Pairs", c: "PKIX CRMF registration" },
  "1.3.6.1.5.5.7.5.2.1": { d: "utf8Pairs", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.5.2.2": { d: "certReq", c: "PKIX CRMF registration control" },
  "1.3.6.1.5.5.7.6": { d: "algorithms", c: "PKIX" },
  "1.3.6.1.5.5.7.6.1": { d: "des40", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.2": { d: "noSignature", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.3": { d: "dhSigHmacSha1", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.4": { d: "dhPop", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.5": { d: "dhPopSha224", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.6": { d: "dhPopSha256", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.7": { d: "dhPopSha384", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.8": { d: "dhPopSha512", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.15": { d: "dhPopStaticSha224HmacSha224", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.16": { d: "dhPopStaticSha256HmacSha256", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.17": { d: "dhPopStaticSha384HmacSha384", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.18": { d: "dhPopStaticSha512HmacSha512", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.25": { d: "ecdhPopStaticSha224HmacSha224", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.26": { d: "ecdhPopStaticSha256HmacSha256", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.27": { d: "ecdhPopStaticSha384HmacSha384", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.28": { d: "ecdhPopStaticSha512HmacSha512", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.30": { d: "rsaPssShake128", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.31": { d: "rsaPssShake256", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.32": { d: "ecdsaShake128", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.6.33": { d: "ecdsaShake256", c: "PKIX algorithm" },
  "1.3.6.1.5.5.7.7": { d: "cmcControls", c: "PKIX" },
  "1.3.6.1.5.5.7.8": { d: "otherNames", c: "PKIX" },
  "1.3.6.1.5.5.7.8.1": { d: "personalData", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.2": { d: "userGroup", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.3": { d: "permanentIdentifier", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.5": { d: "xmppAddr", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.6": { d: "SIM", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.7": { d: "dnsSRV", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.8": { d: "naiRealm", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.9": { d: "smtpUTF8Mailbox", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.10": { d: "acpNodeName", c: "PKIX other name" },
  "1.3.6.1.5.5.7.8.11": { d: "bundleEID", c: "PKIX other name" },
  "1.3.6.1.5.5.7.9": { d: "personalData", c: "PKIX qualified certificates" },
  "1.3.6.1.5.5.7.9.1": { d: "dateOfBirth", c: "PKIX personal data" },
  "1.3.6.1.5.5.7.9.2": { d: "placeOfBirth", c: "PKIX personal data" },
  "1.3.6.1.5.5.7.9.3": { d: "gender", c: "PKIX personal data" },
  "1.3.6.1.5.5.7.9.4": { d: "countryOfCitizenship", c: "PKIX personal data" },
  "1.3.6.1.5.5.7.9.5": { d: "countryOfResidence", c: "PKIX personal data" },
  "1.3.6.1.5.5.7.10": { d: "attributeCertificate", c: "PKIX" },
  "1.3.6.1.5.5.7.10.1": { d: "authenticationInfo", c: "PKIX attribute certificate extension" },
  "1.3.6.1.5.5.7.10.2": { d: "accessIdentity", c: "PKIX attribute certificate extension" },
  "1.3.6.1.5.5.7.10.3": { d: "chargingIdentity", c: "PKIX attribute certificate extension" },
  "1.3.6.1.5.5.7.10.4": { d: "group", c: "PKIX attribute certificate extension" },
  "1.3.6.1.5.5.7.10.5": { d: "role", c: "PKIX attribute certificate extension" },
  "1.3.6.1.5.5.7.10.6": { d: "wlanSSID", c: "PKIX attribute-certificate extension" },
  "1.3.6.1.5.5.7.11": { d: "personalData", c: "PKIX qualified certificates" },
  "1.3.6.1.5.5.7.11.1": { d: "pkixQCSyntax-v1", c: "PKIX qualified certificates" },
  "1.3.6.1.5.5.7.11.2": { d: "pkixQCSyntax-v2", c: "PKIX qualified certificates" },
  "1.3.6.1.5.5.7.12": { d: "pkixCCT", c: "PKIX CMC Content Types" },
  "1.3.6.1.5.5.7.12.2": { d: "pkiData", c: "PKIX CMC Content Types" },
  "1.3.6.1.5.5.7.12.3": { d: "pkiResponse", c: "PKIX CMC Content Types" },
  "1.3.6.1.5.5.7.14.2": { d: "resourceCertificatePolicy", c: "PKIX policies" },
  "1.3.6.1.5.5.7.17": { d: "scvpCheck", c: "PKIX SCVP check" },
  "1.3.6.1.5.5.7.17.1": { d: "scvpCheckBuildPath", c: "SCVP" },
  "1.3.6.1.5.5.7.17.2": { d: "scvpCheckBuildValidPath", c: "SCVP" },
  "1.3.6.1.5.5.7.17.3": { d: "scvpCheckBuildStatusCheckedPath", c: "SCVP" },
  "1.3.6.1.5.5.7.17.4": { d: "scvpCheckBuildAaPath", c: "SCVP" },
  "1.3.6.1.5.5.7.17.5": { d: "scvpCheckBuildValidAaPath", c: "SCVP" },
  "1.3.6.1.5.5.7.17.6": { d: "scvpCheckBuildStatusCheckedAaPath", c: "SCVP" },
  "1.3.6.1.5.5.7.17.7": { d: "scvpCheckStatusCheckAcAndBuildStatusCheckedAaPath", c: "SCVP" },
  "1.3.6.1.5.5.7.18": { d: "scvpWantBack", c: "PKIX SCVP wantback" },
  "1.3.6.1.5.5.7.18.1": { d: "scvpWantbackBestCertPath", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.2": { d: "scvpWantbackRevocationInfo", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.4": { d: "scvpWantbackPublicKeyInfo", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.5": { d: "scvpWantbackAaCertPath", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.6": { d: "scvpWantbackAaRevocationInfo", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.7": { d: "scvpWantbackAcRevocationInfo", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.9": { d: "scvpWantbackRelayedResponses", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.10": { d: "scvpWantbackCert", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.11": { d: "scvpWantbackAcCert", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.12": { d: "scvpWantbackAllCertPaths", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.13": { d: "scvpWantbackEeRevocationInfo", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.18.14": { d: "scvpWantbackCAsRevocationInfo", c: "SCVP wantback" },
  "1.3.6.1.5.5.7.19": { d: "scvpValPolicy", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.1": { d: "scvpDefaultValPolicy", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.2": { d: "scvpNameValAlg", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.2.1": { d: "scvpNameErrorNameMismatch", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.2.2": { d: "scvpNameErrorNoName", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.2.3": { d: "scvpNameErrorUnknownAlg", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.2.4": { d: "scvpNameErrorBadName", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.2.5": { d: "scvpNameErrorBadNameType", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.2.6": { d: "scvpNameErrorMixedNames", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.3": { d: "scvpBasicValAlg", c: "SCVP validation policy" },
  "1.3.6.1.5.5.7.19.3.1": { d: "scvpValErrorExpired", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.19.3.2": { d: "scvpValErrorNotYetValid", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.19.3.3": { d: "scvpValErrorWrongTrustAnchor", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.19.3.4": { d: "scvpValErrorNoValidCertPath", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.19.3.5": { d: "scvpValErrorRevoked", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.19.3.9": { d: "scvpValErrorInvalidKeyPurpose", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.19.3.10": { d: "scvpValErrorInvalidKeyUsage", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.19.3.11": { d: "scvpValErrorInvalidCertPolicy", c: "SCVP validation policy error" },
  "1.3.6.1.5.5.7.20": { d: "logo", c: "Qualified Certificate" },
  "1.3.6.1.5.5.7.20.1": { d: "logoLoyalty", c: "Qualified Certificate" },
  "1.3.6.1.5.5.7.20.2": { d: "logoBackground", c: "Qualified Certificate" },
  "1.3.6.1.5.5.7.48.1": { d: "ocsp", c: "PKIX OCSP" },
  "1.3.6.1.5.5.7.48.1.1": { d: "ocspBasic", c: "OCSP" },
  "1.3.6.1.5.5.7.48.1.2": { d: "ocspNonce", c: "OCSP" },
  "1.3.6.1.5.5.7.48.1.3": { d: "ocspCRL", c: "OCSP" },
  "1.3.6.1.5.5.7.48.1.4": { d: "ocspResponse", c: "OCSP" },
  "1.3.6.1.5.5.7.48.1.5": { d: "ocspNoCheck", c: "OCSP" },
  "1.3.6.1.5.5.7.48.1.6": { d: "ocspArchiveCutoff", c: "OCSP" },
  "1.3.6.1.5.5.7.48.1.7": { d: "ocspServiceLocator", c: "OCSP" },
  "1.3.6.1.5.5.7.48.2": { d: "caIssuers", c: "PKIX subject/authority info access descriptor" },
  "1.3.6.1.5.5.7.48.3": { d: "timeStamping", c: "PKIX subject/authority info access descriptor" },
  "1.3.6.1.5.5.7.48.4": { d: "dvcs", c: "PKIX subject/authority info access descriptor" },
  "1.3.6.1.5.5.7.48.5": { d: "caRepository", c: "PKIX subject/authority info access descriptor" },
  "1.3.6.1.5.5.7.48.7": { d: "signedObjectRepository", c: "PKIX subject/authority info access descriptor" },
  "1.3.6.1.5.5.7.48.10": { d: "rpkiManifest", c: "PKIX subject/authority info access descriptor" },
  "1.3.6.1.5.5.7.48.11": { d: "signedObject", c: "PKIX subject/authority info access descriptor" },
  "1.3.6.1.5.5.8.1.1": { d: "hmacMD5", c: "ISAKMP HMAC algorithm" },
  "1.3.6.1.5.5.8.1.2": { d: "hmacSHA", c: "ISAKMP HMAC algorithm" },
  "1.3.6.1.5.5.8.1.3": { d: "hmacTiger", c: "ISAKMP HMAC algorithm" },
  "1.3.6.1.5.5.8.2.2": { d: "iKEIntermediate", c: "IKE ???" },
  "1.3.12.2.1011.7.1": { d: "decEncryptionAlgorithm", c: "DASS algorithm" },
  "1.3.12.2.1011.7.1.2": { d: "decDEA", c: "DASS encryption algorithm" },
  "1.3.12.2.1011.7.2": { d: "decHashAlgorithm", c: "DASS algorithm" },
  "1.3.12.2.1011.7.2.1": { d: "decMD2", c: "DASS hash algorithm" },
  "1.3.12.2.1011.7.2.2": { d: "decMD4", c: "DASS hash algorithm" },
  "1.3.12.2.1011.7.3": { d: "decSignatureAlgorithm", c: "DASS algorithm" },
  "1.3.12.2.1011.7.3.1": { d: "decMD2withRSA", c: "DASS signature algorithm" },
  "1.3.12.2.1011.7.3.2": { d: "decMD4withRSA", c: "DASS signature algorithm" },
  "1.3.12.2.1011.7.3.3": { d: "decDEAMAC", c: "DASS signature algorithm" },
  "1.3.14.2.26.5": { d: "sha", c: "Unsure about this OID" },
  "1.3.14.3.2.1.1": { d: "rsa", c: "X.509. Unsure about this OID" },
  "1.3.14.3.2.2": { d: "md4WitRSA", c: "Oddball OIW OID" },
  "1.3.14.3.2.3": { d: "md5WithRSA", c: "Oddball OIW OID" },
  "1.3.14.3.2.4": { d: "md4WithRSAEncryption", c: "Oddball OIW OID" },
  "1.3.14.3.2.2.1": { d: "sqmod-N", c: "X.509. Deprecated", w: true },
  "1.3.14.3.2.3.1": { d: "sqmod-NwithRSA", c: "X.509. Deprecated", w: true },
  "1.3.14.3.2.6": { d: "desECB", c: "" },
  "1.3.14.3.2.7": { d: "desCBC", c: "" },
  "1.3.14.3.2.8": { d: "desOFB", c: "" },
  "1.3.14.3.2.9": { d: "desCFB", c: "" },
  "1.3.14.3.2.10": { d: "desMAC", c: "" },
  "1.3.14.3.2.11": { d: "rsaSignature", c: "ISO 9796-2, also X9.31 Part 1" },
  "1.3.14.3.2.12": {
    d: "dsa",
    c: "OIW?, supposedly from an incomplete version of SDN.701 (doesn't match final SDN.701)",
    w: true
  },
  "1.3.14.3.2.13": {
    d: "dsaWithSHA",
    c: "Oddball OIW OID.  Incorrectly used by JDK 1.1 in place of (1 3 14 3 2 27)",
    w: true
  },
  "1.3.14.3.2.14": { d: "mdc2WithRSASignature", c: "Oddball OIW OID using 9796-2 padding rules" },
  "1.3.14.3.2.15": { d: "shaWithRSASignature", c: "Oddball OIW OID using 9796-2 padding rules" },
  "1.3.14.3.2.16": { d: "dhWithCommonModulus", c: "Oddball OIW OID. Deprecated, use a plain DH OID instead", w: true },
  "1.3.14.3.2.17": { d: "desEDE", c: "Oddball OIW OID. Mode is ECB" },
  "1.3.14.3.2.18": { d: "sha", c: "Oddball OIW OID" },
  "1.3.14.3.2.19": { d: "mdc-2", c: "Oddball OIW OID, DES-based hash, planned for X9.31 Part 2" },
  "1.3.14.3.2.20": { d: "dsaCommon", c: "Oddball OIW OID.  Deprecated, use a plain DSA OID instead", w: true },
  "1.3.14.3.2.21": {
    d: "dsaCommonWithSHA",
    c: "Oddball OIW OID.  Deprecated, use a plain dsaWithSHA OID instead",
    w: true
  },
  "1.3.14.3.2.22": { d: "rsaKeyTransport", c: "Oddball OIW OID" },
  "1.3.14.3.2.23": { d: "keyed-hash-seal", c: "Oddball OIW OID" },
  "1.3.14.3.2.24": { d: "md2WithRSASignature", c: "Oddball OIW OID using 9796-2 padding rules" },
  "1.3.14.3.2.25": { d: "md5WithRSASignature", c: "Oddball OIW OID using 9796-2 padding rules" },
  "1.3.14.3.2.26": { d: "sha1", c: "OIW" },
  "1.3.14.3.2.27": { d: "dsaWithSHA1", c: "OIW. This OID may also be assigned as ripemd-160" },
  "1.3.14.3.2.28": { d: "dsaWithCommonSHA1", c: "OIW" },
  "1.3.14.3.2.29": { d: "sha-1WithRSAEncryption", c: "Oddball OIW OID" },
  "1.3.14.3.3.1": { d: "simple-strong-auth-mechanism", c: "Oddball OIW OID" },
  "1.3.14.7.2.1.1": { d: "ElGamal", c: "Unsure about this OID" },
  "1.3.14.7.2.3.1": { d: "md2WithRSA", c: "Unsure about this OID" },
  "1.3.14.7.2.3.2": { d: "md2WithElGamal", c: "Unsure about this OID" },
  "1.3.18.0.2.18.1": { d: "hostIDMapping", c: "IBM RACF ID mapping" },
  "1.3.27.16": { d: "icaoSecurity", c: "ICAO security" },
  "1.3.27.16.0": { d: "icaoSecurity", c: "ICAO security test?" },
  "1.3.27.16.0.1.1.1.1.1.1.0": { d: "icaoTestValidationPolicy", c: "ICAO security test?" },
  "1.3.27.16.1": { d: "icaoCertPolicy", c: "ICAO certificate policies" },
  "1.3.27.16.1.2": { d: "icaoIATFRootCA", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1": { d: "icaoIdentityAssurance", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.1": { d: "icaoIdentityAssuranceLow", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.2": { d: "icaoIdentityAssuranceLowDevice", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.3": { d: "icaoIdentityAssuranceLowTSPMediated", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.4": { d: "icaoIdentityAssuranceMedium", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.5": { d: "icaoIdentityAssuranceMediumDevice", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.6": { d: "icaoIdentityAssuranceMediumTSPMediated", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.7": { d: "icaoIdentityAssuranceMediumHardware", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.8": { d: "icaoIdentityAssuranceMediumDeviceHardware", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.9": { d: "icaoIdentityAssuranceHigh", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.10": { d: "icaoIdentityAssuranceHighCardAuth", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.0.1.11": { d: "icaoIdentityAssuranceHighContentSigning", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1": { d: "icaoIATFBridgeCA", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.0": { d: "icaoCAODRootCA", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.1": { d: "icaoCAODBridgeCA", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.1.1": { d: "icaoUSBridgeCA", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.1.1.1": { d: "icaoFAARootCA", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.1.1.1.1": { d: "icaoFAAIssuingCA", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.1.1.1.1.1": { d: "icaoFAAClientCertificate", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.1.1.1.1.2": { d: "icaoFAAServerCertificate", c: "ICAO certificate policies" },
  "1.3.27.16.1.2.1.1.1.1.1.3": { d: "icaoFAASWIMSigningCertificate", c: "ICAO certificate policies" },
  "1.3.27.16.1.4.1.1": { d: "icaoSWIMSigning", c: "ICAO extended key usage" },
  "1.3.36.1": { d: "document", c: "Teletrust document" },
  "1.3.36.1.1": { d: "finalVersion", c: "Teletrust document" },
  "1.3.36.1.2": { d: "draft", c: "Teletrust document" },
  "1.3.36.2": { d: "sio", c: "Teletrust sio" },
  "1.3.36.2.1": { d: "sedu", c: "Teletrust sio" },
  "1.3.36.3": { d: "algorithm", c: "Teletrust algorithm" },
  "1.3.36.3.1": { d: "encryptionAlgorithm", c: "Teletrust algorithm" },
  "1.3.36.3.1.1": { d: "des", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.1.1": { d: "desECB_pad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.1.1.1": { d: "desECB_ISOpad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.1.2.1": { d: "desCBC_pad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.1.2.1.1": { d: "desCBC_ISOpad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.3": { d: "des_3", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.3.1.1": { d: "des_3ECB_pad", c: "Teletrust encryption algorithm. EDE triple DES" },
  "1.3.36.3.1.3.1.1.1": { d: "des_3ECB_ISOpad", c: "Teletrust encryption algorithm. EDE triple DES" },
  "1.3.36.3.1.3.2.1": { d: "des_3CBC_pad", c: "Teletrust encryption algorithm. EDE triple DES" },
  "1.3.36.3.1.3.2.1.1": { d: "des_3CBC_ISOpad", c: "Teletrust encryption algorithm. EDE triple DES" },
  "1.3.36.3.1.2": { d: "idea", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.1": { d: "ideaECB", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.1.1": { d: "ideaECB_pad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.1.1.1": { d: "ideaECB_ISOpad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.2": { d: "ideaCBC", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.2.1": { d: "ideaCBC_pad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.2.1.1": { d: "ideaCBC_ISOpad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.3": { d: "ideaOFB", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.2.4": { d: "ideaCFB", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.4": { d: "rsaEncryption", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.4.512.17": { d: "rsaEncryptionWithlmod512expe17", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.5": { d: "bsi-1", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.5.1": { d: "bsi_1ECB_pad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.5.2": { d: "bsi_1CBC_pad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.1.5.2.1": { d: "bsi_1CBC_PEMpad", c: "Teletrust encryption algorithm" },
  "1.3.36.3.2": { d: "hashAlgorithm", c: "Teletrust algorithm" },
  "1.3.36.3.2.1": { d: "ripemd160", c: "Teletrust hash algorithm" },
  "1.3.36.3.2.2": { d: "ripemd128", c: "Teletrust hash algorithm" },
  "1.3.36.3.2.3": { d: "ripemd256", c: "Teletrust hash algorithm" },
  "1.3.36.3.2.4": { d: "mdc2singleLength", c: "Teletrust hash algorithm" },
  "1.3.36.3.2.5": { d: "mdc2doubleLength", c: "Teletrust hash algorithm" },
  "1.3.36.3.3": { d: "signatureAlgorithm", c: "Teletrust algorithm" },
  "1.3.36.3.3.1": { d: "rsaSignature", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.1.1": { d: "rsaSignatureWithsha1", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.1.1.1024.11": { d: "rsaSignatureWithsha1_l1024_l11", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.1.2": { d: "rsaSignatureWithripemd160", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.1.2.1024.11": { d: "rsaSignatureWithripemd160_l1024_l11", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.1.3": { d: "rsaSignatureWithrimpemd128", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.1.4": { d: "rsaSignatureWithrimpemd256", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.2": { d: "ecsieSign", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.2.1": { d: "ecsieSignWithsha1", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.2.2": { d: "ecsieSignWithripemd160", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.2.3": { d: "ecsieSignWithmd2", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.2.4": { d: "ecsieSignWithmd5", c: "Teletrust signature algorithm" },
  "1.3.36.3.3.2.8.1.1.1": { d: "brainpoolP160r1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.2": { d: "brainpoolP160t1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.3": { d: "brainpoolP192r1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.4": { d: "brainpoolP192t1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.5": { d: "brainpoolP224r1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.6": { d: "brainpoolP224t1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.7": { d: "brainpoolP256r1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.8": { d: "brainpoolP256t1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.9": { d: "brainpoolP320r1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.10": { d: "brainpoolP320t1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.11": { d: "brainpoolP384r1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.12": { d: "brainpoolP384t1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.13": { d: "brainpoolP512r1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.3.2.8.1.1.14": { d: "brainpoolP512t1", c: "ECC Brainpool Standard Curves and Curve Generation" },
  "1.3.36.3.4": { d: "signatureScheme", c: "Teletrust algorithm" },
  "1.3.36.3.4.1": { d: "sigS_ISO9796-1", c: "Teletrust signature scheme" },
  "1.3.36.3.4.2": { d: "sigS_ISO9796-2", c: "Teletrust signature scheme" },
  "1.3.36.3.4.2.1": { d: "sigS_ISO9796-2Withred", c: "Teletrust signature scheme. Unsure what this is supposed to be" },
  "1.3.36.3.4.2.2": { d: "sigS_ISO9796-2Withrsa", c: "Teletrust signature scheme. Unsure what this is supposed to be" },
  "1.3.36.3.4.2.3": {
    d: "sigS_ISO9796-2Withrnd",
    c: "Teletrust signature scheme. 9796-2 with random number in padding field"
  },
  "1.3.36.4": { d: "attribute", c: "Teletrust attribute" },
  "1.3.36.5": { d: "policy", c: "Teletrust policy" },
  "1.3.36.6": { d: "api", c: "Teletrust API" },
  "1.3.36.6.1": { d: "manufacturer-specific_api", c: "Teletrust API" },
  "1.3.36.6.1.1": { d: "utimaco-api", c: "Teletrust API" },
  "1.3.36.6.2": { d: "functionality-specific_api", c: "Teletrust API" },
  "1.3.36.7": { d: "keymgmnt", c: "Teletrust key management" },
  "1.3.36.7.1": { d: "keyagree", c: "Teletrust key management" },
  "1.3.36.7.1.1": { d: "bsiPKE", c: "Teletrust key management" },
  "1.3.36.7.2": { d: "keytrans", c: "Teletrust key management" },
  "1.3.36.7.2.1": { d: "encISO9796-2Withrsa", c: "Teletrust key management. 9796-2 with key stored in hash field" },
  "1.3.36.8.1.1": { d: "Teletrust SigGConform policyIdentifier", c: "Teletrust policy" },
  "1.3.36.8.2.1": { d: "directoryService", c: "Teletrust extended key usage" },
  "1.3.36.8.3.1": { d: "dateOfCertGen", c: "Teletrust attribute" },
  "1.3.36.8.3.2": { d: "procuration", c: "Teletrust attribute" },
  "1.3.36.8.3.3": { d: "admission", c: "Teletrust attribute" },
  "1.3.36.8.3.4": { d: "monetaryLimit", c: "Teletrust attribute" },
  "1.3.36.8.3.5": { d: "declarationOfMajority", c: "Teletrust attribute" },
  "1.3.36.8.3.6": { d: "integratedCircuitCardSerialNumber", c: "Teletrust attribute" },
  "1.3.36.8.3.7": { d: "pKReference", c: "Teletrust attribute" },
  "1.3.36.8.3.8": { d: "restriction", c: "Teletrust attribute" },
  "1.3.36.8.3.9": { d: "retrieveIfAllowed", c: "Teletrust attribute" },
  "1.3.36.8.3.10": { d: "requestedCertificate", c: "Teletrust attribute" },
  "1.3.36.8.3.11": { d: "namingAuthorities", c: "Teletrust attribute" },
  "1.3.36.8.3.11.1": { d: "rechtWirtschaftSteuern", c: "Teletrust naming authorities" },
  "1.3.36.8.3.11.1.1": { d: "rechtsanwaeltin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.2": { d: "rechtsanwalt", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.3": { d: "rechtsBeistand", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.4": { d: "steuerBeraterin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.5": { d: "steuerBerater", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.6": { d: "steuerBevollmaechtigte", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.7": { d: "steuerBevollmaechtigter", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.8": { d: "notarin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.9": { d: "notar", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.10": { d: "notarVertreterin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.11": { d: "notarVertreter", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.12": { d: "notariatsVerwalterin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.13": { d: "notariatsVerwalter", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.14": { d: "wirtschaftsPrueferin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.15": { d: "wirtschaftsPruefer", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.16": { d: "vereidigteBuchprueferin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.17": { d: "vereidigterBuchpruefer", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.18": { d: "patentAnwaeltin", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.11.1.19": { d: "patentAnwalt", c: "Teletrust ProfessionInfo" },
  "1.3.36.8.3.12": { d: "certInDirSince", c: "Teletrust OCSP attribute (obsolete)", w: true },
  "1.3.36.8.3.13": { d: "certHash", c: "Teletrust OCSP attribute" },
  "1.3.36.8.3.14": { d: "nameAtBirth", c: "Teletrust attribute" },
  "1.3.36.8.3.15": { d: "additionalInformation", c: "Teletrust attribute" },
  "1.3.36.8.4.1": { d: "personalData", c: "Teletrust OtherName attribute" },
  "1.3.36.8.4.8": { d: "restriction", c: "Teletrust attribute certificate attribute" },
  "1.3.36.8.5.1.1.1": { d: "rsaIndicateSHA1", c: "Teletrust signature algorithm" },
  "1.3.36.8.5.1.1.2": { d: "rsaIndicateRIPEMD160", c: "Teletrust signature algorithm" },
  "1.3.36.8.5.1.1.3": { d: "rsaWithSHA1", c: "Teletrust signature algorithm" },
  "1.3.36.8.5.1.1.4": { d: "rsaWithRIPEMD160", c: "Teletrust signature algorithm" },
  "1.3.36.8.5.1.2.1": { d: "dsaExtended", c: "Teletrust signature algorithm" },
  "1.3.36.8.5.1.2.2": { d: "dsaWithRIPEMD160", c: "Teletrust signature algorithm" },
  "1.3.36.8.6.1": { d: "cert", c: "Teletrust signature attributes" },
  "1.3.36.8.6.2": { d: "certRef", c: "Teletrust signature attributes" },
  "1.3.36.8.6.3": { d: "attrCert", c: "Teletrust signature attributes" },
  "1.3.36.8.6.4": { d: "attrRef", c: "Teletrust signature attributes" },
  "1.3.36.8.6.5": { d: "fileName", c: "Teletrust signature attributes" },
  "1.3.36.8.6.6": { d: "storageTime", c: "Teletrust signature attributes" },
  "1.3.36.8.6.7": { d: "fileSize", c: "Teletrust signature attributes" },
  "1.3.36.8.6.8": { d: "location", c: "Teletrust signature attributes" },
  "1.3.36.8.6.9": { d: "sigNumber", c: "Teletrust signature attributes" },
  "1.3.36.8.6.10": { d: "autoGen", c: "Teletrust signature attributes" },
  "1.3.36.8.7.1.1": { d: "ptAdobeILL", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.2": { d: "ptAmiPro", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.3": { d: "ptAutoCAD", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.4": { d: "ptBinary", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.5": { d: "ptBMP", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.6": { d: "ptCGM", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.7": { d: "ptCorelCRT", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.8": { d: "ptCorelDRW", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.9": { d: "ptCorelEXC", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.10": { d: "ptCorelPHT", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.11": { d: "ptDraw", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.12": { d: "ptDVI", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.13": { d: "ptEPS", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.14": { d: "ptExcel", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.15": { d: "ptGEM", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.16": { d: "ptGIF", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.17": { d: "ptHPGL", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.18": { d: "ptJPEG", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.19": { d: "ptKodak", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.20": { d: "ptLaTeX", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.21": { d: "ptLotus", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.22": { d: "ptLotusPIC", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.23": { d: "ptMacPICT", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.24": { d: "ptMacWord", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.25": { d: "ptMSWfD", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.26": { d: "ptMSWord", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.27": { d: "ptMSWord2", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.28": { d: "ptMSWord6", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.29": { d: "ptMSWord8", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.30": { d: "ptPDF", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.31": { d: "ptPIF", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.32": { d: "ptPostscript", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.33": { d: "ptRTF", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.34": { d: "ptSCITEX", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.35": { d: "ptTAR", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.36": { d: "ptTarga", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.37": { d: "ptTeX", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.38": { d: "ptText", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.39": { d: "ptTIFF", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.40": { d: "ptTIFF-FC", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.41": { d: "ptUID", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.42": { d: "ptUUEncode", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.43": { d: "ptWMF", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.44": { d: "ptWordPerfect", c: "Teletrust presentation types" },
  "1.3.36.8.7.1.45": { d: "ptWPGrph", c: "Teletrust presentation types" },
  "1.3.101.1.4": { d: "thawte-ce", c: "Thawte" },
  "1.3.101.1.4.1": { d: "strongExtranet", c: "Thawte certificate extension" },
  "1.3.101.110": { d: "curveX25519", c: "ECDH 25519 key agreement algorithm" },
  "1.3.101.111": { d: "curveX448", c: "ECDH 448 key agreement algorithm" },
  "1.3.101.112": { d: "curveEd25519", c: "EdDSA 25519 signature algorithm" },
  "1.3.101.113": { d: "curveEd448", c: "EdDSA 448 signature algorithm" },
  "1.3.101.114": { d: "curveEd25519ph", c: "EdDSA 25519 pre-hash signature algorithm" },
  "1.3.101.115": { d: "curveEd448ph", c: "EdDSA 448 pre-hash signature algorithm" },
  "1.3.132.0.1": { d: "sect163k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.2": { d: "sect163r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.3": { d: "sect239k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.4": { d: "sect113r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.5": { d: "sect113r2", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.6": { d: "secp112r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.7": { d: "secp112r2", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.8": { d: "secp160r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.9": { d: "secp160k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.10": { d: "secp256k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.15": { d: "sect163r2", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.16": { d: "sect283k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.17": { d: "sect283r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.22": { d: "sect131r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.23": { d: "sect131r2", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.24": { d: "sect193r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.25": { d: "sect193r2", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.26": { d: "sect233k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.27": { d: "sect233r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.28": { d: "secp128r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.29": { d: "secp128r2", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.30": { d: "secp160r2", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.31": { d: "secp192k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.32": { d: "secp224k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.33": { d: "secp224r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.34": { d: "secp384r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.35": { d: "secp521r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.36": { d: "sect409k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.37": { d: "sect409r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.38": { d: "sect571k1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.0.39": { d: "sect571r1", c: "SECG (Certicom) named elliptic curve" },
  "1.3.132.1.11.0": { d: "ecdhX963KDF-SHA224", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.11.1": { d: "ecdhX963KDF-SHA256", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.11.2": { d: "ecdhX963KDF-SHA384", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.11.3": { d: "ecdhX963KDF-SHA512", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.14.0": { d: "eccofactordhX963KDF-SHA224", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.14.1": { d: "eccofactordhX963KDF-SHA256", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.14.2": { d: "eccofactordhX963KDF-SHA384", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.14.3": { d: "eccofactordhX963KDF-SHA512", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.15.0": { d: "ecmqv-X963KDF-SHA224", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.15.1": { d: "ecmqv-X963KDF-SHA256", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.15.2": { d: "ecmqv-X963KDF-SHA384", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.132.1.15.3": { d: "ecmqv-X963KDF-SHA512", c: "SECG (Certicom) elliptic curve key agreement" },
  "1.3.133.16.840.9.44": { d: "x944", c: "X9.44" },
  "1.3.133.16.840.9.44.1": { d: "x944Components", c: "X9.44" },
  "1.3.133.16.840.9.44.1.1": { d: "x944Kdf2", c: "X9.44" },
  "1.3.133.16.840.9.44.1.2": { d: "x944Kdf3", c: "X9.44" },
  "1.3.133.16.840.9.84": { d: "x984", c: "X9.84" },
  "1.3.133.16.840.9.84.0": { d: "x984Module", c: "X9.84" },
  "1.3.133.16.840.9.84.0.1": { d: "x984Biometrics", c: "X9.84 Module" },
  "1.3.133.16.840.9.84.0.2": { d: "x984CMS", c: "X9.84 Module" },
  "1.3.133.16.840.9.84.0.3": { d: "x984Identifiers", c: "X9.84 Module" },
  "1.3.133.16.840.9.84.1": { d: "x984Biometric", c: "X9.84" },
  "1.3.133.16.840.9.84.1.0": { d: "biometricUnknownType", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.1": { d: "biometricBodyOdor", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.2": { d: "biometricDNA", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.3": { d: "biometricEarShape", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.4": { d: "biometricFacialFeatures", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.5": { d: "biometricFingerImage", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.6": { d: "biometricFingerGeometry", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.7": { d: "biometricHandGeometry", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.8": { d: "biometricIrisFeatures", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.9": { d: "biometricKeystrokeDynamics", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.10": { d: "biometricPalm", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.11": { d: "biometricRetina", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.12": { d: "biometricSignature", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.13": { d: "biometricSpeechPattern", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.14": { d: "biometricThermalImage", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.15": { d: "biometricVeinPattern", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.16": { d: "biometricThermalFaceImage", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.17": { d: "biometricThermalHandImage", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.18": { d: "biometricLipMovement", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.1.19": { d: "biometricGait", c: "X9.84 Biometric" },
  "1.3.133.16.840.9.84.3": { d: "x984MatchingMethod", c: "X9.84" },
  "1.3.133.16.840.9.84.4": { d: "x984FormatOwner", c: "X9.84" },
  "1.3.133.16.840.9.84.4.0": { d: "x984CbeffOwner", c: "X9.84 Format Owner" },
  "1.3.133.16.840.9.84.4.1": { d: "x984IbiaOwner", c: "X9.84 Format Owner" },
  "1.3.133.16.840.9.84.4.1.1": { d: "ibiaOwnerSAFLINK", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.2": { d: "ibiaOwnerBioscrypt", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.3": { d: "ibiaOwnerVisionics", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.4": { d: "ibiaOwnerInfineonTechnologiesAG", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.5": { d: "ibiaOwnerIridianTechnologies", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.6": { d: "ibiaOwnerVeridicom", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.7": { d: "ibiaOwnerCyberSIGN", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.8": { d: "ibiaOwnereCryp", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.9": { d: "ibiaOwnerFingerprintCardsAB", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.10": { d: "ibiaOwnerSecuGen", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.11": { d: "ibiaOwnerPreciseBiometric", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.12": { d: "ibiaOwnerIdentix", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.13": { d: "ibiaOwnerDERMALOG", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.14": { d: "ibiaOwnerLOGICO", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.15": { d: "ibiaOwnerNIST", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.16": { d: "ibiaOwnerA3Vision", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.17": { d: "ibiaOwnerNEC", c: "X9.84 IBIA Format Owner" },
  "1.3.133.16.840.9.84.4.1.18": { d: "ibiaOwnerSTMicroelectronics", c: "X9.84 IBIA Format Owner" },
  "1.3.158.36061701.0.0.0.1.2.2": { d: "qcpSK", c: "Slovakia Qualified Electronic Signature policies" },
  "2.5.4.0": { d: "objectClass", c: "X.520 DN component" },
  "2.5.4.1": { d: "aliasedEntryName", c: "X.520 DN component" },
  "2.5.4.2": { d: "knowledgeInformation", c: "X.520 DN component" },
  "2.5.4.3": { d: "commonName", c: "X.520 DN component" },
  "2.5.4.4": { d: "surname", c: "X.520 DN component" },
  "2.5.4.5": { d: "serialNumber", c: "X.520 DN component" },
  "2.5.4.6": { d: "countryName", c: "X.520 DN component" },
  "2.5.4.7": { d: "localityName", c: "X.520 DN component" },
  "2.5.4.7.1": { d: "collectiveLocalityName", c: "X.520 DN component" },
  "2.5.4.8": { d: "stateOrProvinceName", c: "X.520 DN component" },
  "2.5.4.8.1": { d: "collectiveStateOrProvinceName", c: "X.520 DN component" },
  "2.5.4.9": { d: "streetAddress", c: "X.520 DN component" },
  "2.5.4.9.1": { d: "collectiveStreetAddress", c: "X.520 DN component" },
  "2.5.4.10": { d: "organizationName", c: "X.520 DN component" },
  "2.5.4.10.1": { d: "collectiveOrganizationName", c: "X.520 DN component" },
  "2.5.4.11": { d: "organizationalUnitName", c: "X.520 DN component" },
  "2.5.4.11.1": { d: "collectiveOrganizationalUnitName", c: "X.520 DN component" },
  "2.5.4.12": { d: "title", c: "X.520 DN component" },
  "2.5.4.13": { d: "description", c: "X.520 DN component" },
  "2.5.4.14": { d: "searchGuide", c: "X.520 DN component" },
  "2.5.4.15": { d: "businessCategory", c: "X.520 DN component" },
  "2.5.4.16": { d: "postalAddress", c: "X.520 DN component" },
  "2.5.4.16.1": { d: "collectivePostalAddress", c: "X.520 DN component" },
  "2.5.4.17": { d: "postalCode", c: "X.520 DN component" },
  "2.5.4.17.1": { d: "collectivePostalCode", c: "X.520 DN component" },
  "2.5.4.18": { d: "postOfficeBox", c: "X.520 DN component" },
  "2.5.4.18.1": { d: "collectivePostOfficeBox", c: "X.520 DN component" },
  "2.5.4.19": { d: "physicalDeliveryOfficeName", c: "X.520 DN component" },
  "2.5.4.19.1": { d: "collectivePhysicalDeliveryOfficeName", c: "X.520 DN component" },
  "2.5.4.20": { d: "telephoneNumber", c: "X.520 DN component" },
  "2.5.4.20.1": { d: "collectiveTelephoneNumber", c: "X.520 DN component" },
  "2.5.4.21": { d: "telexNumber", c: "X.520 DN component" },
  "2.5.4.21.1": { d: "collectiveTelexNumber", c: "X.520 DN component" },
  "2.5.4.22": { d: "teletexTerminalIdentifier", c: "X.520 DN component" },
  "2.5.4.22.1": { d: "collectiveTeletexTerminalIdentifier", c: "X.520 DN component" },
  "2.5.4.23": { d: "facsimileTelephoneNumber", c: "X.520 DN component" },
  "2.5.4.23.1": { d: "collectiveFacsimileTelephoneNumber", c: "X.520 DN component" },
  "2.5.4.24": { d: "x121Address", c: "X.520 DN component" },
  "2.5.4.25": { d: "internationalISDNNumber", c: "X.520 DN component" },
  "2.5.4.25.1": { d: "collectiveInternationalISDNNumber", c: "X.520 DN component" },
  "2.5.4.26": { d: "registeredAddress", c: "X.520 DN component" },
  "2.5.4.27": { d: "destinationIndicator", c: "X.520 DN component" },
  "2.5.4.28": { d: "preferredDeliveryMehtod", c: "X.520 DN component" },
  "2.5.4.29": { d: "presentationAddress", c: "X.520 DN component" },
  "2.5.4.30": { d: "supportedApplicationContext", c: "X.520 DN component" },
  "2.5.4.31": { d: "member", c: "X.520 DN component" },
  "2.5.4.32": { d: "owner", c: "X.520 DN component" },
  "2.5.4.33": { d: "roleOccupant", c: "X.520 DN component" },
  "2.5.4.34": { d: "seeAlso", c: "X.520 DN component" },
  "2.5.4.35": { d: "userPassword", c: "X.520 DN component" },
  "2.5.4.36": { d: "userCertificate", c: "X.520 DN component" },
  "2.5.4.37": { d: "caCertificate", c: "X.520 DN component" },
  "2.5.4.38": { d: "authorityRevocationList", c: "X.520 DN component" },
  "2.5.4.39": { d: "certificateRevocationList", c: "X.520 DN component" },
  "2.5.4.40": { d: "crossCertificatePair", c: "X.520 DN component" },
  "2.5.4.41": { d: "name", c: "X.520 DN component" },
  "2.5.4.42": { d: "givenName", c: "X.520 DN component" },
  "2.5.4.43": { d: "initials", c: "X.520 DN component" },
  "2.5.4.44": { d: "generationQualifier", c: "X.520 DN component" },
  "2.5.4.45": { d: "uniqueIdentifier", c: "X.520 DN component" },
  "2.5.4.46": { d: "dnQualifier", c: "X.520 DN component" },
  "2.5.4.47": { d: "enhancedSearchGuide", c: "X.520 DN component" },
  "2.5.4.48": { d: "protocolInformation", c: "X.520 DN component" },
  "2.5.4.49": { d: "distinguishedName", c: "X.520 DN component" },
  "2.5.4.50": { d: "uniqueMember", c: "X.520 DN component" },
  "2.5.4.51": { d: "houseIdentifier", c: "X.520 DN component" },
  "2.5.4.52": { d: "supportedAlgorithms", c: "X.520 DN component" },
  "2.5.4.53": { d: "deltaRevocationList", c: "X.520 DN component" },
  "2.5.4.54": { d: "dmdName", c: "X.520 DN component" },
  "2.5.4.55": { d: "clearance", c: "X.520 DN component" },
  "2.5.4.56": { d: "defaultDirQop", c: "X.520 DN component" },
  "2.5.4.57": { d: "attributeIntegrityInfo", c: "X.520 DN component" },
  "2.5.4.58": { d: "attributeCertificate", c: "X.520 DN component" },
  "2.5.4.59": { d: "attributeCertificateRevocationList", c: "X.520 DN component" },
  "2.5.4.60": { d: "confKeyInfo", c: "X.520 DN component" },
  "2.5.4.61": { d: "aACertificate", c: "X.520 DN component" },
  "2.5.4.62": { d: "attributeDescriptorCertificate", c: "X.520 DN component" },
  "2.5.4.63": { d: "attributeAuthorityRevocationList", c: "X.520 DN component" },
  "2.5.4.64": { d: "familyInformation", c: "X.520 DN component" },
  "2.5.4.65": { d: "pseudonym", c: "X.520 DN component" },
  "2.5.4.66": { d: "communicationsService", c: "X.520 DN component" },
  "2.5.4.67": { d: "communicationsNetwork", c: "X.520 DN component" },
  "2.5.4.68": { d: "certificationPracticeStmt", c: "X.520 DN component" },
  "2.5.4.69": { d: "certificatePolicy", c: "X.520 DN component" },
  "2.5.4.70": { d: "pkiPath", c: "X.520 DN component" },
  "2.5.4.71": { d: "privPolicy", c: "X.520 DN component" },
  "2.5.4.72": { d: "role", c: "X.520 DN component" },
  "2.5.4.73": { d: "delegationPath", c: "X.520 DN component" },
  "2.5.4.74": { d: "protPrivPolicy", c: "X.520 DN component" },
  "2.5.4.75": { d: "xMLPrivilegeInfo", c: "X.520 DN component" },
  "2.5.4.76": { d: "xmlPrivPolicy", c: "X.520 DN component" },
  "2.5.4.77": { d: "uuidpair", c: "X.520 DN component" },
  "2.5.4.78": { d: "tagOid", c: "X.520 DN component" },
  "2.5.4.79": { d: "uiiFormat", c: "X.520 DN component" },
  "2.5.4.80": { d: "uiiInUrh", c: "X.520 DN component" },
  "2.5.4.81": { d: "contentUrl", c: "X.520 DN component" },
  "2.5.4.82": { d: "permission", c: "X.520 DN component" },
  "2.5.4.83": { d: "uri", c: "X.520 DN component" },
  "2.5.4.84": { d: "pwdAttribute", c: "X.520 DN component" },
  "2.5.4.85": { d: "userPwd", c: "X.520 DN component" },
  "2.5.4.86": { d: "urn", c: "X.520 DN component" },
  "2.5.4.87": { d: "url", c: "X.520 DN component" },
  "2.5.4.88": { d: "utmCoordinates", c: "X.520 DN component" },
  "2.5.4.89": { d: "urnC", c: "X.520 DN component" },
  "2.5.4.90": { d: "uii", c: "X.520 DN component" },
  "2.5.4.91": { d: "epc", c: "X.520 DN component" },
  "2.5.4.92": { d: "tagAfi", c: "X.520 DN component" },
  "2.5.4.93": { d: "epcFormat", c: "X.520 DN component" },
  "2.5.4.94": { d: "epcInUrn", c: "X.520 DN component" },
  "2.5.4.95": { d: "ldapUrl", c: "X.520 DN component" },
  "2.5.4.96": { d: "tagLocation", c: "X.520 DN component" },
  "2.5.4.97": { d: "organizationIdentifier", c: "X.520 DN component" },
  "2.5.4.98": { d: "countryCode3c", c: "X.520 DN component" },
  "2.5.4.99": { d: "countryCode3n", c: "X.520 DN component" },
  "2.5.4.100": { d: "dnsName", c: "X.520 DN component" },
  "2.5.4.101": { d: "eepkCertificateRevocationList", c: "X.520 DN component" },
  "2.5.4.102": { d: "eeAttrCertificateRevocationList", c: "X.520 DN component" },
  "2.5.4.103": { d: "supportedPublicKeyAlgorithms", c: "X.520 DN component" },
  "2.5.4.104": { d: "intEmail", c: "X.520 DN component" },
  "2.5.4.105": { d: "jid", c: "X.520 DN component" },
  "2.5.4.106": { d: "objectIdentifier", c: "X.520 DN component" },
  "2.5.6.0": { d: "top", c: "X.520 objectClass" },
  "2.5.6.1": { d: "alias", c: "X.520 objectClass" },
  "2.5.6.2": { d: "country", c: "X.520 objectClass" },
  "2.5.6.3": { d: "locality", c: "X.520 objectClass" },
  "2.5.6.4": { d: "organization", c: "X.520 objectClass" },
  "2.5.6.5": { d: "organizationalUnit", c: "X.520 objectClass" },
  "2.5.6.6": { d: "person", c: "X.520 objectClass" },
  "2.5.6.7": { d: "organizationalPerson", c: "X.520 objectClass" },
  "2.5.6.8": { d: "organizationalRole", c: "X.520 objectClass" },
  "2.5.6.9": { d: "groupOfNames", c: "X.520 objectClass" },
  "2.5.6.10": { d: "residentialPerson", c: "X.520 objectClass" },
  "2.5.6.11": { d: "applicationProcess", c: "X.520 objectClass" },
  "2.5.6.12": { d: "applicationEntity", c: "X.520 objectClass" },
  "2.5.6.13": { d: "dSA", c: "X.520 objectClass" },
  "2.5.6.14": { d: "device", c: "X.520 objectClass" },
  "2.5.6.15": { d: "strongAuthenticationUser", c: "X.520 objectClass" },
  "2.5.6.16": { d: "certificateAuthority", c: "X.520 objectClass" },
  "2.5.6.17": { d: "groupOfUniqueNames", c: "X.520 objectClass" },
  "2.5.6.21": { d: "pkiUser", c: "X.520 objectClass" },
  "2.5.6.22": { d: "pkiCA", c: "X.520 objectClass" },
  "2.5.8.1.1": { d: "rsa", c: "X.500 algorithms.  Ambiguous, since no padding rules specified", w: true },
  "2.5.29.1": { d: "authorityKeyIdentifier", c: "X.509 extension.  Deprecated, use 2 5 29 35 instead", w: true },
  "2.5.29.2": { d: "keyAttributes", c: "X.509 extension.  Obsolete, use keyUsage/extKeyUsage instead", w: true },
  "2.5.29.3": { d: "certificatePolicies", c: "X.509 extension.  Deprecated, use 2 5 29 32 instead", w: true },
  "2.5.29.4": { d: "keyUsageRestriction", c: "X.509 extension.  Obsolete, use keyUsage/extKeyUsage instead", w: true },
  "2.5.29.5": { d: "policyMapping", c: "X.509 extension.  Deprecated, use 2 5 29 33 instead", w: true },
  "2.5.29.6": { d: "subtreesConstraint", c: "X.509 extension.  Obsolete, use nameConstraints instead", w: true },
  "2.5.29.7": { d: "subjectAltName", c: "X.509 extension.  Deprecated, use 2 5 29 17 instead", w: true },
  "2.5.29.8": { d: "issuerAltName", c: "X.509 extension.  Deprecated, use 2 5 29 18 instead", w: true },
  "2.5.29.9": { d: "subjectDirectoryAttributes", c: "X.509 extension" },
  "2.5.29.10": { d: "basicConstraints", c: "X.509 extension.  Deprecated, use 2 5 29 19 instead", w: true },
  "2.5.29.11": { d: "nameConstraints", c: "X.509 extension.  Deprecated, use 2 5 29 30 instead", w: true },
  "2.5.29.12": { d: "policyConstraints", c: "X.509 extension.  Deprecated, use 2 5 29 36 instead", w: true },
  "2.5.29.13": { d: "basicConstraints", c: "X.509 extension.  Deprecated, use 2 5 29 19 instead", w: true },
  "2.5.29.14": { d: "subjectKeyIdentifier", c: "X.509 extension" },
  "2.5.29.15": { d: "keyUsage", c: "X.509 extension" },
  "2.5.29.16": { d: "privateKeyUsagePeriod", c: "X.509 extension" },
  "2.5.29.17": { d: "subjectAltName", c: "X.509 extension" },
  "2.5.29.18": { d: "issuerAltName", c: "X.509 extension" },
  "2.5.29.19": { d: "basicConstraints", c: "X.509 extension" },
  "2.5.29.20": { d: "cRLNumber", c: "X.509 extension" },
  "2.5.29.21": { d: "cRLReason", c: "X.509 extension" },
  "2.5.29.22": { d: "expirationDate", c: "X.509 extension.  Deprecated, alternative OID uncertain", w: true },
  "2.5.29.23": { d: "instructionCode", c: "X.509 extension" },
  "2.5.29.24": { d: "invalidityDate", c: "X.509 extension" },
  "2.5.29.25": { d: "cRLDistributionPoints", c: "X.509 extension.  Deprecated, use 2 5 29 31 instead", w: true },
  "2.5.29.26": { d: "issuingDistributionPoint", c: "X.509 extension.  Deprecated, use 2 5 29 28 instead", w: true },
  "2.5.29.27": { d: "deltaCRLIndicator", c: "X.509 extension" },
  "2.5.29.28": { d: "issuingDistributionPoint", c: "X.509 extension" },
  "2.5.29.29": { d: "certificateIssuer", c: "X.509 extension" },
  "2.5.29.30": { d: "nameConstraints", c: "X.509 extension" },
  "2.5.29.31": { d: "cRLDistributionPoints", c: "X.509 extension" },
  "2.5.29.32": { d: "certificatePolicies", c: "X.509 extension" },
  "2.5.29.32.0": { d: "anyPolicy", c: "X.509 certificate policy" },
  "2.5.29.33": { d: "policyMappings", c: "X.509 extension" },
  "2.5.29.34": { d: "policyConstraints", c: "X.509 extension.  Deprecated, use 2 5 29 36 instead", w: true },
  "2.5.29.35": { d: "authorityKeyIdentifier", c: "X.509 extension" },
  "2.5.29.36": { d: "policyConstraints", c: "X.509 extension" },
  "2.5.29.37": { d: "extKeyUsage", c: "X.509 extension" },
  "2.5.29.37.0": { d: "anyExtendedKeyUsage", c: "X.509 extended key usage" },
  "2.5.29.38": { d: "authorityAttributeIdentifier", c: "X.509 extension" },
  "2.5.29.39": { d: "roleSpecCertIdentifier", c: "X.509 extension" },
  "2.5.29.40": { d: "cRLStreamIdentifier", c: "X.509 extension" },
  "2.5.29.41": { d: "basicAttConstraints", c: "X.509 extension" },
  "2.5.29.42": { d: "delegatedNameConstraints", c: "X.509 extension" },
  "2.5.29.43": { d: "timeSpecification", c: "X.509 extension" },
  "2.5.29.44": { d: "cRLScope", c: "X.509 extension" },
  "2.5.29.45": { d: "statusReferrals", c: "X.509 extension" },
  "2.5.29.46": { d: "freshestCRL", c: "X.509 extension" },
  "2.5.29.47": { d: "orderedList", c: "X.509 extension" },
  "2.5.29.48": { d: "attributeDescriptor", c: "X.509 extension" },
  "2.5.29.49": { d: "userNotice", c: "X.509 extension" },
  "2.5.29.50": { d: "sOAIdentifier", c: "X.509 extension" },
  "2.5.29.51": { d: "baseUpdateTime", c: "X.509 extension" },
  "2.5.29.52": { d: "acceptableCertPolicies", c: "X.509 extension" },
  "2.5.29.53": { d: "deltaInfo", c: "X.509 extension" },
  "2.5.29.54": { d: "inhibitAnyPolicy", c: "X.509 extension" },
  "2.5.29.55": { d: "targetInformation", c: "X.509 extension" },
  "2.5.29.56": { d: "noRevAvail", c: "X.509 extension" },
  "2.5.29.57": { d: "acceptablePrivilegePolicies", c: "X.509 extension" },
  "2.5.29.58": { d: "toBeRevoked", c: "X.509 extension" },
  "2.5.29.59": { d: "revokedGroups", c: "X.509 extension" },
  "2.5.29.60": { d: "expiredCertsOnCRL", c: "X.509 extension" },
  "2.5.29.61": { d: "indirectIssuer", c: "X.509 extension" },
  "2.5.29.62": { d: "noAssertion", c: "X.509 extension" },
  "2.5.29.63": { d: "aAissuingDistributionPoint", c: "X.509 extension" },
  "2.5.29.64": { d: "issuedOnBehalfOf", c: "X.509 extension" },
  "2.5.29.65": { d: "singleUse", c: "X.509 extension" },
  "2.5.29.66": { d: "groupAC", c: "X.509 extension" },
  "2.5.29.67": { d: "allowedAttAss", c: "X.509 extension" },
  "2.5.29.68": { d: "attributeMappings", c: "X.509 extension" },
  "2.5.29.69": { d: "holderNameConstraints", c: "X.509 extension" },
  "2.16.578.1.26.1.3.1": { d: "privateKeySmartCard", c: "Norway Buypass CA policy" },
  "2.16.578.1.26.1.3.2": { d: "privateKeySoftToken", c: "Norway Buypass CA policy" },
  "2.16.578.1.26.1.3.3": { d: "sslEvident.  Also assigned as BuyPass EV policy", c: "Norway Buypass CA policy" },
  "2.16.578.1.26.1.3.4": { d: "sslBusinessPlus", c: "Norway Buypass CA policy" },
  "2.16.578.1.26.1.3.5": { d: "privateKeyHardToken", c: "Norway Buypass CA policy" },
  "2.16.578.1.26.1.3.6": { d: "privateKeyHSM", c: "Norway Buypass CA policy" },
  "2.16.724.1.2.2.4.1": { d: "personalDataInfo", c: "Spanish Government PKI?" },
  "2.16.840.1.101.2.1.1.1": { d: "sdnsSignatureAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.2": {
    d: "fortezzaSignatureAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicSignatureAlgorithm, this OID is better known as dsaWithSHA-1."
  },
  "2.16.840.1.101.2.1.1.3": { d: "sdnsConfidentialityAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.4": {
    d: "fortezzaConfidentialityAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicConfidentialityAlgorithm"
  },
  "2.16.840.1.101.2.1.1.5": { d: "sdnsIntegrityAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.6": {
    d: "fortezzaIntegrityAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicIntegrityAlgorithm"
  },
  "2.16.840.1.101.2.1.1.7": { d: "sdnsTokenProtectionAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.8": {
    d: "fortezzaTokenProtectionAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly know as mosaicTokenProtectionAlgorithm"
  },
  "2.16.840.1.101.2.1.1.9": { d: "sdnsKeyManagementAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.10": {
    d: "fortezzaKeyManagementAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicKeyManagementAlgorithm"
  },
  "2.16.840.1.101.2.1.1.11": { d: "sdnsKMandSigAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.12": {
    d: "fortezzaKMandSigAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicKMandSigAlgorithm"
  },
  "2.16.840.1.101.2.1.1.13": { d: "suiteASignatureAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.14": { d: "suiteAConfidentialityAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.15": { d: "suiteAIntegrityAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.16": { d: "suiteATokenProtectionAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.17": { d: "suiteAKeyManagementAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.18": { d: "suiteAKMandSigAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.19": {
    d: "fortezzaUpdatedSigAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicUpdatedSigAlgorithm"
  },
  "2.16.840.1.101.2.1.1.20": {
    d: "fortezzaKMandUpdSigAlgorithms",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicKMandUpdSigAlgorithms"
  },
  "2.16.840.1.101.2.1.1.21": {
    d: "fortezzaUpdatedIntegAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicUpdatedIntegAlgorithm"
  },
  "2.16.840.1.101.2.1.1.22": {
    d: "keyExchangeAlgorithm",
    c: "SDN.700 INFOSEC algorithms.  Formerly known as mosaicKeyEncryptionAlgorithm"
  },
  "2.16.840.1.101.2.1.1.23": { d: "fortezzaWrap80Algorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.1.24": { d: "kEAKeyEncryptionAlgorithm", c: "SDN.700 INFOSEC algorithms" },
  "2.16.840.1.101.2.1.2.1": { d: "rfc822MessageFormat", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.2": { d: "emptyContent", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.3": { d: "cspContentType", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.42": { d: "mspRev3ContentType", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.48": { d: "mspContentType", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.49": { d: "mspRekeyAgentProtocol", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.50": { d: "mspMMP", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.66": { d: "mspRev3-1ContentType", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.72": { d: "forwardedMSPMessageBodyPart", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.73": { d: "mspForwardedMessageParameters", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.74": { d: "forwardedCSPMsgBodyPart", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.75": { d: "cspForwardedMessageParameters", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.76": { d: "mspMMP2", c: "SDN.700 INFOSEC format" },
  "2.16.840.1.101.2.1.2.78.2": { d: "encryptedKeyPackage", c: "SDN.700 INFOSEC format and RFC 6032" },
  "2.16.840.1.101.2.1.2.78.3": { d: "keyPackageReceipt", c: "SDN.700 INFOSEC format and RFC 7191" },
  "2.16.840.1.101.2.1.2.78.6": { d: "keyPackageError", c: "SDN.700 INFOSEC format and RFC 7191" },
  "2.16.840.1.101.2.1.3.1": { d: "sdnsSecurityPolicy", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.2": { d: "sdnsPRBAC", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.3": { d: "mosaicPRBAC", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.10": { d: "siSecurityPolicy", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.10.0": { d: "siNASP", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.1": { d: "siELCO", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.2": { d: "siTK", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.3": { d: "siDSAP", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.4": { d: "siSSSS", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.5": { d: "siDNASP", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.6": { d: "siBYEMAN", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.7": { d: "siREL-US", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.8": { d: "siREL-AUS", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.9": { d: "siREL-CAN", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.10": { d: "siREL_UK", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.11": { d: "siREL-NZ", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.10.12": { d: "siGeneric", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.11": { d: "genser", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.11.0": { d: "genserNations", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.11.1": { d: "genserComsec", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.11.2": { d: "genserAcquisition", c: "SDN.700 INFOSEC policy (obsolete)", w: true },
  "2.16.840.1.101.2.1.3.11.3": { d: "genserSecurityCategories", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.11.3.0": { d: "genserTagSetName", c: "SDN.700 INFOSEC GENSER policy" },
  "2.16.840.1.101.2.1.3.12": { d: "defaultSecurityPolicy", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.13": { d: "capcoMarkings", c: "SDN.700 INFOSEC policy" },
  "2.16.840.1.101.2.1.3.13.0": { d: "capcoSecurityCategories", c: "SDN.700 INFOSEC policy CAPCO markings" },
  "2.16.840.1.101.2.1.3.13.0.1": { d: "capcoTagSetName1", c: "SDN.700 INFOSEC policy CAPCO markings" },
  "2.16.840.1.101.2.1.3.13.0.2": { d: "capcoTagSetName2", c: "SDN.700 INFOSEC policy CAPCO markings" },
  "2.16.840.1.101.2.1.3.13.0.3": { d: "capcoTagSetName3", c: "SDN.700 INFOSEC policy CAPCO markings" },
  "2.16.840.1.101.2.1.3.13.0.4": { d: "capcoTagSetName4", c: "SDN.700 INFOSEC policy CAPCO markings" },
  "2.16.840.1.101.2.1.5.1": {
    d: "sdnsKeyManagementCertificate",
    c: "SDN.700 INFOSEC attributes (superseded)",
    w: true
  },
  "2.16.840.1.101.2.1.5.2": {
    d: "sdnsUserSignatureCertificate",
    c: "SDN.700 INFOSEC attributes (superseded)",
    w: true
  },
  "2.16.840.1.101.2.1.5.3": { d: "sdnsKMandSigCertificate", c: "SDN.700 INFOSEC attributes (superseded)", w: true },
  "2.16.840.1.101.2.1.5.4": {
    d: "fortezzaKeyManagementCertificate",
    c: "SDN.700 INFOSEC attributes (superseded)",
    w: true
  },
  "2.16.840.1.101.2.1.5.5": { d: "fortezzaKMandSigCertificate", c: "SDN.700 INFOSEC attributes (superseded)", w: true },
  "2.16.840.1.101.2.1.5.6": {
    d: "fortezzaUserSignatureCertificate",
    c: "SDN.700 INFOSEC attributes (superseded)",
    w: true
  },
  "2.16.840.1.101.2.1.5.7": {
    d: "fortezzaCASignatureCertificate",
    c: "SDN.700 INFOSEC attributes (superseded)",
    w: true
  },
  "2.16.840.1.101.2.1.5.8": { d: "sdnsCASignatureCertificate", c: "SDN.700 INFOSEC attributes (superseded)", w: true },
  "2.16.840.1.101.2.1.5.10": { d: "auxiliaryVector", c: "SDN.700 INFOSEC attributes (superseded)", w: true },
  "2.16.840.1.101.2.1.5.11": { d: "mlReceiptPolicy", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.12": { d: "mlMembership", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.13": { d: "mlAdministrators", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.14": { d: "alid", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.20": { d: "janUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.21": { d: "febUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.22": { d: "marUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.23": { d: "aprUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.24": { d: "mayUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.25": { d: "junUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.26": { d: "julUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.27": { d: "augUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.28": { d: "sepUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.29": { d: "octUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.30": { d: "novUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.31": { d: "decUKMs", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.40": { d: "metaSDNSckl", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.41": { d: "sdnsCKL", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.42": { d: "metaSDNSsignatureCKL", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.43": { d: "sdnsSignatureCKL", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.44": { d: "sdnsCertificateRevocationList", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.45": {
    d: "fortezzaCertificateRevocationList",
    c: "SDN.700 INFOSEC attributes (superseded)",
    w: true
  },
  "2.16.840.1.101.2.1.5.46": { d: "fortezzaCKL", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.47": { d: "alExemptedAddressProcessor", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.48": { d: "guard", c: "SDN.700 INFOSEC attributes (obsolete)", w: true },
  "2.16.840.1.101.2.1.5.49": { d: "algorithmsSupported", c: "SDN.700 INFOSEC attributes (obsolete)", w: true },
  "2.16.840.1.101.2.1.5.50": {
    d: "suiteAKeyManagementCertificate",
    c: "SDN.700 INFOSEC attributes (obsolete)",
    w: true
  },
  "2.16.840.1.101.2.1.5.51": { d: "suiteAKMandSigCertificate", c: "SDN.700 INFOSEC attributes (obsolete)", w: true },
  "2.16.840.1.101.2.1.5.52": {
    d: "suiteAUserSignatureCertificate",
    c: "SDN.700 INFOSEC attributes (obsolete)",
    w: true
  },
  "2.16.840.1.101.2.1.5.53": { d: "prbacInfo", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.54": { d: "prbacCAConstraints", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.55": { d: "sigOrKMPrivileges", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.56": { d: "commPrivileges", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.57": { d: "labeledAttribute", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.58": { d: "policyInformationFile", c: "SDN.700 INFOSEC attributes (obsolete)", w: true },
  "2.16.840.1.101.2.1.5.59": { d: "secPolicyInformationFile", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.60": { d: "cAClearanceConstraint", c: "SDN.700 INFOSEC attributes" },
  "2.16.840.1.101.2.1.5.65": { d: "keyPkgIdAndReceiptReq", c: "SDN.700 INFOSEC attributes and RFC 7191" },
  "2.16.840.1.101.2.1.5.66": { d: "contentDecryptKeyID", c: "SDN.700 INFOSEC attributes and RFC 6032" },
  "2.16.840.1.101.2.1.5.70": { d: "kpCrlPointers", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.5.71": { d: "kpKeyProvinceV2", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.5.72": { d: "kpManifest", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.7.1": { d: "cspExtns", c: "SDN.700 INFOSEC extensions" },
  "2.16.840.1.101.2.1.7.1.0": { d: "cspCsExtn", c: "SDN.700 INFOSEC extensions" },
  "2.16.840.1.101.2.1.8.1": { d: "mISSISecurityCategories", c: "SDN.700 INFOSEC security category" },
  "2.16.840.1.101.2.1.8.2": { d: "standardSecurityLabelPrivileges", c: "SDN.700 INFOSEC security category" },
  "2.16.840.1.101.2.1.8.3.1": { d: "enumeratedPermissiveAttrs", c: "SDN.700 INFOSEC security category from RFC 7906" },
  "2.16.840.1.101.2.1.8.3.3": { d: "informativeAttrs", c: "SDN.700 INFOSEC security category from RFC 7906" },
  "2.16.840.1.101.2.1.8.3.4": { d: "enumeratedRestrictiveAttrs", c: "SDN.700 INFOSEC security category from RFC 7906" },
  "2.16.840.1.101.2.1.10.1": { d: "sigPrivileges", c: "SDN.700 INFOSEC privileges" },
  "2.16.840.1.101.2.1.10.2": { d: "kmPrivileges", c: "SDN.700 INFOSEC privileges" },
  "2.16.840.1.101.2.1.10.3": { d: "namedTagSetPrivilege", c: "SDN.700 INFOSEC privileges" },
  "2.16.840.1.101.2.1.11.1": { d: "ukDemo", c: "SDN.700 INFOSEC certificate policy" },
  "2.16.840.1.101.2.1.11.2": { d: "usDODClass2", c: "SDN.700 INFOSEC certificate policy" },
  "2.16.840.1.101.2.1.11.3": { d: "usMediumPilot", c: "SDN.700 INFOSEC certificate policy" },
  "2.16.840.1.101.2.1.11.4": { d: "usDODClass4", c: "SDN.700 INFOSEC certificate policy" },
  "2.16.840.1.101.2.1.11.5": { d: "usDODClass3", c: "SDN.700 INFOSEC certificate policy" },
  "2.16.840.1.101.2.1.11.6": { d: "usDODClass5", c: "SDN.700 INFOSEC certificate policy" },
  "2.16.840.1.101.2.1.12.0": { d: "testSecurityPolicy", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.1": { d: "tsp1", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.1.0": { d: "tsp1SecurityCategories", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.1.0.0": { d: "tsp1TagSetZero", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.1.0.1": { d: "tsp1TagSetOne", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.1.0.2": { d: "tsp1TagSetTwo", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.2": { d: "tsp2", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.2.0": { d: "tsp2SecurityCategories", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.2.0.0": { d: "tsp2TagSetZero", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.2.0.1": { d: "tsp2TagSetOne", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.2.0.2": { d: "tsp2TagSetTwo", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.3": { d: "kafka", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.3.0": { d: "kafkaSecurityCategories", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.3.0.1": { d: "kafkaTagSetName1", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.3.0.2": { d: "kafkaTagSetName2", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.0.3.0.3": { d: "kafkaTagSetName3", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.12.1.1": { d: "tcp1", c: "SDN.700 INFOSEC test objects" },
  "2.16.840.1.101.2.1.13.1": { d: "kmaKeyAlgorithm", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.3": { d: "kmaTSECNomenclature", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.5": { d: "kmaKeyDistPeriod", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.6": { d: "kmaKeyValidityPeriod", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.7": { d: "kmaKeyDuration", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.11": { d: "kmaSplitID", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.12": { d: "kmaKeyPkgType", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.13": { d: "kmaKeyPurpose", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.14": { d: "kmaKeyUse", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.15": { d: "kmaTransportKey", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.16": { d: "kmaKeyPkgReceiversV2", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.19": { d: "kmaOtherCertFormats", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.20": { d: "kmaUsefulCerts", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.21": { d: "kmaKeyWrapAlgorithm", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.13.22": { d: "kmaSigUsageV3", c: "SDN.700 INFOSEC attributes and RFC 7906" },
  "2.16.840.1.101.2.1.16.0": { d: "dn", c: "SDN.700 INFOSEC attributes and RFC 7191" },
  "2.16.840.1.101.2.1.22": { d: "errorCodes", c: "RFC 7906 key attribute error codes" },
  "2.16.840.1.101.2.1.22.1": { d: "missingKeyType", c: "RFC 7906 key attribute error codes" },
  "2.16.840.1.101.2.1.22.2": { d: "privacyMarkTooLong", c: "RFC 7906 key attribute error codes" },
  "2.16.840.1.101.2.1.22.3": { d: "unrecognizedSecurityPolicy", c: "RFC 7906 key attribute error codes" },
  "2.16.840.1.101.3.1": { d: "slabel", c: "CSOR GAK", w: true },
  "2.16.840.1.101.3.2": { d: "pki", c: "NIST", w: true },
  "2.16.840.1.101.3.2.1": { d: "NIST policyIdentifier", c: "NIST policies", w: true },
  "2.16.840.1.101.3.2.1.3.1": { d: "fbcaRudimentaryPolicy", c: "Federal Bridge CA Policy" },
  "2.16.840.1.101.3.2.1.3.2": { d: "fbcaBasicPolicy", c: "Federal Bridge CA Policy" },
  "2.16.840.1.101.3.2.1.3.3": { d: "fbcaMediumPolicy", c: "Federal Bridge CA Policy" },
  "2.16.840.1.101.3.2.1.3.4": { d: "fbcaHighPolicy", c: "Federal Bridge CA Policy" },
  "2.16.840.1.101.3.2.1.48.1": { d: "nistTestPolicy1", c: "NIST PKITS policies" },
  "2.16.840.1.101.3.2.1.48.2": { d: "nistTestPolicy2", c: "NIST PKITS policies" },
  "2.16.840.1.101.3.2.1.48.3": { d: "nistTestPolicy3", c: "NIST PKITS policies" },
  "2.16.840.1.101.3.2.1.48.4": { d: "nistTestPolicy4", c: "NIST PKITS policies" },
  "2.16.840.1.101.3.2.1.48.5": { d: "nistTestPolicy5", c: "NIST PKITS policies" },
  "2.16.840.1.101.3.2.1.48.6": { d: "nistTestPolicy6", c: "NIST PKITS policies" },
  "2.16.840.1.101.3.2.2": { d: "gak", c: "CSOR GAK extended key usage", w: true },
  "2.16.840.1.101.3.2.2.1": { d: "kRAKey", c: "CSOR GAK extended key usage", w: true },
  "2.16.840.1.101.3.2.3": { d: "extensions", c: "CSOR GAK extensions", w: true },
  "2.16.840.1.101.3.2.3.1": { d: "kRTechnique", c: "CSOR GAK extensions", w: true },
  "2.16.840.1.101.3.2.3.2": { d: "kRecoveryCapable", c: "CSOR GAK extensions", w: true },
  "2.16.840.1.101.3.2.3.3": { d: "kR", c: "CSOR GAK extensions", w: true },
  "2.16.840.1.101.3.2.4": { d: "keyRecoverySchemes", c: "CSOR GAK", w: true },
  "2.16.840.1.101.3.2.5": { d: "krapola", c: "CSOR GAK", w: true },
  "2.16.840.1.101.3.3": { d: "arpa", c: "CSOR GAK", w: true },
  "2.16.840.1.101.3.4": { d: "nistAlgorithm", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1": { d: "aes", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.1": { d: "aes128-ECB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.2": { d: "aes128-CBC", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.3": { d: "aes128-OFB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.4": { d: "aes128-CFB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.5": { d: "aes128-wrap", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.6": { d: "aes128-GCM", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.7": { d: "aes128-CCM", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.8": { d: "aes128-wrap-pad", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.9": { d: "aes128-GMAC", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.21": { d: "aes192-ECB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.22": { d: "aes192-CBC", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.23": { d: "aes192-OFB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.24": { d: "aes192-CFB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.25": { d: "aes192-wrap", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.26": { d: "aes192-GCM", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.27": { d: "aes192-CCM", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.28": { d: "aes192-wrap-pad", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.29": { d: "aes192-GMAC", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.41": { d: "aes256-ECB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.42": { d: "aes256-CBC", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.43": { d: "aes256-OFB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.44": { d: "aes256-CFB", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.45": { d: "aes256-wrap", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.46": { d: "aes256-GCM", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.47": { d: "aes256-CCM", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.48": { d: "aes256-wrap-pad", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.1.49": { d: "aes256-GMAC", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2": { d: "hashAlgos", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.1": { d: "sha-256", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.2": { d: "sha-384", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.3": { d: "sha-512", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.4": { d: "sha-224", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.7": { d: "sha3-224", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.8": { d: "sha3-256", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.9": { d: "sha3-384", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.10": { d: "sha3-512", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.11": { d: "shake128", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.12": { d: "shake256", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.17": { d: "shake128len", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.18": { d: "shake256len", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.19": { d: "kmacShake128", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.2.20": { d: "kmacShake256", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.3.1": { d: "dsaWithSha224", c: "NIST Algorithm" },
  "2.16.840.1.101.3.4.3.2": { d: "dsaWithSha256", c: "NIST Algorithm" },
  "2.16.840.1.113719.1.2.8": { d: "novellAlgorithm", c: "Novell" },
  "2.16.840.1.113719.1.2.8.22": { d: "desCbcIV8", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.23": { d: "desCbcPadIV8", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.24": { d: "desEDE2CbcIV8", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.25": { d: "desEDE2CbcPadIV8", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.26": { d: "desEDE3CbcIV8", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.27": { d: "desEDE3CbcPadIV8", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.28": { d: "rc5CbcPad", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.29": { d: "md2WithRSAEncryptionBSafe1", c: "Novell signature algorithm" },
  "2.16.840.1.113719.1.2.8.30": { d: "md5WithRSAEncryptionBSafe1", c: "Novell signature algorithm" },
  "2.16.840.1.113719.1.2.8.31": { d: "sha1WithRSAEncryptionBSafe1", c: "Novell signature algorithm" },
  "2.16.840.1.113719.1.2.8.32": { d: "lmDigest", c: "Novell digest algorithm" },
  "2.16.840.1.113719.1.2.8.40": { d: "md2", c: "Novell digest algorithm" },
  "2.16.840.1.113719.1.2.8.50": { d: "md5", c: "Novell digest algorithm" },
  "2.16.840.1.113719.1.2.8.51": { d: "ikeHmacWithSHA1-RSA", c: "Novell signature algorithm" },
  "2.16.840.1.113719.1.2.8.52": { d: "ikeHmacWithMD5-RSA", c: "Novell signature algorithm" },
  "2.16.840.1.113719.1.2.8.69": { d: "rc2CbcPad", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.82": { d: "sha-1", c: "Novell digest algorithm" },
  "2.16.840.1.113719.1.2.8.92": { d: "rc2BSafe1Cbc", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.95": { d: "md4", c: "Novell digest algorithm" },
  "2.16.840.1.113719.1.2.8.130": { d: "md4Packet", c: "Novell keyed hash" },
  "2.16.840.1.113719.1.2.8.131": { d: "rsaEncryptionBsafe1", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.132": { d: "nwPassword", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.2.8.133": { d: "novellObfuscate-1", c: "Novell encryption algorithm" },
  "2.16.840.1.113719.1.9": { d: "pki", c: "Novell" },
  "2.16.840.1.113719.1.9.4": { d: "pkiAttributeType", c: "Novell PKI" },
  "2.16.840.1.113719.1.9.4.1": { d: "securityAttributes", c: "Novell PKI attribute type" },
  "2.16.840.1.113719.1.9.4.2": { d: "relianceLimit", c: "Novell PKI attribute type" },
  "2.16.840.1.113730.1": { d: "cert-extension", c: "Netscape" },
  "2.16.840.1.113730.1.1": { d: "netscape-cert-type", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.2": { d: "netscape-base-url", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.3": { d: "netscape-revocation-url", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.4": { d: "netscape-ca-revocation-url", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.7": { d: "netscape-cert-renewal-url", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.8": { d: "netscape-ca-policy-url", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.9": { d: "HomePage-url", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.10": { d: "EntityLogo", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.11": { d: "UserPicture", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.12": { d: "netscape-ssl-server-name", c: "Netscape certificate extension" },
  "2.16.840.1.113730.1.13": { d: "netscape-comment", c: "Netscape certificate extension" },
  "2.16.840.1.113730.2": { d: "data-type", c: "Netscape" },
  "2.16.840.1.113730.2.1": { d: "dataGIF", c: "Netscape data type" },
  "2.16.840.1.113730.2.2": { d: "dataJPEG", c: "Netscape data type" },
  "2.16.840.1.113730.2.3": { d: "dataURL", c: "Netscape data type" },
  "2.16.840.1.113730.2.4": { d: "dataHTML", c: "Netscape data type" },
  "2.16.840.1.113730.2.5": { d: "certSequence", c: "Netscape data type" },
  "2.16.840.1.113730.2.6": { d: "certURL", c: "Netscape certificate extension" },
  "2.16.840.1.113730.3": { d: "directory", c: "Netscape" },
  "2.16.840.1.113730.3.1": { d: "ldapDefinitions", c: "Netscape directory" },
  "2.16.840.1.113730.3.1.1": { d: "carLicense", c: "Netscape LDAP definitions" },
  "2.16.840.1.113730.3.1.2": { d: "departmentNumber", c: "Netscape LDAP definitions" },
  "2.16.840.1.113730.3.1.3": { d: "employeeNumber", c: "Netscape LDAP definitions" },
  "2.16.840.1.113730.3.1.4": { d: "employeeType", c: "Netscape LDAP definitions" },
  "2.16.840.1.113730.3.1.216": { d: "userPKCS12", c: "Netscape LDAP definitions" },
  "2.16.840.1.113730.3.2.2": { d: "inetOrgPerson", c: "Netscape LDAP definitions" },
  "2.16.840.1.113730.4.1": { d: "serverGatedCrypto", c: "Netscape" },
  "2.16.840.1.113733.1.6.3": { d: "verisignCZAG", c: "Verisign extension" },
  "2.16.840.1.113733.1.6.6": { d: "verisignInBox", c: "Verisign extension" },
  "2.16.840.1.113733.1.6.11": { d: "verisignOnsiteJurisdictionHash", c: "Verisign extension" },
  "2.16.840.1.113733.1.6.13": { d: "Unknown Verisign VPN extension", c: "Verisign extension" },
  "2.16.840.1.113733.1.6.15": { d: "verisignServerID", c: "Verisign extension" },
  "2.16.840.1.113733.1.7.1.1": { d: "verisignCertPolicies95Qualifier1", c: "Verisign policy" },
  "2.16.840.1.113733.1.7.1.1.1": { d: "verisignCPSv1notice", c: "Verisign policy (obsolete)" },
  "2.16.840.1.113733.1.7.1.1.2": { d: "verisignCPSv1nsi", c: "Verisign policy (obsolete)" },
  "2.16.840.1.113733.1.8.1": { d: "verisignISSStrongCrypto", c: "Verisign" },
  "2.16.840.1.113733.1": { d: "pki", c: "Verisign extension" },
  "2.16.840.1.113733.1.9": { d: "pkcs7Attribute", c: "Verisign PKI extension" },
  "2.16.840.1.113733.1.9.2": { d: "messageType", c: "Verisign PKCS #7 attribute" },
  "2.16.840.1.113733.1.9.3": { d: "pkiStatus", c: "Verisign PKCS #7 attribute" },
  "2.16.840.1.113733.1.9.4": { d: "failInfo", c: "Verisign PKCS #7 attribute" },
  "2.16.840.1.113733.1.9.5": { d: "senderNonce", c: "Verisign PKCS #7 attribute" },
  "2.16.840.1.113733.1.9.6": { d: "recipientNonce", c: "Verisign PKCS #7 attribute" },
  "2.16.840.1.113733.1.9.7": { d: "transID", c: "Verisign PKCS #7 attribute" },
  "2.16.840.1.113733.1.9.8": {
    d: "extensionReq",
    c: "Verisign PKCS #7 attribute.  Use PKCS #9 extensionRequest instead",
    w: true
  },
  "2.16.840.1.113741.2": { d: "intelCDSA", c: "Intel CDSA" },
  "2.16.840.1.114412.1": { d: "digiCertNonEVCerts", c: "Digicert CA policy" },
  "2.16.840.1.114412.1.1": { d: "digiCertOVCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.1.2": { d: "digiCertDVCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.1.11": { d: "digiCertFederatedDeviceCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.1.3.0.1": { d: "digiCertGlobalCAPolicy", c: "Digicert CA policy" },
  "2.16.840.1.114412.1.3.0.2": { d: "digiCertHighAssuranceEVCAPolicy", c: "Digicert CA policy" },
  "2.16.840.1.114412.1.3.0.3": { d: "digiCertGlobalRootCAPolicy", c: "Digicert CA policy" },
  "2.16.840.1.114412.1.3.0.4": { d: "digiCertAssuredIDRootCAPolicy", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.2": { d: "digiCertEVCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.3": { d: "digiCertObjectSigningCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.3.1": { d: "digiCertCodeSigningCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.3.2": { d: "digiCertEVCodeSigningCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.3.11": { d: "digiCertKernelCodeSigningCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.3.21": { d: "digiCertDocumentSigningCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4": { d: "digiCertClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.1.1": { d: "digiCertLevel1PersonalClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.1.2": { d: "digiCertLevel1EnterpriseClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.2": { d: "digiCertLevel2ClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.3.1": { d: "digiCertLevel3USClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.3.2": { d: "digiCertLevel3CBPClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.4.1": { d: "digiCertLevel4USClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.4.2": { d: "digiCertLevel4CBPClientCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.5.1": { d: "digiCertPIVHardwareCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.5.2": { d: "digiCertPIVCardAuthCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.2.4.5.3": { d: "digiCertPIVContentSigningCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.4.31": { d: "digiCertGridClassicCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.4.31.5": { d: "digiCertGridIntegratedCert", c: "Digicert CA policy" },
  "2.16.840.1.114412.31.4.31.1": { d: "digiCertGridHostCert", c: "Digicert CA policy" },
  "2.23.42.0": { d: "contentType", c: "SET" },
  "2.23.42.0.0": { d: "panData", c: "SET contentType" },
  "2.23.42.0.1": { d: "panToken", c: "SET contentType" },
  "2.23.42.0.2": { d: "panOnly", c: "SET contentType" },
  "2.23.42.1": { d: "msgExt", c: "SET" },
  "2.23.42.2": { d: "field", c: "SET" },
  "2.23.42.2.0": { d: "fullName", c: "SET field" },
  "2.23.42.2.1": { d: "givenName", c: "SET field" },
  "2.23.42.2.2": { d: "familyName", c: "SET field" },
  "2.23.42.2.3": { d: "birthFamilyName", c: "SET field" },
  "2.23.42.2.4": { d: "placeName", c: "SET field" },
  "2.23.42.2.5": { d: "identificationNumber", c: "SET field" },
  "2.23.42.2.6": { d: "month", c: "SET field" },
  "2.23.42.2.7": { d: "date", c: "SET field" },
  "2.23.42.2.8": { d: "address", c: "SET field" },
  "2.23.42.2.9": { d: "telephone", c: "SET field" },
  "2.23.42.2.10": { d: "amount", c: "SET field" },
  "2.23.42.2.11": { d: "accountNumber", c: "SET field" },
  "2.23.42.2.12": { d: "passPhrase", c: "SET field" },
  "2.23.42.3": { d: "attribute", c: "SET" },
  "2.23.42.3.0": { d: "cert", c: "SET attribute" },
  "2.23.42.3.0.0": { d: "rootKeyThumb", c: "SET cert attribute" },
  "2.23.42.3.0.1": { d: "additionalPolicy", c: "SET cert attribute" },
  "2.23.42.4": { d: "algorithm", c: "SET" },
  "2.23.42.5": { d: "policy", c: "SET" },
  "2.23.42.5.0": { d: "root", c: "SET policy" },
  "2.23.42.6": { d: "module", c: "SET" },
  "2.23.42.7": { d: "certExt", c: "SET" },
  "2.23.42.7.0": { d: "hashedRootKey", c: "SET cert extension" },
  "2.23.42.7.1": { d: "certificateType", c: "SET cert extension" },
  "2.23.42.7.2": { d: "merchantData", c: "SET cert extension" },
  "2.23.42.7.3": { d: "cardCertRequired", c: "SET cert extension" },
  "2.23.42.7.4": { d: "tunneling", c: "SET cert extension" },
  "2.23.42.7.5": { d: "setExtensions", c: "SET cert extension" },
  "2.23.42.7.6": { d: "setQualifier", c: "SET cert extension" },
  "2.23.42.8": { d: "brand", c: "SET" },
  "2.23.42.8.1": { d: "IATA-ATA", c: "SET brand" },
  "2.23.42.8.4": { d: "VISA", c: "SET brand" },
  "2.23.42.8.5": { d: "MasterCard", c: "SET brand" },
  "2.23.42.8.30": { d: "Diners", c: "SET brand" },
  "2.23.42.8.34": { d: "AmericanExpress", c: "SET brand" },
  "2.23.42.8.6011": { d: "Novus", c: "SET brand" },
  "2.23.42.9": { d: "vendor", c: "SET" },
  "2.23.42.9.0": { d: "GlobeSet", c: "SET vendor" },
  "2.23.42.9.1": { d: "IBM", c: "SET vendor" },
  "2.23.42.9.2": { d: "CyberCash", c: "SET vendor" },
  "2.23.42.9.3": { d: "Terisa", c: "SET vendor" },
  "2.23.42.9.4": { d: "RSADSI", c: "SET vendor" },
  "2.23.42.9.5": { d: "VeriFone", c: "SET vendor" },
  "2.23.42.9.6": { d: "TrinTech", c: "SET vendor" },
  "2.23.42.9.7": { d: "BankGate", c: "SET vendor" },
  "2.23.42.9.8": { d: "GTE", c: "SET vendor" },
  "2.23.42.9.9": { d: "CompuSource", c: "SET vendor" },
  "2.23.42.9.10": { d: "Griffin", c: "SET vendor" },
  "2.23.42.9.11": { d: "Certicom", c: "SET vendor" },
  "2.23.42.9.12": { d: "OSS", c: "SET vendor" },
  "2.23.42.9.13": { d: "TenthMountain", c: "SET vendor" },
  "2.23.42.9.14": { d: "Antares", c: "SET vendor" },
  "2.23.42.9.15": { d: "ECC", c: "SET vendor" },
  "2.23.42.9.16": { d: "Maithean", c: "SET vendor" },
  "2.23.42.9.17": { d: "Netscape", c: "SET vendor" },
  "2.23.42.9.18": { d: "Verisign", c: "SET vendor" },
  "2.23.42.9.19": { d: "BlueMoney", c: "SET vendor" },
  "2.23.42.9.20": { d: "Lacerte", c: "SET vendor" },
  "2.23.42.9.21": { d: "Fujitsu", c: "SET vendor" },
  "2.23.42.9.22": { d: "eLab", c: "SET vendor" },
  "2.23.42.9.23": { d: "Entrust", c: "SET vendor" },
  "2.23.42.9.24": { d: "VIAnet", c: "SET vendor" },
  "2.23.42.9.25": { d: "III", c: "SET vendor" },
  "2.23.42.9.26": { d: "OpenMarket", c: "SET vendor" },
  "2.23.42.9.27": { d: "Lexem", c: "SET vendor" },
  "2.23.42.9.28": { d: "Intertrader", c: "SET vendor" },
  "2.23.42.9.29": { d: "Persimmon", c: "SET vendor" },
  "2.23.42.9.30": { d: "NABLE", c: "SET vendor" },
  "2.23.42.9.31": { d: "espace-net", c: "SET vendor" },
  "2.23.42.9.32": { d: "Hitachi", c: "SET vendor" },
  "2.23.42.9.33": { d: "Microsoft", c: "SET vendor" },
  "2.23.42.9.34": { d: "NEC", c: "SET vendor" },
  "2.23.42.9.35": { d: "Mitsubishi", c: "SET vendor" },
  "2.23.42.9.36": { d: "NCR", c: "SET vendor" },
  "2.23.42.9.37": { d: "e-COMM", c: "SET vendor" },
  "2.23.42.9.38": { d: "Gemplus", c: "SET vendor" },
  "2.23.42.10": { d: "national", c: "SET" },
  "2.23.42.10.392": { d: "Japan", c: "SET national" },
  "2.23.43.1.4": { d: "wTLS-ECC", c: "WAP WTLS" },
  "2.23.43.1.4.1": { d: "wTLS-ECC-curve1", c: "WAP WTLS" },
  "2.23.43.1.4.6": { d: "wTLS-ECC-curve6", c: "WAP WTLS" },
  "2.23.43.1.4.8": { d: "wTLS-ECC-curve8", c: "WAP WTLS" },
  "2.23.43.1.4.9": { d: "wTLS-ECC-curve9", c: "WAP WTLS" },
  "2.23.133": { d: "tCPA", c: "TCPA/TCG" },
  "2.23.133.1": { d: "tcgSpecVersion", c: "TCPA/TCG" },
  "2.23.133.2": { d: "tcgAttribute", c: "TCPA/TCG" },
  "2.23.133.2.1": { d: "tcgTpmManufacturer", c: "TCPA/TCG Attribute" },
  "2.23.133.2.2": { d: "tcgTpmModel", c: "TCPA/TCG Attribute" },
  "2.23.133.2.3": { d: "tcgTpmVersion", c: "TCPA/TCG Attribute" },
  "2.23.133.2.4": { d: "tcgPlatformManufacturer", c: "TCPA/TCG Attribute" },
  "2.23.133.2.5": { d: "tcgPlatformModel", c: "TCPA/TCG Attribute" },
  "2.23.133.2.6": { d: "tcgPlatformVersion", c: "TCPA/TCG Attribute" },
  "2.23.133.2.7": { d: "tcgComponentManufacturer", c: "TCPA/TCG Attribute" },
  "2.23.133.2.8": { d: "tcgComponentModel", c: "TCPA/TCG Attribute" },
  "2.23.133.2.9": { d: "tcgComponentVersion", c: "TCPA/TCG Attribute" },
  "2.23.133.2.10": { d: "tcgSecurityQualities", c: "TCPA/TCG Attribute" },
  "2.23.133.2.11": { d: "tcgTpmProtectionProfile", c: "TCPA/TCG Attribute" },
  "2.23.133.2.12": { d: "tcgTpmSecurityTarget", c: "TCPA/TCG Attribute" },
  "2.23.133.2.13": { d: "tcgFoundationProtectionProfile", c: "TCPA/TCG Attribute" },
  "2.23.133.2.14": { d: "tcgFoundationSecurityTarget", c: "TCPA/TCG Attribute" },
  "2.23.133.2.15": { d: "tcgTpmIdLabel", c: "TCPA/TCG Attribute" },
  "2.23.133.2.16": { d: "tcgTpmSpecification", c: "TCPA/TCG Attribute" },
  "2.23.133.2.18": { d: "tcgTpmSecurityAssertions", c: "TCPA/TCG Attribute" },
  "2.23.133.3": { d: "tcgProtocol", c: "TCPA/TCG" },
  "2.23.133.3.1": { d: "tcgPrttTpmIdProtocol", c: "TCPA/TCG Protocol" },
  "2.23.133.8.1": { d: "tcgEKCertificate", c: "TCPA/TCG Key Usage" },
  "2.23.133.10.1.1.1": { d: "tcgObject", c: "TCPA/TCG Object" },
  "2.23.134.1.4.2.1": { d: "postSignumRootQCA", c: "PostSignum CA" },
  "2.23.134.1.2.2.3": { d: "postSignumPublicCA", c: "PostSignum CA" },
  "2.23.134.1.2.1.8.210": { d: "postSignumCommercialServerPolicy", c: "PostSignum CA" },
  "2.23.136.1.1.1": { d: "mRTDSignatureData", c: "ICAO MRTD" },
  "2.23.140.1.1": { d: "evGuidelines", c: "CAB Certificate Policies" },
  "2.23.140.1.2.1": { d: "domainValidated", c: "CAB Certificate Policies" },
  "2.23.140.1.2.2": { d: "subjectIdentityValidated", c: "CAB Certificate Policies" },
  "2.23.140.1.4.1": { d: "codeSigningRequirements", c: "CAB Certificate Policies" },
  "2.54.1775.2": { d: "hashedRootKey", c: "SET.  Deprecated, use (2 23 42 7 0) instead", w: true },
  "2.54.1775.3": { d: "certificateType", c: "SET.  Deprecated, use (2 23 42 7 0) instead", w: true },
  "2.54.1775.4": { d: "merchantData", c: "SET.  Deprecated, use (2 23 42 7 0) instead", w: true },
  "2.54.1775.5": { d: "cardCertRequired", c: "SET.  Deprecated, use (2 23 42 7 0) instead", w: true },
  "2.54.1775.6": { d: "tunneling", c: "SET.  Deprecated, use (2 23 42 7 0) instead", w: true },
  "2.54.1775.7": { d: "setQualifier", c: "SET.  Deprecated, use (2 23 42 7 0) instead", w: true },
  "2.54.1775.99": { d: "setData", c: "SET.  Deprecated, use (2 23 42 7 0) instead", w: true },
  "1.2.40.0.17.1.22": { d: "A-Trust EV policy", c: "A-Trust CA Root" },
  "1.3.6.1.4.1.34697.2.1": { d: "AffirmTrust EV policy", c: "AffirmTrust Commercial" },
  "1.3.6.1.4.1.34697.2.2": { d: "AffirmTrust EV policy", c: "AffirmTrust Networking" },
  "1.3.6.1.4.1.34697.2.3": { d: "AffirmTrust EV policy", c: "AffirmTrust Premium" },
  "1.3.6.1.4.1.34697.2.4": { d: "AffirmTrust EV policy", c: "AffirmTrust Premium ECC" },
  "1.3.6.1.4.1.17326.10.14.2.1.2": { d: "Camerfirma EV policy", c: "Camerfirma CA Root" },
  "1.3.6.1.4.1.17326.10.8.12.1.2": { d: "Camerfirma EV policy", c: "Camerfirma CA Root" },
  "1.3.6.1.4.1.22234.2.5.2.3.1": { d: "CertPlus EV policy", c: "CertPlus Class 2 Primary CA (formerly Keynectis)" },
  "1.3.6.1.4.1.6449.1.2.1.5.1": { d: "Comodo EV policy", c: "COMODO Certification Authority" },
  "1.3.6.1.4.1.6334.1.100.1": { d: "Cybertrust EV policy", c: "Cybertrust Global Root (now Verizon Business)" },
  "1.3.6.1.4.1.4788.2.202.1": { d: "D-TRUST EV policy", c: "D-TRUST Root Class 3 CA 2 EV 2009" },
  "2.16.840.1.114412.2.1": { d: "DigiCert EV policy", c: "DigiCert High Assurance EV Root CA" },
  "2.16.528.1.1001.1.1.1.12.6.1.1.1": { d: "DigiNotar EV policy", c: "DigiNotar Root CA" },
  "2.16.840.1.114028.10.1.2": { d: "Entrust EV policy", c: "Entrust Root Certification Authority" },
  "1.3.6.1.4.1.14370.1.6": {
    d: "GeoTrust EV policy",
    c: "GeoTrust Primary Certification Authority (formerly Equifax)"
  },
  "1.3.6.1.4.1.4146.1.1": { d: "GlobalSign EV policy", c: "GlobalSign" },
  "2.16.840.1.114413.1.7.23.3": {
    d: "GoDaddy EV policy",
    c: "GoDaddy Class 2 Certification Authority (formerly ValiCert)"
  },
  "1.3.6.1.4.1.14777.6.1.1": { d: "Izenpe EV policy", c: "Certificado de Servidor Seguro SSL EV" },
  "1.3.6.1.4.1.14777.6.1.2": { d: "Izenpe EV policy", c: "Certificado de Sede Electronica EV" },
  "1.3.6.1.4.1.782.1.2.1.8.1": { d: "Network Solutions EV policy", c: "Network Solutions Certificate Authority" },
  "1.3.6.1.4.1.8024.0.2.100.1.2": { d: "QuoVadis EV policy", c: "QuoVadis Root CA 2" },
  "1.2.392.200091.100.721.1": { d: "Security Communication (SECOM) EV policy", c: "Security Communication RootCA1" },
  "2.16.840.1.114414.1.7.23.3": { d: "Starfield EV policy", c: "Starfield Class 2 Certification Authority" },
  "1.3.6.1.4.1.23223.1.1.1": { d: "StartCom EV policy", c: "StartCom Certification Authority" },
  "2.16.756.1.89.1.2.1.1": { d: "SwissSign EV policy", c: "SwissSign Gold CA - G2" },
  "1.3.6.1.4.1.7879.13.24.1": { d: "T-TeleSec EV policy", c: "T-TeleSec GlobalRoot Class 3" },
  "2.16.840.1.113733.1.7.48.1": { d: "Thawte EV policy", c: "Thawte Premium Server CA" },
  "2.16.840.1.114404.1.1.2.4.1": {
    d: "TrustWave EV policy",
    c: "TrustWave CA, formerly SecureTrust, before that XRamp"
  },
  "1.3.6.1.4.1.40869.1.1.22.3": { d: "TWCA EV policy", c: "TWCA Root Certification Authority" },
  "2.16.840.1.113733.1.7.23.6": {
    d: "VeriSign EV policy",
    c: "VeriSign Class 3 Public Primary Certification Authority"
  },
  "2.16.840.1.114171.500.9": {
    d: "Wells Fargo EV policy",
    c: "Wells Fargo WellsSecure Public Root Certificate Authority"
  }
};
const ellipsis = "…", reTimeS = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|(-(?:0\d|1[0-2])|[+](?:0\d|1[0-4]))([0-5]\d)?)?$/, reTimeL = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|(-(?:0\d|1[0-2])|[+](?:0\d|1[0-4]))([0-5]\d)?)?$/, hexDigits = "0123456789ABCDEF", b64Safe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_", tableT61 = [
  ["", ""],
  ["AEIOUaeiou", "ÀÈÌÒÙàèìòù"],
  // Grave
  ["ACEILNORSUYZacegilnorsuyz", "ÁĆÉÍĹŃÓŔŚÚÝŹáćéģíĺńóŕśúýź"],
  // Acute
  ["ACEGHIJOSUWYaceghijosuwy", "ÂĈÊĜĤÎĴÔŜÛŴŶâĉêĝĥîĵôŝûŵŷ"],
  // Circumflex
  ["AINOUainou", "ÃĨÑÕŨãĩñõũ"],
  // Tilde
  ["AEIOUaeiou", "ĀĒĪŌŪāēīōū"],
  // Macron
  ["AGUagu", "ĂĞŬăğŭ"],
  // Breve
  ["CEGIZcegz", "ĊĖĠİŻċėġż"],
  // Dot
  ["AEIOUYaeiouy", "ÄËÏÖÜŸäëïöüÿ"],
  // Umlaut or diæresis
  ["", ""],
  ["AUau", "ÅŮåů"],
  // Ring
  ["CGKLNRSTcklnrst", "ÇĢĶĻŅŖŞŢçķļņŗşţ"],
  // Cedilla
  ["", ""],
  ["OUou", "ŐŰőű"],
  // Double Acute
  ["AEIUaeiu", "ĄĘĮŲąęįų"],
  // Ogonek
  ["CDELNRSTZcdelnrstz", "ČĎĚĽŇŘŠŤŽčďěľňřšťž"]
  // Caron
];
function stringCut(str, len) {
  if (str.length > len) str = str.substring(0, len) + ellipsis;
  return str;
}
function checkPrintable(s) {
  let i, v2;
  for (i = 0; i < s.length; ++i) {
    v2 = s.charCodeAt(i);
    if (v2 < 32 && v2 != 9 && v2 != 10 && v2 != 13)
      throw new Error("Unprintable character at index " + i + " (code " + s.str.charCodeAt(i) + ")");
  }
}
class Stream {
  constructor(enc, pos) {
    if (enc instanceof Stream) {
      this.enc = enc.enc;
      this.pos = enc.pos;
    } else {
      this.enc = enc;
      this.pos = pos;
    }
  }
  get(pos) {
    if (pos === void 0) pos = this.pos++;
    if (pos >= this.enc.length)
      throw new Error("Requesting byte offset " + pos + " on a stream of length " + this.enc.length);
    return typeof this.enc == "string" ? this.enc.charCodeAt(pos) : this.enc[pos];
  }
  hexByte(b2) {
    return hexDigits.charAt(b2 >> 4 & 15) + hexDigits.charAt(b2 & 15);
  }
  /** Hexadecimal dump.
   * @param type 'raw', 'byte' or 'dump' */
  hexDump(start2, end2, type2 = "dump") {
    let s = "";
    for (let i = start2; i < end2; ++i) {
      if (type2 == "byte" && i > start2) s += " ";
      s += this.hexByte(this.get(i));
      if (type2 == "dump")
        switch (i & 15) {
          case 7:
            s += "  ";
            break;
          case 15:
            s += "\n";
            break;
          default:
            s += " ";
        }
    }
    return s;
  }
  b64Dump(start2, end2) {
    let extra = (end2 - start2) % 3, s = "", i, c;
    for (i = start2; i + 2 < end2; i += 3) {
      c = this.get(i) << 16 | this.get(i + 1) << 8 | this.get(i + 2);
      s += b64Safe.charAt(c >> 18 & 63);
      s += b64Safe.charAt(c >> 12 & 63);
      s += b64Safe.charAt(c >> 6 & 63);
      s += b64Safe.charAt(c & 63);
    }
    if (extra > 0) {
      c = this.get(i) << 16;
      if (extra > 1) c |= this.get(i + 1) << 8;
      s += b64Safe.charAt(c >> 18 & 63);
      s += b64Safe.charAt(c >> 12 & 63);
      if (extra == 2) s += b64Safe.charAt(c >> 6 & 63);
    }
    return s;
  }
  isASCII(start2, end2) {
    for (let i = start2; i < end2; ++i) {
      let c = this.get(i);
      if (c < 32 || c > 176) return false;
    }
    return true;
  }
  parseStringISO(start2, end2, maxLength) {
    let s = "";
    for (let i = start2; i < end2; ++i) s += String.fromCharCode(this.get(i));
    return { size: s.length, str: stringCut(s, maxLength) };
  }
  parseStringT61(start2, end2, maxLength) {
    function merge2(c2, d2) {
      let t = tableT61[c2 - 192];
      let i = t[0].indexOf(String.fromCharCode(d2));
      return i < 0 ? "\0" : t[1].charAt(i);
    }
    let s = "", c;
    for (let i = start2; i < end2; ++i) {
      c = this.get(i);
      if (c >= 164 && c <= 191) s += "$¥#§¤\0\0«\0\0\0\0°±²³×µ¶·÷\0\0»¼½¾¿".charAt(c - 164);
      else if (c >= 224 && c <= 255) s += "ΩÆÐªĦ\0ĲĿŁØŒºÞŦŊŉĸæđðħıĳŀłøœßþŧŋ\0".charAt(c - 224);
      else if (c >= 192 && c <= 207) s += merge2(c, this.get(++i));
      else s += String.fromCharCode(c);
    }
    return { size: s.length, str: stringCut(s, maxLength) };
  }
  parseStringUTF(start2, end2, maxLength) {
    function ex(c) {
      if (c < 128 || c >= 192) throw new Error("Invalid UTF-8 continuation byte: " + c);
      return c & 63;
    }
    function surrogate(cp) {
      if (cp < 65536) throw new Error("UTF-8 overlong encoding, codepoint encoded in 4 bytes: " + cp);
      cp -= 65536;
      return String.fromCharCode((cp >> 10) + 55296, (cp & 1023) + 56320);
    }
    let s = "";
    for (let i = start2; i < end2; ) {
      let c = this.get(i++);
      if (c < 128)
        s += String.fromCharCode(c);
      else if (c < 192) throw new Error("Invalid UTF-8 starting byte: " + c);
      else if (c < 224)
        s += String.fromCharCode((c & 31) << 6 | ex(this.get(i++)));
      else if (c < 240)
        s += String.fromCharCode((c & 15) << 12 | ex(this.get(i++)) << 6 | ex(this.get(i++)));
      else if (c < 248)
        s += surrogate((c & 7) << 18 | ex(this.get(i++)) << 12 | ex(this.get(i++)) << 6 | ex(this.get(i++)));
      else throw new Error("Invalid UTF-8 starting byte (since 2003 it is restricted to 4 bytes): " + c);
    }
    return { size: s.length, str: stringCut(s, maxLength) };
  }
  parseStringBMP(start2, end2, maxLength) {
    let s = "", hi, lo;
    for (let i = start2; i < end2; ) {
      hi = this.get(i++);
      lo = this.get(i++);
      s += String.fromCharCode(hi << 8 | lo);
    }
    return { size: s.length, str: stringCut(s, maxLength) };
  }
  parseTime(start2, end2, shortYear) {
    let s = this.parseStringISO(start2, end2).str, m2 = (shortYear ? reTimeS : reTimeL).exec(s);
    if (!m2) throw new Error("Unrecognized time: " + s);
    if (shortYear) {
      m2[1] = +m2[1];
      m2[1] += m2[1] < 70 ? 2e3 : 1900;
    }
    s = m2[1] + "-" + m2[2] + "-" + m2[3] + " " + m2[4];
    if (m2[5]) {
      s += ":" + m2[5];
      if (m2[6]) {
        s += ":" + m2[6];
        if (m2[7]) s += "." + m2[7];
      }
    }
    if (m2[8]) {
      s += " UTC";
      if (m2[9]) s += m2[9] + ":" + (m2[10] || "00");
    }
    return s;
  }
  parseInteger(start2, end2) {
    let v2 = this.get(start2), neg = v2 > 127, pad = neg ? 255 : 0, len, s = "";
    while (v2 == pad && ++start2 < end2) v2 = this.get(start2);
    len = end2 - start2;
    if (len === 0) return neg ? "-1" : "0";
    if (len > 4) {
      s = v2;
      len <<= 3;
      while (((s ^ pad) & 128) == 0) {
        s <<= 1;
        --len;
      }
      s = "(" + len + " bit)\n";
    }
    if (neg) v2 = v2 - 256;
    let n = new Int10(v2);
    for (let i = start2 + 1; i < end2; ++i) n.mulAdd(256, this.get(i));
    return s + n.toString();
  }
  parseBitString(start2, end2, maxLength) {
    let unusedBits = this.get(start2);
    if (unusedBits > 7) throw new Error("Invalid BitString with unusedBits=" + unusedBits);
    let lenBit = (end2 - start2 - 1 << 3) - unusedBits, s = "";
    for (let i = start2 + 1; i < end2; ++i) {
      let b2 = this.get(i), skip = i == end2 - 1 ? unusedBits : 0;
      for (let j = 7; j >= skip; --j) s += b2 >> j & 1 ? "1" : "0";
      if (s.length > maxLength) s = stringCut(s, maxLength);
    }
    return { size: lenBit, str: s };
  }
  parseOctetString(start2, end2, maxLength) {
    let len = end2 - start2, s;
    try {
      s = this.parseStringUTF(start2, end2, maxLength);
      checkPrintable(s.str);
      return { size: end2 - start2, str: s.str };
    } catch (e2) {
    }
    maxLength /= 2;
    if (len > maxLength) end2 = start2 + maxLength;
    s = "";
    for (let i = start2; i < end2; ++i) s += this.hexByte(this.get(i));
    if (len > maxLength) s += ellipsis;
    return { size: len, str: s };
  }
  parseOID(start2, end2, maxLength, isRelative) {
    let s = "", n = new Int10(), bits = 0;
    for (let i = start2; i < end2; ++i) {
      let v2 = this.get(i);
      n.mulAdd(128, v2 & 127);
      bits += 7;
      if (!(v2 & 128)) {
        if (s === "") {
          n = n.simplify();
          if (isRelative) {
            s = n instanceof Int10 ? n.toString() : "" + n;
          } else if (n instanceof Int10) {
            n.sub(80);
            s = "2." + n.toString();
          } else {
            let m2 = n < 80 ? n < 40 ? 0 : 1 : 2;
            s = m2 + "." + (n - m2 * 40);
          }
        } else s += "." + n.toString();
        if (s.length > maxLength) return stringCut(s, maxLength);
        n = new Int10();
        bits = 0;
      }
    }
    if (bits > 0) s += ".incomplete";
    if (typeof oids === "object" && !isRelative) {
      let oid = oids[s];
      if (oid) {
        if (oid.d) s += "\n" + oid.d;
        if (oid.c) s += "\n" + oid.c;
        if (oid.w) s += "\n(warning!)";
      }
    }
    return s;
  }
  parseRelativeOID(start2, end2, maxLength) {
    return this.parseOID(start2, end2, maxLength, true);
  }
}
function recurse(el, parser, maxLength) {
  let avoidRecurse = true;
  if (el.tag.tagConstructed && el.sub) {
    avoidRecurse = false;
    el.sub.forEach(function(e1) {
      if (e1.tag.tagClass != el.tag.tagClass || e1.tag.tagNumber != el.tag.tagNumber) avoidRecurse = true;
    });
  }
  if (avoidRecurse) return el.stream[parser](el.posContent(), el.posContent() + Math.abs(el.length), maxLength);
  let d2 = { size: 0, str: "" };
  el.sub.forEach(function(el2) {
    let d1 = recurse(el2, parser, maxLength - d2.str.length);
    d2.size += d1.size;
    d2.str += d1.str;
  });
  return d2;
}
class ASN1Tag {
  constructor(stream) {
    let buf = stream.get();
    this.tagClass = buf >> 6;
    this.tagConstructed = (buf & 32) !== 0;
    this.tagNumber = buf & 31;
    if (this.tagNumber == 31) {
      let n = new Int10();
      do {
        buf = stream.get();
        n.mulAdd(128, buf & 127);
      } while (buf & 128);
      this.tagNumber = n.simplify();
    }
  }
  isUniversal() {
    return this.tagClass === 0;
  }
  isEOC() {
    return this.tagClass === 0 && this.tagNumber === 0;
  }
}
class ASN1 {
  constructor(stream, header, length2, tag, tagLen, sub) {
    if (!(tag instanceof ASN1Tag)) throw new Error("Invalid tag value.");
    this.stream = stream;
    this.header = header;
    this.length = length2;
    this.tag = tag;
    this.tagLen = tagLen;
    this.sub = sub;
  }
  typeName() {
    switch (this.tag.tagClass) {
      case 0:
        switch (this.tag.tagNumber) {
          case 0:
            return "EOC";
          case 1:
            return "BOOLEAN";
          case 2:
            return "INTEGER";
          case 3:
            return "BIT_STRING";
          case 4:
            return "OCTET_STRING";
          case 5:
            return "NULL";
          case 6:
            return "OBJECT_IDENTIFIER";
          case 7:
            return "ObjectDescriptor";
          case 8:
            return "EXTERNAL";
          case 9:
            return "REAL";
          case 10:
            return "ENUMERATED";
          case 11:
            return "EMBEDDED_PDV";
          case 12:
            return "UTF8String";
          case 13:
            return "RELATIVE_OID";
          case 16:
            return "SEQUENCE";
          case 17:
            return "SET";
          case 18:
            return "NumericString";
          case 19:
            return "PrintableString";
          // ASCII subset
          case 20:
            return "TeletexString";
          // aka T61String
          case 21:
            return "VideotexString";
          case 22:
            return "IA5String";
          // ASCII
          case 23:
            return "UTCTime";
          case 24:
            return "GeneralizedTime";
          case 25:
            return "GraphicString";
          case 26:
            return "VisibleString";
          // ASCII subset
          case 27:
            return "GeneralString";
          case 28:
            return "UniversalString";
          case 30:
            return "BMPString";
        }
        return "Universal_" + this.tag.tagNumber.toString();
      case 1:
        return "Application_" + this.tag.tagNumber.toString();
      case 2:
        return "[" + this.tag.tagNumber.toString() + "]";
      // Context
      case 3:
        return "Private_" + this.tag.tagNumber.toString();
    }
  }
  /** A string preview of the content (intended for humans). */
  content(maxLength) {
    if (this.tag === void 0) return null;
    if (maxLength === void 0) maxLength = Infinity;
    let content2 = this.posContent(), len = Math.abs(this.length);
    if (!this.tag.isUniversal()) {
      if (this.sub !== null) return "(" + this.sub.length + " elem)";
      let d1 = this.stream.parseOctetString(content2, content2 + len, maxLength);
      return "(" + d1.size + " byte)\n" + d1.str;
    }
    switch (this.tag.tagNumber) {
      case 1:
        return this.stream.get(content2) === 0 ? "false" : "true";
      case 2:
        return this.stream.parseInteger(content2, content2 + len);
      case 3: {
        let d2 = recurse(this, "parseBitString", maxLength);
        return "(" + d2.size + " bit)\n" + d2.str;
      }
      case 4: {
        let d2 = recurse(this, "parseOctetString", maxLength);
        return "(" + d2.size + " byte)\n" + d2.str;
      }
      //case 0x05: // NULL
      case 6:
        return this.stream.parseOID(content2, content2 + len, maxLength);
      //case 0x07: // ObjectDescriptor
      //case 0x08: // EXTERNAL
      //case 0x09: // REAL
      case 10:
        return this.stream.parseInteger(content2, content2 + len);
      //case 0x0B: // EMBEDDED_PDV
      case 13:
        return this.stream.parseRelativeOID(content2, content2 + len, maxLength);
      case 16:
      // SEQUENCE
      case 17:
        if (this.sub !== null) return "(" + this.sub.length + " elem)";
        else return "(no elem)";
      case 12:
        return recurse(this, "parseStringUTF", maxLength).str;
      case 20:
        return recurse(this, "parseStringT61", maxLength).str;
      case 18:
      // NumericString
      case 19:
      // PrintableString
      case 21:
      // VideotexString
      case 22:
      // IA5String
      case 26:
      // VisibleString
      case 27:
        return recurse(this, "parseStringISO", maxLength).str;
      case 30:
        return recurse(this, "parseStringBMP", maxLength).str;
      case 23:
      // UTCTime
      case 24:
        return this.stream.parseTime(content2, content2 + len, this.tag.tagNumber == 23);
    }
    return null;
  }
  toString() {
    return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (this.sub === null ? "null" : this.sub.length) + "]";
  }
  toPrettyString(indent) {
    if (indent === void 0) indent = "";
    let s = indent;
    if (this.def) {
      if (this.def.id) s += this.def.id + " ";
      if (this.def.name && this.def.name != this.typeName().replace(/_/g, " ")) s += this.def.name + " ";
      if (this.def.mismatch) s += "[?] ";
    }
    s += this.typeName() + " @" + this.stream.pos;
    if (this.length >= 0) s += "+";
    s += this.length;
    if (this.tag.tagConstructed) s += " (constructed)";
    else if (this.tag.isUniversal() && (this.tag.tagNumber == 3 || this.tag.tagNumber == 4) && this.sub !== null)
      s += " (encapsulates)";
    let content2 = this.content();
    if (content2) s += ": " + content2.replace(/\n/g, "|");
    s += "\n";
    if (this.sub !== null) {
      indent += "  ";
      for (let i = 0, max2 = this.sub.length; i < max2; ++i) s += this.sub[i].toPrettyString(indent);
    }
    return s;
  }
  posStart() {
    return this.stream.pos;
  }
  posContent() {
    return this.stream.pos + this.header;
  }
  posEnd() {
    return this.stream.pos + this.header + Math.abs(this.length);
  }
  /** Position of the length. */
  posLen() {
    return this.stream.pos + this.tagLen;
  }
  /** Hexadecimal dump of the node.
   * @param type 'raw', 'byte' or 'dump' */
  toHexString(type2 = "raw") {
    return this.stream.hexDump(this.posStart(), this.posEnd(), type2);
  }
  /** Base64 dump of the node. */
  toB64String() {
    return this.stream.b64Dump(this.posStart(), this.posEnd());
  }
  static decodeLength(stream) {
    let buf = stream.get(), len = buf & 127;
    if (len == buf)
      return len;
    if (len === 0)
      return null;
    if (len > 6)
      throw new Error("Length over 48 bits not supported at position " + (stream.pos - 1));
    buf = 0;
    for (let i = 0; i < len; ++i) buf = buf * 256 + stream.get();
    return buf;
  }
  static decode(stream, offset2, type2 = ASN1) {
    if (!(type2 == ASN1 || type2.prototype instanceof ASN1)) throw new Error("Must pass a class that extends ASN1");
    if (!(stream instanceof Stream)) stream = new Stream(stream, offset2 || 0);
    let streamStart = new Stream(stream), tag = new ASN1Tag(stream), tagLen = stream.pos - streamStart.pos, len = ASN1.decodeLength(stream), start2 = stream.pos, header = start2 - streamStart.pos, sub = null, getSub = function() {
      sub = [];
      if (len !== null) {
        let end2 = start2 + len;
        if (end2 > stream.enc.length)
          throw new Error(
            "Container at offset " + start2 + " has a length of " + len + ", which is past the end of the stream"
          );
        while (stream.pos < end2) sub[sub.length] = type2.decode(stream);
        if (stream.pos != end2) throw new Error("Content size is not correct for container at offset " + start2);
      } else {
        try {
          for (; ; ) {
            let s = type2.decode(stream);
            if (s.tag.isEOC()) break;
            sub[sub.length] = s;
          }
          len = start2 - stream.pos;
        } catch (e2) {
          throw new Error("Exception while decoding undefined length content at offset " + start2 + ": " + e2);
        }
      }
    };
    if (tag.tagConstructed) {
      getSub();
    } else if (tag.isUniversal() && (tag.tagNumber == 3 || tag.tagNumber == 4)) {
      try {
        if (tag.tagNumber == 3) {
          if (stream.get() != 0) throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
        }
        getSub();
        for (let s of sub) {
          if (s.tag.isEOC()) throw new Error("EOC is not supposed to be actual content.");
          try {
            s.content();
          } catch (e2) {
            throw new Error("Unable to parse content: " + e2);
          }
        }
      } catch (e2) {
        sub = null;
      }
    }
    if (sub === null) {
      if (len === null) throw new Error("We can't skip over an invalid tag with undefined length at offset " + start2);
      stream.pos = start2 + Math.abs(len);
    }
    return new type2(streamStart, header, len, tag, tagLen, sub);
  }
}
function subject(n, name) {
  var value;
  if (n && name && Array.isArray(n.sub) && n.sub.length === 3 && Array.isArray(n.sub[0].sub) && n.sub[0].sub.length >= 8) {
    var subj = n.sub[0].sub[5];
    if (subj && Array.isArray(subj.sub)) {
      for (var i = 0; i < subj.sub.length; i++) {
        var oid = subj.sub[i].sub[0].sub[0].content();
        var off = oid.indexOf("\n");
        if (off >= 0) {
          oid = oid.substring(0, off);
        }
        if (oid === name) {
          value = subj.sub[i].sub[0].sub[1].content();
          break;
        }
      }
    }
  }
  return value;
}
function uuid() {
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(c) {
    var r2 = Math.random() * 16 | 0, v2 = c == "x" ? r2 : r2 & 3 | 8;
    return v2.toString(16);
  });
}
function webkcryptdata(method, args) {
  var data = {
    type: "webkcrypt-invoke",
    uuid: uuid(),
    invoke: {
      method
    }
  };
  if (args) {
    data.invoke.args = args;
  }
  return data;
}
function WebkcryptCallback2(uuid2, callback) {
  this.callback = callback;
  this.uuid = uuid2;
  this.handle = (event) => {
    var handled = false;
    if (event && event.data) {
      if (event.data["type"] && event.data.type == "webkcrypt-reply") {
        if (event.data["uuid"] && event.data.uuid == this.uuid) {
          handled = this.callback(event);
          if (handled) {
            window.removeEventListener("message", this.handle);
          }
        }
      }
    }
  };
}
function webkcrypt_invoke(method, args, callback) {
  var data = webkcryptdata(method, args);
  if (callback) {
    window.addEventListener("message", new WebkcryptCallback2(data.uuid, callback).handle, false);
  }
  window.postMessage(data, "*");
}
function CallbackResult(data, timeoutms = 9e4) {
  this.uuid = data.requestId;
  this.value = new Promise((resolve, reject) => {
    this.callback = { resolve, reject };
    if (timeoutms > 0) {
      this.timer = setTimeout(() => {
        reject(void 0);
      }, timeoutms);
    }
  });
  this.handle = (event) => {
    if (event && event.data) {
      if (event.data["type"] && event.data.type == "workspace-response") {
        if (event.data["requestId"] && event.data.requestId == this.uuid) {
          clearTimeout(this.timer);
          window.removeEventListener("message", this.handle);
          if (typeof event.data.result === "object" && event.data.result !== null) {
            data = event.data.result;
          } else {
            data = event.data;
          }
          this.callback.resolve(data.result);
        }
      }
    }
  };
  window.addEventListener("message", this.handle, false);
  window.postMessage(data, "*");
}
function CallbackResult2(value) {
  this.value = value;
}
function webkcrypt_check_promise() {
  return new Promise((resolve, reject) => {
    var el = document.getElementById("WorkspaceEx");
    if (el) {
      if (el.getAttribute("is-installed") === "true") {
        var p2 = new Promise((resolve2, reject2) => {
          webkcrypt_invoke("webkcrypt-about", null, (event) => {
            resolve2(event);
          });
          setTimeout(() => {
            reject2(void 0);
          }, 9e4);
        });
        p2.then((value) => {
          resolve(value);
        }).catch((e2) => {
          reject(e2);
        });
      } else {
        reject(failed_no_plugin());
      }
    } else {
      reject(failed_no_plugin());
    }
  });
}
function webkcrypt_plain_text_certificate_list() {
  var data = {
    type: "workspace-request",
    requestId: uuid(),
    params: {
      command: "certList"
    }
  };
  var p2 = new CallbackResult(data);
  return p2;
}
function webkcrypt_make_pkcs7_signature(sn, data, detached = true, check = false) {
  var data = {
    type: "workspace-request",
    requestId: uuid(),
    params: {
      command: "sign",
      format: "CMS",
      type: detached ? "detached" : "",
      serialNumber: sn,
      data
    }
  };
  var p2 = new CallbackResult(data);
  return p2;
}
function webkcrypt_about() {
  var p2 = new Promise((resolve, reject) => {
    webkcrypt_invoke("webkcrypt-about", null, (event) => {
      var value = {};
      var data = event.data;
      if (data["invoke"]) {
        if (data.invoke["out"]) {
          value.plugin = data.invoke.out.plugin;
          value.hostapp = {};
          value.hostapp.version = {};
          value.hostapp.version.value = data.invoke.out.webkcrypt.version.value;
        }
      }
      resolve(value);
    });
    setTimeout(() => {
      reject(void 0);
    }, 9e4);
  });
  var callback2 = new CallbackResult2(p2);
  return callback2;
}
function webkcrypt_make_soap_xmldsig(sn, data, xpath = "", check = false) {
  var data = {
    type: "workspace-request",
    requestId: uuid(),
    params: {
      command: "fssSign",
      format: "XMLDsig",
      type: "attached",
      serialNumber: sn,
      data,
      xPath: xpath
    }
  };
  var p2 = new CallbackResult(data);
  return p2;
}
function webkcrypt_make_soap_xml_encrypt(sn, data, other) {
  var data = {
    type: "workspace-request",
    requestId: uuid(),
    params: {
      command: "fssEncryptXml",
      serialNumber: sn,
      data,
      fssCert: other
    }
  };
  var p2 = new CallbackResult(data);
  return p2;
}
function webkcrypt_make_soap_xml_decrypt(sn, data) {
  var data = {
    type: "workspace-request",
    requestId: uuid(),
    params: {
      command: "fssDecryptXml",
      serialNumber: sn,
      data
    }
  };
  var p2 = new CallbackResult(data);
  return p2;
}
function webkcrypt_make_image_scan() {
  var data = {
    type: "workspace-request",
    requestId: uuid(),
    params: {
      command: "scan"
    }
  };
  var p2 = new CallbackResult(data);
  return p2;
}
function webkcrypt_xml_text_certificate_list() {
  var data = {
    type: "workspace-request",
    requestId: uuid(),
    params: {
      command: "certListAsXml"
    }
  };
  var p2 = new CallbackResult(data);
  return p2;
}
function webkcrypt_x509_load_by_serial(sn, store = "My", sys = 0) {
  var p2 = new Promise((resolve, reject) => {
    var data = {};
    data["serial-number"] = sn;
    data["store"] = store;
    data["sys"] = sys;
    webkcrypt_invoke("webkcrypt-x509-load-by-serial", data, (event) => {
      var value = {};
      var data2 = event.data;
      console.log(event);
      if (data2["invoke"]) {
        if (data2.invoke["out"]) {
          value = data2.invoke.out;
        }
      }
      resolve(value);
    });
    setTimeout(() => {
      reject(void 0);
    }, 5e3);
  });
  var callback2 = new CallbackResult2(p2);
  return callback2;
}
function webkcrypt_initialize() {
  window.webkcrypt["type"] = "webkcrypt";
  window.webkcrypt.plain_text_certificate_list = webkcrypt_plain_text_certificate_list;
  window.webkcrypt.make_pkcs7_signature = webkcrypt_make_pkcs7_signature;
  window.webkcrypt.about = webkcrypt_about;
  window.webkcrypt.make_soap_xmldsig = webkcrypt_make_soap_xmldsig;
  window.webkcrypt.make_soap_xml_encrypt = webkcrypt_make_soap_xml_encrypt;
  window.webkcrypt.make_soap_xml_decrypt = webkcrypt_make_soap_xml_decrypt;
  window.webkcrypt.make_image_scan = webkcrypt_make_image_scan;
  window.webkcrypt.xml_text_certificate_list = webkcrypt_xml_text_certificate_list;
  window.webkcrypt.x509_load_by_serial = webkcrypt_x509_load_by_serial;
}
function failed_no_plugin() {
  var text = "Не удалось подключиться к расширению. Возможные причины: \n  1. Расширение не установлено;\n  2. Расширение установлено, но отключено;\n  3. Расширение включено, но страница не была обновлена;\n  4. У расширения нет прав для работы с данной страницей (адресом).";
  return text;
}
function patch_failed_no_plugin() {
  window.webkcrypt["type"] = "none";
  window.webkcrypt.plain_text_certificate_list = function() {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_no_plugin());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.make_pkcs7_signature = function(sn, data, detached = true, check = false) {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_no_plugin());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.about = function() {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_no_plugin());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.make_soap_xmldsig = function(sn, data, xpath = "", check = false) {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_no_plugin());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.make_soap_xml_encrypt = function(sn, data, other) {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_need_plugin_replace());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.make_soap_xml_decrypt = function(sn, data) {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_need_plugin_replace());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.make_image_scan = function() {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_need_plugin_replace());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.xml_text_certificate_list = function() {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_need_plugin_replace());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
  window.webkcrypt.x509_load_by_serial = function(sn, store = "My", sys = 0) {
    var p2 = new Promise((resolve, reject) => {
      reject(failed_no_plugin());
    });
    var callback2 = new CallbackResult2(p2);
    return callback2;
  };
}
function failed_need_plugin_replace() {
  var text = "Для использования расширенного криптографического функционала необходимо:\n  1. Запретить или удалить текущий плагин от Крипто-Про (Cades);\n  2. Установить специализированный плагин для АС 'Сметы'.";
  return text;
}
function webkcrypt_create() {
  if (window.webkcrypt) {
    return;
  }
  var webkcrypt = {
    type: void 0
  };
  window.webkcrypt = webkcrypt;
  var p2 = new Promise((resolve, reject) => {
    if (!!cadesplugin) {
      webkcrypt["type"] = "cades";
      cadesplugin.then((value) => {
        webkcrypt.plain_text_certificate_list = function() {
          var p3 = new Promise((resolve2, reject2) => {
            cadesplugin.async_spawn(function* (args) {
              var store;
              try {
                store = yield cadesplugin.CreateObjectAsync("CAdESCOM.Store");
                yield store.Open(
                  cadesplugin.CAPICOM_CURRENT_USER_STORE,
                  cadesplugin.CAPICOM_MY_STORE,
                  cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED
                );
                var listof = yield store.Certificates;
                var total = yield listof.Count;
                var value2 = "";
                for (var i = 1; total >= i; i++) {
                  var c = yield listof.Item(i);
                  var sn = yield c.SerialNumber;
                  if (sn) {
                    value2 += sn;
                  }
                  value2 += ";";
                  if (yield c.HasPrivateKey()) {
                    value2 += "Личный";
                  } else {
                    value2 += "Публичный";
                  }
                  value2 += ";";
                  var cn2 = yield c.GetInfo(cadesplugin.CAPICOM_CERT_INFO_SUBJECT_SIMPLE_NAME);
                  if (cn2) {
                    value2 += cn2;
                  }
                  value2 += ";";
                  var year2, month, day, hours, minutes, seconds;
                  var validfrom = new Date(yield c.ValidFromDate);
                  if (validfrom) {
                    year2 = validfrom.getFullYear().toString();
                    month = ("0" + (validfrom.getMonth() + 1).toString()).slice(-2);
                    day = ("0" + validfrom.getDate().toString()).slice(-2);
                    value2 += `${day}.${month}.${year2}`;
                  }
                  value2 += ";";
                  var validto = new Date(yield c.ValidToDate);
                  if (validto) {
                    year2 = validto.getFullYear().toString();
                    month = ("0" + (validto.getMonth() + 1).toString()).slice(-2);
                    day = ("0" + validto.getDate().toString()).slice(-2);
                    value2 += `${day}.${month}.${year2}`;
                  }
                  value2 += ";";
                  var der = ASN1.decode(Base64.decode(yield c.Export(cadesplugin.CADESCOM_ENCODE_BASE64)));
                  var snils = subject(der, "1.2.643.100.3");
                  if (snils) {
                    value2 += snils;
                  }
                  value2 += "\n";
                }
                yield store.Close();
                resolve2(value2);
              } catch (e2) {
                if (store) {
                  yield store.Close();
                }
                reject2(e2);
              }
            });
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.make_pkcs7_signature = function(sn, data, detached = true, check = false) {
          sn = sn.toLowerCase();
          var p3 = new Promise((resolve2, reject2) => {
            cadesplugin.async_spawn(function* (args) {
              var store;
              try {
                store = yield cadesplugin.CreateObjectAsync("CAdESCOM.Store");
                yield store.Open(
                  cadesplugin.CAPICOM_CURRENT_USER_STORE,
                  cadesplugin.CAPICOM_MY_STORE,
                  cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED
                );
                var listof = yield store.Certificates;
                var total = yield listof.Count;
                for (var i = 1; total >= i; i++) {
                  var c = yield listof.Item(i);
                  if ((yield c.SerialNumber).toLowerCase() === sn) {
                    var signer = yield cadesplugin.CreateObjectAsync("CAdESCOM.CPSigner");
                    yield signer.propset_Certificate(c);
                    yield signer.propset_CheckCertificate(check);
                    var signeddata = yield cadesplugin.CreateObjectAsync("CAdESCOM.CadesSignedData");
                    yield signeddata.propset_ContentEncoding(cadesplugin.CADESCOM_BASE64_TO_BINARY);
                    yield signeddata.propset_Content(data);
                    var value2 = yield signeddata.SignCades(signer, cadesplugin.CADESCOM_PKCS7_TYPE, detached);
                    yield store.Close();
                    resolve2(value2);
                  }
                }
                yield store.Close();
                reject2(`Сертификат с серийным номером ${sn} не найден в хранилище сертификатов.`);
              } catch (e2) {
                if (store) {
                  yield store.Close();
                }
                reject2(e2);
              }
            });
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.about = function() {
          var p3 = new Promise((resolve2, reject2) => {
            cadesplugin.async_spawn(function* (args) {
              var about = yield cadesplugin.CreateObjectAsync("CAdESCOM.About");
              var plugin = yield about.Version;
              var value2 = {};
              value2.plugin = {
                version: {
                  value: plugin
                }
              };
              resolve2(value2);
            });
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.make_soap_xmldsig = function(sn, data, xpath = "", check = false) {
          var p3 = new Promise((resolve2, reject2) => {
            reject2(failed_need_plugin_replace());
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.make_soap_xml_encrypt = function(sn, data, other) {
          var p3 = new Promise((resolve2, reject2) => {
            reject2(failed_need_plugin_replace());
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.make_soap_xml_decrypt = function(sn, data) {
          var p3 = new Promise((resolve2, reject2) => {
            reject2(failed_need_plugin_replace());
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.make_image_scan = function() {
          var p3 = new Promise((resolve2, reject2) => {
            reject2(failed_need_plugin_replace());
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.xml_text_certificate_list = function() {
          var p3 = new Promise((resolve2, reject2) => {
            reject2(failed_need_plugin_replace());
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
        webkcrypt.x509_load_by_serial = function(sn, store = "My", sys = 0) {
          sn = sn.toLowerCase();
          var p3 = new Promise((resolve2, reject2) => {
            cadesplugin.async_spawn(function* (args) {
              var st;
              try {
                st = yield cadesplugin.CreateObjectAsync("CAdESCOM.Store");
                yield st.Open(
                  cadesplugin.CAPICOM_CURRENT_USER_STORE,
                  store,
                  cadesplugin.CAPICOM_STORE_OPEN_MAXIMUM_ALLOWED
                );
                var listof = yield st.Certificates;
                var total = yield listof.Count;
                for (var i = 1; total >= i; i++) {
                  var c = yield listof.Item(i);
                  if ((yield c.SerialNumber).toLowerCase() === sn) {
                    var value2 = {
                      failed: 0,
                      value: {
                        x509: {}
                      }
                    };
                    value2.value.x509.value = yield c.Export(cadesplugin.CADESCOM_ENCODE_BASE64);
                    yield st.Close();
                    value2.value.x509.value = value2.value.x509.value.replaceAll("\r\n", "");
                    resolve2(value2);
                  }
                }
                yield st.Close();
                reject2(`Сертификат с серийным номером ${sn} не найден в хранилище сертификатов.`);
              } catch (e2) {
                if (st) {
                  yield st.Close();
                }
                reject2(e2);
              }
            });
          });
          var callback2 = new CallbackResult2(p3);
          return callback2;
        };
      }).catch((e2) => {
        reject(e2);
      });
    } else {
      reject(void 0);
    }
  });
  p2.then((value) => {
  }).catch((e2) => {
    webkcrypt["type"] = "unknown";
    webkcrypt.plain_text_certificate_list = function() {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_plain_text_certificate_list().value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.make_pkcs7_signature = function(sn, data, detached = true, check = false) {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_make_pkcs7_signature(sn, data, detached, check).value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.about = function() {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          var value = {};
          var data = event.data;
          if (data["invoke"]) {
            if (data.invoke["out"]) {
              value.plugin = data.invoke.out.plugin;
              value.hostapp = {};
              value.hostapp.version = {};
              value.hostapp.version.value = data.invoke.out.webkcrypt.version.value;
            }
          }
          resolve(value);
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.make_soap_xmldsig = function(sn, data, xpath = "", check = false) {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_make_soap_xmldsig(sn, data, xpath, check).value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.make_soap_xml_encrypt = function(sn, data, other) {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_make_soap_xml_encrypt(sn, data, other).value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.make_soap_xml_decrypt = function(sn, data) {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_make_soap_xml_decrypt(sn, data).value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.make_image_scan = function() {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_make_image_scan().value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.xml_text_certificate_list = function() {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_xml_text_certificate_list().value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
    webkcrypt.x509_load_by_serial = function(sn, store = "My", sys = 0) {
      var p3 = new Promise((resolve, reject) => {
        var p4 = webkcrypt_check_promise();
        p4.then((event) => {
          webkcrypt_initialize();
          webkcrypt_x509_load_by_serial(sn, store, sys).value.then((value) => {
            resolve(value);
          }).catch((e3) => {
            reject(e3);
          });
        }).catch((e3) => {
          patch_failed_no_plugin();
          reject(e3);
        });
      });
      var callback2 = new CallbackResult2(p3);
      return callback2;
    };
  });
}
const main = "_main_h9dde_1";
const wrapperStyles = {
  main
};
const cardSignInStyle = "_cardSignInStyle_9v6aa_1";
const SignInStyles = {
  cardSignInStyle
};
const LkNavigateButton = () => {
  const navigate = useNavigate();
  const onCardClick = () => {
    navigate("/lk");
  };
  return /* @__PURE__ */ jsxRuntimeExports.jsx(
    Grid22,
    {
      container: true,
      direction: "row",
      sx: {
        justifyContent: "center",
        alignItems: "center",
        width: "100%"
      },
      children: /* @__PURE__ */ jsxRuntimeExports.jsx(Card, { className: clsx$3(SignInStyles.cardSignInStyle), children: /* @__PURE__ */ jsxRuntimeExports.jsxs(CardActionArea, { onClick: onCardClick, children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(CardMedia, { component: "img", image: "logo.png", sx: { p: 2 } }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(CardContent, { sx: { textAlign: "center" }, children: "Вход в Личный Кабинет" })
      ] }) })
    }
  );
};
const SignInWrapper = () => {
  var _a2, _b;
  const config2 = useAtomValue(appConfig);
  if (!((_b = (_a2 = config2 == null ? void 0 : config2.smeta) == null ? void 0 : _a2.signOptions) == null ? void 0 : _b.splitSignIn)) return /* @__PURE__ */ jsxRuntimeExports.jsx(SignIn, {});
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(
    Grid22,
    {
      container: true,
      direction: "row",
      sx: {
        justifyContent: "center",
        alignItems: "center",
        height: "100%"
      },
      children: [
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, sx: { width: "49.5%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(LkNavigateButton, {}) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, sx: { height: "70%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Divider, { flexItem: true, variant: "fullWidth", orientation: "vertical", sx: { height: "100%" } }) }),
        /* @__PURE__ */ jsxRuntimeExports.jsx(Grid22, { item: true, sx: { width: "49.5%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SignIn, {}) })
      ]
    }
  );
};
reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => SingIn), true ? void 0 : void 0, import.meta.url));
const WrapperRightSide = reactExports.lazy(() => __vitePreload(() => Promise.resolve().then(() => WrapperMainFile), true ? void 0 : void 0, import.meta.url));
const SignInLK = reactExports.lazy(() => __vitePreload(() => import("./SignIn-BbTs8zBq.js").then((n) => n.S), true ? [] : void 0, import.meta.url));
const SignUpUmi = reactExports.lazy(() => __vitePreload(() => import("./SignUpUMI-oXBpHd2G.js"), true ? __vite__mapDeps([34,35,36]) : void 0, import.meta.url));
const SignUp = reactExports.lazy(() => __vitePreload(() => import("./SignUp-C1Cc_mR9.js"), true ? __vite__mapDeps([37,36,35]) : void 0, import.meta.url));
const RestorePassword = reactExports.lazy(() => __vitePreload(() => import("./RestorePassword-CHcueK5R.js"), true ? __vite__mapDeps([38,36]) : void 0, import.meta.url));
const NotFound = reactExports.lazy(() => __vitePreload(() => import("./NotFound-C0AF2dcI.js"), true ? [] : void 0, import.meta.url));
React.createContext("");
function showNotif() {
  const config2 = smetaStore.get(appConfig);
  if (config2.lk.checkNotifyme === true && config2.lk.textContentNotifyme) {
    const div = document.createElement("div");
    const closeDiv = document.createElement("div");
    closeDiv.id = "close";
    closeDiv.onclick = () => {
      div.style.display = "none";
    };
    div.id = "notifyme";
    div.className = "display";
    const content2 = `<p>Уважаемые пользователи!</p>
    ${config2.lk.textContentNotifyme}`;
    div.innerHTML = content2;
    div.appendChild(closeDiv);
    document.body.appendChild(div);
  }
}
async function logErrorToDatabase(error) {
  console.log(error);
  const errorObj = {
    filename: error.filename,
    line: error.lineno,
    message: error.message
  };
  await saveDataBD("smeta", "errors", errorObj);
}
const snowActive = () => {
  const snowflakes = document.querySelector(".snowflakes-box");
  const snowball = document.querySelector(".snowball-box");
  return snowflakes && snowball;
};
const Wrapper = () => {
  const [config2, setConfig] = useAtom(appConfig);
  const [checkedSession, setCheckedSession] = reactExports.useState(false);
  const [loadConfig, setLoadConfig] = reactExports.useState(true);
  const setIsAutorized = useSetAtom(isAuthorized);
  const checkSessionActive = async () => {
    const sessionInfo = await isSessionActive();
    const licGUID = sessionInfo.licGUID;
    if (licGUID) {
      sessionStorage.setItem("LicG", licGUID);
    }
    if (!sessionInfo.active) {
      localStorage.setItem("login", "");
    }
    setIsAutorized(sessionInfo.active);
    setCheckedSession(true);
  };
  const uploadConfig = async () => {
    try {
      const baseUrl2 = getBaseUrl();
      const response = await axios.get(`${baseUrl2}config.json`);
      const responseConfig = response.data;
      if (typeof responseConfig === "object" && !isEmptyObject(responseConfig)) {
        const {
          smeta: { multiSession }
        } = responseConfig;
        const finalConfig = {
          ...responseConfig,
          smeta: {
            ...responseConfig.smeta,
            stimateVersion: config2.smeta.stimateVersion,
            multiSession: multiSession === void 0 ? true : multiSession
          }
        };
        setConfig(finalConfig);
        return finalConfig;
      }
    } catch (error) {
      console.warn(error.message);
    } finally {
      setLoadConfig(false);
    }
  };
  const smetaWebInitialization = async () => {
    webkcrypt_globals();
    cadesplugin_api();
    webkcrypt_create();
    const config22 = await uploadConfig();
    await checkSessionActive();
    if (!snowActive() && config22)
      new Snow({
        showSnowBalls: config22.lk.baseUmi !== "1"
      });
    window.addEventListener("error", logErrorToDatabase);
  };
  reactExports.useEffect(() => {
    smetaWebInitialization();
    return () => {
      window.removeEventListener("error", logErrorToDatabase);
    };
  }, []);
  String.prototype.replaceAt = function(index2, replacement) {
    return this.substring(0, index2) + replacement + this.substring(index2 + replacement.length);
  };
  function detectMob() {
    const toMatch = [/Android/i, /webOS/i, /iPhone/i, /iPad/i, /iPod/i, /BlackBerry/i, /Windows Phone/i];
    return toMatch.some((toMatchItem) => {
      return navigator.userAgent.match(toMatchItem);
    });
  }
  window.onload = function() {
    webkcrypt_invoke$1("webkcrypt-check-updates", null, (event) => {
    });
    showNotif();
  };
  if (!checkedSession || loadConfig) return /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {});
  if (config2 && config2.lk && config2.lk.baseUmi !== "1" && detectMob() && window.innerWidth < 650) {
    return /* @__PURE__ */ jsxRuntimeExports.jsx(CheckMobile, {});
  } else {
    const routes = /* @__PURE__ */ jsxRuntimeExports.jsxs(Routes, { children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Route,
        {
          path: "/",
          element: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: config2.smeta.hideEnter !== void 0 && config2.smeta.hideEnter === true ? /* @__PURE__ */ jsxRuntimeExports.jsx(SignInLK, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(SignInWrapper, {}) })
        }
      ),
      config2.smeta.hideEnter !== true && /* @__PURE__ */ jsxRuntimeExports.jsx(
        Route,
        {
          path: "/lk",
          element: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(SignInLK, {}) })
        }
      ),
      config2.lk.baseUmi === "1" && /* @__PURE__ */ jsxRuntimeExports.jsx(
        Route,
        {
          path: "/restorepassword",
          element: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(RestorePassword, {}) })
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Route,
        {
          path: "/signup",
          element: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: config2.lk.baseUmi === "1" ? /* @__PURE__ */ jsxRuntimeExports.jsx(SignUpUmi, {}) : /* @__PURE__ */ jsxRuntimeExports.jsx(SignUp, {}) })
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Route,
        {
          path: "/main",
          element: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(WrapperRightSide, {}) }) })
        }
      ),
      /* @__PURE__ */ jsxRuntimeExports.jsx(
        Route,
        {
          path: "*",
          element: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: /* @__PURE__ */ jsxRuntimeExports.jsx(LoadingMask, {}), children: /* @__PURE__ */ jsxRuntimeExports.jsx(NotFound, {}) }) })
        }
      )
    ] });
    return /* @__PURE__ */ jsxRuntimeExports.jsx("main", { className: clsx$3(wrapperStyles.main), children: config2.smeta.basename && config2.smeta.basename !== "«»" ? /* @__PURE__ */ jsxRuntimeExports.jsx(BrowserRouter, { basename: config2.smeta.basename, children: routes }) : /* @__PURE__ */ jsxRuntimeExports.jsx(HashRouter, { children: routes }) });
  }
};
function StyleSmetaComponents() {
  const theme = smetaStore.get(currentTheme);
  return /* @__PURE__ */ jsxRuntimeExports.jsx("style", { children: `
    :root {
    // --indicatorColor: #faf9f5;
    --accent-blue: rgb(98, 142, 184);
    --bg-blue:#f8f8f8;
    --accent-light:#faf9f5;
    --font-color-blue:#ffffff;
    --bg-light:#faf9f5;
    --selected-light:#dcd8cc;
    --font-color-light:#616161;
    --accordion-light: #dcd8cc;
    --header-light: #dcd8cc;
    --iconButtonColor: #ffffff;
    --iconButtonColor-light:#616161;
    --iconColorStimate: rgb(4, 4, 4);
    --iconColorStimate-light: rgb(179, 173, 151);
    --darker-light:#c6ba97;
}
.setfont
{
    font: 300 13px/19px 'Open Sans','Helvetica Neue',helvetica,arial,verdana,sans-serif;
    letter-spacing :0px;
}
.ellipsis
{
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
.hidden{
    display:none !important;
}

.date-range{
    background-color: rgba(25, 118, 210, 0.12);
    border-radius:0;
    margin:0;
    width:40px;
}

.date-range-light{
    background-color: #eeeeee;
    border-radius:0;
    margin:0;
    width:40px;
}

.date-range-start{
    background-color: #1976d2 !important;
    border-radius: 0;
    margin:0;
    width:40px;
}

.date-range-start-light{
    background-color: rgb(220, 216, 204) !important;
    border-radius: 0;
    margin:0;
    width:40px;
}
${theme === "light" ? `
    .Mui-selected{
    color: #000000 !important;
    background-color: rgb(220, 216, 204) !important;
    font-weight: 500;
    }
    ` : `
    .Mui-selected{
    color: #fff;
    background-color: #1976d2;
    font-weight: 500;
    }
    `}

.date-range-end{
    background-color: #1976d2 !important;
    border-radius: 0;
    margin:0;
    width:40px;
}
.date-range-end-light{
    background-color: rgb(220, 216, 204) !important;
    border-radius: 0;
    margin:0;
    width:40px;
}

.date-range-current{
    outline: 1px solid;
    }

input[type=date]::-webkit-calendar-picker-indicator {
    background-image: url("data:image/svg+xml;base64,77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMjYgMjYiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+DQogIDxwYXRoIGQ9Ik03IDBDNi40NDkyMTkgMCA2IDAuNDQ5MjE5IDYgMUw2IDRDNiA0LjU1MDc4MSA2LjQ0OTIxOSA1IDcgNUM3LjU1MDc4MSA1IDggNC41NTA3ODEgOCA0TDggMUM4IDAuNDQ5MjE5IDcuNTUwNzgxIDAgNyAwIFogTSAxOSAwQzE4LjQ0OTIxOSAwIDE4IDAuNDQ5MjE5IDE4IDFMMTggNEMxOCA0LjU1MDc4MSAxOC40NDkyMTkgNSAxOSA1QzE5LjU1MDc4MSA1IDIwIDQuNTUwNzgxIDIwIDRMMjAgMUMyMCAwLjQ0OTIxOSAxOS41NTA3ODEgMCAxOSAwIFogTSAzIDJDMS4zNDM3NSAyIDAgMy4zNDM3NSAwIDVMMCAyM0MwIDI0LjY1NjI1IDEuMzQzNzUgMjYgMyAyNkwyMyAyNkMyNC42NTYyNSAyNiAyNiAyNC42NTYyNSAyNiAyM0wyNiA1QzI2IDMuMzQzNzUgMjQuNjU2MjUgMiAyMyAyTDIxIDJMMjEgNEMyMSA1LjEwMTU2MyAyMC4xMDU0NjkgNiAxOSA2QzE3Ljg5NDUzMSA2IDE3IDUuMTAxNTYzIDE3IDRMMTcgMkw5IDJMOSA0QzkgNS4xMDE1NjMgOC4xMDU0NjkgNiA3IDZDNS44OTQ1MzEgNiA1IDUuMTAxNTYzIDUgNEw1IDIgWiBNIDIgOUwyNCA5TDI0IDIzQzI0IDIzLjU1MDc4MSAyMy41NTA3ODEgMjQgMjMgMjRMMyAyNEMyLjQ0OTIxOSAyNCAyIDIzLjU1MDc4MSAyIDIzIFogTSA0LjM0Mzc1IDExQzQuMTI4OTA2IDExLjA3MDMxMyAzLjk4ODI4MSAxMS4yNzM0MzggNCAxMS41TDQgMTQuMjE4NzVDMy44ODY3MTkgMTQuMzkwNjI1IDMuODg2NzE5IDE0LjYwOTM3NSA0IDE0Ljc4MTI1TDQgMTguMjgxMjVDMy45MzM1OTQgMTguNDE3OTY5IDMuOTMzNTk0IDE4LjU4MjAzMSA0IDE4LjcxODc1TDQgMjEuNUM0IDIxLjc3NzM0NCA0LjIyMjY1NiAyMiA0LjUgMjJMMjEuNSAyMkMyMS43NzczNDQgMjIgMjIgMjEuNzc3MzQ0IDIyIDIxLjVMMjIgMTguNjI1QzIyLjAxNTYyNSAxOC41NTQ2ODggMjIuMDE1NjI1IDE4LjQ3NjU2MyAyMiAxOC40MDYyNUwyMiAxNC42MjVDMjIuMDE1NjI1IDE0LjU1NDY4OCAyMi4wMTU2MjUgMTQuNDc2NTYzIDIyIDE0LjQwNjI1TDIyIDExLjVDMjIgMTEuMjIyNjU2IDIxLjc3NzM0NCAxMSAyMS41IDExTDQuNSAxMUM0LjQ2ODc1IDEwLjk5NjA5NCA0LjQzNzUgMTAuOTk2MDk0IDQuNDA2MjUgMTFDNC4zODY3MTkgMTEgNC4zNjMyODEgMTEgNC4zNDM3NSAxMSBaIE0gNSAxMkw4IDEyTDggMTMuMDkzNzVDNy41NjY0MDYgMTMuMjQyMTg4IDcuMjQyMTg4IDEzLjU2NjQwNiA3LjA5Mzc1IDE0TDUgMTQgWiBNIDkgMTJMMTMgMTJMMTMgMTNMOSAxMyBaIE0gMTQgMTJMMTcgMTJMMTcgMTRMMTQuOTA2MjUgMTRDMTQuNzU3ODEzIDEzLjU2NjQwNiAxNC40MzM1OTQgMTMuMjQyMTg4IDE0IDEzLjA5Mzc1IFogTSAxOCAxMkwyMSAxMkwyMSAxNEwxOCAxNCBaIE0gNSAxNUw3IDE1TDcgMThMNSAxOCBaIE0gOSAxNUwxMyAxNUwxMyAxOEw5IDE4IFogTSAxNSAxNUwxNyAxNUwxNyAxOEwxNSAxOCBaIE0gMTggMTVMMjEgMTVMMjEgMThMMTggMTggWiBNIDUgMTlMNy4wOTM3NSAxOUM3LjI0MjE4OCAxOS40MzM1OTQgNy41NjY0MDYgMTkuNzU3ODEzIDggMTkuOTA2MjVMOCAyMUw1IDIxIFogTSAxNC45MDYyNSAxOUwxNyAxOUwxNyAyMUwxNCAyMUwxNCAxOS45MDYyNUMxNC40MzM1OTQgMTkuNzU3ODEzIDE0Ljc1NzgxMyAxOS40MzM1OTQgMTQuOTA2MjUgMTkgWiBNIDE4IDE5TDIxIDE5TDIxIDIxTDE4IDIxIFogTSA5IDIwTDEzIDIwTDEzIDIxTDkgMjFaIiAvPg0KPC9zdmc+");
}
    ` });
}
const Close = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"
}), "Close");
const CloseFullscreen = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M22 3.41 16.71 8.7 20 12h-8V4l3.29 3.29L20.59 2zM3.41 22l5.29-5.29L12 20v-8H4l3.29 3.29L2 20.59z"
}), "CloseFullscreen");
const OpenInFull = createSvgIcon(/* @__PURE__ */ jsxRuntimeExports.jsx("path", {
  d: "M21 11V3h-8l3.29 3.29-10 10L3 13v8h8l-3.29-3.29 10-10z"
}), "OpenInFull");
var Maximize = {};
var hasRequiredMaximize;
function requireMaximize() {
  if (hasRequiredMaximize) return Maximize;
  hasRequiredMaximize = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Maximize, "__esModule", {
    value: true
  });
  Maximize.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Maximize.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M3 3h18v2H3z"
  }), "Maximize");
  return Maximize;
}
var MaximizeExports = /* @__PURE__ */ requireMaximize();
const MaximizeIcon = /* @__PURE__ */ getDefaultExportFromCjs(MaximizeExports);
var Minimize = {};
var hasRequiredMinimize;
function requireMinimize() {
  if (hasRequiredMinimize) return Minimize;
  hasRequiredMinimize = 1;
  var _interopRequireDefault = requireInteropRequireDefault();
  Object.defineProperty(Minimize, "__esModule", {
    value: true
  });
  Minimize.default = void 0;
  var _createSvgIcon = _interopRequireDefault(/* @__PURE__ */ requireCreateSvgIcon());
  var _jsxRuntime = requireJsxRuntime();
  Minimize.default = (0, _createSvgIcon.default)(/* @__PURE__ */ (0, _jsxRuntime.jsx)("path", {
    d: "M6 19h12v2H6z"
  }), "Minimize");
  return Minimize;
}
var MinimizeExports = /* @__PURE__ */ requireMinimize();
const MinimizeIcon = /* @__PURE__ */ getDefaultExportFromCjs(MinimizeExports);
const getContentButtonEl = (propsButtons, buttonsContext) => {
  var _a2;
  let contentButtonEl;
  if (typeof propsButtons === "number") {
    contentButtonEl = { Buttons: propsButtons, jsonData: {}, disabledButtons: {} };
  } else if (typeof propsButtons === "object") {
    contentButtonEl = {
      Buttons: Number(((_a2 = propsButtons.Params) == null ? void 0 : _a2.Buttons) || propsButtons.Buttons || 0),
      jsonData: propsButtons.jsonData || {},
      disabledButtons: propsButtons.disabledButtons || {}
    };
  } else {
    contentButtonEl = {
      Buttons: Button$1.Ok + Button$1.Cancel,
      jsonData: { Кнопка$Выбрать: "Выбрать" },
      disabledButtons: {}
    };
  }
  Object.entries(buttonsContext).forEach(([key, value]) => {
    const keyButton = Number(key);
    if (!(contentButtonEl.Buttons & keyButton)) contentButtonEl.Buttons += keyButton;
    if (value.disabled !== void 0) contentButtonEl.disabledButtons[keyButton] = value.disabled;
    if (value.label !== void 0) contentButtonEl.jsonData[buttonLabels[keyButton]] = value.label;
  });
  return contentButtonEl;
};
const calculateNewPosition = (prevPos, initialWindowSize, initialSize, currentWindowSize) => {
  let newPos = prevPos / (initialWindowSize - initialSize) * (currentWindowSize - initialSize);
  if (isNaN(newPos) || newPos < 0) newPos = 0;
  return newPos;
};
function ModalWindows(props) {
  const theme = useAtomValue(currentTheme);
  const style2 = props.style || {};
  const modalRef = reactExports.useRef(null);
  const parentElRef = reactExports.useRef(null);
  const resizeContainerRef = reactExports.useRef(null);
  const [hideModalFeedback, setHideModalFeedback] = reactExports.useState(true);
  const modalFeedbackRef = reactExports.useRef(null);
  const posStartDrag = { x: 0, y: 0, left: 0, top: 0 };
  const posBeforeMax = reactExports.useRef({ top: 0, left: 0 });
  const size = reactExports.useRef({ height: "", width: "" });
  const [fullScreen, setFullScreen] = reactExports.useState(false);
  const animationsOn = useAtomValue(animationsAtom);
  const [opacity2, setOpacity] = reactExports.useState(animationsOn ? "0" : "");
  const initialWindowSize = reactExports.useRef({ width: window.innerWidth, height: window.innerHeight });
  const [minimized, setMinimized] = reactExports.useState(false);
  const [title, setTitle] = reactExports.useState(props.Title || "");
  const [buttonEl, setButtonEl] = reactExports.useState();
  const datasetId = reactExports.useContext(SmetaModalsIdContext);
  const [buttonsContext, setButtonsContext] = reactExports.useState({});
  const parentElZIndex = reactExports.useRef("");
  const closeButtonRef = reactExports.useRef(null);
  reactExports.useEffect(() => {
    const contentButtonEl = getContentButtonEl(props.Buttons, buttonsContext);
    setButtonEl(getButtons(contentButtonEl));
  }, [buttonsContext]);
  reactExports.useEffect(() => {
    setTitle(props.Title || "");
  }, [props.Title]);
  reactExports.useEffect(() => {
    if (props.closing) setOpacity("0");
  }, [props.closing]);
  reactExports.useEffect(() => {
    var _a2, _b, _c, _d;
    modalRef.current.resize = windowResizeHandler;
    parentElZIndex.current = String(
      props.zIndex === void 0 ? 1e3 + CheckModalBackGrounds(parentElRef.current) : props.zIndex + CheckModalBackGrounds(parentElRef.current)
    );
    parentElZIndex.current = `z-index: ${parentElZIndex.current} !important`;
    parentElRef.current.style.cssText = parentElZIndex.current;
    if (!props.disableBlockBackground) blockBackgroundSwitch(true);
    const modalLocation = (_b = (_a2 = getOptionsForUser()) == null ? void 0 : _a2.modalsLocation) == null ? void 0 : _b[title];
    const currentLocation = modalLocation == null ? void 0 : modalLocation.currentLocation;
    if (currentLocation && !props.blockSaveLocation) {
      const currentWidth = window.innerWidth;
      const currentHeight = window.innerHeight;
      modalRef.current.style.height = currentLocation.height;
      modalRef.current.style.width = currentLocation.width;
      size.current = modalLocation.size;
      if (currentLocation.height === "100%" && currentLocation.width === "100%") {
        parentElRef.current.setAttribute("blockbackground", "");
        modalRef.current.setAttribute("maximized", "");
        setFullScreen(true);
      }
      if (currentLocation.windowHeight !== currentHeight || currentLocation.windowWidth !== currentWidth) {
        if (currentLocation.windowHeight !== currentHeight) {
          modalRef.current.style.top = calculateNewPosition(
            parseFloat(currentLocation.top),
            currentLocation.windowHeight,
            modalRef.current.offsetHeight,
            currentHeight
          ) + "px";
          posBeforeMax.current.top = calculateNewPosition(
            modalLocation.posBeforeMax.top,
            currentLocation.windowHeight,
            parseFloat(modalLocation.size.height),
            currentHeight
          );
          if (size.current.height.endsWith("px")) {
            if (modalRef.current.hasAttribute("maximized") && posBeforeMax.current.top === 0 && parseFloat(size.current.height) > currentHeight) {
              size.current.height = currentHeight + "px";
            } else if (modalRef.current.style.top === "0px" && parseFloat(size.current.height) > currentHeight) {
              size.current.height = currentHeight + "px";
              modalRef.current.style.height = size.current.height;
            }
          }
          modalRef.current.style.top = currentLocation.top;
          posBeforeMax.current.top = modalLocation.posBeforeMax.top;
        }
        if (currentLocation.windowWidth !== currentWidth) {
          modalRef.current.style.left = calculateNewPosition(
            parseFloat(currentLocation.left),
            currentLocation.windowWidth,
            modalRef.current.offsetWidth,
            currentWidth
          ) + "px";
          posBeforeMax.current.left = calculateNewPosition(
            modalLocation.posBeforeMax.left,
            currentLocation.windowWidth,
            parseFloat(modalLocation.size.width),
            currentWidth
          );
          if (size.current.width.endsWith("px")) {
            if (modalRef.current.hasAttribute("maximized") && posBeforeMax.current.left === 0 && parseFloat(size.current.width) > currentWidth) {
              size.current.width = currentWidth + "px";
            } else if (modalRef.current.style.left === "0px" && parseFloat(size.current.width) > currentWidth) {
              size.current.width = currentWidth + "px";
              modalRef.current.style.width = size.current.width;
            }
          }
        } else {
          modalRef.current.style.left = currentLocation.left;
          posBeforeMax.current.left = modalLocation.posBeforeMax.left;
        }
      } else {
        modalRef.current.style.left = currentLocation.left;
        modalRef.current.style.top = currentLocation.top;
        posBeforeMax.current = modalLocation.posBeforeMax;
      }
    } else {
      let heightModal = ((_c = props.style) == null ? void 0 : _c.height) || "30%", widthModal = ((_d = props.style) == null ? void 0 : _d.width) || "40%";
      if (typeof heightModal === "number") heightModal = heightModal + "px";
      if (typeof widthModal === "number") widthModal = widthModal + "px";
      modalRef.current.style.height = heightModal;
      modalRef.current.style.width = widthModal;
      size.current = { height: heightModal, width: widthModal };
      saveModalParams();
      const bodyWidth = document.documentElement.clientWidth;
      const bodyHeight = document.documentElement.clientHeight;
      modalRef.current.style.left = (bodyWidth - modalRef.current.offsetWidth) / 2 + "px";
      modalRef.current.style.top = (bodyHeight - modalRef.current.offsetHeight) / 2 + "px";
    }
    if (animationsOn) setOpacity("");
    if (props.setFocus)
      setTimeout(() => {
        modalRef.current.focus();
      }, 1);
    bringToFront();
  }, []);
  reactExports.useEffect(() => {
    blockBackgroundSwitch(props.hasBlockBackground);
  }, [props.hasBlockBackground]);
  function bringToFront() {
    document.querySelectorAll(".background_ModalDialog[ontop]").forEach((el) => {
      el.removeAttribute("ontop");
    });
    parentElRef.current.setAttribute("ontop", "");
  }
  function blockBackgroundSwitch(block) {
    if (block) {
      parentElRef.current.setAttribute("blockbackground", "");
      if (props.disableBlockBackground && !props.hasBlockBackground) {
        parentElRef.current.style.zIndex = "9999";
      }
    } else {
      parentElRef.current.style.zIndex = parentElZIndex.current;
      if (!modalRef.current.hasAttribute("maximized")) parentElRef.current.removeAttribute("blockbackground");
    }
  }
  function windowResizeHandler() {
    const currentWidth = window.innerWidth;
    const currentHeight = window.innerHeight;
    if (currentWidth !== initialWindowSize.current.width) {
      if (modalRef.current.hasAttribute("maximized") || modalRef.current.hasAttribute("minimized")) {
        const newLeft = calculateNewPosition(
          posBeforeMax.current.left,
          initialWindowSize.current.width,
          parseFloat(size.current.width),
          currentWidth
        );
        posBeforeMax.current.left = newLeft;
        if (newLeft === 0 && size.current.width.endsWith("px") && parseFloat(size.current.width) > currentWidth) {
          size.current.width = currentWidth + "px";
        }
      } else {
        const newLeft = calculateNewPosition(
          modalRef.current.offsetLeft,
          initialWindowSize.current.width,
          modalRef.current.offsetWidth,
          currentWidth
        );
        modalRef.current.style.left = newLeft + "px";
        if (newLeft === 0 && modalRef.current.offsetWidth > currentWidth) {
          modalRef.current.style.width = currentWidth + "px";
        }
      }
    }
    if (currentHeight !== initialWindowSize.current.height) {
      if (modalRef.current.hasAttribute("maximized") || modalRef.current.hasAttribute("minimized")) {
        const newTop = calculateNewPosition(
          posBeforeMax.current.top,
          initialWindowSize.current.height,
          parseFloat(size.current.height),
          currentHeight
        );
        posBeforeMax.current.top = newTop;
        if (newTop === 0 && size.current.height.endsWith("px") && parseFloat(size.current.height) > currentHeight) {
          size.current.height = currentHeight + "px";
        }
      } else {
        const newTop = calculateNewPosition(
          modalRef.current.offsetTop,
          initialWindowSize.current.height,
          modalRef.current.offsetHeight,
          currentHeight
        );
        modalRef.current.style.top = newTop + "px";
        if (newTop === 0 && modalRef.current.offsetHeight > currentHeight) {
          modalRef.current.style.height = currentHeight + "px";
        }
      }
    }
    if (modalRef.current.hasAttribute("maximized") || modalRef.current.hasAttribute("minimized")) {
      saveModalParams();
    }
    initialWindowSize.current = { width: currentWidth, height: currentHeight };
  }
  function modalResizeHandler() {
    modalRef.current.querySelectorAll("[data-smetaresizer]").forEach((el) => el.resize());
    setTimeout(() => {
      updateGridData(10, { last: true });
    });
  }
  function saveLocation() {
    var _a2;
    if (!props.blockSaveLocation) {
      const modalsLocation = ((_a2 = getOptionsForUser()) == null ? void 0 : _a2.modalsLocation) || {};
      const currentLocation = {
        height: modalRef.current.style.height,
        width: modalRef.current.style.width,
        left: modalRef.current.style.left,
        top: modalRef.current.style.top,
        windowWidth: window.innerWidth,
        windowHeight: window.innerHeight
      };
      const modalLocation = (modalsLocation == null ? void 0 : modalsLocation[title]) || {};
      updateOptionsForUser({
        modalsLocation: {
          ...modalsLocation,
          [title]: {
            ...modalLocation,
            currentLocation
          }
        }
      });
    }
  }
  function saveModalParams() {
    var _a2;
    if (!props.blockSaveLocation) {
      const modalsLocation = ((_a2 = getOptionsForUser()) == null ? void 0 : _a2.modalsLocation) || {};
      const modalLocation = (modalsLocation == null ? void 0 : modalsLocation[title]) || {};
      updateOptionsForUser({
        modalsLocation: {
          ...modalsLocation,
          [title]: {
            ...modalLocation,
            posBeforeMax: posBeforeMax.current,
            size: size.current
          }
        }
      });
    }
  }
  function endMoving() {
    modalRef.current.removeAttribute("dragged");
    if (modalFeedbackRef.current.className === "modalWindowTopFeedback") {
      parentElRef.current.setAttribute("blockbackground", "");
      modalRef.current.style.height = "100%";
      modalRef.current.style.width = "100%";
      modalRef.current.style.top = "0";
      modalRef.current.style.left = "0";
      modalRef.current.setAttribute("maximized", "");
      setFullScreen(true);
      if (animationsOn) {
        setTimeout(() => {
          modalResizeHandler();
        }, 251);
      } else modalResizeHandler();
    }
    saveLocation();
    setHideModalFeedback(true);
    if (props.disableBlockBackground) blockBackgroundSwitch(false);
    document.removeEventListener("mousemove", moveModal);
    document.removeEventListener("touchmove", touchMoveHandler);
    document.removeEventListener("mouseup", endMoving);
    document.removeEventListener("touchend", endMoving);
  }
  function moveModal(event) {
    if (!modalRef.current.hasAttribute("dragged")) {
      modalRef.current.setAttribute("dragged", "");
      posBeforeMax.current = { top: modalRef.current.offsetTop, left: modalRef.current.offsetLeft };
      saveModalParams();
    }
    if (modalRef.current.hasAttribute("maximized")) {
      modalRef.current.removeAttribute("maximized");
      setFullScreen(false);
      modalRef.current.style.height = size.current.height;
      modalRef.current.style.width = size.current.width;
      posStartDrag.left = event.clientX - parseFloat(window.getComputedStyle(modalRef.current).getPropertyValue("width")) / 2;
      modalResizeHandler();
    }
    let newLeft = Math.max(0, posStartDrag.left + event.clientX - posStartDrag.x);
    let newTop = Math.max(0, posStartDrag.top + event.clientY - posStartDrag.y);
    if (newLeft + modalRef.current.offsetWidth > document.documentElement.clientWidth) {
      newLeft = document.documentElement.clientWidth - modalRef.current.offsetWidth;
    }
    if (newTop + modalRef.current.offsetHeight > document.documentElement.clientHeight) {
      newTop = document.documentElement.clientHeight - modalRef.current.offsetHeight;
    }
    modalRef.current.style.left = newLeft + "px";
    modalRef.current.style.top = newTop + "px";
    if (event.pageY <= document.documentElement.offsetTop && !props.blockMaximize) {
      if (modalFeedbackRef.current.className !== "modalWindowTopFeedback") {
        modalFeedbackRef.current.className = "modalWindowTopFeedback";
      }
    } else if (modalFeedbackRef.current.className === "modalWindowTopFeedback") {
      modalFeedbackRef.current.removeAttribute("class");
    }
  }
  function touchMoveHandler(event) {
    moveModal(event.changedTouches[0]);
    event.preventDefault();
  }
  function resizeStart() {
    document.addEventListener("mousemove", resizeHandler);
    document.addEventListener("mouseup", resizeEnd);
    parentElRef.current.style.userSelect = "none";
    setHideModalFeedback(false);
    if (props.disableBlockBackground) blockBackgroundSwitch(true);
  }
  function resizeEnd() {
    document.removeEventListener("mousemove", resizeHandler);
    document.removeEventListener("mouseup", resizeEnd);
    parentElRef.current.style.userSelect = "";
    if (props.disableBlockBackground) blockBackgroundSwitch(false);
    if (modalFeedbackRef.current.className === "modalWindowResizeFeedback") {
      modalRef.current.style.height = modalFeedbackRef.current.style.height;
      modalRef.current.style.width = modalFeedbackRef.current.style.width;
      modalRef.current.style.left = modalFeedbackRef.current.style.left;
      modalRef.current.style.top = modalFeedbackRef.current.style.top;
      modalRef.current.removeAttribute("resized");
      if (!modalRef.current.hasAttribute("maximized")) {
        size.current = { height: modalFeedbackRef.current.style.height, width: modalFeedbackRef.current.style.width };
        saveModalParams();
      }
      saveLocation();
      if (animationsOn) {
        setTimeout(() => {
          modalResizeHandler();
        }, 251);
      } else modalResizeHandler();
    }
    setHideModalFeedback(true);
  }
  function resize2(side, event) {
    const modalFeedbackRect = modalFeedbackRef.current.getBoundingClientRect(), modalRect = modalRef.current.getBoundingClientRect(), windowSize = { height: window.innerHeight, width: window.innerWidth };
    const minHeight2 = parseFloat(window.getComputedStyle(modalRef.current).getPropertyValue("min-height")), minWidth2 = parseFloat(window.getComputedStyle(modalRef.current).getPropertyValue("min-width"));
    let maxHeight2 = parseFloat(window.getComputedStyle(modalRef.current).getPropertyValue("max-height")), maxWidth2 = parseFloat(window.getComputedStyle(modalRef.current).getPropertyValue("max-width"));
    if (isNaN(maxHeight2)) maxHeight2 = 0;
    if (isNaN(maxWidth2)) maxWidth2 = 0;
    switch (side) {
      case "Top":
        if (event.clientY >= 0) {
          const newHeight = modalFeedbackRef.current.offsetHeight - (event.clientY - modalFeedbackRect.top);
          if (newHeight > minHeight2) {
            if (maxHeight2 && newHeight > maxHeight2) {
              modalFeedbackRef.current.style.top = modalRect.top + modalRect.height - maxHeight2 + "px";
              modalFeedbackRef.current.style.height = maxHeight2 + "px";
            } else {
              modalFeedbackRef.current.style.top = event.clientY + "px";
              modalFeedbackRef.current.style.height = newHeight + "px";
            }
          } else {
            modalFeedbackRef.current.style.top = modalRect.top + modalRect.height - minHeight2 + "px";
            modalFeedbackRef.current.style.height = minHeight2 + "px";
          }
        } else {
          const newHeight = modalRect.top + modalRect.height;
          if (maxHeight2 && newHeight > maxHeight2) {
            modalFeedbackRef.current.style.top = newHeight - maxHeight2 + "px";
            modalFeedbackRef.current.style.height = maxHeight2 + "px";
          } else {
            modalFeedbackRef.current.style.top = "0px";
            modalFeedbackRef.current.style.height = newHeight + "px";
          }
        }
        break;
      case "Left":
        if (event.clientX >= 0) {
          const newWidth = modalFeedbackRef.current.offsetWidth - (event.clientX - modalFeedbackRect.left);
          if (newWidth > minWidth2) {
            if (maxWidth2 && newWidth > maxWidth2) {
              modalFeedbackRef.current.style.left = modalRect.left + modalRect.width - maxWidth2 + "px";
              modalFeedbackRef.current.style.width = maxWidth2 + "px";
            } else {
              modalFeedbackRef.current.style.left = event.clientX + "px";
              modalFeedbackRef.current.style.width = newWidth + "px";
            }
          } else {
            modalFeedbackRef.current.style.left = modalRect.left + modalRect.width - minWidth2 + "px";
            modalFeedbackRef.current.style.width = minWidth2 + "px";
          }
        } else {
          const newWidth = modalRect.left + modalRect.width;
          if (maxWidth2 && newWidth > maxWidth2) {
            modalFeedbackRef.current.style.left = newWidth - maxWidth2 + "px";
            modalFeedbackRef.current.style.width = maxWidth2 + "px";
          } else {
            modalFeedbackRef.current.style.left = "0px";
            modalFeedbackRef.current.style.width = newWidth + "px";
          }
        }
        break;
      case "Bottom":
        maxHeight2 = maxHeight2 === 0 ? windowSize.height - modalFeedbackRect.top : Math.min(maxHeight2, windowSize.height - modalFeedbackRect.top);
        modalFeedbackRef.current.style.height = Math.min(maxHeight2, Math.max(minHeight2, event.clientY - modalFeedbackRect.top)) + "px";
        break;
      case "Right":
        maxWidth2 = maxWidth2 === 0 ? windowSize.width - modalFeedbackRect.left : Math.min(maxWidth2, windowSize.width - modalFeedbackRect.left);
        modalFeedbackRef.current.style.width = Math.min(maxWidth2, Math.max(minWidth2, event.clientX - modalFeedbackRect.left)) + "px";
        break;
    }
  }
  function resizeHandler(event) {
    if (modalFeedbackRef.current.className !== "modalWindowResizeFeedback") {
      modalFeedbackRef.current.className = "modalWindowResizeFeedback";
      modalFeedbackRef.current.style.height = modalRef.current.offsetHeight + "px";
      modalFeedbackRef.current.style.width = modalRef.current.offsetWidth + "px";
      modalFeedbackRef.current.style.top = modalRef.current.style.top;
      modalFeedbackRef.current.style.left = modalRef.current.style.left;
      modalFeedbackRef.current.setAttribute(
        "side",
        resizeContainerRef.current.className.substring(
          resizeContainerRef.current.className.indexOf("resizing") + 8,
          resizeContainerRef.current.className.length
        )
      );
      modalRef.current.setAttribute("resized", "");
    }
    const side = modalFeedbackRef.current.getAttribute("side");
    switch (side) {
      case "TopLeft":
        resize2("Top", event);
        resize2("Left", event);
        break;
      case "BottomLeft":
        resize2("Bottom", event);
        resize2("Left", event);
        break;
      case "BottomRight":
        resize2("Bottom", event);
        resize2("Right", event);
        break;
      case "TopRight":
        resize2("Top", event);
        resize2("Right", event);
        break;
      default:
        resize2(side, event);
        break;
    }
  }
  function mouseDownHandler(event) {
    var _a2;
    const target = event.target;
    if (props.disableBlockBackground && !modalRef.current.hasAttribute("ontop")) bringToFront();
    if (resizeContainerRef.current.className.indexOf("resizing") > -1) {
      resizeStart();
    } else if (target.classList.contains("headModal") || ((_a2 = target.parentElement) == null ? void 0 : _a2.classList.contains("headModal"))) {
      if ("touches" in event) {
        posStartDrag.x = event.targetTouches[0].clientX;
        posStartDrag.y = event.targetTouches[0].clientY;
      } else {
        posStartDrag.x = event.clientX;
        posStartDrag.y = event.clientY;
      }
      posStartDrag.left = modalRef.current.offsetLeft;
      posStartDrag.top = modalRef.current.offsetTop;
      setHideModalFeedback(false);
      if (props.disableBlockBackground) blockBackgroundSwitch(true);
      document.addEventListener("mousemove", moveModal);
      document.addEventListener("touchmove", touchMoveHandler, { passive: false });
      document.addEventListener("mouseup", endMoving);
      document.addEventListener("touchend", endMoving);
    }
  }
  function maximize() {
    if (!props.blockMaximize) {
      blockBackgroundSwitch(true);
      if (fullScreen) {
        modalRef.current.style.height = size.current.height;
        modalRef.current.style.width = size.current.width;
        modalRef.current.style.top = posBeforeMax.current.top + "px";
        modalRef.current.style.left = posBeforeMax.current.left + "px";
      } else {
        modalRef.current.style.height = "100%";
        modalRef.current.style.width = "100%";
        if (props.disableBlockBackground && !modalRef.current.hasAttribute("ontop")) bringToFront();
        if (!minimized) {
          posBeforeMax.current = { top: modalRef.current.offsetTop, left: modalRef.current.offsetLeft };
        } else {
          smetaModals.refreshMinimizedWindowsPosition(getAllMinimizedWindows());
          setMinimized(false);
          modalRef.current.removeAttribute("minimized");
        }
        saveModalParams();
        modalRef.current.style.top = "0";
        modalRef.current.style.left = "0";
      }
      modalRef.current.toggleAttribute("maximized");
      if (props.disableBlockBackground) blockBackgroundSwitch(false);
      setFullScreen(!fullScreen);
      saveLocation();
      if (animationsOn) {
        setTimeout(() => {
          modalResizeHandler();
        }, 251);
      } else modalResizeHandler();
    }
  }
  function getAllMinimizedWindows() {
    const allMinimizedWindows = [];
    document.querySelectorAll(".modalWindow[minimized]").forEach((el) => {
      if (el !== modalRef.current) allMinimizedWindows.push(el);
    });
    allMinimizedWindows.sort((a2, b2) => a2.getBoundingClientRect().right - b2.getBoundingClientRect().right);
    return allMinimizedWindows;
  }
  function minimize() {
    if (minimized) {
      modalRef.current.style.height = size.current.height;
      modalRef.current.style.width = size.current.width;
      modalRef.current.style.top = posBeforeMax.current.top + "px";
      modalRef.current.style.left = posBeforeMax.current.left + "px";
      smetaModals.refreshMinimizedWindowsPosition(getAllMinimizedWindows());
    } else {
      const allMinimizedWindows = getAllMinimizedWindows();
      if (!fullScreen) posBeforeMax.current = { top: modalRef.current.offsetTop, left: modalRef.current.offsetLeft };
      if (allMinimizedWindows.length) {
        const lastMinimizedWindows = allMinimizedWindows[allMinimizedWindows.length - 1];
        const newLeft = lastMinimizedWindows.offsetLeft + lastMinimizedWindows.offsetWidth + 260 > document.documentElement.clientWidth ? lastMinimizedWindows.offsetLeft : lastMinimizedWindows.offsetLeft + lastMinimizedWindows.offsetWidth + 5;
        modalRef.current.style.left = newLeft + "px";
        modalRef.current.style.top = lastMinimizedWindows.offsetTop + "px";
      } else {
        modalRef.current.style.left = "5px";
        modalRef.current.style.top = window.innerHeight - 53 + "px";
      }
      modalRef.current.style.width = "250px";
      modalRef.current.style.height = "48px";
      setFullScreen(false);
      modalRef.current.removeAttribute("maximized");
      blockBackgroundSwitch(false);
    }
    modalRef.current.toggleAttribute("minimized");
    setMinimized(!minimized);
  }
  async function clickButtonHandler(event) {
    var _a2, _b, _c, _d, _e, _f;
    const currentTarget = event.target instanceof HTMLButtonElement ? event.target : event.currentTarget;
    let action = "";
    if (currentTarget.classList.contains("button_Modal_Close")) {
      action = "close";
    } else if (currentTarget.classList.contains("button_Modal_Select")) {
      action = "select";
    }
    const afterCallBacks = props.callBacks === true ? await makeCallBacks(currentTarget.value) : true;
    if (!afterCallBacks) return;
    const shouldClose = props.closingQuery ? await props.closingQuery(currentTarget.value) : true;
    const keyButton = Number(currentTarget.value);
    await ((_b = (_a2 = buttonsContext[keyButton]) == null ? void 0 : _a2.onClick) == null ? void 0 : _b.call(_a2));
    if (shouldClose) {
      switch (action) {
        case "close":
          await ((_c = props.onClose) == null ? void 0 : _c.call(props, currentTarget.value));
          await smetaModals.close(datasetId);
          if (minimized) smetaModals.refreshMinimizedWindowsPosition(getAllMinimizedWindows());
          (_d = props.elementToFocusAfterModal) == null ? void 0 : _d.focus();
          break;
        case "select":
          await ((_e = props.onSelect) == null ? void 0 : _e.call(props, currentTarget.value));
          await smetaModals.close(datasetId);
          (_f = props.elementToFocusAfterModal) == null ? void 0 : _f.focus();
          break;
      }
    }
  }
  async function handleKeyDown2(ev) {
    if (ev.key === "Escape") {
      closeButtonRef.current.click();
    }
  }
  function moveHandler(event) {
    const containerResize = resizeContainerRef.current;
    containerResize.classList.remove(
      "resizingBottomRight",
      "resizingTopRight",
      "resizingTopLeft",
      "resizingBottomLeft",
      "resizingTop",
      "resizingBottom",
      "resizingLeft",
      "resizingRight"
    );
    const modalRect = modalRef.current.getBoundingClientRect(), topPos = event.clientY < modalRect.top + 10, bottomPos = event.clientY > modalRect.bottom - 10, rightPos = event.clientX > modalRect.right - 10, leftPos = event.clientX < modalRect.left + 10;
    if (leftPos || rightPos)
      return topPos ? containerResize.classList.add("resizingTop" + (leftPos ? "Left" : "Right")) : bottomPos ? containerResize.classList.add("resizingBottom" + (leftPos ? "Left" : "Right")) : containerResize.classList.add("resizing" + (leftPos ? "Left" : "Right"));
    if (topPos || bottomPos) {
      if (rightPos) return containerResize.classList.add("resizing" + (topPos ? "TopRight" : "BottomRight"));
      if (leftPos) return containerResize.classList.add("resizing" + (topPos ? "TopLeft" : "BottomLeft"));
      containerResize.classList.add("resizing" + (topPos ? "Top" : "Bottom"));
    }
  }
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { ref: parentElRef, className: "background_ModalDialog", onKeyDown: handleKeyDown2, children: [
    !props.disableBlockBackground && /* @__PURE__ */ jsxRuntimeExports.jsx(
      "div",
      {
        className: "backgroundModalWindow",
        onClick: () => {
          modalRef.current.focus();
        }
      }
    ),
    /* @__PURE__ */ jsxRuntimeExports.jsx(
      "div",
      {
        id: props.id,
        className: clsx$3("modalWindow", { light: theme === "light" }),
        style: {
          ...style2,
          opacity: opacity2
        },
        ref: modalRef,
        tabIndex: -1,
        onMouseDown: minimized ? void 0 : mouseDownHandler,
        onTouchStart: minimized ? void 0 : mouseDownHandler,
        onMouseMove: props.blockResize || fullScreen || minimized ? void 0 : moveHandler,
        onMouseLeave: () => {
          resizeContainerRef.current.classList.remove(
            "resizingBottomRight",
            "resizingTopRight",
            "resizingTopLeft",
            "resizingBottomLeft",
            "resizingTop",
            "resizingBottom",
            "resizingLeft",
            "resizingRight"
          );
        },
        "data-smetaresizer": "",
        "data-modalid": datasetId,
        "data-animation": animationsOn,
        children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "modalResizeContainer", ref: resizeContainerRef, children: [
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3("headModal", "headerStimate", { light: theme === "light" }), onDoubleClick: maximize, children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: clsx$3("fontColorStimate", { light: theme === "light" }), children: title }),
            /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: clsx$3("iconButtonStimate", { light: theme === "light" }), style: { whiteSpace: "nowrap" }, children: [
              props.disableBlockBackground && !props.blockCollapse && /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { size: "small", onClick: minimize, children: !minimized ? /* @__PURE__ */ jsxRuntimeExports.jsx(MinimizeIcon, { fontSize: "small" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(MaximizeIcon, { fontSize: "small" }) }),
              props.blockMaximize ? null : /* @__PURE__ */ jsxRuntimeExports.jsx(IconButton, { size: "small", onClick: maximize, color: "inherit", children: fullScreen ? /* @__PURE__ */ jsxRuntimeExports.jsx(CloseFullscreen, { fontSize: "small" }) : /* @__PURE__ */ jsxRuntimeExports.jsx(OpenInFull, { fontSize: "small" }) }),
              /* @__PURE__ */ jsxRuntimeExports.jsx(
                IconButton,
                {
                  ref: closeButtonRef,
                  value: DlgRes.Cancel,
                  size: "small",
                  onClick: clickButtonHandler,
                  className: "button_Modal_Close",
                  color: "inherit",
                  children: /* @__PURE__ */ jsxRuntimeExports.jsx(Close, { fontSize: "small" })
                }
              )
            ] })
          ] }),
          /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "contentModal", children: [
            /* @__PURE__ */ jsxRuntimeExports.jsx(
              Box$1,
              {
                style: {
                  width: "100%",
                  height: props.hiddenButton ? "100%" : "calc(100% - 40px)",
                  overflow: "auto"
                },
                children: /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaModalsButtonsContext.Provider, { value: setButtonsContext, children: props.children })
              }
            ),
            /* @__PURE__ */ jsxRuntimeExports.jsx(Box$1, { style: { width: "100%", display: "flex" }, children: !props.hiddenButton && /* @__PURE__ */ jsxRuntimeExports.jsx(
              Grid$1,
              {
                container: true,
                direction: "row",
                justifyContent: "flex-end",
                alignItems: "center",
                style: { marginTop: "10px" },
                onClick: clickButtonHandler,
                children: buttonEl
              }
            ) })
          ] })
        ] })
      }
    ),
    !hideModalFeedback && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { ref: modalFeedbackRef })
  ] });
}
function ModalPortal() {
  const modals = useAtomValue(smetaModalsAtom);
  const hasBlockBackground = modals.some((modal) => modal.props.disableBlockBackground !== true);
  return reactDomExports.createPortal(
    modals.map((modal) => {
      return /* @__PURE__ */ jsxRuntimeExports.jsx(SmetaModalsIdContext.Provider, { value: modal.datasetId, children: /* @__PURE__ */ jsxRuntimeExports.jsx(ModalWindows, { ...modal.props, hasBlockBackground, children: modal.content }) }, modal.datasetId);
    }),
    document.getElementById("ModalPortal")
  );
}
!function(l, s) {
  "object" == typeof exports && "object" == typeof module ? module.exports = s() : "function" == typeof define && define.amd ? define([], s) : "object" == typeof exports ? exports.Snow = s() : l.Snow = s();
}(
  self,
  () => (() => {
    var _l, _s, _e, _t7, _a2, _o, _n, _i, _h, _w, _r, _d, _B, _c, _f, _v, _p, _m, _u, _e_instances, $_fn, S_fn, L_fn, I_fn, M_fn, g_fn, E_fn, x_fn;
    var l = {
      d: (s2, e3) => {
        for (var t in e3) l.o(e3, t) && !l.o(s2, t) && Object.defineProperty(s2, t, { enumerable: true, get: e3[t] });
      },
      o: (l2, s2) => Object.prototype.hasOwnProperty.call(l2, s2)
    }, s = {};
    l.d(s, { default: () => e2 });
    class e2 {
      constructor(l2 = {}) {
        __privateAdd(this, _e_instances);
        __privateAdd(this, _l);
        __privateAdd(this, _s);
        __privateAdd(this, _e);
        __privateAdd(this, _t7);
        __privateAdd(this, _a2);
        __privateAdd(this, _o);
        __privateAdd(this, _n);
        __privateAdd(this, _i);
        __privateAdd(this, _h);
        __privateAdd(this, _w);
        __privateAdd(this, _r);
        __privateAdd(this, _d);
        __privateAdd(this, _B);
        __privateAdd(this, _c);
        __privateAdd(this, _f);
        __privateAdd(this, _v);
        __privateAdd(this, _p);
        __privateAdd(this, _m);
        __privateAdd(this, _u, window.innerWidth);
        const {
          iconColor: s2 = "#a6e7ff",
          iconSize: e3 = 15,
          icon: t = `<svg fill="${s2}" xmlns="http://www.w3.org/2000/svg" width="${e3}px" height="${e3}px" viewBox="0 0 50 50"><path d="M24.97-.03A2 2 0 0 0 23 2v4.17l-1.9-1.89a2 2 0 0 0-1.43-.6 2 2 0 0 0-1.39 3.43L23 11.83v9.7l-8.4-4.85-1.74-6.46a2 2 0 0 0-1.9-1.51A2 2 0 0 0 9 11.25l.7 2.6-3.64-2.1a2 2 0 0 0-.95-.28 2 2 0 0 0-1.05 3.75l3.63 2.1-2.57.69a2 2 0 1 0 1.04 3.86l6.43-1.72L21.02 25l-8.41 4.85-6.4-1.72a2 2 0 0 0-.6-.07A2 2 0 0 0 5.18 32l2.53.67-3.64 2.1a2 2 0 1 0 2 3.47l3.63-2.1-.67 2.5a2 2 0 1 0 3.87 1.04l1.7-6.36L23 28.5v9.68l-4.68 4.68a2 2 0 1 0 2.83 2.83L23 43.83V48a2 2 0 1 0 4 0v-4.17l1.88 1.87a2 2 0 1 0 2.82-2.83l-4.7-4.7v-9.7l8.4 4.85 1.74 6.46A2 2 0 1 0 41 38.75l-.7-2.6 3.64 2.1a2 2 0 1 0 2-3.47l-3.64-2.1 2.56-.68a2 2 0 0 0-.5-3.94 2 2 0 0 0-.54.07l-6.41 1.72-8.38-4.83 8.43-4.86 6.38 1.7a2 2 0 1 0 1.03-3.85l-2.5-.68 3.57-2.05a2 2 0 0 0-.91-3.75 2 2 0 0 0-1.1.28l-3.64 2.1.7-2.6a2 2 0 0 0-2.03-2.54 2 2 0 0 0-1.84 1.51l-1.73 6.46L27 21.57v-9.74l4.72-4.72a2 2 0 1 0-2.83-2.83L27 6.18V2a2 2 0 0 0-2.03-2.03z"/></svg>`,
          snowPlowImage: a2 = '<svg xmlns="http://www.w3.org/2000/svg" width="100" height="63.793"><path fill="none" d="M100 0H78.448v21.552H100V0Z"/><path fill="#A8D6DA" fill-rule="evenodd" d="M48.276 32.759v1.724h13.793v-12.07H50L48.276 32.76Z"/><path fill="#C0F5F9" fill-rule="evenodd" d="M50 32.759h12.069v-8.621H51.724L50 32.758Z"/><path fill="#EBEBEB" d="M68.966 22.414v1.724h27.586v-1.724l-5.81-6.03a10.776 10.776 0 0 0-15.243-.276l-6.533 6.306Z"/><path fill="#C38325" fill-rule="evenodd" d="M70.69 37.931v1.724h24.138v-1.724l3.448-6.896v-8.621H67.24v8.62l3.449 6.897Z"/><path fill="#DA922A" fill-rule="evenodd" d="M48.276 32.759 32.759 37.93h-1.724v13.793H50V32.76h-1.724ZM100 37.931H60.345v18.966H100V37.93Z"/><path fill="#EA9D2D" fill-rule="evenodd" d="M98.276 22.414H67.24v8.62h31.035v-8.62ZM62.069 32.759H48.276v24.138h13.793V32.759Z"/><path fill="#F7F7F7" d="M0 62.431v1.362h25.862V53.448a6.897 6.897 0 0 0-12.911-3.373 5.174 5.174 0 0 0-5.994 5.895l-1.472.196A6.32 6.32 0 0 0 0 62.43Z"/><path fill="#EBEBEB" d="M.356 63.793h25.506v-6.896a6.897 6.897 0 0 0-12.911-3.374 5.174 5.174 0 0 0-5.994 5.895l-1.472.196a6.313 6.313 0 0 0-5.13 4.18Z"/><path fill="#DBDBDB" fill-rule="evenodd" d="M48.276 44.828H32.759v6.896h15.517v-6.896Z"/><path fill="#DA922A" fill-rule="evenodd" d="m79.31 37.931-1.724-6.896h10.345l-1.724 6.896H79.31Z"/><path fill="#EBEBEB" fill-rule="evenodd" d="M63.793 10.345a3.448 3.448 0 1 0-6.896 0 3.448 3.448 0 0 0 6.896 0ZM37.931 22.414a3.448 3.448 0 1 0-6.896 0 3.448 3.448 0 0 0 6.896 0ZM29.31 3.448a3.448 3.448 0 1 0-6.896 0 3.448 3.448 0 0 0 6.896 0ZM94.828 3.448a3.448 3.448 0 1 0-6.897 0 3.448 3.448 0 0 0 6.897 0ZM15.517 31.035a3.448 3.448 0 1 0-6.896 0 3.448 3.448 0 0 0 6.896 0ZM10.345 13.793a3.448 3.448 0 1 0-6.897 0 3.448 3.448 0 0 0 6.897 0Z"/><path fill="#EA9D2D" d="M21.983 56.897h3.88V34.483h3.307a3.589 3.589 0 0 1 3.589 3.588v23.136a2.586 2.586 0 0 1-2.587 2.586H18.965v-3.88a3.017 3.017 0 0 1 3.018-3.016Z"/><path fill="#C3C3C3" fill-rule="evenodd" d="M100 55.172a8.62 8.62 0 1 0-17.241 0 8.62 8.62 0 0 0 17.241 0Z"/><path fill="#EBEBEB" fill-rule="evenodd" d="M94.828 55.172a3.448 3.448 0 1 0-6.897 0 3.448 3.448 0 0 0 6.897 0Z"/><path fill="#C3C3C3" fill-rule="evenodd" d="M82.759 55.172a8.62 8.62 0 1 0-17.242 0 8.62 8.62 0 0 0 17.242 0Z"/><path fill="#EBEBEB" fill-rule="evenodd" d="M77.586 55.172a3.448 3.448 0 1 0-6.896 0 3.448 3.448 0 0 0 6.896 0Z"/><path fill="#C38325" fill-rule="evenodd" d="M65.517 50H55.172v6.897h10.345V50Z"/><path fill="#C3C3C3" fill-rule="evenodd" d="M55.172 55.172a8.62 8.62 0 1 0-17.241 0 8.62 8.62 0 0 0 17.241 0Z"/><path fill="#EBEBEB" fill-rule="evenodd" d="M50 55.172a3.448 3.448 0 1 0-6.896 0 3.448 3.448 0 0 0 6.896 0Z"/></svg>',
          showSnowBalls: o = true,
          showSnowBallsIsMobile: n = true,
          showSnowflakes: i = true,
          countSnowflake: h2 = 100,
          snowBallsLength: w = 10,
          snowBallIterations: r2 = 40,
          snowBallupNum: d2 = 1,
          snowBallIterationsInterval: B3 = 1e3,
          clearSnowBalls: c = 2e4,
          reset: f2 = -6
        } = l2;
        __privateSet(this, _l, t), __privateSet(this, _s, a2), __privateSet(this, _w, o), __privateSet(this, _r, n), __privateSet(this, _d, i), __privateSet(this, _e, h2 > 100 ? 100 : h2), __privateSet(this, _t7, w > 10 ? 10 : w), __privateSet(this, _a2, r2), __privateSet(this, _o, d2 > 3 ? 3 : d2), __privateSet(this, _n, B3), __privateSet(this, _i, c), __privateSet(this, _h, f2), __privateGet(this, _a2) < 10 && __privateGet(this, _o) < 4 ? __privateSet(this, _a2, 10) : __privateGet(this, _a2) > 40 && __privateGet(this, _o) > 2 && __privateSet(this, _a2, 40), __privateMethod(this, _e_instances, $_fn).call(this);
      }
      destroy() {
        window.removeEventListener("resize", __privateMethod(this, _e_instances, S_fn)), window.removeEventListener("resize", __privateMethod(this, _e_instances, S_fn));
      }
    }
    _l = new WeakMap();
    _s = new WeakMap();
    _e = new WeakMap();
    _t7 = new WeakMap();
    _a2 = new WeakMap();
    _o = new WeakMap();
    _n = new WeakMap();
    _i = new WeakMap();
    _h = new WeakMap();
    _w = new WeakMap();
    _r = new WeakMap();
    _d = new WeakMap();
    _B = new WeakMap();
    _c = new WeakMap();
    _f = new WeakMap();
    _v = new WeakMap();
    _p = new WeakMap();
    _m = new WeakMap();
    _u = new WeakMap();
    _e_instances = new WeakSet();
    $_fn = function() {
      if (window.addEventListener("resize", __privateMethod(this, _e_instances, S_fn).bind(this)), __privateSet(this, _B, document.createElement("div")), __privateSet(this, _c, document.createElement("div")), __privateSet(this, _f, document.createElement("div")), __privateSet(this, _v, document.createElement("div")), __privateSet(this, _p, __privateGet(this, _v).getElementsByTagName("a")), __privateSet(this, _m, document.createElement("div")), __privateGet(this, _B).className = "snowflakes-box", __privateGet(this, _c).className = "snowball-box", __privateGet(this, _f).className = "snow-layer", __privateGet(this, _v).className = "snowball-wrap", __privateGet(this, _m).className = "snow-plow-img", __privateGet(this, _m).innerHTML = __privateGet(this, _s), 1 == __privateGet(this, _d) && document.body.appendChild(__privateGet(this, _B)), __privateMethod(this, _e_instances, M_fn).call(this), __privateMethod(this, _e_instances, x_fn).call(this), __privateGet(this, _p).length)
        for (let l2 of __privateGet(this, _p)) {
          let s2 = l2.clientWidth;
          l2.style.height = s2 + "px";
        }
      __privateMethod(this, _e_instances, L_fn).call(this);
    };
    S_fn = function() {
      __privateSet(this, _u, window.innerWidth), __privateGet(this, _B).innerHTML = "", __privateGet(this, _c).innerHTML = "", __privateMethod(this, _e_instances, M_fn).call(this), __privateMethod(this, _e_instances, x_fn).call(this);
    };
    L_fn = function() {
      let l2, s2 = 0;
      l2 = setInterval(() => {
        s2++, s2 >= __privateGet(this, _a2) && (clearInterval(l2), __privateGet(this, _f).classList.add("up-max"), setTimeout(() => {
          __privateMethod(this, _e_instances, I_fn).call(this);
        }, __privateGet(this, _i)));
        for (const l3 of __privateGet(this, _p)) {
          const s3 = window.getComputedStyle(l3), e3 = new WebKitCSSMatrix(s3.transform).m42 + -__privateGet(this, _o);
          l3.style.transform = "translateY(" + e3 + "px )";
        }
      }, __privateGet(this, _n));
    };
    I_fn = function() {
      if (__privateGet(this, _f).classList.contains("up-max"))
        for (const l2 of __privateGet(this, _p))
          l2.classList.contains("active") || l2.classList.add("active"), __privateGet(this, _m).classList.add("active") || __privateGet(this, _m).classList.add("active"), l2.onanimationend = () => {
            l2.style.transform = "translateY(" + __privateGet(this, _h) + "px )", __privateGet(this, _m).classList.remove("active"), setTimeout(() => {
              l2.classList.contains("active") && l2.classList.remove("active"), __privateGet(this, _f).classList.remove("up-max"), __privateMethod(this, _e_instances, L_fn).call(this);
            }, 1e3);
          }, __privateGet(this, _m).onanimationend = () => {
            __privateGet(this, _m).classList.remove("active");
          };
    };
    M_fn = function() {
      for (let l2 = 0; l2 < __privateGet(this, _e); l2++) {
        const l3 = document.createElement("span");
        l3.className = "snowflake", l3.innerHTML = __privateGet(this, _l), __privateGet(this, _B).appendChild(l3);
      }
    };
    g_fn = function() {
      __privateGet(this, _f).appendChild(__privateGet(this, _v)), __privateGet(this, _c).appendChild(__privateGet(this, _f)), document.body.appendChild(__privateGet(this, _c));
    };
    E_fn = function() {
      if (0 === __privateGet(this, _v).children.length) {
        for (let l2 = 0; l2 < __privateGet(this, _t7); l2++) {
          const l3 = document.createElement("a");
          l3.innerHTML = `${__privateGet(this, _l)}${__privateGet(this, _l)}`, __privateGet(this, _v).appendChild(l3);
        }
        __privateGet(this, _v).appendChild(__privateGet(this, _m));
      }
    };
    x_fn = function() {
      __privateGet(this, _w) && (__privateGet(this, _r) ? (__privateGet(this, _u) < 1024 && (__privateGet(this, _a2) > 20 && __privateSet(this, _a2, 20), __privateGet(this, _t7) > 3 && __privateSet(this, _t7, 3), __privateGet(this, _o) > 2 && __privateSet(this, _o, 2)), __privateMethod(this, _e_instances, g_fn).call(this), __privateMethod(this, _e_instances, E_fn).call(this)) : __privateGet(this, _u) > 1024 && (__privateMethod(this, _e_instances, g_fn).call(this), __privateMethod(this, _e_instances, E_fn).call(this)));
    };
    return s = s.default;
  })()
);
const ErrorBoundaryContext = reactExports.createContext(null);
const initialState = {
  didCatch: false,
  error: null
};
class ErrorBoundary extends reactExports.Component {
  constructor(props) {
    super(props);
    this.resetErrorBoundary = this.resetErrorBoundary.bind(this);
    this.state = initialState;
  }
  static getDerivedStateFromError(error) {
    return {
      didCatch: true,
      error
    };
  }
  resetErrorBoundary() {
    const {
      error
    } = this.state;
    if (error !== null) {
      var _this$props$onReset, _this$props;
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
      (_this$props$onReset = (_this$props = this.props).onReset) === null || _this$props$onReset === void 0 ? void 0 : _this$props$onReset.call(_this$props, {
        args,
        reason: "imperative-api"
      });
      this.setState(initialState);
    }
  }
  componentDidCatch(error, info) {
    var _this$props$onError, _this$props2;
    (_this$props$onError = (_this$props2 = this.props).onError) === null || _this$props$onError === void 0 ? void 0 : _this$props$onError.call(_this$props2, error, info);
  }
  componentDidUpdate(prevProps, prevState) {
    const {
      didCatch
    } = this.state;
    const {
      resetKeys
    } = this.props;
    if (didCatch && prevState.error !== null && hasArrayChanged(prevProps.resetKeys, resetKeys)) {
      var _this$props$onReset2, _this$props3;
      (_this$props$onReset2 = (_this$props3 = this.props).onReset) === null || _this$props$onReset2 === void 0 ? void 0 : _this$props$onReset2.call(_this$props3, {
        next: resetKeys,
        prev: prevProps.resetKeys,
        reason: "keys"
      });
      this.setState(initialState);
    }
  }
  render() {
    const {
      children,
      fallbackRender: fallbackRender2,
      FallbackComponent,
      fallback
    } = this.props;
    const {
      didCatch,
      error
    } = this.state;
    let childToRender = children;
    if (didCatch) {
      const props = {
        error,
        resetErrorBoundary: this.resetErrorBoundary
      };
      if (typeof fallbackRender2 === "function") {
        childToRender = fallbackRender2(props);
      } else if (FallbackComponent) {
        childToRender = reactExports.createElement(FallbackComponent, props);
      } else if (fallback !== void 0) {
        childToRender = fallback;
      } else {
        throw error;
      }
    }
    return reactExports.createElement(ErrorBoundaryContext.Provider, {
      value: {
        didCatch,
        error,
        resetErrorBoundary: this.resetErrorBoundary
      }
    }, childToRender);
  }
}
function hasArrayChanged() {
  let a2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
  let b2 = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
  return a2.length !== b2.length || a2.some((item, index2) => !Object.is(item, b2[index2]));
}
function fallbackRender({ error, resetErrorBoundary }) {
  const config2 = useAtomValue(appConfig);
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Container, { maxWidth: "xs", style: { height: window.innerHeight + "px" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Grid$1, { container: true, direction: "column", justifyContent: "center", alignItems: "center", style: { marginTop: "50%" }, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Grid$1, { item: true, role: "alert", children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: "Что то пошло не так(нажимте F12):" }),
    /* @__PURE__ */ jsxRuntimeExports.jsx("pre", { style: { color: "red" }, children: error.toString() }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
      "Ваша версия сайта: ",
      config2.smeta.stimateVersion
    ] }),
    /* @__PURE__ */ jsxRuntimeExports.jsxs("p", { children: [
      "Можете скачать файл с данными об ошибках перейдя по",
      " ",
      /* @__PURE__ */ jsxRuntimeExports.jsx("a", { style: { cursor: "pointer" }, onClick: downloadErrorFile, children: "ссылке" })
    ] })
  ] }) }) });
}
clientExports.createRoot(document.getElementById("root")).render(
  /* @__PURE__ */ jsxRuntimeExports.jsxs(React.StrictMode, { children: [
    /* @__PURE__ */ jsxRuntimeExports.jsx(StyleSmetaComponents, {}),
    /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { fallbackRender, children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Provider, { store: smetaStore, children: [
      /* @__PURE__ */ jsxRuntimeExports.jsx(Wrapper, {}),
      /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ModalPortal, {}) })
    ] }) })
  ] })
);
export {
  getOptionsForUser as $,
  Autocomplete as A,
  Button$2 as B,
  Container as C,
  Dialog as D,
  useAtom as E,
  FormControl as F,
  Grid$1 as G,
  HelpIcon as H,
  IconButton as I,
  isAuthorized as J,
  hideSnow as K,
  Link$2 as L,
  hasURLparam as M,
  getURLparam as N,
  OutlinedInput as O,
  createCokies as P,
  removeParam as Q,
  RefreshIcon as R,
  Slide as S,
  Tooltip as T,
  enterSmeta as U,
  isEmptyObject as V,
  updateStatesAfterEnter as W,
  updateOptionsForUser as X,
  clearUrl as Y,
  getUrlSearh as Z,
  TextField as _,
  appConfig as a,
  getObjText as a$,
  smetaStore as a0,
  DialogTitle as a1,
  DialogActions as a2,
  Tree as a3,
  treeRequest as a4,
  GetDialogParamsForSearch as a5,
  GridLoader as a6,
  TabItem as a7,
  Search$1 as a8,
  ContentOrganization as a9,
  handleParameters as aA,
  getParamsObject as aB,
  AddressParams as aC,
  getModalSectionID as aD,
  ViewClass as aE,
  returnPageBasedOnCLSID as aF,
  styles$4 as aG,
  SaveOutlinedIcon as aH,
  Tabs as aI,
  getButtons as aJ,
  LoadingMask as aK,
  TabsForReports$1 as aL,
  checkCurrentUserRights as aM,
  ObjType as aN,
  DayMask as aO,
  HourMask as aP,
  FormLabel as aQ,
  FormGroup as aR,
  Button$1 as aS,
  DlgType as aT,
  ContextMenu as aU,
  getDefaultMenu as aV,
  makeCallBacks as aW,
  updateVisibleGrids as aX,
  configEnabledAtom as aY,
  updateTabContentFunc as aZ,
  getDetailContent as a_,
  getBookContextMenu as aa,
  formEdit as ab,
  tokenProcessingTest as ac,
  PostHandleTable$2 as ad,
  getRightsData as ae,
  parseColumns as af,
  handleTable$1 as ag,
  AxiosRequest as ah,
  Editor as ai,
  requireInteropRequireDefault as aj,
  requireCreateSvgIcon as ak,
  requireJsxRuntime as al,
  getDefaultExportFromCjs as am,
  CheckOutlinedIcon as an,
  cn as ao,
  smetaModals as ap,
  DialogSetObjText as aq,
  getStyleWindow as ar,
  dayjs as as,
  LocalizationProvider as at,
  AdapterDayjs as au,
  DateCalendar as av,
  Params as aw,
  SplitterLocal as ax,
  ClearIcon as ay,
  GetAddressUseKladr as az,
  axios as b,
  CloseIcon as b$,
  createGridStateString$1 as b0,
  getParamColumnsOptions as b1,
  defaultFieldInfo as b2,
  getDateOfInt as b3,
  updateGridData as b4,
  createConfirmation as b5,
  ApplyFilter as b6,
  selectedSectionAtom as b7,
  SmetaModalsButtonsContext as b8,
  SectionDocuments$1 as b9,
  handleCadresRequest as bA,
  getBase64ByFileReader as bB,
  ButtonsForGridComponent as bC,
  ClearOutlinedIcon as bD,
  RadioGroup as bE,
  Radio as bF,
  SmetaTabs as bG,
  SmetaTabItem as bH,
  SpaceDashboardOutlinedIcon as bI,
  SearchIcon as bJ,
  AccountBoxOutlinedIcon as bK,
  CheckBoxIcon as bL,
  SectionToolsJS as bM,
  clientExports as bN,
  PrintRoundedIcon as bO,
  SaveAsButton as bP,
  ClearAllLoadMask as bQ,
  ImgURL as bR,
  getIcons as bS,
  Card as bT,
  CardActionArea as bU,
  Typography as bV,
  HideAllFooterData as bW,
  openDocumentInModal as bX,
  Scrollbars as bY,
  clearNoneBreadCrumbs as bZ,
  CheckBoxOutlineBlankIcon as b_,
  CheckMultiSelect as ba,
  clsx$3 as bb,
  dialogStyles as bc,
  CheckBoxMultiCheck as bd,
  IMemo as be,
  Prefixes as bf,
  smetaAxios as bg,
  CreateCollapsibleRecords as bh,
  salaryRangeAtom as bi,
  getIntOfStrDate as bj,
  generateUtilityClass as bk,
  generateUtilityClasses as bl,
  useDefaultProps as bm,
  _objectWithoutPropertiesLoose as bn,
  _extends$1 as bo,
  capitalize$2 as bp,
  composeClasses as bq,
  renderingIdAtom as br,
  sectionPersonsData as bs,
  animationsAtom as bt,
  getStaffSettings as bu,
  EditStyle as bv,
  PostAddIcon as bw,
  DeleteIcon as bx,
  Param as by,
  setParamObjectText as bz,
  CssBaseline as c,
  setColor as c$,
  inputLabelClasses as c0,
  Popper as c1,
  autocompleteClasses as c2,
  ArrowDropDownIcon as c3,
  outlinedInputClasses as c4,
  inputBaseClasses as c5,
  getMonthInfo as c6,
  clickInFrame as c7,
  FooterDataShow as c8,
  SmetaSplitter as c9,
  createGrid as cA,
  groupIdAtom as cB,
  leavesOpenAtom as cC,
  Menu as cD,
  MenuItems as cE,
  getRendHistoryParams as cF,
  DlgRes as cG,
  HandleTable as cH,
  resolveProps as cI,
  ButtonBase as cJ,
  alpha as cK,
  TodayIcon as cL,
  NavigateNextIcon as cM,
  getDateRusFormatWithId as cN,
  ContentCopyIcon as cO,
  ContentCutIcon as cP,
  ContentPasteIcon as cQ,
  ObjNameFlag as cR,
  GetDocDialogParams as cS,
  getDateForDateObj as cT,
  RightArrowRed as cU,
  LeftArrowBlue as cV,
  reactDomExports as cW,
  getAmountDocTypes as cX,
  sectionsStyles as cY,
  ClickAwayListener as cZ,
  ExpandMoreIcon as c_,
  SmetaSplitterItem as ca,
  __vitePreload as cb,
  DialogOrganizations as cc,
  selectedProcessAtom as cd,
  Stepper as ce,
  Step as cf,
  StepLabel as cg,
  LinearProgress as ch,
  TextareaAutosize$1 as ci,
  listOfProcessesAtom as cj,
  useSetAtom as ck,
  XMLrequest as cl,
  ListItem$1 as cm,
  ListItemButton as cn,
  ListItemText$1 as co,
  List as cp,
  setSelectedSectionAtom as cq,
  Link$1 as cr,
  getSectionByID as cs,
  Divider as ct,
  getParamObjectText as cu,
  PayTypeOption as cv,
  ParamSetOption as cw,
  isAdminAtom as cx,
  createRecordSource as cy,
  parseGridState$1 as cz,
  Box$1 as d,
  checkRightsFlag as d0,
  getCurrentUserRights as d1,
  DelphiColors as d2,
  GetTableLayout as d3,
  DialogHistory as d4,
  Paper as d5,
  ListItemIcon as d6,
  getLocalAuditParams as d7,
  DocColumnOption as d8,
  ReactDOM as d9,
  SaveIcon as da,
  NormMode as db,
  handleAnaliticRequest as dc,
  ViewComfyOutlinedIcon as dd,
  handleAccountsPlanRequest as de,
  getAccsParams as df,
  ApplyTransFilter as dg,
  getLoadTab as dh,
  getFullTab as di,
  ImgURLSRC as dj,
  ClearIcon$1 as dk,
  DialogParams as dl,
  usePrevious as dm,
  CheckIcon as dn,
  UndoIcon as dp,
  MenuItem as dq,
  Grow as e,
  InputLabel$1 as f,
  InputAdornment as g,
  FormHelperText as h,
  FormControlLabel as i,
  jsxRuntimeExports as j,
  Checkbox as k,
  DialogContent as l,
  DialogContentText as m,
  match as n,
  CircularProgress as o,
  parse$1 as p,
  useNavigate as q,
  reactExports as r,
  IMaskInput as s,
  React as t,
  useAtomValue as u,
  renderMessageBox as v,
  createSvgIcon as w,
  Grid22 as x,
  styled as y,
  currentTheme as z
};
//# sourceMappingURL=index-D15x63tD.js.map
