UNPKG

grid-layout-plus-no-pnpm

Version:

<p align="center"> <a href="https://grid-layout-plus.netlify.app/" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/grid-layout-plus.svg" width="180" style="width: 120px;" /> </a> </p>

1,154 lines 231 kB
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.vgl-layout{--vgl-placeholder-bg: red;--vgl-placeholder-opacity: 20%;--vgl-placeholder-z-index: 2;--vgl-item-resizing-z-index: 3;--vgl-item-resizing-opacity: 60%;--vgl-item-dragging-z-index: 3;--vgl-item-dragging-opacity: 100%;--vgl-resizer-size: 10px;--vgl-resizer-border-color: #444;--vgl-resizer-border-width: 2px;position:relative;box-sizing:border-box;transition:height .2s ease}.vgl-item{position:absolute;box-sizing:border-box;transition:.2s ease;transition-property:left,top,right}.vgl-item--placeholder{z-index:var(--vgl-placeholder-z-index, 2);-webkit-user-select:none;-moz-user-select:none;user-select:none;background-color:var(--vgl-placeholder-bg, red);opacity:var(--vgl-placeholder-opacity, 20%);transition-duration:.1s}.vgl-item--no-touch{touch-action:none}.vgl-item--transform{right:auto;left:0;transition-property:transform}.vgl-item--transform.vgl-item--rtl{right:0;left:auto}.vgl-item--resizing{z-index:var(--vgl-item-resizing-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-resizing-opacity, 60%)}.vgl-item--dragging{z-index:var(--vgl-item-dragging-z-index, 3);-webkit-user-select:none;-moz-user-select:none;user-select:none;opacity:var(--vgl-item-dragging-opacity, 100%);transition:none}.vgl-item__resizer{position:absolute;right:0;bottom:0;box-sizing:border-box;width:var(--vgl-resizer-size);height:var(--vgl-resizer-size);cursor:se-resize}.vgl-item__resizer:before{position:absolute;inset:0 3px 3px 0;content:"";border:0 solid var(--vgl-resizer-border-color);border-right-width:var(--vgl-resizer-border-width);border-bottom-width:var(--vgl-resizer-border-width)}.vgl-item__resizer--rtl{right:auto;left:0;cursor:sw-resize}.vgl-item__resizer--rtl:before{inset:0 0 3px 3px;border-right-width:0;border-bottom-width:var(--vgl-resizer-border-width);border-left-width:var(--vgl-resizer-border-width)}')),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})(); import { defineComponent as si, inject as Bo, ref as qn, reactive as Vn, toRef as hs, onBeforeMount as li, onMounted as ui, watchEffect as vs, onBeforeUnmount as ci, computed as zt, watch as ae, openBlock as on, createElementBlock as $n, normalizeClass as Fo, unref as Tr, normalizeStyle as fi, renderSlot as Rr, createCommentVNode as gs, nextTick as at, provide as Lo, toRefs as Wo, Fragment as ms, renderList as ys, createBlock as bs, mergeProps as ws, withCtx as xs, withDirectives as Es, createVNode as _s, vShow as Os } from "vue"; const Ss = typeof window < "u"; var No; Ss && ((No = window == null ? void 0 : window.navigator) != null && No.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); function Te(c) { return c == null; } const Ps = Object.freeze({ aliceblue: "f0f8ff", antiquewhite: "faebd7", aqua: "0ff", aquamarine: "7fffd4", azure: "f0ffff", beige: "f5f5dc", bisque: "ffe4c4", black: "000", blanchedalmond: "ffebcd", blue: "00f", blueviolet: "8a2be2", brown: "a52a2a", burlywood: "deb887", burntsienna: "ea7e5d", cadetblue: "5f9ea0", chartreuse: "7fff00", chocolate: "d2691e", coral: "ff7f50", cornflowerblue: "6495ed", cornsilk: "fff8dc", crimson: "dc143c", cyan: "0ff", darkblue: "00008b", darkcyan: "008b8b", darkgoldenrod: "b8860b", darkgray: "a9a9a9", darkgreen: "006400", darkgrey: "a9a9a9", darkkhaki: "bdb76b", darkmagenta: "8b008b", darkolivegreen: "556b2f", darkorange: "ff8c00", darkorchid: "9932cc", darkred: "8b0000", darksalmon: "e9967a", darkseagreen: "8fbc8f", darkslateblue: "483d8b", darkslategray: "2f4f4f", darkslategrey: "2f4f4f", darkturquoise: "00ced1", darkviolet: "9400d3", deeppink: "ff1493", deepskyblue: "00bfff", dimgray: "696969", dimgrey: "696969", dodgerblue: "1e90ff", firebrick: "b22222", floralwhite: "fffaf0", forestgreen: "228b22", fuchsia: "f0f", gainsboro: "dcdcdc", ghostwhite: "f8f8ff", gold: "ffd700", goldenrod: "daa520", gray: "808080", green: "008000", greenyellow: "adff2f", grey: "808080", honeydew: "f0fff0", hotpink: "ff69b4", indianred: "cd5c5c", indigo: "4b0082", ivory: "fffff0", khaki: "f0e68c", lavender: "e6e6fa", lavenderblush: "fff0f5", lawngreen: "7cfc00", lemonchiffon: "fffacd", lightblue: "add8e6", lightcoral: "f08080", lightcyan: "e0ffff", lightgoldenrodyellow: "fafad2", lightgray: "d3d3d3", lightgreen: "90ee90", lightgrey: "d3d3d3", lightpink: "ffb6c1", lightsalmon: "ffa07a", lightseagreen: "20b2aa", lightskyblue: "87cefa", lightslategray: "789", lightslategrey: "789", lightsteelblue: "b0c4de", lightyellow: "ffffe0", lime: "0f0", limegreen: "32cd32", linen: "faf0e6", magenta: "f0f", maroon: "800000", mediumaquamarine: "66cdaa", mediumblue: "0000cd", mediumorchid: "ba55d3", mediumpurple: "9370db", mediumseagreen: "3cb371", mediumslateblue: "7b68ee", mediumspringgreen: "00fa9a", mediumturquoise: "48d1cc", mediumvioletred: "c71585", midnightblue: "191970", mintcream: "f5fffa", mistyrose: "ffe4e1", moccasin: "ffe4b5", navajowhite: "ffdead", navy: "000080", oldlace: "fdf5e6", olive: "808000", olivedrab: "6b8e23", orange: "ffa500", orangered: "ff4500", orchid: "da70d6", palegoldenrod: "eee8aa", palegreen: "98fb98", paleturquoise: "afeeee", palevioletred: "db7093", papayawhip: "ffefd5", peachpuff: "ffdab9", peru: "cd853f", pink: "ffc0cb", plum: "dda0dd", powderblue: "b0e0e6", purple: "800080", rebeccapurple: "663399", red: "f00", rosybrown: "bc8f8f", royalblue: "4169e1", saddlebrown: "8b4513", salmon: "fa8072", sandybrown: "f4a460", seagreen: "2e8b57", seashell: "fff5ee", sienna: "a0522d", silver: "c0c0c0", skyblue: "87ceeb", slateblue: "6a5acd", slategray: "708090", slategrey: "708090", snow: "fffafa", springgreen: "00ff7f", steelblue: "4682b4", tan: "d2b48c", teal: "008080", thistle: "d8bfd8", tomato: "ff6347", turquoise: "40e0d0", violet: "ee82ee", wheat: "f5deb3", white: "fff", whitesmoke: "f5f5f5", yellow: "ff0", yellowgreen: "9acd32" }); Object.freeze(new Set(Object.keys(Ps))); function ks() { const c = /* @__PURE__ */ new Map(); return { on(h, v) { const d = c.get(h); d != null && d.add(v) || c.set(h, /* @__PURE__ */ new Set([v])); }, off(h, v) { const d = c.get(h); d && d.delete(v); }, clear(h) { const v = c.get(h); v && v.clear(); }, clearAll() { c.clear(); }, emit(h, ...v) { const d = c.get(h); d && d.forEach((m) => { m(...v); }); } }; } function Ho(c, h = 16) { if (typeof c != "function") return c; let v = Date.now(), d; return function(...m) { const O = Date.now(), S = v + h - O; clearTimeout(d), S <= 0 ? (c(...m), v = Date.now()) : d = setTimeout(() => { c(...m); }, h); }; } function Ts(c, h = 100) { if (typeof c != "function") return c; let v; return function(...d) { clearTimeout(v), v = setTimeout(() => { c(...d); }, h); }; } const an = /* @__PURE__ */ new Set(), di = /* @__PURE__ */ new WeakMap(); function Ms() { an.forEach((c) => { c(...di.get(c)); }), an.clear(); } function Ee(c, ...h) { if (typeof c != "function") return c; di.set(c, h), !an.has(c) && (an.add(c), an.size === 1 && Promise.resolve().then(Ms)); } const pi = Symbol("LAYOUT_KEY"), hi = Symbol("EMITTER_KEY"); function zs(c) { let h = 0, v; for (let d = 0, m = c.length; d < m; d++) v = c[d].y + c[d].h, v > h && (h = v); return h; } function Dr(c) { const h = Array(c.length); for (let v = 0, d = c.length; v < d; v++) h[v] = js(c[v]); return h; } function js(c) { return { ...c }; } function vi(c, h) { return !(c === h || c.x + c.w <= h.x || c.x >= h.x + h.w || c.y + c.h <= h.y || c.y >= h.y + h.h); } function jt(c, h, v) { const d = mi(c), m = yi(c), O = Array(c.length); for (let S = 0, u = m.length; S < u; S++) { let V = m[S]; V.static || (V = Rs(d, V, h, v), d.push(V)), O[c.indexOf(V)] = V, V.moved = !1; } return O; } function Rs(c, h, v, d) { if (v) for (; h.y > 0 && !sn(c, h); ) h.y--; else if (d) { const O = d[h.i].y; for (; h.y > O && !sn(c, h); ) h.y--; } let m; for (; m = sn(c, h); ) h.y = m.y + m.h; return h; } function Ds(c, h) { const v = mi(c); for (let d = 0, m = c.length; d < m; d++) { const O = c[d]; if (O.x + O.w > h.cols && (O.x = h.cols - O.w), O.x < 0 && (O.x = 0, O.w = h.cols), !O.static) v.push(O); else for (; sn(v, O); ) O.y++; } return c; } function Xo(c, h) { for (let v = 0, d = c.length; v < d; v++) if (c[v].i === h) return c[v]; } function sn(c, h) { for (let v = 0, d = c.length; v < d; v++) if (vi(c[v], h)) return c[v]; } function gi(c, h) { return c.filter((v) => vi(v, h)); } function mi(c) { return c.filter((h) => h.static); } function Ir(c, h, v, d, m = !1, O = !1) { if (h.static) return c; const S = h.x, u = h.y, V = d && h.y > d; typeof v == "number" && (h.x = v), typeof d == "number" && (h.y = d), h.moved = !0; let ne = yi(c); V && (ne = ne.reverse()); const L = gi(ne, h); if (O && L.length) return h.x = S, h.y = u, h.moved = !1, c; for (let be = 0, he = L.length; be < he; be++) { const fe = L[be]; fe.moved || h.y > fe.y && h.y - fe.y > fe.h / 4 || (fe.static ? c = Yo(c, fe, h, m) : c = Yo(c, h, fe, m)); } return c; } function Yo(c, h, v, d) { if (d) { const O = { x: v.x, y: v.y, w: v.w, h: v.h, i: "-1" }; if (O.y = Math.max(h.y - v.h, 0), !sn(c, O)) return Ir(c, v, void 0, O.y, !1); } return Ir(c, v, void 0, v.y + 1, !1); } function Is(c, h, v, d) { const m = "translate3d(" + h + "px," + c + "px, 0)"; return { transform: m, WebkitTransform: m, MozTransform: m, msTransform: m, OTransform: m, width: v + "px", height: d + "px", position: "absolute" }; } function Cs(c, h, v, d) { const m = "translate3d(" + h * -1 + "px," + c + "px, 0)"; return { transform: m, WebkitTransform: m, MozTransform: m, msTransform: m, OTransform: m, width: v + "px", height: d + "px", position: "absolute" }; } function As(c, h, v, d) { return { top: c + "px", left: h + "px", width: v + "px", height: d + "px", position: "absolute" }; } function Bs(c, h, v, d) { return { top: c + "px", right: h + "px", width: v + "px", height: d + "px", position: "absolute" }; } function yi(c) { return Array.from(c).sort(function(h, v) { return h.y === v.y && h.x === v.x ? 0 : h.y > v.y || h.y === v.y && h.x > v.x ? 1 : -1; }); } function Fs(c, h) { h = h || "Layout"; const v = ["x", "y", "w", "h"], d = []; if (!Array.isArray(c)) throw new Error(h + " must be an array!"); for (let m = 0, O = c.length; m < O; m++) { const S = c[m]; for (let u = 0; u < v.length; u++) if (typeof S[v[u]] != "number") throw new Error( "VueGridLayout: " + h + "[" + m + "]." + v[u] + " must be a number!" ); if (S.i === void 0 || S.i === null) throw new Error("VueGridLayout: " + h + "[" + m + "].i cannot be null!"); if (typeof S.i != "number" && typeof S.i != "string") throw new Error("VueGridLayout: " + h + "[" + m + "].i must be a string or number!"); if (d.indexOf(S.i) >= 0) throw new Error("VueGridLayout: " + h + "[" + m + "].i must be unique!"); if (d.push(S.i), S.static !== void 0 && typeof S.static != "boolean") throw new Error("VueGridLayout: " + h + "[" + m + "].static must be a boolean!"); } } function Ls(c, h = "vgl") { const v = () => `${h}-${c}`; return { b: v, be: (S) => `${v()}__${S}`, bm: (S) => `${v()}--${S}`, bem: (S, u) => `${v()}__${S}--${u}` }; } function qo(c) { return Ws(c); } function Ws(c) { var O; const h = ((O = c.target) == null ? void 0 : O.offsetParent) || document.body, v = c.offsetParent === document.body ? { left: 0, top: 0 } : h.getBoundingClientRect(), d = c.clientX + h.scrollLeft - v.left, m = c.clientY + h.scrollTop - v.top; return { x: d, y: m }; } function Vo(c, h, v, d) { return Ns(c) ? { deltaX: v - c, deltaY: d - h, lastX: c, lastY: h, x: v, y: d } : { deltaX: 0, deltaY: 0, lastX: v, lastY: d, x: v, y: d }; } function Ns(c) { return typeof c == "number" && !Number.isNaN(c); } function Hs(c, h) { const v = bi(c); let d = v[0]; for (let m = 1, O = v.length; m < O; m++) { const S = v[m]; h > c[S] && (d = S); } return d; } function Cr(c, h) { if (!h[c]) throw new Error("ResponsiveGridLayout: `cols` entry for breakpoint " + c + " is missing!"); return h[c]; } function Xs(c, h, v, d, m, O, S) { if (h[d]) return Dr(h[d]); let u = c; const V = bi(v), ne = V.slice(V.indexOf(d)); for (let L = 0, be = ne.length; L < be; L++) { const he = ne[L]; if (h[he]) { u = h[he]; break; } } return u = Dr(u || []), jt(Ds(u, { cols: O }), S); } function bi(c) { return Object.keys(c).sort((v, d) => c[v] - c[d]); } let Ys = "auto"; function qs() { return typeof document < "u"; } function $o() { return qs() ? typeof document.dir < "u" ? document.dir : document.getElementsByTagName("html")[0].getAttribute("dir") : Ys; } function Vs(c) { return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c; } var Ar = {}, $s = { get exports() { return Ar; }, set exports(c) { Ar = c; } }; (function(c, h) { (function(v) { c.exports = v(); })(function() { var v = {}; Object.defineProperty(v, "__esModule", { value: !0 }), v.default = void 0, v.default = function(e) { return !(!e || !e.Window) && e instanceof e.Window; }; var d = {}; Object.defineProperty(d, "__esModule", { value: !0 }), d.getWindow = function(e) { return (0, v.default)(e) ? e : (e.ownerDocument || e).defaultView || O.window; }, d.init = S, d.window = d.realWindow = void 0; var m = void 0; d.realWindow = m; var O = void 0; function S(e) { d.realWindow = m = e; var t = e.document.createTextNode(""); t.ownerDocument !== e.document && typeof e.wrap == "function" && e.wrap(t) === t && (e = e.wrap(e)), d.window = O = e; } d.window = O, typeof window < "u" && window && S(window); var u = {}; function V(e) { return V = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { return typeof t; } : function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, V(e); } Object.defineProperty(u, "__esModule", { value: !0 }), u.default = void 0; var ne = function(e) { return !!e && V(e) === "object"; }, L = function(e) { return typeof e == "function"; }, be = { window: function(e) { return e === d.window || (0, v.default)(e); }, docFrag: function(e) { return ne(e) && e.nodeType === 11; }, object: ne, func: L, number: function(e) { return typeof e == "number"; }, bool: function(e) { return typeof e == "boolean"; }, string: function(e) { return typeof e == "string"; }, element: function(e) { if (!e || V(e) !== "object") return !1; var t = d.getWindow(e) || d.window; return /object|function/.test(typeof Element > "u" ? "undefined" : V(Element)) ? e instanceof Element || e instanceof t.Element : e.nodeType === 1 && typeof e.nodeName == "string"; }, plainObject: function(e) { return ne(e) && !!e.constructor && /function Object\b/.test(e.constructor.toString()); }, array: function(e) { return ne(e) && e.length !== void 0 && L(e.splice); } }; u.default = be; var he = {}; function fe(e) { var t = e.interaction; if (t.prepared.name === "drag") { var n = t.prepared.axis; n === "x" ? (t.coords.cur.page.y = t.coords.start.page.y, t.coords.cur.client.y = t.coords.start.client.y, t.coords.velocity.client.y = 0, t.coords.velocity.page.y = 0) : n === "y" && (t.coords.cur.page.x = t.coords.start.page.x, t.coords.cur.client.x = t.coords.start.client.x, t.coords.velocity.client.x = 0, t.coords.velocity.page.x = 0); } } function Ne(e) { var t = e.iEvent, n = e.interaction; if (n.prepared.name === "drag") { var r = n.prepared.axis; if (r === "x" || r === "y") { var o = r === "x" ? "y" : "x"; t.page[o] = n.coords.start.page[o], t.client[o] = n.coords.start.client[o], t.delta[o] = 0; } } } Object.defineProperty(he, "__esModule", { value: !0 }), he.default = void 0; var Re = { id: "actions/drag", install: function(e) { var t = e.actions, n = e.Interactable, r = e.defaults; n.prototype.draggable = Re.draggable, t.map.drag = Re, t.methodDict.drag = "draggable", r.actions.drag = Re.defaults; }, listeners: { "interactions:before-action-move": fe, "interactions:action-resume": fe, "interactions:action-move": Ne, "auto-start:check": function(e) { var t = e.interaction, n = e.interactable, r = e.buttons, o = n.options.drag; if (o && o.enabled && (!t.pointerIsDown || !/mouse|pointer/.test(t.pointerType) || r & n.options.drag.mouseButtons)) return e.action = { name: "drag", axis: o.lockAxis === "start" ? o.startAxis : o.lockAxis }, !1; } }, draggable: function(e) { return u.default.object(e) ? (this.options.drag.enabled = e.enabled !== !1, this.setPerAction("drag", e), this.setOnEvents("drag", e), /^(xy|x|y|start)$/.test(e.lockAxis) && (this.options.drag.lockAxis = e.lockAxis), /^(xy|x|y)$/.test(e.startAxis) && (this.options.drag.startAxis = e.startAxis), this) : u.default.bool(e) ? (this.options.drag.enabled = e, this) : this.options.drag; }, beforeMove: fe, move: Ne, defaults: { startAxis: "xy", lockAxis: "xy" }, getCursor: function() { return "move"; } }, He = Re; he.default = He; var H = {}; Object.defineProperty(H, "__esModule", { value: !0 }), H.default = void 0; var X = { init: function(e) { var t = e; X.document = t.document, X.DocumentFragment = t.DocumentFragment || ie, X.SVGElement = t.SVGElement || ie, X.SVGSVGElement = t.SVGSVGElement || ie, X.SVGElementInstance = t.SVGElementInstance || ie, X.Element = t.Element || ie, X.HTMLElement = t.HTMLElement || X.Element, X.Event = t.Event, X.Touch = t.Touch || ie, X.PointerEvent = t.PointerEvent || t.MSPointerEvent; }, document: null, DocumentFragment: null, SVGElement: null, SVGSVGElement: null, SVGElementInstance: null, Element: null, HTMLElement: null, Event: null, Touch: null, PointerEvent: null }; function ie() { } var se = X; H.default = se; var $ = {}; Object.defineProperty($, "__esModule", { value: !0 }), $.default = void 0; var re = { init: function(e) { var t = H.default.Element, n = e.navigator || {}; re.supportsTouch = "ontouchstart" in e || u.default.func(e.DocumentTouch) && H.default.document instanceof e.DocumentTouch, re.supportsPointerEvent = n.pointerEnabled !== !1 && !!H.default.PointerEvent, re.isIOS = /iP(hone|od|ad)/.test(n.platform), re.isIOS7 = /iP(hone|od|ad)/.test(n.platform) && /OS 7[^\d]/.test(n.appVersion), re.isIe9 = /MSIE 9/.test(n.userAgent), re.isOperaMobile = n.appName === "Opera" && re.supportsTouch && /Presto/.test(n.userAgent), re.prefixedMatchesSelector = "matches" in t.prototype ? "matches" : "webkitMatchesSelector" in t.prototype ? "webkitMatchesSelector" : "mozMatchesSelector" in t.prototype ? "mozMatchesSelector" : "oMatchesSelector" in t.prototype ? "oMatchesSelector" : "msMatchesSelector", re.pEventTypes = re.supportsPointerEvent ? H.default.PointerEvent === e.MSPointerEvent ? { up: "MSPointerUp", down: "MSPointerDown", over: "mouseover", out: "mouseout", move: "MSPointerMove", cancel: "MSPointerCancel" } : { up: "pointerup", down: "pointerdown", over: "pointerover", out: "pointerout", move: "pointermove", cancel: "pointercancel" } : null, re.wheelEvent = H.default.document && "onmousewheel" in H.default.document ? "mousewheel" : "wheel"; }, supportsTouch: null, supportsPointerEvent: null, isIOS7: null, isIOS: null, isIe9: null, isOperaMobile: null, prefixedMatchesSelector: null, pEventTypes: null, wheelEvent: null }, Qe = re; $.default = Qe; var j = {}; function _e(e) { var t = e.parentNode; if (u.default.docFrag(t)) { for (; (t = t.host) && u.default.docFrag(t); ) ; return t; } return t; } function T(e, t) { return d.window !== d.realWindow && (t = t.replace(/\/deep\//g, " ")), e[$.default.prefixedMatchesSelector](t); } Object.defineProperty(j, "__esModule", { value: !0 }), j.closest = function(e, t) { for (; u.default.element(e); ) { if (T(e, t)) return e; e = _e(e); } return null; }, j.getActualElement = function(e) { return e.correspondingUseElement || e; }, j.getElementClientRect = ye, j.getElementRect = function(e) { var t = ye(e); if (!$.default.isIOS7 && t) { var n = we(d.getWindow(e)); t.left += n.x, t.right += n.x, t.top += n.y, t.bottom += n.y; } return t; }, j.getPath = function(e) { for (var t = []; e; ) t.push(e), e = _e(e); return t; }, j.getScrollXY = we, j.indexOfDeepestElement = function(e) { for (var t, n = [], r = 0; r < e.length; r++) { var o = e[r], i = e[t]; if (o && r !== t) if (i) { var l = K(o), a = K(i); if (l !== o.ownerDocument) if (a !== o.ownerDocument) if (l !== a) { n = n.length ? n : G(i); var s = void 0; if (i instanceof H.default.HTMLElement && o instanceof H.default.SVGElement && !(o instanceof H.default.SVGSVGElement)) { if (o === a) continue; s = o.ownerSVGElement; } else s = o; for (var f = G(s, i.ownerDocument), p = 0; f[p] && f[p] === n[p]; ) p++; var g = [f[p - 1], f[p], n[p]]; if (g[0]) for (var b = g[0].lastChild; b; ) { if (b === g[1]) { t = r, n = f; break; } if (b === g[2]) break; b = b.previousSibling; } } else w = o, y = i, (parseInt(d.getWindow(w).getComputedStyle(w).zIndex, 10) || 0) >= (parseInt(d.getWindow(y).getComputedStyle(y).zIndex, 10) || 0) && (t = r); else t = r; } else t = r; } var w, y; return t; }, j.matchesSelector = T, j.matchesUpTo = function(e, t, n) { for (; u.default.element(e); ) { if (T(e, t)) return !0; if ((e = _e(e)) === n) return T(e, t); } return !1; }, j.nodeContains = function(e, t) { if (e.contains) return e.contains(t); for (; t; ) { if (t === e) return !0; t = t.parentNode; } return !1; }, j.parentNode = _e, j.trySelector = function(e) { return !!u.default.string(e) && (H.default.document.querySelector(e), !0); }; var K = function(e) { return e.parentNode || e.host; }; function G(e, t) { for (var n, r = [], o = e; (n = K(o)) && o !== t && n !== o.ownerDocument; ) r.unshift(o), o = n; return r; } function we(e) { return { x: (e = e || d.window).scrollX || e.document.documentElement.scrollLeft, y: e.scrollY || e.document.documentElement.scrollTop }; } function ye(e) { var t = e instanceof H.default.SVGElement ? e.getBoundingClientRect() : e.getClientRects()[0]; return t && { left: t.left, right: t.right, top: t.top, bottom: t.bottom, width: t.width || t.right - t.left, height: t.height || t.bottom - t.top }; } var k = {}; Object.defineProperty(k, "__esModule", { value: !0 }), k.default = function(e, t) { for (var n in t) e[n] = t[n]; return e; }; var R = {}; function Me(e, t) { (t == null || t > e.length) && (t = e.length); for (var n = 0, r = Array(t); n < t; n++) r[n] = e[n]; return r; } function Xe(e, t, n) { return e === "parent" ? (0, j.parentNode)(n) : e === "self" ? t.getRect(n) : (0, j.closest)(n, e); } Object.defineProperty(R, "__esModule", { value: !0 }), R.addEdges = function(e, t, n) { e.left && (t.left += n.x), e.right && (t.right += n.x), e.top && (t.top += n.y), e.bottom && (t.bottom += n.y), t.width = t.right - t.left, t.height = t.bottom - t.top; }, R.getStringOptionResult = Xe, R.rectToXY = function(e) { return e && { x: "x" in e ? e.x : e.left, y: "y" in e ? e.y : e.top }; }, R.resolveRectLike = function(e, t, n, r) { var o, i = e; return u.default.string(i) ? i = Xe(i, t, n) : u.default.func(i) && (i = i.apply(void 0, function(l) { if (Array.isArray(l)) return Me(l); }(o = r) || function(l) { if (typeof Symbol < "u" && l[Symbol.iterator] != null || l["@@iterator"] != null) return Array.from(l); }(o) || function(l, a) { if (l) { if (typeof l == "string") return Me(l, a); var s = Object.prototype.toString.call(l).slice(8, -1); return s === "Object" && l.constructor && (s = l.constructor.name), s === "Map" || s === "Set" ? Array.from(l) : s === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s) ? Me(l, a) : void 0; } }(o) || function() { throw new TypeError(`Invalid attempt to spread non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`); }())), u.default.element(i) && (i = (0, j.getElementRect)(i)), i; }, R.tlbrToXywh = function(e) { return !e || "x" in e && "y" in e || ((e = (0, k.default)({}, e)).x = e.left || 0, e.y = e.top || 0, e.width = e.width || (e.right || 0) - e.x, e.height = e.height || (e.bottom || 0) - e.y), e; }, R.xywhToTlbr = function(e) { return !e || "left" in e && "top" in e || ((e = (0, k.default)({}, e)).left = e.x || 0, e.top = e.y || 0, e.right = e.right || e.left + e.width, e.bottom = e.bottom || e.top + e.height), e; }; var ue = {}; Object.defineProperty(ue, "__esModule", { value: !0 }), ue.default = function(e, t, n) { var r = e.options[n], o = r && r.origin || e.options.origin, i = (0, R.resolveRectLike)(o, e, t, [e && t]); return (0, R.rectToXY)(i) || { x: 0, y: 0 }; }; var Q = {}; function Ye(e) { return e.trim().split(/ +/); } Object.defineProperty(Q, "__esModule", { value: !0 }), Q.default = function e(t, n, r) { if (r = r || {}, u.default.string(t) && t.search(" ") !== -1 && (t = Ye(t)), u.default.array(t)) return t.reduce(function(s, f) { return (0, k.default)(s, e(f, n, r)); }, r); if (u.default.object(t) && (n = t, t = ""), u.default.func(n)) r[t] = r[t] || [], r[t].push(n); else if (u.default.array(n)) for (var o = 0; o < n.length; o++) { var i; i = n[o], e(t, i, r); } else if (u.default.object(n)) for (var l in n) { var a = Ye(l).map(function(s) { return "".concat(t).concat(s); }); e(a, n[l], r); } return r; }; var ce = {}; Object.defineProperty(ce, "__esModule", { value: !0 }), ce.default = void 0, ce.default = function(e, t) { return Math.sqrt(e * e + t * t); }; var bt = {}; Object.defineProperty(bt, "__esModule", { value: !0 }), bt.default = function(e, t) { e.__set || (e.__set = {}); var n = function(o) { typeof e[o] != "function" && o !== "__set" && Object.defineProperty(e, o, { get: function() { return o in e.__set ? e.__set[o] : e.__set[o] = t[o]; }, set: function(i) { e.__set[o] = i; }, configurable: !0 }); }; for (var r in t) n(r); return e; }; var M = {}; function Ae(e) { return e instanceof H.default.Event || e instanceof H.default.Touch; } function qe(e, t, n) { return e = e || "page", (n = n || {}).x = t[e + "X"], n.y = t[e + "Y"], n; } function It(e, t) { return t = t || { x: 0, y: 0 }, $.default.isOperaMobile && Ae(e) ? (qe("screen", e, t), t.x += window.scrollX, t.y += window.scrollY) : qe("page", e, t), t; } function Ct(e, t) { return t = t || {}, $.default.isOperaMobile && Ae(e) ? qe("screen", e, t) : qe("client", e, t), t; } function Be(e) { var t = []; return u.default.array(e) ? (t[0] = e[0], t[1] = e[1]) : e.type === "touchend" ? e.touches.length === 1 ? (t[0] = e.touches[0], t[1] = e.changedTouches[0]) : e.touches.length === 0 && (t[0] = e.changedTouches[0], t[1] = e.changedTouches[1]) : (t[0] = e.touches[0], t[1] = e.touches[1]), t; } function wt(e) { for (var t = { pageX: 0, pageY: 0, clientX: 0, clientY: 0, screenX: 0, screenY: 0 }, n = 0; n < e.length; n++) { var r = e[n]; for (var o in t) t[o] += r[o]; } for (var i in t) t[i] /= e.length; return t; } Object.defineProperty(M, "__esModule", { value: !0 }), M.coordsToEvent = function(e) { return { coords: e, get page() { return this.coords.page; }, get client() { return this.coords.client; }, get timeStamp() { return this.coords.timeStamp; }, get pageX() { return this.coords.page.x; }, get pageY() { return this.coords.page.y; }, get clientX() { return this.coords.client.x; }, get clientY() { return this.coords.client.y; }, get pointerId() { return this.coords.pointerId; }, get target() { return this.coords.target; }, get type() { return this.coords.type; }, get pointerType() { return this.coords.pointerType; }, get buttons() { return this.coords.buttons; }, preventDefault: function() { } }; }, M.copyCoords = function(e, t) { e.page = e.page || {}, e.page.x = t.page.x, e.page.y = t.page.y, e.client = e.client || {}, e.client.x = t.client.x, e.client.y = t.client.y, e.timeStamp = t.timeStamp; }, M.getClientXY = Ct, M.getEventTargets = function(e) { var t = u.default.func(e.composedPath) ? e.composedPath() : e.path; return [j.getActualElement(t ? t[0] : e.target), j.getActualElement(e.currentTarget)]; }, M.getPageXY = It, M.getPointerId = function(e) { return u.default.number(e.pointerId) ? e.pointerId : e.identifier; }, M.getPointerType = function(e) { return u.default.string(e.pointerType) ? e.pointerType : u.default.number(e.pointerType) ? [void 0, void 0, "touch", "pen", "mouse"][e.pointerType] : /touch/.test(e.type || "") || e instanceof H.default.Touch ? "touch" : "mouse"; }, M.getTouchPair = Be, M.getXY = qe, M.isNativePointer = Ae, M.newCoords = function() { return { page: { x: 0, y: 0 }, client: { x: 0, y: 0 }, timeStamp: 0 }; }, M.pointerAverage = wt, Object.defineProperty(M, "pointerExtend", { enumerable: !0, get: function() { return bt.default; } }), M.setCoordDeltas = function(e, t, n) { e.page.x = n.page.x - t.page.x, e.page.y = n.page.y - t.page.y, e.client.x = n.client.x - t.client.x, e.client.y = n.client.y - t.client.y, e.timeStamp = n.timeStamp - t.timeStamp; }, M.setCoordVelocity = function(e, t) { var n = Math.max(t.timeStamp / 1e3, 1e-3); e.page.x = t.page.x / n, e.page.y = t.page.y / n, e.client.x = t.client.x / n, e.client.y = t.client.y / n, e.timeStamp = n; }, M.setCoords = function(e, t, n) { var r = t.length > 1 ? wt(t) : t[0]; It(r, e.page), Ct(r, e.client), e.timeStamp = n; }, M.setZeroCoords = function(e) { e.page.x = 0, e.page.y = 0, e.client.x = 0, e.client.y = 0; }, M.touchAngle = function(e, t) { var n = t + "X", r = t + "Y", o = Be(e), i = o[1][n] - o[0][n], l = o[1][r] - o[0][r]; return 180 * Math.atan2(l, i) / Math.PI; }, M.touchBBox = function(e) { if (!e.length) return null; var t = Be(e), n = Math.min(t[0].pageX, t[1].pageX), r = Math.min(t[0].pageY, t[1].pageY), o = Math.max(t[0].pageX, t[1].pageX), i = Math.max(t[0].pageY, t[1].pageY); return { x: n, y: r, left: n, top: r, right: o, bottom: i, width: o - n, height: i - r }; }, M.touchDistance = function(e, t) { var n = t + "X", r = t + "Y", o = Be(e), i = o[0][n] - o[1][n], l = o[0][r] - o[1][r]; return (0, ce.default)(i, l); }; var De = {}; function fn(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } function At(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } Object.defineProperty(De, "__esModule", { value: !0 }), De.BaseEvent = void 0; var dn = function() { function e(r) { (function(o, i) { if (!(o instanceof i)) throw new TypeError("Cannot call a class as a function"); })(this, e), At(this, "immediatePropagationStopped", !1), At(this, "propagationStopped", !1), this._interaction = r; } var t, n; return t = e, (n = [{ key: "preventDefault", value: function() { } }, { key: "stopPropagation", value: function() { this.propagationStopped = !0; } }, { key: "stopImmediatePropagation", value: function() { this.immediatePropagationStopped = this.propagationStopped = !0; } }]) && fn(t.prototype, n), Object.defineProperty(t, "prototype", { writable: !1 }), e; }(); De.BaseEvent = dn, Object.defineProperty(dn.prototype, "interaction", { get: function() { return this._interaction._proxy; }, set: function() { } }); var U = {}; Object.defineProperty(U, "__esModule", { value: !0 }), U.remove = U.merge = U.from = U.findIndex = U.find = U.contains = void 0, U.contains = function(e, t) { return e.indexOf(t) !== -1; }, U.remove = function(e, t) { return e.splice(e.indexOf(t), 1); }; var Bt = function(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; e.push(r); } return e; }; U.merge = Bt, U.from = function(e) { return Bt([], e); }; var Ft = function(e, t) { for (var n = 0; n < e.length; n++) if (t(e[n], n, e)) return n; return -1; }; U.findIndex = Ft, U.find = function(e, t) { return e[Ft(e, t)]; }; var Ie = {}; function xt(e) { return xt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) { return typeof t; } : function(t) { return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t; }, xt(e); } function Kn(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } function Fe(e, t) { return Fe = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, r) { return n.__proto__ = r, n; }, Fe(e, t); } function _(e, t) { if (t && (xt(t) === "object" || typeof t == "function")) return t; if (t !== void 0) throw new TypeError("Derived constructors may only return object or undefined"); return C(e); } function C(e) { if (e === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function Y(e) { return Y = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(t) { return t.__proto__ || Object.getPrototypeOf(t); }, Y(e); } function N(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } Object.defineProperty(Ie, "__esModule", { value: !0 }), Ie.DropEvent = void 0; var le = function(e) { (function(a, s) { if (typeof s != "function" && s !== null) throw new TypeError("Super expression must either be null or a function"); a.prototype = Object.create(s && s.prototype, { constructor: { value: a, writable: !0, configurable: !0 } }), Object.defineProperty(a, "prototype", { writable: !1 }), s && Fe(a, s); })(l, e); var t, n, r, o, i = (r = l, o = function() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() { })), !0; } catch { return !1; } }(), function() { var a, s = Y(r); if (o) { var f = Y(this).constructor; a = Reflect.construct(s, arguments, f); } else a = s.apply(this, arguments); return _(this, a); }); function l(a, s, f) { var p; (function(y, x) { if (!(y instanceof x)) throw new TypeError("Cannot call a class as a function"); })(this, l), N(C(p = i.call(this, s._interaction)), "dropzone", void 0), N(C(p), "dragEvent", void 0), N(C(p), "relatedTarget", void 0), N(C(p), "draggable", void 0), N(C(p), "propagationStopped", !1), N(C(p), "immediatePropagationStopped", !1); var g = f === "dragleave" ? a.prev : a.cur, b = g.element, w = g.dropzone; return p.type = f, p.target = b, p.currentTarget = b, p.dropzone = w, p.dragEvent = s, p.relatedTarget = s.target, p.draggable = s.interactable, p.timeStamp = s.timeStamp, p; } return t = l, (n = [{ key: "reject", value: function() { var a = this, s = this._interaction.dropState; if (this.type === "dropactivate" || this.dropzone && s.cur.dropzone === this.dropzone && s.cur.element === this.target) if (s.prev.dropzone = this.dropzone, s.prev.element = this.target, s.rejected = !0, s.events.enter = null, this.stopImmediatePropagation(), this.type === "dropactivate") { var f = s.activeDrops, p = U.findIndex(f, function(b) { var w = b.dropzone, y = b.element; return w === a.dropzone && y === a.target; }); s.activeDrops.splice(p, 1); var g = new l(s, this.dragEvent, "dropdeactivate"); g.dropzone = this.dropzone, g.target = this.target, this.dropzone.fire(g); } else this.dropzone.fire(new l(s, this.dragEvent, "dragleave")); } }, { key: "preventDefault", value: function() { } }, { key: "stopPropagation", value: function() { this.propagationStopped = !0; } }, { key: "stopImmediatePropagation", value: function() { this.immediatePropagationStopped = this.propagationStopped = !0; } }]) && Kn(t.prototype, n), Object.defineProperty(t, "prototype", { writable: !1 }), l; }(De.BaseEvent); Ie.DropEvent = le; var F = {}; function I(e, t) { for (var n = 0; n < e.slice().length; n++) { var r = e.slice()[n], o = r.dropzone, i = r.element; t.dropzone = o, t.target = i, o.fire(t), t.propagationStopped = t.immediatePropagationStopped = !1; } } function de(e, t) { for (var n = function(i, l) { for (var a = i.interactables, s = [], f = 0; f < a.list.length; f++) { var p = a.list[f]; if (p.options.drop.enabled) { var g = p.options.drop.accept; if (!(u.default.element(g) && g !== l || u.default.string(g) && !j.matchesSelector(l, g) || u.default.func(g) && !g({ dropzone: p, draggableElement: l }))) for (var b = u.default.string(p.target) ? p._context.querySelectorAll(p.target) : u.default.array(p.target) ? p.target : [p.target], w = 0; w < b.length; w++) { var y = b[w]; y !== l && s.push({ dropzone: p, element: y, rect: p.getRect(y) }); } } } return s; }(e, t), r = 0; r < n.length; r++) { var o = n[r]; o.rect = o.dropzone.getRect(o.element); } return n; } function Oe(e, t, n) { for (var r = e.dropState, o = e.interactable, i = e.element, l = [], a = 0; a < r.activeDrops.length; a++) { var s = r.activeDrops[a], f = s.dropzone, p = s.element, g = s.rect; l.push(f.dropCheck(t, n, o, i, p, g) ? p : null); } var b = j.indexOfDeepestElement(l); return r.activeDrops[b] || null; } function Pe(e, t, n) { var r = e.dropState, o = { enter: null, leave: null, activate: null, deactivate: null, move: null, drop: null }; return n.type === "dragstart" && (o.activate = new Ie.DropEvent(r, n, "dropactivate"), o.activate.target = null, o.activate.dropzone = null), n.type === "dragend" && (o.deactivate = new Ie.DropEvent(r, n, "dropdeactivate"), o.deactivate.target = null, o.deactivate.dropzone = null), r.rejected || (r.cur.element !== r.prev.element && (r.prev.dropzone && (o.leave = new Ie.DropEvent(r, n, "dragleave"), n.dragLeave = o.leave.target = r.prev.element, n.prevDropzone = o.leave.dropzone = r.prev.dropzone), r.cur.dropzone && (o.enter = new Ie.DropEvent(r, n, "dragenter"), n.dragEnter = r.cur.element, n.dropzone = r.cur.dropzone)), n.type === "dragend" && r.cur.dropzone && (o.drop = new Ie.DropEvent(r, n, "drop"), n.dropzone = r.cur.dropzone, n.relatedTarget = r.cur.element), n.type === "dragmove" && r.cur.dropzone && (o.move = new Ie.DropEvent(r, n, "dropmove"), o.move.dragmove = n, n.dropzone = r.cur.dropzone)), o; } function Ve(e, t) { var n = e.dropState, r = n.activeDrops, o = n.cur, i = n.prev; t.leave && i.dropzone.fire(t.leave), t.enter && o.dropzone.fire(t.enter), t.move && o.dropzone.fire(t.move), t.drop && o.dropzone.fire(t.drop), t.deactivate && I(r, t.deactivate), n.prev.dropzone = o.dropzone, n.prev.element = o.element; } function et(e, t) { var n = e.interaction, r = e.iEvent, o = e.event; if (r.type === "dragmove" || r.type === "dragend") { var i = n.dropState; t.dynamicDrop && (i.activeDrops = de(t, n.element)); var l = r, a = Oe(n, l, o); i.rejected = i.rejected && !!a && a.dropzone === i.cur.dropzone && a.element === i.cur.element, i.cur.dropzone = a && a.dropzone, i.cur.element = a && a.element, i.events = Pe(n, 0, l); } } Object.defineProperty(F, "__esModule", { value: !0 }), F.default = void 0; var Et = { id: "actions/drop", install: function(e) { var t = e.actions, n = e.interactStatic, r = e.Interactable, o = e.defaults; e.usePlugin(he.default), r.prototype.dropzone = function(i) { return function(l, a) { if (u.default.object(a)) { if (l.options.drop.enabled = a.enabled !== !1, a.listeners) { var s = (0, Q.default)(a.listeners), f = Object.keys(s).reduce(function(p, g) { return p[/^(enter|leave)/.test(g) ? "drag".concat(g) : /^(activate|deactivate|move)/.test(g) ? "drop".concat(g) : g] = s[g], p; }, {}); l.off(l.options.drop.listeners), l.on(f), l.options.drop.listeners = f; } return u.default.func(a.ondrop) && l.on("drop", a.ondrop), u.default.func(a.ondropactivate) && l.on("dropactivate", a.ondropactivate), u.default.func(a.ondropdeactivate) && l.on("dropdeactivate", a.ondropdeactivate), u.default.func(a.ondragenter) && l.on("dragenter", a.ondragenter), u.default.func(a.ondragleave) && l.on("dragleave", a.ondragleave), u.default.func(a.ondropmove) && l.on("dropmove", a.ondropmove), /^(pointer|center)$/.test(a.overlap) ? l.options.drop.overlap = a.overlap : u.default.number(a.overlap) && (l.options.drop.overlap = Math.max(Math.min(1, a.overlap), 0)), "accept" in a && (l.options.drop.accept = a.accept), "checker" in a && (l.options.drop.checker = a.checker), l; } return u.default.bool(a) ? (l.options.drop.enabled = a, l) : l.options.drop; }(this, i); }, r.prototype.dropCheck = function(i, l, a, s, f, p) { return function(g, b, w, y, x, P, E) { var z = !1; if (!(E = E || g.getRect(P))) return !!g.options.drop.checker && g.options.drop.checker(b, w, z, g, P, y, x); var D = g.options.drop.overlap; if (D === "pointer") { var B = (0, ue.default)(y, x, "drag"), q = M.getPageXY(b); q.x += B.x, q.y += B.y; var ee = q.x > E.left && q.x < E.right, W = q.y > E.top && q.y < E.bottom; z = ee && W; } var J = y.getRect(x); if (J && D === "center") { var je = J.left + J.width / 2, Je = J.top + J.height / 2; z = je >= E.left && je <= E.right && Je >= E.top && Je <= E.bottom; } return J && u.default.number(D) && (z = Math.max(0, Math.min(E.right, J.right) - Math.max(E.left, J.left)) * Math.max(0, Math.min(E.bottom, J.bottom) - Math.max(E.top, J.top)) / (J.width * J.height) >= D), g.options.drop.checker && (z = g.options.drop.checker(b, w, z, g, P, y, x)), z; }(this, i, l, a, s, f, p); }, n.dynamicDrop = function(i) { return u.default.bool(i) ? (e.dynamicDrop = i, n) : e.dynamicDrop; }, (0, k.default)(t.phaselessTypes, { dragenter: !0, dragleave: !0, dropactivate: !0, dropdeactivate: !0, dropmove: !0, drop: !0 }), t.methodDict.drop = "dropzone", e.dynamicDrop = !1, o.actions.drop = Et.defaults; }, listeners: { "interactions:before-action-start": function(e) { var t = e.interaction; t.prepared.name === "drag" && (t.dropState = { cur: { dropzone: null, element: null }, prev: { dropzone: null, element: null }, rejected: null, events: null, activeDrops: [] }); }, "interactions:after-action-start": function(e, t) { var n = e.interaction, r = (e.event, e.iEvent); if (n.prepared.name === "drag") { var o = n.dropState; o.activeDrops = null, o.events = null, o.activeDrops = de(t, n.element), o.events = Pe(n, 0, r), o.events.activate && (I(o.activeDrops, o.events.activate), t.fire("actions/drop:start", { interaction: n, dragEvent: r })); } }, "interactions:action-move": et, "interactions:after-action-move": function(e, t) { var n = e.interaction, r = e.iEvent; n.prepared.name === "drag" && (Ve(n, n.dropState.events), t.fire("actions/drop:move", { interaction: n, dragEvent: r }), n.dropState.events = {}); }, "interactions:action-end": function(e, t) { if (e.interaction.prepared.name === "drag") { var n = e.interaction, r = e.iEvent; et(e, t), Ve(n, n.dropState.events), t.fire("actions/drop:end", { interaction: n, dragEvent: r }); } }, "interactions:stop": function(e) { var t = e.interaction; if (t.prepared.name === "drag") { var n = t.dropState; n && (n.activeDrops = null, n.events = null, n.cur.dropzone = null, n.cur.element = null, n.prev.dropzone = null, n.prev.element = null, n.rejected = !1); } } }, getActiveDrops: de, getDrop: Oe, getDropEvents: Pe, fireDropEvents: Ve, defaults: { enabled: !1, accept: null, overlap: "pointer" } }, Lt = Et; F.default = Lt; var tt = {}; function st(e) { var t = e.interaction, n = e.iEvent, r = e.phase; if (t.prepared.name === "gesture") { var o = t.pointers.map(function(f) { return f.pointer; }), i = r === "start", l = r === "end", a = t.interactable.options.deltaSource; if (n.touches = [o[0], o[1]], i) n.distance = M.touchDistance(o, a), n.box = M.touchBBox(o), n.scale = 1, n.ds = 0, n.angle = M.touchAngle(o, a), n.da = 0, t.gesture.startDistance = n.distance, t.gesture.startAngle = n.angle; else if (l) { var s = t.prevEvent; n.distance = s.distance, n.box = s.box, n.scale = s.scale, n.ds = 0, n.angle = s.angle, n.da = 0; } else n.distance = M.touchDistance(o, a), n.box = M.touchBBox(o), n.scale = n.distance / t.gesture.startDistance, n.angle = M.touchAngle(o, a), n.ds = n.scale - t.gesture.scale, n.da = n.angle - t.gesture.angle; t.gesture.distance = n.distance, t.gesture.angle = n.angle, u.default.number(n.scale) && n.scale !== 1 / 0 && !isNaN(n.scale) && (t.gesture.scale = n.scale); } } Object.defineProperty(tt, "__esModule", { value: !0 }), tt.default = void 0; var Zn = { id: "actions/gesture", before: ["actions/drag", "actions/resize"], install: function(e) { var t = e.actions, n = e.Interactable, r = e.defaults; n.prototype.gesturable = function(o) { return u.default.object(o) ? (this.options.gesture.enabled = o.enabled !== !1, this.setPerAction("gesture"