@roomle/embedding-lib 10.0.0 → 11.0.0-alpha.10

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 (76) hide show
  1. package/THIRD-PARTY-NOTICES.txt +2 -2
  2. package/ai.js +86 -17
  3. package/ai.min.js +83 -13
  4. package/{browser-D6M-d6y5.mjs → browser-Cys-y5Hy.mjs} +1 -2
  5. package/chat-model-B7BO8IhK.mjs +212 -0
  6. package/chat-model-XYf503pT.mjs +213 -0
  7. package/coerce-CuLRCRlo.mjs +6 -0
  8. package/coerce-Dup0o-HR.mjs +7 -0
  9. package/{comlink-m82YLjsS.mjs → comlink-7u13Z2ZH.mjs} +2 -3
  10. package/{comlink-BYqErFai.mjs → comlink-DKhvPU0o.mjs} +1 -1
  11. package/configurator.js +7 -7
  12. package/configurator.min.js +6 -5
  13. package/construction.js +279 -22
  14. package/construction.min.js +287 -27
  15. package/continuation-CswXtOus.mjs +10 -0
  16. package/continuation-NclHDSgS.mjs +9 -0
  17. package/{dist-DCzWWudD.mjs → dist-7-X7Xqsl.mjs} +851 -919
  18. package/{dist-CjIZv2gB.mjs → dist-BMxyw-Zs.mjs} +411 -405
  19. package/{dist-wPZpiGiu.mjs → dist-BU022PnG.mjs} +4 -9
  20. package/{dist-CGgFMwb1.mjs → dist-BY8OLJ2p.mjs} +1 -1
  21. package/{dist-6TznX-Ae.mjs → dist-BZSd56sr.mjs} +3850 -3942
  22. package/{dist-Ur4DqwwC.mjs → dist-Ba3J8AjB.mjs} +400 -390
  23. package/{dist-CnTUCpLZ.mjs → dist-CbQKC1xX.mjs} +1590 -1616
  24. package/{dist-BsVeWZ8R.mjs → dist-CiybWJvs.mjs} +44 -41
  25. package/{dist-BI_3AeI-.mjs → dist-CkZuNdCU.mjs} +6 -4
  26. package/{dist-Bt1FopV4.mjs → dist-D2ZAAHGn.mjs} +1058 -1042
  27. package/{dist-Cxe4osFc.mjs → dist-DjsS42rR.mjs} +916 -962
  28. package/{dist-Cmx_tCV5.mjs → dist-Jcq_kKKT.mjs} +403 -393
  29. package/{dist-D0XFfKEL.mjs → dist-S9sLSjZ4.mjs} +3112 -3104
  30. package/{dist-BV-32IEX.mjs → dist-XECXrV5Q.mjs} +1497 -1558
  31. package/{dist-CZbrRF4T.mjs → dist-a5_BIeaS.mjs} +45 -51
  32. package/{dist-Dr3LcjP6.mjs → dist-bQAJDeYc.mjs} +698 -748
  33. package/docs/md/web/embedding/CHANGELOG.md +20 -737
  34. package/{drag-ghost-C1WS2KmW.mjs → drag-ghost-QZelgA-_.mjs} +2 -3
  35. package/{drag-ghost-B24KVqgc.mjs → drag-ghost-VmgSWLva.mjs} +5 -7
  36. package/{drag-in-O5uwMddL.mjs → drag-in-Cd_67tzS.mjs} +4 -5
  37. package/{drag-in-CWHSbwvG.mjs → drag-in-DlDsgY4T.mjs} +3 -3
  38. package/embedding-plugins.js +1 -2
  39. package/embedding-plugins.min.js +1 -2
  40. package/{experimental-evaluation-DyONuPyk.mjs → experimental-evaluation-B4hKMgFH.mjs} +19 -38
  41. package/{experimental-evaluation-DPkDk-5A.mjs → experimental-evaluation-DmqghFSx.mjs} +1 -1
  42. package/{from-custom-view-BgmiWIEN.mjs → from-custom-view-6HMD_sPe.mjs} +5 -4
  43. package/{from-custom-view-CxmIIsHU.mjs → from-custom-view-BRFynafo.mjs} +16 -16
  44. package/{from-website-CvcnHmr2.mjs → from-website-Dl1VN4h7.mjs} +5 -6
  45. package/{from-website-B8qFEG_R.mjs → from-website-iZzauH4C.mjs} +3 -3
  46. package/hi.js +311 -186
  47. package/hi.min.js +336 -215
  48. package/mcp-tools-BLB7pCga.mjs +42 -0
  49. package/mcp-tools-BirFT2R0.mjs +41 -0
  50. package/package.json +1 -1
  51. package/packages/common/src/utils/ai-model-relay.d.ts +22 -2
  52. package/packages/embedding-lib/src/ai.d.ts +3 -1
  53. package/packages/embedding-lib/src/hi.d.ts +1 -1
  54. package/packages/embedding-lib/src/homag-intelligence/hi-planning-assistant.d.ts +40 -2
  55. package/packages/embedding-lib/src/planning-assistant/chat-model.d.ts +1 -1
  56. package/packages/web-sdk/packages/assistant.d.ts +2 -0
  57. package/packages/web-sdk/packages/common-core/src/planning-assistant/chat-model.d.ts +1 -1
  58. package/packages/web-sdk/packages/common-core/src/planning-assistant/continuation.d.ts +5 -0
  59. package/packages/web-sdk/packages/common-core/src/planning-assistant/mcp-tools.d.ts +3 -1
  60. package/packages/web-sdk/packages/common-core/src/planning-assistant/runtime.d.ts +6 -1
  61. package/packages/web-sdk/packages/common-core/src/planning-assistant/types.d.ts +5 -1
  62. package/packages/web-sdk/packages/common-core/src/planning-assistant.d.ts +3 -0
  63. package/rolldown-runtime--db92txo.mjs +10 -0
  64. package/rolldown-runtime-CyjYJMBa.mjs +11 -0
  65. package/roomle-embedding-lib.js +26 -35
  66. package/roomle-embedding-lib.min.js +4 -4
  67. package/sbom.cdx.json +5 -5
  68. package/turn-limits-9LbUeSG2.mjs +9 -0
  69. package/turn-limits-Ciq383Bd.mjs +10 -0
  70. package/{utils-BwWn6Fw4.mjs → utils-CJnKZceY.mjs} +3 -4
  71. package/{utils-BoELtcEK.mjs → utils-DdNhTbJr.mjs} +6 -6
  72. package/chat-model-CFuHw4cp.mjs +0 -322
  73. package/chat-model-JqqVnnmY.mjs +0 -327
  74. package/coerce-CqJod_GZ.mjs +0 -8
  75. package/coerce-CsI42_k0.mjs +0 -6
  76. /package/{browser-BjtSrqbu.mjs → browser-CzLpXYFF.mjs} +0 -0
