@roomle/embedding-lib 0.0.0-dev-ee91b33 → 0.0.0-dev-5f60635

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/THIRD-PARTY-NOTICES.txt +554 -2
  2. package/coerce-CqJod_GZ.mjs +8 -0
  3. package/coerce-CsI42_k0.mjs +6 -0
  4. package/configurator.d.ts +2 -0
  5. package/configurator.js +29 -0
  6. package/configurator.min.js +27 -0
  7. package/dist-5jYYtT4q.mjs +8216 -0
  8. package/dist-B9yy8ym8.mjs +5512 -0
  9. package/dist-BV-32IEX.mjs +8128 -0
  10. package/dist-Bb2L1Zel.mjs +6045 -0
  11. package/dist-Bo3WzRdf.mjs +6223 -0
  12. package/dist-Bt1FopV4.mjs +7594 -0
  13. package/dist-C5fKJXpB.mjs +5598 -0
  14. package/dist-COgAdYY1.mjs +7554 -0
  15. package/dist-CXemOs84.mjs +849 -0
  16. package/dist-CqP0aX0A.mjs +866 -0
  17. package/dist-CqpDM10w.mjs +1179 -0
  18. package/dist-D0kh4WfT.mjs +7721 -0
  19. package/dist-D5HdKuwj.mjs +1221 -0
  20. package/dist-DJtonrDM.mjs +16906 -0
  21. package/dist-GTk8ppiK.mjs +8380 -0
  22. package/dist-XEy6Tk_Y.mjs +17341 -0
  23. package/{drag-ghost-DRJqglR4.mjs → drag-ghost-D7FnWbO4.mjs} +1 -1
  24. package/{drag-ghost-DvNl926o.mjs → drag-ghost-yXe7c8jA.mjs} +1 -1
  25. package/{drag-in-O6toxxkY.mjs → drag-in-BiEe2Lgv.mjs} +14 -20
  26. package/{drag-in-D_heMFxk.mjs → drag-in-t7T6Pqwc.mjs} +9 -15
  27. package/embedding-plugins.js +1 -1
  28. package/embedding-plugins.min.js +1 -1
  29. package/experimental-evaluation-BgWFolud.mjs +1074 -0
  30. package/experimental-evaluation-D56MbtjO.mjs +970 -0
  31. package/{from-custom-view-CnUFpf6f.mjs → from-custom-view-CTBapIc6.mjs} +30 -30
  32. package/{from-custom-view-DsDwSZTY.mjs → from-custom-view-xbjgsLll.mjs} +31 -31
  33. package/{from-website-bTi4qNXt.mjs → from-website-DUPMQPl6.mjs} +23 -23
  34. package/{from-website-Csj57D58.mjs → from-website-JwG7Ic_U.mjs} +23 -23
  35. package/hi.js +128 -295
  36. package/hi.min.js +118 -261
  37. package/mcp-tools-CJ7j_FI2.mjs +151 -0
  38. package/mcp-tools-D__M74CZ.mjs +153 -0
  39. package/package.json +12 -1
  40. package/packages/embedding-lib/src/configurator-agent/configurator-mcp-tools.d.ts +4 -0
  41. package/packages/embedding-lib/src/configurator-agent/configurator-planning-assistant.d.ts +13 -0
  42. package/packages/embedding-lib/src/configurator.d.ts +3 -0
  43. package/packages/embedding-lib/src/homag-intelligence/hi-mcp-tools.d.ts +4 -61
  44. package/packages/embedding-lib/src/homag-intelligence/hi-planning-assistant.d.ts +2 -48
  45. package/packages/embedding-lib/src/planning-assistant/chat-model.d.ts +1 -0
  46. package/packages/embedding-lib/src/planning-assistant/mcp-tools.d.ts +2 -0
  47. package/packages/web-sdk/packages/assistant.d.ts +3 -0
  48. package/packages/web-sdk/packages/common-core/src/agent-tools/mcp-tool-types.d.ts +30 -0
  49. package/packages/web-sdk/packages/common-core/src/planning-assistant/chat-model.d.ts +8 -0
  50. package/packages/web-sdk/packages/common-core/src/planning-assistant/mcp-tools.d.ts +52 -0
  51. package/packages/web-sdk/packages/common-core/src/planning-assistant/types.d.ts +35 -0
  52. package/roomle-embedding-lib.js +2 -2
  53. package/roomle-embedding-lib.min.js +2 -2
  54. package/sbom.cdx.json +363 -5
  55. /package/{browser-BjtSrqbu.mjs → browser-D6As4Zxr.mjs} +0 -0
  56. /package/{browser-D6M-d6y5.mjs → browser-zrjtYpL8.mjs} +0 -0
  57. /package/{comlink-CR7SvKHo.mjs → comlink-Cmiqa2s0.mjs} +0 -0
  58. /package/{comlink-BwWPcVOp.mjs → comlink-Dc3LZUoi.mjs} +0 -0
  59. /package/{utils-BoELtcEK.mjs → utils-CAAGdgk8.mjs} +0 -0
  60. /package/{utils-BwWn6Fw4.mjs → utils-WeolMfC5.mjs} +0 -0
