widgetInputs.js 19.9 KB
Newer Older
pythongosssss's avatar
pythongosssss committed
1
import { ComfyWidgets, addValueControlWidgets } from "../../scripts/widgets.js";
2
import { app } from "../../scripts/app.js";
3
import { applyTextReplacements } from "../../scripts/utils.js";
4
5

const CONVERTED_TYPE = "converted-widget";
6
const VALID_TYPES = ["STRING", "combo", "number", "BOOLEAN"];
7
const CONFIG = Symbol();
8
const GET_CONFIG = Symbol();
9

10
11
12
13
14
function getConfig(widgetName) {
	const { nodeData } = this.constructor;
	return nodeData?.input?.required[widgetName] ?? nodeData?.input?.optional?.[widgetName];
}

15
function isConvertableWidget(widget, config) {
16
	return (VALID_TYPES.includes(widget.type) || VALID_TYPES.includes(config[0])) && !widget.options?.forceInput;
17
18
19
20
21
22
23
24
25
26
}

function hideWidget(node, widget, suffix = "") {
	widget.origType = widget.type;
	widget.origComputeSize = widget.computeSize;
	widget.origSerializeValue = widget.serializeValue;
	widget.computeSize = () => [0, -4]; // -4 is due to the gap litegraph adds between widgets automatically
	widget.type = CONVERTED_TYPE + suffix;
	widget.serializeValue = () => {
		// Prevent serializing the widget if we have no input linked
27
28
29
		if (!node.inputs) {
			return undefined;
		}
30
31
32
		let node_input = node.inputs.find((i) => i.widget?.name === widget.name);

		if (!node_input || !node_input.link) {
33
34
			return undefined;
		}
35
		return widget.origSerializeValue ? widget.origSerializeValue() : widget.value;
36
37
	};

38
	// Hide any linked widgets, e.g. seed+seedControl
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
	if (widget.linkedWidgets) {
		for (const w of widget.linkedWidgets) {
			hideWidget(node, w, ":" + widget.name);
		}
	}
}

function showWidget(widget) {
	widget.type = widget.origType;
	widget.computeSize = widget.origComputeSize;
	widget.serializeValue = widget.origSerializeValue;

	delete widget.origType;
	delete widget.origComputeSize;
	delete widget.origSerializeValue;

55
	// Hide any linked widgets, e.g. seed+seedControl
56
57
58
59
60
61
62
63
64
65
	if (widget.linkedWidgets) {
		for (const w of widget.linkedWidgets) {
			showWidget(w);
		}
	}
}

function convertToInput(node, widget, config) {
	hideWidget(node, widget);

pythongosssss's avatar
pythongosssss committed
66
	const { type } = getWidgetType(config);
67
68

	// Add input and store widget config for creating on primitive node
69
	const sz = node.size;
pythongosssss's avatar
pythongosssss committed
70
	node.addInput(widget.name, type, {
71
		widget: { name: widget.name, [GET_CONFIG]: () => config },
72
	});
73

74
75
76
77
	for (const widget of node.widgets) {
		widget.last_y += LiteGraph.NODE_SLOT_HEIGHT;
	}

78
79
	// Restore original size but grow if needed
	node.setSize([Math.max(sz[0], node.size[0]), Math.max(sz[1], node.size[1])]);
80
81
82
83
}

function convertToWidget(node, widget) {
	showWidget(widget);
84
	const sz = node.size;
85
	node.removeInput(node.inputs.findIndex((i) => i.widget?.name === widget.name));
86

87
88
89
90
	for (const widget of node.widgets) {
		widget.last_y -= LiteGraph.NODE_SLOT_HEIGHT;
	}

91
92
	// Restore original size but grow if needed
	node.setSize([Math.max(sz[0], node.size[0]), Math.max(sz[1], node.size[1])]);
93
94
}

pythongosssss's avatar
pythongosssss committed
95
function getWidgetType(config) {
96
97
98
99
100
	// Special handling for COMBO so we restrict links based on the entries
	let type = config[0];
	if (type instanceof Array) {
		type = "COMBO";
	}
pythongosssss's avatar
pythongosssss committed
101
	return { type };
102
103
}

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124

