import t from "react-dom";
import { a as e, g as n } from "./alasql-f59e855e.js";
import r from "react";
import { p as o } from "./fontawesome-89eb6278.js";
var a = { exports: {} }, i = {};
function s(t2) {
  var e2, n2, r2 = "";
  if ("string" == typeof t2 || "number" == typeof t2)
    r2 += t2;
  else if ("object" == typeof t2)
    if (Array.isArray(t2))
      for (e2 = 0; e2 < t2.length; e2++)
        t2[e2] && (n2 = s(t2[e2])) && (r2 && (r2 += " "), r2 += n2);
    else
      for (e2 in t2)
        t2[e2] && (r2 && (r2 += " "), r2 += e2);
  return r2;
}
function l() {
  for (var t2, e2, n2 = 0, r2 = ""; n2 < arguments.length; )
    (t2 = arguments[n2++]) && (e2 = s(t2)) && (r2 && (r2 += " "), r2 += e2);
  return r2;
}
const u = e(Object.freeze(Object.defineProperty({ __proto__: null, clsx: l, default: l }, Symbol.toStringTag, { value: "Module" })));
var d = {}, c = {};
Object.defineProperty(c, "__esModule", { value: true }), c.dontSetMe = function(t2, e2, n2) {
  if (t2[e2])
    return new Error("Invalid prop ".concat(e2, " passed to ").concat(n2, " - do not set this, set it on the child."));
}, c.findInArray = function(t2, e2) {
  for (let n2 = 0, r2 = t2.length; n2 < r2; n2++)
    if (e2.apply(e2, [t2[n2], n2, t2]))
      return t2[n2];
}, c.int = function(t2) {
  return parseInt(t2, 10);
}, c.isFunction = function(t2) {
  return "function" == typeof t2 || "[object Function]" === Object.prototype.toString.call(t2);
}, c.isNum = function(t2) {
  return "number" == typeof t2 && !isNaN(t2);
};
var f = {};
Object.defineProperty(f, "__esModule", { value: true }), f.browserPrefixToKey = h, f.browserPrefixToStyle = function(t2, e2) {
  return e2 ? "-".concat(e2.toLowerCase(), "-").concat(t2) : t2;
}, f.default = void 0, f.getPrefix = g;
const p = ["Moz", "Webkit", "O", "ms"];
function g() {
  var t2;
  let e2 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "transform";
  if ("undefined" == typeof window)
    return "";
  const n2 = null === (t2 = window.document) || void 0 === t2 || null === (t2 = t2.documentElement) || void 0 === t2 ? void 0 : t2.style;
  if (!n2)
    return "";
  if (e2 in n2)
    return "";
  for (let t3 = 0; t3 < p.length; t3++)
    if (h(e2, p[t3]) in n2)
      return p[t3];
  return "";
}
function h(t2, e2) {
  return e2 ? "".concat(e2).concat(function(t3) {
    let e3 = "", n2 = true;
    for (let r2 = 0; r2 < t3.length; r2++)
      n2 ? (e3 += t3[r2].toUpperCase(), n2 = false) : "-" === t3[r2] ? n2 = true : e3 += t3[r2];
    return e3;
  }(t2)) : t2;
}
f.default = g(), Object.defineProperty(d, "__esModule", { value: true }), d.addClassName = w, d.addEvent = function(t2, e2, n2, r2) {
  if (!t2)
    return;
  const o2 = { capture: true, ...r2 };
  t2.addEventListener ? t2.addEventListener(e2, n2, o2) : t2.attachEvent ? t2.attachEvent("on" + e2, n2) : t2["on" + e2] = n2;
}, d.addUserSelectStyles = function(t2) {
  if (!t2)
    return;
  let e2 = t2.getElementById("react-draggable-style-el");
  e2 || (e2 = t2.createElement("style"), e2.type = "text/css", e2.id = "react-draggable-style-el", e2.innerHTML = ".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n", e2.innerHTML += ".react-draggable-transparent-selection *::selection {all: inherit;}\n", t2.getElementsByTagName("head")[0].appendChild(e2));
  t2.body && w(t2.body, "react-draggable-transparent-selection");
}, d.createCSSTransform = function(t2, e2) {
  const n2 = S(t2, e2, "px");
  return { [(0, y.browserPrefixToKey)("transform", y.default)]: n2 };
}, d.createSVGTransform = function(t2, e2) {
  return S(t2, e2, "");
}, d.getTouch = function(t2, e2) {
  return t2.targetTouches && (0, m.findInArray)(t2.targetTouches, (t3) => e2 === t3.identifier) || t2.changedTouches && (0, m.findInArray)(t2.changedTouches, (t3) => e2 === t3.identifier);
}, d.getTouchIdentifier = function(t2) {
  if (t2.targetTouches && t2.targetTouches[0])
    return t2.targetTouches[0].identifier;
  if (t2.changedTouches && t2.changedTouches[0])
    return t2.changedTouches[0].identifier;
}, d.getTranslation = S, d.innerHeight = function(t2) {
  let e2 = t2.clientHeight;
  const n2 = t2.ownerDocument.defaultView.getComputedStyle(t2);
  return e2 -= (0, m.int)(n2.paddingTop), e2 -= (0, m.int)(n2.paddingBottom), e2;
}, d.innerWidth = function(t2) {
  let e2 = t2.clientWidth;
  const n2 = t2.ownerDocument.defaultView.getComputedStyle(t2);
  return e2 -= (0, m.int)(n2.paddingLeft), e2 -= (0, m.int)(n2.paddingRight), e2;
}, d.matchesSelector = D, d.matchesSelectorAndParentsTo = function(t2, e2, n2) {
  let r2 = t2;
  do {
    if (D(r2, e2))
      return true;
    if (r2 === n2)
      return false;
    r2 = r2.parentNode;
  } while (r2);
  return false;
}, d.offsetXYFromParent = function(t2, e2, n2) {
  const r2 = e2 === e2.ownerDocument.body ? { left: 0, top: 0 } : e2.getBoundingClientRect(), o2 = (t2.clientX + e2.scrollLeft - r2.left) / n2, a2 = (t2.clientY + e2.scrollTop - r2.top) / n2;
  return { x: o2, y: a2 };
}, d.outerHeight = function(t2) {
  let e2 = t2.clientHeight;
  const n2 = t2.ownerDocument.defaultView.getComputedStyle(t2);
  return e2 += (0, m.int)(n2.borderTopWidth), e2 += (0, m.int)(n2.borderBottomWidth), e2;
}, d.outerWidth = function(t2) {
  let e2 = t2.clientWidth;
  const n2 = t2.ownerDocument.defaultView.getComputedStyle(t2);
  return e2 += (0, m.int)(n2.borderLeftWidth), e2 += (0, m.int)(n2.borderRightWidth), e2;
}, d.removeClassName = x, d.removeEvent = function(t2, e2, n2, r2) {
  if (!t2)
    return;
  const o2 = { capture: true, ...r2 };
  t2.removeEventListener ? t2.removeEventListener(e2, n2, o2) : t2.detachEvent ? t2.detachEvent("on" + e2, n2) : t2["on" + e2] = null;
}, d.removeUserSelectStyles = function(t2) {
  if (!t2)
    return;
  try {
    if (t2.body && x(t2.body, "react-draggable-transparent-selection"), t2.selection)
      t2.selection.empty();
    else {
      const e2 = (t2.defaultView || window).getSelection();
      e2 && "Caret" !== e2.type && e2.removeAllRanges();
    }
  } catch (t3) {
  }
};
var m = c, y = function(t2, e2) {
  if (!e2 && t2 && t2.__esModule)
    return t2;
  if (null === t2 || "object" != typeof t2 && "function" != typeof t2)
    return { default: t2 };
  var n2 = b(e2);
  if (n2 && n2.has(t2))
    return n2.get(t2);
  var r2 = {}, o2 = Object.defineProperty && Object.getOwnPropertyDescriptor;
  for (var a2 in t2)
    if ("default" !== a2 && Object.prototype.hasOwnProperty.call(t2, a2)) {
      var i2 = o2 ? Object.getOwnPropertyDescriptor(t2, a2) : null;
      i2 && (i2.get || i2.set) ? Object.defineProperty(r2, a2, i2) : r2[a2] = t2[a2];
    }
  r2.default = t2, n2 && n2.set(t2, r2);
  return r2;
}(f);
function b(t2) {
  if ("function" != typeof WeakMap)
    return null;
  var e2 = /* @__PURE__ */ new WeakMap(), n2 = /* @__PURE__ */ new WeakMap();
  return (b = function(t3) {
    return t3 ? n2 : e2;
  })(t2);
}
let v = "";
function D(t2, e2) {
  return v || (v = (0, m.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(e3) {
    return (0, m.isFunction)(t2[e3]);
  })), !!(0, m.isFunction)(t2[v]) && t2[v](e2);
}
function S(t2, e2, n2) {
  let { x: r2, y: o2 } = t2, a2 = "translate(".concat(r2).concat(n2, ",").concat(o2).concat(n2, ")");
  if (e2) {
    const t3 = "".concat("string" == typeof e2.x ? e2.x : e2.x + n2), r3 = "".concat("string" == typeof e2.y ? e2.y : e2.y + n2);
    a2 = "translate(".concat(t3, ", ").concat(r3, ")") + a2;
  }
  return a2;
}
function w(t2, e2) {
  t2.classList ? t2.classList.add(e2) : t2.className.match(new RegExp("(?:^|\\s)".concat(e2, "(?!\\S)"))) || (t2.className += " ".concat(e2));
}
function x(t2, e2) {
  t2.classList ? t2.classList.remove(e2) : t2.className = t2.className.replace(new RegExp("(?:^|\\s)".concat(e2, "(?!\\S)"), "g"), "");
}
var M = {};
Object.defineProperty(M, "__esModule", { value: true }), M.canDragX = function(t2) {
  return "both" === t2.props.axis || "x" === t2.props.axis;
}, M.canDragY = function(t2) {
  return "both" === t2.props.axis || "y" === t2.props.axis;
}, M.createCoreData = function(t2, e2, n2) {
  const r2 = !(0, P.isNum)(t2.lastX), o2 = T(t2);
  return r2 ? { node: o2, deltaX: 0, deltaY: 0, lastX: e2, lastY: n2, x: e2, y: n2 } : { node: o2, deltaX: e2 - t2.lastX, deltaY: n2 - t2.lastY, lastX: t2.lastX, lastY: t2.lastY, x: e2, y: n2 };
}, M.createDraggableData = function(t2, e2) {
  const n2 = t2.props.scale;
  return { node: e2.node, x: t2.state.x + e2.deltaX / n2, y: t2.state.y + e2.deltaY / n2, deltaX: e2.deltaX / n2, deltaY: e2.deltaY / n2, lastX: t2.state.x, lastY: t2.state.y };
}, M.getBoundPosition = function(t2, e2, n2) {
  if (!t2.props.bounds)
    return [e2, n2];
  let { bounds: r2 } = t2.props;
  r2 = "string" == typeof r2 ? r2 : function(t3) {
    return { left: t3.left, top: t3.top, right: t3.right, bottom: t3.bottom };
  }(r2);
  const o2 = T(t2);
  if ("string" == typeof r2) {
    const { ownerDocument: t3 } = o2, e3 = t3.defaultView;
    let n3;
    if (n3 = "parent" === r2 ? o2.parentNode : t3.querySelector(r2), !(n3 instanceof e3.HTMLElement))
      throw new Error('Bounds selector "' + r2 + '" could not find an element.');
    const a2 = n3, i2 = e3.getComputedStyle(o2), s2 = e3.getComputedStyle(a2);
    r2 = { left: -o2.offsetLeft + (0, P.int)(s2.paddingLeft) + (0, P.int)(i2.marginLeft), top: -o2.offsetTop + (0, P.int)(s2.paddingTop) + (0, P.int)(i2.marginTop), right: (0, O.innerWidth)(a2) - (0, O.outerWidth)(o2) - o2.offsetLeft + (0, P.int)(s2.paddingRight) - (0, P.int)(i2.marginRight), bottom: (0, O.innerHeight)(a2) - (0, O.outerHeight)(o2) - o2.offsetTop + (0, P.int)(s2.paddingBottom) - (0, P.int)(i2.marginBottom) };
  }
  (0, P.isNum)(r2.right) && (e2 = Math.min(e2, r2.right));
  (0, P.isNum)(r2.bottom) && (n2 = Math.min(n2, r2.bottom));
  (0, P.isNum)(r2.left) && (e2 = Math.max(e2, r2.left));
  (0, P.isNum)(r2.top) && (n2 = Math.max(n2, r2.top));
  return [e2, n2];
}, M.getControlPosition = function(t2, e2, n2) {
  const r2 = "number" == typeof e2 ? (0, O.getTouch)(t2, e2) : null;
  if ("number" == typeof e2 && !r2)
    return null;
  const o2 = T(n2), a2 = n2.props.offsetParent || o2.offsetParent || o2.ownerDocument.body;
  return (0, O.offsetXYFromParent)(r2 || t2, a2, n2.props.scale);
}, M.snapToGrid = function(t2, e2, n2) {
  const r2 = Math.round(e2 / t2[0]) * t2[0], o2 = Math.round(n2 / t2[1]) * t2[1];
  return [r2, o2];
};
var P = c, O = d;
function T(t2) {
  const e2 = t2.findDOMNode();
  if (!e2)
    throw new Error("<DraggableCore>: Unmounted during event!");
  return e2;
}
var N = {}, j = {};
Object.defineProperty(j, "__esModule", { value: true }), j.default = function() {
}, Object.defineProperty(N, "__esModule", { value: true }), N.default = void 0;
var C = function(t2, e2) {
  if (!e2 && t2 && t2.__esModule)
    return t2;
  if (null === t2 || "object" != typeof t2 && "function" != typeof t2)
    return { default: t2 };
  var n2 = A(e2);
  if (n2 && n2.has(t2))
    return n2.get(t2);
  var r2 = {}, o2 = Object.defineProperty && Object.getOwnPropertyDescriptor;
  for (var a2 in t2)
    if ("default" !== a2 && Object.prototype.hasOwnProperty.call(t2, a2)) {
      var i2 = o2 ? Object.getOwnPropertyDescriptor(t2, a2) : null;
      i2 && (i2.get || i2.set) ? Object.defineProperty(r2, a2, i2) : r2[a2] = t2[a2];
    }
  r2.default = t2, n2 && n2.set(t2, r2);
  return r2;
}(r), E = L(o), k = L(t), X = d, Y = M, _ = c, W = L(j);
function L(t2) {
  return t2 && t2.__esModule ? t2 : { default: t2 };
}
function A(t2) {
  if ("function" != typeof WeakMap)
    return null;
  var e2 = /* @__PURE__ */ new WeakMap(), n2 = /* @__PURE__ */ new WeakMap();
  return (A = function(t3) {
    return t3 ? n2 : e2;
  })(t2);
}
function U(t2, e2, n2) {
  return (e2 = function(t3) {
    var e3 = function(t4, e4) {
      if ("object" != typeof t4 || null === t4)
        return t4;
      var n3 = t4[Symbol.toPrimitive];
      if (void 0 !== n3) {
        var r2 = n3.call(t4, e4 || "default");
        if ("object" != typeof r2)
          return r2;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return ("string" === e4 ? String : Number)(t4);
    }(t3, "string");
    return "symbol" == typeof e3 ? e3 : String(e3);
  }(e2)) in t2 ? Object.defineProperty(t2, e2, { value: n2, enumerable: true, configurable: true, writable: true }) : t2[e2] = n2, t2;
}
const H = { start: "touchstart", move: "touchmove", stop: "touchend" }, R = { start: "mousedown", move: "mousemove", stop: "mouseup" };
let V = R, I = class extends C.Component {
  constructor() {
    super(...arguments), U(this, "dragging", false), U(this, "lastX", NaN), U(this, "lastY", NaN), U(this, "touchIdentifier", null), U(this, "mounted", false), U(this, "handleDragStart", (t2) => {
      if (this.props.onMouseDown(t2), !this.props.allowAnyClick && "number" == typeof t2.button && 0 !== t2.button)
        return false;
      const e2 = this.findDOMNode();
      if (!e2 || !e2.ownerDocument || !e2.ownerDocument.body)
        throw new Error("<DraggableCore> not mounted on DragStart!");
      const { ownerDocument: n2 } = e2;
      if (this.props.disabled || !(t2.target instanceof n2.defaultView.Node) || this.props.handle && !(0, X.matchesSelectorAndParentsTo)(t2.target, this.props.handle, e2) || this.props.cancel && (0, X.matchesSelectorAndParentsTo)(t2.target, this.props.cancel, e2))
        return;
      "touchstart" === t2.type && t2.preventDefault();
      const r2 = (0, X.getTouchIdentifier)(t2);
      this.touchIdentifier = r2;
      const o2 = (0, Y.getControlPosition)(t2, r2, this);
      if (null == o2)
        return;
      const { x: a2, y: i2 } = o2, s2 = (0, Y.createCoreData)(this, a2, i2);
      (0, W.default)("DraggableCore: handleDragStart: %j", s2), (0, W.default)("calling", this.props.onStart);
      false !== this.props.onStart(t2, s2) && false !== this.mounted && (this.props.enableUserSelectHack && (0, X.addUserSelectStyles)(n2), this.dragging = true, this.lastX = a2, this.lastY = i2, (0, X.addEvent)(n2, V.move, this.handleDrag), (0, X.addEvent)(n2, V.stop, this.handleDragStop));
    }), U(this, "handleDrag", (t2) => {
      const e2 = (0, Y.getControlPosition)(t2, this.touchIdentifier, this);
      if (null == e2)
        return;
      let { x: n2, y: r2 } = e2;
      if (Array.isArray(this.props.grid)) {
        let t3 = n2 - this.lastX, e3 = r2 - this.lastY;
        if ([t3, e3] = (0, Y.snapToGrid)(this.props.grid, t3, e3), !t3 && !e3)
          return;
        n2 = this.lastX + t3, r2 = this.lastY + e3;
      }
      const o2 = (0, Y.createCoreData)(this, n2, r2);
      (0, W.default)("DraggableCore: handleDrag: %j", o2);
      if (false !== this.props.onDrag(t2, o2) && false !== this.mounted)
        this.lastX = n2, this.lastY = r2;
      else
        try {
          this.handleDragStop(new MouseEvent("mouseup"));
        } catch (t3) {
          const e3 = document.createEvent("MouseEvents");
          e3.initMouseEvent("mouseup", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null), this.handleDragStop(e3);
        }
    }), U(this, "handleDragStop", (t2) => {
      if (!this.dragging)
        return;
      const e2 = (0, Y.getControlPosition)(t2, this.touchIdentifier, this);
      if (null == e2)
        return;
      let { x: n2, y: r2 } = e2;
      if (Array.isArray(this.props.grid)) {
        let t3 = n2 - this.lastX || 0, e3 = r2 - this.lastY || 0;
        [t3, e3] = (0, Y.snapToGrid)(this.props.grid, t3, e3), n2 = this.lastX + t3, r2 = this.lastY + e3;
      }
      const o2 = (0, Y.createCoreData)(this, n2, r2);
      if (false === this.props.onStop(t2, o2) || false === this.mounted)
        return false;
      const a2 = this.findDOMNode();
      a2 && this.props.enableUserSelectHack && (0, X.removeUserSelectStyles)(a2.ownerDocument), (0, W.default)("DraggableCore: handleDragStop: %j", o2), this.dragging = false, this.lastX = NaN, this.lastY = NaN, a2 && ((0, W.default)("DraggableCore: Removing handlers"), (0, X.removeEvent)(a2.ownerDocument, V.move, this.handleDrag), (0, X.removeEvent)(a2.ownerDocument, V.stop, this.handleDragStop));
    }), U(this, "onMouseDown", (t2) => (V = R, this.handleDragStart(t2))), U(this, "onMouseUp", (t2) => (V = R, this.handleDragStop(t2))), U(this, "onTouchStart", (t2) => (V = H, this.handleDragStart(t2))), U(this, "onTouchEnd", (t2) => (V = H, this.handleDragStop(t2)));
  }
  componentDidMount() {
    this.mounted = true;
    const t2 = this.findDOMNode();
    t2 && (0, X.addEvent)(t2, H.start, this.onTouchStart, { passive: false });
  }
  componentWillUnmount() {
    this.mounted = false;
    const t2 = this.findDOMNode();
    if (t2) {
      const { ownerDocument: e2 } = t2;
      (0, X.removeEvent)(e2, R.move, this.handleDrag), (0, X.removeEvent)(e2, H.move, this.handleDrag), (0, X.removeEvent)(e2, R.stop, this.handleDragStop), (0, X.removeEvent)(e2, H.stop, this.handleDragStop), (0, X.removeEvent)(t2, H.start, this.onTouchStart, { passive: false }), this.props.enableUserSelectHack && (0, X.removeUserSelectStyles)(e2);
    }
  }
  findDOMNode() {
    var t2, e2;
    return null !== (t2 = this.props) && void 0 !== t2 && t2.nodeRef ? null === (e2 = this.props) || void 0 === e2 || null === (e2 = e2.nodeRef) || void 0 === e2 ? void 0 : e2.current : k.default.findDOMNode(this);
  }
  render() {
    return C.cloneElement(C.Children.only(this.props.children), { onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onTouchEnd: this.onTouchEnd });
  }
};
N.default = I, U(I, "displayName", "DraggableCore"), U(I, "propTypes", { allowAnyClick: E.default.bool, children: E.default.node.isRequired, disabled: E.default.bool, enableUserSelectHack: E.default.bool, offsetParent: function(t2, e2) {
  if (t2[e2] && 1 !== t2[e2].nodeType)
    throw new Error("Draggable's offsetParent must be a DOM Node.");
}, grid: E.default.arrayOf(E.default.number), handle: E.default.string, cancel: E.default.string, nodeRef: E.default.object, onStart: E.default.func, onDrag: E.default.func, onStop: E.default.func, onMouseDown: E.default.func, scale: E.default.number, className: _.dontSetMe, style: _.dontSetMe, transform: _.dontSetMe }), U(I, "defaultProps", { allowAnyClick: false, disabled: false, enableUserSelectHack: true, onStart: function() {
}, onDrag: function() {
}, onStop: function() {
}, onMouseDown: function() {
}, scale: 1 }), function(e2) {
  Object.defineProperty(e2, "__esModule", { value: true }), Object.defineProperty(e2, "DraggableCore", { enumerable: true, get: function() {
    return g2.default;
  } }), e2.default = void 0;
  var n2 = function(t2, e3) {
    if (!e3 && t2 && t2.__esModule)
      return t2;
    if (null === t2 || "object" != typeof t2 && "function" != typeof t2)
      return { default: t2 };
    var n3 = y2(e3);
    if (n3 && n3.has(t2))
      return n3.get(t2);
    var r2 = {}, o2 = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for (var a3 in t2)
      if ("default" !== a3 && Object.prototype.hasOwnProperty.call(t2, a3)) {
        var i3 = o2 ? Object.getOwnPropertyDescriptor(t2, a3) : null;
        i3 && (i3.get || i3.set) ? Object.defineProperty(r2, a3, i3) : r2[a3] = t2[a3];
      }
    r2.default = t2, n3 && n3.set(t2, r2);
    return r2;
  }(r), a2 = m2(o), i2 = m2(t), s2 = m2(u), l2 = d, f2 = M, p2 = c, g2 = m2(N), h2 = m2(j);
  function m2(t2) {
    return t2 && t2.__esModule ? t2 : { default: t2 };
  }
  function y2(t2) {
    if ("function" != typeof WeakMap)
      return null;
    var e3 = /* @__PURE__ */ new WeakMap(), n3 = /* @__PURE__ */ new WeakMap();
    return (y2 = function(t3) {
      return t3 ? n3 : e3;
    })(t2);
  }
  function b2() {
    return b2 = Object.assign ? Object.assign.bind() : function(t2) {
      for (var e3 = 1; e3 < arguments.length; e3++) {
        var n3 = arguments[e3];
        for (var r2 in n3)
          Object.prototype.hasOwnProperty.call(n3, r2) && (t2[r2] = n3[r2]);
      }
      return t2;
    }, b2.apply(this, arguments);
  }
  function v2(t2, e3, n3) {
    return (e3 = function(t3) {
      var e4 = function(t4, e5) {
        if ("object" != typeof t4 || null === t4)
          return t4;
        var n4 = t4[Symbol.toPrimitive];
        if (void 0 !== n4) {
          var r2 = n4.call(t4, e5 || "default");
          if ("object" != typeof r2)
            return r2;
          throw new TypeError("@@toPrimitive must return a primitive value.");
        }
        return ("string" === e5 ? String : Number)(t4);
      }(t3, "string");
      return "symbol" == typeof e4 ? e4 : String(e4);
    }(e3)) in t2 ? Object.defineProperty(t2, e3, { value: n3, enumerable: true, configurable: true, writable: true }) : t2[e3] = n3, t2;
  }
  class D2 extends n2.Component {
    static getDerivedStateFromProps(t2, e3) {
      let { position: n3 } = t2, { prevPropsPosition: r2 } = e3;
      return !n3 || r2 && n3.x === r2.x && n3.y === r2.y ? null : ((0, h2.default)("Draggable: getDerivedStateFromProps %j", { position: n3, prevPropsPosition: r2 }), { x: n3.x, y: n3.y, prevPropsPosition: { ...n3 } });
    }
    constructor(t2) {
      super(t2), v2(this, "onDragStart", (t3, e3) => {
        (0, h2.default)("Draggable: onDragStart: %j", e3);
        if (false === this.props.onStart(t3, (0, f2.createDraggableData)(this, e3)))
          return false;
        this.setState({ dragging: true, dragged: true });
      }), v2(this, "onDrag", (t3, e3) => {
        if (!this.state.dragging)
          return false;
        (0, h2.default)("Draggable: onDrag: %j", e3);
        const n3 = (0, f2.createDraggableData)(this, e3), r2 = { x: n3.x, y: n3.y, slackX: 0, slackY: 0 };
        if (this.props.bounds) {
          const { x: t4, y: e4 } = r2;
          r2.x += this.state.slackX, r2.y += this.state.slackY;
          const [o2, a3] = (0, f2.getBoundPosition)(this, r2.x, r2.y);
          r2.x = o2, r2.y = a3, r2.slackX = this.state.slackX + (t4 - r2.x), r2.slackY = this.state.slackY + (e4 - r2.y), n3.x = r2.x, n3.y = r2.y, n3.deltaX = r2.x - this.state.x, n3.deltaY = r2.y - this.state.y;
        }
        if (false === this.props.onDrag(t3, n3))
          return false;
        this.setState(r2);
      }), v2(this, "onDragStop", (t3, e3) => {
        if (!this.state.dragging)
          return false;
        if (false === this.props.onStop(t3, (0, f2.createDraggableData)(this, e3)))
          return false;
        (0, h2.default)("Draggable: onDragStop: %j", e3);
        const n3 = { dragging: false, slackX: 0, slackY: 0 };
        if (Boolean(this.props.position)) {
          const { x: t4, y: e4 } = this.props.position;
          n3.x = t4, n3.y = e4;
        }
        this.setState(n3);
      }), this.state = { dragging: false, dragged: false, x: t2.position ? t2.position.x : t2.defaultPosition.x, y: t2.position ? t2.position.y : t2.defaultPosition.y, prevPropsPosition: { ...t2.position }, slackX: 0, slackY: 0, isElementSVG: false };
    }
    componentDidMount() {
      void 0 !== window.SVGElement && this.findDOMNode() instanceof window.SVGElement && this.setState({ isElementSVG: true });
    }
    componentWillUnmount() {
      this.setState({ dragging: false });
    }
    findDOMNode() {
      var t2, e3;
      return null !== (t2 = null === (e3 = this.props) || void 0 === e3 || null === (e3 = e3.nodeRef) || void 0 === e3 ? void 0 : e3.current) && void 0 !== t2 ? t2 : i2.default.findDOMNode(this);
    }
    render() {
      const { axis: t2, bounds: e3, children: r2, defaultPosition: o2, defaultClassName: a3, defaultClassNameDragging: i3, defaultClassNameDragged: u2, position: d2, positionOffset: c2, scale: p3, ...h3 } = this.props;
      let m3 = {}, y3 = null;
      const v3 = !Boolean(d2) || this.state.dragging, D3 = d2 || o2, S2 = { x: (0, f2.canDragX)(this) && v3 ? this.state.x : D3.x, y: (0, f2.canDragY)(this) && v3 ? this.state.y : D3.y };
      this.state.isElementSVG ? y3 = (0, l2.createSVGTransform)(S2, c2) : m3 = (0, l2.createCSSTransform)(S2, c2);
      const w2 = (0, s2.default)(r2.props.className || "", a3, { [i3]: this.state.dragging, [u2]: this.state.dragged });
      return n2.createElement(g2.default, b2({}, h3, { onStart: this.onDragStart, onDrag: this.onDrag, onStop: this.onDragStop }), n2.cloneElement(n2.Children.only(r2), { className: w2, style: { ...r2.props.style, ...m3 }, transform: y3 }));
    }
  }
  e2.default = D2, v2(D2, "displayName", "Draggable"), v2(D2, "propTypes", { ...g2.default.propTypes, axis: a2.default.oneOf(["both", "x", "y", "none"]), bounds: a2.default.oneOfType([a2.default.shape({ left: a2.default.number, right: a2.default.number, top: a2.default.number, bottom: a2.default.number }), a2.default.string, a2.default.oneOf([false])]), defaultClassName: a2.default.string, defaultClassNameDragging: a2.default.string, defaultClassNameDragged: a2.default.string, defaultPosition: a2.default.shape({ x: a2.default.number, y: a2.default.number }), positionOffset: a2.default.shape({ x: a2.default.oneOfType([a2.default.number, a2.default.string]), y: a2.default.oneOfType([a2.default.number, a2.default.string]) }), position: a2.default.shape({ x: a2.default.number, y: a2.default.number }), className: p2.dontSetMe, style: p2.dontSetMe, transform: p2.dontSetMe }), v2(D2, "defaultProps", { ...g2.default.defaultProps, axis: "both", bounds: false, defaultClassName: "react-draggable", defaultClassNameDragging: "react-draggable-dragging", defaultClassNameDragged: "react-draggable-dragged", defaultPosition: { x: 0, y: 0 }, scale: 1 });
}(i);
const { default: B, DraggableCore: G } = i;
a.exports = B, a.exports.default = B, a.exports.DraggableCore = G;
var F = a.exports;
const z = n(F);
export {
  z as D,
  F as c
};