@@ -1,14 +1,14 @@
1
1
 
2
- import { d as e } from "./drag-in-D_heMFxk.mjs";
3
- import { a as t, c as n, n as r } from "./utils-BoELtcEK.mjs";
4
- import { t as i } from "./drag-ghost-DRJqglR4.mjs";
5
- var a = (e, t = 0) => n(e) ? {
6
- clientX: e.touches[t].clientX,
7
- clientY: e.touches[t].clientY
2
+ import { a as e, c as t, n } from "./utils-CAAGdgk8.mjs";
3
+ import { d as r } from "./drag-in-t7T6Pqwc.mjs";
4
+ import { t as i } from "./drag-ghost-D7FnWbO4.mjs";
5
+ var a = (e, n = 0) => t(e) ? {
6
+ clientX: e.touches[n].clientX,
7
+ clientY: e.touches[n].clientY
8
8
  } : {
9
9
  clientX: e.clientX,
10
10
  clientY: e.clientY
11
- }, o = (e) => !e || !n(e) || e.touches.length > 0, s = class {
11
+ }, o = (e) => !e || !t(e) || e.touches.length > 0, s = class {
12
12
  _touchDragTimeOut;
13
13
  _onTouchDragStart;
14
14
  _payload = null;
@@ -20,7 +20,7 @@ var a = (e, t = 0) => n(e) ? {
20
20
  this._payload = e, this._onTouchDragStart = t, this._delay = typeof n.delay == "number" ? n.delay : 500, this._epsilon = typeof n.epsilon == "number" ? n.epsilon : 10;
21
21
  }
22
22
  onStart(e) {
23
- o(e) && (this._touchDragTimeOut ||= (this._firstTouch = a(e, n(e) ? e.touches.length - 1 : 0), setTimeout(() => {
23
+ o(e) && (this._touchDragTimeOut ||= (this._firstTouch = a(e, t(e) ? e.touches.length - 1 : 0), setTimeout(() => {
24
24
  this._clearTimeout(), this._lastTouch ||= a(e), this._checkXDistance(e)();
25
25
  }, this._delay)));
26
26
  }
@@ -71,12 +71,12 @@ var a = (e, t = 0) => n(e) ? {
71
71
  _reset() {
72
72
  this._startX = 0, this._startY = 0, this._lastX = 0, this._lastY = 0, this._isWaiting = !1;
73
73
  }
74
- }, u = "data-rml-old-draggable", d = (e, t) => {
75
- let r = n(e), i = {
74
+ }, u = "data-rml-old-draggable", d = (e, n) => {
75
+ let r = t(e), i = {
76
76
  delay: r ? 500 : 100,
77
77
  epsilon: r ? 10 : 15
78
78
  };
79
- if (!t || !(r || e instanceof MouseEvent)) return i;
79
+ if (!n || !(r || e instanceof MouseEvent)) return i;
80
80
  let { delayKey: a, epsilonKey: o } = r ? {
81
81
  delayKey: "touchDragDelay",
82
82
  epsilonKey: "touchDragEpsilon"
@@ -84,7 +84,7 @@ var a = (e, t = 0) => n(e) ? {
84
84
  delayKey: "customDragDelay",
85
85
  epsilonKey: "customDragEpsilon"
86
86
  };
87
- return typeof t[a] == "number" && (i.delay = t.touchDragDelay), typeof t[o] == "number" && (i.epsilon = t.touchDragEpsilon), i;
87
+ return typeof n[a] == "number" && (i.delay = n.touchDragDelay), typeof n[o] == "number" && (i.epsilon = n.touchDragEpsilon), i;
88
88
  }, f = class {
89
89
  _options = {};
90
90
  _instance;
@@ -140,9 +140,9 @@ var a = (e, t = 0) => n(e) ? {
140
140
  }, this._hasEnteredIframe = !1, this.isDragging = !0;
141
141
  }
142
142
  }
143
- _dragUpdate(n) {
144
- document.body.focus(), this._currentCustomDrag && this._currentCustomDrag.onMove(n);
145
- let { clientX: i, clientY: a } = r(n);
143
+ _dragUpdate(t) {
144
+ document.body.focus(), this._currentCustomDrag && this._currentCustomDrag.onMove(t);
145
+ let { clientX: i, clientY: a } = n(t);
146
146
  if (this._dragGhost) {
147
147
  let { width: e, height: t } = this._mainDomElement.getBoundingClientRect();
148
148
  this._dragGhost.updateDragGhost(i, a, { ghost: { visibleIn: {
@@ -153,23 +153,23 @@ var a = (e, t = 0) => n(e) ? {
153
153
  } } });
154
154
  }
155
155
  if (this._phase.kind !== "ready") return;
156
- let { view: o, canvas: s, overlay: c, interactionContainer: l } = this._phase.bounds, u = o.x + i, d = o.y + a, f = t(u, d, s, c, l);
156
+ let { view: o, canvas: s, overlay: c, interactionContainer: l } = this._phase.bounds, u = o.x + i, d = o.y + a, f = e(u, d, s, c, l);
157
157
  if (f && !this._hasEnteredIframe && this._pendingDragIn && (this._instance.dragInObject(this._pendingDragIn.id, u, d, this._pendingDragIn.type), this._hasEnteredIframe = !0), !f && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1), !this._hasEnteredIframe) return;
158
- let { url: p, width: m, height: h } = ((t) => {
159
- let n = "", r = 112, i = 112;
160
- if (!t) return {
161
- url: e,
162
- width: r,
158
+ let { url: p, width: m, height: h } = ((e) => {
159
+ let t = "", n = 112, i = 112;
160
+ if (!e) return {
161
+ url: r,
162
+ width: n,
163
163
  height: i
164
164
  };
165
- let a = t;
165
+ let a = e;
166
166
  if (a instanceof HTMLElement) {
167
- let t = a.getBoundingClientRect(), o = a.getAttribute("data-rml-ghost-url"), s = a.getAttribute("data-rml-ghost-width"), c = a.getAttribute("data-rml-ghost-height");
168
- o ? n = o : !o && a instanceof HTMLImageElement && a.src && (n = a.src), n ? (r = t.width, i = t.height) : n = e, r = s ? parseInt(s, 10) : r, i = c ? parseInt(c, 10) : i;
167
+ let e = a.getBoundingClientRect(), o = a.getAttribute("data-rml-ghost-url"), s = a.getAttribute("data-rml-ghost-width"), c = a.getAttribute("data-rml-ghost-height");
168
+ o ? t = o : !o && a instanceof HTMLImageElement && a.src && (t = a.src), t ? (n = e.width, i = e.height) : t = r, n = s ? parseInt(s, 10) : n, i = c ? parseInt(c, 10) : i;
169
169
  }
170
170
  return {
171
- url: n || "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",
172
- width: r,
171
+ url: t || "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",
172
+ width: n,
173
173
  height: i
174
174
  };
175
175
  })(this._startTarget), g = this._options || {}, _ = {
@@ -191,13 +191,13 @@ var a = (e, t = 0) => n(e) ? {
191
191
  _dragEnd() {
192
192
  this._dragGeneration++, this._currentCustomDrag && this._currentCustomDrag.onEnd(), this._currentCustomDrag = null, this.isDragging = !1, this._phase = { kind: "idle" }, this._resetStartTarget(), this._instance.enableEvents(), this._dragGhost &&= (this._dragGhost.removeDragGhost(), null), this._hasEnteredIframe && this._instance.dragInObjectEnd(), this._hasEnteredIframe = !1, this._pendingDragIn = null;
193
193
  }
194
- dragStart(e, t, r) {
195
- this._instance.disableEvents(), this._startTarget = t.target, this._currentCustomDrag = n(t) ? new s(void 0, { onTouchDragStart: (t, n) => {
194
+ dragStart(e, n, r) {
195
+ this._instance.disableEvents(), this._startTarget = n.target, this._currentCustomDrag = t(n) ? new s(void 0, { onTouchDragStart: (t, n) => {
196
196
  this._dragStart(e, n, r);
197
197
  } }, {
198
- ...d(t, this._options),
198
+ ...d(n, this._options),
199
199
  delay: 0
200
- }) : new l({ onCustomDragStart: (t) => this._dragStart(e, t, r) }, d(t, this._options)), this._currentCustomDrag.onStart(t);
200
+ }) : new l({ onCustomDragStart: (t) => this._dragStart(e, t, r) }, d(n, this._options)), this._currentCustomDrag.onStart(n);
201
201
  }
202
202
  dragEnd() {
203
203
  this._dragEnd();
@@ -1,14 +1,14 @@
1
1
 
2
- import { d as e } from "./drag-in-O6toxxkY.mjs";
3
- import { a as t, c as n, n as r } from "./utils-BwWn6Fw4.mjs";
4
- import { t as i } from "./drag-ghost-DvNl926o.mjs";
5
- var a = (e, t = 0) => n(e) ? {
6
- clientX: e.touches[t].clientX,
7
- clientY: e.touches[t].clientY
2
+ import { a as e, c as t, n } from "./utils-WeolMfC5.mjs";
3
+ import { d as r } from "./drag-in-BiEe2Lgv.mjs";
4
+ import { t as i } from "./drag-ghost-yXe7c8jA.mjs";
5
+ var a = (e, n = 0) => t(e) ? {
6
+ clientX: e.touches[n].clientX,
7
+ clientY: e.touches[n].clientY
8
8
  } : {
9
9
  clientX: e.clientX,
10
10
  clientY: e.clientY
11
- }, o = (e) => e && n(e) ? e.touches.length > 0 : !0, s = class {
11
+ }, o = (e) => e && t(e) ? e.touches.length > 0 : !0, s = class {
12
12
  _touchDragTimeOut;
13
13
  _onTouchDragStart;
14
14
  _payload = null;
@@ -20,7 +20,7 @@ var a = (e, t = 0) => n(e) ? {
20
20
  this._payload = e, this._onTouchDragStart = t, this._delay = typeof n.delay == "number" ? n.delay : 500, this._epsilon = typeof n.epsilon == "number" ? n.epsilon : 10;
21
21
  }
22
22
  onStart(e) {
23
- o(e) && (this._touchDragTimeOut ||= (this._firstTouch = a(e, n(e) ? e.touches.length - 1 : 0), setTimeout(() => {
23
+ o(e) && (this._touchDragTimeOut ||= (this._firstTouch = a(e, t(e) ? e.touches.length - 1 : 0), setTimeout(() => {
24
24
  this._clearTimeout(), this._lastTouch ||= a(e), this._checkXDistance(e)();
25
25
  }, this._delay)));
26
26
  }
@@ -71,12 +71,12 @@ var a = (e, t = 0) => n(e) ? {
71
71
  _reset() {
72
72
  this._startX = 0, this._startY = 0, this._lastX = 0, this._lastY = 0, this._isWaiting = !1;
73
73
  }
74
- }, f = "data-rml-old-draggable", p = void 0, m = (e, t) => {
75
- let r = n(e), i = {
74
+ }, f = "data-rml-old-draggable", p = void 0, m = (e, n) => {
75
+ let r = t(e), i = {
76
76
  delay: r ? 500 : 100,
77
77
  epsilon: r ? 10 : 15
78
78
  };
79
- if (!t) return i;
79
+ if (!n) return i;
80
80
  if (!r && !(e instanceof MouseEvent)) return console.warn("Unsupported event! It is not TouchEvent and also not MouseEvent"), i;
81
81
  let { delayKey: a, epsilonKey: o } = r ? {
82
82
  delayKey: "touchDragDelay",
@@ -85,22 +85,22 @@ var a = (e, t = 0) => n(e) ? {
85
85
  delayKey: "customDragDelay",
86
86
  epsilonKey: "customDragEpsilon"
87
87
  };
88
- return typeof t[a] == "number" && (i.delay = t.touchDragDelay), typeof t[o] == "number" && (i.epsilon = t.touchDragEpsilon), i;
89
- }, h = (t) => {
90
- let n = "", r = 112, i = 112;
91
- if (!t) return {
92
- url: e,
93
- width: r,
88
+ return typeof n[a] == "number" && (i.delay = n.touchDragDelay), typeof n[o] == "number" && (i.epsilon = n.touchDragEpsilon), i;
89
+ }, h = (e) => {
90
+ let t = "", n = 112, i = 112;
91
+ if (!e) return {
92
+ url: r,
93
+ width: n,
94
94
  height: i
95
95
  };
96
- let a = t;
96
+ let a = e;
97
97
  if (a instanceof HTMLElement) {
98
- let t = a.getBoundingClientRect(), o = a.getAttribute("data-rml-ghost-url"), s = a.getAttribute("data-rml-ghost-width"), c = a.getAttribute("data-rml-ghost-height");
99
- o ? n = o : !o && a instanceof HTMLImageElement && a.src && (n = a.src), n ? (r = t.width, i = t.height) : n = e, r = s ? parseInt(s, 10) : r, i = c ? parseInt(c, 10) : i;
98
+ let e = a.getBoundingClientRect(), o = a.getAttribute("data-rml-ghost-url"), s = a.getAttribute("data-rml-ghost-width"), c = a.getAttribute("data-rml-ghost-height");
99
+ o ? t = o : !o && a instanceof HTMLImageElement && a.src && (t = a.src), t ? (n = e.width, i = e.height) : t = r, n = s ? parseInt(s, 10) : n, i = c ? parseInt(c, 10) : i;
100
100
  }
101
101
  return {
102
- url: n || "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",
103
- width: r,
102
+ url: t || "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg",
103
+ width: n,
104
104
  height: i
105
105
  };
106
106
  }, g = class {
@@ -157,12 +157,12 @@ var a = (e, t = 0) => n(e) ? {
157
157
  }, this._hasEnteredIframe = !1, this.isDragging = !0;
158
158
  }
159
159
  }
160
- _dragUpdate(e) {
161
- document.body.focus(), this._currentCustomDrag && this._currentCustomDrag.onMove(e);
162
- let { clientX: n, clientY: i } = r(e);
160
+ _dragUpdate(t) {
161
+ document.body.focus(), this._currentCustomDrag && this._currentCustomDrag.onMove(t);
162
+ let { clientX: r, clientY: i } = n(t);
163
163
  if (this._dragGhost) {
164
164
  let { width: e, height: t } = this._mainDomElement.getBoundingClientRect();
165
- this._dragGhost.updateDragGhost(n, i, { ghost: { visibleIn: {
165
+ this._dragGhost.updateDragGhost(r, i, { ghost: { visibleIn: {
166
166
  x: 0,
167
167
  y: 0,
168
168
  width: e,
@@ -170,7 +170,7 @@ var a = (e, t = 0) => n(e) ? {
170
170
  } } });
171
171
  }
172
172
  if (this._phase.kind !== "ready") return;
173
- let { view: a, canvas: o, overlay: s, interactionContainer: c } = this._phase.bounds, l = a.x + n, u = a.y + i, d = t(l, u, o, s, c);
173
+ let { view: a, canvas: o, overlay: s, interactionContainer: c } = this._phase.bounds, l = a.x + r, u = a.y + i, d = e(l, u, o, s, c);
174
174
  if (d && !this._hasEnteredIframe && this._pendingDragIn && (this._instance.dragInObject(this._pendingDragIn.id, l, u, this._pendingDragIn.type), this._hasEnteredIframe = !0), !d && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1), !this._hasEnteredIframe) return;
175
175
  let { url: f, width: p, height: m } = h(this._startTarget), g = this._options || {}, _ = {
176
176
  ghost: {
@@ -191,13 +191,13 @@ var a = (e, t = 0) => n(e) ? {
191
191
  _dragEnd() {
192
192
  this._dragGeneration++, this._currentCustomDrag && this._currentCustomDrag.onEnd(), this._currentCustomDrag = null, this.isDragging = !1, this._phase = { kind: "idle" }, this._resetStartTarget(), this._instance.enableEvents(), this._dragGhost &&= (this._dragGhost.removeDragGhost(), null), this._hasEnteredIframe && this._instance.dragInObjectEnd(), this._hasEnteredIframe = !1, this._pendingDragIn = null;
193
193
  }
194
- dragStart(e, t, r) {
195
- this._instance.disableEvents(), this._startTarget = t.target, this._currentCustomDrag = n(t) ? new s(p, { onTouchDragStart: (t, n) => {
194
+ dragStart(e, n, r) {
195
+ this._instance.disableEvents(), this._startTarget = n.target, this._currentCustomDrag = t(n) ? new s(p, { onTouchDragStart: (t, n) => {
196
196
  this._dragStart(e, n, r);
197
197
  } }, {
198
- ...m(t, this._options),
198
+ ...m(n, this._options),
199
199
  delay: 0
200
- }) : new d({ onCustomDragStart: (t) => this._dragStart(e, t, r) }, m(t, this._options)), this._currentCustomDrag.onStart(t);
200
+ }) : new d({ onCustomDragStart: (t) => this._dragStart(e, t, r) }, m(n, this._options)), this._currentCustomDrag.onStart(n);
201
201
  }
202
202
  dragEnd() {
203
203
  this._dragEnd();
@@ -1,7 +1,7 @@
1
1
 
2
- import { l as e, p as t, r as n } from "./drag-in-O6toxxkY.mjs";
3
- import { c as r, i, n as a, o, r as s, s as c } from "./utils-BwWn6Fw4.mjs";
4
- import { t as l } from "./drag-ghost-DvNl926o.mjs";
2
+ import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-WeolMfC5.mjs";
3
+ import { l as o, p as s, r as c } from "./drag-in-BiEe2Lgv.mjs";
4
+ import { t as l } from "./drag-ghost-yXe7c8jA.mjs";
5
5
  //#region packages/embedding-lib/src/plugins/strategy/from-website.ts
6
6
  var u = class {
7
7
  _options = {};
@@ -36,9 +36,9 @@ var u = class {
36
36
  beforeUpdateGhost(e) {
37
37
  this._onBeforeUpdateDrag = e;
38
38
  }
39
- async dragStart(r, o, c = "rml_id") {
39
+ async dragStart(e, r, a = "rml_id") {
40
40
  let u = ++this._dragGeneration, d = this._mainDomElement.parentNode;
41
- if (s(d).position !== "relative") {
41
+ if (i(d).position !== "relative") {
42
42
  let e = "parent of iframe should have position relative, otherwise drag-in can not detect the x/y coordinates correctly";
43
43
  this._phase = {
44
44
  kind: "failed",
@@ -47,19 +47,19 @@ var u = class {
47
47
  return;
48
48
  }
49
49
  this._mainDomElement.style.pointerEvents = "none";
50
- let f = d.querySelector("." + t);
51
- f || (f = document.createElement("div"), f.classList.add(t), d.appendChild(f)), f.classList.remove(n.DISPLAY_NONE), o.target.getAttribute("draggable") || console.warn("Draggable not detected correctly! Did you add draggable=\"true\" to the element? In Sarafi only 'draggable' is too less");
52
- let p = d.querySelector("." + e);
53
- this._currentDrag.event = o;
54
- let m = o.target, h = m.cloneNode(!0), g = m.getBoundingClientRect();
50
+ let f = d.querySelector("." + s);
51
+ f || (f = document.createElement("div"), f.classList.add(s), d.appendChild(f)), f.classList.remove(c.DISPLAY_NONE), r.target.getAttribute("draggable") || console.warn("Draggable not detected correctly! Did you add draggable=\"true\" to the element? In Sarafi only 'draggable' is too less");
52
+ let p = d.querySelector("." + o);
53
+ this._currentDrag.event = r;
54
+ let m = r.target, h = m.cloneNode(!0), g = m.getBoundingClientRect();
55
55
  h.style.width = `${g.width}px`, h.style.height = `${g.height}px`, this._currentDrag.ghost = new l(h), this._currentDrag.offset || (this._currentDrag.offset = {
56
56
  x: 0,
57
57
  y: 0
58
58
  });
59
- let { clientX: _, clientY: v } = a(o, this._firefoxDragPosition);
60
- this._currentDrag.offset.x = _ - g.left, this._currentDrag.offset.y = v - g.top, o instanceof DragEvent && o.dataTransfer && o.dataTransfer.setDragImage && o.dataTransfer.setDragImage(p, 0, 0), i(d, this._currentDrag.event || o, this._firefoxDragPosition), this._pendingDragIn = {
61
- id: r,
62
- type: c
59
+ let { clientX: _, clientY: v } = n(r, this._firefoxDragPosition);
60
+ this._currentDrag.offset.x = _ - g.left, this._currentDrag.offset.y = v - g.top, r instanceof DragEvent && r.dataTransfer && r.dataTransfer.setDragImage && r.dataTransfer.setDragImage(p, 0, 0), t(d, this._currentDrag.event || r, this._firefoxDragPosition), this._pendingDragIn = {
61
+ id: e,
62
+ type: a
63
63
  }, this._hasEnteredIframe = !1, this._dragInObjectCalled = !1, this.isDragging = !0, this._phase = { kind: "starting" };
64
64
  let y = null;
65
65
  try {
@@ -72,13 +72,13 @@ var u = class {
72
72
  bounds: { interactionContainer: y }
73
73
  });
74
74
  }
75
- dragUpdate(e) {
76
- let t = this._mainDomElement.parentNode, { x: n, y: s } = i(t, e, this._firefoxDragPosition);
77
- if (n === 0 && s === 0) return;
78
- let l = Math.max(1, n), u = Math.max(1, s);
75
+ dragUpdate(i) {
76
+ let o = this._mainDomElement.parentNode, { x: s, y: c } = t(o, i, this._firefoxDragPosition);
77
+ if (s === 0 && c === 0) return;
78
+ let l = Math.max(1, s), u = Math.max(1, c);
79
79
  if (l === 1 && u === 1) return;
80
- let d = this._mainDomElement.getBoundingClientRect(), { clientX: f, clientY: p } = a(e, this._firefoxDragPosition), m = c(f, p, d), h = l, g = u;
81
- if (r(e)) {
80
+ let d = this._mainDomElement.getBoundingClientRect(), { clientX: f, clientY: p } = n(i, this._firefoxDragPosition), m = a(f, p, d), h = l, g = u;
81
+ if (e(i)) {
82
82
  let e = this._options.settings?.fingerSize || 0;
83
83
  h = Math.max(2, l + e), g = Math.max(2, u - e);
84
84
  }
@@ -89,7 +89,7 @@ var u = class {
89
89
  if (b.ghost ||= {}, b.ghost.visibleIn && b.ghost.hiddenIn || (b.ghost.hiddenIn = d), this._currentDrag.ghost && this._currentDrag.ghost.updateDragGhost(f, p, b), this._phase.kind !== "ready") return;
90
90
  let { interactionContainer: x } = this._phase.bounds;
91
91
  if (m && this._pendingDragIn) {
92
- let e = o(f, p, d, x);
92
+ let e = r(f, p, d, x);
93
93
  e && !this._hasEnteredIframe ? (this._dragInObjectCalled || (this._dragInObjectCalled = !0, this._instance.dragInObject(this._pendingDragIn.id, l, u, this._pendingDragIn.type)), this._hasEnteredIframe = !0) : !e && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1, this._dragInObjectCalled = !1);
94
94
  } else !m && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1, this._dragInObjectCalled = !1);
95
95
  if (!this._hasEnteredIframe) return;
@@ -103,8 +103,8 @@ var u = class {
103
103
  x: 0,
104
104
  y: 0
105
105
  }, this._hasEnteredIframe = !1, this._dragInObjectCalled = !1, this._pendingDragIn = null, this._phase = { kind: "idle" };
106
- let r = e.querySelector("." + t);
107
- r && r.classList.add(n.DISPLAY_NONE);
106
+ let t = e.querySelector("." + s);
107
+ t && t.classList.add(c.DISPLAY_NONE);
108
108
  }
109
109
  touchStart(e, t, n = "rml_id") {
110
110
  t.preventDefault(), this.dragStart(e, t, n);
@@ -1,7 +1,7 @@
1
1
 
2
- import { l as e, p as t, r as n } from "./drag-in-D_heMFxk.mjs";
3
- import { c as r, i, n as a, o, r as s, s as c } from "./utils-BoELtcEK.mjs";
4
- import { t as l } from "./drag-ghost-DRJqglR4.mjs";
2
+ import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-CAAGdgk8.mjs";
3
+ import { l as o, p as s, r as c } from "./drag-in-t7T6Pqwc.mjs";
4
+ import { t as l } from "./drag-ghost-D7FnWbO4.mjs";
5
5
  var u = class {
6
6
  _options = {};
7
7
  _instance;
@@ -35,9 +35,9 @@ var u = class {
35
35
  beforeUpdateGhost(e) {
36
36
  this._onBeforeUpdateDrag = e;
37
37
  }
38
- async dragStart(r, o, c = "rml_id") {
38
+ async dragStart(e, r, a = "rml_id") {
39
39
  let u = ++this._dragGeneration, d = this._mainDomElement.parentNode;
40
- if (s(d).position !== "relative") {
40
+ if (i(d).position !== "relative") {
41
41
  this._phase = {
42
42
  kind: "failed",
43
43
  reason: "parent of iframe should have position relative, otherwise drag-in can not detect the x/y coordinates correctly"
@@ -45,19 +45,19 @@ var u = class {
45
45
  return;
46
46
  }
47
47
  this._mainDomElement.style.pointerEvents = "none";
48
- let f = d.querySelector("." + t);
49
- f || (f = document.createElement("div"), f.classList.add(t), d.appendChild(f)), f.classList.remove(n.DISPLAY_NONE), o.target.getAttribute("draggable");
50
- let p = d.querySelector("." + e);
51
- this._currentDrag.event = o;
52
- let m = o.target, h = m.cloneNode(!0), g = m.getBoundingClientRect();
48
+ let f = d.querySelector("." + s);
49
+ f || (f = document.createElement("div"), f.classList.add(s), d.appendChild(f)), f.classList.remove(c.DISPLAY_NONE), r.target.getAttribute("draggable");
50
+ let p = d.querySelector("." + o);
51
+ this._currentDrag.event = r;
52
+ let m = r.target, h = m.cloneNode(!0), g = m.getBoundingClientRect();
53
53
  h.style.width = `${g.width}px`, h.style.height = `${g.height}px`, this._currentDrag.ghost = new l(h), this._currentDrag.offset || (this._currentDrag.offset = {
54
54
  x: 0,
55
55
  y: 0
56
56
  });
57
- let { clientX: _, clientY: v } = a(o, this._firefoxDragPosition);
58
- this._currentDrag.offset.x = _ - g.left, this._currentDrag.offset.y = v - g.top, o instanceof DragEvent && o.dataTransfer && o.dataTransfer.setDragImage && o.dataTransfer.setDragImage(p, 0, 0), i(d, this._currentDrag.event || o, this._firefoxDragPosition), this._pendingDragIn = {
59
- id: r,
60
- type: c
57
+ let { clientX: _, clientY: v } = n(r, this._firefoxDragPosition);
58
+ this._currentDrag.offset.x = _ - g.left, this._currentDrag.offset.y = v - g.top, r instanceof DragEvent && r.dataTransfer && r.dataTransfer.setDragImage && r.dataTransfer.setDragImage(p, 0, 0), t(d, this._currentDrag.event || r, this._firefoxDragPosition), this._pendingDragIn = {
59
+ id: e,
60
+ type: a
61
61
  }, this._hasEnteredIframe = !1, this._dragInObjectCalled = !1, this.isDragging = !0, this._phase = { kind: "starting" };
62
62
  let y = null;
63
63
  try {
@@ -68,13 +68,13 @@ var u = class {
68
68
  bounds: { interactionContainer: y }
69
69
  });
70
70
  }
71
- dragUpdate(e) {
72
- let t = this._mainDomElement.parentNode, { x: n, y: s } = i(t, e, this._firefoxDragPosition);
73
- if (n === 0 && s === 0) return;
74
- let l = Math.max(1, n), u = Math.max(1, s);
71
+ dragUpdate(i) {
72
+ let o = this._mainDomElement.parentNode, { x: s, y: c } = t(o, i, this._firefoxDragPosition);
73
+ if (s === 0 && c === 0) return;
74
+ let l = Math.max(1, s), u = Math.max(1, c);
75
75
  if (l === 1 && u === 1) return;
76
- let d = this._mainDomElement.getBoundingClientRect(), { clientX: f, clientY: p } = a(e, this._firefoxDragPosition), m = c(f, p, d), h = l, g = u;
77
- if (r(e)) {
76
+ let d = this._mainDomElement.getBoundingClientRect(), { clientX: f, clientY: p } = n(i, this._firefoxDragPosition), m = a(f, p, d), h = l, g = u;
77
+ if (e(i)) {
78
78
  let e = this._options.settings?.fingerSize || 0;
79
79
  h = Math.max(2, l + e), g = Math.max(2, u - e);
80
80
  }
@@ -85,7 +85,7 @@ var u = class {
85
85
  if (b.ghost ||= {}, b.ghost.visibleIn && b.ghost.hiddenIn || (b.ghost.hiddenIn = d), this._currentDrag.ghost && this._currentDrag.ghost.updateDragGhost(f, p, b), this._phase.kind !== "ready") return;
86
86
  let { interactionContainer: x } = this._phase.bounds;
87
87
  if (m && this._pendingDragIn) {
88
- let e = o(f, p, d, x);
88
+ let e = r(f, p, d, x);
89
89
  e && !this._hasEnteredIframe ? (this._dragInObjectCalled || (this._dragInObjectCalled = !0, this._instance.dragInObject(this._pendingDragIn.id, l, u, this._pendingDragIn.type)), this._hasEnteredIframe = !0) : !e && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1, this._dragInObjectCalled = !1);
90
90
  } else !m && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1, this._dragInObjectCalled = !1);
91
91
  if (!this._hasEnteredIframe) return;
@@ -99,8 +99,8 @@ var u = class {
99
99
  x: 0,
100
100
  y: 0
101
101
  }, this._hasEnteredIframe = !1, this._dragInObjectCalled = !1, this._pendingDragIn = null, this._phase = { kind: "idle" };
102
- let r = e.querySelector("." + t);
103
- r && r.classList.add(n.DISPLAY_NONE);
102
+ let t = e.querySelector("." + s);
103
+ t && t.classList.add(c.DISPLAY_NONE);
104
104
  }
105
105
  touchStart(e, t, n = "rml_id") {
106
106
  t.preventDefault(), this.dragStart(e, t, n);