microboard-temp 0.1.10 → 0.1.12

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.
package/dist/esm/node.js CHANGED
@@ -143925,7 +143925,7 @@ var ExportQuality;
143925
143925
  ExportQuality2[ExportQuality2["STANDARD"] = 2] = "STANDARD";
143926
143926
  ExportQuality2[ExportQuality2["LOW"] = 3] = "LOW";
143927
143927
  })(ExportQuality ||= {});
143928
- var conf = {
143928
+ var conf2 = {
143929
143929
  connection: undefined,
143930
143930
  path2DFactory: typeof Path2D !== "undefined" ? BrowserPath2D : MockPath2D,
143931
143931
  documentFactory: typeof document !== "undefined" ? new BrowserDocumentFactory : undefined,
@@ -144245,7 +144245,11 @@ var conf = {
144245
144245
  overline: false,
144246
144246
  subscript: false,
144247
144247
  superscript: false
144248
- }
144248
+ },
144249
+ LOG_HOTKEYS: false,
144250
+ FORCE_HOTKEYS: "auto",
144251
+ debug: false,
144252
+ FALLBACK_LNG: "en"
144249
144253
  };
144250
144254
 
144251
144255
  // src/Items/Transformation/Matrix.ts
@@ -144967,7 +144971,7 @@ class DrawingContext {
144967
144971
  this.setCamera(camera);
144968
144972
  }
144969
144973
  dpi() {
144970
- return conf.getDPI();
144974
+ return conf2.getDPI();
144971
144975
  }
