@symbo.ls/scratch 2.34.1 → 2.34.4

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.
@@ -29,16 +29,16 @@ __export(factory_exports, {
29
29
  });
30
30
  module.exports = __toCommonJS(factory_exports);
31
31
 
32
- // ../../../domql/packages/utils/dist/esm/globals.js
32
+ // ../../../domql/packages/utils/globals.js
33
33
  var window2 = globalThis;
34
34
  var document2 = window2.document;
35
35
 
36
- // ../../../domql/packages/utils/dist/esm/node.js
36
+ // ../../../domql/packages/utils/node.js
37
37
  var isDOMNode = (obj) => {
38
38
  return typeof window2 !== "undefined" && (obj instanceof window2.Node || obj instanceof window2.Window || obj === window2 || obj === document);
39
39
  };
40
40
 
41
- // ../../../domql/packages/utils/dist/esm/types.js
41
+ // ../../../domql/packages/utils/types.js
42
42
  var isObject = (arg) => {
43
43
  if (arg === null) return false;
44
44
  return typeof arg === "object" && arg.constructor === Object;
@@ -61,7 +61,7 @@ var isUndefined = (arg) => {
61
61
  return arg === void 0;
62
62
  };
63
63
 
64
- // ../../../domql/packages/utils/dist/esm/array.js
64
+ // ../../../domql/packages/utils/array.js
65
65
  var mergeArray = (arr, exclude = []) => {
66
66
  return arr.reduce(
67
67
  (a, c) => deepMerge(a, deepClone(c, { exclude }), exclude),
@@ -69,30 +69,11 @@ var mergeArray = (arr, exclude = []) => {
69
69
  );
70
70
  };
71
71
 
72
- // ../../../domql/packages/utils/dist/esm/object.js
73
- var __defProp2 = Object.defineProperty;
74
- var __defProps = Object.defineProperties;
75
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
76
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
77
- var __hasOwnProp2 = Object.prototype.hasOwnProperty;
78
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
79
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
80
- var __spreadValues = (a, b) => {
81
- for (var prop in b || (b = {}))
82
- if (__hasOwnProp2.call(b, prop))
83
- __defNormalProp(a, prop, b[prop]);
84
- if (__getOwnPropSymbols)
85
- for (var prop of __getOwnPropSymbols(b)) {
86
- if (__propIsEnum.call(b, prop))
87
- __defNormalProp(a, prop, b[prop]);
88
- }
89
- return a;
90
- };
91
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
72
+ // ../../../domql/packages/utils/object.js
92
73
  var deepMerge = (element, extend, excludeFrom = [], level = Infinity) => {
93
74
  for (const e in extend) {
94
- const hasOwnProperty2 = Object.prototype.hasOwnProperty.call(extend, e);
95
- if (!hasOwnProperty2 || excludeFrom.includes(e) || e.startsWith("__"))
75
+ const hasOwnProperty = Object.prototype.hasOwnProperty.call(extend, e);
76
+ if (!hasOwnProperty || excludeFrom.includes(e) || e.startsWith("__"))
96
77
  continue;
97
78
  const elementProp = element[e];
98
79
  const extendProp = extend[e];
@@ -127,8 +108,8 @@ var deepClone = (obj, options = {}) => {
127
108
  if (visited.has(obj)) {
128
109
  return visited.get(obj);
129
110
  }
130
- const clone2 = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
131
- visited.set(obj, clone2);
111
+ const clone = contentWindow ? isArray(obj) ? new contentWindow.Array() : new contentWindow.Object() : isArray(obj) ? [] : {};
112
+ visited.set(obj, clone);
132
113
  for (const key in obj) {
133
114
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
134
115
  if (exclude.includes(key) || key.startsWith("__") || key === "__proto__")
@@ -137,15 +118,15 @@ var deepClone = (obj, options = {}) => {
137
118
  if (cleanUndefined && isUndefined(value) || cleanNull && isNull(value))
138
119
  continue;
139
120
  if (isDOMNode(value)) {
140
- clone2[key] = value;
121
+ clone[key] = value;
141
122
  continue;
142
123
  }
143
124
  if (handleExtend && key === "extend" && isArray(value)) {
144
- clone2[key] = mergeArray(value, exclude);
125
+ clone[key] = mergeArray(value, exclude);
145
126
  continue;
146
127
  }
147
128
  if (isFunction(value) && options.window) {
148
- clone2[key] = contentWindow.eval("(" + value.toString() + ")");
129
+ clone[key] = contentWindow.eval("(" + value.toString() + ")");
149
130
  continue;
150
131
  }
151
132
  if ((value == null ? void 0 : value.__ref) && (value == null ? void 0 : value.node)) {
@@ -156,17 +137,18 @@ var deepClone = (obj, options = {}) => {
156
137
  }
157
138
  if (isObjectLike(value)) {
158
139
  if (!Object.prototype.hasOwnProperty.call(obj, key)) continue;
159
- clone2[key] = deepClone(value, __spreadProps(__spreadValues({}, options), {
140
+ clone[key] = deepClone(value, {
141
+ ...options,
160
142
  visited
161
- }));
143
+ });
162
144
  } else {
163
- clone2[key] = value;
145
+ clone[key] = value;
164
146
  }
165
147
  }
166
- return clone2;
148
+ return clone;
167
149
  };
168
150
 
169
- // ../../../domql/packages/utils/dist/esm/cookie.js
151
+ // ../../../domql/packages/utils/cookie.js
170
152
  var isMobile = (() => typeof navigator === "undefined" ? false : /Mobi/.test(navigator.userAgent))();
171
153
 
172
154
  // src/defaultConfig/index.js