function isValidCombo(combo, obj) {
	// New input isnt a combo
	if (!(obj instanceof Array)) {
		console.log(`connection rejected: tried to connect combo to ${obj}`);
		return false;
	}
	// New imput combo has a different size
	if (combo.length !== obj.length) {
		console.log(`connection rejected: combo lists dont match`);
		return false;
	}
	// New input combo has different elements
	if (combo.find((v, i) => obj[i] !== v)) {
		console.log(`connection rejected: combo lists dont match`);
		return false;
	}

	return true;
}

pythongosssss's avatar
pythongosssss committed
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
export function mergeIfValid(output, config2, forceUpdate, recreateWidget, config1) {
	if (!config1) {
		config1 = output.widget[CONFIG] ?? output.widget[GET_CONFIG]();
	}

	if (config1[0] instanceof Array) {
		if (!isValidCombo(config1[0], config2[0])) return false;
	} else if (config1[0] !== config2[0]) {
		// Types dont match
		console.log(`connection rejected: types dont match`, config1[0], config2[0]);
		return false;
	}

	const keys = new Set([...Object.keys(config1[1] ?? {}), ...Object.keys(config2[1] ?? {})]);

	let customConfig;
	const getCustomConfig = () => {
		if (!customConfig) {
			if (typeof structuredClone === "undefined") {
				customConfig = JSON.parse(JSON.stringify(config1[1] ?? {}));
			} else {
				customConfig = structuredClone(config1[1] ?? {});
			}
		}
		return customConfig;
	};

	const isNumber = config1[0] === "INT" || config1[0] === "FLOAT";
	for (const k of keys.values()) {
		if (k !== "default" && k !== "forceInput" && k !== "defaultInput") {
			let v1 = config1[1][k];
			let v2 = config2[1]?.[k];

			if (v1 === v2 || (!v1 && !v2)) continue;

			if (isNumber) {
				if (k === "min") {
					const theirMax = config2[1]?.["max"];
					if (theirMax != null && v1 > theirMax) {
						console.log("connection rejected: min > max", v1, theirMax);
						return false;
					}
					getCustomConfig()[k] = v1 == null ? v2 : v2 == null ? v1 : Math.max(v1, v2);
					continue;
				} else if (k === "max") {
					const theirMin = config2[1]?.["min"];
					if (theirMin != null && v1 < theirMin) {
						console.log("connection rejected: max < min", v1, theirMin);
						return false;
					}
					getCustomConfig()[k] = v1 == null ? v2 : v2 == null ? v1 : Math.min(v1, v2);
					continue;
				} else if (k === "step") {
					let step;
					if (v1 == null) {
						// No current step
						step = v2;
					} else if (v2 == null) {
						// No new step
						step = v1;
					} else {
						if (v1 < v2) {
							// Ensure v1 is larger for the mod
							const a = v2;
							v2 = v1;
							v1 = a;
						}
						if (v1 % v2) {
							console.log("connection rejected: steps not divisible", "current:", v1, "new:", v2);
							return false;
						}

						step = v1;
					}

					getCustomConfig()[k] = step;
					continue;
				}
			}

			console.log(`connection rejected: config ${k} values dont match`, v1, v2);
			return false;
		}
	}

	if (customConfig || forceUpdate) {
		if (customConfig) {
			output.widget[CONFIG] = [config1[0], customConfig];
		}

		const widget = recreateWidget?.call(this);
		// When deleting a node this can be null
		if (widget) {
			const min = widget.options.min;
			const max = widget.options.max;
			if (min != null && widget.value < min) widget.value = min;
			if (max != null && widget.value > max) widget.value = max;
			widget.callback(widget.value);
		}
	}

	return { customConfig };
}