@@ -1,6 +1,5 @@
1
1
 
2
- import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-CWHSbwvG.mjs";
3
- import "./embedding-plugins.min.js";
2
+ import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-DlDsgY4T.mjs";
4
3
  var o = (e, t, n = 0, r = 0) => {
5
4
  let i = t.x + t.width + n, a = t.x - n, o = t.y + t.height + r, s = t.y - r, { x: c, y: l } = e;
6
5
  return c >= a && c <= i && l >= s && l <= o;
@@ -47,7 +46,7 @@ var o = (e, t, n = 0, r = 0) => {
47
46
  let c = a.ghost?.width, l = a.ghost?.height;
48
47
  c === void 0 && (c = o.getBoundingClientRect().width || 112), l === void 0 && (l = o.getBoundingClientRect().height || 112);
49
48
  let u = e - c / 2, d = r - l / 2;
50
- o.style.transform = `translate3d(${u}px, ${d}px, 0)`, a.ghost && (s(e, r, a.ghost, a.settings?.dragInOverlapX, a.settings?.dragInOverlapY) ? o.style.animation != n && (o.style.animation = n) : o.style.animation != i && (o.style.animation = i));
49
+ o.style.transform = `translate3d(${u}px, ${d}px, 0)`, a.ghost && (s(e, r, a.ghost, a.settings?.dragInOverlapX, a.settings?.dragInOverlapY) ? o.style.animation != "rml-drag-in-fade-in 250ms forwards" && (o.style.animation = n) : o.style.animation != "rml-drag-in-fade-out 250ms forwards" && (o.style.animation = i));
51
50
  })(u, l), this._dragGhostAnimationFrameId = null;
