ComfyUI/web/assets/index--0nRVkuV.js.map

1 line
376 KiB
Plaintext
Raw Normal View History

2024-08-16 19:25:02 +00:00
{"version":3,"file":"index--0nRVkuV.js","sources":["../../src/extensions/core/clipspace.ts","../../src/extensions/core/colorPalette.ts","../../src/extensions/core/contextMenuFilter.ts","../../src/extensions/core/dynamicPrompts.ts","../../src/extensions/core/editAttention.ts","../../src/extensions/core/widgetInputs.ts","../../src/extensions/core/groupNodeManage.ts","../../src/extensions/core/groupNode.ts","../../src/extensions/core/groupOptions.ts","../../src/extensions/core/invertMenuScrolling.ts","../../src/extensions/core/keybinds.ts","../../src/extensions/core/linkRenderMode.ts","../../src/extensions/core/maskeditor.ts","../../src/extensions/core/nodeTemplates.ts","../../src/extensions/core/noteNode.ts","../../src/extensions/core/rerouteNode.ts","../../src/extensions/core/saveImageExtraOutput.ts","../../src/extensions/core/simpleTouchSupport.ts","../../src/extensions/core/slotDefaults.ts","../../src/extensions/core/snapToGrid.ts","../../src/extensions/core/uploadImage.ts","../../src/extensions/core/webcamCapture.ts","../../src/extensions/core/uploadAudio.ts"],"sourcesContent":["import { app } from '../../scripts/app'\r\nimport { ComfyDialog, $el } from '../../scripts/ui'\r\nimport { ComfyApp } from '../../scripts/app'\r\n\r\nexport class ClipspaceDialog extends ComfyDialog {\r\n static items = []\r\n static instance = null\r\n\r\n static registerButton(name, contextPredicate, callback) {\r\n const item = $el('button', {\r\n type: 'button',\r\n textContent: name,\r\n contextPredicate: contextPredicate,\r\n onclick: callback\r\n })\r\n\r\n ClipspaceDialog.items.push(item)\r\n }\r\n\r\n static invalidatePreview() {\r\n if (\r\n ComfyApp.clipspace &&\r\n ComfyApp.clipspace.imgs &&\r\n ComfyApp.clipspace.imgs.length > 0\r\n ) {\r\n const img_preview = document.getElementById(\r\n 'clipspace_preview'\r\n ) as HTMLImageElement\r\n if (img_preview) {\r\n img_preview.src =\r\n ComfyApp.clipspace.imgs[ComfyApp.clipspace['selectedIndex']].src\r\n img_preview.style.maxHeight = '100%'\r\n img_preview.style.maxWidth = '100%'\r\n }\r\n }\r\n }\r\n\r\n static invalidate() {\r\n if (ClipspaceDialog.instance) {\r\n const self = ClipspaceDialog.instance\r\n // allow reconstruct controls when copying from non-image to image content.\r\n const children = $el('div.comfy-modal-content', [\r\n self.createImgSettings(),\r\n ...self.createButtons()\r\n ])\r\n\r\n if (self.element) {\r\n // update\r\n self.element.removeChild(self.element.firstChild)\r\n self.element.appendChild(children)\r\n } else {\r\n // new\r\n self.element = $el('div.comfy-modal', { parent: document.body }, [\r\n children\r\n ])\r\n }\r\n\r\n if (self.element.children[0].children.length <= 1) {\r\n self.element.children[0].appendChild(\r\n $el('p', {}, [\r\n 'Unable to find the features to edit content of a format stored in the current Clipspace.'\r\n ])\r\n )\r\n }\r\n\r\n ClipspaceDialog.invalidatePreview()\r\n }\r\n }\r\n\r\n constructor() {\r\n super()\r\n }\r\n\r\n createButtons() {\r\n const buttons = []\r\n\r\n for (let idx in ClipspaceDialog.items) {\r\n const item = ClipspaceDialog.items[idx]\r\n if (!item.contextPredicate || item.contextPredicate())\r\n buttons.push(ClipspaceDialog.items[idx])\r\n }\r\n\r\n buttons.push(\r\n $el('button', {\r\n type: 'button',\r\n textContent: 'Close',\r\n onclick: () => {\r\n this.close()\r\n }\r\n })\r\n )\r\n\r\n return buttons\r\n }\r\n\r\n createImgSettings() {\r\n if (ComfyApp.clipspace.imgs) {\r\n const combo_items = []\r\n const imgs = ComfyApp.clipspace.imgs\r\n\r\n for (let i = 0; i < imgs.length; i++) {\r\n combo_items.push($el('option', { value: i }, [`${i}`]))\r\n }\r\n\r\n const combo1 = $el(\r\n 'select',\r