@symbo.ls/scratch 2.11.429 → 2.11.430

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.
@@ -182,9 +182,11 @@ var BREAKPOINTS = {
182
182
  mobileXS: 375
183
183
  };
184
184
  var DEVICES = {
185
+ screenXXL: [2560, 1440],
186
+ screenXL: [2240, 1260],
185
187
  screenL: [1920, 1024],
186
188
  screenM: [1680, 1024],
187
- screenS: [1440, 978],
189
+ screenS: [1440, 720],
188
190
  tabletL: [1366, 926],
189
191
  tabletM: [1280, 768],
190
192
  tabletS: [1024, 768],
@@ -37,9 +37,11 @@ var BREAKPOINTS = {
37
37
  mobileXS: 375
38
38
  };
39
39
  var DEVICES = {
40
+ screenXXL: [2560, 1440],
41
+ screenXL: [2240, 1260],
40
42
  screenL: [1920, 1024],
41
43
  screenM: [1680, 1024],
42
- screenS: [1440, 978],
44
+ screenS: [1440, 720],
43
45
  tabletL: [1366, 926],
44
46
  tabletM: [1280, 768],
45
47
  tabletS: [1024, 768],
@@ -130,7 +130,7 @@ var require_globals = __commonJS({
130
130
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
131
131
  var globals_exports = {};
132
132
  __export2(globals_exports, {
133
- document: () => document,
133
+ document: () => document2,
134
134
  global: () => global,
135
135
  self: () => self,
136
136
  window: () => window
@@ -139,7 +139,7 @@ var require_globals = __commonJS({
139
139
  var global = globalThis;
140
140
  var self = globalThis;
141
141
  var window = globalThis;
142
- var document = window.document;
142
+ var document2 = window.document;
143
143
  }
144
144
  });
145
145
 
@@ -166,6 +166,7 @@ var require_node = __commonJS({
166
166
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
167
167
  var node_exports = {};
168
168
  __export2(node_exports, {
169
+ isDOMNode: () => isDOMNode,
169
170
  isHtmlElement: () => isHtmlElement,
170
171
  isNode: () => isNode
171
172
  });
@@ -177,6 +178,9 @@ var require_node = __commonJS({
177
178
  var isHtmlElement = (obj) => {
178
179
  return (typeof HTMLElement === "object" ? obj instanceof import_globals.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
179
180
  };
181
+ var isDOMNode = (obj) => {
182
+ return typeof import_globals.window !== "undefined" && (obj instanceof import_globals.window.Node || obj instanceof import_globals.window.Window || obj === import_globals.window || obj === document);
183
+ };
180
184
  }
181
185
  });
182
186
 
@@ -639,6 +643,7 @@ var require_object = __commonJS({
639
643
  var import_types = require_types();
640
644
  var import_array = require_array();
641
645
  var import_string = require_string();
646
+ var import_node = require_node();
642
647
  var exec = (param, element, state, context) => {
643
648
  if ((0, import_types.isFunction)(param)) {
644
649
  return param(
@@ -717,27 +722,28 @@ var require_object = __commonJS({
717
722
  var mergeArrayExclude = (arr, excl = []) => {
718
723
  return arr.reduce((acc, curr) => deepMerge2(acc, deepCloneExclude(curr, excl)), {});
719
724
  };
720
- var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
721
- const o = (0, import_types.isArray)(obj) ? [] : {};
722
- for (const prop in obj) {
723
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
724
- continue;
725
- if (prop === "__proto__")
726
- continue;
727
- if (excludeFrom.includes(prop) || prop.startsWith("__"))
728
- continue;
729
- let objProp = obj[prop];
730
- if (cleanUndefined && (0, import_types.isUndefined)(objProp))
731
- continue;
732
- if (prop === "extend" && (0, import_types.isArray)(objProp)) {
733
- objProp = (0, import_array.mergeArray)(objProp);
725
+ var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
726
+ if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
727
+ return obj;
728
+ if (visited.has(obj))
729
+ return visited.get(obj);
730
+ const clone2 = (0, import_types.isArray)(obj) ? [] : {};
731
+ visited.set(obj, clone2);
732
+ for (const key in obj) {
733
+ if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
734
+ const value = obj[key];
735
+ if ((0, import_node.isDOMNode)(value)) {
736
+ clone2[key] = value;
737
+ } else if (key === "extend" && (0, import_types.isArray)(value)) {
738
+ clone2[key] = (0, import_array.mergeArray)(value, exclude);
739
+ } else if ((0, import_types.isObjectLike)(value)) {
740
+ clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
741
+ } else {
742
+ clone2[key] = value;
743
+ }
734
744
  }
735
- if ((0, import_types.isObjectLike)(objProp)) {
736
- o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
737
- } else
738
- o[prop] = objProp;
739
745
  }
740
- return o;
746
+ return clone2;
741
747
  };
742
748
  var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
743
749
  const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
@@ -1048,30 +1054,40 @@ var require_object = __commonJS({
1048
1054
  }
1049
1055
  return true;
1050
1056
  };
1051
- var deepContains = (obj1, obj2) => {
1052
- if (typeof obj1 !== typeof obj2) {
1057
+ var deepContains = (obj1, obj2, ignoredKeys = ["node", "__ref"]) => {
1058
+ if (obj1 === obj2)
1059
+ return true;
1060
+ if (!(0, import_types.isObjectLike)(obj1) || !(0, import_types.isObjectLike)(obj2))
1053
1061
  return false;
1054
- }
1055
- if ((0, import_types.isObjectLike)(obj1)) {
1056
- if (Array.isArray(obj1) && Array.isArray(obj2)) {
1057
- if (obj1.length !== obj2.length) {
1062
+ if ((0, import_node.isDOMNode)(obj1) || (0, import_node.isDOMNode)(obj2))
1063
+ return obj1 === obj2;
1064
+ const stack = [[obj1, obj2]];
1065
+ const visited = /* @__PURE__ */ new WeakSet();
1066
+ while (stack.length > 0) {
1067
+ const [current1, current2] = stack.pop();
1068
+ if (visited.has(current1))
1069
+ continue;
1070
+ visited.add(current1);
1071
+ const keys1 = Object.keys(current1).filter((key) => !ignoredKeys.includes(key));
1072
+ const keys2 = Object.keys(current2).filter((key) => !ignoredKeys.includes(key));
1073
+ if (keys1.length !== keys2.length)
1074
+ return false;
1075
+ for (const key of keys1) {
1076
+ if (!Object.prototype.hasOwnProperty.call(current2, key))
1058
1077
  return false;
1059
- }
1060
- for (let i = 0; i < obj1.length; i++) {
1061
- if (!deepContains(obj1[i], obj2[i])) {
1062
- return false;
1063
- }
1064
- }
1065
- } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
1066
- for (const key in obj1) {
1067
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
1068
- if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
1078
+ const value1 = current1[key];
1079
+ const value2 = current2[key];
1080
+ if ((0, import_node.isDOMNode)(value1) || (0, import_node.isDOMNode)(value2)) {
1081
+ if (value1 !== value2)
1069
1082
  return false;
1083
+ } else if ((0, import_types.isObjectLike)(value1) && (0, import_types.isObjectLike)(value2)) {
1084
+ if (value1 !== value2) {
1085
+ stack.push([value1, value2]);
1070
1086
  }
1087
+ } else if (value1 !== value2) {
1088
+ return false;
1071
1089
  }
1072
1090
  }
1073
- } else {
1074
- return obj2 === obj1;
1075
1091
  }
1076
1092
  return true;
1077
1093
  };
@@ -1703,9 +1719,11 @@ var BREAKPOINTS = {
1703
1719
  mobileXS: 375
1704
1720
  };
1705
1721
  var DEVICES = {
1722
+ screenXXL: [2560, 1440],
1723
+ screenXL: [2240, 1260],
1706
1724
  screenL: [1920, 1024],
1707
1725
  screenM: [1680, 1024],
1708
- screenS: [1440, 978],
1726
+ screenS: [1440, 720],
1709
1727
  tabletL: [1366, 926],
1710
1728
  tabletM: [1280, 768],
1711
1729
  tabletS: [1024, 768],
package/dist/cjs/index.js CHANGED
@@ -202,6 +202,7 @@ var require_node = __commonJS({
202
202
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
203
203
  var node_exports = {};
204
204
  __export2(node_exports, {
205
+ isDOMNode: () => isDOMNode,
205
206
  isHtmlElement: () => isHtmlElement,
206
207
  isNode: () => isNode
207
208
  });
@@ -213,6 +214,9 @@ var require_node = __commonJS({
213
214
  var isHtmlElement = (obj) => {
214
215
  return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
215
216
  };
217
+ var isDOMNode = (obj) => {
218
+ return typeof import_globals3.window !== "undefined" && (obj instanceof import_globals3.window.Node || obj instanceof import_globals3.window.Window || obj === import_globals3.window || obj === document);
219
+ };
216
220
  }
217
221
  });
218
222
 
@@ -675,6 +679,7 @@ var require_object = __commonJS({
675
679
  var import_types = require_types();
676
680
  var import_array = require_array();
677
681
  var import_string = require_string();
682
+ var import_node = require_node();
678
683
  var exec = (param, element, state, context) => {
679
684
  if ((0, import_types.isFunction)(param)) {
680
685
  return param(
@@ -753,27 +758,28 @@ var require_object = __commonJS({
753
758
  var mergeArrayExclude = (arr, excl = []) => {
754
759
  return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
755
760
  };
756
- var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
757
- const o = (0, import_types.isArray)(obj) ? [] : {};
758
- for (const prop in obj) {
759
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
760
- continue;
761
- if (prop === "__proto__")
762
- continue;
763
- if (excludeFrom.includes(prop) || prop.startsWith("__"))
764
- continue;
765
- let objProp = obj[prop];
766
- if (cleanUndefined && (0, import_types.isUndefined)(objProp))
767
- continue;
768
- if (prop === "extend" && (0, import_types.isArray)(objProp)) {
769
- objProp = (0, import_array.mergeArray)(objProp);
761
+ var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
762
+ if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
763
+ return obj;
764
+ if (visited.has(obj))
765
+ return visited.get(obj);
766
+ const clone2 = (0, import_types.isArray)(obj) ? [] : {};
767
+ visited.set(obj, clone2);
768
+ for (const key in obj) {
769
+ if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
770
+ const value = obj[key];
771
+ if ((0, import_node.isDOMNode)(value)) {
772
+ clone2[key] = value;
773
+ } else if (key === "extend" && (0, import_types.isArray)(value)) {
774
+ clone2[key] = (0, import_array.mergeArray)(value, exclude);
775
+ } else if ((0, import_types.isObjectLike)(value)) {
776
+ clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
777
+ } else {
778
+ clone2[key] = value;
779
+ }
770
780
  }
771
- if ((0, import_types.isObjectLike)(objProp)) {
772
- o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
773
- } else
774
- o[prop] = objProp;
775
781
  }
776
- return o;
782
+ return clone2;
777
783
  };
778
784
  var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
779
785
  const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
@@ -1084,30 +1090,40 @@ var require_object = __commonJS({
1084
1090
  }
1085
1091
  return true;
1086
1092
  };
1087
- var deepContains = (obj1, obj2) => {
1088
- if (typeof obj1 !== typeof obj2) {
1093
+ var deepContains = (obj1, obj2, ignoredKeys = ["node", "__ref"]) => {
1094
+ if (obj1 === obj2)
1095
+ return true;
1096
+ if (!(0, import_types.isObjectLike)(obj1) || !(0, import_types.isObjectLike)(obj2))
1089
1097
  return false;
1090
- }
1091
- if ((0, import_types.isObjectLike)(obj1)) {
1092
- if (Array.isArray(obj1) && Array.isArray(obj2)) {
1093
- if (obj1.length !== obj2.length) {
1098
+ if ((0, import_node.isDOMNode)(obj1) || (0, import_node.isDOMNode)(obj2))
1099
+ return obj1 === obj2;
1100
+ const stack = [[obj1, obj2]];
1101
+ const visited = /* @__PURE__ */ new WeakSet();
1102
+ while (stack.length > 0) {
1103
+ const [current1, current2] = stack.pop();
1104
+ if (visited.has(current1))
1105
+ continue;
1106
+ visited.add(current1);
1107
+ const keys1 = Object.keys(current1).filter((key) => !ignoredKeys.includes(key));
1108
+ const keys2 = Object.keys(current2).filter((key) => !ignoredKeys.includes(key));
1109
+ if (keys1.length !== keys2.length)
1110
+ return false;
1111
+ for (const key of keys1) {
1112
+ if (!Object.prototype.hasOwnProperty.call(current2, key))
1094
1113
  return false;
1095
- }
1096
- for (let i = 0; i < obj1.length; i++) {
1097
- if (!deepContains(obj1[i], obj2[i])) {
1098
- return false;
1099
- }
1100
- }
1101
- } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
1102
- for (const key in obj1) {
1103
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
1104
- if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
1114
+ const value1 = current1[key];
1115
+ const value2 = current2[key];
1116
+ if ((0, import_node.isDOMNode)(value1) || (0, import_node.isDOMNode)(value2)) {
1117
+ if (value1 !== value2)
1105
1118
  return false;
1119
+ } else if ((0, import_types.isObjectLike)(value1) && (0, import_types.isObjectLike)(value2)) {
1120
+ if (value1 !== value2) {
1121
+ stack.push([value1, value2]);
1106
1122
  }
1123
+ } else if (value1 !== value2) {
1124
+ return false;
1107
1125
  }
1108
1126
  }
1109
- } else {
1110
- return obj2 === obj1;
1111
1127
  }
1112
1128
  return true;
1113
1129
  };
@@ -1897,10 +1913,10 @@ var require_cjs3 = __commonJS({
1897
1913
  return [].concat(...arrays);
1898
1914
  };
1899
1915
  var mergeArray = (arr, excludeFrom = []) => {
1900
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
1916
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
1901
1917
  };
1902
1918
  var mergeAndCloneIfArray = (obj) => {
1903
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
1919
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
1904
1920
  };
1905
1921
  var cutArrayBeforeValue = (arr, value) => {
1906
1922
  const index = arr.indexOf(value);
@@ -2004,6 +2020,8 @@ var require_cjs3 = __commonJS({
2004
2020
  __export22(string_exports, {
2005
2021
  customDecodeURIComponent: () => customDecodeURIComponent,
2006
2022
  customEncodeURIComponent: () => customEncodeURIComponent,
2023
+ decodeNewlines: () => decodeNewlines,
2024
+ encodeNewlines: () => encodeNewlines,
2007
2025
  findKeyPosition: () => findKeyPosition,
2008
2026
  lowercaseFirstLetter: () => lowercaseFirstLetter,
2009
2027
  replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
@@ -2107,6 +2125,12 @@ var require_cjs3 = __commonJS({
2107
2125
  return char;
2108
2126
  });
2109
2127
  };
2128
+ var encodeNewlines = (str) => {
2129
+ return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
2130
+ };
2131
+ var decodeNewlines = (encodedStr) => {
2132
+ return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
2133
+ };
2110
2134
  var customEncodeURIComponent = (str) => {
2111
2135
  return str.split("").map((char) => {
2112
2136
  if (/[^a-zA-Z0-9\s]/.test(char)) {
@@ -2537,7 +2561,7 @@ var require_cjs3 = __commonJS({
2537
2561
  };
2538
2562
  var overwriteDeep2 = (obj, params, excludeFrom = []) => {
2539
2563
  for (const e in params) {
2540
- if (e === "__proto__")
2564
+ if (e === "__ref")
2541
2565
  continue;
2542
2566
  if (excludeFrom.includes(e) || e.startsWith("__"))
2543
2567
  continue;
@@ -3061,6 +3085,7 @@ var require_cjs3 = __commonJS({
3061
3085
  var src_exports2 = {};
3062
3086
  __export2(src_exports2, {
3063
3087
  arrayzeValue: () => arrayzeValue3,
3088
+ copyJavaScriptToClipboard: () => copyJavaScriptToClipboard,
3064
3089
  copyStringToClipboard: () => copyStringToClipboard,
3065
3090
  fibonacciNumberByIndex: () => fibonacciNumberByIndex,
3066
3091
  findClosestNumber: () => findClosestNumber,
@@ -3188,15 +3213,22 @@ var require_cjs3 = __commonJS({
3188
3213
  }
3189
3214
  };
3190
3215
  var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
3191
- var copyStringToClipboard = (str) => {
3192
- const el = document.createElement("textarea");
3193
- el.value = str;
3194
- el.setAttribute("readonly", "");
3195
- el.style = { position: "absolute", left: "-9999px" };
3196
- document.body.appendChild(el);
3197
- el.select();
3198
- document.execCommand("copy");
3199
- document.body.removeChild(el);
3216
+ var copyStringToClipboard = async (str) => {
3217
+ try {
3218
+ await navigator.clipboard.writeText(str);
3219
+ } catch (err) {
3220
+ console.warn("Failed to copy text: ", err);
3221
+ }
3222
+ };
3223
+ var copyJavaScriptToClipboard = async (jsCode) => {
3224
+ try {
3225
+ const blob = new Blob([jsCode], { type: "text/javascript" });
3226
+ const clipboardItem = new window.ClipboardItem({ "text/plain": blob });
3227
+ await navigator.clipboard.write([clipboardItem]);
3228
+ console.log("JavaScript code copied to clipboard as text/javascript");
3229
+ } catch (err) {
3230
+ console.error("Failed to copy JavaScript code: ", err);
3231
+ }
3200
3232
  };
3201
3233
  var removeChars = (str) => {
3202
3234
  return str.replace(/[^a-zA-Z0-9_]/g, "");
@@ -3790,9 +3822,11 @@ var BREAKPOINTS = {
3790
3822
  mobileXS: 375
3791
3823
  };
3792
3824
  var DEVICES = {
3825
+ screenXXL: [2560, 1440],
3826
+ screenXL: [2240, 1260],
3793
3827
  screenL: [1920, 1024],
3794
3828
  screenM: [1680, 1024],
3795
- screenS: [1440, 978],
3829
+ screenS: [1440, 720],
3796
3830
  tabletL: [1366, 926],
3797
3831
  tabletM: [1280, 768],
3798
3832
  tabletS: [1024, 768],
package/dist/cjs/set.js CHANGED
@@ -166,6 +166,7 @@ var require_node = __commonJS({
166
166
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
167
167
  var node_exports = {};
168
168
  __export2(node_exports, {
169
+ isDOMNode: () => isDOMNode,
169
170
  isHtmlElement: () => isHtmlElement,
170
171
  isNode: () => isNode
171
172
  });
@@ -177,6 +178,9 @@ var require_node = __commonJS({
177
178
  var isHtmlElement = (obj) => {
178
179
  return (typeof HTMLElement === "object" ? obj instanceof import_globals3.window.HTMLElement : obj && typeof obj === "object" && obj !== null && obj.nodeType === 1 && typeof obj.nodeName === "string") || false;
179
180
  };
181
+ var isDOMNode = (obj) => {
182
+ return typeof import_globals3.window !== "undefined" && (obj instanceof import_globals3.window.Node || obj instanceof import_globals3.window.Window || obj === import_globals3.window || obj === document);
183
+ };
180
184
  }
181
185
  });
182
186
 
@@ -639,6 +643,7 @@ var require_object = __commonJS({
639
643
  var import_types = require_types();
640
644
  var import_array = require_array();
641
645
  var import_string = require_string();
646
+ var import_node = require_node();
642
647
  var exec = (param, element, state, context) => {
643
648
  if ((0, import_types.isFunction)(param)) {
644
649
  return param(
@@ -717,27 +722,28 @@ var require_object = __commonJS({
717
722
  var mergeArrayExclude = (arr, excl = []) => {
718
723
  return arr.reduce((acc, curr) => deepMerge3(acc, deepCloneExclude(curr, excl)), {});
719
724
  };
720
- var deepClone2 = (obj, excludeFrom = [], cleanUndefined = false) => {
721
- const o = (0, import_types.isArray)(obj) ? [] : {};
722
- for (const prop in obj) {
723
- if (!Object.prototype.hasOwnProperty.call(obj, prop))
724
- continue;
725
- if (prop === "__proto__")
726
- continue;
727
- if (excludeFrom.includes(prop) || prop.startsWith("__"))
728
- continue;
729
- let objProp = obj[prop];
730
- if (cleanUndefined && (0, import_types.isUndefined)(objProp))
731
- continue;
732
- if (prop === "extend" && (0, import_types.isArray)(objProp)) {
733
- objProp = (0, import_array.mergeArray)(objProp);
725
+ var deepClone2 = (obj, exclude = [], cleanUndefined = false, visited = /* @__PURE__ */ new WeakMap()) => {
726
+ if (!(0, import_types.isObjectLike)(obj) || (0, import_node.isDOMNode)(obj))
727
+ return obj;
728
+ if (visited.has(obj))
729
+ return visited.get(obj);
730
+ const clone2 = (0, import_types.isArray)(obj) ? [] : {};
731
+ visited.set(obj, clone2);
732
+ for (const key in obj) {
733
+ if (Object.prototype.hasOwnProperty.call(obj, key) && !exclude.includes(key)) {
734
+ const value = obj[key];
735
+ if ((0, import_node.isDOMNode)(value)) {
736
+ clone2[key] = value;
737
+ } else if (key === "extend" && (0, import_types.isArray)(value)) {
738
+ clone2[key] = (0, import_array.mergeArray)(value, exclude);
739
+ } else if ((0, import_types.isObjectLike)(value)) {
740
+ clone2[key] = deepClone2(value, exclude, cleanUndefined, visited);
741
+ } else {
742
+ clone2[key] = value;
743
+ }
734
744
  }
735
- if ((0, import_types.isObjectLike)(objProp)) {
736
- o[prop] = deepClone2(objProp, excludeFrom, cleanUndefined);
737
- } else
738
- o[prop] = objProp;
739
745
  }
740
- return o;
746
+ return clone2;
741
747
  };
742
748
  var deepCloneWithExtend = (obj, excludeFrom = ["node"], options = {}) => {
743
749
  const o = options.window ? (0, import_types.isArray)(obj) ? new options.window.Array([]) : new options.window.Object({}) : (0, import_types.isArray)(obj) ? [] : {};
@@ -1048,30 +1054,40 @@ var require_object = __commonJS({
1048
1054
  }
1049
1055
  return true;
1050
1056
  };
1051
- var deepContains = (obj1, obj2) => {
1052
- if (typeof obj1 !== typeof obj2) {
1057
+ var deepContains = (obj1, obj2, ignoredKeys = ["node", "__ref"]) => {
1058
+ if (obj1 === obj2)
1059
+ return true;
1060
+ if (!(0, import_types.isObjectLike)(obj1) || !(0, import_types.isObjectLike)(obj2))
1053
1061
  return false;
1054
- }
1055
- if ((0, import_types.isObjectLike)(obj1)) {
1056
- if (Array.isArray(obj1) && Array.isArray(obj2)) {
1057
- if (obj1.length !== obj2.length) {
1062
+ if ((0, import_node.isDOMNode)(obj1) || (0, import_node.isDOMNode)(obj2))
1063
+ return obj1 === obj2;
1064
+ const stack = [[obj1, obj2]];
1065
+ const visited = /* @__PURE__ */ new WeakSet();
1066
+ while (stack.length > 0) {
1067
+ const [current1, current2] = stack.pop();
1068
+ if (visited.has(current1))
1069
+ continue;
1070
+ visited.add(current1);
1071
+ const keys1 = Object.keys(current1).filter((key) => !ignoredKeys.includes(key));
1072
+ const keys2 = Object.keys(current2).filter((key) => !ignoredKeys.includes(key));
1073
+ if (keys1.length !== keys2.length)
1074
+ return false;
1075
+ for (const key of keys1) {
1076
+ if (!Object.prototype.hasOwnProperty.call(current2, key))
1058
1077
  return false;
1059
- }
1060
- for (let i = 0; i < obj1.length; i++) {
1061
- if (!deepContains(obj1[i], obj2[i])) {
1062
- return false;
1063
- }
1064
- }
1065
- } else if ((0, import_types.isObjectLike)(obj1) && obj2 !== null) {
1066
- for (const key in obj1) {
1067
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(obj2, key);
1068
- if (!hasOwnProperty2 || !deepContains(obj1[key], obj2[key])) {
1078
+ const value1 = current1[key];
1079
+ const value2 = current2[key];
1080
+ if ((0, import_node.isDOMNode)(value1) || (0, import_node.isDOMNode)(value2)) {
1081
+ if (value1 !== value2)
1069
1082
  return false;
1083
+ } else if ((0, import_types.isObjectLike)(value1) && (0, import_types.isObjectLike)(value2)) {
1084
+ if (value1 !== value2) {
1085
+ stack.push([value1, value2]);
1070
1086
  }
1087
+ } else if (value1 !== value2) {
1088
+ return false;
1071
1089
  }
1072
1090
  }
1073
- } else {
1074
- return obj2 === obj1;
1075
1091
  }
1076
1092
  return true;
1077
1093
  };
@@ -1897,10 +1913,10 @@ var require_cjs3 = __commonJS({
1897
1913
  return [].concat(...arrays);
1898
1914
  };
1899
1915
  var mergeArray = (arr, excludeFrom = []) => {
1900
- return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepClone)(c, excludeFrom), excludeFrom), {});
1916
+ return arr.reduce((a, c) => (0, import_object.deepMerge)(a, (0, import_object.deepCloneWithExtend)(c, excludeFrom), excludeFrom), {});
1901
1917
  };
1902
1918
  var mergeAndCloneIfArray = (obj) => {
1903
- return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepClone)(obj);
1919
+ return (0, import_types.isArray)(obj) ? mergeArray(obj) : (0, import_object.deepCloneWithExtend)(obj);
1904
1920
  };
1905
1921
  var cutArrayBeforeValue = (arr, value) => {
1906
1922
  const index = arr.indexOf(value);
@@ -2004,6 +2020,8 @@ var require_cjs3 = __commonJS({
2004
2020
  __export22(string_exports, {
2005
2021
  customDecodeURIComponent: () => customDecodeURIComponent,
2006
2022
  customEncodeURIComponent: () => customEncodeURIComponent,
2023
+ decodeNewlines: () => decodeNewlines,
2024
+ encodeNewlines: () => encodeNewlines,
2007
2025
  findKeyPosition: () => findKeyPosition,
2008
2026
  lowercaseFirstLetter: () => lowercaseFirstLetter,
2009
2027
  replaceLiteralsWithObjectFields: () => replaceLiteralsWithObjectFields,
@@ -2107,6 +2125,12 @@ var require_cjs3 = __commonJS({
2107
2125
  return char;
2108
2126
  });
2109
2127
  };
2128
+ var encodeNewlines = (str) => {
2129
+ return str.split("\n").join("/////n").split("`").join("/////tilde").split("$").join("/////dlrsgn");
2130
+ };
2131
+ var decodeNewlines = (encodedStr) => {
2132
+ return encodedStr.split("/////n").join("\n").split("/////tilde").join("`").split("/////dlrsgn").join("$");
2133
+ };
2110
2134
  var customEncodeURIComponent = (str) => {
2111
2135
  return str.split("").map((char) => {
2112
2136
  if (/[^a-zA-Z0-9\s]/.test(char)) {
@@ -2537,7 +2561,7 @@ var require_cjs3 = __commonJS({
2537
2561
  };
2538
2562
  var overwriteDeep2 = (obj, params, excludeFrom = []) => {
2539
2563
  for (const e in params) {
2540
- if (e === "__proto__")
2564
+ if (e === "__ref")
2541
2565
  continue;
2542
2566
  if (excludeFrom.includes(e) || e.startsWith("__"))
2543
2567
  continue;
@@ -3061,6 +3085,7 @@ var require_cjs3 = __commonJS({
3061
3085
  var src_exports = {};
3062
3086
  __export2(src_exports, {
3063
3087
  arrayzeValue: () => arrayzeValue3,
3088
+ copyJavaScriptToClipboard: () => copyJavaScriptToClipboard,
3064
3089
  copyStringToClipboard: () => copyStringToClipboard,
3065
3090
  fibonacciNumberByIndex: () => fibonacciNumberByIndex,
3066
3091
  findClosestNumber: () => findClosestNumber,
@@ -3188,15 +3213,22 @@ var require_cjs3 = __commonJS({
3188
3213
  }
3189
3214
  };
3190
3215
  var isPhoto = (format) => ["jpeg", "gif", "jpg", "png", "tiff", "woff"].includes(format);
3191
- var copyStringToClipboard = (str) => {
3192
- const el = document.createElement("textarea");
3193
- el.value = str;
3194
- el.setAttribute("readonly", "");
3195
- el.style = { position: "absolute", left: "-9999px" };
3196
- document.body.appendChild(el);
3197
- el.select();
3198
- document.execCommand("copy");
3199
- document.body.removeChild(el);
3216
+ var copyStringToClipboard = async (str) => {
3217
+ try {
3218
+ await navigator.clipboard.writeText(str);
3219
+ } catch (err) {
3220
+ console.warn("Failed to copy text: ", err);
3221
+ }
3222
+ };
3223
+ var copyJavaScriptToClipboard = async (jsCode) => {
3224
+ try {
3225
+ const blob = new Blob([jsCode], { type: "text/javascript" });
3226
+ const clipboardItem = new window.ClipboardItem({ "text/plain": blob });
3227
+ await navigator.clipboard.write([clipboardItem]);
3228
+ console.log("JavaScript code copied to clipboard as text/javascript");
3229
+ } catch (err) {
3230
+ console.error("Failed to copy JavaScript code: ", err);
3231
+ }
3200
3232
  };
3201
3233
  var removeChars = (str) => {
3202
3234
  return str.replace(/[^a-zA-Z0-9_]/g, "");
@@ -3409,9 +3441,11 @@ var BREAKPOINTS = {
3409
3441
  mobileXS: 375
3410
3442
  };
3411
3443
  var DEVICES = {
3444
+ screenXXL: [2560, 1440],
3445
+ screenXL: [2240, 1260],
3412
3446
  screenL: [1920, 1024],
3413
3447
  screenM: [1680, 1024],
3414
- screenS: [1440, 978],
3448
+ screenS: [1440, 720],
3415
3449
  tabletL: [1366, 926],
3416
3450
  tabletM: [1280, 768],
3417
3451
  tabletS: [1024, 768],