144972
144976
  setCamera(camera) {
144973
144977
  this.camera = camera;
@@ -144977,7 +144981,7 @@ class DrawingContext {
144977
144981
  }
144978
144982
  clear() {
144979
144983
  this.ctx.setTransform(1 * this.dpi(), 0, 0, 1 * this.dpi(), 0, 0);
144980
- this.ctx.clearRect(0, 0, conf.getDocumentWidth(), conf.getDocumentHeight());
144984
+ this.ctx.clearRect(0, 0, conf2.getDocumentWidth(), conf2.getDocumentHeight());
144981
144985
  this.matrix.applyToContext(this.ctx);
144982
144986
  }
144983
144987
  clearCursor() {
@@ -144985,7 +144989,7 @@ class DrawingContext {
144985
144989
  return;
144986
144990
  }
144987
144991
  this.cursorCtx.setTransform(1 * this.dpi(), 0, 0, 1 * this.dpi(), 0, 0);
144988
- this.cursorCtx.clearRect(0, 0, conf.getDocumentWidth(), conf.getDocumentHeight());
144992
+ this.cursorCtx.clearRect(0, 0, conf2.getDocumentWidth(), conf2.getDocumentHeight());
144989
144993
  this.matrix.applyToContext(this.cursorCtx);
144990
144994
  }
144991
144995
  applyChanges() {
@@ -145088,7 +145092,7 @@ class Path {
145088
145092
  this.width = this.getMbr().getWidth();
145089
145093
  this.height = this.getMbr().getHeight();
145090
145094
  this.maxDimension = Math.max(mbr.getWidth(), mbr.getHeight());
145091
- this.path2d = new conf.path2DFactory;
145095
+ this.path2d = new conf2.path2DFactory;
145092
145096
  this.updateCache();
145093
145097
  }
145094
145098
  getBackgroundColor() {
@@ -145165,7 +145169,7 @@ class Path {
145165
145169
  this.y = top - this.paddingTop;
145166
145170
  this.width = right - left + this.paddingLeft + this.paddingRight;
145167
145171
  this.height = bottom - top + this.paddingTop + this.paddingBottom;
145168
- const path2d = new conf.path2DFactory;
145172
+ const path2d = new conf2.path2DFactory;
145169
145173
  if (this.segments.length === 0) {
145170
145174
  return;
145171
145175
  }
@@ -146231,7 +146235,7 @@ var parsersHTML = {
146231
146235
  "comment-item": parseHTMLComment
146232
146236
  };
146233
146237
  var decodeHtml = (htmlString) => {
146234
- const parser = conf.getDOMParser();
146238
+ const parser = conf2.getDOMParser();
146235
146239
  const doc = parser.parseFromString(htmlString, "text/html");
146236
146240
  return doc.documentElement.textContent || "";
146237
146241
  };
@@ -146260,10 +146264,10 @@ function parseHTMLRichText(el, options) {
146260
146264
  italic: node.style.fontStyle === "italic",
146261
146265
  underline: node.style.textDecoration.includes("underline"),
146262
146266
  "line-through": node.style.textDecoration.includes("line-through"),
146263
- fontColor: node.style.color || conf.DEFAULT_TEXT_STYLES.fontColor,
146264
- fontHighlight: node.style.backgroundColor || conf.DEFAULT_TEXT_STYLES.fontHighlight,
146265
- fontSize: parseFloat(node.style.fontSize) || conf.DEFAULT_TEXT_STYLES.fontSize,
146266
- fontFamily: node.style.fontFamily || conf.DEFAULT_TEXT_STYLES.fontFamily,
146267
+ fontColor: node.style.color || conf2.DEFAULT_TEXT_STYLES.fontColor,
146268
+ fontHighlight: node.style.backgroundColor || conf2.DEFAULT_TEXT_STYLES.fontHighlight,
146269
+ fontSize: parseFloat(node.style.fontSize) || conf2.DEFAULT_TEXT_STYLES.fontSize,
146270
+ fontFamily: node.style.fontFamily || conf2.DEFAULT_TEXT_STYLES.fontFamily,
146267
146271
  overline: false,
146268
146272
  subscript: false,
146269
146273
  superscript: false
@@ -146328,7 +146332,7 @@ function parseHTMLRichText(el, options) {
146328
146332
  return {
146329
146333
  type: "paragraph",
146330
146334
  ...extractCommonProps(),
146331
- lineHeight: parseFloat(node.style.lineHeight) || conf.DEFAULT_TEXT_STYLES.lineHeight,
146335
+ lineHeight: parseFloat(node.style.lineHeight) || conf2.DEFAULT_TEXT_STYLES.lineHeight,
146332
146336
  children: children2
146333
146337
  };
146334
146338
  default:
@@ -146701,8 +146705,8 @@ class LinkTo {
146701
146705
  const ctx = context.ctx;
146702
146706
  ctx.save();
146703
146707
  ctx.globalCompositeOperation = "destination-out";
146704
- const size = conf.LINK_BTN_SIZE / scale;
146705
- const offset = conf.LINK_BTN_OFFSET / scale;
146708
+ const size = conf2.LINK_BTN_SIZE / scale;
146709
+ const offset = conf2.LINK_BTN_OFFSET / scale;
146706
146710
  ctx.fillRect(right - size - offset, top + offset, size, size);
146707
146711
  ctx.restore();
146708
146712
  }
@@ -146853,7 +146857,7 @@ function getBlockNode(data, maxWidth, isFrame, listData, listMark, newLine = fal
146853
146857
  } else if (node.type === "ul_list" && !listData) {
146854
146858
  listData = { level: 0, isNumberedList: false };
146855
146859
  }
146856
- const listMarks = conf[getListMarkType((listData?.level || 0) + 1)];
146860
+ const listMarks = conf2[getListMarkType((listData?.level || 0) + 1)];
146857
146861
  for (let i = 0;i < data.children.length; i++) {
146858
146862
  const child = structuredClone(data.children[i]);
146859
146863
  switch (child.type) {
@@ -147258,8 +147262,8 @@ function measureText(text, style, paddingTop = 0, marginLeft = 0) {
147258
147262
  rect2.height += paddingTop;
147259
147263
  }
147260
147264
  }
147261
- conf.measureCtx.font = style.font;
147262
- const measure = conf.measureCtx.measureText(text);
147265
+ conf2.measureCtx.font = style.font;
147266
+ const measure = conf2.measureCtx.measureText(text);
147263
147267
  const actualBoundingBoxAscent = toFiniteNumber2(measure.actualBoundingBoxAscent);
147264
147268
  const actualBoundingBoxDescent = toFiniteNumber2(measure.actualBoundingBoxDescent);
147265
147269
  const actualBoundingBoxLeft = toFiniteNumber2(measure.actualBoundingBoxLeft);
@@ -156147,7 +156151,7 @@ var convertLinkNodeToTextNode = (node2) => {
156147
156151
  const link = node2.link;
156148
156152
  const text3 = node2.children.map((child) => child.text).join("");
156149
156153
  return {
156150
- ...conf.DEFAULT_TEXT_STYLES,
156154
+ ...conf2.DEFAULT_TEXT_STYLES,
156151
156155
  type: "text",
156152
156156
  text: text3,
156153
156157
  link,
@@ -156163,9 +156167,9 @@ function setNodeChildrenStyles({
156163
156167
  horisontalAlignment,
156164
156168
  node: node2
156165
156169
  }) {
156166
- let fontStyles = conf.DEFAULT_TEXT_STYLES;
156170
+ let fontStyles = conf2.DEFAULT_TEXT_STYLES;
156167
156171
  if (editor) {
156168
- fontStyles = import_slate18.Editor.marks(editor) || conf.DEFAULT_TEXT_STYLES;
156172
+ fontStyles = import_slate18.Editor.marks(editor) || conf2.DEFAULT_TEXT_STYLES;
156169
156173
  }
156170
156174
  switch (node2.type) {
156171
156175
  case "heading_one":
@@ -156197,7 +156201,7 @@ function setNodeChildrenStyles({
156197
156201
  children.text += " ";
156198
156202
  }
156199
156203
  let fontColor = fontStyles.fontColor;
156200
- if (fontColor === conf.DEFAULT_TEXT_STYLES.fontColor && children.link) {
156204
+ if (fontColor === conf2.DEFAULT_TEXT_STYLES.fontColor && children.link) {
156201
156205
  fontColor = "rgba(71, 120, 245, 1)";
156202
156206
  }
156203
156207
  return {
@@ -156237,7 +156241,7 @@ function setNodeStyles({
156237
156241
  }
156238
156242
 
156239
156243
  // src/Items/RichText/editorHelpers/markdown/markdownProcessor.ts
156240
- var { i18n: i18n2 } = conf;
156244
+ var { i18n: i18n2 } = conf2;
156241
156245
 
156242
156246
  class MarkdownProcessor {
156243
156247
  chunksQueue = [];
@@ -157240,7 +157244,7 @@ function setEditorFocus(editor, selectionContext) {
157240
157244
  }
157241
157245
 
157242
157246
  // src/Items/RichText/RichText.ts
157243
- var { i18n: i18n3 } = conf;
157247
+ var { i18n: i18n3 } = conf2;
157244
157248
  var isEditInProcessValue = false;
157245
157249
  var counter = 0;
157246
157250
 
@@ -157263,7 +157267,7 @@ class RichText extends Mbr {
157263
157267
  isContainerSet = false;
157264
157268
  isRenderEnabled = true;
157265
157269
  layoutNodes;
157266
- clipPath = new conf.path2DFactory;
157270
+ clipPath = new conf2.path2DFactory;
157267
157271
  updateRequired = false;
157268
157272
  autoSizeScale = 1;
157269
157273
  containerMaxWidth;
@@ -157278,7 +157282,7 @@ class RichText extends Mbr {
157278
157282
  shrinkWidth = false;
157279
157283
  prevMbr = null;
157280
157284
  rtCounter = 0;
157281
- constructor(board, container, id = "", transformation = new Transformation(id, board.events), linkTo, placeholderText = i18n3?.t("board.textPlaceholder"), isInShape = false, autoSize = false, insideOf, initialTextStyles = conf.DEFAULT_TEXT_STYLES) {
157285
+ constructor(board, container, id = "", transformation = new Transformation(id, board.events), linkTo, placeholderText = i18n3?.t("board.textPlaceholder"), isInShape = false, autoSize = false, insideOf, initialTextStyles = conf2.DEFAULT_TEXT_STYLES) {
157282
157286
  super();
157283
157287
  this.board = board;
157284
157288
  this.container = container;
@@ -157411,11 +157415,11 @@ class RichText extends Mbr {
157411
157415
  return;
157412
157416
  }
157413
157417
  try {
157414
- conf.reactEditorFocus(this.editor.editor);
157418
+ conf2.reactEditorFocus(this.editor.editor);
157415
157419
  } catch {}
157416
157420
  };
157417
157421
  updateElement = () => {
157418
- if (conf.isNode()) {
157422
+ if (conf2.isNode()) {
157419
157423
  return;
157420
157424
  }
157421
157425
  if (this.updateRequired) {
@@ -157544,7 +157548,7 @@ class RichText extends Mbr {
157544
157548
  const container = this.getTransformedContainer();
157545
157549
  const width = container.getWidth();
157546
157550
  const height = container.getHeight();
157547
- this.clipPath = new conf.path2DFactory;
157551
+ this.clipPath = new conf2.path2DFactory;
157548
157552
  this.clipPath.rect(0, 0, width, height);
157549
157553
  }
157550
157554
  setContainer(container) {
@@ -157821,24 +157825,24 @@ class RichText extends Mbr {
157821
157825
  this.clearLastClickPoint();
157822
157826
  const domMbr = ref.getBoundingClientRect();
157823
157827
  const refMbr = new Mbr(domMbr.left, domMbr.top, domMbr.right, domMbr.bottom);
157824
- if (refMbr.isInside(point3) && (conf.documentFactory.caretPositionFromPoint || conf.documentFactory.caretRangeFromPoint)) {
157825
- const domRange = conf.documentFactory.caretPositionFromPoint ? conf.documentFactory.caretPositionFromPoint(point3.x, point3.y) : conf.documentFactory.caretRangeFromPoint(point3.x, point3.y);
157826
- const textNode = conf.documentFactory.caretPositionFromPoint ? domRange.offsetNode : domRange.startContainer;
157827
- const offset = conf.documentFactory.caretPositionFromPoint ? domRange.offset : domRange.startOffset;
157828
- const slatePoint = conf.reactEditorToSlatePoint(this.editor.editor, textNode, offset, {
157828
+ if (refMbr.isInside(point3) && (conf2.documentFactory.caretPositionFromPoint || conf2.documentFactory.caretRangeFromPoint)) {
157829
+ const domRange = conf2.documentFactory.caretPositionFromPoint ? conf2.documentFactory.caretPositionFromPoint(point3.x, point3.y) : conf2.documentFactory.caretRangeFromPoint(point3.x, point3.y);
157830
+ const textNode = conf2.documentFactory.caretPositionFromPoint ? domRange.offsetNode : domRange.startContainer;
157831
+ const offset = conf2.documentFactory.caretPositionFromPoint ? domRange.offset : domRange.startOffset;
157832
+ const slatePoint = conf2.reactEditorToSlatePoint(this.editor.editor, textNode, offset, {
157829
157833
  exactMatch: false,
157830
157834
  suppressThrow: false
157831
157835
  });
157832
157836
  if (slatePoint) {
157833
157837
  const nRange = { anchor: slatePoint, focus: slatePoint };
157834
157838
  this.editorTransforms.select(this.editor.editor, nRange);
157835
- conf.reactEditorFocus(this.editor.editor);
157839
+ conf2.reactEditorFocus(this.editor.editor);
157836
157840
  }
157837
157841
  } else {
157838
- if (!(conf.documentFactory.caretPositionFromPoint || conf.documentFactory.caretRangeFromPoint)) {
157842
+ if (!(conf2.documentFactory.caretPositionFromPoint || conf2.documentFactory.caretRangeFromPoint)) {
157839
157843
  console.error("document.caretPositionFromPoint and document.caretRangeFromPoint are not available!");
157840
157844
  }
157841
- conf.reactEditorFocus(this.editor.editor);
157845
+ conf2.reactEditorFocus(this.editor.editor);
157842
157846
  }
157843
157847
  }
157844
157848
  }
@@ -157945,11 +157949,11 @@ class RichText extends Mbr {
157945
157949
  if (node2.type === "text" || "text" in node2) {
157946
157950
  node2 = node2;
157947
157951
  const text3 = node2.text.trim() !== "" ? decodeHtml(escapeHtml(node2.text)) : " ";
157948
- const textElement = node2.link ? Object.assign(conf.documentFactory.createElement("a"), {
157952
+ const textElement = node2.link ? Object.assign(conf2.documentFactory.createElement("a"), {
157949
157953
  href: node2.link,
157950
157954
  target: "_blank",
157951
157955
  rel: "noreferrer"
157952
- }) : conf.documentFactory.createElement("span");
157956
+ }) : conf2.documentFactory.createElement("span");
157953
157957
  Object.assign(textElement.style, {
157954
157958
  fontWeight: node2.bold ? "700" : "400",
157955
157959
  fontStyle: node2.italic ? "italic" : "",
@@ -157957,10 +157961,10 @@ class RichText extends Mbr {
157957
157961
  node2.underline ? "underline" : "",
157958
157962
  node2["line-through"] ? "line-through" : ""
157959
157963
  ].filter(Boolean).join(" "),
157960
- color: node2.fontColor || conf.DEFAULT_TEXT_STYLES.fontColor,
157961
- backgroundColor: node2.fontHighlight || conf.DEFAULT_TEXT_STYLES.fontHighlight,
157962
- fontSize: node2.fontSize ? `${node2.fontSize}px` : `${conf.DEFAULT_TEXT_STYLES.fontSize}px`,
157963
- fontFamily: node2.fontFamily || conf.DEFAULT_TEXT_STYLES.fontFamily
157964
+ color: node2.fontColor || conf2.DEFAULT_TEXT_STYLES.fontColor,
157965
+ backgroundColor: node2.fontHighlight || conf2.DEFAULT_TEXT_STYLES.fontHighlight,
157966
+ fontSize: node2.fontSize ? `${node2.fontSize}px` : `${conf2.DEFAULT_TEXT_STYLES.fontSize}px`,
157967
+ fontFamily: node2.fontFamily || conf2.DEFAULT_TEXT_STYLES.fontFamily
157964
157968
  });
157965
157969
  if (this.insideOf === "Frame") {
157966
157970
  Object.assign(textElement.style, {
@@ -157995,14 +157999,14 @@ class RichText extends Mbr {
157995
157999
  four: 4,
157996
158000
  five: 5
157997
158001
  };
157998
- const header = conf.documentFactory.createElement(`h${levels[level]}`);
158002
+ const header = conf2.documentFactory.createElement(`h${levels[level]}`);
157999
158003
  applyCommonStyles(header);
158000
158004
  header.append(...children);
158001
158005
  return header;
158002
158006
  }
158003
158007
  case "code_block": {
158004
- const pre = conf.documentFactory.createElement("pre");
158005
- const code = conf.documentFactory.createElement("code");
158008
+ const pre = conf2.documentFactory.createElement("pre");
158009
+ const code = conf2.documentFactory.createElement("code");
158006
158010
  applyCommonStyles(pre);
158007
158011
  if (node2.language) {
158008
158012
  code.classList.add(`language-${node2.language}`);
@@ -158016,35 +158020,35 @@ class RichText extends Mbr {
158016
158020
  return pre;
158017
158021
  }
158018
158022
  case "block-quote": {
158019
- const blockquote = conf.documentFactory.createElement("blockquote");
158023
+ const blockquote = conf2.documentFactory.createElement("blockquote");
158020
158024
  applyCommonStyles(blockquote);
158021
158025
  blockquote.append(...children);
158022
158026
  return blockquote;
158023
158027
  }
158024
158028
  case "ul_list": {
158025
- const ul = conf.documentFactory.createElement("ul");
158029
+ const ul = conf2.documentFactory.createElement("ul");
158026
158030
  applyCommonStyles(ul);
158027
158031
  ul.append(...children);
158028
158032
  return ul;
158029
158033
  }
158030
158034
  case "ol_list": {
158031
- const ol = conf.documentFactory.createElement("ol");
158035
+ const ol = conf2.documentFactory.createElement("ol");
158032
158036
  applyCommonStyles(ol);
158033
158037
  ol.append(...children);
158034
158038
  return ol;
158035
158039
  }
158036
158040
  case "list_item": {
158037
- const li = conf.documentFactory.createElement("li");
158041
+ const li = conf2.documentFactory.createElement("li");
158038
158042
  applyCommonStyles(li);
158039
158043
  li.append(...children);
158040
158044
  return li;
158041
158045
  }
158042
158046
  case "paragraph":
158043
158047
  default: {
158044
- const par = conf.documentFactory.createElement("p");
158048
+ const par = conf2.documentFactory.createElement("p");
158045
158049
  applyCommonStyles(par);
158046
158050
  Object.assign(par.style, {
158047
- lineHeight: node2.lineHeight ? `${node2.lineHeight}` : conf.DEFAULT_TEXT_STYLES.lineHeight,
158051
+ lineHeight: node2.lineHeight ? `${node2.lineHeight}` : conf2.DEFAULT_TEXT_STYLES.lineHeight,
158048
158052
  margin: "0"
158049
158053
  });
158050
158054
  par.append(...children);
@@ -158052,7 +158056,7 @@ class RichText extends Mbr {
158052
158056
  }
158053
158057
  }
158054
158058
  }
158055
- return conf.documentFactory.createElement("div");
158059
+ return conf2.documentFactory.createElement("div");
158056
158060
  };
158057
158061
  const escapeHtml = (unsafe) => {
158058
158062
  return unsafe.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#039;");
@@ -171116,7 +171120,7 @@ var transformHtmlOrTextToMarkdown = async (text5, html4) => {
171116
171120
  markdownString = String(file).trim();
171117
171121
  }
171118
171122
  let slateNodes = [];
171119
- if (conf.URL_REGEX.test(text5)) {
171123
+ if (conf2.URL_REGEX.test(text5)) {
171120
171124
  slateNodes = [createLinkNode(text5)];
171121
171125
  } else {
171122
171126
  slateNodes = await convertMarkdownToSlate(markdownString.replace(/<!--(Start|End)Fragment-->/g, ""));
@@ -171132,7 +171136,7 @@ function createLinkNode(link2) {
171132
171136
  type: "text",
171133
171137
  link: link2,
171134
171138
  text: link2,
171135
- ...conf.DEFAULT_TEXT_STYLES,
171139
+ ...conf2.DEFAULT_TEXT_STYLES,
171136
171140
  fontColor: "rgba(71, 120, 245, 1)"
171137
171141
  };
171138
171142
  }
@@ -171244,7 +171248,7 @@ class AINode {
171244
171248
  constructor(board, isUserRequest = false, parentNodeId, contextItems = [], threadDirection, id = "") {
171245
171249
  this.board = board;
171246
171250
  this.id = id;
171247
- this.buttonIcon = conf.documentFactory.createElement("img");
171251
+ this.buttonIcon = conf2.documentFactory.createElement("img");
171248
171252
  this.buttonIcon.src = ICON_SRC;
171249
171253
  this.contextItems = contextItems;
171250
171254
  this.isUserRequest = isUserRequest;
@@ -172416,7 +172420,7 @@ function getLine(lineStyle, start, end, middle) {
172416
172420
  }
172417
172421
 
172418
172422
  // src/Items/Connector/Connector.ts
172419
- var { i18n: i18n4 } = conf;
172423
+ var { i18n: i18n4 } = conf2;
172420
172424
  var ConnectionLineWidths = [1, 2, 3, 4, 5, 6, 7, 8, 12];
172421
172425
  var CONNECTOR_COLOR = "rgb(20, 21, 26)";
172422
172426
  var CONNECTOR_LINE_WIDTH = 1;
@@ -172476,9 +172480,9 @@ class Connector {
172476
172480
  this.text = new RichText(board, this.getMbr(), this.id, new Transformation, this.linkTo, i18n4.t("connector.textPlaceholder", {
172477
172481
  ns: "default"
172478
172482
  }), true, false, "Connector", {
172479
- ...conf.DEFAULT_TEXT_STYLES,
172480
- fontSize: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextSize") ? Number(localStorage.getItem("lastConnectorTextSize")) : conf.DEFAULT_TEXT_STYLES.fontSize,
172481
- fontColor: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextColor") ? localStorage.getItem("lastConnectorTextColor") : conf.DEFAULT_TEXT_STYLES.fontColor
172483
+ ...conf2.DEFAULT_TEXT_STYLES,
172484
+ fontSize: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextSize") ? Number(localStorage.getItem("lastConnectorTextSize")) : conf2.DEFAULT_TEXT_STYLES.fontSize,
172485
+ fontColor: typeof window !== "undefined" && localStorage.getItem("lastConnectorTextColor") ? localStorage.getItem("lastConnectorTextColor") : conf2.DEFAULT_TEXT_STYLES.fontColor
172482
172486
  });
172483
172487
  this.startPointer = getStartPointer(this.startPoint, this.startPointerStyle, this.lineStyle, this.lines, this.lineWidth * 0.1 + 0.3);
172484
172488
  this.endPointer = getEndPointer(this.endPoint, this.endPointerStyle, this.lineStyle, this.lines, this.lineWidth * 0.1 + 0.3);
@@ -172928,7 +172932,7 @@ class Connector {
172928
172932
  this.text.transformation.applyTranslateTo(x - textWidth / 2, y - textHeight / 2);
172929
172933
  this.text.render(context);
172930
172934
  if (DRAW_TEXT_BORDER && (selectionContext === "EditUnderPointer" || selectionContext === "EditTextUnderPointer") && this.board.selection.items.list().includes(this)) {
172931
- ctx.strokeStyle = conf.SELECTION_COLOR;
172935
+ ctx.strokeStyle = conf2.SELECTION_COLOR;
172932
172936
  ctx.lineWidth = 1;
172933
172937
  ctx.beginPath();
172934
172938
  ctx.rect(textMbr.left - TEXT_BORDER_PADDING, textMbr.top - TEXT_BORDER_PADDING, textMbr.getWidth() + TEXT_BORDER_PADDING * 2, textMbr.getHeight() + TEXT_BORDER_PADDING * 2);
@@ -173155,7 +173159,7 @@ class Connector {
173155
173159
  }
173156
173160
  }
173157
173161
  updatePaths() {
173158
- if (conf.isNode()) {
173162
+ if (conf2.isNode()) {
173159
173163
  return;
173160
173164
  }
173161
173165
  const startPoint = this.startPoint;
@@ -173966,7 +173970,7 @@ class DefaultShapeData {
173966
173970
  text;
173967
173971
  linkTo;
173968
173972
  itemType = "Shape";
173969
- constructor(shapeType = "Rectangle", backgroundColor = "none", backgroundOpacity = 1, borderColor = conf.SHAPE_DEFAULT_STROKE_COLOR, borderOpacity = 1, borderStyle = "solid", borderWidth = 1, transformation = new DefaultTransformationData, text5 = new DefaultRichTextData, linkTo) {
173973
+ constructor(shapeType = "Rectangle", backgroundColor = "none", backgroundOpacity = 1, borderColor = conf2.SHAPE_DEFAULT_STROKE_COLOR, borderOpacity = 1, borderStyle = "solid", borderWidth = 1, transformation = new DefaultTransformationData, text5 = new DefaultRichTextData, linkTo) {
173970
173974
  this.shapeType = shapeType;
173971
173975
  this.backgroundColor = backgroundColor;
173972
173976
  this.backgroundOpacity = backgroundOpacity;
@@ -175253,7 +175257,7 @@ class Shape {
175253
175257
  this.text.updateElement();
175254
175258
  }
175255
175259
  transformPath() {
175256
- if (conf.isNode()) {
175260
+ if (conf2.isNode()) {
175257
175261
  return;
175258
175262
  }
175259
175263
  this.path = Shapes[this.shapeType].createPath(this.mbr);
@@ -175482,7 +175486,7 @@ class Sticker {
175482
175486
  return this;
175483
175487
  }
175484
175488
  transformPath() {
175485
- if (conf.isNode()) {
175489
+ if (conf2.isNode()) {
175486
175490
  return;
175487
175491
  }
175488
175492
  this.stickerPath = StickerShape.stickerPath.copy();
@@ -176033,7 +176037,7 @@ class Frame {
176033
176037
  this.path = Frames[this.shapeType].path.copy();
176034
176038
  this.transformation = new Transformation(this.id, this.board.events);
176035
176039
  this.linkTo = new LinkTo(this.id, this.board.events);
176036
- this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, this.name, true, false, "Frame", { ...conf.DEFAULT_TEXT_STYLES, fontColor: FRAME_TITLE_COLOR });
176040
+ this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, this.name, true, false, "Frame", { ...conf2.DEFAULT_TEXT_STYLES, fontColor: FRAME_TITLE_COLOR });
176037
176041
  this.text.setSelectionHorisontalAlignment("left");
176038
176042
  this.transformation.subject.subscribe(() => {
176039
176043
  this.transformPath();
@@ -176595,10 +176599,10 @@ class VideoCommand {
176595
176599
 
176596
176600
  // src/Items/Video/Video.ts
176597
176601
  var VIDEO_ICON_SRC = "data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 22 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 0C15.2652 0 15.5196 0.105357 15.7071 0.292893C15.8946 0.48043 16 0.734784 16 1V5.2L21.213 1.55C21.288 1.49746 21.3759 1.4665 21.4672 1.4605C21.5586 1.4545 21.6498 1.4737 21.731 1.51599C21.8122 1.55829 21.8802 1.62206 21.9276 1.70035C21.9751 1.77865 22.0001 1.86846 22 1.96V14.04C22.0001 14.1315 21.9751 14.2214 21.9276 14.2996C21.8802 14.3779 21.8122 14.4417 21.731 14.484C21.6498 14.5263 21.5586 14.5455 21.4672 14.5395C21.3759 14.5335 21.288 14.5025 21.213 14.45L16 10.8V15C16 15.2652 15.8946 15.5196 15.7071 15.7071C15.5196 15.8946 15.2652 16 15 16H1C0.734784 16 0.48043 15.8946 0.292893 15.7071C0.105357 15.5196 0 15.2652 0 15V1C0 0.734784 0.105357 0.48043 0.292893 0.292893C0.48043 0.105357 0.734784 0 1 0H15ZM14 2H2V14H14V2ZM6.4 4.829C6.47611 4.82879 6.55069 4.8503 6.615 4.891L10.97 7.663C11.0266 7.69917 11.0731 7.749 11.1054 7.80789C11.1376 7.86679 11.1545 7.93285 11.1545 8C11.1545 8.06715 11.1376 8.13321 11.1054 8.19211C11.0731 8.251 11.0266 8.30083 10.97 8.337L6.615 11.11C6.55434 11.1487 6.48438 11.1703 6.41248 11.1725C6.34059 11.1748 6.26941 11.1576 6.20646 11.1228C6.14351 11.088 6.0911 11.0368 6.05477 10.9747C6.01844 10.9127 5.99951 10.8419 6 10.77V5.23C6 5.009 6.18 4.83 6.4 4.83V4.829ZM20 4.84L16 7.64V8.358L20 11.158V4.84Z' fill='%23FFFFFF'/%3E%3C/svg%3E";
176598
- var videoIcon = conf.documentFactory.createElement("img");
176602
+ var videoIcon = conf2.documentFactory.createElement("img");
176599
176603
  videoIcon.src = VIDEO_ICON_SRC;
176600
176604
  var createPlaceholderImage = (width2, height2) => {
176601
- const canvas = conf.documentFactory.createElement("canvas");
176605
+ const canvas = conf2.documentFactory.createElement("canvas");
176602
176606
  canvas.width = width2;
176603
176607
  canvas.height = height2;
176604
176608
  const ctx = canvas.getContext("2d");
@@ -176642,7 +176646,7 @@ class VideoItem extends Mbr {
176642
176646
  this.events = events;
176643
176647
  this.id = id;
176644
176648
  this.extension = extension2;
176645
- this.isStorageUrl = !conf.getYouTubeId(url);
176649
+ this.isStorageUrl = !conf2.getYouTubeId(url);
176646
176650
  this.preview = createPlaceholderImage(videoDimension.width, videoDimension.height);
176647
176651
  this.linkTo = new LinkTo(this.id, events);
176648
176652
  this.board = board;
@@ -177012,59 +177016,59 @@ async function fileTosha256(file) {
177012
177016
  var catchErrorResponse = async (response, mediaType) => {
177013
177017
  if (response.status === 403) {
177014
177018
  const data = await response.json();
177015
- let errorBody = conf.i18n.t("toolsPanel.addMedia.limitReached.bodyWithoutLimit");
177019
+ let errorBody = conf2.i18n.t("toolsPanel.addMedia.limitReached.bodyWithoutLimit");
177016
177020
  if (!data.isOwnerRequest) {
177017
- errorBody = conf.i18n.t("toolsPanel.addMedia.limitReached.bodyOwner");
177021
+ errorBody = conf2.i18n.t("toolsPanel.addMedia.limitReached.bodyOwner");
177018
177022
  } else if (data.currentUsage && data.storageLimit) {
177019
- errorBody = conf.i18n.t(`toolsPanel.addMedia.limitReached.body.${parseInt(data.storageLimit) < 1e5 ? "basic" : "plus"}`);
177023
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.limitReached.body.${parseInt(data.storageLimit) < 1e5 ? "basic" : "plus"}`);
177020
177024
  }
177021
- conf.notify({
177025
+ conf2.notify({
177022
177026
  variant: "warning",
177023
- header: conf.i18n.t("toolsPanel.addMedia.limitReached.header"),
177027
+ header: conf2.i18n.t("toolsPanel.addMedia.limitReached.header"),
177024
177028
  body: errorBody,
177025
177029
  button: data.isOwnerRequest && data.storageLimit <= 100 ? {
177026
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177027
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
177030
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177031
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
177028
177032
  } : undefined,
177029
177033
  duration: 8000
177030
177034
  });
177031
177035
  } else if (response.status === 413) {
177032
177036
  const data = await response.json();
177033
- let errorBody = conf.i18n.t("toolsPanel.addMedia.tooLarge.bodyWithoutLimit");
177037
+ let errorBody = conf2.i18n.t("toolsPanel.addMedia.tooLarge.bodyWithoutLimit");
177034
177038
  let isBasicPlan = false;
177035
177039
  if (data.fileSizeLimit && data.fileSize) {
177036
177040
  if (mediaType === "image") {
177037
177041
  isBasicPlan = parseInt(data.fileSizeLimit) < 20;
177038
- errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
177042
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
177039
177043
  } else {
177040
177044
  isBasicPlan = parseInt(data.fileSizeLimit) < 1000;
177041
- errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
177045
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
177042
177046
  }
177043
177047
  }
177044
- conf.notify({
177048
+ conf2.notify({
177045
177049
  variant: "warning",
177046
- header: conf.i18n.t("toolsPanel.addMedia.tooLarge.header"),
177050
+ header: conf2.i18n.t("toolsPanel.addMedia.tooLarge.header"),
177047
177051
  body: errorBody,
177048
177052
  button: isBasicPlan ? {
177049
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177050
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
177053
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177054
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
177051
177055
  } : undefined,
177052
177056
  duration: 4000
177053
177057
  });
177054
177058
  } else if (response.status === 401) {
177055
- conf.openModal("MEDIA_UNAVAILABLE_MODAL_ID");
177059
+ conf2.openModal("MEDIA_UNAVAILABLE_MODAL_ID");
177056
177060
  } else if (response.status === 415) {
177057
- conf.notify({
177061
+ conf2.notify({
177058
177062
  variant: "warning",
177059
- header: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
177060
- body: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
177063
+ header: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
177064
+ body: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
177061
177065
  duration: 4000
177062
177066
  });
177063
177067
  } else {
177064
- conf.notify({
177068
+ conf2.notify({
177065
177069
  variant: "error",
177066
- header: conf.i18n.t("toolsPanel.addMedia.unhandled.header"),
177067
- body: conf.i18n.t("toolsPanel.addMedia.unhandled.body"),
177070
+ header: conf2.i18n.t("toolsPanel.addMedia.unhandled.header"),
177071
+ body: conf2.i18n.t("toolsPanel.addMedia.unhandled.body"),
177068
177072
  duration: 4000
177069
177073
  });
177070
177074
  }
@@ -177072,17 +177076,17 @@ var catchErrorResponse = async (response, mediaType) => {
177072
177076
  };
177073
177077
  var catchDuplicateErrorResponse = async (response) => {
177074
177078
  if (response.status === 403) {
177075
- conf.notify({
177079
+ conf2.notify({
177076
177080
  variant: "warning",
177077
- header: conf.i18n.t("toolsPanel.addMedia.limitReached.header"),
177078
- body: conf.i18n.t("toolsPanel.addMedia.limitReached.duplicateBody"),
177081
+ header: conf2.i18n.t("toolsPanel.addMedia.limitReached.header"),
177082
+ body: conf2.i18n.t("toolsPanel.addMedia.limitReached.duplicateBody"),
177079
177083
  duration: 4000
177080
177084
  });
177081
177085
  } else {
177082
- conf.notify({
177086
+ conf2.notify({
177083
177087
  variant: "error",
177084
- header: conf.i18n.t("toolsPanel.addMedia.unhandled.header"),
177085
- body: conf.i18n.t("toolsPanel.addMedia.unhandled.body"),
177088
+ header: conf2.i18n.t("toolsPanel.addMedia.unhandled.header"),
177089
+ body: conf2.i18n.t("toolsPanel.addMedia.unhandled.body"),
177086
177090
  duration: 4000
177087
177091
  });
177088
177092
  }
@@ -177090,40 +177094,40 @@ var catchDuplicateErrorResponse = async (response) => {
177090
177094
  };
177091
177095
  var validateMediaFile = (file, account2) => {
177092
177096
  const fileExtension = file.name.split(".").pop()?.toLowerCase() || "";
177093
- if (!file.type.startsWith("image") && !conf.AUDIO_FORMATS.includes(fileExtension) && !conf.VIDEO_FORMATS.includes(fileExtension)) {
177094
- conf.notify({
177097
+ if (!file.type.startsWith("image") && !conf2.AUDIO_FORMATS.includes(fileExtension) && !conf2.VIDEO_FORMATS.includes(fileExtension)) {
177098
+ conf2.notify({
177095
177099
  variant: "warning",
177096
- header: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
177097
- body: conf.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
177100
+ header: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.header"),
177101
+ body: conf2.i18n.t("toolsPanel.addMedia.unsupportedFormat.body"),
177098
177102
  duration: 4000
177099
177103
  });
177100
177104
  return false;
177101
177105
  }
177102
177106
  const isBasicPlan = account2.billingInfo?.plan.name === "basic";
177103
- let errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
177104
- if (conf.AUDIO_FORMATS.includes(fileExtension) || conf.VIDEO_FORMATS.includes(fileExtension)) {
177105
- errorBody = conf.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
177107
+ let errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.imageBody.${isBasicPlan ? "basic" : "plus"}`);
177108
+ if (conf2.AUDIO_FORMATS.includes(fileExtension) || conf2.VIDEO_FORMATS.includes(fileExtension)) {
177109
+ errorBody = conf2.i18n.t(`toolsPanel.addMedia.tooLarge.audioOrVideoBody.${isBasicPlan ? "basic" : "plus"}`);
177106
177110
  if (file.size / 1024 ** 2 > (account2.billingInfo?.storage.maxMediaSize || Infinity)) {
177107
- conf.notify({
177111
+ conf2.notify({
177108
177112
  variant: "warning",
177109
- header: conf.i18n.t("toolsPanel.addMedia.tooLarge.header"),
177113
+ header: conf2.i18n.t("toolsPanel.addMedia.tooLarge.header"),
177110
177114
  body: errorBody,
177111
177115
  button: isBasicPlan ? {
177112
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177113
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
177116
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177117
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
177114
177118
  } : undefined,
177115
177119
  duration: 4000
177116
177120
  });
177117
177121
  return false;
177118
177122
  }
177119
177123
  } else if (file.size / 1024 ** 2 > (account2.billingInfo?.storage.maxImageSize || Infinity)) {
177120
- conf.notify({
177124
+ conf2.notify({
177121
177125
  variant: "warning",
177122
- header: conf.i18n.t("toolsPanel.addMedia.tooLarge.header"),
177126
+ header: conf2.i18n.t("toolsPanel.addMedia.tooLarge.header"),
177123
177127
  body: errorBody,
177124
177128
  button: isBasicPlan ? {
177125
- text: conf.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177126
- onClick: () => conf.openModal("USER_PLAN_MODAL_ID")
177129
+ text: conf2.i18n.t("toolsPanel.addMedia.upgradeToPlus"),
177130
+ onClick: () => conf2.openModal("USER_PLAN_MODAL_ID")
177127
177131
  } : undefined,
177128
177132
  duration: 4000
177129
177133
  });
@@ -177202,7 +177206,7 @@ var resizeAndConvertToPng = async (inp) => {
177202
177206
  };
177203
177207
  if (base64String.startsWith("data:image/svg+xml")) {
177204
177208
  image2.onload = async () => {
177205
- const parser = conf.getDOMParser();
177209
+ const parser = conf2.getDOMParser();
177206
177210
  const svgDoc = parser.parseFromString(atob(base64String.split(",")[1]), "image/svg+xml");
177207
177211
  const svgElement = svgDoc.documentElement;
177208
177212
  svgElement.removeAttribute("width");
@@ -177433,8 +177437,8 @@ class AudioItem extends Mbr {
177433
177437
  this.subject.publish(this);
177434
177438
  });
177435
177439
  this.transformation.subject.subscribe(this.onTransform);
177436
- this.right = this.left + conf.AUDIO_DIMENSIONS.width;
177437
- this.bottom = this.top + conf.AUDIO_DIMENSIONS.height;
177440
+ this.right = this.left + conf2.AUDIO_DIMENSIONS.width;
177441
+ this.bottom = this.top + conf2.AUDIO_DIMENSIONS.height;
177438
177442
  }
177439
177443
  setCurrentTime(time) {
177440
177444
  this.currentTime = time;
@@ -177501,8 +177505,8 @@ class AudioItem extends Mbr {
177501
177505
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
177502
177506
  this.left = translateX;
177503
177507
  this.top = translateY;
177504
- this.right = this.left + conf.AUDIO_DIMENSIONS.width * scaleX;
177505
- this.bottom = this.top + conf.AUDIO_DIMENSIONS.height * scaleY;
177508
+ this.right = this.left + conf2.AUDIO_DIMENSIONS.width * scaleX;
177509
+ this.bottom = this.top + conf2.AUDIO_DIMENSIONS.height * scaleY;
177506
177510
  }
177507
177511
  render(context) {
177508
177512
  if (this.transformationRenderBlock) {
@@ -177531,8 +177535,8 @@ class AudioItem extends Mbr {
177531
177535
  const { translateX, translateY, scaleX, scaleY } = this.transformation.matrix;
177532
177536
  const transform = `translate(${translateX}px, ${translateY}px) scale(${scaleX}, ${scaleY})`;
177533
177537
  div.id = this.getId();
177534
- div.style.width = `${conf.AUDIO_DIMENSIONS.width}px`;
177535
- div.style.height = `${conf.AUDIO_DIMENSIONS.height}px`;
177538
+ div.style.width = `${conf2.AUDIO_DIMENSIONS.width}px`;
177539
+ div.style.height = `${conf2.AUDIO_DIMENSIONS.height}px`;
177536
177540
  div.style.transformOrigin = "top left";
177537
177541
  div.style.transform = transform;
177538
177542
  div.style.position = "absolute";
@@ -177651,7 +177655,7 @@ class AudioItem extends Mbr {
177651
177655
  }
177652
177656
  download() {
177653
177657
  if (this.extension) {
177654
- const linkElem = conf.documentFactory.createElement("a");
177658
+ const linkElem = conf2.documentFactory.createElement("a");
177655
177659
  linkElem.href = this.url;
177656
177660
  linkElem.setAttribute("download", `${this.board.getBoardId()}.${this.extension}`);
177657
177661
  linkElem.click();
@@ -178053,7 +178057,7 @@ class ImageCommand {
178053
178057
 
178054
178058
  // src/Items/Image/Image.ts
178055
178059
  function getPlaceholderImage(board, imageDimension) {
178056
- const placeholderCanvas = conf.documentFactory.createElement("canvas");
178060
+ const placeholderCanvas = conf2.documentFactory.createElement("canvas");
178057
178061
  const placeholderContext = placeholderCanvas.getContext("2d");
178058
178062
  const context = new DrawingContext(board.camera, placeholderContext);
178059
178063
  const placeholder = new Placeholder;
@@ -178404,7 +178408,7 @@ class Drawing extends Mbr {
178404
178408
  itemType = "Drawing";
178405
178409
  parent = "Board";
178406
178410
  transformation;
178407
- path2d = new conf.path2DFactory;
178411
+ path2d = new conf2.path2DFactory;
178408
178412
  subject = new Subject;
178409
178413
  untransformedMbr = new Mbr;
178410
178414
  lines = [];
@@ -178481,7 +178485,7 @@ class Drawing extends Mbr {
178481
178485
  this.bottom = mbr.bottom;
178482
178486
  }
178483
178487
  updatePath2d() {
178484
- this.path2d = new conf.path2DFactory;
178488
+ this.path2d = new conf2.path2DFactory;
178485
178489
  const context = this.path2d;
178486
178490
  const points = this.points;
178487
178491
  if (points.length < 3) {
@@ -179653,9 +179657,9 @@ class Camera {
179653
179657
  matrix = new Matrix2;
179654
179658
  pointer = new Point;
179655
179659
  window = {
179656
- width: conf.getDocumentWidth(),
179657
- height: conf.getDocumentHeight(),
179658
- dpi: conf.getDPI(),
179660
+ width: conf2.getDocumentWidth(),
179661
+ height: conf2.getDocumentHeight(),
179662
+ dpi: conf2.getDPI(),
179659
179663
  getMbr: () => {
179660
179664
  return new Mbr(0, 0, this.window.width, this.window.height);
179661
179665
  }
@@ -180031,9 +180035,9 @@ class Camera {
180031
180035
  this.updateBoardPointer();
180032
180036
  }
180033
180037
  onWindowResize() {
180034
- this.window.width = conf.getDocumentWidth();
180035
- this.window.height = conf.getDocumentHeight();
180036
- this.window.dpi = conf.getDPI();
180038
+ this.window.width = conf2.getDocumentWidth();
180039
+ this.window.height = conf2.getDocumentHeight();
180040
+ this.window.dpi = conf2.getDPI();
180037
180041
  this.resizeSubject.publish(this);
180038
180042
  this.subject.publish(this);
180039
180043
  }
@@ -180046,10 +180050,10 @@ class Camera {
180046
180050
  let y = 0;
180047
180051
  const { activeKeys } = keyboard;
180048
180052
  const directions = {
180049
- ArrowRight: [-conf.NAVIGATION_STEP, 0],
180050
- ArrowLeft: [conf.NAVIGATION_STEP, 0],
180051
- ArrowDown: [0, -conf.NAVIGATION_STEP],
180052
- ArrowUp: [0, conf.NAVIGATION_STEP]
180053
+ ArrowRight: [-conf2.NAVIGATION_STEP, 0],
180054
+ ArrowLeft: [conf2.NAVIGATION_STEP, 0],
180055
+ ArrowDown: [0, -conf2.NAVIGATION_STEP],
180056
+ ArrowUp: [0, conf2.NAVIGATION_STEP]
180053
180057
  };
180054
180058
  const activeArrowKeys = Array.from(activeKeys).filter((key) => (key in directions)).sort();
180055
180059
  if (activeArrowKeys.length === 2) {
@@ -180582,7 +180586,7 @@ var isMacos = () => navigator.platform.toUpperCase().includes("MAC");
180582
180586
 
180583
180587
  // src/Keyboard/logHotkey.ts
180584
180588
  function logHotkey(hotkeyConfig, hotkeyName, status, context) {
180585
- if (!import.meta.env.LOG_HOTKEYS) {
180589
+ if (!conf.LOG_HOTKEYS) {
180586
180590
  return;
180587
180591
  }
180588
180592
  const isFunction = typeof hotkeyConfig === "function";
@@ -180674,7 +180678,7 @@ function checkHotkeys(hotkeyMap, event, board) {
180674
180678
  // src/Keyboard/getHotkeyLabel.ts
180675
180679
  function getHotkeyLabel(hotkey) {
180676
180680
  const hotkeyLabel = hotkeys_default[hotkey].label;
180677
- switch (import.meta.env.FORCE_HOTKEYS || "auto") {
180681
+ switch (conf2.FORCE_HOTKEYS || "auto") {
180678
180682
  case "windows":
180679
180683
  return hotkeyLabel.windows;
180680
180684
  case "macos":
@@ -182584,7 +182588,7 @@ class SpatialIndex {
182584
182588
  this.itemsArray.push(item);
182585
182589
  this.itemsIndex.insert(item);
182586
182590
  }
182587
- if (conf.isNode()) {
182591
+ if (conf2.isNode()) {
182588
182592
  return;
182589
182593
  }
182590
182594
  if (this.Mbr.getWidth() === 0 && this.Mbr.getHeight() === 0) {
@@ -183151,8 +183155,8 @@ class Tool {
183151
183155
 
183152
183156
  // src/Tools/ExportSnapshot/getDecorationResizeType.ts
183153
183157
  function getDecorationResizeType(point5, mbr, tolerance = 10) {
183154
- for (const key in conf.EXPORT_FRAME_DECORATIONS) {
183155
- const decoration = conf.EXPORT_FRAME_DECORATIONS[key];
183158
+ for (const key in conf2.EXPORT_FRAME_DECORATIONS) {
183159
+ const decoration = conf2.EXPORT_FRAME_DECORATIONS[key];
183156
183160
  const decorationBounds = {
183157
183161
  left: mbr.left + (decoration.offsetX ?? 0),
183158
183162
  top: mbr.top + (decoration.offsetY ?? 0),
@@ -183193,7 +183197,7 @@ class ExportSnapshot extends Tool {
183193
183197
  super();
183194
183198
  this.board = board;
183195
183199
  const cameraCenter = this.board.camera.getMbr().getCenter();
183196
- this.mbr = new Mbr(cameraCenter.x - conf.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y - conf.EXPORT_SELECTION_BOX_HEIGHT / 2, cameraCenter.x + conf.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y + conf.EXPORT_SELECTION_BOX_HEIGHT / 2, "transparent", "transparent", 1);
183200
+ this.mbr = new Mbr(cameraCenter.x - conf2.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y - conf2.EXPORT_SELECTION_BOX_HEIGHT / 2, cameraCenter.x + conf2.EXPORT_SELECTION_BOX_WIDTH / 2, cameraCenter.y + conf2.EXPORT_SELECTION_BOX_HEIGHT / 2, "transparent", "transparent", 1);
183197
183201
  this.board.selection.disable();
183198
183202
  this.tempDrawingContext = new DrawingContext(board.camera, this.tempCtx);
183199
183203
  }
@@ -183205,11 +183209,11 @@ class ExportSnapshot extends Tool {
183205
183209
  resize() {
183206
183210
  if (this.resizeType && this.mbr && this.oppositePoint) {
183207
183211
  const resize = getResize(this.resizeType, this.board.pointer.point, this.mbr, this.oppositePoint);
183208
- if (resize.mbr.getWidth() > conf.EXPORT_MIN_WIDTH) {
183212
+ if (resize.mbr.getWidth() > conf2.EXPORT_MIN_WIDTH) {
183209
183213
  this.mbr.left = resize.mbr.left;
183210
183214
  this.mbr.right = resize.mbr.right;
183211
183215
  }
183212
- if (resize.mbr.getHeight() > conf.EXPORT_MIN_HEIGHT) {
183216
+ if (resize.mbr.getHeight() > conf2.EXPORT_MIN_HEIGHT) {
183213
183217
  this.mbr.top = resize.mbr.top;
183214
183218
  this.mbr.bottom = resize.mbr.bottom;
183215
183219
  }
@@ -183298,7 +183302,7 @@ class ExportSnapshot extends Tool {
183298
183302
  }
183299
183303
  const res = await exportBoardSnapshot({
183300
183304
  board: this.board,
183301
- bgColor: conf.CANVAS_BG_COLOR,
183305
+ bgColor: conf2.CANVAS_BG_COLOR,
183302
183306
  selection: this.mbr,
183303
183307
  upscaleTo: 4000,
183304
183308
  nameToExport: this.board.getName()
@@ -183322,18 +183326,18 @@ class ExportSnapshot extends Tool {
183322
183326
  const cameraMbr = context.camera.getMbr();
183323
183327
  this.tempDrawingContext.setCamera(this.board.camera);
183324
183328
  this.tempDrawingContext.clear();
183325
- cameraMbr.backgroundColor = conf.EXPORT_BLUR_BACKGROUND_COLOR;
183329
+ cameraMbr.backgroundColor = conf2.EXPORT_BLUR_BACKGROUND_COLOR;
183326
183330
  cameraMbr.strokeWidth = 0;
183327
183331
  cameraMbr.render(this.tempDrawingContext);
183328
183332
  this.tempCtx.clearRect(this.mbr.left, this.mbr.top, this.mbr.getWidth(), this.mbr.getHeight());
183329
- if (conf.EXPORT_FRAME_DECORATIONS) {
183330
- const topLeft = conf.EXPORT_FRAME_DECORATIONS["top-left"];
183333
+ if (conf2.EXPORT_FRAME_DECORATIONS) {
183334
+ const topLeft = conf2.EXPORT_FRAME_DECORATIONS["top-left"];
183331
183335
  this.renderDecoration(this.tempDrawingContext, topLeft.path, this.mbr.left + (topLeft.offsetX ?? 0), this.mbr.top + (topLeft.offsetY ?? 0), topLeft.color, topLeft.lineWidth);
183332
- const topRight = conf.EXPORT_FRAME_DECORATIONS["top-right"];
183336
+ const topRight = conf2.EXPORT_FRAME_DECORATIONS["top-right"];
183333
183337
  this.renderDecoration(this.tempDrawingContext, topRight.path, this.mbr.right + (topRight.offsetX ?? 0), this.mbr.top + (topRight.offsetY ?? 0), topRight.color, topRight.lineWidth);
183334
- const bottomLeft = conf.EXPORT_FRAME_DECORATIONS["bottom-left"];
183338
+ const bottomLeft = conf2.EXPORT_FRAME_DECORATIONS["bottom-left"];
183335
183339
  this.renderDecoration(this.tempDrawingContext, bottomLeft.path, this.mbr.left + (bottomLeft.offsetX ?? 0), this.mbr.bottom + (bottomLeft.offsetY ?? 0), bottomLeft.color, bottomLeft.lineWidth);
183336
- const bottomRight = conf.EXPORT_FRAME_DECORATIONS["bottom-right"];
183340
+ const bottomRight = conf2.EXPORT_FRAME_DECORATIONS["bottom-right"];
183337
183341
  this.renderDecoration(this.tempDrawingContext, bottomRight.path, this.mbr.left + this.mbr.getWidth() - bottomRight.width, this.mbr.top + this.mbr.getHeight() - bottomRight.width, bottomRight.color, bottomRight.lineWidth);
183338
183342
  }
183339
183343
  }
@@ -183842,14 +183846,14 @@ class AddConnector extends BoardTool {
183842
183846
  class AddDrawing extends BoardTool {
183843
183847
  drawing = null;
183844
183848
  isDown = false;
183845
- strokeWidth = conf.PEN_INITIAL_STROKE_WIDTH;
183846
- strokeColor = conf.PEN_DEFAULT_COLOR;
183847
- strokeStyle = conf.PEN_STROKE_STYLE;
183849
+ strokeWidth = conf2.PEN_INITIAL_STROKE_WIDTH;
183850
+ strokeColor = conf2.PEN_DEFAULT_COLOR;
183851
+ strokeStyle = conf2.PEN_STROKE_STYLE;
183848
183852
  constructor(board) {
183849
183853
  super(board);
183850
183854
  this.setCursor();
183851
- if (conf.PEN_SETTINGS_KEY) {
183852
- const drawingSettings = localStorage.getItem(conf.PEN_SETTINGS_KEY);
183855
+ if (conf2.PEN_SETTINGS_KEY) {
183856
+ const drawingSettings = localStorage.getItem(conf2.PEN_SETTINGS_KEY);
183853
183857
  if (drawingSettings) {
183854
183858
  const { strokeWidth, strokeColor, strokeStyle } = JSON.parse(drawingSettings);
183855
183859
  this.strokeWidth = strokeWidth;
@@ -183859,7 +183863,7 @@ class AddDrawing extends BoardTool {
183859
183863
  }
183860
183864
  }
183861
183865
  updateSettings() {
183862
- localStorage.setItem(conf.PEN_SETTINGS_KEY, JSON.stringify({
183866
+ localStorage.setItem(conf2.PEN_SETTINGS_KEY, JSON.stringify({
183863
183867
  strokeWidth: this.strokeWidth,
183864
183868
  strokeColor: this.strokeColor,
183865
183869
  strokeStyle: this.strokeStyle
@@ -183889,7 +183893,7 @@ class AddDrawing extends BoardTool {
183889
183893
  ctx.beginPath();
183890
183894
  ctx.arc(point5.x, point5.y, this.strokeWidth / 2, 0, 2 * Math.PI, false);
183891
183895
  ctx.lineWidth = 1;
183892
- ctx.strokeStyle = conf.PEN_POINTER_CIRCLE_COLOR;
183896
+ ctx.strokeStyle = conf2.PEN_POINTER_CIRCLE_COLOR;
183893
183897
  ctx.stroke();
183894
183898
  }
183895
183899
  setCursor() {
@@ -183971,7 +183975,7 @@ class AddDrawing extends BoardTool {
183971
183975
  this.setCursor();
183972
183976
  };
183973
183977
  render(context) {
183974
- if (conf.PEN_RENDER_POINTER_CIRCLE) {
183978
+ if (conf2.PEN_RENDER_POINTER_CIRCLE) {
183975
183979
  this.renderPointerCircle(this.board.pointer.point, context);
183976
183980
  }
183977
183981
  if (!this.drawing) {
@@ -183986,14 +183990,14 @@ class AddDrawing extends BoardTool {
183986
183990
  }
183987
183991
  // src/Tools/AddDrawing/AddHighlighter.ts
183988
183992
  class AddHighlighter extends AddDrawing {
183989
- strokeWidth = conf.HIGHLIGHTER_INITIAL_STROKE_WIDTH;
183990
- strokeColor = conf.HIGHLIGHTER_DEFAULT_COLOR;
183991
- strokeStyle = conf.PEN_STROKE_STYLE;
183993
+ strokeWidth = conf2.HIGHLIGHTER_INITIAL_STROKE_WIDTH;
183994
+ strokeColor = conf2.HIGHLIGHTER_DEFAULT_COLOR;
183995
+ strokeStyle = conf2.PEN_STROKE_STYLE;
183992
183996
  constructor(board) {
183993
183997
  super(board);
183994
183998
  this.setCursor();
183995
- if (conf.HIGHLIGHTER_SETTINGS_KEY) {
183996
- const highlighterSettings = localStorage.getItem(conf.HIGHLIGHTER_SETTINGS_KEY);
183999
+ if (conf2.HIGHLIGHTER_SETTINGS_KEY) {
184000
+ const highlighterSettings = localStorage.getItem(conf2.HIGHLIGHTER_SETTINGS_KEY);
183997
184001
  if (highlighterSettings) {
183998
184002
  const { strokeWidth, strokeColor, strokeStyle } = JSON.parse(highlighterSettings);
183999
184003
  this.strokeWidth = strokeWidth;
@@ -184006,7 +184010,7 @@ class AddHighlighter extends AddDrawing {
184006
184010
  return true;
184007
184011
  }
184008
184012
  updateSettings() {
184009
- localStorage.setItem(conf.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
184013
+ localStorage.setItem(conf2.HIGHLIGHTER_SETTINGS_KEY, JSON.stringify({
184010
184014
  strokeWidth: this.strokeWidth,
184011
184015
  strokeColor: this.strokeColor,
184012
184016
  strokeStyle: this.strokeStyle
@@ -184330,7 +184334,7 @@ class AddShape extends BoardTool {
184330
184334
  const point5 = this.board.pointer.point;
184331
184335
  this.line = new Line(point5.copy(), point5.copy());
184332
184336
  this.bounds = this.line.getMbr();
184333
- this.bounds.borderColor = conf.SELECTION_COLOR;
184337
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
184334
184338
  this.shape.apply({
184335
184339
  class: "Shape",
184336
184340
  method: "setShapeType",
@@ -184354,7 +184358,7 @@ class AddShape extends BoardTool {
184354
184358
  }
184355
184359
  this.line = new Line(startPoint, endPoint);
184356
184360
  this.bounds = this.line.getMbr();
184357
- this.bounds.borderColor = conf.SELECTION_COLOR;
184361
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
184358
184362
  this.initTransformation();
184359
184363
  this.board.tools.publish();
184360
184364
  return true;
@@ -184426,7 +184430,7 @@ class AddShape extends BoardTool {
184426
184430
  const y = (top + bottom) / 2 - 50;
184427
184431
  this.bounds = new Mbr(x, y, x, y);
184428
184432
  this.line = new Line(new Point(x, y), new Point(x, y));
184429
- this.bounds.borderColor = conf.SELECTION_COLOR;
184433
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
184430
184434
  this.shape.apply({
184431
184435
  class: "Shape",
184432
184436
  method: "setShapeType",
@@ -184459,8 +184463,8 @@ class AddSticker extends BoardTool {
184459
184463
  this.setCursor(this.sticker.getBackgroundColor());
184460
184464
  }
184461
184465
  setCursor(color2) {
184462
- if (conf.STICKER_COLOR_NAMES) {
184463
- const colorName = color2 ? conf.STICKER_COLOR_NAMES[conf.STICKER_COLORS.indexOf(color2)] : undefined;
184466
+ if (conf2.STICKER_COLOR_NAMES) {
184467
+ const colorName = color2 ? conf2.STICKER_COLOR_NAMES[conf2.STICKER_COLORS.indexOf(color2)] : undefined;
184464
184468
  this.board.pointer.setCursor(colorName ? `sticker-${colorName}` : "crosshair");
184465
184469
  } else {
184466
184470
  this.board.pointer.setCursor("crosshair");
@@ -184484,7 +184488,7 @@ class AddSticker extends BoardTool {
184484
184488
  const point5 = this.board.pointer.point;
184485
184489
  this.line = new Line(point5.copy(), point5.copy());
184486
184490
  this.bounds = this.line.getMbr();
184487
- this.bounds.borderColor = conf.SELECTION_COLOR;
184491
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
184488
184492
  this.board.tools.publish();
184489
184493
  return true;
184490
184494
  }
@@ -184493,7 +184497,7 @@ class AddSticker extends BoardTool {
184493
184497
  this.line = new Line(this.line.start.copy(), this.board.pointer.point.copy());
184494
184498
  this.sticker.applyDiagonal(this.line);
184495
184499
  this.bounds = this.sticker.getMbr();
184496
- this.bounds.borderColor = conf.SELECTION_COLOR;
184500
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
184497
184501
  this.board.tools.publish();
184498
184502
  return true;
184499
184503
  }
@@ -184593,7 +184597,7 @@ class AddText extends BoardTool {
184593
184597
  const point5 = this.board.pointer.point;
184594
184598
  this.line = new Line(point5.copy(), point5.copy());
184595
184599
  this.bounds = this.line.getMbr();
184596
- this.bounds.borderColor = conf.SELECTION_COLOR;
184600
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
184597
184601
  this.board.tools.publish();
184598
184602
  return true;
184599
184603
  }
@@ -184604,7 +184608,7 @@ class AddText extends BoardTool {
184604
184608
  const end = new Point(cursorPoint.x, start.y + height2);
184605
184609
  this.line = new Line(start, end);
184606
184610
  this.bounds = this.line.getMbr();
184607
- this.bounds.borderColor = conf.SELECTION_COLOR;
184611
+ this.bounds.borderColor = conf2.SELECTION_COLOR;
184608
184612
  this.board.tools.publish();
184609
184613
  return true;
184610
184614
  }
@@ -184669,11 +184673,11 @@ class AddText extends BoardTool {
184669
184673
  class Eraser extends BoardTool {
184670
184674
  itemType = "Eraser";
184671
184675
  isDown = false;
184672
- strokeWidth = conf.ERASER_STROKE_WIDTH;
184673
- strokeColor = conf.ERASER_DEFAULT_COLOR;
184674
- strokeStyle = conf.PEN_STROKE_STYLE;
184676
+ strokeWidth = conf2.ERASER_STROKE_WIDTH;
184677
+ strokeColor = conf2.ERASER_DEFAULT_COLOR;
184678
+ strokeStyle = conf2.PEN_STROKE_STYLE;
184675
184679
  drawing = new Drawing(this.board, []);
184676
- maxPointsInLine = conf.ERASER_MAX_LINE_LENGTH;
184680
+ maxPointsInLine = conf2.ERASER_MAX_LINE_LENGTH;
184677
184681
  constructor(board) {
184678
184682
  super(board);
184679
184683
  this.setCursor();
@@ -184835,7 +184839,7 @@ function createCanvasDrawer(board) {
184835
184839
  borderDiv.id = "canvasBorder";
184836
184840
  borderDiv.style.position = "absolute";
184837
184841
  borderDiv.style.transformOrigin = "left top";
184838
- borderDiv.style.border = `1px solid ${conf.SELECTION_COLOR}`;
184842
+ borderDiv.style.border = `1px solid ${conf2.SELECTION_COLOR}`;
184839
184843
  borderDiv.style.boxSizing = "border-box";
184840
184844
  borderDiv.style.left = `${leftOffset}px`;
184841
184845
  borderDiv.style.top = `${topOffset}px`;
@@ -184845,7 +184849,7 @@ function createCanvasDrawer(board) {
184845
184849
  canvas.style.boxSizing = "border-box";
184846
184850
  container.appendChild(borderDiv);
184847
184851
  } else {
184848
- canvas.style.border = `1px solid ${conf.SELECTION_COLOR}`;
184852
+ canvas.style.border = `1px solid ${conf2.SELECTION_COLOR}`;
184849
184853
  canvas.style.boxSizing = "border-box";
184850
184854
  }
184851
184855
  const createAnchorDiv = (left, top, radius) => {
@@ -184853,8 +184857,8 @@ function createCanvasDrawer(board) {
184853
184857
  anchorDiv.style.position = "absolute";
184854
184858
  anchorDiv.style.width = `${2 * radius}px`;
184855
184859
  anchorDiv.style.height = `${2 * radius}px`;
184856
- anchorDiv.style.backgroundColor = `${conf.SELECTION_ANCHOR_COLOR}`;
184857
- anchorDiv.style.border = `${conf.SELECTION_ANCHOR_WIDTH}px solid ${conf.SELECTION_COLOR}`;
184860
+ anchorDiv.style.backgroundColor = `${conf2.SELECTION_ANCHOR_COLOR}`;
184861
+ anchorDiv.style.border = `${conf2.SELECTION_ANCHOR_WIDTH}px solid ${conf2.SELECTION_COLOR}`;
184858
184862
  anchorDiv.style.borderRadius = "2px";
184859
184863
  anchorDiv.style.left = `calc(${left} - ${radius}px)`;
184860
184864
  anchorDiv.style.top = `calc(${top} - ${radius}px)`;
@@ -184862,10 +184866,10 @@ function createCanvasDrawer(board) {
184862
184866
  return anchorDiv;
184863
184867
  };
184864
184868
  const anchors = [
184865
- createAnchorDiv("0%", "0%", conf.SELECTION_ANCHOR_RADIUS),
184866
- createAnchorDiv("100% + 1px", "0%", conf.SELECTION_ANCHOR_RADIUS),
184867
- createAnchorDiv("0%", "100% + 1px", conf.SELECTION_ANCHOR_RADIUS),
184868
- createAnchorDiv("100% + 1px", "100% + 1px", conf.SELECTION_ANCHOR_RADIUS)
184869
+ createAnchorDiv("0%", "0%", conf2.SELECTION_ANCHOR_RADIUS),
184870
+ createAnchorDiv("100% + 1px", "0%", conf2.SELECTION_ANCHOR_RADIUS),
184871
+ createAnchorDiv("0%", "100% + 1px", conf2.SELECTION_ANCHOR_RADIUS),
184872
+ createAnchorDiv("100% + 1px", "100% + 1px", conf2.SELECTION_ANCHOR_RADIUS)
184869
184873
  ];
184870
184874
  const canvasBorder = Array.from(container.children).find((child) => child.id === "canvasBorder");
184871
184875
  for (const anchor of anchors) {
@@ -186207,8 +186211,8 @@ class Select extends Tool {
186207
186211
  const { x, y } = pointer.point;
186208
186212
  this.line = new Line(new Point(x, y), new Point(x, y));
186209
186213
  this.rect = this.line.getMbr();
186210
- this.rect.borderColor = conf.SELECTION_COLOR;
186211
- this.rect.backgroundColor = conf.SELECTION_BACKGROUND;
186214
+ this.rect.borderColor = conf2.SELECTION_COLOR;
186215
+ this.rect.backgroundColor = conf2.SELECTION_BACKGROUND;
186212
186216
  this.board.tools.publish();
186213
186217
  this.board.presence.throttledEmit({
186214
186218
  method: "DrawSelect",
@@ -186293,8 +186297,8 @@ class Select extends Tool {
186293
186297
  const point5 = this.board.pointer.point.copy();
186294
186298
  this.line = new Line(this.line.start, point5);
186295
186299
  this.rect = this.line.getMbr();
186296
- this.rect.borderColor = conf.SELECTION_COLOR;
186297
- this.rect.backgroundColor = conf.SELECTION_BACKGROUND;
186300
+ this.rect.borderColor = conf2.SELECTION_COLOR;
186301
+ this.rect.backgroundColor = conf2.SELECTION_BACKGROUND;
186298
186302
  this.board.tools.publish();
186299
186303
  this.board.presence.throttledEmit({
186300
186304
  method: "DrawSelect",
@@ -187428,7 +187432,7 @@ class Board {
187428
187432
  const loadLinksImagesScript = LOAD_LINKS_IMAGES_JS;
187429
187433
  const css = INDEX_CSS;
187430
187434
  const boardName = this.getName() || this.getBoardId();
187431
- const items = this.items.getWholeHTML(conf.documentFactory);
187435
+ const items = this.items.getWholeHTML(conf2.documentFactory);
187432
187436
  const itemsDiv = `<div id="items">${items}</div>`;
187433
187437
  const scripts = `
187434
187438
  <script type="module">${customTagsScript}</script>
@@ -187468,7 +187472,7 @@ class Board {
187468
187472
  return `${head}${body}`;
187469
187473
  }
187470
187474
  deserializeHTMLAndEmit(stringedHTML) {
187471
- const parser = conf.getDOMParser();
187475
+ const parser = conf2.getDOMParser();
187472
187476
  const doc = parser.parseFromString(stringedHTML, "text/html");
187473
187477
  const items = doc.body.querySelector("#items");
187474
187478
  if (items) {
@@ -187520,7 +187524,7 @@ class Board {
187520
187524
  return [];
187521
187525
  }
187522
187526
  deserializeHTML(stringedHTML) {
187523
- const parser = conf.getDOMParser();
187527
+ const parser = conf2.getDOMParser();
187524
187528
  const doc = parser.parseFromString(stringedHTML, "text/html");
187525
187529
  const itemsDiv = doc.body.querySelector("#items");
187526
187530
  if (!itemsDiv) {
@@ -188082,7 +188086,7 @@ class RichTextCommand {
188082
188086
  item: id,
188083
188087
  operation: {
188084
188088
  ...this.operation,
188085
- fontColor: this.board.items.getById(id)?.getRichText()?.getFontColor() || conf.DEFAULT_TEXT_STYLES.fontColor
188089
+ fontColor: this.board.items.getById(id)?.getRichText()?.getFontColor() || conf2.DEFAULT_TEXT_STYLES.fontColor
188086
188090
  }
188087
188091
  }));
188088
188092
  case "setBlockType":
@@ -188106,7 +188110,7 @@ class RichTextCommand {
188106
188110
  item: id,
188107
188111
  operation: {
188108
188112
  ...this.operation,
188109
- fontFamily: this.board.items.getById(id)?.getRichText()?.getFontFamily() || conf.DEFAULT_TEXT_STYLES.fontFamily
188113
+ fontFamily: this.board.items.getById(id)?.getRichText()?.getFontFamily() || conf2.DEFAULT_TEXT_STYLES.fontFamily
188110
188114
  }
188111
188115
  }));
188112
188116
  case "setFontSize":
@@ -188114,7 +188118,7 @@ class RichTextCommand {
188114
188118
  item: id,
188115
188119
  operation: {
188116
188120
  ...this.operation,
188117
- fontSize: this.board.items.getById(id)?.getRichText()?.getFontSize() || conf.DEFAULT_TEXT_STYLES.fontSize
188121
+ fontSize: this.board.items.getById(id)?.getRichText()?.getFontSize() || conf2.DEFAULT_TEXT_STYLES.fontSize
188118
188122
  }
188119
188123
  }));
188120
188124
  case "setFontHighlight":
@@ -188122,7 +188126,7 @@ class RichTextCommand {
188122
188126
  item: id,
188123
188127
  operation: {
188124
188128
  ...this.operation,
188125
- fontHighlight: this.board.items.getById(id)?.getRichText()?.getFontHighlight() || conf.DEFAULT_TEXT_STYLES.fontHighlight
188129
+ fontHighlight: this.board.items.getById(id)?.getRichText()?.getFontHighlight() || conf2.DEFAULT_TEXT_STYLES.fontHighlight
188126
188130
  }
188127
188131
  }));
188128
188132
  case "setHorisontalAlignment":
@@ -189463,7 +189467,7 @@ class Transformer extends Tool {
189463
189467
  const isLockedItems = this.selection.getIsLockedSelection();
189464
189468
  if (mbr) {
189465
189469
  mbr.strokeWidth = 1 / context.matrix.scaleX;
189466
- const selectionColor = isLockedItems ? conf.SELECTION_LOCKED_COLOR : conf.SELECTION_COLOR;
189470
+ const selectionColor = isLockedItems ? conf2.SELECTION_LOCKED_COLOR : conf2.SELECTION_COLOR;
189467
189471
  mbr.borderColor = selectionColor;
189468
189472
  mbr.render(context);
189469
189473
  }
@@ -189489,7 +189493,7 @@ class Transformer extends Tool {
189489
189493
  new Point(right, bottom)
189490
189494
  ];
189491
189495
  for (const point5 of points) {
189492
- const circle = new Anchor(point5.x, point5.y, conf.SELECTION_ANCHOR_RADIUS, conf.SELECTION_COLOR, conf.SELECTION_ANCHOR_COLOR, conf.SELECTION_ANCHOR_WIDTH);
189496
+ const circle = new Anchor(point5.x, point5.y, conf2.SELECTION_ANCHOR_RADIUS, conf2.SELECTION_COLOR, conf2.SELECTION_ANCHOR_COLOR, conf2.SELECTION_ANCHOR_WIDTH);
189493
189497
  anchors.push(circle);
189494
189498
  }
189495
189499
  }
@@ -190693,7 +190697,7 @@ class Selection2 {
190693
190697
  renderItemMbr(context, item, customScale) {
190694
190698
  const mbr = item.getMbr();
190695
190699
  mbr.strokeWidth = !customScale ? 1 / context.matrix.scaleX : 1 / customScale;
190696
- const selectionColor = item.transformation.isLocked ? conf.SELECTION_LOCKED_COLOR : conf.SELECTION_COLOR;
190700
+ const selectionColor = item.transformation.isLocked ? conf2.SELECTION_LOCKED_COLOR : conf2.SELECTION_COLOR;
190697
190701
  mbr.borderColor = selectionColor;
190698
190702
  mbr.render(context);
190699
190703
  }
@@ -191561,19 +191565,19 @@ function removeNode_removeNode(confirmed, toTransform) {
191561
191565
  var import_slate45 = __toESM(require_dist(), 1);
191562
191566
  function splitNode_insertNode(confirmed, toTransform) {
191563
191567
  const transformed = { ...toTransform };
191564
- const conf2 = confirmed.path;
191568
+ const conf3 = confirmed.path;
191565
191569
  const path = transformed.path;
191566
- if (import_slate45.Path.equals(conf2, path)) {
191570
+ if (import_slate45.Path.equals(conf3, path)) {
191567
191571
  return transformed;
191568
191572
  }
191569
- const isDescendant = path.length > conf2.length && path.slice(0, conf2.length).every((seg, i) => seg === conf2[i]);
191573
+ const isDescendant = path.length > conf3.length && path.slice(0, conf3.length).every((seg, i) => seg === conf3[i]);
191570
191574
  if (isDescendant) {
191571
191575
  const newPath = [...path];
191572
191576
  newPath[0] = newPath[0] + 1;
191573
191577
  transformed.path = newPath;
191574
191578
  return transformed;
191575
191579
  }
191576
- if (import_slate45.Path.isBefore(conf2, path)) {
191580
+ if (import_slate45.Path.isBefore(conf3, path)) {
191577
191581
  transformPath(confirmed, transformed);
191578
191582
  }
191579
191583
  return transformed;
@@ -191583,23 +191587,23 @@ function splitNode_insertNode(confirmed, toTransform) {
191583
191587
  var import_slate46 = __toESM(require_dist(), 1);
191584
191588
  function splitNode_removeNode(confirmed, toTransform) {
191585
191589
  const transformed = { ...toTransform };
191586
- const conf2 = confirmed.path;
191590
+ const conf3 = confirmed.path;
191587
191591
  const path = transformed.path;
191588
- if (import_slate46.Path.equals(conf2, path)) {
191592
+ if (import_slate46.Path.equals(conf3, path)) {
191589
191593
  return transformed;
191590
191594
  }
191591
- if (path.length === conf2.length + 1 && path.slice(0, conf2.length).every((seg, i) => seg === conf2[i])) {
191595
+ if (path.length === conf3.length + 1 && path.slice(0, conf3.length).every((seg, i) => seg === conf3[i])) {
191592
191596
  const newPath = [...path];
191593
- if (conf2.length === 1) {
191597
+ if (conf3.length === 1) {
191594
191598
  newPath[0] = newPath[0] + 1;
191595
191599
  } else {
191596
- newPath[conf2.length] = newPath[conf2.length] + 1;
191600
+ newPath[conf3.length] = newPath[conf3.length] + 1;
191597
191601
  }
191598
191602
  transformed.path = newPath;
191599
191603
  return transformed;
191600
191604
  }
191601
- const isDescendant = path.length > conf2.length && path.slice(0, conf2.length).every((seg, i) => seg === conf2[i]);
191602
- if (import_slate46.Path.isBefore(conf2, path) && !isDescendant) {
191605
+ const isDescendant = path.length > conf3.length && path.slice(0, conf3.length).every((seg, i) => seg === conf3[i]);
191606
+ if (import_slate46.Path.isBefore(conf3, path) && !isDescendant) {
191603
191607
  transformPath(confirmed, transformed);
191604
191608
  }
191605
191609
  return transformed;
@@ -192192,8 +192196,8 @@ function transformEvents(confirmed, toTransform) {
192192
192196
  const transformed = [];
192193
192197
  for (const transf of toTransform) {
192194
192198
  let actualyTransformed = { ...transf };
192195
- for (const conf2 of confirmed) {
192196
- const { operation: confOp } = conf2.body;
192199
+ for (const conf3 of confirmed) {
192200
+ const { operation: confOp } = conf3.body;
192197
192201
  const { operation: transfOp } = actualyTransformed.body;
192198
192202
  const transformedOp = transfromOperation(confOp, transfOp);
192199
192203
  if (transformedOp) {
@@ -192825,7 +192829,7 @@ class Events2 {
192825
192829
  return record !== null;
192826
192830
  }
192827
192831
  sendPresenceEvent(event) {
192828
- conf.connection.publishPresenceEvent(this.board.getBoardId(), event);
192832
+ conf2.connection.publishPresenceEvent(this.board.getBoardId(), event);
192829
192833
  }
192830
192834
  canUndoEvent(op, byUserId) {
192831
192835
  if (op.method === "undo") {
@@ -192934,7 +192938,7 @@ function handleChatChunk(chunk, board) {
192934
192938
  if (chunk.isExternalApiError) {
192935
192939
  const editor = item2.getRichText().editor;
192936
192940
  editor.clearText();
192937
- editor.insertCopiedText(conf.i18n.t("AIInput.nodeErrorText"));
192941
+ editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
192938
192942
  }
192939
192943
  }
192940
192944
  board.camera.zoomToFit(item2.getMbr(), 20);
@@ -192942,9 +192946,9 @@ function handleChatChunk(chunk, board) {
192942
192946
  }
192943
192947
  console.log("Error AI generate", chunk.error);
192944
192948
  if (!chunk.isExternalApiError) {
192945
- conf.notify({
192946
- header: conf.i18n.t("AIInput.textGenerationError.header"),
192947
- body: conf.i18n.t("AIInput.textGenerationError.body"),
192949
+ conf2.notify({
192950
+ header: conf2.i18n.t("AIInput.textGenerationError.header"),
192951
+ body: conf2.i18n.t("AIInput.textGenerationError.body"),
192948
192952
  variant: "error",
192949
192953
  duration: 4000
192950
192954
  });
@@ -192954,9 +192958,9 @@ function handleChatChunk(chunk, board) {
192954
192958
  default:
192955
192959
  board.camera.unsubscribeFromItem();
192956
192960
  if (!chunk.isExternalApiError) {
192957
- conf.notify({
192958
- header: conf.i18n.t("AIInput.textGenerationError.header"),
192959
- body: conf.i18n.t("AIInput.textGenerationError.body"),
192961
+ conf2.notify({
192962
+ header: conf2.i18n.t("AIInput.textGenerationError.header"),
192963
+ body: conf2.i18n.t("AIInput.textGenerationError.body"),
192960
192964
  variant: "error",
192961
192965
  duration: 4000
192962
192966
  });
@@ -192971,7 +192975,7 @@ function handleChatChunk(chunk, board) {
192971
192975
  if (chunk.isExternalApiError) {
192972
192976
  const editor = item2.getRichText().editor;
192973
192977
  editor.clearText();
192974
- editor.insertCopiedText(conf.i18n.t("AIInput.nodeErrorText"));
192978
+ editor.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
192975
192979
  }
192976
192980
  }
192977
192981
  board.camera.zoomToFit(item2.getMbr(), 20);
@@ -192998,7 +193002,7 @@ function handleAudioGenerate(response, board) {
192998
193002
  }
192999
193003
  const audio = new AudioItem(board, true, audioUrl2, board.events, "", "wav");
193000
193004
  const { left, top, right } = placeholderNode.getMbr();
193001
- audio.transformation.applyTranslateTo(left + (right - left - conf.AUDIO_DIMENSIONS.width) / 2, top);
193005
+ audio.transformation.applyTranslateTo(left + (right - left - conf2.AUDIO_DIMENSIONS.width) / 2, top);
193002
193006
  audio.updateMbr();
193003
193007
  const threadDirection = placeholderNode.getThreadDirection();
193004
193008
  board.remove(placeholderNode, false);
@@ -193020,7 +193024,7 @@ function handleAudioGenerate(response, board) {
193020
193024
  type: "audio/wav"
193021
193025
  });
193022
193026
  const audioUrl2 = URL.createObjectURL(audioBlob);
193023
- const linkElem = conf.documentFactory.createElement("a");
193027
+ const linkElem = conf2.documentFactory.createElement("a");
193024
193028
  linkElem.href = audioUrl2;
193025
193029
  linkElem.setAttribute("download", `${board.getBoardId()}-generated.wav`);
193026
193030
  linkElem.click();
@@ -193039,9 +193043,9 @@ function handleAudioGenerate(response, board) {
193039
193043
  board.selection.add(placeholderNode);
193040
193044
  }
193041
193045
  console.error("Audio generation error:", response.message);
193042
- conf.notify({
193043
- header: conf.i18n.t("AIInput.audioGenerationError.header"),
193044
- body: conf.i18n.t("AIInput.audioGenerationError.body"),
193046
+ conf2.notify({
193047
+ header: conf2.i18n.t("AIInput.audioGenerationError.header"),
193048
+ body: conf2.i18n.t("AIInput.audioGenerationError.body"),
193045
193049
  variant: "error",
193046
193050
  duration: 4000
193047
193051
  });
@@ -193104,14 +193108,14 @@ function handleImageGenerate(response, board) {
193104
193108
  board.selection.add(item);
193105
193109
  const editor = item.getRichText()?.editor;
193106
193110
  editor?.clearText();
193107
- editor?.insertCopiedText(conf.i18n.t("AIInput.nodeErrorText"));
193111
+ editor?.insertCopiedText(conf2.i18n.t("AIInput.nodeErrorText"));
193108
193112
  board.camera.zoomToFit(item.getMbr(), 20);
193109
193113
  }
193110
193114
  }
193111
193115
  } else {
193112
- conf.notify({
193113
- header: conf.i18n.t("AIInput.imageGenerationError.header"),
193114
- body: conf.i18n.t("AIInput.imageGenerationError.body"),
193116
+ conf2.notify({
193117
+ header: conf2.i18n.t("AIInput.imageGenerationError.header"),
193118
+ body: conf2.i18n.t("AIInput.imageGenerationError.body"),
193115
193119
  variant: "error",
193116
193120
  duration: 4000
193117
193121
  });
@@ -193178,10 +193182,10 @@ function startIntervals(board) {
193178
193182
  }
193179
193183
  log.publishIntervalTimer = setInterval(() => {
193180
193184
  tryPublishEvent(board);
193181
- }, conf.EVENTS_PUBLISH_INTERVAL);
193185
+ }, conf2.EVENTS_PUBLISH_INTERVAL);
193182
193186
  log.resendIntervalTimer = setInterval(() => {
193183
193187
  tryResendEvent(board);
193184
- }, conf.EVENTS_RESEND_INTERVAL);
193188
+ }, conf2.EVENTS_RESEND_INTERVAL);
193185
193189
  }
193186
193190
  function tryPublishEvent(board) {
193187
193191
  const { log } = board.events;
@@ -193200,14 +193204,14 @@ function tryResendEvent(board) {
193200
193204
  return;
193201
193205
  }
193202
193206
  const date = Date.now();
193203
- const isTimeToSendPendingEvent = date - log.pendingEvent.lastSentTime >= conf.EVENTS_RESEND_INTERVAL;
193207
+ const isTimeToSendPendingEvent = date - log.pendingEvent.lastSentTime >= conf2.EVENTS_RESEND_INTERVAL;
193204
193208
  if (!isTimeToSendPendingEvent) {
193205
193209
  return;
193206
193210
  }
193207
- const isProbablyLostConnection = log.firstSentTime && date - log.firstSentTime >= conf.EVENTS_RESEND_INTERVAL * 5;
193211
+ const isProbablyLostConnection = log.firstSentTime && date - log.firstSentTime >= conf2.EVENTS_RESEND_INTERVAL * 5;
193208
193212
  if (isProbablyLostConnection) {
193209
193213
  board.presence.clear();
193210
- conf.connection?.notifyAboutLostConnection();
193214
+ conf2.connection?.notifyAboutLostConnection();
193211
193215
  }
193212
193216
  sendBoardEvent(board, log.pendingEvent.event, log.currentSequenceNumber);
193213
193217
  }
@@ -193238,12 +193242,12 @@ function sendBoardEvent(board, event, sequenceNumber) {
193238
193242
  lastKnownOrder: log.getLastIndex()
193239
193243
  }
193240
193244
  };
193241
- conf.connection.send({
193245
+ conf2.connection.send({
193242
193246
  type: "BoardEvent",
193243
193247
  boardId: board.getBoardId(),
193244
193248
  event: toSend,
193245
193249
  sequenceNumber,
193246
- userId: conf.connection.getCurrentUser()
193250
+ userId: conf2.connection.getCurrentUser()
193247
193251
  });
193248
193252
  const date = Date.now();
193249
193253
  log.pendingEvent = {
@@ -193289,7 +193293,7 @@ function handleConfirmation(msg, board) {
193289
193293
  if (!isPendingEventConfirmation) {
193290
193294
  return;
193291
193295
  }
193292
- conf.connection?.dismissNotificationAboutLostConnection();
193296
+ conf2.connection?.dismissNotificationAboutLostConnection();
193293
193297
  log.currentSequenceNumber++;
193294
193298
  log.pendingEvent.event.order = msg.order;
193295
193299
  log.confirmSentLocalEvent(log.pendingEvent.event);
@@ -193301,7 +193305,7 @@ function handleConfirmation(msg, board) {
193301
193305
  // src/Events/MessageRouter/handleCreateSnapshotRequestMessage.ts
193302
193306
  function handleCreateSnapshotRequestMessage(msg, board) {
193303
193307
  const { boardId, snapshot, lastOrder } = getSnapshotToPublish(board);
193304
- conf.connection.send({
193308
+ conf2.connection.send({
193305
193309
  type: "BoardSnapshot",
193306
193310
  boardId,
193307
193311
  snapshot,
@@ -193332,9 +193336,9 @@ function handleModeMessage(message, board) {
193332
193336
  if (isTemplateView()) {
193333
193337
  return;
193334
193338
  }
193335
- conf.notify({
193336
- header: conf.i18n.t("sharing.settingsChanged.heading"),
193337
- body: message.mode === "edit" ? conf.i18n.t("sharing.settingsChanged.bodyEdit") : conf.i18n.t("sharing.settingsChanged.bodyView"),
193339
+ conf2.notify({
193340
+ header: conf2.i18n.t("sharing.settingsChanged.heading"),
193341
+ body: message.mode === "edit" ? conf2.i18n.t("sharing.settingsChanged.bodyEdit") : conf2.i18n.t("sharing.settingsChanged.bodyView"),
193338
193342
  duration: 5000
193339
193343
  });
193340
193344
  }
@@ -193452,7 +193456,7 @@ class NodePath2D extends Path2DFactory {
193452
193456
 
193453
193457
  // src/api/initPaths.ts
193454
193458
  function initPaths(path2D) {
193455
- conf.EXPORT_FRAME_DECORATIONS = {
193459
+ conf2.EXPORT_FRAME_DECORATIONS = {
193456
193460
  "top-left": {
193457
193461
  path: new path2D("M13 1H1V13"),
193458
193462
  lineWidth: 2,
@@ -193495,7 +193499,7 @@ function initPaths(path2D) {
193495
193499
  // src/api/getMeasureCtx.ts
193496
193500
  function getMeasureCtx() {
193497
193501
  if (typeof document !== "undefined") {
193498
- const measureCanvas = conf.documentFactory.createElement("canvas");
193502
+ const measureCanvas = conf2.documentFactory.createElement("canvas");
193499
193503
  const measureCtx = measureCanvas.getContext("2d");
193500
193504
  if (!measureCtx) {
193501
193505
  throw new Error("Failde to create canvas and get 2d context");
@@ -193513,12 +193517,12 @@ function getMeasureCtx() {
193513
193517
  var import_css = __toESM(require_css_escape(), 1);
193514
193518
  function initNodeSettings() {
193515
193519
  const documentFactory = new NodeDocumentFactory;
193516
- conf.documentFactory = documentFactory;
193517
- conf.path2DFactory = NodePath2D;
193518
- conf.measureCtx = getMeasureCtx();
193519
- conf.getDOMParser = getNodeDOMParser;
193520
+ conf2.documentFactory = documentFactory;
193521
+ conf2.path2DFactory = NodePath2D;
193522
+ conf2.measureCtx = getMeasureCtx();
193523
+ conf2.getDOMParser = getNodeDOMParser;
193520
193524
  initPaths(NodePath2D);
193521
- return conf;
193525
+ return conf2;
193522
193526
  }
193523
193527
 
193524
193528
  // src/node.ts
@@ -193581,7 +193585,7 @@ export {
193581
193585
  defaultCursors as cursors,
193582
193586
  createVideoItem,
193583
193587
  createEvents,
193584
- conf,
193588
+ conf2 as conf,
193585
193589
  checkHotkeys,
193586
193590
  catmullRomInterpolate,
193587
193591
  catchErrorResponse,