52
51
  }));
53
52
  }
@@ -1,12 +1,11 @@
1
1
 
2
- import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-O5uwMddL.mjs";
3
- import "./embedding-plugins.js";
4
- //#region packages/common/src/utils/drag.ts
2
+ import { a as e, c as t, i as n, m as r, o as i, s as a } from "./drag-in-Cd_67tzS.mjs";
3
+ // packages/common/src/utils/drag.ts
5
4
  var o = (e, t, n = 0, r = 0) => {
6
5
  let i = t.x + t.width + n, a = t.x - n, o = t.y + t.height + r, s = t.y - r, { x: c, y: l } = e;
7
6
  return c >= a && c <= i && l >= s && l <= o;
8
7
  }, s = (e, t, n, r = 0, i = 0) => {
9
- if (!(!n || !n.hiddenIn && !n.visibleIn)) return n.visibleIn ? o({
8
+ if (n && (n.hiddenIn || n.visibleIn)) return n.visibleIn ? o({
10
9
  x: e,
11
10
  y: t
12
11
  }, n.visibleIn, r, i) : n.hiddenIn ? !o({
@@ -37,7 +36,7 @@ var o = (e, t, n = 0, r = 0) => {
37
36
  let c = a.ghost?.width, l = a.ghost?.height;
38
37
  c === void 0 && (c = o.getBoundingClientRect().width || 112), l === void 0 && (l = o.getBoundingClientRect().height || 112);
39
38
  let u = e - c / 2, d = r - l / 2;
40
- o.style.transform = `translate3d(${u}px, ${d}px, 0)`, a.ghost && (s(e, r, a.ghost, a.settings?.dragInOverlapX, a.settings?.dragInOverlapY) ? o.style.animation != n && (o.style.animation = n) : o.style.animation != i && (o.style.animation = i));
39
+ o.style.transform = `translate3d(${u}px, ${d}px, 0)`, a.ghost && (s(e, r, a.ghost, a.settings?.dragInOverlapX, a.settings?.dragInOverlapY) ? o.style.animation != "rml-drag-in-fade-in 250ms forwards" && (o.style.animation = n) : o.style.animation != "rml-drag-in-fade-out 250ms forwards" && (o.style.animation = i));
41
40
  }, d = class {
42
41
  _dragGhostAnimationFrameId = null;
43
42
  _dragGhostRemoveAnimationFrameId = null;
@@ -46,7 +45,7 @@ var o = (e, t, n = 0, r = 0) => {
46
45
  this._dragGhostElement = e;
47
46
  }
48
47
  updateDragGhost(e, t, n) {
49
- this._dragGhostRemoveAnimationFrameId &&= (cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId), null), !n.ghost?.external && n.ghost && (this._dragGhostAnimationFrameId ||= requestAnimationFrame(() => {
48
+ this._dragGhostRemoveAnimationFrameId &&= (cancelAnimationFrame(this._dragGhostRemoveAnimationFrameId), null), n.ghost?.external || n.ghost && (this._dragGhostAnimationFrameId ||= requestAnimationFrame(() => {
50
49
  c();
51
50
  let r = {
52
51
  x: e,
@@ -62,5 +61,4 @@ var o = (e, t, n = 0, r = 0) => {
62
61
  });
63
62
  }
64
63
  };
65
- //#endregion
66
64
  export { d as t };
@@ -1,6 +1,6 @@
1
1
 
2
- import { n as e } from "./dist-6TznX-Ae.mjs";
3
- //#region packages/embedding-lib/src/plugins/constants.ts
2
+ import { n as e } from "./rolldown-runtime-CyjYJMBa.mjs";
3
+ // packages/embedding-lib/src/plugins/constants.ts
4
4
  var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-overlay", i = "rml-drag-in-drag-ghost", a = "rml-drag-in-fade-in", o = "rml-drag-in-fade-out", s = { DISPLAY_NONE: "rml-display-none" }, c = .5, l = "250ms", u = "forwards", d = `@keyframes ${a} {from{opacity: 0;}to {opacity: ${c};}}`, f = `@keyframes ${o} {from{opacity: ${c};}to {opacity: 0;}}`, p = `${a} ${l} ${u}`, m = `${o} ${l} ${u}`, h = "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg", g = 112, _ = 112, v = class {
5
5
  _mainDomElement;
6
6
  _instance;
@@ -36,7 +36,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
36
36
  }
37
37
  async init() {
38
38
  if (await super.init(), this._mode === "website") try {
39
- let { DragInFromWebsiteStrategy: e } = await import("./from-website-CvcnHmr2.mjs");
39
+ let { DragInFromWebsiteStrategy: e } = await import("./from-website-Dl1VN4h7.mjs");
40
40
  this._strategy = new e(this._instance, this._mainDomElement, {
41
41
  settings: this.options,
42
42
  mode: "website"
@@ -45,7 +45,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
45
45
  throw console.error("Could not load Dragin strategy \"FromWebsite\""), e;
46
46
  }
47
47
  else if (this._mode === "custom-view") try {
48
- let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-CxmIIsHU.mjs");
48
+ let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-BRFynafo.mjs");
49
49
  this._strategy = new e(this._instance, this._mainDomElement, this.options, this._viewName);
50
50
  } catch (e) {
51
51
  throw console.error("Could not load Dragin strategy \"FromCustomView\""), e;
@@ -99,5 +99,4 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
99
99
  this._strategy.releaseInput(e);
100
100
  }
101
101
  };
102
- //#endregion
103
102
  export { d as a, n as c, h as d, g as f, c as h, p as i, i as l, t as m, y as n, m as o, r as p, s as r, f as s, b as t, _ as u };
@@ -1,5 +1,5 @@
1
1
 
2
- import { n as e } from "./dist-D0XFfKEL.mjs";
2
+ import { n as e } from "./rolldown-runtime--db92txo.mjs";
3
3
  var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-overlay", i = "rml-drag-in-drag-ghost", a = "rml-drag-in-fade-in", o = "rml-drag-in-fade-out", s = { DISPLAY_NONE: "rml-display-none" }, c = .5, l = "250ms", u = "forwards", d = `@keyframes ${a} {from{opacity: 0;}to {opacity: 0.5;}}`, f = `@keyframes ${o} {from{opacity: 0.5;}to {opacity: 0;}}`, p = `${a} ${l} ${u}`, m = `${o} ${l} ${u}`, h = "https://res.cloudinary.com/roomle/image/upload/v1729679975/fallback_afpyqr.jpg", g = 112, _ = 112, v = class {
4
4
  _mainDomElement;
5
5
  _instance;
@@ -29,7 +29,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
29
29
  }
30
30
  async init() {
31
31
  if (await super.init(), this._mode === "website") try {
32
- let { DragInFromWebsiteStrategy: e } = await import("./from-website-B8qFEG_R.mjs");
32
+ let { DragInFromWebsiteStrategy: e } = await import("./from-website-iZzauH4C.mjs");
33
33
  this._strategy = new e(this._instance, this._mainDomElement, {
34
34
  settings: this.options,
35
35
  mode: "website"
@@ -40,7 +40,7 @@ var t = "rml-drag-in-styles", n = "rml-drag-in-drag-element", r = "rml-drag-in-o
40
40
  else {
41
41
  if (this._mode !== "custom-view") throw Error("Unsupported mode");
42
42
  try {
43
- let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-BgmiWIEN.mjs");
43
+ let { DragInFromCustomViewStrategy: e } = await import("./from-custom-view-6HMD_sPe.mjs");
44
44
  this._strategy = new e(this._instance, this._mainDomElement, this.options, this._viewName);
45
45
  } catch (e) {
46
46
  throw e;
@@ -1,3 +1,2 @@
1
1
  /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
- import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-O5uwMddL.mjs";
3
- export { l as DragIn, a as RML_DRAG_GHOST_FADE_IN, e as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, s as RML_DRAG_GHOST_FADE_OUT, c as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, t as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, n as RML_DRAG_IN_FALLBACK_GHOST_URL, r as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, o as RML_DRAG_IN_STYLES_ID, i as TARGET_OPACITY };
2
+ export { t as DragIn, i as RML_DRAG_GHOST_FADE_IN, a as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, o as RML_DRAG_GHOST_FADE_OUT, s as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, c as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, d as RML_DRAG_IN_FALLBACK_GHOST_URL, f as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, m as RML_DRAG_IN_STYLES_ID, h as TARGET_OPACITY } from "./drag-in-Cd_67tzS.mjs";
@@ -1,3 +1,2 @@
1
1
  /*! Third-party licenses: THIRD-PARTY-NOTICES.txt and sbom.cdx.json in the root of this package */
2
- import { a as e, c as t, d as n, f as r, h as i, i as a, m as o, o as s, s as c, t as l, u } from "./drag-in-CWHSbwvG.mjs";
3
- export { l as DragIn, a as RML_DRAG_GHOST_FADE_IN, e as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, s as RML_DRAG_GHOST_FADE_OUT, c as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, t as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, n as RML_DRAG_IN_FALLBACK_GHOST_URL, r as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, o as RML_DRAG_IN_STYLES_ID, i as TARGET_OPACITY };
2
+ export { t as DragIn, i as RML_DRAG_GHOST_FADE_IN, a as RML_DRAG_GHOST_FADE_IN_ANIMATION_CSS, o as RML_DRAG_GHOST_FADE_OUT, s as RML_DRAG_GHOST_FADE_OUT_ANIMATION_CSS, c as RML_DRAG_IN_DRAG_ELEMENT_ID, u as RML_DRAG_IN_FALLBACK_GHOST_HEIGHT, d as RML_DRAG_IN_FALLBACK_GHOST_URL, f as RML_DRAG_IN_FALLBACK_GHOST_WIDTH, m as RML_DRAG_IN_STYLES_ID, h as TARGET_OPACITY } from "./drag-in-DlDsgY4T.mjs";
@@ -1,6 +1,6 @@
1
1
 
2
- import { An as e, Cn as t, Ht as n, Sn as r, Vt as i, bn as a, mn as o, pn as s, yn as c } from "./dist-BV-32IEX.mjs";
3
- //#region node_modules/@ai-sdk/provider-utils/dist/experimental-evaluation/index.js
2
+ import { An as e, Cn as t, Ht as n, Sn as r, Vt as i, bn as a, mn as o, pn as s, yn as c } from "./dist-XECXrV5Q.mjs";
3
+ // node_modules/@ai-sdk/provider-utils/dist/experimental-evaluation/index.js
4
4
  var l = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, u = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
5
5
  function d(e) {
6
6
  let t = JSON.parse(e);
@@ -37,7 +37,7 @@ function p(e) {
37
37
  function m(e) {
38
38
  if (e.type === "object" || Array.isArray(e.type) && e.type.includes("object")) {
39
39
  let { additionalProperties: t } = e;
40
- e.additionalProperties = t != null && typeof t != "boolean" ? h(t) : !1;
40
+ e.additionalProperties = t != null && typeof t != "boolean" && h(t);
41
41
  let { properties: n } = e;
42
42
  if (n != null) for (let e of Object.keys(n)) n[e] = h(n[e]);
43
43
  }
@@ -99,9 +99,7 @@ function y(e) {
99
99
  case "max":
100
100
  n.inclusive ? t.maximum = n.value : t.exclusiveMaximum = n.value;
101
101
  break;
102
- case "multipleOf":
103
- t.multipleOf = n.value;
104
- break;
102
+ case "multipleOf": t.multipleOf = n.value;
105
103
  }
106
104
  return t;
107
105
  }
@@ -137,9 +135,7 @@ var w = (e) => {
137
135
  case "min":
138
136
  t.minimum = n.value;
139
137
  break;
140
- case "max":
141
- t.maximum = n.value;
142
- break;
138
+ case "max": t.maximum = n.value;
143
139
  }
144
140
  return t;
145
141
  };
@@ -227,9 +223,7 @@ function A(e, t) {
227
223
  case "format:idn-email":
228
224
  P(n, "idn-email", r.message, t);
229
225
  break;
230
- case "pattern:zod":
231
- F(n, k.email, r.message, t);
232
- break;
226
+ case "pattern:zod": F(n, k.email, r.message, t);
233
227
  }
234
228
  break;
235
229
  case "url":
@@ -297,16 +291,10 @@ function A(e, t) {
297
291
  case "contentEncoding:base64":
298
292
  n.contentEncoding = "base64";
299
293
  break;
300
- case "pattern:zod":
301
- F(n, k.base64, r.message, t);
302
- break;
294
+ case "pattern:zod": F(n, k.base64, r.message, t);
303
295
  }
304
296
  break;
305
297
  case "nanoid": F(n, k.nanoid, r.message, t);
306
- case "toLowerCase":
307
- case "toUpperCase":
308
- case "trim": break;
309
- default:
310
298
  }
311
299
  return n;
312
300
  }
@@ -338,11 +326,8 @@ function I(e, t) {
338
326
  m: e.flags.includes("m"),
339
327
  s: e.flags.includes("s")
340
328
  }, r = n.i ? e.source.toLowerCase() : e.source, i = "", a = !1, o = !1, s = !1;
341
- for (let e = 0; e < r.length; e++) {
342
- if (a) {
343
- i += r[e], a = !1;
344
- continue;
345
- }
329
+ for (let e = 0; e < r.length; e++) if (a) i += r[e], a = !1;
330
+ else {
346
331
  if (n.i) {
347
332
  if (o) {
348
333
  if (r[e].match(/[a-z]/)) {
@@ -358,18 +343,15 @@ function I(e, t) {
358
343
  if (r[e] === "^") {
359
344
  i += "(^|(?<=[\r\n]))";
360
345
  continue;
361
- } else if (r[e] === "$") {
346
+ }
347
+ if (r[e] === "$") {
362
348
  i += "($|(?=[\r\n]))";
363
349
  continue;
364
350
  }
365
351
  }
366
- if (n.s && r[e] === ".") {
367
- i += o ? `${r[e]}\r
352
+ n.s && r[e] === "." ? i += o ? `${r[e]}\r
368
353
  ` : `[${r[e]}\r
369
- ]`;
370
- continue;
371
- }
372
- i += r[e], r[e] === "\\" ? a = !0 : o && r[e] === "]" ? o = !1 : !o && r[e] === "[" && (o = !0);
354
+ ]` : (i += r[e], r[e] === "\\" ? a = !0 : o && r[e] === "]" ? o = !1 : !o && r[e] === "[" && (o = !0));
373
355
  }
374
356
  try {
375
357
  new RegExp(i);
@@ -392,11 +374,12 @@ function L(e, t) {
392
374
  ...n,
393
375
  propertyNames: i
394
376
  };
395
- } else if (e.keyType?._def.typeName === "ZodEnum") return {
377
+ }
378
+ if (e.keyType?._def.typeName === "ZodEnum") return {
396
379
  ...n,
397
380
  propertyNames: { enum: e.keyType._def.values }
398
381
  };
399
- else if (e.keyType?._def.typeName === "ZodBranded" && e.keyType._def.type._def.typeName === "ZodString" && e.keyType._def.type._def.checks?.length) {
382
+ if (e.keyType?._def.typeName === "ZodBranded" && e.keyType._def.type._def.typeName === "ZodString" && e.keyType._def.type._def.checks?.length) {
400
383
  let { type: r, ...i } = x(e.keyType._def, t);
401
384
  return {
402
385
  ...n,
@@ -461,7 +444,8 @@ function U(e, t) {
461
444
  return n && !e.includes(n) ? [...e, n] : e;
462
445
  }, []);
463
446
  return { type: e.length > 1 ? e : e[0] };
464
- } else if (n.every((e) => e._def.typeName === "ZodLiteral" && !e.description)) {
447
+ }
448
+ if (n.every((e) => e._def.typeName === "ZodLiteral" && !e.description)) {
465
449
  let e = n.reduce((e, t) => {
466
450
  let n = typeof t._def.value;
467
451
  switch (n) {
@@ -528,9 +512,7 @@ function K(e) {
528
512
  case "max":
529
513
  n.inclusive ? t.maximum = n.value : t.exclusiveMaximum = n.value;
530
514
  break;
531
- case "multipleOf":
532
- t.multipleOf = n.value;
533
- break;
515
+ case "multipleOf": t.multipleOf = n.value;
534
516
  }
535
517
  return t;
536
518
  }
@@ -1070,5 +1052,4 @@ var Oe = class e {
1070
1052
  };
1071
1053
  }
1072
1054
  };
1073
- //#endregion
1074
1055
  export { Oe as t };
@@ -1,5 +1,5 @@
1
1
 
2
- import { An as e, Cn as t, Ht as n, Sn as r, Vt as i, bn as a, mn as o, pn as s, yn as c } from "./dist-Bt1FopV4.mjs";
2
+ import { An as e, Cn as t, Ht as n, Sn as r, Vt as i, bn as a, mn as o, pn as s, yn as c } from "./dist-D2ZAAHGn.mjs";
3
3
  var l = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, u = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
4
4
  function d(e) {
5
5
  let t = JSON.parse(e);
@@ -1,7 +1,7 @@
1
1
 
2
- import { a as e, c as t, n } from "./utils-BoELtcEK.mjs";
3
- import { d as r } from "./drag-in-CWHSbwvG.mjs";
4
- import { t as i } from "./drag-ghost-C1WS2KmW.mjs";
2
+ import { a as e, c as t, n } from "./utils-DdNhTbJr.mjs";
3
+ import { d as r } from "./drag-in-DlDsgY4T.mjs";
4
+ import { t as i } from "./drag-ghost-QZelgA-_.mjs";
5
5
  var a = (e, n = 0) => t(e) ? {
6
6
  clientX: e.touches[n].clientX,
7
7
  clientY: e.touches[n].clientY
@@ -120,9 +120,10 @@ var a = (e, n = 0) => t(e) ? {
120
120
  let s = await this._instance.getBoundingClientRect("canvas"), l = (await this._instance.getDrawerBoundingClientRect()).final, d = await this._instance.getBoundingClientRect(".interaction-container");
121
121
  if (r === this._dragGeneration) {
122
122
  if (!a) {
123
+ let e = `could not read the bounding rect of custom view "${this._viewName}"`;
123
124
  this._phase = {
124
125
  kind: "failed",
125
- reason: `could not read the bounding rect of custom view "${this._viewName}"`
126
+ reason: e
126
127
  };
127
128
  return;
128
129
  }
@@ -1,7 +1,7 @@
1
1
 
2
- import { a as e, c as t, n } from "./utils-BwWn6Fw4.mjs";
3
- import { d as r } from "./drag-in-O5uwMddL.mjs";
4
- import { t as i } from "./drag-ghost-B24KVqgc.mjs";
2
+ import { a as e, c as t, n } from "./utils-CJnKZceY.mjs";
3
+ import { d as r } from "./drag-in-Cd_67tzS.mjs";
4
+ import { t as i } from "./drag-ghost-VmgSWLva.mjs";
5
5
  var a = (e, n = 0) => t(e) ? {
6
6
  clientX: e.touches[n].clientX,
7
7
  clientY: e.touches[n].clientY
@@ -119,7 +119,7 @@ var a = (e, n = 0) => t(e) ? {
119
119
  _dragGeneration = 0;
120
120
  _parentWithDragLeave = null;
121
121
  _parentDragLeave = () => {
122
- this._phase.kind !== "ready" || !this._hasEnteredIframe || (this._instance.cancelDragIn(), this._hasEnteredIframe = !1);
122
+ this._phase.kind === "ready" && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1);
123
123
  };
124
124
  constructor(e, t, n, r) {
125
125
  this._instance = e, this._options = n || {}, this._viewName = r, this._mainDomElement = t, this._parentWithDragLeave = this._mainDomElement.parentElement, this._parentWithDragLeave?.addEventListener("dragleave", this._parentDragLeave);
@@ -135,15 +135,7 @@ var a = (e, n = 0) => t(e) ? {
135
135
  } else this._dragGhost = new i();
136
136
  let a = await this._instance.getBoundingClientRect(c(this._viewName)), o = await this._instance.getBoundingClientRect("canvas"), s = (await this._instance.getDrawerBoundingClientRect()).final, u = await this._instance.getBoundingClientRect(".interaction-container");
137
137
  if (r === this._dragGeneration) {
138
- if (!a) {
139
- let e = `could not read the bounding rect of custom view "${this._viewName}"`;
140
- this._phase = {
141
- kind: "failed",
142
- reason: e
143
- }, console.warn(`Drag-in not started: ${e}`);
144
- return;
145
- }
146
- this._phase = {
138
+ if (a) this._phase = {
147
139
  kind: "ready",
148
140
  bounds: {
149
141
  view: a,
@@ -155,6 +147,13 @@ var a = (e, n = 0) => t(e) ? {
155
147
  id: e,
156
148
  type: n
157
149
  }, this._hasEnteredIframe = !1, this.isDragging = !0;
150
+ else {
151
+ let e = `could not read the bounding rect of custom view "${this._viewName}"`;
152
+ this._phase = {
153
+ kind: "failed",
154
+ reason: e
155
+ }, console.warn(`Drag-in not started: ${e}`);
156
+ }
158
157
  }
159
158
  }
160
159
  _dragUpdate(t) {
@@ -192,9 +191,11 @@ var a = (e, n = 0) => t(e) ? {
192
191
  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
192
  }
194
193
  dragStart(e, n, r) {
195
- this._instance.disableEvents(), this._startTarget = n.target, this._currentCustomDrag = t(n) ? new s(p, { onTouchDragStart: (t, n) => {
194
+ this._instance.disableEvents(), this._startTarget = n.target;
195
+ let i = (t, n) => {
196
196
  this._dragStart(e, n, r);
197
- } }, {
197
+ };
198
+ this._currentCustomDrag = t(n) ? new s(p, { onTouchDragStart: i }, {
198
199
  ...m(n, this._options),
199
200
  delay: 0
200
201
  }) : new d({ onCustomDragStart: (t) => this._dragStart(e, t, r) }, m(n, this._options)), this._currentCustomDrag.onStart(n);
@@ -224,5 +225,4 @@ var a = (e, n = 0) => t(e) ? {
224
225
  this._dragEnd();
225
226
  }
226
227
  };
227
- //#endregion
228
228
  export { g as DragInFromCustomViewStrategy };
@@ -1,8 +1,8 @@
1
1
 
2
- import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-BwWn6Fw4.mjs";
3
- import { l as o, p as s, r as c } from "./drag-in-O5uwMddL.mjs";
4
- import { t as l } from "./drag-ghost-B24KVqgc.mjs";
5
- //#region packages/embedding-lib/src/plugins/strategy/from-website.ts
2
+ import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-CJnKZceY.mjs";
3
+ import { l as o, p as s, r as c } from "./drag-in-Cd_67tzS.mjs";
4
+ import { t as l } from "./drag-ghost-VmgSWLva.mjs";
5
+ // packages/embedding-lib/src/plugins/strategy/from-website.ts
6
6
  var u = class {
7
7
  _options = {};
8
8
  _instance;
@@ -28,7 +28,7 @@ var u = class {
28
28
  this._firefoxDragPosition.x = t.pageX || 0, this._firefoxDragPosition.y = t.pageY || 0;
29
29
  };
30
30
  _parentDragLeave = () => {
31
- this._phase.kind !== "ready" || !this._hasEnteredIframe || (this._instance.cancelDragIn(), this._hasEnteredIframe = !1, this._dragInObjectCalled = !1);
31
+ this._phase.kind === "ready" && this._hasEnteredIframe && (this._instance.cancelDragIn(), this._hasEnteredIframe = !1, this._dragInObjectCalled = !1);
32
32
  };
33
33
  constructor(e, t, n) {
34
34
  this._instance = e, this._mainDomElement = t, this._options = n || {}, document.addEventListener("dragover", this._firefoxFallback), this._parentWithDragLeave = this._mainDomElement.parentElement, this._parentWithDragLeave?.addEventListener("dragleave", this._parentDragLeave);
@@ -120,5 +120,4 @@ var u = class {
120
120
  }
121
121
  releaseInput(e) {}
122
122
  };
123
- //#endregion
124
123
  export { u as DragInFromWebsiteStrategy };
@@ -1,7 +1,7 @@
1
1
 
2
- import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-BoELtcEK.mjs";
3
- import { l as o, p as s, r as c } from "./drag-in-CWHSbwvG.mjs";
4
- import { t as l } from "./drag-ghost-C1WS2KmW.mjs";
2
+ import { c as e, i as t, n, o as r, r as i, s as a } from "./utils-DdNhTbJr.mjs";
3
+ import { l as o, p as s, r as c } from "./drag-in-DlDsgY4T.mjs";
4
+ import { t as l } from "./drag-ghost-QZelgA-_.mjs";
5
5
  var u = class {
6
6
  _options = {};
7
7
  _instance;