diff --git a/fastapi_forge/api/main.py b/fastapi_forge/api/main.py index 86ef539..dfa5d8c 100644 --- a/fastapi_forge/api/main.py +++ b/fastapi_forge/api/main.py @@ -5,6 +5,9 @@ from fastapi import FastAPI from fastapi.staticfiles import StaticFiles +from fastapi_forge.core.build import build_fastapi_project +from fastapi_forge.schemas import ProjectSpec + app = FastAPI() @@ -22,5 +25,13 @@ def start_forge_api() -> None: uvicorn.run(app, host="localhost", port=8000) +@app.post("/generate") +async def generate_project(project_spec: ProjectSpec) -> None: + try: + await build_fastapi_project(project_spec, dry_run=False) + except Exception as e: + print(e) + + if __name__ == "__main__": start_forge_api() diff --git a/fastapi_forge/static/assets/index-BN-dc6bv.css b/fastapi_forge/static/assets/index-BN-dc6bv.css new file mode 100644 index 0000000..9462b39 --- /dev/null +++ b/fastapi_forge/static/assets/index-BN-dc6bv.css @@ -0,0 +1 @@ +body{font-family:DM Sans,sans-serif;font-optical-sizing:auto}:root{--color-primary: #5294fd;--color-secondary: #dcebfe;--color-success: #7fbc8c;--color-danger: #ff6b6b;--color-background: #f4f4f0}.StepWizard[data-v-9f8c12c9]{display:flex;flex-direction:column;align-items:center;height:100%}.step-indicators[data-v-9f8c12c9]{display:flex;justify-content:center;margin-bottom:1rem}.step[data-v-9f8c12c9]{caret-color:transparent;width:50px;height:50px;border-radius:50%;background-color:#d3d3d3;display:flex;align-items:center;justify-content:center;margin:0 5px;cursor:pointer;border:2px solid black;box-shadow:2px 2px #000;transition:transform .1s ease-out,box-shadow .1s}.step[data-v-9f8c12c9]:hover{background-color:#a9a9a9;box-shadow:0 0 #000;transform:translate(2px,2px)}.step.active[data-v-9f8c12c9]{background-color:var(--color-primary)}.step.completed[data-v-9f8c12c9]{background-color:var(--color-success)}.step-content[data-v-9f8c12c9]{margin-bottom:3rem}.step-actions[data-v-9f8c12c9]{display:grid;grid-template-rows:1;grid-template-columns:2;justify-content:space-between;width:10%;position:absolute;bottom:8rem}.prev-btn[data-v-9f8c12c9]{grid-column:1}.next-btn[data-v-9f8c12c9]{grid-column:2}.next-btn[data-v-9f8c12c9],.prev-btn[data-v-9f8c12c9],.finish-btn[data-v-9f8c12c9]{caret-color:transparent;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-background);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s;font-weight:700}.next-btn[data-v-9f8c12c9]:hover,.prev-btn[data-v-9f8c12c9]:hover,.finish-btn[data-v-9f8c12c9]:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer}.project-name[data-v-972cdc17]{width:100%;padding:.5rem;border:2px solid black;border-radius:4px;box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.project-name[data-v-972cdc17]:focus,.project-name.confirmed[data-v-972cdc17]{outline:none;transform:translate(2px,2px);box-shadow:0 0 #000}.project-name.confirmed[data-v-972cdc17]{cursor:not-allowed}.input-group[data-v-972cdc17]{display:flex;flex-direction:column;gap:.1rem;margin-bottom:1rem;width:100%}.project-name-label[data-v-972cdc17]{font-weight:700;margin-bottom:.25rem}.input-horizontal[data-v-972cdc17]{display:flex;align-items:center;gap:.5rem}.confirm-btn[data-v-972cdc17]{caret-color:transparent;border:2px solid black;border-radius:4px;background-color:var(--color-background);padding:.25rem;box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out;height:2.125rem;font-weight:700}.confirm-btn[data-v-972cdc17]:hover,.confirm-btn.confirmed[data-v-972cdc17]{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer;transition:.1s;background-color:var(--color-success)}.confirm-btn.confirmed[data-v-972cdc17]{transition:.1s;background-color:var(--color-success)}.confirm-btn.confirmed[data-v-972cdc17]:hover{background-color:var(--color-background);transform:translate(0);box-shadow:3px 3px #000}.label-group[data-v-972cdc17]{display:flex;justify-content:space-between;align-items:center}.input-error[data-v-972cdc17]{border-color:#f44;background-color:#fee}.error-message[data-v-972cdc17]{color:#ff4910;font-size:.8rem;margin-top:.25rem}.confirm-btn[data-v-972cdc17]:disabled{opacity:.6;cursor:not-allowed;background-color:var(--color-background)}.container[data-v-972cdc17],.container[data-v-9256ee53]{display:flex;flex-direction:column;align-items:center;width:100%;max-width:360px;min-width:360px}.db-grid-container[data-v-9256ee53]{width:100%;display:flex;justify-content:center}.db-grid[data-v-9256ee53]{display:grid;grid-template-columns:repeat(3,100px);gap:3rem;justify-items:center}.db-item[data-v-9256ee53]{caret-color:transparent;border:2px solid black;font-weight:700;border-radius:4px;box-shadow:3px 3px #000;padding:1rem;text-align:center;width:100px;height:100px;display:flex;align-items:center;justify-content:center;background-color:var(--color-background);transition:all .1s ease-in-out}.db-item.enabled[data-v-9256ee53]:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer;background-color:var(--color-success)}.db-item.enabled.confirmed[data-v-9256ee53]{transform:translate(2px,2px);box-shadow:0 0 #000;background-color:var(--color-success)}.db-item.enabled.confirmed[data-v-9256ee53]:hover{background-color:var(--color-background);transform:translate(0);box-shadow:3px 3px #000}.db-item.disabled[data-v-9256ee53]{opacity:.6;background-color:#e0e0e0;cursor:not-allowed;box-shadow:none}.db-item.disabled[data-v-9256ee53]:hover{transform:none;box-shadow:none}.custom-node[data-v-b7467be7]{border:2px solid black;border-radius:6px;width:250px;overflow:hidden;background-color:#fff}.custom-node-header[data-v-b7467be7]{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid black;width:100%;height:32px}.custom-node-title[data-v-b7467be7]{font-weight:700;background-color:var(--color-primary);width:100%;height:100%;display:flex;align-items:center;padding:0 8px}.custom-node-actions[data-v-b7467be7]{cursor:pointer;width:40px;height:100%;display:flex;align-items:center;justify-content:center;border-left:2px solid black;background-color:var(--color-primary)}.custom-node-body[data-v-b7467be7]{display:flex;flex-direction:column;cursor:pointer}.custom-node-field-row[data-v-b7467be7]{display:flex;justify-content:space-between;align-items:center;height:28px;padding:0 8px;border-bottom:1px solid #e0e0e0}.custom-node-field-row[data-v-b7467be7]:hover{background-color:#f8f8f8}.custom-node-field-row[data-v-b7467be7]:last-child{border-bottom:none}.custom-node-field-name[data-v-b7467be7]{font-weight:600;color:#343a40;white-space:nowrap;overflow:hidden}.custom-node-field-type[data-v-b7467be7]{font-style:italic;color:#6c757d;white-space:nowrap}.dropdown-list[data-v-b7467be7]{margin-left:160px;caret-color:transparent;border:2px solid black;position:absolute;width:100%;min-width:120px;max-width:140px;border-radius:5px;background:#fff;z-index:100;padding:4px;box-sizing:border-box}.dropdown-item[data-v-b7467be7]{height:35px;width:100%;display:flex;align-items:center;padding:0 5px;box-sizing:border-box;border:2px solid transparent;border-radius:5px}.dropdown-item[data-v-b7467be7]:hover{border:2px solid black;cursor:pointer}.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0;direction:ltr}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.selection{cursor:pointer}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-textbg{fill:#fff}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.vue-flow__node.draggable{cursor:grab;pointer-events:all}.vue-flow__node.draggable.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{left:50%;bottom:0;transform:translate(-50%,50%)}.vue-flow__handle-top{left:50%;top:0;transform:translate(-50%,-50%)}.vue-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.vue-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}.field-modal-container[data-v-0d20b65f]{display:flex;flex-direction:column;gap:1rem;padding:1rem}.input-container[data-v-0d20b65f]{display:flex;flex-direction:column;gap:1rem}.input-group[data-v-0d20b65f]{display:flex;flex-direction:column;gap:.15rem}.field-label[data-v-0d20b65f]{font-weight:700;margin-bottom:5px}.field-input[data-v-0d20b65f],.field-select[data-v-0d20b65f]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.checkbox-group[data-v-0d20b65f]{display:flex;flex-direction:column;gap:.5rem;font-weight:700}.action-group[data-v-0d20b65f]{gap:.5rem;margin-top:2rem;display:flex;flex-direction:column}.save-field-btn[data-v-0d20b65f]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-field-btn[data-v-0d20b65f]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.field-modal-container[data-v-4e80b4aa]{display:flex;flex-direction:column;gap:1rem;padding:1rem}.input-container[data-v-4e80b4aa]{display:flex;flex-direction:column;gap:1rem}.input-group[data-v-4e80b4aa]{display:flex;flex-direction:column;gap:.15rem}.field-label[data-v-4e80b4aa]{font-weight:700;margin-bottom:5px}.field-input[data-v-4e80b4aa],.field-select[data-v-4e80b4aa]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.checkbox-group[data-v-4e80b4aa]{display:flex;flex-direction:column;gap:.5rem;font-weight:700}.action-group[data-v-4e80b4aa]{gap:.5rem;margin-top:2rem;display:flex;flex-direction:column}.delete-field-btn[data-v-4e80b4aa]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-danger);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.delete-field-btn[data-v-4e80b4aa]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.save-field-btn[data-v-4e80b4aa]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-field-btn[data-v-4e80b4aa]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.relation-container[data-v-93b02a9f]{display:flex;flex-direction:column;gap:1rem;padding:1rem}.input-container[data-v-93b02a9f]{display:flex;flex-direction:column;gap:1rem}.input-group[data-v-93b02a9f]{display:flex;flex-direction:column;gap:.15rem}.relation-label[data-v-93b02a9f]{font-weight:700;margin-bottom:5px}.relation-input[data-v-93b02a9f],.relation-select[data-v-93b02a9f]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.checkbox-group[data-v-93b02a9f]{display:flex;flex-direction:column;gap:.5rem;font-weight:700}.action-group[data-v-93b02a9f]{gap:.5rem;margin-top:2rem;display:flex;flex-direction:column}.save-relation-btn[data-v-93b02a9f]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-relation-btn[data-v-93b02a9f]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.delete-relation-btn[data-v-93b02a9f]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-danger);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.delete-relation-btn[data-v-93b02a9f]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.relation-container[data-v-5198451c]{display:flex;flex-direction:column;gap:1rem;padding:1rem}.input-container[data-v-5198451c]{display:flex;flex-direction:column;gap:1rem}.input-group[data-v-5198451c]{display:flex;flex-direction:column;gap:.15rem}.relation-label[data-v-5198451c]{font-weight:700;margin-bottom:5px}.relation-input[data-v-5198451c],.relation-select[data-v-5198451c]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.checkbox-group[data-v-5198451c]{display:flex;flex-direction:column;gap:.5rem;font-weight:700}.action-group[data-v-5198451c]{gap:.5rem;margin-top:2rem;display:flex;flex-direction:column}.save-relation-btn[data-v-5198451c]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-relation-btn[data-v-5198451c]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.rename-node-modal[data-v-bdab72ab]{display:flex;flex-direction:column;padding:1rem}.input-container[data-v-bdab72ab],.input-group[data-v-bdab72ab]{display:flex;flex-direction:column}.field-label[data-v-bdab72ab]{font-weight:700;margin-bottom:5px}.field-input[data-v-bdab72ab]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.action-group[data-v-bdab72ab]{margin-top:.5rem;display:flex;flex-direction:column}.save-btn[data-v-bdab72ab]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-btn[data-v-bdab72ab]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.vue-flow-container[data-v-ff37004c]{height:100%;display:flex}.vue-flow-viewport[data-v-ff37004c]{position:relative;flex:1;display:flex}.viewport-wrapper[data-v-ff37004c]{width:100%;height:100%}.toggle-grid-button[data-v-ff37004c]{caret-color:transparent;position:absolute;top:10px;right:10px;background-color:var(--color-primary);color:#000;border:2px solid black;padding:3px 6px;font-weight:700;border-radius:8px;cursor:pointer;z-index:10;box-shadow:2px 2px #000}.toggle-grid-button[data-v-ff37004c]:hover{box-shadow:0 0 #000;transform:translate(2px,2px)}.create-wrapper[data-v-ff37004c]{position:absolute;top:10px;left:10px;display:flex;align-items:center}.create-circle[data-v-ff37004c]{width:40px;height:40px;background-color:var(--color-primary);border:2px solid black;color:#000;border-radius:50%;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:700;z-index:10;box-shadow:2px 2px #000}.create-circle[data-v-ff37004c]:hover{box-shadow:0 0 #000;transform:translate(2px,2px)}.floating-create-expanded[data-v-ff37004c]{display:flex;align-items:center;background:var(--color-primary);border:2px solid black;border-radius:50px;height:40px;padding:0 10px;gap:8px;z-index:1000;margin-top:2px;margin-left:2px}.collapse-btn[data-v-ff37004c]{display:grid;place-items:center;width:24px;height:24px;padding:0;cursor:pointer;background:none;border:none}.collapse-btn svg[data-v-ff37004c]{width:20px;height:20px}.create-model-input[data-v-ff37004c]{height:26px;border:2px solid black;border-radius:6px;padding:0 10px;width:160px}.create-model-btn[data-v-ff37004c]{height:30px;border:2px solid black;border-radius:6px;cursor:pointer;font-weight:700;background-color:var(--color-secondary);margin-right:5px}.create-model-btn[data-v-ff37004c]:hover{background-color:var(--color-success)}.field-modal-container[data-v-6d9e287c]{display:flex;flex-direction:column;gap:1rem;padding:1rem}.input-container[data-v-6d9e287c]{display:flex;flex-direction:column;gap:1rem}.input-group[data-v-6d9e287c]{display:flex;flex-direction:column;gap:.15rem}.field-label[data-v-6d9e287c]{font-weight:700;margin-bottom:5px}.field-input[data-v-6d9e287c]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.action-group[data-v-6d9e287c]{gap:.5rem;margin-top:2rem;display:flex;flex-direction:column}.save-field-btn[data-v-6d9e287c]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-field-btn[data-v-6d9e287c]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.field-modal-container[data-v-e87b1c0b]{display:flex;flex-direction:column;gap:1rem;padding:1rem}.input-container[data-v-e87b1c0b]{display:flex;flex-direction:column;gap:1rem}.input-group[data-v-e87b1c0b]{display:flex;flex-direction:column;gap:.15rem}.field-label[data-v-e87b1c0b]{font-weight:700;margin-bottom:5px}.field-input[data-v-e87b1c0b]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.action-group[data-v-e87b1c0b]{gap:.5rem;margin-top:2rem;display:flex;flex-direction:column}.save-field-btn[data-v-e87b1c0b]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-field-btn[data-v-e87b1c0b]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.layout-container[data-v-8f6eca62]{display:flex;height:100%;min-height:0}.enum-sidebar[data-v-8f6eca62]{width:250px;border-right:2px solid black;display:flex;flex-direction:column;background-color:#fff}.enum-list[data-v-8f6eca62]{flex:1;padding:5px;overflow-y:auto}.enum-item[data-v-8f6eca62]{padding:10px 15px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;border-radius:8px;border:2px solid transparent}.enum-item.active[data-v-8f6eca62],.enum-item[data-v-8f6eca62]:hover{background-color:var(--color-primary);font-weight:700;border-color:#000}.enum-name-wrapper[data-v-8f6eca62]{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:8px}.enum-name-edit-input[data-v-8f6eca62]{width:100%;background:none;border:2px solid black;border-radius:4px;padding:2px 5px;box-sizing:border-box;background-color:#fff}.enum-item-actions[data-v-8f6eca62]{display:flex;gap:0;align-items:center}.edit-enum-toggle-btn[data-v-8f6eca62]{background:none;border:none;font-size:16px;cursor:pointer;padding:0;display:flex;align-items:center;justify-content:center;width:24px;height:24px}.edit-enum-toggle-btn[data-v-8f6eca62]:hover{color:var(--color-success)}.delete-enum-btn[data-v-8f6eca62]{background:none;border:none;font-size:18px;cursor:pointer;padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.delete-enum-btn[data-v-8f6eca62]:hover{color:red}.main-header[data-v-8f6eca62]{height:50px;border-bottom:2px solid black;position:sticky;top:0;background-color:inherit;z-index:1;display:flex;justify-content:space-between;align-items:center;padding:0 15px}.enum-title[data-v-8f6eca62]{font-size:1.2rem;font-weight:700}.main-content[data-v-8f6eca62]{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}.main-table[data-v-8f6eca62]{width:100%;border-collapse:collapse;display:flex;flex-direction:column;flex:1;min-height:0}.main-table thead[data-v-8f6eca62]{display:table;width:100%;table-layout:fixed}.main-table tbody[data-v-8f6eca62]{display:block;overflow-y:auto;flex:1;width:100%}.main-table tr[data-v-8f6eca62]{display:table;width:100%;table-layout:fixed}.main-table th[data-v-8f6eca62],.main-table td[data-v-8f6eca62]{padding:16px;text-align:left;border-bottom:2px solid black}.action-column[data-v-8f6eca62]{width:20%;text-align:right!important}.action-content[data-v-8f6eca62]{margin-right:15px}.enum-actions[data-v-8f6eca62]{cursor:pointer;display:flex;justify-content:flex-end;position:relative}.dropdown-list[data-v-8f6eca62]{position:absolute;border:2px solid black;border-radius:5px;background:#fff;z-index:100;padding:4px;left:0;min-width:100px}.dropdown-item[data-v-8f6eca62]{height:35px;width:100%;display:flex;align-items:center;padding:0 5px;box-sizing:border-box;border:2px solid transparent;border-radius:5px}.dropdown-item[data-v-8f6eca62]:hover{border:2px solid black;cursor:pointer}.main-footer[data-v-8f6eca62]{height:50px;border-top:2px solid black;position:sticky;bottom:0;padding:0 15px;display:flex;align-items:center;justify-content:flex-end}.input-group[data-v-8f6eca62]{display:flex;flex-direction:column;gap:.1rem;padding:10px}.project-name-label[data-v-8f6eca62]{font-weight:700;margin-bottom:.25rem}.input-horizontal[data-v-8f6eca62]{display:flex;align-items:center;gap:.5rem}.confirm-btn[data-v-8f6eca62]{caret-color:transparent;border:2px solid black;border-radius:4px;background-color:var(--color-background);padding:.25rem;box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out;height:2.125rem;font-weight:700}.confirm-btn[data-v-8f6eca62]:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer;transition:.1s;background-color:var(--color-success)}.confirm-btn[data-v-8f6eca62]:disabled{opacity:.6;cursor:not-allowed;background-color:var(--color-background)}.project-name[data-v-8f6eca62]{width:100%;padding:.5rem;border:2px solid black;border-radius:4px;box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.project-name[data-v-8f6eca62]:focus{outline:none;transform:translate(2px,2px);box-shadow:0 0 #000}.label-group[data-v-8f6eca62]{display:flex;justify-content:space-between;align-items:center}.add-btn[data-v-8f6eca62]{caret-color:transparent;border:2px solid black;border-radius:4px;background-color:var(--color-success);padding:.5rem 1rem;box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out;font-weight:700}.add-btn[data-v-8f6eca62]:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer;transition:.1s}.container[data-v-b0fef25d]{width:100%;height:100vh;display:flex;justify-content:center;align-items:center;background-color:#fff}.editor-container[data-v-b0fef25d]{width:1000px;height:500px;background-color:#fff;border:2px solid black;display:flex;flex-direction:column;overflow:hidden}.editor-header[data-v-b0fef25d]{height:40px;display:flex;align-items:center;background-color:var(--color-primary);width:100%;border-bottom:2px solid black;box-sizing:border-box}.header-section[data-v-b0fef25d]{flex:1;text-align:center;cursor:pointer;font-weight:700;display:flex;align-items:center;justify-content:center;height:100%;-webkit-user-select:none;user-select:none}.header-divider[data-v-b0fef25d]{width:2px;height:100%;background-color:#000}.editor-content[data-v-b0fef25d]{position:relative;flex:1;width:100%;height:calc(100% - 40px)}.container[data-v-33ee6271]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.modal-backdrop[data-v-d61e0035]{position:fixed;inset:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000}.modal[data-v-d61e0035]{border:2px solid black;border-radius:6px;overflow:hidden;background-color:#fff;max-width:350px;width:100%;margin:0 1rem;display:flex;flex-direction:column;background-color:var(--color-secondary)}.modal-header[data-v-d61e0035]{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem}.modal-title[data-v-d61e0035]{font-weight:700;flex-grow:1;display:flex;align-items:center;font-size:1rem}.modal-actions[data-v-d61e0035]{cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.modal-body[data-v-d61e0035]{overflow:hidden;background-color:var(--color-secondary)}html,body{height:100%;margin:0}#app{display:flex;flex-direction:column;height:100%;background-color:var(--color-background)}.header{height:60px;position:sticky;flex-shrink:0;background-color:#fff;border-bottom:4px solid black;top:0;display:flex;align-items:center}.content{flex-grow:1;padding:1rem}.logo{display:flex;align-items:center;gap:.5rem;margin-left:1rem}.github-icon{width:20px;height:20px;border:2px solid black;border-radius:15%;padding:.25rem;box-shadow:2px 2px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.github-icon:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer}.github-icon:visited,.github-icon:active,.github-icon:focus{color:#000} diff --git a/fastapi_forge/static/assets/index-DWiWI9aR.js b/fastapi_forge/static/assets/index-DWiWI9aR.js new file mode 100644 index 0000000..2be7c3a --- /dev/null +++ b/fastapi_forge/static/assets/index-DWiWI9aR.js @@ -0,0 +1,46 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();/** +* @vue/shared v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Zs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const ke={},Pn=[],kt=()=>{},$c=()=>!1,Ni=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),qs=e=>e.startsWith("onUpdate:"),qe=Object.assign,Js=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Mc=Object.prototype.hasOwnProperty,$e=(e,t)=>Mc.call(e,t),de=Array.isArray,An=e=>Io(e)==="[object Map]",jn=e=>Io(e)==="[object Set]",Pr=e=>Io(e)==="[object Date]",ge=e=>typeof e=="function",Be=e=>typeof e=="string",_t=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",oa=e=>(Pe(e)||ge(e))&&ge(e.then)&&ge(e.catch),ia=Object.prototype.toString,Io=e=>ia.call(e),Ic=e=>Io(e).slice(8,-1),sa=e=>Io(e)==="[object Object]",Qs=e=>Be(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,oo=Zs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ci=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Tc=/-(\w)/g,ht=Ci(e=>e.replace(Tc,(t,n)=>n?n.toUpperCase():"")),kc=/\B([A-Z])/g,fn=Ci(e=>e.replace(kc,"-$1").toLowerCase()),$i=Ci(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ji=Ci(e=>e?`on${$i(e)}`:""),Kt=(e,t)=>!Object.is(e,t),Wo=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},ri=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Ar;const Mi=()=>Ar||(Ar=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function pt(e){if(de(e)){const t={};for(let n=0;n{if(n){const o=n.split(Ac);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function it(e){let t="";if(Be(e))t=e;else if(de(e))for(let n=0;nTo(n,t))}const la=e=>!!(e&&e.__v_isRef===!0),Oe=e=>Be(e)?e:e==null?"":de(e)||Pe(e)&&(e.toString===ia||!ge(e.toString))?la(e)?Oe(e.value):JSON.stringify(e,aa,2):String(e),aa=(e,t)=>la(t)?aa(e,t.value):An(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],s)=>(n[Qi(o,s)+" =>"]=i,n),{})}:jn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Qi(n))}:_t(t)?Qi(t):Pe(t)&&!de(t)&&!sa(t)?String(t):t,Qi=(e,t="")=>{var n;return _t(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Xe;class ua{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Xe,!t&&Xe&&(this.index=(Xe.scopes||(Xe.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(Xe=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(ro){let t=ro;for(ro=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;so;){let t=so;for(so=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function ha(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function pa(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),or(o),zc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function ws(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ga(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ga(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vo)||(e.globalVersion=vo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!ws(e))))return;e.flags|=2;const t=e.dep,n=Ae,o=mt;Ae=e,mt=!0;try{ha(e);const i=e.fn(e._value);(t.version===0||Kt(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ae=n,mt=o,pa(e),e.flags&=-3}}function or(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)or(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let mt=!0;const va=[];function Zt(){va.push(mt),mt=!1}function qt(){const e=va.pop();mt=e===void 0?!0:e}function Dr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let vo=0;class Fc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class ki{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ae||!mt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink=new Fc(Ae,this),Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,ma(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=o)}return n}trigger(t){this.version++,vo++,this.notify(t)}notify(t){tr();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{nr()}}}function ma(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)ma(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const li=new WeakMap,bn=Symbol(""),xs=Symbol(""),mo=Symbol("");function We(e,t,n){if(mt&&Ae){let o=li.get(e);o||li.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new ki),i.map=o,i.key=n),i.track()}}function Ht(e,t,n,o,i,s){const r=li.get(e);if(!r){vo++;return}const l=a=>{a&&a.trigger()};if(tr(),t==="clear")r.forEach(l);else{const a=de(e),u=a&&Qs(n);if(a&&n==="length"){const c=Number(o);r.forEach((d,v)=>{(v==="length"||v===mo||!_t(v)&&v>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get(mo)),t){case"add":a?u&&l(r.get("length")):(l(r.get(bn)),An(e)&&l(r.get(xs)));break;case"delete":a||(l(r.get(bn)),An(e)&&l(r.get(xs)));break;case"set":An(e)&&l(r.get(bn));break}}nr()}function Hc(e,t){const n=li.get(e);return n&&n.get(t)}function Mn(e){const t=Se(e);return t===e?t:(We(t,"iterate",mo),ft(e)?t:t.map(Ge))}function Pi(e){return We(e=Se(e),"iterate",mo),e}const Lc={__proto__:null,[Symbol.iterator](){return ts(this,Symbol.iterator,Ge)},concat(...e){return Mn(this).concat(...e.map(t=>de(t)?Mn(t):t))},entries(){return ts(this,"entries",e=>(e[1]=Ge(e[1]),e))},every(e,t){return Bt(this,"every",e,t,void 0,arguments)},filter(e,t){return Bt(this,"filter",e,t,n=>n.map(Ge),arguments)},find(e,t){return Bt(this,"find",e,t,Ge,arguments)},findIndex(e,t){return Bt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Bt(this,"findLast",e,t,Ge,arguments)},findLastIndex(e,t){return Bt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Bt(this,"forEach",e,t,void 0,arguments)},includes(...e){return ns(this,"includes",e)},indexOf(...e){return ns(this,"indexOf",e)},join(e){return Mn(this).join(e)},lastIndexOf(...e){return ns(this,"lastIndexOf",e)},map(e,t){return Bt(this,"map",e,t,void 0,arguments)},pop(){return Wn(this,"pop")},push(...e){return Wn(this,"push",e)},reduce(e,...t){return Or(this,"reduce",e,t)},reduceRight(e,...t){return Or(this,"reduceRight",e,t)},shift(){return Wn(this,"shift")},some(e,t){return Bt(this,"some",e,t,void 0,arguments)},splice(...e){return Wn(this,"splice",e)},toReversed(){return Mn(this).toReversed()},toSorted(e){return Mn(this).toSorted(e)},toSpliced(...e){return Mn(this).toSpliced(...e)},unshift(...e){return Wn(this,"unshift",e)},values(){return ts(this,"values",Ge)}};function ts(e,t,n){const o=Pi(e),i=o[t]();return o!==e&&!ft(e)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=n(s.value)),s}),i}const Uc=Array.prototype;function Bt(e,t,n,o,i,s){const r=Pi(e),l=r!==e&&!ft(e),a=r[t];if(a!==Uc[t]){const d=a.apply(e,s);return l?Ge(d):d}let u=n;r!==e&&(l?u=function(d,v){return n.call(this,Ge(d),v,e)}:n.length>2&&(u=function(d,v){return n.call(this,d,v,e)}));const c=a.call(r,u,o);return l&&i?i(c):c}function Or(e,t,n,o){const i=Pi(e);let s=n;return i!==e&&(ft(e)?n.length>3&&(s=function(r,l,a){return n.call(this,r,l,a,e)}):s=function(r,l,a){return n.call(this,r,Ge(l),a,e)}),i[t](s,...o)}function ns(e,t,n){const o=Se(e);We(o,"iterate",mo);const i=o[t](...n);return(i===-1||i===!1)&&lr(n[0])?(n[0]=Se(n[0]),o[t](...n)):i}function Wn(e,t,n=[]){Zt(),tr();const o=Se(e)[t].apply(e,n);return nr(),qt(),o}const Gc=Zs("__proto__,__v_isRef,__isVue"),ya=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(_t));function Yc(e){_t(e)||(e=String(e));const t=Se(this);return We(t,"has",e),t.hasOwnProperty(e)}class _a{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return s;if(n==="__v_raw")return o===(i?s?td:Ea:s?xa:wa).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=de(t);if(!i){let a;if(r&&(a=Lc[n]))return a;if(n==="hasOwnProperty")return Yc}const l=Reflect.get(t,n,De(t)?t:o);return(_t(n)?ya.has(n):Gc(n))||(i||We(t,"get",n),s)?l:De(l)?r&&Qs(n)?l:l.value:Pe(l)?i?sr(l):ko(l):l}}class ba extends _a{constructor(t=!1){super(!1,t)}set(t,n,o,i){let s=t[n];if(!this._isShallow){const a=un(s);if(!ft(o)&&!un(o)&&(s=Se(s),o=Se(o)),!de(t)&&De(s)&&!De(o))return a?!1:(s.value=o,!0)}const r=de(t)&&Qs(n)?Number(n)e,Ro=e=>Reflect.getPrototypeOf(e);function Zc(e,t,n){return function(...o){const i=this.__v_raw,s=Se(i),r=An(s),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=i[e](...o),c=n?Es:t?ai:Ge;return!t&&We(s,"iterate",a?xs:bn),{next(){const{value:d,done:v}=u.next();return v?{value:d,done:v}:{value:l?[c(d[0]),c(d[1])]:c(d),done:v}},[Symbol.iterator](){return this}}}}function Bo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function qc(e,t){const n={get(i){const s=this.__v_raw,r=Se(s),l=Se(i);e||(Kt(i,l)&&We(r,"get",i),We(r,"get",l));const{has:a}=Ro(r),u=t?Es:e?ai:Ge;if(a.call(r,i))return u(s.get(i));if(a.call(r,l))return u(s.get(l));s!==r&&s.get(i)},get size(){const i=this.__v_raw;return!e&&We(Se(i),"iterate",bn),Reflect.get(i,"size",i)},has(i){const s=this.__v_raw,r=Se(s),l=Se(i);return e||(Kt(i,l)&&We(r,"has",i),We(r,"has",l)),i===l?s.has(i):s.has(i)||s.has(l)},forEach(i,s){const r=this,l=r.__v_raw,a=Se(l),u=t?Es:e?ai:Ge;return!e&&We(a,"iterate",bn),l.forEach((c,d)=>i.call(s,u(c),u(d),r))}};return qe(n,e?{add:Bo("add"),set:Bo("set"),delete:Bo("delete"),clear:Bo("clear")}:{add(i){!t&&!ft(i)&&!un(i)&&(i=Se(i));const s=Se(this);return Ro(s).has.call(s,i)||(s.add(i),Ht(s,"add",i,i)),this},set(i,s){!t&&!ft(s)&&!un(s)&&(s=Se(s));const r=Se(this),{has:l,get:a}=Ro(r);let u=l.call(r,i);u||(i=Se(i),u=l.call(r,i));const c=a.call(r,i);return r.set(i,s),u?Kt(s,c)&&Ht(r,"set",i,s):Ht(r,"add",i,s),this},delete(i){const s=Se(this),{has:r,get:l}=Ro(s);let a=r.call(s,i);a||(i=Se(i),a=r.call(s,i)),l&&l.call(s,i);const u=s.delete(i);return a&&Ht(s,"delete",i,void 0),u},clear(){const i=Se(this),s=i.size!==0,r=i.clear();return s&&Ht(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Zc(i,e,t)}),n}function ir(e,t){const n=qc(e,t);return(o,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get($e(n,i)&&i in o?n:o,i,s)}const Jc={get:ir(!1,!1)},Qc={get:ir(!1,!0)},ed={get:ir(!0,!1)};const wa=new WeakMap,xa=new WeakMap,Ea=new WeakMap,td=new WeakMap;function nd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function od(e){return e.__v_skip||!Object.isExtensible(e)?0:nd(Ic(e))}function ko(e){return un(e)?e:rr(e,!1,jc,Jc,wa)}function id(e){return rr(e,!1,Wc,Qc,xa)}function sr(e){return rr(e,!0,Xc,ed,Ea)}function rr(e,t,n,o,i){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=od(e);if(s===0)return e;const r=i.get(e);if(r)return r;const l=new Proxy(e,s===2?o:n);return i.set(e,l),l}function jt(e){return un(e)?jt(e.__v_raw):!!(e&&e.__v_isReactive)}function un(e){return!!(e&&e.__v_isReadonly)}function ft(e){return!!(e&&e.__v_isShallow)}function lr(e){return e?!!e.__v_raw:!1}function Se(e){const t=e&&e.__v_raw;return t?Se(t):e}function Xt(e){return!$e(e,"__v_skip")&&Object.isExtensible(e)&&bs(e,"__v_skip",!0),e}const Ge=e=>Pe(e)?ko(e):e,ai=e=>Pe(e)?sr(e):e;function De(e){return e?e.__v_isRef===!0:!1}function J(e){return Sa(e,!1)}function yo(e){return Sa(e,!0)}function Sa(e,t){return De(e)?e:new sd(e,t)}class sd{constructor(t,n){this.dep=new ki,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:Se(t),this._value=n?t:Ge(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||ft(t)||un(t);t=o?t:Se(t),Kt(t,n)&&(this._rawValue=t,this._value=o?t:Ge(t),this.dep.trigger())}}function ne(e){return De(e)?e.value:e}function xe(e){return ge(e)?e():ne(e)}const rd={get:(e,t,n)=>t==="__v_raw"?e:ne(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return De(i)&&!De(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function Na(e){return jt(e)?e:new Proxy(e,rd)}class ld{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new ki,{get:o,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ad(e){return new ld(e)}function Ca(e){const t=de(e)?new Array(e.length):{};for(const n in e)t[n]=$a(e,n);return t}class ud{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Hc(Se(this._object),this._key)}}class cd{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Ve(e,t,n){return De(e)?e:ge(e)?new cd(e):Pe(e)&&arguments.length>1?$a(e,t,n):J(e)}function $a(e,t,n){const o=e[t];return De(o)?o:new ud(e,t,n)}class dd{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new ki(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Ae!==this)return fa(this,!0),!0}get value(){const t=this.dep.track();return ga(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function fd(e,t,n=!1){let o,i;return ge(e)?o=e:(o=e.get,i=e.set),new dd(o,i,n)}const zo={},ui=new WeakMap;let vn;function hd(e,t=!1,n=vn){if(n){let o=ui.get(n);o||ui.set(n,o=[]),o.push(e)}}function pd(e,t,n=ke){const{immediate:o,deep:i,once:s,scheduler:r,augmentJob:l,call:a}=n,u=_=>i?_:ft(_)||i===!1||i===0?Lt(_,1):Lt(_);let c,d,v,h,w=!1,E=!1;if(De(e)?(d=()=>e.value,w=ft(e)):jt(e)?(d=()=>u(e),w=!0):de(e)?(E=!0,w=e.some(_=>jt(_)||ft(_)),d=()=>e.map(_=>{if(De(_))return _.value;if(jt(_))return u(_);if(ge(_))return a?a(_,2):_()})):ge(e)?t?d=a?()=>a(e,2):e:d=()=>{if(v){Zt();try{v()}finally{qt()}}const _=vn;vn=c;try{return a?a(e,3,[h]):e(h)}finally{vn=_}}:d=kt,t&&i){const _=d,R=i===!0?1/0:i;d=()=>Lt(_(),R)}const N=Ti(),$=()=>{c.stop(),N&&N.active&&Js(N.effects,c)};if(s&&t){const _=t;t=(...R)=>{_(...R),$()}}let k=E?new Array(e.length).fill(zo):zo;const g=_=>{if(!(!(c.flags&1)||!c.dirty&&!_))if(t){const R=c.run();if(i||w||(E?R.some((G,K)=>Kt(G,k[K])):Kt(R,k))){v&&v();const G=vn;vn=c;try{const K=[R,k===zo?void 0:E&&k[0]===zo?[]:k,h];k=R,a?a(t,3,K):t(...K)}finally{vn=G}}}else c.run()};return l&&l(g),c=new ca(d),c.scheduler=r?()=>r(g,!1):g,h=_=>hd(_,!1,c),v=c.onStop=()=>{const _=ui.get(c);if(_){if(a)a(_,4);else for(const R of _)R();ui.delete(c)}},t?o?g(!0):k=c.run():r?r(g.bind(null,!0),!0):c.run(),$.pause=c.pause.bind(c),$.resume=c.resume.bind(c),$.stop=$,$}function Lt(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,De(e))Lt(e.value,t,n);else if(de(e))for(let o=0;o{Lt(o,t,n)});else if(sa(e)){for(const o in e)Lt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Lt(e[o],t,n)}return e}/** +* @vue/runtime-core v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Po(e,t,n,o){try{return o?e(...o):e()}catch(i){Ai(i,t,n)}}function Ot(e,t,n,o){if(ge(e)){const i=Po(e,t,n,o);return i&&oa(i)&&i.catch(s=>{Ai(s,t,n)}),i}if(de(e)){const i=[];for(let s=0;s>>1,i=nt[o],s=_o(i);s=_o(n)?nt.push(e):nt.splice(vd(t),0,e),e.flags|=1,Ia()}}function Ia(){ci||(ci=Ma.then(ka))}function md(e){de(e)?Dn.push(...e):sn&&e.id===-1?sn.splice(kn+1,0,e):e.flags&1||(Dn.push(e),e.flags|=1),Ia()}function Vr(e,t,n=Ct+1){for(;n_o(n)-_o(o));if(Dn.length=0,sn){sn.push(...t);return}for(sn=t,kn=0;kne.id==null?e.flags&2?-1:1/0:e.id;function ka(e){try{for(Ct=0;Ct{o._d&&Wr(-1);const s=di(t);let r;try{r=e(...i)}finally{di(s),o._d&&Wr(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function me(e,t){if(Ye===null)return e;const n=Ri(Ye),o=e.dirs||(e.dirs=[]);for(let i=0;ie.__isTeleport,lo=e=>e&&(e.disabled||e.disabled===""),Rr=e=>e&&(e.defer||e.defer===""),Br=e=>typeof SVGElement<"u"&&e instanceof SVGElement,zr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ss=(e,t)=>{const n=e&&e.to;return Be(n)?t?t(n):null:n},Da={name:"Teleport",__isTeleport:!0,process(e,t,n,o,i,s,r,l,a,u){const{mc:c,pc:d,pbc:v,o:{insert:h,querySelector:w,createText:E,createComment:N}}=u,$=lo(t.props);let{shapeFlag:k,children:g,dynamicChildren:_}=t;if(e==null){const R=t.el=E(""),G=t.anchor=E("");h(R,n,o),h(G,n,o);const K=(X,te)=>{k&16&&(i&&i.isCE&&(i.ce._teleportTarget=X),c(g,X,te,i,s,r,l,a))},F=()=>{const X=t.target=Ss(t.props,w),te=Oa(X,t,E,h);X&&(r!=="svg"&&Br(X)?r="svg":r!=="mathml"&&zr(X)&&(r="mathml"),$||(K(X,te),Zo(t,!1)))};$&&(K(n,G),Zo(t,!0)),Rr(t.props)?(t.el.__isMounted=!1,tt(()=>{F(),delete t.el.__isMounted},s)):F()}else{if(Rr(t.props)&&e.el.__isMounted===!1){tt(()=>{Da.process(e,t,n,o,i,s,r,l,a,u)},s);return}t.el=e.el,t.targetStart=e.targetStart;const R=t.anchor=e.anchor,G=t.target=e.target,K=t.targetAnchor=e.targetAnchor,F=lo(e.props),X=F?n:G,te=F?R:K;if(r==="svg"||Br(G)?r="svg":(r==="mathml"||zr(G))&&(r="mathml"),_?(v(e.dynamicChildren,_,X,i,s,r,l),gr(e,t,!0)):a||d(e,t,X,te,i,s,r,l,!1),$)F?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Fo(t,n,R,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const W=t.target=Ss(t.props,w);W&&Fo(t,W,null,u,0)}else F&&Fo(t,G,K,u,1);Zo(t,$)}},remove(e,t,n,{um:o,o:{remove:i}},s){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:v}=e;if(d&&(i(u),i(c)),s&&i(a),r&16){const h=s||!lo(v);for(let w=0;wao(w,t&&(de(t)?t[E]:t),n,o,i));return}if(On(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&ao(e,t,n,o.component.subTree);return}const s=o.shapeFlag&4?Ri(o.component):o.el,r=i?null:s,{i:l,r:a}=e,u=t&&t.r,c=l.refs===ke?l.refs={}:l.refs,d=l.setupState,v=Se(d),h=d===ke?()=>!1:w=>$e(v,w);if(u!=null&&u!==a&&(Be(u)?(c[u]=null,h(u)&&(d[u]=null)):De(u)&&(u.value=null)),ge(a))Po(a,l,12,[r,c]);else{const w=Be(a),E=De(a);if(w||E){const N=()=>{if(e.f){const $=w?h(a)?d[a]:c[a]:a.value;i?de($)&&Js($,s):de($)?$.includes(s)||$.push(s):w?(c[a]=[s],h(a)&&(d[a]=c[a])):(a.value=[s],e.k&&(c[e.k]=a.value))}else w?(c[a]=r,h(a)&&(d[a]=r)):E&&(a.value=r,e.k&&(c[e.k]=r))};r?(N.id=-1,tt(N,n)):N()}}}Mi().requestIdleCallback;Mi().cancelIdleCallback;const On=e=>!!e.type.__asyncLoader,Ra=e=>e.type.__isKeepAlive;function wd(e,t){Ba(e,"a",t)}function xd(e,t){Ba(e,"da",t)}function Ba(e,t,n=Ze){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Di(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Ra(i.parent.vnode)&&Ed(o,t,n,i),i=i.parent}}function Ed(e,t,n,o){const i=Di(t,e,o,!0);dr(()=>{Js(o[t],i)},n)}function Di(e,t,n=Ze,o=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{Zt();const l=Do(n),a=Ot(t,n,e,r);return l(),qt(),a});return o?i.unshift(s):i.push(s),s}}const en=e=>(t,n=Ze)=>{(!wo||e==="sp")&&Di(e,(...o)=>t(...o),n)},za=en("bm"),dt=en("m"),Sd=en("bu"),Nd=en("u"),cr=en("bum"),dr=en("um"),Cd=en("sp"),$d=en("rtg"),Md=en("rtc");function Id(e,t=Ze){Di("ec",e,t)}const Fa="components";function Ha(e,t){return Ua(Fa,e,!0,t)||e}const La=Symbol.for("v-ndc");function fr(e){return Be(e)?Ua(Fa,e,!1)||e:e||La}function Ua(e,t,n=!0,o=!1){const i=Ye||Ze;if(i){const s=i.type;{const l=yf(s,!1);if(l&&(l===t||l===ht(t)||l===$i(ht(t))))return s}const r=Fr(i[e]||s[e],t)||Fr(i.appContext[e],t);return!r&&o?s:r}}function Fr(e,t){return e&&(e[t]||e[ht(t)]||e[$i(ht(t))])}function st(e,t,n,o){let i;const s=n&&n[o],r=de(e);if(r||Be(e)){const l=r&&jt(e);let a=!1,u=!1;l&&(a=!ft(e),u=un(e),e=Pi(e)),i=new Array(e.length);for(let c=0,d=e.length;ct(l,a,void 0,s&&s[a]));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;abo(t)?!(t.type===Jt||t.type===Ee&&!Ga(t.children)):!0)?e:null}const Ns=e=>e?cu(e)?Ri(e):Ns(e.parent):null,uo=qe(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ns(e.parent),$root:e=>Ns(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>ja(e),$forceUpdate:e=>e.f||(e.f=()=>{ar(e.update)}),$nextTick:e=>e.n||(e.n=ut.bind(e.proxy)),$watch:e=>ef.bind(e)}),os=(e,t)=>e!==ke&&!e.__isScriptSetup&&$e(e,t),Td={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:i,props:s,accessCache:r,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const h=r[t];if(h!==void 0)switch(h){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(os(o,t))return r[t]=1,o[t];if(i!==ke&&$e(i,t))return r[t]=2,i[t];if((u=e.propsOptions[0])&&$e(u,t))return r[t]=3,s[t];if(n!==ke&&$e(n,t))return r[t]=4,n[t];Cs&&(r[t]=0)}}const c=uo[t];let d,v;if(c)return t==="$attrs"&&We(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==ke&&$e(n,t))return r[t]=4,n[t];if(v=a.config.globalProperties,$e(v,t))return v[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:s}=e;return os(i,t)?(i[t]=n,!0):o!==ke&&$e(o,t)?(o[t]=n,!0):$e(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:s}},r){let l;return!!n[r]||e!==ke&&$e(e,r)||os(t,r)||(l=s[0])&&$e(l,r)||$e(o,r)||$e(uo,r)||$e(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:$e(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function kd(){return Ya().slots}function Pd(){return Ya().attrs}function Ya(e){const t=hn();return t.setupContext||(t.setupContext=fu(t))}function Hr(e){return de(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Ad(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}let Cs=!0;function Dd(e){const t=ja(e),n=e.proxy,o=e.ctx;Cs=!1,t.beforeCreate&&Lr(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:v,beforeUpdate:h,updated:w,activated:E,deactivated:N,beforeDestroy:$,beforeUnmount:k,destroyed:g,unmounted:_,render:R,renderTracked:G,renderTriggered:K,errorCaptured:F,serverPrefetch:X,expose:te,inheritAttrs:W,components:P,directives:oe,filters:M}=t;if(u&&Od(u,o,null),r)for(const z in r){const C=r[z];ge(C)&&(o[z]=C.bind(n))}if(i){const z=i.call(n,n);Pe(z)&&(e.data=ko(z))}if(Cs=!0,s)for(const z in s){const C=s[z],D=ge(C)?C.bind(n,n):ge(C.get)?C.get.bind(n,n):kt,V=!ge(C)&&ge(C.set)?C.set.bind(n):kt,H=he({get:D,set:V});Object.defineProperty(o,z,{enumerable:!0,configurable:!0,get:()=>H.value,set:Z=>H.value=Z})}if(l)for(const z in l)Ka(l[z],o,n,z);if(a){const z=ge(a)?a.call(n):a;Reflect.ownKeys(z).forEach(C=>{Sn(C,z[C])})}c&&Lr(c,e,"c");function T(z,C){de(C)?C.forEach(D=>z(D.bind(n))):C&&z(C.bind(n))}if(T(za,d),T(dt,v),T(Sd,h),T(Nd,w),T(wd,E),T(xd,N),T(Id,F),T(Md,G),T($d,K),T(cr,k),T(dr,_),T(Cd,X),de(te))if(te.length){const z=e.exposed||(e.exposed={});te.forEach(C=>{Object.defineProperty(z,C,{get:()=>n[C],set:D=>n[C]=D,enumerable:!0})})}else e.exposed||(e.exposed={});R&&e.render===kt&&(e.render=R),W!=null&&(e.inheritAttrs=W),P&&(e.components=P),oe&&(e.directives=oe),X&&Va(e)}function Od(e,t,n=kt){de(e)&&(e=$s(e));for(const o in e){const i=e[o];let s;Pe(i)?"default"in i?s=yt(i.from||o,i.default,!0):s=yt(i.from||o):s=yt(i),De(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[o]=s}}function Lr(e,t,n){Ot(de(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ka(e,t,n,o){let i=o.includes(".")?su(n,o):()=>n[o];if(Be(e)){const s=t[e];ge(s)&&be(i,s)}else if(ge(e))be(i,e.bind(n));else if(Pe(e))if(de(e))e.forEach(s=>Ka(s,t,n,o));else{const s=ge(e.handler)?e.handler.bind(n):t[e.handler];ge(s)&&be(i,s,e)}}function ja(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,l=s.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(u=>fi(a,u,r,!0)),fi(a,t,r)),Pe(t)&&s.set(t,a),a}function fi(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&fi(e,s,n,!0),i&&i.forEach(r=>fi(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=Vd[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Vd={data:Ur,props:Gr,emits:Gr,methods:Qn,computed:Qn,beforeCreate:et,created:et,beforeMount:et,mounted:et,beforeUpdate:et,updated:et,beforeDestroy:et,beforeUnmount:et,destroyed:et,unmounted:et,activated:et,deactivated:et,errorCaptured:et,serverPrefetch:et,components:Qn,directives:Qn,watch:Bd,provide:Ur,inject:Rd};function Ur(e,t){return t?e?function(){return qe(ge(e)?e.call(this,this):e,ge(t)?t.call(this,this):t)}:t:e}function Rd(e,t){return Qn($s(e),$s(t))}function $s(e){if(de(e)){const t={};for(let n=0;n1)return n&&ge(t)?t.call(o&&o.proxy):t}}function Hd(){return!!(hn()||wn)}const Wa={},Za=()=>Object.create(Wa),qa=e=>Object.getPrototypeOf(e)===Wa;function Ld(e,t,n,o=!1){const i={},s=Za();e.propsDefaults=Object.create(null),Ja(e,t,i,s);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=o?i:id(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function Ud(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:r}}=e,l=Se(i),[a]=e.propsOptions;let u=!1;if((o||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[v,h]=Qa(d,t,!0);qe(r,v),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return Pe(e)&&o.set(e,Pn),Pn;if(de(s))for(let c=0;ce==="_"||e==="__"||e==="_ctx"||e==="$stable",pr=e=>de(e)?e.map(Mt):[Mt(e)],Yd=(e,t,n)=>{if(t._n)return t;const o=zn((...i)=>pr(t(...i)),n);return o._c=!1,o},eu=(e,t,n)=>{const o=e._ctx;for(const i in e){if(hr(i))continue;const s=e[i];if(ge(s))t[i]=Yd(i,s,o);else if(s!=null){const r=pr(s);t[i]=()=>r}}},tu=(e,t)=>{const n=pr(t);e.slots.default=()=>n},nu=(e,t,n)=>{for(const o in t)(n||!hr(o))&&(e[o]=t[o])},Kd=(e,t,n)=>{const o=e.slots=Za();if(e.vnode.shapeFlag&32){const i=t.__;i&&bs(o,"__",i,!0);const s=t._;s?(nu(o,t,n),n&&bs(o,"_",s,!0)):eu(t,o)}else t&&tu(e,t)},jd=(e,t,n)=>{const{vnode:o,slots:i}=e;let s=!0,r=ke;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:nu(i,t,n):(s=!t.$stable,eu(t,i)),r=t}else t&&(tu(e,t),r={default:1});if(s)for(const l in i)!hr(l)&&r[l]==null&&delete i[l]},tt=af;function Xd(e){return Wd(e)}function Wd(e,t){const n=Mi();n.__VUE__=!0;const{insert:o,remove:i,patchProp:s,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:v,setScopeId:h=kt,insertStaticContent:w}=e,E=(b,S,f,p=null,y=null,m=null,I=void 0,B=null,O=!!S.dynamicChildren)=>{if(b===S)return;b&&!Zn(b,S)&&(p=ve(b),Z(b,y,m,!0),b=null),S.patchFlag===-2&&(O=!1,S.dynamicChildren=null);const{type:A,ref:j,shapeFlag:L}=S;switch(A){case Vi:N(b,S,f,p);break;case Jt:$(b,S,f,p);break;case qo:b==null&&k(S,f,p,I);break;case Ee:P(b,S,f,p,y,m,I,B,O);break;default:L&1?R(b,S,f,p,y,m,I,B,O):L&6?oe(b,S,f,p,y,m,I,B,O):(L&64||L&128)&&A.process(b,S,f,p,y,m,I,B,O,_e)}j!=null&&y?ao(j,b&&b.ref,m,S||b,!S):j==null&&b&&b.ref!=null&&ao(b.ref,null,m,b,!0)},N=(b,S,f,p)=>{if(b==null)o(S.el=l(S.children),f,p);else{const y=S.el=b.el;S.children!==b.children&&u(y,S.children)}},$=(b,S,f,p)=>{b==null?o(S.el=a(S.children||""),f,p):S.el=b.el},k=(b,S,f,p)=>{[b.el,b.anchor]=w(b.children,S,f,p,b.el,b.anchor)},g=({el:b,anchor:S},f,p)=>{let y;for(;b&&b!==S;)y=v(b),o(b,f,p),b=y;o(S,f,p)},_=({el:b,anchor:S})=>{let f;for(;b&&b!==S;)f=v(b),i(b),b=f;i(S)},R=(b,S,f,p,y,m,I,B,O)=>{S.type==="svg"?I="svg":S.type==="math"&&(I="mathml"),b==null?G(S,f,p,y,m,I,B,O):X(b,S,y,m,I,B,O)},G=(b,S,f,p,y,m,I,B)=>{let O,A;const{props:j,shapeFlag:L,transition:Q,dirs:se}=b;if(O=b.el=r(b.type,m,j&&j.is,j),L&8?c(O,b.children):L&16&&F(b.children,O,null,p,y,is(b,m),I,B),se&&pn(b,null,p,"created"),K(O,b,b.scopeId,I,p),j){for(const Ne in j)Ne!=="value"&&!oo(Ne)&&s(O,Ne,null,j[Ne],m,p);"value"in j&&s(O,"value",null,j.value,m),(A=j.onVnodeBeforeMount)&&Nt(A,p,b)}se&&pn(b,null,p,"beforeMount");const pe=Zd(y,Q);pe&&Q.beforeEnter(O),o(O,S,f),((A=j&&j.onVnodeMounted)||pe||se)&&tt(()=>{A&&Nt(A,p,b),pe&&Q.enter(O),se&&pn(b,null,p,"mounted")},y)},K=(b,S,f,p,y)=>{if(f&&h(b,f),p)for(let m=0;m{for(let A=O;A{const B=S.el=b.el;let{patchFlag:O,dynamicChildren:A,dirs:j}=S;O|=b.patchFlag&16;const L=b.props||ke,Q=S.props||ke;let se;if(f&&gn(f,!1),(se=Q.onVnodeBeforeUpdate)&&Nt(se,f,S,b),j&&pn(S,b,f,"beforeUpdate"),f&&gn(f,!0),(L.innerHTML&&Q.innerHTML==null||L.textContent&&Q.textContent==null)&&c(B,""),A?te(b.dynamicChildren,A,B,f,p,is(S,y),m):I||C(b,S,B,null,f,p,is(S,y),m,!1),O>0){if(O&16)W(B,L,Q,f,y);else if(O&2&&L.class!==Q.class&&s(B,"class",null,Q.class,y),O&4&&s(B,"style",L.style,Q.style,y),O&8){const pe=S.dynamicProps;for(let Ne=0;Ne{se&&Nt(se,f,S,b),j&&pn(S,b,f,"updated")},p)},te=(b,S,f,p,y,m,I)=>{for(let B=0;B{if(S!==f){if(S!==ke)for(const m in S)!oo(m)&&!(m in f)&&s(b,m,S[m],null,y,p);for(const m in f){if(oo(m))continue;const I=f[m],B=S[m];I!==B&&m!=="value"&&s(b,m,B,I,y,p)}"value"in f&&s(b,"value",S.value,f.value,y)}},P=(b,S,f,p,y,m,I,B,O)=>{const A=S.el=b?b.el:l(""),j=S.anchor=b?b.anchor:l("");let{patchFlag:L,dynamicChildren:Q,slotScopeIds:se}=S;se&&(B=B?B.concat(se):se),b==null?(o(A,f,p),o(j,f,p),F(S.children||[],f,j,y,m,I,B,O)):L>0&&L&64&&Q&&b.dynamicChildren?(te(b.dynamicChildren,Q,f,y,m,I,B),(S.key!=null||y&&S===y.subTree)&&gr(b,S,!0)):C(b,S,f,j,y,m,I,B,O)},oe=(b,S,f,p,y,m,I,B,O)=>{S.slotScopeIds=B,b==null?S.shapeFlag&512?y.ctx.activate(S,f,p,I,O):M(S,f,p,y,m,I,O):U(b,S,O)},M=(b,S,f,p,y,m,I)=>{const B=b.component=pf(b,p,y);if(Ra(b)&&(B.ctx.renderer=_e),gf(B,!1,I),B.asyncDep){if(y&&y.registerDep(B,T,I),!b.el){const O=B.subTree=Ie(Jt);$(null,O,S,f),b.placeholder=O.el}}else T(B,b,S,f,y,m,I)},U=(b,S,f)=>{const p=S.component=b.component;if(rf(b,S,f))if(p.asyncDep&&!p.asyncResolved){z(p,S,f);return}else p.next=S,p.update();else S.el=b.el,p.vnode=S},T=(b,S,f,p,y,m,I)=>{const B=()=>{if(b.isMounted){let{next:L,bu:Q,u:se,parent:pe,vnode:Ne}=b;{const Et=ou(b);if(Et){L&&(L.el=Ne.el,z(b,L,I)),Et.asyncDep.then(()=>{b.isUnmounted||B()});return}}let Ce=L,je;gn(b,!1),L?(L.el=Ne.el,z(b,L,I)):L=Ne,Q&&Wo(Q),(je=L.props&&L.props.onVnodeBeforeUpdate)&&Nt(je,pe,L,Ne),gn(b,!0);const rt=jr(b),xt=b.subTree;b.subTree=rt,E(xt,rt,d(xt.el),ve(xt),b,y,m),L.el=rt.el,Ce===null&&lf(b,rt.el),se&&tt(se,y),(je=L.props&&L.props.onVnodeUpdated)&&tt(()=>Nt(je,pe,L,Ne),y)}else{let L;const{el:Q,props:se}=S,{bm:pe,m:Ne,parent:Ce,root:je,type:rt}=b,xt=On(S);gn(b,!1),pe&&Wo(pe),!xt&&(L=se&&se.onVnodeBeforeMount)&&Nt(L,Ce,S),gn(b,!0);{je.ce&&je.ce._def.shadowRoot!==!1&&je.ce._injectChildStyle(rt);const Et=b.subTree=jr(b);E(null,Et,f,p,b,y,m),S.el=Et.el}if(Ne&&tt(Ne,y),!xt&&(L=se&&se.onVnodeMounted)){const Et=S;tt(()=>Nt(L,Ce,Et),y)}(S.shapeFlag&256||Ce&&On(Ce.vnode)&&Ce.vnode.shapeFlag&256)&&b.a&&tt(b.a,y),b.isMounted=!0,S=f=p=null}};b.scope.on();const O=b.effect=new ca(B);b.scope.off();const A=b.update=O.run.bind(O),j=b.job=O.runIfDirty.bind(O);j.i=b,j.id=b.uid,O.scheduler=()=>ar(j),gn(b,!0),A()},z=(b,S,f)=>{S.component=b;const p=b.vnode.props;b.vnode=S,b.next=null,Ud(b,S.props,p,f),jd(b,S.children,f),Zt(),Vr(b),qt()},C=(b,S,f,p,y,m,I,B,O=!1)=>{const A=b&&b.children,j=b?b.shapeFlag:0,L=S.children,{patchFlag:Q,shapeFlag:se}=S;if(Q>0){if(Q&128){V(A,L,f,p,y,m,I,B,O);return}else if(Q&256){D(A,L,f,p,y,m,I,B,O);return}}se&8?(j&16&&le(A,y,m),L!==A&&c(f,L)):j&16?se&16?V(A,L,f,p,y,m,I,B,O):le(A,y,m,!0):(j&8&&c(f,""),se&16&&F(L,f,p,y,m,I,B,O))},D=(b,S,f,p,y,m,I,B,O)=>{b=b||Pn,S=S||Pn;const A=b.length,j=S.length,L=Math.min(A,j);let Q;for(Q=0;Qj?le(b,y,m,!0,!1,L):F(S,f,p,y,m,I,B,O,L)},V=(b,S,f,p,y,m,I,B,O)=>{let A=0;const j=S.length;let L=b.length-1,Q=j-1;for(;A<=L&&A<=Q;){const se=b[A],pe=S[A]=O?rn(S[A]):Mt(S[A]);if(Zn(se,pe))E(se,pe,f,null,y,m,I,B,O);else break;A++}for(;A<=L&&A<=Q;){const se=b[L],pe=S[Q]=O?rn(S[Q]):Mt(S[Q]);if(Zn(se,pe))E(se,pe,f,null,y,m,I,B,O);else break;L--,Q--}if(A>L){if(A<=Q){const se=Q+1,pe=seQ)for(;A<=L;)Z(b[A],y,m,!0),A++;else{const se=A,pe=A,Ne=new Map;for(A=pe;A<=Q;A++){const at=S[A]=O?rn(S[A]):Mt(S[A]);at.key!=null&&Ne.set(at.key,A)}let Ce,je=0;const rt=Q-pe+1;let xt=!1,Et=0;const Xn=new Array(rt);for(A=0;A=rt){Z(at,y,m,!0);continue}let St;if(at.key!=null)St=Ne.get(at.key);else for(Ce=pe;Ce<=Q;Ce++)if(Xn[Ce-pe]===0&&Zn(at,S[Ce])){St=Ce;break}St===void 0?Z(at,y,m,!0):(Xn[St-pe]=A+1,St>=Et?Et=St:xt=!0,E(at,S[St],f,null,y,m,I,B,O),je++)}const Ir=xt?qd(Xn):Pn;for(Ce=Ir.length-1,A=rt-1;A>=0;A--){const at=pe+A,St=S[at],Tr=S[at+1],kr=at+1{const{el:m,type:I,transition:B,children:O,shapeFlag:A}=b;if(A&6){H(b.component.subTree,S,f,p);return}if(A&128){b.suspense.move(S,f,p);return}if(A&64){I.move(b,S,f,_e);return}if(I===Ee){o(m,S,f);for(let L=0;LB.enter(m),y);else{const{leave:L,delayLeave:Q,afterLeave:se}=B,pe=()=>{b.ctx.isUnmounted?i(m):o(m,S,f)},Ne=()=>{L(m,()=>{pe(),se&&se()})};Q?Q(m,pe,Ne):Ne()}else o(m,S,f)},Z=(b,S,f,p=!1,y=!1)=>{const{type:m,props:I,ref:B,children:O,dynamicChildren:A,shapeFlag:j,patchFlag:L,dirs:Q,cacheIndex:se}=b;if(L===-2&&(y=!1),B!=null&&(Zt(),ao(B,null,f,b,!0),qt()),se!=null&&(S.renderCache[se]=void 0),j&256){S.ctx.deactivate(b);return}const pe=j&1&&Q,Ne=!On(b);let Ce;if(Ne&&(Ce=I&&I.onVnodeBeforeUnmount)&&Nt(Ce,S,b),j&6)ie(b.component,f,p);else{if(j&128){b.suspense.unmount(f,p);return}pe&&pn(b,null,S,"beforeUnmount"),j&64?b.type.remove(b,S,f,_e,p):A&&!A.hasOnce&&(m!==Ee||L>0&&L&64)?le(A,S,f,!1,!0):(m===Ee&&L&384||!y&&j&16)&&le(O,S,f),p&&ue(b)}(Ne&&(Ce=I&&I.onVnodeUnmounted)||pe)&&tt(()=>{Ce&&Nt(Ce,S,b),pe&&pn(b,null,S,"unmounted")},f)},ue=b=>{const{type:S,el:f,anchor:p,transition:y}=b;if(S===Ee){q(f,p);return}if(S===qo){_(b);return}const m=()=>{i(f),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(b.shapeFlag&1&&y&&!y.persisted){const{leave:I,delayLeave:B}=y,O=()=>I(f,m);B?B(b.el,m,O):O()}else m()},q=(b,S)=>{let f;for(;b!==S;)f=v(b),i(b),b=f;i(S)},ie=(b,S,f)=>{const{bum:p,scope:y,job:m,subTree:I,um:B,m:O,a:A,parent:j,slots:{__:L}}=b;Kr(O),Kr(A),p&&Wo(p),j&&de(L)&&L.forEach(Q=>{j.renderCache[Q]=void 0}),y.stop(),m&&(m.flags|=8,Z(I,b,S,f)),B&&tt(B,S),tt(()=>{b.isUnmounted=!0},S),S&&S.pendingBranch&&!S.isUnmounted&&b.asyncDep&&!b.asyncResolved&&b.suspenseId===S.pendingId&&(S.deps--,S.deps===0&&S.resolve())},le=(b,S,f,p=!1,y=!1,m=0)=>{for(let I=m;I{if(b.shapeFlag&6)return ve(b.component.subTree);if(b.shapeFlag&128)return b.suspense.next();const S=v(b.anchor||b.el),f=S&&S[Aa];return f?v(f):S};let ye=!1;const fe=(b,S,f)=>{b==null?S._vnode&&Z(S._vnode,null,null,!0):E(S._vnode||null,b,S,null,null,null,f),S._vnode=b,ye||(ye=!0,Vr(),Ta(),ye=!1)},_e={p:E,um:Z,m:H,r:ue,mt:M,mc:F,pc:C,pbc:te,n:ve,o:e};return{render:fe,hydrate:void 0,createApp:Fd(fe)}}function is({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function gn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Zd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function gr(e,t,n=!1){const o=e.children,i=t.children;if(de(o)&&de(i))for(let s=0;s>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}function ou(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:ou(t)}function Kr(e){if(e)for(let t=0;tyt(Jd);function be(e,t,n){return iu(e,t,n)}function iu(e,t,n=ke){const{immediate:o,deep:i,flush:s,once:r}=n,l=qe({},n),a=t&&o||!t&&s!=="post";let u;if(wo){if(s==="sync"){const h=Qd();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=kt,h.resume=kt,h.pause=kt,h}}const c=Ze;l.call=(h,w,E)=>Ot(h,c,w,E);let d=!1;s==="post"?l.scheduler=h=>{tt(h,c&&c.suspense)}:s!=="sync"&&(d=!0,l.scheduler=(h,w)=>{w?h():ar(h)}),l.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const v=pd(e,t,l);return wo&&(u?u.push(v):a&&v()),v}function ef(e,t,n){const o=this.proxy,i=Be(e)?e.includes(".")?su(o,e):()=>o[e]:e.bind(o,o);let s;ge(t)?s=t:(s=t.handler,n=t);const r=Do(this),l=iu(i,s.bind(o),n);return r(),l}function su(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;it==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ht(t)}Modifiers`]||e[`${fn(t)}Modifiers`];function nf(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||ke;let i=n;const s=t.startsWith("update:"),r=s&&tf(o,t.slice(7));r&&(r.trim&&(i=n.map(c=>Be(c)?c.trim():c)),r.number&&(i=n.map(ri)));let l,a=o[l=Ji(t)]||o[l=Ji(ht(t))];!a&&s&&(a=o[l=Ji(fn(t))]),a&&Ot(a,e,6,i);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Ot(u,e,6,i)}}function ru(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(i!==void 0)return i;const s=e.emits;let r={},l=!1;if(!ge(e)){const a=u=>{const c=ru(u,t,!0);c&&(l=!0,qe(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(Pe(e)&&o.set(e,null),null):(de(s)?s.forEach(a=>r[a]=null):qe(r,s),Pe(e)&&o.set(e,r),r)}function Oi(e,t){return!e||!Ni(t)?!1:(t=t.slice(2).replace(/Once$/,""),$e(e,t[0].toLowerCase()+t.slice(1))||$e(e,fn(t))||$e(e,t))}function jr(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[s],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:v,setupState:h,ctx:w,inheritAttrs:E}=e,N=di(e);let $,k;try{if(n.shapeFlag&4){const _=i||o,R=_;$=Mt(u.call(R,_,c,d,h,v,w)),k=l}else{const _=t;$=Mt(_.length>1?_(d,{attrs:l,slots:r,emit:a}):_(d,null)),k=t.props?l:of(l)}}catch(_){co.length=0,Ai(_,e,1),$=Ie(Jt)}let g=$;if(k&&E!==!1){const _=Object.keys(k),{shapeFlag:R}=g;_.length&&R&7&&(s&&_.some(qs)&&(k=sf(k,s)),g=Hn(g,k,!1,!0))}return n.dirs&&(g=Hn(g,null,!1,!0),g.dirs=g.dirs?g.dirs.concat(n.dirs):n.dirs),n.transition&&ur(g,n.transition),$=g,di(N),$}const of=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ni(n))&&((t||(t={}))[n]=e[n]);return t},sf=(e,t)=>{const n={};for(const o in e)(!qs(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function rf(e,t,n){const{props:o,children:i,component:s}=e,{props:r,children:l,patchFlag:a}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?Xr(o,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;de.__isSuspense;function af(e,t){t&&t.pendingBranch?de(e)?t.effects.push(...e):t.effects.push(e):md(e)}const Ee=Symbol.for("v-fgt"),Vi=Symbol.for("v-txt"),Jt=Symbol.for("v-cmt"),qo=Symbol.for("v-stc"),co=[];let ot=null;function Y(e=!1){co.push(ot=e?null:[])}function uf(){co.pop(),ot=co[co.length-1]||null}let Fn=1;function Wr(e,t=!1){Fn+=e,e<0&&ot&&t&&(ot.hasOnce=!0)}function au(e){return e.dynamicChildren=Fn>0?ot||Pn:null,uf(),Fn>0&&ot&&ot.push(e),e}function ee(e,t,n,o,i,s){return au(x(e,t,n,o,i,s,!0))}function Ke(e,t,n,o,i){return au(Ie(e,t,n,o,i,!0))}function bo(e){return e?e.__v_isVNode===!0:!1}function Zn(e,t){return e.type===t.type&&e.key===t.key}const uu=({key:e})=>e??null,Jo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Be(e)||De(e)||ge(e)?{i:Ye,r:e,k:t,f:!!n}:e:null);function x(e,t=null,n=null,o=0,i=null,s=e===Ee?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&uu(t),ref:t&&Jo(t),scopeId:Pa,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Ye};return l?(mr(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=Be(n)?8:16),Fn>0&&!r&&ot&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&ot.push(a),a}const Ie=cf;function cf(e,t=null,n=null,o=0,i=null,s=!1){if((!e||e===La)&&(e=Jt),bo(e)){const l=Hn(e,t,!0);return n&&mr(l,n),Fn>0&&!s&&ot&&(l.shapeFlag&6?ot[ot.indexOf(e)]=l:ot.push(l)),l.patchFlag=-2,l}if(_f(e)&&(e=e.__vccOpts),t){t=df(t);let{class:l,style:a}=t;l&&!Be(l)&&(t.class=it(l)),Pe(a)&&(lr(a)&&!de(a)&&(a=qe({},a)),t.style=pt(a))}const r=Be(e)?1:lu(e)?128:yd(e)?64:Pe(e)?4:ge(e)?2:0;return x(e,t,n,o,i,r,s,!0)}function df(e){return e?lr(e)||qa(e)?qe({},e):e:null}function Hn(e,t,n=!1,o=!1){const{props:i,ref:s,patchFlag:r,children:l,transition:a}=e,u=t?Ao(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&uu(u),ref:t&&t.ref?n&&s?de(s)?s.concat(Jo(t)):[s,Jo(t)]:Jo(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Ee?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Hn(e.ssContent),ssFallback:e.ssFallback&&Hn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&ur(c,a.clone(c)),c}function Fe(e=" ",t=0){return Ie(Vi,null,e,t)}function vr(e,t){const n=Ie(qo,null,e);return n.staticCount=t,n}function Te(e="",t=!1){return t?(Y(),Ke(Jt,null,e)):Ie(Jt,null,e)}function Mt(e){return e==null||typeof e=="boolean"?Ie(Jt):de(e)?Ie(Ee,null,e.slice()):bo(e)?rn(e):Ie(Vi,null,String(e))}function rn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Hn(e)}function mr(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(de(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),mr(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!qa(t)?t._ctx=Ye:i===3&&Ye&&(Ye.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ge(t)?(t={default:t,_ctx:Ye},n=32):(t=String(t),o&64?(n=16,t=[Fe(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ao(...e){const t={};for(let n=0;nZe||Ye;let hi,Is;{const e=Mi(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),s=>{i.length>1?i.forEach(r=>r(s)):i[0](s)}};hi=t("__VUE_INSTANCE_SETTERS__",n=>Ze=n),Is=t("__VUE_SSR_SETTERS__",n=>wo=n)}const Do=e=>{const t=Ze;return hi(e),e.scope.on(),()=>{e.scope.off(),hi(t)}},Zr=()=>{Ze&&Ze.scope.off(),hi(null)};function cu(e){return e.vnode.shapeFlag&4}let wo=!1;function gf(e,t=!1,n=!1){t&&Is(t);const{props:o,children:i}=e.vnode,s=cu(e);Ld(e,o,s,t),Kd(e,i,n||t);const r=s?vf(e,t):void 0;return t&&Is(!1),r}function vf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Td);const{setup:o}=n;if(o){Zt();const i=e.setupContext=o.length>1?fu(e):null,s=Do(e),r=Po(o,e,0,[e.props,i]),l=oa(r);if(qt(),s(),(l||e.sp)&&!On(e)&&Va(e),l){if(r.then(Zr,Zr),t)return r.then(a=>{qr(e,a)}).catch(a=>{Ai(a,e,0)});e.asyncDep=r}else qr(e,r)}else du(e)}function qr(e,t,n){ge(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=Na(t)),du(e)}function du(e,t,n){const o=e.type;e.render||(e.render=o.render||kt);{const i=Do(e);Zt();try{Dd(e)}finally{qt(),i()}}}const mf={get(e,t){return We(e,"get",""),e[t]}};function fu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,mf),slots:e.slots,emit:e.emit,expose:t}}function Ri(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Na(Xt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in uo)return uo[n](e)},has(t,n){return n in t||n in uo}})):e.proxy}function yf(e,t=!0){return ge(e)?e.displayName||e.name:e.name||t&&e.__name}function _f(e){return ge(e)&&"__vccOpts"in e}const he=(e,t)=>fd(e,t,wo);function Me(e,t,n){const o=arguments.length;return o===2?Pe(t)&&!de(t)?bo(t)?Ie(e,null,[t]):Ie(e,t):Ie(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&bo(n)&&(n=[n]),Ie(e,t,n))}function bf(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&ot&&ot.push(e),!0}const wf="3.5.18";/** +* @vue/runtime-dom v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Ts;const Jr=typeof window<"u"&&window.trustedTypes;if(Jr)try{Ts=Jr.createPolicy("vue",{createHTML:e=>e})}catch{}const hu=Ts?e=>Ts.createHTML(e):e=>e,xf="http://www.w3.org/2000/svg",Ef="http://www.w3.org/1998/Math/MathML",Ft=typeof document<"u"?document:null,Qr=Ft&&Ft.createElement("template"),Sf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?Ft.createElementNS(xf,e):t==="mathml"?Ft.createElementNS(Ef,e):n?Ft.createElement(e,{is:n}):Ft.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Ft.createTextNode(e),createComment:e=>Ft.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Ft.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const r=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{Qr.innerHTML=hu(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=Qr.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Nf=Symbol("_vtc");function Cf(e,t,n){const o=e[Nf];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const el=Symbol("_vod"),$f=Symbol("_vsh"),Mf=Symbol(""),If=/(^|;)\s*display\s*:/;function Tf(e,t,n){const o=e.style,i=Be(n);let s=!1;if(n&&!i){if(t)if(Be(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Qo(o,l,"")}else for(const r in t)n[r]==null&&Qo(o,r,"");for(const r in n)r==="display"&&(s=!0),Qo(o,r,n[r])}else if(i){if(t!==n){const r=o[Mf];r&&(n+=";"+r),o.cssText=n,s=If.test(n)}}else t&&e.removeAttribute("style");el in e&&(e[el]=s?o.display:"",e[$f]&&(o.display="none"))}const tl=/\s*!important$/;function Qo(e,t,n){if(de(n))n.forEach(o=>Qo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=kf(e,t);tl.test(n)?e.setProperty(fn(o),n.replace(tl,""),"important"):e[o]=n}}const nl=["Webkit","Moz","ms"],ss={};function kf(e,t){const n=ss[t];if(n)return n;let o=ht(t);if(o!=="filter"&&o in e)return ss[t]=o;o=$i(o);for(let i=0;irs||(Of.then(()=>rs=0),rs=Date.now());function Rf(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;Ot(Bf(o,n.value),t,5,[o])};return n.value=e,n.attached=Vf(),n}function Bf(e,t){if(de(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const al=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zf=(e,t,n,o,i,s)=>{const r=i==="svg";t==="class"?Cf(e,o,r):t==="style"?Tf(e,n,o):Ni(t)?qs(t)||Af(e,t,n,o,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ff(e,t,o,r))?(sl(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&il(e,t,o,r,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Be(o))?sl(e,ht(t),o,s,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),il(e,t,o,r))};function Ff(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&al(t)&&ge(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return al(t)&&Be(n)?!1:t in e}const Ln=e=>{const t=e.props["onUpdate:modelValue"]||!1;return de(t)?n=>Wo(t,n):t};function Hf(e){e.target.composing=!0}function ul(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Wt=Symbol("_assign"),Je={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[Wt]=Ln(i);const s=o||i.props&&i.props.type==="number";an(e,t?"change":"input",r=>{if(r.target.composing)return;let l=e.value;n&&(l=l.trim()),s&&(l=ri(l)),e[Wt](l)}),n&&an(e,"change",()=>{e.value=e.value.trim()}),t||(an(e,"compositionstart",Hf),an(e,"compositionend",ul),an(e,"change",ul))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:s}},r){if(e[Wt]=Ln(r),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?ri(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===a)||(e.value=a))}},Ue={deep:!0,created(e,t,n){e[Wt]=Ln(n),an(e,"change",()=>{const o=e._modelValue,i=xo(e),s=e.checked,r=e[Wt];if(de(o)){const l=er(o,i),a=l!==-1;if(s&&!a)r(o.concat(i));else if(!s&&a){const u=[...o];u.splice(l,1),r(u)}}else if(jn(o)){const l=new Set(o);s?l.add(i):l.delete(i),r(l)}else r(pu(e,s))})},mounted:cl,beforeUpdate(e,t,n){e[Wt]=Ln(n),cl(e,t,n)}};function cl(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(de(t))i=er(t,o.props.value)>-1;else if(jn(t))i=t.has(o.props.value);else{if(t===n)return;i=To(t,pu(e,!0))}e.checked!==i&&(e.checked=i)}const At={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const i=jn(t);an(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?ri(xo(r)):xo(r));e[Wt](e.multiple?i?new Set(s):s:s[0]),e._assigning=!0,ut(()=>{e._assigning=!1})}),e[Wt]=Ln(o)},mounted(e,{value:t}){dl(e,t)},beforeUpdate(e,t,n){e[Wt]=Ln(n)},updated(e,{value:t}){e._assigning||dl(e,t)}};function dl(e,t){const n=e.multiple,o=de(t);if(!(n&&!o&&!jn(t))){for(let i=0,s=e.options.length;iString(u)===String(l)):r.selected=er(t,l)>-1}else r.selected=t.has(l);else if(To(xo(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function xo(e){return"_value"in e?e._value:e.value}function pu(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Lf=["ctrl","shift","alt","meta"],Uf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Lf.some(n=>e[`${n}Key`]&&!t.includes(n))},ei=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(i,...s)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const s=fn(i.key);if(t.some(r=>r===s||Gf[r]===s))return e(i)})},Yf=qe({patchProp:zf},Sf);let fl;function Kf(){return fl||(fl=Xd(Yf))}const jf=(...e)=>{const t=Kf().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Wf(o);if(!i)return;const s=t._component;!ge(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,Xf(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function Xf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wf(e){return Be(e)?document.querySelector(e):e}/*! + * pinia v3.0.3 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let gu;const Bi=e=>gu=e,vu=Symbol();function Ps(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var fo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(fo||(fo={}));function Zf(){const e=Ii(!0),t=e.run(()=>J({}));let n=[],o=[];const i=Xt({install(s){Bi(i),i._a=s,s.provide(vu,i),s.config.globalProperties.$pinia=i,o.forEach(r=>n.push(r)),o=[]},use(s){return this._a?n.push(s):o.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const mu=()=>{};function hl(e,t,n,o=mu){e.push(t);const i=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),o())};return!n&&Ti()&&io(i),i}function In(e,...t){e.slice().forEach(n=>{n(...t)})}const qf=e=>e(),pl=Symbol(),ls=Symbol();function As(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],i=e[n];Ps(i)&&Ps(o)&&e.hasOwnProperty(n)&&!De(o)&&!jt(o)?e[n]=As(i,o):e[n]=o}return e}const Jf=Symbol();function Qf(e){return!Ps(e)||!Object.prototype.hasOwnProperty.call(e,Jf)}const{assign:nn}=Object;function eh(e){return!!(De(e)&&e.effect)}function th(e,t,n,o){const{state:i,actions:s,getters:r}=t,l=n.state.value[e];let a;function u(){l||(n.state.value[e]=i?i():{});const c=Ca(n.state.value[e]);return nn(c,s,Object.keys(r||{}).reduce((d,v)=>(d[v]=Xt(he(()=>{Bi(n);const h=n._s.get(e);return r[v].call(h,h)})),d),{}))}return a=yu(e,u,t,n,o,!0),a}function yu(e,t,n={},o,i,s){let r;const l=nn({actions:{}},n),a={deep:!0};let u,c,d=[],v=[],h;const w=o.state.value[e];!s&&!w&&(o.state.value[e]={}),J({});let E;function N(F){let X;u=c=!1,typeof F=="function"?(F(o.state.value[e]),X={type:fo.patchFunction,storeId:e,events:h}):(As(o.state.value[e],F),X={type:fo.patchObject,payload:F,storeId:e,events:h});const te=E=Symbol();ut().then(()=>{E===te&&(u=!0)}),c=!0,In(d,X,o.state.value[e])}const $=s?function(){const{state:X}=n,te=X?X():{};this.$patch(W=>{nn(W,te)})}:mu;function k(){r.stop(),d=[],v=[],o._s.delete(e)}const g=(F,X="")=>{if(pl in F)return F[ls]=X,F;const te=function(){Bi(o);const W=Array.from(arguments),P=[],oe=[];function M(z){P.push(z)}function U(z){oe.push(z)}In(v,{args:W,name:te[ls],store:R,after:M,onError:U});let T;try{T=F.apply(this&&this.$id===e?this:R,W)}catch(z){throw In(oe,z),z}return T instanceof Promise?T.then(z=>(In(P,z),z)).catch(z=>(In(oe,z),Promise.reject(z))):(In(P,T),T)};return te[pl]=!0,te[ls]=X,te},_={_p:o,$id:e,$onAction:hl.bind(null,v),$patch:N,$reset:$,$subscribe(F,X={}){const te=hl(d,F,X.detached,()=>W()),W=r.run(()=>be(()=>o.state.value[e],P=>{(X.flush==="sync"?c:u)&&F({storeId:e,type:fo.direct,events:h},P)},nn({},a,X)));return te},$dispose:k},R=ko(_);o._s.set(e,R);const K=(o._a&&o._a.runWithContext||qf)(()=>o._e.run(()=>(r=Ii()).run(()=>t({action:g}))));for(const F in K){const X=K[F];if(De(X)&&!eh(X)||jt(X))s||(w&&Qf(X)&&(De(X)?X.value=w[F]:As(X,w[F])),o.state.value[e][F]=X);else if(typeof X=="function"){const te=g(X,F);K[F]=te,l.actions[F]=X}}return nn(R,K),nn(Se(R),K),Object.defineProperty(R,"$state",{get:()=>o.state.value[e],set:F=>{N(X=>{nn(X,F)})}}),o._p.forEach(F=>{nn(R,r.run(()=>F({store:R,app:o._a,pinia:o,options:l})))}),w&&s&&n.hydrate&&n.hydrate(R.$state,w),u=!0,c=!0,R}/*! #__NO_SIDE_EFFECTS__ */function _u(e,t,n){let o;const i=typeof t=="function";o=i?n:t;function s(r,l){const a=Hd();return r=r||(a?yt(vu,null):null),r&&Bi(r),r=gu,r._s.has(e)||(i?yu(e,t,o,r):th(e,o,r)),r._s.get(e)}return s.$id=e,s}function nh(e){const t=Se(e),n={};for(const o in t){const i=t[o];i.effect?n[o]=he({get:()=>e[o],set(s){e[o]=s}}):(De(i)||jt(i))&&(n[o]=Ve(e,o))}return n}const oh={class:"StepWizard"},ih={class:"step-indicators"},sh=["onClick"],rh={class:"step-content"},lh={class:"step-actions"},ah=we({__name:"StepWizard",props:{steps:{type:Array,required:!0}},setup(e){const t=e,n=J(0),o=()=>{n.value{s>=0&&s(Y(),ee("div",oh,[x("div",ih,[(Y(!0),ee(Ee,null,st(e.steps,(l,a)=>(Y(),ee("div",{key:a,class:it(["step",{active:n.value===a,completed:n.value>a}]),onClick:u=>i(a)},null,10,sh))),128))]),x("div",rh,[(Y(),Ke(fr(e.steps[n.value])))]),x("div",lh,[n.value>0?(Y(),ee("button",{key:0,onClick:r[0]||(r[0]=l=>n.value--),class:"btn prev-btn"},"Previous")):Te("",!0),n.value{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},uh=Qe(ah,[["__scopeId","data-v-9f8c12c9"]]),bt=_u("projectSpec",()=>{const e=J({project_name:"asd",database:"",models:[],custom_enums:[]}),t=J(!1),n=J([{name:"UserRole",values:[{name:"ADMIN",value:"ADMIN"},{name:"USER",value:"auto()"}]}]),o=J([{id:"user",data:{fields:[{name:"id",type:"UUID",isPrimaryKey:!0,defaultValue:"uuid.uuid4"},{name:"name",type:"String"},{name:"email",type:"String"},{name:"role",type:"Enum",typeEnum:"UserRole",defaultValue:"ADMIN"},{name:"created_at",type:"DateTime"},{name:"updated_at",type:"DateTime"}],relations:[{fieldName:"post_id",targetModel:"post",onDelete:"CASCADE",isNullable:!1,isUnique:!1,isIndex:!1}]},type:"custom",position:{x:50,y:50}},{id:"post",data:{fields:[{name:"id",type:"UUID",isPrimaryKey:!0,defaultValue:"uuid.uuid4"},{name:"created_at",type:"DateTime"},{name:"updated_at",type:"DateTime"}],relations:[]},type:"custom",position:{x:150,y:355}}]),i=J([{id:"(user)-(post)-(post_id)",source:"user",target:"post",type:"smoothstep"}]),s=()=>{const C=o.value.map(V=>{const H=V.id,Z=V.data.fields.map(q=>({name:q.name,type:q.type,type_enum:q.typeEnum??null,primary_key:q.isPrimaryKey??!1,nullable:q.isNullable??!1,unique:q.isUnique??!1,index:q.isIndex??!1,default_value:q.defaultValue??null,extra_kwargs:null,metadata:{is_created_at_timestamp:q.name==="created_at",is_updated_at_timestamp:q.name==="updated_at",is_foreign_key:!1}})),ue=V.data.relations.map(q=>({field_name:q.fieldName,target_model:q.targetModel,back_populates:null,on_delete:q.onDelete??"CASCADE",nullable:q.isNullable??!1,unique:q.isUnique??!1,index:q.isIndex??!1}));return{name:H,fields:Z,relationships:ue,metadata:{create_endpoints:!0,create_tests:!0,create_daos:!0,create_dtos:!0,is_auth_model:!1}}}),D=n.value.map(V=>({name:V.name,values:V.values.map(H=>({name:H.name,value:H.value}))}));return{project_name:e.value.project_name,use_postgres:!0,use_alembic:!0,models:C,custom_enums:D}},r=async()=>{const C=s();try{const D=await fetch("http://localhost:8000/generate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(C)});if(!D.ok){const H=await D.text();throw new Error(`Error ${D.status}: ${H}`)}const V=await D.json();return console.log("Generation successful:",V),V}catch(D){throw console.error("Generation failed:",D),D}},l=C=>o.value.find(D=>D.id===C),a=C=>{l(C)||o.value.push({id:C,data:{fields:[],relations:[]},type:"custom",position:{x:100,y:100}})},u=C=>{l(C)&&(o.value=o.value.filter(V=>V.id!==C),i.value=i.value.filter(V=>V.source!==C&&V.target!==C),o.value.forEach(V=>{V.data.relations&&(V.data.relations=V.data.relations?.filter(H=>H.targetModel!==C))}))},c=(C,D)=>{const V=l(C);if(!V)throw new Error(`Model does not exist: ${C}`);if(l(D))throw new Error(`Duplicate name: ${D}`);V.id=D,i.value.forEach(Z=>{Z.source===C&&(Z.source=D),Z.target===C&&(Z.target=D),Z.id=Z.id.replace(`(${C})`,`(${D})`)}),o.value.forEach(Z=>{Z.data.relations.forEach(ue=>{ue.targetModel===C&&(ue.targetModel=D)})})},d=(C,D)=>{const V=C.data.fields.find(Z=>Z.name===D),H=C.data.relations.find(Z=>Z.fieldName===D);return!!V||!!H},v=(C,D)=>{const V=l(C);if(!V)throw new Error(`Model does not exist: ${C}`);if(d(V,D.name))throw new Error(`Field name already exists for model: ${C}`);V.data.fields.push(D)},h=(C,D,V)=>{const H=l(C);if(!H)throw new Error(`Model does not exist: ${C}`);const Z=H.data.fields.findIndex(ue=>ue.name===D);if(Z===-1)throw new Error(`Field does not exist: ${D}`);H.data.fields[Z]=V,console.log(V)},w=(C,D)=>{const V=l(C);if(!V)throw new Error(`Model does not exist: ${C}`);V.data.fields=V.data.fields.filter(H=>H.name!==D)},E=(C,D,V)=>{const H=l(C);H&&(_(C,D,V.fieldName),H.data.relations.push(V))},N=(C,D,V)=>{const H=l(C);H&&(H.data.relations=H.data.relations.filter(Z=>Z.fieldName!==V),R(C,D,V))},$=(C,D,V,H)=>{const Z=l(C);if(!Z||!Z.data.relations)return;const ue=Z.data.relations.findIndex(ve=>ve.fieldName===V);Z.data.relations[ue]=H;const q=g(C,D,V),ie=k(q);if(!ie)return;const le=g(C,H.targetModel,H.fieldName);ie.id=le,ie.source=C,ie.target=H.targetModel},k=C=>i.value.find(D=>D.id===C),g=(C,D,V)=>`(${C})-(${D})-(${V})`,_=(C,D,V)=>{C!==D&&i.value.push({id:g(C,D,V),source:C,target:D,type:"smoothstep"})},R=(C,D,V)=>{i.value=i.value.filter(H=>H.id!==g(C,D,V))},G=C=>{const D=n.value.find(V=>V.name===C);if(!D)throw Error(`Enum not found: ${C}`);return D},K=(C,D)=>{const H=G(C).values.find(Z=>Z.name===D);if(!H)throw Error(`EnumValue not found: ${D}`);return H};return{nodes:o,edges:i,enums:n,createNode:a,createEdge:_,deleteNode:u,renameNode:c,addField:v,deleteField:w,updateField:h,addRelation:E,deleteRelation:N,updateRelation:$,projectSpec:e,isProjectNameConfirmed:t,setProjectName:C=>{e.value.project_name=C},getProjectName:()=>e.value.project_name,setDatabase:C=>{e.value.database=C},getDatabase:()=>e.value.database,findNodeById:l,findEnumByName:G,addEnum:C=>{const D={name:C,values:[]};return n.value.push(D),D},updateEnumName:(C,D)=>{const V=G(C);V.name=D,o.value.forEach(H=>{H.data.fields.forEach(Z=>{Z.type==="Enum"&&Z.typeEnum===C&&(Z.typeEnum=D)})})},deleteEnum:C=>{n.value=n.value.filter(D=>D.name!==C),o.value.forEach(D=>{D.data.fields=D.data.fields.filter(V=>V.typeEnum!==C)})},addEnumValue:(C,D)=>{G(C).values.push(D)},updateEnumValue:(C,D,V)=>{const H=K(C,D);H.name=V.name,H.value=V.value,console.log(C),console.log(V),o.value.forEach(Z=>{Z.data.fields.forEach(ue=>{ue.type==="Enum"&&ue.typeEnum===C&&(ue.defaultValue=V.name)})})},deleteEnumValue:(C,D)=>{const V=G(C);V.values=V.values.filter(H=>H.name!==D)},convertNodesToModel:s,callGenerateEndpoint:r}}),ch={class:"container"},dh={class:"input-group"},fh={class:"label-group"},hh={class:"project-name-length-indicator"},ph={class:"input-horizontal"},gh=["value","disabled"],vh=["disabled"],mh={key:0,class:"error-message"},yh={__name:"ProjectNameStep",setup(e){const t=bt(),n=J("asd"),o=J(!1),i=J(""),s=a=>/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(a),r=a=>{if(n.value=a.target.value,n.value.length===0){o.value=!1;return}s(n.value)?o.value=!1:(o.value=!0,i.value="Name must start with a letter/underscore and only contain letters, numbers, -, or _")},l=()=>{if(t.isProjectNameConfirmed){t.isProjectNameConfirmed=!1,t.setProjectName("");return}!n.value||o.value||(t.setProjectName(n.value),t.isProjectNameConfirmed=!0)};return dt(()=>{t.getProjectName()&&(n.value=t.getProjectName())}),(a,u)=>(Y(),ee("main",ch,[u[2]||(u[2]=x("h1",null,"Choose a Project Name",-1)),u[3]||(u[3]=x("br",null,null,-1)),x("div",dh,[x("div",fh,[u[1]||(u[1]=x("label",{class:"project-name-label",for:"project-name"},"Project Name",-1)),x("div",hh,Oe(n.value.length)+" / 50",1)]),x("div",ph,[x("input",{class:it(["project-name",{confirmed:ne(t).isProjectNameConfirmed,"input-error":o.value}]),type:"text",placeholder:"Enter your project name",value:n.value,onInput:u[0]||(u[0]=c=>r(c)),disabled:ne(t).isProjectNameConfirmed,maxlength:"50"},null,42,gh),x("button",{class:it(["confirm-btn",{confirmed:ne(t).isProjectNameConfirmed}]),onClick:l,disabled:o.value||!n.value}," Confirm ",10,vh)]),o.value?(Y(),ee("div",mh,Oe(i.value),1)):Te("",!0)])]))}},_h=Qe(yh,[["__scopeId","data-v-972cdc17"]]),bh={class:"container"},wh={class:"db-grid-container"},xh={class:"db-grid"},Eh=["onClick"],Sh=we({__name:"DatabaseStep",setup(e){const t=bt(),n=["PostgreSQL","MySQL","SQLite"],o=i=>{i==="PostgreSQL"&&t.setDatabase(t.getDatabase()===i?"":i)};return dt(()=>{t.getDatabase()&&t.getDatabase()!=="PostgreSQL"&&t.setDatabase("")}),(i,s)=>(Y(),ee("main",bh,[s[0]||(s[0]=x("h1",null,"Choose a Database",-1)),s[1]||(s[1]=x("br",null,null,-1)),x("div",wh,[x("div",xh,[(Y(),ee(Ee,null,st(n,r=>x("div",{class:it(["db-item",{confirmed:ne(t).getDatabase()===r,disabled:r!=="PostgreSQL",enabled:r==="PostgreSQL"}]),key:r,onClick:l=>o(r)},[x("span",null,Oe(r),1)],10,Eh)),64))])])]))}}),Nh=Qe(Sh,[["__scopeId","data-v-9256ee53"]]),Ch={class:"custom-node"},$h={class:"custom-node-header"},Mh={class:"custom-node-title"},Ih={key:0,class:"dropdown-list"},Th={class:"custom-node-body nodrag"},kh=["onClick"],Ph={class:"custom-node-field-name"},Ah={key:0,class:"custom-node-field-type"},Dh={key:1,class:"custom-node-field-type"},Oh=["onClick"],Vh={class:"custom-node-field-name"},Rh={class:"custom-node-field-type"},Bh=we({__name:"CustomNode",props:{id:{},data:{}},setup(e){const t=e,n=J(!1),o=()=>{n.value=!0},i=()=>{n.value=!1};return(s,r)=>(Y(),ee("div",Ch,[x("div",$h,[x("div",Mh,Oe(s.id),1),x("div",{class:"custom-node-actions nodrag",onMouseover:o,onMouseleave:i},[r[4]||(r[4]=x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-ellipsis"},[x("circle",{cx:"12",cy:"12",r:"1"}),x("circle",{cx:"19",cy:"12",r:"1"}),x("circle",{cx:"5",cy:"12",r:"1"})],-1)),n.value?(Y(),ee("div",Ih,[x("div",{class:"dropdown-item",onClick:r[0]||(r[0]=l=>s.$emit("add-field",t.id))},"Add Field"),x("div",{class:"dropdown-item",onClick:r[1]||(r[1]=l=>s.$emit("add-relation",t.id))},"Add Relation"),x("div",{class:"dropdown-item",onClick:r[2]||(r[2]=l=>s.$emit("rename-node",t.id))},"Rename"),x("div",{class:"dropdown-item",onClick:r[3]||(r[3]=l=>s.$emit("delete-node",t.id))},"Delete")])):Te("",!0)],32)]),x("div",Th,[(Y(!0),ee(Ee,null,st(s.data.fields,l=>(Y(),ee("div",{key:l.name,class:"custom-node-field-row",onClick:a=>s.$emit("open-edit-field-modal",t.id,l)},[x("div",Ph,Oe(l.name),1),l.type!=="Enum"?(Y(),ee("div",Ah,Oe(l.type),1)):(Y(),ee("div",Dh,Oe(l.type)+"("+Oe(l.typeEnum)+")",1))],8,kh))),128)),(Y(!0),ee(Ee,null,st(s.data.relations,l=>(Y(),ee("div",{key:l.fieldName,class:"custom-node-field-row",onClick:a=>s.$emit("open-edit-relation-modal",t.id,l)},[x("div",Vh,Oe(l.fieldName),1),x("div",Rh,Oe(l.targetModel),1)],8,Oh))),128))])]))}}),zh=Qe(Bh,[["__scopeId","data-v-b7467be7"]]),Vt=_u("modal",()=>{const e=J(!1),t=J(""),n=yo(null),o=J({});function i(r,l,a={}){n.value=Xt(l),o.value=a,t.value=r,e.value=!0}function s(){e.value=!1,n.value=null,o.value={},t.value=""}return{isOpen:e,modalTitle:t,currentComponent:n,props:o,open:i,close:s}}),Fh={class:"field-modal-container"},Hh={class:"input-container"},Lh={class:"input-group"},Uh={class:"input-group"},Gh=["disabled"],Yh={key:0,class:"input-group"},Kh=["value"],jh={class:"input-group"},Xh=["disabled"],Wh=["value"],Zh=["disabled"],qh={class:"checkbox-group"},Jh={key:0,class:"checkbox-group"},Qh=we({__name:"AddFieldModal",props:{id:{}},setup(e){const t=e,n=bt(),o=Vt(),i=J(),s=J(""),r=J(""),l=J(""),a=J(!1),u=J(!1),c=J(!1),d=J(!1),v=J(null),h=J({}),w=J(!1),E=J(!1);be(a,k=>{k&&(r.value="UUID",l.value="uuid.uuid4")});const N=()=>{l.value==="datetime.now(timezone.utc)"&&(l.value=""),h.value={}};be(w,k=>{k?(E.value=!1,l.value="datetime.now(timezone.utc)",h.value={}):E.value||N()}),be(E,k=>{k?(w.value=!1,l.value="datetime.now(timezone.utc)",h.value={onupdate:"datetime.now(timezone.utc)"}):w.value||N()}),be(r,k=>{k!=="DateTime"&&(w.value||E.value)&&(N(),w.value=!1,E.value=!1)});const $=()=>{!s.value||!r.value||(n.addField(t.id,{name:s.value,type:r.value,typeEnum:i.value?.name,isPrimaryKey:a.value,isNullable:u.value,isUnique:c.value,isIndex:d.value,defaultValue:l.value||void 0,metadata:v.value||void 0}),o.close())};return(k,g)=>(Y(),ee("main",Fh,[x("div",Hh,[x("div",Lh,[g[11]||(g[11]=x("label",{class:"field-label"},"Field name",-1)),me(x("input",{class:"field-input","onUpdate:modelValue":g[0]||(g[0]=_=>s.value=_),type:"text"},null,512),[[Je,s.value]])]),x("div",Uh,[g[13]||(g[13]=x("label",{class:"field-label"},"Type",-1)),me(x("select",{class:"field-select","onUpdate:modelValue":g[1]||(g[1]=_=>r.value=_),disabled:a.value},g[12]||(g[12]=[vr('',8)]),8,Gh),[[At,r.value]])]),r.value==="Enum"?(Y(),ee("div",Yh,[g[15]||(g[15]=x("label",{class:"field-label"},"Select Enum",-1)),me(x("select",{class:"field-select","onUpdate:modelValue":g[2]||(g[2]=_=>i.value=_)},[g[14]||(g[14]=x("option",{disabled:"",value:""},"-- Select Enum --",-1)),(Y(!0),ee(Ee,null,st(ne(n).enums,_=>(Y(),ee("option",{key:_.name,value:_},Oe(_.name),9,Kh))),128))],512),[[At,i.value]])])):Te("",!0),x("div",jh,[g[17]||(g[17]=x("label",{class:"field-label"},"Default value",-1)),r.value==="Enum"?me((Y(),ee("select",{key:0,class:"field-select","onUpdate:modelValue":g[3]||(g[3]=_=>l.value=_),disabled:a.value},[g[16]||(g[16]=x("option",{value:""},null,-1)),(Y(!0),ee(Ee,null,st(i.value?.values,_=>(Y(),ee("option",{key:_.name,value:_.name},Oe(_.name),9,Wh))),128))],8,Xh)),[[At,l.value]]):me((Y(),ee("input",{key:1,class:"field-input","onUpdate:modelValue":g[4]||(g[4]=_=>l.value=_),type:"text",disabled:a.value},null,8,Zh)),[[Je,l.value]])])]),x("div",qh,[x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[5]||(g[5]=_=>a.value=_)},null,512),[[Ue,a.value]]),g[18]||(g[18]=Fe(" Primary key",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[6]||(g[6]=_=>u.value=_)},null,512),[[Ue,u.value]]),g[19]||(g[19]=Fe(" Nullable",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[7]||(g[7]=_=>c.value=_)},null,512),[[Ue,c.value]]),g[20]||(g[20]=Fe(" Unique",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[8]||(g[8]=_=>d.value=_)},null,512),[[Ue,d.value]]),g[21]||(g[21]=Fe(" Index",-1))])]),r.value==="DateTime"?(Y(),ee("div",Jh,[g[24]||(g[24]=x("label",{class:"field-label"},"Timestamp",-1)),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[9]||(g[9]=_=>w.value=_)},null,512),[[Ue,w.value]]),g[22]||(g[22]=Fe(" Created",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[10]||(g[10]=_=>E.value=_)},null,512),[[Ue,E.value]]),g[23]||(g[23]=Fe(" Updated",-1))])])):Te("",!0),x("div",{class:"action-group"},[x("button",{class:"save-field-btn",onClick:$},"Save")])]))}}),ep=Qe(Qh,[["__scopeId","data-v-0d20b65f"]]),tp={class:"field-modal-container"},np={class:"input-container"},op={class:"input-group"},ip={class:"input-group"},sp=["disabled"],rp={key:0,class:"input-group"},lp=["value"],ap={class:"input-group"},up=["disabled"],cp=["value"],dp=["disabled"],fp={class:"checkbox-group"},hp={key:0,class:"checkbox-group"},pp=we({__name:"EditFieldModal",props:{id:{},field:{}},setup(e){const t=e,n=bt(),o=Vt(),i=J(),s=J(t.field.name),r=J(t.field.type),l=J(t.field.defaultValue||""),a=J(t.field.isPrimaryKey||!1),u=J(t.field.isNullable||!1),c=J(t.field.isUnique||!1),d=J(t.field.isIndex||!1),v=J(t.field.extraKwargs||{}),h=J(t.field.metadata?.isCreatedAtTimestamp||!1),w=J(t.field.metadata?.isUpdatedAtTimestamp||!1);dt(()=>{t.field.type==="Enum"&&t.field.typeEnum&&(i.value=n.findEnumByName(t.field.typeEnum)),t.field.type==="DateTime"&&console.log(h.value)}),be(a,k=>{k&&(r.value="UUID",l.value="uuid.uuid4")});const E=()=>{l.value="",v.value={}};be(h,k=>{k?(w.value=!1,l.value="datetime.now(timezone.utc)",v.value={}):w.value||E()}),be(w,k=>{k?(h.value=!1,l.value="datetime.now(timezone.utc)",v.value={onupdate:"datetime.now(timezone.utc)"}):h.value||E()}),be(r,k=>{console.log(r.value,k),k!=="DateTime"&&(h.value||w.value)&&(E(),h.value=!1,w.value=!1)});const N=()=>{n.updateField(t.id,t.field.name,{name:s.value,type:r.value,typeEnum:i.value?.name,defaultValue:l.value||void 0,isPrimaryKey:a.value,isNullable:u.value,isUnique:c.value,isIndex:d.value,metadata:{isCreatedAtTimestamp:h.value,isUpdatedAtTimestamp:w.value},extraKwargs:Object.keys(v.value).length?v.value:void 0}),o.close()},$=()=>{n.deleteField(t.id,t.field.name),o.close()};return(k,g)=>(Y(),ee("main",tp,[x("div",np,[x("div",op,[g[11]||(g[11]=x("label",{class:"field-label"},"Field name",-1)),me(x("input",{class:"field-input","onUpdate:modelValue":g[0]||(g[0]=_=>s.value=_),type:"text"},null,512),[[Je,s.value]])]),x("div",ip,[g[13]||(g[13]=x("label",{class:"field-label"},"Type",-1)),me(x("select",{class:"field-select","onUpdate:modelValue":g[1]||(g[1]=_=>r.value=_),disabled:a.value},g[12]||(g[12]=[vr('',8)]),8,sp),[[At,r.value]])]),r.value==="Enum"?(Y(),ee("div",rp,[g[15]||(g[15]=x("label",{class:"field-label"},"Select Enum",-1)),me(x("select",{class:"field-select","onUpdate:modelValue":g[2]||(g[2]=_=>i.value=_)},[g[14]||(g[14]=x("option",{disabled:"",value:""},"-- Select Enum --",-1)),(Y(!0),ee(Ee,null,st(ne(n).enums,_=>(Y(),ee("option",{key:_.name,value:_},Oe(_.name),9,lp))),128))],512),[[At,i.value]])])):Te("",!0),x("div",ap,[g[17]||(g[17]=x("label",{class:"field-label"},"Default value",-1)),r.value==="Enum"?me((Y(),ee("select",{key:0,class:"field-select","onUpdate:modelValue":g[3]||(g[3]=_=>l.value=_),disabled:a.value},[g[16]||(g[16]=x("option",{value:""},null,-1)),(Y(!0),ee(Ee,null,st(i.value?.values,_=>(Y(),ee("option",{key:_.name,value:_.name},Oe(_.name),9,cp))),128))],8,up)),[[At,l.value]]):me((Y(),ee("input",{key:1,class:"field-input","onUpdate:modelValue":g[4]||(g[4]=_=>l.value=_),type:"text",disabled:a.value},null,8,dp)),[[Je,l.value]])])]),x("div",fp,[x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[5]||(g[5]=_=>a.value=_)},null,512),[[Ue,a.value]]),g[18]||(g[18]=Fe(" Primary key",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[6]||(g[6]=_=>u.value=_)},null,512),[[Ue,u.value]]),g[19]||(g[19]=Fe(" Nullable",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[7]||(g[7]=_=>c.value=_)},null,512),[[Ue,c.value]]),g[20]||(g[20]=Fe(" Unique",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[8]||(g[8]=_=>d.value=_)},null,512),[[Ue,d.value]]),g[21]||(g[21]=Fe(" Index",-1))])]),r.value==="DateTime"?(Y(),ee("div",hp,[g[24]||(g[24]=x("label",{class:"field-label"},"Timestamp",-1)),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[9]||(g[9]=_=>h.value=_)},null,512),[[Ue,h.value]]),g[22]||(g[22]=Fe(" Created",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":g[10]||(g[10]=_=>w.value=_)},null,512),[[Ue,w.value]]),g[23]||(g[23]=Fe(" Updated",-1))])])):Te("",!0),x("div",{class:"action-group"},[x("button",{class:"save-field-btn",onClick:N},"Save"),x("button",{class:"delete-field-btn",onClick:$},"Delete")])]))}}),gp=Qe(pp,[["__scopeId","data-v-4e80b4aa"]]),vp={class:"relation-container"},mp={class:"input-container"},yp={class:"input-group"},_p={class:"input-group"},bp=["value"],wp={class:"input-group"},xp={class:"input-group"},Ep={class:"checkbox-group"},Sp=we({__name:"EditRelationModal",props:{id:{},relation:{}},setup(e){const t=e,n=bt(),o=Vt(),i=J(""),s=J(""),r=J(""),l=J(""),a=J(""),u=J(!1),c=J(!1),d=J(!1);dt(()=>{i.value=t.relation.fieldName||"",s.value=t.relation.fieldName||"",r.value=t.relation.targetModel||"",l.value=t.relation.onDelete||"",a.value=t.relation.backPopulates||"",u.value=t.relation.isNullable||!1,c.value=t.relation.isUnique||!1,d.value=t.relation.isIndex||!1});const v=he(()=>n.nodes.filter(E=>E.id!==t.id)),h=()=>{!r.value||!s.value||(n.updateRelation(t.id,t.relation.targetModel,t.relation.fieldName,{fieldName:s.value,targetModel:r.value,backPopulates:a.value,onDelete:l.value,isNullable:u.value,isUnique:c.value,isIndex:d.value}),o.close())},w=()=>{n.deleteRelation(t.id,t.relation.targetModel,t.relation.fieldName),o.close()};return(E,N)=>(Y(),ee("main",vp,[x("div",mp,[x("div",yp,[N[7]||(N[7]=x("label",{class:"relation-label"},"Field name",-1)),me(x("input",{class:"relation-input","onUpdate:modelValue":N[0]||(N[0]=$=>s.value=$),type:"text"},null,512),[[Je,s.value]])]),x("div",_p,[N[9]||(N[9]=x("label",{class:"relation-label"},"Target model",-1)),me(x("select",{class:"relation-select","onUpdate:modelValue":N[1]||(N[1]=$=>r.value=$)},[N[8]||(N[8]=x("option",{disabled:"",value:""},"-- Select a model --",-1)),(Y(!0),ee(Ee,null,st(v.value,$=>(Y(),ee("option",{key:$.id,value:$.id},Oe($.id),9,bp))),128))],512),[[At,r.value]])]),x("div",wp,[N[11]||(N[11]=x("label",{class:"relation-label"},"OnDelete",-1)),me(x("select",{class:"relation-select","onUpdate:modelValue":N[2]||(N[2]=$=>l.value=$)},N[10]||(N[10]=[x("option",{disabled:"",value:""},"-- Select behavior --",-1),x("option",{value:"CASCADE"},"CASCADE",-1),x("option",{value:"SET_NULL"},"SET_NULL",-1)]),512),[[At,l.value]])]),x("div",xp,[N[12]||(N[12]=x("label",{class:"relation-label"},"Back populates",-1)),me(x("input",{class:"relation-input","onUpdate:modelValue":N[3]||(N[3]=$=>a.value=$),type:"text"},null,512),[[Je,a.value]])])]),x("div",Ep,[x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":N[4]||(N[4]=$=>u.value=$)},null,512),[[Ue,u.value]]),N[13]||(N[13]=Fe(" Nullable",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":N[5]||(N[5]=$=>c.value=$)},null,512),[[Ue,c.value]]),N[14]||(N[14]=Fe(" Unique",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":N[6]||(N[6]=$=>d.value=$)},null,512),[[Ue,d.value]]),N[15]||(N[15]=Fe(" Index",-1))])]),x("div",{class:"action-group"},[x("button",{class:"delete-relation-btn",onClick:w},"Delete"),x("button",{class:"save-relation-btn",onClick:h},"Save")])]))}}),Np=Qe(Sp,[["__scopeId","data-v-93b02a9f"]]),Cp={class:"relation-container"},$p={class:"input-container"},Mp={class:"input-group"},Ip={class:"input-group"},Tp=["value"],kp={class:"input-group"},Pp={class:"input-group"},Ap={class:"checkbox-group"},Dp=we({__name:"AddRelationModal",props:{id:{}},setup(e){const t=e,n=bt(),o=Vt(),i=J(""),s=J(""),r=J(""),l=J(""),a=J(!1),u=J(!1),c=J(!1),d=he(()=>n.nodes.filter(h=>h.id!==t.id)),v=()=>{!s.value||!i.value||(n.addRelation(t.id,s.value,{fieldName:i.value,targetModel:s.value,backPopulates:l.value,onDelete:r.value,isNullable:a.value,isUnique:u.value,isIndex:c.value}),o.close())};return(h,w)=>(Y(),ee("main",Cp,[x("div",$p,[x("div",Mp,[w[7]||(w[7]=x("label",{class:"relation-label"},"Field name",-1)),me(x("input",{class:"relation-input","onUpdate:modelValue":w[0]||(w[0]=E=>i.value=E),type:"text"},null,512),[[Je,i.value]])]),x("div",Ip,[w[9]||(w[9]=x("label",{class:"relation-label"},"Target model",-1)),me(x("select",{class:"relation-select","onUpdate:modelValue":w[1]||(w[1]=E=>s.value=E)},[w[8]||(w[8]=x("option",{disabled:"",value:""},"-- Select a model --",-1)),(Y(!0),ee(Ee,null,st(d.value,E=>(Y(),ee("option",{key:E.id,value:E.id},Oe(E.id),9,Tp))),128))],512),[[At,s.value]])]),x("div",kp,[w[11]||(w[11]=x("label",{class:"relation-label"},"OnDelete",-1)),me(x("select",{class:"relation-select","onUpdate:modelValue":w[2]||(w[2]=E=>r.value=E)},w[10]||(w[10]=[x("option",{disabled:"",value:""},"-- Select behavior --",-1),x("option",{value:"CASCADE"},"CASCADE",-1),x("option",{value:"SET_NULL"},"SET_NULL",-1)]),512),[[At,r.value]])]),x("div",Pp,[w[12]||(w[12]=x("label",{class:"relation-label"},"Back populates",-1)),me(x("input",{class:"relation-input","onUpdate:modelValue":w[3]||(w[3]=E=>l.value=E),type:"text"},null,512),[[Je,l.value]])])]),x("div",Ap,[x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":w[4]||(w[4]=E=>a.value=E)},null,512),[[Ue,a.value]]),w[13]||(w[13]=Fe(" Nullable",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":w[5]||(w[5]=E=>u.value=E)},null,512),[[Ue,u.value]]),w[14]||(w[14]=Fe(" Unique",-1))]),x("label",null,[me(x("input",{type:"checkbox","onUpdate:modelValue":w[6]||(w[6]=E=>c.value=E)},null,512),[[Ue,c.value]]),w[15]||(w[15]=Fe(" Index",-1))])]),x("div",{class:"action-group"},[x("button",{class:"save-relation-btn",onClick:v},"Save")])]))}}),Op=Qe(Dp,[["__scopeId","data-v-5198451c"]]),Vp={class:"rename-node-modal"},Rp={class:"input-container"},Bp={class:"input-group"},zp=we({__name:"RenameNodeModal",props:{id:{}},setup(e){const t=e,n=bt(),o=Vt(),i=J(t.id),s=()=>{if(!i.value.trim()||i.value===t.id){o.close();return}n.renameNode(t.id,i.value.trim()),o.close()};return(r,l)=>(Y(),ee("main",Vp,[x("div",Rp,[x("div",Bp,[l[1]||(l[1]=x("label",{class:"field-label"},"New model name",-1)),me(x("input",{class:"field-input","onUpdate:modelValue":l[0]||(l[0]=a=>i.value=a),type:"text"},null,512),[[Je,i.value]])])]),x("div",{class:"action-group"},[x("button",{class:"save-btn",onClick:s},"Rename")])]))}}),Fp=Qe(zp,[["__scopeId","data-v-bdab72ab"]]);function zi(e){return Ti()?(io(e),!0):!1}function Ut(e){return typeof e=="function"?e():ne(e)}const Hp=typeof window<"u"&&typeof document<"u",Lp=e=>typeof e<"u",Up=Object.prototype.toString,Gp=e=>Up.call(e)==="[object Object]",Yp=()=>{};function Kp(e,t){function n(...o){return new Promise((i,s)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(s)})}return n}const bu=e=>e();function jp(e=bu){const t=J(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...s)=>{t.value&&e(...s)};return{isActive:sr(t),pause:n,resume:o,eventFilter:i}}function gl(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function Xp(e,t,n={}){const{eventFilter:o=bu,...i}=n;return be(e,Kp(o,t),i)}function Tn(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:s,pause:r,resume:l,isActive:a}=jp(o);return{stop:Xp(e,t,{...i,eventFilter:s}),pause:r,resume:l,isActive:a}}function Wp(e,t={}){if(!De(e))return Ca(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=ad(()=>({get(){return e.value[o]},set(i){var s;if((s=Ut(t.replaceRef))!=null?s:!0)if(Array.isArray(e.value)){const l=[...e.value];l[o]=i,e.value=l}else{const l={...e.value,[o]:i};Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[o]=i}}));return n}function Ds(e,t=!1){function n(d,{flush:v="sync",deep:h=!1,timeout:w,throwOnTimeout:E}={}){let N=null;const k=[new Promise(g=>{N=be(e,_=>{d(_)!==t&&(N?.(),g(_))},{flush:v,deep:h,immediate:!0})})];return w!=null&&k.push(gl(w,E).then(()=>Ut(e)).finally(()=>N?.())),Promise.race(k)}function o(d,v){if(!De(d))return n(_=>_===d,v);const{flush:h="sync",deep:w=!1,timeout:E,throwOnTimeout:N}=v??{};let $=null;const g=[new Promise(_=>{$=be([e,d],([R,G])=>{t!==(R===G)&&($?.(),_(R))},{flush:h,deep:w,immediate:!0})})];return E!=null&&g.push(gl(E,N).then(()=>Ut(e)).finally(()=>($?.(),Ut(e)))),Promise.race(g)}function i(d){return n(v=>!!v,d)}function s(d){return o(null,d)}function r(d){return o(void 0,d)}function l(d){return n(Number.isNaN,d)}function a(d,v){return n(h=>{const w=Array.from(h);return w.includes(d)||w.includes(Ut(d))},v)}function u(d){return c(1,d)}function c(d=1,v){let h=-1;return n(()=>(h+=1,h>=d),v)}return Array.isArray(Ut(e))?{toMatch:n,toContains:a,changed:u,changedTimes:c,get not(){return Ds(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:s,toBeNaN:l,toBeUndefined:r,changed:u,changedTimes:c,get not(){return Ds(e,!t)}}}function Os(e){return Ds(e)}function Zp(e){var t;const n=Ut(e);return(t=n?.$el)!=null?t:n}const wu=Hp?window:void 0;function xu(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=wu):[t,n,o,i]=e,!t)return Yp;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],r=()=>{s.forEach(c=>c()),s.length=0},l=(c,d,v,h)=>(c.addEventListener(d,v,h),()=>c.removeEventListener(d,v,h)),a=be(()=>[Zp(t),Ut(i)],([c,d])=>{if(r(),!c)return;const v=Gp(d)?{...d}:d;s.push(...n.flatMap(h=>o.map(w=>l(c,h,w,v))))},{immediate:!0,flush:"post"}),u=()=>{a(),r()};return zi(u),u}function qp(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function vl(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=wu,eventName:s="keydown",passive:r=!1,dedupe:l=!1}=o,a=qp(t);return xu(i,s,c=>{c.repeat&&Ut(l)||a(c)&&n(c)},r)}function Jp(e){return JSON.parse(JSON.stringify(e))}function as(e,t,n,o={}){var i,s,r;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:v}=o,h=hn(),w=n||h?.emit||((i=h?.$emit)==null?void 0:i.bind(h))||((r=(s=h?.proxy)==null?void 0:s.$emit)==null?void 0:r.bind(h?.proxy));let E=u;t||(t="modelValue"),E=E||`update:${t.toString()}`;const N=g=>l?typeof l=="function"?l(g):Jp(g):g,$=()=>Lp(e[t])?N(e[t]):d,k=g=>{v?v(g)&&w(E,g):w(E,g)};if(a){const g=$(),_=J(g);let R=!1;return be(()=>e[t],G=>{R||(R=!0,_.value=N(G),ut(()=>R=!1))}),be(_,G=>{!R&&(G!==e[t]||c)&&k(G)},{deep:c}),_}else return he({get(){return $()},set(g){k(g)}})}var Qp={value:()=>{}};function Fi(){for(var e=0,t=arguments.length,n={},o;e=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}ti.prototype=Fi.prototype={constructor:ti,on:function(e,t){var n=this._,o=eg(e+"",n),i,s=-1,r=o.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),o=0,i,s;o=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),yl.hasOwnProperty(t)?{space:yl[t],local:e}:e}function ng(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Vs&&t.documentElement.namespaceURI===Vs?t.createElement(e):t.createElementNS(n,e)}}function og(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Eu(e){var t=Hi(e);return(t.local?og:ng)(t)}function ig(){}function yr(e){return e==null?ig:function(){return this.querySelector(e)}}function sg(e){typeof e!="function"&&(e=yr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i=g&&(g=k+1);!(R=N[g])&&++g=0;)(r=o[i])&&(s&&r.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(r,s),s=r);return this}function Tg(e){e||(e=kg);function t(d,v){return d&&v?e(d.__data__,v.__data__):!d-!v}for(var n=this._groups,o=n.length,i=new Array(o),s=0;st?1:e>=t?0:NaN}function Pg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ag(){return Array.from(this)}function Dg(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Yg:typeof t=="function"?jg:Kg)(e,t,n??"")):Un(this.node(),e)}function Un(e,t){return e.style.getPropertyValue(t)||Mu(e).getComputedStyle(e,null).getPropertyValue(t)}function Wg(e){return function(){delete this[e]}}function Zg(e,t){return function(){this[e]=t}}function qg(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Jg(e,t){return arguments.length>1?this.each((t==null?Wg:typeof t=="function"?qg:Zg)(e,t)):this.node()[e]}function Iu(e){return e.trim().split(/^|\s+/)}function _r(e){return e.classList||new Tu(e)}function Tu(e){this._node=e,this._names=Iu(e.getAttribute("class")||"")}Tu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function ku(e,t){for(var n=_r(e),o=-1,i=t.length;++o=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Cv(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,s;n()=>e;function Rs(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:s,x:r,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:r,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Rs.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Vv(e){return!e.ctrlKey&&!e.button}function Rv(){return this.parentNode}function Bv(e,t){return t??{x:e.x,y:e.y}}function zv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fv(){var e=Vv,t=Rv,n=Bv,o=zv,i={},s=Fi("start","drag","end"),r=0,l,a,u,c,d=0;function v(_){_.on("mousedown.drag",h).filter(o).on("touchstart.drag",N).on("touchmove.drag",$,Ov).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(_,R){if(!(c||!e.call(this,_,R))){var G=g(this,t.call(this,_,R),_,R,"mouse");G&&(gt(_.view).on("mousemove.drag",w,Eo).on("mouseup.drag",E,Eo),Ou(_.view),us(_),u=!1,l=_.clientX,a=_.clientY,G("start",_))}}function w(_){if(Vn(_),!u){var R=_.clientX-l,G=_.clientY-a;u=R*R+G*G>d}i.mouse("drag",_)}function E(_){gt(_.view).on("mousemove.drag mouseup.drag",null),Vu(_.view,u),Vn(_),i.mouse("end",_)}function N(_,R){if(e.call(this,_,R)){var G=_.changedTouches,K=t.call(this,_,R),F=G.length,X,te;for(X=0;X>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Lv.exec(e))?new lt(t[1],t[2],t[3],1):(t=Uv.exec(e))?new lt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Gv.exec(e))?Lo(t[1],t[2],t[3],t[4]):(t=Yv.exec(e))?Lo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Kv.exec(e))?Nl(t[1],t[2]/100,t[3]/100,1):(t=jv.exec(e))?Nl(t[1],t[2]/100,t[3]/100,t[4]):_l.hasOwnProperty(e)?xl(_l[e]):e==="transparent"?new lt(NaN,NaN,NaN,0):null}function xl(e){return new lt(e>>16&255,e>>8&255,e&255,1)}function Lo(e,t,n,o){return o<=0&&(e=t=n=NaN),new lt(e,t,n,o)}function Zv(e){return e instanceof Vo||(e=Nn(e)),e?(e=e.rgb(),new lt(e.r,e.g,e.b,e.opacity)):new lt}function Bs(e,t,n,o){return arguments.length===1?Zv(e):new lt(e,t,n,o??1)}function lt(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}br(lt,Bs,Ru(Vo,{brighter(e){return e=e==null?gi:Math.pow(gi,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?So:Math.pow(So,e),new lt(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new lt(xn(this.r),xn(this.g),xn(this.b),vi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:El,formatHex:El,formatHex8:qv,formatRgb:Sl,toString:Sl}));function El(){return`#${_n(this.r)}${_n(this.g)}${_n(this.b)}`}function qv(){return`#${_n(this.r)}${_n(this.g)}${_n(this.b)}${_n((isNaN(this.opacity)?1:this.opacity)*255)}`}function Sl(){const e=vi(this.opacity);return`${e===1?"rgb(":"rgba("}${xn(this.r)}, ${xn(this.g)}, ${xn(this.b)}${e===1?")":`, ${e})`}`}function vi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _n(e){return e=xn(e),(e<16?"0":"")+e.toString(16)}function Nl(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new vt(e,t,n,o)}function Bu(e){if(e instanceof vt)return new vt(e.h,e.s,e.l,e.opacity);if(e instanceof Vo||(e=Nn(e)),!e)return new vt;if(e instanceof vt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),s=Math.max(t,n,o),r=NaN,l=s-i,a=(s+i)/2;return l?(t===s?r=(n-o)/l+(n0&&a<1?0:r,new vt(r,l,a,e.opacity)}function Jv(e,t,n,o){return arguments.length===1?Bu(e):new vt(e,t,n,o??1)}function vt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}br(vt,Jv,Ru(Vo,{brighter(e){return e=e==null?gi:Math.pow(gi,e),new vt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?So:Math.pow(So,e),new vt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new lt(cs(e>=240?e-240:e+120,i,o),cs(e,i,o),cs(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new vt(Cl(this.h),Uo(this.s),Uo(this.l),vi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=vi(this.opacity);return`${e===1?"hsl(":"hsla("}${Cl(this.h)}, ${Uo(this.s)*100}%, ${Uo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Cl(e){return e=(e||0)%360,e<0?e+360:e}function Uo(e){return Math.max(0,Math.min(1,e||0))}function cs(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const wr=e=>()=>e;function Qv(e,t){return function(n){return e+n*t}}function em(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function tm(e){return(e=+e)==1?zu:function(t,n){return n-t?em(t,n,e):wr(isNaN(t)?n:t)}}function zu(e,t){var n=t-e;return n?Qv(e,n):wr(isNaN(e)?t:e)}const mi=function e(t){var n=tm(t);function o(i,s){var r=n((i=Bs(i)).r,(s=Bs(s)).r),l=n(i.g,s.g),a=n(i.b,s.b),u=zu(i.opacity,s.opacity);return function(c){return i.r=r(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return o.gamma=e,o}(1);function nm(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(s){for(i=0;in&&(s=t.slice(n,s),l[r]?l[r]+=s:l[++r]=s),(o=o[0])===(i=i[0])?l[r]?l[r]+=i:l[++r]=i:(l[++r]=null,a.push({i:r,x:It(o,i)})),n=ds.lastIndex;return n180?c+=360:c-u>180&&(u+=360),v.push({i:d.push(i(d)+"rotate(",null,o)-2,x:It(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function l(u,c,d,v){u!==c?v.push({i:d.push(i(d)+"skewX(",null,o)-2,x:It(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function a(u,c,d,v,h,w){if(u!==d||c!==v){var E=h.push(i(h)+"scale(",null,",",null,")");w.push({i:E-4,x:It(u,d)},{i:E-2,x:It(c,v)})}else(d!==1||v!==1)&&h.push(i(h)+"scale("+d+","+v+")")}return function(u,c){var d=[],v=[];return u=e(u),c=e(c),s(u.translateX,u.translateY,c.translateX,c.translateY,d,v),r(u.rotate,c.rotate,d,v),l(u.skewX,c.skewX,d,v),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,v),u=c=null,function(h){for(var w=-1,E=v.length,N;++w=0&&e._call.call(void 0,t),e=e._next;--Gn}function Il(){Cn=(_i=Co.now())+Li,Gn=eo=0;try{mm()}finally{Gn=0,_m(),Cn=0}}function ym(){var e=Co.now(),t=e-_i;t>Uu&&(Li-=t,_i=e)}function _m(){for(var e,t=yi,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:yi=n);to=e,Hs(o)}function Hs(e){if(!Gn){eo&&(eo=clearTimeout(eo));var t=e-Cn;t>24?(e<1/0&&(eo=setTimeout(Il,e-Co.now()-Li)),qn&&(qn=clearInterval(qn))):(qn||(_i=Co.now(),qn=setInterval(ym,Uu)),Gn=1,Gu(Il))}}function Tl(e,t,n){var o=new bi;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var bm=Fi("start","end","cancel","interrupt"),wm=[],Ku=0,kl=1,Ls=2,oi=3,Pl=4,Us=5,ii=6;function Ui(e,t,n,o,i,s){var r=e.__transition;if(!r)e.__transition={};else if(n in r)return;xm(e,n,{name:t,index:o,group:i,on:bm,tween:wm,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Ku})}function Er(e,t){var n=wt(e,t);if(n.state>Ku)throw new Error("too late; already scheduled");return n}function Rt(e,t){var n=wt(e,t);if(n.state>oi)throw new Error("too late; already running");return n}function wt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function xm(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Yu(s,0,n.time);function s(u){n.state=kl,n.timer.restart(r,n.delay,n.time),n.delay<=u&&r(u-n.delay)}function r(u){var c,d,v,h;if(n.state!==kl)return a();for(c in o)if(h=o[c],h.name===n.name){if(h.state===oi)return Tl(r);h.state===Pl?(h.state=ii,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+cLs&&o.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function Jm(e,t,n){var o,i,s=qm(t)?Er:Rt;return function(){var r=s(this,e),l=r.on;l!==o&&(i=(o=l).copy()).on(t,n),r.on=i}}function Qm(e,t){var n=this._id;return arguments.length<2?wt(this.node(),n).on.on(e):this.each(Jm(n,e,t))}function ey(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ty(){return this.on("end.remove",ey(this._id))}function ny(e){var t=this._name,n=this._id;typeof e!="function"&&(e=yr(e));for(var o=this._groups,i=o.length,s=new Array(i),r=0;r()=>e;function $y(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Gt(e,t,n){this.k=e,this.x=t,this.y=n}Gt.prototype={constructor:Gt,scale:function(e){return e===1?this:new Gt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Gt(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Yn=new Gt(1,0,0);Gt.prototype;function fs(e){e.stopImmediatePropagation()}function Jn(e){e.preventDefault(),e.stopImmediatePropagation()}function My(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Iy(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Al(){return this.__zoom||Yn}function Ty(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ky(){return navigator.maxTouchPoints||"ontouchstart"in this}function Py(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],r=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}function Ay(){var e=My,t=Iy,n=Py,o=Ty,i=ky,s=[0,1/0],r=[[-1/0,-1/0],[1/0,1/0]],l=250,a=ni,u=Fi("start","zoom","end"),c,d,v,h=500,w=150,E=0,N=10;function $(M){M.property("__zoom",Al).on("wheel.zoom",F,{passive:!1}).on("mousedown.zoom",X).on("dblclick.zoom",te).filter(i).on("touchstart.zoom",W).on("touchmove.zoom",P).on("touchend.zoom touchcancel.zoom",oe).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}$.transform=function(M,U,T,z){var C=M.selection?M.selection():M;C.property("__zoom",Al),M!==C?R(M,U,T,z):C.interrupt().each(function(){G(this,arguments).event(z).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},$.scaleBy=function(M,U,T,z){$.scaleTo(M,function(){var C=this.__zoom.k,D=typeof U=="function"?U.apply(this,arguments):U;return C*D},T,z)},$.scaleTo=function(M,U,T,z){$.transform(M,function(){var C=t.apply(this,arguments),D=this.__zoom,V=T==null?_(C):typeof T=="function"?T.apply(this,arguments):T,H=D.invert(V),Z=typeof U=="function"?U.apply(this,arguments):U;return n(g(k(D,Z),V,H),C,r)},T,z)},$.translateBy=function(M,U,T,z){$.transform(M,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof T=="function"?T.apply(this,arguments):T),t.apply(this,arguments),r)},null,z)},$.translateTo=function(M,U,T,z,C){$.transform(M,function(){var D=t.apply(this,arguments),V=this.__zoom,H=z==null?_(D):typeof z=="function"?z.apply(this,arguments):z;return n(Yn.translate(H[0],H[1]).scale(V.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof T=="function"?-T.apply(this,arguments):-T),D,r)},z,C)};function k(M,U){return U=Math.max(s[0],Math.min(s[1],U)),U===M.k?M:new Gt(U,M.x,M.y)}function g(M,U,T){var z=U[0]-T[0]*M.k,C=U[1]-T[1]*M.k;return z===M.x&&C===M.y?M:new Gt(M.k,z,C)}function _(M){return[(+M[0][0]+ +M[1][0])/2,(+M[0][1]+ +M[1][1])/2]}function R(M,U,T,z){M.on("start.zoom",function(){G(this,arguments).event(z).start()}).on("interrupt.zoom end.zoom",function(){G(this,arguments).event(z).end()}).tween("zoom",function(){var C=this,D=arguments,V=G(C,D).event(z),H=t.apply(C,D),Z=T==null?_(H):typeof T=="function"?T.apply(C,D):T,ue=Math.max(H[1][0]-H[0][0],H[1][1]-H[0][1]),q=C.__zoom,ie=typeof U=="function"?U.apply(C,D):U,le=a(q.invert(Z).concat(ue/q.k),ie.invert(Z).concat(ue/ie.k));return function(ve){if(ve===1)ve=ie;else{var ye=le(ve),fe=ue/ye[2];ve=new Gt(fe,Z[0]-ye[0]*fe,Z[1]-ye[1]*fe)}V.zoom(null,ve)}})}function G(M,U,T){return!T&&M.__zooming||new K(M,U)}function K(M,U){this.that=M,this.args=U,this.active=0,this.sourceEvent=null,this.extent=t.apply(M,U),this.taps=0}K.prototype={event:function(M){return M&&(this.sourceEvent=M),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(M,U){return this.mouse&&M!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&M!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&M!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(M){var U=gt(this.that).datum();u.call(M,this.that,new $y(M,{sourceEvent:this.sourceEvent,target:$,transform:this.that.__zoom,dispatch:u}),U)}};function F(M,...U){if(!e.apply(this,arguments))return;var T=G(this,U).event(M),z=this.__zoom,C=Math.max(s[0],Math.min(s[1],z.k*Math.pow(2,o.apply(this,arguments)))),D=$t(M);if(T.wheel)(T.mouse[0][0]!==D[0]||T.mouse[0][1]!==D[1])&&(T.mouse[1]=z.invert(T.mouse[0]=D)),clearTimeout(T.wheel);else{if(z.k===C)return;T.mouse=[D,z.invert(D)],si(this),T.start()}Jn(M),T.wheel=setTimeout(V,w),T.zoom("mouse",n(g(k(z,C),T.mouse[0],T.mouse[1]),T.extent,r));function V(){T.wheel=null,T.end()}}function X(M,...U){if(v||!e.apply(this,arguments))return;var T=M.currentTarget,z=G(this,U,!0).event(M),C=gt(M.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",ue,!0),D=$t(M,T),V=M.clientX,H=M.clientY;Ou(M.view),fs(M),z.mouse=[D,this.__zoom.invert(D)],si(this),z.start();function Z(q){if(Jn(q),!z.moved){var ie=q.clientX-V,le=q.clientY-H;z.moved=ie*ie+le*le>E}z.event(q).zoom("mouse",n(g(z.that.__zoom,z.mouse[0]=$t(q,T),z.mouse[1]),z.extent,r))}function ue(q){C.on("mousemove.zoom mouseup.zoom",null),Vu(q.view,z.moved),Jn(q),z.event(q).end()}}function te(M,...U){if(e.apply(this,arguments)){var T=this.__zoom,z=$t(M.changedTouches?M.changedTouches[0]:M,this),C=T.invert(z),D=T.k*(M.shiftKey?.5:2),V=n(g(k(T,D),z,C),t.apply(this,U),r);Jn(M),l>0?gt(this).transition().duration(l).call(R,V,z,M):gt(this).call($.transform,V,z,M)}}function W(M,...U){if(e.apply(this,arguments)){var T=M.touches,z=T.length,C=G(this,U,M.changedTouches.length===z).event(M),D,V,H,Z;for(fs(M),V=0;V(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(ae||{}),Nr=(e=>(e.Partial="partial",e.Full="full",e))(Nr||{}),mn=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(mn||{}),cn=(e=>(e.Strict="strict",e.Loose="loose",e))(cn||{}),Gs=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(Gs||{}),po=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(po||{});const Dy=["INPUT","SELECT","TEXTAREA"],Oy=typeof document<"u"?document:null;function Ys(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,s=typeof o?.closest=="function"?o.closest(".nokey"):null;return Dy.includes(o?.nodeName)||i||!!s}function Vy(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function Dl(e,t,n,o){const i=t.replace("+",` +`).replace(` + +`,` ++`).split(` +`).map(r=>r.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const s=i.every((r,l)=>n.has(r)&&Array.from(n.values())[l]===i[l]);return o&&n.delete(e.toLowerCase()),s}function Ry(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=By(n.code,e);return Array.isArray(e)?e.some(i=>Dl(n[o],i,t,n.type==="keyup")):Dl(n[o],e,t,n.type==="keyup")}}function By(e,t){return t.includes(e)?"code":"key"}function go(e,t){const n=he(()=>xe(t?.target)??Oy),o=yo(xe(e)===!0);let i=!1;const s=new Set;let r=a(xe(e));be(()=>xe(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&l(),r=a(u)},{immediate:!0}),xu(["blur","contextmenu"],l),vl((...u)=>r(...u),u=>{var c,d;const v=xe(t?.actInsideInputWithModifier)??!0,h=xe(t?.preventDefault)??!1;if(i=Vy(u),(!i||i&&!v)&&Ys(u))return;const E=((d=(c=u.composedPath)==null?void 0:c.call(u))==null?void 0:d[0])||u.target,N=E?.nodeName==="BUTTON"||E?.nodeName==="A";!h&&(i||!N)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),vl((...u)=>r(...u),u=>{const c=xe(t?.actInsideInputWithModifier)??!0;if(o.value){if((!i||i&&!c)&&Ys(u))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function l(){i=!1,s.clear(),o.value=xe(e)===!0}function a(u){return u===null?(l(),()=>!1):typeof u=="boolean"?(l(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?Ry(u,s):u}return o}const Zu="vue-flow__node-desc",qu="vue-flow__edge-desc",zy="vue-flow__aria-live",Ju=["Enter"," ","Escape"],Bn={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function wi(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function xi(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Gi(e){return{width:e.offsetWidth,height:e.offsetHeight}}function $n(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Qu(e,t){return{x:$n(e.x,t[0][0],t[1][0]),y:$n(e.y,t[0][1],t[1][1])}}function Ol(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function dn(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function En(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!dn(e)}function no(e){return En(e)&&"computedPosition"in e}function Ko(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Fy(e){return Ko(e.width)&&Ko(e.height)&&Ko(e.x)&&Ko(e.y)}function Hy(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:Xt({width:0,height:0}),computedPosition:Xt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:ze(e.data)?e.data:{},events:Xt(ze(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function ec(e,t,n){var o,i;const s={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:ze(e.data)?e.data:{},events:Xt(ze(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??s,e,{id:e.id.toString()})}function tc(e,t,n,o){const i=typeof e=="string"?e:e.id,s=new Set,r=o==="source"?"target":"source";for(const l of n)l[r]===i&&s.add(l[o]);return t.filter(l=>s.has(l.id))}function Ly(...e){if(e.length===3){const[s,r,l]=e;return tc(s,r,l,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(s=>dn(s)&&s.source===o).map(s=>n.find(r=>En(r)&&r.id===s.target))}function Uy(...e){if(e.length===3){const[s,r,l]=e;return tc(s,r,l,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(s=>dn(s)&&s.target===o).map(s=>n.find(r=>En(r)&&r.id===s.source))}function nc({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Gy(e,t){return t.some(n=>dn(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function Ks({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function $o({x:e,y:t},{x:n,y:o,zoom:i},s=!1,r=[1,1]){const l={x:(e-n)/i,y:(t-o)/i};return s?Yi(l,r):l}function Yy(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function oc({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Ky({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function ic(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n0,N=(d??0)*(v??0);(w||E||h>=N||l.dragging)&&r.push(l)}return r}function rc(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function Vl(e,t,n,o,i,s=.1,r={x:0,y:0}){const l=t/(e.width*(1+s)),a=n/(e.height*(1+s)),u=Math.min(l,a),c=$n(u,o,i),d=e.x+e.width/2,v=e.y+e.height/2,h=t/2-d*c+(r.x??0),w=n/2-v*c+(r.y??0);return{x:h,y:w,zoom:c}}function jy(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function lc(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:lc(n,t):!1}function Mo(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function Rl(e,t,n){return en?-$n(Math.abs(e-n),1,t)/t:0}function ac(e,t,n=15,o=40){const i=Rl(e.x,o,t.width-o)*n,s=Rl(e.y,o,t.height-o)*n;return[i,s]}function hs(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if(typeof t.style=="function"?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if(typeof i.width=="string"){const s=Number(i.width.replace("px",""));i.width=`${s+n}px`}else i.width+=n;if(o>0)if(typeof i.height=="string"){const s=Number(i.height.replace("px",""));i.height=`${s+o}px`}else i.height+=o;if(e.position.x<0){const s=Math.abs(e.position.x);if(t.position.x=t.position.x-s,typeof i.width=="string"){const r=Number(i.width.replace("px",""));i.width=`${r+s}px`}else i.width+=s;e.position.x=0}if(e.position.y<0){const s=Math.abs(e.position.y);if(t.position.y=t.position.y-s,typeof i.height=="string"){const r=Number(i.height.replace("px",""));i.height=`${r+s}px`}else i.height+=s;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),typeof t.style=="function"?t.style=s=>{const r=t.style;return{...r(s),...i}}:t.style={...t.style,...i}}}}function Bl(e,t){var n,o;const i=e.filter(r=>r.type==="add"||r.type==="remove");for(const r of i)if(r.type==="add")t.findIndex(a=>a.id===r.item.id)===-1&&t.push(r.item);else if(r.type==="remove"){const l=t.findIndex(a=>a.id===r.id);l!==-1&&t.splice(l,1)}const s=t.map(r=>r.id);for(const r of t)for(const l of e)if(l.id===r.id)switch(l.type){case"select":r.selected=l.selected;break;case"position":if(no(r)&&(typeof l.position<"u"&&(r.position=l.position),typeof l.dragging<"u"&&(r.dragging=l.dragging),r.expandParent&&r.parentNode)){const a=t[s.indexOf(r.parentNode)];a&&no(a)&&hs(r,a)}break;case"dimensions":if(no(r)&&(typeof l.dimensions<"u"&&(r.dimensions=l.dimensions),typeof l.updateStyle<"u"&&l.updateStyle&&(r.style={...r.style||{},width:`${(n=l.dimensions)==null?void 0:n.width}px`,height:`${(o=l.dimensions)==null?void 0:o.height}px`}),typeof l.resizing<"u"&&(r.resizing=l.resizing),r.expandParent&&r.parentNode)){const a=t[s.indexOf(r.parentNode)];a&&no(a)&&(!!a.dimensions.width&&!!a.dimensions.height?hs(r,a):ut(()=>{hs(r,a)}))}break}return t}function on(e,t){return{id:e,type:"select",selected:t}}function zl(e){return{item:e,type:"add"}}function Fl(e){return{id:e,type:"remove"}}function Hl(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function ln(e,t=new Set,n=!1){const o=[];for(const[i,s]of e){const r=t.has(i);!(s.selected===void 0&&!r)&&s.selected!==r&&(n&&(s.selected=r),o.push(on(s.id,r)))}return o}function re(e){const t=new Set;let n=!1;const o=()=>t.size>0;e&&(n=!0,t.add(e));const i=l=>{t.delete(l)};return{on:l=>{e&&n&&t.delete(e),t.add(l);const a=()=>{i(l),e&&n&&t.add(e)};return zi(a),{off:a}},off:i,trigger:l=>Promise.all(Array.from(t).map(a=>a(l))),hasListeners:o,fns:t}}function Ll(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Xy(e,t,n,o,i){var s,r;const l=[];for(const a of e)(a.selected||a.id===i)&&(!a.parentNode||!lc(a,o))&&(a.draggable||t&&typeof a.draggable>"u")&&l.push(Xt({id:a.id,position:a.position||{x:0,y:0},distance:{x:n.x-((s=a.computedPosition)==null?void 0:s.x)||0,y:n.y-((r=a.computedPosition)==null?void 0:r.y)||0},from:a.computedPosition,extent:a.extent,parentNode:a.parentNode,dimensions:a.dimensions,expandParent:a.expandParent}));return l}function ps({id:e,dragItems:t,findNode:n}){const o=[];for(const i of t){const s=n(i.id);s&&o.push(s)}return[e?o.find(i=>i.id===e):o[0],o]}function uc(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function Wy(e,t,n){const[o,i,s,r]=typeof e!="string"?uc(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+r,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-s]]:!1}function Zy(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&i?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const s=Wy(i,e,o);s&&(i=s)}else t(new Le(He.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const s=o?.computedPosition.x||0,r=o?.computedPosition.y||0;i=[[i[0][0]+s,i[0][1]+r],[i[1][0]+s,i[1][1]+r]]}else if(i!=="parent"&&i?.range&&Array.isArray(i.range)){const[s,r,l,a]=uc(i.padding),u=o?.computedPosition.x||0,c=o?.computedPosition.y||0;i=[[i.range[0][0]+u+a,i.range[0][1]+c+s],[i.range[1][0]+u-r,i.range[1][1]+c-l]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function qy({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Cr(e,t,n,o,i){const s=qy(e.dimensions,Zy(e,n,o,i)),r=Qu(t,s);return{position:{x:r.x-(i?.computedPosition.x||0),y:r.y-(i?.computedPosition.y||0)},computedPosition:r}}function Kn(e,t,n=ae.Left,o=!1){const i=(t?.x??0)+e.computedPosition.x,s=(t?.y??0)+e.computedPosition.y,{width:r,height:l}=t??t0(e);if(o)return{x:i+r/2,y:s+l/2};switch(t?.position??n){case ae.Top:return{x:i+r/2,y:s};case ae.Right:return{x:i+r,y:s+l/2};case ae.Bottom:return{x:i+r/2,y:s+l};case ae.Left:return{x:i,y:s+l/2}}}function Ul(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Jy({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:s,width:r,height:l,viewport:a}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+s)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=oc({x:(0-a.x)/a.zoom,y:(0-a.y)/a.zoom,width:r/a.zoom,height:l/a.zoom}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),v=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*v)>0}function Qy(e,t,n=!1){const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const s=t(e.source),r=t(e.target);return!s||!r?0:(n&&(i=o?e.zIndex:Math.max(s.computedPosition.z||0,r.computedPosition.z||0)),i)}var He=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(He||{});const Gl={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid +Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found +Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent +Node: ${e} +Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing +Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent +Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target +Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing +Edge: ${e} +Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing +Edge: ${e} +Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing +Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same +Edge: ${e} +Source: ${t} +Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing +Edge: ${e} +Source: ${t} +Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed +Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found +Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Le extends Error{constructor(t,...n){var o;super((o=Gl[t])==null?void 0:o.call(Gl,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function $r(e){return"clientX"in e}function e0(e){return"sourceEvent"in e}function Tt(e,t){const n=$r(e);let o,i;return n?(o=e.clientX,i=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,i=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(o=0,i=0),{x:o-(t?.left??0),y:i-(t?.top??0)}}const Ei=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function t0(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function Yi(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const n0=()=>!0;function gs(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function o0(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())xi(i,wi(s))>0&&o.push(s);return o}const i0=250;function s0(e,t,n,o){var i,s;let r=[],l=Number.POSITIVE_INFINITY;const a=o0(e,n,t+i0);for(const u of a){const c=[...((i=u.handleBounds)==null?void 0:i.source)??[],...((s=u.handleBounds)==null?void 0:s.target)??[]];for(const d of c){if(o.nodeId===d.nodeId&&o.type===d.type&&o.id===d.id)continue;const{x:v,y:h}=Kn(u,d,d.position,!0),w=Math.sqrt((v-e.x)**2+(h-e.y)**2);w>t||(w1){const u=o.type==="source"?"target":"source";return r.find(c=>c.type===u)??r[0]}return r[0]}function Yl(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:s,doc:r,lib:l,flowId:a,isValidConnection:u=n0},c,d,v){const h=s==="target",w=t?r.querySelector(`.${l}-flow__handle[data-id="${a}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:E,y:N}=Tt(e),$=r.elementFromPoint(E,N),k=$?.classList.contains(`${l}-flow__handle`)?$:w,g={handleDomNode:k,isValid:!1,connection:null,toHandle:null};if(k){const _=cc(void 0,k),R=k.getAttribute("data-nodeid"),G=k.getAttribute("data-handleid"),K=k.classList.contains("connectable"),F=k.classList.contains("connectableend");if(!R||!_)return g;const X={source:h?R:o,sourceHandle:h?G:i,target:h?o:R,targetHandle:h?i:G};g.connection=X;const W=K&&F&&(n===cn.Strict?h&&_==="source"||!h&&_==="target":R!==o||G!==i);g.isValid=W&&u(X,{nodes:d,edges:c,sourceNode:v(o),targetNode:v(R)}),g.toHandle=t}return g}function cc(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function r0(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function l0(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function a0(e,t,n,o,i,s=!1){var r,l,a;const u=o.get(e);if(!u)return null;const c=i===cn.Strict?(r=u.handleBounds)==null?void 0:r[t]:[...((l=u.handleBounds)==null?void 0:l.source)??[],...((a=u.handleBounds)==null?void 0:a.target)??[]],d=(n?c?.find(v=>v.id===n):c?.[0])??null;return d&&s?{...d,...Kn(u,d,d.position,!0)}:d}const js={[ae.Left]:ae.Right,[ae.Right]:ae.Left,[ae.Top]:ae.Bottom,[ae.Bottom]:ae.Top},u0=["production","prod"];function Ki(e,...t){dc()&&console.warn(`[Vue Flow]: ${e}`,...t)}function dc(){return!u0.includes("production")}function Kl(e,t,n,o,i){const s=t.querySelectorAll(`.vue-flow__handle.${e}`);return s?.length?Array.from(s).map(r=>{const l=r.getBoundingClientRect();return{id:r.getAttribute("data-handleid"),type:e,nodeId:i,position:r.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...Gi(r)}}):null}function Xs(e,t,n,o,i,s=!1,r){i.value=!1,e.selected?(s||e.selected&&t)&&(o([e]),ut(()=>{r.blur()})):n([e])}function ze(e){return typeof ne(e)<"u"}function c0(e,t,n,o){if(!e||!e.source||!e.target)return n(new Le(He.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let i;return dn(e)?i=e:i={...e,id:nc(e)},i=ec(i,void 0,o),Gy(i,t)?!1:i}function d0(e,t,n,o,i){if(!t.source||!t.target)return i(new Le(He.EDGE_INVALID,e.id)),!1;if(!n)return i(new Le(He.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...r}=e;return{...r,id:o?nc(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function jl(e,t,n){const o={},i=[];for(let s=0;sl.id===s.parentNode);s.parentNode&&!r&&n(new Le(He.NODE_MISSING_PARENT,s.id,s.parentNode)),(s.parentNode||o[s.id])&&(o[s.id]&&(s.isParent=!0),r&&(r.isParent=!0))}return i}function Xl(e,t,n,o,i,s){let r=i;const l=o.get(r)||new Map;o.set(r,l.set(n,t)),r=`${i}-${e}`;const a=o.get(r)||new Map;if(o.set(r,a.set(n,t)),s){r=`${i}-${e}-${s}`;const u=o.get(r)||new Map;o.set(r,u.set(n,t))}}function vs(e,t,n){e.clear();for(const o of n){const{source:i,target:s,sourceHandle:r=null,targetHandle:l=null}=o,a={edgeId:o.id,source:i,target:s,sourceHandle:r,targetHandle:l},u=`${i}-${r}--${s}-${l}`,c=`${s}-${l}--${i}-${r}`;Xl("source",a,c,e,i,r),Xl("target",a,u,e,s,l)}}function Wl(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function ms(e,t,n,o,i,s,r,l){const a=[];for(const u of e){const c=dn(u)?u:c0(u,l,i,s);if(!c)continue;const d=n(c.source),v=n(c.target);if(!d||!v){i(new Le(He.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!d){i(new Le(He.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!v){i(new Le(He.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:l,nodes:r,sourceNode:d,targetNode:v})){i(new Le(He.EDGE_INVALID,c.id));continue}const h=o(c.id);a.push({...ec(c,h,s),sourceNode:d,targetNode:v})}return a}const Zl=Symbol("vueFlow"),fc=Symbol("nodeId"),hc=Symbol("nodeRef"),f0=Symbol("edgeId"),h0=Symbol("edgeRef"),ji=Symbol("slots");function pc(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodes:s,nodeExtent:r,nodeDragThreshold:l,viewport:a,autoPanOnNodeDrag:u,autoPanSpeed:c,nodesDraggable:d,panBy:v,findNode:h,multiSelectionActive:w,nodesSelectionActive:E,selectNodesOnDrag:N,removeSelectedElements:$,addSelectedNodes:k,updateNodePositions:g,emits:_}=Re(),{onStart:R,onDrag:G,onStop:K,onClick:F,el:X,disabled:te,id:W,selectable:P,dragHandle:oe}=e,M=yo(!1);let U=[],T,z=null,C={x:void 0,y:void 0},D={x:0,y:0},V=null,H=!1,Z=0,ue=!1;const q=v0(),ie=({x:ce,y:b})=>{C={x:ce,y:b};let S=!1;if(U=U.map(f=>{const p={x:ce-f.distance.x,y:b-f.distance.y},{computedPosition:y}=Cr(f,n.value?Yi(p,o.value):p,_.error,r.value,f.parentNode?h(f.parentNode):void 0);return S=S||f.position.x!==y.x||f.position.y!==y.y,f.position=y,f}),!!S&&(g(U,!0,!0),M.value=!0,V)){const[f,p]=ps({id:W,dragItems:U,findNode:h});G({event:V,node:f,nodes:p})}},le=()=>{if(!z)return;const[ce,b]=ac(D,z,c.value);if(ce!==0||b!==0){const S={x:(C.x??0)-ce/a.value.zoom,y:(C.y??0)-b/a.value.zoom};v({x:ce,y:b})&&ie(S)}Z=requestAnimationFrame(le)},ve=(ce,b)=>{H=!0;const S=h(W);!N.value&&!w.value&&S&&(S.selected||$()),S&&xe(P)&&N.value&&Xs(S,w.value,k,$,E,!1,b);const f=q(ce.sourceEvent);if(C=f,U=Xy(s.value,d.value,f,h,W),U.length){const[p,y]=ps({id:W,dragItems:U,findNode:h});R({event:ce.sourceEvent,node:p,nodes:y})}},ye=(ce,b)=>{var S;ce.sourceEvent.type==="touchmove"&&ce.sourceEvent.touches.length>1||(l.value===0&&ve(ce,b),C=q(ce.sourceEvent),z=((S=t.value)==null?void 0:S.getBoundingClientRect())||null,D=Tt(ce.sourceEvent,z))},fe=(ce,b)=>{const S=q(ce.sourceEvent);if(!ue&&H&&u.value&&(ue=!0,le()),!H){const f=S.xSnapped-(C.x??0),p=S.ySnapped-(C.y??0);Math.sqrt(f*f+p*p)>l.value&&ve(ce,b)}(C.x!==S.xSnapped||C.y!==S.ySnapped)&&U.length&&H&&(V=ce.sourceEvent,D=Tt(ce.sourceEvent,z),ie(S))},_e=ce=>{let b=!1;if(!H&&!M.value&&!w.value){const S=ce.sourceEvent,f=q(S),p=f.xSnapped-(C.x??0),y=f.ySnapped-(C.y??0),m=Math.sqrt(p*p+y*y);m!==0&&m<=l.value&&(F?.(S),b=!0)}if(U.length&&!b){g(U,!1,!1);const[S,f]=ps({id:W,dragItems:U,findNode:h});K({event:ce.sourceEvent,node:S,nodes:f})}U=[],M.value=!1,ue=!1,H=!1,C={x:void 0,y:void 0},cancelAnimationFrame(Z)};return be([()=>xe(te),X],([ce,b],S,f)=>{if(b){const p=gt(b);ce||(T=Fv().on("start",y=>ye(y,b)).on("drag",y=>fe(y,b)).on("end",y=>_e(y)).filter(y=>{const m=y.target,I=xe(oe);return!y.button&&(!i.value||!Ll(m,`.${i.value}`,b)&&(!I||Ll(m,I,b)))}),p.call(T)),f(()=>{p.on(".drag",null),T&&(T.on("start",null),T.on("drag",null),T.on("end",null))})}}),M}function p0(){return{doubleClick:re(),click:re(),mouseEnter:re(),mouseMove:re(),mouseLeave:re(),contextMenu:re(),updateStart:re(),update:re(),updateEnd:re()}}function g0(e,t){const n=p0();return n.doubleClick.on(o=>{var i,s;t.edgeDoubleClick(o),(s=(i=e.events)==null?void 0:i.doubleClick)==null||s.call(i,o)}),n.click.on(o=>{var i,s;t.edgeClick(o),(s=(i=e.events)==null?void 0:i.click)==null||s.call(i,o)}),n.mouseEnter.on(o=>{var i,s;t.edgeMouseEnter(o),(s=(i=e.events)==null?void 0:i.mouseEnter)==null||s.call(i,o)}),n.mouseMove.on(o=>{var i,s;t.edgeMouseMove(o),(s=(i=e.events)==null?void 0:i.mouseMove)==null||s.call(i,o)}),n.mouseLeave.on(o=>{var i,s;t.edgeMouseLeave(o),(s=(i=e.events)==null?void 0:i.mouseLeave)==null||s.call(i,o)}),n.contextMenu.on(o=>{var i,s;t.edgeContextMenu(o),(s=(i=e.events)==null?void 0:i.contextMenu)==null||s.call(i,o)}),n.updateStart.on(o=>{var i,s;t.edgeUpdateStart(o),(s=(i=e.events)==null?void 0:i.updateStart)==null||s.call(i,o)}),n.update.on(o=>{var i,s;t.edgeUpdate(o),(s=(i=e.events)==null?void 0:i.update)==null||s.call(i,o)}),n.updateEnd.on(o=>{var i,s;t.edgeUpdateEnd(o),(s=(i=e.events)==null?void 0:i.updateEnd)==null||s.call(i,o)}),Object.entries(n).reduce((o,[i,s])=>(o.emit[i]=s.trigger,o.on[i]=s.on,o),{emit:{},on:{}})}function v0(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Re();return i=>{var s;const r=((s=o.value)==null?void 0:s.getBoundingClientRect())??{left:0,top:0},l=e0(i)?i.sourceEvent:i,{x:a,y:u}=Tt(l,r),c=$o({x:a,y:u},e.value),{x:d,y:v}=n.value?Yi(c,t.value):c;return{xSnapped:d,ySnapped:v,...c}}}function jo(){return!0}function gc({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:s,onEdgeUpdateEnd:r}){const{id:l,vueFlowRef:a,connectionMode:u,connectionRadius:c,connectOnClick:d,connectionClickStartHandle:v,nodesConnectable:h,autoPanOnConnect:w,autoPanSpeed:E,findNode:N,panBy:$,startConnection:k,updateConnection:g,endConnection:_,emits:R,viewport:G,edges:K,nodes:F,isValidConnection:X,nodeLookup:te}=Re();let W=null,P=!1,oe=null;function M(T){var z;const C=xe(n)==="target",D=$r(T),V=Ol(T.target);if(D&&T.button===0||!D){let H=function(j){f=Tt(j,ce),ie=s0($o(f,G.value,!1,[1,1]),c.value,te.value,m),p||(y(),p=!0);const L=Yl(j,{handle:ie,connectionMode:u.value,fromNodeId:xe(t),fromHandleId:xe(e),fromType:C?"target":"source",isValidConnection:q,doc:V,lib:"vue",flowId:l,nodeLookup:te.value},K.value,F.value,N);oe=L.handleDomNode,W=L.connection,P=l0(!!ie,L.isValid);const Q={...A,isValid:P,to:L.toHandle&&P?Ks({x:L.toHandle.x,y:L.toHandle.y},G.value):f,toHandle:L.toHandle,toPosition:P&&L.toHandle?L.toHandle.position:js[m.position],toNode:L.toHandle?te.value.get(L.toHandle.nodeId):null};if(!(P&&ie&&A?.toHandle&&Q.toHandle&&A.toHandle.type===Q.toHandle.type&&A.toHandle.nodeId===Q.toHandle.nodeId&&A.toHandle.id===Q.toHandle.id&&A.to.x===Q.to.x&&A.to.y===Q.to.y)){if(g(ie&&P?Ks({x:ie.x,y:ie.y},G.value):f,L.toHandle,r0(!!ie,P)),A=Q,!ie&&!P&&!oe)return gs(S);W&&W.source!==W.target&&oe&&(gs(S),S=oe,oe.classList.add("connecting","vue-flow__handle-connecting"),oe.classList.toggle("valid",!!P),oe.classList.toggle("vue-flow__handle-valid",!!P))}},Z=function(j){(ie||oe)&&W&&P&&(s?s(j,W):R.connect(W)),R.connectEnd(j),i&&r?.(j),gs(S),cancelAnimationFrame(le),_(j),p=!1,P=!1,W=null,oe=null,V.removeEventListener("mousemove",H),V.removeEventListener("mouseup",Z),V.removeEventListener("touchmove",H),V.removeEventListener("touchend",Z)};const ue=N(xe(t));let q=xe(o)||X.value||jo;!q&&ue&&(q=(C?ue.isValidSourcePos:ue.isValidTargetPos)||jo);let ie,le=0;const{x:ve,y:ye}=Tt(T),fe=V?.elementFromPoint(ve,ye),_e=cc(xe(i),fe),ce=(z=a.value)==null?void 0:z.getBoundingClientRect();if(!ce||!_e)return;const b=a0(xe(t),_e,xe(e),te.value,u.value);if(!b)return;let S,f=Tt(T,ce),p=!1;const y=()=>{if(!w.value)return;const[j,L]=ac(f,ce,E.value);$({x:j,y:L}),le=requestAnimationFrame(y)},m={...b,nodeId:xe(t),type:_e,position:b.position},I=te.value.get(xe(t)),O={inProgress:!0,isValid:null,from:Kn(I,m,ae.Left,!0),fromHandle:m,fromPosition:m.position,fromNode:I,to:f,toHandle:null,toPosition:js[m.position],toNode:null};k({nodeId:xe(t),id:xe(e),type:_e,position:fe?.getAttribute("data-handlepos")||ae.Top,...f},{x:ve-ce.left,y:ye-ce.top}),R.connectStart({event:T,nodeId:xe(t),handleId:xe(e),handleType:_e});let A=O;V.addEventListener("mousemove",H),V.addEventListener("mouseup",Z),V.addEventListener("touchmove",H),V.addEventListener("touchend",Z)}}function U(T){var z,C;if(!d.value)return;const D=xe(n)==="target";if(!v.value){R.clickConnectStart({event:T,nodeId:xe(t),handleId:xe(e)}),k({nodeId:xe(t),type:xe(n),id:xe(e),position:ae.Top,...Tt(T)},void 0,!0);return}let V=xe(o)||X.value||jo;const H=N(xe(t));if(!V&&H&&(V=(D?H.isValidSourcePos:H.isValidTargetPos)||jo),H&&(typeof H.connectable>"u"?h.value:H.connectable)===!1)return;const Z=Ol(T.target),ue=Yl(T,{handle:{nodeId:xe(t),id:xe(e),type:xe(n),position:ae.Top,...Tt(T)},connectionMode:u.value,fromNodeId:v.value.nodeId,fromHandleId:v.value.id??null,fromType:v.value.type,isValidConnection:V,doc:Z,lib:"vue",flowId:l,nodeLookup:te.value},K.value,F.value,N),q=((z=ue.connection)==null?void 0:z.source)===((C=ue.connection)==null?void 0:C.target);ue.isValid&&ue.connection&&!q&&R.connect(ue.connection),R.clickConnectEnd(T),_(T,!0)}return{handlePointerDown:M,handleClick:U}}function m0(){return yt(fc,"")}function vc(e){const t=e??m0()??"",n=yt(hc,J(null)),{findNode:o,edges:i,emits:s}=Re(),r=o(t);return r||s.error(new Le(He.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:r,parentNode:he(()=>o(r.parentNode)),connectedEdges:he(()=>rc([r],i.value))}}function y0(){return{doubleClick:re(),click:re(),mouseEnter:re(),mouseMove:re(),mouseLeave:re(),contextMenu:re(),dragStart:re(),drag:re(),dragStop:re()}}function _0(e,t){const n=y0();return n.doubleClick.on(o=>{var i,s;t.nodeDoubleClick(o),(s=(i=e.events)==null?void 0:i.doubleClick)==null||s.call(i,o)}),n.click.on(o=>{var i,s;t.nodeClick(o),(s=(i=e.events)==null?void 0:i.click)==null||s.call(i,o)}),n.mouseEnter.on(o=>{var i,s;t.nodeMouseEnter(o),(s=(i=e.events)==null?void 0:i.mouseEnter)==null||s.call(i,o)}),n.mouseMove.on(o=>{var i,s;t.nodeMouseMove(o),(s=(i=e.events)==null?void 0:i.mouseMove)==null||s.call(i,o)}),n.mouseLeave.on(o=>{var i,s;t.nodeMouseLeave(o),(s=(i=e.events)==null?void 0:i.mouseLeave)==null||s.call(i,o)}),n.contextMenu.on(o=>{var i,s;t.nodeContextMenu(o),(s=(i=e.events)==null?void 0:i.contextMenu)==null||s.call(i,o)}),n.dragStart.on(o=>{var i,s;t.nodeDragStart(o),(s=(i=e.events)==null?void 0:i.dragStart)==null||s.call(i,o)}),n.drag.on(o=>{var i,s;t.nodeDrag(o),(s=(i=e.events)==null?void 0:i.drag)==null||s.call(i,o)}),n.dragStop.on(o=>{var i,s;t.nodeDragStop(o),(s=(i=e.events)==null?void 0:i.dragStop)==null||s.call(i,o)}),Object.entries(n).reduce((o,[i,s])=>(o.emit[i]=s.trigger,o.on[i]=s.on,o),{emit:{},on:{}})}function mc(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:s,nodesDraggable:r,emits:l}=Re();return(a,u=!1)=>{const c=s.value?i.value[0]:5,d=s.value?i.value[1]:5,v=u?4:1,h=a.x*c*v,w=a.y*d*v,E=[];for(const N of e.value)if(N.draggable||r&&typeof N.draggable>"u"){const $={x:N.computedPosition.x+h,y:N.computedPosition.y+w},{computedPosition:k}=Cr(N,$,l.error,t.value,N.parentNode?o(N.parentNode):void 0);E.push({id:N.id,position:k,from:N.position,distance:{x:a.x,y:a.y},dimensions:N.dimensions})}n(E,!0,!1)}}const ys=.1,b0=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function tn(){return Ki("Viewport not initialized yet."),Promise.resolve(!1)}const w0={zoomIn:tn,zoomOut:tn,zoomTo:tn,fitView:tn,setCenter:tn,fitBounds:tn,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:tn,setTransform:tn,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function x0(e){function t(o,i){return new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?ho:ni).scaleBy(_s(e.d3Selection,i?.duration,i?.ease,()=>{s(!0)}),o):s(!1)})}function n(o,i,s,r){return new Promise(l=>{var a;const{x:u,y:c}=Qu({x:-o,y:-i},e.translateExtent),d=Yn.translate(-u,-c).scale(s);e.d3Selection&&e.d3Zoom?(a=e.d3Zoom)==null||a.interpolate(r?.interpolate==="linear"?ho:ni).transform(_s(e.d3Selection,r?.duration,r?.ease,()=>{l(!0)}),d):l(!1)})}return he(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i),zoomOut:i=>t(1/1.2,i),zoomTo:(i,s)=>new Promise(r=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(s?.interpolate==="linear"?ho:ni).scaleTo(_s(e.d3Selection,s?.duration,s?.ease,()=>{r(!0)}),i):r(!1)}),setViewport:(i,s)=>n(i.x,i.y,i.zoom,s),setTransform:(i,s)=>n(i.x,i.y,i.zoom,s),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(i={padding:ys,includeHiddenNodes:!1,duration:0})=>{var s,r;const l=[];for(const v of e.nodes)v.dimensions.width&&v.dimensions.height&&(i?.includeHiddenNodes||!v.hidden)&&(!((s=i.nodes)!=null&&s.length)||(r=i.nodes)!=null&&r.length&&i.nodes.includes(v.id))&&l.push(v);if(!l.length)return Promise.resolve(!1);const a=ic(l),{x:u,y:c,zoom:d}=Vl(a,e.dimensions.width,e.dimensions.height,i.minZoom??e.minZoom,i.maxZoom??e.maxZoom,i.padding??ys,i.offset);return n(u,c,d,i)},setCenter:(i,s,r)=>{const l=typeof r?.zoom<"u"?r.zoom:e.maxZoom,a=e.dimensions.width/2-i*l,u=e.dimensions.height/2-s*l;return n(a,u,l,r)},fitBounds:(i,s={padding:ys})=>{const{x:r,y:l,zoom:a}=Vl(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,s.padding);return n(r,l,a,s)},project:i=>$o(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:s,y:r}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x-s,y:i.y-r};return $o(l,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:s,y:r}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x+s,y:i.y+r};return Ks(l,e.viewport)}return{x:0,y:0}}}:w0)}function _s(e,t=0,n=b0,o=()=>{}){const i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function E0(e,t,n){const o=Ii(!0);return o.run(()=>{const i=()=>{o.run(()=>{let E,N,$=!!(n.nodes.value.length||n.edges.value.length);E=Tn([e.modelValue,()=>{var k,g;return(g=(k=e.modelValue)==null?void 0:k.value)==null?void 0:g.length}],([k])=>{k&&Array.isArray(k)&&(N?.pause(),n.setElements(k),!N&&!$&&k.length?$=!0:N?.resume())}),N=Tn([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([k,g])=>{var _;(_=e.modelValue)!=null&&_.value&&Array.isArray(e.modelValue.value)&&(E?.pause(),e.modelValue.value=[...k,...g],ut(()=>{E?.resume()}))},{immediate:$}),io(()=>{E?.stop(),N?.stop()})})},s=()=>{o.run(()=>{let E,N,$=!!n.nodes.value.length;E=Tn([e.nodes,()=>{var k,g;return(g=(k=e.nodes)==null?void 0:k.value)==null?void 0:g.length}],([k])=>{k&&Array.isArray(k)&&(N?.pause(),n.setNodes(k),!N&&!$&&k.length?$=!0:N?.resume())}),N=Tn([n.nodes,()=>n.nodes.value.length],([k])=>{var g;(g=e.nodes)!=null&&g.value&&Array.isArray(e.nodes.value)&&(E?.pause(),e.nodes.value=[...k],ut(()=>{E?.resume()}))},{immediate:$}),io(()=>{E?.stop(),N?.stop()})})},r=()=>{o.run(()=>{let E,N,$=!!n.edges.value.length;E=Tn([e.edges,()=>{var k,g;return(g=(k=e.edges)==null?void 0:k.value)==null?void 0:g.length}],([k])=>{k&&Array.isArray(k)&&(N?.pause(),n.setEdges(k),!N&&!$&&k.length?$=!0:N?.resume())}),N=Tn([n.edges,()=>n.edges.value.length],([k])=>{var g;(g=e.edges)!=null&&g.value&&Array.isArray(e.edges.value)&&(E?.pause(),e.edges.value=[...k],ut(()=>{E?.resume()}))},{immediate:$}),io(()=>{E?.stop(),N?.stop()})})},l=()=>{o.run(()=>{be(()=>t.maxZoom,()=>{t.maxZoom&&ze(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},a=()=>{o.run(()=>{be(()=>t.minZoom,()=>{t.minZoom&&ze(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{be(()=>t.translateExtent,()=>{t.translateExtent&&ze(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{be(()=>t.nodeExtent,()=>{t.nodeExtent&&ze(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{be(()=>t.applyDefault,()=>{ze(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},v=()=>{o.run(()=>{const E=async N=>{let $=N;typeof t.autoConnect=="function"&&($=await t.autoConnect(N)),$!==!1&&n.addEdges([$])};be(()=>t.autoConnect,()=>{ze(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),be(n.autoConnect,(N,$,k)=>{N?n.onConnect(E):n.hooks.value.connect.off(E),k(()=>{n.hooks.value.connect.off(E)})},{immediate:!0})})},h=()=>{const E=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const N of Object.keys(t)){const $=N;if(!E.includes($)){const k=Ve(()=>t[$]),g=n[$];De(g)&&o.run(()=>{be(k,_=>{ze(_)&&(g.value=_)},{immediate:!0})})}}};(()=>{i(),s(),r(),a(),l(),u(),c(),d(),v(),h()})()}),()=>o.stop()}function S0(){return{edgesChange:re(),nodesChange:re(),nodeDoubleClick:re(),nodeClick:re(),nodeMouseEnter:re(),nodeMouseMove:re(),nodeMouseLeave:re(),nodeContextMenu:re(),nodeDragStart:re(),nodeDrag:re(),nodeDragStop:re(),nodesInitialized:re(),miniMapNodeClick:re(),miniMapNodeDoubleClick:re(),miniMapNodeMouseEnter:re(),miniMapNodeMouseMove:re(),miniMapNodeMouseLeave:re(),connect:re(),connectStart:re(),connectEnd:re(),clickConnectStart:re(),clickConnectEnd:re(),paneReady:re(),init:re(),move:re(),moveStart:re(),moveEnd:re(),selectionDragStart:re(),selectionDrag:re(),selectionDragStop:re(),selectionContextMenu:re(),selectionStart:re(),selectionEnd:re(),viewportChangeStart:re(),viewportChange:re(),viewportChangeEnd:re(),paneScroll:re(),paneClick:re(),paneContextMenu:re(),paneMouseEnter:re(),paneMouseMove:re(),paneMouseLeave:re(),edgeContextMenu:re(),edgeMouseEnter:re(),edgeMouseMove:re(),edgeMouseLeave:re(),edgeDoubleClick:re(),edgeClick:re(),edgeUpdateStart:re(),edgeUpdate:re(),edgeUpdateEnd:re(),updateNodeInternals:re(),error:re(e=>Ki(e.message))}}function N0(e,t){za(()=>{for(const[n,o]of Object.entries(t.value)){const i=s=>{e(n,s)};o.fns.add(i),zi(()=>{o.off(i)})}})}function yc(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Nr.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:po.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:mn.Bezier,style:{}},connectionMode:cn.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:Ei()?"Meta":"Control",zoomActivationKeyCode:Ei()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:S0(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const C0=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function $0(e,t,n){const o=x0(e),i=f=>{const p=f??[];e.hooks.updateNodeInternals.trigger(p)},s=f=>Uy(f,e.nodes,e.edges),r=f=>Ly(f,e.nodes,e.edges),l=f=>rc(f,e.edges),a=({id:f,type:p,nodeId:y})=>{var m;return Array.from(((m=e.connectionLookup.get(`${y}-${p}-${f??null}`))==null?void 0:m.values())??[])},u=f=>{if(f)return t.value.get(f)},c=f=>{if(f)return n.value.get(f)},d=(f,p,y)=>{var m,I;const B=[];for(const O of f){const A={id:O.id,type:"position",dragging:y,from:O.from};if(p&&(A.position=O.position,O.parentNode)){const j=u(O.parentNode);A.position={x:A.position.x-(((m=j?.computedPosition)==null?void 0:m.x)??0),y:A.position.y-(((I=j?.computedPosition)==null?void 0:I.y)??0)}}B.push(A)}B?.length&&e.hooks.nodesChange.trigger(B)},v=f=>{if(!e.vueFlowRef)return;const p=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!p)return;const y=window.getComputedStyle(p),{m22:m}=new window.DOMMatrixReadOnly(y.transform),I=[];for(const B of f){const O=B,A=u(O.id);if(A){const j=Gi(O.nodeElement);if(!!(j.width&&j.height&&(A.dimensions.width!==j.width||A.dimensions.height!==j.height||O.forceUpdate))){const Q=O.nodeElement.getBoundingClientRect();A.dimensions=j,A.handleBounds.source=Kl("source",O.nodeElement,Q,m,A.id),A.handleBounds.target=Kl("target",O.nodeElement,Q,m,A.id),I.push({id:A.id,type:"dimensions",dimensions:j})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),I.length&&e.hooks.nodesChange.trigger(I)},h=(f,p)=>{const y=new Set,m=new Set;for(const O of f)En(O)?y.add(O.id):dn(O)&&m.add(O.id);const I=ln(t.value,y,!0),B=ln(n.value,m);if(e.multiSelectionActive){for(const O of y)I.push(on(O,p));for(const O of m)B.push(on(O,p))}I.length&&e.hooks.nodesChange.trigger(I),B.length&&e.hooks.edgesChange.trigger(B)},w=f=>{if(e.multiSelectionActive){const p=f.map(y=>on(y.id,!0));e.hooks.nodesChange.trigger(p);return}e.hooks.nodesChange.trigger(ln(t.value,new Set(f.map(p=>p.id)),!0)),e.hooks.edgesChange.trigger(ln(n.value))},E=f=>{if(e.multiSelectionActive){const p=f.map(y=>on(y.id,!0));e.hooks.edgesChange.trigger(p);return}e.hooks.edgesChange.trigger(ln(n.value,new Set(f.map(p=>p.id)))),e.hooks.nodesChange.trigger(ln(t.value,new Set,!0))},N=f=>{h(f,!0)},$=f=>{const y=(f||e.nodes).map(m=>(m.selected=!1,on(m.id,!1)));e.hooks.nodesChange.trigger(y)},k=f=>{const y=(f||e.edges).map(m=>(m.selected=!1,on(m.id,!1)));e.hooks.edgesChange.trigger(y)},g=f=>{if(!f||!f.length)return h([],!1);const p=f.reduce((y,m)=>{const I=on(m.id,!1);return En(m)?y.nodes.push(I):y.edges.push(I),y},{nodes:[],edges:[]});p.nodes.length&&e.hooks.nodesChange.trigger(p.nodes),p.edges.length&&e.hooks.edgesChange.trigger(p.edges)},_=f=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([f,e.maxZoom]),e.minZoom=f},R=f=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([e.minZoom,f]),e.maxZoom=f},G=f=>{var p;(p=e.d3Zoom)==null||p.translateExtent(f),e.translateExtent=f},K=f=>{e.nodeExtent=f,i()},F=f=>{var p;(p=e.d3Zoom)==null||p.clickDistance(f)},X=f=>{e.nodesDraggable=f,e.nodesConnectable=f,e.elementsSelectable=f},te=f=>{const p=f instanceof Function?f(e.nodes):f;!e.initialized&&!p.length||(e.nodes=jl(p,u,e.hooks.error.trigger))},W=f=>{const p=f instanceof Function?f(e.edges):f;if(!e.initialized&&!p.length)return;const y=ms(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);vs(e.connectionLookup,n.value,y),e.edges=y},P=f=>{const p=f instanceof Function?f([...e.nodes,...e.edges]):f;!e.initialized&&!p.length||(te(p.filter(En)),W(p.filter(dn)))},oe=f=>{let p=f instanceof Function?f(e.nodes):f;p=Array.isArray(p)?p:[p];const y=jl(p,u,e.hooks.error.trigger),m=[];for(const I of y)m.push(zl(I));m.length&&e.hooks.nodesChange.trigger(m)},M=f=>{let p=f instanceof Function?f(e.edges):f;p=Array.isArray(p)?p:[p];const y=ms(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),m=[];for(const I of y)m.push(zl(I));m.length&&e.hooks.edgesChange.trigger(m)},U=(f,p=!0,y=!1)=>{const m=f instanceof Function?f(e.nodes):f,I=Array.isArray(m)?m:[m],B=[],O=[];function A(L){const Q=l(L);for(const se of Q)(!ze(se.deletable)||se.deletable)&&O.push(Hl(se.id,se.source,se.target,se.sourceHandle,se.targetHandle))}function j(L){const Q=[];for(const se of e.nodes)se.parentNode===L&&Q.push(se);if(Q.length){for(const se of Q)B.push(Fl(se.id));p&&A(Q);for(const se of Q)j(se.id)}}for(const L of I){const Q=typeof L=="string"?u(L):L;Q&&(ze(Q.deletable)&&!Q.deletable||(B.push(Fl(Q.id)),p&&A([Q]),y&&j(Q.id)))}O.length&&e.hooks.edgesChange.trigger(O),B.length&&e.hooks.nodesChange.trigger(B)},T=f=>{const p=f instanceof Function?f(e.edges):f,y=Array.isArray(p)?p:[p],m=[];for(const I of y){const B=typeof I=="string"?c(I):I;B&&(ze(B.deletable)&&!B.deletable||m.push(Hl(typeof I=="string"?I:I.id,B.source,B.target,B.sourceHandle,B.targetHandle)))}e.hooks.edgesChange.trigger(m)},z=(f,p,y=!0)=>{const m=c(f.id);if(!m)return!1;const I=e.edges.indexOf(m),B=d0(f,p,m,y,e.hooks.error.trigger);if(B){const[O]=ms([B],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((A,j)=>j===I?O:A),vs(e.connectionLookup,n.value,[O]),O}return!1},C=(f,p,y={replace:!1})=>{const m=c(f);if(!m)return;const I=typeof p=="function"?p(m):p;m.data=y.replace?I:{...m.data,...I}},D=f=>Bl(f,e.nodes),V=f=>{const p=Bl(f,e.edges);return vs(e.connectionLookup,n.value,p),p},H=(f,p,y={replace:!1})=>{const m=u(f);if(!m)return;const I=typeof p=="function"?p(m):p;y.replace?e.nodes.splice(e.nodes.indexOf(m),1,I):Object.assign(m,I)},Z=(f,p,y={replace:!1})=>{const m=u(f);if(!m)return;const I=typeof p=="function"?p(m):p;m.data=y.replace?I:{...m.data,...I}},ue=(f,p,y=!1)=>{y?e.connectionClickStartHandle=f:e.connectionStartHandle=f,e.connectionEndHandle=null,e.connectionStatus=null,p&&(e.connectionPosition=p)},q=(f,p=null,y=null)=>{e.connectionStartHandle&&(e.connectionPosition=f,e.connectionEndHandle=p,e.connectionStatus=y)},ie=(f,p)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,p?e.connectionClickStartHandle=null:e.connectionStartHandle=null},le=f=>{const p=Fy(f),y=p?null:no(f)?f:u(f.id);return!p&&!y?[null,null,p]:[p?f:wi(y),y,p]},ve=(f,p=!0,y=e.nodes)=>{const[m,I,B]=le(f);if(!m)return[];const O=[];for(const A of y||e.nodes){if(!B&&(A.id===I.id||!A.computedPosition))continue;const j=wi(A),L=xi(j,m);(p&&L>0||L>=Number(m.width)*Number(m.height))&&O.push(A)}return O},ye=(f,p,y=!0)=>{const[m]=le(f);if(!m)return!1;const I=xi(m,p);return y&&I>0||I>=Number(m.width)*Number(m.height)},fe=f=>{const{viewport:p,dimensions:y,d3Zoom:m,d3Selection:I,translateExtent:B}=e;if(!m||!I||!f.x&&!f.y)return!1;const O=Yn.translate(p.x+f.x,p.y+f.y).scale(p.zoom),A=[[0,0],[y.width,y.height]],j=m.constrain()(O,A,B),L=e.viewport.x!==j.x||e.viewport.y!==j.y||e.viewport.zoom!==j.k;return m.transform(I,j),L},_e=f=>{const p=f instanceof Function?f(e):f,y=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];ze(p.defaultEdgeOptions)&&(e.defaultEdgeOptions=p.defaultEdgeOptions);const m=p.modelValue||p.nodes||p.edges?[]:void 0;m&&(p.modelValue&&m.push(...p.modelValue),p.nodes&&m.push(...p.nodes),p.edges&&m.push(...p.edges),P(m));const I=()=>{ze(p.maxZoom)&&R(p.maxZoom),ze(p.minZoom)&&_(p.minZoom),ze(p.translateExtent)&&G(p.translateExtent)};for(const B of Object.keys(p)){const O=B,A=p[O];![...C0,...y].includes(O)&&ze(A)&&(e[O]=A)}Os(()=>e.d3Zoom).not.toBeNull().then(I),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:v,setElements:P,setNodes:te,setEdges:W,addNodes:oe,addEdges:M,removeNodes:U,removeEdges:T,findNode:u,findEdge:c,updateEdge:z,updateEdgeData:C,updateNode:H,updateNodeData:Z,applyEdgeChanges:V,applyNodeChanges:D,addSelectedElements:N,addSelectedNodes:w,addSelectedEdges:E,setMinZoom:_,setMaxZoom:R,setTranslateExtent:G,setNodeExtent:K,setPaneClickDistance:F,removeSelectedElements:g,removeSelectedNodes:$,removeSelectedEdges:k,startConnection:ue,updateConnection:q,endConnection:ie,setInteractive:X,setState:_e,getIntersectingNodes:ve,getIncomers:s,getOutgoers:r,getConnectedEdges:l,getHandleConnections:a,isNodeIntersecting:ye,panBy:fe,fitView:f=>o.value.fitView(f),zoomIn:f=>o.value.zoomIn(f),zoomOut:f=>o.value.zoomOut(f),zoomTo:(f,p)=>o.value.zoomTo(f,p),setViewport:(f,p)=>o.value.setViewport(f,p),setTransform:(f,p)=>o.value.setTransform(f,p),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(f,p,y)=>o.value.setCenter(f,p,y),fitBounds:(f,p)=>o.value.fitBounds(f,p),project:f=>o.value.project(f),screenToFlowCoordinate:f=>o.value.screenToFlowCoordinate(f),flowToScreenCoordinate:f=>o.value.flowToScreenCoordinate(f),toObject:()=>{const f=[],p=[];for(const y of e.nodes){const{computedPosition:m,handleBounds:I,selected:B,dimensions:O,isParent:A,resizing:j,dragging:L,events:Q,...se}=y;f.push(se)}for(const y of e.edges){const{selected:m,sourceNode:I,targetNode:B,events:O,...A}=y;p.push(A)}return JSON.parse(JSON.stringify({nodes:f,edges:p,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:f=>new Promise(p=>{const{nodes:y,edges:m,position:I,zoom:B,viewport:O}=f;if(y&&te(y),m&&W(m),O?.x&&O?.y||I){const A=O?.x||I[0],j=O?.y||I[1],L=O?.zoom||B||e.viewport.zoom;return Os(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:A,y:j,zoom:L}).then(()=>{p(!0)})})}else p(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const f=yc();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const p=Yn.translate(f.defaultViewport.x??0,f.defaultViewport.y??0).scale($n(f.defaultViewport.zoom??1,f.minZoom,f.maxZoom)),y=e.viewportRef.getBoundingClientRect(),m=[[0,0],[y.width,y.height]],I=e.d3Zoom.constrain()(p,m,f.translateExtent);e.d3Zoom.transform(e.d3Selection,I)}_e(f)},$destroy:()=>{}}}const M0=["data-id","data-handleid","data-nodeid","data-handlepos"],I0={name:"Handle",compatConfig:{MODE:3}},Si=we({...I0,props:{id:{default:null},type:{},position:{default:()=>ae.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=Ad(e,["position","connectable","connectableStart","connectableEnd","id"]),o=Ve(()=>n.type??"source"),i=Ve(()=>n.isValidConnection??null),{id:s,connectionStartHandle:r,connectionClickStartHandle:l,connectionEndHandle:a,vueFlowRef:u,nodesConnectable:c,noDragClassName:d,noPanClassName:v}=Re(),{id:h,node:w,nodeEl:E,connectedEdges:N}=vc(),$=J(),k=Ve(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),g=Ve(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),_=Ve(()=>{var W,P,oe,M,U,T;return((W=r.value)==null?void 0:W.nodeId)===h&&((P=r.value)==null?void 0:P.id)===e.id&&((oe=r.value)==null?void 0:oe.type)===o.value||((M=a.value)==null?void 0:M.nodeId)===h&&((U=a.value)==null?void 0:U.id)===e.id&&((T=a.value)==null?void 0:T.type)===o.value}),R=Ve(()=>{var W,P,oe;return((W=l.value)==null?void 0:W.nodeId)===h&&((P=l.value)==null?void 0:P.id)===e.id&&((oe=l.value)==null?void 0:oe.type)===o.value}),{handlePointerDown:G,handleClick:K}=gc({nodeId:h,handleId:e.id,isValidConnection:i,type:o}),F=he(()=>typeof e.connectable=="string"&&e.connectable==="single"?!N.value.some(W=>{const P=W[`${o.value}Handle`];return W[o.value]!==h?!1:P?P===e.id:!0}):typeof e.connectable=="number"?N.value.filter(W=>{const P=W[`${o.value}Handle`];return W[o.value]!==h?!1:P?P===e.id:!0}).length{var W;if(!w.dimensions.width||!w.dimensions.height)return;const P=(W=w.handleBounds[o.value])==null?void 0:W.find(D=>D.id===e.id);if(!u.value||P)return;const oe=u.value.querySelector(".vue-flow__transformationpane");if(!E.value||!$.value||!oe||!e.id)return;const M=E.value.getBoundingClientRect(),U=$.value.getBoundingClientRect(),T=window.getComputedStyle(oe),{m22:z}=new window.DOMMatrixReadOnly(T.transform),C={id:e.id,position:e.position,x:(U.left-M.left)/z,y:(U.top-M.top)/z,type:o.value,nodeId:h,...Gi($.value)};w.handleBounds[o.value]=[...w.handleBounds[o.value]??[],C]});function X(W){const P=$r(W);F.value&&k.value&&(P&&W.button===0||!P)&&G(W)}function te(W){!h||!l.value&&!k.value||F.value&&K(W)}return t({handleClick:K,handlePointerDown:G,onClick:te,onPointerDown:X}),(W,P)=>(Y(),ee("div",{ref_key:"handle",ref:$,"data-id":`${ne(s)}-${ne(h)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":ne(h),"data-handlepos":W.position,class:it(["vue-flow__handle",[`vue-flow__handle-${W.position}`,`vue-flow__handle-${e.id}`,ne(d),ne(v),o.value,{connectable:F.value,connecting:R.value,connectablestart:k.value,connectableend:g.value,connectionindicator:F.value&&(k.value&&!_.value||g.value&&_.value)}]]),onMousedown:X,onTouchstartPassive:X,onClick:te},[Pt(W.$slots,"default",{id:W.id})],42,M0))}}),Xi=function({sourcePosition:e=ae.Bottom,targetPosition:t=ae.Top,label:n,connectable:o=!0,isValidTargetPos:i,isValidSourcePos:s,data:r}){const l=r.label??n;return[Me(Si,{type:"target",position:t,connectable:o,isValidConnection:i}),typeof l!="string"&&l?Me(l):Me(Ee,[l]),Me(Si,{type:"source",position:e,connectable:o,isValidConnection:s})]};Xi.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];Xi.inheritAttrs=!1;Xi.compatConfig={MODE:3};const T0=Xi,Wi=function({targetPosition:e=ae.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:i}){const s=i.label??t;return[Me(Si,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof s!="string"&&s?Me(s):Me(Ee,[s])]};Wi.props=["targetPosition","label","isValidTargetPos","connectable","data"];Wi.inheritAttrs=!1;Wi.compatConfig={MODE:3};const k0=Wi,Zi=function({sourcePosition:e=ae.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:i}){const s=i.label??t;return[typeof s!="string"&&s?Me(s):Me(Ee,[s]),Me(Si,{type:"source",position:e,connectable:n,isValidConnection:o})]};Zi.props=["sourcePosition","label","isValidSourcePos","connectable","data"];Zi.inheritAttrs=!1;Zi.compatConfig={MODE:3};const P0=Zi,A0=["transform"],D0=["width","height","x","y","rx","ry"],O0=["y"],V0={name:"EdgeText",compatConfig:{MODE:3}},R0=we({...V0,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=J({x:0,y:0,width:0,height:0}),n=J(null),o=he(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);dt(i),be([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const s=n.value.getBBox();(s.width!==t.value.width||s.height!==t.value.height)&&(t.value=s)}return(s,r)=>(Y(),ee("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[s.labelShowBg?(Y(),ee("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*s.labelBgPadding[0]}px`,height:`${t.value.height+2*s.labelBgPadding[1]}px`,x:-s.labelBgPadding[0],y:-s.labelBgPadding[1],style:pt(s.labelBgStyle),rx:s.labelBgBorderRadius,ry:s.labelBgBorderRadius},null,12,D0)):Te("",!0),x("text",Ao(s.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:s.labelStyle}),[Pt(s.$slots,"default",{},()=>[typeof s.label!="string"?(Y(),Ke(fr(s.label),{key:0})):(Y(),ee(Ee,{key:1},[Fe(Oe(s.label),1)],64))])],16,O0)],8,A0))}}),B0=["id","d","marker-end","marker-start"],z0=["d","stroke-width"],F0={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},qi=we({...F0,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=J(null),o=J(null),i=J(null),s=Pd();return t({pathEl:n,interactionEl:o,labelEl:i}),(r,l)=>(Y(),ee(Ee,null,[x("path",Ao(ne(s),{id:r.id,ref_key:"pathEl",ref:n,d:r.path,class:"vue-flow__edge-path","marker-end":r.markerEnd,"marker-start":r.markerStart}),null,16,B0),r.interactionWidth?(Y(),ee("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:r.path,"stroke-width":r.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,z0)):Te("",!0),r.label&&r.labelX&&r.labelY?(Y(),Ke(R0,{key:1,ref_key:"labelEl",ref:i,x:r.labelX,y:r.labelY,label:r.label,"label-show-bg":r.labelShowBg,"label-bg-style":r.labelBgStyle,"label-bg-padding":r.labelBgPadding,"label-bg-border-radius":r.labelBgBorderRadius,"label-style":r.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Te("",!0)],64))}});function _c({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,s=n=0?.5*e:t*25*Math.sqrt(-e)}function ql({pos:e,x1:t,y1:n,x2:o,y2:i,c:s}){let r,l;switch(e){case ae.Left:r=t-Xo(t-o,s),l=n;break;case ae.Right:r=t+Xo(o-t,s),l=n;break;case ae.Top:r=t,l=n-Xo(n-i,s);break;case ae.Bottom:r=t,l=n+Xo(i-n,s);break}return[r,l]}function wc(e){const{sourceX:t,sourceY:n,sourcePosition:o=ae.Bottom,targetX:i,targetY:s,targetPosition:r=ae.Top,curvature:l=.25}=e,[a,u]=ql({pos:o,x1:t,y1:n,x2:i,y2:s,c:l}),[c,d]=ql({pos:r,x1:i,y1:s,x2:t,y2:n,c:l}),[v,h,w,E]=bc({sourceX:t,sourceY:n,targetX:i,targetY:s,sourceControlX:a,sourceControlY:u,targetControlX:c,targetControlY:d});return[`M${t},${n} C${a},${u} ${c},${d} ${i},${s}`,v,h,w,E]}function Jl({pos:e,x1:t,y1:n,x2:o,y2:i}){let s,r;switch(e){case ae.Left:case ae.Right:s=.5*(t+o),r=n;break;case ae.Top:case ae.Bottom:s=t,r=.5*(n+i);break}return[s,r]}function xc(e){const{sourceX:t,sourceY:n,sourcePosition:o=ae.Bottom,targetX:i,targetY:s,targetPosition:r=ae.Top}=e,[l,a]=Jl({pos:o,x1:t,y1:n,x2:i,y2:s}),[u,c]=Jl({pos:r,x1:i,y1:s,x2:t,y2:n}),[d,v,h,w]=bc({sourceX:t,sourceY:n,targetX:i,targetY:s,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${t},${n} C${l},${a} ${u},${c} ${i},${s}`,d,v,h,w]}const Ql={[ae.Left]:{x:-1,y:0},[ae.Right]:{x:1,y:0},[ae.Top]:{x:0,y:-1},[ae.Bottom]:{x:0,y:1}};function H0({source:e,sourcePosition:t=ae.Bottom,target:n}){return t===ae.Left||t===ae.Right?e.xe[d]?-1:1)*M:$[d]=(u[d]>n[d]?-1:1)*M}}if(t!==o){const oe=d==="x"?"y":"x",M=r[d]===l[oe],U=a[oe]>u[oe],T=a[oe]=P?(w=(X.x+te.x)/2,E=h[0].y):(w=h[0].x,E=(X.y+te.y)/2)}return[[e,{x:a.x+N.x,y:a.y+N.y},...h,{x:u.x+$.x,y:u.y+$.y},n],w,E,_,R]}function U0(e,t,n,o){const i=Math.min(ea(e,t)/2,ea(t,n)/2,o),{x:s,y:r}=t;if(e.x===s&&s===n.x||e.y===r&&r===n.y)return`L${s} ${r}`;if(e.y===r){const u=e.x{let _;return g>0&&g{const[n,o,i]=G0(e);return Me(qi,{path:n,labelX:o,labelY:i,...t,...e})}}}),K0=Y0,j0=we({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=Ws({...e,sourcePosition:e.sourcePosition??ae.Bottom,targetPosition:e.targetPosition??ae.Top});return Me(qi,{path:n,labelX:o,labelY:i,...t,...e})}}}),Ec=j0,X0=we({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>Me(Ec,{...e,...t,borderRadius:0})}}),W0=X0,Z0=we({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=wc({...e,sourcePosition:e.sourcePosition??ae.Bottom,targetPosition:e.targetPosition??ae.Top});return Me(qi,{path:n,labelX:o,labelY:i,...t,...e})}}}),q0=Z0,J0=we({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=xc({...e,sourcePosition:e.sourcePosition??ae.Bottom,targetPosition:e.targetPosition??ae.Top});return Me(qi,{path:n,labelX:o,labelY:i,...t,...e})}}}),Q0=J0,e_={input:P0,default:T0,output:k0},t_={default:q0,straight:K0,step:W0,smoothstep:Ec,simplebezier:Q0};function n_(e,t,n){const o=he(()=>E=>t.value.get(E)),i=he(()=>E=>n.value.get(E)),s=he(()=>{const E={...t_,...e.edgeTypes},N=Object.keys(E);for(const $ of e.edges)$.type&&!N.includes($.type)&&(E[$.type]=$.type);return E}),r=he(()=>{const E={...e_,...e.nodeTypes},N=Object.keys(E);for(const $ of e.nodes)$.type&&!N.includes($.type)&&(E[$.type]=$.type);return E}),l=he(()=>e.onlyRenderVisibleElements?sc(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),a=he(()=>{if(e.onlyRenderVisibleElements){const E=[];for(const N of e.edges){const $=t.value.get(N.source),k=t.value.get(N.target);Jy({sourcePos:$.computedPosition||{x:0,y:0},targetPos:k.computedPosition||{x:0,y:0},sourceWidth:$.dimensions.width,sourceHeight:$.dimensions.height,targetWidth:k.dimensions.width,targetHeight:k.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&E.push(N)}return E}return e.edges}),u=he(()=>[...l.value,...a.value]),c=he(()=>{const E=[];for(const N of e.nodes)N.selected&&E.push(N);return E}),d=he(()=>{const E=[];for(const N of e.edges)N.selected&&E.push(N);return E}),v=he(()=>[...c.value,...d.value]),h=he(()=>{const E=[];for(const N of e.nodes)N.dimensions.width&&N.dimensions.height&&N.handleBounds!==void 0&&E.push(N);return E}),w=he(()=>l.value.length>0&&h.value.length===l.value.length);return{getNode:o,getEdge:i,getElements:u,getEdgeTypes:s,getNodeTypes:r,getEdges:a,getNodes:l,getSelectedElements:v,getSelectedNodes:c,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:w}}class yn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=hn())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??yn.instance;return yn.instance=o??new yn,n&&(n.config.globalProperties.$vueFlowStorage=yn.instance),yn.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=yc(),i=ko(o),s={};for(const[v,h]of Object.entries(i.hooks)){const w=`on${v.charAt(0).toUpperCase()+v.slice(1)}`;s[w]=h.on}const r={};for(const[v,h]of Object.entries(i.hooks))r[v]=h.trigger;const l=he(()=>{const v=new Map;for(const h of i.nodes)v.set(h.id,h);return v}),a=he(()=>{const v=new Map;for(const h of i.edges)v.set(h.id,h);return v}),u=n_(i,l,a),c=$0(i,l,a);c.setState({...i,...n});const d={...s,...u,...c,...Wp(i),nodeLookup:l,edgeLookup:a,emits:r,id:t,vueFlowVersion:"1.45.0",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Re(e){const t=yn.getInstance(),n=Ti(),o=typeof e=="object",i=o?e:{id:e},s=i.id,r=s??n?.vueFlowId;let l;if(n){const a=yt(Zl,null);typeof a<"u"&&a!==null&&(!r||a.id===r)&&(l=a)}if(l||r&&(l=t.get(r)),!l||r&&l.id!==r){const a=s??t.getId(),u=t.create(a,i);l=u,(n??Ii(!0)).run(()=>{be(u.applyDefault,(d,v,h)=>{const w=N=>{u.applyNodeChanges(N)},E=N=>{u.applyEdgeChanges(N)};d?(u.onNodesChange(w),u.onEdgesChange(E)):(u.hooks.value.nodesChange.off(w),u.hooks.value.edgesChange.off(E)),h(()=>{u.hooks.value.nodesChange.off(w),u.hooks.value.edgesChange.off(E)})},{immediate:!0}),zi(()=>{if(l){const d=t.get(l.id);d?d.$destroy():Ki(`No store instance found for id ${l.id} in storage.`)}})})}else o&&l.setState(i);if(n&&(Sn(Zl,l),n.vueFlowId=l.id),o){const a=hn();a?.type.name!=="VueFlow"&&l.emits.error(new Le(He.USEVUEFLOW_OPTIONS))}return l}function o_(e){const{emits:t,dimensions:n}=Re();let o;dt(()=>{const i=e.value,s=()=>{if(!i)return;const r=Gi(i);(r.width===0||r.height===0)&&t.error(new Le(He.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:r.width||500,height:r.height||500}};s(),window.addEventListener("resize",s),i&&(o=new ResizeObserver(()=>s()),o.observe(i)),cr(()=>{window.removeEventListener("resize",s),o&&i&&o.unobserve(i)})})}const i_={name:"UserSelection",compatConfig:{MODE:3}},s_=we({...i_,props:{userSelectionRect:{}},setup(e){return(t,n)=>(Y(),ee("div",{class:"vue-flow__selection vue-flow__container",style:pt({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),r_=["tabIndex"],l_={name:"NodesSelection",compatConfig:{MODE:3}},a_=we({...l_,setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:i,disableKeyboardA11y:s,userSelectionActive:r}=Re(),l=mc(),a=J(null),u=pc({el:a,onStart(w){t.selectionDragStart(w)},onDrag(w){t.selectionDrag(w)},onStop(w){t.selectionDragStop(w)}});dt(()=>{var w;s.value||(w=a.value)==null||w.focus({preventScroll:!0})});const c=he(()=>ic(o.value)),d=he(()=>({width:`${c.value.width}px`,height:`${c.value.height}px`,top:`${c.value.y}px`,left:`${c.value.x}px`}));function v(w){t.selectionContextMenu({event:w,nodes:o.value})}function h(w){s||Bn[w.key]&&(w.preventDefault(),l({x:Bn[w.key].x,y:Bn[w.key].y},w.shiftKey))}return(w,E)=>!ne(r)&&c.value.width&&c.value.height?(Y(),ee("div",{key:0,class:it(["vue-flow__nodesselection vue-flow__container",ne(i)]),style:pt({transform:`translate(${ne(n).x}px,${ne(n).y}px) scale(${ne(n).zoom})`})},[x("div",{ref_key:"el",ref:a,class:it([{dragging:ne(u)},"vue-flow__nodesselection-rect"]),style:pt(d.value),tabIndex:ne(s)?void 0:-1,onContextmenu:v,onKeydown:h},null,46,r_)],6)):Te("",!0)}});function u_(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const c_={name:"Pane",compatConfig:{MODE:3}},d_=we({...c_,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:i,userSelectionActive:s,removeSelectedElements:r,userSelectionRect:l,elementsSelectable:a,nodesSelectionActive:u,getSelectedEdges:c,getSelectedNodes:d,removeNodes:v,removeEdges:h,selectionMode:w,deleteKeyCode:E,multiSelectionKeyCode:N,multiSelectionActive:$,edgeLookup:k,nodeLookup:g,connectionLookup:_,defaultEdgeOptions:R,connectionStartHandle:G}=Re(),K=J(null),F=J(new Set),X=J(new Set),te=J(),W=Ve(()=>a.value&&(e.isSelecting||s.value)),P=Ve(()=>G.value!==null);let oe=!1,M=!1;const U=go(E,{actInsideInputWithModifier:!1}),T=go(N);be(U,q=>{q&&(v(d.value),h(c.value),u.value=!1)}),be(T,q=>{$.value=q});function z(q,ie){return le=>{le.target===ie&&q?.(le)}}function C(q){if(oe||P.value){oe=!1;return}i.paneClick(q),r(),u.value=!1}function D(q){q.preventDefault(),q.stopPropagation(),i.paneContextMenu(q)}function V(q){i.paneScroll(q)}function H(q){var ie,le,ve;if(te.value=(ie=t.value)==null?void 0:ie.getBoundingClientRect(),!a.value||!e.isSelecting||q.button!==0||q.target!==K.value||!te.value)return;(ve=(le=q.target)==null?void 0:le.setPointerCapture)==null||ve.call(le,q.pointerId);const{x:ye,y:fe}=u_(q,te.value);M=!0,oe=!1,r(),l.value={width:0,height:0,startX:ye,startY:fe,x:ye,y:fe},i.selectionStart(q)}function Z(q){var ie;if(!te.value||!l.value)return;oe=!0;const{x:le,y:ve}=Tt(q,te.value),{startX:ye=0,startY:fe=0}=l.value,_e={startX:ye,startY:fe,x:lef.id)),X.value=new Set;const S=((ie=R.value)==null?void 0:ie.selectable)??!0;for(const f of F.value){const p=_.value.get(f);if(p)for(const{edgeId:y}of p.values()){const m=k.value.get(y);m&&(m.selectable??S)&&X.value.add(y)}}if(!Wl(ce,F.value)){const f=ln(g.value,F.value,!0);i.nodesChange(f)}if(!Wl(b,X.value)){const f=ln(k.value,X.value);i.edgesChange(f)}l.value=_e,s.value=!0,u.value=!1}function ue(q){var ie;q.button!==0||!M||((ie=q.target)==null||ie.releasePointerCapture(q.pointerId),!s.value&&l.value&&q.target===K.value&&C(q),s.value=!1,l.value=null,u.value=F.value.size>0,i.selectionEnd(q),e.selectionKeyPressed&&(oe=!1),M=!1)}return(q,ie)=>(Y(),ee("div",{ref_key:"container",ref:K,class:it(["vue-flow__pane vue-flow__container",{selection:q.isSelecting}]),onClick:ie[0]||(ie[0]=le=>W.value?void 0:z(C,K.value)(le)),onContextmenu:ie[1]||(ie[1]=le=>z(D,K.value)(le)),onWheelPassive:ie[2]||(ie[2]=le=>z(V,K.value)(le)),onPointerenter:ie[3]||(ie[3]=le=>W.value?void 0:ne(i).paneMouseEnter(le)),onPointerdown:ie[4]||(ie[4]=le=>W.value?H(le):ne(i).paneMouseMove(le)),onPointermove:ie[5]||(ie[5]=le=>W.value?Z(le):ne(i).paneMouseMove(le)),onPointerup:ie[6]||(ie[6]=le=>W.value?ue(le):void 0),onPointerleave:ie[7]||(ie[7]=le=>ne(i).paneMouseLeave(le))},[Pt(q.$slots,"default"),ne(s)&&ne(l)?(Y(),Ke(s_,{key:0,"user-selection-rect":ne(l)},null,8,["user-selection-rect"])):Te("",!0),ne(u)&&ne(d).length?(Y(),Ke(a_,{key:1})):Te("",!0)],34))}}),f_={name:"Transform",compatConfig:{MODE:3}},h_=we({...f_,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Re(),i=he(()=>n.value?!o.value:!1),s=he(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(r,l)=>(Y(),ee("div",{class:"vue-flow__transformationpane vue-flow__container",style:pt({transform:s.value,opacity:i.value?0:void 0})},[Pt(r.$slots,"default")],4))}}),p_={name:"Viewport",compatConfig:{MODE:3}},g_=we({...p_,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:s,selectionKeyCode:r,panActivationKeyCode:l,panOnScroll:a,panOnScrollMode:u,panOnScrollSpeed:c,panOnDrag:d,zoomOnDoubleClick:v,zoomOnPinch:h,zoomOnScroll:w,preventScrolling:E,noWheelClassName:N,noPanClassName:$,emits:k,connectionStartHandle:g,userSelectionActive:_,paneDragging:R,d3Zoom:G,d3Selection:K,d3ZoomHandler:F,viewport:X,viewportRef:te,paneClickDistance:W}=Re();o_(te);const P=yo(!1),oe=yo(!1);let M=null,U=!1,T=0,z={x:0,y:0,zoom:0};const C=go(l),D=go(r),V=go(s),H=Ve(()=>(!D.value||D.value&&r.value===!0)&&(C.value||d.value)),Z=Ve(()=>C.value||a.value),ue=Ve(()=>D.value||r.value===!0&&H.value!==!0);dt(()=>{if(!te.value){Ki("Viewport element is missing");return}const fe=te.value,_e=fe.getBoundingClientRect(),ce=Ay().clickDistance(W.value).scaleExtent([t.value,n.value]).translateExtent(i.value),b=gt(fe).call(ce),S=b.on("wheel.zoom"),f=Yn.translate(o.value.x??0,o.value.y??0).scale($n(o.value.zoom??1,t.value,n.value)),p=[[0,0],[_e.width,_e.height]],y=ce.constrain()(f,p,i.value);ce.transform(b,y),ce.wheelDelta(ie),G.value=ce,K.value=b,F.value=S,X.value={x:y.x,y:y.y,zoom:y.k},ce.on("start",m=>{var I;if(!m.sourceEvent)return null;T=m.sourceEvent.button,P.value=!0;const B=ve(m.transform);((I=m.sourceEvent)==null?void 0:I.type)==="mousedown"&&(R.value=!0),z=B,k.viewportChangeStart(B),k.moveStart({event:m,flowTransform:B})}),ce.on("end",m=>{if(!m.sourceEvent)return null;if(P.value=!1,R.value=!1,q(H.value,T??0)&&!U&&k.paneContextMenu(m.sourceEvent),U=!1,le(z,m.transform)){const I=ve(m.transform);z=I,k.viewportChangeEnd(I),k.moveEnd({event:m,flowTransform:I})}}),ce.filter(m=>{var I;const B=V.value||w.value,O=h.value&&m.ctrlKey,A=m.button;if(A===1&&m.type==="mousedown"&&(ye(m,"vue-flow__node")||ye(m,"vue-flow__edge")))return!0;if(!H.value&&!B&&!Z.value&&!v.value&&!h.value||_.value||!v.value&&m.type==="dblclick"||ye(m,N.value)&&m.type==="wheel"||ye(m,$.value)&&(m.type!=="wheel"||Z.value&&m.type==="wheel"&&!V.value)||!h.value&&m.ctrlKey&&m.type==="wheel"||!B&&!Z.value&&!O&&m.type==="wheel")return!1;if(!h&&m.type==="touchstart"&&((I=m.touches)==null?void 0:I.length)>1)return m.preventDefault(),!1;if(!H.value&&(m.type==="mousedown"||m.type==="touchstart")||r.value===!0&&Array.isArray(d.value)&&d.value.includes(0)&&A===0||Array.isArray(d.value)&&!d.value.includes(A)&&(m.type==="mousedown"||m.type==="touchstart"))return!1;const j=Array.isArray(d.value)&&d.value.includes(A)||r.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!A||A<=1;return(!m.ctrlKey||C.value||m.type==="wheel")&&j}),be([_,H],()=>{_.value&&!P.value?ce.on("zoom",null):_.value||ce.on("zoom",m=>{X.value={x:m.transform.x,y:m.transform.y,zoom:m.transform.k};const I=ve(m.transform);U=q(H.value,T??0),k.viewportChange(I),k.move({event:m,flowTransform:I})})},{immediate:!0}),be([_,Z,u,V,h,E,N],()=>{Z.value&&!V.value&&!_.value?b.on("wheel.zoom",m=>{if(ye(m,N.value))return!1;const I=V.value||w.value,B=h.value&&m.ctrlKey;if(!(!E.value||Z.value||I||B))return!1;m.preventDefault(),m.stopImmediatePropagation();const A=b.property("__zoom").k||1,j=Ei();if(!C.value&&m.ctrlKey&&h.value&&j){const Ne=$t(m),Ce=ie(m),je=A*2**Ce;ce.scaleTo(b,je,Ne,m);return}const L=m.deltaMode===1?20:1;let Q=u.value===po.Vertical?0:m.deltaX*L,se=u.value===po.Horizontal?0:m.deltaY*L;!j&&m.shiftKey&&u.value!==po.Vertical&&!Q&&se&&(Q=se,se=0),ce.translateBy(b,-(Q/A)*c.value,-(se/A)*c.value);const pe=ve(b.property("__zoom"));M&&clearTimeout(M),oe.value?(k.move({event:m,flowTransform:pe}),k.viewportChange(pe),M=setTimeout(()=>{k.moveEnd({event:m,flowTransform:pe}),k.viewportChangeEnd(pe),oe.value=!1},150)):(oe.value=!0,k.moveStart({event:m,flowTransform:pe}),k.viewportChangeStart(pe))},{passive:!1}):typeof S<"u"&&b.on("wheel.zoom",function(m,I){const B=!E.value&&m.type==="wheel"&&!m.ctrlKey,O=V.value||w.value,A=h.value&&m.ctrlKey;if(!O&&!a.value&&!A&&m.type==="wheel"||B||ye(m,N.value))return null;m.preventDefault(),S.call(this,m,I)},{passive:!1})},{immediate:!0})});function q(fe,_e){return _e===2&&Array.isArray(fe)&&fe.includes(2)}function ie(fe){const _e=fe.ctrlKey&&Ei()?10:1;return-fe.deltaY*(fe.deltaMode===1?.05:fe.deltaMode?1:.002)*_e}function le(fe,_e){return fe.x!==_e.x&&!Number.isNaN(_e.x)||fe.y!==_e.y&&!Number.isNaN(_e.y)||fe.zoom!==_e.k&&!Number.isNaN(_e.k)}function ve(fe){return{x:fe.x,y:fe.y,zoom:fe.k}}function ye(fe,_e){return fe.target.closest(`.${_e}`)}return(fe,_e)=>(Y(),ee("div",{ref_key:"viewportRef",ref:te,class:"vue-flow__viewport vue-flow__container"},[Ie(d_,{"is-selecting":ue.value,"selection-key-pressed":ne(D),class:it({connecting:!!ne(g),dragging:ne(R),draggable:ne(d)===!0||Array.isArray(ne(d))&&ne(d).includes(0)})},{default:zn(()=>[Ie(h_,null,{default:zn(()=>[Pt(fe.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),v_=["id"],m_=["id"],y_=["id"],__={name:"A11yDescriptions",compatConfig:{MODE:3}},b_=we({...__,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Re();return(i,s)=>(Y(),ee(Ee,null,[x("div",{id:`${ne(Zu)}-${ne(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Oe(ne(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,v_),x("div",{id:`${ne(qu)}-${ne(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,m_),ne(n)?Te("",!0):(Y(),ee("div",{key:0,id:`${ne(zy)}-${ne(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Oe(ne(o)),9,y_))],64))}});function w_(){const e=Re();be(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function x_(e,t,n){return n===ae.Left?e-t:n===ae.Right?e+t:e}function E_(e,t,n){return n===ae.Top?e-t:n===ae.Bottom?e+t:e}const Mr=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=ae.Top,type:i}){return Me("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:x_(t,e,o),cy:E_(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};Mr.props=["radius","centerX","centerY","position","type"];Mr.compatConfig={MODE:3};const ta=Mr,S_=we({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:i,emits:s,nodesSelectionActive:r,noPanClassName:l,getEdgeTypes:a,removeSelectedEdges:u,findEdge:c,findNode:d,isValidConnection:v,multiSelectionActive:h,disableKeyboardA11y:w,elementsSelectable:E,edgesUpdatable:N,edgesFocusable:$,hooks:k}=Re(),g=he(()=>c(e.id)),{emit:_,on:R}=g0(g.value,s),G=yt(ji),K=hn(),F=J(!1),X=J(!1),te=J(""),W=J(null),P=J("source"),oe=J(null),M=Ve(()=>typeof g.value.selectable>"u"?E.value:g.value.selectable),U=Ve(()=>typeof g.value.updatable>"u"?N.value:g.value.updatable),T=Ve(()=>typeof g.value.focusable>"u"?$.value:g.value.focusable);Sn(f0,e.id),Sn(h0,oe);const z=he(()=>g.value.class instanceof Function?g.value.class(g.value):g.value.class),C=he(()=>g.value.style instanceof Function?g.value.style(g.value):g.value.style),D=he(()=>{const p=g.value.type||"default",y=G?.[`edge-${p}`];if(y)return y;let m=g.value.template??a.value[p];if(typeof m=="string"&&K){const I=Object.keys(K.appContext.components);I&&I.includes(p)&&(m=Ha(p,!1))}return m&&typeof m!="string"?m:(s.error(new Le(He.EDGE_TYPE_MISSING,m)),!1)}),{handlePointerDown:V}=gc({nodeId:te,handleId:W,type:P,isValidConnection:v,edgeUpdaterType:P,onEdgeUpdate:ue,onEdgeUpdateEnd:q});return()=>{const p=d(g.value.source),y=d(g.value.target),m="pathOptions"in g.value?g.value.pathOptions:{};if(!p&&!y)return s.error(new Le(He.EDGE_SOURCE_TARGET_MISSING,g.value.id,g.value.source,g.value.target)),null;if(!p)return s.error(new Le(He.EDGE_SOURCE_MISSING,g.value.id,g.value.source)),null;if(!y)return s.error(new Le(He.EDGE_TARGET_MISSING,g.value.id,g.value.target)),null;if(!g.value||g.value.hidden||p.hidden||y.hidden)return null;let I;o.value===cn.Strict?I=p.handleBounds.source:I=[...p.handleBounds.source||[],...p.handleBounds.target||[]];const B=Ul(I,g.value.sourceHandle);let O;o.value===cn.Strict?O=y.handleBounds.target:O=[...y.handleBounds.target||[],...y.handleBounds.source||[]];const A=Ul(O,g.value.targetHandle),j=B?.position||ae.Bottom,L=A?.position||ae.Top,{x:Q,y:se}=Kn(p,B,j),{x:pe,y:Ne}=Kn(y,A,L);return g.value.sourceX=Q,g.value.sourceY=se,g.value.targetX=pe,g.value.targetY=Ne,Me("g",{ref:oe,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${D.value===!1?"default":g.value.type||"default"}`,l.value,z.value,{updating:F.value,selected:g.value.selected,animated:g.value.animated,inactive:!M.value&&!k.value.edgeClick.hasListeners()}],tabIndex:T.value?0:void 0,"aria-label":g.value.ariaLabel===null?void 0:g.value.ariaLabel??`Edge from ${g.value.source} to ${g.value.target}`,"aria-describedby":T.value?`${qu}-${t}`:void 0,"aria-roledescription":"edge",role:T.value?"group":"img",...g.value.domAttributes,onClick:le,onContextmenu:ve,onDblclick:ye,onMouseenter:fe,onMousemove:_e,onMouseleave:ce,onKeyDown:T.value?f:void 0},[X.value?null:Me(D.value===!1?a.value.default:D.value,{id:e.id,sourceNode:p,targetNode:y,source:g.value.source,target:g.value.target,type:g.value.type,updatable:U.value,selected:g.value.selected,animated:g.value.animated,label:g.value.label,labelStyle:g.value.labelStyle,labelShowBg:g.value.labelShowBg,labelBgStyle:g.value.labelBgStyle,labelBgPadding:g.value.labelBgPadding,labelBgBorderRadius:g.value.labelBgBorderRadius,data:g.value.data,events:{...g.value.events,...R},style:C.value,markerStart:`url('#${Mo(g.value.markerStart,t)}')`,markerEnd:`url('#${Mo(g.value.markerEnd,t)}')`,sourcePosition:j,targetPosition:L,sourceX:Q,sourceY:se,targetX:pe,targetY:Ne,sourceHandleId:g.value.sourceHandle,targetHandleId:g.value.targetHandle,interactionWidth:g.value.interactionWidth,...m}),[U.value==="source"||U.value===!0?[Me("g",{onMousedown:b,onMouseenter:H,onMouseout:Z},Me(ta,{position:j,centerX:Q,centerY:se,radius:i.value,type:"source","data-type":"source"}))]:null,U.value==="target"||U.value===!0?[Me("g",{onMousedown:S,onMouseenter:H,onMouseout:Z},Me(ta,{position:L,centerX:pe,centerY:Ne,radius:i.value,type:"target","data-type":"target"}))]:null]])};function H(){F.value=!0}function Z(){F.value=!1}function ue(p,y){_.update({event:p,edge:g.value,connection:y})}function q(p){_.updateEnd({event:p,edge:g.value}),X.value=!1}function ie(p,y){p.button===0&&(X.value=!0,te.value=y?g.value.target:g.value.source,W.value=(y?g.value.targetHandle:g.value.sourceHandle)??null,P.value=y?"target":"source",_.updateStart({event:p,edge:g.value}),V(p))}function le(p){var y;const m={event:p,edge:g.value};M.value&&(r.value=!1,g.value.selected&&h.value?(u([g.value]),(y=oe.value)==null||y.blur()):n([g.value])),_.click(m)}function ve(p){_.contextMenu({event:p,edge:g.value})}function ye(p){_.doubleClick({event:p,edge:g.value})}function fe(p){_.mouseEnter({event:p,edge:g.value})}function _e(p){_.mouseMove({event:p,edge:g.value})}function ce(p){_.mouseLeave({event:p,edge:g.value})}function b(p){ie(p,!0)}function S(p){ie(p,!1)}function f(p){var y;!w.value&&Ju.includes(p.key)&&M.value&&(p.key==="Escape"?((y=oe.value)==null||y.blur(),u([c(e.id)])):n([c(e.id)]))}}}),N_=S_,C_=we({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:i,connectionPosition:s,connectionLineType:r,connectionLineStyle:l,connectionLineOptions:a,connectionStatus:u,viewport:c,findNode:d}=Re(),v=(e=yt(ji))==null?void 0:e["connection-line"],h=he(()=>{var k;return d((k=o.value)==null?void 0:k.nodeId)}),w=he(()=>{var k;return d((k=i.value)==null?void 0:k.nodeId)??null}),E=he(()=>({x:(s.value.x-c.value.x)/c.value.zoom,y:(s.value.y-c.value.y)/c.value.zoom})),N=he(()=>a.value.markerStart?`url(#${Mo(a.value.markerStart,t)})`:""),$=he(()=>a.value.markerEnd?`url(#${Mo(a.value.markerEnd,t)})`:"");return()=>{var k,g,_;if(!h.value||!o.value)return null;const R=o.value.id,G=o.value.type,K=h.value.handleBounds;let F=K?.[G]??[];if(n.value===cn.Loose){const C=K?.[G==="source"?"target":"source"]??[];F=[...F,...C]}if(!F)return null;const X=(R?F.find(C=>C.id===R):F[0])??null,te=X?.position??ae.Top,{x:W,y:P}=Kn(h.value,X,te);let oe=null;w.value&&(n.value===cn.Strict?oe=((k=w.value.handleBounds[G==="source"?"target":"source"])==null?void 0:k.find(C=>{var D;return C.id===((D=i.value)==null?void 0:D.id)}))||null:oe=((g=[...w.value.handleBounds.source??[],...w.value.handleBounds.target??[]])==null?void 0:g.find(C=>{var D;return C.id===((D=i.value)==null?void 0:D.id)}))||null);const M=((_=i.value)==null?void 0:_.position)??(te?js[te]:null);if(!te||!M)return null;const U=r.value??a.value.type??mn.Bezier;let T="";const z={sourceX:W,sourceY:P,sourcePosition:te,targetX:E.value.x,targetY:E.value.y,targetPosition:M};return U===mn.Bezier?[T]=wc(z):U===mn.Step?[T]=Ws({...z,borderRadius:0}):U===mn.SmoothStep?[T]=Ws(z):U===mn.SimpleBezier?[T]=xc(z):T=`M${W},${P} ${E.value.x},${E.value.y}`,Me("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},Me("g",{class:"vue-flow__connection"},v?Me(v,{sourceX:W,sourceY:P,sourcePosition:te,targetX:E.value.x,targetY:E.value.y,targetPosition:M,sourceNode:h.value,sourceHandle:X,targetNode:w.value,targetHandle:oe,markerEnd:$.value,markerStart:N.value,connectionStatus:u.value}):Me("path",{d:T,class:[a.value.class,u,"vue-flow__connection-path"],style:{...l.value,...a.value.style},"marker-end":$.value,"marker-start":N.value})))}}}),$_=C_,M_=["id","markerWidth","markerHeight","markerUnits","orient"],I_={name:"MarkerType",compatConfig:{MODE:3}},T_=we({...I_,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(Y(),ee("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===ne(Gs).ArrowClosed?(Y(),ee("polyline",{key:0,style:pt({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):Te("",!0),t.type===ne(Gs).Arrow?(Y(),ee("polyline",{key:1,style:pt({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Te("",!0)],8,M_))}}),k_={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},P_={name:"MarkerDefinitions",compatConfig:{MODE:3}},A_=we({...P_,setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:i}=Re(),s=he(()=>{const r=new Set,l=[],a=u=>{if(u){const c=Mo(u,t);r.has(c)||(typeof u=="object"?l.push({...u,id:c,color:u.color||i.value}):l.push({id:c,color:i.value,type:u}),r.add(c))}};for(const u of[o.value.markerEnd,o.value.markerStart])a(u);for(const u of n.value)for(const c of[u.markerStart,u.markerEnd])a(c);return l.sort((u,c)=>u.id.localeCompare(c.id))});return(r,l)=>(Y(),ee("svg",k_,[x("defs",null,[(Y(!0),ee(Ee,null,st(s.value,a=>(Y(),Ke(T_,{id:a.id,key:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,"stroke-width":a.strokeWidth,orient:a.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),D_={name:"Edges",compatConfig:{MODE:3}},O_=we({...D_,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Re();return(i,s)=>(Y(),ee(Ee,null,[Ie(A_),(Y(!0),ee(Ee,null,st(ne(n),r=>(Y(),ee("svg",{key:r.id,class:"vue-flow__edges vue-flow__container",style:pt({zIndex:ne(Qy)(r,ne(t),ne(o))})},[Ie(ne(N_),{id:r.id},null,8,["id"])],4))),128)),Ie(ne($_))],64))}}),V_=we({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:i,multiSelectionActive:s,emits:r,removeSelectedNodes:l,addSelectedNodes:a,updateNodeDimensions:u,onUpdateNodeInternals:c,getNodeTypes:d,nodeExtent:v,elevateNodesOnSelect:h,disableKeyboardA11y:w,ariaLiveMessage:E,snapToGrid:N,snapGrid:$,nodeDragThreshold:k,nodesDraggable:g,elementsSelectable:_,nodesConnectable:R,nodesFocusable:G,hooks:K}=Re(),F=J(null);Sn(hc,F),Sn(fc,e.id);const X=yt(ji),te=hn(),W=mc(),{node:P,parentNode:oe}=vc(e.id),{emit:M,on:U}=_0(P,r),T=Ve(()=>typeof P.draggable>"u"?g.value:P.draggable),z=Ve(()=>typeof P.selectable>"u"?_.value:P.selectable),C=Ve(()=>typeof P.connectable>"u"?R.value:P.connectable),D=Ve(()=>typeof P.focusable>"u"?G.value:P.focusable),V=he(()=>z.value||T.value||K.value.nodeClick.hasListeners()||K.value.nodeDoubleClick.hasListeners()||K.value.nodeMouseEnter.hasListeners()||K.value.nodeMouseMove.hasListeners()||K.value.nodeMouseLeave.hasListeners()),H=Ve(()=>!!P.dimensions.width&&!!P.dimensions.height),Z=he(()=>{const y=P.type||"default",m=X?.[`node-${y}`];if(m)return m;let I=P.template||d.value[y];if(typeof I=="string"&&te){const B=Object.keys(te.appContext.components);B&&B.includes(y)&&(I=Ha(y,!1))}return I&&typeof I!="string"?I:(r.error(new Le(He.NODE_TYPE_MISSING,I)),!1)}),ue=pc({id:e.id,el:F,disabled:()=>!T.value,selectable:z,dragHandle:()=>P.dragHandle,onStart(y){M.dragStart(y)},onDrag(y){M.drag(y)},onStop(y){M.dragStop(y)},onClick(y){f(y)}}),q=he(()=>P.class instanceof Function?P.class(P):P.class),ie=he(()=>{const y=(P.style instanceof Function?P.style(P):P.style)||{},m=P.width instanceof Function?P.width(P):P.width,I=P.height instanceof Function?P.height(P):P.height;return!y.width&&m&&(y.width=typeof m=="string"?m:`${m}px`),!y.height&&I&&(y.height=typeof I=="string"?I:`${I}px`),y}),le=Ve(()=>Number(P.zIndex??ie.value.zIndex??0));return c(y=>{(y.includes(e.id)||!y.length)&&ye()}),dt(()=>{be(()=>P.hidden,(y=!1,m,I)=>{!y&&F.value&&(e.resizeObserver.observe(F.value),I(()=>{F.value&&e.resizeObserver.unobserve(F.value)}))},{immediate:!0,flush:"post"})}),be([()=>P.type,()=>P.sourcePosition,()=>P.targetPosition],()=>{ut(()=>{u([{id:e.id,nodeElement:F.value,forceUpdate:!0}])})}),be([()=>P.position.x,()=>P.position.y,()=>{var y;return(y=oe.value)==null?void 0:y.computedPosition.x},()=>{var y;return(y=oe.value)==null?void 0:y.computedPosition.y},()=>{var y;return(y=oe.value)==null?void 0:y.computedPosition.z},le,()=>P.selected,()=>P.dimensions.height,()=>P.dimensions.width,()=>{var y;return(y=oe.value)==null?void 0:y.dimensions.height},()=>{var y;return(y=oe.value)==null?void 0:y.dimensions.width}],([y,m,I,B,O,A])=>{const j={x:y,y:m,z:A+(h.value&&P.selected?1e3:0)};typeof I<"u"&&typeof B<"u"?P.computedPosition=jy({x:I,y:B,z:O},j):P.computedPosition=j},{flush:"post",immediate:!0}),be([()=>P.extent,v],([y,m],[I,B])=>{(y!==I||m!==B)&&ve()}),P.extent==="parent"||typeof P.extent=="object"&&"range"in P.extent&&P.extent.range==="parent"?Os(()=>H).toBe(!0).then(ve):ve(),()=>P.hidden?null:Me("div",{ref:F,"data-id":P.id,class:["vue-flow__node",`vue-flow__node-${Z.value===!1?"default":P.type||"default"}`,{[n.value]:T.value,dragging:ue?.value,draggable:T.value,selected:P.selected,selectable:z.value,parent:P.isParent},q.value],style:{visibility:H.value?"visible":"hidden",zIndex:P.computedPosition.z??le.value,transform:`translate(${P.computedPosition.x}px,${P.computedPosition.y}px)`,pointerEvents:V.value?"all":"none",...ie.value},tabIndex:D.value?0:void 0,role:D.value?"group":void 0,"aria-describedby":w.value?void 0:`${Zu}-${t}`,"aria-label":P.ariaLabel,"aria-roledescription":"node",...P.domAttributes,onMouseenter:fe,onMousemove:_e,onMouseleave:ce,onContextmenu:b,onClick:f,onDblclick:S,onKeydown:p},[Me(Z.value===!1?d.value.default:Z.value,{id:P.id,type:P.type,data:P.data,events:{...P.events,...U},selected:P.selected,resizing:P.resizing,dragging:ue.value,connectable:C.value,position:P.computedPosition,dimensions:P.dimensions,isValidTargetPos:P.isValidTargetPos,isValidSourcePos:P.isValidSourcePos,parent:P.parentNode,parentNodeId:P.parentNode,zIndex:P.computedPosition.z??le.value,targetPosition:P.targetPosition,sourcePosition:P.sourcePosition,label:P.label,dragHandle:P.dragHandle,onUpdateNodeInternals:ye})]);function ve(){const y=P.computedPosition,{computedPosition:m,position:I}=Cr(P,N.value?Yi(y,$.value):y,r.error,v.value,oe.value);(P.computedPosition.x!==m.x||P.computedPosition.y!==m.y)&&(P.computedPosition={...P.computedPosition,...m}),(P.position.x!==I.x||P.position.y!==I.y)&&(P.position=I)}function ye(){F.value&&u([{id:e.id,nodeElement:F.value,forceUpdate:!0}])}function fe(y){ue?.value||M.mouseEnter({event:y,node:P})}function _e(y){ue?.value||M.mouseMove({event:y,node:P})}function ce(y){ue?.value||M.mouseLeave({event:y,node:P})}function b(y){return M.contextMenu({event:y,node:P})}function S(y){return M.doubleClick({event:y,node:P})}function f(y){z.value&&(!o.value||!T.value||k.value>0)&&Xs(P,s.value,a,l,i,!1,F.value),M.click({event:y,node:P})}function p(y){if(!(Ys(y)||w.value))if(Ju.includes(y.key)&&z.value){const m=y.key==="Escape";Xs(P,s.value,a,l,i,m,F.value)}else T.value&&P.selected&&Bn[y.key]&&(y.preventDefault(),E.value=`Moved selected node ${y.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~P.position.x}, y: ${~~P.position.y}`,W({x:Bn[y.key].x,y:Bn[y.key].y},y.shiftKey))}}}),R_=V_;function B_(e={includeHiddenNodes:!1}){const{nodes:t}=Re();return he(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const z_={class:"vue-flow__nodes vue-flow__container"},F_={name:"Nodes",compatConfig:{MODE:3}},H_=we({...F_,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Re(),i=B_(),s=J();return be(i,r=>{r&&ut(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),dt(()=>{s.value=new ResizeObserver(r=>{const l=r.map(a=>({id:a.target.getAttribute("data-id"),nodeElement:a.target,forceUpdate:!0}));ut(()=>n(l))})}),cr(()=>{var r;return(r=s.value)==null?void 0:r.disconnect()}),(r,l)=>(Y(),ee("div",z_,[s.value?(Y(!0),ee(Ee,{key:0},st(ne(t),(a,u,c,d)=>{const v=[a.id];if(d&&d.key===a.id&&bf(d,v))return d;const h=(Y(),Ke(ne(R_),{id:a.id,key:a.id,"resize-observer":s.value},null,8,["id","resize-observer"]));return h.memo=v,h},l,0),128)):Te("",!0)]))}});function L_(){const{emits:e}=Re();dt(()=>{if(dc()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Le(He.MISSING_STYLES))}})}const U_=x("div",{class:"vue-flow__edge-labels"},null,-1),G_={name:"VueFlow",compatConfig:{MODE:3}},Y_=we({...G_,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,i=kd(),s=as(o,"modelValue",n),r=as(o,"nodes",n),l=as(o,"edges",n),a=Re(o),u=E0({modelValue:s,nodes:r,edges:l},o,a);return N0(n,a.hooks),w_(),L_(),Sn(ji,i),dr(()=>{u()}),t(a),(c,d)=>(Y(),ee("div",{ref:ne(a).vueFlowRef,class:"vue-flow"},[Ie(g_,null,{default:zn(()=>[Ie(O_),U_,Ie(H_),Pt(c.$slots,"zoom-pane")]),_:3}),Pt(c.$slots,"default"),Ie(b_)],512))}});var Yt=(e=>(e.Lines="lines",e.Dots="dots",e))(Yt||{});const Sc=function({dimensions:e,size:t,color:n}){return Me("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Nc=function({radius:e,color:t}){return Me("circle",{cx:e,cy:e,r:e,fill:t})};Yt.Lines+"",Yt.Dots+"";const K_={[Yt.Dots]:"#81818a",[Yt.Lines]:"#eee"},j_=["id","x","y","width","height","patternTransform"],X_={key:2,height:"100",width:"100"},W_=["fill"],Z_=["x","y","fill"],q_={name:"Background",compatConfig:{MODE:3}},J_=we({...q_,props:{id:{},variant:{default:()=>Yt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Re(),o=he(()=>{const r=n.value.zoom,[l,a]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],u=[l*r||1,a*r||1],c=e.size*r,[d,v]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[d*r||1+u[0]/2,v*r||1+u[1]/2];return{scaledGap:u,offset:h,size:c}}),i=Ve(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),s=Ve(()=>e.color||e.patternColor||K_[e.variant||Yt.Dots]);return(r,l)=>(Y(),ee("svg",{class:"vue-flow__background vue-flow__container",style:pt({height:`${r.height>100?100:r.height}%`,width:`${r.width>100?100:r.width}%`})},[Pt(r.$slots,"pattern-container",{id:i.value},()=>[x("pattern",{id:i.value,x:ne(n).x%o.value.scaledGap[0],y:ne(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Pt(r.$slots,"pattern",{},()=>[r.variant===ne(Yt).Lines?(Y(),Ke(ne(Sc),{key:0,size:r.lineWidth,color:s.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):r.variant===ne(Yt).Dots?(Y(),Ke(ne(Nc),{key:1,color:s.value,radius:o.value.size/2},null,8,["color","radius"])):Te("",!0),r.bgColor?(Y(),ee("svg",X_,[x("rect",{width:"100%",height:"100%",fill:r.bgColor},null,8,W_)])):Te("",!0)])],8,j_)]),x("rect",{x:r.x,y:r.y,width:"100%",height:"100%",fill:`url(#${i.value})`},null,8,Z_),Pt(r.$slots,"default",{id:i.value})],4))}}),Q_={class:"vue-flow-container"},e1={class:"vue-flow-viewport"},t1={class:"viewport-wrapper"},n1={class:"create-wrapper"},o1={key:0,class:"floating-create-expanded"},i1={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-check",style:{height:"100%"}},s1=we({__name:"SchemaEditor",setup(e){const t=bt(),n=Vt(),o=J(""),i=J(!1),s=J(!0),r=()=>{o.value.trim()!==""&&(t.createNode(o.value),o.value="",i.value=!1)},l=h=>{t.deleteNode(h)},a=h=>{n.open(h,Fp,{id:h})},u=h=>{n.open(h,ep,{id:h})},c=(h,w)=>{n.open("Edit field",gp,{id:h,field:w})},d=h=>{n.open(h,Op,{id:h})},v=(h,w)=>{n.open(w.fieldName,Np,{id:h,relation:w})};return(h,w)=>(Y(),ee("div",Q_,[x("div",e1,[x("div",t1,[x("button",{onClick:w[0]||(w[0]=E=>console.log(ne(t).callGenerateEndpoint()))},"ASD"),x("div",{class:"toggle-grid-button",onClick:w[1]||(w[1]=E=>s.value=!s.value)},"#"),Ie(ne(Y_),{nodes:ne(t).nodes,"onUpdate:nodes":w[5]||(w[5]=E=>ne(t).nodes=E),edges:ne(t).edges,"onUpdate:edges":w[6]||(w[6]=E=>ne(t).edges=E),"default-viewport":{zoom:2},"max-zoom":2,"min-zoom":.1,"fit-view-on-init":!0},{"node-custom":zn(E=>[Ie(zh,Ao(E,{onDeleteNode:l,onRenameNode:a,onAddField:u,onAddRelation:d,onOpenEditFieldModal:c,onOpenEditRelationModal:v}),null,16)]),default:zn(()=>[s.value?(Y(),Ke(ne(J_),{key:0,variant:"lines",size:51,gap:51})):Te("",!0),x("div",n1,[i.value?(Y(),ee("div",o1,[x("button",{class:"collapse-btn",onClick:w[2]||(w[2]=E=>i.value=!1)},w[7]||(w[7]=[x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-chevron-left size-4 rdp-nav_icon"},[x("path",{d:"m15 18-6-6 6-6"})],-1)])),me(x("input",{class:"create-model-input",type:"text",placeholder:"Enter Model Name","onUpdate:modelValue":w[3]||(w[3]=E=>o.value=E),onKeyup:ks(r,["enter"])},null,544),[[Je,o.value]]),x("button",{class:"create-model-btn",onClick:r},[(Y(),ee("svg",i1,w[8]||(w[8]=[x("path",{d:"M20 6 9 17l-5-5"},null,-1)])))])])):Te("",!0),i.value?Te("",!0):(Y(),ee("div",{key:1,class:"create-circle",onClick:w[4]||(w[4]=E=>i.value=!0)},"+"))])]),_:1},8,["nodes","edges"])])])]))}}),r1=Qe(s1,[["__scopeId","data-v-ff37004c"]]),l1={class:"field-modal-container"},a1={class:"input-container"},u1={class:"input-group"},c1={class:"input-group"},d1=we({__name:"AddEnumValueModal",props:{enumName:{}},setup(e){const t=e,n=bt(),o=Vt(),i=J(""),s=J("auto()"),r=()=>{n.addEnumValue(t.enumName,{name:i.value,value:s.value}),o.close()};return(l,a)=>(Y(),ee("main",l1,[x("div",a1,[x("div",u1,[a[2]||(a[2]=x("label",{class:"field-label"},"Name",-1)),me(x("input",{class:"field-input","onUpdate:modelValue":a[0]||(a[0]=u=>i.value=u),type:"text"},null,512),[[Je,i.value]])]),x("div",c1,[a[3]||(a[3]=x("label",{class:"field-label"},"Value",-1)),me(x("input",{class:"field-input","onUpdate:modelValue":a[1]||(a[1]=u=>s.value=u),type:"text"},null,512),[[Je,s.value]])])]),x("div",{class:"action-group"},[x("button",{class:"save-field-btn",onClick:r},"Save")])]))}}),f1=Qe(d1,[["__scopeId","data-v-6d9e287c"]]),h1={class:"field-modal-container"},p1={class:"input-container"},g1={class:"input-group"},v1={class:"input-group"},m1=we({__name:"EditEnumValueModal",props:{enumName:{},enumValue:{}},setup(e){const t=e,n=bt(),o=Vt(),i=J(t.enumValue.name),s=J(t.enumValue.value),r=()=>{n.updateEnumValue(t.enumName,t.enumValue.name,{name:i.value,value:s.value}),o.close()};return(l,a)=>(Y(),ee("main",h1,[x("div",p1,[x("div",g1,[a[2]||(a[2]=x("label",{class:"field-label"},"Name",-1)),me(x("input",{class:"field-input","onUpdate:modelValue":a[0]||(a[0]=u=>i.value=u),type:"text"},null,512),[[Je,i.value]])]),x("div",v1,[a[3]||(a[3]=x("label",{class:"field-label"},"Value",-1)),me(x("input",{class:"field-input","onUpdate:modelValue":a[1]||(a[1]=u=>s.value=u),type:"text"},null,512),[[Je,s.value]])])]),x("div",{class:"action-group"},[x("button",{class:"save-field-btn",onClick:r},"Save")])]))}}),y1=Qe(m1,[["__scopeId","data-v-e87b1c0b"]]),_1={class:"layout-container"},b1={class:"enum-sidebar"},w1={class:"sidebar-header"},x1={class:"input-group"},E1={class:"input-horizontal"},S1=["disabled"],N1={class:"enum-list"},C1=["onClick"],$1={class:"enum-name-wrapper"},M1={key:0},I1=["onKeyup"],T1={class:"enum-item-actions"},k1=["onClick"],P1={key:0},A1={key:1,xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-pencil"},D1=["onClick"],O1={key:0,class:"main-content"},V1={class:"main-table"},R1={class:"name-column"},B1={class:"value-column"},z1={class:"action-column"},F1={class:"action-content"},H1=["onMouseover","onMouseleave"],L1={key:0,class:"dropdown-list"},U1=["onClick"],G1=["onClick"],Y1=we({__name:"EnumEditor",setup(e){const t=bt(),n=Vt(),o=J(""),i=J(null),s=J(null),r=J(""),l=J(null),a=J(null),u=()=>{const _=i.value;_&&n.open("Add Enum Value",f1,{enumName:_.name})},c=_=>{const R=i.value;R&&n.open("Edit Enum Value",y1,{enumName:R.name,enumValue:_})},d=_=>{console.log("Delete enum value:",_)},v=_=>{i.value=_},h=()=>{const _=o.value.trim();if(_==="")return;const R=t.addEnum(_);o.value="",v(R)},w=_=>{t.deleteEnum(_.name),i.value?.name===_.name&&(i.value=null)},E=_=>s.value===_.name,N=_=>{E(_)?$(_):(s.value=_.name,r.value=_.name,ut(()=>{a.value&&a.value.focus()}))},$=_=>{const R=r.value.trim();R&&R!==_.name&&(t.updateEnumName(_.name,R),i.value?.name===_.name&&(i.value.name=R)),s.value=null,r.value=""},k=_=>{l.value=_},g=_=>{l.value===_&&(l.value=null)};return(_,R)=>(Y(),ee("div",_1,[x("div",b1,[x("div",w1,[x("div",x1,[x("div",E1,[me(x("input",{id:"new-enum-name",class:"project-name",type:"text",placeholder:"Enter new enum name","onUpdate:modelValue":R[0]||(R[0]=G=>o.value=G),onKeyup:ks(h,["enter"]),maxlength:"50"},null,544),[[Je,o.value]]),x("button",{class:"confirm-btn",onClick:h,disabled:!o.value},R[3]||(R[3]=[x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-check"},[x("path",{d:"M20 6 9 17l-5-5"})],-1)]),8,S1)])])]),x("div",N1,[(Y(!0),ee(Ee,null,st(ne(t).enums,G=>(Y(),ee("div",{key:G.name,class:it(["enum-item",{active:i.value?.name===G.name}]),onClick:K=>v(G)},[x("div",$1,[E(G)?me((Y(),ee("input",{key:1,type:"text",class:"enum-name-edit-input","onUpdate:modelValue":R[1]||(R[1]=K=>r.value=K),onClick:R[2]||(R[2]=ei(()=>{},["stop"])),onKeyup:ks(K=>N(G),["enter"]),ref_for:!0,ref_key:"enumNameInput",ref:a},null,40,I1)),[[Je,r.value]]):(Y(),ee("span",M1,Oe(G.name),1))]),x("div",T1,[x("button",{class:"edit-enum-toggle-btn",onClick:ei(K=>N(G),["stop"])},[E(G)?(Y(),ee("span",P1,R[4]||(R[4]=[x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-save"},[x("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),x("path",{d:"M17 21v-8H7v8"}),x("path",{d:"M7 3v4h6"})],-1)]))):(Y(),ee("svg",A1,R[5]||(R[5]=[x("path",{d:"M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"},null,-1),x("path",{d:"m15 5 4 4"},null,-1)])))],8,k1),x("button",{class:"delete-enum-btn",onClick:ei(K=>w(G),["stop"])},"×",8,D1)])],10,C1))),128))])]),i.value?(Y(),ee("div",O1,[x("table",V1,[R[7]||(R[7]=x("thead",null,[x("tr",null,[x("th",{class:"name-column"},"Name"),x("th",{class:"value-column"},"Value"),x("th",{class:"action-column"},"Action")])],-1)),x("tbody",null,[(Y(!0),ee(Ee,null,st(i.value.values,(G,K)=>(Y(),ee("tr",{key:K},[x("td",R1,Oe(G.name),1),x("td",B1,Oe(G.value),1),x("td",z1,[x("div",F1,[x("div",{class:"enum-actions",onMouseover:F=>k(K),onMouseleave:F=>g(K)},[R[6]||(R[6]=x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-ellipsis"},[x("circle",{cx:"12",cy:"12",r:"1"}),x("circle",{cx:"19",cy:"12",r:"1"}),x("circle",{cx:"5",cy:"12",r:"1"})],-1)),l.value===K?(Y(),ee("div",L1,[x("div",{class:"dropdown-item",onClick:F=>c(G)},"Edit",8,U1),x("div",{class:"dropdown-item",onClick:F=>d(G)},"Delete",8,G1)])):Te("",!0)],40,H1)])])]))),128))])]),x("div",{class:"main-footer"},[x("button",{class:"add-btn",onClick:u},"Add Enum Value")])])):Te("",!0)]))}}),K1=Qe(Y1,[["__scopeId","data-v-8f6eca62"]]),j1={class:"container"},X1={class:"editor-container"},W1={class:"editor-header"},Z1={class:"editor-content"},q1=we({__name:"Viewport",setup(e){const t=J("models");return(n,o)=>(Y(),ee("main",j1,[x("div",X1,[x("div",W1,[x("div",{class:it(["header-section",{active:t.value==="models"}]),onClick:o[0]||(o[0]=i=>t.value="models")}," Models ",2),o[2]||(o[2]=x("div",{class:"header-divider"},null,-1)),x("div",{class:it(["header-section",{active:t.value==="enums"}]),onClick:o[1]||(o[1]=i=>t.value="enums")}," Enums ",2)]),x("div",Z1,[t.value==="models"?(Y(),Ke(r1,{key:0})):Te("",!0),t.value==="enums"?(Y(),Ke(K1,{key:1})):Te("",!0)])])]))}}),J1=Qe(q1,[["__scopeId","data-v-b0fef25d"]]),Q1={class:"container"},eb=we({__name:"SchemaStep",setup(e){return(t,n)=>(Y(),ee("main",Q1,[n[0]||(n[0]=x("h1",null,"Design your Schema",-1)),n[1]||(n[1]=x("br",null,null,-1)),x("div",null,[Ie(J1)])]))}}),na=Qe(eb,[["__scopeId","data-v-33ee6271"]]),tb={class:"modal"},nb={class:"modal-header"},ob={class:"modal-title"},ib={name:"title"},sb={class:"modal-body"},rb=we({__name:"GlobalModal",setup(e){const t=Vt(),{modalTitle:n,isOpen:o,currentComponent:i,props:s}=nh(t);function r(){t.close()}return(l,a)=>(Y(),Ke(bd,{to:"body"},[ne(o)?(Y(),ee("div",{key:0,class:"modal-backdrop",onClick:ei(r,["self"])},[x("div",tb,[x("div",nb,[x("div",ob,[x("div",ib,Oe(ne(n)),1)]),x("div",{class:"modal-actions",onClick:r},a[0]||(a[0]=[x("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-x h-4 w-4"},[x("path",{d:"M18 6 6 18"}),x("path",{d:"m6 6 12 12"})],-1)]))]),x("div",sb,[ne(i)?(Y(),Ke(fr(ne(i)),Ao({key:0},ne(s),{onClose:r}),null,16)):Te("",!0)])])])):Te("",!0)]))}}),lb=Qe(rb,[["__scopeId","data-v-d61e0035"]]),ab={id:"app"},ub={class:"main"},cb={class:"content"},db=we({__name:"App",setup(e){const t=[na,_h,Nh,na];return(n,o)=>(Y(),ee(Ee,null,[x("div",ab,[o[0]||(o[0]=vr('
',1)),x("main",ub,[x("div",cb,[Ie(uh,{steps:t})])])]),Ie(lb,{ref:"modalRef"},null,512)],64))}}),Cc=jf(db);Cc.use(Zf());Cc.mount("#app"); diff --git a/fastapi_forge/static/assets/index-DuOkOUCX.js b/fastapi_forge/static/assets/index-DuOkOUCX.js deleted file mode 100644 index 0abba73..0000000 --- a/fastapi_forge/static/assets/index-DuOkOUCX.js +++ /dev/null @@ -1,46 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const r of s.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&o(r)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function o(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();/** -* @vue/shared v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**//*! #__NO_SIDE_EFFECTS__ */function Xs(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const Te={},Pn=[],It=()=>{},Mc=()=>!1,Ei=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Ws=e=>e.startsWith("onUpdate:"),Ze=Object.assign,Zs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},$c=Object.prototype.hasOwnProperty,Ce=(e,t)=>$c.call(e,t),ce=Array.isArray,An=e=>Io(e)==="[object Map]",jn=e=>Io(e)==="[object Set]",Tr=e=>Io(e)==="[object Date]",ge=e=>typeof e=="function",Ve=e=>typeof e=="string",mt=e=>typeof e=="symbol",Pe=e=>e!==null&&typeof e=="object",ta=e=>(Pe(e)||ge(e))&&ge(e.then)&&ge(e.catch),na=Object.prototype.toString,Io=e=>na.call(e),Ic=e=>Io(e).slice(8,-1),oa=e=>Io(e)==="[object Object]",qs=e=>Ve(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,oo=Xs(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Ni=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Tc=/-(\w)/g,ct=Ni(e=>e.replace(Tc,(t,n)=>n?n.toUpperCase():"")),Pc=/\B([A-Z])/g,un=Ni(e=>e.replace(Pc,"-$1").toLowerCase()),Ci=Ni(e=>e.charAt(0).toUpperCase()+e.slice(1)),qi=Ni(e=>e?`on${Ci(e)}`:""),Ut=(e,t)=>!Object.is(e,t),Wo=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},si=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Pr;const Mi=()=>Pr||(Pr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function dt(e){if(ce(e)){const t={};for(let n=0;n{if(n){const o=n.split(Dc);o.length>1&&(t[o[0].trim()]=o[1].trim())}}),t}function tt(e){let t="";if(Ve(e))t=e;else if(ce(e))for(let n=0;nTo(n,t))}const sa=e=>!!(e&&e.__v_isRef===!0),je=e=>Ve(e)?e:e==null?"":ce(e)||Pe(e)&&(e.toString===na||!ge(e.toString))?sa(e)?je(e.value):JSON.stringify(e,ra,2):String(e),ra=(e,t)=>sa(t)?ra(e,t.value):An(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[o,i],s)=>(n[Ji(o,s)+" =>"]=i,n),{})}:jn(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>Ji(n))}:mt(t)?Ji(t):Pe(t)&&!ce(t)&&!oa(t)?String(t):t,Ji=(e,t="")=>{var n;return mt(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** -* @vue/reactivity v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Ye;class la{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ye,!t&&Ye&&(this.index=(Ye.scopes||(Ye.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0&&--this._on===0&&(Ye=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let n,o;for(n=0,o=this.effects.length;n0)return;if(ro){let t=ro;for(ro=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;so;){let t=so;for(so=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(o){e||(e=o)}t=n}}if(e)throw e}function da(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function fa(e){let t,n=e.depsTail,o=n;for(;o;){const i=o.prevDep;o.version===-1?(o===n&&(n=i),tr(o),zc(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=i}e.deps=t,e.depsTail=n}function bs(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ha(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ha(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===vo)||(e.globalVersion=vo,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!bs(e))))return;e.flags|=2;const t=e.dep,n=Ae,o=gt;Ae=e,gt=!0;try{da(e);const i=e.fn(e._value);(t.version===0||Ut(i,e._value))&&(e.flags|=128,e._value=i,t.version++)}catch(i){throw t.version++,i}finally{Ae=n,gt=o,fa(e),e.flags&=-3}}function tr(e,t=!1){const{dep:n,prevSub:o,nextSub:i}=e;if(o&&(o.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let s=n.computed.deps;s;s=s.nextDep)tr(s,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function zc(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let gt=!0;const pa=[];function jt(){pa.push(gt),gt=!1}function Xt(){const e=pa.pop();gt=e===void 0?!0:e}function Ar(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=Ae;Ae=void 0;try{t()}finally{Ae=n}}}let vo=0;class Fc{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ti{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(t){if(!Ae||!gt||Ae===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Ae)n=this.activeLink=new Fc(Ae,this),Ae.deps?(n.prevDep=Ae.depsTail,Ae.depsTail.nextDep=n,Ae.depsTail=n):Ae.deps=Ae.depsTail=n,ga(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const o=n.nextDep;o.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=o),n.prevDep=Ae.depsTail,n.nextDep=void 0,Ae.depsTail.nextDep=n,Ae.depsTail=n,Ae.deps===n&&(Ae.deps=o)}return n}trigger(t){this.version++,vo++,this.notify(t)}notify(t){Qs();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{er()}}}function ga(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let o=t.deps;o;o=o.nextDep)ga(o)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const ri=new WeakMap,yn=Symbol(""),ws=Symbol(""),mo=Symbol("");function Ke(e,t,n){if(gt&&Ae){let o=ri.get(e);o||ri.set(e,o=new Map);let i=o.get(n);i||(o.set(n,i=new Ti),i.map=o,i.key=n),i.track()}}function Bt(e,t,n,o,i,s){const r=ri.get(e);if(!r){vo++;return}const l=a=>{a&&a.trigger()};if(Qs(),t==="clear")r.forEach(l);else{const a=ce(e),u=a&&qs(n);if(a&&n==="length"){const c=Number(o);r.forEach((d,g)=>{(g==="length"||g===mo||!mt(g)&&g>=c)&&l(d)})}else switch((n!==void 0||r.has(void 0))&&l(r.get(n)),u&&l(r.get(mo)),t){case"add":a?u&&l(r.get("length")):(l(r.get(yn)),An(e)&&l(r.get(ws)));break;case"delete":a||(l(r.get(yn)),An(e)&&l(r.get(ws)));break;case"set":An(e)&&l(r.get(yn));break}}er()}function Hc(e,t){const n=ri.get(e);return n&&n.get(t)}function Mn(e){const t=we(e);return t===e?t:(Ke(t,"iterate",mo),at(e)?t:t.map(He))}function Pi(e){return Ke(e=we(e),"iterate",mo),e}const Lc={__proto__:null,[Symbol.iterator](){return es(this,Symbol.iterator,He)},concat(...e){return Mn(this).concat(...e.map(t=>ce(t)?Mn(t):t))},entries(){return es(this,"entries",e=>(e[1]=He(e[1]),e))},every(e,t){return Ot(this,"every",e,t,void 0,arguments)},filter(e,t){return Ot(this,"filter",e,t,n=>n.map(He),arguments)},find(e,t){return Ot(this,"find",e,t,He,arguments)},findIndex(e,t){return Ot(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ot(this,"findLast",e,t,He,arguments)},findLastIndex(e,t){return Ot(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ot(this,"forEach",e,t,void 0,arguments)},includes(...e){return ts(this,"includes",e)},indexOf(...e){return ts(this,"indexOf",e)},join(e){return Mn(this).join(e)},lastIndexOf(...e){return ts(this,"lastIndexOf",e)},map(e,t){return Ot(this,"map",e,t,void 0,arguments)},pop(){return Wn(this,"pop")},push(...e){return Wn(this,"push",e)},reduce(e,...t){return Dr(this,"reduce",e,t)},reduceRight(e,...t){return Dr(this,"reduceRight",e,t)},shift(){return Wn(this,"shift")},some(e,t){return Ot(this,"some",e,t,void 0,arguments)},splice(...e){return Wn(this,"splice",e)},toReversed(){return Mn(this).toReversed()},toSorted(e){return Mn(this).toSorted(e)},toSpliced(...e){return Mn(this).toSpliced(...e)},unshift(...e){return Wn(this,"unshift",e)},values(){return es(this,"values",He)}};function es(e,t,n){const o=Pi(e),i=o[t]();return o!==e&&!at(e)&&(i._next=i.next,i.next=()=>{const s=i._next();return s.value&&(s.value=n(s.value)),s}),i}const Uc=Array.prototype;function Ot(e,t,n,o,i,s){const r=Pi(e),l=r!==e&&!at(e),a=r[t];if(a!==Uc[t]){const d=a.apply(e,s);return l?He(d):d}let u=n;r!==e&&(l?u=function(d,g){return n.call(this,He(d),g,e)}:n.length>2&&(u=function(d,g){return n.call(this,d,g,e)}));const c=a.call(r,u,o);return l&&i?i(c):c}function Dr(e,t,n,o){const i=Pi(e);let s=n;return i!==e&&(at(e)?n.length>3&&(s=function(r,l,a){return n.call(this,r,l,a,e)}):s=function(r,l,a){return n.call(this,r,He(l),a,e)}),i[t](s,...o)}function ts(e,t,n){const o=we(e);Ke(o,"iterate",mo);const i=o[t](...n);return(i===-1||i===!1)&&sr(n[0])?(n[0]=we(n[0]),o[t](...n)):i}function Wn(e,t,n=[]){jt(),Qs();const o=we(e)[t].apply(e,n);return er(),Xt(),o}const Gc=Xs("__proto__,__v_isRef,__isVue"),va=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(mt));function Yc(e){mt(e)||(e=String(e));const t=we(this);return Ke(t,"has",e),t.hasOwnProperty(e)}class ma{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,o){if(n==="__v_skip")return t.__v_skip;const i=this._isReadonly,s=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return s;if(n==="__v_raw")return o===(i?s?td:wa:s?ba:_a).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(o)?t:void 0;const r=ce(t);if(!i){let a;if(r&&(a=Lc[n]))return a;if(n==="hasOwnProperty")return Yc}const l=Reflect.get(t,n,De(t)?t:o);return(mt(n)?va.has(n):Gc(n))||(i||Ke(t,"get",n),s)?l:De(l)?r&&qs(n)?l:l.value:Pe(l)?i?or(l):Po(l):l}}class ya extends ma{constructor(t=!1){super(!1,t)}set(t,n,o,i){let s=t[n];if(!this._isShallow){const a=rn(s);if(!at(o)&&!rn(o)&&(s=we(s),o=we(o)),!ce(t)&&De(s)&&!De(o))return a?!1:(s.value=o,!0)}const r=ce(t)&&qs(n)?Number(n)e,Vo=e=>Reflect.getPrototypeOf(e);function Zc(e,t,n){return function(...o){const i=this.__v_raw,s=we(i),r=An(s),l=e==="entries"||e===Symbol.iterator&&r,a=e==="keys"&&r,u=i[e](...o),c=n?xs:t?li:He;return!t&&Ke(s,"iterate",a?ws:yn),{next(){const{value:d,done:g}=u.next();return g?{value:d,done:g}:{value:l?[c(d[0]),c(d[1])]:c(d),done:g}},[Symbol.iterator](){return this}}}}function Bo(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function qc(e,t){const n={get(i){const s=this.__v_raw,r=we(s),l=we(i);e||(Ut(i,l)&&Ke(r,"get",i),Ke(r,"get",l));const{has:a}=Vo(r),u=t?xs:e?li:He;if(a.call(r,i))return u(s.get(i));if(a.call(r,l))return u(s.get(l));s!==r&&s.get(i)},get size(){const i=this.__v_raw;return!e&&Ke(we(i),"iterate",yn),Reflect.get(i,"size",i)},has(i){const s=this.__v_raw,r=we(s),l=we(i);return e||(Ut(i,l)&&Ke(r,"has",i),Ke(r,"has",l)),i===l?s.has(i):s.has(i)||s.has(l)},forEach(i,s){const r=this,l=r.__v_raw,a=we(l),u=t?xs:e?li:He;return!e&&Ke(a,"iterate",yn),l.forEach((c,d)=>i.call(s,u(c),u(d),r))}};return Ze(n,e?{add:Bo("add"),set:Bo("set"),delete:Bo("delete"),clear:Bo("clear")}:{add(i){!t&&!at(i)&&!rn(i)&&(i=we(i));const s=we(this);return Vo(s).has.call(s,i)||(s.add(i),Bt(s,"add",i,i)),this},set(i,s){!t&&!at(s)&&!rn(s)&&(s=we(s));const r=we(this),{has:l,get:a}=Vo(r);let u=l.call(r,i);u||(i=we(i),u=l.call(r,i));const c=a.call(r,i);return r.set(i,s),u?Ut(s,c)&&Bt(r,"set",i,s):Bt(r,"add",i,s),this},delete(i){const s=we(this),{has:r,get:l}=Vo(s);let a=r.call(s,i);a||(i=we(i),a=r.call(s,i)),l&&l.call(s,i);const u=s.delete(i);return a&&Bt(s,"delete",i,void 0),u},clear(){const i=we(this),s=i.size!==0,r=i.clear();return s&&Bt(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=Zc(i,e,t)}),n}function nr(e,t){const n=qc(e,t);return(o,i,s)=>i==="__v_isReactive"?!e:i==="__v_isReadonly"?e:i==="__v_raw"?o:Reflect.get(Ce(n,i)&&i in o?n:o,i,s)}const Jc={get:nr(!1,!1)},Qc={get:nr(!1,!0)},ed={get:nr(!0,!1)};const _a=new WeakMap,ba=new WeakMap,wa=new WeakMap,td=new WeakMap;function nd(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function od(e){return e.__v_skip||!Object.isExtensible(e)?0:nd(Ic(e))}function Po(e){return rn(e)?e:ir(e,!1,jc,Jc,_a)}function id(e){return ir(e,!1,Wc,Qc,ba)}function or(e){return ir(e,!0,Xc,ed,wa)}function ir(e,t,n,o,i){if(!Pe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const s=od(e);if(s===0)return e;const r=i.get(e);if(r)return r;const l=new Proxy(e,s===2?o:n);return i.set(e,l),l}function Gt(e){return rn(e)?Gt(e.__v_raw):!!(e&&e.__v_isReactive)}function rn(e){return!!(e&&e.__v_isReadonly)}function at(e){return!!(e&&e.__v_isShallow)}function sr(e){return e?!!e.__v_raw:!1}function we(e){const t=e&&e.__v_raw;return t?we(t):e}function Yt(e){return!Ce(e,"__v_skip")&&Object.isExtensible(e)&&_s(e,"__v_skip",!0),e}const He=e=>Pe(e)?Po(e):e,li=e=>Pe(e)?or(e):e;function De(e){return e?e.__v_isRef===!0:!1}function q(e){return xa(e,!1)}function yo(e){return xa(e,!0)}function xa(e,t){return De(e)?e:new sd(e,t)}class sd{constructor(t,n){this.dep=new Ti,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:we(t),this._value=n?t:He(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,o=this.__v_isShallow||at(t)||rn(t);t=o?t:we(t),Ut(t,n)&&(this._rawValue=t,this._value=o?t:He(t),this.dep.trigger())}}function ee(e){return De(e)?e.value:e}function be(e){return ge(e)?e():ee(e)}const rd={get:(e,t,n)=>t==="__v_raw"?e:ee(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const i=e[t];return De(i)&&!De(n)?(i.value=n,!0):Reflect.set(e,t,n,o)}};function Sa(e){return Gt(e)?e:new Proxy(e,rd)}class ld{constructor(t){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Ti,{get:o,set:i}=t(n.track.bind(n),n.trigger.bind(n));this._get=o,this._set=i}get value(){return this._value=this._get()}set value(t){this._set(t)}}function ad(e){return new ld(e)}function Ea(e){const t=ce(e)?new Array(e.length):{};for(const n in e)t[n]=Na(e,n);return t}class ud{constructor(t,n,o){this._object=t,this._key=n,this._defaultValue=o,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return Hc(we(this._object),this._key)}}class cd{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function ke(e,t,n){return De(e)?e:ge(e)?new cd(e):Pe(e)&&arguments.length>1?Na(e,t,n):q(e)}function Na(e,t,n){const o=e[t];return De(o)?o:new ud(e,t,n)}class dd{constructor(t,n,o){this.fn=t,this.setter=n,this._value=void 0,this.dep=new Ti(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=vo-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=o}notify(){if(this.flags|=16,!(this.flags&8)&&Ae!==this)return ca(this,!0),!0}get value(){const t=this.dep.track();return ha(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function fd(e,t,n=!1){let o,i;return ge(e)?o=e:(o=e.get,i=e.set),new dd(o,i,n)}const zo={},ai=new WeakMap;let pn;function hd(e,t=!1,n=pn){if(n){let o=ai.get(n);o||ai.set(n,o=[]),o.push(e)}}function pd(e,t,n=Te){const{immediate:o,deep:i,once:s,scheduler:r,augmentJob:l,call:a}=n,u=N=>i?N:at(N)||i===!1||i===0?zt(N,1):zt(N);let c,d,g,h,y=!1,b=!1;if(De(e)?(d=()=>e.value,y=at(e)):Gt(e)?(d=()=>u(e),y=!0):ce(e)?(b=!0,y=e.some(N=>Gt(N)||at(N)),d=()=>e.map(N=>{if(De(N))return N.value;if(Gt(N))return u(N);if(ge(N))return a?a(N,2):N()})):ge(e)?t?d=a?()=>a(e,2):e:d=()=>{if(g){jt();try{g()}finally{Xt()}}const N=pn;pn=c;try{return a?a(e,3,[h]):e(h)}finally{pn=N}}:d=It,t&&i){const N=d,F=i===!0?1/0:i;d=()=>zt(N(),F)}const x=Ii(),C=()=>{c.stop(),x&&x.active&&Zs(x.effects,c)};if(s&&t){const N=t;t=(...F)=>{N(...F),C()}}let D=b?new Array(e.length).fill(zo):zo;const S=N=>{if(!(!(c.flags&1)||!c.dirty&&!N))if(t){const F=c.run();if(i||y||(b?F.some((j,k)=>Ut(j,D[k])):Ut(F,D))){g&&g();const j=pn;pn=c;try{const k=[F,D===zo?void 0:b&&D[0]===zo?[]:D,h];D=F,a?a(t,3,k):t(...k)}finally{pn=j}}}else c.run()};return l&&l(S),c=new aa(d),c.scheduler=r?()=>r(S,!1):S,h=N=>hd(N,!1,c),g=c.onStop=()=>{const N=ai.get(c);if(N){if(a)a(N,4);else for(const F of N)F();ai.delete(c)}},t?o?S(!0):D=c.run():r?r(S.bind(null,!0),!0):c.run(),C.pause=c.pause.bind(c),C.resume=c.resume.bind(c),C.stop=C,C}function zt(e,t=1/0,n){if(t<=0||!Pe(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,De(e))zt(e.value,t,n);else if(ce(e))for(let o=0;o{zt(o,t,n)});else if(oa(e)){for(const o in e)zt(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&zt(e[o],t,n)}return e}/** -* @vue/runtime-core v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/function Ao(e,t,n,o){try{return o?e(...o):e()}catch(i){Ai(i,t,n)}}function At(e,t,n,o){if(ge(e)){const i=Ao(e,t,n,o);return i&&ta(i)&&i.catch(s=>{Ai(s,t,n)}),i}if(ce(e)){const i=[];for(let s=0;s>>1,i=Qe[o],s=_o(i);s=_o(n)?Qe.push(e):Qe.splice(vd(t),0,e),e.flags|=1,Ma()}}function Ma(){ui||(ui=Ca.then(Ia))}function md(e){ce(e)?Dn.push(...e):tn&&e.id===-1?tn.splice(Tn+1,0,e):e.flags&1||(Dn.push(e),e.flags|=1),Ma()}function kr(e,t,n=Et+1){for(;n_o(n)-_o(o));if(Dn.length=0,tn){tn.push(...t);return}for(tn=t,Tn=0;Tne.id==null?e.flags&2?-1:1/0:e.id;function Ia(e){try{for(Et=0;Et{o._d&&jr(-1);const s=ci(t);let r;try{r=e(...i)}finally{ci(s),o._d&&jr(1)}return r};return o._n=!0,o._c=!0,o._d=!0,o}function Ne(e,t){if(Le===null)return e;const n=Ri(Le),o=e.dirs||(e.dirs=[]);for(let i=0;ie.__isTeleport,lo=e=>e&&(e.disabled||e.disabled===""),Or=e=>e&&(e.defer||e.defer===""),Rr=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Vr=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,Ss=(e,t)=>{const n=e&&e.to;return Ve(n)?t?t(n):null:n},Aa={name:"Teleport",__isTeleport:!0,process(e,t,n,o,i,s,r,l,a,u){const{mc:c,pc:d,pbc:g,o:{insert:h,querySelector:y,createText:b,createComment:x}}=u,C=lo(t.props);let{shapeFlag:D,children:S,dynamicChildren:N}=t;if(e==null){const F=t.el=b(""),j=t.anchor=b("");h(F,n,o),h(j,n,o);const k=(V,G)=>{D&16&&(i&&i.isCE&&(i.ce._teleportTarget=V),c(S,V,G,i,s,r,l,a))},A=()=>{const V=t.target=Ss(t.props,y),G=Da(V,t,b,h);V&&(r!=="svg"&&Rr(V)?r="svg":r!=="mathml"&&Vr(V)&&(r="mathml"),C||(k(V,G),Zo(t,!1)))};C&&(k(n,j),Zo(t,!0)),Or(t.props)?(t.el.__isMounted=!1,Je(()=>{A(),delete t.el.__isMounted},s)):A()}else{if(Or(t.props)&&e.el.__isMounted===!1){Je(()=>{Aa.process(e,t,n,o,i,s,r,l,a,u)},s);return}t.el=e.el,t.targetStart=e.targetStart;const F=t.anchor=e.anchor,j=t.target=e.target,k=t.targetAnchor=e.targetAnchor,A=lo(e.props),V=A?n:j,G=A?F:k;if(r==="svg"||Rr(j)?r="svg":(r==="mathml"||Vr(j))&&(r="mathml"),N?(g(e.dynamicChildren,N,V,i,s,r,l),hr(e,t,!0)):a||d(e,t,V,G,i,s,r,l,!1),C)A?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Fo(t,n,F,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const z=t.target=Ss(t.props,y);z&&Fo(t,z,null,u,0)}else A&&Fo(t,j,k,u,1);Zo(t,C)}},remove(e,t,n,{um:o,o:{remove:i}},s){const{shapeFlag:r,children:l,anchor:a,targetStart:u,targetAnchor:c,target:d,props:g}=e;if(d&&(i(u),i(c)),s&&i(a),r&16){const h=s||!lo(g);for(let y=0;yao(y,t&&(ce(t)?t[b]:t),n,o,i));return}if(kn(o)&&!i){o.shapeFlag&512&&o.type.__asyncResolved&&o.component.subTree.component&&ao(e,t,n,o.component.subTree);return}const s=o.shapeFlag&4?Ri(o.component):o.el,r=i?null:s,{i:l,r:a}=e,u=t&&t.r,c=l.refs===Te?l.refs={}:l.refs,d=l.setupState,g=we(d),h=d===Te?()=>!1:y=>Ce(g,y);if(u!=null&&u!==a&&(Ve(u)?(c[u]=null,h(u)&&(d[u]=null)):De(u)&&(u.value=null)),ge(a))Ao(a,l,12,[r,c]);else{const y=Ve(a),b=De(a);if(y||b){const x=()=>{if(e.f){const C=y?h(a)?d[a]:c[a]:a.value;i?ce(C)&&Zs(C,s):ce(C)?C.includes(s)||C.push(s):y?(c[a]=[s],h(a)&&(d[a]=c[a])):(a.value=[s],e.k&&(c[e.k]=a.value))}else y?(c[a]=r,h(a)&&(d[a]=r)):b&&(a.value=r,e.k&&(c[e.k]=r))};r?(x.id=-1,Je(x,n)):x()}}}Mi().requestIdleCallback;Mi().cancelIdleCallback;const kn=e=>!!e.type.__asyncLoader,Oa=e=>e.type.__isKeepAlive;function wd(e,t){Ra(e,"a",t)}function xd(e,t){Ra(e,"da",t)}function Ra(e,t,n=Xe){const o=e.__wdc||(e.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return e()});if(Di(t,o,n),n){let i=n.parent;for(;i&&i.parent;)Oa(i.parent.vnode)&&Sd(o,t,n,i),i=i.parent}}function Sd(e,t,n,o){const i=Di(t,e,o,!0);ur(()=>{Zs(o[t],i)},n)}function Di(e,t,n=Xe,o=!1){if(n){const i=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...r)=>{jt();const l=ko(n),a=At(t,n,e,r);return l(),Xt(),a});return o?i.unshift(s):i.push(s),s}}const qt=e=>(t,n=Xe)=>{(!wo||e==="sp")&&Di(e,(...o)=>t(...o),n)},Va=qt("bm"),ft=qt("m"),Ed=qt("bu"),Nd=qt("u"),ar=qt("bum"),ur=qt("um"),Cd=qt("sp"),Md=qt("rtg"),$d=qt("rtc");function Id(e,t=Xe){Di("ec",e,t)}const Ba="components";function za(e,t){return Ha(Ba,e,!0,t)||e}const Fa=Symbol.for("v-ndc");function cr(e){return Ve(e)?Ha(Ba,e,!1)||e:e||Fa}function Ha(e,t,n=!0,o=!1){const i=Le||Xe;if(i){const s=i.type;{const l=yf(s,!1);if(l&&(l===t||l===ct(t)||l===Ci(ct(t))))return s}const r=Br(i[e]||s[e],t)||Br(i.appContext[e],t);return!r&&o?s:r}}function Br(e,t){return e&&(e[t]||e[ct(t)]||e[Ci(ct(t))])}function Dt(e,t,n,o){let i;const s=n&&n[o],r=ce(e);if(r||Ve(e)){const l=r&&Gt(e);let a=!1,u=!1;l&&(a=!at(e),u=rn(e),e=Pi(e)),i=new Array(e.length);for(let c=0,d=e.length;ct(l,a,void 0,s&&s[a]));else{const l=Object.keys(e);i=new Array(l.length);for(let a=0,u=l.length;abo(t)?!(t.type===Wt||t.type===Me&&!La(t.children)):!0)?e:null}const Es=e=>e?au(e)?Ri(e):Es(e.parent):null,uo=Ze(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Es(e.parent),$root:e=>Es(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Ya(e),$forceUpdate:e=>e.f||(e.f=()=>{rr(e.update)}),$nextTick:e=>e.n||(e.n=ut.bind(e.proxy)),$watch:e=>ef.bind(e)}),ns=(e,t)=>e!==Te&&!e.__isScriptSetup&&Ce(e,t),Td={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:o,data:i,props:s,accessCache:r,type:l,appContext:a}=e;let u;if(t[0]!=="$"){const h=r[t];if(h!==void 0)switch(h){case 1:return o[t];case 2:return i[t];case 4:return n[t];case 3:return s[t]}else{if(ns(o,t))return r[t]=1,o[t];if(i!==Te&&Ce(i,t))return r[t]=2,i[t];if((u=e.propsOptions[0])&&Ce(u,t))return r[t]=3,s[t];if(n!==Te&&Ce(n,t))return r[t]=4,n[t];Ns&&(r[t]=0)}}const c=uo[t];let d,g;if(c)return t==="$attrs"&&Ke(e.attrs,"get",""),c(e);if((d=l.__cssModules)&&(d=d[t]))return d;if(n!==Te&&Ce(n,t))return r[t]=4,n[t];if(g=a.config.globalProperties,Ce(g,t))return g[t]},set({_:e},t,n){const{data:o,setupState:i,ctx:s}=e;return ns(i,t)?(i[t]=n,!0):o!==Te&&Ce(o,t)?(o[t]=n,!0):Ce(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(s[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:i,propsOptions:s}},r){let l;return!!n[r]||e!==Te&&Ce(e,r)||ns(t,r)||(l=s[0])&&Ce(l,r)||Ce(o,r)||Ce(uo,r)||Ce(i.config.globalProperties,r)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:Ce(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Pd(){return Ua().slots}function Ad(){return Ua().attrs}function Ua(e){const t=cn();return t.setupContext||(t.setupContext=cu(t))}function zr(e){return ce(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}function Dd(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}let Ns=!0;function kd(e){const t=Ya(e),n=e.proxy,o=e.ctx;Ns=!1,t.beforeCreate&&Fr(t.beforeCreate,e,"bc");const{data:i,computed:s,methods:r,watch:l,provide:a,inject:u,created:c,beforeMount:d,mounted:g,beforeUpdate:h,updated:y,activated:b,deactivated:x,beforeDestroy:C,beforeUnmount:D,destroyed:S,unmounted:N,render:F,renderTracked:j,renderTriggered:k,errorCaptured:A,serverPrefetch:V,expose:G,inheritAttrs:z,components:T,directives:J,filters:E}=t;if(u&&Od(u,o,null),r)for(const B in r){const H=r[B];ge(H)&&(o[B]=H.bind(n))}if(i){const B=i.call(n,n);Pe(B)&&(e.data=Po(B))}if(Ns=!0,s)for(const B in s){const H=s[B],X=ge(H)?H.bind(n,n):ge(H.get)?H.get.bind(n,n):It,W=!ge(H)&&ge(H.set)?H.set.bind(n):It,oe=fe({get:X,set:W});Object.defineProperty(o,B,{enumerable:!0,configurable:!0,get:()=>oe.value,set:re=>oe.value=re})}if(l)for(const B in l)Ga(l[B],o,n,B);if(a){const B=ge(a)?a.call(n):a;Reflect.ownKeys(B).forEach(H=>{xn(H,B[H])})}c&&Fr(c,e,"c");function I(B,H){ce(H)?H.forEach(X=>B(X.bind(n))):H&&B(H.bind(n))}if(I(Va,d),I(ft,g),I(Ed,h),I(Nd,y),I(wd,b),I(xd,x),I(Id,A),I($d,j),I(Md,k),I(ar,D),I(ur,N),I(Cd,V),ce(G))if(G.length){const B=e.exposed||(e.exposed={});G.forEach(H=>{Object.defineProperty(B,H,{get:()=>n[H],set:X=>n[H]=X,enumerable:!0})})}else e.exposed||(e.exposed={});F&&e.render===It&&(e.render=F),z!=null&&(e.inheritAttrs=z),T&&(e.components=T),J&&(e.directives=J),V&&ka(e)}function Od(e,t,n=It){ce(e)&&(e=Cs(e));for(const o in e){const i=e[o];let s;Pe(i)?"default"in i?s=vt(i.from||o,i.default,!0):s=vt(i.from||o):s=vt(i),De(s)?Object.defineProperty(t,o,{enumerable:!0,configurable:!0,get:()=>s.value,set:r=>s.value=r}):t[o]=s}}function Fr(e,t,n){At(ce(e)?e.map(o=>o.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ga(e,t,n,o){let i=o.includes(".")?ou(n,o):()=>n[o];if(Ve(e)){const s=t[e];ge(s)&&Se(i,s)}else if(ge(e))Se(i,e.bind(n));else if(Pe(e))if(ce(e))e.forEach(s=>Ga(s,t,n,o));else{const s=ge(e.handler)?e.handler.bind(n):t[e.handler];ge(s)&&Se(i,s,e)}}function Ya(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:i,optionsCache:s,config:{optionMergeStrategies:r}}=e.appContext,l=s.get(t);let a;return l?a=l:!i.length&&!n&&!o?a=t:(a={},i.length&&i.forEach(u=>di(a,u,r,!0)),di(a,t,r)),Pe(t)&&s.set(t,a),a}function di(e,t,n,o=!1){const{mixins:i,extends:s}=t;s&&di(e,s,n,!0),i&&i.forEach(r=>di(e,r,n,!0));for(const r in t)if(!(o&&r==="expose")){const l=Rd[r]||n&&n[r];e[r]=l?l(e[r],t[r]):t[r]}return e}const Rd={data:Hr,props:Lr,emits:Lr,methods:Qn,computed:Qn,beforeCreate:qe,created:qe,beforeMount:qe,mounted:qe,beforeUpdate:qe,updated:qe,beforeDestroy:qe,beforeUnmount:qe,destroyed:qe,unmounted:qe,activated:qe,deactivated:qe,errorCaptured:qe,serverPrefetch:qe,components:Qn,directives:Qn,watch:Bd,provide:Hr,inject:Vd};function Hr(e,t){return t?e?function(){return Ze(ge(e)?e.call(this,this):e,ge(t)?t.call(this,this):t)}:t:e}function Vd(e,t){return Qn(Cs(e),Cs(t))}function Cs(e){if(ce(e)){const t={};for(let n=0;n1)return n&&ge(t)?t.call(o&&o.proxy):t}}function Hd(){return!!(cn()||_n)}const ja={},Xa=()=>Object.create(ja),Wa=e=>Object.getPrototypeOf(e)===ja;function Ld(e,t,n,o=!1){const i={},s=Xa();e.propsDefaults=Object.create(null),Za(e,t,i,s);for(const r in e.propsOptions[0])r in i||(i[r]=void 0);n?e.props=o?i:id(i):e.type.props?e.props=i:e.props=s,e.attrs=s}function Ud(e,t,n,o){const{props:i,attrs:s,vnode:{patchFlag:r}}=e,l=we(i),[a]=e.propsOptions;let u=!1;if((o||r>0)&&!(r&16)){if(r&8){const c=e.vnode.dynamicProps;for(let d=0;d{a=!0;const[g,h]=qa(d,t,!0);Ze(r,g),h&&l.push(...h)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!s&&!a)return Pe(e)&&o.set(e,Pn),Pn;if(ce(s))for(let c=0;ce==="_"||e==="__"||e==="_ctx"||e==="$stable",fr=e=>ce(e)?e.map(Ct):[Ct(e)],Yd=(e,t,n)=>{if(t._n)return t;const o=Bn((...i)=>fr(t(...i)),n);return o._c=!1,o},Ja=(e,t,n)=>{const o=e._ctx;for(const i in e){if(dr(i))continue;const s=e[i];if(ge(s))t[i]=Yd(i,s,o);else if(s!=null){const r=fr(s);t[i]=()=>r}}},Qa=(e,t)=>{const n=fr(t);e.slots.default=()=>n},eu=(e,t,n)=>{for(const o in t)(n||!dr(o))&&(e[o]=t[o])},Kd=(e,t,n)=>{const o=e.slots=Xa();if(e.vnode.shapeFlag&32){const i=t.__;i&&_s(o,"__",i,!0);const s=t._;s?(eu(o,t,n),n&&_s(o,"_",s,!0)):Ja(t,o)}else t&&Qa(e,t)},jd=(e,t,n)=>{const{vnode:o,slots:i}=e;let s=!0,r=Te;if(o.shapeFlag&32){const l=t._;l?n&&l===1?s=!1:eu(i,t,n):(s=!t.$stable,Ja(t,i)),r=t}else t&&(Qa(e,t),r={default:1});if(s)for(const l in i)!dr(l)&&r[l]==null&&delete i[l]},Je=af;function Xd(e){return Wd(e)}function Wd(e,t){const n=Mi();n.__VUE__=!0;const{insert:o,remove:i,patchProp:s,createElement:r,createText:l,createComment:a,setText:u,setElementText:c,parentNode:d,nextSibling:g,setScopeId:h=It,insertStaticContent:y}=e,b=(_,w,f,p=null,m=null,v=null,M=void 0,R=null,O=!!w.dynamicChildren)=>{if(_===w)return;_&&!Zn(_,w)&&(p=ve(_),re(_,m,v,!0),_=null),w.patchFlag===-2&&(O=!1,w.dynamicChildren=null);const{type:P,ref:Y,shapeFlag:L}=w;switch(P){case Oi:x(_,w,f,p);break;case Wt:C(_,w,f,p);break;case qo:_==null&&D(w,f,p,M);break;case Me:T(_,w,f,p,m,v,M,R,O);break;default:L&1?F(_,w,f,p,m,v,M,R,O):L&6?J(_,w,f,p,m,v,M,R,O):(L&64||L&128)&&P.process(_,w,f,p,m,v,M,R,O,ye)}Y!=null&&m?ao(Y,_&&_.ref,v,w||_,!w):Y==null&&_&&_.ref!=null&&ao(_.ref,null,v,_,!0)},x=(_,w,f,p)=>{if(_==null)o(w.el=l(w.children),f,p);else{const m=w.el=_.el;w.children!==_.children&&u(m,w.children)}},C=(_,w,f,p)=>{_==null?o(w.el=a(w.children||""),f,p):w.el=_.el},D=(_,w,f,p)=>{[_.el,_.anchor]=y(_.children,w,f,p,_.el,_.anchor)},S=({el:_,anchor:w},f,p)=>{let m;for(;_&&_!==w;)m=g(_),o(_,f,p),_=m;o(w,f,p)},N=({el:_,anchor:w})=>{let f;for(;_&&_!==w;)f=g(_),i(_),_=f;i(w)},F=(_,w,f,p,m,v,M,R,O)=>{w.type==="svg"?M="svg":w.type==="math"&&(M="mathml"),_==null?j(w,f,p,m,v,M,R,O):V(_,w,m,v,M,R,O)},j=(_,w,f,p,m,v,M,R)=>{let O,P;const{props:Y,shapeFlag:L,transition:K,dirs:te}=_;if(O=_.el=r(_.type,v,Y&&Y.is,Y),L&8?c(O,_.children):L&16&&A(_.children,O,null,p,m,os(_,v),M,R),te&&fn(_,null,p,"created"),k(O,_,_.scopeId,M,p),Y){for(const xe in Y)xe!=="value"&&!oo(xe)&&s(O,xe,null,Y[xe],v,p);"value"in Y&&s(O,"value",null,Y.value,v),(P=Y.onVnodeBeforeMount)&&St(P,p,_)}te&&fn(_,null,p,"beforeMount");const pe=Zd(m,K);pe&&K.beforeEnter(O),o(O,w,f),((P=Y&&Y.onVnodeMounted)||pe||te)&&Je(()=>{P&&St(P,p,_),pe&&K.enter(O),te&&fn(_,null,p,"mounted")},m)},k=(_,w,f,p,m)=>{if(f&&h(_,f),p)for(let v=0;v{for(let P=O;P<_.length;P++){const Y=_[P]=R?nn(_[P]):Ct(_[P]);b(null,Y,w,f,p,m,v,M,R)}},V=(_,w,f,p,m,v,M)=>{const R=w.el=_.el;let{patchFlag:O,dynamicChildren:P,dirs:Y}=w;O|=_.patchFlag&16;const L=_.props||Te,K=w.props||Te;let te;if(f&&hn(f,!1),(te=K.onVnodeBeforeUpdate)&&St(te,f,w,_),Y&&fn(w,_,f,"beforeUpdate"),f&&hn(f,!0),(L.innerHTML&&K.innerHTML==null||L.textContent&&K.textContent==null)&&c(R,""),P?G(_.dynamicChildren,P,R,f,p,os(w,m),v):M||H(_,w,R,null,f,p,os(w,m),v,!1),O>0){if(O&16)z(R,L,K,f,m);else if(O&2&&L.class!==K.class&&s(R,"class",null,K.class,m),O&4&&s(R,"style",L.style,K.style,m),O&8){const pe=w.dynamicProps;for(let xe=0;xe{te&&St(te,f,w,_),Y&&fn(w,_,f,"updated")},p)},G=(_,w,f,p,m,v,M)=>{for(let R=0;R{if(w!==f){if(w!==Te)for(const v in w)!oo(v)&&!(v in f)&&s(_,v,w[v],null,m,p);for(const v in f){if(oo(v))continue;const M=f[v],R=w[v];M!==R&&v!=="value"&&s(_,v,R,M,m,p)}"value"in f&&s(_,"value",w.value,f.value,m)}},T=(_,w,f,p,m,v,M,R,O)=>{const P=w.el=_?_.el:l(""),Y=w.anchor=_?_.anchor:l("");let{patchFlag:L,dynamicChildren:K,slotScopeIds:te}=w;te&&(R=R?R.concat(te):te),_==null?(o(P,f,p),o(Y,f,p),A(w.children||[],f,Y,m,v,M,R,O)):L>0&&L&64&&K&&_.dynamicChildren?(G(_.dynamicChildren,K,f,m,v,M,R),(w.key!=null||m&&w===m.subTree)&&hr(_,w,!0)):H(_,w,f,Y,m,v,M,R,O)},J=(_,w,f,p,m,v,M,R,O)=>{w.slotScopeIds=R,_==null?w.shapeFlag&512?m.ctx.activate(w,f,p,M,O):E(w,f,p,m,v,M,O):U(_,w,O)},E=(_,w,f,p,m,v,M)=>{const R=_.component=pf(_,p,m);if(Oa(_)&&(R.ctx.renderer=ye),gf(R,!1,M),R.asyncDep){if(m&&m.registerDep(R,I,M),!_.el){const O=R.subTree=Ie(Wt);C(null,O,w,f),_.placeholder=O.el}}else I(R,_,w,f,m,v,M)},U=(_,w,f)=>{const p=w.component=_.component;if(rf(_,w,f))if(p.asyncDep&&!p.asyncResolved){B(p,w,f);return}else p.next=w,p.update();else w.el=_.el,p.vnode=w},I=(_,w,f,p,m,v,M)=>{const R=()=>{if(_.isMounted){let{next:L,bu:K,u:te,parent:pe,vnode:xe}=_;{const wt=tu(_);if(wt){L&&(L.el=xe.el,B(_,L,M)),wt.asyncDep.then(()=>{_.isUnmounted||R()});return}}let Ee=L,Ge;hn(_,!1),L?(L.el=xe.el,B(_,L,M)):L=xe,K&&Wo(K),(Ge=L.props&&L.props.onVnodeBeforeUpdate)&&St(Ge,pe,L,xe),hn(_,!0);const nt=Yr(_),bt=_.subTree;_.subTree=nt,b(bt,nt,d(bt.el),ve(bt),_,m,v),L.el=nt.el,Ee===null&&lf(_,nt.el),te&&Je(te,m),(Ge=L.props&&L.props.onVnodeUpdated)&&Je(()=>St(Ge,pe,L,xe),m)}else{let L;const{el:K,props:te}=w,{bm:pe,m:xe,parent:Ee,root:Ge,type:nt}=_,bt=kn(w);hn(_,!1),pe&&Wo(pe),!bt&&(L=te&&te.onVnodeBeforeMount)&&St(L,Ee,w),hn(_,!0);{Ge.ce&&Ge.ce._def.shadowRoot!==!1&&Ge.ce._injectChildStyle(nt);const wt=_.subTree=Yr(_);b(null,wt,f,p,_,m,v),w.el=wt.el}if(xe&&Je(xe,m),!bt&&(L=te&&te.onVnodeMounted)){const wt=w;Je(()=>St(L,Ee,wt),m)}(w.shapeFlag&256||Ee&&kn(Ee.vnode)&&Ee.vnode.shapeFlag&256)&&_.a&&Je(_.a,m),_.isMounted=!0,w=f=p=null}};_.scope.on();const O=_.effect=new aa(R);_.scope.off();const P=_.update=O.run.bind(O),Y=_.job=O.runIfDirty.bind(O);Y.i=_,Y.id=_.uid,O.scheduler=()=>rr(Y),hn(_,!0),P()},B=(_,w,f)=>{w.component=_;const p=_.vnode.props;_.vnode=w,_.next=null,Ud(_,w.props,p,f),jd(_,w.children,f),jt(),kr(_),Xt()},H=(_,w,f,p,m,v,M,R,O=!1)=>{const P=_&&_.children,Y=_?_.shapeFlag:0,L=w.children,{patchFlag:K,shapeFlag:te}=w;if(K>0){if(K&128){W(P,L,f,p,m,v,M,R,O);return}else if(K&256){X(P,L,f,p,m,v,M,R,O);return}}te&8?(Y&16&&se(P,m,v),L!==P&&c(f,L)):Y&16?te&16?W(P,L,f,p,m,v,M,R,O):se(P,m,v,!0):(Y&8&&c(f,""),te&16&&A(L,f,p,m,v,M,R,O))},X=(_,w,f,p,m,v,M,R,O)=>{_=_||Pn,w=w||Pn;const P=_.length,Y=w.length,L=Math.min(P,Y);let K;for(K=0;KY?se(_,m,v,!0,!1,L):A(w,f,p,m,v,M,R,O,L)},W=(_,w,f,p,m,v,M,R,O)=>{let P=0;const Y=w.length;let L=_.length-1,K=Y-1;for(;P<=L&&P<=K;){const te=_[P],pe=w[P]=O?nn(w[P]):Ct(w[P]);if(Zn(te,pe))b(te,pe,f,null,m,v,M,R,O);else break;P++}for(;P<=L&&P<=K;){const te=_[L],pe=w[K]=O?nn(w[K]):Ct(w[K]);if(Zn(te,pe))b(te,pe,f,null,m,v,M,R,O);else break;L--,K--}if(P>L){if(P<=K){const te=K+1,pe=teK)for(;P<=L;)re(_[P],m,v,!0),P++;else{const te=P,pe=P,xe=new Map;for(P=pe;P<=K;P++){const rt=w[P]=O?nn(w[P]):Ct(w[P]);rt.key!=null&&xe.set(rt.key,P)}let Ee,Ge=0;const nt=K-pe+1;let bt=!1,wt=0;const Xn=new Array(nt);for(P=0;P=nt){re(rt,m,v,!0);continue}let xt;if(rt.key!=null)xt=xe.get(rt.key);else for(Ee=pe;Ee<=K;Ee++)if(Xn[Ee-pe]===0&&Zn(rt,w[Ee])){xt=Ee;break}xt===void 0?re(rt,m,v,!0):(Xn[xt-pe]=P+1,xt>=wt?wt=xt:bt=!0,b(rt,w[xt],f,null,m,v,M,R,O),Ge++)}const Mr=bt?qd(Xn):Pn;for(Ee=Mr.length-1,P=nt-1;P>=0;P--){const rt=pe+P,xt=w[rt],$r=w[rt+1],Ir=rt+1{const{el:v,type:M,transition:R,children:O,shapeFlag:P}=_;if(P&6){oe(_.component.subTree,w,f,p);return}if(P&128){_.suspense.move(w,f,p);return}if(P&64){M.move(_,w,f,ye);return}if(M===Me){o(v,w,f);for(let L=0;LR.enter(v),m);else{const{leave:L,delayLeave:K,afterLeave:te}=R,pe=()=>{_.ctx.isUnmounted?i(v):o(v,w,f)},xe=()=>{L(v,()=>{pe(),te&&te()})};K?K(v,pe,xe):xe()}else o(v,w,f)},re=(_,w,f,p=!1,m=!1)=>{const{type:v,props:M,ref:R,children:O,dynamicChildren:P,shapeFlag:Y,patchFlag:L,dirs:K,cacheIndex:te}=_;if(L===-2&&(m=!1),R!=null&&(jt(),ao(R,null,f,_,!0),Xt()),te!=null&&(w.renderCache[te]=void 0),Y&256){w.ctx.deactivate(_);return}const pe=Y&1&&K,xe=!kn(_);let Ee;if(xe&&(Ee=M&&M.onVnodeBeforeUnmount)&&St(Ee,w,_),Y&6)ie(_.component,f,p);else{if(Y&128){_.suspense.unmount(f,p);return}pe&&fn(_,null,w,"beforeUnmount"),Y&64?_.type.remove(_,w,f,ye,p):P&&!P.hasOnce&&(v!==Me||L>0&&L&64)?se(P,w,f,!1,!0):(v===Me&&L&384||!m&&Y&16)&&se(O,w,f),p&&he(_)}(xe&&(Ee=M&&M.onVnodeUnmounted)||pe)&&Je(()=>{Ee&&St(Ee,w,_),pe&&fn(_,null,w,"unmounted")},f)},he=_=>{const{type:w,el:f,anchor:p,transition:m}=_;if(w===Me){Q(f,p);return}if(w===qo){N(_);return}const v=()=>{i(f),m&&!m.persisted&&m.afterLeave&&m.afterLeave()};if(_.shapeFlag&1&&m&&!m.persisted){const{leave:M,delayLeave:R}=m,O=()=>M(f,v);R?R(_.el,v,O):O()}else v()},Q=(_,w)=>{let f;for(;_!==w;)f=g(_),i(_),_=f;i(w)},ie=(_,w,f)=>{const{bum:p,scope:m,job:v,subTree:M,um:R,m:O,a:P,parent:Y,slots:{__:L}}=_;Gr(O),Gr(P),p&&Wo(p),Y&&ce(L)&&L.forEach(K=>{Y.renderCache[K]=void 0}),m.stop(),v&&(v.flags|=8,re(M,_,w,f)),R&&Je(R,w),Je(()=>{_.isUnmounted=!0},w),w&&w.pendingBranch&&!w.isUnmounted&&_.asyncDep&&!_.asyncResolved&&_.suspenseId===w.pendingId&&(w.deps--,w.deps===0&&w.resolve())},se=(_,w,f,p=!1,m=!1,v=0)=>{for(let M=v;M<_.length;M++)re(_[M],w,f,p,m)},ve=_=>{if(_.shapeFlag&6)return ve(_.component.subTree);if(_.shapeFlag&128)return _.suspense.next();const w=g(_.anchor||_.el),f=w&&w[Pa];return f?g(f):w};let me=!1;const de=(_,w,f)=>{_==null?w._vnode&&re(w._vnode,null,null,!0):b(w._vnode||null,_,w,null,null,null,f),w._vnode=_,me||(me=!0,kr(),$a(),me=!1)},ye={p:b,um:re,m:oe,r:he,mt:E,mc:A,pc:H,pbc:G,n:ve,o:e};return{render:de,hydrate:void 0,createApp:Fd(de)}}function os({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function hn({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Zd(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function hr(e,t,n=!1){const o=e.children,i=t.children;if(ce(o)&&ce(i))for(let s=0;s>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,r=n[s-1];s-- >0;)n[s]=r,r=t[r];return n}function tu(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:tu(t)}function Gr(e){if(e)for(let t=0;tvt(Jd);function Se(e,t,n){return nu(e,t,n)}function nu(e,t,n=Te){const{immediate:o,deep:i,flush:s,once:r}=n,l=Ze({},n),a=t&&o||!t&&s!=="post";let u;if(wo){if(s==="sync"){const h=Qd();u=h.__watcherHandles||(h.__watcherHandles=[])}else if(!a){const h=()=>{};return h.stop=It,h.resume=It,h.pause=It,h}}const c=Xe;l.call=(h,y,b)=>At(h,c,y,b);let d=!1;s==="post"?l.scheduler=h=>{Je(h,c&&c.suspense)}:s!=="sync"&&(d=!0,l.scheduler=(h,y)=>{y?h():rr(h)}),l.augmentJob=h=>{t&&(h.flags|=4),d&&(h.flags|=2,c&&(h.id=c.uid,h.i=c))};const g=pd(e,t,l);return wo&&(u?u.push(g):a&&g()),g}function ef(e,t,n){const o=this.proxy,i=Ve(e)?e.includes(".")?ou(o,e):()=>o[e]:e.bind(o,o);let s;ge(t)?s=t:(s=t.handler,n=t);const r=ko(this),l=nu(i,s.bind(o),n);return r(),l}function ou(e,t){const n=t.split(".");return()=>{let o=e;for(let i=0;it==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${ct(t)}Modifiers`]||e[`${un(t)}Modifiers`];function nf(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||Te;let i=n;const s=t.startsWith("update:"),r=s&&tf(o,t.slice(7));r&&(r.trim&&(i=n.map(c=>Ve(c)?c.trim():c)),r.number&&(i=n.map(si)));let l,a=o[l=qi(t)]||o[l=qi(ct(t))];!a&&s&&(a=o[l=qi(un(t))]),a&&At(a,e,6,i);const u=o[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,At(u,e,6,i)}}function iu(e,t,n=!1){const o=t.emitsCache,i=o.get(e);if(i!==void 0)return i;const s=e.emits;let r={},l=!1;if(!ge(e)){const a=u=>{const c=iu(u,t,!0);c&&(l=!0,Ze(r,c))};!n&&t.mixins.length&&t.mixins.forEach(a),e.extends&&a(e.extends),e.mixins&&e.mixins.forEach(a)}return!s&&!l?(Pe(e)&&o.set(e,null),null):(ce(s)?s.forEach(a=>r[a]=null):Ze(r,s),Pe(e)&&o.set(e,r),r)}function ki(e,t){return!e||!Ei(t)?!1:(t=t.slice(2).replace(/Once$/,""),Ce(e,t[0].toLowerCase()+t.slice(1))||Ce(e,un(t))||Ce(e,t))}function Yr(e){const{type:t,vnode:n,proxy:o,withProxy:i,propsOptions:[s],slots:r,attrs:l,emit:a,render:u,renderCache:c,props:d,data:g,setupState:h,ctx:y,inheritAttrs:b}=e,x=ci(e);let C,D;try{if(n.shapeFlag&4){const N=i||o,F=N;C=Ct(u.call(F,N,c,d,h,g,y)),D=l}else{const N=t;C=Ct(N.length>1?N(d,{attrs:l,slots:r,emit:a}):N(d,null)),D=t.props?l:of(l)}}catch(N){co.length=0,Ai(N,e,1),C=Ie(Wt)}let S=C;if(D&&b!==!1){const N=Object.keys(D),{shapeFlag:F}=S;N.length&&F&7&&(s&&N.some(Ws)&&(D=sf(D,s)),S=Fn(S,D,!1,!0))}return n.dirs&&(S=Fn(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&lr(S,n.transition),C=S,ci(x),C}const of=e=>{let t;for(const n in e)(n==="class"||n==="style"||Ei(n))&&((t||(t={}))[n]=e[n]);return t},sf=(e,t)=>{const n={};for(const o in e)(!Ws(o)||!(o.slice(9)in t))&&(n[o]=e[o]);return n};function rf(e,t,n){const{props:o,children:i,component:s}=e,{props:r,children:l,patchFlag:a}=t,u=s.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&a>=0){if(a&1024)return!0;if(a&16)return o?Kr(o,r,u):!!r;if(a&8){const c=t.dynamicProps;for(let d=0;de.__isSuspense;function af(e,t){t&&t.pendingBranch?ce(e)?t.effects.push(...e):t.effects.push(e):md(e)}const Me=Symbol.for("v-fgt"),Oi=Symbol.for("v-txt"),Wt=Symbol.for("v-cmt"),qo=Symbol.for("v-stc"),co=[];let et=null;function Z(e=!1){co.push(et=e?null:[])}function uf(){co.pop(),et=co[co.length-1]||null}let zn=1;function jr(e,t=!1){zn+=e,e<0&&et&&t&&(et.hasOnce=!0)}function ru(e){return e.dynamicChildren=zn>0?et||Pn:null,uf(),zn>0&&et&&et.push(e),e}function ae(e,t,n,o,i,s){return ru($(e,t,n,o,i,s,!0))}function Ue(e,t,n,o,i){return ru(Ie(e,t,n,o,i,!0))}function bo(e){return e?e.__v_isVNode===!0:!1}function Zn(e,t){return e.type===t.type&&e.key===t.key}const lu=({key:e})=>e??null,Jo=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?Ve(e)||De(e)||ge(e)?{i:Le,r:e,k:t,f:!!n}:e:null);function $(e,t=null,n=null,o=0,i=null,s=e===Me?0:1,r=!1,l=!1){const a={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&lu(t),ref:t&&Jo(t),scopeId:Ta,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Le};return l?(gr(a,n),s&128&&e.normalize(a)):n&&(a.shapeFlag|=Ve(n)?8:16),zn>0&&!r&&et&&(a.patchFlag>0||s&6)&&a.patchFlag!==32&&et.push(a),a}const Ie=cf;function cf(e,t=null,n=null,o=0,i=null,s=!1){if((!e||e===Fa)&&(e=Wt),bo(e)){const l=Fn(e,t,!0);return n&&gr(l,n),zn>0&&!s&&et&&(l.shapeFlag&6?et[et.indexOf(e)]=l:et.push(l)),l.patchFlag=-2,l}if(_f(e)&&(e=e.__vccOpts),t){t=df(t);let{class:l,style:a}=t;l&&!Ve(l)&&(t.class=tt(l)),Pe(a)&&(sr(a)&&!ce(a)&&(a=Ze({},a)),t.style=dt(a))}const r=Ve(e)?1:su(e)?128:yd(e)?64:Pe(e)?4:ge(e)?2:0;return $(e,t,n,o,i,r,s,!0)}function df(e){return e?sr(e)||Wa(e)?Ze({},e):e:null}function Fn(e,t,n=!1,o=!1){const{props:i,ref:s,patchFlag:r,children:l,transition:a}=e,u=t?Do(i||{},t):i,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:u,key:u&&lu(u),ref:t&&t.ref?n&&s?ce(s)?s.concat(Jo(t)):[s,Jo(t)]:Jo(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Me?r===-1?16:r|16:r,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:a,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Fn(e.ssContent),ssFallback:e.ssFallback&&Fn(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return a&&o&&lr(c,a.clone(c)),c}function We(e=" ",t=0){return Ie(Oi,null,e,t)}function pr(e,t){const n=Ie(qo,null,e);return n.staticCount=t,n}function Oe(e="",t=!1){return t?(Z(),Ue(Wt,null,e)):Ie(Wt,null,e)}function Ct(e){return e==null||typeof e=="boolean"?Ie(Wt):ce(e)?Ie(Me,null,e.slice()):bo(e)?nn(e):Ie(Oi,null,String(e))}function nn(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Fn(e)}function gr(e,t){let n=0;const{shapeFlag:o}=e;if(t==null)t=null;else if(ce(t))n=16;else if(typeof t=="object")if(o&65){const i=t.default;i&&(i._c&&(i._d=!1),gr(e,i()),i._c&&(i._d=!0));return}else{n=32;const i=t._;!i&&!Wa(t)?t._ctx=Le:i===3&&Le&&(Le.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ge(t)?(t={default:t,_ctx:Le},n=32):(t=String(t),o&64?(n=16,t=[We(t)]):n=8);e.children=t,e.shapeFlag|=n}function Do(...e){const t={};for(let n=0;nXe||Le;let fi,$s;{const e=Mi(),t=(n,o)=>{let i;return(i=e[n])||(i=e[n]=[]),i.push(o),s=>{i.length>1?i.forEach(r=>r(s)):i[0](s)}};fi=t("__VUE_INSTANCE_SETTERS__",n=>Xe=n),$s=t("__VUE_SSR_SETTERS__",n=>wo=n)}const ko=e=>{const t=Xe;return fi(e),e.scope.on(),()=>{e.scope.off(),fi(t)}},Xr=()=>{Xe&&Xe.scope.off(),fi(null)};function au(e){return e.vnode.shapeFlag&4}let wo=!1;function gf(e,t=!1,n=!1){t&&$s(t);const{props:o,children:i}=e.vnode,s=au(e);Ld(e,o,s,t),Kd(e,i,n||t);const r=s?vf(e,t):void 0;return t&&$s(!1),r}function vf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Td);const{setup:o}=n;if(o){jt();const i=e.setupContext=o.length>1?cu(e):null,s=ko(e),r=Ao(o,e,0,[e.props,i]),l=ta(r);if(Xt(),s(),(l||e.sp)&&!kn(e)&&ka(e),l){if(r.then(Xr,Xr),t)return r.then(a=>{Wr(e,a)}).catch(a=>{Ai(a,e,0)});e.asyncDep=r}else Wr(e,r)}else uu(e)}function Wr(e,t,n){ge(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:Pe(t)&&(e.setupState=Sa(t)),uu(e)}function uu(e,t,n){const o=e.type;e.render||(e.render=o.render||It);{const i=ko(e);jt();try{kd(e)}finally{Xt(),i()}}}const mf={get(e,t){return Ke(e,"get",""),e[t]}};function cu(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,mf),slots:e.slots,emit:e.emit,expose:t}}function Ri(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Sa(Yt(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in uo)return uo[n](e)},has(t,n){return n in t||n in uo}})):e.proxy}function yf(e,t=!0){return ge(e)?e.displayName||e.name:e.name||t&&e.__name}function _f(e){return ge(e)&&"__vccOpts"in e}const fe=(e,t)=>fd(e,t,wo);function $e(e,t,n){const o=arguments.length;return o===2?Pe(t)&&!ce(t)?bo(t)?Ie(e,null,[t]):Ie(e,t):Ie(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):o===3&&bo(n)&&(n=[n]),Ie(e,t,n))}function bf(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let o=0;o0&&et&&et.push(e),!0}const wf="3.5.18";/** -* @vue/runtime-dom v3.5.18 -* (c) 2018-present Yuxi (Evan) You and Vue contributors -* @license MIT -**/let Is;const Zr=typeof window<"u"&&window.trustedTypes;if(Zr)try{Is=Zr.createPolicy("vue",{createHTML:e=>e})}catch{}const du=Is?e=>Is.createHTML(e):e=>e,xf="http://www.w3.org/2000/svg",Sf="http://www.w3.org/1998/Math/MathML",Vt=typeof document<"u"?document:null,qr=Vt&&Vt.createElement("template"),Ef={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const i=t==="svg"?Vt.createElementNS(xf,e):t==="mathml"?Vt.createElementNS(Sf,e):n?Vt.createElement(e,{is:n}):Vt.createElement(e);return e==="select"&&o&&o.multiple!=null&&i.setAttribute("multiple",o.multiple),i},createText:e=>Vt.createTextNode(e),createComment:e=>Vt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Vt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,i,s){const r=n?n.previousSibling:t.lastChild;if(i&&(i===s||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===s||!(i=i.nextSibling)););else{qr.innerHTML=du(o==="svg"?`${e}`:o==="mathml"?`${e}`:e);const l=qr.content;if(o==="svg"||o==="mathml"){const a=l.firstChild;for(;a.firstChild;)l.appendChild(a.firstChild);l.removeChild(a)}t.insertBefore(l,n)}return[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Nf=Symbol("_vtc");function Cf(e,t,n){const o=e[Nf];o&&(t=(t?[t,...o]:[...o]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Jr=Symbol("_vod"),Mf=Symbol("_vsh"),$f=Symbol(""),If=/(^|;)\s*display\s*:/;function Tf(e,t,n){const o=e.style,i=Ve(n);let s=!1;if(n&&!i){if(t)if(Ve(t))for(const r of t.split(";")){const l=r.slice(0,r.indexOf(":")).trim();n[l]==null&&Qo(o,l,"")}else for(const r in t)n[r]==null&&Qo(o,r,"");for(const r in n)r==="display"&&(s=!0),Qo(o,r,n[r])}else if(i){if(t!==n){const r=o[$f];r&&(n+=";"+r),o.cssText=n,s=If.test(n)}}else t&&e.removeAttribute("style");Jr in e&&(e[Jr]=s?o.display:"",e[Mf]&&(o.display="none"))}const Qr=/\s*!important$/;function Qo(e,t,n){if(ce(n))n.forEach(o=>Qo(e,t,o));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=Pf(e,t);Qr.test(n)?e.setProperty(un(o),n.replace(Qr,""),"important"):e[o]=n}}const el=["Webkit","Moz","ms"],is={};function Pf(e,t){const n=is[t];if(n)return n;let o=ct(t);if(o!=="filter"&&o in e)return is[t]=o;o=Ci(o);for(let i=0;iss||(Of.then(()=>ss=0),ss=Date.now());function Vf(e,t){const n=o=>{if(!o._vts)o._vts=Date.now();else if(o._vts<=n.attached)return;At(Bf(o,n.value),t,5,[o])};return n.value=e,n.attached=Rf(),n}function Bf(e,t){if(ce(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(o=>i=>!i._stopped&&o&&o(i))}else return t}const rl=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,zf=(e,t,n,o,i,s)=>{const r=i==="svg";t==="class"?Cf(e,o,r):t==="style"?Tf(e,n,o):Ei(t)?Ws(t)||Df(e,t,n,o,s):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Ff(e,t,o,r))?(ol(e,t,o),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nl(e,t,o,r,s,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Ve(o))?ol(e,ct(t),o,s,t):(t==="true-value"?e._trueValue=o:t==="false-value"&&(e._falseValue=o),nl(e,t,o,r))};function Ff(e,t,n,o){if(o)return!!(t==="innerHTML"||t==="textContent"||t in e&&rl(t)&&ge(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const i=e.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return rl(t)&&Ve(n)?!1:t in e}const Hn=e=>{const t=e.props["onUpdate:modelValue"]||!1;return ce(t)?n=>Wo(t,n):t};function Hf(e){e.target.composing=!0}function ll(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Kt=Symbol("_assign"),yt={created(e,{modifiers:{lazy:t,trim:n,number:o}},i){e[Kt]=Hn(i);const s=o||i.props&&i.props.type==="number";sn(e,t?"change":"input",r=>{if(r.target.composing)return;let l=e.value;n&&(l=l.trim()),s&&(l=si(l)),e[Kt](l)}),n&&sn(e,"change",()=>{e.value=e.value.trim()}),t||(sn(e,"compositionstart",Hf),sn(e,"compositionend",ll),sn(e,"change",ll))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:i,number:s}},r){if(e[Kt]=Hn(r),e.composing)return;const l=(s||e.type==="number")&&!/^0\d/.test(e.value)?si(e.value):e.value,a=t??"";l!==a&&(document.activeElement===e&&e.type!=="range"&&(o&&t===n||i&&e.value.trim()===a)||(e.value=a))}},ot={deep:!0,created(e,t,n){e[Kt]=Hn(n),sn(e,"change",()=>{const o=e._modelValue,i=xo(e),s=e.checked,r=e[Kt];if(ce(o)){const l=Js(o,i),a=l!==-1;if(s&&!a)r(o.concat(i));else if(!s&&a){const u=[...o];u.splice(l,1),r(u)}}else if(jn(o)){const l=new Set(o);s?l.add(i):l.delete(i),r(l)}else r(fu(e,s))})},mounted:al,beforeUpdate(e,t,n){e[Kt]=Hn(n),al(e,t,n)}};function al(e,{value:t,oldValue:n},o){e._modelValue=t;let i;if(ce(t))i=Js(t,o.props.value)>-1;else if(jn(t))i=t.has(o.props.value);else{if(t===n)return;i=To(t,fu(e,!0))}e.checked!==i&&(e.checked=i)}const Ln={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const i=jn(t);sn(e,"change",()=>{const s=Array.prototype.filter.call(e.options,r=>r.selected).map(r=>n?si(xo(r)):xo(r));e[Kt](e.multiple?i?new Set(s):s:s[0]),e._assigning=!0,ut(()=>{e._assigning=!1})}),e[Kt]=Hn(o)},mounted(e,{value:t}){ul(e,t)},beforeUpdate(e,t,n){e[Kt]=Hn(n)},updated(e,{value:t}){e._assigning||ul(e,t)}};function ul(e,t){const n=e.multiple,o=ce(t);if(!(n&&!o&&!jn(t))){for(let i=0,s=e.options.length;iString(u)===String(l)):r.selected=Js(t,l)>-1}else r.selected=t.has(l);else if(To(xo(r),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function xo(e){return"_value"in e?e._value:e.value}function fu(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Lf=["ctrl","shift","alt","meta"],Uf={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Lf.some(n=>e[`${n}Key`]&&!t.includes(n))},hu=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(i,...s)=>{for(let r=0;r{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=i=>{if(!("key"in i))return;const s=un(i.key);if(t.some(r=>r===s||Gf[r]===s))return e(i)})},Yf=Ze({patchProp:zf},Ef);let cl;function Kf(){return cl||(cl=Xd(Yf))}const jf=(...e)=>{const t=Kf().createApp(...e),{mount:n}=t;return t.mount=o=>{const i=Wf(o);if(!i)return;const s=t._component;!ge(s)&&!s.render&&!s.template&&(s.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,Xf(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},t};function Xf(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Wf(e){return Ve(e)?document.querySelector(e):e}/*! - * pinia v3.0.3 - * (c) 2025 Eduardo San Martin Morote - * @license MIT - */let gu;const Vi=e=>gu=e,vu=Symbol();function Ts(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var fo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(fo||(fo={}));function Zf(){const e=$i(!0),t=e.run(()=>q({}));let n=[],o=[];const i=Yt({install(s){Vi(i),i._a=s,s.provide(vu,i),s.config.globalProperties.$pinia=i,o.forEach(r=>n.push(r)),o=[]},use(s){return this._a?n.push(s):o.push(s),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return i}const mu=()=>{};function dl(e,t,n,o=mu){e.push(t);const i=()=>{const s=e.indexOf(t);s>-1&&(e.splice(s,1),o())};return!n&&Ii()&&io(i),i}function $n(e,...t){e.slice().forEach(n=>{n(...t)})}const qf=e=>e(),fl=Symbol(),rs=Symbol();function Ps(e,t){e instanceof Map&&t instanceof Map?t.forEach((n,o)=>e.set(o,n)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const o=t[n],i=e[n];Ts(i)&&Ts(o)&&e.hasOwnProperty(n)&&!De(o)&&!Gt(o)?e[n]=Ps(i,o):e[n]=o}return e}const Jf=Symbol();function Qf(e){return!Ts(e)||!Object.prototype.hasOwnProperty.call(e,Jf)}const{assign:Qt}=Object;function eh(e){return!!(De(e)&&e.effect)}function th(e,t,n,o){const{state:i,actions:s,getters:r}=t,l=n.state.value[e];let a;function u(){l||(n.state.value[e]=i?i():{});const c=Ea(n.state.value[e]);return Qt(c,s,Object.keys(r||{}).reduce((d,g)=>(d[g]=Yt(fe(()=>{Vi(n);const h=n._s.get(e);return r[g].call(h,h)})),d),{}))}return a=yu(e,u,t,n,o,!0),a}function yu(e,t,n={},o,i,s){let r;const l=Qt({actions:{}},n),a={deep:!0};let u,c,d=[],g=[],h;const y=o.state.value[e];!s&&!y&&(o.state.value[e]={}),q({});let b;function x(A){let V;u=c=!1,typeof A=="function"?(A(o.state.value[e]),V={type:fo.patchFunction,storeId:e,events:h}):(Ps(o.state.value[e],A),V={type:fo.patchObject,payload:A,storeId:e,events:h});const G=b=Symbol();ut().then(()=>{b===G&&(u=!0)}),c=!0,$n(d,V,o.state.value[e])}const C=s?function(){const{state:V}=n,G=V?V():{};this.$patch(z=>{Qt(z,G)})}:mu;function D(){r.stop(),d=[],g=[],o._s.delete(e)}const S=(A,V="")=>{if(fl in A)return A[rs]=V,A;const G=function(){Vi(o);const z=Array.from(arguments),T=[],J=[];function E(B){T.push(B)}function U(B){J.push(B)}$n(g,{args:z,name:G[rs],store:F,after:E,onError:U});let I;try{I=A.apply(this&&this.$id===e?this:F,z)}catch(B){throw $n(J,B),B}return I instanceof Promise?I.then(B=>($n(T,B),B)).catch(B=>($n(J,B),Promise.reject(B))):($n(T,I),I)};return G[fl]=!0,G[rs]=V,G},N={_p:o,$id:e,$onAction:dl.bind(null,g),$patch:x,$reset:C,$subscribe(A,V={}){const G=dl(d,A,V.detached,()=>z()),z=r.run(()=>Se(()=>o.state.value[e],T=>{(V.flush==="sync"?c:u)&&A({storeId:e,type:fo.direct,events:h},T)},Qt({},a,V)));return G},$dispose:D},F=Po(N);o._s.set(e,F);const k=(o._a&&o._a.runWithContext||qf)(()=>o._e.run(()=>(r=$i()).run(()=>t({action:S}))));for(const A in k){const V=k[A];if(De(V)&&!eh(V)||Gt(V))s||(y&&Qf(V)&&(De(V)?V.value=y[A]:Ps(V,y[A])),o.state.value[e][A]=V);else if(typeof V=="function"){const G=S(V,A);k[A]=G,l.actions[A]=V}}return Qt(F,k),Qt(we(F),k),Object.defineProperty(F,"$state",{get:()=>o.state.value[e],set:A=>{x(V=>{Qt(V,A)})}}),o._p.forEach(A=>{Qt(F,r.run(()=>A({store:F,app:o._a,pinia:o,options:l})))}),y&&s&&n.hydrate&&n.hydrate(F.$state,y),u=!0,c=!0,F}/*! #__NO_SIDE_EFFECTS__ */function _u(e,t,n){let o;const i=typeof t=="function";o=i?n:t;function s(r,l){const a=Hd();return r=r||(a?vt(vu,null):null),r&&Vi(r),r=gu,r._s.has(e)||(i?yu(e,t,o,r):th(e,o,r)),r._s.get(e)}return s.$id=e,s}function nh(e){const t=we(e),n={};for(const o in t){const i=t[o];i.effect?n[o]=fe({get:()=>e[o],set(s){e[o]=s}}):(De(i)||Gt(i))&&(n[o]=ke(e,o))}return n}const oh={class:"StepWizard"},ih={class:"step-indicators"},sh=["onClick"],rh={class:"step-content"},lh={class:"step-actions"},ah=_e({__name:"StepWizard",props:{steps:{type:Array,required:!0}},setup(e){const t=e,n=q(0),o=()=>{n.value{s>=0&&s(Z(),ae("div",oh,[$("div",ih,[(Z(!0),ae(Me,null,Dt(e.steps,(l,a)=>(Z(),ae("div",{key:a,class:tt(["step",{active:n.value===a,completed:n.value>a}]),onClick:u=>i(a)},null,10,sh))),128))]),$("div",rh,[(Z(),Ue(cr(e.steps[n.value])))]),$("div",lh,[n.value>0?(Z(),ae("button",{key:0,onClick:r[0]||(r[0]=l=>n.value--),class:"btn prev-btn"},"Previous")):Oe("",!0),n.value{const n=e.__vccOpts||e;for(const[o,i]of t)n[o]=i;return n},uh=st(ah,[["__scopeId","data-v-cb49c971"]]),dn=_u("projectSpec",()=>{const e=q({project_name:"",database:""}),t=q(!1);q([]);const n=q([{id:"User",data:{fields:[{name:"id",type:"UUID",isPrimaryKey:!0},{name:"name",type:"String"},{name:"email",type:"String"},{name:"created_at",type:"DateTime"},{name:"updated_at",type:"DateTime"}],relations:[{fieldName:"post_id",targetModel:"Post",onDelete:"CASCADE",isNullable:!1,isUnique:!1,isIndex:!1}]},type:"custom",position:{x:50,y:50}},{id:"Post",data:{fields:[{name:"id",type:"UUID",isPrimaryKey:!0},{name:"created_at",type:"DateTime"},{name:"updated_at",type:"DateTime"}],relations:[]},type:"custom",position:{x:150,y:355}}]),o=q([{id:"(User)-(Post)-(post_id)",source:"User",target:"Post",type:"smoothstep"}]),i=k=>n.value.find(A=>A.id===k),s=k=>{i(k)||n.value.push({id:k,data:{fields:[],relations:[]},type:"custom",position:{x:100,y:100}})},r=k=>{i(k)&&(n.value=n.value.filter(V=>V.id!==k),o.value=o.value.filter(V=>V.source!==k&&V.target!==k),n.value.forEach(V=>{V.data.relations&&(V.data.relations=V.data.relations?.filter(G=>G.targetModel!==k))}))},l=(k,A)=>{const V=i(k);if(!V)throw new Error(`Model does not exist: ${k}`);if(i(A))throw new Error(`Duplicate name: ${A}`);V.id=A,o.value.forEach(z=>{z.source===k&&(z.source=A),z.target===k&&(z.target=A),z.id=z.id.replace(`(${k})`,`(${A})`)}),n.value.forEach(z=>{z.data.relations.forEach(T=>{T.targetModel===k&&(T.targetModel=A)})})},a=(k,A)=>{const V=k.data.fields.find(z=>z.name===A),G=k.data.relations.find(z=>z.fieldName===A);return!!V||!!G},u=(k,A)=>{const V=i(k);if(!V)throw new Error(`Model does not exist: ${k}`);if(a(V,A.name))throw new Error(`Field name already exists for model: ${k}`);V.data.fields.push(A)},c=(k,A,V)=>{const G=i(k);if(!G)throw new Error(`Model does not exist: ${k}`);const z=G.data.fields.findIndex(T=>T.name===A);if(z===-1)throw new Error(`Field does not exist: ${A}`);G.data.fields[z]=V},d=(k,A)=>{const V=i(k);if(!V)throw new Error(`Model does not exist: ${k}`);V.data.fields=V.data.fields.filter(G=>G.name!==A)},g=(k,A,V)=>{const G=i(k);G&&(C(k,A,V.fieldName),G.data.relations.push(V))},h=(k,A,V)=>{const G=i(k);G&&(G.data.relations=G.data.relations.filter(z=>z.fieldName!==V),D(k,A,V))},y=(k,A,V,G)=>{const z=i(k);if(!z||!z.data.relations)return;const T=z.data.relations.findIndex(I=>I.fieldName===V);z.data.relations[T]=G;const J=x(k,A,V),E=b(J);if(!E)return;const U=x(k,G.targetModel,G.fieldName);E.id=U,E.source=k,E.target=G.targetModel},b=k=>o.value.find(A=>A.id===k),x=(k,A,V)=>`(${k})-(${A})-(${V})`,C=(k,A,V)=>{k!==A&&o.value.push({id:x(k,A,V),source:k,target:A,type:"smoothstep"})},D=(k,A,V)=>{o.value=o.value.filter(G=>G.id!==x(k,A,V))};return{nodes:n,edges:o,createNode:s,createEdge:C,deleteNode:r,renameNode:l,addField:u,deleteField:d,updateField:c,addRelation:g,deleteRelation:h,updateRelation:y,projectSpec:e,isProjectNameConfirmed:t,setProjectName:k=>{e.value.project_name=k},getProjectName:()=>e.value.project_name,setDatabase:k=>{e.value.database=k},getDatabase:()=>e.value.database,findNodeById:i}}),ch={class:"container"},dh={class:"input-group"},fh={class:"label-group"},hh={class:"project-name-length-indicator"},ph={class:"input-horizontal"},gh=["value","disabled"],vh=["disabled"],mh={key:0,class:"error-message"},yh={__name:"ProjectNameStep",setup(e){const t=dn(),n=q(""),o=q(!1),i=q(""),s=a=>/^[a-zA-Z_][a-zA-Z0-9_-]*$/.test(a),r=a=>{if(n.value=a.target.value,n.value.length===0){o.value=!1;return}s(n.value)?o.value=!1:(o.value=!0,i.value="Name must start with a letter/underscore and only contain letters, numbers, -, or _")},l=()=>{if(t.isProjectNameConfirmed){t.isProjectNameConfirmed=!1,t.setProjectName("");return}!n.value||o.value||(t.setProjectName(n.value),t.isProjectNameConfirmed=!0)};return ft(()=>{t.getProjectName()&&(n.value=t.getProjectName())}),(a,u)=>(Z(),ae("main",ch,[u[2]||(u[2]=$("h1",null,"Choose a Project Name",-1)),u[3]||(u[3]=$("br",null,null,-1)),$("div",dh,[$("div",fh,[u[1]||(u[1]=$("label",{class:"project-name-label",for:"project-name"},"Project Name",-1)),$("div",hh,je(n.value.length)+" / 50",1)]),$("div",ph,[$("input",{class:tt(["project-name",{confirmed:ee(t).isProjectNameConfirmed,"input-error":o.value}]),type:"text",placeholder:"Enter your project name",value:n.value,onInput:u[0]||(u[0]=c=>r(c)),disabled:ee(t).isProjectNameConfirmed,maxlength:"50"},null,42,gh),$("button",{class:tt(["confirm-btn",{confirmed:ee(t).isProjectNameConfirmed}]),onClick:l,disabled:o.value||!n.value}," Confirm ",10,vh)]),o.value?(Z(),ae("div",mh,je(i.value),1)):Oe("",!0)])]))}},_h=st(yh,[["__scopeId","data-v-1d9aee04"]]),bh={class:"container"},wh={class:"db-grid-container"},xh={class:"db-grid"},Sh=["onClick"],Eh=_e({__name:"DatabaseStep",setup(e){const t=dn(),n=["PostgreSQL","MySQL","SQLite"],o=i=>{i==="PostgreSQL"&&t.setDatabase(t.getDatabase()===i?"":i)};return ft(()=>{t.getDatabase()&&t.getDatabase()!=="PostgreSQL"&&t.setDatabase("")}),(i,s)=>(Z(),ae("main",bh,[s[0]||(s[0]=$("h1",null,"Choose a Database",-1)),s[1]||(s[1]=$("br",null,null,-1)),$("div",wh,[$("div",xh,[(Z(),ae(Me,null,Dt(n,r=>$("div",{class:tt(["db-item",{confirmed:ee(t).getDatabase()===r,disabled:r!=="PostgreSQL",enabled:r==="PostgreSQL"}]),key:r,onClick:l=>o(r)},[$("span",null,je(r),1)],10,Sh)),64))])])]))}}),Nh=st(Eh,[["__scopeId","data-v-9256ee53"]]),Ch={class:"custom-node"},Mh={class:"custom-node-header"},$h={class:"custom-node-title"},Ih={key:0,class:"dropdown-list"},Th={class:"custom-node-body nodrag"},Ph=["onClick"],Ah={class:"custom-node-field-name"},Dh={class:"custom-node-field-type"},kh=["onClick"],Oh={class:"custom-node-field-name"},Rh={class:"custom-node-field-type"},Vh=_e({__name:"CustomNode",props:{id:{},data:{}},setup(e){const t=e,n=q(!1),o=()=>{n.value=!0},i=()=>{n.value=!1};return(s,r)=>(Z(),ae("div",Ch,[$("div",Mh,[$("div",$h,je(s.id),1),$("div",{class:"custom-node-actions nodrag",onMouseover:o,onMouseleave:i},[r[4]||(r[4]=$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-ellipsis"},[$("circle",{cx:"12",cy:"12",r:"1"}),$("circle",{cx:"19",cy:"12",r:"1"}),$("circle",{cx:"5",cy:"12",r:"1"})],-1)),n.value?(Z(),ae("div",Ih,[$("div",{class:"dropdown-item",onClick:r[0]||(r[0]=l=>s.$emit("add-field",t.id))},"Add Field"),$("div",{class:"dropdown-item",onClick:r[1]||(r[1]=l=>s.$emit("add-relation",t.id))},"Add Relation"),$("div",{class:"dropdown-item",onClick:r[2]||(r[2]=l=>s.$emit("rename-node",t.id))},"Rename"),$("div",{class:"dropdown-item",onClick:r[3]||(r[3]=l=>s.$emit("delete-node",t.id))},"Delete")])):Oe("",!0)],32)]),$("div",Th,[(Z(!0),ae(Me,null,Dt(s.data.fields,l=>(Z(),ae("div",{key:l.name,class:"custom-node-field-row",onClick:a=>s.$emit("open-edit-field-modal",t.id,l)},[$("div",Ah,je(l.name),1),$("div",Dh,je(l.type),1)],8,Ph))),128)),(Z(!0),ae(Me,null,Dt(s.data.relations,l=>(Z(),ae("div",{key:l.fieldName,class:"custom-node-field-row",onClick:a=>s.$emit("open-edit-relation-modal",t.id,l)},[$("div",Oh,je(l.fieldName),1),$("div",Rh,je(l.targetModel),1)],8,kh))),128))])]))}}),Bh=st(Vh,[["__scopeId","data-v-9ec7633c"]]),Cn=_u("modal",()=>{const e=q(!1),t=q(""),n=yo(null),o=q({});function i(r,l,a={}){n.value=Yt(l),o.value=a,t.value=r,e.value=!0}function s(){e.value=!1,n.value=null,o.value={},t.value=""}return{isOpen:e,modalTitle:t,currentComponent:n,props:o,open:i,close:s}}),zh={class:"field-modal-container"},Fh={class:"grid-2x2"},Hh={class:"input-group"},Lh={class:"input-group"},Uh={class:"input-group"},Gh={class:"input-group checkbox-inline"},Yh={class:"checkbox-group"},Kh=_e({__name:"AddFieldModal",props:{id:{}},setup(e){const t=e,n=dn(),o=Cn(),i=q(""),s=q(""),r=q(""),l=q(!1),a=q(!1),u=q(!1),c=q(!1),d=()=>{!i.value||!s.value||(n.addField(t.id,{name:i.value,type:s.value,default:r.value||void 0,isPrimaryKey:l.value,isNullable:a.value,isUnique:u.value,isIndex:c.value}),o.close())};return(g,h)=>(Z(),ae("main",zh,[$("div",Fh,[$("div",Hh,[h[7]||(h[7]=$("label",{class:"field-label"},"Field Name:",-1)),Ne($("input",{class:"field-input","onUpdate:modelValue":h[0]||(h[0]=y=>i.value=y),type:"text"},null,512),[[yt,i.value]])]),$("div",Lh,[h[9]||(h[9]=$("label",{class:"field-label"},"Type:",-1)),Ne($("select",{class:"field-select","onUpdate:modelValue":h[1]||(h[1]=y=>s.value=y)},h[8]||(h[8]=[pr('',7)]),512),[[Ln,s.value]])]),$("div",Uh,[h[10]||(h[10]=$("label",{class:"field-label"},"Default Value:",-1)),Ne($("input",{class:"field-input","onUpdate:modelValue":h[2]||(h[2]=y=>r.value=y),type:"text"},null,512),[[yt,r.value]])]),$("div",Gh,[h[11]||(h[11]=$("label",{class:"field-label"},"Primary Key:",-1)),Ne($("input",{type:"checkbox","onUpdate:modelValue":h[3]||(h[3]=y=>l.value=y)},null,512),[[ot,l.value]])])]),$("div",Yh,[$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":h[4]||(h[4]=y=>a.value=y)},null,512),[[ot,a.value]]),h[12]||(h[12]=We(" Nullable",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":h[5]||(h[5]=y=>u.value=y)},null,512),[[ot,u.value]]),h[13]||(h[13]=We(" Unique",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":h[6]||(h[6]=y=>c.value=y)},null,512),[[ot,c.value]]),h[14]||(h[14]=We(" Index",-1))])]),$("button",{class:"save-field-btn",onClick:d},"Save")]))}}),jh=st(Kh,[["__scopeId","data-v-0aed7b15"]]),Xh={class:"field-modal-container"},Wh={class:"input-container"},Zh={class:"input-group"},qh={class:"input-group"},Jh={class:"input-group"},Qh={class:"checkbox-group"},ep=_e({__name:"EditFieldModal",props:{id:{},field:{}},setup(e){const t=e,n=dn(),o=Cn(),i=q(t.field.name),s=q(t.field.type),r=q(t.field.default||""),l=q(t.field.isPrimaryKey||!1),a=q(t.field.isNullable||!1),u=q(t.field.isUnique||!1),c=q(t.field.isIndex||!1),d=()=>{n.updateField(t.id,t.field.name,{name:i.value,type:s.value,default:r.value||void 0,isPrimaryKey:l.value,isNullable:a.value,isUnique:u.value,isIndex:c.value}),o.close()},g=()=>{n.deleteField(t.id,t.field.name),o.close()};return(h,y)=>(Z(),ae("main",Xh,[$("div",Wh,[$("div",Zh,[y[7]||(y[7]=$("label",{class:"field-label"},"Field name",-1)),Ne($("input",{class:"field-input","onUpdate:modelValue":y[0]||(y[0]=b=>i.value=b),type:"text"},null,512),[[yt,i.value]])]),$("div",qh,[y[9]||(y[9]=$("label",{class:"field-label"},"Type",-1)),Ne($("select",{class:"field-select","onUpdate:modelValue":y[1]||(y[1]=b=>s.value=b)},y[8]||(y[8]=[pr('',7)]),512),[[Ln,s.value]])]),$("div",Jh,[y[10]||(y[10]=$("label",{class:"field-label"},"Default value",-1)),Ne($("input",{class:"field-input","onUpdate:modelValue":y[2]||(y[2]=b=>r.value=b),type:"text"},null,512),[[yt,r.value]])])]),$("div",Qh,[$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":y[3]||(y[3]=b=>l.value=b)},null,512),[[ot,l.value]]),y[11]||(y[11]=We(" Primary key",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":y[4]||(y[4]=b=>a.value=b)},null,512),[[ot,a.value]]),y[12]||(y[12]=We(" Nullable",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":y[5]||(y[5]=b=>u.value=b)},null,512),[[ot,u.value]]),y[13]||(y[13]=We(" Unique",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":y[6]||(y[6]=b=>c.value=b)},null,512),[[ot,c.value]]),y[14]||(y[14]=We(" Index",-1))])]),$("div",{class:"action-group"},[$("button",{class:"save-field-btn",onClick:d},"Save"),$("button",{class:"delete-field-btn",onClick:g},"Delete")])]))}}),tp=st(ep,[["__scopeId","data-v-eca0508a"]]),np={class:"relation-container"},op={class:"grid-2x2"},ip={class:"input-group"},sp={class:"input-group"},rp=["value"],lp={class:"input-group"},ap={class:"input-group"},up={class:"checkbox-group"},cp=_e({__name:"EditRelationModal",props:{id:{},relation:{}},setup(e){const t=e,n=dn(),o=Cn(),i=q(""),s=q(""),r=q(""),l=q(""),a=q(""),u=q(!1),c=q(!1),d=q(!1);ft(()=>{i.value=t.relation.fieldName||"",s.value=t.relation.fieldName||"",r.value=t.relation.targetModel||"",l.value=t.relation.onDelete||"",a.value=t.relation.backPopulates||"",u.value=t.relation.isNullable||!1,c.value=t.relation.isUnique||!1,d.value=t.relation.isIndex||!1});const g=fe(()=>n.nodes.filter(b=>b.id!==t.id)),h=()=>{!r.value||!s.value||(n.updateRelation(t.id,t.relation.targetModel,t.relation.fieldName,{fieldName:s.value,targetModel:r.value,backPopulates:a.value,onDelete:l.value,isNullable:u.value,isUnique:c.value,isIndex:d.value}),o.close())},y=()=>{n.deleteRelation(t.id,t.relation.targetModel,t.relation.fieldName),o.close()};return(b,x)=>(Z(),ae("main",np,[$("div",op,[$("div",ip,[x[7]||(x[7]=$("label",{class:"relation-label"},"Field Name:",-1)),Ne($("input",{class:"relation-input","onUpdate:modelValue":x[0]||(x[0]=C=>s.value=C),type:"text"},null,512),[[yt,s.value]])]),$("div",sp,[x[9]||(x[9]=$("label",{class:"relation-label"},"Target Model:",-1)),Ne($("select",{class:"relation-select","onUpdate:modelValue":x[1]||(x[1]=C=>r.value=C)},[x[8]||(x[8]=$("option",{disabled:"",value:""},"-- Select a model --",-1)),(Z(!0),ae(Me,null,Dt(g.value,C=>(Z(),ae("option",{key:C.id,value:C.id},je(C.id),9,rp))),128))],512),[[Ln,r.value]])]),$("div",lp,[x[11]||(x[11]=$("label",{class:"relation-label"},"OnDelete:",-1)),Ne($("select",{class:"relation-select","onUpdate:modelValue":x[2]||(x[2]=C=>l.value=C)},x[10]||(x[10]=[$("option",{disabled:"",value:""},"-- Select behavior --",-1),$("option",{value:"CASCADE"},"CASCADE",-1),$("option",{value:"SET_NULL"},"SET_NULL",-1)]),512),[[Ln,l.value]])]),$("div",ap,[x[12]||(x[12]=$("label",{class:"relation-label"},"Back Populates:",-1)),Ne($("input",{class:"relation-input","onUpdate:modelValue":x[3]||(x[3]=C=>a.value=C),type:"text"},null,512),[[yt,a.value]])])]),$("div",up,[$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":x[4]||(x[4]=C=>u.value=C)},null,512),[[ot,u.value]]),x[13]||(x[13]=We(" Nullable",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":x[5]||(x[5]=C=>c.value=C)},null,512),[[ot,c.value]]),x[14]||(x[14]=We(" Unique",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":x[6]||(x[6]=C=>d.value=C)},null,512),[[ot,d.value]]),x[15]||(x[15]=We(" Index",-1))])]),$("div",{class:"action-group"},[$("button",{class:"delete-relation-btn",onClick:y},"Delete"),$("button",{class:"save-relation-btn",onClick:h},"Save")])]))}}),dp=st(cp,[["__scopeId","data-v-4fbf1372"]]),fp={class:"relation-container"},hp={class:"grid-2x2"},pp={class:"input-group"},gp={class:"input-group"},vp=["value"],mp={class:"input-group"},yp={class:"input-group"},_p={class:"checkbox-group"},bp=_e({__name:"AddRelationModal",props:{id:{}},setup(e){const t=e,n=dn(),o=Cn(),i=q(""),s=q(""),r=q(""),l=q(""),a=q(!1),u=q(!1),c=q(!1),d=fe(()=>n.nodes.filter(h=>h.id!==t.id)),g=()=>{!s.value||!i.value||(n.addRelation(t.id,s.value,{fieldName:i.value,targetModel:s.value,backPopulates:l.value,onDelete:r.value,isNullable:a.value,isUnique:u.value,isIndex:c.value}),o.close())};return(h,y)=>(Z(),ae("main",fp,[$("div",hp,[$("div",pp,[y[7]||(y[7]=$("label",{class:"relation-label"},"Field Name:",-1)),Ne($("input",{class:"relation-input","onUpdate:modelValue":y[0]||(y[0]=b=>i.value=b),type:"text"},null,512),[[yt,i.value]])]),$("div",gp,[y[9]||(y[9]=$("label",{class:"relation-label"},"Target Model:",-1)),Ne($("select",{class:"relation-select","onUpdate:modelValue":y[1]||(y[1]=b=>s.value=b)},[y[8]||(y[8]=$("option",{disabled:"",value:""},"-- Select a model --",-1)),(Z(!0),ae(Me,null,Dt(d.value,b=>(Z(),ae("option",{key:b.id,value:b.id},je(b.id),9,vp))),128))],512),[[Ln,s.value]])]),$("div",mp,[y[11]||(y[11]=$("label",{class:"relation-label"},"OnDelete:",-1)),Ne($("select",{class:"relation-select","onUpdate:modelValue":y[2]||(y[2]=b=>r.value=b)},y[10]||(y[10]=[$("option",{disabled:"",value:""},"-- Select behavior --",-1),$("option",{value:"CASCADE"},"CASCADE",-1),$("option",{value:"SET_NULL"},"SET_NULL",-1)]),512),[[Ln,r.value]])]),$("div",yp,[y[12]||(y[12]=$("label",{class:"relation-label"},"Back Populates:",-1)),Ne($("input",{class:"relation-input","onUpdate:modelValue":y[3]||(y[3]=b=>l.value=b),type:"text"},null,512),[[yt,l.value]])])]),$("div",_p,[$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":y[4]||(y[4]=b=>a.value=b)},null,512),[[ot,a.value]]),y[13]||(y[13]=We(" Nullable",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":y[5]||(y[5]=b=>u.value=b)},null,512),[[ot,u.value]]),y[14]||(y[14]=We(" Unique",-1))]),$("label",null,[Ne($("input",{type:"checkbox","onUpdate:modelValue":y[6]||(y[6]=b=>c.value=b)},null,512),[[ot,c.value]]),y[15]||(y[15]=We(" Index",-1))])]),$("button",{class:"save-relation-btn",onClick:g},"Save")]))}}),wp=st(bp,[["__scopeId","data-v-1cdfdb8a"]]),xp={class:"rename-node-modal"},Sp={class:"input-group"},Ep=_e({__name:"RenameNodeModal",props:{id:{}},setup(e){const t=e,n=dn(),o=Cn(),i=q(t.id),s=()=>{if(!i.value.trim()||i.value===t.id){o.close();return}n.renameNode(t.id,i.value.trim()),o.close()};return(r,l)=>(Z(),ae("main",xp,[$("div",Sp,[l[1]||(l[1]=$("label",{class:"field-label"},"New Node ID:",-1)),Ne($("input",{class:"field-input","onUpdate:modelValue":l[0]||(l[0]=a=>i.value=a),type:"text"},null,512),[[yt,i.value]])]),$("button",{class:"save-btn",onClick:s},"Rename")]))}}),Np=st(Ep,[["__scopeId","data-v-2d35485f"]]);function Bi(e){return Ii()?(io(e),!0):!1}function Ft(e){return typeof e=="function"?e():ee(e)}const Cp=typeof window<"u"&&typeof document<"u",Mp=e=>typeof e<"u",$p=Object.prototype.toString,Ip=e=>$p.call(e)==="[object Object]",Tp=()=>{};function Pp(e,t){function n(...o){return new Promise((i,s)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(i).catch(s)})}return n}const bu=e=>e();function Ap(e=bu){const t=q(!0);function n(){t.value=!1}function o(){t.value=!0}const i=(...s)=>{t.value&&e(...s)};return{isActive:or(t),pause:n,resume:o,eventFilter:i}}function hl(e,t=!1,n="Timeout"){return new Promise((o,i)=>{setTimeout(t?()=>i(n):o,e)})}function Dp(e,t,n={}){const{eventFilter:o=bu,...i}=n;return Se(e,Pp(o,t),i)}function In(e,t,n={}){const{eventFilter:o,...i}=n,{eventFilter:s,pause:r,resume:l,isActive:a}=Ap(o);return{stop:Dp(e,t,{...i,eventFilter:s}),pause:r,resume:l,isActive:a}}function kp(e,t={}){if(!De(e))return Ea(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=ad(()=>({get(){return e.value[o]},set(i){var s;if((s=Ft(t.replaceRef))!=null?s:!0)if(Array.isArray(e.value)){const l=[...e.value];l[o]=i,e.value=l}else{const l={...e.value,[o]:i};Object.setPrototypeOf(l,Object.getPrototypeOf(e.value)),e.value=l}else e.value[o]=i}}));return n}function As(e,t=!1){function n(d,{flush:g="sync",deep:h=!1,timeout:y,throwOnTimeout:b}={}){let x=null;const D=[new Promise(S=>{x=Se(e,N=>{d(N)!==t&&(x?.(),S(N))},{flush:g,deep:h,immediate:!0})})];return y!=null&&D.push(hl(y,b).then(()=>Ft(e)).finally(()=>x?.())),Promise.race(D)}function o(d,g){if(!De(d))return n(N=>N===d,g);const{flush:h="sync",deep:y=!1,timeout:b,throwOnTimeout:x}=g??{};let C=null;const S=[new Promise(N=>{C=Se([e,d],([F,j])=>{t!==(F===j)&&(C?.(),N(F))},{flush:h,deep:y,immediate:!0})})];return b!=null&&S.push(hl(b,x).then(()=>Ft(e)).finally(()=>(C?.(),Ft(e)))),Promise.race(S)}function i(d){return n(g=>!!g,d)}function s(d){return o(null,d)}function r(d){return o(void 0,d)}function l(d){return n(Number.isNaN,d)}function a(d,g){return n(h=>{const y=Array.from(h);return y.includes(d)||y.includes(Ft(d))},g)}function u(d){return c(1,d)}function c(d=1,g){let h=-1;return n(()=>(h+=1,h>=d),g)}return Array.isArray(Ft(e))?{toMatch:n,toContains:a,changed:u,changedTimes:c,get not(){return As(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:i,toBeNull:s,toBeNaN:l,toBeUndefined:r,changed:u,changedTimes:c,get not(){return As(e,!t)}}}function Ds(e){return As(e)}function Op(e){var t;const n=Ft(e);return(t=n?.$el)!=null?t:n}const wu=Cp?window:void 0;function xu(...e){let t,n,o,i;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,i]=e,t=wu):[t,n,o,i]=e,!t)return Tp;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const s=[],r=()=>{s.forEach(c=>c()),s.length=0},l=(c,d,g,h)=>(c.addEventListener(d,g,h),()=>c.removeEventListener(d,g,h)),a=Se(()=>[Op(t),Ft(i)],([c,d])=>{if(r(),!c)return;const g=Ip(d)?{...d}:d;s.push(...n.flatMap(h=>o.map(y=>l(c,h,y,g))))},{immediate:!0,flush:"post"}),u=()=>{a(),r()};return Bi(u),u}function Rp(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function pl(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:i=wu,eventName:s="keydown",passive:r=!1,dedupe:l=!1}=o,a=Rp(t);return xu(i,s,c=>{c.repeat&&Ft(l)||a(c)&&n(c)},r)}function Vp(e){return JSON.parse(JSON.stringify(e))}function ls(e,t,n,o={}){var i,s,r;const{clone:l=!1,passive:a=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:g}=o,h=cn(),y=n||h?.emit||((i=h?.$emit)==null?void 0:i.bind(h))||((r=(s=h?.proxy)==null?void 0:s.$emit)==null?void 0:r.bind(h?.proxy));let b=u;t||(t="modelValue"),b=b||`update:${t.toString()}`;const x=S=>l?typeof l=="function"?l(S):Vp(S):S,C=()=>Mp(e[t])?x(e[t]):d,D=S=>{g?g(S)&&y(b,S):y(b,S)};if(a){const S=C(),N=q(S);let F=!1;return Se(()=>e[t],j=>{F||(F=!0,N.value=x(j),ut(()=>F=!1))}),Se(N,j=>{!F&&(j!==e[t]||c)&&D(j)},{deep:c}),N}else return fe({get(){return C()},set(S){D(S)}})}var Bp={value:()=>{}};function zi(){for(var e=0,t=arguments.length,n={},o;e=0&&(o=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}ei.prototype=zi.prototype={constructor:ei,on:function(e,t){var n=this._,o=zp(e+"",n),i,s=-1,r=o.length;if(arguments.length<2){for(;++s0)for(var n=new Array(i),o=0,i,s;o=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),vl.hasOwnProperty(t)?{space:vl[t],local:e}:e}function Hp(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===ks&&t.documentElement.namespaceURI===ks?t.createElement(e):t.createElementNS(n,e)}}function Lp(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Su(e){var t=Fi(e);return(t.local?Lp:Hp)(t)}function Up(){}function vr(e){return e==null?Up:function(){return this.querySelector(e)}}function Gp(e){typeof e!="function"&&(e=vr(e));for(var t=this._groups,n=t.length,o=new Array(n),i=0;i=S&&(S=D+1);!(F=x[S])&&++S=0;)(r=o[i])&&(s&&r.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(r,s),s=r);return this}function gg(e){e||(e=vg);function t(d,g){return d&&g?e(d.__data__,g.__data__):!d-!g}for(var n=this._groups,o=n.length,i=new Array(o),s=0;st?1:e>=t?0:NaN}function mg(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function yg(){return Array.from(this)}function _g(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Tg:typeof t=="function"?Ag:Pg)(e,t,n??"")):Un(this.node(),e)}function Un(e,t){return e.style.getPropertyValue(t)||$u(e).getComputedStyle(e,null).getPropertyValue(t)}function kg(e){return function(){delete this[e]}}function Og(e,t){return function(){this[e]=t}}function Rg(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Vg(e,t){return arguments.length>1?this.each((t==null?kg:typeof t=="function"?Rg:Og)(e,t)):this.node()[e]}function Iu(e){return e.trim().split(/^|\s+/)}function mr(e){return e.classList||new Tu(e)}function Tu(e){this._node=e,this._names=Iu(e.getAttribute("class")||"")}Tu.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Pu(e,t){for(var n=mr(e),o=-1,i=t.length;++o=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function dv(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,i=t.length,s;n()=>e;function Os(e,{sourceEvent:t,subject:n,target:o,identifier:i,active:s,x:r,y:l,dx:a,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:r,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:a,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Os.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function wv(e){return!e.ctrlKey&&!e.button}function xv(){return this.parentNode}function Sv(e,t){return t??{x:e.x,y:e.y}}function Ev(){return navigator.maxTouchPoints||"ontouchstart"in this}function Nv(){var e=wv,t=xv,n=Sv,o=Ev,i={},s=zi("start","drag","end"),r=0,l,a,u,c,d=0;function g(N){N.on("mousedown.drag",h).filter(o).on("touchstart.drag",x).on("touchmove.drag",C,bv).on("touchend.drag touchcancel.drag",D).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(N,F){if(!(c||!e.call(this,N,F))){var j=S(this,t.call(this,N,F),N,F,"mouse");j&&(ht(N.view).on("mousemove.drag",y,So).on("mouseup.drag",b,So),Ou(N.view),as(N),u=!1,l=N.clientX,a=N.clientY,j("start",N))}}function y(N){if(On(N),!u){var F=N.clientX-l,j=N.clientY-a;u=F*F+j*j>d}i.mouse("drag",N)}function b(N){ht(N.view).on("mousemove.drag mouseup.drag",null),Ru(N.view,u),On(N),i.mouse("end",N)}function x(N,F){if(e.call(this,N,F)){var j=N.changedTouches,k=t.call(this,N,F),A=j.length,V,G;for(V=0;V>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Mv.exec(e))?new it(t[1],t[2],t[3],1):(t=$v.exec(e))?new it(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Iv.exec(e))?Lo(t[1],t[2],t[3],t[4]):(t=Tv.exec(e))?Lo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Pv.exec(e))?Sl(t[1],t[2]/100,t[3]/100,1):(t=Av.exec(e))?Sl(t[1],t[2]/100,t[3]/100,t[4]):ml.hasOwnProperty(e)?bl(ml[e]):e==="transparent"?new it(NaN,NaN,NaN,0):null}function bl(e){return new it(e>>16&255,e>>8&255,e&255,1)}function Lo(e,t,n,o){return o<=0&&(e=t=n=NaN),new it(e,t,n,o)}function Ov(e){return e instanceof Ro||(e=Sn(e)),e?(e=e.rgb(),new it(e.r,e.g,e.b,e.opacity)):new it}function Rs(e,t,n,o){return arguments.length===1?Ov(e):new it(e,t,n,o??1)}function it(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}yr(it,Rs,Vu(Ro,{brighter(e){return e=e==null?pi:Math.pow(pi,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Eo:Math.pow(Eo,e),new it(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new it(bn(this.r),bn(this.g),bn(this.b),gi(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wl,formatHex:wl,formatHex8:Rv,formatRgb:xl,toString:xl}));function wl(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}`}function Rv(){return`#${mn(this.r)}${mn(this.g)}${mn(this.b)}${mn((isNaN(this.opacity)?1:this.opacity)*255)}`}function xl(){const e=gi(this.opacity);return`${e===1?"rgb(":"rgba("}${bn(this.r)}, ${bn(this.g)}, ${bn(this.b)}${e===1?")":`, ${e})`}`}function gi(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function bn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function mn(e){return e=bn(e),(e<16?"0":"")+e.toString(16)}function Sl(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new pt(e,t,n,o)}function Bu(e){if(e instanceof pt)return new pt(e.h,e.s,e.l,e.opacity);if(e instanceof Ro||(e=Sn(e)),!e)return new pt;if(e instanceof pt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,i=Math.min(t,n,o),s=Math.max(t,n,o),r=NaN,l=s-i,a=(s+i)/2;return l?(t===s?r=(n-o)/l+(n0&&a<1?0:r,new pt(r,l,a,e.opacity)}function Vv(e,t,n,o){return arguments.length===1?Bu(e):new pt(e,t,n,o??1)}function pt(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}yr(pt,Vv,Vu(Ro,{brighter(e){return e=e==null?pi:Math.pow(pi,e),new pt(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Eo:Math.pow(Eo,e),new pt(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,i=2*n-o;return new it(us(e>=240?e-240:e+120,i,o),us(e,i,o),us(e<120?e+240:e-120,i,o),this.opacity)},clamp(){return new pt(El(this.h),Uo(this.s),Uo(this.l),gi(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=gi(this.opacity);return`${e===1?"hsl(":"hsla("}${El(this.h)}, ${Uo(this.s)*100}%, ${Uo(this.l)*100}%${e===1?")":`, ${e})`}`}}));function El(e){return e=(e||0)%360,e<0?e+360:e}function Uo(e){return Math.max(0,Math.min(1,e||0))}function us(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const _r=e=>()=>e;function Bv(e,t){return function(n){return e+n*t}}function zv(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function Fv(e){return(e=+e)==1?zu:function(t,n){return n-t?zv(t,n,e):_r(isNaN(t)?n:t)}}function zu(e,t){var n=t-e;return n?Bv(e,n):_r(isNaN(e)?t:e)}const vi=function e(t){var n=Fv(t);function o(i,s){var r=n((i=Rs(i)).r,(s=Rs(s)).r),l=n(i.g,s.g),a=n(i.b,s.b),u=zu(i.opacity,s.opacity);return function(c){return i.r=r(c),i.g=l(c),i.b=a(c),i.opacity=u(c),i+""}}return o.gamma=e,o}(1);function Hv(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),i;return function(s){for(i=0;in&&(s=t.slice(n,s),l[r]?l[r]+=s:l[++r]=s),(o=o[0])===(i=i[0])?l[r]?l[r]+=i:l[++r]=i:(l[++r]=null,a.push({i:r,x:Mt(o,i)})),n=cs.lastIndex;return n180?c+=360:c-u>180&&(u+=360),g.push({i:d.push(i(d)+"rotate(",null,o)-2,x:Mt(u,c)})):c&&d.push(i(d)+"rotate("+c+o)}function l(u,c,d,g){u!==c?g.push({i:d.push(i(d)+"skewX(",null,o)-2,x:Mt(u,c)}):c&&d.push(i(d)+"skewX("+c+o)}function a(u,c,d,g,h,y){if(u!==d||c!==g){var b=h.push(i(h)+"scale(",null,",",null,")");y.push({i:b-4,x:Mt(u,d)},{i:b-2,x:Mt(c,g)})}else(d!==1||g!==1)&&h.push(i(h)+"scale("+d+","+g+")")}return function(u,c){var d=[],g=[];return u=e(u),c=e(c),s(u.translateX,u.translateY,c.translateX,c.translateY,d,g),r(u.rotate,c.rotate,d,g),l(u.skewX,c.skewX,d,g),a(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,g),u=c=null,function(h){for(var y=-1,b=g.length,x;++y=0&&e._call.call(void 0,t),e=e._next;--Gn}function Ml(){En=(yi=Co.now())+Hi,Gn=eo=0;try{nm()}finally{Gn=0,im(),En=0}}function om(){var e=Co.now(),t=e-yi;t>Uu&&(Hi-=t,yi=e)}function im(){for(var e,t=mi,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:mi=n);to=e,zs(o)}function zs(e){if(!Gn){eo&&(eo=clearTimeout(eo));var t=e-En;t>24?(e<1/0&&(eo=setTimeout(Ml,e-Co.now()-Hi)),qn&&(qn=clearInterval(qn))):(qn||(yi=Co.now(),qn=setInterval(om,Uu)),Gn=1,Gu(Ml))}}function $l(e,t,n){var o=new _i;return t=t==null?0:+t,o.restart(i=>{o.stop(),e(i+t)},t,n),o}var sm=zi("start","end","cancel","interrupt"),rm=[],Ku=0,Il=1,Fs=2,ni=3,Tl=4,Hs=5,oi=6;function Li(e,t,n,o,i,s){var r=e.__transition;if(!r)e.__transition={};else if(n in r)return;lm(e,n,{name:t,index:o,group:i,on:sm,tween:rm,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Ku})}function wr(e,t){var n=_t(e,t);if(n.state>Ku)throw new Error("too late; already scheduled");return n}function kt(e,t){var n=_t(e,t);if(n.state>ni)throw new Error("too late; already running");return n}function _t(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function lm(e,t,n){var o=e.__transition,i;o[t]=n,n.timer=Yu(s,0,n.time);function s(u){n.state=Il,n.timer.restart(r,n.delay,n.time),n.delay<=u&&r(u-n.delay)}function r(u){var c,d,g,h;if(n.state!==Il)return a();for(c in o)if(h=o[c],h.name===n.name){if(h.state===ni)return $l(r);h.state===Tl?(h.state=oi,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+cFs&&o.state=0&&(t=t.slice(0,n)),!t||t==="start"})}function Vm(e,t,n){var o,i,s=Rm(t)?wr:kt;return function(){var r=s(this,e),l=r.on;l!==o&&(i=(o=l).copy()).on(t,n),r.on=i}}function Bm(e,t){var n=this._id;return arguments.length<2?_t(this.node(),n).on.on(e):this.each(Vm(n,e,t))}function zm(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Fm(){return this.on("end.remove",zm(this._id))}function Hm(e){var t=this._name,n=this._id;typeof e!="function"&&(e=vr(e));for(var o=this._groups,i=o.length,s=new Array(i),r=0;r()=>e;function fy(e,{sourceEvent:t,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function Ht(e,t,n){this.k=e,this.x=t,this.y=n}Ht.prototype={constructor:Ht,scale:function(e){return e===1?this:new Ht(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Ht(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Yn=new Ht(1,0,0);Ht.prototype;function ds(e){e.stopImmediatePropagation()}function Jn(e){e.preventDefault(),e.stopImmediatePropagation()}function hy(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function py(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Pl(){return this.__zoom||Yn}function gy(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function vy(){return navigator.maxTouchPoints||"ontouchstart"in this}function my(e,t,n){var o=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],r=e.invertY(t[1][1])-n[1][1];return e.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),r>s?(s+r)/2:Math.min(0,s)||Math.max(0,r))}function yy(){var e=hy,t=py,n=my,o=gy,i=vy,s=[0,1/0],r=[[-1/0,-1/0],[1/0,1/0]],l=250,a=ti,u=zi("start","zoom","end"),c,d,g,h=500,y=150,b=0,x=10;function C(E){E.property("__zoom",Pl).on("wheel.zoom",A,{passive:!1}).on("mousedown.zoom",V).on("dblclick.zoom",G).filter(i).on("touchstart.zoom",z).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",J).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}C.transform=function(E,U,I,B){var H=E.selection?E.selection():E;H.property("__zoom",Pl),E!==H?F(E,U,I,B):H.interrupt().each(function(){j(this,arguments).event(B).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},C.scaleBy=function(E,U,I,B){C.scaleTo(E,function(){var H=this.__zoom.k,X=typeof U=="function"?U.apply(this,arguments):U;return H*X},I,B)},C.scaleTo=function(E,U,I,B){C.transform(E,function(){var H=t.apply(this,arguments),X=this.__zoom,W=I==null?N(H):typeof I=="function"?I.apply(this,arguments):I,oe=X.invert(W),re=typeof U=="function"?U.apply(this,arguments):U;return n(S(D(X,re),W,oe),H,r)},I,B)},C.translateBy=function(E,U,I,B){C.transform(E,function(){return n(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof I=="function"?I.apply(this,arguments):I),t.apply(this,arguments),r)},null,B)},C.translateTo=function(E,U,I,B,H){C.transform(E,function(){var X=t.apply(this,arguments),W=this.__zoom,oe=B==null?N(X):typeof B=="function"?B.apply(this,arguments):B;return n(Yn.translate(oe[0],oe[1]).scale(W.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof I=="function"?-I.apply(this,arguments):-I),X,r)},B,H)};function D(E,U){return U=Math.max(s[0],Math.min(s[1],U)),U===E.k?E:new Ht(U,E.x,E.y)}function S(E,U,I){var B=U[0]-I[0]*E.k,H=U[1]-I[1]*E.k;return B===E.x&&H===E.y?E:new Ht(E.k,B,H)}function N(E){return[(+E[0][0]+ +E[1][0])/2,(+E[0][1]+ +E[1][1])/2]}function F(E,U,I,B){E.on("start.zoom",function(){j(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(B).end()}).tween("zoom",function(){var H=this,X=arguments,W=j(H,X).event(B),oe=t.apply(H,X),re=I==null?N(oe):typeof I=="function"?I.apply(H,X):I,he=Math.max(oe[1][0]-oe[0][0],oe[1][1]-oe[0][1]),Q=H.__zoom,ie=typeof U=="function"?U.apply(H,X):U,se=a(Q.invert(re).concat(he/Q.k),ie.invert(re).concat(he/ie.k));return function(ve){if(ve===1)ve=ie;else{var me=se(ve),de=he/me[2];ve=new Ht(de,re[0]-me[0]*de,re[1]-me[1]*de)}W.zoom(null,ve)}})}function j(E,U,I){return!I&&E.__zooming||new k(E,U)}function k(E,U){this.that=E,this.args=U,this.active=0,this.sourceEvent=null,this.extent=t.apply(E,U),this.taps=0}k.prototype={event:function(E){return E&&(this.sourceEvent=E),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(E,U){return this.mouse&&E!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&E!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&E!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(E){var U=ht(this.that).datum();u.call(E,this.that,new fy(E,{sourceEvent:this.sourceEvent,target:C,transform:this.that.__zoom,dispatch:u}),U)}};function A(E,...U){if(!e.apply(this,arguments))return;var I=j(this,U).event(E),B=this.__zoom,H=Math.max(s[0],Math.min(s[1],B.k*Math.pow(2,o.apply(this,arguments)))),X=Nt(E);if(I.wheel)(I.mouse[0][0]!==X[0]||I.mouse[0][1]!==X[1])&&(I.mouse[1]=B.invert(I.mouse[0]=X)),clearTimeout(I.wheel);else{if(B.k===H)return;I.mouse=[X,B.invert(X)],ii(this),I.start()}Jn(E),I.wheel=setTimeout(W,y),I.zoom("mouse",n(S(D(B,H),I.mouse[0],I.mouse[1]),I.extent,r));function W(){I.wheel=null,I.end()}}function V(E,...U){if(g||!e.apply(this,arguments))return;var I=E.currentTarget,B=j(this,U,!0).event(E),H=ht(E.view).on("mousemove.zoom",re,!0).on("mouseup.zoom",he,!0),X=Nt(E,I),W=E.clientX,oe=E.clientY;Ou(E.view),ds(E),B.mouse=[X,this.__zoom.invert(X)],ii(this),B.start();function re(Q){if(Jn(Q),!B.moved){var ie=Q.clientX-W,se=Q.clientY-oe;B.moved=ie*ie+se*se>b}B.event(Q).zoom("mouse",n(S(B.that.__zoom,B.mouse[0]=Nt(Q,I),B.mouse[1]),B.extent,r))}function he(Q){H.on("mousemove.zoom mouseup.zoom",null),Ru(Q.view,B.moved),Jn(Q),B.event(Q).end()}}function G(E,...U){if(e.apply(this,arguments)){var I=this.__zoom,B=Nt(E.changedTouches?E.changedTouches[0]:E,this),H=I.invert(B),X=I.k*(E.shiftKey?.5:2),W=n(S(D(I,X),B,H),t.apply(this,U),r);Jn(E),l>0?ht(this).transition().duration(l).call(F,W,B,E):ht(this).call(C.transform,W,B,E)}}function z(E,...U){if(e.apply(this,arguments)){var I=E.touches,B=I.length,H=j(this,U,E.changedTouches.length===B).event(E),X,W,oe,re;for(ds(E),W=0;W(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(le||{}),Sr=(e=>(e.Partial="partial",e.Full="full",e))(Sr||{}),gn=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(gn||{}),ln=(e=>(e.Strict="strict",e.Loose="loose",e))(ln||{}),Ls=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(Ls||{}),po=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(po||{});const _y=["INPUT","SELECT","TEXTAREA"],by=typeof document<"u"?document:null;function Us(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,i=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,s=typeof o?.closest=="function"?o.closest(".nokey"):null;return _y.includes(o?.nodeName)||i||!!s}function wy(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function Al(e,t,n,o){const i=t.replace("+",` -`).replace(` - -`,` -+`).split(` -`).map(r=>r.trim().toLowerCase());if(i.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const s=i.every((r,l)=>n.has(r)&&Array.from(n.values())[l]===i[l]);return o&&n.delete(e.toLowerCase()),s}function xy(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=Sy(n.code,e);return Array.isArray(e)?e.some(i=>Al(n[o],i,t,n.type==="keyup")):Al(n[o],e,t,n.type==="keyup")}}function Sy(e,t){return t.includes(e)?"code":"key"}function go(e,t){const n=fe(()=>be(t?.target)??by),o=yo(be(e)===!0);let i=!1;const s=new Set;let r=a(be(e));Se(()=>be(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&l(),r=a(u)},{immediate:!0}),xu(["blur","contextmenu"],l),pl((...u)=>r(...u),u=>{var c,d;const g=be(t?.actInsideInputWithModifier)??!0,h=be(t?.preventDefault)??!1;if(i=wy(u),(!i||i&&!g)&&Us(u))return;const b=((d=(c=u.composedPath)==null?void 0:c.call(u))==null?void 0:d[0])||u.target,x=b?.nodeName==="BUTTON"||b?.nodeName==="A";!h&&(i||!x)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),pl((...u)=>r(...u),u=>{const c=be(t?.actInsideInputWithModifier)??!0;if(o.value){if((!i||i&&!c)&&Us(u))return;i=!1,o.value=!1}},{eventName:"keyup",target:n});function l(){i=!1,s.clear(),o.value=be(e)===!0}function a(u){return u===null?(l(),()=>!1):typeof u=="boolean"?(l(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?xy(u,s):u}return o}const Zu="vue-flow__node-desc",qu="vue-flow__edge-desc",Ey="vue-flow__aria-live",Ju=["Enter"," ","Escape"],Vn={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function bi(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function wi(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function Ui(e){return{width:e.offsetWidth,height:e.offsetHeight}}function Nn(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Qu(e,t){return{x:Nn(e.x,t[0][0],t[1][0]),y:Nn(e.y,t[0][1],t[1][1])}}function Dl(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function an(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function wn(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!an(e)}function no(e){return wn(e)&&"computedPosition"in e}function Ko(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Ny(e){return Ko(e.width)&&Ko(e.height)&&Ko(e.x)&&Ko(e.y)}function Cy(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:Yt({width:0,height:0}),computedPosition:Yt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Be(e.data)?e.data:{},events:Yt(Be(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function ec(e,t,n){var o,i;const s={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(i=e.targetHandle)==null?void 0:i.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:Be(e.data)?e.data:{},events:Yt(Be(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??s,e,{id:e.id.toString()})}function tc(e,t,n,o){const i=typeof e=="string"?e:e.id,s=new Set,r=o==="source"?"target":"source";for(const l of n)l[r]===i&&s.add(l[o]);return t.filter(l=>s.has(l.id))}function My(...e){if(e.length===3){const[s,r,l]=e;return tc(s,r,l,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(s=>an(s)&&s.source===o).map(s=>n.find(r=>wn(r)&&r.id===s.target))}function $y(...e){if(e.length===3){const[s,r,l]=e;return tc(s,r,l,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(s=>an(s)&&s.target===o).map(s=>n.find(r=>wn(r)&&r.id===s.source))}function nc({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Iy(e,t){return t.some(n=>an(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function Gs({x:e,y:t},{x:n,y:o,zoom:i}){return{x:e*i+n,y:t*i+o}}function Mo({x:e,y:t},{x:n,y:o,zoom:i},s=!1,r=[1,1]){const l={x:(e-n)/i,y:(t-o)/i};return s?Gi(l,r):l}function Ty(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}}function oc({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Py({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function ic(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n0,x=(d??0)*(g??0);(y||b||h>=x||l.dragging)&&r.push(l)}return r}function rc(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function kl(e,t,n,o,i,s=.1,r={x:0,y:0}){const l=t/(e.width*(1+s)),a=n/(e.height*(1+s)),u=Math.min(l,a),c=Nn(u,o,i),d=e.x+e.width/2,g=e.y+e.height/2,h=t/2-d*c+(r.x??0),y=n/2-g*c+(r.y??0);return{x:h,y,zoom:c}}function Ay(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function lc(e,t){if(!e.parentNode)return!1;const n=t(e.parentNode);return n?n.selected?!0:lc(n,t):!1}function $o(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function Ol(e,t,n){return en?-Nn(Math.abs(e-n),1,t)/t:0}function ac(e,t,n=15,o=40){const i=Ol(e.x,o,t.width-o)*n,s=Ol(e.y,o,t.height-o)*n;return[i,s]}function fs(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let i={};if(typeof t.style=="function"?i={...t.style(t)}:t.style&&(i={...t.style}),i.width=i.width??`${t.dimensions.width}px`,i.height=i.height??`${t.dimensions.height}px`,n>0)if(typeof i.width=="string"){const s=Number(i.width.replace("px",""));i.width=`${s+n}px`}else i.width+=n;if(o>0)if(typeof i.height=="string"){const s=Number(i.height.replace("px",""));i.height=`${s+o}px`}else i.height+=o;if(e.position.x<0){const s=Math.abs(e.position.x);if(t.position.x=t.position.x-s,typeof i.width=="string"){const r=Number(i.width.replace("px",""));i.width=`${r+s}px`}else i.width+=s;e.position.x=0}if(e.position.y<0){const s=Math.abs(e.position.y);if(t.position.y=t.position.y-s,typeof i.height=="string"){const r=Number(i.height.replace("px",""));i.height=`${r+s}px`}else i.height+=s;e.position.y=0}t.dimensions.width=Number(i.width.toString().replace("px","")),t.dimensions.height=Number(i.height.toString().replace("px","")),typeof t.style=="function"?t.style=s=>{const r=t.style;return{...r(s),...i}}:t.style={...t.style,...i}}}}function Rl(e,t){var n,o;const i=e.filter(r=>r.type==="add"||r.type==="remove");for(const r of i)if(r.type==="add")t.findIndex(a=>a.id===r.item.id)===-1&&t.push(r.item);else if(r.type==="remove"){const l=t.findIndex(a=>a.id===r.id);l!==-1&&t.splice(l,1)}const s=t.map(r=>r.id);for(const r of t)for(const l of e)if(l.id===r.id)switch(l.type){case"select":r.selected=l.selected;break;case"position":if(no(r)&&(typeof l.position<"u"&&(r.position=l.position),typeof l.dragging<"u"&&(r.dragging=l.dragging),r.expandParent&&r.parentNode)){const a=t[s.indexOf(r.parentNode)];a&&no(a)&&fs(r,a)}break;case"dimensions":if(no(r)&&(typeof l.dimensions<"u"&&(r.dimensions=l.dimensions),typeof l.updateStyle<"u"&&l.updateStyle&&(r.style={...r.style||{},width:`${(n=l.dimensions)==null?void 0:n.width}px`,height:`${(o=l.dimensions)==null?void 0:o.height}px`}),typeof l.resizing<"u"&&(r.resizing=l.resizing),r.expandParent&&r.parentNode)){const a=t[s.indexOf(r.parentNode)];a&&no(a)&&(!!a.dimensions.width&&!!a.dimensions.height?fs(r,a):ut(()=>{fs(r,a)}))}break}return t}function en(e,t){return{id:e,type:"select",selected:t}}function Vl(e){return{item:e,type:"add"}}function Bl(e){return{id:e,type:"remove"}}function zl(e,t,n,o,i){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:i||null,type:"remove"}}function on(e,t=new Set,n=!1){const o=[];for(const[i,s]of e){const r=t.has(i);!(s.selected===void 0&&!r)&&s.selected!==r&&(n&&(s.selected=r),o.push(en(s.id,r)))}return o}function ne(e){const t=new Set;let n=!1;const o=()=>t.size>0;e&&(n=!0,t.add(e));const i=l=>{t.delete(l)};return{on:l=>{e&&n&&t.delete(e),t.add(l);const a=()=>{i(l),e&&n&&t.add(e)};return Bi(a),{off:a}},off:i,trigger:l=>Promise.all(Array.from(t).map(a=>a(l))),hasListeners:o,fns:t}}function Fl(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Dy(e,t,n,o,i){var s,r;const l=[];for(const a of e)(a.selected||a.id===i)&&(!a.parentNode||!lc(a,o))&&(a.draggable||t&&typeof a.draggable>"u")&&l.push(Yt({id:a.id,position:a.position||{x:0,y:0},distance:{x:n.x-((s=a.computedPosition)==null?void 0:s.x)||0,y:n.y-((r=a.computedPosition)==null?void 0:r.y)||0},from:a.computedPosition,extent:a.extent,parentNode:a.parentNode,dimensions:a.dimensions,expandParent:a.expandParent}));return l}function hs({id:e,dragItems:t,findNode:n}){const o=[];for(const i of t){const s=n(i.id);s&&o.push(s)}return[e?o.find(i=>i.id===e):o[0],o]}function uc(e){if(Array.isArray(e))switch(e.length){case 1:return[e[0],e[0],e[0],e[0]];case 2:return[e[0],e[1],e[0],e[1]];case 3:return[e[0],e[1],e[2],e[1]];case 4:return e;default:return[0,0,0,0]}return[e,e,e,e]}function ky(e,t,n){const[o,i,s,r]=typeof e!="string"?uc(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+r,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-i,n.computedPosition.y+n.dimensions.height-s]]:!1}function Oy(e,t,n,o){let i=e.extent||n;if((i==="parent"||!Array.isArray(i)&&i?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const s=ky(i,e,o);s&&(i=s)}else t(new Fe(ze.NODE_EXTENT_INVALID,e.id)),i=n;else if(Array.isArray(i)){const s=o?.computedPosition.x||0,r=o?.computedPosition.y||0;i=[[i[0][0]+s,i[0][1]+r],[i[1][0]+s,i[1][1]+r]]}else if(i!=="parent"&&i?.range&&Array.isArray(i.range)){const[s,r,l,a]=uc(i.padding),u=o?.computedPosition.x||0,c=o?.computedPosition.y||0;i=[[i.range[0][0]+u+a,i.range[0][1]+c+s],[i.range[1][0]+u-r,i.range[1][1]+c-l]]}return i==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:i}function Ry({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Er(e,t,n,o,i){const s=Ry(e.dimensions,Oy(e,n,o,i)),r=Qu(t,s);return{position:{x:r.x-(i?.computedPosition.x||0),y:r.y-(i?.computedPosition.y||0)},computedPosition:r}}function Kn(e,t,n=le.Left,o=!1){const i=(t?.x??0)+e.computedPosition.x,s=(t?.y??0)+e.computedPosition.y,{width:r,height:l}=t??Fy(e);if(o)return{x:i+r/2,y:s+l/2};switch(t?.position??n){case le.Top:return{x:i+r/2,y:s};case le.Right:return{x:i+r,y:s+l/2};case le.Bottom:return{x:i+r/2,y:s+l};case le.Left:return{x:i,y:s+l/2}}}function Hl(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Vy({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:i,targetHeight:s,width:r,height:l,viewport:a}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+o,t.y+s)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=oc({x:(0-a.x)/a.zoom,y:(0-a.y)/a.zoom,width:r/a.zoom,height:l/a.zoom}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),g=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*g)>0}function By(e,t,n=!1){const o=typeof e.zIndex=="number";let i=o?e.zIndex:0;const s=t(e.source),r=t(e.target);return!s||!r?0:(n&&(i=o?e.zIndex:Math.max(s.computedPosition.z||0,r.computedPosition.z||0)),i)}var ze=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(ze||{});const Ll={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid -Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found -Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent -Node: ${e} -Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing -Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent -Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target -Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing -Edge: ${e} -Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing -Edge: ${e} -Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing -Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same -Edge: ${e} -Source: ${t} -Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing -Edge: ${e} -Source: ${t} -Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed -Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found -Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Fe extends Error{constructor(t,...n){var o;super((o=Ll[t])==null?void 0:o.call(Ll,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Nr(e){return"clientX"in e}function zy(e){return"sourceEvent"in e}function $t(e,t){const n=Nr(e);let o,i;return n?(o=e.clientX,i=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,i=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,i=e.changedTouches[0].clientY):(o=0,i=0),{x:o-(t?.left??0),y:i-(t?.top??0)}}const xi=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Fy(e){var t,n;return{width:((t=e.dimensions)==null?void 0:t.width)??e.width??0,height:((n=e.dimensions)==null?void 0:n.height)??e.height??0}}function Gi(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const Hy=()=>!0;function ps(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Ly(e,t,n){const o=[],i={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const s of t.values())wi(i,bi(s))>0&&o.push(s);return o}const Uy=250;function Gy(e,t,n,o){var i,s;let r=[],l=Number.POSITIVE_INFINITY;const a=Ly(e,n,t+Uy);for(const u of a){const c=[...((i=u.handleBounds)==null?void 0:i.source)??[],...((s=u.handleBounds)==null?void 0:s.target)??[]];for(const d of c){if(o.nodeId===d.nodeId&&o.type===d.type&&o.id===d.id)continue;const{x:g,y:h}=Kn(u,d,d.position,!0),y=Math.sqrt((g-e.x)**2+(h-e.y)**2);y>t||(y1){const u=o.type==="source"?"target":"source";return r.find(c=>c.type===u)??r[0]}return r[0]}function Ul(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:i,fromType:s,doc:r,lib:l,flowId:a,isValidConnection:u=Hy},c,d,g){const h=s==="target",y=t?r.querySelector(`.${l}-flow__handle[data-id="${a}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:b,y:x}=$t(e),C=r.elementFromPoint(b,x),D=C?.classList.contains(`${l}-flow__handle`)?C:y,S={handleDomNode:D,isValid:!1,connection:null,toHandle:null};if(D){const N=cc(void 0,D),F=D.getAttribute("data-nodeid"),j=D.getAttribute("data-handleid"),k=D.classList.contains("connectable"),A=D.classList.contains("connectableend");if(!F||!N)return S;const V={source:h?F:o,sourceHandle:h?j:i,target:h?o:F,targetHandle:h?i:j};S.connection=V;const z=k&&A&&(n===ln.Strict?h&&N==="source"||!h&&N==="target":F!==o||j!==i);S.isValid=z&&u(V,{nodes:d,edges:c,sourceNode:g(o),targetNode:g(F)}),S.toHandle=t}return S}function cc(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Yy(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Ky(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function jy(e,t,n,o,i,s=!1){var r,l,a;const u=o.get(e);if(!u)return null;const c=i===ln.Strict?(r=u.handleBounds)==null?void 0:r[t]:[...((l=u.handleBounds)==null?void 0:l.source)??[],...((a=u.handleBounds)==null?void 0:a.target)??[]],d=(n?c?.find(g=>g.id===n):c?.[0])??null;return d&&s?{...d,...Kn(u,d,d.position,!0)}:d}const Ys={[le.Left]:le.Right,[le.Right]:le.Left,[le.Top]:le.Bottom,[le.Bottom]:le.Top},Xy=["production","prod"];function Yi(e,...t){dc()&&console.warn(`[Vue Flow]: ${e}`,...t)}function dc(){return!Xy.includes("production")}function Gl(e,t,n,o,i){const s=t.querySelectorAll(`.vue-flow__handle.${e}`);return s?.length?Array.from(s).map(r=>{const l=r.getBoundingClientRect();return{id:r.getAttribute("data-handleid"),type:e,nodeId:i,position:r.getAttribute("data-handlepos"),x:(l.left-n.left)/o,y:(l.top-n.top)/o,...Ui(r)}}):null}function Ks(e,t,n,o,i,s=!1,r){i.value=!1,e.selected?(s||e.selected&&t)&&(o([e]),ut(()=>{r.blur()})):n([e])}function Be(e){return typeof ee(e)<"u"}function Wy(e,t,n,o){if(!e||!e.source||!e.target)return n(new Fe(ze.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let i;return an(e)?i=e:i={...e,id:nc(e)},i=ec(i,void 0,o),Iy(i,t)?!1:i}function Zy(e,t,n,o,i){if(!t.source||!t.target)return i(new Fe(ze.EDGE_INVALID,e.id)),!1;if(!n)return i(new Fe(ze.EDGE_NOT_FOUND,e.id)),!1;const{id:s,...r}=e;return{...r,id:o?nc(t):s,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function Yl(e,t,n){const o={},i=[];for(let s=0;sl.id===s.parentNode);s.parentNode&&!r&&n(new Fe(ze.NODE_MISSING_PARENT,s.id,s.parentNode)),(s.parentNode||o[s.id])&&(o[s.id]&&(s.isParent=!0),r&&(r.isParent=!0))}return i}function Kl(e,t,n,o,i,s){let r=i;const l=o.get(r)||new Map;o.set(r,l.set(n,t)),r=`${i}-${e}`;const a=o.get(r)||new Map;if(o.set(r,a.set(n,t)),s){r=`${i}-${e}-${s}`;const u=o.get(r)||new Map;o.set(r,u.set(n,t))}}function gs(e,t,n){e.clear();for(const o of n){const{source:i,target:s,sourceHandle:r=null,targetHandle:l=null}=o,a={edgeId:o.id,source:i,target:s,sourceHandle:r,targetHandle:l},u=`${i}-${r}--${s}-${l}`,c=`${s}-${l}--${i}-${r}`;Kl("source",a,c,e,i,r),Kl("target",a,u,e,s,l)}}function jl(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function vs(e,t,n,o,i,s,r,l){const a=[];for(const u of e){const c=an(u)?u:Wy(u,l,i,s);if(!c)continue;const d=n(c.source),g=n(c.target);if(!d||!g){i(new Fe(ze.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!d){i(new Fe(ze.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!g){i(new Fe(ze.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:l,nodes:r,sourceNode:d,targetNode:g})){i(new Fe(ze.EDGE_INVALID,c.id));continue}const h=o(c.id);a.push({...ec(c,h,s),sourceNode:d,targetNode:g})}return a}const Xl=Symbol("vueFlow"),fc=Symbol("nodeId"),hc=Symbol("nodeRef"),qy=Symbol("edgeId"),Jy=Symbol("edgeRef"),Ki=Symbol("slots");function pc(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:i,nodes:s,nodeExtent:r,nodeDragThreshold:l,viewport:a,autoPanOnNodeDrag:u,autoPanSpeed:c,nodesDraggable:d,panBy:g,findNode:h,multiSelectionActive:y,nodesSelectionActive:b,selectNodesOnDrag:x,removeSelectedElements:C,addSelectedNodes:D,updateNodePositions:S,emits:N}=Re(),{onStart:F,onDrag:j,onStop:k,onClick:A,el:V,disabled:G,id:z,selectable:T,dragHandle:J}=e,E=yo(!1);let U=[],I,B=null,H={x:void 0,y:void 0},X={x:0,y:0},W=null,oe=!1,re=0,he=!1;const Q=t0(),ie=({x:ue,y:_})=>{H={x:ue,y:_};let w=!1;if(U=U.map(f=>{const p={x:ue-f.distance.x,y:_-f.distance.y},{computedPosition:m}=Er(f,n.value?Gi(p,o.value):p,N.error,r.value,f.parentNode?h(f.parentNode):void 0);return w=w||f.position.x!==m.x||f.position.y!==m.y,f.position=m,f}),!!w&&(S(U,!0,!0),E.value=!0,W)){const[f,p]=hs({id:z,dragItems:U,findNode:h});j({event:W,node:f,nodes:p})}},se=()=>{if(!B)return;const[ue,_]=ac(X,B,c.value);if(ue!==0||_!==0){const w={x:(H.x??0)-ue/a.value.zoom,y:(H.y??0)-_/a.value.zoom};g({x:ue,y:_})&&ie(w)}re=requestAnimationFrame(se)},ve=(ue,_)=>{oe=!0;const w=h(z);!x.value&&!y.value&&w&&(w.selected||C()),w&&be(T)&&x.value&&Ks(w,y.value,D,C,b,!1,_);const f=Q(ue.sourceEvent);if(H=f,U=Dy(s.value,d.value,f,h,z),U.length){const[p,m]=hs({id:z,dragItems:U,findNode:h});F({event:ue.sourceEvent,node:p,nodes:m})}},me=(ue,_)=>{var w;ue.sourceEvent.type==="touchmove"&&ue.sourceEvent.touches.length>1||(l.value===0&&ve(ue,_),H=Q(ue.sourceEvent),B=((w=t.value)==null?void 0:w.getBoundingClientRect())||null,X=$t(ue.sourceEvent,B))},de=(ue,_)=>{const w=Q(ue.sourceEvent);if(!he&&oe&&u.value&&(he=!0,se()),!oe){const f=w.xSnapped-(H.x??0),p=w.ySnapped-(H.y??0);Math.sqrt(f*f+p*p)>l.value&&ve(ue,_)}(H.x!==w.xSnapped||H.y!==w.ySnapped)&&U.length&&oe&&(W=ue.sourceEvent,X=$t(ue.sourceEvent,B),ie(w))},ye=ue=>{let _=!1;if(!oe&&!E.value&&!y.value){const w=ue.sourceEvent,f=Q(w),p=f.xSnapped-(H.x??0),m=f.ySnapped-(H.y??0),v=Math.sqrt(p*p+m*m);v!==0&&v<=l.value&&(A?.(w),_=!0)}if(U.length&&!_){S(U,!1,!1);const[w,f]=hs({id:z,dragItems:U,findNode:h});k({event:ue.sourceEvent,node:w,nodes:f})}U=[],E.value=!1,he=!1,oe=!1,H={x:void 0,y:void 0},cancelAnimationFrame(re)};return Se([()=>be(G),V],([ue,_],w,f)=>{if(_){const p=ht(_);ue||(I=Nv().on("start",m=>me(m,_)).on("drag",m=>de(m,_)).on("end",m=>ye(m)).filter(m=>{const v=m.target,M=be(J);return!m.button&&(!i.value||!Fl(v,`.${i.value}`,_)&&(!M||Fl(v,M,_)))}),p.call(I)),f(()=>{p.on(".drag",null),I&&(I.on("start",null),I.on("drag",null),I.on("end",null))})}}),E}function Qy(){return{doubleClick:ne(),click:ne(),mouseEnter:ne(),mouseMove:ne(),mouseLeave:ne(),contextMenu:ne(),updateStart:ne(),update:ne(),updateEnd:ne()}}function e0(e,t){const n=Qy();return n.doubleClick.on(o=>{var i,s;t.edgeDoubleClick(o),(s=(i=e.events)==null?void 0:i.doubleClick)==null||s.call(i,o)}),n.click.on(o=>{var i,s;t.edgeClick(o),(s=(i=e.events)==null?void 0:i.click)==null||s.call(i,o)}),n.mouseEnter.on(o=>{var i,s;t.edgeMouseEnter(o),(s=(i=e.events)==null?void 0:i.mouseEnter)==null||s.call(i,o)}),n.mouseMove.on(o=>{var i,s;t.edgeMouseMove(o),(s=(i=e.events)==null?void 0:i.mouseMove)==null||s.call(i,o)}),n.mouseLeave.on(o=>{var i,s;t.edgeMouseLeave(o),(s=(i=e.events)==null?void 0:i.mouseLeave)==null||s.call(i,o)}),n.contextMenu.on(o=>{var i,s;t.edgeContextMenu(o),(s=(i=e.events)==null?void 0:i.contextMenu)==null||s.call(i,o)}),n.updateStart.on(o=>{var i,s;t.edgeUpdateStart(o),(s=(i=e.events)==null?void 0:i.updateStart)==null||s.call(i,o)}),n.update.on(o=>{var i,s;t.edgeUpdate(o),(s=(i=e.events)==null?void 0:i.update)==null||s.call(i,o)}),n.updateEnd.on(o=>{var i,s;t.edgeUpdateEnd(o),(s=(i=e.events)==null?void 0:i.updateEnd)==null||s.call(i,o)}),Object.entries(n).reduce((o,[i,s])=>(o.emit[i]=s.trigger,o.on[i]=s.on,o),{emit:{},on:{}})}function t0(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Re();return i=>{var s;const r=((s=o.value)==null?void 0:s.getBoundingClientRect())??{left:0,top:0},l=zy(i)?i.sourceEvent:i,{x:a,y:u}=$t(l,r),c=Mo({x:a,y:u},e.value),{x:d,y:g}=n.value?Gi(c,t.value):c;return{xSnapped:d,ySnapped:g,...c}}}function jo(){return!0}function gc({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:i,onEdgeUpdate:s,onEdgeUpdateEnd:r}){const{id:l,vueFlowRef:a,connectionMode:u,connectionRadius:c,connectOnClick:d,connectionClickStartHandle:g,nodesConnectable:h,autoPanOnConnect:y,autoPanSpeed:b,findNode:x,panBy:C,startConnection:D,updateConnection:S,endConnection:N,emits:F,viewport:j,edges:k,nodes:A,isValidConnection:V,nodeLookup:G}=Re();let z=null,T=!1,J=null;function E(I){var B;const H=be(n)==="target",X=Nr(I),W=Dl(I.target);if(X&&I.button===0||!X){let oe=function(Y){f=$t(Y,ue),ie=Gy(Mo(f,j.value,!1,[1,1]),c.value,G.value,v),p||(m(),p=!0);const L=Ul(Y,{handle:ie,connectionMode:u.value,fromNodeId:be(t),fromHandleId:be(e),fromType:H?"target":"source",isValidConnection:Q,doc:W,lib:"vue",flowId:l,nodeLookup:G.value},k.value,A.value,x);J=L.handleDomNode,z=L.connection,T=Ky(!!ie,L.isValid);const K={...P,isValid:T,to:L.toHandle&&T?Gs({x:L.toHandle.x,y:L.toHandle.y},j.value):f,toHandle:L.toHandle,toPosition:T&&L.toHandle?L.toHandle.position:Ys[v.position],toNode:L.toHandle?G.value.get(L.toHandle.nodeId):null};if(!(T&&ie&&P?.toHandle&&K.toHandle&&P.toHandle.type===K.toHandle.type&&P.toHandle.nodeId===K.toHandle.nodeId&&P.toHandle.id===K.toHandle.id&&P.to.x===K.to.x&&P.to.y===K.to.y)){if(S(ie&&T?Gs({x:ie.x,y:ie.y},j.value):f,L.toHandle,Yy(!!ie,T)),P=K,!ie&&!T&&!J)return ps(w);z&&z.source!==z.target&&J&&(ps(w),w=J,J.classList.add("connecting","vue-flow__handle-connecting"),J.classList.toggle("valid",!!T),J.classList.toggle("vue-flow__handle-valid",!!T))}},re=function(Y){(ie||J)&&z&&T&&(s?s(Y,z):F.connect(z)),F.connectEnd(Y),i&&r?.(Y),ps(w),cancelAnimationFrame(se),N(Y),p=!1,T=!1,z=null,J=null,W.removeEventListener("mousemove",oe),W.removeEventListener("mouseup",re),W.removeEventListener("touchmove",oe),W.removeEventListener("touchend",re)};const he=x(be(t));let Q=be(o)||V.value||jo;!Q&&he&&(Q=(H?he.isValidSourcePos:he.isValidTargetPos)||jo);let ie,se=0;const{x:ve,y:me}=$t(I),de=W?.elementFromPoint(ve,me),ye=cc(be(i),de),ue=(B=a.value)==null?void 0:B.getBoundingClientRect();if(!ue||!ye)return;const _=jy(be(t),ye,be(e),G.value,u.value);if(!_)return;let w,f=$t(I,ue),p=!1;const m=()=>{if(!y.value)return;const[Y,L]=ac(f,ue,b.value);C({x:Y,y:L}),se=requestAnimationFrame(m)},v={..._,nodeId:be(t),type:ye,position:_.position},M=G.value.get(be(t)),O={inProgress:!0,isValid:null,from:Kn(M,v,le.Left,!0),fromHandle:v,fromPosition:v.position,fromNode:M,to:f,toHandle:null,toPosition:Ys[v.position],toNode:null};D({nodeId:be(t),id:be(e),type:ye,position:de?.getAttribute("data-handlepos")||le.Top,...f},{x:ve-ue.left,y:me-ue.top}),F.connectStart({event:I,nodeId:be(t),handleId:be(e),handleType:ye});let P=O;W.addEventListener("mousemove",oe),W.addEventListener("mouseup",re),W.addEventListener("touchmove",oe),W.addEventListener("touchend",re)}}function U(I){var B,H;if(!d.value)return;const X=be(n)==="target";if(!g.value){F.clickConnectStart({event:I,nodeId:be(t),handleId:be(e)}),D({nodeId:be(t),type:be(n),id:be(e),position:le.Top,...$t(I)},void 0,!0);return}let W=be(o)||V.value||jo;const oe=x(be(t));if(!W&&oe&&(W=(X?oe.isValidSourcePos:oe.isValidTargetPos)||jo),oe&&(typeof oe.connectable>"u"?h.value:oe.connectable)===!1)return;const re=Dl(I.target),he=Ul(I,{handle:{nodeId:be(t),id:be(e),type:be(n),position:le.Top,...$t(I)},connectionMode:u.value,fromNodeId:g.value.nodeId,fromHandleId:g.value.id??null,fromType:g.value.type,isValidConnection:W,doc:re,lib:"vue",flowId:l,nodeLookup:G.value},k.value,A.value,x),Q=((B=he.connection)==null?void 0:B.source)===((H=he.connection)==null?void 0:H.target);he.isValid&&he.connection&&!Q&&F.connect(he.connection),F.clickConnectEnd(I),N(I,!0)}return{handlePointerDown:E,handleClick:U}}function n0(){return vt(fc,"")}function vc(e){const t=e??n0()??"",n=vt(hc,q(null)),{findNode:o,edges:i,emits:s}=Re(),r=o(t);return r||s.error(new Fe(ze.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:r,parentNode:fe(()=>o(r.parentNode)),connectedEdges:fe(()=>rc([r],i.value))}}function o0(){return{doubleClick:ne(),click:ne(),mouseEnter:ne(),mouseMove:ne(),mouseLeave:ne(),contextMenu:ne(),dragStart:ne(),drag:ne(),dragStop:ne()}}function i0(e,t){const n=o0();return n.doubleClick.on(o=>{var i,s;t.nodeDoubleClick(o),(s=(i=e.events)==null?void 0:i.doubleClick)==null||s.call(i,o)}),n.click.on(o=>{var i,s;t.nodeClick(o),(s=(i=e.events)==null?void 0:i.click)==null||s.call(i,o)}),n.mouseEnter.on(o=>{var i,s;t.nodeMouseEnter(o),(s=(i=e.events)==null?void 0:i.mouseEnter)==null||s.call(i,o)}),n.mouseMove.on(o=>{var i,s;t.nodeMouseMove(o),(s=(i=e.events)==null?void 0:i.mouseMove)==null||s.call(i,o)}),n.mouseLeave.on(o=>{var i,s;t.nodeMouseLeave(o),(s=(i=e.events)==null?void 0:i.mouseLeave)==null||s.call(i,o)}),n.contextMenu.on(o=>{var i,s;t.nodeContextMenu(o),(s=(i=e.events)==null?void 0:i.contextMenu)==null||s.call(i,o)}),n.dragStart.on(o=>{var i,s;t.nodeDragStart(o),(s=(i=e.events)==null?void 0:i.dragStart)==null||s.call(i,o)}),n.drag.on(o=>{var i,s;t.nodeDrag(o),(s=(i=e.events)==null?void 0:i.drag)==null||s.call(i,o)}),n.dragStop.on(o=>{var i,s;t.nodeDragStop(o),(s=(i=e.events)==null?void 0:i.dragStop)==null||s.call(i,o)}),Object.entries(n).reduce((o,[i,s])=>(o.emit[i]=s.trigger,o.on[i]=s.on,o),{emit:{},on:{}})}function mc(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:i,snapToGrid:s,nodesDraggable:r,emits:l}=Re();return(a,u=!1)=>{const c=s.value?i.value[0]:5,d=s.value?i.value[1]:5,g=u?4:1,h=a.x*c*g,y=a.y*d*g,b=[];for(const x of e.value)if(x.draggable||r&&typeof x.draggable>"u"){const C={x:x.computedPosition.x+h,y:x.computedPosition.y+y},{computedPosition:D}=Er(x,C,l.error,t.value,x.parentNode?o(x.parentNode):void 0);b.push({id:x.id,position:D,from:x.position,distance:{x:a.x,y:a.y},dimensions:x.dimensions})}n(b,!0,!1)}}const ms=.1,s0=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function Jt(){return Yi("Viewport not initialized yet."),Promise.resolve(!1)}const r0={zoomIn:Jt,zoomOut:Jt,zoomTo:Jt,fitView:Jt,setCenter:Jt,fitBounds:Jt,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:Jt,setTransform:Jt,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function l0(e){function t(o,i){return new Promise(s=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?ho:ti).scaleBy(ys(e.d3Selection,i?.duration,i?.ease,()=>{s(!0)}),o):s(!1)})}function n(o,i,s,r){return new Promise(l=>{var a;const{x:u,y:c}=Qu({x:-o,y:-i},e.translateExtent),d=Yn.translate(-u,-c).scale(s);e.d3Selection&&e.d3Zoom?(a=e.d3Zoom)==null||a.interpolate(r?.interpolate==="linear"?ho:ti).transform(ys(e.d3Selection,r?.duration,r?.ease,()=>{l(!0)}),d):l(!1)})}return fe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:i=>t(1.2,i),zoomOut:i=>t(1/1.2,i),zoomTo:(i,s)=>new Promise(r=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(s?.interpolate==="linear"?ho:ti).scaleTo(ys(e.d3Selection,s?.duration,s?.ease,()=>{r(!0)}),i):r(!1)}),setViewport:(i,s)=>n(i.x,i.y,i.zoom,s),setTransform:(i,s)=>n(i.x,i.y,i.zoom,s),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(i={padding:ms,includeHiddenNodes:!1,duration:0})=>{var s,r;const l=[];for(const g of e.nodes)g.dimensions.width&&g.dimensions.height&&(i?.includeHiddenNodes||!g.hidden)&&(!((s=i.nodes)!=null&&s.length)||(r=i.nodes)!=null&&r.length&&i.nodes.includes(g.id))&&l.push(g);if(!l.length)return Promise.resolve(!1);const a=ic(l),{x:u,y:c,zoom:d}=kl(a,e.dimensions.width,e.dimensions.height,i.minZoom??e.minZoom,i.maxZoom??e.maxZoom,i.padding??ms,i.offset);return n(u,c,d,i)},setCenter:(i,s,r)=>{const l=typeof r?.zoom<"u"?r.zoom:e.maxZoom,a=e.dimensions.width/2-i*l,u=e.dimensions.height/2-s*l;return n(a,u,l,r)},fitBounds:(i,s={padding:ms})=>{const{x:r,y:l,zoom:a}=kl(i,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,s.padding);return n(r,l,a,s)},project:i=>Mo(i,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:i=>{if(e.vueFlowRef){const{x:s,y:r}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x-s,y:i.y-r};return Mo(l,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:i=>{if(e.vueFlowRef){const{x:s,y:r}=e.vueFlowRef.getBoundingClientRect(),l={x:i.x+s,y:i.y+r};return Gs(l,e.viewport)}return{x:0,y:0}}}:r0)}function ys(e,t=0,n=s0,o=()=>{}){const i=typeof t=="number"&&t>0;return i||o(),i?e.transition().duration(t).ease(n).on("end",o):e}function a0(e,t,n){const o=$i(!0);return o.run(()=>{const i=()=>{o.run(()=>{let b,x,C=!!(n.nodes.value.length||n.edges.value.length);b=In([e.modelValue,()=>{var D,S;return(S=(D=e.modelValue)==null?void 0:D.value)==null?void 0:S.length}],([D])=>{D&&Array.isArray(D)&&(x?.pause(),n.setElements(D),!x&&!C&&D.length?C=!0:x?.resume())}),x=In([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([D,S])=>{var N;(N=e.modelValue)!=null&&N.value&&Array.isArray(e.modelValue.value)&&(b?.pause(),e.modelValue.value=[...D,...S],ut(()=>{b?.resume()}))},{immediate:C}),io(()=>{b?.stop(),x?.stop()})})},s=()=>{o.run(()=>{let b,x,C=!!n.nodes.value.length;b=In([e.nodes,()=>{var D,S;return(S=(D=e.nodes)==null?void 0:D.value)==null?void 0:S.length}],([D])=>{D&&Array.isArray(D)&&(x?.pause(),n.setNodes(D),!x&&!C&&D.length?C=!0:x?.resume())}),x=In([n.nodes,()=>n.nodes.value.length],([D])=>{var S;(S=e.nodes)!=null&&S.value&&Array.isArray(e.nodes.value)&&(b?.pause(),e.nodes.value=[...D],ut(()=>{b?.resume()}))},{immediate:C}),io(()=>{b?.stop(),x?.stop()})})},r=()=>{o.run(()=>{let b,x,C=!!n.edges.value.length;b=In([e.edges,()=>{var D,S;return(S=(D=e.edges)==null?void 0:D.value)==null?void 0:S.length}],([D])=>{D&&Array.isArray(D)&&(x?.pause(),n.setEdges(D),!x&&!C&&D.length?C=!0:x?.resume())}),x=In([n.edges,()=>n.edges.value.length],([D])=>{var S;(S=e.edges)!=null&&S.value&&Array.isArray(e.edges.value)&&(b?.pause(),e.edges.value=[...D],ut(()=>{b?.resume()}))},{immediate:C}),io(()=>{b?.stop(),x?.stop()})})},l=()=>{o.run(()=>{Se(()=>t.maxZoom,()=>{t.maxZoom&&Be(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},a=()=>{o.run(()=>{Se(()=>t.minZoom,()=>{t.minZoom&&Be(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{Se(()=>t.translateExtent,()=>{t.translateExtent&&Be(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{Se(()=>t.nodeExtent,()=>{t.nodeExtent&&Be(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{Se(()=>t.applyDefault,()=>{Be(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},g=()=>{o.run(()=>{const b=async x=>{let C=x;typeof t.autoConnect=="function"&&(C=await t.autoConnect(x)),C!==!1&&n.addEdges([C])};Se(()=>t.autoConnect,()=>{Be(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),Se(n.autoConnect,(x,C,D)=>{x?n.onConnect(b):n.hooks.value.connect.off(b),D(()=>{n.hooks.value.connect.off(b)})},{immediate:!0})})},h=()=>{const b=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const x of Object.keys(t)){const C=x;if(!b.includes(C)){const D=ke(()=>t[C]),S=n[C];De(S)&&o.run(()=>{Se(D,N=>{Be(N)&&(S.value=N)},{immediate:!0})})}}};(()=>{i(),s(),r(),a(),l(),u(),c(),d(),g(),h()})()}),()=>o.stop()}function u0(){return{edgesChange:ne(),nodesChange:ne(),nodeDoubleClick:ne(),nodeClick:ne(),nodeMouseEnter:ne(),nodeMouseMove:ne(),nodeMouseLeave:ne(),nodeContextMenu:ne(),nodeDragStart:ne(),nodeDrag:ne(),nodeDragStop:ne(),nodesInitialized:ne(),miniMapNodeClick:ne(),miniMapNodeDoubleClick:ne(),miniMapNodeMouseEnter:ne(),miniMapNodeMouseMove:ne(),miniMapNodeMouseLeave:ne(),connect:ne(),connectStart:ne(),connectEnd:ne(),clickConnectStart:ne(),clickConnectEnd:ne(),paneReady:ne(),init:ne(),move:ne(),moveStart:ne(),moveEnd:ne(),selectionDragStart:ne(),selectionDrag:ne(),selectionDragStop:ne(),selectionContextMenu:ne(),selectionStart:ne(),selectionEnd:ne(),viewportChangeStart:ne(),viewportChange:ne(),viewportChangeEnd:ne(),paneScroll:ne(),paneClick:ne(),paneContextMenu:ne(),paneMouseEnter:ne(),paneMouseMove:ne(),paneMouseLeave:ne(),edgeContextMenu:ne(),edgeMouseEnter:ne(),edgeMouseMove:ne(),edgeMouseLeave:ne(),edgeDoubleClick:ne(),edgeClick:ne(),edgeUpdateStart:ne(),edgeUpdate:ne(),edgeUpdateEnd:ne(),updateNodeInternals:ne(),error:ne(e=>Yi(e.message))}}function c0(e,t){Va(()=>{for(const[n,o]of Object.entries(t.value)){const i=s=>{e(n,s)};o.fns.add(i),Bi(()=>{o.off(i)})}})}function yc(){return{vueFlowRef:null,viewportRef:null,nodes:[],edges:[],connectionLookup:new Map,nodeTypes:{},edgeTypes:{},initialized:!1,dimensions:{width:0,height:0},viewport:{x:0,y:0,zoom:1},d3Zoom:null,d3Selection:null,d3ZoomHandler:null,minZoom:.5,maxZoom:2,translateExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nodeExtent:[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],selectionMode:Sr.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:po.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:gn.Bezier,style:{}},connectionMode:ln.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:xi()?"Meta":"Control",zoomActivationKeyCode:xi()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:u0(),applyDefault:!0,autoConnect:!1,fitViewOnInit:!1,fitViewOnInitDone:!1,noDragClassName:"nodrag",noWheelClassName:"nowheel",noPanClassName:"nopan",defaultEdgeOptions:void 0,elevateEdgesOnSelect:!1,elevateNodesOnSelect:!0,autoPanOnNodeDrag:!0,autoPanOnConnect:!0,autoPanSpeed:15,disableKeyboardA11y:!1,ariaLiveMessage:""}}const d0=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function f0(e,t,n){const o=l0(e),i=f=>{const p=f??[];e.hooks.updateNodeInternals.trigger(p)},s=f=>$y(f,e.nodes,e.edges),r=f=>My(f,e.nodes,e.edges),l=f=>rc(f,e.edges),a=({id:f,type:p,nodeId:m})=>{var v;return Array.from(((v=e.connectionLookup.get(`${m}-${p}-${f??null}`))==null?void 0:v.values())??[])},u=f=>{if(f)return t.value.get(f)},c=f=>{if(f)return n.value.get(f)},d=(f,p,m)=>{var v,M;const R=[];for(const O of f){const P={id:O.id,type:"position",dragging:m,from:O.from};if(p&&(P.position=O.position,O.parentNode)){const Y=u(O.parentNode);P.position={x:P.position.x-(((v=Y?.computedPosition)==null?void 0:v.x)??0),y:P.position.y-(((M=Y?.computedPosition)==null?void 0:M.y)??0)}}R.push(P)}R?.length&&e.hooks.nodesChange.trigger(R)},g=f=>{if(!e.vueFlowRef)return;const p=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!p)return;const m=window.getComputedStyle(p),{m22:v}=new window.DOMMatrixReadOnly(m.transform),M=[];for(const R of f){const O=R,P=u(O.id);if(P){const Y=Ui(O.nodeElement);if(!!(Y.width&&Y.height&&(P.dimensions.width!==Y.width||P.dimensions.height!==Y.height||O.forceUpdate))){const K=O.nodeElement.getBoundingClientRect();P.dimensions=Y,P.handleBounds.source=Gl("source",O.nodeElement,K,v,P.id),P.handleBounds.target=Gl("target",O.nodeElement,K,v,P.id),M.push({id:P.id,type:"dimensions",dimensions:Y})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),M.length&&e.hooks.nodesChange.trigger(M)},h=(f,p)=>{const m=new Set,v=new Set;for(const O of f)wn(O)?m.add(O.id):an(O)&&v.add(O.id);const M=on(t.value,m,!0),R=on(n.value,v);if(e.multiSelectionActive){for(const O of m)M.push(en(O,p));for(const O of v)R.push(en(O,p))}M.length&&e.hooks.nodesChange.trigger(M),R.length&&e.hooks.edgesChange.trigger(R)},y=f=>{if(e.multiSelectionActive){const p=f.map(m=>en(m.id,!0));e.hooks.nodesChange.trigger(p);return}e.hooks.nodesChange.trigger(on(t.value,new Set(f.map(p=>p.id)),!0)),e.hooks.edgesChange.trigger(on(n.value))},b=f=>{if(e.multiSelectionActive){const p=f.map(m=>en(m.id,!0));e.hooks.edgesChange.trigger(p);return}e.hooks.edgesChange.trigger(on(n.value,new Set(f.map(p=>p.id)))),e.hooks.nodesChange.trigger(on(t.value,new Set,!0))},x=f=>{h(f,!0)},C=f=>{const m=(f||e.nodes).map(v=>(v.selected=!1,en(v.id,!1)));e.hooks.nodesChange.trigger(m)},D=f=>{const m=(f||e.edges).map(v=>(v.selected=!1,en(v.id,!1)));e.hooks.edgesChange.trigger(m)},S=f=>{if(!f||!f.length)return h([],!1);const p=f.reduce((m,v)=>{const M=en(v.id,!1);return wn(v)?m.nodes.push(M):m.edges.push(M),m},{nodes:[],edges:[]});p.nodes.length&&e.hooks.nodesChange.trigger(p.nodes),p.edges.length&&e.hooks.edgesChange.trigger(p.edges)},N=f=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([f,e.maxZoom]),e.minZoom=f},F=f=>{var p;(p=e.d3Zoom)==null||p.scaleExtent([e.minZoom,f]),e.maxZoom=f},j=f=>{var p;(p=e.d3Zoom)==null||p.translateExtent(f),e.translateExtent=f},k=f=>{e.nodeExtent=f,i()},A=f=>{var p;(p=e.d3Zoom)==null||p.clickDistance(f)},V=f=>{e.nodesDraggable=f,e.nodesConnectable=f,e.elementsSelectable=f},G=f=>{const p=f instanceof Function?f(e.nodes):f;!e.initialized&&!p.length||(e.nodes=Yl(p,u,e.hooks.error.trigger))},z=f=>{const p=f instanceof Function?f(e.edges):f;if(!e.initialized&&!p.length)return;const m=vs(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);gs(e.connectionLookup,n.value,m),e.edges=m},T=f=>{const p=f instanceof Function?f([...e.nodes,...e.edges]):f;!e.initialized&&!p.length||(G(p.filter(wn)),z(p.filter(an)))},J=f=>{let p=f instanceof Function?f(e.nodes):f;p=Array.isArray(p)?p:[p];const m=Yl(p,u,e.hooks.error.trigger),v=[];for(const M of m)v.push(Vl(M));v.length&&e.hooks.nodesChange.trigger(v)},E=f=>{let p=f instanceof Function?f(e.edges):f;p=Array.isArray(p)?p:[p];const m=vs(p,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),v=[];for(const M of m)v.push(Vl(M));v.length&&e.hooks.edgesChange.trigger(v)},U=(f,p=!0,m=!1)=>{const v=f instanceof Function?f(e.nodes):f,M=Array.isArray(v)?v:[v],R=[],O=[];function P(L){const K=l(L);for(const te of K)(!Be(te.deletable)||te.deletable)&&O.push(zl(te.id,te.source,te.target,te.sourceHandle,te.targetHandle))}function Y(L){const K=[];for(const te of e.nodes)te.parentNode===L&&K.push(te);if(K.length){for(const te of K)R.push(Bl(te.id));p&&P(K);for(const te of K)Y(te.id)}}for(const L of M){const K=typeof L=="string"?u(L):L;K&&(Be(K.deletable)&&!K.deletable||(R.push(Bl(K.id)),p&&P([K]),m&&Y(K.id)))}O.length&&e.hooks.edgesChange.trigger(O),R.length&&e.hooks.nodesChange.trigger(R)},I=f=>{const p=f instanceof Function?f(e.edges):f,m=Array.isArray(p)?p:[p],v=[];for(const M of m){const R=typeof M=="string"?c(M):M;R&&(Be(R.deletable)&&!R.deletable||v.push(zl(typeof M=="string"?M:M.id,R.source,R.target,R.sourceHandle,R.targetHandle)))}e.hooks.edgesChange.trigger(v)},B=(f,p,m=!0)=>{const v=c(f.id);if(!v)return!1;const M=e.edges.indexOf(v),R=Zy(f,p,v,m,e.hooks.error.trigger);if(R){const[O]=vs([R],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((P,Y)=>Y===M?O:P),gs(e.connectionLookup,n.value,[O]),O}return!1},H=(f,p,m={replace:!1})=>{const v=c(f);if(!v)return;const M=typeof p=="function"?p(v):p;v.data=m.replace?M:{...v.data,...M}},X=f=>Rl(f,e.nodes),W=f=>{const p=Rl(f,e.edges);return gs(e.connectionLookup,n.value,p),p},oe=(f,p,m={replace:!1})=>{const v=u(f);if(!v)return;const M=typeof p=="function"?p(v):p;m.replace?e.nodes.splice(e.nodes.indexOf(v),1,M):Object.assign(v,M)},re=(f,p,m={replace:!1})=>{const v=u(f);if(!v)return;const M=typeof p=="function"?p(v):p;v.data=m.replace?M:{...v.data,...M}},he=(f,p,m=!1)=>{m?e.connectionClickStartHandle=f:e.connectionStartHandle=f,e.connectionEndHandle=null,e.connectionStatus=null,p&&(e.connectionPosition=p)},Q=(f,p=null,m=null)=>{e.connectionStartHandle&&(e.connectionPosition=f,e.connectionEndHandle=p,e.connectionStatus=m)},ie=(f,p)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,p?e.connectionClickStartHandle=null:e.connectionStartHandle=null},se=f=>{const p=Ny(f),m=p?null:no(f)?f:u(f.id);return!p&&!m?[null,null,p]:[p?f:bi(m),m,p]},ve=(f,p=!0,m=e.nodes)=>{const[v,M,R]=se(f);if(!v)return[];const O=[];for(const P of m||e.nodes){if(!R&&(P.id===M.id||!P.computedPosition))continue;const Y=bi(P),L=wi(Y,v);(p&&L>0||L>=Number(v.width)*Number(v.height))&&O.push(P)}return O},me=(f,p,m=!0)=>{const[v]=se(f);if(!v)return!1;const M=wi(v,p);return m&&M>0||M>=Number(v.width)*Number(v.height)},de=f=>{const{viewport:p,dimensions:m,d3Zoom:v,d3Selection:M,translateExtent:R}=e;if(!v||!M||!f.x&&!f.y)return!1;const O=Yn.translate(p.x+f.x,p.y+f.y).scale(p.zoom),P=[[0,0],[m.width,m.height]],Y=v.constrain()(O,P,R),L=e.viewport.x!==Y.x||e.viewport.y!==Y.y||e.viewport.zoom!==Y.k;return v.transform(M,Y),L},ye=f=>{const p=f instanceof Function?f(e):f,m=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Be(p.defaultEdgeOptions)&&(e.defaultEdgeOptions=p.defaultEdgeOptions);const v=p.modelValue||p.nodes||p.edges?[]:void 0;v&&(p.modelValue&&v.push(...p.modelValue),p.nodes&&v.push(...p.nodes),p.edges&&v.push(...p.edges),T(v));const M=()=>{Be(p.maxZoom)&&F(p.maxZoom),Be(p.minZoom)&&N(p.minZoom),Be(p.translateExtent)&&j(p.translateExtent)};for(const R of Object.keys(p)){const O=R,P=p[O];![...d0,...m].includes(O)&&Be(P)&&(e[O]=P)}Ds(()=>e.d3Zoom).not.toBeNull().then(M),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:g,setElements:T,setNodes:G,setEdges:z,addNodes:J,addEdges:E,removeNodes:U,removeEdges:I,findNode:u,findEdge:c,updateEdge:B,updateEdgeData:H,updateNode:oe,updateNodeData:re,applyEdgeChanges:W,applyNodeChanges:X,addSelectedElements:x,addSelectedNodes:y,addSelectedEdges:b,setMinZoom:N,setMaxZoom:F,setTranslateExtent:j,setNodeExtent:k,setPaneClickDistance:A,removeSelectedElements:S,removeSelectedNodes:C,removeSelectedEdges:D,startConnection:he,updateConnection:Q,endConnection:ie,setInteractive:V,setState:ye,getIntersectingNodes:ve,getIncomers:s,getOutgoers:r,getConnectedEdges:l,getHandleConnections:a,isNodeIntersecting:me,panBy:de,fitView:f=>o.value.fitView(f),zoomIn:f=>o.value.zoomIn(f),zoomOut:f=>o.value.zoomOut(f),zoomTo:(f,p)=>o.value.zoomTo(f,p),setViewport:(f,p)=>o.value.setViewport(f,p),setTransform:(f,p)=>o.value.setTransform(f,p),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(f,p,m)=>o.value.setCenter(f,p,m),fitBounds:(f,p)=>o.value.fitBounds(f,p),project:f=>o.value.project(f),screenToFlowCoordinate:f=>o.value.screenToFlowCoordinate(f),flowToScreenCoordinate:f=>o.value.flowToScreenCoordinate(f),toObject:()=>{const f=[],p=[];for(const m of e.nodes){const{computedPosition:v,handleBounds:M,selected:R,dimensions:O,isParent:P,resizing:Y,dragging:L,events:K,...te}=m;f.push(te)}for(const m of e.edges){const{selected:v,sourceNode:M,targetNode:R,events:O,...P}=m;p.push(P)}return JSON.parse(JSON.stringify({nodes:f,edges:p,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:f=>new Promise(p=>{const{nodes:m,edges:v,position:M,zoom:R,viewport:O}=f;if(m&&G(m),v&&z(v),O?.x&&O?.y||M){const P=O?.x||M[0],Y=O?.y||M[1],L=O?.zoom||R||e.viewport.zoom;return Ds(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:P,y:Y,zoom:L}).then(()=>{p(!0)})})}else p(!0)}),updateNodeInternals:i,viewportHelper:o,$reset:()=>{const f=yc();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const p=Yn.translate(f.defaultViewport.x??0,f.defaultViewport.y??0).scale(Nn(f.defaultViewport.zoom??1,f.minZoom,f.maxZoom)),m=e.viewportRef.getBoundingClientRect(),v=[[0,0],[m.width,m.height]],M=e.d3Zoom.constrain()(p,v,f.translateExtent);e.d3Zoom.transform(e.d3Selection,M)}ye(f)},$destroy:()=>{}}}const h0=["data-id","data-handleid","data-nodeid","data-handlepos"],p0={name:"Handle",compatConfig:{MODE:3}},Si=_e({...p0,props:{id:{default:null},type:{},position:{default:()=>le.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=Dd(e,["position","connectable","connectableStart","connectableEnd","id"]),o=ke(()=>n.type??"source"),i=ke(()=>n.isValidConnection??null),{id:s,connectionStartHandle:r,connectionClickStartHandle:l,connectionEndHandle:a,vueFlowRef:u,nodesConnectable:c,noDragClassName:d,noPanClassName:g}=Re(),{id:h,node:y,nodeEl:b,connectedEdges:x}=vc(),C=q(),D=ke(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),S=ke(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),N=ke(()=>{var z,T,J,E,U,I;return((z=r.value)==null?void 0:z.nodeId)===h&&((T=r.value)==null?void 0:T.id)===e.id&&((J=r.value)==null?void 0:J.type)===o.value||((E=a.value)==null?void 0:E.nodeId)===h&&((U=a.value)==null?void 0:U.id)===e.id&&((I=a.value)==null?void 0:I.type)===o.value}),F=ke(()=>{var z,T,J;return((z=l.value)==null?void 0:z.nodeId)===h&&((T=l.value)==null?void 0:T.id)===e.id&&((J=l.value)==null?void 0:J.type)===o.value}),{handlePointerDown:j,handleClick:k}=gc({nodeId:h,handleId:e.id,isValidConnection:i,type:o}),A=fe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!x.value.some(z=>{const T=z[`${o.value}Handle`];return z[o.value]!==h?!1:T?T===e.id:!0}):typeof e.connectable=="number"?x.value.filter(z=>{const T=z[`${o.value}Handle`];return z[o.value]!==h?!1:T?T===e.id:!0}).length{var z;if(!y.dimensions.width||!y.dimensions.height)return;const T=(z=y.handleBounds[o.value])==null?void 0:z.find(X=>X.id===e.id);if(!u.value||T)return;const J=u.value.querySelector(".vue-flow__transformationpane");if(!b.value||!C.value||!J||!e.id)return;const E=b.value.getBoundingClientRect(),U=C.value.getBoundingClientRect(),I=window.getComputedStyle(J),{m22:B}=new window.DOMMatrixReadOnly(I.transform),H={id:e.id,position:e.position,x:(U.left-E.left)/B,y:(U.top-E.top)/B,type:o.value,nodeId:h,...Ui(C.value)};y.handleBounds[o.value]=[...y.handleBounds[o.value]??[],H]});function V(z){const T=Nr(z);A.value&&D.value&&(T&&z.button===0||!T)&&j(z)}function G(z){!h||!l.value&&!D.value||A.value&&k(z)}return t({handleClick:k,handlePointerDown:j,onClick:G,onPointerDown:V}),(z,T)=>(Z(),ae("div",{ref_key:"handle",ref:C,"data-id":`${ee(s)}-${ee(h)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":ee(h),"data-handlepos":z.position,class:tt(["vue-flow__handle",[`vue-flow__handle-${z.position}`,`vue-flow__handle-${e.id}`,ee(d),ee(g),o.value,{connectable:A.value,connecting:F.value,connectablestart:D.value,connectableend:S.value,connectionindicator:A.value&&(D.value&&!N.value||S.value&&N.value)}]]),onMousedown:V,onTouchstartPassive:V,onClick:G},[Tt(z.$slots,"default",{id:z.id})],42,h0))}}),ji=function({sourcePosition:e=le.Bottom,targetPosition:t=le.Top,label:n,connectable:o=!0,isValidTargetPos:i,isValidSourcePos:s,data:r}){const l=r.label??n;return[$e(Si,{type:"target",position:t,connectable:o,isValidConnection:i}),typeof l!="string"&&l?$e(l):$e(Me,[l]),$e(Si,{type:"source",position:e,connectable:o,isValidConnection:s})]};ji.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"];ji.inheritAttrs=!1;ji.compatConfig={MODE:3};const g0=ji,Xi=function({targetPosition:e=le.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:i}){const s=i.label??t;return[$e(Si,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof s!="string"&&s?$e(s):$e(Me,[s])]};Xi.props=["targetPosition","label","isValidTargetPos","connectable","data"];Xi.inheritAttrs=!1;Xi.compatConfig={MODE:3};const v0=Xi,Wi=function({sourcePosition:e=le.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:i}){const s=i.label??t;return[typeof s!="string"&&s?$e(s):$e(Me,[s]),$e(Si,{type:"source",position:e,connectable:n,isValidConnection:o})]};Wi.props=["sourcePosition","label","isValidSourcePos","connectable","data"];Wi.inheritAttrs=!1;Wi.compatConfig={MODE:3};const m0=Wi,y0=["transform"],_0=["width","height","x","y","rx","ry"],b0=["y"],w0={name:"EdgeText",compatConfig:{MODE:3}},x0=_e({...w0,props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=q({x:0,y:0,width:0,height:0}),n=q(null),o=fe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);ft(i),Se([()=>e.x,()=>e.y,n,()=>e.label],i);function i(){if(!n.value)return;const s=n.value.getBBox();(s.width!==t.value.width||s.height!==t.value.height)&&(t.value=s)}return(s,r)=>(Z(),ae("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[s.labelShowBg?(Z(),ae("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*s.labelBgPadding[0]}px`,height:`${t.value.height+2*s.labelBgPadding[1]}px`,x:-s.labelBgPadding[0],y:-s.labelBgPadding[1],style:dt(s.labelBgStyle),rx:s.labelBgBorderRadius,ry:s.labelBgBorderRadius},null,12,_0)):Oe("",!0),$("text",Do(s.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:s.labelStyle}),[Tt(s.$slots,"default",{},()=>[typeof s.label!="string"?(Z(),Ue(cr(s.label),{key:0})):(Z(),ae(Me,{key:1},[We(je(s.label),1)],64))])],16,b0)],8,y0))}}),S0=["id","d","marker-end","marker-start"],E0=["d","stroke-width"],N0={name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},Zi=_e({...N0,props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=q(null),o=q(null),i=q(null),s=Ad();return t({pathEl:n,interactionEl:o,labelEl:i}),(r,l)=>(Z(),ae(Me,null,[$("path",Do(ee(s),{id:r.id,ref_key:"pathEl",ref:n,d:r.path,class:"vue-flow__edge-path","marker-end":r.markerEnd,"marker-start":r.markerStart}),null,16,S0),r.interactionWidth?(Z(),ae("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:r.path,"stroke-width":r.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,E0)):Oe("",!0),r.label&&r.labelX&&r.labelY?(Z(),Ue(x0,{key:1,ref_key:"labelEl",ref:i,x:r.labelX,y:r.labelY,label:r.label,"label-show-bg":r.labelShowBg,"label-bg-style":r.labelBgStyle,"label-bg-padding":r.labelBgPadding,"label-bg-border-radius":r.labelBgBorderRadius,"label-style":r.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Oe("",!0)],64))}});function _c({sourceX:e,sourceY:t,targetX:n,targetY:o}){const i=Math.abs(n-e)/2,s=n=0?.5*e:t*25*Math.sqrt(-e)}function Wl({pos:e,x1:t,y1:n,x2:o,y2:i,c:s}){let r,l;switch(e){case le.Left:r=t-Xo(t-o,s),l=n;break;case le.Right:r=t+Xo(o-t,s),l=n;break;case le.Top:r=t,l=n-Xo(n-i,s);break;case le.Bottom:r=t,l=n+Xo(i-n,s);break}return[r,l]}function wc(e){const{sourceX:t,sourceY:n,sourcePosition:o=le.Bottom,targetX:i,targetY:s,targetPosition:r=le.Top,curvature:l=.25}=e,[a,u]=Wl({pos:o,x1:t,y1:n,x2:i,y2:s,c:l}),[c,d]=Wl({pos:r,x1:i,y1:s,x2:t,y2:n,c:l}),[g,h,y,b]=bc({sourceX:t,sourceY:n,targetX:i,targetY:s,sourceControlX:a,sourceControlY:u,targetControlX:c,targetControlY:d});return[`M${t},${n} C${a},${u} ${c},${d} ${i},${s}`,g,h,y,b]}function Zl({pos:e,x1:t,y1:n,x2:o,y2:i}){let s,r;switch(e){case le.Left:case le.Right:s=.5*(t+o),r=n;break;case le.Top:case le.Bottom:s=t,r=.5*(n+i);break}return[s,r]}function xc(e){const{sourceX:t,sourceY:n,sourcePosition:o=le.Bottom,targetX:i,targetY:s,targetPosition:r=le.Top}=e,[l,a]=Zl({pos:o,x1:t,y1:n,x2:i,y2:s}),[u,c]=Zl({pos:r,x1:i,y1:s,x2:t,y2:n}),[d,g,h,y]=bc({sourceX:t,sourceY:n,targetX:i,targetY:s,sourceControlX:l,sourceControlY:a,targetControlX:u,targetControlY:c});return[`M${t},${n} C${l},${a} ${u},${c} ${i},${s}`,d,g,h,y]}const ql={[le.Left]:{x:-1,y:0},[le.Right]:{x:1,y:0},[le.Top]:{x:0,y:-1},[le.Bottom]:{x:0,y:1}};function C0({source:e,sourcePosition:t=le.Bottom,target:n}){return t===le.Left||t===le.Right?e.xe[d]?-1:1)*E:C[d]=(u[d]>n[d]?-1:1)*E}}if(t!==o){const J=d==="x"?"y":"x",E=r[d]===l[J],U=a[J]>u[J],I=a[J]=T?(y=(V.x+G.x)/2,b=h[0].y):(y=h[0].x,b=(V.y+G.y)/2)}return[[e,{x:a.x+x.x,y:a.y+x.y},...h,{x:u.x+C.x,y:u.y+C.y},n],y,b,N,F]}function $0(e,t,n,o){const i=Math.min(Jl(e,t)/2,Jl(t,n)/2,o),{x:s,y:r}=t;if(e.x===s&&s===n.x||e.y===r&&r===n.y)return`L${s} ${r}`;if(e.y===r){const u=e.x{let N;return S>0&&S{const[n,o,i]=I0(e);return $e(Zi,{path:n,labelX:o,labelY:i,...t,...e})}}}),P0=T0,A0=_e({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=js({...e,sourcePosition:e.sourcePosition??le.Bottom,targetPosition:e.targetPosition??le.Top});return $e(Zi,{path:n,labelX:o,labelY:i,...t,...e})}}}),Sc=A0,D0=_e({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>$e(Sc,{...e,...t,borderRadius:0})}}),k0=D0,O0=_e({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=wc({...e,sourcePosition:e.sourcePosition??le.Bottom,targetPosition:e.targetPosition??le.Top});return $e(Zi,{path:n,labelX:o,labelY:i,...t,...e})}}}),R0=O0,V0=_e({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,i]=xc({...e,sourcePosition:e.sourcePosition??le.Bottom,targetPosition:e.targetPosition??le.Top});return $e(Zi,{path:n,labelX:o,labelY:i,...t,...e})}}}),B0=V0,z0={input:m0,default:g0,output:v0},F0={default:R0,straight:P0,step:k0,smoothstep:Sc,simplebezier:B0};function H0(e,t,n){const o=fe(()=>b=>t.value.get(b)),i=fe(()=>b=>n.value.get(b)),s=fe(()=>{const b={...F0,...e.edgeTypes},x=Object.keys(b);for(const C of e.edges)C.type&&!x.includes(C.type)&&(b[C.type]=C.type);return b}),r=fe(()=>{const b={...z0,...e.nodeTypes},x=Object.keys(b);for(const C of e.nodes)C.type&&!x.includes(C.type)&&(b[C.type]=C.type);return b}),l=fe(()=>e.onlyRenderVisibleElements?sc(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),a=fe(()=>{if(e.onlyRenderVisibleElements){const b=[];for(const x of e.edges){const C=t.value.get(x.source),D=t.value.get(x.target);Vy({sourcePos:C.computedPosition||{x:0,y:0},targetPos:D.computedPosition||{x:0,y:0},sourceWidth:C.dimensions.width,sourceHeight:C.dimensions.height,targetWidth:D.dimensions.width,targetHeight:D.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&b.push(x)}return b}return e.edges}),u=fe(()=>[...l.value,...a.value]),c=fe(()=>{const b=[];for(const x of e.nodes)x.selected&&b.push(x);return b}),d=fe(()=>{const b=[];for(const x of e.edges)x.selected&&b.push(x);return b}),g=fe(()=>[...c.value,...d.value]),h=fe(()=>{const b=[];for(const x of e.nodes)x.dimensions.width&&x.dimensions.height&&x.handleBounds!==void 0&&b.push(x);return b}),y=fe(()=>l.value.length>0&&h.value.length===l.value.length);return{getNode:o,getEdge:i,getElements:u,getEdgeTypes:s,getNodeTypes:r,getEdges:a,getNodes:l,getSelectedElements:g,getSelectedNodes:c,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:y}}class vn{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=cn())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??vn.instance;return vn.instance=o??new vn,n&&(n.config.globalProperties.$vueFlowStorage=vn.instance),vn.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=yc(),i=Po(o),s={};for(const[g,h]of Object.entries(i.hooks)){const y=`on${g.charAt(0).toUpperCase()+g.slice(1)}`;s[y]=h.on}const r={};for(const[g,h]of Object.entries(i.hooks))r[g]=h.trigger;const l=fe(()=>{const g=new Map;for(const h of i.nodes)g.set(h.id,h);return g}),a=fe(()=>{const g=new Map;for(const h of i.edges)g.set(h.id,h);return g}),u=H0(i,l,a),c=f0(i,l,a);c.setState({...i,...n});const d={...s,...u,...c,...kp(i),nodeLookup:l,edgeLookup:a,emits:r,id:t,vueFlowVersion:"1.45.0",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Re(e){const t=vn.getInstance(),n=Ii(),o=typeof e=="object",i=o?e:{id:e},s=i.id,r=s??n?.vueFlowId;let l;if(n){const a=vt(Xl,null);typeof a<"u"&&a!==null&&(!r||a.id===r)&&(l=a)}if(l||r&&(l=t.get(r)),!l||r&&l.id!==r){const a=s??t.getId(),u=t.create(a,i);l=u,(n??$i(!0)).run(()=>{Se(u.applyDefault,(d,g,h)=>{const y=x=>{u.applyNodeChanges(x)},b=x=>{u.applyEdgeChanges(x)};d?(u.onNodesChange(y),u.onEdgesChange(b)):(u.hooks.value.nodesChange.off(y),u.hooks.value.edgesChange.off(b)),h(()=>{u.hooks.value.nodesChange.off(y),u.hooks.value.edgesChange.off(b)})},{immediate:!0}),Bi(()=>{if(l){const d=t.get(l.id);d?d.$destroy():Yi(`No store instance found for id ${l.id} in storage.`)}})})}else o&&l.setState(i);if(n&&(xn(Xl,l),n.vueFlowId=l.id),o){const a=cn();a?.type.name!=="VueFlow"&&l.emits.error(new Fe(ze.USEVUEFLOW_OPTIONS))}return l}function L0(e){const{emits:t,dimensions:n}=Re();let o;ft(()=>{const i=e.value,s=()=>{if(!i)return;const r=Ui(i);(r.width===0||r.height===0)&&t.error(new Fe(ze.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:r.width||500,height:r.height||500}};s(),window.addEventListener("resize",s),i&&(o=new ResizeObserver(()=>s()),o.observe(i)),ar(()=>{window.removeEventListener("resize",s),o&&i&&o.unobserve(i)})})}const U0={name:"UserSelection",compatConfig:{MODE:3}},G0=_e({...U0,props:{userSelectionRect:{}},setup(e){return(t,n)=>(Z(),ae("div",{class:"vue-flow__selection vue-flow__container",style:dt({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Y0=["tabIndex"],K0={name:"NodesSelection",compatConfig:{MODE:3}},j0=_e({...K0,setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:i,disableKeyboardA11y:s,userSelectionActive:r}=Re(),l=mc(),a=q(null),u=pc({el:a,onStart(y){t.selectionDragStart(y)},onDrag(y){t.selectionDrag(y)},onStop(y){t.selectionDragStop(y)}});ft(()=>{var y;s.value||(y=a.value)==null||y.focus({preventScroll:!0})});const c=fe(()=>ic(o.value)),d=fe(()=>({width:`${c.value.width}px`,height:`${c.value.height}px`,top:`${c.value.y}px`,left:`${c.value.x}px`}));function g(y){t.selectionContextMenu({event:y,nodes:o.value})}function h(y){s||Vn[y.key]&&(y.preventDefault(),l({x:Vn[y.key].x,y:Vn[y.key].y},y.shiftKey))}return(y,b)=>!ee(r)&&c.value.width&&c.value.height?(Z(),ae("div",{key:0,class:tt(["vue-flow__nodesselection vue-flow__container",ee(i)]),style:dt({transform:`translate(${ee(n).x}px,${ee(n).y}px) scale(${ee(n).zoom})`})},[$("div",{ref_key:"el",ref:a,class:tt([{dragging:ee(u)},"vue-flow__nodesselection-rect"]),style:dt(d.value),tabIndex:ee(s)?void 0:-1,onContextmenu:g,onKeydown:h},null,46,Y0)],6)):Oe("",!0)}});function X0(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const W0={name:"Pane",compatConfig:{MODE:3}},Z0=_e({...W0,props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:i,userSelectionActive:s,removeSelectedElements:r,userSelectionRect:l,elementsSelectable:a,nodesSelectionActive:u,getSelectedEdges:c,getSelectedNodes:d,removeNodes:g,removeEdges:h,selectionMode:y,deleteKeyCode:b,multiSelectionKeyCode:x,multiSelectionActive:C,edgeLookup:D,nodeLookup:S,connectionLookup:N,defaultEdgeOptions:F,connectionStartHandle:j}=Re(),k=q(null),A=q(new Set),V=q(new Set),G=q(),z=ke(()=>a.value&&(e.isSelecting||s.value)),T=ke(()=>j.value!==null);let J=!1,E=!1;const U=go(b,{actInsideInputWithModifier:!1}),I=go(x);Se(U,Q=>{Q&&(g(d.value),h(c.value),u.value=!1)}),Se(I,Q=>{C.value=Q});function B(Q,ie){return se=>{se.target===ie&&Q?.(se)}}function H(Q){if(J||T.value){J=!1;return}i.paneClick(Q),r(),u.value=!1}function X(Q){Q.preventDefault(),Q.stopPropagation(),i.paneContextMenu(Q)}function W(Q){i.paneScroll(Q)}function oe(Q){var ie,se,ve;if(G.value=(ie=t.value)==null?void 0:ie.getBoundingClientRect(),!a.value||!e.isSelecting||Q.button!==0||Q.target!==k.value||!G.value)return;(ve=(se=Q.target)==null?void 0:se.setPointerCapture)==null||ve.call(se,Q.pointerId);const{x:me,y:de}=X0(Q,G.value);E=!0,J=!1,r(),l.value={width:0,height:0,startX:me,startY:de,x:me,y:de},i.selectionStart(Q)}function re(Q){var ie;if(!G.value||!l.value)return;J=!0;const{x:se,y:ve}=$t(Q,G.value),{startX:me=0,startY:de=0}=l.value,ye={startX:me,startY:de,x:sef.id)),V.value=new Set;const w=((ie=F.value)==null?void 0:ie.selectable)??!0;for(const f of A.value){const p=N.value.get(f);if(p)for(const{edgeId:m}of p.values()){const v=D.value.get(m);v&&(v.selectable??w)&&V.value.add(m)}}if(!jl(ue,A.value)){const f=on(S.value,A.value,!0);i.nodesChange(f)}if(!jl(_,V.value)){const f=on(D.value,V.value);i.edgesChange(f)}l.value=ye,s.value=!0,u.value=!1}function he(Q){var ie;Q.button!==0||!E||((ie=Q.target)==null||ie.releasePointerCapture(Q.pointerId),!s.value&&l.value&&Q.target===k.value&&H(Q),s.value=!1,l.value=null,u.value=A.value.size>0,i.selectionEnd(Q),e.selectionKeyPressed&&(J=!1),E=!1)}return(Q,ie)=>(Z(),ae("div",{ref_key:"container",ref:k,class:tt(["vue-flow__pane vue-flow__container",{selection:Q.isSelecting}]),onClick:ie[0]||(ie[0]=se=>z.value?void 0:B(H,k.value)(se)),onContextmenu:ie[1]||(ie[1]=se=>B(X,k.value)(se)),onWheelPassive:ie[2]||(ie[2]=se=>B(W,k.value)(se)),onPointerenter:ie[3]||(ie[3]=se=>z.value?void 0:ee(i).paneMouseEnter(se)),onPointerdown:ie[4]||(ie[4]=se=>z.value?oe(se):ee(i).paneMouseMove(se)),onPointermove:ie[5]||(ie[5]=se=>z.value?re(se):ee(i).paneMouseMove(se)),onPointerup:ie[6]||(ie[6]=se=>z.value?he(se):void 0),onPointerleave:ie[7]||(ie[7]=se=>ee(i).paneMouseLeave(se))},[Tt(Q.$slots,"default"),ee(s)&&ee(l)?(Z(),Ue(G0,{key:0,"user-selection-rect":ee(l)},null,8,["user-selection-rect"])):Oe("",!0),ee(u)&&ee(d).length?(Z(),Ue(j0,{key:1})):Oe("",!0)],34))}}),q0={name:"Transform",compatConfig:{MODE:3}},J0=_e({...q0,setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Re(),i=fe(()=>n.value?!o.value:!1),s=fe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(r,l)=>(Z(),ae("div",{class:"vue-flow__transformationpane vue-flow__container",style:dt({transform:s.value,opacity:i.value?0:void 0})},[Tt(r.$slots,"default")],4))}}),Q0={name:"Viewport",compatConfig:{MODE:3}},e_=_e({...Q0,setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:i,zoomActivationKeyCode:s,selectionKeyCode:r,panActivationKeyCode:l,panOnScroll:a,panOnScrollMode:u,panOnScrollSpeed:c,panOnDrag:d,zoomOnDoubleClick:g,zoomOnPinch:h,zoomOnScroll:y,preventScrolling:b,noWheelClassName:x,noPanClassName:C,emits:D,connectionStartHandle:S,userSelectionActive:N,paneDragging:F,d3Zoom:j,d3Selection:k,d3ZoomHandler:A,viewport:V,viewportRef:G,paneClickDistance:z}=Re();L0(G);const T=yo(!1),J=yo(!1);let E=null,U=!1,I=0,B={x:0,y:0,zoom:0};const H=go(l),X=go(r),W=go(s),oe=ke(()=>(!X.value||X.value&&r.value===!0)&&(H.value||d.value)),re=ke(()=>H.value||a.value),he=ke(()=>X.value||r.value===!0&&oe.value!==!0);ft(()=>{if(!G.value){Yi("Viewport element is missing");return}const de=G.value,ye=de.getBoundingClientRect(),ue=yy().clickDistance(z.value).scaleExtent([t.value,n.value]).translateExtent(i.value),_=ht(de).call(ue),w=_.on("wheel.zoom"),f=Yn.translate(o.value.x??0,o.value.y??0).scale(Nn(o.value.zoom??1,t.value,n.value)),p=[[0,0],[ye.width,ye.height]],m=ue.constrain()(f,p,i.value);ue.transform(_,m),ue.wheelDelta(ie),j.value=ue,k.value=_,A.value=w,V.value={x:m.x,y:m.y,zoom:m.k},ue.on("start",v=>{var M;if(!v.sourceEvent)return null;I=v.sourceEvent.button,T.value=!0;const R=ve(v.transform);((M=v.sourceEvent)==null?void 0:M.type)==="mousedown"&&(F.value=!0),B=R,D.viewportChangeStart(R),D.moveStart({event:v,flowTransform:R})}),ue.on("end",v=>{if(!v.sourceEvent)return null;if(T.value=!1,F.value=!1,Q(oe.value,I??0)&&!U&&D.paneContextMenu(v.sourceEvent),U=!1,se(B,v.transform)){const M=ve(v.transform);B=M,D.viewportChangeEnd(M),D.moveEnd({event:v,flowTransform:M})}}),ue.filter(v=>{var M;const R=W.value||y.value,O=h.value&&v.ctrlKey,P=v.button;if(P===1&&v.type==="mousedown"&&(me(v,"vue-flow__node")||me(v,"vue-flow__edge")))return!0;if(!oe.value&&!R&&!re.value&&!g.value&&!h.value||N.value||!g.value&&v.type==="dblclick"||me(v,x.value)&&v.type==="wheel"||me(v,C.value)&&(v.type!=="wheel"||re.value&&v.type==="wheel"&&!W.value)||!h.value&&v.ctrlKey&&v.type==="wheel"||!R&&!re.value&&!O&&v.type==="wheel")return!1;if(!h&&v.type==="touchstart"&&((M=v.touches)==null?void 0:M.length)>1)return v.preventDefault(),!1;if(!oe.value&&(v.type==="mousedown"||v.type==="touchstart")||r.value===!0&&Array.isArray(d.value)&&d.value.includes(0)&&P===0||Array.isArray(d.value)&&!d.value.includes(P)&&(v.type==="mousedown"||v.type==="touchstart"))return!1;const Y=Array.isArray(d.value)&&d.value.includes(P)||r.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!P||P<=1;return(!v.ctrlKey||H.value||v.type==="wheel")&&Y}),Se([N,oe],()=>{N.value&&!T.value?ue.on("zoom",null):N.value||ue.on("zoom",v=>{V.value={x:v.transform.x,y:v.transform.y,zoom:v.transform.k};const M=ve(v.transform);U=Q(oe.value,I??0),D.viewportChange(M),D.move({event:v,flowTransform:M})})},{immediate:!0}),Se([N,re,u,W,h,b,x],()=>{re.value&&!W.value&&!N.value?_.on("wheel.zoom",v=>{if(me(v,x.value))return!1;const M=W.value||y.value,R=h.value&&v.ctrlKey;if(!(!b.value||re.value||M||R))return!1;v.preventDefault(),v.stopImmediatePropagation();const P=_.property("__zoom").k||1,Y=xi();if(!H.value&&v.ctrlKey&&h.value&&Y){const xe=Nt(v),Ee=ie(v),Ge=P*2**Ee;ue.scaleTo(_,Ge,xe,v);return}const L=v.deltaMode===1?20:1;let K=u.value===po.Vertical?0:v.deltaX*L,te=u.value===po.Horizontal?0:v.deltaY*L;!Y&&v.shiftKey&&u.value!==po.Vertical&&!K&&te&&(K=te,te=0),ue.translateBy(_,-(K/P)*c.value,-(te/P)*c.value);const pe=ve(_.property("__zoom"));E&&clearTimeout(E),J.value?(D.move({event:v,flowTransform:pe}),D.viewportChange(pe),E=setTimeout(()=>{D.moveEnd({event:v,flowTransform:pe}),D.viewportChangeEnd(pe),J.value=!1},150)):(J.value=!0,D.moveStart({event:v,flowTransform:pe}),D.viewportChangeStart(pe))},{passive:!1}):typeof w<"u"&&_.on("wheel.zoom",function(v,M){const R=!b.value&&v.type==="wheel"&&!v.ctrlKey,O=W.value||y.value,P=h.value&&v.ctrlKey;if(!O&&!a.value&&!P&&v.type==="wheel"||R||me(v,x.value))return null;v.preventDefault(),w.call(this,v,M)},{passive:!1})},{immediate:!0})});function Q(de,ye){return ye===2&&Array.isArray(de)&&de.includes(2)}function ie(de){const ye=de.ctrlKey&&xi()?10:1;return-de.deltaY*(de.deltaMode===1?.05:de.deltaMode?1:.002)*ye}function se(de,ye){return de.x!==ye.x&&!Number.isNaN(ye.x)||de.y!==ye.y&&!Number.isNaN(ye.y)||de.zoom!==ye.k&&!Number.isNaN(ye.k)}function ve(de){return{x:de.x,y:de.y,zoom:de.k}}function me(de,ye){return de.target.closest(`.${ye}`)}return(de,ye)=>(Z(),ae("div",{ref_key:"viewportRef",ref:G,class:"vue-flow__viewport vue-flow__container"},[Ie(Z0,{"is-selecting":he.value,"selection-key-pressed":ee(X),class:tt({connecting:!!ee(S),dragging:ee(F),draggable:ee(d)===!0||Array.isArray(ee(d))&&ee(d).includes(0)})},{default:Bn(()=>[Ie(J0,null,{default:Bn(()=>[Tt(de.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),t_=["id"],n_=["id"],o_=["id"],i_={name:"A11yDescriptions",compatConfig:{MODE:3}},s_=_e({...i_,setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Re();return(i,s)=>(Z(),ae(Me,null,[$("div",{id:`${ee(Zu)}-${ee(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+je(ee(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,t_),$("div",{id:`${ee(qu)}-${ee(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,n_),ee(n)?Oe("",!0):(Z(),ae("div",{key:0,id:`${ee(Ey)}-${ee(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},je(ee(o)),9,o_))],64))}});function r_(){const e=Re();Se(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function l_(e,t,n){return n===le.Left?e-t:n===le.Right?e+t:e}function a_(e,t,n){return n===le.Top?e-t:n===le.Bottom?e+t:e}const Cr=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=le.Top,type:i}){return $e("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${i}`,cx:l_(t,e,o),cy:a_(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};Cr.props=["radius","centerX","centerY","position","type"];Cr.compatConfig={MODE:3};const Ql=Cr,u_=_e({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:i,emits:s,nodesSelectionActive:r,noPanClassName:l,getEdgeTypes:a,removeSelectedEdges:u,findEdge:c,findNode:d,isValidConnection:g,multiSelectionActive:h,disableKeyboardA11y:y,elementsSelectable:b,edgesUpdatable:x,edgesFocusable:C,hooks:D}=Re(),S=fe(()=>c(e.id)),{emit:N,on:F}=e0(S.value,s),j=vt(Ki),k=cn(),A=q(!1),V=q(!1),G=q(""),z=q(null),T=q("source"),J=q(null),E=ke(()=>typeof S.value.selectable>"u"?b.value:S.value.selectable),U=ke(()=>typeof S.value.updatable>"u"?x.value:S.value.updatable),I=ke(()=>typeof S.value.focusable>"u"?C.value:S.value.focusable);xn(qy,e.id),xn(Jy,J);const B=fe(()=>S.value.class instanceof Function?S.value.class(S.value):S.value.class),H=fe(()=>S.value.style instanceof Function?S.value.style(S.value):S.value.style),X=fe(()=>{const p=S.value.type||"default",m=j?.[`edge-${p}`];if(m)return m;let v=S.value.template??a.value[p];if(typeof v=="string"&&k){const M=Object.keys(k.appContext.components);M&&M.includes(p)&&(v=za(p,!1))}return v&&typeof v!="string"?v:(s.error(new Fe(ze.EDGE_TYPE_MISSING,v)),!1)}),{handlePointerDown:W}=gc({nodeId:G,handleId:z,type:T,isValidConnection:g,edgeUpdaterType:T,onEdgeUpdate:he,onEdgeUpdateEnd:Q});return()=>{const p=d(S.value.source),m=d(S.value.target),v="pathOptions"in S.value?S.value.pathOptions:{};if(!p&&!m)return s.error(new Fe(ze.EDGE_SOURCE_TARGET_MISSING,S.value.id,S.value.source,S.value.target)),null;if(!p)return s.error(new Fe(ze.EDGE_SOURCE_MISSING,S.value.id,S.value.source)),null;if(!m)return s.error(new Fe(ze.EDGE_TARGET_MISSING,S.value.id,S.value.target)),null;if(!S.value||S.value.hidden||p.hidden||m.hidden)return null;let M;o.value===ln.Strict?M=p.handleBounds.source:M=[...p.handleBounds.source||[],...p.handleBounds.target||[]];const R=Hl(M,S.value.sourceHandle);let O;o.value===ln.Strict?O=m.handleBounds.target:O=[...m.handleBounds.target||[],...m.handleBounds.source||[]];const P=Hl(O,S.value.targetHandle),Y=R?.position||le.Bottom,L=P?.position||le.Top,{x:K,y:te}=Kn(p,R,Y),{x:pe,y:xe}=Kn(m,P,L);return S.value.sourceX=K,S.value.sourceY=te,S.value.targetX=pe,S.value.targetY=xe,$e("g",{ref:J,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${X.value===!1?"default":S.value.type||"default"}`,l.value,B.value,{updating:A.value,selected:S.value.selected,animated:S.value.animated,inactive:!E.value&&!D.value.edgeClick.hasListeners()}],tabIndex:I.value?0:void 0,"aria-label":S.value.ariaLabel===null?void 0:S.value.ariaLabel??`Edge from ${S.value.source} to ${S.value.target}`,"aria-describedby":I.value?`${qu}-${t}`:void 0,"aria-roledescription":"edge",role:I.value?"group":"img",...S.value.domAttributes,onClick:se,onContextmenu:ve,onDblclick:me,onMouseenter:de,onMousemove:ye,onMouseleave:ue,onKeyDown:I.value?f:void 0},[V.value?null:$e(X.value===!1?a.value.default:X.value,{id:e.id,sourceNode:p,targetNode:m,source:S.value.source,target:S.value.target,type:S.value.type,updatable:U.value,selected:S.value.selected,animated:S.value.animated,label:S.value.label,labelStyle:S.value.labelStyle,labelShowBg:S.value.labelShowBg,labelBgStyle:S.value.labelBgStyle,labelBgPadding:S.value.labelBgPadding,labelBgBorderRadius:S.value.labelBgBorderRadius,data:S.value.data,events:{...S.value.events,...F},style:H.value,markerStart:`url('#${$o(S.value.markerStart,t)}')`,markerEnd:`url('#${$o(S.value.markerEnd,t)}')`,sourcePosition:Y,targetPosition:L,sourceX:K,sourceY:te,targetX:pe,targetY:xe,sourceHandleId:S.value.sourceHandle,targetHandleId:S.value.targetHandle,interactionWidth:S.value.interactionWidth,...v}),[U.value==="source"||U.value===!0?[$e("g",{onMousedown:_,onMouseenter:oe,onMouseout:re},$e(Ql,{position:Y,centerX:K,centerY:te,radius:i.value,type:"source","data-type":"source"}))]:null,U.value==="target"||U.value===!0?[$e("g",{onMousedown:w,onMouseenter:oe,onMouseout:re},$e(Ql,{position:L,centerX:pe,centerY:xe,radius:i.value,type:"target","data-type":"target"}))]:null]])};function oe(){A.value=!0}function re(){A.value=!1}function he(p,m){N.update({event:p,edge:S.value,connection:m})}function Q(p){N.updateEnd({event:p,edge:S.value}),V.value=!1}function ie(p,m){p.button===0&&(V.value=!0,G.value=m?S.value.target:S.value.source,z.value=(m?S.value.targetHandle:S.value.sourceHandle)??null,T.value=m?"target":"source",N.updateStart({event:p,edge:S.value}),W(p))}function se(p){var m;const v={event:p,edge:S.value};E.value&&(r.value=!1,S.value.selected&&h.value?(u([S.value]),(m=J.value)==null||m.blur()):n([S.value])),N.click(v)}function ve(p){N.contextMenu({event:p,edge:S.value})}function me(p){N.doubleClick({event:p,edge:S.value})}function de(p){N.mouseEnter({event:p,edge:S.value})}function ye(p){N.mouseMove({event:p,edge:S.value})}function ue(p){N.mouseLeave({event:p,edge:S.value})}function _(p){ie(p,!0)}function w(p){ie(p,!1)}function f(p){var m;!y.value&&Ju.includes(p.key)&&E.value&&(p.key==="Escape"?((m=J.value)==null||m.blur(),u([c(e.id)])):n([c(e.id)]))}}}),c_=u_,d_=_e({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:i,connectionPosition:s,connectionLineType:r,connectionLineStyle:l,connectionLineOptions:a,connectionStatus:u,viewport:c,findNode:d}=Re(),g=(e=vt(Ki))==null?void 0:e["connection-line"],h=fe(()=>{var D;return d((D=o.value)==null?void 0:D.nodeId)}),y=fe(()=>{var D;return d((D=i.value)==null?void 0:D.nodeId)??null}),b=fe(()=>({x:(s.value.x-c.value.x)/c.value.zoom,y:(s.value.y-c.value.y)/c.value.zoom})),x=fe(()=>a.value.markerStart?`url(#${$o(a.value.markerStart,t)})`:""),C=fe(()=>a.value.markerEnd?`url(#${$o(a.value.markerEnd,t)})`:"");return()=>{var D,S,N;if(!h.value||!o.value)return null;const F=o.value.id,j=o.value.type,k=h.value.handleBounds;let A=k?.[j]??[];if(n.value===ln.Loose){const H=k?.[j==="source"?"target":"source"]??[];A=[...A,...H]}if(!A)return null;const V=(F?A.find(H=>H.id===F):A[0])??null,G=V?.position??le.Top,{x:z,y:T}=Kn(h.value,V,G);let J=null;y.value&&(n.value===ln.Strict?J=((D=y.value.handleBounds[j==="source"?"target":"source"])==null?void 0:D.find(H=>{var X;return H.id===((X=i.value)==null?void 0:X.id)}))||null:J=((S=[...y.value.handleBounds.source??[],...y.value.handleBounds.target??[]])==null?void 0:S.find(H=>{var X;return H.id===((X=i.value)==null?void 0:X.id)}))||null);const E=((N=i.value)==null?void 0:N.position)??(G?Ys[G]:null);if(!G||!E)return null;const U=r.value??a.value.type??gn.Bezier;let I="";const B={sourceX:z,sourceY:T,sourcePosition:G,targetX:b.value.x,targetY:b.value.y,targetPosition:E};return U===gn.Bezier?[I]=wc(B):U===gn.Step?[I]=js({...B,borderRadius:0}):U===gn.SmoothStep?[I]=js(B):U===gn.SimpleBezier?[I]=xc(B):I=`M${z},${T} ${b.value.x},${b.value.y}`,$e("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},$e("g",{class:"vue-flow__connection"},g?$e(g,{sourceX:z,sourceY:T,sourcePosition:G,targetX:b.value.x,targetY:b.value.y,targetPosition:E,sourceNode:h.value,sourceHandle:V,targetNode:y.value,targetHandle:J,markerEnd:C.value,markerStart:x.value,connectionStatus:u.value}):$e("path",{d:I,class:[a.value.class,u,"vue-flow__connection-path"],style:{...l.value,...a.value.style},"marker-end":C.value,"marker-start":x.value})))}}}),f_=d_,h_=["id","markerWidth","markerHeight","markerUnits","orient"],p_={name:"MarkerType",compatConfig:{MODE:3}},g_=_e({...p_,props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(Z(),ae("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===ee(Ls).ArrowClosed?(Z(),ae("polyline",{key:0,style:dt({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):Oe("",!0),t.type===ee(Ls).Arrow?(Z(),ae("polyline",{key:1,style:dt({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Oe("",!0)],8,h_))}}),v_={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},m_={name:"MarkerDefinitions",compatConfig:{MODE:3}},y_=_e({...m_,setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:i}=Re(),s=fe(()=>{const r=new Set,l=[],a=u=>{if(u){const c=$o(u,t);r.has(c)||(typeof u=="object"?l.push({...u,id:c,color:u.color||i.value}):l.push({id:c,color:i.value,type:u}),r.add(c))}};for(const u of[o.value.markerEnd,o.value.markerStart])a(u);for(const u of n.value)for(const c of[u.markerStart,u.markerEnd])a(c);return l.sort((u,c)=>u.id.localeCompare(c.id))});return(r,l)=>(Z(),ae("svg",v_,[$("defs",null,[(Z(!0),ae(Me,null,Dt(s.value,a=>(Z(),Ue(g_,{id:a.id,key:a.id,type:a.type,color:a.color,width:a.width,height:a.height,markerUnits:a.markerUnits,"stroke-width":a.strokeWidth,orient:a.orient},null,8,["id","type","color","width","height","markerUnits","stroke-width","orient"]))),128))])]))}}),__={name:"Edges",compatConfig:{MODE:3}},b_=_e({...__,setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Re();return(i,s)=>(Z(),ae(Me,null,[Ie(y_),(Z(!0),ae(Me,null,Dt(ee(n),r=>(Z(),ae("svg",{key:r.id,class:"vue-flow__edges vue-flow__container",style:dt({zIndex:ee(By)(r,ee(t),ee(o))})},[Ie(ee(c_),{id:r.id},null,8,["id"])],4))),128)),Ie(ee(f_))],64))}}),w_=_e({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:i,multiSelectionActive:s,emits:r,removeSelectedNodes:l,addSelectedNodes:a,updateNodeDimensions:u,onUpdateNodeInternals:c,getNodeTypes:d,nodeExtent:g,elevateNodesOnSelect:h,disableKeyboardA11y:y,ariaLiveMessage:b,snapToGrid:x,snapGrid:C,nodeDragThreshold:D,nodesDraggable:S,elementsSelectable:N,nodesConnectable:F,nodesFocusable:j,hooks:k}=Re(),A=q(null);xn(hc,A),xn(fc,e.id);const V=vt(Ki),G=cn(),z=mc(),{node:T,parentNode:J}=vc(e.id),{emit:E,on:U}=i0(T,r),I=ke(()=>typeof T.draggable>"u"?S.value:T.draggable),B=ke(()=>typeof T.selectable>"u"?N.value:T.selectable),H=ke(()=>typeof T.connectable>"u"?F.value:T.connectable),X=ke(()=>typeof T.focusable>"u"?j.value:T.focusable),W=fe(()=>B.value||I.value||k.value.nodeClick.hasListeners()||k.value.nodeDoubleClick.hasListeners()||k.value.nodeMouseEnter.hasListeners()||k.value.nodeMouseMove.hasListeners()||k.value.nodeMouseLeave.hasListeners()),oe=ke(()=>!!T.dimensions.width&&!!T.dimensions.height),re=fe(()=>{const m=T.type||"default",v=V?.[`node-${m}`];if(v)return v;let M=T.template||d.value[m];if(typeof M=="string"&&G){const R=Object.keys(G.appContext.components);R&&R.includes(m)&&(M=za(m,!1))}return M&&typeof M!="string"?M:(r.error(new Fe(ze.NODE_TYPE_MISSING,M)),!1)}),he=pc({id:e.id,el:A,disabled:()=>!I.value,selectable:B,dragHandle:()=>T.dragHandle,onStart(m){E.dragStart(m)},onDrag(m){E.drag(m)},onStop(m){E.dragStop(m)},onClick(m){f(m)}}),Q=fe(()=>T.class instanceof Function?T.class(T):T.class),ie=fe(()=>{const m=(T.style instanceof Function?T.style(T):T.style)||{},v=T.width instanceof Function?T.width(T):T.width,M=T.height instanceof Function?T.height(T):T.height;return!m.width&&v&&(m.width=typeof v=="string"?v:`${v}px`),!m.height&&M&&(m.height=typeof M=="string"?M:`${M}px`),m}),se=ke(()=>Number(T.zIndex??ie.value.zIndex??0));return c(m=>{(m.includes(e.id)||!m.length)&&me()}),ft(()=>{Se(()=>T.hidden,(m=!1,v,M)=>{!m&&A.value&&(e.resizeObserver.observe(A.value),M(()=>{A.value&&e.resizeObserver.unobserve(A.value)}))},{immediate:!0,flush:"post"})}),Se([()=>T.type,()=>T.sourcePosition,()=>T.targetPosition],()=>{ut(()=>{u([{id:e.id,nodeElement:A.value,forceUpdate:!0}])})}),Se([()=>T.position.x,()=>T.position.y,()=>{var m;return(m=J.value)==null?void 0:m.computedPosition.x},()=>{var m;return(m=J.value)==null?void 0:m.computedPosition.y},()=>{var m;return(m=J.value)==null?void 0:m.computedPosition.z},se,()=>T.selected,()=>T.dimensions.height,()=>T.dimensions.width,()=>{var m;return(m=J.value)==null?void 0:m.dimensions.height},()=>{var m;return(m=J.value)==null?void 0:m.dimensions.width}],([m,v,M,R,O,P])=>{const Y={x:m,y:v,z:P+(h.value&&T.selected?1e3:0)};typeof M<"u"&&typeof R<"u"?T.computedPosition=Ay({x:M,y:R,z:O},Y):T.computedPosition=Y},{flush:"post",immediate:!0}),Se([()=>T.extent,g],([m,v],[M,R])=>{(m!==M||v!==R)&&ve()}),T.extent==="parent"||typeof T.extent=="object"&&"range"in T.extent&&T.extent.range==="parent"?Ds(()=>oe).toBe(!0).then(ve):ve(),()=>T.hidden?null:$e("div",{ref:A,"data-id":T.id,class:["vue-flow__node",`vue-flow__node-${re.value===!1?"default":T.type||"default"}`,{[n.value]:I.value,dragging:he?.value,draggable:I.value,selected:T.selected,selectable:B.value,parent:T.isParent},Q.value],style:{visibility:oe.value?"visible":"hidden",zIndex:T.computedPosition.z??se.value,transform:`translate(${T.computedPosition.x}px,${T.computedPosition.y}px)`,pointerEvents:W.value?"all":"none",...ie.value},tabIndex:X.value?0:void 0,role:X.value?"group":void 0,"aria-describedby":y.value?void 0:`${Zu}-${t}`,"aria-label":T.ariaLabel,"aria-roledescription":"node",...T.domAttributes,onMouseenter:de,onMousemove:ye,onMouseleave:ue,onContextmenu:_,onClick:f,onDblclick:w,onKeydown:p},[$e(re.value===!1?d.value.default:re.value,{id:T.id,type:T.type,data:T.data,events:{...T.events,...U},selected:T.selected,resizing:T.resizing,dragging:he.value,connectable:H.value,position:T.computedPosition,dimensions:T.dimensions,isValidTargetPos:T.isValidTargetPos,isValidSourcePos:T.isValidSourcePos,parent:T.parentNode,parentNodeId:T.parentNode,zIndex:T.computedPosition.z??se.value,targetPosition:T.targetPosition,sourcePosition:T.sourcePosition,label:T.label,dragHandle:T.dragHandle,onUpdateNodeInternals:me})]);function ve(){const m=T.computedPosition,{computedPosition:v,position:M}=Er(T,x.value?Gi(m,C.value):m,r.error,g.value,J.value);(T.computedPosition.x!==v.x||T.computedPosition.y!==v.y)&&(T.computedPosition={...T.computedPosition,...v}),(T.position.x!==M.x||T.position.y!==M.y)&&(T.position=M)}function me(){A.value&&u([{id:e.id,nodeElement:A.value,forceUpdate:!0}])}function de(m){he?.value||E.mouseEnter({event:m,node:T})}function ye(m){he?.value||E.mouseMove({event:m,node:T})}function ue(m){he?.value||E.mouseLeave({event:m,node:T})}function _(m){return E.contextMenu({event:m,node:T})}function w(m){return E.doubleClick({event:m,node:T})}function f(m){B.value&&(!o.value||!I.value||D.value>0)&&Ks(T,s.value,a,l,i,!1,A.value),E.click({event:m,node:T})}function p(m){if(!(Us(m)||y.value))if(Ju.includes(m.key)&&B.value){const v=m.key==="Escape";Ks(T,s.value,a,l,i,v,A.value)}else I.value&&T.selected&&Vn[m.key]&&(m.preventDefault(),b.value=`Moved selected node ${m.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~T.position.x}, y: ${~~T.position.y}`,z({x:Vn[m.key].x,y:Vn[m.key].y},m.shiftKey))}}}),x_=w_;function S_(e={includeHiddenNodes:!1}){const{nodes:t}=Re();return fe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const E_={class:"vue-flow__nodes vue-flow__container"},N_={name:"Nodes",compatConfig:{MODE:3}},C_=_e({...N_,setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Re(),i=S_(),s=q();return Se(i,r=>{r&&ut(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),ft(()=>{s.value=new ResizeObserver(r=>{const l=r.map(a=>({id:a.target.getAttribute("data-id"),nodeElement:a.target,forceUpdate:!0}));ut(()=>n(l))})}),ar(()=>{var r;return(r=s.value)==null?void 0:r.disconnect()}),(r,l)=>(Z(),ae("div",E_,[s.value?(Z(!0),ae(Me,{key:0},Dt(ee(t),(a,u,c,d)=>{const g=[a.id];if(d&&d.key===a.id&&bf(d,g))return d;const h=(Z(),Ue(ee(x_),{id:a.id,key:a.id,"resize-observer":s.value},null,8,["id","resize-observer"]));return h.memo=g,h},l,0),128)):Oe("",!0)]))}});function M_(){const{emits:e}=Re();ft(()=>{if(dc()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Fe(ze.MISSING_STYLES))}})}const $_=$("div",{class:"vue-flow__edge-labels"},null,-1),I_={name:"VueFlow",compatConfig:{MODE:3}},T_=_e({...I_,props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,i=Pd(),s=ls(o,"modelValue",n),r=ls(o,"nodes",n),l=ls(o,"edges",n),a=Re(o),u=a0({modelValue:s,nodes:r,edges:l},o,a);return c0(n,a.hooks),r_(),M_(),xn(Ki,i),ur(()=>{u()}),t(a),(c,d)=>(Z(),ae("div",{ref:ee(a).vueFlowRef,class:"vue-flow"},[Ie(e_,null,{default:Bn(()=>[Ie(b_),$_,Ie(C_),Tt(c.$slots,"zoom-pane")]),_:3}),Tt(c.$slots,"default"),Ie(s_)],512))}});var Lt=(e=>(e.Lines="lines",e.Dots="dots",e))(Lt||{});const Ec=function({dimensions:e,size:t,color:n}){return $e("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Nc=function({radius:e,color:t}){return $e("circle",{cx:e,cy:e,r:e,fill:t})};Lt.Lines+"",Lt.Dots+"";const P_={[Lt.Dots]:"#81818a",[Lt.Lines]:"#eee"},A_=["id","x","y","width","height","patternTransform"],D_={key:2,height:"100",width:"100"},k_=["fill"],O_=["x","y","fill"],R_={name:"Background",compatConfig:{MODE:3}},V_=_e({...R_,props:{id:{},variant:{default:()=>Lt.Dots},gap:{default:20},size:{default:1},lineWidth:{default:1},patternColor:{},color:{},bgColor:{},height:{default:100},width:{default:100},x:{default:0},y:{default:0},offset:{default:0}},setup(e){const{id:t,viewport:n}=Re(),o=fe(()=>{const r=n.value.zoom,[l,a]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],u=[l*r||1,a*r||1],c=e.size*r,[d,g]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[d*r||1+u[0]/2,g*r||1+u[1]/2];return{scaledGap:u,offset:h,size:c}}),i=ke(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),s=ke(()=>e.color||e.patternColor||P_[e.variant||Lt.Dots]);return(r,l)=>(Z(),ae("svg",{class:"vue-flow__background vue-flow__container",style:dt({height:`${r.height>100?100:r.height}%`,width:`${r.width>100?100:r.width}%`})},[Tt(r.$slots,"pattern-container",{id:i.value},()=>[$("pattern",{id:i.value,x:ee(n).x%o.value.scaledGap[0],y:ee(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Tt(r.$slots,"pattern",{},()=>[r.variant===ee(Lt).Lines?(Z(),Ue(ee(Ec),{key:0,size:r.lineWidth,color:s.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):r.variant===ee(Lt).Dots?(Z(),Ue(ee(Nc),{key:1,color:s.value,radius:o.value.size/2},null,8,["color","radius"])):Oe("",!0),r.bgColor?(Z(),ae("svg",D_,[$("rect",{width:"100%",height:"100%",fill:r.bgColor},null,8,k_)])):Oe("",!0)])],8,A_)]),$("rect",{x:r.x,y:r.y,width:"100%",height:"100%",fill:`url(#${i.value})`},null,8,O_),Tt(r.$slots,"default",{id:i.value})],4))}}),B_={class:"vue-flow-container"},z_={class:"vue-flow-viewport"},F_={class:"viewport-wrapper"},H_={class:"create-wrapper"},L_={key:0,class:"floating-create-expanded"},U_=_e({__name:"SchemaEditor",setup(e){const t=dn(),n=Cn(),o=q(""),i=q(!1),s=q(!0),r=()=>{o.value.trim()!==""&&(t.createNode(o.value),o.value="",i.value=!1)},l=h=>{t.deleteNode(h)},a=h=>{n.open(h,Np,{id:h})},u=h=>{n.open(h,jh,{id:h})},c=(h,y)=>{n.open("Edit field",tp,{id:h,field:y})},d=h=>{n.open(h,wp,{id:h})},g=(h,y)=>{n.open(y.fieldName,dp,{id:h,relation:y})};return(h,y)=>(Z(),ae("div",B_,[$("div",z_,[$("div",F_,[$("div",{class:"toggle-grid-button",onClick:y[0]||(y[0]=b=>s.value=!s.value)},"#"),Ie(ee(T_),{nodes:ee(t).nodes,"onUpdate:nodes":y[4]||(y[4]=b=>ee(t).nodes=b),edges:ee(t).edges,"onUpdate:edges":y[5]||(y[5]=b=>ee(t).edges=b),"default-viewport":{zoom:2},"max-zoom":2,"min-zoom":.1,"fit-view-on-init":!0},{"node-custom":Bn(b=>[Ie(Bh,Do(b,{onDeleteNode:l,onRenameNode:a,onAddField:u,onAddRelation:d,onOpenEditFieldModal:c,onOpenEditRelationModal:g}),null,16)]),default:Bn(()=>[s.value?(Z(),Ue(ee(V_),{key:0,variant:"lines",size:51,gap:51})):Oe("",!0),$("div",H_,[i.value?(Z(),ae("div",L_,[$("button",{class:"collapse-btn",onClick:y[1]||(y[1]=b=>i.value=!1)},y[6]||(y[6]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-chevron-left size-4 rdp-nav_icon"},[$("path",{d:"m15 18-6-6 6-6"})],-1)])),Ne($("input",{class:"create-model-input",type:"text",placeholder:"Enter Model Name","onUpdate:modelValue":y[2]||(y[2]=b=>o.value=b),onKeyup:pu(r,["enter"])},null,544),[[yt,o.value]]),$("button",{class:"create-model-btn",onClick:r},"Create")])):Oe("",!0),i.value?Oe("",!0):(Z(),ae("div",{key:1,class:"create-circle",onClick:y[3]||(y[3]=b=>i.value=!0)},"+"))])]),_:1},8,["nodes","edges"])])])]))}}),G_=st(U_,[["__scopeId","data-v-bf809f9d"]]),Y_={class:"enum-sidebar"},K_={class:"sidebar-header"},j_={class:"create-enum-wrapper"},X_={class:"enum-list"},W_=["onClick"],Z_=["onClick"],q_=_e({__name:"EnumEditor",emits:["enum-selected"],setup(e,{emit:t}){const n=q([{name:"UserRole",values:[{name:"ADMIN",value:"admin"},{name:"USER",value:"auto()"}]}]),o=q(""),i=q(null),s=t,r=u=>{i.value=u.name,s("enum-selected",u)},l=()=>{if(o.value.trim()==="")return;const u={name:o.value.trim(),values:[]};n.value.push(u),o.value="",r(u)},a=u=>{n.value=n.value.filter(c=>c.name!==u),i.value===u&&(i.value=null)};return(u,c)=>(Z(),ae("div",Y_,[$("div",K_,[$("div",j_,[Ne($("input",{class:"create-enum-input",type:"text",placeholder:"New Enum Name","onUpdate:modelValue":c[0]||(c[0]=d=>o.value=d),onKeyup:pu(l,["enter"])},null,544),[[yt,o.value]]),$("button",{class:"create-enum-btn",onClick:l},"+")])]),$("div",X_,[(Z(!0),ae(Me,null,Dt(n.value,d=>(Z(),ae("div",{key:d.name,class:tt(["enum-item",{active:i.value===d.name}]),onClick:g=>r(d)},[We(je(d.name)+" ",1),$("button",{class:"delete-enum-btn",onClick:hu(g=>a(d.name),["stop"])},"×",8,Z_)],10,W_))),128))])]))}}),J_=st(q_,[["__scopeId","data-v-db633d1c"]]),Q_={class:"container"},eb={class:"editor-container"},tb={class:"editor-header"},nb={class:"editor-content"},ob=_e({__name:"Viewport",setup(e){const t=q("models");return(n,o)=>(Z(),ae("main",Q_,[$("div",eb,[$("div",tb,[$("div",{class:tt(["header-section",{active:t.value==="models"}]),onClick:o[0]||(o[0]=i=>t.value="models")}," Models ",2),o[2]||(o[2]=$("div",{class:"header-divider"},null,-1)),$("div",{class:tt(["header-section",{active:t.value==="enums"}]),onClick:o[1]||(o[1]=i=>t.value="enums")}," Enums ",2)]),$("div",nb,[t.value==="models"?(Z(),Ue(G_,{key:0})):Oe("",!0),t.value==="enums"?(Z(),Ue(J_,{key:1})):Oe("",!0)])])]))}}),ib=st(ob,[["__scopeId","data-v-b0fef25d"]]),sb={class:"container"},rb=_e({__name:"SchemaStep",setup(e){return(t,n)=>(Z(),ae("main",sb,[n[0]||(n[0]=$("h1",null,"Design your Schema",-1)),n[1]||(n[1]=$("br",null,null,-1)),$("div",null,[Ie(ib)])]))}}),ea=st(rb,[["__scopeId","data-v-33ee6271"]]),lb={class:"modal"},ab={class:"modal-header"},ub={class:"modal-title"},cb={name:"title"},db={class:"modal-body"},fb=_e({__name:"GlobalModal",setup(e){const t=Cn(),{modalTitle:n,isOpen:o,currentComponent:i,props:s}=nh(t);function r(){t.close()}return(l,a)=>(Z(),Ue(bd,{to:"body"},[ee(o)?(Z(),ae("div",{key:0,class:"modal-backdrop",onClick:hu(r,["self"])},[$("div",lb,[$("div",ab,[$("div",ub,[$("div",cb,je(ee(n)),1)]),$("div",{class:"modal-actions",onClick:r},a[0]||(a[0]=[$("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"lucide lucide-x h-4 w-4"},[$("path",{d:"M18 6 6 18"}),$("path",{d:"m6 6 12 12"})],-1)]))]),$("div",db,[ee(i)?(Z(),Ue(cr(ee(i)),Do({key:0},ee(s),{onClose:r}),null,16)):Oe("",!0)])])])):Oe("",!0)]))}}),hb=st(fb,[["__scopeId","data-v-d61e0035"]]),pb={id:"app"},gb={class:"main"},vb={class:"content"},mb=_e({__name:"App",setup(e){const t=[ea,_h,Nh,ea];return(n,o)=>(Z(),ae(Me,null,[$("div",pb,[o[0]||(o[0]=pr('
',1)),$("main",gb,[$("div",vb,[Ie(uh,{steps:t})])])]),Ie(hb,{ref:"modalRef"},null,512)],64))}}),Cc=jf(mb);Cc.use(Zf());Cc.mount("#app"); diff --git a/fastapi_forge/static/assets/index-oV0aoT2I.css b/fastapi_forge/static/assets/index-oV0aoT2I.css deleted file mode 100644 index 0d90f61..0000000 --- a/fastapi_forge/static/assets/index-oV0aoT2I.css +++ /dev/null @@ -1 +0,0 @@ -body{font-family:DM Sans,sans-serif;font-optical-sizing:auto}:root{--color-primary: #5294fd;--color-secondary: #dcebfe;--color-success: #b8fd9f;--color-danger: #ff6b6b;--color-background: #f4f4f0}.StepWizard[data-v-cb49c971]{display:flex;flex-direction:column;align-items:center;height:100%}.step-indicators[data-v-cb49c971]{display:flex;justify-content:center;margin-bottom:1rem}.step[data-v-cb49c971]{caret-color:transparent;width:50px;height:50px;border-radius:50%;background-color:#d3d3d3;display:flex;align-items:center;justify-content:center;margin:0 5px;cursor:pointer;border:2px solid black;box-shadow:2px 2px #000;transition:transform .1s ease-out,box-shadow .1s}.step[data-v-cb49c971]:hover{background-color:#a9a9a9;box-shadow:0 0 #000;transform:translate(2px,2px)}.step.active[data-v-cb49c971]{background-color:var(--color-primary)}.step.completed[data-v-cb49c971]{background-color:#7fbc8c}.step-content[data-v-cb49c971]{margin-bottom:3rem}.step-actions[data-v-cb49c971]{display:grid;grid-template-rows:1;grid-template-columns:2;justify-content:space-between;width:10%;position:absolute;bottom:8rem}.prev-btn[data-v-cb49c971]{grid-column:1}.next-btn[data-v-cb49c971]{grid-column:2}.next-btn[data-v-cb49c971],.prev-btn[data-v-cb49c971],.finish-btn[data-v-cb49c971]{caret-color:transparent;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-background);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s;font-weight:700}.next-btn[data-v-cb49c971]:hover,.prev-btn[data-v-cb49c971]:hover,.finish-btn[data-v-cb49c971]:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer}.project-name[data-v-1d9aee04]{width:100%;padding:.5rem;border:2px solid black;border-radius:4px;box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.project-name[data-v-1d9aee04]:focus,.project-name.confirmed[data-v-1d9aee04]{outline:none;transform:translate(2px,2px);box-shadow:0 0 #000}.project-name.confirmed[data-v-1d9aee04]{cursor:not-allowed}.input-group[data-v-1d9aee04]{display:flex;flex-direction:column;gap:.1rem;margin-bottom:1rem;width:100%}.project-name-label[data-v-1d9aee04]{font-weight:700;margin-bottom:.25rem}.input-horizontal[data-v-1d9aee04]{display:flex;align-items:center;gap:.5rem}.confirm-btn[data-v-1d9aee04]{caret-color:transparent;border:2px solid black;border-radius:4px;background-color:var(--color-background);padding:.25rem;box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out;height:2.125rem;font-weight:700}.confirm-btn[data-v-1d9aee04]:hover,.confirm-btn.confirmed[data-v-1d9aee04]{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer;transition:.1s;background-color:var(--color-success)}.confirm-btn.confirmed[data-v-1d9aee04]{transition:.1s;background-color:var(--color-success)}.confirm-btn.confirmed[data-v-1d9aee04]:hover{background-color:var(--color-background);transform:translate(0);box-shadow:3px 3px #000}.label-group[data-v-1d9aee04]{display:flex;justify-content:space-between;align-items:center}.input-error[data-v-1d9aee04]{border-color:#f44;background-color:#fee}.error-message[data-v-1d9aee04]{color:#ff4910;font-size:.8rem;margin-top:.25rem}.confirm-btn[data-v-1d9aee04]:disabled{opacity:.6;cursor:not-allowed;background-color:var(--color-background)}.container[data-v-1d9aee04],.container[data-v-9256ee53]{display:flex;flex-direction:column;align-items:center;width:100%;max-width:360px;min-width:360px}.db-grid-container[data-v-9256ee53]{width:100%;display:flex;justify-content:center}.db-grid[data-v-9256ee53]{display:grid;grid-template-columns:repeat(3,100px);gap:3rem;justify-items:center}.db-item[data-v-9256ee53]{caret-color:transparent;border:2px solid black;font-weight:700;border-radius:4px;box-shadow:3px 3px #000;padding:1rem;text-align:center;width:100px;height:100px;display:flex;align-items:center;justify-content:center;background-color:var(--color-background);transition:all .1s ease-in-out}.db-item.enabled[data-v-9256ee53]:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer;background-color:var(--color-success)}.db-item.enabled.confirmed[data-v-9256ee53]{transform:translate(2px,2px);box-shadow:0 0 #000;background-color:var(--color-success)}.db-item.enabled.confirmed[data-v-9256ee53]:hover{background-color:var(--color-background);transform:translate(0);box-shadow:3px 3px #000}.db-item.disabled[data-v-9256ee53]{opacity:.6;background-color:#e0e0e0;cursor:not-allowed;box-shadow:none}.db-item.disabled[data-v-9256ee53]:hover{transform:none;box-shadow:none}.custom-node[data-v-9ec7633c]{border:2px solid black;border-radius:6px;width:250px;overflow:hidden;background-color:#fff}.custom-node-header[data-v-9ec7633c]{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid black;width:100%;height:32px}.custom-node-title[data-v-9ec7633c]{font-weight:700;background-color:var(--color-primary);width:100%;height:100%;display:flex;align-items:center;padding:0 8px}.custom-node-actions[data-v-9ec7633c]{cursor:pointer;width:40px;height:100%;display:flex;align-items:center;justify-content:center;border-left:2px solid black;background-color:var(--color-primary)}.custom-node-body[data-v-9ec7633c]{display:flex;flex-direction:column;cursor:pointer}.custom-node-field-row[data-v-9ec7633c]{display:flex;justify-content:space-between;align-items:center;height:28px;padding:0 8px;border-bottom:1px solid #e0e0e0}.custom-node-field-row[data-v-9ec7633c]:hover{background-color:#f8f8f8}.custom-node-field-row[data-v-9ec7633c]:last-child{border-bottom:none}.custom-node-field-name[data-v-9ec7633c]{font-weight:600;color:#343a40;white-space:nowrap;overflow:hidden}.custom-node-field-type[data-v-9ec7633c]{font-style:italic;color:#6c757d;white-space:nowrap}.dropdown-list[data-v-9ec7633c]{margin-left:160px;caret-color:transparent;border:2px solid black;position:absolute;width:100%;min-width:120px;max-width:140px;border-radius:5px;background:#fff;z-index:100;padding:4px;box-sizing:border-box}.dropdown-item[data-v-9ec7633c]{height:35px;width:100%;display:flex;align-items:center;padding:0 5px;box-sizing:border-box;border:2px solid transparent;border-radius:5px}.dropdown-item[data-v-9ec7633c]:hover{border:2px solid black;cursor:pointer}.vue-flow{position:relative;width:100%;height:100%;overflow:hidden;z-index:0;direction:ltr}.vue-flow__container{position:absolute;height:100%;width:100%;left:0;top:0}.vue-flow__pane{z-index:1}.vue-flow__pane.draggable{cursor:grab}.vue-flow__pane.selection{cursor:pointer}.vue-flow__pane.dragging{cursor:grabbing}.vue-flow__transformationpane{transform-origin:0 0;z-index:2;pointer-events:none}.vue-flow__viewport{z-index:4;overflow:clip}.vue-flow__selection{z-index:6}.vue-flow__edge-labels{position:absolute;width:100%;height:100%;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible{outline:none}.vue-flow .vue-flow__edges{pointer-events:none;overflow:visible}.vue-flow__edge-path,.vue-flow__connection-path{stroke:#b1b1b7;stroke-width:1;fill:none}.vue-flow__edge{pointer-events:visibleStroke;cursor:pointer}.vue-flow__edge.animated path{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__edge.animated path.vue-flow__edge-interaction{stroke-dasharray:none;animation:none}.vue-flow__edge.inactive{pointer-events:none}.vue-flow__edge.selected,.vue-flow__edge:focus,.vue-flow__edge:focus-visible{outline:none}.vue-flow__edge.selected .vue-flow__edge-path,.vue-flow__edge:focus .vue-flow__edge-path,.vue-flow__edge:focus-visible .vue-flow__edge-path{stroke:#555}.vue-flow__edge-textwrapper{pointer-events:all}.vue-flow__edge-textbg{fill:#fff}.vue-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.vue-flow__connection{pointer-events:none}.vue-flow__connection .animated{stroke-dasharray:5;animation:dashdraw .5s linear infinite}.vue-flow__connectionline{z-index:1001}.vue-flow__nodes{pointer-events:none;transform-origin:0 0}.vue-flow__node-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible,.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible,.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid #555}.vue-flow__node{position:absolute;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default}.vue-flow__node.draggable{cursor:grab;pointer-events:all}.vue-flow__node.draggable.dragging{cursor:grabbing}.vue-flow__nodesselection{z-index:3;transform-origin:left top;pointer-events:none}.vue-flow__nodesselection-rect{position:absolute;pointer-events:all;cursor:grab}.vue-flow__nodesselection-rect.dragging{cursor:grabbing}.vue-flow__handle{position:absolute;pointer-events:none;min-width:5px;min-height:5px}.vue-flow__handle.connectable{pointer-events:all;cursor:crosshair}.vue-flow__handle-bottom{left:50%;bottom:0;transform:translate(-50%,50%)}.vue-flow__handle-top{left:50%;top:0;transform:translate(-50%,-50%)}.vue-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.vue-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.vue-flow__edgeupdater{cursor:move;pointer-events:all}.vue-flow__panel{position:absolute;z-index:5;margin:15px}.vue-flow__panel.top{top:0}.vue-flow__panel.bottom{bottom:0}.vue-flow__panel.left{left:0}.vue-flow__panel.right{right:0}.vue-flow__panel.center{left:50%;transform:translate(-50%)}@keyframes dashdraw{0%{stroke-dashoffset:10}}.field-modal-container[data-v-0aed7b15]{display:flex;flex-direction:column;gap:1rem;border:2px solid black;padding:1rem;box-shadow:4px 4px #000;background-color:#fff}.grid-2x2[data-v-0aed7b15]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.input-group[data-v-0aed7b15]{display:flex;flex-direction:column}.checkbox-inline[data-v-0aed7b15]{flex-direction:row;align-items:center;gap:.5rem}.field-label[data-v-0aed7b15]{font-weight:700;margin-bottom:.25rem}.field-input[data-v-0aed7b15],.field-select[data-v-0aed7b15]{border:2px solid black;border-radius:4px;padding:.5rem;box-shadow:3px 3px #000;background-color:var(--color-background);transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.field-input[data-v-0aed7b15]:focus,.field-select[data-v-0aed7b15]:focus{outline:none;transform:translate(2px,2px);box-shadow:none}.checkbox-group[data-v-0aed7b15]{display:flex;justify-content:space-between;gap:1rem;font-weight:700}.save-field-btn[data-v-0aed7b15]{align-self:flex-end;padding:.5rem 1rem;border:2px solid black;border-radius:4px;font-weight:700;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-field-btn[data-v-0aed7b15]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.field-modal-container[data-v-eca0508a]{display:flex;flex-direction:column;gap:1rem;padding:1rem}.input-container[data-v-eca0508a]{display:flex;flex-direction:column;gap:1rem}.input-group[data-v-eca0508a]{display:flex;flex-direction:column;gap:.15rem}.field-label[data-v-eca0508a]{font-weight:700;margin-bottom:5px}.field-input[data-v-eca0508a],.field-select[data-v-eca0508a]{border:2px solid black;border-radius:6px;padding:.6rem;background-color:#fff}.checkbox-group[data-v-eca0508a]{display:flex;flex-direction:column;gap:.5rem;font-weight:700}.action-group[data-v-eca0508a]{gap:.5rem;margin-top:2rem;display:flex;flex-direction:column}.delete-field-btn[data-v-eca0508a]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-danger);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.delete-field-btn[data-v-eca0508a]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.save-field-btn[data-v-eca0508a]{width:100%;padding:.5rem 1rem;border:2px solid black;border-radius:4px;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-field-btn[data-v-eca0508a]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.relation-container[data-v-4fbf1372]{display:flex;flex-direction:column;gap:1rem;border:2px solid black;padding:1rem;box-shadow:4px 4px #000;background-color:#fff}.grid-2x2[data-v-4fbf1372]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.input-group[data-v-4fbf1372]{display:flex;flex-direction:column}.relation-label[data-v-4fbf1372]{font-weight:700;margin-bottom:.25rem}.relation-input[data-v-4fbf1372],.relation-select[data-v-4fbf1372]{border:2px solid black;border-radius:4px;padding:.5rem;box-shadow:3px 3px #000;background-color:var(--color-background);transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.relation-input[data-v-4fbf1372]:focus,.relation-select[data-v-4fbf1372]:focus{outline:none;transform:translate(2px,2px);box-shadow:none}.checkbox-group[data-v-4fbf1372]{display:flex;justify-content:space-between;gap:1rem;font-weight:700}.save-relation-btn[data-v-4fbf1372]{align-self:flex-end;padding:.5rem 1rem;border:2px solid black;border-radius:4px;font-weight:700;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-relation-btn[data-v-4fbf1372]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.delete-relation-btn[data-v-4fbf1372]{align-self:flex-end;padding:.5rem 1rem;border:2px solid black;border-radius:4px;font-weight:700;background-color:var(--color-danger);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.delete-relation-btn[data-v-4fbf1372]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.action-group[data-v-4fbf1372]{display:flex;justify-content:space-between;gap:1rem}.relation-container[data-v-1cdfdb8a]{display:flex;flex-direction:column;gap:1rem;border:2px solid black;padding:1rem;box-shadow:4px 4px #000;background-color:#fff}.grid-2x2[data-v-1cdfdb8a]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.input-group[data-v-1cdfdb8a]{display:flex;flex-direction:column}.relation-label[data-v-1cdfdb8a]{font-weight:700;margin-bottom:.25rem}.relation-input[data-v-1cdfdb8a],.relation-select[data-v-1cdfdb8a]{border:2px solid black;border-radius:4px;padding:.5rem;box-shadow:3px 3px #000;background-color:var(--color-background);transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.relation-input[data-v-1cdfdb8a]:focus,.relation-select[data-v-1cdfdb8a]:focus{outline:none;transform:translate(2px,2px);box-shadow:none}.checkbox-group[data-v-1cdfdb8a]{display:flex;justify-content:space-between;gap:1rem;font-weight:700}.save-relation-btn[data-v-1cdfdb8a]{align-self:flex-end;padding:.5rem 1rem;border:2px solid black;border-radius:4px;font-weight:700;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-relation-btn[data-v-1cdfdb8a]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.rename-node-modal[data-v-2d35485f]{display:flex;flex-direction:column;gap:1rem;padding:1rem;border:2px solid black;box-shadow:4px 4px #000;background-color:#fff;width:100%;max-width:400px}.input-group[data-v-2d35485f]{display:flex;flex-direction:column}.field-label[data-v-2d35485f]{font-weight:700;margin-bottom:.25rem}.field-input[data-v-2d35485f]{border:2px solid black;border-radius:4px;padding:.5rem;background-color:var(--color-background);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.field-input[data-v-2d35485f]:focus{outline:none;transform:translate(2px,2px);box-shadow:none}.save-btn[data-v-2d35485f]{align-self:flex-end;padding:.5rem 1rem;border:2px solid black;border-radius:4px;font-weight:700;background-color:var(--color-success);box-shadow:3px 3px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.save-btn[data-v-2d35485f]:hover{cursor:pointer;transform:translate(2px,2px);box-shadow:none}.vue-flow-container[data-v-bf809f9d]{height:100%;display:flex}.vue-flow-viewport[data-v-bf809f9d]{position:relative;flex:1;display:flex}.viewport-wrapper[data-v-bf809f9d]{width:100%;height:100%}.toggle-grid-button[data-v-bf809f9d]{caret-color:transparent;position:absolute;top:10px;right:10px;background-color:var(--color-primary);color:#000;border:2px solid black;padding:3px 6px;font-weight:700;border-radius:8px;cursor:pointer;z-index:10;box-shadow:2px 2px #000}.toggle-grid-button[data-v-bf809f9d]:hover{box-shadow:0 0 #000;transform:translate(2px,2px)}.create-wrapper[data-v-bf809f9d]{position:absolute;top:10px;left:10px;display:flex;align-items:center}.create-circle[data-v-bf809f9d]{width:40px;height:40px;background-color:var(--color-primary);border:2px solid black;color:#000;border-radius:50%;font-size:20px;display:flex;justify-content:center;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;font-weight:700;z-index:10;box-shadow:2px 2px #000}.create-circle[data-v-bf809f9d]:hover{box-shadow:0 0 #000;transform:translate(2px,2px)}.floating-create-expanded[data-v-bf809f9d]{display:flex;align-items:center;background:var(--color-primary);border:2px solid black;border-radius:50px;height:40px;padding:0 10px;gap:8px;z-index:1000;margin-top:2px;margin-left:2px}.collapse-btn[data-v-bf809f9d]{display:grid;place-items:center;width:24px;height:24px;padding:0;cursor:pointer;background:none;border:none}.collapse-btn svg[data-v-bf809f9d]{width:20px;height:20px}.create-model-input[data-v-bf809f9d]{height:26px;border:2px solid black;border-radius:6px;padding:0 10px;width:160px}.create-model-btn[data-v-bf809f9d]{height:30px;padding:0 12px;border:2px solid black;border-radius:6px;cursor:pointer;font-weight:700;background-color:var(--color-secondary);margin-right:5px}.create-model-btn[data-v-bf809f9d]:hover{background-color:var(--color-success)}.enum-sidebar[data-v-db633d1c]{width:250px;height:100%;border-right:2px solid black;display:flex;flex-direction:column;background-color:#fff}.sidebar-header[data-v-db633d1c]{height:32px;padding:10px;border-bottom:2px solid black}.create-enum-wrapper[data-v-db633d1c]{display:flex;gap:5px;height:100%}.create-enum-input[data-v-db633d1c]{flex:1;border:2px solid black;border-radius:6px;padding:0 10px}.create-enum-btn[data-v-db633d1c]{width:32px;border:2px solid black;border-radius:6px;background-color:#fff;font-weight:700;cursor:pointer}.create-enum-btn[data-v-db633d1c]:hover{background-color:var(--color-success)}.enum-list[data-v-db633d1c]{flex:1;padding:5px;overflow-y:auto}.enum-item[data-v-db633d1c]{padding:10px 15px;cursor:pointer;display:flex;justify-content:space-between;align-items:center;border-radius:8px;border:2px solid transparent;height:15px}.enum-item.active[data-v-db633d1c],.enum-item[data-v-db633d1c]:hover{background-color:var(--color-primary);font-weight:700;border-color:#000}.delete-enum-btn[data-v-db633d1c]{background:none;border:none;font-size:18px;cursor:pointer;padding:0 5px}.delete-enum-btn[data-v-db633d1c]:hover{color:red}.container[data-v-b0fef25d]{width:100%;height:100vh;display:flex;justify-content:center;align-items:center;background-color:#fff}.editor-container[data-v-b0fef25d]{width:1000px;height:500px;background-color:#fff;border:2px solid black;display:flex;flex-direction:column;overflow:hidden}.editor-header[data-v-b0fef25d]{height:40px;display:flex;align-items:center;background-color:var(--color-primary);width:100%;border-bottom:2px solid black;box-sizing:border-box}.header-section[data-v-b0fef25d]{flex:1;text-align:center;cursor:pointer;font-weight:700;display:flex;align-items:center;justify-content:center;height:100%;-webkit-user-select:none;user-select:none}.header-divider[data-v-b0fef25d]{width:2px;height:100%;background-color:#000}.editor-content[data-v-b0fef25d]{position:relative;flex:1;width:100%;height:calc(100% - 40px)}.container[data-v-33ee6271]{width:100%;height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column}.modal-backdrop[data-v-d61e0035]{position:fixed;inset:0;background-color:#00000080;display:flex;justify-content:center;align-items:center;z-index:1000}.modal[data-v-d61e0035]{border:2px solid black;border-radius:6px;overflow:hidden;background-color:#fff;max-width:350px;width:100%;margin:0 1rem;display:flex;flex-direction:column;background-color:var(--color-secondary)}.modal-header[data-v-d61e0035]{display:flex;justify-content:space-between;align-items:center;padding:.75rem 1rem}.modal-title[data-v-d61e0035]{font-weight:700;flex-grow:1;display:flex;align-items:center;font-size:1rem}.modal-actions[data-v-d61e0035]{cursor:pointer;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.modal-body[data-v-d61e0035]{overflow:hidden;background-color:var(--color-secondary)}html,body{height:100%;margin:0}#app{display:flex;flex-direction:column;height:100%;background-color:var(--color-background)}.header{height:60px;position:sticky;flex-shrink:0;background-color:#fff;border-bottom:4px solid black;top:0;display:flex;align-items:center}.content{flex-grow:1;padding:1rem}.logo{display:flex;align-items:center;gap:.5rem;margin-left:1rem}.github-icon{width:20px;height:20px;border:2px solid black;border-radius:15%;padding:.25rem;box-shadow:2px 2px #000;transition:transform .1s ease-in-out,box-shadow .1s ease-in-out}.github-icon:hover{transform:translate(2px,2px);box-shadow:0 0 #000;cursor:pointer}.github-icon:visited,.github-icon:active,.github-icon:focus{color:#000} diff --git a/fastapi_forge/static/index.html b/fastapi_forge/static/index.html index 8eaf478..09f74be 100644 --- a/fastapi_forge/static/index.html +++ b/fastapi_forge/static/index.html @@ -8,8 +8,8 @@ Vite App - - + +
diff --git a/fastapi_forge/template/{{cookiecutter.project_name}}/pyproject.toml b/fastapi_forge/template/{{cookiecutter.project_name}}/pyproject.toml index d888ca8..752d437 100644 --- a/fastapi_forge/template/{{cookiecutter.project_name}}/pyproject.toml +++ b/fastapi_forge/template/{{cookiecutter.project_name}}/pyproject.toml @@ -1,11 +1,15 @@ [project] +name = "{{cookiecutter.project_name}}" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.12" dependencies = [ "fastapi>=0.115.8", "uvicorn>=0.34.0", "pydantic-settings>=2.7.1", "pydantic>=2.10.6", "email-validator>=2.2.0", - "schemahound>=0.1.14", "loguru>=0.7.3", "yarl>=1.18.3", "ruff>=0.9.4", @@ -46,11 +50,7 @@ dependencies = [ {%- if cookiecutter.use_logfire -%} "logfire[aio-pika,asyncpg,fastapi,httpx,sqlalchemy,system-metrics]>=3.16.0", {%- endif %} -]name = "{{cookiecutter.project_name}}" -version = "0.1.0" -description = "Add your description here" -readme = "README.md" -requires-python = ">=3.12" +] [tool.pytest.ini_options] env = [ @@ -59,7 +59,7 @@ env = [ ] [tool.ruff] -exclude = ["migrations", ".venv/", "Lib"] +exclude = ["migrations",".venv/", "Lib"] target-version = "py312" line-length = 88 indent-width = 4 @@ -133,7 +133,7 @@ line-ending = "auto" "__init__.py" = ["F401"] [tool.mypy] -plugins = ["pydantic.mypy", {% if cookiecutter.use_postgres -%}"sqlalchemy.ext.mypy.plugin"{% endif %}]warn_return_any = false +warn_return_any = false namespace_packages = true strict = true ignore_missing_imports = true @@ -141,4 +141,5 @@ pretty = true show_error_codes = true implicit_reexport = true disable_error_code = ["prop-decorator", "override", "import-untyped"] -exclude = ["migrations"] +plugins = ["pydantic.mypy", {% if cookiecutter.use_postgres -%}"sqlalchemy.ext.mypy.plugin"{% endif %}] +exclude = ["migrations"] \ No newline at end of file diff --git a/fastapi_forge/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/dependencies/auth_dependencies.py b/fastapi_forge/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/dependencies/auth_dependencies.py index a1f1829..59ddb94 100644 --- a/fastapi_forge/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/dependencies/auth_dependencies.py +++ b/fastapi_forge/template/{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/dependencies/auth_dependencies.py @@ -16,14 +16,15 @@ class HTTPBearer(_HTTPBearer): Returns access token as str. """ - async def __call__(self, request: Request) -> str | None: # type: ignore + async def __call__(self, request: Request) -> str | None: """Return access token.""" try: obj = await super().__call__(request) - return obj.credentials if obj else None - except HTTPException: + except HTTPException as err: msg = "Missing token." - raise exceptions.Http401(msg) + raise exceptions.Http401(msg) from err + else: + return obj.credentials if obj else None auth_scheme = HTTPBearer() diff --git a/fastapi_forge/type_info_registry.py b/fastapi_forge/type_info_registry.py index dc0fcec..f4d29c6 100644 --- a/fastapi_forge/type_info_registry.py +++ b/fastapi_forge/type_info_registry.py @@ -5,6 +5,7 @@ from pydantic.dataclasses import dataclass from fastapi_forge.enums import FieldDataTypeEnum +from fastapi_forge.logger import logger EnumName = Annotated[str, Field(...)] @@ -48,9 +49,10 @@ def __init__(self) -> None: def register(self, key: T, data_type: TypeInfo) -> None: if key in self: - raise KeyError( + logger.error( f"{self.__class__.__name__}: Key '{key}' is already registered." ) + return self._registry[key] = data_type def get(self, key: T) -> TypeInfo: diff --git a/frontend/src/components/modal/AddFieldModal.vue b/frontend/src/components/modal/AddFieldModal.vue index 8aea2ad..2188857 100644 --- a/frontend/src/components/modal/AddFieldModal.vue +++ b/frontend/src/components/modal/AddFieldModal.vue @@ -8,7 +8,7 @@
- @@ -32,13 +32,24 @@
- - +
@@ -49,6 +60,12 @@ +
+ + + +
+
@@ -56,7 +73,7 @@