{#each $nodeGraph.nodes.flatMap((node, nodeIndex) => (node.isLayer ? [{ node, nodeIndex }] : [])) as { node, nodeIndex } (nodeIndex)}
{@const clipPathId = String(Math.random()).substring(2)}
{@const stackDataInput = node.exposedInputs[0]}
{@const extraWidthToReachGridMultiple = 8}
{@const labelWidthGridCells = Math.ceil(((layerNameLabelWidths?.[String(node.id)] || 0) - extraWidthToReachGridMultiple) / 24)}
{#if node.errors}
{node.errors}
{node.errors}
{/if}
{#if $nodeGraph.thumbnails.has(node.id)}
{@html $nodeGraph.thumbnails.get(node.id)}
{/if}
{#if node.primaryOutput}
{/if}
{node.alias || "Layer"}
(toggleLayerVisibility(node.id), e?.stopPropagation())}
size={24}
icon={node.visible ? "EyeVisible" : "EyeHidden"}
tooltip={node.visible ? "Visible" : "Hidden"}
/>
{/each}
{#each $nodeGraph.nodes.flatMap((node, nodeIndex) => (node.isLayer ? [] : [{ node, nodeIndex }])) as { node, nodeIndex } (nodeIndex)}
{@const exposedInputsOutputs = [...node.exposedInputs, ...node.exposedOutputs]}
{@const clipPathId = String(Math.random()).substring(2)}
{#if node.errors}
{node.errors}
{node.errors}
{/if}
{node.alias || node.name}
{#if exposedInputsOutputs.length > 0}
{#each exposedInputsOutputs as parameter, index}
{parameter.name}
{/each}
{/if}
{#if node.primaryOutput}
{/if}
{#each node.exposedOutputs as parameter, outputIndex}
{/each}
{/each}