229
230
231
232
233
234
235
236
237
238
239
240
app.registerExtension({
	name: "Comfy.WidgetInputs",
	async beforeRegisterNodeDef(nodeType, nodeData, app) {
		// Add menu options to conver to/from widgets
		const origGetExtraMenuOptions = nodeType.prototype.getExtraMenuOptions;
		nodeType.prototype.getExtraMenuOptions = function (_, options) {
			const r = origGetExtraMenuOptions ? origGetExtraMenuOptions.apply(this, arguments) : undefined;

			if (this.widgets) {
				let toInput = [];
				let toWidget = [];
				for (const w of this.widgets) {
241
242
243
					if (w.options?.forceInput) {
						continue;
					}
244
245
246
247
248
249
					if (w.type === CONVERTED_TYPE) {
						toWidget.push({
							content: `Convert ${w.name} to widget`,
							callback: () => convertToWidget(this, w),
						});
					} else {
250
						const config = getConfig.call(this, w.name) ?? [w.type, w.options || {}];
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
						if (isConvertableWidget(w, config)) {
							toInput.push({
								content: `Convert ${w.name} to input`,
								callback: () => convertToInput(this, w, config),
							});
						}
					}
				}
				if (toInput.length) {
					options.push(...toInput, null);
				}

				if (toWidget.length) {
					options.push(...toWidget, null);
				}
			}

			return r;
		};

271
272
273
274
275
		nodeType.prototype.onGraphConfigured = function () {
			if (!this.inputs) return;

			for (const input of this.inputs) {
				if (input.widget) {
276
277
					if (!input.widget[GET_CONFIG]) {
						input.widget[GET_CONFIG] = () => getConfig.call(this, input.widget.name);
278
279
					}

pythongosssss's avatar
pythongosssss committed
280
281
282
283
284
285
286
287
288
289
290
291
292
293
					// Cleanup old widget config
					if (input.widget.config) {
						if (input.widget.config[0] instanceof Array) {
							// If we are an old converted combo then replace the input type and the stored link data
							input.type = "COMBO";

							const link = app.graph.links[input.link];
							if (link) {
								link.type = input.type;
							}
						}
						delete input.widget.config;
					}

294
295
296
297
298
299
300
301
302
303
304
					const w = this.widgets.find((w) => w.name === input.widget.name);
					if (w) {
						hideWidget(this, w);
					} else {
						convertToWidget(this, input);
					}
				}
			}
		};

		const origOnNodeCreated = nodeType.prototype.onNodeCreated;
305
306
		nodeType.prototype.onNodeCreated = function () {
			const r = origOnNodeCreated ? origOnNodeCreated.apply(this) : undefined;
307
308
309

			// When node is created, convert any force/default inputs
			if (!app.configuringGraph && this.widgets) {
310
				for (const w of this.widgets) {
Chris's avatar
Chris committed
311
					if (w?.options?.forceInput || w?.options?.defaultInput) {
312
						const config = getConfig.call(this, w.name) ?? [w.type, w.options || {}];
313
314
315
316
						convertToInput(this, w, config);
					}
				}
			}
317

318
			return r;
319
		};
320

321
322
323
		const origOnConfigure = nodeType.prototype.onConfigure;
		nodeType.prototype.onConfigure = function () {
			const r = origOnConfigure ? origOnConfigure.apply(this, arguments) : undefined;
324
325
			if (!app.configuringGraph && this.inputs) {
				// On copy + paste of nodes, ensure that widget configs are set up
326
				for (const input of this.inputs) {
327
328
					if (input.widget && !input.widget[GET_CONFIG]) {
						input.widget[GET_CONFIG] = () => getConfig.call(this, input.widget.name);
329
330
331
332
						const w = this.widgets.find((w) => w.name === input.widget.name);
						if (w) {
							hideWidget(this, w);
						}
333
334
335
336
337
338
339
					}
				}
			}

			return r;
		};

340
341
342
343
344
345
346
347
348
		function isNodeAtPos(pos) {
			for (const n of app.graph._nodes) {
				if (n.pos[0] === pos[0] && n.pos[1] === pos[1]) {
					return true;
				}
			}
			return false;
		}

349
350
		// Double click a widget input to automatically attach a primitive
		const origOnInputDblClick = nodeType.prototype.onInputDblClick;
351
		const ignoreDblClick = Symbol();
352
353
354
		nodeType.prototype.onInputDblClick = function (slot) {
			const r = origOnInputDblClick ? origOnInputDblClick.apply(this, arguments) : undefined;

355
			const input = this.inputs[slot];
356
357
			if (!input.widget || !input[ignoreDblClick]) {
				// Not a widget input or already handled input
358
				if (!(input.type in ComfyWidgets) && !(input.widget[GET_CONFIG]?.()?.[0] instanceof Array)) {
359
360
					return r; //also Not a ComfyWidgets input or combo (do nothing)
				}
361
			}
362

363
364
365
			// Create a primitive node
			const node = LiteGraph.createNode("PrimitiveNode");
			app.graph.add(node);
366

367
368
369
370
			// Calculate a position that wont directly overlap another node
			const pos = [this.pos[0] - node.size[0] - 30, this.pos[1]];
			while (isNodeAtPos(pos)) {
				pos[1] += LiteGraph.NODE_TITLE_HEIGHT;
371
372
			}

373
374
375
376
377
378
379
380
381
382
			node.pos = pos;
			node.connect(0, this, slot);
			node.title = input.name;

			// Prevent adding duplicates due to triple clicking
			input[ignoreDblClick] = true;
			setTimeout(() => {
				delete input[ignoreDblClick];
			}, 300);

383
384
			return r;
		};
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406

		// Prevent connecting COMBO lists to converted inputs that dont match types
		const onConnectInput = nodeType.prototype.onConnectInput;
		nodeType.prototype.onConnectInput = function (targetSlot, type, output, originNode, originSlot) {
			const v = onConnectInput?.(this, arguments);
			// Not a combo, ignore
			if (type !== "COMBO") return v;
			// Primitive output, allow that to handle
			if (originNode.outputs[originSlot].widget) return v;

			// Ensure target is also a combo
			const targetCombo = this.inputs[targetSlot].widget?.[GET_CONFIG]?.()?.[0];
			if (!targetCombo || !(targetCombo instanceof Array)) return v;

			// Check they match
			const originConfig = originNode.constructor?.nodeData?.output?.[originSlot];
			if (!originConfig || !isValidCombo(targetCombo, originConfig)) {
				return false;
			}

			return v;
		};
407
408
	},
	registerCustomNodes() {
409
		const replacePropertyName = "Run widget replace on values";
410
411
412
413
414
		class PrimitiveNode {
			constructor() {
				this.addOutput("connect to widget input", "*");
				this.serialize_widgets = true;
				this.isVirtualNode = true;
415
416
417
418

				if (!this.properties || !(replacePropertyName in this.properties)) {
					this.addProperty(replacePropertyName, false, "boolean");
				}
419
420
			}

pythongosssss's avatar
pythongosssss committed
421
			applyToGraph(extraLinks = []) {
422
423
				if (!this.outputs[0].links?.length) return;

424
425
426
427
428
429
430
431
432
433
434
435
436
437
				function get_links(node) {
					let links = [];
					for (const l of node.outputs[0].links) {
						const linkInfo = app.graph.links[l];
						const n = node.graph.getNodeById(linkInfo.target_id);
						if (n.type == "Reroute") {
							links = links.concat(get_links(n));
						} else {
							links.push(l);
						}
					}
					return links;
				}

pythongosssss's avatar
pythongosssss committed
438
				let links = [...get_links(this).map((l) => app.graph.links[l]), ...extraLinks];
439
440
441
442
443
				let v = this.widgets?.[0].value;
				if(v && this.properties[replacePropertyName]) {
					v = applyTextReplacements(app, v);
				}

444
				// For each output link copy our value over the original widget value
pythongosssss's avatar
pythongosssss committed
445
				for (const linkInfo of links) {
446
447
448
449
450
451
					const node = this.graph.getNodeById(linkInfo.target_id);
					const input = node.inputs[linkInfo.target_slot];
					const widgetName = input.widget.name;
					if (widgetName) {
						const widget = node.widgets.find((w) => w.name === widgetName);
						if (widget) {
452
							widget.value = v;
453
454
455
456
457
458
459
460
							if (widget.callback) {
								widget.callback(widget.value, app.canvas, node, app.canvas.graph_mouse, {});
							}
						}
					}
				}
			}

461
462
463
			refreshComboInNode() {
				const widget = this.widgets?.[0];
				if (widget?.type === "combo") {
464
					widget.options.values = this.outputs[0].widget[GET_CONFIG]()[0];
465
466
467
468
469
470
471
472
473
474

					if (!widget.options.values.includes(widget.value)) {
						widget.value = widget.options.values[0];
						widget.callback(widget.value);
					}
				}
			}

			onAfterGraphConfigured() {
				if (this.outputs[0].links?.length && !this.widgets?.length) {
475
					if (!this.#onFirstConnection()) return;
476
477

					// Populate widget values from config data
478
479
480
481
482
483
484
					if (this.widgets) {
						for (let i = 0; i < this.widgets_values.length; i++) {
							const w = this.widgets[i];
							if (w) {
								w.value = this.widgets_values[i];
							}
						}
485
					}
486
487
488

					// Merge values if required
					this.#mergeWidgetConfig();
489
490
491
				}
			}

492
			onConnectionsChange(_, index, connected) {
493
494
495
496
497
				if (app.configuringGraph) {
					// Dont run while the graph is still setting up
					return;
				}

498
				const links = this.outputs[0].links;
499
				if (connected) {
500
					if (links?.length && !this.widgets?.length) {
501
						this.#onFirstConnection();
502
					}
503
504
505
506
507
508
509
				} else {
					// We may have removed a link that caused the constraints to change
					this.#mergeWidgetConfig();

					if (!links?.length) {
						this.#onLastDisconnect();
					}
510
511
512
513
514
515
516
				}
			}

			onConnectOutput(slot, type, input, target_node, target_slot) {
				// Fires before the link is made allowing us to reject it if it isn't valid

				// No widget, we cant connect
517
518
519
				if (!input.widget) {
					if (!(input.type in ComfyWidgets)) return false;
				}
520
521

				if (this.outputs[slot].links?.length) {
pythongosssss's avatar
pythongosssss committed
522
523
524
525
526
527
					const valid = this.#isValidConnection(input);
					if (valid) {
						// On connect of additional outputs, copy our value to their widget
						this.applyToGraph([{ target_id: target_node.id, target_slot }]);
					}
					return valid;
528
529
530
				}
			}

531
			#onFirstConnection(recreating) {
532
533
534
535
536
537
538
539
540
541
542
				// First connection can fire before the graph is ready on initial load so random things can be missing
				const linkId = this.outputs[0].links[0];
				const link = this.graph.links[linkId];
				if (!link) return;

				const theirNode = this.graph.getNodeById(link.target_id);
				if (!theirNode || !theirNode.inputs) return;

				const input = theirNode.inputs[link.target_slot];
				if (!input) return;

543
				let widget;
544
545
				if (!input.widget) {
					if (!(input.type in ComfyWidgets)) return;
546
					widget = { name: input.name, [GET_CONFIG]: () => [input.type, {}] }; //fake widget
547
				} else {
548
					widget = input.widget;
549
550
				}

551
552
553
554
				const config = widget[GET_CONFIG]?.();
				if (!config) return;

				const { type } = getWidgetType(config);
555
				// Update our output to restrict to the widget type
pythongosssss's avatar
pythongosssss committed
556
				this.outputs[0].type = type;
557
558
559
				this.outputs[0].name = type;
				this.outputs[0].widget = widget;

560
				this.#createWidget(widget[CONFIG] ?? config, theirNode, widget.name, recreating);
561
562
			}

563
			#createWidget(inputData, node, widgetName, recreating) {
564
565
566
567
568
569
570
571
572
573
				let type = inputData[0];

				if (type instanceof Array) {
					type = "COMBO";
				}

				let widget;
				if (type in ComfyWidgets) {
					widget = (ComfyWidgets[type](this, "value", inputData, app) || {}).widget;
				} else {
574
					widget = this.addWidget(type, "value", null, () => {}, {});
575
576
577
578
579
580
581
582
583
				}

				if (node?.widgets && widget) {
					const theirWidget = node.widgets.find((w) => w.name === widgetName);
					if (theirWidget) {
						widget.value = theirWidget.value;
					}
				}

pythongosssss's avatar
pythongosssss committed
584
				if (!inputData?.[1]?.control_after_generate && (widget.type === "number" || widget.type === "combo")) {
585
586
587
588
					let control_value = this.widgets_values?.[1];
					if (!control_value) {
						control_value = "fixed";
					}
pythongosssss's avatar
pythongosssss committed
589
					addValueControlWidgets(this, widget, control_value, undefined, inputData);
pythongosssss's avatar
pythongosssss committed
590
591
592
593
					let filter = this.widgets_values?.[2];
					if(filter && this.widgets.length === 3) {
						this.widgets[2].value = filter;
					}
594
595
				}

pythongosssss's avatar
pythongosssss committed
596
597
598
599
600
601
602
603
604
605
				// When our value changes, update other widgets to reflect our changes
				// e.g. so LoadImage shows correct image
				const callback = widget.callback;
				const self = this;
				widget.callback = function () {
					const r = callback ? callback.apply(this, arguments) : undefined;
					self.applyToGraph();
					return r;
				};

606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
				if (!recreating) {
					// Grow our node if required
					const sz = this.computeSize();
					if (this.size[0] < sz[0]) {
						this.size[0] = sz[0];
					}
					if (this.size[1] < sz[1]) {
						this.size[1] = sz[1];
					}

					requestAnimationFrame(() => {
						if (this.onResize) {
							this.onResize(this.size);
						}
					});
621
				}
622
623
624
625
626
627
628
			}

			#recreateWidget() {
				const values = this.widgets.map((w) => w.value);
				this.#removeWidgets();
				this.#onFirstConnection(true);
				for (let i = 0; i < this.widgets?.length; i++) this.widgets[i].value = values[i];
pythongosssss's avatar
pythongosssss committed
629
				return this.widgets[0];
630
631
632
633
634
635
636
637
638
639
			}

			#mergeWidgetConfig() {
				// Merge widget configs if the node has multiple outputs
				const output = this.outputs[0];
				const links = output.links;

				const hasConfig = !!output.widget[CONFIG];
				if (hasConfig) {
					delete output.widget[CONFIG];
640
641
				}

642
643
644
645
				if (links?.length < 2 && hasConfig) {
					// Copy the widget options from the source
					if (links.length) {
						this.#recreateWidget();
646
					}
647
648
649
650

					return;
				}

651
				const config1 = output.widget[GET_CONFIG]();
652
653
654
655
656
657
658
659
660
661
662
663
664
				const isNumber = config1[0] === "INT" || config1[0] === "FLOAT";
				if (!isNumber) return;

				for (const linkId of links) {
					const link = app.graph.links[linkId];
					if (!link) continue; // Can be null when removing a node

					const theirNode = app.graph.getNodeById(link.target_id);
					const theirInput = theirNode.inputs[link.target_slot];

					// Call is valid connection so it can merge the configs when validating
					this.#isValidConnection(theirInput, hasConfig);
				}
665
666
			}

667
			#isValidConnection(input, forceUpdate) {
668
				// Only allow connections where the configs match
669
				const output = this.outputs[0];
670
				const config2 = input.widget[GET_CONFIG]();
pythongosssss's avatar
pythongosssss committed
671
				return !!mergeIfValid.call(this, output, config2, forceUpdate, this.#recreateWidget);
672
673
			}

674
			#removeWidgets() {
675
676
677
678
679
680
681
682
683
684
				if (this.widgets) {
					// Allow widgets to cleanup
					for (const w of this.widgets) {
						if (w.onRemove) {
							w.onRemove();
						}
					}
					this.widgets.length = 0;
				}
			}
685
686
687
688
689
690
691
692
693
694

			#onLastDisconnect() {
				// We cant remove + re-add the output here as if you drag a link over the same link
				// it removes, then re-adds, causing it to break
				this.outputs[0].type = "*";
				this.outputs[0].name = "connect to widget input";
				delete this.outputs[0].widget;

				this.#removeWidgets();
			}
695
696
697
698
699
700
701
702
703
704
705
		}

		LiteGraph.registerNodeType(
			"PrimitiveNode",
			Object.assign(PrimitiveNode, {
				title: "Primitive",
			})
		);
		PrimitiveNode.category = "utils";
	},
});