Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c291325de9 |
@@ -1,2 +0,0 @@
|
|||||||
[*]
|
|
||||||
end_of_line = lf
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
name: 🐞 Bug Report
|
name: 🐞 Bug Report
|
||||||
title: '[bug] '
|
title: "[bug] "
|
||||||
description: Report a bug
|
description: Report a bug
|
||||||
labels: ['type: 🐛 bug', 'status: 🧹 needs triage']
|
labels: ["type: 🐛 bug", "status: 🧹 needs triage"]
|
||||||
assignees:
|
assignees:
|
||||||
- melMass
|
- melMass
|
||||||
|
|
||||||
@@ -12,8 +12,6 @@ body:
|
|||||||
## Before submiting an issue
|
## Before submiting an issue
|
||||||
- Make sure to read the README & INSTALL instructions.
|
- Make sure to read the README & INSTALL instructions.
|
||||||
- Please search for [existing issues](https://github.com/melMass/comfy_mtb/issues?q=is%3Aissue) around your problem before filing a report.
|
- Please search for [existing issues](https://github.com/melMass/comfy_mtb/issues?q=is%3Aissue) around your problem before filing a report.
|
||||||
- Optionally check the `#mtb-nodes` channel on the Banodoco discord:
|
|
||||||
[](https://discord.gg/IAXhsabmDhn)
|
|
||||||
|
|
||||||
### Try using the debug mode to get more info
|
### Try using the debug mode to get more info
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,3 @@
|
|||||||
[submodule "extern/frame_interpolation"]
|
[submodule "extern/frame_interpolation"]
|
||||||
path = extern/frame_interpolation
|
path = extern/frame_interpolation
|
||||||
url = https://github.com/google-research/frame-interpolation
|
url = https://github.com/google-research/frame-interpolation
|
||||||
[submodule "wiki"]
|
|
||||||
path = wiki
|
|
||||||
url = https://github.com/melMass/comfy_mtb.wiki.git
|
|
||||||
|
|||||||
@@ -1,10 +0,0 @@
|
|||||||
-- HACK: this should theorically not be needed since the lsp should read from the pyproject
|
|
||||||
-- tried: ruff-lsp or basedpyright
|
|
||||||
|
|
||||||
local comfyRoot = vim.fn.expand("%:p:h:h:h")
|
|
||||||
|
|
||||||
if not vim.env.PYTHONPATH or vim.env.PYTHONPATH == "" then
|
|
||||||
vim.env.PYTHONPATH = comfyRoot
|
|
||||||
else
|
|
||||||
vim.env.PYTHONPATH = vim.env.PYTHONPATH .. ";" .. comfyRoot
|
|
||||||
end
|
|
||||||
@@ -15,11 +15,6 @@
|
|||||||
|
|
||||||
[**Install Guide**](./INSTALL.md) | [**Examples**](https://github.com/melMass/comfy_mtb/wiki/Examples)
|
[**Install Guide**](./INSTALL.md) | [**Examples**](https://github.com/melMass/comfy_mtb/wiki/Examples)
|
||||||
|
|
||||||
There is now a dedicated `#mtb-nodes` channel on the Banodoco discord:
|
|
||||||
[](https://discord.gg/IAXhsabmDhn)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Welcome to the MTB Nodes project! This codebase is open for you to explore and utilize as you wish. Its primary purpose is to build proof-of-concepts (POCs) for implementation in [MLOPs](https://github.com/Bismuth-Consultancy-BV/MLOPs). Many nodes in this project are inspired by existing community contributions or built-in functionalities.
|
Welcome to the MTB Nodes project! This codebase is open for you to explore and utilize as you wish. Its primary purpose is to build proof-of-concepts (POCs) for implementation in [MLOPs](https://github.com/Bismuth-Consultancy-BV/MLOPs). Many nodes in this project are inspired by existing community contributions or built-in functionalities.
|
||||||
|
|
||||||
Before proceeding, please be aware of the licenses associated with certain libraries used in this project. For example, the `deepbump` library is licensed under [GPLv3](https://github.com/HugoTini/DeepBump/blob/master/LICENSE).
|
Before proceeding, please be aware of the licenses associated with certain libraries used in this project. For example, the `deepbump` library is licensed under [GPLv3](https://github.com/HugoTini/DeepBump/blob/master/LICENSE).
|
||||||
@@ -46,7 +41,6 @@ mtb add a few widgets like `COLOR`
|
|||||||
A few nodes have the concept of "dynamic" inputs:
|
A few nodes have the concept of "dynamic" inputs:
|
||||||
<img alt="dynamic inputs" width=450 src="https://github.com/melMass/comfy_mtb/assets/7041726/10b3976e-b212-4968-91eb-f34c02bb80c3" />
|
<img alt="dynamic inputs" width=450 src="https://github.com/melMass/comfy_mtb/assets/7041726/10b3976e-b212-4968-91eb-f34c02bb80c3" />
|
||||||
|
|
||||||
<!-- NOTE: Here it should just be some examples and warnings, move the rest to the wiki -->
|
|
||||||
|
|
||||||
# Node List
|
# Node List
|
||||||
|
|
||||||
|
|||||||
+5
-14
@@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
# -*- coding:utf-8 -*-
|
||||||
###
|
###
|
||||||
# File: __init__.py
|
# File: __init__.py
|
||||||
# Project: comfy_mtb
|
# Project: comfy_mtb
|
||||||
@@ -42,7 +43,7 @@ __version__ = "0.2.0"
|
|||||||
def extract_nodes_from_source(filename):
|
def extract_nodes_from_source(filename):
|
||||||
source_code = ""
|
source_code = ""
|
||||||
|
|
||||||
with open(filename, encoding="utf8") as file:
|
with open(filename, "r", encoding="utf8") as file:
|
||||||
source_code = file.read()
|
source_code = file.read()
|
||||||
|
|
||||||
nodes = []
|
nodes = []
|
||||||
@@ -80,7 +81,7 @@ def load_nodes():
|
|||||||
module = importlib.import_module(
|
module = importlib.import_module(
|
||||||
f".nodes.{module_name}", package=__package__
|
f".nodes.{module_name}", package=__package__
|
||||||
)
|
)
|
||||||
_nodes = getattr(module, "__nodes__", [])
|
_nodes = getattr(module, "__nodes__")
|
||||||
nodes.extend(_nodes)
|
nodes.extend(_nodes)
|
||||||
log.debug(f"Imported {module_name} nodes")
|
log.debug(f"Imported {module_name} nodes")
|
||||||
|
|
||||||
@@ -96,7 +97,7 @@ def load_nodes():
|
|||||||
|
|
||||||
if errors:
|
if errors:
|
||||||
log.debug(
|
log.debug(
|
||||||
"Some nodes failed to load:\n\t"
|
f"Some nodes failed to load:\n\t"
|
||||||
+ "\n\t".join(errors)
|
+ "\n\t".join(errors)
|
||||||
+ "\n\n"
|
+ "\n\n"
|
||||||
+ "Check that you properly installed the dependencies.\n"
|
+ "Check that you properly installed the dependencies.\n"
|
||||||
@@ -126,10 +127,6 @@ if web_mtb.exists() and hasattr(nodes, "EXTENSION_WEB_DIRS"):
|
|||||||
nodes, failed = load_nodes()
|
nodes, failed = load_nodes()
|
||||||
for node_class in nodes:
|
for node_class in nodes:
|
||||||
class_name = node_class.__name__
|
class_name = node_class.__name__
|
||||||
# fallback to __doc__
|
|
||||||
if not hasattr(node_class, "DESCRIPTION") and node_class.__doc__:
|
|
||||||
node_class.DESCRIPTION = node_class.__doc__
|
|
||||||
|
|
||||||
node_label = f"{get_label(class_name)} (mtb)"
|
node_label = f"{get_label(class_name)} (mtb)"
|
||||||
NODE_CLASS_MAPPINGS[node_label] = node_class
|
NODE_CLASS_MAPPINGS[node_label] = node_class
|
||||||
NODE_DISPLAY_NAME_MAPPINGS[class_name] = node_label
|
NODE_DISPLAY_NAME_MAPPINGS[class_name] = node_label
|
||||||
@@ -150,7 +147,7 @@ for node_class in nodes:
|
|||||||
)
|
)
|
||||||
|
|
||||||
log.debug(
|
log.debug(
|
||||||
"Loaded the following nodes:\n\t"
|
f"Loaded the following nodes:\n\t"
|
||||||
+ "\n\t".join(
|
+ "\n\t".join(
|
||||||
f"{cyan_text(k)}: {blue_text(get_summary(doc)) if doc else '-'}"
|
f"{cyan_text(k)}: {blue_text(get_summary(doc)) if doc else '-'}"
|
||||||
for k, doc in NODE_CLASS_MAPPINGS_DEBUG.items()
|
for k, doc in NODE_CLASS_MAPPINGS_DEBUG.items()
|
||||||
@@ -185,12 +182,6 @@ if hasattr(PromptServer, "instance"):
|
|||||||
"/mtb-assets/", path=(here / "html").as_posix()
|
"/mtb-assets/", path=(here / "html").as_posix()
|
||||||
)
|
)
|
||||||
|
|
||||||
# NOTE: we add an extra static path to avoid comfy mechanism
|
|
||||||
# that loads every script in web.
|
|
||||||
PromptServer.instance.app.add_routes(
|
|
||||||
[web.static("/mtb_async", (here / "web_async").as_posix())]
|
|
||||||
)
|
|
||||||
|
|
||||||
@PromptServer.instance.routes.get("/mtb/manage")
|
@PromptServer.instance.routes.get("/mtb/manage")
|
||||||
async def manage(request):
|
async def manage(request):
|
||||||
from . import endpoint
|
from . import endpoint
|
||||||
|
|||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://biomejs.dev/schemas/1.6.1/schema.json",
|
|
||||||
"organizeImports": {
|
|
||||||
"enabled": true
|
|
||||||
},
|
|
||||||
"linter": {
|
|
||||||
"enabled": true,
|
|
||||||
"rules": {
|
|
||||||
"recommended": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"javascript": {
|
|
||||||
"formatter": {
|
|
||||||
"quoteStyle": "single",
|
|
||||||
"semicolons": "asNeeded",
|
|
||||||
"indentWidth": 2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
+2
-32
@@ -1,7 +1,7 @@
|
|||||||
from ..log import log
|
from ..log import log
|
||||||
|
|
||||||
|
|
||||||
class MTB_AnimationBuilder:
|
class AnimationBuilder:
|
||||||
"""Simple maths for animation."""
|
"""Simple maths for animation."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -21,36 +21,6 @@ class MTB_AnimationBuilder:
|
|||||||
RETURN_NAMES = ("frame", "0-1 (scaled)", "count", "loop_ended")
|
RETURN_NAMES = ("frame", "0-1 (scaled)", "count", "loop_ended")
|
||||||
CATEGORY = "mtb/animation"
|
CATEGORY = "mtb/animation"
|
||||||
FUNCTION = "build_animation"
|
FUNCTION = "build_animation"
|
||||||
DESCRIPTION = """
|
|
||||||
# Animation Builder
|
|
||||||
|
|
||||||
Check the
|
|
||||||
[wiki page](https://github.com/melMass/comfy_mtb/wiki/nodes-animation-builder)
|
|
||||||
for more info.
|
|
||||||
|
|
||||||
|
|
||||||
- This basic example should help to understand the meaning of
|
|
||||||
its inputs and outputs thanks to the [debug](nodes-debug) node.
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
- In this other example Animation Builder is used in combination with
|
|
||||||
[Batch From History](https://github.com/melMass/comfy_mtb/wiki/nodes-batch-from-history)
|
|
||||||
to create a zoom-in animation on a static image
|
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
## Inputs
|
|
||||||
|
|
||||||
| name | description |
|
|
||||||
| ---- | :----------:|
|
|
||||||
| total_frames | The number of frame to queue (this is multiplied by the `loop_count`)|
|
|
||||||
| scale_float | Convenience input to scale the normalized `current value` (a float between 0 and 1 lerp over the current queue length) |
|
|
||||||
| loop_count | The number of loops to queue |
|
|
||||||
| **Reset Button** | resets the internal counters, although the node is though around using its queue button it should still work fine when using the regular queue button of comfy |
|
|
||||||
| **Queue Button** | Convenience button to run the queues (`total_frames` * `loop_count`) |
|
|
||||||
|
|
||||||
"""
|
|
||||||
|
|
||||||
def build_animation(
|
def build_animation(
|
||||||
self,
|
self,
|
||||||
@@ -71,4 +41,4 @@ to create a zoom-in animation on a static image
|
|||||||
return (frame, scaled, raw_loop, (frame == (total_frames - 1)))
|
return (frame, scaled, raw_loop, (frame == (total_frames - 1)))
|
||||||
|
|
||||||
|
|
||||||
__nodes__ = [MTB_AnimationBuilder]
|
__nodes__ = [AnimationBuilder]
|
||||||
|
|||||||
+46
-74
@@ -18,7 +18,7 @@ def hex_to_rgb(hex_color, bgr=False):
|
|||||||
return tuple(int(hex_color[i : i + 2], 16) for i in (0, 2, 4))
|
return tuple(int(hex_color[i : i + 2], 16) for i in (0, 2, 4))
|
||||||
|
|
||||||
|
|
||||||
class MTB_BatchMake:
|
class BatchMake:
|
||||||
"""Simply duplicates the input frame as a batch"""
|
"""Simply duplicates the input frame as a batch"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -41,7 +41,7 @@ class MTB_BatchMake:
|
|||||||
return (image.repeat(count, 1, 1, 1),)
|
return (image.repeat(count, 1, 1, 1),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_BatchShape:
|
class BatchShape:
|
||||||
"""Generates a batch of 2D shapes with optional shading (experimental)"""
|
"""Generates a batch of 2D shapes with optional shading (experimental)"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -50,8 +50,8 @@ class MTB_BatchShape:
|
|||||||
"required": {
|
"required": {
|
||||||
"count": ("INT", {"default": 1}),
|
"count": ("INT", {"default": 1}),
|
||||||
"shape": (
|
"shape": (
|
||||||
["Box", "Circle", "Diamond", "Tube"],
|
["Box", "Circle", "Diamond"],
|
||||||
{"default": "Circle"},
|
{"default": "Box"},
|
||||||
),
|
),
|
||||||
"image_width": ("INT", {"default": 512}),
|
"image_width": ("INT", {"default": 512}),
|
||||||
"image_height": ("INT", {"default": 512}),
|
"image_height": ("INT", {"default": 512}),
|
||||||
@@ -59,7 +59,6 @@ class MTB_BatchShape:
|
|||||||
"color": ("COLOR", {"default": "#ffffff"}),
|
"color": ("COLOR", {"default": "#ffffff"}),
|
||||||
"bg_color": ("COLOR", {"default": "#000000"}),
|
"bg_color": ("COLOR", {"default": "#000000"}),
|
||||||
"shade_color": ("COLOR", {"default": "#000000"}),
|
"shade_color": ("COLOR", {"default": "#000000"}),
|
||||||
"thickness": ("INT", {"default": 5}),
|
|
||||||
"shadex": ("FLOAT", {"default": 0.0}),
|
"shadex": ("FLOAT", {"default": 0.0}),
|
||||||
"shadey": ("FLOAT", {"default": 0.0}),
|
"shadey": ("FLOAT", {"default": 0.0}),
|
||||||
},
|
},
|
||||||
@@ -79,13 +78,12 @@ class MTB_BatchShape:
|
|||||||
color,
|
color,
|
||||||
bg_color,
|
bg_color,
|
||||||
shade_color,
|
shade_color,
|
||||||
thickness,
|
|
||||||
shadex,
|
shadex,
|
||||||
shadey,
|
shadey,
|
||||||
):
|
):
|
||||||
log.debug(f"COLOR: {color}")
|
print(f"COLOR: {color}")
|
||||||
log.debug(f"BG_COLOR: {bg_color}")
|
print(f"BG_COLOR: {bg_color}")
|
||||||
log.debug(f"SHADE_COLOR: {shade_color}")
|
print(f"SHADE_COLOR: {shade_color}")
|
||||||
|
|
||||||
# Parse color input to BGR tuple for OpenCV
|
# Parse color input to BGR tuple for OpenCV
|
||||||
color = hex_to_rgb(color)
|
color = hex_to_rgb(color)
|
||||||
@@ -120,18 +118,6 @@ class MTB_BatchShape:
|
|||||||
)
|
)
|
||||||
cv2.fillPoly(mask, [pts], 255)
|
cv2.fillPoly(mask, [pts], 255)
|
||||||
|
|
||||||
elif shape == "Tube":
|
|
||||||
cv2.ellipse(
|
|
||||||
mask,
|
|
||||||
center,
|
|
||||||
(shape_size // 2, shape_size // 2),
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
360,
|
|
||||||
255,
|
|
||||||
thickness,
|
|
||||||
)
|
|
||||||
|
|
||||||
# Color the shape
|
# Color the shape
|
||||||
canvas[mask == 255] = color
|
canvas[mask == 255] = color
|
||||||
|
|
||||||
@@ -152,7 +138,7 @@ class MTB_BatchShape:
|
|||||||
return (pil2tensor(res),)
|
return (pil2tensor(res),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_BatchFloatFill:
|
class BatchFloatFill:
|
||||||
"""Fills a batch float with a single value until it reaches the target length"""
|
"""Fills a batch float with a single value until it reaches the target length"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -185,7 +171,7 @@ class MTB_BatchFloatFill:
|
|||||||
return (floats,)
|
return (floats,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_BatchFloatAssemble:
|
class BatchFloatAssemble:
|
||||||
"""Assembles mutiple batches of floats into a single stream (batch)"""
|
"""Assembles mutiple batches of floats into a single stream (batch)"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -208,7 +194,7 @@ class MTB_BatchFloatAssemble:
|
|||||||
return (res,)
|
return (res,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_BatchFloat:
|
class BatchFloat:
|
||||||
"""Generates a batch of float values with interpolation"""
|
"""Generates a batch of float values with interpolation"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -220,8 +206,8 @@ class MTB_BatchFloat:
|
|||||||
{"default": "Steps"},
|
{"default": "Steps"},
|
||||||
),
|
),
|
||||||
"count": ("INT", {"default": 1}),
|
"count": ("INT", {"default": 1}),
|
||||||
"min": ("FLOAT", {"default": 0.0, "step": 0.001}),
|
"min": ("FLOAT", {"default": 0.0}),
|
||||||
"max": ("FLOAT", {"default": 1.0, "step": 0.001}),
|
"max": ("FLOAT", {"default": 1.0}),
|
||||||
"easing": (
|
"easing": (
|
||||||
[
|
[
|
||||||
"Linear",
|
"Linear",
|
||||||
@@ -271,7 +257,7 @@ class MTB_BatchFloat:
|
|||||||
return (keyframes,)
|
return (keyframes,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_BatchMerge:
|
class BatchMerge:
|
||||||
"""Merges multiple image batches with different frame counts"""
|
"""Merges multiple image batches with different frame counts"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -290,7 +276,7 @@ class MTB_BatchMerge:
|
|||||||
FUNCTION = "merge_batches"
|
FUNCTION = "merge_batches"
|
||||||
CATEGORY = "mtb/batch"
|
CATEGORY = "mtb/batch"
|
||||||
|
|
||||||
def merge_batches(self, fusion_mode: str, fill: str, **kwargs):
|
def merge_batches(self, fusion_mode, fill, **kwargs):
|
||||||
images = kwargs.values()
|
images = kwargs.values()
|
||||||
max_frames = max(img.shape[0] for img in images)
|
max_frames = max(img.shape[0] for img in images)
|
||||||
|
|
||||||
@@ -327,7 +313,7 @@ class MTB_BatchMerge:
|
|||||||
return (merged_image,)
|
return (merged_image,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_Batch2dTransform:
|
class Batch2dTransform:
|
||||||
"""Transform a batch of images using a batch of keyframes"""
|
"""Transform a batch of images using a batch of keyframes"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -354,12 +340,9 @@ class MTB_Batch2dTransform:
|
|||||||
FUNCTION = "transform_batch"
|
FUNCTION = "transform_batch"
|
||||||
CATEGORY = "mtb/batch"
|
CATEGORY = "mtb/batch"
|
||||||
|
|
||||||
def get_num_elements(
|
def get_num_elements(self, param) -> int:
|
||||||
self, param: None | torch.Tensor | list[torch.Tensor] | list[float]
|
|
||||||
) -> int:
|
|
||||||
if isinstance(param, torch.Tensor):
|
if isinstance(param, torch.Tensor):
|
||||||
return torch.numel(param)
|
return torch.numel(param)
|
||||||
|
|
||||||
elif isinstance(param, list):
|
elif isinstance(param, list):
|
||||||
return len(param)
|
return len(param)
|
||||||
|
|
||||||
@@ -368,13 +351,13 @@ class MTB_Batch2dTransform:
|
|||||||
def transform_batch(
|
def transform_batch(
|
||||||
self,
|
self,
|
||||||
image: torch.Tensor,
|
image: torch.Tensor,
|
||||||
border_handling: str,
|
border_handling,
|
||||||
constant_color: str,
|
constant_color,
|
||||||
x: list[float] | None = None,
|
x=None,
|
||||||
y: list[float] | None = None,
|
y=None,
|
||||||
zoom: list[float] | None = None,
|
zoom=None,
|
||||||
angle: list[float] | None = None,
|
angle=None,
|
||||||
shear: list[float] | None = None,
|
shear=None,
|
||||||
):
|
):
|
||||||
if all(
|
if all(
|
||||||
self.get_num_elements(param) <= 0
|
self.get_num_elements(param) <= 0
|
||||||
@@ -384,26 +367,19 @@ class MTB_Batch2dTransform:
|
|||||||
"At least one transform parameter must be provided"
|
"At least one transform parameter must be provided"
|
||||||
)
|
)
|
||||||
|
|
||||||
keyframes: dict[str, list[float]] = {
|
keyframes = {"x": [], "y": [], "zoom": [], "angle": [], "shear": []}
|
||||||
"x": [],
|
|
||||||
"y": [],
|
|
||||||
"zoom": [],
|
|
||||||
"angle": [],
|
|
||||||
"shear": [],
|
|
||||||
}
|
|
||||||
|
|
||||||
default_vals = {"x": 0, "y": 0, "zoom": 1.0, "angle": 0, "shear": 0}
|
default_vals = {"x": 0, "y": 0, "zoom": 1.0, "angle": 0, "shear": 0}
|
||||||
|
|
||||||
if x and self.get_num_elements(x) > 0:
|
if self.get_num_elements(x) > 0:
|
||||||
keyframes["x"] = x
|
keyframes["x"] = x
|
||||||
if y and self.get_num_elements(y) > 0:
|
if self.get_num_elements(y) > 0:
|
||||||
keyframes["y"] = y
|
keyframes["y"] = y
|
||||||
if zoom and self.get_num_elements(zoom) > 0:
|
if self.get_num_elements(zoom) > 0:
|
||||||
# some easing types like elastic can pull back... maybe it should abs the value?
|
keyframes["zoom"] = zoom
|
||||||
keyframes["zoom"] = [max(x, 0.00001) for x in zoom]
|
if self.get_num_elements(angle) > 0:
|
||||||
if angle and self.get_num_elements(angle) > 0:
|
|
||||||
keyframes["angle"] = angle
|
keyframes["angle"] = angle
|
||||||
if shear and self.get_num_elements(shear) > 0:
|
if self.get_num_elements(shear) > 0:
|
||||||
keyframes["shear"] = shear
|
keyframes["shear"] = shear
|
||||||
|
|
||||||
for name, values in keyframes.items():
|
for name, values in keyframes.items():
|
||||||
@@ -432,7 +408,7 @@ class MTB_Batch2dTransform:
|
|||||||
return (torch.cat(res, dim=0),)
|
return (torch.cat(res, dim=0),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_PlotBatchFloat:
|
class PlotBatchFloat:
|
||||||
"""Plot floats"""
|
"""Plot floats"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -567,7 +543,7 @@ class MTB_PlotBatchFloat:
|
|||||||
DEFAULT_INTERPOLANT = lambda t: t * t * t * (t * (t * 6 - 15) + 10)
|
DEFAULT_INTERPOLANT = lambda t: t * t * t * (t * (t * 6 - 15) + 10)
|
||||||
|
|
||||||
|
|
||||||
class MTB_BatchShake:
|
class BatchShake:
|
||||||
"""Applies a shaking effect to batches of images."""
|
"""Applies a shaking effect to batches of images."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -609,12 +585,10 @@ class MTB_BatchShake:
|
|||||||
interpolant: The interpolation function, defaults to
|
interpolant: The interpolation function, defaults to
|
||||||
t*t*t*(t*(t*6 - 15) + 10).
|
t*t*t*(t*(t*6 - 15) + 10).
|
||||||
|
|
||||||
Returns
|
Returns:
|
||||||
-------
|
|
||||||
A numpy array of shape shape with the generated noise.
|
A numpy array of shape shape with the generated noise.
|
||||||
|
|
||||||
Raises
|
Raises:
|
||||||
------
|
|
||||||
ValueError: If shape is not a multiple of res.
|
ValueError: If shape is not a multiple of res.
|
||||||
"""
|
"""
|
||||||
interpolant = interpolant or DEFAULT_INTERPOLANT
|
interpolant = interpolant or DEFAULT_INTERPOLANT
|
||||||
@@ -677,13 +651,11 @@ class MTB_BatchShake:
|
|||||||
interpolant: The, interpolation function, defaults to
|
interpolant: The, interpolation function, defaults to
|
||||||
t*t*t*(t*(t*6 - 15) + 10).
|
t*t*t*(t*(t*6 - 15) + 10).
|
||||||
|
|
||||||
Returns
|
Returns:
|
||||||
-------
|
|
||||||
A numpy array of fractal noise and of shape shape generated by
|
A numpy array of fractal noise and of shape shape generated by
|
||||||
combining several octaves of perlin noise.
|
combining several octaves of perlin noise.
|
||||||
|
|
||||||
Raises
|
Raises:
|
||||||
------
|
|
||||||
ValueError: If shape is not a multiple of
|
ValueError: If shape is not a multiple of
|
||||||
(lacunarity**(octaves-1)*res).
|
(lacunarity**(octaves-1)*res).
|
||||||
"""
|
"""
|
||||||
@@ -772,7 +744,7 @@ class MTB_BatchShake:
|
|||||||
# rotations = torch.tensor(rotations, dtype=torch.float32)
|
# rotations = torch.tensor(rotations, dtype=torch.float32)
|
||||||
|
|
||||||
# Create an instance of Batch2dTransform
|
# Create an instance of Batch2dTransform
|
||||||
transform = MTB_Batch2dTransform()
|
transform = Batch2dTransform()
|
||||||
|
|
||||||
log.debug(
|
log.debug(
|
||||||
f"Applying shaking with parameters: \nposition {position_amount_x}, {position_amount_y}\nrotation {rotation_amount}\nfrequency {frequency}\noctaves {octaves}"
|
f"Applying shaking with parameters: \nposition {position_amount_x}, {position_amount_y}\nrotation {rotation_amount}\nfrequency {frequency}\noctaves {octaves}"
|
||||||
@@ -792,13 +764,13 @@ class MTB_BatchShake:
|
|||||||
|
|
||||||
|
|
||||||
__nodes__ = [
|
__nodes__ = [
|
||||||
MTB_BatchFloat,
|
BatchFloat,
|
||||||
MTB_Batch2dTransform,
|
Batch2dTransform,
|
||||||
MTB_BatchShape,
|
BatchShape,
|
||||||
MTB_BatchMake,
|
BatchMake,
|
||||||
MTB_BatchFloatAssemble,
|
BatchFloatAssemble,
|
||||||
MTB_BatchFloatFill,
|
BatchFloatFill,
|
||||||
MTB_BatchMerge,
|
BatchMerge,
|
||||||
MTB_BatchShake,
|
BatchShake,
|
||||||
MTB_PlotBatchFloat,
|
PlotBatchFloat,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
import json
|
|
||||||
|
|
||||||
from ..log import log
|
|
||||||
|
|
||||||
|
|
||||||
class MTB_Constant:
|
|
||||||
@classmethod
|
|
||||||
def INPUT_TYPES(cls):
|
|
||||||
return {
|
|
||||||
"required": {"Value": ("*",)},
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN_TYPES = ("*",)
|
|
||||||
RETURN_NAMES = ("output",)
|
|
||||||
CATEGORY = "mtb/utils"
|
|
||||||
FUNCTION = "execute"
|
|
||||||
|
|
||||||
def execute(
|
|
||||||
self,
|
|
||||||
**kwargs,
|
|
||||||
):
|
|
||||||
log.debug("Received kwargs")
|
|
||||||
log.debug(json.dumps(kwargs, check_circular=True))
|
|
||||||
return (kwargs.get("Value"),)
|
|
||||||
|
|
||||||
|
|
||||||
__nodes__ = [MTB_Constant]
|
|
||||||
+17
-52
@@ -1,6 +1,6 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
from PIL import Image, ImageDraw, ImageFilter
|
from PIL import Image, ImageChops, ImageDraw, ImageFilter
|
||||||
|
|
||||||
from ..log import log
|
from ..log import log
|
||||||
from ..utils import np2tensor, pil2tensor, tensor2np, tensor2pil
|
from ..utils import np2tensor, pil2tensor, tensor2np, tensor2pil
|
||||||
@@ -14,14 +14,8 @@ class Bbox:
|
|||||||
return {
|
return {
|
||||||
"required": {
|
"required": {
|
||||||
# "bbox": ("BBOX",),
|
# "bbox": ("BBOX",),
|
||||||
"x": (
|
"x": ("INT", {"default": 0, "max": 10000000, "min": 0, "step": 1}),
|
||||||
"INT",
|
"y": ("INT", {"default": 0, "max": 10000000, "min": 0, "step": 1}),
|
||||||
{"default": 0, "max": 10000000, "min": 0, "step": 1},
|
|
||||||
),
|
|
||||||
"y": (
|
|
||||||
"INT",
|
|
||||||
{"default": 0, "max": 10000000, "min": 0, "step": 1},
|
|
||||||
),
|
|
||||||
"width": (
|
"width": (
|
||||||
"INT",
|
"INT",
|
||||||
{"default": 256, "max": 10000000, "min": 0, "step": 1},
|
{"default": 256, "max": 10000000, "min": 0, "step": 1},
|
||||||
@@ -37,8 +31,9 @@ class Bbox:
|
|||||||
FUNCTION = "do_crop"
|
FUNCTION = "do_crop"
|
||||||
CATEGORY = "mtb/crop"
|
CATEGORY = "mtb/crop"
|
||||||
|
|
||||||
def do_crop(self, x: int, y: int, width: int, height: int): # bbox
|
def do_crop(self, x, y, width, height): # bbox
|
||||||
return ((x, y, width, height),)
|
return ((x, y, width, height),)
|
||||||
|
# return bbox
|
||||||
|
|
||||||
|
|
||||||
class BboxFromMask:
|
class BboxFromMask:
|
||||||
@@ -67,9 +62,7 @@ class BboxFromMask:
|
|||||||
FUNCTION = "extract_bounding_box"
|
FUNCTION = "extract_bounding_box"
|
||||||
CATEGORY = "mtb/crop"
|
CATEGORY = "mtb/crop"
|
||||||
|
|
||||||
def extract_bounding_box(
|
def extract_bounding_box(self, mask: torch.Tensor, invert: bool, image=None):
|
||||||
self, mask: torch.Tensor, invert: bool, image=None
|
|
||||||
):
|
|
||||||
# if image != None:
|
# if image != None:
|
||||||
# if mask.size(0) != image.size(0):
|
# if mask.size(0) != image.size(0):
|
||||||
# if mask.size(0) != 1:
|
# if mask.size(0) != 1:
|
||||||
@@ -125,14 +118,8 @@ class Crop:
|
|||||||
},
|
},
|
||||||
"optional": {
|
"optional": {
|
||||||
"mask": ("MASK",),
|
"mask": ("MASK",),
|
||||||
"x": (
|
"x": ("INT", {"default": 0, "max": 10000000, "min": 0, "step": 1}),
|
||||||
"INT",
|
"y": ("INT", {"default": 0, "max": 10000000, "min": 0, "step": 1}),
|
||||||
{"default": 0, "max": 10000000, "min": 0, "step": 1},
|
|
||||||
),
|
|
||||||
"y": (
|
|
||||||
"INT",
|
|
||||||
{"default": 0, "max": 10000000, "min": 0, "step": 1},
|
|
||||||
),
|
|
||||||
"width": (
|
"width": (
|
||||||
"INT",
|
"INT",
|
||||||
{"default": 256, "max": 10000000, "min": 0, "step": 1},
|
{"default": 256, "max": 10000000, "min": 0, "step": 1},
|
||||||
@@ -151,14 +138,7 @@ class Crop:
|
|||||||
CATEGORY = "mtb/crop"
|
CATEGORY = "mtb/crop"
|
||||||
|
|
||||||
def do_crop(
|
def do_crop(
|
||||||
self,
|
self, image: torch.Tensor, mask=None, x=0, y=0, width=256, height=256, bbox=None
|
||||||
image: torch.Tensor,
|
|
||||||
mask=None,
|
|
||||||
x=0,
|
|
||||||
y=0,
|
|
||||||
width=256,
|
|
||||||
height=256,
|
|
||||||
bbox=None,
|
|
||||||
):
|
):
|
||||||
image = image.numpy()
|
image = image.numpy()
|
||||||
if mask is not None:
|
if mask is not None:
|
||||||
@@ -171,17 +151,13 @@ class Crop:
|
|||||||
cropped_mask = None
|
cropped_mask = None
|
||||||
if mask is not None:
|
if mask is not None:
|
||||||
cropped_mask = (
|
cropped_mask = (
|
||||||
mask[:, y : y + height, x : x + width]
|
mask[:, y : y + height, x : x + width] if mask is not None else None
|
||||||
if mask is not None
|
|
||||||
else None
|
|
||||||
)
|
)
|
||||||
crop_data = (x, y, width, height)
|
crop_data = (x, y, width, height)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
torch.from_numpy(cropped_image),
|
torch.from_numpy(cropped_image),
|
||||||
torch.from_numpy(cropped_mask)
|
torch.from_numpy(cropped_mask) if cropped_mask is not None else None,
|
||||||
if cropped_mask is not None
|
|
||||||
else None,
|
|
||||||
crop_data,
|
crop_data,
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -222,8 +198,7 @@ class Uncrop:
|
|||||||
"""Uncrops an image to a given bounding box
|
"""Uncrops an image to a given bounding box
|
||||||
|
|
||||||
The bounding box can be given as a tuple of (x, y, width, height) or as a BBOX type
|
The bounding box can be given as a tuple of (x, y, width, height) or as a BBOX type
|
||||||
The BBOX input takes precedence over the tuple input
|
The BBOX input takes precedence over the tuple input"""
|
||||||
"""
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
@@ -247,15 +222,11 @@ class Uncrop:
|
|||||||
def do_crop(self, image, crop_image, bbox, border_blending):
|
def do_crop(self, image, crop_image, bbox, border_blending):
|
||||||
def inset_border(image, border_width=20, border_color=(0)):
|
def inset_border(image, border_width=20, border_color=(0)):
|
||||||
width, height = image.size
|
width, height = image.size
|
||||||
bordered_image = Image.new(
|
bordered_image = Image.new(image.mode, (width, height), border_color)
|
||||||
image.mode, (width, height), border_color
|
|
||||||
)
|
|
||||||
bordered_image.paste(image, (0, 0))
|
bordered_image.paste(image, (0, 0))
|
||||||
draw = ImageDraw.Draw(bordered_image)
|
draw = ImageDraw.Draw(bordered_image)
|
||||||
draw.rectangle(
|
draw.rectangle(
|
||||||
(0, 0, width - 1, height - 1),
|
(0, 0, width - 1, height - 1), outline=border_color, width=border_width
|
||||||
outline=border_color,
|
|
||||||
width=border_width,
|
|
||||||
)
|
)
|
||||||
return bordered_image
|
return bordered_image
|
||||||
|
|
||||||
@@ -278,9 +249,7 @@ class Uncrop:
|
|||||||
# uncrop the image based on the bounding box
|
# uncrop the image based on the bounding box
|
||||||
bb_x, bb_y, bb_width, bb_height = bbox
|
bb_x, bb_y, bb_width, bb_height = bbox
|
||||||
|
|
||||||
paste_region = bbox_to_region(
|
paste_region = bbox_to_region((bb_x, bb_y, bb_width, bb_height), img.size)
|
||||||
(bb_x, bb_y, bb_width, bb_height), img.size
|
|
||||||
)
|
|
||||||
# log.debug(f"Paste region: {paste_region}")
|
# log.debug(f"Paste region: {paste_region}")
|
||||||
# new_region = adjust_paste_region(img.size, paste_region)
|
# new_region = adjust_paste_region(img.size, paste_region)
|
||||||
# log.debug(f"Adjusted paste region: {new_region}")
|
# log.debug(f"Adjusted paste region: {new_region}")
|
||||||
@@ -306,16 +275,12 @@ class Uncrop:
|
|||||||
|
|
||||||
mask.paste(mask_block, paste_region)
|
mask.paste(mask_block, paste_region)
|
||||||
log.debug(f"Blend size: {blend.size} | kind {blend.mode}")
|
log.debug(f"Blend size: {blend.size} | kind {blend.mode}")
|
||||||
log.debug(
|
log.debug(f"Crop image size: {crop_img.size} | kind {crop_img.mode}")
|
||||||
f"Crop image size: {crop_img.size} | kind {crop_img.mode}"
|
|
||||||
)
|
|
||||||
log.debug(f"BBox: {paste_region}")
|
log.debug(f"BBox: {paste_region}")
|
||||||
blend.paste(crop_img, paste_region)
|
blend.paste(crop_img, paste_region)
|
||||||
|
|
||||||
mask = mask.filter(ImageFilter.BoxBlur(radius=blend_ratio / 4))
|
mask = mask.filter(ImageFilter.BoxBlur(radius=blend_ratio / 4))
|
||||||
mask = mask.filter(
|
mask = mask.filter(ImageFilter.GaussianBlur(radius=blend_ratio / 4))
|
||||||
ImageFilter.GaussianBlur(radius=blend_ratio / 4)
|
|
||||||
)
|
|
||||||
|
|
||||||
blend.putalpha(mask)
|
blend.putalpha(mask)
|
||||||
img = Image.alpha_composite(img.convert("RGBA"), blend)
|
img = Image.alpha_composite(img.convert("RGBA"), blend)
|
||||||
|
|||||||
+5
-8
@@ -47,8 +47,6 @@ def process_list(anything):
|
|||||||
text.append(
|
text.append(
|
||||||
f"List of Tensors: {first_element.shape} (x{len(anything)})"
|
f"List of Tensors: {first_element.shape} (x{len(anything)})"
|
||||||
)
|
)
|
||||||
else:
|
|
||||||
text.append(f"Array: {anything}")
|
|
||||||
|
|
||||||
return {"text": text}
|
return {"text": text}
|
||||||
|
|
||||||
@@ -75,7 +73,7 @@ def process_text(anything):
|
|||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
|
|
||||||
class MTB_Debug:
|
class Debug:
|
||||||
"""Experimental node to debug any Comfy values.
|
"""Experimental node to debug any Comfy values.
|
||||||
|
|
||||||
support for more types and widgets is planned.
|
support for more types and widgets is planned.
|
||||||
@@ -92,7 +90,7 @@ class MTB_Debug:
|
|||||||
CATEGORY = "mtb/debug"
|
CATEGORY = "mtb/debug"
|
||||||
OUTPUT_NODE = True
|
OUTPUT_NODE = True
|
||||||
|
|
||||||
def do_debug(self, output_to_console: bool, **kwargs):
|
def do_debug(self, output_to_console, **kwargs):
|
||||||
output = {
|
output = {
|
||||||
"ui": {"b64_images": [], "text": []},
|
"ui": {"b64_images": [], "text": []},
|
||||||
# "result": ("A"),
|
# "result": ("A"),
|
||||||
@@ -105,8 +103,7 @@ class MTB_Debug:
|
|||||||
bool: process_bool,
|
bool: process_bool,
|
||||||
}
|
}
|
||||||
if output_to_console:
|
if output_to_console:
|
||||||
for k, v in kwargs.items():
|
print("bouh!")
|
||||||
print(f"{k}: {v}")
|
|
||||||
|
|
||||||
for anything in kwargs.values():
|
for anything in kwargs.values():
|
||||||
processor = processors.get(type(anything), process_text)
|
processor = processors.get(type(anything), process_text)
|
||||||
@@ -118,7 +115,7 @@ class MTB_Debug:
|
|||||||
return output
|
return output
|
||||||
|
|
||||||
|
|
||||||
class MTB_SaveTensors:
|
class SaveTensors:
|
||||||
"""Save torch tensors (image, mask or latent) to disk.
|
"""Save torch tensors (image, mask or latent) to disk.
|
||||||
|
|
||||||
useful to debug things outside comfy.
|
useful to debug things outside comfy.
|
||||||
@@ -183,4 +180,4 @@ class MTB_SaveTensors:
|
|||||||
return f"{filename_prefix}_{counter:05}"
|
return f"{filename_prefix}_{counter:05}"
|
||||||
|
|
||||||
|
|
||||||
__nodes__ = [MTB_Debug, MTB_SaveTensors]
|
__nodes__ = [Debug, SaveTensors]
|
||||||
|
|||||||
+11
-30
@@ -48,7 +48,7 @@ class LoadFaceAnalysisModel:
|
|||||||
|
|
||||||
face_analyser = insightface.app.FaceAnalysis(
|
face_analyser = insightface.app.FaceAnalysis(
|
||||||
name=faceswap_model,
|
name=faceswap_model,
|
||||||
root=get_model_path("insightface").as_posix(),
|
root=get_model_path("insightface"),
|
||||||
)
|
)
|
||||||
return (face_analyser,)
|
return (face_analyser,)
|
||||||
|
|
||||||
@@ -57,12 +57,9 @@ class LoadFaceSwapModel:
|
|||||||
"""Loads a faceswap model"""
|
"""Loads a faceswap model"""
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_models() -> list[Path]:
|
def get_models() -> List[Path]:
|
||||||
models_path = get_model_path("insightface")
|
models_path = get_model_path("insightface").iterdir()
|
||||||
if models_path.exists():
|
return [x for x in models_path if x.suffix in [".onnx", ".pth"]]
|
||||||
models = models_path.iterdir()
|
|
||||||
return [x for x in models if x.suffix in [".onnx", ".pth"]]
|
|
||||||
return []
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
@@ -113,10 +110,7 @@ class FaceSwap:
|
|||||||
"image": ("IMAGE",),
|
"image": ("IMAGE",),
|
||||||
"reference": ("IMAGE",),
|
"reference": ("IMAGE",),
|
||||||
"faces_index": ("STRING", {"default": "0"}),
|
"faces_index": ("STRING", {"default": "0"}),
|
||||||
"faceanalysis_model": (
|
"faceanalysis_model": ("FACE_ANALYSIS_MODEL", {"default": "None"}),
|
||||||
"FACE_ANALYSIS_MODEL",
|
|
||||||
{"default": "None"},
|
|
||||||
),
|
|
||||||
"faceswap_model": ("FACESWAP_MODEL", {"default": "None"}),
|
"faceswap_model": ("FACESWAP_MODEL", {"default": "None"}),
|
||||||
},
|
},
|
||||||
"optional": {},
|
"optional": {},
|
||||||
@@ -139,14 +133,10 @@ class FaceSwap:
|
|||||||
img = tensor2pil(img)[0]
|
img = tensor2pil(img)[0]
|
||||||
ref = tensor2pil(reference)[0]
|
ref = tensor2pil(reference)[0]
|
||||||
face_ids = {
|
face_ids = {
|
||||||
int(x)
|
int(x) for x in faces_index.strip(",").split(",") if x.isnumeric()
|
||||||
for x in faces_index.strip(",").split(",")
|
|
||||||
if x.isnumeric()
|
|
||||||
}
|
}
|
||||||
sys.stdout = NullWriter()
|
sys.stdout = NullWriter()
|
||||||
swapped = swap_face(
|
swapped = swap_face(faceanalysis_model, ref, img, faceswap_model, face_ids)
|
||||||
faceanalysis_model, ref, img, faceswap_model, face_ids
|
|
||||||
)
|
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
return pil2tensor(swapped)
|
return pil2tensor(swapped)
|
||||||
|
|
||||||
@@ -180,10 +170,7 @@ def get_face_single(
|
|||||||
log.debug("No face ed, trying again with smaller image")
|
log.debug("No face ed, trying again with smaller image")
|
||||||
det_size_half = (det_size[0] // 2, det_size[1] // 2)
|
det_size_half = (det_size[0] // 2, det_size[1] // 2)
|
||||||
return get_face_single(
|
return get_face_single(
|
||||||
face_analyser,
|
face_analyser, img_data, face_index=face_index, det_size=det_size_half
|
||||||
img_data,
|
|
||||||
face_index=face_index,
|
|
||||||
det_size=det_size_half,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@@ -207,9 +194,7 @@ def swap_face(
|
|||||||
if face_swapper_model is not None:
|
if face_swapper_model is not None:
|
||||||
cv_source_img = cv2.cvtColor(np.array(source_img), cv2.COLOR_RGB2BGR)
|
cv_source_img = cv2.cvtColor(np.array(source_img), cv2.COLOR_RGB2BGR)
|
||||||
cv_target_img = cv2.cvtColor(np.array(target_img), cv2.COLOR_RGB2BGR)
|
cv_target_img = cv2.cvtColor(np.array(target_img), cv2.COLOR_RGB2BGR)
|
||||||
source_face = get_face_single(
|
source_face = get_face_single(face_analyser, cv_source_img, face_index=0)
|
||||||
face_analyser, cv_source_img, face_index=0
|
|
||||||
)
|
|
||||||
if source_face is not None:
|
if source_face is not None:
|
||||||
result = cv_target_img
|
result = cv_target_img
|
||||||
|
|
||||||
@@ -219,16 +204,12 @@ def swap_face(
|
|||||||
)
|
)
|
||||||
if target_face is not None:
|
if target_face is not None:
|
||||||
sys.stdout = NullWriter()
|
sys.stdout = NullWriter()
|
||||||
result = face_swapper_model.get(
|
result = face_swapper_model.get(result, target_face, source_face)
|
||||||
result, target_face, source_face
|
|
||||||
)
|
|
||||||
sys.stdout = sys.__stdout__
|
sys.stdout = sys.__stdout__
|
||||||
else:
|
else:
|
||||||
log.warning(f"No target face found for {face_num}")
|
log.warning(f"No target face found for {face_num}")
|
||||||
|
|
||||||
result_image = Image.fromarray(
|
result_image = Image.fromarray(cv2.cvtColor(result, cv2.COLOR_BGR2RGB))
|
||||||
cv2.cvtColor(result, cv2.COLOR_BGR2RGB)
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
log.warning("No source face found")
|
log.warning("No source face found")
|
||||||
else:
|
else:
|
||||||
|
|||||||
+3
-10
@@ -193,20 +193,13 @@ def bbox_dim(bbox):
|
|||||||
# TODO: Auto install the base font to ComfyUI/fonts
|
# TODO: Auto install the base font to ComfyUI/fonts
|
||||||
|
|
||||||
|
|
||||||
class MTB_TextToImage:
|
class TextToImage:
|
||||||
"""Utils to convert text to image using a font.
|
"""Utils to convert text to image using a font.
|
||||||
|
|
||||||
The tool looks for any .ttf file in the Comfy folder hierarchy.
|
The tool looks for any .ttf file in the Comfy folder hierarchy.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
fonts = {}
|
fonts = {}
|
||||||
DESCRIPTION = """# Text to Image
|
|
||||||
|
|
||||||
This node look for any font files in comfy_dir/fonts.
|
|
||||||
by default it fallsback to a default font.
|
|
||||||
|
|
||||||

|
|
||||||
"""
|
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
# - This is executed when the graph is executed,
|
# - This is executed when the graph is executed,
|
||||||
@@ -229,7 +222,7 @@ by default it fallsback to a default font.
|
|||||||
|
|
||||||
for font in fonts:
|
for font in fonts:
|
||||||
log.debug(f"Adding font {font}")
|
log.debug(f"Adding font {font}")
|
||||||
MTB_TextToImage.fonts[font.stem] = font.as_posix()
|
TextToImage.fonts[font.stem] = font.as_posix()
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
@@ -366,6 +359,6 @@ by default it fallsback to a default font.
|
|||||||
__nodes__ = [
|
__nodes__ = [
|
||||||
QrCode,
|
QrCode,
|
||||||
UnsplashImage,
|
UnsplashImage,
|
||||||
MTB_TextToImage,
|
TextToImage,
|
||||||
# MtbExamples,
|
# MtbExamples,
|
||||||
]
|
]
|
||||||
|
|||||||
+13
-205
@@ -1,25 +1,12 @@
|
|||||||
import io
|
|
||||||
import json
|
|
||||||
import urllib.parse
|
|
||||||
import urllib.request
|
|
||||||
from math import pi
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
import io, json, urllib.parse, urllib.request
|
||||||
|
|
||||||
import comfy.model_management as model_management
|
|
||||||
import comfy.utils
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import torch
|
import torch
|
||||||
import torchvision.transforms.functional as F
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
from ..log import log
|
from ..log import log
|
||||||
from ..utils import (
|
from ..utils import apply_easing, get_server_info, pil2tensor
|
||||||
apply_easing,
|
|
||||||
get_server_info,
|
|
||||||
numpy_NFOV,
|
|
||||||
pil2tensor,
|
|
||||||
tensor2np,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_image(filename, subfolder, folder_type):
|
def get_image(filename, subfolder, folder_type):
|
||||||
@@ -45,7 +32,6 @@ class MTB_ToDevice:
|
|||||||
if torch.backends.mps.is_available():
|
if torch.backends.mps.is_available():
|
||||||
devices.append("mps")
|
devices.append("mps")
|
||||||
if torch.cuda.is_available():
|
if torch.cuda.is_available():
|
||||||
devices.append("cuda")
|
|
||||||
for i in range(torch.cuda.device_count()):
|
for i in range(torch.cuda.device_count()):
|
||||||
devices.append(f"cuda{i}")
|
devices.append(f"cuda{i}")
|
||||||
|
|
||||||
@@ -87,14 +73,6 @@ class MTB_ToDevice:
|
|||||||
|
|
||||||
# class MTB_ApplyTextTemplate:
|
# class MTB_ApplyTextTemplate:
|
||||||
class MTB_ApplyTextTemplate:
|
class MTB_ApplyTextTemplate:
|
||||||
"""
|
|
||||||
Experimental node to interpolate strings from inputs.
|
|
||||||
|
|
||||||
Interpolation just requires {}, for instance:
|
|
||||||
|
|
||||||
Some string {var_1} and {var_2}
|
|
||||||
"""
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
return {
|
return {
|
||||||
@@ -116,175 +94,7 @@ class MTB_ApplyTextTemplate:
|
|||||||
return (res,)
|
return (res,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_MatchDimensions:
|
class GetBatchFromHistory:
|
||||||
"""Match images dimensions along the given dimension, preserving aspect ratio."""
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def INPUT_TYPES(cls):
|
|
||||||
return {
|
|
||||||
"required": {
|
|
||||||
"source": ("IMAGE",),
|
|
||||||
"reference": ("IMAGE",),
|
|
||||||
"match": (["height", "width"], {"default": "height"}),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN_TYPES = ("IMAGE", "INT", "INT")
|
|
||||||
RETURN_NAMES = ("image", "new_width", "new_height")
|
|
||||||
CATEGORY = "mtb/utils"
|
|
||||||
FUNCTION = "execute"
|
|
||||||
|
|
||||||
def execute(
|
|
||||||
self, source: torch.Tensor, reference: torch.Tensor, match: str
|
|
||||||
):
|
|
||||||
_batch_size, height, width, _channels = source.shape
|
|
||||||
_rbatch_size, rheight, rwidth, _rchannels = reference.shape
|
|
||||||
|
|
||||||
source_aspect_ratio = width / height
|
|
||||||
# reference_aspect_ratio = rwidth / rheight
|
|
||||||
|
|
||||||
source = source.permute(0, 3, 1, 2)
|
|
||||||
reference = reference.permute(0, 3, 1, 2)
|
|
||||||
|
|
||||||
if match == "height":
|
|
||||||
new_height = rheight
|
|
||||||
new_width = int(rheight * source_aspect_ratio)
|
|
||||||
else:
|
|
||||||
new_width = rwidth
|
|
||||||
new_height = int(rwidth / source_aspect_ratio)
|
|
||||||
|
|
||||||
resized_images = [
|
|
||||||
F.resize(
|
|
||||||
source[i],
|
|
||||||
(new_height, new_width),
|
|
||||||
antialias=True,
|
|
||||||
interpolation=Image.BICUBIC,
|
|
||||||
)
|
|
||||||
for i in range(_batch_size)
|
|
||||||
]
|
|
||||||
resized_source = torch.stack(resized_images, dim=0)
|
|
||||||
resized_source = resized_source.permute(0, 2, 3, 1)
|
|
||||||
|
|
||||||
return (resized_source, new_width, new_height)
|
|
||||||
|
|
||||||
|
|
||||||
class MTB_FloatsToFloat:
|
|
||||||
"""AD, IPA, Fitz etc have commonly choose to mistype float lists as FLOAT.
|
|
||||||
|
|
||||||
This is just a hack to be compatible with these
|
|
||||||
"""
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def INPUT_TYPES(cls):
|
|
||||||
return {
|
|
||||||
"required": {
|
|
||||||
"floats": ("FLOATS",),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN_TYPES = ("FLOAT",)
|
|
||||||
RETURN_NAMES = ("float",)
|
|
||||||
CATEGORY = "mtb/utils"
|
|
||||||
FUNCTION = "convert"
|
|
||||||
|
|
||||||
def convert(self, floats):
|
|
||||||
return (floats,)
|
|
||||||
|
|
||||||
|
|
||||||
class MTB_AutoPanEquilateral:
|
|
||||||
"""Generate a 360 panning video from an equilateral image."""
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def INPUT_TYPES(cls):
|
|
||||||
return {
|
|
||||||
"required": {
|
|
||||||
"equilateral_image": ("IMAGE",),
|
|
||||||
"fovX": ("FLOAT", {"default": 45.0}),
|
|
||||||
"fovY": ("FLOAT", {"default": 45.0}),
|
|
||||||
"elevation": ("FLOAT", {"default": 0.5}),
|
|
||||||
"frame_count": ("INT", {"default": 100}),
|
|
||||||
"width": ("INT", {"default": 768}),
|
|
||||||
"height": ("INT", {"default": 512}),
|
|
||||||
},
|
|
||||||
"optional": {
|
|
||||||
"floats_fovX": ("FLOATS",),
|
|
||||||
"floats_fovY": ("FLOATS",),
|
|
||||||
"floats_elevation": ("FLOATS",),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
RETURN_TYPES = ("IMAGE",)
|
|
||||||
RETURN_NAMES = ("image",)
|
|
||||||
CATEGORY = "mtb/utils"
|
|
||||||
FUNCTION = "generate_frames"
|
|
||||||
|
|
||||||
def check_floats(self, f: list[float] | None, expected_count: int):
|
|
||||||
if f:
|
|
||||||
if len(f) == expected_count:
|
|
||||||
return True
|
|
||||||
return False
|
|
||||||
return True
|
|
||||||
|
|
||||||
def generate_frames(
|
|
||||||
self,
|
|
||||||
equilateral_image: torch.Tensor,
|
|
||||||
fovX: float,
|
|
||||||
fovY: float,
|
|
||||||
elevation: float,
|
|
||||||
frame_count: int,
|
|
||||||
width: int,
|
|
||||||
height: int,
|
|
||||||
floats_fovX: list[float] | None = None,
|
|
||||||
floats_fovY: list[float] | None = None,
|
|
||||||
floats_elevation: list[float] | None = None,
|
|
||||||
):
|
|
||||||
source = tensor2np(equilateral_image)
|
|
||||||
|
|
||||||
if len(source) > 1:
|
|
||||||
log.warn(
|
|
||||||
"You provided more than one image in the equilateral_image input, only the first will be used."
|
|
||||||
)
|
|
||||||
if not all(
|
|
||||||
[
|
|
||||||
self.check_floats(x, frame_count)
|
|
||||||
for x in [floats_fovX, floats_fovY, floats_elevation]
|
|
||||||
]
|
|
||||||
):
|
|
||||||
raise ValueError(
|
|
||||||
"You provided less than the expected number of fovX, fovY, or elevation values."
|
|
||||||
)
|
|
||||||
|
|
||||||
source = source[0]
|
|
||||||
frames = []
|
|
||||||
|
|
||||||
pbar = comfy.utils.ProgressBar(frame_count)
|
|
||||||
for i in range(frame_count):
|
|
||||||
rotation_angle = (i / frame_count) * 2 * pi
|
|
||||||
|
|
||||||
if floats_elevation:
|
|
||||||
elevation = floats_elevation[i]
|
|
||||||
|
|
||||||
if floats_fovX:
|
|
||||||
fovX = floats_fovX[i]
|
|
||||||
|
|
||||||
if floats_fovY:
|
|
||||||
fovY = floats_fovY[i]
|
|
||||||
|
|
||||||
fov = [fovX / 100, fovY / 100]
|
|
||||||
center_point = [rotation_angle / (2 * pi), elevation]
|
|
||||||
|
|
||||||
nfov = numpy_NFOV(fov, height, width)
|
|
||||||
frame = nfov.to_nfov(source, center_point=center_point)
|
|
||||||
|
|
||||||
frames.append(frame)
|
|
||||||
|
|
||||||
model_management.throw_exception_if_processing_interrupted()
|
|
||||||
pbar.update(1)
|
|
||||||
|
|
||||||
return (pil2tensor(frames),)
|
|
||||||
|
|
||||||
|
|
||||||
class MTB_GetBatchFromHistory:
|
|
||||||
"""Very experimental node to load images from the history of the server.
|
"""Very experimental node to load images from the history of the server.
|
||||||
|
|
||||||
Queue items without output are ignored in the count.
|
Queue items without output are ignored in the count.
|
||||||
@@ -373,7 +183,7 @@ class MTB_GetBatchFromHistory:
|
|||||||
return pil2tensor(frames)
|
return pil2tensor(frames)
|
||||||
|
|
||||||
|
|
||||||
class MTB_AnyToString:
|
class AnyToString:
|
||||||
"""Tries to take any input and convert it to a string."""
|
"""Tries to take any input and convert it to a string."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -408,7 +218,7 @@ class MTB_AnyToString:
|
|||||||
return (str(input),)
|
return (str(input),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_StringReplace:
|
class StringReplace:
|
||||||
"""Basic string replacement."""
|
"""Basic string replacement."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -457,6 +267,7 @@ class MTB_MathExpression:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def eval_expression(self, expression, **kwargs):
|
def eval_expression(self, expression, **kwargs):
|
||||||
|
import math
|
||||||
from ast import literal_eval
|
from ast import literal_eval
|
||||||
|
|
||||||
for key, value in kwargs.items():
|
for key, value in kwargs.items():
|
||||||
@@ -484,7 +295,7 @@ class MTB_MathExpression:
|
|||||||
return (result, int(result))
|
return (result, int(result))
|
||||||
|
|
||||||
|
|
||||||
class MTB_FitNumber:
|
class FitNumber:
|
||||||
"""Fit the input float using a source and target range"""
|
"""Fit the input float using a source and target range"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -557,7 +368,7 @@ class MTB_FitNumber:
|
|||||||
return (res,)
|
return (res,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_ConcatImages:
|
class ConcatImages:
|
||||||
"""Add images to batch."""
|
"""Add images to batch."""
|
||||||
|
|
||||||
RETURN_TYPES = ("IMAGE",)
|
RETURN_TYPES = ("IMAGE",)
|
||||||
@@ -585,15 +396,12 @@ class MTB_ConcatImages:
|
|||||||
|
|
||||||
|
|
||||||
__nodes__ = [
|
__nodes__ = [
|
||||||
MTB_StringReplace,
|
StringReplace,
|
||||||
MTB_FitNumber,
|
FitNumber,
|
||||||
MTB_GetBatchFromHistory,
|
GetBatchFromHistory,
|
||||||
MTB_AnyToString,
|
AnyToString,
|
||||||
MTB_ConcatImages,
|
ConcatImages,
|
||||||
MTB_MathExpression,
|
MTB_MathExpression,
|
||||||
MTB_ToDevice,
|
MTB_ToDevice,
|
||||||
MTB_ApplyTextTemplate,
|
MTB_ApplyTextTemplate,
|
||||||
MTB_MatchDimensions,
|
|
||||||
MTB_AutoPanEquilateral,
|
|
||||||
MTB_FloatsToFloat,
|
|
||||||
]
|
]
|
||||||
|
|||||||
+50
-84
@@ -13,7 +13,7 @@ from skimage.filters import gaussian
|
|||||||
from skimage.util import compare_images
|
from skimage.util import compare_images
|
||||||
|
|
||||||
from ..log import log
|
from ..log import log
|
||||||
from ..utils import np2tensor, pil2tensor, tensor2np, tensor2pil
|
from ..utils import pil2tensor, tensor2np, tensor2pil
|
||||||
|
|
||||||
# try:
|
# try:
|
||||||
# from cv2.ximgproc import guidedFilter
|
# from cv2.ximgproc import guidedFilter
|
||||||
@@ -35,7 +35,7 @@ def gaussian_kernel(
|
|||||||
return g / g.sum()
|
return g / g.sum()
|
||||||
|
|
||||||
|
|
||||||
class MTB_ColorCorrect:
|
class ColorCorrect:
|
||||||
"""Various color correction methods"""
|
"""Various color correction methods"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -195,7 +195,7 @@ class MTB_ColorCorrect:
|
|||||||
return (image,)
|
return (image,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_ImageCompare:
|
class ImageCompare_:
|
||||||
"""Compare two images and return a difference image"""
|
"""Compare two images and return a difference image"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -231,7 +231,7 @@ class MTB_ImageCompare:
|
|||||||
import requests
|
import requests
|
||||||
|
|
||||||
|
|
||||||
class MTB_LoadImageFromUrl:
|
class LoadImageFromUrl_:
|
||||||
"""Load an image from the given URL"""
|
"""Load an image from the given URL"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -258,7 +258,7 @@ class MTB_LoadImageFromUrl:
|
|||||||
return (pil2tensor(image),)
|
return (pil2tensor(image),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_Blur:
|
class Blur_:
|
||||||
"""Blur an image using a Gaussian filter."""
|
"""Blur an image using a Gaussian filter."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -268,55 +268,28 @@ class MTB_Blur:
|
|||||||
"image": ("IMAGE",),
|
"image": ("IMAGE",),
|
||||||
"sigmaX": (
|
"sigmaX": (
|
||||||
"FLOAT",
|
"FLOAT",
|
||||||
{"default": 3.0, "min": 0.0, "max": 200.0, "step": 0.01},
|
{"default": 3.0, "min": 0.0, "max": 10.0, "step": 0.01},
|
||||||
),
|
),
|
||||||
"sigmaY": (
|
"sigmaY": (
|
||||||
"FLOAT",
|
"FLOAT",
|
||||||
{"default": 3.0, "min": 0.0, "max": 200.0, "step": 0.01},
|
{"default": 3.0, "min": 0.0, "max": 10.0, "step": 0.01},
|
||||||
),
|
),
|
||||||
},
|
}
|
||||||
"optional": {"sigmasX": ("FLOATS",), "sigmasY": ("FLOATS",)},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RETURN_TYPES = ("IMAGE",)
|
RETURN_TYPES = ("IMAGE",)
|
||||||
FUNCTION = "blur"
|
FUNCTION = "blur"
|
||||||
CATEGORY = "mtb/image processing"
|
CATEGORY = "mtb/image processing"
|
||||||
|
|
||||||
def blur(
|
def blur(self, image: torch.Tensor, sigmaX, sigmaY):
|
||||||
self, image: torch.Tensor, sigmaX, sigmaY, sigmasX=None, sigmasY=None
|
image = image.numpy()
|
||||||
):
|
image = image.transpose(1, 2, 3, 0)
|
||||||
image_np = image.numpy() * 255
|
image = gaussian(image, sigma=(sigmaX, sigmaY, 0, 0))
|
||||||
|
image = image.transpose(3, 0, 1, 2)
|
||||||
blurred_images = []
|
return (torch.from_numpy(image),)
|
||||||
if sigmasX is not None:
|
|
||||||
if sigmasY is None:
|
|
||||||
sigmasY = sigmasX
|
|
||||||
if len(sigmasX) != image.size(0):
|
|
||||||
raise ValueError(
|
|
||||||
f"SigmasX must have same length as image, sigmasX is {len(sigmasX)} but the batch size is {image.size(0)}"
|
|
||||||
)
|
|
||||||
|
|
||||||
for i in range(image.size(0)):
|
|
||||||
blurred = gaussian(
|
|
||||||
image_np[i],
|
|
||||||
sigma=(sigmasX[i], sigmasY[i], 0),
|
|
||||||
channel_axis=2,
|
|
||||||
)
|
|
||||||
blurred_images.append(blurred)
|
|
||||||
|
|
||||||
image_np = np.array(blurred_images)
|
|
||||||
else:
|
|
||||||
for i in range(image.size(0)):
|
|
||||||
blurred = gaussian(
|
|
||||||
image_np[i], sigma=(sigmaX, sigmaY, 0), channel_axis=2
|
|
||||||
)
|
|
||||||
blurred_images.append(blurred)
|
|
||||||
|
|
||||||
image_np = np.array(blurred_images)
|
|
||||||
return (np2tensor(image_np).squeeze(0),)
|
|
||||||
|
|
||||||
|
|
||||||
class MTB_Sharpen:
|
class Sharpen_:
|
||||||
"""Sharpens an image using a Gaussian kernel."""
|
"""Sharpens an image using a Gaussian kernel."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -419,7 +392,7 @@ class MTB_Sharpen:
|
|||||||
# return (np2tensor(deglaze_np_img(tensor2np(image))),)
|
# return (np2tensor(deglaze_np_img(tensor2np(image))),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_MaskToImage:
|
class MaskToImage:
|
||||||
"""Converts a mask (alpha) to an RGB image with a color and background"""
|
"""Converts a mask (alpha) to an RGB image with a color and background"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -439,7 +412,7 @@ class MTB_MaskToImage:
|
|||||||
FUNCTION = "render_mask"
|
FUNCTION = "render_mask"
|
||||||
|
|
||||||
def render_mask(self, mask, color, background):
|
def render_mask(self, mask, color, background):
|
||||||
masks = tensor2np(mask)[0]
|
masks = tensor2np(mask)
|
||||||
images = []
|
images = []
|
||||||
for m in masks:
|
for m in masks:
|
||||||
_mask = Image.fromarray(m).convert("L")
|
_mask = Image.fromarray(m).convert("L")
|
||||||
@@ -463,7 +436,10 @@ class MTB_MaskToImage:
|
|||||||
return (pil2tensor(images),)
|
return (pil2tensor(images),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_ColoredImage:
|
from typing import Optional
|
||||||
|
|
||||||
|
|
||||||
|
class ColoredImage:
|
||||||
"""Constant color image of given size."""
|
"""Constant color image of given size."""
|
||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
@@ -523,31 +499,24 @@ class MTB_ColoredImage:
|
|||||||
color,
|
color,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
foreground_image: torch.Tensor | None = None,
|
foreground_image: Optional[torch.Tensor] = None,
|
||||||
foreground_mask: torch.Tensor | None = None,
|
foreground_mask: Optional[torch.Tensor] = None,
|
||||||
):
|
):
|
||||||
image = Image.new("RGBA", (width, height), color=color)
|
image = Image.new("RGBA", (width, height), color=color)
|
||||||
output = []
|
output = []
|
||||||
if foreground_image is not None:
|
if foreground_image is not None:
|
||||||
fg_masks = [None] * foreground_image.size()[0]
|
fg_images = tensor2pil(foreground_image)
|
||||||
|
fg_masks = [None] * len(
|
||||||
|
fg_images
|
||||||
|
) # Default to None for each foreground image
|
||||||
|
|
||||||
if foreground_mask is not None:
|
if foreground_mask is not None:
|
||||||
fg_size = foreground_image.size()[0]
|
|
||||||
mask_size = foreground_mask.size()[0]
|
|
||||||
|
|
||||||
if fg_size == 1 and mask_size > fg_size:
|
|
||||||
foreground_image = foreground_image.repeat(
|
|
||||||
mask_size, 1, 1, 1
|
|
||||||
)
|
|
||||||
|
|
||||||
if foreground_image.size()[0] != foreground_mask.size()[0]:
|
if foreground_image.size()[0] != foreground_mask.size()[0]:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Foreground image and mask must have same batch size"
|
"Foreground image and mask must have same batch size"
|
||||||
)
|
)
|
||||||
fg_masks = tensor2pil(foreground_mask.unsqueeze(-1))
|
fg_masks = tensor2pil(foreground_mask.unsqueeze(-1))
|
||||||
|
|
||||||
fg_images = tensor2pil(foreground_image)
|
|
||||||
|
|
||||||
for fg_image, fg_mask in zip(fg_images, fg_masks):
|
for fg_image, fg_mask in zip(fg_images, fg_masks):
|
||||||
# Resize and crop if dimensions mismatch
|
# Resize and crop if dimensions mismatch
|
||||||
if fg_image.size != image.size:
|
if fg_image.size != image.size:
|
||||||
@@ -583,7 +552,7 @@ class MTB_ColoredImage:
|
|||||||
return (output,)
|
return (output,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_ImagePremultiply:
|
class ImagePremultiply:
|
||||||
"""Premultiply image with mask"""
|
"""Premultiply image with mask"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -622,7 +591,7 @@ class MTB_ImagePremultiply:
|
|||||||
return (pil2tensor(out),)
|
return (pil2tensor(out),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_ImageResizeFactor:
|
class ImageResizeFactor:
|
||||||
"""Extracted mostly from WAS Node Suite, with a few edits (most notably multiple image support) and less features."""
|
"""Extracted mostly from WAS Node Suite, with a few edits (most notably multiple image support) and less features."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -716,7 +685,7 @@ class MTB_ImageResizeFactor:
|
|||||||
return (resized_image,)
|
return (resized_image,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_SaveImageGrid:
|
class SaveImageGrid_:
|
||||||
"""Save all the images in the input batch as a grid of images."""
|
"""Save all the images in the input batch as a grid of images."""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@@ -825,7 +794,7 @@ class MTB_SaveImageGrid:
|
|||||||
return {"ui": {"images": results}}
|
return {"ui": {"images": results}}
|
||||||
|
|
||||||
|
|
||||||
class MTB_ImageTileOffset:
|
class ImageTileOffset:
|
||||||
"""Mimics an old photoshop technique to check for seamless textures"""
|
"""Mimics an old photoshop technique to check for seamless textures"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -833,8 +802,7 @@ class MTB_ImageTileOffset:
|
|||||||
return {
|
return {
|
||||||
"required": {
|
"required": {
|
||||||
"image": ("IMAGE",),
|
"image": ("IMAGE",),
|
||||||
"tilesX": ("INT", {"default": 2, "min": 1}),
|
"tiles": ("INT", {"default": 2}),
|
||||||
"tilesY": ("INT", {"default": 2, "min": 1}),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -844,19 +812,17 @@ class MTB_ImageTileOffset:
|
|||||||
|
|
||||||
FUNCTION = "tile_image"
|
FUNCTION = "tile_image"
|
||||||
|
|
||||||
def tile_image(
|
def tile_image(self, image: torch.Tensor, tiles: int = 2):
|
||||||
self, image: torch.Tensor, tilesX: int = 2, tilesY: int = 2
|
if tiles < 1:
|
||||||
):
|
|
||||||
if tilesX < 1 or tilesY < 1:
|
|
||||||
raise ValueError("The number of tiles must be at least 1.")
|
raise ValueError("The number of tiles must be at least 1.")
|
||||||
|
|
||||||
batch_size, height, width, channels = image.shape
|
batch_size, height, width, channels = image.shape
|
||||||
tile_height = height // tilesY
|
tile_height = height // tiles
|
||||||
tile_width = width // tilesX
|
tile_width = width // tiles
|
||||||
|
|
||||||
output_image = torch.zeros_like(image)
|
output_image = torch.zeros_like(image)
|
||||||
|
|
||||||
for i, j in itertools.product(range(tilesY), range(tilesX)):
|
for i, j in itertools.product(range(tiles), range(tiles)):
|
||||||
start_h = i * tile_height
|
start_h = i * tile_height
|
||||||
end_h = start_h + tile_height
|
end_h = start_h + tile_height
|
||||||
start_w = j * tile_width
|
start_w = j * tile_width
|
||||||
@@ -864,8 +830,8 @@ class MTB_ImageTileOffset:
|
|||||||
|
|
||||||
tile = image[:, start_h:end_h, start_w:end_w, :]
|
tile = image[:, start_h:end_h, start_w:end_w, :]
|
||||||
|
|
||||||
output_start_h = (i + 1) % tilesY * tile_height
|
output_start_h = (i + 1) % tiles * tile_height
|
||||||
output_start_w = (j + 1) % tilesX * tile_width
|
output_start_w = (j + 1) % tiles * tile_width
|
||||||
output_end_h = output_start_h + tile_height
|
output_end_h = output_start_h + tile_height
|
||||||
output_end_w = output_start_w + tile_width
|
output_end_w = output_start_w + tile_width
|
||||||
|
|
||||||
@@ -877,16 +843,16 @@ class MTB_ImageTileOffset:
|
|||||||
|
|
||||||
|
|
||||||
__nodes__ = [
|
__nodes__ = [
|
||||||
MTB_ColorCorrect,
|
ColorCorrect,
|
||||||
MTB_ImageCompare,
|
ImageCompare_,
|
||||||
MTB_ImageTileOffset,
|
ImageTileOffset,
|
||||||
MTB_Blur,
|
Blur_,
|
||||||
# DeglazeImage,
|
# DeglazeImage,
|
||||||
MTB_MaskToImage,
|
MaskToImage,
|
||||||
MTB_ColoredImage,
|
ColoredImage,
|
||||||
MTB_ImagePremultiply,
|
ImagePremultiply,
|
||||||
MTB_ImageResizeFactor,
|
ImageResizeFactor,
|
||||||
MTB_SaveImageGrid,
|
SaveImageGrid_,
|
||||||
MTB_LoadImageFromUrl,
|
LoadImageFromUrl_,
|
||||||
MTB_Sharpen,
|
Sharpen_,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import torch
|
import torch
|
||||||
|
|
||||||
from ..log import log
|
from ..log import log
|
||||||
|
|
||||||
|
|
||||||
class MTB_StackImages:
|
class StackImages:
|
||||||
"""Stack the input images horizontally or vertically."""
|
"""Stack the input images horizontally or vertically."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -68,7 +67,7 @@ class MTB_StackImages:
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class MTB_PickFromBatch:
|
class PickFromBatch:
|
||||||
"""Pick a specific number of images from a batch.
|
"""Pick a specific number of images from a batch.
|
||||||
|
|
||||||
either from the start or end.
|
either from the start or end.
|
||||||
@@ -107,4 +106,4 @@ class MTB_PickFromBatch:
|
|||||||
return (selected_tensors,)
|
return (selected_tensors,)
|
||||||
|
|
||||||
|
|
||||||
__nodes__ = [MTB_StackImages, MTB_PickFromBatch]
|
__nodes__ = [StackImages, PickFromBatch]
|
||||||
|
|||||||
+4
-9
@@ -62,7 +62,7 @@ class ReadPlaylist:
|
|||||||
return (json.loads(playlist_path.read_text(encoding="utf-8")),)
|
return (json.loads(playlist_path.read_text(encoding="utf-8")),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_AddToPlaylist:
|
class AddToPlaylist:
|
||||||
"""Add a video to the playlist"""
|
"""Add a video to the playlist"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -116,7 +116,7 @@ class MTB_AddToPlaylist:
|
|||||||
return ()
|
return ()
|
||||||
|
|
||||||
|
|
||||||
class MTB_ExportWithFfmpeg:
|
class ExportWithFfmpeg:
|
||||||
"""Export with FFmpeg (Experimental)"""
|
"""Export with FFmpeg (Experimental)"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -307,7 +307,7 @@ def prepare_animated_batch(
|
|||||||
|
|
||||||
|
|
||||||
# todo: deprecate for apng
|
# todo: deprecate for apng
|
||||||
class MTB_SaveGif:
|
class SaveGif:
|
||||||
"""Save the images from the batch as a GIF"""
|
"""Save the images from the batch as a GIF"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -395,9 +395,4 @@ class MTB_SaveGif:
|
|||||||
return {"ui": {"gif": results}}
|
return {"ui": {"gif": results}}
|
||||||
|
|
||||||
|
|
||||||
__nodes__ = [
|
__nodes__ = [SaveGif, ExportWithFfmpeg, AddToPlaylist, ReadPlaylist]
|
||||||
MTB_SaveGif,
|
|
||||||
MTB_ExportWithFfmpeg,
|
|
||||||
MTB_AddToPlaylist,
|
|
||||||
ReadPlaylist,
|
|
||||||
]
|
|
||||||
|
|||||||
+3
-7
@@ -5,7 +5,7 @@ from rembg import remove
|
|||||||
from ..utils import pil2tensor, tensor2pil
|
from ..utils import pil2tensor, tensor2pil
|
||||||
|
|
||||||
|
|
||||||
class MTB_ImageRemoveBackgroundRembg:
|
class ImageRemoveBackgroundRembg:
|
||||||
"""Removes the background from the input using Rembg."""
|
"""Removes the background from the input using Rembg."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -100,13 +100,9 @@ class MTB_ImageRemoveBackgroundRembg:
|
|||||||
|
|
||||||
pbar.update(1)
|
pbar.update(1)
|
||||||
|
|
||||||
return (
|
return (pil2tensor(out_img), pil2tensor(out_mask), pil2tensor(out_img_on_bg))
|
||||||
pil2tensor(out_img),
|
|
||||||
pil2tensor(out_mask),
|
|
||||||
pil2tensor(out_img_on_bg),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
__nodes__ = [
|
__nodes__ = [
|
||||||
MTB_ImageRemoveBackgroundRembg,
|
ImageRemoveBackgroundRembg,
|
||||||
]
|
]
|
||||||
|
|||||||
+10
-66
@@ -1,13 +1,11 @@
|
|||||||
import copy
|
import copy
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from torch.nn import functional as F
|
|
||||||
from torch.nn.modules.utils import _pair
|
|
||||||
|
|
||||||
from ..log import log
|
from ..log import log
|
||||||
|
|
||||||
|
|
||||||
class MTB_VaeDecode:
|
class VaeDecode_:
|
||||||
"""Wrapper for the 2 core decoders but also adding the sd seamless hack, taken from: FlyingFireCo/tiled_ksampler"""
|
"""Wrapper for the 2 core decoders but also adding the sd seamless hack, taken from: FlyingFireCo/tiled_ksampler"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -31,12 +29,7 @@ class MTB_VaeDecode:
|
|||||||
CATEGORY = "mtb/decode"
|
CATEGORY = "mtb/decode"
|
||||||
|
|
||||||
def decode(
|
def decode(
|
||||||
self,
|
self, vae, samples, seamless_model, use_tiling_decoder=True, tile_size=512
|
||||||
vae,
|
|
||||||
samples,
|
|
||||||
seamless_model,
|
|
||||||
use_tiling_decoder=True,
|
|
||||||
tile_size=512,
|
|
||||||
):
|
):
|
||||||
if seamless_model:
|
if seamless_model:
|
||||||
if use_tiling_decoder:
|
if use_tiling_decoder:
|
||||||
@@ -62,24 +55,6 @@ class MTB_VaeDecode:
|
|||||||
return (vae.decode(samples["samples"]),)
|
return (vae.decode(samples["samples"]),)
|
||||||
|
|
||||||
|
|
||||||
def conv_forward(lyr, tensor, weight, bias):
|
|
||||||
step = lyr.timestep
|
|
||||||
if (lyr.paddingStartStep < 0 or step >= lyr.paddingStartStep) and (
|
|
||||||
lyr.paddingStopStep < 0 or step <= lyr.paddingStopStep
|
|
||||||
):
|
|
||||||
working = F.pad(tensor, lyr.paddingX, mode=lyr.padding_modeX)
|
|
||||||
working = F.pad(working, lyr.paddingY, mode=lyr.padding_modeY)
|
|
||||||
else:
|
|
||||||
working = F.pad(tensor, lyr.paddingX, mode="constant")
|
|
||||||
working = F.pad(working, lyr.paddingY, mode="constant")
|
|
||||||
|
|
||||||
lyr.timestep += 1
|
|
||||||
|
|
||||||
return F.conv2d(
|
|
||||||
working, weight, bias, lyr.stride, _pair(0), lyr.dilation, lyr.groups
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class ModelPatchSeamless:
|
class ModelPatchSeamless:
|
||||||
"""Uses the stable diffusion 'hack' to infer seamless images by setting the model layers padding mode to circular (experimental)"""
|
"""Uses the stable diffusion 'hack' to infer seamless images by setting the model layers padding mode to circular (experimental)"""
|
||||||
|
|
||||||
@@ -88,16 +63,10 @@ class ModelPatchSeamless:
|
|||||||
return {
|
return {
|
||||||
"required": {
|
"required": {
|
||||||
"model": ("MODEL",),
|
"model": ("MODEL",),
|
||||||
"startStep": ("INT", {"default": 0}),
|
"tiling": (
|
||||||
"stopStep": ("INT", {"default": 999}),
|
|
||||||
"tilingX": (
|
|
||||||
"BOOLEAN",
|
"BOOLEAN",
|
||||||
{"default": True},
|
{"default": True},
|
||||||
),
|
), # kept for testing not sure why it should be false
|
||||||
"tilingY": (
|
|
||||||
"BOOLEAN",
|
|
||||||
{"default": True},
|
|
||||||
),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,46 +79,21 @@ class ModelPatchSeamless:
|
|||||||
|
|
||||||
CATEGORY = "mtb/textures"
|
CATEGORY = "mtb/textures"
|
||||||
|
|
||||||
def apply_circular(self, model, startStep, stopStep, x, y):
|
def apply_circular(self, model, enable):
|
||||||
for layer in [
|
for layer in [
|
||||||
layer
|
layer for layer in model.modules() if isinstance(layer, torch.nn.Conv2d)
|
||||||
for layer in model.modules()
|
|
||||||
if isinstance(layer, torch.nn.Conv2d)
|
|
||||||
]:
|
]:
|
||||||
layer.padding_modeX = "circular" if x else "constant"
|
layer.padding_mode = "circular" if enable else "zeros"
|
||||||
layer.padding_modeY = "circular" if y else "constant"
|
|
||||||
layer.paddingX = (
|
|
||||||
layer._reversed_padding_repeated_twice[0],
|
|
||||||
layer._reversed_padding_repeated_twice[1],
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
)
|
|
||||||
layer.paddingY = (
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
layer._reversed_padding_repeated_twice[2],
|
|
||||||
layer._reversed_padding_repeated_twice[3],
|
|
||||||
)
|
|
||||||
layer.paddingStartStep = startStep
|
|
||||||
layer.paddingStopStep = stopStep
|
|
||||||
layer.timestep = 0
|
|
||||||
layer._conv_forward = conv_forward.__get__(layer, torch.nn.Conv2d)
|
|
||||||
|
|
||||||
return model
|
return model
|
||||||
|
|
||||||
def hack(
|
def hack(
|
||||||
self,
|
self,
|
||||||
model,
|
model,
|
||||||
startStep,
|
tiling,
|
||||||
stopStep,
|
|
||||||
tilingX,
|
|
||||||
tilingY,
|
|
||||||
):
|
):
|
||||||
hacked_model = copy.deepcopy(model)
|
hacked_model = copy.deepcopy(model)
|
||||||
self.apply_circular(
|
self.apply_circular(hacked_model.model, tiling)
|
||||||
hacked_model.model, startStep, stopStep, tilingX, tilingY
|
|
||||||
)
|
|
||||||
return (model, hacked_model)
|
return (model, hacked_model)
|
||||||
|
|
||||||
|
|
||||||
__nodes__ = [ModelPatchSeamless, MTB_VaeDecode]
|
__nodes__ = [ModelPatchSeamless, VaeDecode_]
|
||||||
|
|||||||
+6
-6
@@ -1,4 +1,4 @@
|
|||||||
class MTB_IntToBool:
|
class IntToBool:
|
||||||
"""Basic int to bool conversion"""
|
"""Basic int to bool conversion"""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -22,7 +22,7 @@ class MTB_IntToBool:
|
|||||||
return (bool(int),)
|
return (bool(int),)
|
||||||
|
|
||||||
|
|
||||||
class MTB_IntToNumber:
|
class IntToNumber:
|
||||||
"""Node addon for the WAS Suite. Converts a "comfy" INT to a NUMBER."""
|
"""Node addon for the WAS Suite. Converts a "comfy" INT to a NUMBER."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -50,7 +50,7 @@ class MTB_IntToNumber:
|
|||||||
return (int,)
|
return (int,)
|
||||||
|
|
||||||
|
|
||||||
class MTB_FloatToNumber:
|
class FloatToNumber:
|
||||||
"""Node addon for the WAS Suite. Converts a "comfy" FLOAT to a NUMBER."""
|
"""Node addon for the WAS Suite. Converts a "comfy" FLOAT to a NUMBER."""
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -81,7 +81,7 @@ class MTB_FloatToNumber:
|
|||||||
|
|
||||||
|
|
||||||
__nodes__ = [
|
__nodes__ = [
|
||||||
MTB_FloatToNumber,
|
FloatToNumber,
|
||||||
MTB_IntToBool,
|
IntToBool,
|
||||||
MTB_IntToNumber,
|
IntToNumber,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# NOTE: this file must be used in all test_* files to setup the test env.
|
||||||
|
|
||||||
|
import importlib
|
||||||
|
import logging
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def setup_test():
|
||||||
|
mod_path = Path(__file__).parent.parent
|
||||||
|
|
||||||
|
# add custom_nodes to path
|
||||||
|
sys.path.append(mod_path.parent.as_posix())
|
||||||
|
print(f"Appended: {mod_path.parent.as_posix()}")
|
||||||
|
|
||||||
|
# add comfy root to path
|
||||||
|
sys.path.append(mod_path.parent.parent.as_posix())
|
||||||
|
print(f"Appended: {mod_path.parent.parent.as_posix()}")
|
||||||
|
|
||||||
|
# import mtb
|
||||||
|
module = importlib.import_module(mod_path.name)
|
||||||
|
|
||||||
|
# add the module to globals
|
||||||
|
globals()[mod_path.name] = module
|
||||||
|
|
||||||
|
# set the logging level for third-party libraries
|
||||||
|
logging.getLogger("xformers").setLevel(logging.WARNING)
|
||||||
|
logging.getLogger("tensorflow").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("h5py._conv").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("numexpr.utils").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("matplotlib").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("torchaudio._extension").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("torch.utils.tensorboard").setLevel(logging.ERROR)
|
||||||
|
logging.getLogger("torchvision.transforms.functional_tensor").setLevel(
|
||||||
|
logging.ERROR
|
||||||
|
)
|
||||||
|
logging.getLogger("basicsr.metrics.niqe").setLevel(logging.ERROR)
|
||||||
|
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
import pytest
|
||||||
|
from setup_test import setup_test
|
||||||
|
|
||||||
|
setup_test()
|
||||||
|
|
||||||
|
from comfy_mtb_utils.nodes.graph_utils import FitNumber
|
||||||
|
from comfy_mtb_utils.utils import apply_easing
|
||||||
|
|
||||||
|
|
||||||
|
# - apply_easing
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"value, easing_type, expected",
|
||||||
|
[
|
||||||
|
(0.5, "Linear", 0.5),
|
||||||
|
(0, "Linear", 0),
|
||||||
|
(1, "Linear", 1),
|
||||||
|
(0.5, "Sine In", 0.2928932188134524),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_apply_easing(value: float, easing_type: str, expected: float):
|
||||||
|
assert apply_easing(value, easing_type) == pytest.approx(
|
||||||
|
expected
|
||||||
|
), "Easing function did not return expected value"
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"val, easing_type",
|
||||||
|
[
|
||||||
|
(0.5, "NonExistentEasing"),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_apply_easing_error_handling(val, easing_type):
|
||||||
|
with pytest.raises(ValueError):
|
||||||
|
apply_easing(val, easing_type)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"val, easing_type, expected",
|
||||||
|
[
|
||||||
|
(0, "Linear", 0),
|
||||||
|
(1, "Linear", 1),
|
||||||
|
(0.5, "Linear", 0.5),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_apply_easing_corner_cases(val, easing_type, expected):
|
||||||
|
assert apply_easing(val, easing_type) == expected
|
||||||
|
|
||||||
|
|
||||||
|
# - FitNumber
|
||||||
|
@pytest.fixture
|
||||||
|
def fit_number_instance():
|
||||||
|
return FitNumber()
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"value, clamp, source_min, source_max, target_min, target_max, easing, expected",
|
||||||
|
[
|
||||||
|
(0.5, False, 0, 1, 0, 1, "Linear", (0.5,)),
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_fit_number_set_range(
|
||||||
|
fit_number_instance,
|
||||||
|
value,
|
||||||
|
clamp,
|
||||||
|
source_min,
|
||||||
|
source_max,
|
||||||
|
target_min,
|
||||||
|
target_max,
|
||||||
|
easing,
|
||||||
|
expected,
|
||||||
|
):
|
||||||
|
assert (
|
||||||
|
fit_number_instance.set_range(
|
||||||
|
value=value,
|
||||||
|
clamp=clamp,
|
||||||
|
source_min=source_min,
|
||||||
|
source_max=source_max,
|
||||||
|
target_min=target_min,
|
||||||
|
target_max=target_max,
|
||||||
|
easing=easing,
|
||||||
|
)
|
||||||
|
== expected
|
||||||
|
), "Set range method did not return expected value"
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"value, clamp, source_min, source_max, target_min, target_max, easing, expected",
|
||||||
|
[
|
||||||
|
(0.5, False, 0, 1, 0, 1, "Linear", (0.5,)),
|
||||||
|
(0.4, False, 1.0, 0.4, 0.4, 0.7, "Linear", (0.7,)),
|
||||||
|
# Add more test cases covering various scenarios, edge cases, and easing types
|
||||||
|
],
|
||||||
|
)
|
||||||
|
def test_fit_number_inverted_ranges(
|
||||||
|
fit_number_instance,
|
||||||
|
value,
|
||||||
|
clamp,
|
||||||
|
source_min,
|
||||||
|
source_max,
|
||||||
|
target_min,
|
||||||
|
target_max,
|
||||||
|
easing,
|
||||||
|
expected,
|
||||||
|
):
|
||||||
|
assert (
|
||||||
|
fit_number_instance.set_range(
|
||||||
|
value=value,
|
||||||
|
clamp=clamp,
|
||||||
|
source_min=source_min,
|
||||||
|
source_max=source_max,
|
||||||
|
target_min=target_min,
|
||||||
|
target_max=target_max,
|
||||||
|
easing=easing,
|
||||||
|
)
|
||||||
|
== expected
|
||||||
|
), "Set range method did not return expected value"
|
||||||
Vendored
-52
@@ -1,52 +0,0 @@
|
|||||||
// Some manual types I use to facilitate developing on top of
|
|
||||||
// Comfy's Litegraph implementation.
|
|
||||||
|
|
||||||
import type { ContextMenuItem, LGraphNode } from '../web/types/litegraph'
|
|
||||||
|
|
||||||
export type { ContextMenuItem } from '../web/types/litegraph'
|
|
||||||
export interface NodeData {
|
|
||||||
category: str
|
|
||||||
description: str
|
|
||||||
display_name: str
|
|
||||||
input: NodeInput
|
|
||||||
name: str
|
|
||||||
output: [str]
|
|
||||||
output_is_list: [boolean]
|
|
||||||
output_name: [str]
|
|
||||||
output_node: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface ExtendedLGraphNode {
|
|
||||||
onNodeCreated: () => void
|
|
||||||
getExtraMenuOptions: () => ContextMenuItem[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NodeType /*extends LGraphNode*/ {
|
|
||||||
category: str
|
|
||||||
comfyClass: str
|
|
||||||
length: 0
|
|
||||||
name: str
|
|
||||||
nodeData: NodeData
|
|
||||||
prototype: LGraphNode & ExtendedLGraphNode
|
|
||||||
title: str
|
|
||||||
type: str
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface NodeInput {
|
|
||||||
required: object
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: for prototype overriding
|
|
||||||
export type OnDrawForegroundParams = Parameters<LGraphNode['onDrawForeground']>
|
|
||||||
export type OnMouseDownParams = Parameters<LGraphNode['onMouseDown']>
|
|
||||||
export type OnConnectionsChangeParams = Parameters<
|
|
||||||
LGraphNode['onConnectionsChange']
|
|
||||||
>
|
|
||||||
export type OnNodeCreatedParams = Parameters<
|
|
||||||
ExtendedLGraphNode['onNodeCreated']
|
|
||||||
>
|
|
||||||
|
|
||||||
export interface DocumentationOptions {
|
|
||||||
icon_size?: number
|
|
||||||
icon_margin?: number
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
/**
|
|
||||||
* @typedef {import("./shared.d.ts").NodeData} NodeData
|
|
||||||
* @typedef {import("./shared.d.ts").NodeType} NodeType
|
|
||||||
* @typedef {import("./shared.d.ts").DocumentationOptions} DocumentationOptions
|
|
||||||
* @typedef {import("./shared.d.ts").OnDrawForegroundParams} OnDrawForegroundParams
|
|
||||||
* @typedef {import("./shared.d.ts").OnMouseDownParams} OnMouseDownParams
|
|
||||||
* @typedef {import("./shared.d.ts").OnConnectionsChangeParams} OnConnectionsChangeParams
|
|
||||||
* @typedef {import("./shared.d.ts").getExtraMenuOptionsParams} getExtraMenuOptionsParams
|
|
||||||
*/
|
|
||||||
@@ -43,117 +43,6 @@ def make_report():
|
|||||||
# endregion
|
# endregion
|
||||||
|
|
||||||
|
|
||||||
# region NFOV
|
|
||||||
class numpy_NFOV:
|
|
||||||
def __init__(self, fov=None, height: int = 400, width: int = 800):
|
|
||||||
self.field_of_view = fov or [0.45, 0.45]
|
|
||||||
self.PI = np.pi
|
|
||||||
self.PI_2 = np.pi * 0.5
|
|
||||||
self.PI2 = np.pi * 2.0
|
|
||||||
self.height = height
|
|
||||||
self.width = width
|
|
||||||
self.screen_points = self._get_screen_img()
|
|
||||||
|
|
||||||
def _get_coord_rad(self, is_center_point, center_point=None):
|
|
||||||
if is_center_point:
|
|
||||||
center_point = np.array(center_point)
|
|
||||||
return (center_point * 2 - 1) * np.array([self.PI, self.PI_2])
|
|
||||||
else:
|
|
||||||
return (
|
|
||||||
(self.screen_points * 2 - 1)
|
|
||||||
* np.array([self.PI, self.PI_2])
|
|
||||||
* (np.ones(self.screen_points.shape) * self.field_of_view)
|
|
||||||
)
|
|
||||||
|
|
||||||
def _get_screen_img(self):
|
|
||||||
xx, yy = np.meshgrid(
|
|
||||||
np.linspace(0, 1, self.width), np.linspace(0, 1, self.height)
|
|
||||||
)
|
|
||||||
return np.array([xx.ravel(), yy.ravel()]).T
|
|
||||||
|
|
||||||
def _calc_spherical_to_gnomonic(self, converted_screen_coord):
|
|
||||||
x = converted_screen_coord.T[0]
|
|
||||||
y = converted_screen_coord.T[1]
|
|
||||||
|
|
||||||
rou = np.sqrt(x**2 + y**2)
|
|
||||||
c = np.arctan(rou)
|
|
||||||
sin_c = np.sin(c)
|
|
||||||
cos_c = np.cos(c)
|
|
||||||
|
|
||||||
lat = np.arcsin(
|
|
||||||
cos_c * np.sin(self.cp[1]) + (y * sin_c * np.cos(self.cp[1])) / rou
|
|
||||||
)
|
|
||||||
lon = self.cp[0] + np.arctan2(
|
|
||||||
x * sin_c,
|
|
||||||
rou * np.cos(self.cp[1]) * cos_c - y * np.sin(self.cp[1]) * sin_c,
|
|
||||||
)
|
|
||||||
|
|
||||||
lat = (lat / self.PI_2 + 1.0) * 0.5
|
|
||||||
lon = (lon / self.PI + 1.0) * 0.5
|
|
||||||
|
|
||||||
return np.array([lon, lat]).T
|
|
||||||
|
|
||||||
def _bilinear_interpolation(self, screen_coord):
|
|
||||||
uf = np.mod(screen_coord.T[0], 1) * self.frame_width # long - width
|
|
||||||
vf = np.mod(screen_coord.T[1], 1) * self.frame_height # lat - height
|
|
||||||
|
|
||||||
x0 = np.floor(uf).astype(int) # coord of pixel to bottom left
|
|
||||||
y0 = np.floor(vf).astype(int)
|
|
||||||
x2 = np.add(
|
|
||||||
x0, np.ones(uf.shape).astype(int)
|
|
||||||
) # coords of pixel to top right
|
|
||||||
y2 = np.add(y0, np.ones(vf.shape).astype(int))
|
|
||||||
|
|
||||||
base_y0 = np.multiply(y0, self.frame_width)
|
|
||||||
base_y2 = np.multiply(y2, self.frame_width)
|
|
||||||
|
|
||||||
A_idx = np.add(base_y0, x0)
|
|
||||||
B_idx = np.add(base_y2, x0)
|
|
||||||
C_idx = np.add(base_y0, x2)
|
|
||||||
D_idx = np.add(base_y2, x2)
|
|
||||||
|
|
||||||
flat_img = np.reshape(self.frame, [-1, self.frame_channel])
|
|
||||||
|
|
||||||
A = np.take(flat_img, A_idx, axis=0)
|
|
||||||
B = np.take(flat_img, B_idx, axis=0)
|
|
||||||
C = np.take(flat_img, C_idx, axis=0)
|
|
||||||
D = np.take(flat_img, D_idx, axis=0)
|
|
||||||
|
|
||||||
wa = np.multiply(x2 - uf, y2 - vf)
|
|
||||||
wb = np.multiply(x2 - uf, vf - y0)
|
|
||||||
wc = np.multiply(uf - x0, y2 - vf)
|
|
||||||
wd = np.multiply(uf - x0, vf - y0)
|
|
||||||
|
|
||||||
# interpolate
|
|
||||||
AA = np.multiply(A, np.array([wa, wa, wa]).T)
|
|
||||||
BB = np.multiply(B, np.array([wb, wb, wb]).T)
|
|
||||||
CC = np.multiply(C, np.array([wc, wc, wc]).T)
|
|
||||||
DD = np.multiply(D, np.array([wd, wd, wd]).T)
|
|
||||||
nfov = np.reshape(
|
|
||||||
np.round(AA + BB + CC + DD).astype(np.uint8),
|
|
||||||
[self.height, self.width, 3],
|
|
||||||
)
|
|
||||||
|
|
||||||
return nfov
|
|
||||||
|
|
||||||
def to_nfov(self, frame, center_point):
|
|
||||||
self.frame = frame
|
|
||||||
self.frame_height = frame.shape[0]
|
|
||||||
self.frame_width = frame.shape[1]
|
|
||||||
self.frame_channel = frame.shape[2]
|
|
||||||
|
|
||||||
self.cp = self._get_coord_rad(
|
|
||||||
center_point=center_point, is_center_point=True
|
|
||||||
)
|
|
||||||
converted_screen_coord = self._get_coord_rad(is_center_point=False)
|
|
||||||
return self._bilinear_interpolation(
|
|
||||||
self._calc_spherical_to_gnomonic(converted_screen_coord)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
# endregion
|
|
||||||
|
|
||||||
|
|
||||||
# region SERVER Utilities
|
# region SERVER Utilities
|
||||||
class IPChecker:
|
class IPChecker:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
|||||||
+41
-349
@@ -7,16 +7,13 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Reference the shared typedefs file
|
|
||||||
/// <reference path="../types/typedefs.js" />
|
|
||||||
|
|
||||||
import { app } from '../../scripts/app.js'
|
import { app } from '../../scripts/app.js'
|
||||||
|
|
||||||
// - crude uuid
|
// - crude uuid
|
||||||
export function makeUUID() {
|
export function makeUUID() {
|
||||||
let dt = new Date().getTime()
|
let dt = new Date().getTime()
|
||||||
const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
const uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
|
||||||
const r = ((dt + Math.random() * 16) % 16) | 0
|
const r = (dt + Math.random() * 16) % 16 | 0
|
||||||
dt = Math.floor(dt / 16)
|
dt = Math.floor(dt / 16)
|
||||||
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
|
return (c === 'x' ? r : (r & 0x3) | 0x8).toString(16)
|
||||||
})
|
})
|
||||||
@@ -48,18 +45,16 @@ export class LocalStorageManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
for (const key of Object.keys(localStorage).filter((k) =>
|
Object.keys(localStorage)
|
||||||
k.startsWith(`${this.namespace}:`),
|
.filter((k) => k.startsWith(this.namespace + ':'))
|
||||||
)) {
|
.forEach((k) => localStorage.removeItem(k))
|
||||||
localStorage.removeItem(key)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// - log utilities
|
// - log utilities
|
||||||
|
|
||||||
function createLogger(emoji, color, consoleMethod = 'log') {
|
function createLogger(emoji, color, consoleMethod = 'log') {
|
||||||
return (message, ...args) => {
|
return function (message, ...args) {
|
||||||
if (window.MTB?.DEBUG) {
|
if (window.MTB?.DEBUG) {
|
||||||
console[consoleMethod](
|
console[consoleMethod](
|
||||||
`%c${emoji} ${message}`,
|
`%c${emoji} ${message}`,
|
||||||
@@ -70,8 +65,8 @@ function createLogger(emoji, color, consoleMethod = 'log') {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const infoLogger = createLogger('i', 'yellow')
|
export const infoLogger = createLogger('ℹ️', 'yellow')
|
||||||
export const warnLogger = createLogger('!', 'orange', 'warn')
|
export const warnLogger = createLogger('⚠️', 'orange', 'warn')
|
||||||
export const errorLogger = createLogger('🔥', 'red', 'error')
|
export const errorLogger = createLogger('🔥', 'red', 'error')
|
||||||
export const successLogger = createLogger('✅', 'green')
|
export const successLogger = createLogger('✅', 'green')
|
||||||
|
|
||||||
@@ -152,7 +147,7 @@ export function getWidgetType(config) {
|
|||||||
// Special handling for COMBO so we restrict links based on the entries
|
// Special handling for COMBO so we restrict links based on the entries
|
||||||
let type = config?.[0]
|
let type = config?.[0]
|
||||||
let linkType = type
|
let linkType = type
|
||||||
if (Array.isArray(type)) {
|
if (type instanceof Array) {
|
||||||
type = 'COMBO'
|
type = 'COMBO'
|
||||||
linkType = linkType.join(',')
|
linkType = linkType.join(',')
|
||||||
}
|
}
|
||||||
@@ -160,26 +155,23 @@ export function getWidgetType(config) {
|
|||||||
}
|
}
|
||||||
export const setupDynamicConnections = (nodeType, prefix, inputType) => {
|
export const setupDynamicConnections = (nodeType, prefix, inputType) => {
|
||||||
const onNodeCreated = nodeType.prototype.onNodeCreated
|
const onNodeCreated = nodeType.prototype.onNodeCreated
|
||||||
// check if it's a list
|
|
||||||
const inputList = typeof inputType === 'object'
|
|
||||||
nodeType.prototype.onNodeCreated = function () {
|
nodeType.prototype.onNodeCreated = function () {
|
||||||
const r = onNodeCreated ? onNodeCreated.apply(this, []) : undefined
|
const r = onNodeCreated ? onNodeCreated.apply(this, arguments) : undefined
|
||||||
this.addInput(`${prefix}_1`, inputList ? '*' : inputType)
|
this.addInput(`${prefix}_1`, inputType)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
|
|
||||||
const onConnectionsChange = nodeType.prototype.onConnectionsChange
|
const onConnectionsChange = nodeType.prototype.onConnectionsChange
|
||||||
|
nodeType.prototype.onConnectionsChange = function (
|
||||||
/**
|
type,
|
||||||
* @param {OnConnectionsChangeParams} args
|
index,
|
||||||
*/
|
connected,
|
||||||
nodeType.prototype.onConnectionsChange = function (...args) {
|
link_info,
|
||||||
const [_type, index, connected, _link_info] = args
|
) {
|
||||||
const r = onConnectionsChange
|
const r = onConnectionsChange
|
||||||
? onConnectionsChange.apply(this, args)
|
? onConnectionsChange.apply(this, arguments)
|
||||||
: undefined
|
: undefined
|
||||||
dynamic_connection(this, index, connected, `${prefix}_`, inputList)
|
dynamic_connection(this, index, connected, `${prefix}_`, inputType)
|
||||||
return r
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export const dynamic_connection = (
|
export const dynamic_connection = (
|
||||||
@@ -193,8 +185,6 @@ export const dynamic_connection = (
|
|||||||
if (!node.inputs[index].name.startsWith(connectionPrefix)) {
|
if (!node.inputs[index].name.startsWith(connectionPrefix)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const listConnection = typeof connectionType === 'object'
|
|
||||||
|
|
||||||
// remove all non connected inputs
|
// remove all non connected inputs
|
||||||
if (!connected && node.inputs.length > 1) {
|
if (!connected && node.inputs.length > 1) {
|
||||||
log(`Removing input ${index} (${node.inputs[index].name})`)
|
log(`Removing input ${index} (${node.inputs[index].name})`)
|
||||||
@@ -217,7 +207,7 @@ export const dynamic_connection = (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add an extra input
|
// add an extra input
|
||||||
if (node.inputs[node.inputs.length - 1].link !== undefined) {
|
if (node.inputs[node.inputs.length - 1].link != undefined) {
|
||||||
const nextIndex = node.inputs.length
|
const nextIndex = node.inputs.length
|
||||||
const name =
|
const name =
|
||||||
nextIndex < nameArray.length
|
nextIndex < nameArray.length
|
||||||
@@ -226,7 +216,7 @@ export const dynamic_connection = (
|
|||||||
|
|
||||||
log(`Adding input ${nextIndex + 1} (${name})`)
|
log(`Adding input ${nextIndex + 1} (${name})`)
|
||||||
|
|
||||||
node.addInput(name, listConnection ? '*' : connectionType)
|
node.addInput(name, connectionType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,11 +227,11 @@ export function calculateTotalChildrenHeight(parentElement) {
|
|||||||
const style = window.getComputedStyle(child)
|
const style = window.getComputedStyle(child)
|
||||||
|
|
||||||
// Get height as an integer (without 'px')
|
// Get height as an integer (without 'px')
|
||||||
const height = Number.parseInt(style.height, 10)
|
const height = parseInt(style.height, 10)
|
||||||
|
|
||||||
// Get vertical margin as integers
|
// Get vertical margin as integers
|
||||||
const marginTop = Number.parseInt(style.marginTop, 10)
|
const marginTop = parseInt(style.marginTop, 10)
|
||||||
const marginBottom = Number.parseInt(style.marginBottom, 10)
|
const marginBottom = parseInt(style.marginBottom, 10)
|
||||||
|
|
||||||
// Sum up height and vertical margins
|
// Sum up height and vertical margins
|
||||||
totalHeight += height + marginTop + marginBottom
|
totalHeight += height + marginTop + marginBottom
|
||||||
@@ -256,12 +246,9 @@ export function calculateTotalChildrenHeight(parentElement) {
|
|||||||
*/
|
*/
|
||||||
export function addMenuHandler(nodeType, cb) {
|
export function addMenuHandler(nodeType, cb) {
|
||||||
const getOpts = nodeType.prototype.getExtraMenuOptions
|
const getOpts = nodeType.prototype.getExtraMenuOptions
|
||||||
/**
|
|
||||||
* @returns {ContextMenuItem[]} items
|
|
||||||
*/
|
|
||||||
nodeType.prototype.getExtraMenuOptions = function () {
|
nodeType.prototype.getExtraMenuOptions = function () {
|
||||||
const r = getOpts.apply(this, [])
|
const r = getOpts.apply(this, arguments)
|
||||||
cb.apply(this, [])
|
cb.apply(this, arguments)
|
||||||
return r
|
return r
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -287,7 +274,7 @@ export function hideWidget(node, widget, suffix = '') {
|
|||||||
// Hide any linked widgets, e.g. seed+seedControl
|
// Hide any linked widgets, e.g. seed+seedControl
|
||||||
if (widget.linkedWidgets) {
|
if (widget.linkedWidgets) {
|
||||||
for (const w of widget.linkedWidgets) {
|
for (const w of widget.linkedWidgets) {
|
||||||
hideWidget(node, w, `:${widget.name}`)
|
hideWidget(node, w, ':' + widget.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,7 +346,7 @@ export function hideWidgetForGood(node, widget, suffix = '') {
|
|||||||
// Hide any linked widgets, e.g. seed+seedControl
|
// Hide any linked widgets, e.g. seed+seedControl
|
||||||
if (widget.linkedWidgets) {
|
if (widget.linkedWidgets) {
|
||||||
for (const w of widget.linkedWidgets) {
|
for (const w of widget.linkedWidgets) {
|
||||||
hideWidgetForGood(node, w, `:${widget.name}`)
|
hideWidgetForGood(node, w, ':' + widget.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -377,7 +364,7 @@ export function fixWidgets(node) {
|
|||||||
// continue
|
// continue
|
||||||
// }
|
// }
|
||||||
const w = node.widgets.find((w) => w.name === matching_widget.name)
|
const w = node.widgets.find((w) => w.name === matching_widget.name)
|
||||||
if (w && w.type !== CONVERTED_TYPE) {
|
if (w && w.type != CONVERTED_TYPE) {
|
||||||
log(w)
|
log(w)
|
||||||
log(`hidding ${w.name}(${w.type}) from ${node.type}`)
|
log(`hidding ${w.name}(${w.type}) from ${node.type}`)
|
||||||
log(node)
|
log(node)
|
||||||
@@ -392,16 +379,16 @@ export function fixWidgets(node) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export function inner_value_change(widget, val, event = undefined) {
|
export function inner_value_change(widget, value, event = undefined) {
|
||||||
let value = val
|
if (widget.type == 'number' || widget.type == 'BBOX') {
|
||||||
if (widget.type === 'number' || widget.type === 'BBOX') {
|
|
||||||
value = Number(value)
|
value = Number(value)
|
||||||
} else if (widget.type === 'BOOL') {
|
} else if (widget.type == 'BOOL') {
|
||||||
value = Boolean(value)
|
value = Boolean(value)
|
||||||
}
|
}
|
||||||
widget.value = value
|
widget.value = value
|
||||||
if (
|
if (
|
||||||
widget.options?.property &&
|
widget.options &&
|
||||||
|
widget.options.property &&
|
||||||
node.properties[widget.options.property] !== undefined
|
node.properties[widget.options.property] !== undefined
|
||||||
) {
|
) {
|
||||||
node.setProperty(widget.options.property, value)
|
node.setProperty(widget.options.property, value)
|
||||||
@@ -419,9 +406,9 @@ export function isColorBright(rgb, threshold = 240) {
|
|||||||
|
|
||||||
function getBrightness(rgbObj) {
|
function getBrightness(rgbObj) {
|
||||||
return Math.round(
|
return Math.round(
|
||||||
(Number.parseInt(rgbObj[0]) * 299 +
|
(parseInt(rgbObj[0]) * 299 +
|
||||||
Number.parseInt(rgbObj[1]) * 587 +
|
parseInt(rgbObj[1]) * 587 +
|
||||||
Number.parseInt(rgbObj[2]) * 114) /
|
parseInt(rgbObj[2]) * 114) /
|
||||||
1000,
|
1000,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -446,14 +433,14 @@ export const loadScript = (
|
|||||||
scriptEle.async = async
|
scriptEle.async = async
|
||||||
scriptEle.src = FILE_URL
|
scriptEle.src = FILE_URL
|
||||||
|
|
||||||
scriptEle.addEventListener('load', (_ev) => {
|
scriptEle.addEventListener('load', (ev) => {
|
||||||
resolve({ status: true })
|
resolve({ status: true })
|
||||||
})
|
})
|
||||||
|
|
||||||
scriptEle.addEventListener('error', (_ev) => {
|
scriptEle.addEventListener('error', (ev) => {
|
||||||
reject({
|
reject({
|
||||||
status: false,
|
status: false,
|
||||||
message: `Failed to load the script ${FILE_URL}`,
|
message: `Failed to load the script ${FILE_URL}`,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -500,7 +487,7 @@ export function defineClass(className, classStyles) {
|
|||||||
/** Prefixes the node title with '[DEPRECATED]' and log the deprecation reason to the console.*/
|
/** Prefixes the node title with '[DEPRECATED]' and log the deprecation reason to the console.*/
|
||||||
export const addDeprecation = (nodeType, reason) => {
|
export const addDeprecation = (nodeType, reason) => {
|
||||||
const title = nodeType.title
|
const title = nodeType.title
|
||||||
nodeType.title = `[DEPRECATED] ${title}`
|
nodeType.title = '[DEPRECATED] ' + title
|
||||||
// console.log(nodeType)
|
// console.log(nodeType)
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
@@ -508,303 +495,8 @@ export const addDeprecation = (nodeType, reason) => {
|
|||||||
reason: 'font-size:1.2em',
|
reason: 'font-size:1.2em',
|
||||||
}
|
}
|
||||||
console.log(
|
console.log(
|
||||||
`%c! ${title} is deprecated:%c ${reason}`,
|
`%c⚠️ ${title} is deprecated:%c ${reason}`,
|
||||||
styles.title,
|
styles.title,
|
||||||
styles.reason,
|
styles.reason,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
const create_documentation_stylesheet = () => {
|
|
||||||
const tag = 'mtb-documentation-stylesheet'
|
|
||||||
|
|
||||||
let styleTag = document.head.querySelector(tag)
|
|
||||||
|
|
||||||
if (!styleTag) {
|
|
||||||
styleTag = document.createElement('style')
|
|
||||||
styleTag.type = 'text/css'
|
|
||||||
styleTag.id = tag
|
|
||||||
|
|
||||||
styleTag.innerHTML = `
|
|
||||||
.documentation-popup {
|
|
||||||
background: var(--comfy-menu-bg);
|
|
||||||
position: absolute;
|
|
||||||
color: var(--fg-color);
|
|
||||||
font: 12px monospace;
|
|
||||||
line-height: 1.5em;
|
|
||||||
padding: 10px;
|
|
||||||
border-radius: 6px;
|
|
||||||
pointer-events: "inherit";
|
|
||||||
z-index: 5;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
.documentation-wrapper {
|
|
||||||
padding: 0 2em;
|
|
||||||
overflow: auto;
|
|
||||||
max-height: 100%;
|
|
||||||
/* Scrollbar styling for Chrome */
|
|
||||||
&::-webkit-scrollbar {
|
|
||||||
width: 6px;
|
|
||||||
}
|
|
||||||
&::-webkit-scrollbar-track {
|
|
||||||
background: var(--bg-color);
|
|
||||||
}
|
|
||||||
&::-webkit-scrollbar-thumb {
|
|
||||||
background-color: var(--fg-color);
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 3px solid var(--bg-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Scrollbar styling for Firefox */
|
|
||||||
scrollbar-width: thin;
|
|
||||||
scrollbar-color: var(--fg-color) var(--bg-color);
|
|
||||||
a {
|
|
||||||
color: yellow;
|
|
||||||
}
|
|
||||||
a:visited {
|
|
||||||
color: orange;
|
|
||||||
}
|
|
||||||
a:hover {
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.documentation-popup img {
|
|
||||||
max-width: 100%;
|
|
||||||
}
|
|
||||||
.documentation-popup table {
|
|
||||||
border-collapse: collapse;
|
|
||||||
border: 1px var(--border-color) solid;
|
|
||||||
}
|
|
||||||
.documentation-popup th,
|
|
||||||
.documentation-popup td {
|
|
||||||
border: 1px var(--border-color) solid;
|
|
||||||
}
|
|
||||||
.documentation-popup th {
|
|
||||||
background-color: var(--comfy-input-bg);
|
|
||||||
}`
|
|
||||||
document.head.appendChild(styleTag)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
let documentationConverter
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Add documentation widget to the selected node
|
|
||||||
* @param {NodeData} nodeData
|
|
||||||
* @param {NodeType} nodeType
|
|
||||||
* @param {DocumentationOptions} opts
|
|
||||||
*/
|
|
||||||
export const addDocumentation = (
|
|
||||||
nodeData,
|
|
||||||
nodeType,
|
|
||||||
opts = { icon_size: 14, icon_margin: 4 },
|
|
||||||
) => {
|
|
||||||
if (!nodeData.description) {
|
|
||||||
infoLogger(
|
|
||||||
`Skipping ${nodeData.name} doesn't have a description, skipping...`,
|
|
||||||
)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!documentationConverter) {
|
|
||||||
infoLogger('Initializing our mardown converter')
|
|
||||||
documentationConverter = new showdown.Converter({
|
|
||||||
tables: true,
|
|
||||||
strikethrough: true,
|
|
||||||
emoji: true,
|
|
||||||
ghCodeBlocks: true,
|
|
||||||
tasklists: true,
|
|
||||||
ghMentions: true,
|
|
||||||
smoothLivePreview: true,
|
|
||||||
simplifiedAutoLink: true,
|
|
||||||
parseImgDimensions: true,
|
|
||||||
openLinksInNewWindow: true,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const options = opts || {}
|
|
||||||
const iconSize = options.icon_size || 14
|
|
||||||
const iconMargin = options.icon_margin || 4
|
|
||||||
let docElement = null
|
|
||||||
let wrapper = null
|
|
||||||
const drawFg = nodeType.prototype.onDrawForeground
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {OnDrawForegroundParams} args
|
|
||||||
*/
|
|
||||||
nodeType.prototype.onDrawForeground = function (...args) {
|
|
||||||
const [ctx, _canvas] = args
|
|
||||||
const r = drawFg ? drawFg.apply(this, args) : undefined
|
|
||||||
|
|
||||||
if (this.flags.collapsed) return r
|
|
||||||
|
|
||||||
// icon position
|
|
||||||
const x = this.size[0] - iconSize - iconMargin
|
|
||||||
|
|
||||||
if (this.show_doc && docElement === null) {
|
|
||||||
create_documentation_stylesheet()
|
|
||||||
|
|
||||||
docElement = document.createElement('div')
|
|
||||||
docElement.classList.add('documentation-popup')
|
|
||||||
document.body.appendChild(docElement)
|
|
||||||
// docElement.innerHTML = documentationConverter.makeHtml(
|
|
||||||
// nodeData.description,
|
|
||||||
// )
|
|
||||||
|
|
||||||
wrapper = document.createElement('div')
|
|
||||||
wrapper.classList.add('documentation-wrapper')
|
|
||||||
wrapper.innerHTML = documentationConverter.makeHtml(nodeData.description)
|
|
||||||
docElement.appendChild(wrapper)
|
|
||||||
|
|
||||||
// resize handle
|
|
||||||
const resizeHandle = document.createElement('div')
|
|
||||||
resizeHandle.style.width = '10px'
|
|
||||||
resizeHandle.style.height = '10px'
|
|
||||||
// resizeHandle.style.background = 'gray'
|
|
||||||
resizeHandle.style.position = 'absolute'
|
|
||||||
resizeHandle.style.bottom = '0'
|
|
||||||
resizeHandle.style.right = '0'
|
|
||||||
// resizeHandle.style.left = '95%'
|
|
||||||
resizeHandle.style.cursor = 'se-resize'
|
|
||||||
resizeHandle.style.userSelect = 'none'
|
|
||||||
|
|
||||||
const borderColor = getComputedStyle(document.documentElement)
|
|
||||||
.getPropertyValue('--border-color')
|
|
||||||
.trim()
|
|
||||||
resizeHandle.style.borderTop = '10px solid transparent'
|
|
||||||
resizeHandle.style.borderLeft = '10px solid transparent'
|
|
||||||
resizeHandle.style.borderBottom = `10px solid ${borderColor}`
|
|
||||||
resizeHandle.style.borderRight = `10px solid ${borderColor}`
|
|
||||||
|
|
||||||
wrapper.appendChild(resizeHandle)
|
|
||||||
let isResizing = false
|
|
||||||
|
|
||||||
let startX
|
|
||||||
let startY
|
|
||||||
let startWidth
|
|
||||||
let startHeight
|
|
||||||
|
|
||||||
resizeHandle.addEventListener('mousedown', (e) => {
|
|
||||||
e.stopPropagation()
|
|
||||||
isResizing = true
|
|
||||||
startX = e.clientX
|
|
||||||
startY = e.clientY
|
|
||||||
startWidth = Number.parseInt(
|
|
||||||
document.defaultView.getComputedStyle(docElement).width,
|
|
||||||
10,
|
|
||||||
)
|
|
||||||
startHeight = Number.parseInt(
|
|
||||||
document.defaultView.getComputedStyle(docElement).height,
|
|
||||||
10,
|
|
||||||
)
|
|
||||||
})
|
|
||||||
|
|
||||||
document.addEventListener('mousemove', (e) => {
|
|
||||||
console.log('Moving mouse')
|
|
||||||
if (!isResizing) return
|
|
||||||
const newWidth = startWidth + e.clientX - startX
|
|
||||||
const newHeight = startHeight + e.clientY - startY
|
|
||||||
|
|
||||||
docElement.style.width = `${newWidth}px`
|
|
||||||
docElement.style.height = `${newHeight}px`
|
|
||||||
|
|
||||||
this.docPos = {
|
|
||||||
width: `${newWidth}px`,
|
|
||||||
height: `${newHeight}px`,
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
document.addEventListener('mouseup', () => {
|
|
||||||
isResizing = false
|
|
||||||
})
|
|
||||||
} else if (!this.show_doc && docElement !== null) {
|
|
||||||
docElement.parentNode.removeChild(docElement)
|
|
||||||
docElement = null
|
|
||||||
}
|
|
||||||
|
|
||||||
// reposition
|
|
||||||
if (this.show_doc && docElement !== null) {
|
|
||||||
const rect = ctx.canvas.getBoundingClientRect()
|
|
||||||
|
|
||||||
const scaleX = rect.width / ctx.canvas.width
|
|
||||||
const scaleY = rect.height / ctx.canvas.height
|
|
||||||
const transform = new DOMMatrix()
|
|
||||||
.scaleSelf(scaleX, scaleY)
|
|
||||||
.multiplySelf(ctx.getTransform())
|
|
||||||
.translateSelf(this.size[0] * scaleX, 0)
|
|
||||||
.translateSelf(10, -32)
|
|
||||||
|
|
||||||
const scale = new DOMMatrix().scaleSelf(transform.a, transform.d)
|
|
||||||
|
|
||||||
Object.assign(docElement.style, {
|
|
||||||
transformOrigin: '0 0',
|
|
||||||
transform: scale,
|
|
||||||
left: `${transform.a + transform.e}px`,
|
|
||||||
top: `${transform.d + transform.f}px`,
|
|
||||||
width: this.docPos ? this.docPos.width : `${this.size[0] * 1.5}px`,
|
|
||||||
height: this.docPos?.height,
|
|
||||||
// width: `${this.size[0] * 2}px`,
|
|
||||||
// height: `${(widget.parent?.inputHeight || 32) - (margin * 2)}px`,
|
|
||||||
// height: `${this.size[1] || this.parent?.inputHeight || 32}px`,
|
|
||||||
|
|
||||||
// background: !node.color ? "" : node.color,
|
|
||||||
// color: "blue", //!node.color ? "" : "white",
|
|
||||||
})
|
|
||||||
|
|
||||||
if (this.docPos === undefined) {
|
|
||||||
this.docPos = {
|
|
||||||
width: docElement.style.width,
|
|
||||||
height: docElement.style.height,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// docElement.style.left = 140 - rect.right + "px";
|
|
||||||
// docElement.style.top = rect.top + "px";
|
|
||||||
}
|
|
||||||
|
|
||||||
ctx.save()
|
|
||||||
ctx.translate(x, iconSize - 34) // Position the icon on the canvas
|
|
||||||
ctx.scale(iconSize / 32, iconSize / 32) // Scale the icon to the desired size
|
|
||||||
ctx.strokeStyle = 'rgba(255,255,255,0.3)'
|
|
||||||
|
|
||||||
ctx.lineCap = 'round'
|
|
||||||
ctx.lineJoin = 'round'
|
|
||||||
|
|
||||||
ctx.lineWidth = 2.4
|
|
||||||
// ctx.stroke(questionMark);
|
|
||||||
ctx.font = 'bold 36px monospace'
|
|
||||||
ctx.fillText('?', 0, 24)
|
|
||||||
ctx.restore()
|
|
||||||
|
|
||||||
return r
|
|
||||||
}
|
|
||||||
const mouseDown = nodeType.prototype.onMouseDown
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {OnMouseDownParams} args
|
|
||||||
*/
|
|
||||||
nodeType.prototype.onMouseDown = function (...args) {
|
|
||||||
const [_event, localPos, _graphCanvas] = args
|
|
||||||
const r = mouseDown ? mouseDown.apply(this, args) : undefined
|
|
||||||
const iconX = this.size[0] - iconSize - iconMargin
|
|
||||||
const iconY = iconSize - 34
|
|
||||||
if (
|
|
||||||
localPos[0] > iconX &&
|
|
||||||
localPos[0] < iconX + iconSize &&
|
|
||||||
localPos[1] > iconY &&
|
|
||||||
localPos[1] < iconY + iconSize
|
|
||||||
) {
|
|
||||||
// Pencil icon was clicked, open the editor
|
|
||||||
// this.openEditorDialog();
|
|
||||||
if (this.show_doc === undefined) {
|
|
||||||
this.show_doc = true
|
|
||||||
} else {
|
|
||||||
this.show_doc = !this.show_doc
|
|
||||||
}
|
|
||||||
return true // Return true to indicate the event was handled
|
|
||||||
}
|
|
||||||
|
|
||||||
return r // Return false to let the event propagate
|
|
||||||
|
|
||||||
// return r;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
-262
@@ -1,262 +0,0 @@
|
|||||||
import { app } from '../../scripts/app.js'
|
|
||||||
import * as shared from './comfy_shared.js'
|
|
||||||
import { MtbWidgets } from './mtb_widgets.js'
|
|
||||||
|
|
||||||
export class Constant extends LiteGraph.LGraphNode {
|
|
||||||
constructor() {
|
|
||||||
super()
|
|
||||||
this.uuid = shared.makeUUID()
|
|
||||||
this.collapsable = true
|
|
||||||
|
|
||||||
// this avoid serializing the node when converting to prompt
|
|
||||||
this.isVirtualNode = true
|
|
||||||
|
|
||||||
this.shape = LiteGraph.BOX_SHAPE
|
|
||||||
this.serialize_widgets = true
|
|
||||||
|
|
||||||
// Properties
|
|
||||||
this.addProperty('type', 'number')
|
|
||||||
this.addProperty('value', 0)
|
|
||||||
|
|
||||||
// Inputs and outputs
|
|
||||||
this.addOutput('Output', '*')
|
|
||||||
|
|
||||||
// Widget for selecting the type
|
|
||||||
this.addWidget(
|
|
||||||
'combo',
|
|
||||||
'Type',
|
|
||||||
this.properties.type,
|
|
||||||
(value) => {
|
|
||||||
this.properties.type = value
|
|
||||||
this.updateWidgets()
|
|
||||||
this.updateOutputType()
|
|
||||||
},
|
|
||||||
{
|
|
||||||
values: ['number', 'string', 'vector2', 'vector3', 'vector4', 'color'],
|
|
||||||
},
|
|
||||||
)
|
|
||||||
|
|
||||||
// Initialize the node
|
|
||||||
this.updateWidgets()
|
|
||||||
this.updateOutputType()
|
|
||||||
}
|
|
||||||
// NOTE: this is called onPrompt
|
|
||||||
applyToGraph() {
|
|
||||||
this.updateTargetWidgets()
|
|
||||||
}
|
|
||||||
|
|
||||||
configure(info) {
|
|
||||||
super.configure(info)
|
|
||||||
this.properties.type = info.properties.type
|
|
||||||
this.properties.value = info.properties.value
|
|
||||||
|
|
||||||
shared.infoLogger('Configure Constant', { info, node: this })
|
|
||||||
this.updateWidgets()
|
|
||||||
this.updateOutputType()
|
|
||||||
}
|
|
||||||
|
|
||||||
updateWidgets() {
|
|
||||||
// Remove existing widgets
|
|
||||||
for (let i = 1; i < this.widgets.length; i++) {
|
|
||||||
const element = this.widgets[i]
|
|
||||||
if (element.onRemove) {
|
|
||||||
element.onRemove()
|
|
||||||
}
|
|
||||||
// element?.onRemove()
|
|
||||||
}
|
|
||||||
|
|
||||||
this.widgets.splice(1)
|
|
||||||
switch (this.properties.type) {
|
|
||||||
case 'color': {
|
|
||||||
if (typeof this.properties.value !== 'string') {
|
|
||||||
this.properties.value = '#ffffff'
|
|
||||||
}
|
|
||||||
const col_widget = this.addCustomWidget(
|
|
||||||
MtbWidgets.COLOR('Value', this.properties.value || '#ff0000'),
|
|
||||||
)
|
|
||||||
col_widget.callback = (col) => {
|
|
||||||
this.properties.value = col
|
|
||||||
this.updateOutput()
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case 'number':
|
|
||||||
if (typeof this.properties.value !== 'number') {
|
|
||||||
this.properties.value = 0.0
|
|
||||||
}
|
|
||||||
this.addWidget('number', 'Value', this.properties.value, (value) => {
|
|
||||||
this.properties.value = value
|
|
||||||
this.updateOutput()
|
|
||||||
})
|
|
||||||
this.addWidget(
|
|
||||||
'toggle',
|
|
||||||
'Convert to Integer',
|
|
||||||
this.properties.force_int,
|
|
||||||
(value) => {
|
|
||||||
this.properties.force_int = value
|
|
||||||
this.updateOutputType()
|
|
||||||
},
|
|
||||||
)
|
|
||||||
break
|
|
||||||
case 'string': {
|
|
||||||
if (typeof this.properties.value !== 'string') {
|
|
||||||
this.properties.value = `${this.properties.value}`
|
|
||||||
}
|
|
||||||
shared.addMultilineWidget(
|
|
||||||
this,
|
|
||||||
'Value',
|
|
||||||
{
|
|
||||||
defaultVal: this.properties.value,
|
|
||||||
},
|
|
||||||
(v) => {
|
|
||||||
this.properties.value = v
|
|
||||||
this.updateOutput()
|
|
||||||
},
|
|
||||||
)
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case 'vector2':
|
|
||||||
case 'vector3':
|
|
||||||
case 'vector4': {
|
|
||||||
const numInputs = Number.parseInt(this.properties.type.charAt(6))
|
|
||||||
|
|
||||||
if (['string', 'number'].includes(typeof this.properties.value)) {
|
|
||||||
this.properties.value = Array.from({ length: numInputs }, () => 0.0)
|
|
||||||
} else if (this.properties.value.length !== numInputs) {
|
|
||||||
if (this.properties.value.length > numInputs) {
|
|
||||||
this.properties.value = this.properties.value.slice(0, numInputs)
|
|
||||||
} else {
|
|
||||||
this.properties.value = this.properties.value.concat(
|
|
||||||
new Array(numInputs - this.properties.value.length).fill(0.0),
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (let i = 0; i < numInputs; i++) {
|
|
||||||
this.addWidget(
|
|
||||||
'number',
|
|
||||||
`Value ${i + 1}`,
|
|
||||||
this.properties.value[i] || 0,
|
|
||||||
(value) => {
|
|
||||||
this.properties.value[i] = value
|
|
||||||
this.updateOutput()
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
break
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onConnectionsChange(type, slotIndex, isConnected, link, ioSlot) {
|
|
||||||
// super.onConnectionsChange(type, slotIndex, isConnected, link, ioSlot)
|
|
||||||
if (isConnected) {
|
|
||||||
this.updateTargetWidgets([link.id])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
updateOutputType() {
|
|
||||||
const cur_type = this.outputs[0].type
|
|
||||||
const rm_if_mismatch = (type) => {
|
|
||||||
if (cur_type !== type) {
|
|
||||||
for (let i = 0; i < this.outputs.length; i++) {
|
|
||||||
this.removeOutput(i)
|
|
||||||
}
|
|
||||||
this.addOutput('output', type)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
switch (this.properties.type) {
|
|
||||||
case 'color':
|
|
||||||
rm_if_mismatch('COLOR')
|
|
||||||
break
|
|
||||||
case 'number':
|
|
||||||
if (this.properties.force_int) {
|
|
||||||
rm_if_mismatch('INT')
|
|
||||||
} else {
|
|
||||||
rm_if_mismatch('FLOAT')
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'string':
|
|
||||||
rm_if_mismatch('STRING')
|
|
||||||
break
|
|
||||||
case 'vector2':
|
|
||||||
rm_if_mismatch('VECTOR2')
|
|
||||||
break
|
|
||||||
case 'vector3':
|
|
||||||
rm_if_mismatch('VECTOR3')
|
|
||||||
break
|
|
||||||
case 'vector4':
|
|
||||||
rm_if_mismatch('VECTOR4')
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
this.updateOutput()
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NOTE: This feels hacky but seems to work fine
|
|
||||||
* since Constant is a virtual node.
|
|
||||||
*/
|
|
||||||
updateTargetWidgets(u_links) {
|
|
||||||
if (!app.graph.links) return
|
|
||||||
const links = u_links || this.outputs[0].links
|
|
||||||
if (!links) return
|
|
||||||
for (let i = 0; i < links.length; i++) {
|
|
||||||
const link = app.graph.links[links[i]]
|
|
||||||
const tgt_node = app.graph.getNodeById(link.target_id)
|
|
||||||
if (!tgt_node || !tgt_node.inputs) return
|
|
||||||
const tgt_input = tgt_node.inputs[link.target_slot]
|
|
||||||
if (!tgt_input) return
|
|
||||||
const tgt_widget = tgt_node.widgets.filter(
|
|
||||||
(w) => w.name === tgt_input.name,
|
|
||||||
)
|
|
||||||
if (!tgt_widget) return
|
|
||||||
tgt_widget[0].value = this.properties.value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateOutput() {
|
|
||||||
const value = this.properties.value
|
|
||||||
|
|
||||||
switch (this.properties.type) {
|
|
||||||
case 'color':
|
|
||||||
this.setOutputData(0, value)
|
|
||||||
break
|
|
||||||
case 'number':
|
|
||||||
this.setOutputData(0, Number.parseFloat(value))
|
|
||||||
break
|
|
||||||
case 'string':
|
|
||||||
this.setOutputData(0, value.toString())
|
|
||||||
break
|
|
||||||
case 'vector2':
|
|
||||||
if (value.length >= 2) {
|
|
||||||
this.setOutputData(0, value.slice(0, 2))
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'vector3':
|
|
||||||
if (value.length >= 3) {
|
|
||||||
this.setOutputData(0, value.slice(0, 3))
|
|
||||||
}
|
|
||||||
break
|
|
||||||
case 'vector4':
|
|
||||||
if (value.length >= 4) {
|
|
||||||
this.setOutputData(0, value.slice(0, 4))
|
|
||||||
}
|
|
||||||
break
|
|
||||||
default:
|
|
||||||
break
|
|
||||||
}
|
|
||||||
|
|
||||||
this.updateTargetWidgets()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// app.registerExtension({
|
|
||||||
// name: 'mtb.constant',
|
|
||||||
// registerCustomNodes() {
|
|
||||||
// LiteGraph.registerNodeType('Constant (mtb)', Constant)
|
|
||||||
//
|
|
||||||
// Constant.category = 'mtb/utils'
|
|
||||||
// Constant.title = 'Constant (mtb)'
|
|
||||||
// },
|
|
||||||
// })
|
|
||||||
+2
-1
@@ -52,7 +52,7 @@ app.registerExtension({
|
|||||||
//- infer type
|
//- infer type
|
||||||
if (link_info) {
|
if (link_info) {
|
||||||
const fromNode = this.graph._nodes.find(
|
const fromNode = this.graph._nodes.find(
|
||||||
(otherNode) => otherNode.id === link_info.origin_id,
|
(otherNode) => otherNode.id == link_info.origin_id,
|
||||||
)
|
)
|
||||||
const type = fromNode.outputs[link_info.origin_slot].type
|
const type = fromNode.outputs[link_info.origin_slot].type
|
||||||
this.inputs[index].type = type
|
this.inputs[index].type = type
|
||||||
@@ -83,6 +83,7 @@ app.registerExtension({
|
|||||||
this.widgets.length = 1
|
this.widgets.length = 1
|
||||||
}
|
}
|
||||||
let widgetI = 1
|
let widgetI = 1
|
||||||
|
|
||||||
if (message.text) {
|
if (message.text) {
|
||||||
for (const txt of message.text) {
|
for (const txt of message.text) {
|
||||||
const w = this.addCustomWidget(
|
const w = this.addCustomWidget(
|
||||||
|
|||||||
+11
-14
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
import { api } from '../../scripts/api.js'
|
import { api } from '../../scripts/api.js'
|
||||||
import { app } from '../../scripts/app.js'
|
import { app } from '../../scripts/app.js'
|
||||||
import { LocalStorageManager } from './comfy_shared.js'
|
import { LocalStorageManager } from "./comfy_shared.js"
|
||||||
const styles = {
|
const styles = {
|
||||||
lighbox: {
|
lighbox: {
|
||||||
position: 'fixed',
|
position: 'fixed',
|
||||||
@@ -53,9 +53,9 @@ let currentImageIndex = 0
|
|||||||
const imageUrls = []
|
const imageUrls = []
|
||||||
|
|
||||||
let image_menu = null
|
let image_menu = null
|
||||||
const storage = new LocalStorageManager('mtb')
|
const storage = new LocalStorageManager('mtb');
|
||||||
|
|
||||||
let activated = storage.get('image_feed', false)
|
let activated = storage.get("image_feed", true)
|
||||||
|
|
||||||
app.registerExtension({
|
app.registerExtension({
|
||||||
name: 'mtb.ImageFeed',
|
name: 'mtb.ImageFeed',
|
||||||
@@ -71,21 +71,19 @@ app.registerExtension({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
async onChange(value) {
|
async onChange(value) {
|
||||||
storage.set('image_feed', value)
|
storage.set("image_feed", value)
|
||||||
activated = value
|
activated = value
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
init: async () => {
|
init: async () => {
|
||||||
if (!activated) {
|
if (!activated) { return }
|
||||||
return
|
|
||||||
}
|
|
||||||
const pythongossFeed = app.extensions.find(
|
const pythongossFeed = app.extensions.find(
|
||||||
(e) => e.name === 'pysssss.ImageFeed',
|
(e) => e.name == 'pysssss.ImageFeed'
|
||||||
)
|
)
|
||||||
if (pythongossFeed) {
|
if (pythongossFeed) {
|
||||||
console.warn(
|
console.warn(
|
||||||
"[mtb] - Aborting the loading of mtb's imageFeed in favor of pysssss.ImageFeed",
|
"[mtb] - Aborting the loading of mtb's imageFeed in favor of pysssss.ImageFeed"
|
||||||
)
|
)
|
||||||
activated = false // just in case other methods are added later on
|
activated = false // just in case other methods are added later on
|
||||||
return
|
return
|
||||||
@@ -116,7 +114,7 @@ app.registerExtension({
|
|||||||
const lightboxCloseBtn = document.createElement('button')
|
const lightboxCloseBtn = document.createElement('button')
|
||||||
Object.assign(
|
Object.assign(
|
||||||
lightboxCloseBtn.style,
|
lightboxCloseBtn.style,
|
||||||
styles.lightboxBtn({ right: '0', top: '0' }),
|
styles.lightboxBtn({ right: '0', top: '0' })
|
||||||
)
|
)
|
||||||
lightboxCloseBtn.textContent = '❌'
|
lightboxCloseBtn.textContent = '❌'
|
||||||
|
|
||||||
@@ -186,7 +184,7 @@ app.registerExtension({
|
|||||||
//- append to DOM
|
//- append to DOM
|
||||||
document.body.append(imageListContainer)
|
document.body.append(imageListContainer)
|
||||||
|
|
||||||
showBtn.textContent = '🖼'
|
showBtn.textContent = '🖼️'
|
||||||
showBtn.onclick = () => {
|
showBtn.onclick = () => {
|
||||||
imageListContainer.style.display = 'block'
|
imageListContainer.style.display = 'block'
|
||||||
showBtn.style.display = 'none'
|
showBtn.style.display = 'none'
|
||||||
@@ -252,9 +250,8 @@ app.registerExtension({
|
|||||||
objectFit: 'cover',
|
objectFit: 'cover',
|
||||||
})
|
})
|
||||||
|
|
||||||
img.src = `/view?filename=${encodeURIComponent(src.filename)}&type=${
|
img.src = `/view?filename=${encodeURIComponent(src.filename)}&type=${src.type
|
||||||
src.type
|
}&subfolder=${encodeURIComponent(src.subfolder)}`
|
||||||
}&subfolder=${encodeURIComponent(src.subfolder)}`
|
|
||||||
|
|
||||||
imageUrls.push(img.src)
|
imageUrls.push(img.src)
|
||||||
|
|
||||||
|
|||||||
+36
-30
@@ -15,10 +15,9 @@ import { api } from '../../scripts/api.js'
|
|||||||
import parseCss from './extern/parse-css.js'
|
import parseCss from './extern/parse-css.js'
|
||||||
import * as shared from './comfy_shared.js'
|
import * as shared from './comfy_shared.js'
|
||||||
import { log } from './comfy_shared.js'
|
import { log } from './comfy_shared.js'
|
||||||
import { Constant } from './constant.js'
|
|
||||||
|
|
||||||
// NOTE: new widget types registered by MTB Widgets
|
// NOTE: new widget types registered by MTB Widgets
|
||||||
const newTypes = [/*'BOOL'*/ , 'COLOR', 'BBOX']
|
const newTypes = [, /*'BOOL'*/ 'COLOR', 'BBOX']
|
||||||
|
|
||||||
const deprecated_nodes = {
|
const deprecated_nodes = {
|
||||||
// 'Animation Builder':
|
// 'Animation Builder':
|
||||||
@@ -298,7 +297,6 @@ export const MtbWidgets = {
|
|||||||
|
|
||||||
picker.addEventListener('change', () => {
|
picker.addEventListener('change', () => {
|
||||||
this.value = picker.value
|
this.value = picker.value
|
||||||
this.callback?.(this.value)
|
|
||||||
node.graph._version++
|
node.graph._version++
|
||||||
node.setDirtyCanvas(true, true)
|
node.setDirtyCanvas(true, true)
|
||||||
picker.remove()
|
picker.remove()
|
||||||
@@ -460,12 +458,6 @@ const mtb_widgets = {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
registerCustomNodes() {
|
|
||||||
LiteGraph.registerNodeType('Constant (mtb)', Constant)
|
|
||||||
|
|
||||||
Constant.category = 'mtb/utils'
|
|
||||||
Constant.title = 'Constant (mtb)'
|
|
||||||
},
|
|
||||||
|
|
||||||
getCustomWidgets: function () {
|
getCustomWidgets: function () {
|
||||||
return {
|
return {
|
||||||
@@ -580,10 +572,6 @@ const mtb_widgets = {
|
|||||||
if (!nodeData.name.endsWith('(mtb)')) {
|
if (!nodeData.name.endsWith('(mtb)')) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// console.log('MTB Node', { description: nodeData.description, nodeType })
|
|
||||||
|
|
||||||
shared.addDocumentation(nodeData, nodeType)
|
|
||||||
|
|
||||||
const deprecation = deprecated_nodes[nodeData.name.replace(' (mtb)', '')]
|
const deprecation = deprecated_nodes[nodeData.name.replace(' (mtb)', '')]
|
||||||
|
|
||||||
if (deprecation) {
|
if (deprecation) {
|
||||||
@@ -591,6 +579,22 @@ const mtb_widgets = {
|
|||||||
}
|
}
|
||||||
//- Extending Python Nodes
|
//- Extending Python Nodes
|
||||||
switch (nodeData.name) {
|
switch (nodeData.name) {
|
||||||
|
case 'Psd Save (mtb)': {
|
||||||
|
const onConnectionsChange = nodeType.prototype.onConnectionsChange
|
||||||
|
nodeType.prototype.onConnectionsChange = function (
|
||||||
|
type,
|
||||||
|
index,
|
||||||
|
connected,
|
||||||
|
link_info,
|
||||||
|
) {
|
||||||
|
const r = onConnectionsChange
|
||||||
|
? onConnectionsChange.apply(this, arguments)
|
||||||
|
: undefined
|
||||||
|
shared.dynamic_connection(this, index, connected)
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
//TODO: remove this non sense
|
//TODO: remove this non sense
|
||||||
case 'Get Batch From History (mtb)': {
|
case 'Get Batch From History (mtb)': {
|
||||||
const onNodeCreated = nodeType.prototype.onNodeCreated
|
const onNodeCreated = nodeType.prototype.onNodeCreated
|
||||||
@@ -763,6 +767,23 @@ const mtb_widgets = {
|
|||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case 'Text Encore Frames (mtb)': {
|
||||||
|
const onConnectionsChange = nodeType.prototype.onConnectionsChange
|
||||||
|
nodeType.prototype.onConnectionsChange = function (
|
||||||
|
type,
|
||||||
|
index,
|
||||||
|
connected,
|
||||||
|
link_info,
|
||||||
|
) {
|
||||||
|
const r = onConnectionsChange
|
||||||
|
? onConnectionsChange.apply(this, arguments)
|
||||||
|
: undefined
|
||||||
|
|
||||||
|
shared.dynamic_connection(this, index, connected)
|
||||||
|
return r
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
case 'Interpolate Clip Sequential (mtb)': {
|
case 'Interpolate Clip Sequential (mtb)': {
|
||||||
const onNodeCreated = nodeType.prototype.onNodeCreated
|
const onNodeCreated = nodeType.prototype.onNodeCreated
|
||||||
nodeType.prototype.onNodeCreated = function () {
|
nodeType.prototype.onNodeCreated = function () {
|
||||||
@@ -833,8 +854,7 @@ const mtb_widgets = {
|
|||||||
window.MTB?.notify?.(
|
window.MTB?.notify?.(
|
||||||
`Extracted positive from ${this.widgets[0].value}`,
|
`Extracted positive from ${this.widgets[0].value}`,
|
||||||
)
|
)
|
||||||
// const tn = LiteGraph.createNode('Text box')
|
const tn = LiteGraph.createNode('Text box')
|
||||||
const tn = LiteGraph.createNode('CLIPTextEncode')
|
|
||||||
app.graph.add(tn)
|
app.graph.add(tn)
|
||||||
tn.title = `${this.widgets[0].value} (Positive)`
|
tn.title = `${this.widgets[0].value} (Positive)`
|
||||||
tn.widgets[0].value = style[0]
|
tn.widgets[0].value = style[0]
|
||||||
@@ -855,7 +875,7 @@ const mtb_widgets = {
|
|||||||
window.MTB?.notify?.(
|
window.MTB?.notify?.(
|
||||||
`Extracted negative from ${this.widgets[0].value}`,
|
`Extracted negative from ${this.widgets[0].value}`,
|
||||||
)
|
)
|
||||||
const tn = LiteGraph.createNode('CLIPTextEncode')
|
const tn = LiteGraph.createNode('Text box')
|
||||||
app.graph.add(tn)
|
app.graph.add(tn)
|
||||||
tn.title = `${this.widgets[0].value} (Negative)`
|
tn.title = `${this.widgets[0].value} (Negative)`
|
||||||
tn.widgets[0].value = style[1]
|
tn.widgets[0].value = style[1]
|
||||||
@@ -873,28 +893,14 @@ const mtb_widgets = {
|
|||||||
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
//NOTE: dynamic nodes
|
|
||||||
case 'Apply Text Template (mtb)': {
|
case 'Apply Text Template (mtb)': {
|
||||||
shared.setupDynamicConnections(nodeType, 'var', '*')
|
shared.setupDynamicConnections(nodeType, 'var', '*')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'Save Data Bundle (mtb)': {
|
|
||||||
shared.setupDynamicConnections(nodeType, 'data', '*') // [MASK,IMAGE]
|
|
||||||
break
|
|
||||||
}
|
|
||||||
case 'Add To Playlist (mtb)': {
|
case 'Add To Playlist (mtb)': {
|
||||||
shared.setupDynamicConnections(nodeType, 'video', 'VIDEO')
|
shared.setupDynamicConnections(nodeType, 'video', 'VIDEO')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
case 'Psd Save (mtb)': {
|
|
||||||
shared.setupDynamicConnections(nodeType, 'input_', 'PSDLAYER')
|
|
||||||
break
|
|
||||||
}
|
|
||||||
// case 'Text Encode Frames (mtb)' : {
|
|
||||||
// shared.setupDynamicConnections(nodeType, 'input_', 'IMAGE')
|
|
||||||
// break
|
|
||||||
// }
|
|
||||||
case 'Stack Images (mtb)':
|
case 'Stack Images (mtb)':
|
||||||
case 'Concat Images (mtb)': {
|
case 'Concat Images (mtb)': {
|
||||||
shared.setupDynamicConnections(nodeType, 'image', 'IMAGE')
|
shared.setupDynamicConnections(nodeType, 'image', 'IMAGE')
|
||||||
|
|||||||
+10
-6
@@ -140,6 +140,9 @@ const themes = [
|
|||||||
'vscode',
|
'vscode',
|
||||||
]
|
]
|
||||||
class NotePlus extends LiteGraph.LGraphNode {
|
class NotePlus extends LiteGraph.LGraphNode {
|
||||||
|
title = 'Note+ (mtb)'
|
||||||
|
category = 'mtb/utils'
|
||||||
|
|
||||||
// same values as the comfy note
|
// same values as the comfy note
|
||||||
color = LGraphCanvas.node_colors.yellow.color
|
color = LGraphCanvas.node_colors.yellow.color
|
||||||
bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
|
bgcolor = LGraphCanvas.node_colors.yellow.bgcolor
|
||||||
@@ -484,9 +487,13 @@ class NotePlus extends LiteGraph.LGraphNode {
|
|||||||
this.setupEditors()
|
this.setupEditors()
|
||||||
}
|
}
|
||||||
loadAceEditor() {
|
loadAceEditor() {
|
||||||
shared.loadScript('/mtb_async/ace/ace.js').catch((e) => {
|
shared
|
||||||
errorLogger(e)
|
.loadScript(
|
||||||
})
|
'https://cdn.jsdelivr.net/npm/ace-builds@1.16.0/src-min-noconflict/ace.min.js',
|
||||||
|
)
|
||||||
|
.catch((e) => {
|
||||||
|
errorLogger(e)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
onCreate() {
|
onCreate() {
|
||||||
errorLogger('NotePlus onCreate')
|
errorLogger('NotePlus onCreate')
|
||||||
@@ -685,9 +692,6 @@ app.registerExtension({
|
|||||||
registerCustomNodes() {
|
registerCustomNodes() {
|
||||||
LiteGraph.registerNodeType('Note Plus (mtb)', NotePlus)
|
LiteGraph.registerNodeType('Note Plus (mtb)', NotePlus)
|
||||||
|
|
||||||
NotePlus.category = 'mtb/utils'
|
|
||||||
NotePlus.title = 'Note+ (mtb)'
|
|
||||||
|
|
||||||
NotePlus.title_mode = LiteGraph.NO_TITLE
|
NotePlus.title_mode = LiteGraph.NO_TITLE
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(e,t,n){"use strict";function i(e,t){return e.type.lastIndexOf(t+".xml")>-1}var r=e("../token_iterator").TokenIterator;t.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],t.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],t.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},t.beautify=function(e){var n=new r(e,0,0),s=n.getCurrentToken(),o=e.getTabString(),u=t.singletonTags,a=t.blockTags,f=t.formatOptions||{},l,c=!1,h=!1,p=!1,d="",v="",m="",g=0,y=0,b=0,w=0,E=0,S=0,x=0,T,N=0,C=0,k=[],L=!1,A,O=!1,M=!1,_=!1,D=!1,P={0:0},H=[],B=!1,j=function(){l&&l.value&&l.type!=="string.regexp"&&(l.value=l.value.replace(/^\s*/,""))},F=function(){var e=d.length-1;for(;;){if(e==0)break;if(d[e]!==" ")break;e-=1}d=d.slice(0,e+1)},I=function(){d=d.trimRight(),c=!1};while(s!==null){N=n.getCurrentTokenRow(),k=n.$rowTokens,l=n.stepForward();if(typeof s!="undefined"){v=s.value,E=0,_=m==="style"||e.$modeId==="ace/mode/css",i(s,"tag-open")?(M=!0,l&&(D=a.indexOf(l.value)!==-1),v==="</"&&(D&&!c&&C<1&&C++,_&&(C=1),E=1,D=!1)):i(s,"tag-close")?M=!1:i(s,"comment.start")?D=!0:i(s,"comment.end")&&(D=!1),!M&&!C&&s.type==="paren.rparen"&&s.value.substr(0,1)==="}"&&C++,N!==T&&(C=N,T&&(C-=T));if(C){I();for(;C>0;C--)d+="\n";c=!0,!i(s,"comment")&&!s.type.match(/^(comment|string)$/)&&(v=v.trimLeft())}if(v){s.type==="keyword"&&v.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(H[g]=v,j(),p=!0,v.match(/^(else|elseif)$/)&&d.match(/\}[\s]*$/)&&(I(),h=!0)):s.type==="paren.lparen"?(j(),v.substr(-1)==="{"&&(p=!0,O=!1,M||(C=1)),v.substr(0,1)==="{"&&(h=!0,d.substr(-1)!=="["&&d.trimRight().substr(-1)==="["?(I(),h=!1):d.trimRight().substr(-1)===")"?I():F())):s.type==="paren.rparen"?(E=1,v.substr(0,1)==="}"&&(H[g-1]==="case"&&E++,d.trimRight().substr(-1)==="{"?I():(h=!0,_&&(C+=2))),v.substr(0,1)==="]"&&d.substr(-1)!=="}"&&d.trimRight().substr(-1)==="}"&&(h=!1,w++,I()),v.substr(0,1)===")"&&d.substr(-1)!=="("&&d.trimRight().substr(-1)==="("&&(h=!1,w++,I()),F()):s.type!=="keyword.operator"&&s.type!=="keyword"||!v.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?s.type==="punctuation.operator"&&v===";"?(I(),j(),p=!0,_&&C++):s.type==="punctuation.operator"&&v.match(/^(:|,)$/)?(I(),j(),v.match(/^(,)$/)&&x>0&&S===0&&f.lineBreaksAfterCommasInCurlyBlock?C++:(p=!0,c=!1)):s.type==="support.php_tag"&&v==="?>"&&!c?(I(),h=!0):i(s,"attribute-name")&&d.substr(-1).match(/^\s$/)?h=!0:i(s,"attribute-equals")?(F(),j()):i(s,"tag-close")?(F(),v==="/>"&&(h=!0)):s.type==="keyword"&&v.match(/^(case|default)$/)&&B&&(E=1):(I(),j(),h=!0,p=!0);if(c&&(!s.type.match(/^(comment)$/)||!!v.substr(0,1).match(/^[/#]$/))&&(!s.type.match(/^(string)$/)||!!v.substr(0,1).match(/^['"@]$/))){w=b;if(g>y){w++;for(A=g;A>y;A--)P[A]=w}else g<y&&(w=P[g]);y=g,b=w,E&&(w-=E),O&&!S&&(w++,O=!1);for(A=0;A<w;A++)d+=o}s.type==="keyword"&&v.match(/^(case|default)$/)?B===!1&&(H[g]=v,g++,B=!0):s.type==="keyword"&&v.match(/^(break)$/)&&H[g-1]&&H[g-1].match(/^(case|default)$/)&&(g--,B=!1),s.type==="paren.lparen"&&(S+=(v.match(/\(/g)||[]).length,x+=(v.match(/\{/g)||[]).length,g+=v.length),s.type==="keyword"&&v.match(/^(if|else|elseif|for|while)$/)?(O=!0,S=0):!S&&v.trim()&&s.type!=="comment"&&(O=!1);if(s.type==="paren.rparen"){S-=(v.match(/\)/g)||[]).length,x-=(v.match(/\}/g)||[]).length;for(A=0;A<v.length;A++)g--,v.substr(A,1)==="}"&&H[g]==="case"&&g--}s.type=="text"&&(v=v.replace(/\s+$/," ")),h&&!c&&(F(),d.substr(-1)!=="\n"&&(d+=" ")),d+=v,p&&(d+=" "),c=!1,h=!1,p=!1;if(i(s,"tag-close")&&(D||a.indexOf(m)!==-1)||i(s,"doctype")&&v===">")D&&l&&l.value==="</"?C=-1:C=1;l&&u.indexOf(l.value)===-1&&(i(s,"tag-open")&&v==="</"?g--:i(s,"tag-open")&&v==="<"?g++:i(s,"tag-close")&&v==="/>"&&g--),i(s,"tag-name")&&(m=v),T=N}}s=l}d=d.trim(),e.doc.setValue(d)},t.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(e){t.beautify(e.session)},bindKey:"Ctrl-Shift-B"}]}); (function() {
|
|
||||||
ace.require(["ace/ext/beautify"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/code_lens",["require","exports","module","ace/line_widgets","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"],function(e,t,n){"use strict";function u(e){var t=e.$textLayer,n=t.$lenses;n&&n.forEach(function(e){e.remove()}),t.$lenses=null}function a(e,t){var n=e&t.CHANGE_LINES||e&t.CHANGE_FULL||e&t.CHANGE_SCROLL||e&t.CHANGE_TEXT;if(!n)return;var r=t.session,i=t.session.lineWidgets,s=t.$textLayer,a=s.$lenses;if(!i){a&&u(t);return}var f=t.$textLayer.$lines.cells,l=t.layerConfig,c=t.$padding;a||(a=s.$lenses=[]);var h=0;for(var p=0;p<f.length;p++){var d=f[p].row,v=i[d],m=v&&v.lenses;if(!m||!m.length)continue;var g=a[h];g||(g=a[h]=o.buildDom(["div",{"class":"ace_codeLens"}],t.container)),g.style.height=l.lineHeight+"px",h++;for(var y=0;y<m.length;y++){var b=g.childNodes[2*y];b||(y!=0&&g.appendChild(o.createTextNode("\u00a0|\u00a0")),b=o.buildDom(["a"],g)),b.textContent=m[y].title,b.lensCommand=m[y]}while(g.childNodes.length>2*y-1)g.lastChild.remove();var w=t.$cursorLayer.getPixelPosition({row:d,column:0},!0).top-l.lineHeight*v.rowsAbove-l.offset;g.style.top=w+"px";var E=t.gutterWidth,S=r.getLine(d).search(/\S|$/);S==-1&&(S=0),E+=S*l.characterWidth,g.style.paddingLeft=c+E+"px"}while(h<a.length)a.pop().remove()}function f(e){if(!e.lineWidgets)return;var t=e.widgetManager;e.lineWidgets.forEach(function(e){e&&e.lenses&&t.removeLineWidget(e)})}function l(e){e.codeLensProviders=[],e.renderer.on("afterRender",a),e.$codeLensClickHandler||(e.$codeLensClickHandler=function(t){var n=t.target.lensCommand;if(!n)return;e.execCommand(n.id,n.arguments),e._emit("codeLensClick",t)},i.addListener(e.container,"click",e.$codeLensClickHandler,e)),e.$updateLenses=function(){function o(){var r=n.selection.cursor,i=n.documentToScreenRow(r),o=n.getScrollTop(),u=t.setLenses(n,s),a=n.$undoManager&&n.$undoManager.$lastDelta;if(a&&a.action=="remove"&&a.lines.length>1)return;var f=n.documentToScreenRow(r),l=e.renderer.layerConfig.lineHeight,c=n.getScrollTop()+(f-i)*l;u==0&&o<l/4&&o>-l/4&&(c=-l),n.setScrollTop(c)}var n=e.session;if(!n)return;n.widgetManager||(n.widgetManager=new r(n),n.widgetManager.attach(e));var i=e.codeLensProviders.length,s=[];e.codeLensProviders.forEach(function(e){e.provideCodeLenses(n,function(e,t){if(e)return;t.forEach(function(e){s.push(e)}),i--,i==0&&o()})})};var n=s.delayedCall(e.$updateLenses);e.$updateLensesOnInput=function(){n.delay(250)},e.on("input",e.$updateLensesOnInput)}function c(e){e.off("input",e.$updateLensesOnInput),e.renderer.off("afterRender",a),e.$codeLensClickHandler&&e.container.removeEventListener("click",e.$codeLensClickHandler)}var r=e("../line_widgets").LineWidgets,i=e("../lib/event"),s=e("../lib/lang"),o=e("../lib/dom");t.setLenses=function(e,t){var n=Number.MAX_VALUE;return f(e),t&&t.forEach(function(t){var r=t.start.row,i=t.start.column,s=e.lineWidgets&&e.lineWidgets[r];if(!s||!s.lenses)s=e.widgetManager.$registerLineWidget({rowCount:1,rowsAbove:1,row:r,column:i,lenses:[]});s.lenses.push(t.command),r<n&&(n=r)}),e._emit("changeFold",{data:{start:{row:n}}}),n},t.registerCodeLensProvider=function(e,t){e.setOption("enableCodeLens",!0),e.codeLensProviders.push(t),e.$updateLensesOnInput()},t.clear=function(e){t.setLenses(e,null)};var h=e("../editor").Editor;e("../config").defineOptions(h.prototype,"editor",{enableCodeLens:{set:function(e){e?l(this):c(this)}}}),o.importCssString("\n.ace_codeLens {\n position: absolute;\n color: #aaa;\n font-size: 88%;\n background: inherit;\n width: 100%;\n display: flex;\n align-items: flex-end;\n pointer-events: none;\n}\n.ace_codeLens > a {\n cursor: pointer;\n pointer-events: auto;\n}\n.ace_codeLens > a:hover {\n color: #0000ff;\n text-decoration: underline;\n}\n.ace_dark > .ace_codeLens > a:hover {\n color: #4e94ce;\n}\n","codelense.css",!1)}); (function() {
|
|
||||||
ace.require(["ace/ext/code_lens"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";var r=function(){function e(e){this.$editor=e;var t=this,n=[],r=!1;this.onAfterExec=function(){r=!1,t.processRows(n),n=[]},this.onExec=function(){r=!0},this.onChange=function(e){r&&(n.indexOf(e.start.row)==-1&&n.push(e.start.row),e.end.row!=e.start.row&&n.push(e.end.row))}}return e.prototype.processRows=function(e){this.$inChange=!0;var t=[];for(var n=0,r=e.length;n<r;n++){var i=e[n];if(t.indexOf(i)>-1)continue;var s=this.$findCellWidthsForBlock(i),o=this.$setBlockCellWidthsToMax(s.cellWidths),u=s.firstRow;for(var a=0,f=o.length;a<f;a++){var l=o[a];t.push(u),this.$adjustRow(u,l),u++}}this.$inChange=!1},e.prototype.$findCellWidthsForBlock=function(e){var t=[],n,r=e;while(r>=0){n=this.$cellWidthsForRow(r);if(n.length==0)break;t.unshift(n),r--}var i=r+1;r=e;var s=this.$editor.session.getLength();while(r<s-1){r++,n=this.$cellWidthsForRow(r);if(n.length==0)break;t.push(n)}return{cellWidths:t,firstRow:i}},e.prototype.$cellWidthsForRow=function(e){var t=this.$selectionColumnsForRow(e),n=[-1].concat(this.$tabsForRow(e)),r=n.map(function(e){return 0}).slice(1),i=this.$editor.session.getLine(e);for(var s=0,o=n.length-1;s<o;s++){var u=n[s]+1,a=n[s+1],f=this.$rightmostSelectionInCell(t,a),l=i.substring(u,a);r[s]=Math.max(l.replace(/\s+$/g,"").length,f-u)}return r},e.prototype.$selectionColumnsForRow=function(e){var t=[],n=this.$editor.getCursorPosition();return this.$editor.session.getSelection().isEmpty()&&e==n.row&&t.push(n.column),t},e.prototype.$setBlockCellWidthsToMax=function(e){var t=!0,n,r,i,s=this.$izip_longest(e);for(var o=0,u=s.length;o<u;o++){var a=s[o];if(!a.push){console.error(a);continue}a.push(NaN);for(var f=0,l=a.length;f<l;f++){var c=a[f];t&&(n=f,i=0,t=!1);if(isNaN(c)){r=f;for(var h=n;h<r;h++)e[h][o]=i;t=!0}i=Math.max(i,c)}}return e},e.prototype.$rightmostSelectionInCell=function(e,t){var n=0;if(e.length){var r=[];for(var i=0,s=e.length;i<s;i++)e[i]<=t?r.push(i):r.push(0);n=Math.max.apply(Math,r)}return n},e.prototype.$tabsForRow=function(e){var t=[],n=this.$editor.session.getLine(e),r=/\t/g,i;while((i=r.exec(n))!=null)t.push(i.index);return t},e.prototype.$adjustRow=function(e,t){var n=this.$tabsForRow(e);if(n.length==0)return;var r=0,i=-1,s=this.$izip(t,n);for(var o=0,u=s.length;o<u;o++){var a=s[o][0],f=s[o][1];i+=1+a,f+=r;var l=i-f;if(l==0)continue;var c=this.$editor.session.getLine(e).substr(0,f),h=c.replace(/\s*$/g,""),p=c.length-h.length;l>0&&(this.$editor.session.getDocument().insertInLine({row:e,column:f+1},Array(l+1).join(" ")+" "),this.$editor.session.getDocument().removeInLine(e,f,f+1),r+=l),l<0&&p>=-l&&(this.$editor.session.getDocument().removeInLine(e,f+l,f),r+=l)}},e.prototype.$izip_longest=function(e){if(!e[0])return[];var t=e[0].length,n=e.length;for(var r=1;r<n;r++){var i=e[r].length;i>t&&(t=i)}var s=[];for(var o=0;o<t;o++){var u=[];for(var r=0;r<n;r++)e[r][o]===""?u.push(NaN):u.push(e[r][o]);s.push(u)}return s},e.prototype.$izip=function(e,t){var n=e.length>=t.length?t.length:e.length,r=[];for(var i=0;i<n;i++){var s=[e[i],t[i]];r.push(s)}return r},e}();t.ElasticTabstopsLite=r;var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{useElasticTabstops:{set:function(e){e?(this.elasticTabstops||(this.elasticTabstops=new r(this)),this.commands.on("afterExec",this.elasticTabstops.onAfterExec),this.commands.on("exec",this.elasticTabstops.onExec),this.on("change",this.elasticTabstops.onChange)):this.elasticTabstops&&(this.commands.removeListener("afterExec",this.elasticTabstops.onAfterExec),this.commands.removeListener("exec",this.elasticTabstops.onExec),this.removeListener("change",this.elasticTabstops.onChange))}}})}); (function() {
|
|
||||||
ace.require(["ace/ext/elastic_tabstops_lite"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
; (function() {
|
|
||||||
ace.require(["ace/ext/error_marker"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/hardwrap",["require","exports","module","ace/range","ace/editor","ace/config"],function(e,t,n){"use strict";function i(e,t){function m(e,t,n){if(e.length<t)return;var r=e.slice(0,t),i=e.slice(t),s=/^(?:(\s+)|(\S+)(\s+))/.exec(i),o=/(?:(\s+)|(\s+)(\S+))$/.exec(r),u=0,a=0;o&&!o[2]&&(u=t-o[1].length,a=t),s&&!s[2]&&(u||(u=t),a=t+s[1].length);if(u)return{start:u,end:a};if(o&&o[2]&&o.index>n)return{start:o.index,end:o.index+o[2].length};if(s&&s[2])return u=t+s[2].length,{start:u,end:u+s[3].length}}var n=t.column||e.getOption("printMarginColumn"),i=t.allowMerge!=0,s=Math.min(t.startRow,t.endRow),o=Math.max(t.startRow,t.endRow),u=e.session;while(s<=o){var a=u.getLine(s);if(a.length>n){var f=m(a,n,5);if(f){var l=/^\s*/.exec(a)[0];u.replace(new r(s,f.start,s,f.end),"\n"+l)}o++}else if(i&&/\S/.test(a)&&s!=o){var c=u.getLine(s+1);if(c&&/\S/.test(c)){var h=a.replace(/\s+$/,""),p=c.replace(/^\s+/,""),d=h+" "+p,f=m(d,n,5);if(f&&f.start>h.length||d.length<n){var v=new r(s,h.length,s+1,c.length-p.length);u.replace(v," "),s--,o--}else h.length<a.length&&u.remove(new r(s,h.length,s,a.length))}}s++}}function s(e){if(e.command.name=="insertstring"&&/\S/.test(e.args)){var t=e.editor,n=t.selection.cursor;if(n.column<=t.renderer.$printMarginColumn)return;var r=t.session.$undoManager.$lastDelta;i(t,{startRow:n.row,endRow:n.row,allowMerge:!1}),r!=t.session.$undoManager.$lastDelta&&t.session.markUndoGroup()}}var r=e("../range").Range,o=e("../editor").Editor;e("../config").defineOptions(o.prototype,"editor",{hardWrap:{set:function(e){e?this.commands.on("afterExec",s):this.commands.off("afterExec",s)},value:!1}}),t.hardWrap=i}); (function() {
|
|
||||||
ace.require(["ace/ext/hardwrap"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/menu_tools/settings_menu.css",["require","exports","module"],function(e,t,n){n.exports="#ace_settingsmenu, #kbshortcutmenu {\n background-color: #F7F7F7;\n color: black;\n box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\n padding: 1em 0.5em 2em 1em;\n overflow: auto;\n position: absolute;\n margin: 0;\n bottom: 0;\n right: 0;\n top: 0;\n z-index: 9991;\n cursor: default;\n}\n\n.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\n box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\n background-color: rgba(255, 255, 255, 0.6);\n color: black;\n}\n\n.ace_optionsMenuEntry:hover {\n background-color: rgba(100, 100, 100, 0.1);\n transition: all 0.3s\n}\n\n.ace_closeButton {\n background: rgba(245, 146, 146, 0.5);\n border: 1px solid #F48A8A;\n border-radius: 50%;\n padding: 7px;\n position: absolute;\n right: -8px;\n top: -8px;\n z-index: 100000;\n}\n.ace_closeButton{\n background: rgba(245, 146, 146, 0.9);\n}\n.ace_optionsMenuKey {\n color: darkslateblue;\n font-weight: bold;\n}\n.ace_optionsMenuCommand {\n color: darkcyan;\n font-weight: normal;\n}\n.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\n vertical-align: middle;\n}\n\n.ace_optionsMenuEntry button[ace_selected_button=true] {\n background: #e7e7e7;\n box-shadow: 1px 0px 2px 0px #adadad inset;\n border-color: #adadad;\n}\n.ace_optionsMenuEntry button {\n background: white;\n border: 1px solid lightgray;\n margin: 0px;\n}\n.ace_optionsMenuEntry button:hover{\n background: #f0f0f0;\n}"}),ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom","ace/ext/menu_tools/settings_menu.css"],function(e,t,n){"use strict";var r=e("../../lib/dom"),i=e("./settings_menu.css");r.importCssString(i,"settings_menu.css",!1),n.exports.overlayPage=function(t,n,r){function o(e){e.keyCode===27&&u()}function u(){if(!i)return;document.removeEventListener("keydown",o),i.parentNode.removeChild(i),t&&t.focus(),i=null,r&&r()}function a(e){s=e,e&&(i.style.pointerEvents="none",n.style.pointerEvents="auto")}var i=document.createElement("div"),s=!1;return i.style.cssText="margin: 0; padding: 0; position: fixed; top:0; bottom:0; left:0; right:0;z-index: 9990; "+(t?"background-color: rgba(0, 0, 0, 0.3);":""),i.addEventListener("click",function(e){s||u()}),document.addEventListener("keydown",o),n.addEventListener("click",function(e){e.stopPropagation()}),i.appendChild(n),document.body.appendChild(i),t&&t.blur(),{close:u,setIgnoreFocusOut:a}}}),ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"],function(e,t,n){"use strict";var r=e("../../lib/keys");n.exports.getEditorKeybordShortcuts=function(e){var t=r.KEY_MODS,n=[],i={};return e.keyBinding.$handlers.forEach(function(e){var t=e.commandKeyBinding;for(var r in t){var s=r.replace(/(^|-)\w/g,function(e){return e.toUpperCase()}),o=t[r];Array.isArray(o)||(o=[o]),o.forEach(function(e){typeof e!="string"&&(e=e.name),i[e]?i[e].key+="|"+s:(i[e]={key:s,command:e},n.push(i[e]))})}}),n}}),ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"],function(e,t,n){"use strict";function i(t){if(!document.getElementById("kbshortcutmenu")){var n=e("./menu_tools/overlay_page").overlayPage,r=e("./menu_tools/get_editor_keyboard_shortcuts").getEditorKeybordShortcuts,i=r(t),s=document.createElement("div"),o=i.reduce(function(e,t){return e+'<div class="ace_optionsMenuEntry"><span class="ace_optionsMenuCommand">'+t.command+"</span> : "+'<span class="ace_optionsMenuKey">'+t.key+"</span></div>"},"");s.id="kbshortcutmenu",s.innerHTML="<h1>Keyboard Shortcuts</h1>"+o+"</div>",n(t,s)}}var r=e("../editor").Editor;n.exports.init=function(e){r.prototype.showKeyboardShortcuts=function(){i(this)},e.commands.addCommands([{name:"showKeyboardShortcuts",bindKey:{win:"Ctrl-Alt-h",mac:"Command-Alt-h"},exec:function(e,t){e.showKeyboardShortcuts()}}])}}); (function() {
|
|
||||||
ace.require(["ace/ext/keybinding_menu"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"],function(e,t,n){function i(e){var n=e.editor,r=e.getAccelKey();if(r){var n=e.editor,i=e.getDocumentPosition(),s=n.session,o=s.getTokenAt(i.row,i.column);t.previousLinkingHover&&t.previousLinkingHover!=o&&n._emit("linkHoverOut"),n._emit("linkHover",{position:i,token:o}),t.previousLinkingHover=o}else t.previousLinkingHover&&(n._emit("linkHoverOut"),t.previousLinkingHover=!1)}function s(e){var t=e.getAccelKey(),n=e.getButton();if(n==0&&t){var r=e.editor,i=e.getDocumentPosition(),s=r.session,o=s.getTokenAt(i.row,i.column);r._emit("linkClick",{position:i,token:o})}}var r=e("../editor").Editor;e("../config").defineOptions(r.prototype,"editor",{enableLinking:{set:function(e){e?(this.on("click",s),this.on("mousemove",i)):(this.off("click",s),this.off("mousemove",i))},value:!1}}),t.previousLinkingHover=!1}); (function() {
|
|
||||||
ace.require(["ace/ext/linking"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/modelist",["require","exports","module"],function(e,t,n){"use strict";function i(e){var t=a.text,n=e.split(/[\/\\]/).pop();for(var i=0;i<r.length;i++)if(r[i].supportsFile(n)){t=r[i];break}return t}var r=[],s=function(){function e(e,t,n){this.name=e,this.caption=t,this.mode="ace/mode/"+e,this.extensions=n;var r;/\^/.test(n)?r=n.replace(/\|(\^)?/g,function(e,t){return"$|"+(t?"^":"^.*\\.")})+"$":r="^.*\\.("+n+")$",this.extRe=new RegExp(r,"gi")}return e.prototype.supportsFile=function(e){return e.match(this.extRe)},e}(),o={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Alda:["alda"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],Apex:["apex|cls|trigger|tgr"],AQL:["aql"],AsciiDoc:["asciidoc|adoc"],ASL:["dsl|asl|asl.json"],Assembly_ARM32:["s"],Assembly_x86:["asm|a"],Astro:["astro"],AutoHotKey:["ahk"],BatchFile:["bat|cmd"],BibTeX:["bib"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm|cfc"],Crystal:["cr"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],Curly:["curly"],Cuttlefish:["conf"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Django:["djt|html.djt|dj.html|djhtml"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Edifact:["edi"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Flix:["flix"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FSharp:["fsi|fs|ml|mli|fsx|fsscript"],FSL:["fsl"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Ion:["ion"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|cjs|mjs"],JEXL:["jexl"],JSON:["json"],JSON5:["json5"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],Latte:["latte"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],Log:["log"],LogiQL:["logic|lql"],Logtalk:["lgt"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MediaWiki:["wiki|mediawiki"],MEL:["mel"],MIPS:["s|asm"],MIXAL:["mixal"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nasal:["nas"],Nginx:["nginx|conf"],Nim:["nim"],Nix:["nix"],NSIS:["nsi|nsh"],Nunjucks:["nunjucks|nunjs|nj|njk"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Odin:["odin"],PartiQL:["partiql|pql"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],PHP_Laravel_blade:["blade.php"],Pig:["pig"],PLSQL:["plsql"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prisma:["prisma"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],PRQL:["prql"],Puppet:["epp|pp"],Python:["py"],QML:["qml"],R:["r"],Raku:["raku|rakumod|rakutest|p6|pl6|pm6"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],Robot:["robot|resource"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SaC:["sac"],SASS:["sass"],SCAD:["scad"],Scala:["scala|sbt"],Scheme:["scm|sm|rkt|oak|scheme"],Scrypt:["scrypt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Slim:["slim|skim"],Smarty:["smarty|tpl"],Smithy:["smithy"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SPARQL:["rq"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Terraform:["tf","tfvars","terragrunt"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSX:["tsx"],Turtle:["ttl"],Twig:["twig|swig"],Typescript:["ts|mts|cts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Visualforce:["vfp|component|page"],Vue:["vue"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Zeek:["zeek|bro"],Zig:["zig"]},u={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker",PHP_Laravel_blade:"PHP (Blade Template)",Perl6:"Perl 6",AutoHotKey:"AutoHotkey / AutoIt"},a={};for(var f in o){var l=o[f],c=(u[f]||f).replace(/_/g," "),h=f.toLowerCase(),p=new s(h,c,l[0]);a[h]=p,r.push(p)}n.exports={getModeForPath:i,modes:r,modesByName:a}}); (function() {
|
|
||||||
ace.require(["ace/ext/modelist"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"],function(e,t,n){"use strict";function s(e,t){var n=t.getSelection().lead;t.session.$bidiHandler.isRtlLine(n.row)&&n.column===0&&(t.session.$bidiHandler.isMoveLeftOperation&&n.row>0?t.getSelection().moveCursorTo(n.row-1,t.session.getLine(n.row-1).length):t.getSelection().isEmpty()?n.column+=1:n.setPosition(n.row,n.column+1))}function o(e){e.editor.session.$bidiHandler.isMoveLeftOperation=/gotoleft|selectleft|backspace|removewordleft/.test(e.command.name)}function u(e,t){var n=t.session;n.$bidiHandler.currentRow=null;if(n.$bidiHandler.isRtlLine(e.start.row)&&e.action==="insert"&&e.lines.length>1)for(var r=e.start.row;r<e.end.row;r++)n.getLine(r+1).charAt(0)!==n.$bidiHandler.RLE&&(n.doc.$lines[r+1]=n.$bidiHandler.RLE+n.getLine(r+1))}function a(e,t){var n=t.session,r=n.$bidiHandler,i=t.$textLayer.$lines.cells,s=t.layerConfig.width-t.layerConfig.padding+"px";i.forEach(function(e){var t=e.element.style;r&&r.isRtlLine(e.row)?(t.direction="rtl",t.textAlign="right",t.width=s):(t.direction="",t.textAlign="",t.width="")})}function f(e){function n(e){var t=e.element.style;t.direction=t.textAlign=t.width=""}var t=e.$textLayer.$lines;t.cells.forEach(n),t.cellCache.forEach(n)}var r=[{name:"leftToRight",bindKey:{win:"Ctrl-Alt-Shift-L",mac:"Command-Alt-Shift-L"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!1)},readOnly:!0},{name:"rightToLeft",bindKey:{win:"Ctrl-Alt-Shift-R",mac:"Command-Alt-Shift-R"},exec:function(e){e.session.$bidiHandler.setRtlDirection(e,!0)},readOnly:!0}],i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{rtlText:{set:function(e){e?(this.on("change",u),this.on("changeSelection",s),this.renderer.on("afterRender",a),this.commands.on("exec",o),this.commands.addCommands(r)):(this.off("change",u),this.off("changeSelection",s),this.renderer.off("afterRender",a),this.commands.off("exec",o),this.commands.removeCommands(r),f(this.renderer)),this.renderer.updateFull()}},rtl:{set:function(e){this.session.$bidiHandler.$isRtl=e,e?(this.setOption("rtlText",!1),this.renderer.on("afterRender",a),this.session.$bidiHandler.seenBidi=!0):(this.renderer.off("afterRender",a),f(this.renderer)),this.renderer.updateFull()}}})}); (function() {
|
|
||||||
ace.require(["ace/ext/rtl"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/simple_tokenizer",["require","exports","module","ace/tokenizer","ace/layer/text_util"],function(e,t,n){"use strict";function o(e,t){var n=new s(e,new r(t.getRules())),o=[];for(var u=0;u<n.getLength();u++){var a=n.getTokens(u);o.push(a.map(function(e){return{className:i(e.type)?undefined:"ace_"+e.type.replace(/\./g," ace_"),value:e.value}}))}return o}var r=e("../tokenizer").Tokenizer,i=e("../layer/text_util").isTextToken,s=function(){function e(e,t){this._lines=e.split(/\r\n|\r|\n/),this._states=[],this._tokenizer=t}return e.prototype.getTokens=function(e){var t=this._lines[e],n=this._states[e-1],r=this._tokenizer.getLineTokens(t,n);return this._states[e]=r.state,r.tokens},e.prototype.getLength=function(){return this._lines.length},e}();n.exports={tokenize:o}}); (function() {
|
|
||||||
ace.require(["ace/ext/simple_tokenizer"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"],function(e,t,n){"use strict";var r=e("../lib/event");t.contextMenuHandler=function(e){var t=e.target,n=t.textInput.getElement();if(!t.selection.isEmpty())return;var i=t.getCursorPosition(),s=t.session.getWordRange(i.row,i.column),o=t.session.getTextRange(s);t.session.tokenRe.lastIndex=0;if(!t.session.tokenRe.test(o))return;var u="\x01\x01",a=o+" "+u;n.value=a,n.setSelectionRange(o.length,o.length+1),n.setSelectionRange(0,0),n.setSelectionRange(0,o.length);var f=!1;r.addListener(n,"keydown",function l(){r.removeListener(n,"keydown",l),f=!0}),t.textInput.setInputHandler(function(e){if(e==a)return"";if(e.lastIndexOf(a,0)===0)return e.slice(a.length);if(e.substr(n.selectionEnd)==a)return e.slice(0,-a.length);if(e.slice(-2)==u){var r=e.slice(0,-2);if(r.slice(-1)==" ")return f?r.substring(0,n.selectionEnd):(r=r.slice(0,-1),t.session.replace(s,r),"")}return e})};var i=e("../editor").Editor;e("../config").defineOptions(i.prototype,"editor",{spellcheck:{set:function(e){var n=this.textInput.getElement();n.spellcheck=!!e,e?this.on("nativecontextmenu",t.contextMenuHandler):this.removeListener("nativecontextmenu",t.contextMenuHandler)},value:!0}})}); (function() {
|
|
||||||
ace.require(["ace/ext/spellcheck"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],function(e,t,n){"use strict";var r=e("./lib/oop"),i=e("./lib/lang"),s=e("./lib/event_emitter").EventEmitter,o=e("./editor").Editor,u=e("./virtual_renderer").VirtualRenderer,a=e("./edit_session").EditSession,f;f=function(e,t,n){this.BELOW=1,this.BESIDE=0,this.$container=e,this.$theme=t,this.$splits=0,this.$editorCSS="",this.$editors=[],this.$orientation=this.BESIDE,this.setSplits(n||1),this.$cEditor=this.$editors[0],this.on("focus",function(e){this.$cEditor=e}.bind(this))},function(){r.implement(this,s),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new o(new u(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e==this.$splits)return;if(e>this.$splits){while(this.$splits<this.$editors.length&&this.$splits<e)t=this.$editors[this.$splits],this.$container.appendChild(t.container),t.setFontSize(this.$fontSize),this.$splits++;while(this.$splits<e)this.$createEditor(),this.$splits++}else while(this.$splits>e)t=this.$editors[this.$splits-1],this.$container.removeChild(t.container),this.$splits--;this.resize()},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(t){t.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(t){t.setKeyboardHandler(e)})},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(t){t.setFontSize(e)})},this.$cloneSession=function(e){var t=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return t.setUndoManager(n),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var n;t==null?n=this.$cEditor:n=this.$editors[t];var r=this.$editors.some(function(t){return t.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){if(this.$orientation==e)return;this.$orientation=e,this.resize()},this.resize=function(){var e=this.$container.clientWidth,t=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE){var r=e/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=r+"px",n.container.style.top="0px",n.container.style.left=i*r+"px",n.container.style.height=t+"px",n.resize()}else{var s=t/this.$splits;for(var i=0;i<this.$splits;i++)n=this.$editors[i],n.container.style.width=e+"px",n.container.style.top=i*s+"px",n.container.style.left="0px",n.container.style.height=s+"px",n.resize()}}}.call(f.prototype),t.Split=f}),ace.define("ace/ext/split",["require","exports","module","ace/split"],function(e,t,n){"use strict";n.exports=e("../split")}); (function() {
|
|
||||||
ace.require(["ace/ext/split"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/static-css",["require","exports","module"],function(e,t,n){n.exports=".ace_static_highlight {\n font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', 'Droid Sans Mono', monospace;\n font-size: 12px;\n white-space: pre-wrap\n}\n\n.ace_static_highlight .ace_gutter {\n width: 2em;\n text-align: right;\n padding: 0 3px 0 0;\n margin-right: 3px;\n contain: none;\n}\n\n.ace_static_highlight.ace_show_gutter .ace_line {\n padding-left: 2.6em;\n}\n\n.ace_static_highlight .ace_line { position: relative; }\n\n.ace_static_highlight .ace_gutter-cell {\n -moz-user-select: -moz-none;\n -khtml-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n top: 0;\n bottom: 0;\n left: 0;\n position: absolute;\n}\n\n\n.ace_static_highlight .ace_gutter-cell:before {\n content: counter(ace_line, decimal);\n counter-increment: ace_line;\n}\n.ace_static_highlight {\n counter-reset: ace_line;\n}\n"}),ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/ext/static-css","ace/config","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../edit_session").EditSession,i=e("../layer/text").Text,s=e("./static-css"),o=e("../config"),u=e("../lib/dom"),a=e("../lib/lang").escapeHTML,f=function(){function e(e){this.className,this.type=e,this.style={},this.textContent=""}return e.prototype.cloneNode=function(){return this},e.prototype.appendChild=function(e){this.textContent+=e.toString()},e.prototype.toString=function(){var e=[];if(this.type!="fragment"){e.push("<",this.type),this.className&&e.push(" class='",this.className,"'");var t=[];for(var n in this.style)t.push(n,":",this.style[n]);t.length&&e.push(" style='",t.join(""),"'"),e.push(">")}return this.textContent&&e.push(this.textContent),this.type!="fragment"&&e.push("</",this.type,">"),e.join("")},e}(),l={createTextNode:function(e,t){return a(e)},createElement:function(e){return new f(e)},createFragment:function(){return new f("fragment")}},c=function(){this.config={},this.dom=l};c.prototype=i.prototype;var h=function(e,t,n){var r=e.className.match(/lang-(\w+)/),i=t.mode||r&&"ace/mode/"+r[1];if(!i)return!1;var s=t.theme||"ace/theme/textmate",o="",a=[];if(e.firstElementChild){var f=0;for(var l=0;l<e.childNodes.length;l++){var c=e.childNodes[l];c.nodeType==3?(f+=c.data.length,o+=c.data):a.push(f,c)}}else o=e.textContent,t.trim&&(o=o.trim());h.render(o,i,s,t.firstLineNumber,!t.showGutter,function(t){u.importCssString(t.css,"ace_highlight",!0),e.innerHTML=t.html;var r=e.firstChild.firstChild;for(var i=0;i<a.length;i+=2){var s=t.session.doc.indexToPosition(a[i]),o=a[i+1],f=r.children[s.row];f&&f.appendChild(o)}n&&n()})};h.render=function(e,t,n,i,s,u){function c(){var r=h.renderSync(e,t,n,i,s);return u?u(r):r}var a=1,f=r.prototype.$modes;typeof n=="string"&&(a++,o.loadModule(["theme",n],function(e){n=e,--a||c()}));var l;return t&&typeof t=="object"&&!t.getTokenizer&&(l=t,t=l.path),typeof t=="string"&&(a++,o.loadModule(["mode",t],function(e){if(!f[t]||l)f[t]=new e.Mode(l);t=f[t],--a||c()})),--a||c()},h.renderSync=function(e,t,n,i,o){i=parseInt(i||1,10);var u=new r("");u.setUseWorker(!1),u.setMode(t);var a=new c;a.setSession(u),Object.keys(a.$tabStrings).forEach(function(e){if(typeof a.$tabStrings[e]=="string"){var t=l.createFragment();t.textContent=a.$tabStrings[e],a.$tabStrings[e]=t}}),u.setValue(e);var f=u.getLength(),h=l.createElement("div");h.className=n.cssClass;var p=l.createElement("div");p.className="ace_static_highlight"+(o?"":" ace_show_gutter"),p.style["counter-reset"]="ace_line "+(i-1);for(var d=0;d<f;d++){var v=l.createElement("div");v.className="ace_line";if(!o){var m=l.createElement("span");m.className="ace_gutter ace_gutter-cell",m.textContent="",v.appendChild(m)}a.$renderLine(v,d,!1),v.textContent+="\n",p.appendChild(v)}return h.appendChild(p),{css:s+n.cssText,html:h.toString(),session:u}},n.exports=h,n.exports.highlight=h}); (function() {
|
|
||||||
ace.require(["ace/ext/static_highlight"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/dom"),i=e("../lib/lang"),s=function(){function e(e,t){this.element=r.createElement("div"),this.element.className="ace_status-indicator",this.element.style.cssText="display: inline-block;",t.appendChild(this.element);var n=i.delayedCall(function(){this.updateStatus(e)}.bind(this)).schedule.bind(null,100);e.on("changeStatus",n),e.on("changeSelection",n),e.on("keyboardActivity",n)}return e.prototype.updateStatus=function(e){function n(e,n){e&&t.push(e,n||"|")}var t=[];n(e.keyBinding.getStatusText(e)),e.commands.recording&&n("REC");var r=e.selection,i=r.lead;if(!r.isEmpty()){var s=e.getSelectionRange();n("("+(s.end.row-s.start.row)+":"+(s.end.column-s.start.column)+")"," ")}n(i.row+":"+i.column," "),r.rangeCount&&n("["+r.rangeCount+"]"," "),t.pop(),this.element.textContent=t.join("")},e}();t.StatusBar=s}); (function() {
|
|
||||||
ace.require(["ace/ext/statusbar"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/themelist",["require","exports","module"],function(e,t,n){"use strict";var r=[["Chrome"],["Clouds"],["Crimson Editor"],["Dawn"],["Dreamweaver"],["Eclipse"],["GitHub"],["IPlastic"],["Solarized Light"],["TextMate"],["Tomorrow"],["XCode"],["Kuroir"],["KatzenMilch"],["SQL Server","sqlserver","light"],["CloudEditor","cloud_editor","light"],["Ambiance","ambiance","dark"],["Chaos","chaos","dark"],["Clouds Midnight","clouds_midnight","dark"],["Dracula","","dark"],["Cobalt","cobalt","dark"],["Gruvbox","gruvbox","dark"],["Green on Black","gob","dark"],["idle Fingers","idle_fingers","dark"],["krTheme","kr_theme","dark"],["Merbivore","merbivore","dark"],["Merbivore Soft","merbivore_soft","dark"],["Mono Industrial","mono_industrial","dark"],["Monokai","monokai","dark"],["Nord Dark","nord_dark","dark"],["One Dark","one_dark","dark"],["Pastel on dark","pastel_on_dark","dark"],["Solarized Dark","solarized_dark","dark"],["Terminal","terminal","dark"],["Tomorrow Night","tomorrow_night","dark"],["Tomorrow Night Blue","tomorrow_night_blue","dark"],["Tomorrow Night Bright","tomorrow_night_bright","dark"],["Tomorrow Night 80s","tomorrow_night_eighties","dark"],["Twilight","twilight","dark"],["Vibrant Ink","vibrant_ink","dark"],["GitHub Dark","github_dark","dark"],["CloudEditor Dark","cloud_editor_dark","dark"]];t.themesByName={},t.themes=r.map(function(e){var n=e[1]||e[0].replace(/ /g,"_").toLowerCase(),r={caption:e[0],theme:"ace/theme/"+n,isDark:e[2]=="dark",name:n};return t.themesByName[n]=r,r})}); (function() {
|
|
||||||
ace.require(["ace/ext/themelist"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"],function(e,t,n){"use strict";var r=e("../lib/lang");t.$detectIndentation=function(e,t){function c(e){var t=0;for(var r=e;r<n.length;r+=e)t+=n[r]||0;return t}var n=[],r=[],i=0,s=0,o=Math.min(e.length,1e3);for(var u=0;u<o;u++){var a=e[u];if(!/^\s*[^*+\-\s]/.test(a))continue;if(a[0]==" ")i++,s=-Number.MAX_VALUE;else{var f=a.match(/^ */)[0].length;if(f&&a[f]!=" "){var l=f-s;l>0&&!(s%l)&&!(f%l)&&(r[l]=(r[l]||0)+1),n[f]=(n[f]||0)+1}s=f}while(u<o&&a[a.length-1]=="\\")a=e[u++]}var h=r.reduce(function(e,t){return e+t},0),p={score:0,length:0},d=0;for(var u=1;u<12;u++){var v=c(u);u==1?(d=v,v=n[1]?.9:.8,n.length||(v=0)):v/=d,r[u]&&(v+=r[u]/h),v>p.score&&(p={score:v,length:u})}if(p.score&&p.score>1.4)var m=p.length;if(i>d+1){if(m==1||d<i/4||p.score<1.8)m=undefined;return{ch:" ",length:m}}if(d>i+1)return{ch:" ",length:m}},t.detectIndentation=function(e){var n=e.getLines(0,1e3),r=t.$detectIndentation(n)||{};return r.ch&&e.setUseSoftTabs(r.ch==" "),r.length&&e.setTabSize(r.length),r},t.trimTrailingSpace=function(e,t){var n=e.getDocument(),r=n.getAllLines(),i=t&&t.trimEmpty?-1:0,s=[],o=-1;t&&t.keepCursorPosition&&(e.selection.rangeCount?e.selection.rangeList.ranges.forEach(function(e,t,n){var r=n[t+1];if(r&&r.cursor.row==e.cursor.row)return;s.push(e.cursor)}):s.push(e.selection.getCursor()),o=0);var u=s[o]&&s[o].row;for(var a=0,f=r.length;a<f;a++){var l=r[a],c=l.search(/\s+$/);a==u&&(c<s[o].column&&c>i&&(c=s[o].column),o++,u=s[o]?s[o].row:-1),c>i&&n.removeInLine(a,c,l.length)}},t.convertIndentation=function(e,t,n){var i=e.getTabString()[0],s=e.getTabSize();n||(n=s),t||(t=i);var o=t==" "?t:r.stringRepeat(t,n),u=e.doc,a=u.getAllLines(),f={},l={};for(var c=0,h=a.length;c<h;c++){var p=a[c],d=p.match(/^\s*/)[0];if(d){var v=e.$getStringScreenWidth(d)[0],m=Math.floor(v/s),g=v%s,y=f[m]||(f[m]=r.stringRepeat(o,m));y+=l[g]||(l[g]=r.stringRepeat(" ",g)),y!=d&&(u.removeInLine(c,0,d.length),u.insertInLine({row:c,column:0},y))}}e.setTabSize(n),e.setUseSoftTabs(t==" ")},t.$parseStringArg=function(e){var t={};/t/.test(e)?t.ch=" ":/s/.test(e)&&(t.ch=" ");var n=e.match(/\d+/);return n&&(t.length=parseInt(n[0],10)),t},t.$parseArg=function(e){return e?typeof e=="string"?t.$parseStringArg(e):typeof e.text=="string"?t.$parseStringArg(e.text):e:{}},t.commands=[{name:"detectIndentation",description:"Detect indentation from content",exec:function(e){t.detectIndentation(e.session)}},{name:"trimTrailingSpace",description:"Trim trailing whitespace",exec:function(e,n){t.trimTrailingSpace(e.session,n)}},{name:"convertIndentation",description:"Convert indentation to ...",exec:function(e,n){var r=t.$parseArg(n);t.convertIndentation(e.session,r.ch,r.length)}},{name:"setIndentation",description:"Set indentation",exec:function(e,n){var r=t.$parseArg(n);r.length&&e.session.setTabSize(r.length),r.ch&&e.session.setUseSoftTabs(r.ch==" ")}}]}); (function() {
|
|
||||||
ace.require(["ace/ext/whitespace"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
; (function() {
|
|
||||||
ace.require(["ace/snippets/json"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
; (function() {
|
|
||||||
ace.require(["ace/snippets/json5"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/snippets/markdown.snippets",["require","exports","module"],function(e,t,n){n.exports='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet \nsnippet ${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n'}),ace.define("ace/snippets/markdown",["require","exports","module","ace/snippets/markdown.snippets"],function(e,t,n){"use strict";t.snippetText=e("./markdown.snippets"),t.scope="markdown"}); (function() {
|
|
||||||
ace.require(["ace/snippets/markdown"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/snippets/python.snippets",["require","exports","module"],function(e,t,n){n.exports='snippet #!\n #!/usr/bin/env python\nsnippet imp\n import ${1:module}\nsnippet from\n from ${1:package} import ${2:module}\n# Module Docstring\nsnippet docs\n \'\'\'\n File: ${1:FILENAME:file_name}\n Author: ${2:author}\n Description: ${3}\n \'\'\'\nsnippet wh\n while ${1:condition}:\n ${2:# TODO: write code...}\n# dowh - does the same as do...while in other languages\nsnippet dowh\n while True:\n ${1:# TODO: write code...}\n if ${2:condition}:\n break\nsnippet with\n with ${1:expr} as ${2:var}:\n ${3:# TODO: write code...}\n# New Class\nsnippet cl\n class ${1:ClassName}(${2:object}):\n """${3:docstring for $1}"""\n def __init__(self, ${4:arg}):\n ${5:super($1, self).__init__()}\n self.$4 = $4\n ${6}\n# New Function\nsnippet def\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n """${3:docstring for $1}"""\n ${4:# TODO: write code...}\nsnippet deff\n def ${1:fname}(${2:`indent(\'.\') ? \'self\' : \'\'`}):\n ${3:# TODO: write code...}\n# New Method\nsnippet defs\n def ${1:mname}(self, ${2:arg}):\n ${3:# TODO: write code...}\n# New Property\nsnippet property\n def ${1:foo}():\n doc = "${2:The $1 property.}"\n def fget(self):\n ${3:return self._$1}\n def fset(self, value):\n ${4:self._$1 = value}\n# Ifs\nsnippet if\n if ${1:condition}:\n ${2:# TODO: write code...}\nsnippet el\n else:\n ${1:# TODO: write code...}\nsnippet ei\n elif ${1:condition}:\n ${2:# TODO: write code...}\n# For\nsnippet for\n for ${1:item} in ${2:items}:\n ${3:# TODO: write code...}\n# Encodes\nsnippet cutf8\n # -*- coding: utf-8 -*-\nsnippet clatin1\n # -*- coding: latin-1 -*-\nsnippet cascii\n # -*- coding: ascii -*-\n# Lambda\nsnippet ld\n ${1:var} = lambda ${2:vars} : ${3:action}\nsnippet .\n self.\nsnippet try Try/Except\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\nsnippet try Try/Except/Else\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n finally:\n ${5:# TODO: write code...}\nsnippet try Try/Except/Else/Finally\n try:\n ${1:# TODO: write code...}\n except ${2:Exception}, ${3:e}:\n ${4:raise $3}\n else:\n ${5:# TODO: write code...}\n finally:\n ${6:# TODO: write code...}\n# if __name__ == \'__main__\':\nsnippet ifmain\n if __name__ == \'__main__\':\n ${1:main()}\n# __magic__\nsnippet _\n __${1:init}__${2}\n# python debugger (pdb)\nsnippet pdb\n import pdb; pdb.set_trace()\n# ipython debugger (ipdb)\nsnippet ipdb\n import ipdb; ipdb.set_trace()\n# ipython debugger (pdbbb)\nsnippet pdbbb\n import pdbpp; pdbpp.set_trace()\nsnippet pprint\n import pprint; pprint.pprint(${1})${2}\nsnippet "\n """\n ${1:doc}\n """\n# test function/method\nsnippet test\n def test_${1:description}(${2:self}):\n ${3:# TODO: write code...}\n# test case\nsnippet testcase\n class ${1:ExampleCase}(unittest.TestCase):\n \n def test_${2:description}(self):\n ${3:# TODO: write code...}\nsnippet fut\n from __future__ import ${1}\n#getopt\nsnippet getopt\n try:\n # Short option syntax: "hv:"\n # Long option syntax: "help" or "verbose="\n opts, args = getopt.getopt(sys.argv[1:], "${1:short_options}", [${2:long_options}])\n \n except getopt.GetoptError, err:\n # Print debug info\n print str(err)\n ${3:error_action}\n\n for option, argument in opts:\n if option in ("-h", "--help"):\n ${4}\n elif option in ("-v", "--verbose"):\n verbose = argument\n'}),ace.define("ace/snippets/python",["require","exports","module","ace/snippets/python.snippets"],function(e,t,n){"use strict";t.snippetText=e("./python.snippets"),t.scope="python"}); (function() {
|
|
||||||
ace.require(["ace/snippets/python"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
; (function() {
|
|
||||||
ace.require(["ace/snippets/typescript"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/chaos-css",["require","exports","module"],function(e,t,n){n.exports=".ace-chaos .ace_gutter {\n background: #141414;\n color: #595959;\n border-right: 1px solid #282828;\n}\n.ace-chaos .ace_gutter-cell.ace_warning {\n background-image: none;\n background: #FC0;\n border-left: none;\n padding-left: 0;\n color: #000;\n}\n.ace-chaos .ace_gutter-cell.ace_error {\n background-position: -6px center;\n background-image: none;\n background: #F10;\n border-left: none;\n padding-left: 0;\n color: #000;\n}\n.ace-chaos .ace_print-margin {\n border-left: 1px solid #555;\n right: 0;\n background: #1D1D1D;\n}\n.ace-chaos {\n background-color: #161616;\n color: #E6E1DC;\n}\n\n.ace-chaos .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n.ace-chaos .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n.ace-chaos .ace_marker-layer .ace_selection {\n background: #494836;\n}\n.ace-chaos .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n.ace-chaos .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #FCE94F;\n}\n.ace-chaos .ace_marker-layer .ace_active-line {\n background: #333;\n}\n.ace-chaos .ace_gutter-active-line {\n background-color: #222;\n}\n.ace-chaos .ace_invisible {\n color: #404040;\n}\n.ace-chaos .ace_keyword {\n color:#00698F;\n}\n.ace-chaos .ace_keyword.ace_operator {\n color:#FF308F;\n}\n.ace-chaos .ace_constant {\n color:#1EDAFB;\n}\n.ace-chaos .ace_constant.ace_language {\n color:#FDC251;\n}\n.ace-chaos .ace_constant.ace_library {\n color:#8DFF0A;\n}\n.ace-chaos .ace_constant.ace_numeric {\n color:#58C554;\n}\n.ace-chaos .ace_invalid {\n color:#FFFFFF;\n background-color:#990000;\n}\n.ace-chaos .ace_invalid.ace_deprecated {\n color:#FFFFFF;\n background-color:#990000;\n}\n.ace-chaos .ace_support {\n color: #999;\n}\n.ace-chaos .ace_support.ace_function {\n color:#00AEEF;\n}\n.ace-chaos .ace_function {\n color:#00AEEF;\n}\n.ace-chaos .ace_string {\n color:#58C554;\n}\n.ace-chaos .ace_comment {\n color:#555;\n font-style:italic;\n padding-bottom: 0px;\n}\n.ace-chaos .ace_variable {\n color:#997744;\n}\n.ace-chaos .ace_meta.ace_tag {\n color:#BE53E6;\n}\n.ace-chaos .ace_entity.ace_other.ace_attribute-name {\n color:#FFFF89;\n}\n.ace-chaos .ace_markup.ace_underline {\n text-decoration: underline;\n}\n.ace-chaos .ace_fold-widget {\n text-align: center;\n}\n\n.ace-chaos .ace_fold-widget:hover {\n color: #777;\n}\n\n.ace-chaos .ace_fold-widget.ace_start,\n.ace-chaos .ace_fold-widget.ace_end,\n.ace-chaos .ace_fold-widget.ace_closed{\n background: none !important;\n border: none;\n box-shadow: none;\n}\n\n.ace-chaos .ace_fold-widget.ace_start:after {\n content: '\u25be'\n}\n\n.ace-chaos .ace_fold-widget.ace_end:after {\n content: '\u25b4'\n}\n\n.ace-chaos .ace_fold-widget.ace_closed:after {\n content: '\u2023'\n}\n\n.ace-chaos .ace_indent-guide {\n border-right:1px dotted #333333;\n margin-right:-1px;\n}\n\n.ace-chaos .ace_indent-guide-active {\n border-right:1px dotted #afafaf;\n margin-right:-1px;\n}\n\n.ace-chaos .ace_fold { \n background: #222; \n border-radius: 3px; \n color: #7AF; \n border: none; \n}\n.ace-chaos .ace_fold:hover {\n background: #CCC; \n color: #000;\n}\n"}),ace.define("ace/theme/chaos",["require","exports","module","ace/theme/chaos-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-chaos",t.cssText=e("./chaos-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/chaos"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/chrome-css",["require","exports","module"],function(e,t,n){n.exports='.ace-chrome .ace_gutter {\n background: #ebebeb;\n color: #333;\n overflow : hidden;\n}\n\n.ace-chrome .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-chrome {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-chrome .ace_cursor {\n color: black;\n}\n\n.ace-chrome .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-chrome .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-chrome .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-chrome .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-chrome .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-chrome .ace_fold {\n}\n\n.ace-chrome .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-chrome .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-chrome .ace_support.ace_type,\n.ace-chrome .ace_support.ace_class\n.ace-chrome .ace_support.ace_other {\n color: rgb(109, 121, 222);\n}\n\n.ace-chrome .ace_variable.ace_parameter {\n font-style:italic;\n color:#FD971F;\n}\n.ace-chrome .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-chrome .ace_comment {\n color: #236e24;\n}\n\n.ace-chrome .ace_comment.ace_doc {\n color: #236e24;\n}\n\n.ace-chrome .ace_comment.ace_doc.ace_tag {\n color: #236e24;\n}\n\n.ace-chrome .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-chrome .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-chrome .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-chrome .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-chrome .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-chrome .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-chrome .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-chrome .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-chrome .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-chrome .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-chrome .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-chrome .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-chrome .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-chrome .ace_storage,\n.ace-chrome .ace_keyword,\n.ace-chrome .ace_meta.ace_tag {\n color: rgb(147, 15, 128);\n}\n\n.ace-chrome .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-chrome .ace_string {\n color: #1A1AA6;\n}\n\n.ace-chrome .ace_entity.ace_other.ace_attribute-name {\n color: #994409;\n}\n\n.ace-chrome .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n \n.ace-chrome .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-chrome",t.cssText=e("./chrome-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/chrome"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/cloud9_day-css",["require","exports","module"],function(e,t,n){n.exports='.ace-cloud9-day .ace_gutter {\n background: #ECECEC;\n color: #333;\n}\n\n.ace-cloud9-day .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-cloud9-day .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-cloud9-day {\n background-color: #FBFBFB;\n color: black;\n}\n\n.ace-cloud9-day .ace_cursor {\n color: black;\n}\n\n.ace-cloud9-day .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-cloud9-day .ace_storage,\n.ace-cloud9-day .ace_keyword {\n color: rgb(24, 122, 234);\n}\n\n.ace-cloud9-day .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-cloud9-day .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-cloud9-day .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-cloud9-day .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-cloud9-day .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-cloud9-day .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-cloud9-day .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-cloud9-day .ace_support.ace_type,\n.ace-cloud9-day .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-cloud9-day .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-cloud9-day .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-cloud9-day .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-cloud9-day .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-cloud9-day .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-cloud9-day .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-cloud9-day .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-cloud9-day .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-cloud9-day .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-cloud9-day .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-cloud9-day .ace_list {\n color: rgb(185, 6, 144);\n}\n\n.ace-cloud9-day .ace_meta.ace_tag {\n color: rgb(0, 22, 142);\n}\n\n.ace-cloud9-day .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-cloud9-day.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_step {\n background: rgb(247, 237, 137);\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_stack {\n background: #BAE0A0;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-cloud9-day .ace_gutter-active-line {\n background-color: #E5E5E5;\n}\n\n.ace-cloud9-day .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-cloud9-day .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-cloud9-day .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n} \n'}),ace.define("ace/theme/cloud9_day",["require","exports","module","ace/theme/cloud9_day-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-cloud9-day",t.cssText=e("./cloud9_day-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() {
|
|
||||||
ace.require(["ace/theme/cloud9_day"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/cloud9_night-css",["require","exports","module"],function(e,t,n){n.exports=".ace-cloud9-night .ace_gutter {\n background: #303130;\n color: #eee\n}\n\n.ace-cloud9-night .ace_print-margin {\n width: 1px;\n background: #222\n}\n\n.ace-cloud9-night {\n background-color: #181818;\n color: #EBEBEB\n}\n\n.ace-cloud9-night .ace_cursor {\n color: #9F9F9F\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_selection {\n background: #424242\n}\n\n.ace-cloud9-night.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #000000;\n border-radius: 2px\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #888888\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_highlight {\n border: 1px solid rgb(110, 119, 0);\n border-bottom: 0;\n box-shadow: inset 0 -1px rgb(110, 119, 0);\n margin: -1px 0 0 -1px;\n background: rgba(255, 235, 0, 0.1);\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_active-line {\n background: #292929\n}\n\n.ace-cloud9-night .ace_gutter-active-line {\n background-color: #3D3D3D\n}\n\n.ace-cloud9-night .ace_stack {\n background-color: rgb(66, 90, 44)\n}\n\n.ace-cloud9-night .ace_marker-layer .ace_selected-word {\n border: 1px solid #888888\n}\n\n.ace-cloud9-night .ace_invisible {\n color: #343434\n}\n\n.ace-cloud9-night .ace_keyword,\n.ace-cloud9-night .ace_meta,\n.ace-cloud9-night .ace_storage,\n.ace-cloud9-night .ace_storage.ace_type,\n.ace-cloud9-night .ace_support.ace_type {\n color: #C397D8\n}\n\n.ace-cloud9-night .ace_keyword.ace_operator {\n color: #70C0B1\n}\n\n.ace-cloud9-night .ace_constant.ace_character,\n.ace-cloud9-night .ace_constant.ace_language,\n.ace-cloud9-night .ace_constant.ace_numeric,\n.ace-cloud9-night .ace_keyword.ace_other.ace_unit,\n.ace-cloud9-night .ace_support.ace_constant,\n.ace-cloud9-night .ace_variable.ace_parameter {\n color: #E78C45\n}\n\n.ace-cloud9-night .ace_constant.ace_other {\n color: #EEEEEE\n}\n\n.ace-cloud9-night .ace_invalid {\n color: #CED2CF;\n background-color: #DF5F5F\n}\n\n.ace-cloud9-night .ace_invalid.ace_deprecated {\n color: #CED2CF;\n background-color: #B798BF\n}\n\n.ace-cloud9-night .ace_fold {\n background-color: #7AA6DA;\n border-color: #DEDEDE\n}\n\n.ace-cloud9-night .ace_entity.ace_name.ace_function,\n.ace-cloud9-night .ace_support.ace_function,\n.ace-cloud9-night .ace_variable:not(.ace_parameter),\n.ace-cloud9-night .ace_constant:not(.ace_numeric) {\n color: #7AA6DA\n}\n\n.ace-cloud9-night .ace_support.ace_class,\n.ace-cloud9-night .ace_support.ace_type {\n color: #E7C547\n}\n\n.ace-cloud9-night .ace_heading,\n.ace-cloud9-night .ace_markup.ace_heading,\n.ace-cloud9-night .ace_string {\n color: #B9CA4A\n}\n\n.ace-cloud9-night .ace_entity.ace_name.ace_tag,\n.ace-cloud9-night .ace_entity.ace_other.ace_attribute-name,\n.ace-cloud9-night .ace_meta.ace_tag,\n.ace-cloud9-night .ace_string.ace_regexp,\n.ace-cloud9-night .ace_variable {\n color: #D54E53\n}\n\n.ace-cloud9-night .ace_comment {\n color: #969896\n}\n\n.ace-cloud9-night .ace_c9searchresults.ace_keyword {\n color: #C2C280;\n}\n\n.ace-cloud9-night .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-cloud9-night .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/cloud9_night",["require","exports","module","ace/theme/cloud9_night-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-cloud9-night",t.cssText=e("./cloud9_night-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() {
|
|
||||||
ace.require(["ace/theme/cloud9_night"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/cloud9_night_low_color-css",["require","exports","module"],function(e,t,n){n.exports=".ace-cloud9-night-low-color .ace_gutter {\n background: #303130;\n color: #eee\n}\n\n.ace-cloud9-night-low-color .ace_print-margin {\n width: 1px;\n background: #222\n}\n\n.ace-cloud9-night-low-color {\n background-color: #181818;\n color: #EBEBEB\n}\n\n.ace-cloud9-night-low-color .ace_cursor {\n color: #9F9F9F\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_selection {\n background: #424242\n}\n\n.ace-cloud9-night-low-color.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #000000;\n border-radius: 2px\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #888888\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_highlight {\n border: 1px solid rgb(110, 119, 0);\n border-bottom: 0;\n box-shadow: inset 0 -1px rgb(110, 119, 0);\n margin: -1px 0 0 -1px;\n background: rgba(255, 235, 0, 0.1);\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_active-line {\n background: #292929\n}\n\n.ace-cloud9-night-low-color .ace_gutter-active-line {\n background-color: #3D3D3D\n}\n\n.ace-cloud9-night-low-color .ace_stack {\n background-color: rgb(66, 90, 44)\n}\n\n.ace-cloud9-night-low-color .ace_marker-layer .ace_selected-word {\n border: 1px solid #888888\n}\n\n.ace-cloud9-night-low-color .ace_invisible {\n color: #343434\n}\n\n.ace-cloud9-night-low-color .ace_keyword,\n.ace-cloud9-night-low-color .ace_meta,\n.ace-cloud9-night-low-color .ace_storage {\n color: #C397D8\n}\n\n.ace-cloud9-night-low-color .ace_keyword.ace_operator {\n color: #70C0B1\n}\n\n.ace-cloud9-night-low-color .ace_constant.ace_character,\n.ace-cloud9-night-low-color .ace_constant.ace_language,\n.ace-cloud9-night-low-color .ace_constant.ace_numeric,\n.ace-cloud9-night-low-color .ace_keyword.ace_other.ace_unit {\n color: #DAA637\n}\n\n.ace-cloud9-night-low-color .ace_constant.ace_other {\n color: #EEEEEE\n}\n\n.ace-cloud9-night-low-color .ace_invalid {\n color: #CED2CF;\n background-color: #DF5F5F\n}\n\n.ace-cloud9-night-low-color .ace_invalid.ace_deprecated {\n color: #CED2CF;\n background-color: #B798BF\n}\n\n.ace-cloud9-night-low-color .ace_fold {\n background-color: #7AA6DA;\n border-color: #DEDEDE\n}\n\n.ace-cloud9-night-low-color .ace_entity.ace_name.ace_function,\n.ace-cloud9-night-low-color .ace_support.ace_function,\n.ace-cloud9-night-low-color .ace_variable:not(.ace_parameter),\n.ace-cloud9-night-low-color .ace_constant:not(.ace_numeric) {\n color: #7AA6DA\n}\n\n.ace-cloud9-night-low-color .ace_support.ace_class,\n.ace-cloud9-night-low-color .ace_support.ace_type {\n color: #E7C547\n}\n\n.ace-cloud9-night-low-color .ace_heading,\n.ace-cloud9-night-low-color .ace_markup.ace_heading,\n.ace-cloud9-night-low-color .ace_string {\n color: #B9CA4A\n}\n\n.ace-cloud9-night-low-color .ace_comment {\n color: #969896\n}\n\n.ace-cloud9-night-low-color .ace_c9searchresults.ace_keyword {\n color: #C2C280;\n}\n\n.ace-cloud9-night-low-color .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYFBXV/8PAAJoAXX4kT2EAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-cloud9-night-low-color .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/cloud9_night_low_color",["require","exports","module","ace/theme/cloud9_night_low_color-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-cloud9-night-low-color",t.cssText=e("./cloud9_night_low_color-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() {
|
|
||||||
ace.require(["ace/theme/cloud9_night_low_color"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/clouds-css",["require","exports","module"],function(e,t,n){n.exports='.ace-clouds .ace_gutter {\n background: #ebebeb;\n color: #333\n}\n\n.ace-clouds .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-clouds {\n background-color: #FFFFFF;\n color: #000000\n}\n\n.ace-clouds .ace_cursor {\n color: #000000\n}\n\n.ace-clouds .ace_marker-layer .ace_selection {\n background: #BDD5FC\n}\n\n.ace-clouds.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #FFFFFF;\n}\n\n.ace-clouds .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0)\n}\n\n.ace-clouds .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF\n}\n\n.ace-clouds .ace_marker-layer .ace_active-line {\n background: #FFFBD1\n}\n\n.ace-clouds .ace_gutter-active-line {\n background-color : #dcdcdc\n}\n\n.ace-clouds .ace_marker-layer .ace_selected-word {\n border: 1px solid #BDD5FC\n}\n\n.ace-clouds .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-clouds .ace_keyword,\n.ace-clouds .ace_meta,\n.ace-clouds .ace_support.ace_constant.ace_property-value {\n color: #AF956F\n}\n\n.ace-clouds .ace_keyword.ace_operator {\n color: #484848\n}\n\n.ace-clouds .ace_keyword.ace_other.ace_unit {\n color: #96DC5F\n}\n\n.ace-clouds .ace_constant.ace_language {\n color: #39946A\n}\n\n.ace-clouds .ace_constant.ace_numeric {\n color: #46A609\n}\n\n.ace-clouds .ace_constant.ace_character.ace_entity {\n color: #BF78CC\n}\n\n.ace-clouds .ace_invalid {\n background-color: #FF002A\n}\n\n.ace-clouds .ace_fold {\n background-color: #AF956F;\n border-color: #000000\n}\n\n.ace-clouds .ace_storage,\n.ace-clouds .ace_support.ace_class,\n.ace-clouds .ace_support.ace_function,\n.ace-clouds .ace_support.ace_other,\n.ace-clouds .ace_support.ace_type {\n color: #C52727\n}\n\n.ace-clouds .ace_string {\n color: #5D90CD\n}\n\n.ace-clouds .ace_comment {\n color: #BCC8BA\n}\n\n.ace-clouds .ace_entity.ace_name.ace_tag,\n.ace-clouds .ace_entity.ace_other.ace_attribute-name {\n color: #606060\n}\n\n.ace-clouds .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y\n}\n\n.ace-clouds .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n} \n'}),ace.define("ace/theme/clouds",["require","exports","module","ace/theme/clouds-css","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-clouds",t.cssText=e("./clouds-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/clouds"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/clouds_midnight-css",["require","exports","module"],function(e,t,n){n.exports=".ace-clouds-midnight .ace_gutter {\n background: #232323;\n color: #929292\n}\n\n.ace-clouds-midnight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-clouds-midnight {\n background-color: #191919;\n color: #929292\n}\n\n.ace-clouds-midnight .ace_cursor {\n color: #7DA5DC\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_selection {\n background: #000000\n}\n\n.ace-clouds-midnight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #191919;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_active-line {\n background: rgba(215, 215, 215, 0.031)\n}\n\n.ace-clouds-midnight .ace_gutter-active-line {\n background-color: rgba(215, 215, 215, 0.031)\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_selected-word {\n border: 1px solid #000000\n}\n\n.ace-clouds-midnight .ace_invisible {\n color: #666\n}\n\n.ace-clouds-midnight .ace_keyword,\n.ace-clouds-midnight .ace_meta,\n.ace-clouds-midnight .ace_support.ace_constant.ace_property-value {\n color: #927C5D\n}\n\n.ace-clouds-midnight .ace_keyword.ace_operator {\n color: #4B4B4B\n}\n\n.ace-clouds-midnight .ace_keyword.ace_other.ace_unit {\n color: #366F1A\n}\n\n.ace-clouds-midnight .ace_constant.ace_language {\n color: #39946A\n}\n\n.ace-clouds-midnight .ace_constant.ace_numeric {\n color: #46A609\n}\n\n.ace-clouds-midnight .ace_constant.ace_character.ace_entity {\n color: #A165AC\n}\n\n.ace-clouds-midnight .ace_invalid {\n color: #FFFFFF;\n background-color: #E92E2E\n}\n\n.ace-clouds-midnight .ace_fold {\n background-color: #927C5D;\n border-color: #929292\n}\n\n.ace-clouds-midnight .ace_storage,\n.ace-clouds-midnight .ace_support.ace_class,\n.ace-clouds-midnight .ace_support.ace_function,\n.ace-clouds-midnight .ace_support.ace_other,\n.ace-clouds-midnight .ace_support.ace_type {\n color: #E92E2E\n}\n\n.ace-clouds-midnight .ace_string {\n color: #5D90CD\n}\n\n.ace-clouds-midnight .ace_comment {\n color: #3C403B\n}\n\n.ace-clouds-midnight .ace_entity.ace_name.ace_tag,\n.ace-clouds-midnight .ace_entity.ace_other.ace_attribute-name {\n color: #606060\n}\n\n.ace-clouds-midnight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-clouds-midnight .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/theme/clouds_midnight-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-clouds-midnight",t.cssText=e("./clouds_midnight-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/clouds_midnight"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/cobalt-css",["require","exports","module"],function(e,t,n){n.exports=".ace-cobalt .ace_gutter {\n background: #011e3a;\n color: rgb(128,145,160)\n}\n\n.ace-cobalt .ace_print-margin {\n width: 1px;\n background: #555555\n}\n\n.ace-cobalt {\n background-color: #002240;\n color: #FFFFFF\n}\n\n.ace-cobalt .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-cobalt .ace_marker-layer .ace_selection {\n background: rgba(179, 101, 57, 0.75)\n}\n\n.ace-cobalt.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #002240;\n}\n\n.ace-cobalt .ace_marker-layer .ace_step {\n background: rgb(127, 111, 19)\n}\n\n.ace-cobalt .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.15)\n}\n\n.ace-cobalt .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.35)\n}\n\n.ace-cobalt .ace_gutter-active-line {\n background-color: rgba(0, 0, 0, 0.35)\n}\n\n.ace-cobalt .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(179, 101, 57, 0.75)\n}\n\n.ace-cobalt .ace_invisible {\n color: rgba(255, 255, 255, 0.15)\n}\n\n.ace-cobalt .ace_keyword,\n.ace-cobalt .ace_meta {\n color: #FF9D00\n}\n\n.ace-cobalt .ace_constant,\n.ace-cobalt .ace_constant.ace_character,\n.ace-cobalt .ace_constant.ace_character.ace_escape,\n.ace-cobalt .ace_constant.ace_other {\n color: #FF628C\n}\n\n.ace-cobalt .ace_invalid {\n color: #F8F8F8;\n background-color: #800F00\n}\n\n.ace-cobalt .ace_support {\n color: #80FFBB\n}\n\n.ace-cobalt .ace_support.ace_constant {\n color: #EB939A\n}\n\n.ace-cobalt .ace_fold {\n background-color: #FF9D00;\n border-color: #FFFFFF\n}\n\n.ace-cobalt .ace_support.ace_function {\n color: #FFB054\n}\n\n.ace-cobalt .ace_storage {\n color: #FFEE80\n}\n\n.ace-cobalt .ace_entity {\n color: #FFDD00\n}\n\n.ace-cobalt .ace_string {\n color: #3AD900\n}\n\n.ace-cobalt .ace_string.ace_regexp {\n color: #80FFC2\n}\n\n.ace-cobalt .ace_comment {\n font-style: italic;\n color: #0088FF\n}\n\n.ace-cobalt .ace_heading,\n.ace-cobalt .ace_markup.ace_heading {\n color: #C8E4FD;\n background-color: #001221\n}\n\n.ace-cobalt .ace_list,\n.ace-cobalt .ace_markup.ace_list {\n background-color: #130D26\n}\n\n.ace-cobalt .ace_variable {\n color: #CCCCCC\n}\n\n.ace-cobalt .ace_variable.ace_language {\n color: #FF80E1\n}\n\n.ace-cobalt .ace_meta.ace_tag {\n color: #9EFFFF\n}\n\n.ace-cobalt .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHCLSvkPAAP3AgSDTRd4AAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-cobalt .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/cobalt",["require","exports","module","ace/theme/cobalt-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-cobalt",t.cssText=e("./cobalt-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/cobalt"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/crimson_editor-css",["require","exports","module"],function(e,t,n){n.exports='.ace-crimson-editor .ace_gutter {\n background: #ebebeb;\n color: #333;\n overflow : hidden;\n}\n\n.ace-crimson-editor .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-crimson-editor .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-crimson-editor {\n background-color: #FFFFFF;\n color: rgb(64, 64, 64);\n}\n\n.ace-crimson-editor .ace_cursor {\n color: black;\n}\n\n.ace-crimson-editor .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-crimson-editor .ace_identifier {\n color: black;\n}\n\n.ace-crimson-editor .ace_keyword {\n color: blue;\n}\n\n.ace-crimson-editor .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-crimson-editor .ace_constant.ace_language {\n color: rgb(255, 156, 0);\n}\n\n.ace-crimson-editor .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-crimson-editor .ace_invalid {\n text-decoration: line-through;\n color: rgb(224, 0, 0);\n}\n\n.ace-crimson-editor .ace_fold {\n}\n\n.ace-crimson-editor .ace_support.ace_function {\n color: rgb(192, 0, 0);\n}\n\n.ace-crimson-editor .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-crimson-editor .ace_support.ace_type,\n.ace-crimson-editor .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-crimson-editor .ace_keyword.ace_operator {\n color: rgb(49, 132, 149);\n}\n\n.ace-crimson-editor .ace_string {\n color: rgb(128, 0, 128);\n}\n\n.ace-crimson-editor .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-crimson-editor .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-crimson-editor .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-crimson-editor .ace_constant.ace_numeric {\n color: rgb(0, 0, 64);\n}\n\n.ace-crimson-editor .ace_variable {\n color: rgb(0, 64, 128);\n}\n\n.ace-crimson-editor .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_active-line {\n background: rgb(232, 242, 254);\n}\n\n.ace-crimson-editor .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-crimson-editor .ace_meta.ace_tag {\n color:rgb(28, 2, 255);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-crimson-editor .ace_string.ace_regex {\n color: rgb(192, 0, 192);\n}\n\n.ace-crimson-editor .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-crimson-editor .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n} \n'}),ace.define("ace/theme/crimson_editor",["require","exports","module","ace/theme/crimson_editor-css","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssText=e("./crimson_editor-css"),t.cssClass="ace-crimson-editor";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/crimson_editor"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/dawn-css",["require","exports","module"],function(e,t,n){n.exports='.ace-dawn .ace_gutter {\n background: #ebebeb;\n color: #333\n}\n\n.ace-dawn .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-dawn {\n background-color: #F9F9F9;\n color: #080808\n}\n\n.ace-dawn .ace_cursor {\n color: #000000\n}\n\n.ace-dawn .ace_marker-layer .ace_selection {\n background: rgba(39, 95, 255, 0.30)\n}\n\n.ace-dawn.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #F9F9F9;\n}\n\n.ace-dawn .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0)\n}\n\n.ace-dawn .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(75, 75, 126, 0.50)\n}\n\n.ace-dawn .ace_marker-layer .ace_active-line {\n background: rgba(36, 99, 180, 0.12)\n}\n\n.ace-dawn .ace_gutter-active-line {\n background-color : #dcdcdc\n}\n\n.ace-dawn .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(39, 95, 255, 0.30)\n}\n\n.ace-dawn .ace_invisible {\n color: rgba(75, 75, 126, 0.50)\n}\n\n.ace-dawn .ace_keyword,\n.ace-dawn .ace_meta {\n color: #794938\n}\n\n.ace-dawn .ace_constant,\n.ace-dawn .ace_constant.ace_character,\n.ace-dawn .ace_constant.ace_character.ace_escape,\n.ace-dawn .ace_constant.ace_other {\n color: #811F24\n}\n\n.ace-dawn .ace_invalid.ace_illegal {\n text-decoration: underline;\n font-style: italic;\n color: #F8F8F8;\n background-color: #B52A1D\n}\n\n.ace-dawn .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #B52A1D\n}\n\n.ace-dawn .ace_support {\n color: #691C97\n}\n\n.ace-dawn .ace_support.ace_constant {\n color: #B4371F\n}\n\n.ace-dawn .ace_fold {\n background-color: #794938;\n border-color: #080808\n}\n\n.ace-dawn .ace_list,\n.ace-dawn .ace_markup.ace_list,\n.ace-dawn .ace_support.ace_function {\n color: #693A17\n}\n\n.ace-dawn .ace_storage {\n font-style: italic;\n color: #A71D5D\n}\n\n.ace-dawn .ace_string {\n color: #0B6125\n}\n\n.ace-dawn .ace_string.ace_regexp {\n color: #CF5628\n}\n\n.ace-dawn .ace_comment {\n font-style: italic;\n color: #5A525F\n}\n\n.ace-dawn .ace_heading,\n.ace-dawn .ace_markup.ace_heading {\n color: #19356D\n}\n\n.ace-dawn .ace_variable {\n color: #234A97\n}\n\n.ace-dawn .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYLh/5+x/AAizA4hxNNsZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dawn .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n} \n'}),ace.define("ace/theme/dawn",["require","exports","module","ace/theme/dawn-css","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-dawn",t.cssText=e("./dawn-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/dawn"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/dracula-css",["require","exports","module"],function(e,t,n){n.exports='/*\n * Copyright \u00a9 2017 Zeno Rocha <hi@zenorocha.com>\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n */\n\n.ace-dracula .ace_gutter {\n background: #282a36;\n color: rgb(144,145,148)\n}\n\n.ace-dracula .ace_print-margin {\n width: 1px;\n background: #44475a\n}\n\n.ace-dracula {\n background-color: #282a36;\n color: #f8f8f2\n}\n\n.ace-dracula .ace_cursor {\n color: #f8f8f0\n}\n\n.ace-dracula .ace_marker-layer .ace_selection {\n background: #44475a\n}\n\n.ace-dracula.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #282a36;\n border-radius: 2px\n}\n\n.ace-dracula .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-dracula .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #a29709\n}\n\n.ace-dracula .ace_marker-layer .ace_active-line {\n background: #44475a\n}\n\n.ace-dracula .ace_gutter-active-line {\n background-color: #44475a\n}\n\n.ace-dracula .ace_marker-layer .ace_selected-word {\n box-shadow: 0px 0px 0px 1px #a29709;\n border-radius: 3px;\n}\n\n.ace-dracula .ace_fold {\n background-color: #50fa7b;\n border-color: #f8f8f2\n}\n\n.ace-dracula .ace_keyword {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_language {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_numeric {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character {\n color: #bd93f9\n}\n\n.ace-dracula .ace_constant.ace_character.ace_escape {\n color: #ff79c6\n}\n\n.ace-dracula .ace_constant.ace_other {\n color: #bd93f9\n}\n\n.ace-dracula .ace_support.ace_function {\n color: #8be9fd\n}\n\n.ace-dracula .ace_support.ace_constant {\n color: #6be5fd\n}\n\n.ace-dracula .ace_support.ace_class {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_support.ace_type {\n font-style: italic;\n color: #66d9ef\n}\n\n.ace-dracula .ace_storage {\n color: #ff79c6\n}\n\n.ace-dracula .ace_storage.ace_type {\n font-style: italic;\n color: #8be9fd\n}\n\n.ace-dracula .ace_invalid {\n color: #F8F8F0;\n background-color: #ff79c6\n}\n\n.ace-dracula .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #bd93f9\n}\n\n.ace-dracula .ace_string {\n color: #f1fa8c\n}\n\n.ace-dracula .ace_comment {\n color: #6272a4\n}\n\n.ace-dracula .ace_variable {\n color: #50fa7b\n}\n\n.ace-dracula .ace_variable.ace_parameter {\n font-style: italic;\n color: #ffb86c\n}\n\n.ace-dracula .ace_entity.ace_other.ace_attribute-name {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_function {\n color: #50fa7b\n}\n\n.ace-dracula .ace_entity.ace_name.ace_tag {\n color: #ff79c6\n}\n.ace-dracula .ace_invisible {\n color: #626680;\n}\n\n.ace-dracula .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-dracula .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACAQMAAACjTyRkAAAABlBMVEUAAADCwsK76u2xAAAAAXRSTlMAQObYZgAAAAxJREFUCNdjYGBoAAAAhACBGFbxzQAAAABJRU5ErkJggg==") right repeat-y;\n}\n'}),ace.define("ace/theme/dracula",["require","exports","module","ace/theme/dracula-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-dracula",t.cssText=e("./dracula-css"),t.$selectionColorConflict=!0;var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/dracula"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/dreamweaver-css",["require","exports","module"],function(e,t,n){n.exports='.ace-dreamweaver .ace_gutter {\n background: #e8e8e8;\n color: #333;\n}\n\n.ace-dreamweaver .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-dreamweaver {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-dreamweaver .ace_fold {\n background-color: #757AD8;\n}\n\n.ace-dreamweaver .ace_cursor {\n color: black;\n}\n \n.ace-dreamweaver .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-dreamweaver .ace_storage,\n.ace-dreamweaver .ace_keyword {\n color: blue;\n}\n\n.ace-dreamweaver .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-dreamweaver .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-dreamweaver .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-dreamweaver .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-dreamweaver .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-dreamweaver .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-dreamweaver .ace_support.ace_type,\n.ace-dreamweaver .ace_support.ace_class {\n color: #009;\n}\n\n.ace-dreamweaver .ace_support.ace_php_tag {\n color: #f00;\n}\n\n.ace-dreamweaver .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-dreamweaver .ace_string {\n color: #00F;\n}\n\n.ace-dreamweaver .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-dreamweaver .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-dreamweaver .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-dreamweaver .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-dreamweaver .ace_variable {\n color: #06F\n}\n\n.ace-dreamweaver .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-dreamweaver .ace_entity.ace_name.ace_function {\n color: #00F;\n}\n\n\n.ace-dreamweaver .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-dreamweaver .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-dreamweaver .ace_gutter-active-line {\n background-color : #DCDCDC;\n}\n\n.ace-dreamweaver .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-dreamweaver .ace_meta.ace_tag {\n color:#009;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_anchor {\n color:#060;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_form {\n color:#F90;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_image {\n color:#909;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_script {\n color:#900;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_style {\n color:#909;\n}\n\n.ace-dreamweaver .ace_meta.ace_tag.ace_table {\n color:#099;\n}\n\n.ace-dreamweaver .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-dreamweaver .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-dreamweaver .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n} \n'}),ace.define("ace/theme/dreamweaver",["require","exports","module","ace/theme/dreamweaver-css","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-dreamweaver",t.cssText=e("./dreamweaver-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/dreamweaver"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/eclipse-css",["require","exports","module"],function(e,t,n){n.exports='.ace-eclipse .ace_gutter {\n background: #ebebeb;\n border-right: 1px solid rgb(159, 159, 159);\n color: rgb(136, 136, 136);\n}\n\n.ace-eclipse .ace_print-margin {\n width: 1px;\n background: #ebebeb;\n}\n\n.ace-eclipse {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-eclipse .ace_fold {\n background-color: rgb(60, 76, 114);\n}\n\n.ace-eclipse .ace_cursor {\n color: black;\n}\n\n.ace-eclipse .ace_storage,\n.ace-eclipse .ace_keyword,\n.ace-eclipse .ace_variable {\n color: rgb(127, 0, 85);\n}\n\n.ace-eclipse .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-eclipse .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-eclipse .ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-eclipse .ace_string {\n color: rgb(42, 0, 255);\n}\n\n.ace-eclipse .ace_comment {\n color: rgb(113, 150, 130);\n}\n\n.ace-eclipse .ace_comment.ace_doc {\n color: rgb(63, 95, 191);\n}\n\n.ace-eclipse .ace_comment.ace_doc.ace_tag {\n color: rgb(127, 159, 191);\n}\n\n.ace-eclipse .ace_constant.ace_numeric {\n color: darkblue;\n}\n\n.ace-eclipse .ace_tag {\n color: rgb(25, 118, 116);\n}\n\n.ace-eclipse .ace_type {\n color: rgb(127, 0, 127);\n}\n\n.ace-eclipse .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-eclipse .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-eclipse .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-eclipse .ace_meta.ace_tag {\n color:rgb(25, 118, 116);\n}\n\n.ace-eclipse .ace_invisible {\n color: #ddd;\n}\n\n.ace-eclipse .ace_entity.ace_other.ace_attribute-name {\n color:rgb(127, 0, 127);\n}\n.ace-eclipse .ace_marker-layer .ace_step {\n background: rgb(255, 255, 0);\n}\n\n.ace-eclipse .ace_active-line {\n background: rgb(232, 242, 254);\n}\n\n.ace-eclipse .ace_gutter-active-line {\n background-color : #DADADA;\n}\n\n.ace-eclipse .ace_marker-layer .ace_selected-word {\n border: 1px solid rgb(181, 213, 255);\n}\n\n.ace-eclipse .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-eclipse .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n} \n'}),ace.define("ace/theme/eclipse",["require","exports","module","ace/theme/eclipse-css","ace/lib/dom"],function(e,t,n){"use strict";t.isDark=!1,t.cssText=e("./eclipse-css"),t.cssClass="ace-eclipse";var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/eclipse"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/github-css",["require","exports","module"],function(e,t,n){n.exports='/* CSS style content from github\'s default pygments highlighter template.\n Cursor and selection styles from textmate.css. */\n.ace-github .ace_gutter {\n background: #e8e8e8;\n color: #AAA;\n}\n\n.ace-github {\n background: #fff;\n color: #000;\n}\n\n.ace-github .ace_keyword {\n font-weight: bold;\n}\n\n.ace-github .ace_string {\n color: #D14;\n}\n\n.ace-github .ace_variable.ace_class {\n color: teal;\n}\n\n.ace-github .ace_constant.ace_numeric {\n color: #099;\n}\n\n.ace-github .ace_constant.ace_buildin {\n color: #0086B3;\n}\n\n.ace-github .ace_support.ace_function {\n color: #0086B3;\n}\n\n.ace-github .ace_comment {\n color: #998;\n font-style: italic;\n}\n\n.ace-github .ace_variable.ace_language {\n color: #0086B3;\n}\n\n.ace-github .ace_paren {\n font-weight: bold;\n}\n\n.ace-github .ace_boolean {\n font-weight: bold;\n}\n\n.ace-github .ace_string.ace_regexp {\n color: #009926;\n font-weight: normal;\n}\n\n.ace-github .ace_variable.ace_instance {\n color: teal;\n}\n\n.ace-github .ace_constant.ace_language {\n font-weight: bold;\n}\n\n.ace-github .ace_cursor {\n color: black;\n}\n\n.ace-github.ace_focus .ace_marker-layer .ace_active-line {\n background: rgb(255, 255, 204);\n}\n.ace-github .ace_marker-layer .ace_active-line {\n background: rgb(245, 245, 245);\n}\n\n.ace-github .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-github.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n/* bold keywords cause cursor issues for some fonts */\n/* this disables bold style for editor and keeps for static highlighter */\n.ace-github.ace_nobold .ace_line > span {\n font-weight: normal !important;\n}\n\n.ace-github .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-github .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-github .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-github .ace_gutter-active-line {\n background-color : rgba(0, 0, 0, 0.07);\n}\n\n.ace-github .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-github .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-github .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-github .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-github .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),ace.define("ace/theme/github",["require","exports","module","ace/theme/github-css","ace/lib/dom"],function(e,t,n){t.isDark=!1,t.cssClass="ace-github",t.cssText=e("./github-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/github"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/github_dark-css",["require","exports","module"],function(e,t,n){n.exports=".ace-github-dark .ace_gutter {\n background: #24292e;\n color: #7388b5\n}\n\n.ace-github-dark .ace_print-margin {\n width: 1px;\n background: #00204b\n}\n\n.ace-github-dark {\n background-color: #24292e;\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_constant.ace_other,\n.ace-github-dark .ace_cursor {\n color: #FFFFFF\n}\n\n.ace-github-dark .ace_marker-layer .ace_selection {\n background: #003F8E\n}\n\n.ace-github-dark.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #24292e;\n}\n\n.ace-github-dark .ace_marker-layer .ace_step {\n background: rgb(127, 111, 19)\n}\n\n.ace-github-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404F7D\n}\n\n.ace-github-dark .ace_marker-layer .ace_active-line {\n background: #00346E\n}\n\n.ace-github-dark .ace_gutter-active-line {\n background-color: #24292e\n}\n\n.ace-github-dark .ace_marker-layer .ace_selected-word {\n border: 1px solid #003F8E\n}\n\n.ace-github-dark .ace_invisible {\n color: #404F7D\n}\n\n.ace-github-dark .ace_keyword,\n.ace-github-dark .ace_meta,\n.ace-github-dark .ace_storage,\n.ace-github-dark .ace_storage.ace_type,\n.ace-github-dark .ace_support.ace_type {\n color: #ff7b72\n}\n\n.ace-github-dark .ace_keyword.ace_operator {\n color: #79c0ff\n}\n\n.ace-github-dark .ace_constant.ace_character,\n.ace-github-dark .ace_constant.ace_language,\n.ace-github-dark .ace_constant.ace_numeric,\n.ace-github-dark .ace_keyword.ace_other.ace_unit,\n.ace-github-dark .ace_support.ace_constant,\n.ace-github-dark .ace_variable.ace_parameter {\n color: #FFC58F\n}\n\n.ace-github-dark .ace_invalid {\n color: #FFFFFF;\n background-color: #F99DA5\n}\n\n.ace-github-dark .ace_invalid.ace_deprecated {\n color: #FFFFFF;\n background-color: #ff7b72\n}\n\n.ace-github-dark .ace_fold {\n background-color: #BBDAFF;\n border-color: #FFFFFF\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_function,\n.ace-github-dark .ace_support.ace_function,\n.ace-github-dark .ace_variable {\n color: #BBDAFF\n}\n\n.ace-github-dark .ace_support.ace_class,\n.ace-github-dark .ace_support.ace_type {\n color: #FFEEAD\n}\n\n.ace-github-dark .ace_heading,\n.ace-github-dark .ace_markup.ace_heading,\n.ace-github-dark .ace_string {\n color: #9fcef6\n}\n\n.ace-github-dark .ace_entity.ace_name.ace_tag,\n.ace-github-dark .ace_entity.ace_other.ace_attribute-name,\n.ace-github-dark .ace_meta.ace_tag,\n.ace-github-dark .ace_string.ace_regexp,\n.ace-github-dark .ace_variable {\n color: #FF9DA4\n}\n\n.ace-github-dark .ace_comment {\n color: #7285B7\n}\n\n.ace-github-dark .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYJDzqfwPAANXAeNsiA+ZAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-github-dark .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n\n.ace-github-dark .ace_constant.ace_buildin {\n color: #0086B3;\n}\n\n.ace-github-dark .ace_variable.ace_language {\n color: #ffffff;\n}\n "}),ace.define("ace/theme/github_dark",["require","exports","module","ace/theme/github_dark-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-github-dark",t.cssText=e("./github_dark-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/github_dark"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/gob-css",["require","exports","module"],function(e,t,n){n.exports=".ace-gob .ace_gutter {\n background: #0B1818;\n color: #03EE03\n}\n\n.ace-gob .ace_print-margin {\n width: 1px;\n background: #131313\n}\n\n.ace-gob {\n background-color: #0B0B0B;\n color: #00FF00\n}\n\n.ace-gob .ace_cursor {\n border-color: rgba(16, 248, 255, 0.90);\n background-color: rgba(16, 240, 248, 0.70);\n opacity: 0.4;\n}\n\n.ace-gob .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-gob.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-gob .ace_marker-layer .ace_step {\n background: rgb(16, 128, 0)\n}\n\n.ace-gob .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(64, 255, 255, 0.25)\n}\n\n.ace-gob .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.04)\n}\n\n.ace-gob .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.04)\n}\n\n.ace-gob .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(192, 240, 255, 0.20)\n}\n\n.ace-gob .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-gob .ace_keyword,\n.ace-gob .ace_meta {\n color: #10D8E8\n}\n\n.ace-gob .ace_constant,\n.ace-gob .ace_constant.ace_character,\n.ace-gob .ace_constant.ace_character.ace_escape,\n.ace-gob .ace_constant.ace_other,\n.ace-gob .ace_heading,\n.ace-gob .ace_markup.ace_heading,\n.ace-gob .ace_support.ace_constant {\n color: #10F0A0\n}\n\n.ace-gob .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-gob .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #20F8C0\n}\n\n.ace-gob .ace_support {\n color: #20E8B0\n}\n\n.ace-gob .ace_fold {\n background-color: #50B8B8;\n border-color: #70F8F8\n}\n\n.ace-gob .ace_support.ace_function {\n color: #00F800\n}\n\n.ace-gob .ace_list,\n.ace-gob .ace_markup.ace_list,\n.ace-gob .ace_storage {\n color: #10FF98\n}\n\n.ace-gob .ace_entity.ace_name.ace_function,\n.ace-gob .ace_meta.ace_tag,\n.ace-gob .ace_variable {\n color: #00F868\n}\n\n.ace-gob .ace_string {\n color: #10F060\n}\n\n.ace-gob .ace_string.ace_regexp {\n color: #20F090;\n}\n\n.ace-gob .ace_comment {\n font-style: italic;\n color: #00E060;\n}\n\n.ace-gob .ace_variable {\n color: #00F888;\n}\n\n.ace-gob .ace_xml-pe {\n color: #488858;\n}\n\n.ace-gob .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-gob .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/gob",["require","exports","module","ace/theme/gob-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-gob",t.cssText=e("./gob-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/gob"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/gruvbox-css",["require","exports","module"],function(e,t,n){n.exports='.ace-gruvbox .ace_gutter-active-line {\n background-color: #3C3836;\n}\n\n.ace-gruvbox {\n color: #EBDAB4;\n background-color: #1D2021;\n}\n\n.ace-gruvbox .ace_invisible {\n color: #504945;\n}\n\n.ace-gruvbox .ace_marker-layer .ace_selection {\n background: rgba(179, 101, 57, 0.75)\n}\n\n.ace-gruvbox.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #002240;\n}\n\n.ace-gruvbox .ace_keyword {\n color: #8ec07c;\n}\n\n.ace-gruvbox .ace_comment {\n font-style: italic;\n color: #928375;\n}\n\n.ace-gruvbox .ace-statement {\n color: red;\n}\n\n.ace-gruvbox .ace_variable {\n color: #84A598;\n}\n\n.ace-gruvbox .ace_variable.ace_language {\n color: #D2879B;\n}\n\n.ace-gruvbox .ace_constant {\n color: #C2859A;\n}\n\n.ace-gruvbox .ace_constant.ace_language {\n color: #C2859A;\n}\n\n.ace-gruvbox .ace_constant.ace_numeric {\n color: #C2859A;\n}\n\n.ace-gruvbox .ace_string {\n color: #B8BA37;\n}\n\n.ace-gruvbox .ace_support {\n color: #F9BC41;\n}\n\n.ace-gruvbox .ace_support.ace_function {\n color: #F84B3C;\n}\n\n.ace-gruvbox .ace_storage {\n color: #8FBF7F;\n}\n\n.ace-gruvbox .ace_keyword.ace_operator {\n color: #EBDAB4;\n}\n\n.ace-gruvbox .ace_punctuation.ace_operator {\n color: yellow;\n}\n\n.ace-gruvbox .ace_marker-layer .ace_active-line {\n background: #3C3836;\n}\n\n.ace-gruvbox .ace_marker-layer .ace_selected-word {\n border-radius: 4px;\n border: 8px solid #3f475d;\n}\n\n.ace-gruvbox .ace_print-margin {\n width: 5px;\n background: #3C3836;\n}\n\n.ace-gruvbox .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNQUFD4z6Crq/sfAAuYAuYl+7lfAAAAAElFTkSuQmCC") right repeat-y;\n}\n\n.ace-gruvbox .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n'}),ace.define("ace/theme/gruvbox",["require","exports","module","ace/theme/gruvbox-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-gruvbox",t.cssText=e("./gruvbox-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass,!1)}); (function() {
|
|
||||||
ace.require(["ace/theme/gruvbox"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
ace.define("ace/theme/gruvbox_dark_hard-css",["require","exports","module"],function(e,t,n){n.exports=".ace-gruvbox-dark-hard .ace_gutter {\n background: #1d2021;\n color: rgb(132,126,106)\n}\n\n.ace-gruvbox-dark-hard .ace_print-margin {\n width: 1px;\n background: #e8e8e8\n}\n\n.ace-gruvbox-dark-hard {\n background-color: #1d2021;\n color: rgba(235, 219, 178, 0.50)\n}\n\n.ace-gruvbox-dark-hard .ace_cursor {\n color: #a89984\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_selection {\n background: #3c3836\n}\n\n.ace-gruvbox-dark-hard.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #1d2021;\n border-radius: 2px\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174)\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(235, 219, 178, 0.15)\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_active-line {\n background: #3c3836\n}\n\n.ace-gruvbox-dark-hard .ace_gutter-active-line {\n background-color: #3c3836\n}\n\n.ace-gruvbox-dark-hard .ace_marker-layer .ace_selected-word {\n border: 1px solid #3c3836\n}\n\n.ace-gruvbox-dark-hard .ace_fold {\n background-color: #b8bb26;\n border-color: rgba(235, 219, 178, 0.50)\n}\n\n.ace-gruvbox-dark-hard .ace_keyword {\n color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_keyword.ace_operator {\n color: #8ec07c\n}\n\n.ace-gruvbox-dark-hard .ace_keyword.ace_other.ace_unit {\n color: #b16286\n}\n\n.ace-gruvbox-dark-hard .ace_constant {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_constant.ace_numeric {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_constant.ace_character.ace_escape {\n color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_constant.ace_other {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_function {\n color: #8ec07c\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_constant {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_constant.ace_property-value {\n color: #f9f5d7\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_class {\n color: #fabd2f\n}\n\n.ace-gruvbox-dark-hard .ace_support.ace_type {\n color: #fabd2f\n}\n\n.ace-gruvbox-dark-hard .ace_storage {\n color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_invalid {\n color: #f9f5d7;\n background-color: #fb4934\n}\n\n.ace-gruvbox-dark-hard .ace_string {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_string.ace_regexp {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_comment {\n font-style: italic;\n color: #928374\n}\n\n.ace-gruvbox-dark-hard .ace_variable {\n color: #83a598\n}\n\n.ace-gruvbox-dark-hard .ace_variable.ace_language {\n color: #d3869b\n}\n\n.ace-gruvbox-dark-hard .ace_variable.ace_parameter {\n color: #f9f5d7\n}\n\n.ace-gruvbox-dark-hard .ace_meta.ace_tag {\n color: #f9f5d7\n}\n\n.ace-gruvbox-dark-hard .ace_entity.ace_other.ace_attribute-name {\n color: #fabd2f\n}\n\n.ace-gruvbox-dark-hard .ace_entity.ace_name.ace_function {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_entity.ace_name.ace_tag {\n color: #83a598\n}\n\n.ace-gruvbox-dark-hard .ace_markup.ace_heading {\n color: #b8bb26\n}\n\n.ace-gruvbox-dark-hard .ace_markup.ace_list {\n color: #83a598\n}\n\n.ace-gruvbox-dark-hard .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"}),ace.define("ace/theme/gruvbox_dark_hard",["require","exports","module","ace/theme/gruvbox_dark_hard-css","ace/lib/dom"],function(e,t,n){t.isDark=!0,t.cssClass="ace-gruvbox-dark-hard",t.cssText=e("./gruvbox_dark_hard-css");var r=e("../lib/dom");r.importCssString(t.cssText,t.cssClass)}); (function() {
|
|
||||||
ace.require(["ace/theme/gruvbox_dark_hard"], function(m) {
|
|
||||||
if (typeof module == "object" && typeof exports == "object" && module) {
|
|
||||||
module.exports = m;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})();
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user